All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web.monaco.min.vs.editor.editor.main.js Maven / Gradle / Ivy

/*!-----------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
 * Released under the MIT license
 * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
 *-----------------------------------------------------------*/(function(){var ie=["exports","require","vs/base/common/lifecycle","vs/nls","vs/nls!vs/editor/editor.main","vs/editor/common/core/range","vs/base/common/event","vs/base/browser/dom","vs/platform/instantiation/common/instantiation","vs/base/common/errors","vs/css!vs/editor/editor.main","vs/editor/common/core/position","vs/base/common/strings","vs/base/common/arrays","vs/base/common/async","vs/platform/contextkey/common/contextkey","vs/editor/browser/editorExtensions","vs/base/common/platform","vs/editor/common/services/languageFeatures","vs/base/common/cancellation","vs/base/common/types","vs/editor/common/editorContextKeys","vs/base/common/uri","vs/platform/theme/common/themeService","vs/editor/common/core/selection","vs/platform/commands/common/commands","vs/base/common/codicons","vs/base/common/themables","vs/platform/configuration/common/configuration","vs/platform/actions/common/actions","vs/platform/theme/common/colorRegistry","vs/editor/common/languages","vs/editor/common/languages/languageConfigurationRegistry","vs/editor/browser/services/codeEditorService","vs/platform/keybinding/common/keybinding","vs/base/common/observable","vs/editor/common/config/editorOptions","vs/platform/registry/common/platform","vs/base/common/color","vs/editor/common/model/textModel","vs/base/browser/fastDomNode","vs/base/common/actions","vs/editor/common/languages/language","vs/editor/common/model","vs/base/common/network","vs/base/common/resources","vs/platform/instantiation/common/extensions","vs/platform/notification/common/notification","vs/base/browser/window","vs/base/common/iterator","vs/base/browser/keyboardEvent","vs/base/browser/ui/aria/aria","vs/editor/common/services/model","vs/base/common/map","vs/base/browser/browser","vs/base/common/objects","vs/editor/browser/view/viewPart","vs/platform/opener/common/opener","vs/base/common/htmlContent","vs/platform/contextview/browser/contextView","vs/base/common/arraysFind","vs/base/common/stopwatch","vs/editor/common/core/lineRange","vs/base/browser/touch","vs/platform/log/common/log","vs/base/common/keyCodes","vs/base/common/linkedList","vs/base/browser/mouseEvent","vs/editor/common/services/resolverService","vs/platform/accessibility/common/accessibility","vs/platform/quickinput/common/quickInput","vs/base/common/filters","vs/editor/browser/config/domFontInfo","vs/editor/common/core/offsetRange","vs/editor/common/core/editOperation","vs/editor/common/cursorCommon","vs/base/browser/ui/scrollbar/scrollableElement","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/services/languageFeatureDebounce","vs/editor/common/languages/modesRegistry","vs/platform/telemetry/common/telemetry","vs/platform/theme/common/iconRegistry","vs/editor/common/core/editorColorRegistry","vs/base/browser/event","vs/editor/common/core/cursorColumns","vs/editor/common/viewModel","vs/base/browser/ui/widget","vs/platform/progress/common/progress","vs/platform/theme/common/theme","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/editor/browser/widget/diffEditor/utils","vs/platform/storage/common/storage","vs/base/browser/trustedTypes","vs/editor/common/tokens/lineTokens","vs/base/common/path","vs/editor/common/standaloneStrings","vs/platform/markers/common/markers","vs/platform/configuration/common/configurationRegistry","vs/base/common/assert","vs/base/common/lazy","vs/base/common/severity","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/common/core/stringBuilder","vs/platform/clipboard/common/clipboardService","vs/editor/contrib/editorState/browser/editorState","vs/platform/theme/browser/defaultStyles","vs/base/common/decorators","vs/base/common/functional","vs/base/common/mime","vs/base/common/observableInternal/base","vs/editor/common/diff/rangeMapping","vs/editor/common/languages/languageConfiguration","vs/editor/common/textModelEvents","vs/editor/browser/view/dynamicViewOverlay","vs/editor/contrib/codeAction/common/types","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/list/listWidget","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/services/editorWorker","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/platform/keybinding/common/keybindingsRegistry","vs/base/common/keybindings","vs/base/common/hash","vs/base/common/iconLabels","vs/editor/browser/stableEditorScroll","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/commands/replaceCommand","vs/editor/common/encodedTokenAttributes","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/contrib/snippet/browser/snippetParser","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/browser/services/bulkEditService","vs/editor/standalone/common/standaloneTheme","vs/platform/layout/browser/layoutService","vs/editor/contrib/suggest/browser/suggest","vs/platform/quickinput/common/quickAccess","vs/editor/contrib/codeAction/browser/codeAction","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/contrib/peekView/browser/peekView","vs/base/browser/ui/tree/tree","vs/base/common/buffer","vs/base/common/numbers","vs/base/common/observableInternal/logging","vs/base/common/scrollable","vs/editor/browser/view/renderingContext","vs/editor/common/config/editorZoom","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/core/wordHelper","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm","vs/editor/browser/editorBrowser","vs/editor/common/editorFeatures","vs/editor/common/viewEventHandler","vs/editor/common/viewLayout/lineDecorations","vs/editor/contrib/inlineCompletions/browser/utils","vs/base/browser/globalPointerMoveMonitor","vs/base/browser/ui/sash/sash","vs/base/browser/ui/toggle/toggle","vs/editor/common/languages/nullTokenize","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/audioCues/browser/audioCueService","vs/platform/dialogs/common/dialogs","vs/platform/instantiation/common/serviceCollection","vs/platform/label/common/label","vs/editor/browser/editorDom","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/platform/workspace/common/workspace","vs/base/common/idGenerator","vs/base/common/observableInternal/derived","vs/base/common/range","vs/base/common/diff/diff","vs/base/common/uint","vs/base/common/uuid","vs/base/common/dataTransfer","vs/base/browser/ui/codicons/codiconStyles","vs/css!vs/platform/quickinput/browser/media/quickInput","vs/editor/common/core/textModelDefaults","vs/editor/common/editorCommon","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/common/model/textModelSearch","vs/editor/contrib/folding/browser/foldingRanges","vs/base/browser/markdownRenderer","vs/base/browser/ui/tree/abstractTree","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/common/services/textResourceConfiguration","vs/editor/browser/controller/textAreaInput","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/browser/coreCommands","vs/editor/contrib/message/browser/messageController","vs/platform/list/browser/listService","vs/platform/undoRedo/common/undoRedo","vs/editor/browser/widget/codeEditorWidget","vs/editor/contrib/find/browser/findModel","vs/editor/contrib/snippet/browser/snippetController2","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/browser/dnd","vs/base/common/ternarySearchTree","vs/base/browser/ui/mouseCursor/mouseCursor","vs/css!vs/editor/contrib/colorPicker/browser/colorPicker","vs/editor/browser/config/tabFocus","vs/editor/common/core/indentation","vs/editor/common/diff/defaultLinesDiffComputer/utils","vs/editor/common/diff/linesDiffComputer","vs/editor/common/cursor/cursorMoveOperations","vs/editor/common/cursor/cursorDeleteOperations","vs/editor/common/cursor/cursorMoveCommands","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/common/model/utils","vs/editor/common/standalone/standaloneEnums","vs/editor/common/textModelGuides","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/inlineCompletions/browser/commandIds","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/base/common/keybindingLabels","vs/base/browser/canIUse","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/tree/objectTreeModel","vs/base/common/process","vs/base/common/extpath","vs/base/common/marshalling","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/base/browser/ui/resizable/resizable","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/list/listView","vs/base/browser/ui/button/button","vs/base/browser/ui/iconLabel/iconLabel","vs/base/browser/ui/inputbox/inputBox","vs/base/browser/ui/findinput/findInput","vs/editor/browser/view/viewLayer","vs/editor/common/languages/supports/richEditBrackets","vs/editor/common/config/fontInfo","vs/platform/instantiation/common/descriptors","vs/editor/common/services/markerDecorations","vs/editor/common/services/semanticTokensStyling","vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/contextkey/common/contextkeys","vs/platform/environment/common/environment","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/editor/common/config/editorConfigurationSchema","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/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/browser/viewParts/lines/viewLine","vs/editor/common/services/semanticTokensProviderStyling","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/editor/browser/widget/diffEditor/diffEditorWidget","vs/editor/contrib/codeAction/browser/codeActionController","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/inlineProgress/browser/inlineProgress","vs/editor/contrib/gotoSymbol/browser/goToCommands","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/editor/standalone/browser/standaloneServices","vs/base/browser/performance","vs/base/common/cache","vs/base/common/collections","vs/base/common/observableInternal/autorun","vs/base/common/ime","vs/base/common/symbols","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/list/list","vs/css!vs/platform/actionWidget/browser/actionWidget","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/common/config/diffEditor","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/controller/textAreaState","vs/editor/common/core/rgba","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/myersDiffAlgorithm","vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations","vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence","vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer","vs/editor/common/editorAction","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/model/prefixSumComputer","vs/editor/common/model/textModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/modelLineProjectionData","vs/editor/common/services/treeViewsDnd","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/model/guidesTextModelPart","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/foldingModel","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/inlineCompletions/browser/singleTextEdit","vs/editor/contrib/semanticTokens/common/semanticTokensConfig","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/stickyScroll/browser/stickyScrollElement","vs/editor/contrib/suggest/browser/completionModel","vs/editor/contrib/suggest/browser/wordDistance","vs/editor/standalone/common/monarch/monarchCommon","vs/base/common/glob","vs/base/browser/dompurify/dompurify","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/countBadge/countBadge","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/splitview/splitview","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/iconLabel/iconLabelHover","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/base/browser/ui/tree/objectTree","vs/base/common/worker/simpleWorker","vs/editor/browser/config/elementSizeObserver","vs/editor/common/core/textChange","vs/editor/common/languageSelector","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/browser/widget/diffEditor/movedBlocksLines","vs/editor/browser/config/fontMeasurements","vs/editor/common/viewModel/viewModelDecorations","vs/editor/common/languages/textToHtmlTokenizer","vs/editor/common/services/editorBaseApi","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/common/model/editStack","vs/platform/files/common/files","vs/editor/contrib/dropOrPasteInto/browser/edit","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/semanticTokens/common/getSemanticTokens","vs/editor/standalone/common/monarch/monarchLexer","vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/platform/keybinding/common/keybindingResolver","vs/platform/keybinding/common/resolvedKeybindingItem","vs/editor/standalone/browser/standaloneLayoutService","vs/platform/quickinput/browser/quickInputUtils","vs/platform/dnd/browser/dnd","vs/editor/browser/dnd","vs/editor/contrib/colorPicker/browser/defaultDocumentColorProvider","vs/editor/contrib/colorPicker/browser/color","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/configuration/common/configurationModels","vs/platform/history/browser/contextScopedHistoryWidget","vs/editor/contrib/suggest/browser/suggestMemory","vs/editor/browser/widget/diffEditor/diffEditorViewModel","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/editor/contrib/format/browser/format","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/wordOperations/browser/wordOperations","vs/editor/browser/controller/mouseTarget","vs/platform/quickinput/browser/quickInputList","vs/editor/browser/widget/diffEditor/overviewRulerPart","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess","vs/editor/standalone/browser/standaloneCodeEditorService","vs/editor/standalone/browser/standaloneThemeService","vs/platform/actions/browser/toolbar","vs/editor/browser/widget/diffEditor/decorations","vs/editor/browser/widget/multiDiffEditorWidget/diffEditorItemTemplate","vs/editor/contrib/colorPicker/browser/colorDetector","vs/editor/contrib/colorPicker/browser/colorHoverParticipant","vs/editor/contrib/find/browser/findController","vs/editor/contrib/folding/browser/foldingDecorations","vs/editor/contrib/hover/browser/contentHover","vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/gotoSymbol/browser/peek/referencesController","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/editor/contrib/hover/browser/hover","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/editor/contrib/inlayHints/browser/inlayHintsController","vs/editor/contrib/stickyScroll/browser/stickyScrollController","vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/suggest/browser/suggestController","vs/platform/workspace/common/workspaceTrust","vs/base/browser/iframe","vs/base/browser/ui/list/list","vs/base/browser/ui/list/splice","vs/base/common/diff/diffChange","vs/base/common/comparers","vs/base/common/linkedText","vs/base/common/marked/marked","vs/base/common/naturalLanguage/korean","vs/base/common/navigator","vs/base/common/history","vs/base/common/observableInternal/utils","vs/base/browser/ui/list/rangeMap","vs/base/common/search","vs/base/common/tfIdf","vs/css!vs/base/browser/ui/aria/aria","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/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/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/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/margin/margin","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/viewParts/whitespace/whitespace","vs/css!vs/editor/browser/widget/diffEditor/accessibleDiffViewer","vs/css!vs/editor/browser/widget/diffEditor/style","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/browser/widget/multiDiffEditorWidget/style","vs/css!vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/css!vs/editor/contrib/codeAction/browser/lightBulbWidget","vs/css!vs/editor/contrib/codelens/browser/codelensWidget","vs/css!vs/editor/contrib/dnd/browser/dnd","vs/css!vs/editor/contrib/dropOrPasteInto/browser/postEditWidget","vs/css!vs/editor/contrib/find/browser/findOptionsWidget","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/hover/browser/hover","vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/css!vs/editor/contrib/inlineCompletions/browser/ghostText","vs/css!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","vs/css!vs/editor/contrib/inlineProgress/browser/inlineProgressWidget","vs/css!vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/markdownRenderer/browser/renderedMarkdown","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/symbolIcons/browser/symbolIcons","vs/css!vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/css!vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/css!vs/editor/contrib/wordHighlighter/browser/highlightDecorations","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/editor/standalone/browser/quickInput/standaloneQuickInput","vs/css!vs/editor/standalone/browser/standalone-tokens","vs/css!vs/platform/actions/browser/menuEntryActionViewItem","vs/css!vs/platform/opener/browser/link","vs/css!vs/platform/severityIcon/browser/media/severityIcon","vs/editor/browser/config/charWidthReader","vs/editor/browser/config/migrateOptions","vs/editor/browser/viewParts/lines/domReadingContext","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/browser/widget/diffEditor/delegatingEditorImpl","vs/editor/browser/widget/multiDiffEditorWidget/objectPool","vs/editor/browser/widget/diffEditor/outlineModel","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/commands/surroundSelectionCommand","vs/editor/common/cursor/cursorContext","vs/editor/common/diff/defaultLinesDiffComputer/lineSequence","vs/editor/common/diff/defaultLinesDiffComputer/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/defaultLinesDiffComputer/computeMovedLines","vs/editor/common/diff/legacyLinesDiffComputer","vs/editor/common/diff/linesDiffComputers","vs/editor/common/editorTheme","vs/editor/common/languages/defaultDocumentColorsComputer","vs/editor/common/languages/linkComputer","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/languages/supports/languageBracketsConfiguration","vs/editor/common/languages/supports/onEnter","vs/editor/common/languages/supports/tokenization","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/model/fixedArray","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/model/mirrorTextModel","vs/editor/common/textModelBracketPairs","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/tokenizationRegistry","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousTokensEditing","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/rulers/rulers","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewLayout/linePart","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","vs/editor/contrib/smartSelect/browser/wordSelections","vs/editor/contrib/suggest/browser/suggestCommitCharacters","vs/editor/contrib/suggest/browser/suggestOvertypingCapturer","vs/editor/standalone/common/monarch/monarchCompile","vs/nls!vs/base/browser/ui/actionbar/actionViewItems","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/hover/hoverWidget","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/selectBox/selectBoxCustom","vs/nls!vs/base/browser/ui/toolbar/toolbar","vs/nls!vs/base/browser/ui/tree/abstractTree","vs/nls!vs/base/common/actions","vs/editor/browser/widget/multiDiffEditorWidget/utils","vs/nls!vs/base/common/errorMessage","vs/base/common/errorMessage","vs/nls!vs/base/common/keybindingLabels","vs/nls!vs/base/common/platform","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/browser/ui/tree/compressedObjectTreeModel","vs/base/common/hotReload","vs/base/common/fuzzyScorer","vs/base/common/labels","vs/base/browser/ui/dropdown/dropdown","vs/base/browser/ui/list/rowCache","vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/selectBox/selectBoxNative","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/table/tableWidget","vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/selectBox/selectBox","vs/base/browser/ui/findinput/replaceInput","vs/base/browser/ui/menu/menu","vs/base/browser/ui/toolbar/toolbar","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/tree/asyncDataTree","vs/base/browser/defaultWorkerFactory","vs/base/parts/storage/common/storage","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/widget/codeEditorContributions","vs/editor/browser/widget/diffEditor/diffEditorSash","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/common/languageFeatureRegistry","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/services/semanticTokensDto","vs/editor/contrib/hover/browser/resizableContentWidget","vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions","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/diffEditor/accessibleDiffViewer","vs/nls!vs/editor/browser/widget/diffEditor/colors","vs/nls!vs/editor/browser/widget/diffEditor/decorations","vs/nls!vs/editor/browser/widget/diffEditor/diffEditor.contribution","vs/nls!vs/editor/browser/widget/diffEditor/diffEditorDecorations","vs/nls!vs/editor/browser/widget/diffEditor/diffEditorEditors","vs/nls!vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature","vs/nls!vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin","vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin","vs/nls!vs/editor/browser/widget/diffEditor/movedBlocksLines","vs/nls!vs/editor/browser/widget/multiDiffEditorWidget/colors","vs/nls!vs/editor/common/config/editorConfigurationSchema","vs/nls!vs/editor/common/config/editorOptions","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/browser/widget/diffEditor/diffEditorOptions","vs/nls!vs/editor/common/core/editorColorRegistry","vs/nls!vs/editor/common/editorContextKeys","vs/nls!vs/editor/common/languages","vs/editor/common/model/textModelTokens","vs/editor/common/model/tokenizationTextModelPart","vs/editor/common/services/editorSimpleWorker","vs/nls!vs/editor/common/languages/modesRegistry","vs/nls!vs/editor/common/model/editStack","vs/nls!vs/editor/common/standaloneStrings","vs/nls!vs/editor/common/viewLayout/viewLineRenderer","vs/editor/browser/widget/diffEditor/renderLines","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/codeActionController","vs/nls!vs/editor/contrib/codeAction/browser/codeActionMenu","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/colorPicker/browser/standaloneColorPickerActions","vs/nls!vs/editor/contrib/comment/browser/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/defaultProviders","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/nls!vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","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/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/commands","vs/nls!vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController","vs/nls!vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget","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/highlightDecorations","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/actionWidget/browser/actionList","vs/nls!vs/platform/actionWidget/browser/actionWidget","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/actions/browser/toolbar","vs/nls!vs/platform/actions/common/menuService","vs/nls!vs/platform/audioCues/browser/audioCueService","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/contextkey/browser/contextKeyService","vs/nls!vs/platform/contextkey/common/contextkey","vs/nls!vs/platform/contextkey/common/contextkeys","vs/nls!vs/platform/contextkey/common/scanner","vs/nls!vs/platform/history/browser/contextScopedHistoryWidget","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/quickinput/browser/commandsQuickAccess","vs/nls!vs/platform/quickinput/browser/helpQuickAccess","vs/nls!vs/platform/quickinput/browser/quickInput","vs/nls!vs/platform/quickinput/browser/quickInputController","vs/nls!vs/platform/quickinput/browser/quickInputList","vs/nls!vs/platform/quickinput/browser/quickInputUtils","vs/nls!vs/platform/theme/common/colorRegistry","vs/nls!vs/platform/theme/common/iconRegistry","vs/nls!vs/platform/undoRedo/common/undoRedoService","vs/nls!vs/platform/workspace/common/workspace","vs/platform/action/common/action","vs/platform/action/common/actionCommonCategories","vs/platform/contextkey/common/scanner","vs/platform/editor/common/editor","vs/platform/extensions/common/extensions","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/instantiation/common/graph","vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature","vs/editor/common/services/languageFeaturesService","vs/editor/common/services/treeViewsDndService","vs/editor/contrib/inlineCompletions/browser/ghostTextWidget","vs/editor/contrib/links/browser/getLinks","vs/editor/standalone/browser/colorizer","vs/editor/contrib/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/contextkey/browser/contextKeyService","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keybinding/common/abstractKeybindingService","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/clipboard/browser/clipboardService","vs/platform/log/common/logService","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/markers/common/markerService","vs/editor/browser/services/openerService","vs/platform/opener/browser/link","vs/platform/product/common/product","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/quickinput/browser/quickInputBox","vs/editor/browser/services/webWorker","vs/editor/common/cursor/cursor","vs/editor/common/services/getIconClasses","vs/editor/common/services/languagesAssociations","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource","vs/editor/contrib/linesOperations/browser/moveLinesCommand","vs/editor/contrib/hover/browser/marginHover","vs/platform/configuration/common/configurations","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/platform/quickinput/browser/helpQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess","vs/platform/quickinput/browser/quickAccess","vs/platform/severityIcon/browser/severityIcon","vs/editor/contrib/codelens/browser/codeLensCache","vs/platform/actions/common/menuService","vs/editor/browser/services/markerDecorations","vs/editor/browser/view/viewController","vs/editor/browser/widget/diffEditor/workerBasedDocumentDiffProvider","vs/editor/browser/widget/diffEditor/diffProviderFactoryService","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/clipboard/browser/clipboard","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/fontZoom/browser/fontZoom","vs/editor/contrib/format/browser/formatActions","vs/editor/contrib/gotoSymbol/browser/symbolNavigation","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/lineSelection/browser/lineSelection","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/longLinesHelper/browser/longLinesHelper","vs/editor/contrib/readOnlyMessage/browser/contribution","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/suggest/browser/suggestInlineCompletions","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/platform/quickinput/browser/commandsQuickAccess","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/widget/diffEditor/colors","vs/editor/browser/widget/multiDiffEditorWidget/colors","vs/editor/contrib/codeAction/browser/codeActionMenu","vs/editor/contrib/gotoSymbol/browser/peek/referencesTree","vs/platform/actionWidget/browser/actionList","vs/platform/actionWidget/browser/actionWidget","vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/widget/diffEditor/accessibleDiffViewer","vs/editor/contrib/colorPicker/browser/colorPickerWidget","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/unicodeHighlighter/browser/bannerController","vs/platform/theme/browser/iconsStyleSheet","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/viewParts/lines/viewLines","vs/platform/quickinput/browser/quickInput","vs/platform/quickinput/browser/quickInputController","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/widget/diffEditor/diffEditorEditors","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/viewCursors/viewCursors","vs/editor/browser/viewParts/whitespace/whitespace","vs/editor/browser/view","vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider","vs/editor/common/services/markerDecorationsService","vs/editor/common/services/semanticTokensStylingService","vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess","vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess","vs/editor/contrib/rename/browser/renameInputField","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/semanticTokens/browser/documentSemanticTokens","vs/editor/contrib/semanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/suggest/browser/suggestWidgetRenderer","vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess","vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess","vs/editor/standalone/common/themes","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/platform/contextview/browser/contextMenuService","vs/platform/quickinput/browser/quickInputService","vs/editor/standalone/browser/quickInput/standaloneQuickInputService","vs/editor/browser/widget/diffEditor/diffEditorDecorations","vs/editor/browser/widget/diffEditor/lineAlignment","vs/editor/common/services/modelService","vs/editor/common/viewModel/viewModelLines","vs/editor/common/viewModel/viewModelImpl","vs/editor/browser/widget/diffEditor/diffEditor.contribution","vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidgetImpl","vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidget","vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/editor/contrib/codelens/browser/codelensWidget","vs/editor/contrib/codelens/browser/codelensController","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/find/browser/findState","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget","vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/contrib/dropOrPasteInto/browser/copyPasteController","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController","vs/editor/contrib/linkedEditing/browser/linkedEditing","vs/editor/contrib/links/browser/links","vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/editor/contrib/zoneWidget/browser/zoneWidget","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/stickyScrollActions","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/platform/undoRedo/common/undoRedoService","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution","vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/editor/contrib/suggest/browser/suggestModel","vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider","vs/editor/contrib/inlineCompletions/browser/commands","vs/editor/contrib/inlineCompletions/browser/hoverParticipant","vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution","vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter","vs/editor/editor.all","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/editor/editor.api","vs/css","vs/editor/edcore.main"],ne=function(Q){for(var e=[],L=0,k=Q.length;L{v({})},n=>{typeof v.error=="function"&&v.error("Could not find "+i+".")})}e.load=L;function k(p,S,v,b){if(y(p,S)){v();return}E(p,S,v,b)}function y(p,S){const v=window.document.getElementsByTagName("link");for(let b=0,o=v.length;b{S.removeEventListener("load",i),S.removeEventListener("error",n)},i=t=>{o(),v()},n=t=>{o(),b(t)};S.addEventListener("load",i),S.addEventListener("error",n)}}),define(ie[3],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=e.create=e.setPseudoTranslation=e.getConfiguredDefaultLocale=e.localize2=e.localize=void 0;let L=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const k="i-default";function y(u,f){let c;return f.length===0?c=u:c=u.replace(/\{(\d+)\}/g,(d,r)=>{const l=r[0],s=f[l];let g=d;return typeof s=="string"?g=s:(typeof s=="number"||typeof s=="boolean"||s===void 0||s===null)&&(g=String(s)),g}),L&&(c="\uFF3B"+c.replace(/[aouei]/g,"$&$&")+"\uFF3D"),c}function E(u,f){let c=u[f];return c||(c=u["*"],c)?c:null}function _(u){return u.charAt(u.length-1)==="/"?u:u+"/"}async function p(u,f,c){const d=_(u)+_(f)+"vscode/"+_(c),r=await fetch(d);if(r.ok)return await r.json();throw new Error(`${r.status} - ${r.statusText}`)}function S(u){return function(f,c){const d=Array.prototype.slice.call(arguments,2);return y(u[f],d)}}function v(u){return(f,c,...d)=>({value:y(u[f],d),original:y(c,d)})}function b(u,f,...c){return y(f,c)}e.localize=b;function o(u,f,...c){const d=y(f,c);return{value:d,original:d}}e.localize2=o;function i(u){}e.getConfiguredDefaultLocale=i;function n(u){L=u}e.setPseudoTranslation=n;function t(u,f){var c;return{localize:S(f[u]),localize2:v(f[u]),getConfiguredDefaultLocale:(c=f.getConfiguredDefaultLocale)!==null&&c!==void 0?c:d=>{}}}e.create=t;function a(u,f,c,d){var r;const l=(r=d["vs/nls"])!==null&&r!==void 0?r:{};if(!u||u.length===0)return c({localize:b,localize2:o,getConfiguredDefaultLocale:()=>{var C;return(C=l.availableLanguages)===null||C===void 0?void 0:C["*"]}});const s=l.availableLanguages?E(l.availableLanguages,u):null,g=s===null||s===k;let h=".nls";g||(h=h+"."+s);const m=C=>{Array.isArray(C)?(C.localize=S(C),C.localize2=v(C)):(C.localize=S(C[u]),C.localize2=v(C[u])),C.getConfiguredDefaultLocale=()=>{var w;return(w=l.availableLanguages)===null||w===void 0?void 0:w["*"]},c(C)};typeof l.loadBundle=="function"?l.loadBundle(u,s,(C,w)=>{C?f([u+".nls"],m):m(w)}):l.translationServiceUrl&&!g?(async()=>{var C;try{const w=await p(l.translationServiceUrl,s,u);return m(w)}catch(w){if(!s.includes("-"))return console.error(w),f([u+".nls"],m);try{const D=s.split("-")[0],I=await p(l.translationServiceUrl,D,u);return(C=l.availableLanguages)!==null&&C!==void 0||(l.availableLanguages={}),l.availableLanguages["*"]=D,m(I)}catch(D){return console.error(D),f([u+".nls"],m)}}})():f([u+h],m,C=>{if(h===".nls"){console.error("Failed trying to load default language strings",C);return}console.error(`Failed to load message bundle for language ${s}. Falling back to the default language:`,C),f([u+".nls"],m)})}e.load=a});/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */const{entries:Wt,setPrototypeOf:Vt,isFrozen:Yt,getPrototypeOf:Qt,getOwnPropertyDescriptor:Xt}=Object;let{freeze:vt,seal:_t,create:Jt}=Object,{apply:At,construct:Rt}=typeof Reflect<"u"&&Reflect;At||(At=function(e,L,k){return e.apply(L,k)}),vt||(vt=function(e){return e}),_t||(_t=function(e){return e}),Rt||(Rt=function(e,L){return new e(...L)});const ei=bt(Array.prototype.forEach),zt=bt(Array.prototype.pop),Et=bt(Array.prototype.push),Tt=bt(String.prototype.toLowerCase),Pt=bt(String.prototype.toString),ti=bt(String.prototype.match),St=bt(String.prototype.replace),ii=bt(String.prototype.indexOf),ni=bt(String.prototype.trim),Ct=bt(RegExp.prototype.test),It=si(TypeError);function bt(Q){return function(e){for(var L=arguments.length,k=new Array(L>1?L-1:0),y=1;y/gm),di=_t(/\${[\w\W]*}/gm),ci=_t(/^data-[\-\w.\u00B7-\uFFFF]/),ui=_t(/^aria-[\-\w]+$/),jt=_t(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hi=_t(/^(?:\w+script|data):/i),gi=_t(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$t=_t(/^html$/i);var Gt=Object.freeze({__proto__:null,MUSTACHE_EXPR:ai,ERB_EXPR:li,TMPLIT_EXPR:di,DATA_ATTR:ci,ARIA_ATTR:ui,IS_ALLOWED_URI:jt,IS_SCRIPT_OR_DATA:hi,ATTR_WHITESPACE:gi,DOCTYPE_NAME:$t});const fi=()=>typeof window>"u"?null:window,mi=function(e,L){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let k=null;const y="data-tt-policy-suffix";L&&L.hasAttribute(y)&&(k=L.getAttribute(y));const E="dompurify"+(k?"#"+k:"");try{return e.createPolicy(E,{createHTML(_){return _},createScriptURL(_){return _}})}catch{return console.warn("TrustedTypes policy "+E+" could not be created."),null}};function Zt(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fi();const e=xe=>Zt(xe);if(e.version="3.0.5",e.removed=[],!Q||!Q.document||Q.document.nodeType!==9)return e.isSupported=!1,e;const L=Q.document,k=L.currentScript;let{document:y}=Q;const{DocumentFragment:E,HTMLTemplateElement:_,Node:p,Element:S,NodeFilter:v,NamedNodeMap:b=Q.NamedNodeMap||Q.MozNamedAttrMap,HTMLFormElement:o,DOMParser:i,trustedTypes:n}=Q,t=S.prototype,a=Mt(t,"cloneNode"),u=Mt(t,"nextSibling"),f=Mt(t,"childNodes"),c=Mt(t,"parentNode");if(typeof _=="function"){const xe=y.createElement("template");xe.content&&xe.content.ownerDocument&&(y=xe.content.ownerDocument)}let d,r="";const{implementation:l,createNodeIterator:s,createDocumentFragment:g,getElementsByTagName:h}=y,{importNode:m}=L;let C={};e.isSupported=typeof Wt=="function"&&typeof c=="function"&&l&&l.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:w,ERB_EXPR:D,TMPLIT_EXPR:I,DATA_ATTR:M,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:T}=Gt;let{IS_ALLOWED_URI:N}=Gt,P=null;const x=Ye({},[...Ht,...Ot,...Ft,...xt,...Ut]);let R=null;const B=Ye({},[...Kt,...Bt,...qt,...Nt]);let W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,U=null,F=!0,j=!0,J=!1,le=!0,ee=!1,$=!1,te=!1,G=!1,de=!1,ue=!1,X=!1,Z=!0,re=!1;const oe="user-content-";let Y=!0,K=!1,H={},z=null;const se=Ye({},["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"]);let q=null;const ae=Ye({},["audio","video","img","source","image","track"]);let ce=null;const ge=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),pe="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let Ce=ve,Se=!1,_e=null;const Te=Ye({},[pe,me,ve],Pt);let Me;const Pe=["application/xhtml+xml","text/html"],Be="text/html";let Le,Ne=null;const fe=y.createElement("form"),be=function(De){return De instanceof RegExp||De instanceof Function},ke=function(De){if(!(Ne&&Ne===De)){if((!De||typeof De!="object")&&(De={}),De=Lt(De),Me=Pe.indexOf(De.PARSER_MEDIA_TYPE)===-1?Me=Be:Me=De.PARSER_MEDIA_TYPE,Le=Me==="application/xhtml+xml"?Pt:Tt,P="ALLOWED_TAGS"in De?Ye({},De.ALLOWED_TAGS,Le):x,R="ALLOWED_ATTR"in De?Ye({},De.ALLOWED_ATTR,Le):B,_e="ALLOWED_NAMESPACES"in De?Ye({},De.ALLOWED_NAMESPACES,Pt):Te,ce="ADD_URI_SAFE_ATTR"in De?Ye(Lt(ge),De.ADD_URI_SAFE_ATTR,Le):ge,q="ADD_DATA_URI_TAGS"in De?Ye(Lt(ae),De.ADD_DATA_URI_TAGS,Le):ae,z="FORBID_CONTENTS"in De?Ye({},De.FORBID_CONTENTS,Le):se,V="FORBID_TAGS"in De?Ye({},De.FORBID_TAGS,Le):{},U="FORBID_ATTR"in De?Ye({},De.FORBID_ATTR,Le):{},H="USE_PROFILES"in De?De.USE_PROFILES:!1,F=De.ALLOW_ARIA_ATTR!==!1,j=De.ALLOW_DATA_ATTR!==!1,J=De.ALLOW_UNKNOWN_PROTOCOLS||!1,le=De.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=De.SAFE_FOR_TEMPLATES||!1,$=De.WHOLE_DOCUMENT||!1,de=De.RETURN_DOM||!1,ue=De.RETURN_DOM_FRAGMENT||!1,X=De.RETURN_TRUSTED_TYPE||!1,G=De.FORCE_BODY||!1,Z=De.SANITIZE_DOM!==!1,re=De.SANITIZE_NAMED_PROPS||!1,Y=De.KEEP_CONTENT!==!1,K=De.IN_PLACE||!1,N=De.ALLOWED_URI_REGEXP||jt,Ce=De.NAMESPACE||ve,W=De.CUSTOM_ELEMENT_HANDLING||{},De.CUSTOM_ELEMENT_HANDLING&&be(De.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=De.CUSTOM_ELEMENT_HANDLING.tagNameCheck),De.CUSTOM_ELEMENT_HANDLING&&be(De.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=De.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),De.CUSTOM_ELEMENT_HANDLING&&typeof De.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=De.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(j=!1),ue&&(de=!0),H&&(P=Ye({},[...Ut]),R=[],H.html===!0&&(Ye(P,Ht),Ye(R,Kt)),H.svg===!0&&(Ye(P,Ot),Ye(R,Bt),Ye(R,Nt)),H.svgFilters===!0&&(Ye(P,Ft),Ye(R,Bt),Ye(R,Nt)),H.mathMl===!0&&(Ye(P,xt),Ye(R,qt),Ye(R,Nt))),De.ADD_TAGS&&(P===x&&(P=Lt(P)),Ye(P,De.ADD_TAGS,Le)),De.ADD_ATTR&&(R===B&&(R=Lt(R)),Ye(R,De.ADD_ATTR,Le)),De.ADD_URI_SAFE_ATTR&&Ye(ce,De.ADD_URI_SAFE_ATTR,Le),De.FORBID_CONTENTS&&(z===se&&(z=Lt(z)),Ye(z,De.FORBID_CONTENTS,Le)),Y&&(P["#text"]=!0),$&&Ye(P,["html","head","body"]),P.table&&(Ye(P,["tbody"]),delete V.tbody),De.TRUSTED_TYPES_POLICY){if(typeof De.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof De.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');d=De.TRUSTED_TYPES_POLICY,r=d.createHTML("")}else d===void 0&&(d=mi(n,k)),d!==null&&typeof r=="string"&&(r=d.createHTML(""));vt&&vt(De),Ne=De}},Re=Ye({},["mi","mo","mn","ms","mtext"]),Ve=Ye({},["foreignobject","desc","title","annotation-xml"]),Ke=Ye({},["title","style","font","a","script"]),je=Ye({},Ot);Ye(je,Ft),Ye(je,oi);const st=Ye({},xt);Ye(st,ri);const ot=function(De){let Fe=c(De);(!Fe||!Fe.tagName)&&(Fe={namespaceURI:Ce,tagName:"template"});const We=Tt(De.tagName),qe=Tt(Fe.tagName);return _e[De.namespaceURI]?De.namespaceURI===me?Fe.namespaceURI===ve?We==="svg":Fe.namespaceURI===pe?We==="svg"&&(qe==="annotation-xml"||Re[qe]):!!je[We]:De.namespaceURI===pe?Fe.namespaceURI===ve?We==="math":Fe.namespaceURI===me?We==="math"&&Ve[qe]:!!st[We]:De.namespaceURI===ve?Fe.namespaceURI===me&&!Ve[qe]||Fe.namespaceURI===pe&&!Re[qe]?!1:!st[We]&&(Ke[We]||!je[We]):!!(Me==="application/xhtml+xml"&&_e[De.namespaceURI]):!1},nt=function(De){Et(e.removed,{element:De});try{De.parentNode.removeChild(De)}catch{De.remove()}},rt=function(De,Fe){try{Et(e.removed,{attribute:Fe.getAttributeNode(De),from:Fe})}catch{Et(e.removed,{attribute:null,from:Fe})}if(Fe.removeAttribute(De),De==="is"&&!R[De])if(de||ue)try{nt(Fe)}catch{}else try{Fe.setAttribute(De,"")}catch{}},Qe=function(De){let Fe,We;if(G)De=""+De;else{const ut=ti(De,/^[\r\n\t ]+/);We=ut&&ut[0]}Me==="application/xhtml+xml"&&Ce===ve&&(De=''+De+"");const qe=d?d.createHTML(De):De;if(Ce===ve)try{Fe=new i().parseFromString(qe,Me)}catch{}if(!Fe||!Fe.documentElement){Fe=l.createDocument(Ce,"template",null);try{Fe.documentElement.innerHTML=Se?r:qe}catch{}}const Ze=Fe.body||Fe.documentElement;return De&&We&&Ze.insertBefore(y.createTextNode(We),Ze.childNodes[0]||null),Ce===ve?h.call(Fe,$?"html":"body")[0]:$?Fe.documentElement:Ze},ht=function(De){return s.call(De.ownerDocument||De,De,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT,null,!1)},gt=function(De){return De instanceof o&&(typeof De.nodeName!="string"||typeof De.textContent!="string"||typeof De.removeChild!="function"||!(De.attributes instanceof b)||typeof De.removeAttribute!="function"||typeof De.setAttribute!="function"||typeof De.namespaceURI!="string"||typeof De.insertBefore!="function"||typeof De.hasChildNodes!="function")},ft=function(De){return typeof p=="object"?De instanceof p:De&&typeof De=="object"&&typeof De.nodeType=="number"&&typeof De.nodeName=="string"},dt=function(De,Fe,We){C[De]&&ei(C[De],qe=>{qe.call(e,Fe,We,Ne)})},we=function(De){let Fe;if(dt("beforeSanitizeElements",De,null),gt(De))return nt(De),!0;const We=Le(De.nodeName);if(dt("uponSanitizeElement",De,{tagName:We,allowedTags:P}),De.hasChildNodes()&&!ft(De.firstElementChild)&&(!ft(De.content)||!ft(De.content.firstElementChild))&&Ct(/<[/\w]/g,De.innerHTML)&&Ct(/<[/\w]/g,De.textContent))return nt(De),!0;if(!P[We]||V[We]){if(!V[We]&&Ie(We)&&(W.tagNameCheck instanceof RegExp&&Ct(W.tagNameCheck,We)||W.tagNameCheck instanceof Function&&W.tagNameCheck(We)))return!1;if(Y&&!z[We]){const qe=c(De)||De.parentNode,Ze=f(De)||De.childNodes;if(Ze&&qe){const ut=Ze.length;for(let Xe=ut-1;Xe>=0;--Xe)qe.insertBefore(a(Ze[Xe],!0),u(De))}}return nt(De),!0}return De instanceof S&&!ot(De)||(We==="noscript"||We==="noembed"||We==="noframes")&&Ct(/<\/no(script|embed|frames)/i,De.innerHTML)?(nt(De),!0):(ee&&De.nodeType===3&&(Fe=De.textContent,Fe=St(Fe,w," "),Fe=St(Fe,D," "),Fe=St(Fe,I," "),De.textContent!==Fe&&(Et(e.removed,{element:De.cloneNode()}),De.textContent=Fe)),dt("afterSanitizeElements",De,null),!1)},ye=function(De,Fe,We){if(Z&&(Fe==="id"||Fe==="name")&&(We in y||We in fe))return!1;if(!(j&&!U[Fe]&&Ct(M,Fe))){if(!(F&&Ct(A,Fe))){if(!R[Fe]||U[Fe]){if(!(Ie(De)&&(W.tagNameCheck instanceof RegExp&&Ct(W.tagNameCheck,De)||W.tagNameCheck instanceof Function&&W.tagNameCheck(De))&&(W.attributeNameCheck instanceof RegExp&&Ct(W.attributeNameCheck,Fe)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(Fe))||Fe==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Ct(W.tagNameCheck,We)||W.tagNameCheck instanceof Function&&W.tagNameCheck(We))))return!1}else if(!ce[Fe]){if(!Ct(N,St(We,T,""))){if(!((Fe==="src"||Fe==="xlink:href"||Fe==="href")&&De!=="script"&&ii(We,"data:")===0&&q[De])){if(!(J&&!Ct(O,St(We,T,"")))){if(We)return!1}}}}}}return!0},Ie=function(De){return De.indexOf("-")>0},Ae=function(De){let Fe,We,qe,Ze;dt("beforeSanitizeAttributes",De,null);const{attributes:ut}=De;if(!ut)return;const Xe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(Ze=ut.length;Ze--;){Fe=ut[Ze];const{name:lt,namespaceURI:Ge}=Fe;if(We=lt==="value"?Fe.value:ni(Fe.value),qe=Le(lt),Xe.attrName=qe,Xe.attrValue=We,Xe.keepAttr=!0,Xe.forceKeepAttr=void 0,dt("uponSanitizeAttribute",De,Xe),We=Xe.attrValue,Xe.forceKeepAttr||(rt(lt,De),!Xe.keepAttr))continue;if(!le&&Ct(/\/>/i,We)){rt(lt,De);continue}ee&&(We=St(We,w," "),We=St(We,D," "),We=St(We,I," "));const Oe=Le(De.nodeName);if(ye(Oe,qe,We)){if(re&&(qe==="id"||qe==="name")&&(rt(lt,De),We=oe+We),d&&typeof n=="object"&&typeof n.getAttributeType=="function"&&!Ge)switch(n.getAttributeType(Oe,qe)){case"TrustedHTML":{We=d.createHTML(We);break}case"TrustedScriptURL":{We=d.createScriptURL(We);break}}try{Ge?De.setAttributeNS(Ge,lt,We):De.setAttribute(lt,We),zt(e.removed)}catch{}}}dt("afterSanitizeAttributes",De,null)},ze=function xe(De){let Fe;const We=ht(De);for(dt("beforeSanitizeShadowDOM",De,null);Fe=We.nextNode();)dt("uponSanitizeShadowNode",Fe,null),!we(Fe)&&(Fe.content instanceof E&&xe(Fe.content),Ae(Fe));dt("afterSanitizeShadowDOM",De,null)};return e.sanitize=function(xe){let De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe,We,qe,Ze;if(Se=!xe,Se&&(xe=""),typeof xe!="string"&&!ft(xe))if(typeof xe.toString=="function"){if(xe=xe.toString(),typeof xe!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return xe;if(te||ke(De),e.removed=[],typeof xe=="string"&&(K=!1),K){if(xe.nodeName){const lt=Le(xe.nodeName);if(!P[lt]||V[lt])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(xe instanceof p)Fe=Qe(""),We=Fe.ownerDocument.importNode(xe,!0),We.nodeType===1&&We.nodeName==="BODY"||We.nodeName==="HTML"?Fe=We:Fe.appendChild(We);else{if(!de&&!ee&&!$&&xe.indexOf("<")===-1)return d&&X?d.createHTML(xe):xe;if(Fe=Qe(xe),!Fe)return de?null:X?r:""}Fe&&G&&nt(Fe.firstChild);const ut=ht(K?xe:Fe);for(;qe=ut.nextNode();)we(qe)||(qe.content instanceof E&&ze(qe.content),Ae(qe));if(K)return xe;if(de){if(ue)for(Ze=g.call(Fe.ownerDocument);Fe.firstChild;)Ze.appendChild(Fe.firstChild);else Ze=Fe;return(R.shadowroot||R.shadowrootmode)&&(Ze=m.call(L,Ze,!0)),Ze}let Xe=$?Fe.outerHTML:Fe.innerHTML;return $&&P["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&Ct($t,Fe.ownerDocument.doctype.name)&&(Xe="
`+Xe),ee&&(Xe=St(Xe,w," "),Xe=St(Xe,D," "),Xe=St(Xe,I," ")),d&&X?d.createHTML(Xe):Xe},e.setConfig=function(xe){ke(xe),te=!0},e.clearConfig=function(){Ne=null,te=!1},e.isValidAttribute=function(xe,De,Fe){Ne||ke({});const We=Le(xe),qe=Le(De);return ye(We,qe,Fe)},e.addHook=function(xe,De){typeof De=="function"&&(C[xe]=C[xe]||[],Et(C[xe],De))},e.removeHook=function(xe){if(C[xe])return zt(C[xe])},e.removeHooks=function(xe){C[xe]&&(C[xe]=[])},e.removeAllHooks=function(){C={}},e}var pi=Zt();define("vs/base/browser/dompurify/dompurify",function(){return pi}),define(ie[40],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class L{constructor(_){this.domNode=_,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",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(_){const p=k(_);this._maxWidth!==p&&(this._maxWidth=p,this.domNode.style.maxWidth=this._maxWidth)}setWidth(_){const p=k(_);this._width!==p&&(this._width=p,this.domNode.style.width=this._width)}setHeight(_){const p=k(_);this._height!==p&&(this._height=p,this.domNode.style.height=this._height)}setTop(_){const p=k(_);this._top!==p&&(this._top=p,this.domNode.style.top=this._top)}setLeft(_){const p=k(_);this._left!==p&&(this._left=p,this.domNode.style.left=this._left)}setBottom(_){const p=k(_);this._bottom!==p&&(this._bottom=p,this.domNode.style.bottom=this._bottom)}setRight(_){const p=k(_);this._right!==p&&(this._right=p,this.domNode.style.right=this._right)}setPaddingLeft(_){const p=k(_);this._paddingLeft!==p&&(this._paddingLeft=p,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(_){this._fontFamily!==_&&(this._fontFamily=_,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(_){this._fontWeight!==_&&(this._fontWeight=_,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(_){const p=k(_);this._fontSize!==p&&(this._fontSize=p,this.domNode.style.fontSize=this._fontSize)}setFontStyle(_){this._fontStyle!==_&&(this._fontStyle=_,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(_){this._fontFeatureSettings!==_&&(this._fontFeatureSettings=_,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(_){this._fontVariationSettings!==_&&(this._fontVariationSettings=_,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(_){this._textDecoration!==_&&(this._textDecoration=_,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(_){const p=k(_);this._lineHeight!==p&&(this._lineHeight=p,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(_){const p=k(_);this._letterSpacing!==p&&(this._letterSpacing=p,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(_){this._className!==_&&(this._className=_,this.domNode.className=this._className)}toggleClassName(_,p){this.domNode.classList.toggle(_,p),this._className=this.domNode.className}setDisplay(_){this._display!==_&&(this._display=_,this.domNode.style.display=this._display)}setPosition(_){this._position!==_&&(this._position=_,this.domNode.style.position=this._position)}setVisibility(_){this._visibility!==_&&(this._visibility=_,this.domNode.style.visibility=this._visibility)}setColor(_){this._color!==_&&(this._color=_,this.domNode.style.color=this._color)}setBackgroundColor(_){this._backgroundColor!==_&&(this._backgroundColor=_,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(_){this._layerHint!==_&&(this._layerHint=_,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(_){this._boxShadow!==_&&(this._boxShadow=_,this.domNode.style.boxShadow=_)}setContain(_){this._contain!==_&&(this._contain=_,this.domNode.style.contain=this._contain)}setAttribute(_,p){this.domNode.setAttribute(_,p)}removeAttribute(_){this.domNode.removeAttribute(_)}appendChild(_){this.domNode.appendChild(_.domNode)}removeChild(_){this.domNode.removeChild(_.domNode)}}e.FastDomNode=L;function k(E){return typeof E=="number"?`${E}px`:E}function y(E){return new L(E)}e.createFastDomNode=y}),define(ie[389],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;const L=new WeakMap;function k(E){if(!E.parent||E.parent===E)return null;try{const _=E.location,p=E.parent.location;if(_.origin!=="null"&&p.origin!=="null"&&_.origin!==p.origin)return null}catch{return null}return E.parent}class y{static getSameOriginWindowChain(_){let p=L.get(_);if(!p){p=[],L.set(_,p);let S=_,v;do v=k(S),v?p.push({window:new WeakRef(S),iframeElement:S.frameElement||null}):p.push({window:new WeakRef(S),iframeElement:null}),S=v;while(S)}return p.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(_,p){var S,v;if(!p||_===p)return{top:0,left:0};let b=0,o=0;const i=this.getSameOriginWindowChain(_);for(const n of i){const t=n.window.deref();if(b+=(S=t?.scrollY)!==null&&S!==void 0?S:0,o+=(v=t?.scrollX)!==null&&v!==void 0?v:0,t===p||!n.iframeElement)break;const a=n.iframeElement.getBoundingClientRect();b+=a.top,o+=a.left}return{top:b,left:o}}}e.IframeUtils=y}),define(ie[263],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var L;(function(k){const y={total:0,min:Number.MAX_VALUE,max:0},E={...y},_={...y},p={...y};let S=0;const v={keydown:0,input:0,render:0};function b(){r(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),v.keydown=1,queueMicrotask(o)}k.onKeyDown=b;function o(){v.keydown===1&&(performance.mark("keydown/end"),v.keydown=2)}function i(){performance.mark("input/start"),v.input=1,d()}k.onBeforeInput=i;function n(){v.input===0&&i(),queueMicrotask(t)}k.onInput=n;function t(){v.input===1&&(performance.mark("input/end"),v.input=2)}function a(){r()}k.onKeyUp=a;function u(){r()}k.onSelectionChange=u;function f(){v.keydown===2&&v.input===2&&v.render===0&&(performance.mark("render/start"),v.render=1,queueMicrotask(c),d())}k.onRenderStart=f;function c(){v.render===1&&(performance.mark("render/end"),v.render=2)}function d(){setTimeout(r)}function r(){v.keydown===2&&v.input===2&&v.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),l("keydown",y),l("input",E),l("render",_),l("inputlatency",p),S++,s())}function l(C,w){const D=performance.getEntriesByName(C)[0].duration;w.total+=D,w.min=Math.min(w.min,D),w.max=Math.max(w.max,D)}function s(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),v.keydown=0,v.input=0,v.render=0}function g(){if(S===0)return;const C={keydown:h(y),input:h(E),render:h(_),total:h(p),sampleCount:S};return m(y),m(E),m(_),m(p),S=0,C}k.getAndClearMeasurements=g;function h(C){return{average:C.total/S,max:C.max,min:C.min}}function m(C){C.total=0,C.min=Number.MAX_VALUE,C.max=0}})(L||(e.inputLatency=L={}))}),define(ie[390],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class L extends Error{constructor(y,E){super(`ListError [${y}] ${E}`)}}e.ListError=L}),define(ie[391],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class L{constructor(y){this.spliceables=y}splice(y,E,_){this.spliceables.forEach(p=>p.splice(y,E,_))}}e.CombinedSpliceable=L}),define(ie[197],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const L=20;class k{constructor(E,_,p,S,v,b){this._scrollbarSize=Math.round(_),this._oppositeScrollbarSize=Math.round(p),this._arrowSize=Math.round(E),this._visibleSize=S,this._scrollSize=v,this._scrollPosition=b,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new k(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(E){const _=Math.round(E);return this._visibleSize!==_?(this._visibleSize=_,this._refreshComputedValues(),!0):!1}setScrollSize(E){const _=Math.round(E);return this._scrollSize!==_?(this._scrollSize=_,this._refreshComputedValues(),!0):!1}setScrollPosition(E){const _=Math.round(E);return this._scrollPosition!==_?(this._scrollPosition=_,this._refreshComputedValues(),!0):!1}setScrollbarSize(E){this._scrollbarSize=Math.round(E)}setOppositeScrollbarSize(E){this._oppositeScrollbarSize=Math.round(E)}static _computeValues(E,_,p,S,v){const b=Math.max(0,p-E),o=Math.max(0,b-2*_),i=S>0&&S>p;if(!i)return{computedAvailableSize:Math.round(b),computedIsNeeded:i,computedSliderSize:Math.round(o),computedSliderRatio:0,computedSliderPosition:0};const n=Math.round(Math.max(L,Math.floor(p*o/S))),t=(o-n)/(S-p),a=v*t;return{computedAvailableSize:Math.round(b),computedIsNeeded:i,computedSliderSize:Math.round(n),computedSliderRatio:t,computedSliderPosition:Math.round(a)}}_refreshComputedValues(){const E=k._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=E.computedAvailableSize,this._computedIsNeeded=E.computedIsNeeded,this._computedSliderSize=E.computedSliderSize,this._computedSliderRatio=E.computedSliderRatio,this._computedSliderPosition=E.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(E){if(!this._computedIsNeeded)return 0;const _=E-this._arrowSize-this._computedSliderSize/2;return Math.round(_/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(E){if(!this._computedIsNeeded)return 0;const _=E-this._arrowSize;let p=this._scrollPosition;return _y})}e.ensureCodeWindow=L,e.mainWindow=window,e.$window=e.mainWindow}),define(ie[13],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.reverseOrder=e.booleanComparator=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=e.splice=e.insertInto=e.asArray=e.pushMany=e.pushToEnd=e.pushToStart=e.arrayInsert=e.range=e.firstOrDefault=e.distinct=e.isNonEmptyArray=e.isFalsyOrEmpty=e.coalesceInPlace=e.coalesce=e.forEachWithNeighbors=e.forEachAdjacent=e.groupAdjacentBy=e.groupBy=e.quickSelect=e.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function L(x,R=0){return x[x.length-(1+R)]}e.tail=L;function k(x){if(x.length===0)throw new Error("Invalid tail call");return[x.slice(0,x.length-1),x[x.length-1]]}e.tail2=k;function y(x,R,B=(W,V)=>W===V){if(x===R)return!0;if(!x||!R||x.length!==R.length)return!1;for(let W=0,V=x.length;WB(x[W],R))}e.binarySearch=_;function p(x,R){let B=0,W=x-1;for(;B<=W;){const V=(B+W)/2|0,U=R(V);if(U<0)B=V+1;else if(U>0)W=V-1;else return V}return-(B+1)}e.binarySearch2=p;function S(x,R,B){if(x=x|0,x>=R.length)throw new TypeError("invalid index");const W=R[Math.floor(R.length*Math.random())],V=[],U=[],F=[];for(const j of R){const J=B(j,W);J<0?V.push(j):J>0?U.push(j):F.push(j)}return x!!R)}e.coalesce=n;function t(x){let R=0;for(let B=0;B0}e.isNonEmptyArray=u;function f(x,R=B=>B){const B=new Set;return x.filter(W=>{const V=R(W);return B.has(V)?!1:(B.add(V),!0)})}e.distinct=f;function c(x,R){return x.length>0?x[0]:R}e.firstOrDefault=c;function d(x,R){let B=typeof R=="number"?x:0;typeof R=="number"?B=x:(B=0,R=x);const W=[];if(B<=R)for(let V=B;VR;V--)W.push(V);return W}e.range=d;function r(x,R,B){const W=x.slice(0,R),V=x.slice(R);return W.concat(B,V)}e.arrayInsert=r;function l(x,R){const B=x.indexOf(R);B>-1&&(x.splice(B,1),x.unshift(R))}e.pushToStart=l;function s(x,R){const B=x.indexOf(R);B>-1&&(x.splice(B,1),x.push(R))}e.pushToEnd=s;function g(x,R){for(const B of R)x.push(B)}e.pushMany=g;function h(x){return Array.isArray(x)?x:[x]}e.asArray=h;function m(x,R,B){const W=w(x,R),V=x.length,U=B.length;x.length=V+U;for(let F=V-1;F>=W;F--)x[F+U]=x[F];for(let F=0;F0}x.isGreaterThan=W;function V(U){return U===0}x.isNeitherLessOrGreaterThan=V,x.greaterThan=1,x.lessThan=-1,x.neitherLessOrGreaterThan=0})(D||(e.CompareResult=D={}));function I(x,R){return(B,W)=>R(x(B),x(W))}e.compareBy=I;function M(...x){return(R,B)=>{for(const W of x){const V=W(R,B);if(!D.isNeitherLessOrGreaterThan(V))return V}return D.neitherLessOrGreaterThan}}e.tieBreakComparators=M;const A=(x,R)=>x-R;e.numberComparator=A;const O=(x,R)=>(0,e.numberComparator)(x?1:0,R?1:0);e.booleanComparator=O;function T(x){return(R,B)=>-x(R,B)}e.reverseOrder=T;class N{constructor(R){this.items=R,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(R){let B=this.firstIdx;for(;B=0&&R(this.items[B]);)B--;const W=B===this.lastIdx?null:this.items.slice(B+1,this.lastIdx+1);return this.lastIdx=B,W}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const R=this.items[this.firstIdx];return this.firstIdx++,R}takeCount(R){const B=this.items.slice(this.firstIdx,this.firstIdx+R);return this.firstIdx+=R,B}}e.ArrayQueue=N;class P{constructor(R){this.iterate=R}toArray(){const R=[];return this.iterate(B=>(R.push(B),!0)),R}filter(R){return new P(B=>this.iterate(W=>R(W)?B(W):!0))}map(R){return new P(B=>this.iterate(W=>B(R(W))))}findLast(R){let B;return this.iterate(W=>(R(W)&&(B=W),!0)),B}findLastMaxBy(R){let B,W=!0;return this.iterate(V=>((W||D.isGreaterThan(R(V,B)))&&(W=!1,B=V),!0)),B}}e.CallbackIterable=P,P.empty=new P(x=>{})}),define(ie[60],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapFindFirst=e.findMaxIdxBy=e.findFirstMinBy=e.findLastMaxBy=e.findFirstMaxBy=e.MonotonousArray=e.findFirstIdxMonotonousOrArrLen=e.findFirstMonotonous=e.findLastIdxMonotonous=e.findLastMonotonous=e.findLastIdx=e.findLast=void 0;function L(t,a,u){const f=k(t,a);if(f!==-1)return t[f]}e.findLast=L;function k(t,a,u=t.length-1){for(let f=u;f>=0;f--){const c=t[f];if(a(c))return f}return-1}e.findLastIdx=k;function y(t,a){const u=E(t,a);return u===-1?void 0:t[u]}e.findLastMonotonous=y;function E(t,a,u=0,f=t.length){let c=u,d=f;for(;c0&&(u=c)}return u}e.findFirstMaxBy=v;function b(t,a){if(t.length===0)return;let u=t[0];for(let f=1;f=0&&(u=c)}return u}e.findLastMaxBy=b;function o(t,a){return v(t,(u,f)=>-a(u,f))}e.findFirstMinBy=o;function i(t,a){if(t.length===0)return-1;let u=0;for(let f=1;f0&&(u=f)}return u}e.findMaxIdxBy=i;function n(t,a){for(const u of t){const f=a(u);if(f!==void 0)return f}}e.mapFindFirst=n}),define(ie[264],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=void 0;class L{constructor(E){this.fn=E,this.lastCache=void 0,this.lastArgKey=void 0}get(E){const _=JSON.stringify(E);return this.lastArgKey!==_&&(this.lastArgKey=_,this.lastCache=this.fn(E)),this.lastCache}}e.LRUCachedFunction=L;class k{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 _=this.fn(E);return this._map.set(E,_),_}}e.CachedFunction=k}),define(ie[265],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intersection=e.diffSets=void 0;function L(y,E){const _=[],p=[];for(const S of y)E.has(S)||_.push(S);for(const S of E)y.has(S)||p.push(S);return{removed:_,added:p}}e.diffSets=L;function k(y,E){const _=new Set;for(const p of E)y.has(p)&&_.add(p);return _}e.intersection=k}),define(ie[38],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function L(p,S){const v=Math.pow(10,S);return Math.round(p*v)/v}class k{constructor(S,v,b,o=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,S))|0,this.g=Math.min(255,Math.max(0,v))|0,this.b=Math.min(255,Math.max(0,b))|0,this.a=L(Math.max(Math.min(1,o),0),3)}static equals(S,v){return S.r===v.r&&S.g===v.g&&S.b===v.b&&S.a===v.a}}e.RGBA=k;class y{constructor(S,v,b,o){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,S),0)|0,this.s=L(Math.max(Math.min(1,v),0),3),this.l=L(Math.max(Math.min(1,b),0),3),this.a=L(Math.max(Math.min(1,o),0),3)}static equals(S,v){return S.h===v.h&&S.s===v.s&&S.l===v.l&&S.a===v.a}static fromRGBA(S){const v=S.r/255,b=S.g/255,o=S.b/255,i=S.a,n=Math.max(v,b,o),t=Math.min(v,b,o);let a=0,u=0;const f=(t+n)/2,c=n-t;if(c>0){switch(u=Math.min(f<=.5?c/(2*f):c/(2-2*f),1),n){case v:a=(b-o)/c+(b1&&(b-=1),b<1/6?S+(v-S)*6*b:b<1/2?v:b<2/3?S+(v-S)*(2/3-b)*6:S}static toRGBA(S){const v=S.h/360,{s:b,l:o,a:i}=S;let n,t,a;if(b===0)n=t=a=o;else{const u=o<.5?o*(1+b):o+b-o*b,f=2*o-u;n=y._hue2rgb(f,u,v+1/3),t=y._hue2rgb(f,u,v),a=y._hue2rgb(f,u,v-1/3)}return new k(Math.round(n*255),Math.round(t*255),Math.round(a*255),i)}}e.HSLA=y;class E{constructor(S,v,b,o){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,S),0)|0,this.s=L(Math.max(Math.min(1,v),0),3),this.v=L(Math.max(Math.min(1,b),0),3),this.a=L(Math.max(Math.min(1,o),0),3)}static equals(S,v){return S.h===v.h&&S.s===v.s&&S.v===v.v&&S.a===v.a}static fromRGBA(S){const v=S.r/255,b=S.g/255,o=S.b/255,i=Math.max(v,b,o),n=Math.min(v,b,o),t=i-n,a=i===0?0:t/i;let u;return t===0?u=0:i===v?u=((b-o)/t%6+6)%6:i===b?u=(o-v)/t+2:u=(v-b)/t+4,new E(Math.round(u*60),a,i,S.a)}static toRGBA(S){const{h:v,s:b,v:o,a:i}=S,n=o*b,t=n*(1-Math.abs(v/60%2-1)),a=o-n;let[u,f,c]=[0,0,0];return v<60?(u=n,f=t):v<120?(u=t,f=n):v<180?(f=n,c=t):v<240?(f=t,c=n):v<300?(u=t,c=n):v<=360&&(u=n,c=t),u=Math.round((u+a)*255),f=Math.round((f+a)*255),c=Math.round((c+a)*255),new k(u,f,c,i)}}e.HSVA=E;class _{static fromHex(S){return _.Format.CSS.parseHex(S)||_.red}static equals(S,v){return!S&&!v?!0:!S||!v?!1:S.equals(v)}get hsla(){return this._hsla?this._hsla:y.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:E.fromRGBA(this.rgba)}constructor(S){if(S)if(S instanceof k)this.rgba=S;else if(S instanceof y)this._hsla=S,this.rgba=y.toRGBA(S);else if(S instanceof E)this._hsva=S,this.rgba=E.toRGBA(S);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(S){return!!S&&k.equals(this.rgba,S.rgba)&&y.equals(this.hsla,S.hsla)&&E.equals(this.hsva,S.hsva)}getRelativeLuminance(){const S=_._relativeLuminanceForComponent(this.rgba.r),v=_._relativeLuminanceForComponent(this.rgba.g),b=_._relativeLuminanceForComponent(this.rgba.b),o=.2126*S+.7152*v+.0722*b;return L(o,4)}static _relativeLuminanceForComponent(S){const v=S/255;return v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(S){const v=this.getRelativeLuminance(),b=S.getRelativeLuminance();return v>b}isDarkerThan(S){const v=this.getRelativeLuminance(),b=S.getRelativeLuminance();return v{throw u.stack?n.isErrorNoTelemetry(u)?new n(u.message+`

`+u.stack):new Error(u.message+`

`+u.stack):u},0)}}emit(u){this.listeners.forEach(f=>{f(u)})}onUnexpectedError(u){this.unexpectedErrorHandler(u),this.emit(u)}onUnexpectedExternalError(u){this.unexpectedErrorHandler(u)}}e.ErrorHandler=L,e.errorHandler=new L;function k(a){p(a)||e.errorHandler.onUnexpectedError(a)}e.onUnexpectedError=k;function y(a){p(a)||e.errorHandler.onUnexpectedExternalError(a)}e.onUnexpectedExternalError=y;function E(a){if(a instanceof Error){const{name:u,message:f}=a,c=a.stacktrace||a.stack;return{$isError:!0,name:u,message:f,stack:c,noTelemetry:n.isErrorNoTelemetry(a)}}return a}e.transformErrorForSerialization=E;const _="Canceled";function p(a){return a instanceof S?!0:a instanceof Error&&a.name===_&&a.message===_}e.isCancellationError=p;class S extends Error{constructor(){super(_),this.name=this.message}}e.CancellationError=S;function v(){const a=new Error(_);return a.name=a.message,a}e.canceled=v;function b(a){return a?new Error(`Illegal argument: ${a}`):new Error("Illegal argument")}e.illegalArgument=b;function o(a){return a?new Error(`Illegal state: ${a}`):new Error("Illegal state")}e.illegalState=o;class i extends Error{constructor(u){super("NotSupported"),u&&(this.message=u)}}e.NotSupportedError=i;class n extends Error{constructor(u){super(u),this.name="CodeExpectedError"}static fromError(u){if(u instanceof n)return u;const f=new n;return f.message=u.message,f.stack=u.stack,f}static isErrorNoTelemetry(u){return u.name==="CodeExpectedError"}}e.ErrorNoTelemetry=n;class t extends Error{constructor(u){super(u||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}}e.BugIndicatingError=t}),define(ie[92],ne([1,0,48,9]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrustedTypesPolicy=void 0;function y(E,_){var p;const S=globalThis.MonacoEnvironment;if(S?.createTrustedTypesPolicy)try{return S.createTrustedTypesPolicy(E,_)}catch(v){(0,k.onUnexpectedError)(v);return}try{return(p=L.mainWindow.trustedTypes)===null||p===void 0?void 0:p.createPolicy(E,_)}catch(v){(0,k.onUnexpectedError)(v);return}}e.createTrustedTypesPolicy=y}),define(ie[98],ne([1,0,9]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assertNever=e.ok=void 0;function k(p,S){if(!p)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}e.ok=k;function y(p,S="Unreachable"){throw new Error(S)}e.assertNever=y;function E(p){if(!p()){debugger;p(),(0,L.onUnexpectedError)(new L.BugIndicatingError("Assertion Failed"))}}e.assertFn=E;function _(p,S){let v=0;for(;v=0;s--)yield l[s]}k.reverse=b;function o(l){return!l||l[Symbol.iterator]().next().done===!0}k.isEmpty=o;function i(l){return l[Symbol.iterator]().next().value}k.first=i;function n(l,s){for(const g of l)if(s(g))return!0;return!1}k.some=n;function t(l,s){for(const g of l)if(s(g))return g}k.find=t;function*a(l,s){for(const g of l)s(g)&&(yield g)}k.filter=a;function*u(l,s){let g=0;for(const h of l)yield s(h,g++)}k.map=u;function*f(...l){for(const s of l)yield*s}k.concat=f;function c(l,s,g){let h=g;for(const m of l)h=s(h,m);return h}k.reduce=c;function*d(l,s,g=l.length){for(s<0&&(s+=l.length),g<0?g+=l.length:g>l.length&&(g=l.length);s=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return k.keyCodeToStr(c)}o.toElectronAccelerator=f})(v||(e.KeyCodeUtils=v={}));function b(o,i){const n=(i&65535)<<16>>>0;return(o|n)>>>0}e.KeyChord=b}),define(ie[121],ne([1,0,9]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedChord=e.Keybinding=e.ScanCodeChord=e.KeyCodeChord=e.createSimpleKeybinding=e.decodeKeybinding=void 0;function k(b,o){if(typeof b=="number"){if(b===0)return null;const i=(b&65535)>>>0,n=(b&4294901760)>>>16;return n!==0?new p([y(i,o),y(n,o)]):new p([y(i,o)])}else{const i=[];for(let n=0;nnew Uint8Array(256));let E;class _{static wrap(t){return k&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new _(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}toString(){return k?this.buffer.toString():(E||(E=new TextDecoder),E.decode(this.buffer))}}e.VSBuffer=_;function p(n,t){return n[t+0]<<0>>>0|n[t+1]<<8>>>0}e.readUInt16LE=p;function S(n,t,a){n[a+0]=t&255,t=t>>>8,n[a+1]=t&255}e.writeUInt16LE=S;function v(n,t){return n[t]*2**24+n[t+1]*2**16+n[t+2]*2**8+n[t+3]}e.readUInt32BE=v;function b(n,t,a){n[a+3]=t,t=t>>>8,n[a+2]=t,t=t>>>8,n[a+1]=t,t=t>>>8,n[a]=t}e.writeUInt32BE=b;function o(n,t){return n[t]}e.readUInt8=o;function i(n,t,a){n[a]=t}e.writeUInt8=i}),define(ie[393],ne([1,0,99]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const k=new L.Lazy(()=>{const v=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:v,collatorIsNumeric:v.resolvedOptions().numeric}}),y=new L.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),E=new L.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function _(v,b,o=!1){const i=v||"",n=b||"",t=k.value.collator.compare(i,n);return k.value.collatorIsNumeric&&t===0&&i!==n?in.length)return 1}return 0}e.compareByPrefix=S}),define(ie[2],ne([1,0,107,49]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.ImmortalReference=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.markAsDisposed=e.trackDisposable=e.setDisposableTracker=void 0;const y=!1;let E=null;function _(s){E=s}if(e.setDisposableTracker=_,y){const s="__is_disposable_tracked__";_(new class{trackDisposable(g){const h=new Error("Potentially leaked disposable").stack;setTimeout(()=>{g[s]||console.log(h)},3e3)}setParent(g,h){if(g&&g!==f.None)try{g[s]=!0}catch{}}markAsDisposed(g){if(g&&g!==f.None)try{g[s]=!0}catch{}}markAsSingleton(g){}})}function p(s){return E?.trackDisposable(s),s}e.trackDisposable=p;function S(s){E?.markAsDisposed(s)}e.markAsDisposed=S;function v(s,g){E?.setParent(s,g)}function b(s,g){if(E)for(const h of s)E.setParent(h,g)}function o(s){return E?.markAsSingleton(s),s}e.markAsSingleton=o;function i(s){return typeof s.dispose=="function"&&s.dispose.length===0}e.isDisposable=i;function n(s){if(k.Iterable.is(s)){const g=[];for(const h of s)if(h)try{h.dispose()}catch(m){g.push(m)}if(g.length===1)throw g[0];if(g.length>1)throw new AggregateError(g,"Encountered errors while disposing of store");return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}e.dispose=n;function t(...s){const g=a(()=>n(s));return b(s,g),g}e.combinedDisposable=t;function a(s){const g=p({dispose:(0,L.createSingleCallFunction)(()=>{S(g),s()})});return g}e.toDisposable=a;class u{constructor(){this._toDispose=new Set,this._isDisposed=!1,p(this)}dispose(){this._isDisposed||(S(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{n(this._toDispose)}finally{this._toDispose.clear()}}add(g){if(!g)return g;if(g===this)throw new Error("Cannot register a disposable on itself!");return v(g,this),this._isDisposed?u.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(g),g}deleteAndLeak(g){g&&this._toDispose.has(g)&&(this._toDispose.delete(g),v(g,null))}}e.DisposableStore=u,u.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new u,p(this),v(this._store,this)}dispose(){S(this),this._store.dispose()}_register(g){if(g===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(g)}}e.Disposable=f,f.None=Object.freeze({dispose(){}});class c{constructor(){this._isDisposed=!1,p(this)}get value(){return this._isDisposed?void 0:this._value}set value(g){var h;this._isDisposed||g===this._value||((h=this._value)===null||h===void 0||h.dispose(),g&&v(g,this),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,S(this),(g=this._value)===null||g===void 0||g.dispose(),this._value=void 0}}e.MutableDisposable=c;class d{constructor(g){this._disposable=g,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=d;class r{constructor(g){this.object=g}dispose(){}}e.ImmortalReference=r;class l{constructor(){this._store=new Map,this._isDisposed=!1,p(this)}dispose(){S(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{n(this._store.values())}finally{this._store.clear()}}get(g){return this._store.get(g)}set(g,h,m=!1){var C;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),m||(C=this._store.get(g))===null||C===void 0||C.dispose(),this._store.set(g,h)}deleteAndDispose(g){var h;(h=this._store.get(g))===null||h===void 0||h.dispose(),this._store.delete(g)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=l}),define(ie[66],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class L{constructor(E){this.element=E,this.next=L.Undefined,this.prev=L.Undefined}}L.Undefined=new L(void 0);class k{constructor(){this._first=L.Undefined,this._last=L.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===L.Undefined}clear(){let E=this._first;for(;E!==L.Undefined;){const _=E.next;E.prev=L.Undefined,E.next=L.Undefined,E=_}this._first=L.Undefined,this._last=L.Undefined,this._size=0}unshift(E){return this._insert(E,!1)}push(E){return this._insert(E,!0)}_insert(E,_){const p=new L(E);if(this._first===L.Undefined)this._first=p,this._last=p;else if(_){const v=this._last;this._last=p,p.prev=v,v.next=p}else{const v=this._first;this._first=p,p.next=v,v.prev=p}this._size+=1;let S=!1;return()=>{S||(S=!0,this._remove(p))}}shift(){if(this._first!==L.Undefined){const E=this._first.element;return this._remove(this._first),E}}pop(){if(this._last!==L.Undefined){const E=this._last.element;return this._remove(this._last),E}}_remove(E){if(E.prev!==L.Undefined&&E.next!==L.Undefined){const _=E.prev;_.next=E.next,E.next.prev=_}else E.prev===L.Undefined&&E.next===L.Undefined?(this._first=L.Undefined,this._last=L.Undefined):E.next===L.Undefined?(this._last=this._last.prev,this._last.next=L.Undefined):E.prev===L.Undefined&&(this._first=this._first.next,this._first.prev=L.Undefined);this._size-=1}*[Symbol.iterator](){let E=this._first;for(;E!==L.Undefined;)yield E.element,E=E.next}}e.LinkedList=k});var Ee=this&&this.__decorate||function(Q,e,L,k){var y=arguments.length,E=y<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,L):k,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(Q,e,L,k);else for(var p=Q.length-1;p>=0;p--)(_=Q[p])&&(E=(y<3?_(E):y>3?_(e,L,E):_(e,L))||E);return y>3&&E&&Object.defineProperty(e,L,E),E};define(ie[394],ne([1,0,106]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class k{constructor(p){this.nodes=p}toString(){return this.nodes.map(p=>typeof p=="string"?p:p.label).join("")}}e.LinkedText=k,Ee([L.memoize],k.prototype,"toString",null);const y=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function E(_){const p=[];let S=0,v;for(;v=y.exec(_);){v.index-S>0&&p.push(_.substring(S,v.index));const[,b,o,,i]=v;i?p.push({label:b,href:o,title:i}):p.push({label:b,href:o}),S=v.index+v[0].length}return S<_.length&&p.push(_.substring(S)),new k(p)}e.parseLinkedText=E}),define(ie[53],ne([1,0]),function(Q,e){"use strict";var L,k;Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.BidirectionalMap=e.LRUCache=e.LinkedMap=e.ResourceMap=void 0;class y{constructor(i,n){this.uri=i,this.value=n}}function E(o){return Array.isArray(o)}class _{constructor(i,n){if(this[L]="ResourceMap",i instanceof _)this.map=new Map(i.map),this.toKey=n??_.defaultToKey;else if(E(i)){this.map=new Map,this.toKey=n??_.defaultToKey;for(const[t,a]of i)this.set(t,a)}else this.map=new Map,this.toKey=i??_.defaultToKey}set(i,n){return this.map.set(this.toKey(i),new y(i,n)),this}get(i){var n;return(n=this.map.get(this.toKey(i)))===null||n===void 0?void 0:n.value}has(i){return this.map.has(this.toKey(i))}get size(){return this.map.size}clear(){this.map.clear()}delete(i){return this.map.delete(this.toKey(i))}forEach(i,n){typeof n<"u"&&(i=i.bind(n));for(const[t,a]of this.map)i(a.value,a.uri,this)}*values(){for(const i of this.map.values())yield i.value}*keys(){for(const i of this.map.values())yield i.uri}*entries(){for(const i of this.map.values())yield[i.uri,i.value]}*[(L=Symbol.toStringTag,Symbol.iterator)](){for(const[,i]of this.map)yield[i.uri,i.value]}}e.ResourceMap=_,_.defaultToKey=o=>o.toString();class p{constructor(){this[k]="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(){var i;return(i=this._head)===null||i===void 0?void 0:i.value}get last(){var i;return(i=this._tail)===null||i===void 0?void 0:i.value}has(i){return this._map.has(i)}get(i,n=0){const t=this._map.get(i);if(t)return n!==0&&this.touch(t,n),t.value}set(i,n,t=0){let a=this._map.get(i);if(a)a.value=n,t!==0&&this.touch(a,t);else{switch(a={key:i,value:n,next:void 0,previous:void 0},t){case 0:this.addItemLast(a);break;case 1:this.addItemFirst(a);break;case 2:this.addItemLast(a);break;default:this.addItemLast(a);break}this._map.set(i,a),this._size++}return this}delete(i){return!!this.remove(i)}remove(i){const n=this._map.get(i);if(n)return this._map.delete(i),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const i=this._head;return this._map.delete(i.key),this.removeItem(i),this._size--,i.value}forEach(i,n){const t=this._state;let a=this._head;for(;a;){if(n?i.bind(n)(a.value,a.key,this):i(a.value,a.key,this),this._state!==t)throw new Error("LinkedMap got modified during iteration.");a=a.next}}keys(){const i=this,n=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:t.key,done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return a}values(){const i=this,n=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:t.value,done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return a}entries(){const i=this,n=this._state;let t=this._head;const a={[Symbol.iterator](){return a},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:[t.key,t.value],done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return a}[(k=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(i){if(i>=this.size)return;if(i===0){this.clear();return}let n=this._head,t=this.size;for(;n&&t>i;)this._map.delete(n.key),n=n.next,t--;this._head=n,this._size=t,n&&(n.previous=void 0),this._state++}addItemFirst(i){if(!this._head&&!this._tail)this._tail=i;else if(this._head)i.next=this._head,this._head.previous=i;else throw new Error("Invalid list");this._head=i,this._state++}addItemLast(i){if(!this._head&&!this._tail)this._head=i;else if(this._tail)i.previous=this._tail,this._tail.next=i;else throw new Error("Invalid list");this._tail=i,this._state++}removeItem(i){if(i===this._head&&i===this._tail)this._head=void 0,this._tail=void 0;else if(i===this._head){if(!i.next)throw new Error("Invalid list");i.next.previous=void 0,this._head=i.next}else if(i===this._tail){if(!i.previous)throw new Error("Invalid list");i.previous.next=void 0,this._tail=i.previous}else{const n=i.next,t=i.previous;if(!n||!t)throw new Error("Invalid list");n.previous=t,t.next=n}i.next=void 0,i.previous=void 0,this._state++}touch(i,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(i===this._head)return;const t=i.next,a=i.previous;i===this._tail?(a.next=void 0,this._tail=a):(t.previous=a,a.next=t),i.previous=void 0,i.next=this._head,this._head.previous=i,this._head=i,this._state++}else if(n===2){if(i===this._tail)return;const t=i.next,a=i.previous;i===this._head?(t.previous=void 0,this._head=t):(t.previous=a,a.next=t),i.next=void 0,i.previous=this._tail,this._tail.next=i,this._tail=i,this._state++}}}toJSON(){const i=[];return this.forEach((n,t)=>{i.push([t,n])}),i}fromJSON(i){this.clear();for(const[n,t]of i)this.set(n,t)}}e.LinkedMap=p;class S extends p{constructor(i,n=1){super(),this._limit=i,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(i){this._limit=i,this.checkTrim()}get(i,n=2){return super.get(i,n)}peek(i){return super.get(i,0)}set(i,n){return super.set(i,n,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=S;class v{constructor(i){if(this._m1=new Map,this._m2=new Map,i)for(const[n,t]of i)this.set(n,t)}clear(){this._m1.clear(),this._m2.clear()}set(i,n){this._m1.set(i,n),this._m2.set(n,i)}get(i){return this._m1.get(i)}getKey(i){return this._m2.get(i)}delete(i){const n=this._m1.get(i);return n===void 0?!1:(this._m1.delete(i),this._m2.delete(n),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}e.BidirectionalMap=v;class b{constructor(){this.map=new Map}add(i,n){let t=this.map.get(i);t||(t=new Set,this.map.set(i,t)),t.add(n)}delete(i,n){const t=this.map.get(i);t&&(t.delete(n),t.size===0&&this.map.delete(i))}forEach(i,n){const t=this.map.get(i);t&&t.forEach(n)}get(i){const n=this.map.get(i);return n||new Set}}e.SetMap=b}),function(Q,e){typeof define=="function"&&define.amd?define(ie[395],ne([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(Q=typeof globalThis<"u"?globalThis:Q||self,e(Q.marked={}))}(this,function(Q){"use strict";function e(oe,Y){for(var K=0;Koe.length)&&(Y=oe.length);for(var K=0,H=new Array(Y);K=oe.length?{done:!0}:{done:!1,value:oe[H++]}}}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 _(){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}}Q.defaults=_();function p(oe){Q.defaults=oe}var S=/[&<>"']/,v=/[&<>"']/g,b=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},n=function(Y){return i[Y]};function t(oe,Y){if(Y){if(S.test(oe))return oe.replace(v,n)}else if(b.test(oe))return oe.replace(o,n);return oe}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(oe){return oe.replace(a,function(Y,K){return K=K.toLowerCase(),K==="colon"?":":K.charAt(0)==="#"?K.charAt(1)==="x"?String.fromCharCode(parseInt(K.substring(2),16)):String.fromCharCode(+K.substring(1)):""})}var f=/(^|[^\[])\^/g;function c(oe,Y){oe=typeof oe=="string"?oe:oe.source,Y=Y||"";var K={replace:function(z,se){return se=se.source||se,se=se.replace(f,"$1"),oe=oe.replace(z,se),K},getRegex:function(){return new RegExp(oe,Y)}};return K}var d=/[^\w:]/g,r=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(oe,Y,K){if(oe){var H;try{H=decodeURIComponent(u(K)).replace(d,"").toLowerCase()}catch{return null}if(H.indexOf("javascript:")===0||H.indexOf("vbscript:")===0||H.indexOf("data:")===0)return null}Y&&!r.test(K)&&(K=C(Y,K));try{K=encodeURI(K).replace(/%25/g,"%")}catch{return null}return K}var s={},g=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(oe,Y){s[" "+oe]||(g.test(oe)?s[" "+oe]=oe+"/":s[" "+oe]=M(oe,"/",!0)),oe=s[" "+oe];var K=oe.indexOf(":")===-1;return Y.substring(0,2)==="//"?K?Y:oe.replace(h,"$1")+Y:Y.charAt(0)==="/"?K?Y:oe.replace(m,"$1")+Y:oe+Y}var w={exec:function(){}};function D(oe){for(var Y=1,K,H;Y=0&&ae[ge]==="\\";)ce=!ce;return ce?"|":" |"}),H=K.split(/ \|/),z=0;if(H[0].trim()||H.shift(),H.length>0&&!H[H.length-1].trim()&&H.pop(),H.length>Y)H.splice(Y);else for(;H.length1;)Y&1&&(K+=oe),Y>>=1,oe+=oe;return K+oe}function N(oe,Y,K,H){var z=Y.href,se=Y.title?t(Y.title):null,q=oe[1].replace(/\\([\[\]])/g,"$1");if(oe[0].charAt(0)!=="!"){H.state.inLink=!0;var ae={type:"link",raw:K,href:z,title:se,text:q,tokens:H.inlineTokens(q)};return H.state.inLink=!1,ae}return{type:"image",raw:K,href:z,title:se,text:t(q)}}function P(oe,Y){var K=oe.match(/^(\s+)(?:```)/);if(K===null)return Y;var H=K[1];return Y.split(`
`).map(function(z){var se=z.match(/^\s+/);if(se===null)return z;var q=se[0];return q.length>=H.length?z.slice(H.length):z}).join(`
`)}var x=function(){function oe(K){this.options=K||Q.defaults}var Y=oe.prototype;return Y.space=function(H){var z=this.rules.block.newline.exec(H);if(z&&z[0].length>0)return{type:"space",raw:z[0]}},Y.code=function(H){var z=this.rules.block.code.exec(H);if(z){var se=z[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:z[0],codeBlockStyle:"indented",text:this.options.pedantic?se:M(se,`
`)}}},Y.fences=function(H){var z=this.rules.block.fences.exec(H);if(z){var se=z[0],q=P(se,z[3]||"");return{type:"code",raw:se,lang:z[2]?z[2].trim():z[2],text:q}}},Y.heading=function(H){var z=this.rules.block.heading.exec(H);if(z){var se=z[2].trim();if(/#$/.test(se)){var q=M(se,"#");(this.options.pedantic||!q||/ $/.test(q))&&(se=q.trim())}return{type:"heading",raw:z[0],depth:z[1].length,text:se,tokens:this.lexer.inline(se)}}},Y.hr=function(H){var z=this.rules.block.hr.exec(H);if(z)return{type:"hr",raw:z[0]}},Y.blockquote=function(H){var z=this.rules.block.blockquote.exec(H);if(z){var se=z[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:z[0],tokens:this.lexer.blockTokens(se,[]),text:se}}},Y.list=function(H){var z=this.rules.block.list.exec(H);if(z){var se,q,ae,ce,ge,pe,me,ve,Ce,Se,_e,Te,Me=z[1].trim(),Pe=Me.length>1,Be={type:"list",raw:"",ordered:Pe,start:Pe?+Me.slice(0,-1):"",loose:!1,items:[]};Me=Pe?"\\d{1,9}\\"+Me.slice(-1):"\\"+Me,this.options.pedantic&&(Me=Pe?Me:"[*+-]");for(var Le=new RegExp("^( {0,3}"+Me+")((?:[	 ][^\\n]*)?(?:\\n|$))");H&&(Te=!1,!(!(z=Le.exec(H))||this.rules.block.hr.test(H)));){if(se=z[0],H=H.substring(se.length),ve=z[2].split(`
`,1)[0],Ce=H.split(`
`,1)[0],this.options.pedantic?(ce=2,_e=ve.trimLeft()):(ce=z[2].search(/[^ ]/),ce=ce>4?1:ce,_e=ve.slice(ce),ce+=z[1].length),pe=!1,!ve&&/^ *$/.test(Ce)&&(se+=Ce+`
`,H=H.substring(Ce.length+1),Te=!0),!Te)for(var Ne=new RegExp("^ {0,"+Math.min(3,ce-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),fe=new RegExp("^ {0,"+Math.min(3,ce-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),be=new RegExp("^ {0,"+Math.min(3,ce-1)+"}(?:```|~~~)"),ke=new RegExp("^ {0,"+Math.min(3,ce-1)+"}#");H&&(Se=H.split(`
`,1)[0],ve=Se,this.options.pedantic&&(ve=ve.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!(be.test(ve)||ke.test(ve)||Ne.test(ve)||fe.test(H)));){if(ve.search(/[^ ]/)>=ce||!ve.trim())_e+=`
`+ve.slice(ce);else if(!pe)_e+=`
`+ve;else break;!pe&&!ve.trim()&&(pe=!0),se+=Se+`
`,H=H.substring(Se.length+1)}Be.loose||(me?Be.loose=!0:/\n *\n *$/.test(se)&&(me=!0)),this.options.gfm&&(q=/^\[[ xX]\] /.exec(_e),q&&(ae=q[0]!=="[ ] ",_e=_e.replace(/^\[[ xX]\] +/,""))),Be.items.push({type:"list_item",raw:se,task:!!q,checked:ae,loose:!1,text:_e}),Be.raw+=se}Be.items[Be.items.length-1].raw=se.trimRight(),Be.items[Be.items.length-1].text=_e.trimRight(),Be.raw=Be.raw.trimRight();var Re=Be.items.length;for(ge=0;ge1)return!0}return!1});!Be.loose&&Ve.length&&Ke&&(Be.loose=!0,Be.items[ge].loose=!0)}return Be}},Y.html=function(H){var z=this.rules.block.html.exec(H);if(z){var se={type:"html",raw:z[0],pre:!this.options.sanitizer&&(z[1]==="pre"||z[1]==="script"||z[1]==="style"),text:z[0]};if(this.options.sanitize){var q=this.options.sanitizer?this.options.sanitizer(z[0]):t(z[0]);se.type="paragraph",se.text=q,se.tokens=this.lexer.inline(q)}return se}},Y.def=function(H){var z=this.rules.block.def.exec(H);if(z){z[3]&&(z[3]=z[3].substring(1,z[3].length-1));var se=z[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:se,raw:z[0],href:z[2],title:z[3]}}},Y.table=function(H){var z=this.rules.block.table.exec(H);if(z){var se={type:"table",header:I(z[1]).map(function(me){return{text:me}}),align:z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:z[3]&&z[3].trim()?z[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(se.header.length===se.align.length){se.raw=z[0];var q=se.align.length,ae,ce,ge,pe;for(ae=0;ae/i.test(z[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(z[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(z[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:z[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(z[0]):t(z[0]):z[0]}},Y.link=function(H){var z=this.rules.inline.link.exec(H);if(z){var se=z[2].trim();if(!this.options.pedantic&&/^$/.test(se))return;var q=M(se.slice(0,-1),"\\");if((se.length-q.length)%2===0)return}else{var ae=A(z[2],"()");if(ae>-1){var ce=z[0].indexOf("!")===0?5:4,ge=ce+z[1].length+ae;z[2]=z[2].substring(0,ae),z[0]=z[0].substring(0,ge).trim(),z[3]=""}}var pe=z[2],me="";if(this.options.pedantic){var ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(pe);ve&&(pe=ve[1],me=ve[3])}else me=z[3]?z[3].slice(1,-1):"";return pe=pe.trim(),/^$/.test(se)?pe=pe.slice(1):pe=pe.slice(1,-1)),N(z,{href:pe&&pe.replace(this.rules.inline._escapes,"$1"),title:me&&me.replace(this.rules.inline._escapes,"$1")},z[0],this.lexer)}},Y.reflink=function(H,z){var se;if((se=this.rules.inline.reflink.exec(H))||(se=this.rules.inline.nolink.exec(H))){var q=(se[2]||se[1]).replace(/\s+/g," ");if(q=z[q.toLowerCase()],!q||!q.href){var ae=se[0].charAt(0);return{type:"text",raw:ae,text:ae}}return N(se,q,se[0],this.lexer)}},Y.emStrong=function(H,z,se){se===void 0&&(se="");var q=this.rules.inline.emStrong.lDelim.exec(H);if(q&&!(q[3]&&se.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 ae=q[1]||q[2]||"";if(!ae||ae&&(se===""||this.rules.inline.punctuation.exec(se))){var ce=q[0].length-1,ge,pe,me=ce,ve=0,Ce=q[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ce.lastIndex=0,z=z.slice(-1*H.length+ce);(q=Ce.exec(z))!=null;)if(ge=q[1]||q[2]||q[3]||q[4]||q[5]||q[6],!!ge){if(pe=ge.length,q[3]||q[4]){me+=pe;continue}else if((q[5]||q[6])&&ce%3&&!((ce+pe)%3)){ve+=pe;continue}if(me-=pe,!(me>0)){if(pe=Math.min(pe,pe+me+ve),Math.min(ce,pe)%2){var Se=H.slice(1,ce+q.index+pe);return{type:"em",raw:H.slice(0,ce+q.index+pe+1),text:Se,tokens:this.lexer.inlineTokens(Se)}}var _e=H.slice(2,ce+q.index+pe-1);return{type:"strong",raw:H.slice(0,ce+q.index+pe+1),text:_e,tokens:this.lexer.inlineTokens(_e)}}}}}},Y.codespan=function(H){var z=this.rules.inline.code.exec(H);if(z){var se=z[2].replace(/\n/g," "),q=/[^ ]/.test(se),ae=/^ /.test(se)&&/ $/.test(se);return q&&ae&&(se=se.substring(1,se.length-1)),se=t(se,!0),{type:"codespan",raw:z[0],text:se}}},Y.br=function(H){var z=this.rules.inline.br.exec(H);if(z)return{type:"br",raw:z[0]}},Y.del=function(H){var z=this.rules.inline.del.exec(H);if(z)return{type:"del",raw:z[0],text:z[2],tokens:this.lexer.inlineTokens(z[2])}},Y.autolink=function(H,z){var se=this.rules.inline.autolink.exec(H);if(se){var q,ae;return se[2]==="@"?(q=t(this.options.mangle?z(se[1]):se[1]),ae="mailto:"+q):(q=t(se[1]),ae=q),{type:"link",raw:se[0],text:q,href:ae,tokens:[{type:"text",raw:q,text:q}]}}},Y.url=function(H,z){var se;if(se=this.rules.inline.url.exec(H)){var q,ae;if(se[2]==="@")q=t(this.options.mangle?z(se[0]):se[0]),ae="mailto:"+q;else{var ce;do ce=se[0],se[0]=this.rules.inline._backpedal.exec(se[0])[0];while(ce!==se[0]);q=t(se[0]),se[1]==="www."?ae="http://"+q:ae=q}return{type:"link",raw:se[0],text:q,href:ae,tokens:[{type:"text",raw:q,text:q}]}}},Y.inlineText=function(H,z){var se=this.rules.inline.text.exec(H);if(se){var q;return this.lexer.state.inRawBlock?q=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(se[0]):t(se[0]):se[0]:q=t(this.options.smartypants?z(se[0]):se[0]),{type:"text",raw:se[0],text:q}}},oe}(),R={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\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]+/};R._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,R.def=c(R.def).replace("label",R._label).replace("title",R._title).getRegex(),R.bullet=/(?:[*+-]|\d{1,9}[.)])/,R.listItemStart=c(/^( *)(bull) */).replace("bull",R.bullet).getRegex(),R.list=c(R.list).replace(/bull/g,R.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+R.def.source+")").getRegex(),R._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",R._comment=/|$)/,R.html=c(R.html,"i").replace("comment",R._comment).replace("tag",R._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),R.paragraph=c(R._paragraph).replace("hr",R.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",R._tag).getRegex(),R.blockquote=c(R.blockquote).replace("paragraph",R.paragraph).getRegex(),R.normal=D({},R),R.gfm=D({},R.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),R.gfm.table=c(R.gfm.table).replace("hr",R.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",")|<(?:script|pre|style|textarea|!--)").replace("tag",R._tag).getRegex(),R.gfm.paragraph=c(R._paragraph).replace("hr",R.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",R.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",R._tag).getRegex(),R.pedantic=D({},R.normal,{html:c(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",R._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,paragraph:c(R.normal._paragraph).replace("hr",R.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",R.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:w,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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.punctuation=c(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\*|\\_/g,B._comment=c(R._comment).replace("(?:-->|$)","-->").getRegex(),B.emStrong.lDelim=c(B.emStrong.lDelim).replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimAst=c(B.emStrong.rDelimAst,"g").replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimUnd=c(B.emStrong.rDelimUnd,"g").replace(/punct/g,B._punctuation).getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,B.autolink=c(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=c(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=c(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=c(B.reflink).replace("label",B._label).replace("ref",R._label).getRegex(),B.nolink=c(B.nolink).replace("ref",R._label).getRegex(),B.reflinkSearch=c(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=D({},B),B.pedantic=D({},B.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=D({},B.normal,{escape:c(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(H="x"+H.toString(16)),Y+="&#"+H+";";return Y}var U=function(){function oe(K){this.tokens=[],this.tokens.links=Object.create(null),this.options=K||Q.defaults,this.options.tokenizer=this.options.tokenizer||new x,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 H={block:R.normal,inline:B.normal};this.options.pedantic?(H.block=R.pedantic,H.inline=B.pedantic):this.options.gfm&&(H.block=R.gfm,this.options.breaks?H.inline=B.breaks:H.inline=B.gfm),this.tokenizer.rules=H}oe.lex=function(H,z){var se=new oe(z);return se.lex(H)},oe.lexInline=function(H,z){var se=new oe(z);return se.inlineTokens(H)};var Y=oe.prototype;return Y.lex=function(H){H=H.replace(/\r\n|\r/g,`
`),this.blockTokens(H,this.tokens);for(var z;z=this.inlineQueue.shift();)this.inlineTokens(z.src,z.tokens);return this.tokens},Y.blockTokens=function(H,z){var se=this;z===void 0&&(z=[]),this.options.pedantic?H=H.replace(/\t/g,"    ").replace(/^ +$/gm,""):H=H.replace(/^( *)(\t+)/gm,function(me,ve,Ce){return ve+"    ".repeat(Ce.length)});for(var q,ae,ce,ge;H;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(me){return(q=me.call({lexer:se},H,z))?(H=H.substring(q.raw.length),z.push(q),!0):!1}))){if(q=this.tokenizer.space(H)){H=H.substring(q.raw.length),q.raw.length===1&&z.length>0?z[z.length-1].raw+=`
`:z.push(q);continue}if(q=this.tokenizer.code(H)){H=H.substring(q.raw.length),ae=z[z.length-1],ae&&(ae.type==="paragraph"||ae.type==="text")?(ae.raw+=`
`+q.raw,ae.text+=`
`+q.text,this.inlineQueue[this.inlineQueue.length-1].src=ae.text):z.push(q);continue}if(q=this.tokenizer.fences(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.heading(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.hr(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.blockquote(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.list(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.html(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.def(H)){H=H.substring(q.raw.length),ae=z[z.length-1],ae&&(ae.type==="paragraph"||ae.type==="text")?(ae.raw+=`
`+q.raw,ae.text+=`
`+q.raw,this.inlineQueue[this.inlineQueue.length-1].src=ae.text):this.tokens.links[q.tag]||(this.tokens.links[q.tag]={href:q.href,title:q.title});continue}if(q=this.tokenizer.table(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.lheading(H)){H=H.substring(q.raw.length),z.push(q);continue}if(ce=H,this.options.extensions&&this.options.extensions.startBlock&&function(){var me=1/0,ve=H.slice(1),Ce=void 0;se.options.extensions.startBlock.forEach(function(Se){Ce=Se.call({lexer:this},ve),typeof Ce=="number"&&Ce>=0&&(me=Math.min(me,Ce))}),me<1/0&&me>=0&&(ce=H.substring(0,me+1))}(),this.state.top&&(q=this.tokenizer.paragraph(ce))){ae=z[z.length-1],ge&&ae.type==="paragraph"?(ae.raw+=`
`+q.raw,ae.text+=`
`+q.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ae.text):z.push(q),ge=ce.length!==H.length,H=H.substring(q.raw.length);continue}if(q=this.tokenizer.text(H)){H=H.substring(q.raw.length),ae=z[z.length-1],ae&&ae.type==="text"?(ae.raw+=`
`+q.raw,ae.text+=`
`+q.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ae.text):z.push(q);continue}if(H){var pe="Infinite loop on byte: "+H.charCodeAt(0);if(this.options.silent){console.error(pe);break}else throw new Error(pe)}}return this.state.top=!0,z},Y.inline=function(H,z){return z===void 0&&(z=[]),this.inlineQueue.push({src:H,tokens:z}),z},Y.inlineTokens=function(H,z){var se=this;z===void 0&&(z=[]);var q,ae,ce,ge=H,pe,me,ve;if(this.tokens.links){var Ce=Object.keys(this.tokens.links);if(Ce.length>0)for(;(pe=this.tokenizer.rules.inline.reflinkSearch.exec(ge))!=null;)Ce.includes(pe[0].slice(pe[0].lastIndexOf("[")+1,-1))&&(ge=ge.slice(0,pe.index)+"["+T("a",pe[0].length-2)+"]"+ge.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(pe=this.tokenizer.rules.inline.blockSkip.exec(ge))!=null;)ge=ge.slice(0,pe.index)+"["+T("a",pe[0].length-2)+"]"+ge.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(pe=this.tokenizer.rules.inline.escapedEmSt.exec(ge))!=null;)ge=ge.slice(0,pe.index)+"++"+ge.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;H;)if(me||(ve=""),me=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(_e){return(q=_e.call({lexer:se},H,z))?(H=H.substring(q.raw.length),z.push(q),!0):!1}))){if(q=this.tokenizer.escape(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.tag(H)){H=H.substring(q.raw.length),ae=z[z.length-1],ae&&q.type==="text"&&ae.type==="text"?(ae.raw+=q.raw,ae.text+=q.text):z.push(q);continue}if(q=this.tokenizer.link(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.reflink(H,this.tokens.links)){H=H.substring(q.raw.length),ae=z[z.length-1],ae&&q.type==="text"&&ae.type==="text"?(ae.raw+=q.raw,ae.text+=q.text):z.push(q);continue}if(q=this.tokenizer.emStrong(H,ge,ve)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.codespan(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.br(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.del(H)){H=H.substring(q.raw.length),z.push(q);continue}if(q=this.tokenizer.autolink(H,V)){H=H.substring(q.raw.length),z.push(q);continue}if(!this.state.inLink&&(q=this.tokenizer.url(H,V))){H=H.substring(q.raw.length),z.push(q);continue}if(ce=H,this.options.extensions&&this.options.extensions.startInline&&function(){var _e=1/0,Te=H.slice(1),Me=void 0;se.options.extensions.startInline.forEach(function(Pe){Me=Pe.call({lexer:this},Te),typeof Me=="number"&&Me>=0&&(_e=Math.min(_e,Me))}),_e<1/0&&_e>=0&&(ce=H.substring(0,_e+1))}(),q=this.tokenizer.inlineText(ce,W)){H=H.substring(q.raw.length),q.raw.slice(-1)!=="_"&&(ve=q.raw.slice(-1)),me=!0,ae=z[z.length-1],ae&&ae.type==="text"?(ae.raw+=q.raw,ae.text+=q.text):z.push(q);continue}if(H){var Se="Infinite loop on byte: "+H.charCodeAt(0);if(this.options.silent){console.error(Se);break}else throw new Error(Se)}}return z},L(oe,null,[{key:"rules",get:function(){return{block:R,inline:B}}}]),oe}(),F=function(){function oe(K){this.options=K||Q.defaults}var Y=oe.prototype;return Y.code=function(H,z,se){var q=(z||"").match(/\S*/)[0];if(this.options.highlight){var ae=this.options.highlight(H,q);ae!=null&&ae!==H&&(se=!0,H=ae)}return H=H.replace(/\n$/,"")+`
`,q?'
'+(se?H:t(H,!0))+`
`:"
"+(se?H:t(H,!0))+`
`},Y.blockquote=function(H){return`
`+H+`
`},Y.html=function(H){return H},Y.heading=function(H,z,se,q){if(this.options.headerIds){var ae=this.options.headerPrefix+q.slug(se);return"'+H+" `}return""+H+" `},Y.hr=function(){return this.options.xhtml?`
`:`
`},Y.list=function(H,z,se){var q=z?"ol":"ul",ae=z&&se!==1?' start="'+se+'"':"";return"<"+q+ae+`> `+H+" `},Y.listitem=function(H){return"
  • "+H+`
  • `},Y.checkbox=function(H){return" "},Y.paragraph=function(H){return"

    "+H+`

    `},Y.table=function(H,z){return z&&(z=""+z+""),` `+H+` `+z+`
    `},Y.tablerow=function(H){return` `+H+` `},Y.tablecell=function(H,z){var se=z.header?"th":"td",q=z.align?"<"+se+' align="'+z.align+'">':"<"+se+">";return q+H+(" `)},Y.strong=function(H){return""+H+""},Y.em=function(H){return""+H+""},Y.codespan=function(H){return""+H+""},Y.br=function(){return this.options.xhtml?"
    ":"
    "},Y.del=function(H){return""+H+""},Y.link=function(H,z,se){if(H=l(this.options.sanitize,this.options.baseUrl,H),H===null)return se;var q='",q},Y.image=function(H,z,se){if(H=l(this.options.sanitize,this.options.baseUrl,H),H===null)return se;var q=''+se+'":">",q},Y.text=function(H){return H},oe}(),j=function(){function oe(){}var Y=oe.prototype;return Y.strong=function(H){return H},Y.em=function(H){return H},Y.codespan=function(H){return H},Y.del=function(H){return H},Y.html=function(H){return H},Y.text=function(H){return H},Y.link=function(H,z,se){return""+se},Y.image=function(H,z,se){return""+se},Y.br=function(){return""},oe}(),J=function(){function oe(){this.seen={}}var Y=oe.prototype;return Y.serialize=function(H){return H.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Y.getNextSafeSlug=function(H,z){var se=H,q=0;if(this.seen.hasOwnProperty(se)){q=this.seen[H];do q++,se=H+"-"+q;while(this.seen.hasOwnProperty(se))}return z||(this.seen[H]=q,this.seen[se]=0),se},Y.slug=function(H,z){z===void 0&&(z={});var se=this.serialize(H);return this.getNextSafeSlug(se,z.dryrun)},oe}(),le=function(){function oe(K){this.options=K||Q.defaults,this.options.renderer=this.options.renderer||new F,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new j,this.slugger=new J}oe.parse=function(H,z){var se=new oe(z);return se.parse(H)},oe.parseInline=function(H,z){var se=new oe(z);return se.parseInline(H)};var Y=oe.prototype;return Y.parse=function(H,z){z===void 0&&(z=!0);var se="",q,ae,ce,ge,pe,me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le,Ne,fe,be,ke,Re=H.length;for(q=0;q0&&Le.tokens[0].type==="paragraph"?(Le.tokens[0].text=be+" "+Le.tokens[0].text,Le.tokens[0].tokens&&Le.tokens[0].tokens.length>0&&Le.tokens[0].tokens[0].type==="text"&&(Le.tokens[0].tokens[0].text=be+" "+Le.tokens[0].tokens[0].text)):Le.tokens.unshift({type:"text",text:be}):Be+=be),Be+=this.parse(Le.tokens,Pe),Se+=this.renderer.listitem(Be,fe,Ne);se+=this.renderer.list(Se,Te,Me);continue}case"html":{se+=this.renderer.html(_e.text);continue}case"paragraph":{se+=this.renderer.paragraph(this.parseInline(_e.tokens));continue}case"text":{for(Se=_e.tokens?this.parseInline(_e.tokens):_e.text;q+1"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 Y=="function"&&(K=Y,Y=null),Y=D({},ee.defaults,Y||{}),O(Y),K){var H=Y.highlight,z;try{z=U.lex(oe,Y)}catch(ge){return K(ge)}var se=function(pe){var me;if(!pe)try{Y.walkTokens&&ee.walkTokens(z,Y.walkTokens),me=le.parse(z,Y)}catch(ve){pe=ve}return Y.highlight=H,pe?K(pe):K(null,me)};if(!H||H.length<3||(delete Y.highlight,!z.length))return se();var q=0;ee.walkTokens(z,function(ge){ge.type==="code"&&(q++,setTimeout(function(){H(ge.text,ge.lang,function(pe,me){if(pe)return se(pe);me!=null&&me!==ge.text&&(ge.text=me,ge.escaped=!0),q--,q===0&&se()})},0))}),q===0&&se();return}function ae(ge){if(ge.message+=` Please report this to https://github.com/markedjs/marked.`,Y.silent)return"

    An error occurred:

    "+t(ge.message+"",!0)+"
    ";throw ge}try{var ce=U.lex(oe,Y);if(Y.walkTokens){if(Y.async)return Promise.all(ee.walkTokens(ce,Y.walkTokens)).then(function(){return le.parse(ce,Y)}).catch(ae);ee.walkTokens(ce,Y.walkTokens)}return le.parse(ce,Y)}catch(ge){ae(ge)}}ee.options=ee.setOptions=function(oe){return D(ee.defaults,oe),p(ee.defaults),ee},ee.getDefaults=_,ee.defaults=Q.defaults,ee.use=function(){for(var oe=arguments.length,Y=new Array(oe),K=0;K"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");Y=D({},ee.defaults,Y||{}),O(Y);try{var K=U.lexInline(oe,Y);return Y.walkTokens&&ee.walkTokens(K,Y.walkTokens),le.parseInline(K,Y)}catch(H){if(H.message+=` Please report this to https://github.com/markedjs/marked.`,Y.silent)return"

    An error occurred:

    "+t(H.message+"",!0)+"
    ";throw H}},ee.Parser=le,ee.parser=le.parse,ee.Renderer=F,ee.TextRenderer=j,ee.Lexer=U,ee.lexer=U.lex,ee.Tokenizer=x,ee.Slugger=J,ee.parse=ee;var $=ee.options,te=ee.setOptions,G=ee.use,de=ee.walkTokens,ue=ee.parseInline,X=ee,Z=le.parse,re=U.lex;Q.Lexer=U,Q.Parser=le,Q.Renderer=F,Q.Slugger=J,Q.TextRenderer=j,Q.Tokenizer=x,Q.getDefaults=_,Q.lexer=re,Q.marked=ee,Q.options=$,Q.parse=X,Q.parseInline=ue,Q.parser=Z,Q.setOptions=te,Q.use=G,Q.walkTokens=de,Object.defineProperty(Q,"__esModule",{value:!0})}),define(ie[108],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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"})}),define(ie[198],ne([1,0,108]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:L.Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}}),define(ie[396],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getKoreanAltChars=void 0;function L(i){const n=E(i);if(n&&n.length>0)return new Uint32Array(n)}e.getKoreanAltChars=L;let k=0;const y=new Uint32Array(10);function E(i){if(k=0,_(i,S,4352),k>0||(_(i,v,4449),k>0)||(_(i,b,4520),k>0)||(_(i,o,12593),k))return y.subarray(0,k);if(i>=44032&&i<=55203){const n=i-44032,t=n%588,a=Math.floor(n/588),u=Math.floor(t/28),f=t%28-1;if(a=0&&(f0)return y.subarray(0,k)}}function _(i,n,t){i>=t&&i>8&&(y[k++]=i>>8&255),i>>16&&(y[k++]=i>>16&255))}const S=new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),v=new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),b=new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),o=new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108])}),define(ie[397],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class L{constructor(y,E=0,_=y.length,p=E-1){this.items=y,this.start=E,this.end=_,this.index=p}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=L}),define(ie[398],ne([1,0,397]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class k{constructor(E=[],_=10){this._initialize(E),this._limit=_,this._onChange()}getHistory(){return this._elements}add(E){this._history.delete(E),this._history.add(E),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(E){return this._history.has(E)}_onChange(){this._reduceToLimit();const E=this._elements;this._navigator=new L.ArrayNavigator(E,0,E.length,E.length)}_reduceToLimit(){const E=this._elements;E.length>this._limit&&this._initialize(E.slice(E.length-this._limit))}_currentPosition(){const E=this._navigator.current();return E?this._elements.indexOf(E):-1}_initialize(E){this._history=new Set;for(const _ of E)this._history.add(_)}get _elements(){const E=[];return this._history.forEach(_=>E.push(_)),E}}e.HistoryNavigator=k}),define(ie[143],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function L(E,_,p){return Math.min(Math.max(E,_),p)}e.clamp=L;class k{constructor(){this._n=1,this._val=0}update(_){return this._val=this._val+(_-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=k;class y{constructor(_){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(_),this._values.fill(0,0,_)}update(_){const p=this._values[this._index];return this._values[this._index]=_,this._index=(this._index+1)%this._values.length,this._sum-=p,this._sum+=_,this._nf.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(u){const f=u.handleChange;this.changedObservablesSets.set(u,new Set),u.handleChange=(c,d)=>(this.changedObservablesSets.get(u).add(c),f.apply(u,[c,d]))}handleDerivedRecomputed(u,f){const c=this.changedObservablesSets.get(u);console.log(...this.textToConsoleArgs([S("derived recomputed"),v(u.debugName,{color:"BlueViolet"}),...this.formatInfo(f),this.formatChanges(c),{data:[{fn:u._computeFn}]}])),c.clear()}handleFromEventObservableTriggered(u,f){console.log(...this.textToConsoleArgs([S("observable from event triggered"),v(u.debugName,{color:"BlueViolet"}),...this.formatInfo(f),{data:[{fn:u._getValue}]}]))}handleAutorunCreated(u){const f=u.handleChange;this.changedObservablesSets.set(u,new Set),u.handleChange=(c,d)=>(this.changedObservablesSets.get(u).add(c),f.apply(u,[c,d]))}handleAutorunTriggered(u){const f=this.changedObservablesSets.get(u);console.log(...this.textToConsoleArgs([S("autorun"),v(u.debugName,{color:"BlueViolet"}),this.formatChanges(f),{data:[{fn:u._runFn}]}])),f.clear(),this.indentation++}handleAutorunFinished(u){this.indentation--}handleBeginTransaction(u){let f=u.getDebugName();f===void 0&&(f=""),console.log(...this.textToConsoleArgs([S("transaction"),v(f,{color:"BlueViolet"}),{data:[{fn:u._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=E;function _(a){const u=new Array,f=[];let c="";function d(l){if("length"in l)for(const s of l)s&&d(s);else"text"in l?(c+=`%c${l.text}`,u.push(l.style),l.data&&f.push(...l.data)):"data"in l&&f.push(...l.data)}d(a);const r=[c,...u];return r.push(...f),r}function p(a){return v(a,{color:"black"})}function S(a){return v(t(`${a}: `,10),{color:"black",bold:!0})}function v(a,u={color:"black"}){function f(d){return Object.entries(d).reduce((r,[l,s])=>`${r}${l}:${s};`,"")}const c={color:u.color};return u.strikeThrough&&(c["text-decoration"]="line-through"),u.bold&&(c["font-weight"]="bold"),{text:a,style:f(c)}}function b(a,u){switch(typeof a){case"number":return""+a;case"string":return a.length+2<=u?`"${a}"`:`"${a.substr(0,u-7)}"+...`;case"boolean":return a?"true":"false";case"undefined":return"undefined";case"object":return a===null?"null":Array.isArray(a)?o(a,u):i(a,u);case"symbol":return a.toString();case"function":return`[[Function${a.name?" "+a.name:""}]]`;default:return""+a}}function o(a,u){let f="[ ",c=!0;for(const d of a){if(c||(f+=", "),f.length-5>u){f+="...";break}c=!1,f+=`${b(d,u-f.length)}`}return f+=" ]",f}function i(a,u){let f="{ ",c=!0;for(const[d,r]of Object.entries(a)){if(c||(f+=", "),f.length-5>u){f+="...";break}c=!1,f+=`${d}: ${b(r,u-f.length)}`}return f+=" }",f}function n(a,u){let f="";for(let c=1;c<=u;c++)f+=a;return f}function t(a,u){for(;a.length{const T=g(O);if(T!==void 0)return T;const P=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(O.toString());if(P)return`${this.debugName}.${P[2]}`;if(!A)return`${this.debugName} (mapped)`}},T=>O(this.read(T),T))}recomputeInitiallyAndOnChange(I,M){return I.add(k(this,M)),this}}e.ConvenientObservable=p;class S extends p{constructor(){super(...arguments),this.observers=new Set}addObserver(I){const M=this.observers.size;this.observers.add(I),M===0&&this.onFirstObserverAdded()}removeObserver(I){this.observers.delete(I)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=S;function v(D,I){const M=new t(D,I);try{D(M)}finally{M.finish()}}e.transaction=v;let b;function o(D){if(b)D(b);else{const I=new t(D,void 0);b=I;try{D(I)}finally{I.finish(),b=void 0}}}e.globalTransaction=o;async function i(D,I){const M=new t(D,I);try{await D(M)}finally{M.finish()}}e.asyncTransaction=i;function n(D,I,M){D?I(D):v(I,M)}e.subtransaction=n;class t{constructor(I,M){var A;this._fn=I,this._getDebugName=M,this.updatingObservers=[],(A=(0,L.getLogger)())===null||A===void 0||A.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():g(this._fn)}updateObserver(I,M){this.updatingObservers.push({observer:I,observable:M}),I.beginUpdate(M)}finish(){var I;const M=this.updatingObservers;for(let A=0;A{},()=>`Setting ${this.debugName}`));try{const N=this._value;this._setValue(I),(O=(0,L.getLogger)())===null||O===void 0||O.handleObservableChanged(this,{oldValue:N,newValue:I,change:A,didChange:!0,hadValue:!0});for(const P of this.observers)M.updateObserver(P,this),P.handleChange(this,A)}finally{T&&T.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(I){this._value=I}}e.ObservableValue=m;function C(D,I){return typeof D=="string"?new w(void 0,D,I):new w(D,void 0,I)}e.disposableObservableValue=C;class w extends m{_setValue(I){this._value!==I&&(this._value&&this._value.dispose(),this._value=I)}dispose(){var I;(I=this._value)===null||I===void 0||I.dispose()}}e.DisposableObservableValue=w}),define(ie[266],ne([1,0,98,2,109,144]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutorunObserver=e.autorunWithStore=e.autorunHandleChanges=e.autorunOpts=e.autorun=void 0;function _(o){return new b(void 0,o,void 0,void 0)}e.autorun=_;function p(o,i){return new b(o.debugName,i,void 0,void 0)}e.autorunOpts=p;function S(o,i){return new b(o.debugName,i,o.createEmptyChangeSummary,o.handleChange)}e.autorunHandleChanges=S;function v(o){const i=new k.DisposableStore,n=p({debugName:()=>(0,y.getFunctionName)(o)||"(anonymous)"},t=>{i.clear(),o(t,i)});return(0,k.toDisposable)(()=>{n.dispose(),i.dispose()})}e.autorunWithStore=v;class b{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const n=this._debugName();if(n!==void 0)return n}const i=(0,y.getFunctionName)(this._runFn);return i!==void 0?i:"(anonymous)"}constructor(i,n,t,a){var u,f;this._debugName=i,this._runFn=n,this.createChangeSummary=t,this._handleChange=a,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(u=this.createChangeSummary)===null||u===void 0?void 0:u.call(this),(f=(0,E.getLogger)())===null||f===void 0||f.handleAutorunCreated(this),this._runIfNeeded(),(0,k.trackDisposable)(this)}dispose(){this.disposed=!0;for(const i of this.dependencies)i.removeObserver(this);this.dependencies.clear(),(0,k.markAsDisposed)(this)}_runIfNeeded(){var i,n,t;if(this.state===3)return;const a=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=a,this.state=3;const u=this.disposed;try{if(!u){(i=(0,E.getLogger)())===null||i===void 0||i.handleAutorunTriggered(this);const f=this.changeSummary;this.changeSummary=(n=this.createChangeSummary)===null||n===void 0?void 0:n.call(this),this._runFn(this,f)}}finally{u||(t=(0,E.getLogger)())===null||t===void 0||t.handleAutorunFinished(this);for(const f of this.dependenciesToBeRemoved)f.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const i of this.dependencies)if(i.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,(0,L.assertFn)(()=>this.updateCount>=0)}handlePossibleChange(i){this.state===3&&this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)&&(this.state=1)}handleChange(i,n){this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)&&(!this._handleChange||this._handleChange({changedObservable:i,change:n,didChange:a=>a===i},this.changeSummary))&&(this.state=2)}readObservable(i){if(this.disposed)return i.get();i.addObserver(this);const n=i.get();return this.dependencies.add(i),this.dependenciesToBeRemoved.delete(i),n}}e.AutorunObserver=b,function(o){o.Observer=b}(_||(e.autorun=_={}))}),define(ie[169],ne([1,0,9,2,109,144]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derivedDisposable=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=void 0;const _=(n,t)=>n===t;function p(n,t){return t!==void 0?new i(n,void 0,t,void 0,void 0,void 0,_):new i(void 0,void 0,n,void 0,void 0,void 0,_)}e.derived=p;function S(n,t){var a;return new i(n.owner,n.debugName,t,void 0,void 0,void 0,(a=n.equalityComparer)!==null&&a!==void 0?a:_)}e.derivedOpts=S;function v(n,t){var a;return new i(n.owner,n.debugName,t,n.createEmptyChangeSummary,n.handleChange,void 0,(a=n.equalityComparer)!==null&&a!==void 0?a:_)}e.derivedHandleChanges=v;function b(n,t){let a,u;t===void 0?(a=n,u=void 0):(u=n,a=t);const f=new k.DisposableStore;return new i(u,()=>{var c;return(c=(0,y.getFunctionName)(a))!==null&&c!==void 0?c:"(anonymous)"},c=>(f.clear(),a(c,f)),void 0,void 0,()=>f.dispose(),_)}e.derivedWithStore=b;function o(n,t){let a,u;t===void 0?(a=n,u=void 0):(u=n,a=t);const f=new k.DisposableStore;return new i(u,()=>{var c;return(c=(0,y.getFunctionName)(a))!==null&&c!==void 0?c:"(anonymous)"},c=>{f.clear();const d=a(c);return d&&f.add(d),d},void 0,void 0,()=>f.dispose(),_)}e.derivedDisposable=o,(0,y._setDerivedOpts)(S);class i extends y.BaseObservable{get debugName(){var t;return(t=(0,y.getDebugName)(this,this._debugName,this._computeFn,this._owner,this))!==null&&t!==void 0?t:"(anonymous)"}constructor(t,a,u,f,c,d=void 0,r){var l,s;super(),this._owner=t,this._debugName=a,this._computeFn=u,this.createChangeSummary=f,this._handleChange=c,this._handleLastObserverRemoved=d,this._equalityComparator=r,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(l=this.createChangeSummary)===null||l===void 0?void 0:l.call(this),(s=(0,E.getLogger)())===null||s===void 0||s.handleDerivedCreated(this)}onLastObserverRemoved(){var t;this.state=0,this.value=void 0;for(const a of this.dependencies)a.removeObserver(this);this.dependencies.clear(),(t=this._handleLastObserverRemoved)===null||t===void 0||t.call(this)}get(){var t;if(this.observers.size===0){const a=this._computeFn(this,(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this));return this.onLastObserverRemoved(),a}else{do{if(this.state===1){for(const a of this.dependencies)if(a.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var t,a;if(this.state===3)return;const u=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=u;const f=this.state!==0,c=this.value;this.state=3;const d=this.changeSummary;this.changeSummary=(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this);try{this.value=this._computeFn(this,d)}finally{for(const l of this.dependenciesToBeRemoved)l.removeObserver(this);this.dependenciesToBeRemoved.clear()}const r=f&&!this._equalityComparator(c,this.value);if((a=(0,E.getLogger)())===null||a===void 0||a.handleDerivedRecomputed(this,{oldValue:c,newValue:this.value,change:void 0,didChange:r,hadValue:f}),r)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(t){this.updateCount++;const a=this.updateCount===1;if(this.state===3&&(this.state=1,!a))for(const u of this.observers)u.handlePossibleChange(this);if(a)for(const u of this.observers)u.beginUpdate(this)}endUpdate(t){if(this.updateCount--,this.updateCount===0){const a=[...this.observers];for(const u of a)u.endUpdate(this)}if(this.updateCount<0)throw new L.BugIndicatingError}handlePossibleChange(t){if(this.state===3&&this.dependencies.has(t)&&!this.dependenciesToBeRemoved.has(t)){this.state=1;for(const a of this.observers)a.handlePossibleChange(this)}}handleChange(t,a){if(this.dependencies.has(t)&&!this.dependenciesToBeRemoved.has(t)){const u=this._handleChange?this._handleChange({changedObservable:t,change:a,didChange:c=>c===t},this.changeSummary):!0,f=this.state===3;if(u&&(this.state===1||f)&&(this.state=2,f))for(const c of this.observers)c.handlePossibleChange(this)}}readObservable(t){t.addObserver(this);const a=t.get();return this.dependencies.add(t),this.dependenciesToBeRemoved.delete(t),a}addObserver(t){const a=!this.observers.has(t)&&this.updateCount>0;super.addObserver(t),a&&t.beginUpdate(this)}removeObserver(t){const a=this.observers.has(t)&&this.updateCount>0;super.removeObserver(t),a&&t.endUpdate(this)}}e.Derived=i}),define(ie[399],ne([1,0,2,266,109,169,144]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.derivedObservableWithCache=e.recomputeInitiallyAndOnChange=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.waitForState=e.constObservable=void 0;function p(d){return new S(d)}e.constObservable=p;class S extends y.ConvenientObservable{constructor(r){super(),this.value=r}get debugName(){return this.toString()}get(){return this.value}addObserver(r){}removeObserver(r){}toString(){return`Const: ${this.value}`}}function v(d,r){return new Promise(l=>{let s=!1,g=!1;const h=d.map(C=>({isFinished:r(C),state:C})),m=(0,k.autorun)(C=>{const{isFinished:w,state:D}=h.read(C);w&&(s?m.dispose():g=!0,l(D))});s=!0,g&&m.dispose()})}e.waitForState=v;function b(d,r){return new o(d,r)}e.observableFromEvent=b;class o extends y.BaseObservable{constructor(r,l){super(),this.event=r,this._getValue=l,this.hasValue=!1,this.handleEvent=s=>{var g;const h=this._getValue(s),m=this.value,C=!this.hasValue||m!==h;let w=!1;C&&(this.value=h,this.hasValue&&(w=!0,(0,y.subtransaction)(o.globalTransaction,D=>{var I;(I=(0,_.getLogger)())===null||I===void 0||I.handleFromEventObservableTriggered(this,{oldValue:m,newValue:h,change:void 0,didChange:C,hadValue:this.hasValue});for(const M of this.observers)D.updateObserver(M,this),M.handleChange(this,void 0)},()=>{const D=this.getDebugName();return"Event fired"+(D?`: ${D}`:"")})),this.hasValue=!0),w||(g=(0,_.getLogger)())===null||g===void 0||g.handleFromEventObservableTriggered(this,{oldValue:m,newValue:h,change:void 0,didChange:C,hadValue:this.hasValue})}}getDebugName(){return(0,y.getFunctionName)(this._getValue)}get debugName(){const r=this.getDebugName();return"From Event"+(r?`: ${r}`:"")}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=o,function(d){d.Observer=o;function r(l,s){let g=!1;o.globalTransaction===void 0&&(o.globalTransaction=l,g=!0);try{s()}finally{g&&(o.globalTransaction=void 0)}}d.batchEventsGlobally=r}(b||(e.observableFromEvent=b={}));function i(d,r){return new n(d,r)}e.observableSignalFromEvent=i;class n extends y.BaseObservable{constructor(r,l){super(),this.debugName=r,this.event=l,this.handleEvent=()=>{(0,y.transaction)(s=>{for(const g of this.observers)s.updateObserver(g,this),g.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function t(d){return typeof d=="string"?new a(d):new a(void 0,d)}e.observableSignal=t;class a extends y.BaseObservable{get debugName(){var r;return(r=(0,y.getDebugName)(this,this._debugName,void 0,this._owner,this))!==null&&r!==void 0?r:"Observable Signal"}constructor(r,l){super(),this._debugName=r,this._owner=l}trigger(r,l){if(!r){(0,y.transaction)(s=>{this.trigger(s,l)},()=>`Trigger signal ${this.debugName}`);return}for(const s of this.observers)r.updateObserver(s,this),s.handleChange(this,l)}get(){}}function u(d,r){const l=new f(!0,r);return d.addObserver(l),r?r(d.get()):d.reportChanges(),(0,L.toDisposable)(()=>{d.removeObserver(l)})}e.recomputeInitiallyAndOnChange=u,(0,y._setRecomputeInitiallyAndOnChange)(u);class f{constructor(r,l){this._forceRecompute=r,this._handleValue=l,this._counter=0}beginUpdate(r){this._counter++}endUpdate(r){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(r.get()):r.reportChanges())}handlePossibleChange(r){}handleChange(r,l){}}function c(d){let r;return(0,E.derived)(s=>(r=d(s,r),r))}e.derivedObservableWithCache=c}),define(ie[35],ne([1,0,109,169,266,399,144]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.waitForState=e.observableSignalFromEvent=e.observableSignal=e.observableFromEvent=e.recomputeInitiallyAndOnChange=e.derivedObservableWithCache=e.constObservable=e.autorunOpts=e.autorunWithStore=e.autorunHandleChanges=e.autorun=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=e.subtransaction=e.transaction=e.disposableObservableValue=e.observableValue=void 0,Object.defineProperty(e,"observableValue",{enumerable:!0,get:function(){return L.observableValue}}),Object.defineProperty(e,"disposableObservableValue",{enumerable:!0,get:function(){return L.disposableObservableValue}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return L.transaction}}),Object.defineProperty(e,"subtransaction",{enumerable:!0,get:function(){return L.subtransaction}}),Object.defineProperty(e,"derived",{enumerable:!0,get:function(){return k.derived}}),Object.defineProperty(e,"derivedOpts",{enumerable:!0,get:function(){return k.derivedOpts}}),Object.defineProperty(e,"derivedHandleChanges",{enumerable:!0,get:function(){return k.derivedHandleChanges}}),Object.defineProperty(e,"derivedWithStore",{enumerable:!0,get:function(){return k.derivedWithStore}}),Object.defineProperty(e,"autorun",{enumerable:!0,get:function(){return y.autorun}}),Object.defineProperty(e,"autorunHandleChanges",{enumerable:!0,get:function(){return y.autorunHandleChanges}}),Object.defineProperty(e,"autorunWithStore",{enumerable:!0,get:function(){return y.autorunWithStore}}),Object.defineProperty(e,"autorunOpts",{enumerable:!0,get:function(){return y.autorunOpts}}),Object.defineProperty(e,"constObservable",{enumerable:!0,get:function(){return E.constObservable}}),Object.defineProperty(e,"derivedObservableWithCache",{enumerable:!0,get:function(){return E.derivedObservableWithCache}}),Object.defineProperty(e,"recomputeInitiallyAndOnChange",{enumerable:!0,get:function(){return E.recomputeInitiallyAndOnChange}}),Object.defineProperty(e,"observableFromEvent",{enumerable:!0,get:function(){return E.observableFromEvent}}),Object.defineProperty(e,"observableSignal",{enumerable:!0,get:function(){return E.observableSignal}}),Object.defineProperty(e,"observableSignalFromEvent",{enumerable:!0,get:function(){return E.observableSignalFromEvent}}),Object.defineProperty(e,"waitForState",{enumerable:!0,get:function(){return E.waitForState}}),!1&&(0,_.setLogger)(new _.ConsoleObservableLogger)}),define(ie[170],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var L;(function(k){function y(S,v){if(S.start>=v.end||v.start>=S.end)return{start:0,end:0};const b=Math.max(S.start,v.start),o=Math.min(S.end,v.end);return o-b<=0?{start:0,end:0}:{start:b,end:o}}k.intersect=y;function E(S){return S.end-S.start<=0}k.isEmpty=E;function _(S,v){return!E(y(S,v))}k.intersects=_;function p(S,v){const b=[],o={start:S.start,end:Math.min(v.start,S.end)},i={start:Math.max(v.end,S.start),end:S.end};return E(o)||b.push(o),E(i)||b.push(i),b}k.relativeComplement=p})(L||(e.Range=L={}))}),define(ie[400],ne([1,0,170]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function k(S,v){const b=[];for(const o of v){if(S.start>=o.range.end)continue;if(S.endv.concat(b),[]))}class p{get paddingTop(){return this._paddingTop}set paddingTop(v){this._size=this._size+v-this._paddingTop,this._paddingTop=v}constructor(v){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=v??0,this._size=this._paddingTop}splice(v,b,o=[]){const i=o.length-b,n=k({start:0,end:v},this.groups),t=k({start:v+b,end:Number.POSITIVE_INFINITY},this.groups).map(u=>({range:y(u.range,i),size:u.size})),a=o.map((u,f)=>({range:{start:v+f,end:v+f+1},size:u.size}));this.groups=_(n,a,t),this._size=this._paddingTop+this.groups.reduce((u,f)=>u+f.size*(f.range.end-f.range.start),0)}get count(){const v=this.groups.length;return v?this.groups[v-1].range.end:0}get size(){return this._size}indexAt(v){if(v<0)return-1;if(vy.Disposable.None;function w(oe){if(S){const{onDidAddListener:Y}=oe,K=n.create();let H=0;oe.onDidAddListener=()=>{++H===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),K.print()),Y?.()}}}function D(oe,Y){return B(oe,()=>{},0,void 0,!0,void 0,Y)}C.defer=D;function I(oe){return(Y,K=null,H)=>{let z=!1,se;return se=oe(q=>{if(!z)return se?se.dispose():z=!0,Y.call(K,q)},null,H),z&&se.dispose(),se}}C.once=I;function M(oe,Y,K){return x((H,z=null,se)=>oe(q=>H.call(z,Y(q)),null,se),K)}C.map=M;function A(oe,Y,K){return x((H,z=null,se)=>oe(q=>{Y(q),H.call(z,q)},null,se),K)}C.forEach=A;function O(oe,Y,K){return x((H,z=null,se)=>oe(q=>Y(q)&&H.call(z,q),null,se),K)}C.filter=O;function T(oe){return oe}C.signal=T;function N(...oe){return(Y,K=null,H)=>{const z=(0,y.combinedDisposable)(...oe.map(se=>se(q=>Y.call(K,q))));return R(z,H)}}C.any=N;function P(oe,Y,K,H){let z=K;return M(oe,se=>(z=Y(z,se),z),H)}C.reduce=P;function x(oe,Y){let K;const H={onWillAddFirstListener(){K=oe(z.fire,z)},onDidRemoveLastListener(){K?.dispose()}};Y||w(H);const z=new f(H);return Y?.add(z),z.event}function R(oe,Y){return Y instanceof Array?Y.push(oe):Y&&Y.add(oe),oe}function B(oe,Y,K=100,H=!1,z=!1,se,q){let ae,ce,ge,pe=0,me;const ve={leakWarningThreshold:se,onWillAddFirstListener(){ae=oe(Se=>{pe++,ce=Y(ce,Se),H&&!ge&&(Ce.fire(ce),ce=void 0),me=()=>{const _e=ce;ce=void 0,ge=void 0,(!H||pe>1)&&Ce.fire(_e),pe=0},typeof K=="number"?(clearTimeout(ge),ge=setTimeout(me,K)):ge===void 0&&(ge=0,queueMicrotask(me))})},onWillRemoveListener(){z&&pe>0&&me?.()},onDidRemoveLastListener(){me=void 0,ae.dispose()}};q||w(ve);const Ce=new f(ve);return q?.add(Ce),Ce.event}C.debounce=B;function W(oe,Y=0,K){return C.debounce(oe,(H,z)=>H?(H.push(z),H):[z],Y,void 0,!0,void 0,K)}C.accumulate=W;function V(oe,Y=(H,z)=>H===z,K){let H=!0,z;return O(oe,se=>{const q=H||!Y(se,z);return H=!1,z=se,q},K)}C.latch=V;function U(oe,Y,K){return[C.filter(oe,Y,K),C.filter(oe,H=>!Y(H),K)]}C.split=U;function F(oe,Y=!1,K=[],H){let z=K.slice(),se=oe(ce=>{z?z.push(ce):ae.fire(ce)});H&&H.add(se);const q=()=>{z?.forEach(ce=>ae.fire(ce)),z=null},ae=new f({onWillAddFirstListener(){se||(se=oe(ce=>ae.fire(ce)),H&&H.add(se))},onDidAddFirstListener(){z&&(Y?setTimeout(q):q())},onDidRemoveLastListener(){se&&se.dispose(),se=null}});return H&&H.add(ae),ae.event}C.buffer=F;function j(oe,Y){return(H,z,se)=>{const q=Y(new le);return oe(function(ae){const ce=q.evaluate(ae);ce!==J&&H.call(z,ce)},void 0,se)}}C.chain=j;const J=Symbol("HaltChainable");class le{constructor(){this.steps=[]}map(Y){return this.steps.push(Y),this}forEach(Y){return this.steps.push(K=>(Y(K),K)),this}filter(Y){return this.steps.push(K=>Y(K)?K:J),this}reduce(Y,K){let H=K;return this.steps.push(z=>(H=Y(H,z),H)),this}latch(Y=(K,H)=>K===H){let K=!0,H;return this.steps.push(z=>{const se=K||!Y(z,H);return K=!1,H=z,se?z:J}),this}evaluate(Y){for(const K of this.steps)if(Y=K(Y),Y===J)break;return Y}}function ee(oe,Y,K=H=>H){const H=(...ae)=>q.fire(K(...ae)),z=()=>oe.on(Y,H),se=()=>oe.removeListener(Y,H),q=new f({onWillAddFirstListener:z,onDidRemoveLastListener:se});return q.event}C.fromNodeEventEmitter=ee;function $(oe,Y,K=H=>H){const H=(...ae)=>q.fire(K(...ae)),z=()=>oe.addEventListener(Y,H),se=()=>oe.removeEventListener(Y,H),q=new f({onWillAddFirstListener:z,onDidRemoveLastListener:se});return q.event}C.fromDOMEventEmitter=$;function te(oe){return new Promise(Y=>I(oe)(Y))}C.toPromise=te;function G(oe){const Y=new f;return oe.then(K=>{Y.fire(K)},()=>{Y.fire(void 0)}).finally(()=>{Y.dispose()}),Y.event}C.fromPromise=G;function de(oe,Y,K){return Y(K),oe(H=>Y(H))}C.runAndSubscribe=de;function ue(oe,Y){let K=null;function H(se){K?.dispose(),K=new y.DisposableStore,Y(se,K)}H(void 0);const z=oe(se=>H(se));return(0,y.toDisposable)(()=>{z.dispose(),K?.dispose()})}C.runAndSubscribeWithStore=ue;class X{constructor(Y,K){this._observable=Y,this._counter=0,this._hasChanged=!1;const H={onWillAddFirstListener:()=>{Y.addObserver(this)},onDidRemoveLastListener:()=>{Y.removeObserver(this)}};K||w(H),this.emitter=new f(H),K&&K.add(this.emitter)}beginUpdate(Y){this._counter++}handlePossibleChange(Y){}handleChange(Y,K){this._hasChanged=!0}endUpdate(Y){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Z(oe,Y){return new X(oe,Y).emitter.event}C.fromObservable=Z;function re(oe){return(Y,K,H)=>{let z=0,se=!1;const q={beginUpdate(){z++},endUpdate(){z--,z===0&&(oe.reportChanges(),se&&(se=!1,Y.call(K)))},handlePossibleChange(){},handleChange(){se=!0}};oe.addObserver(q),oe.reportChanges();const ae={dispose(){oe.removeObserver(q)}};return H instanceof y.DisposableStore?H.add(ae):Array.isArray(H)&&H.push(ae),ae}}C.fromObservableLight=re})(v||(e.Event=v={}));class b{constructor(w){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${w}_${b._idPool++}`,b.all.add(this)}start(w){this._stopWatch=new _.StopWatch,this.listenerCount=w}stop(){if(this._stopWatch){const w=this._stopWatch.elapsed();this.durations.push(w),this.elapsedOverall+=w,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=b,b.all=new Set,b._idPool=0;let o=-1;class i{constructor(w,D=Math.random().toString(18).slice(2,5)){this.threshold=w,this.name=D,this._warnCountdown=0}dispose(){var w;(w=this._stacks)===null||w===void 0||w.clear()}check(w,D){const I=this.threshold;if(I<=0||D{const A=this._stacks.get(w.value)||0;this._stacks.set(w.value,A-1)}}}class n{static create(){var w;return new n((w=new Error().stack)!==null&&w!==void 0?w:"")}constructor(w){this.value=w}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class t{constructor(w){this.value=w}}const a=2,u=(C,w)=>{if(C instanceof t)w(C);else for(let D=0;D0||!((D=this._options)===null||D===void 0)&&D.leakWarningThreshold?new i((M=(I=this._options)===null||I===void 0?void 0:I.leakWarningThreshold)!==null&&M!==void 0?M:o):void 0,this._perfMon=!((A=this._options)===null||A===void 0)&&A._profName?new b(this._options._profName):void 0,this._deliveryQueue=(O=this._options)===null||O===void 0?void 0:O.deliveryQueue}dispose(){var w,D,I,M;if(!this._disposed){if(this._disposed=!0,((w=this._deliveryQueue)===null||w===void 0?void 0:w.current)===this&&this._deliveryQueue.reset(),this._listeners){if(p){const A=this._listeners;queueMicrotask(()=>{u(A,O=>{var T;return(T=O.stack)===null||T===void 0?void 0:T.print()})})}this._listeners=void 0,this._size=0}(I=(D=this._options)===null||D===void 0?void 0:D.onDidRemoveLastListener)===null||I===void 0||I.call(D),(M=this._leakageMon)===null||M===void 0||M.dispose()}}get event(){var w;return(w=this._event)!==null&&w!==void 0||(this._event=(D,I,M)=>{var A,O,T,N,P;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),y.Disposable.None;if(this._disposed)return y.Disposable.None;I&&(D=D.bind(I));const x=new t(D);let R,B;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(x.stack=n.create(),R=this._leakageMon.check(x.stack,this._size+1)),p&&(x.stack=B??n.create()),this._listeners?this._listeners instanceof t?((P=this._deliveryQueue)!==null&&P!==void 0||(this._deliveryQueue=new d),this._listeners=[this._listeners,x]):this._listeners.push(x):((O=(A=this._options)===null||A===void 0?void 0:A.onWillAddFirstListener)===null||O===void 0||O.call(A,this),this._listeners=x,(N=(T=this._options)===null||T===void 0?void 0:T.onDidAddFirstListener)===null||N===void 0||N.call(T,this)),this._size++;const W=(0,y.toDisposable)(()=>{R?.(),this._removeListener(x)});return M instanceof y.DisposableStore?M.add(W):Array.isArray(M)&&M.push(W),W}),this._event}_removeListener(w){var D,I,M,A;if((I=(D=this._options)===null||D===void 0?void 0:D.onWillRemoveListener)===null||I===void 0||I.call(D,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(A=(M=this._options)===null||M===void 0?void 0:M.onDidRemoveLastListener)===null||A===void 0||A.call(M,this),this._size=0;return}const O=this._listeners,T=O.indexOf(w);if(T===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,O[T]=void 0;const N=this._deliveryQueue.current===this;if(this._size*a<=O.length){let P=0;for(let x=0;x0}}e.Emitter=f;const c=()=>new d;e.createEventDeliveryQueue=c;class d{constructor(){this.i=-1,this.end=0}enqueue(w,D,I){this.i=0,this.end=I,this.current=w,this.value=D}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class r extends f{constructor(w){super(w),this._isPaused=0,this._eventQueue=new E.LinkedList,this._mergeFn=w?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const w=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(w))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(w){this._size&&(this._isPaused!==0?this._eventQueue.push(w):super.fire(w))}}e.PauseableEmitter=r;class l extends r{constructor(w){var D;super(w),this._delay=(D=w.delay)!==null&&D!==void 0?D:100}fire(w){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(w)}}e.DebounceEmitter=l;class s extends f{constructor(w){super(w),this._queuedEvents=[],this._mergeFn=w?.merge}fire(w){this.hasListeners()&&(this._queuedEvents.push(w),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(D=>super.fire(D)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=s;class g{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(w){const D={event:w,listener:null};this.events.push(D),this.hasListeners&&this.hook(D);const I=()=>{this.hasListeners&&this.unhook(D);const M=this.events.indexOf(D);this.events.splice(M,1)};return(0,y.toDisposable)((0,k.createSingleCallFunction)(I))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(w=>this.hook(w))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(w=>this.unhook(w))}hook(w){w.listener=w.event(D=>this.emitter.fire(D))}unhook(w){w.listener&&w.listener.dispose(),w.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=g;class h{constructor(){this.buffers=[]}wrapEvent(w){return(D,I,M)=>w(A=>{const O=this.buffers[this.buffers.length-1];O?O.push(()=>D.call(I,A)):D.call(I,A)},void 0,M)}bufferEvents(w){const D=[];this.buffers.push(D);const I=w();return this.buffers.pop(),D.forEach(M=>M()),I}}e.EventBufferer=h;class m{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=y.Disposable.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(w){this.inputEvent=w,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=w(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=m}),define(ie[54],ne([1,0,48,6,2]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getZoomFactor=e.PixelRatio=e.addMatchMediaChangeListener=void 0;class E{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}E.INSTANCE=new E;class _ extends y.Disposable{constructor(){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(a){var u;(u=this._mediaQueryList)===null||u===void 0||u.removeEventListener("change",this._listener),this._mediaQueryList=L.$window.matchMedia(`(resolution: ${L.$window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),a&&this._onDidChange.fire()}}class p extends y.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const a=this._register(new _);this._register(a.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const a=document.createElement("canvas").getContext("2d"),u=L.$window.devicePixelRatio||1,f=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1;return u/f}}class S{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,y.markAsSingleton)(new p)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function v(t,a){typeof t=="string"&&(t=L.$window.matchMedia(t)),t.addEventListener("change",a)}e.addMatchMediaChangeListener=v,e.PixelRatio=new S;function b(){return E.INSTANCE.getZoomFactor()}e.getZoomFactor=b;const o=navigator.userAgent;e.isFirefox=o.indexOf("Firefox")>=0,e.isWebKit=o.indexOf("AppleWebKit")>=0,e.isChrome=o.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&o.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=o.indexOf("Electron/")>=0,e.isAndroid=o.indexOf("Android")>=0;let i=!1;if(L.$window.matchMedia){const t=L.$window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),a=L.$window.matchMedia("(display-mode: fullscreen)");i=t.matches,v(t,({matches:u})=>{i&&a.matches||(i=u)})}function n(){return i}e.isStandalone=n}),define(ie[83],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class k{get event(){return this.emitter.event}constructor(E,_,p){const S=v=>this.emitter.fire(v);this.emitter=new L.Emitter({onWillAddFirstListener:()=>E.addEventListener(_,S,p),onDidRemoveLastListener:()=>E.removeEventListener(_,S,p)})}dispose(){this.emitter.dispose()}}e.DomEmitter=k}),define(ie[19],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const k=Object.freeze(function(p,S){const v=setTimeout(p.bind(S),0);return{dispose(){clearTimeout(v)}}});var y;(function(p){function S(v){return v===p.None||v===p.Cancelled||v instanceof E?!0:!v||typeof v!="object"?!1:typeof v.isCancellationRequested=="boolean"&&typeof v.onCancellationRequested=="function"}p.isCancellationToken=S,p.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:L.Event.None}),p.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:k})})(y||(e.CancellationToken=y={}));class E{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?k:(this._emitter||(this._emitter=new L.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class _{constructor(S){this._token=void 0,this._parentListener=void 0,this._parentListener=S&&S.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new E),this._token}cancel(){this._token?this._token instanceof E&&this._token.cancel():this._token=y.Cancelled}dispose(S=!1){var v;S&&this.cancel(),(v=this._parentListener)===null||v===void 0||v.dispose(),this._token?this._token instanceof E&&this._token.dispose():this._token=y.None}}e.CancellationTokenSource=_}),define(ie[267],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IME=e.IMEImpl=void 0;class k{constructor(){this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}e.IMEImpl=k,e.IME=new k}),define(ie[145],ne([1,0,6,2]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class y{constructor(n,t,a,u,f,c,d){this._forceIntegerValues=n,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,a=a|0,u=u|0,f=f|0,c=c|0,d=d|0),this.rawScrollLeft=u,this.rawScrollTop=d,t<0&&(t=0),u+t>a&&(u=a-t),u<0&&(u=0),f<0&&(f=0),d+f>c&&(d=c-f),d<0&&(d=0),this.width=t,this.scrollWidth=a,this.scrollLeft=u,this.height=f,this.scrollHeight=c,this.scrollTop=d}equals(n){return this.rawScrollLeft===n.rawScrollLeft&&this.rawScrollTop===n.rawScrollTop&&this.width===n.width&&this.scrollWidth===n.scrollWidth&&this.scrollLeft===n.scrollLeft&&this.height===n.height&&this.scrollHeight===n.scrollHeight&&this.scrollTop===n.scrollTop}withScrollDimensions(n,t){return new y(this._forceIntegerValues,typeof n.width<"u"?n.width:this.width,typeof n.scrollWidth<"u"?n.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof n.height<"u"?n.height:this.height,typeof n.scrollHeight<"u"?n.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(n){return new y(this._forceIntegerValues,this.width,this.scrollWidth,typeof n.scrollLeft<"u"?n.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof n.scrollTop<"u"?n.scrollTop:this.rawScrollTop)}createScrollEvent(n,t){const a=this.width!==n.width,u=this.scrollWidth!==n.scrollWidth,f=this.scrollLeft!==n.scrollLeft,c=this.height!==n.height,d=this.scrollHeight!==n.scrollHeight,r=this.scrollTop!==n.scrollTop;return{inSmoothScrolling:t,oldWidth:n.width,oldScrollWidth:n.scrollWidth,oldScrollLeft:n.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:n.height,oldScrollHeight:n.scrollHeight,oldScrollTop:n.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:a,scrollWidthChanged:u,scrollLeftChanged:f,heightChanged:c,scrollHeightChanged:d,scrollTopChanged:r}}}e.ScrollState=y;class E extends k.Disposable{constructor(n){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new L.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=n.smoothScrollDuration,this._scheduleAtNextAnimationFrame=n.scheduleAtNextAnimationFrame,this._state=new y(n.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(n){this._smoothScrollDuration=n}validateScrollPosition(n){return this._state.withScrollPosition(n)}getScrollDimensions(){return this._state}setScrollDimensions(n,t){var a;const u=this._state.withScrollDimensions(n,t);this._setState(u,!!this._smoothScrolling),(a=this._smoothScrolling)===null||a===void 0||a.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(n){const t=this._state.withScrollPosition(n);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(n,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(n);if(this._smoothScrolling){n={scrollLeft:typeof n.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:n.scrollLeft,scrollTop:typeof n.scrollTop>"u"?this._smoothScrolling.to.scrollTop:n.scrollTop};const a=this._state.withScrollPosition(n);if(this._smoothScrolling.to.scrollLeft===a.scrollLeft&&this._smoothScrolling.to.scrollTop===a.scrollTop)return;let u;t?u=new v(this._smoothScrolling.from,a,this._smoothScrolling.startTime,this._smoothScrolling.duration):u=this._smoothScrolling.combine(this._state,a,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=u}else{const a=this._state.withScrollPosition(n);this._smoothScrolling=v.start(this._state,a,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const n=this._smoothScrolling.tick(),t=this._state.withScrollPosition(n);if(this._setState(t,!0),!!this._smoothScrolling){if(n.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(n,t){const a=this._state;a.equals(n)||(this._state=n,this._onScroll.fire(this._state.createScrollEvent(a,t)))}}e.Scrollable=E;class _{constructor(n,t,a){this.scrollLeft=n,this.scrollTop=t,this.isDone=a}}e.SmoothScrollingUpdate=_;function p(i,n){const t=n-i;return function(a){return i+t*o(a)}}function S(i,n,t){return function(a){return a2.5*a){let f,c;return n=ae.length?ce:ae[pe]})}e.format=p;function S(q){return q.replace(/[<>&]/g,function(ae){switch(ae){case"<":return"<";case">":return">";case"&":return"&";default:return ae}})}e.escape=S;function v(q){return q.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=v;function b(q,ae=" "){const ce=o(q,ae);return i(ce,ae)}e.trim=b;function o(q,ae){if(!q||!ae)return q;const ce=ae.length;if(ce===0||q.length===0)return q;let ge=0;for(;q.indexOf(ae,ge)===ge;)ge=ge+ce;return q.substring(ge)}e.ltrim=o;function i(q,ae){if(!q||!ae)return q;const ce=ae.length,ge=q.length;if(ce===0||ge===0)return q;let pe=ge,me=-1;for(;me=q.lastIndexOf(ae,pe-1),!(me===-1||me+ce!==pe);){if(me===0)return"";pe=me}return q.substring(0,pe)}e.rtrim=i;function n(q){return q.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=n;function t(q){return q.replace(/\*/g,"")}e.stripWildcards=t;function a(q,ae,ce={}){if(!q)throw new Error("Cannot create regex from empty string");ae||(q=v(q)),ce.wholeWord&&(/\B/.test(q.charAt(0))||(q="\\b"+q),/\B/.test(q.charAt(q.length-1))||(q=q+"\\b"));let ge="";return ce.global&&(ge+="g"),ce.matchCase||(ge+="i"),ce.multiline&&(ge+="m"),ce.unicode&&(ge+="u"),new RegExp(q,ge)}e.createRegExp=a;function u(q){return q.source==="^"||q.source==="^$"||q.source==="$"||q.source==="^\\s*$"?!1:!!(q.exec("")&&q.lastIndex===0)}e.regExpLeadsToEndlessLoop=u;function f(q){return q.split(/\r\n|\r|\n/)}e.splitLines=f;function c(q){for(let ae=0,ce=q.length;ae=0;ce--){const ge=q.charCodeAt(ce);if(ge!==32&&ge!==9)return ce}return-1}e.lastNonWhitespaceIndex=r;function l(q,ae){return qae?1:0}e.compare=l;function s(q,ae,ce=0,ge=q.length,pe=0,me=ae.length){for(;ce_e)return 1}const ve=ge-ce,Ce=me-pe;return veCe?1:0}e.compareSubstring=s;function g(q,ae){return h(q,ae,0,q.length,0,ae.length)}e.compareIgnoreCase=g;function h(q,ae,ce=0,ge=q.length,pe=0,me=ae.length){for(;ce=128||_e>=128)return s(q.toLowerCase(),ae.toLowerCase(),ce,ge,pe,me);C(Se)&&(Se-=32),C(_e)&&(_e-=32);const Te=Se-_e;if(Te!==0)return Te}const ve=ge-ce,Ce=me-pe;return veCe?1:0}e.compareSubstringIgnoreCase=h;function m(q){return q>=48&&q<=57}e.isAsciiDigit=m;function C(q){return q>=97&&q<=122}e.isLowerAsciiLetter=C;function w(q){return q>=65&&q<=90}e.isUpperAsciiLetter=w;function D(q,ae){return q.length===ae.length&&h(q,ae)===0}e.equalsIgnoreCase=D;function I(q,ae){const ce=ae.length;return ae.length>q.length?!1:h(q,ae,0,ce)===0}e.startsWithIgnoreCase=I;function M(q,ae){const ce=Math.min(q.length,ae.length);let ge;for(ge=0;ge1){const ge=q.charCodeAt(ae-2);if(O(ge))return N(ge,ce)}return ce}class R{get offset(){return this._offset}constructor(ae,ce=0){this._str=ae,this._len=ae.length,this._offset=ce}setOffset(ae){this._offset=ae}prevCodePoint(){const ae=x(this._str,this._offset);return this._offset-=ae>=65536?2:1,ae}nextCodePoint(){const ae=P(this._str,this._len,this._offset);return this._offset+=ae>=65536?2:1,ae}eol(){return this._offset>=this._len}}e.CodePointIterator=R;class B{get offset(){return this._iterator.offset}constructor(ae,ce=0){this._iterator=new R(ae,ce)}nextGraphemeLength(){const ae=re.getInstance(),ce=this._iterator,ge=ce.offset;let pe=ae.getGraphemeBreakType(ce.nextCodePoint());for(;!ce.eol();){const me=ce.offset,ve=ae.getGraphemeBreakType(ce.nextCodePoint());if(Z(pe,ve)){ce.setOffset(me);break}pe=ve}return ce.offset-ge}prevGraphemeLength(){const ae=re.getInstance(),ce=this._iterator,ge=ce.offset;let pe=ae.getGraphemeBreakType(ce.prevCodePoint());for(;ce.offset>0;){const me=ce.offset,ve=ae.getGraphemeBreakType(ce.prevCodePoint());if(Z(ve,pe)){ce.setOffset(me);break}pe=ve}return ge-ce.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=B;function W(q,ae){return new B(q,ae).nextGraphemeLength()}e.nextCharLength=W;function V(q,ae){return new B(q,ae).prevGraphemeLength()}e.prevCharLength=V;function U(q,ae){ae>0&&T(q.charCodeAt(ae))&&ae--;const ce=ae+W(q,ae);return[ce-V(q,ce),ce]}e.getCharContainingOffset=U;let F;function j(){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 J(q){return F||(F=j()),F.test(q)}e.containsRTL=J;const le=/^[\t\n\r\x20-\x7E]*$/;function ee(q){return le.test(q)}e.isBasicASCII=ee,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function $(q){return e.UNUSUAL_LINE_TERMINATORS.test(q)}e.containsUnusualLineTerminators=$;function te(q){return q>=11904&&q<=55215||q>=63744&&q<=64255||q>=65281&&q<=65374}e.isFullWidthCharacter=te;function G(q){return q>=127462&&q<=127487||q===8986||q===8987||q===9200||q===9203||q>=9728&&q<=10175||q===11088||q===11093||q>=127744&&q<=128591||q>=128640&&q<=128764||q>=128992&&q<=129008||q>=129280&&q<=129535||q>=129648&&q<=129782}e.isEmojiImprecise=G,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function de(q){return!!(q&&q.length>0&&q.charCodeAt(0)===65279)}e.startsWithUTF8BOM=de;function ue(q,ae=!1){return q?(ae&&(q=q.replace(/\\./g,"")),q.toLowerCase()!==q):!1}e.containsUppercaseCharacter=ue;function X(q){return q=q%(2*26),q<26?String.fromCharCode(97+q):String.fromCharCode(65+q-26)}e.singleLetterHash=X;function Z(q,ae){return q===0?ae!==5&&ae!==7:q===2&&ae===3?!1:q===4||q===2||q===3||ae===4||ae===2||ae===3?!0:!(q===8&&(ae===8||ae===9||ae===11||ae===12)||(q===11||q===9)&&(ae===9||ae===10)||(q===12||q===10)&&ae===10||ae===5||ae===13||ae===7||q===1||q===13&&ae===14||q===6&&ae===6)}class re{static getInstance(){return re._INSTANCE||(re._INSTANCE=new re),re._INSTANCE}constructor(){this._data=oe()}getGraphemeBreakType(ae){if(ae<32)return ae===10?3:ae===13?2:4;if(ae<127)return 0;const ce=this._data,ge=ce.length/3;let pe=1;for(;pe<=ge;)if(aece[3*pe+1])pe=2*pe+1;else return ce[3*pe+2];return 0}}re._INSTANCE=null;function oe(){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 Y(q,ae){if(q===0)return 0;const ce=K(q,ae);if(ce!==void 0)return ce;const ge=new R(ae,q);return ge.prevCodePoint(),ge.offset}e.getLeftDeleteOffset=Y;function K(q,ae){const ce=new R(ae,q);let ge=ce.prevCodePoint();for(;H(ge)||ge===65039||ge===8419;){if(ce.offset===0)return;ge=ce.prevCodePoint()}if(!G(ge))return;let pe=ce.offset;return pe>0&&ce.prevCodePoint()===8205&&(pe=ce.offset),pe}function H(q){return 127995<=q&&q<=127999}e.noBreakWhitespace="\xA0";class z{static getInstance(ae){return y.cache.get(Array.from(ae))}static getLocales(){return y._locales.value}constructor(ae){this.confusableDictionary=ae}isAmbiguous(ae){return this.confusableDictionary.has(ae)}getPrimaryConfusable(ae){return this.confusableDictionary.get(ae)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=z,y=z,z.ambiguousCharacterData=new k.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,119846,109],"_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]}')),z.cache=new L.LRUCachedFunction(q=>{function ae(_e){const Te=new Map;for(let Me=0;Me<_e.length;Me+=2)Te.set(_e[Me],_e[Me+1]);return Te}function ce(_e,Te){const Me=new Map(_e);for(const[Pe,Be]of Te)Me.set(Pe,Be);return Me}function ge(_e,Te){if(!_e)return Te;const Me=new Map;for(const[Pe,Be]of _e)Te.has(Pe)&&Me.set(Pe,Be);return Me}const pe=y.ambiguousCharacterData.value;let me=q.filter(_e=>!_e.startsWith("_")&&_e in pe);me.length===0&&(me=["_default"]);let ve;for(const _e of me){const Te=ae(pe[_e]);ve=ge(ve,Te)}const Ce=ae(pe._common),Se=ce(Ce,ve);return new y(Se)}),z._locales=new k.Lazy(()=>Object.keys(y.ambiguousCharacterData.value).filter(q=>!q.startsWith("_")));class se{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(se.getRawData())),this._data}static isInvisibleCharacter(ae){return se.getData().has(ae)}static get codePoints(){return se.getData()}}e.InvisibleCharacters=se,se._data=void 0}),define(ie[71],ne([1,0,53,396,12]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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 E(...q){return function(ae,ce){for(let ge=0,pe=q.length;ge0?[{start:0,end:ae.length}]:[]:null}function p(q,ae){const ce=ae.toLowerCase().indexOf(q.toLowerCase());return ce===-1?null:[{start:ce,end:ce+q.length}]}e.matchesContiguousSubString=p;function S(q,ae){return v(q.toLowerCase(),ae.toLowerCase(),0,0)}e.matchesSubString=S;function v(q,ae,ce,ge){if(ce===q.length)return[];if(ge===ae.length)return null;if(q[ce]===ae[ge]){let pe=null;return(pe=v(q,ae,ce+1,ge+1))?r({start:ge,end:ge+1},pe):null}return v(q,ae,ce,ge+1)}function b(q){return 97<=q&&q<=122}function o(q){return 65<=q&&q<=90}e.isUpper=o;function i(q){return 48<=q&&q<=57}function n(q){return q===32||q===9||q===10||q===13}const t=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(q=>t.add(q.charCodeAt(0)));function a(q){return n(q)||t.has(q)}function u(q,ae){return q===ae||a(q)&&a(ae)}const f=new Map;function c(q){if(f.has(q))return f.get(q);let ae;const ce=(0,k.getKoreanAltChars)(q);return ce&&(ae=ce),f.set(q,ae),ae}function d(q){return b(q)||o(q)||i(q)}function r(q,ae){return ae.length===0?ae=[q]:q.end===ae[0].start?ae[0].start=q.start:ae.unshift(q),ae}function l(q,ae){for(let ce=ae;ce0&&!d(q.charCodeAt(ce-1)))return ce}return q.length}function s(q,ae,ce,ge){if(ce===q.length)return[];if(ge===ae.length)return null;if(q[ce]!==ae[ge].toLowerCase())return null;{let pe=null,me=ge+1;for(pe=s(q,ae,ce+1,ge+1);!pe&&(me=l(ae,me)).6}function m(q){const{upperPercent:ae,lowerPercent:ce,alphaPercent:ge,numericPercent:pe}=q;return ce>.2&&ae<.8&&ge>.6&&pe<.2}function C(q){let ae=0,ce=0,ge=0,pe=0;for(let me=0;me60)return null;const ce=g(ae);if(!m(ce)){if(!h(ce))return null;ae=ae.toLowerCase()}let ge=null,pe=0;for(q=q.toLowerCase();pe0&&a(q.charCodeAt(ce-1)))return ce;return q.length}const A=E(e.matchesPrefix,w,p),O=E(e.matchesPrefix,w,S),T=new L.LRUCache(1e4);function N(q,ae,ce=!1){if(typeof q!="string"||typeof ae!="string")return null;let ge=T.get(q);ge||(ge=new RegExp(y.convertSimple2RegExpPattern(q),"i"),T.set(q,ge));const pe=ge.exec(ae);return pe?[{start:pe.index,end:pe.index+pe[0].length}]:ce?O(q,ae):A(q,ae)}e.matchesFuzzy=N;function P(q,ae){const ce=oe(q,q.toLowerCase(),0,ae,ae.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return ce?R(ce):null}e.matchesFuzzy2=P;function x(q,ae,ce,ge,pe,me){const ve=Math.min(13,q.length);for(;ce"u")return[];const ae=[],ce=q[1];for(let ge=q.length-1;ge>1;ge--){const pe=q[ge]+ce,me=ae[ae.length-1];me&&me.end===pe?me.end=pe+1:ae.push({start:pe,end:pe+1})}return ae}e.createMatches=R;const B=128;function W(){const q=[],ae=[];for(let ce=0;ce<=B;ce++)ae[ce]=0;for(let ce=0;ce<=B;ce++)q.push(ae.slice(0));return q}function V(q){const ae=[];for(let ce=0;ce<=q;ce++)ae[ce]=0;return ae}const U=V(2*B),F=V(2*B),j=W(),J=W(),le=W(),ee=!1;function $(q,ae,ce,ge,pe){function me(Ce,Se,_e=" "){for(;Ce.lengthme(Ce,3)).join("|")} `;for(let Ce=0;Ce<=ce;Ce++)Ce===0?ve+=" |":ve+=`${ae[Ce-1]}|`,ve+=q[Ce].slice(0,pe+1).map(Se=>me(Se.toString(),3)).join("|")+` `;return ve}function te(q,ae,ce,ge){q=q.substr(ae),ce=ce.substr(ge),console.log($(J,q,q.length,ce,ce.length)),console.log($(le,q,q.length,ce,ce.length)),console.log($(j,q,q.length,ce,ce.length))}function G(q,ae){if(ae<0||ae>=q.length)return!1;const ce=q.codePointAt(ae);switch(ce){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!!y.isEmojiImprecise(ce)}}function de(q,ae){if(ae<0||ae>=q.length)return!1;switch(q.charCodeAt(ae)){case 32:case 9:return!0;default:return!1}}function ue(q,ae,ce){return ae[q]!==ce[q]}function X(q,ae,ce,ge,pe,me,ve=!1){for(;aeB?B:q.length,Se=ge.length>B?B:ge.length;if(ce>=Ce||me>=Se||Ce-ce>Se-me||!X(ae,ce,Ce,pe,me,Se,!0))return;Y(Ce,Se,ce,me,ae,pe);let _e=1,Te=1,Me=ce,Pe=me;const Be=[!1];for(_e=1,Me=ce;Meke,nt=ot?J[_e][Te-1]+(j[_e][Te-1]>0?-5:0):0,rt=Pe>ke+1&&j[_e][Te-1]>0,Qe=rt?J[_e][Te-2]+(j[_e][Te-2]>0?-5:0):0;if(rt&&(!ot||Qe>=nt)&&(!je||Qe>=st))J[_e][Te]=Qe,le[_e][Te]=3,j[_e][Te]=0;else if(ot&&(!je||nt>=st))J[_e][Te]=nt,le[_e][Te]=2,j[_e][Te]=0;else if(je)J[_e][Te]=st,le[_e][Te]=1,j[_e][Te]=j[_e-1][Te-1]+1;else throw new Error("not possible")}}if(ee&&te(q,ce,ge,me),!Be[0]&&!ve.firstMatchCanBeWeak)return;_e--,Te--;const Le=[J[_e][Te],me];let Ne=0,fe=0;for(;_e>=1;){let ke=Te;do{const Re=le[_e][ke];if(Re===3)ke=ke-2;else if(Re===2)ke=ke-1;else break}while(ke>=1);Ne>1&&ae[ce+_e-1]===pe[me+Te-1]&&!ue(ke+me-1,ge,pe)&&Ne+1>j[_e][ke]&&(ke=Te),ke===Te?Ne++:Ne=1,fe||(fe=ke),_e--,Te=ke-1,Le.push(Te)}Se===Ce&&ve.boostFullMatch&&(Le[0]+=2);const be=fe-Ce;return Le[0]-=be,Le}e.fuzzyScore=oe;function Y(q,ae,ce,ge,pe,me){let ve=q-1,Ce=ae-1;for(;ve>=ce&&Ce>=ge;)pe[ve]===me[Ce]&&(F[ve]=Ce,ve--),Ce--}function K(q,ae,ce,ge,pe,me,ve,Ce,Se,_e,Te){if(ae[ce]!==me[ve])return Number.MIN_SAFE_INTEGER;let Me=1,Pe=!1;return ve===ce-ge?Me=q[ce]===pe[ve]?7:5:ue(ve,pe,me)&&(ve===0||!ue(ve-1,pe,me))?(Me=q[ce]===pe[ve]?7:5,Pe=!0):G(me,ve)&&(ve===0||!G(me,ve-1))?Me=5:(G(me,ve-1)||de(me,ve-1))&&(Me=5,Pe=!0),Me>1&&ce===ge&&(Te[0]=!0),Pe||(Pe=ue(ve,pe,me)||G(me,ve-1)||de(me,ve-1)),ce===ge?ve>Se&&(Me-=Pe?3:5):_e?Me+=Pe?2:0:Me+=Pe?0:1,ve+1===Ce&&(Me-=Pe?3:5),Me}function H(q,ae,ce,ge,pe,me,ve){return z(q,ae,ce,ge,pe,me,!0,ve)}e.fuzzyScoreGracefulAggressive=H;function z(q,ae,ce,ge,pe,me,ve,Ce){let Se=oe(q,ae,ce,ge,pe,me,Ce);if(Se&&!ve)return Se;if(q.length>=3){const _e=Math.min(7,q.length-1);for(let Te=ce+1;Te<_e;Te++){const Me=se(q,Te);if(Me){const Pe=oe(Me,Me.toLowerCase(),ce,ge,pe,me,Ce);Pe&&(Pe[0]-=3,(!Se||Pe[0]>Se[0])&&(Se=Pe))}}}return Se}function se(q,ae){if(ae+1>=q.length)return;const ce=q[ae],ge=q[ae+1];if(ce!==ge)return q.slice(0,ae)+ge+ce+q.slice(ae+2)}}),define(ie[122],ne([1,0,12]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function k(a){return y(a,0)}e.hash=k;function y(a,u){switch(typeof a){case"object":return a===null?E(349,u):Array.isArray(a)?S(a,u):v(a,u);case"string":return p(a,u);case"boolean":return _(a,u);case"number":return E(a,u);case"undefined":return E(937,u);default:return E(617,u)}}e.doHash=y;function E(a,u){return(u<<5)-u+a|0}e.numberHash=E;function _(a,u){return E(a?433:863,u)}function p(a,u){u=E(149417,u);for(let f=0,c=a.length;fy(c,f),u)}function v(a,u){return u=E(181387,u),Object.keys(a).sort().reduce((f,c)=>(f=p(c,f),y(a[c],f)),u)}function b(a,u,f=32){const c=f-u,d=~((1<>>c)>>>0}function o(a,u=0,f=a.byteLength,c=0){for(let d=0;df.toString(16).padStart(2,"0")).join(""):i((a>>>0).toString(16),u/4)}e.toHexString=n;class t{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(u){const f=u.length;if(f===0)return;const c=this._buff;let d=this._buffLen,r=this._leftoverHighSurrogate,l,s;for(r!==0?(l=r,s=-1,r=0):(l=u.charCodeAt(0),s=0);;){let g=l;if(L.isHighSurrogate(l))if(s+1>>6,u[f++]=128|(c&63)>>>0):c<65536?(u[f++]=224|(c&61440)>>>12,u[f++]=128|(c&4032)>>>6,u[f++]=128|(c&63)>>>0):(u[f++]=240|(c&1835008)>>>18,u[f++]=128|(c&258048)>>>12,u[f++]=128|(c&4032)>>>6,u[f++]=128|(c&63)>>>0),f>=64&&(this._step(),f-=64,this._totalLen+=64,u[0]=u[64+0],u[1]=u[64+1],u[2]=u[64+2]),f}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()),n(this._h0)+n(this._h1)+n(this._h2)+n(this._h3)+n(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,o(this._buff,this._buffLen),this._buffLen>56&&(this._step(),o(this._buff));const u=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(u/4294967296),!1),this._buffDV.setUint32(60,u%4294967296,!1),this._step()}_step(){const u=t._bigBlock32,f=this._buffDV;for(let C=0;C<64;C+=4)u.setUint32(C,f.getUint32(C,!1),!1);for(let C=64;C<320;C+=4)u.setUint32(C,b(u.getUint32(C-12,!1)^u.getUint32(C-32,!1)^u.getUint32(C-56,!1)^u.getUint32(C-64,!1),1),!1);let c=this._h0,d=this._h1,r=this._h2,l=this._h3,s=this._h4,g,h,m;for(let C=0;C<80;C++)C<20?(g=d&r|~d&l,h=1518500249):C<40?(g=d^r^l,h=1859775393):C<60?(g=d&r|d&l|r&l,h=2400959708):(g=d^r^l,h=3395469782),m=b(c,5)+g+s+h+u.getUint32(C*4,!1)&4294967295,s=l,l=r,r=b(d,30),d=c,c=m;this._h0=this._h0+c&4294967295,this._h1=this._h1+d&4294967295,this._h2=this._h2+r&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+s&4294967295}}e.StringSHA1=t,t._bigBlock32=new DataView(new ArrayBuffer(320))}),define(ie[171],ne([1,0,392,122]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class y{constructor(o){this.source=o}getElements(){const o=this.source,i=new Int32Array(o.length);for(let n=0,t=o.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new L.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(o,i){this.m_originalStart=Math.min(this.m_originalStart,o),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(o,i){this.m_originalStart=Math.min(this.m_originalStart,o),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class v{constructor(o,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=o,this._modifiedSequence=i;const[t,a,u]=v._getElements(o),[f,c,d]=v._getElements(i);this._hasStrings=u&&d,this._originalStringElements=t,this._originalElementsOrHash=a,this._modifiedStringElements=f,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(o){return o.length>0&&typeof o[0]=="string"}static _getElements(o){const i=o.getElements();if(v._isStringArray(i)){const n=new Int32Array(i.length);for(let t=0,a=i.length;t=o&&t>=n&&this.ElementsAreEqual(i,t);)i--,t--;if(o>i||n>t){let l;return n<=t?(_.Assert(o===i+1,"originalStart should only be one more than originalEnd"),l=[new L.DiffChange(o,0,n,t-n+1)]):o<=i?(_.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),l=[new L.DiffChange(o,i-o+1,n,0)]):(_.Assert(o===i+1,"originalStart should only be one more than originalEnd"),_.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),l=[]),l}const u=[0],f=[0],c=this.ComputeRecursionPoint(o,i,n,t,u,f,a),d=u[0],r=f[0];if(c!==null)return c;if(!a[0]){const l=this.ComputeDiffRecursive(o,d,n,r,a);let s=[];return a[0]?s=[new L.DiffChange(d+1,i-(d+1)+1,r+1,t-(r+1)+1)]:s=this.ComputeDiffRecursive(d+1,i,r+1,t,a),this.ConcatenateChanges(l,s)}return[new L.DiffChange(o,i-o+1,n,t-n+1)]}WALKTRACE(o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D){let I=null,M=null,A=new S,O=i,T=n,N=g[0]-C[0]-t,P=-1073741824,x=this.m_forwardHistory.length-1;do{const R=N+o;R===O||R=0&&(d=this.m_forwardHistory[x],o=d[0],O=1,T=d.length-1)}while(--x>=-1);if(I=A.getReverseChanges(),D[0]){let R=g[0]+1,B=C[0]+1;if(I!==null&&I.length>0){const W=I[I.length-1];R=Math.max(R,W.getOriginalEnd()),B=Math.max(B,W.getModifiedEnd())}M=[new L.DiffChange(R,s-R+1,B,m-B+1)]}else{A=new S,O=u,T=f,N=g[0]-C[0]-c,P=1073741824,x=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+a;R===O||R=r[R+1]?(l=r[R+1]-1,h=l-N-c,l>P&&A.MarkNextChange(),P=l+1,A.AddOriginalElement(l+1,h+1),N=R+1-a):(l=r[R-1],h=l-N-c,l>P&&A.MarkNextChange(),P=l,A.AddModifiedElement(l+1,h+1),N=R-1-a),x>=0&&(r=this.m_reverseHistory[x],a=r[0],O=1,T=r.length-1)}while(--x>=-1);M=A.getChanges()}return this.ConcatenateChanges(I,M)}ComputeRecursionPoint(o,i,n,t,a,u,f){let c=0,d=0,r=0,l=0,s=0,g=0;o--,n--,a[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const h=i-o+(t-n),m=h+1,C=new Int32Array(m),w=new Int32Array(m),D=t-n,I=i-o,M=o-n,A=i-t,T=(I-D)%2===0;C[D]=o,w[I]=i,f[0]=!1;for(let N=1;N<=h/2+1;N++){let P=0,x=0;r=this.ClipDiagonalBound(D-N,N,D,m),l=this.ClipDiagonalBound(D+N,N,D,m);for(let B=r;B<=l;B+=2){B===r||BP+x&&(P=c,x=d),!T&&Math.abs(B-I)<=N-1&&c>=w[B])return a[0]=c,u[0]=d,W<=w[B]&&1447>0&&N<=1447+1?this.WALKTRACE(D,r,l,M,I,s,g,A,C,w,c,i,a,d,t,u,T,f):null}const R=(P-o+(x-n)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,R))return f[0]=!0,a[0]=P,u[0]=x,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(D,r,l,M,I,s,g,A,C,w,c,i,a,d,t,u,T,f):(o++,n++,[new L.DiffChange(o,i-o+1,n,t-n+1)]);s=this.ClipDiagonalBound(I-N,N,I,m),g=this.ClipDiagonalBound(I+N,N,I,m);for(let B=s;B<=g;B+=2){B===s||B=w[B+1]?c=w[B+1]-1:c=w[B-1],d=c-(B-I)-A;const W=c;for(;c>o&&d>n&&this.ElementsAreEqual(c,d);)c--,d--;if(w[B]=c,T&&Math.abs(B-D)<=N&&c<=C[B])return a[0]=c,u[0]=d,W>=C[B]&&1447>0&&N<=1447+1?this.WALKTRACE(D,r,l,M,I,s,g,A,C,w,c,i,a,d,t,u,T,f):null}if(N<=1447){let B=new Int32Array(l-r+2);B[0]=D-r+1,p.Copy2(C,r,B,1,l-r+1),this.m_forwardHistory.push(B),B=new Int32Array(g-s+2),B[0]=I-s+1,p.Copy2(w,s,B,1,g-s+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(D,r,l,M,I,s,g,A,C,w,c,i,a,d,t,u,T,f)}PrettifyChanges(o){for(let i=0;i0,f=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;i--){const n=o[i];let t=0,a=0;if(i>0){const l=o[i-1];t=l.originalStart+l.originalLength,a=l.modifiedStart+l.modifiedLength}const u=n.originalLength>0,f=n.modifiedLength>0;let c=0,d=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let l=1;;l++){const s=n.originalStart-l,g=n.modifiedStart-l;if(sd&&(d=m,c=l)}n.originalStart-=c,n.modifiedStart-=c;const r=[null];if(i>0&&this.ChangesOverlap(o[i-1],o[i],r)){o[i-1]=r[0],o.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=o.length;i0&&g>c&&(c=g,d=l,r=s)}return c>0?[d,r]:null}_contiguousSequenceScore(o,i,n){let t=0;for(let a=0;a=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[o])}_OriginalRegionIsBoundary(o,i){if(this._OriginalIsBoundary(o)||this._OriginalIsBoundary(o-1))return!0;if(i>0){const n=o+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(o){return o<=0||o>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[o])}_ModifiedRegionIsBoundary(o,i){if(this._ModifiedIsBoundary(o)||this._ModifiedIsBoundary(o-1))return!0;if(i>0){const n=o+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(o,i,n,t){const a=this._OriginalRegionIsBoundary(o,i)?1:0,u=this._ModifiedRegionIsBoundary(n,t)?1:0;return a+u}ConcatenateChanges(o,i){const n=[];if(o.length===0||i.length===0)return i.length>0?i:o;if(this.ChangesOverlap(o[o.length-1],i[0],n)){const t=new Array(o.length+i.length-1);return p.Copy(o,0,t,0,o.length-1),t[o.length-1]=n[0],p.Copy(i,1,t,o.length,i.length-1),t}else{const t=new Array(o.length+i.length);return p.Copy(o,0,t,0,o.length),p.Copy(i,0,t,o.length,i.length),t}}ChangesOverlap(o,i,n){if(_.Assert(o.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),_.Assert(o.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),o.originalStart+o.originalLength>=i.originalStart||o.modifiedStart+o.modifiedLength>=i.modifiedStart){const t=o.originalStart;let a=o.originalLength;const u=o.modifiedStart;let f=o.modifiedLength;return o.originalStart+o.originalLength>=i.originalStart&&(a=i.originalStart+i.originalLength-o.originalStart),o.modifiedStart+o.modifiedLength>=i.modifiedStart&&(f=i.modifiedStart+i.modifiedLength-o.modifiedStart),n[0]=new L.DiffChange(t,a,u,f),!0}else return n[0]=null,!1}ClipDiagonalBound(o,i,n,t){if(o>=0&&o0?p[0].toUpperCase()+p.substr(1):_[0][0].toUpperCase()!==_[0][0]&&p.length>0?p[0].toLowerCase()+p.substr(1):p}else return p}e.buildReplaceStringWithCasePreserved=k;function y(_,p,S){return _[0].indexOf(S)!==-1&&p.indexOf(S)!==-1&&_[0].split(S).length===p.split(S).length}function E(_,p,S){const v=p.split(S),b=_[0].split(S);let o="";return v.forEach((i,n)=>{o+=k([b[n]],i)+S}),o.slice(0,-1)}}),define(ie[100],ne([1,0,12]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var k;(function(y){y[y.Ignore=0]="Ignore",y[y.Info=1]="Info",y[y.Warning=2]="Warning",y[y.Error=3]="Error"})(k||(k={})),function(y){const E="error",_="warning",p="warn",S="info",v="ignore";function b(i){return i?L.equalsIgnoreCase(E,i)?y.Error:L.equalsIgnoreCase(_,i)||L.equalsIgnoreCase(p,i)?y.Warning:L.equalsIgnoreCase(S,i)?y.Info:y.Ignore:y.Ignore}y.fromValue=b;function o(i){switch(i){case y.Error:return E;case y.Warning:return _;case y.Info:return S;default:return v}}y.toString=o}(k||(k={})),e.default=k}),define(ie[268],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(ie[199],ne([1,0,12]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class k{constructor(){this._value="",this._pos=0}reset(b){return this._value=b,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;o--,this._valueLen--){const i=this._value.charCodeAt(o);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,o=()=>!1){return new S(new _(b,o))}static forStrings(){return new S(new k)}static forConfigKeys(){return new S(new y)}constructor(b){this._iter=b}clear(){this._root=void 0}set(b,o){const i=this._iter.reset(b);let n;this._root||(this._root=new p,this._root.segment=i.value());const t=[];for(n=this._root;;){const u=i.cmp(n.segment);if(u>0)n.left||(n.left=new p,n.left.segment=i.value()),t.push([-1,n]),n=n.left;else if(u<0)n.right||(n.right=new p,n.right.segment=i.value()),t.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new p,n.mid.segment=i.value()),t.push([0,n]),n=n.mid;else break}const a=n.value;n.value=o,n.key=b;for(let u=t.length-1;u>=0;u--){const f=t[u][1];f.updateHeight();const c=f.balanceFactor();if(c<-1||c>1){const d=t[u][0],r=t[u+1][0];if(d===1&&r===1)t[u][1]=f.rotateLeft();else if(d===-1&&r===-1)t[u][1]=f.rotateRight();else if(d===1&&r===-1)f.right=t[u+1][1]=t[u+1][1].rotateRight(),t[u][1]=f.rotateLeft();else if(d===-1&&r===1)f.left=t[u+1][1]=t[u+1][1].rotateLeft(),t[u][1]=f.rotateRight();else throw new Error;if(u>0)switch(t[u-1][0]){case-1:t[u-1][1].left=t[u][1];break;case 1:t[u-1][1].right=t[u][1];break;case 0:t[u-1][1].mid=t[u][1];break}else this._root=t[0][1]}}return a}get(b){var o;return(o=this._getNode(b))===null||o===void 0?void 0:o.value}_getNode(b){const o=this._iter.reset(b);let i=this._root;for(;i;){const n=o.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(o.hasNext())o.next(),i=i.mid;else break}return i}has(b){const o=this._getNode(b);return!(o?.value===void 0&&o?.mid===void 0)}delete(b){return this._delete(b,!1)}deleteSuperstr(b){return this._delete(b,!0)}_delete(b,o){var i;const n=this._iter.reset(b),t=[];let a=this._root;for(;a;){const u=n.cmp(a.segment);if(u>0)t.push([-1,a]),a=a.left;else if(u<0)t.push([1,a]),a=a.right;else if(n.hasNext())n.next(),t.push([0,a]),a=a.mid;else break}if(a){if(o?(a.left=void 0,a.mid=void 0,a.right=void 0,a.height=1):(a.key=void 0,a.value=void 0),!a.mid&&!a.value)if(a.left&&a.right){const u=this._min(a.right);if(u.key){const{key:f,value:c,segment:d}=u;this._delete(u.key,!1),a.key=f,a.value=c,a.segment=d}}else{const u=(i=a.left)!==null&&i!==void 0?i:a.right;if(t.length>0){const[f,c]=t[t.length-1];switch(f){case-1:c.left=u;break;case 0:c.mid=u;break;case 1:c.right=u;break}}else this._root=u}for(let u=t.length-1;u>=0;u--){const f=t[u][1];f.updateHeight();const c=f.balanceFactor();if(c>1?(f.right.balanceFactor()>=0||(f.right=f.right.rotateRight()),t[u][1]=f.rotateLeft()):c<-1&&(f.left.balanceFactor()<=0||(f.left=f.left.rotateLeft()),t[u][1]=f.rotateRight()),u>0)switch(t[u-1][0]){case-1:t[u-1][1].left=t[u][1];break;case 1:t[u-1][1].right=t[u][1];break;case 0:t[u-1][1].mid=t[u][1];break}else this._root=t[0][1]}}}_min(b){for(;b.left;)b=b.left;return b}findSubstr(b){const o=this._iter.reset(b);let i=this._root,n;for(;i;){const t=o.cmp(i.segment);if(t>0)i=i.left;else if(t<0)i=i.right;else if(o.hasNext())o.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(b){return this._findSuperstrOrElement(b,!1)}_findSuperstrOrElement(b,o){const i=this._iter.reset(b);let n=this._root;for(;n;){const t=i.cmp(n.segment);if(t>0)n=n.left;else if(t<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):o?n.value:void 0}}forEach(b){for(const[o,i]of this)b(i,o)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(b){const o=[];return this._dfsEntries(b,o),o[Symbol.iterator]()}_dfsEntries(b,o){b&&(b.left&&this._dfsEntries(b.left,o),b.value&&o.push([b.key,b.value]),b.mid&&this._dfsEntries(b.mid,o),b.right&&this._dfsEntries(b.right,o))}}e.TernarySearchTree=S}),define(ie[402],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeTfIdfScores=e.TfIdfCalculator=void 0;function L(E){var _;const p=new Map;for(const S of E)p.set(S,((_=p.get(S))!==null&&_!==void 0?_:0)+1);return p}class k{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(_,p){const S=this.computeEmbedding(_),v=new Map,b=[];for(const[o,i]of this.documents){if(p.isCancellationRequested)return[];for(const n of i.chunks){const t=this.computeSimilarityScore(n,S,v);t>0&&b.push({key:o,score:t})}}return b}static termFrequencies(_){return L(k.splitTerms(_))}static*splitTerms(_){const p=S=>S.toLowerCase();for(const[S]of _.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield p(S);const v=S.replace(/([a-z])([A-Z])/g,"$1 $2").split(/\s+/g);if(v.length>1)for(const b of v)b.length>2&&/\p{Letter}{3,}/gu.test(b)&&(yield p(b))}}updateDocuments(_){var p;for(const{key:S}of _)this.deleteDocument(S);for(const S of _){const v=[];for(const b of S.textChunks){const o=k.termFrequencies(b);for(const i of o.keys())this.chunkOccurrences.set(i,((p=this.chunkOccurrences.get(i))!==null&&p!==void 0?p:0)+1);v.push({text:b,tf:o})}this.chunkCount+=v.length,this.documents.set(S.key,{chunks:v})}return this}deleteDocument(_){const p=this.documents.get(_);if(p){this.documents.delete(_),this.chunkCount-=p.chunks.length;for(const S of p.chunks)for(const v of S.tf.keys()){const b=this.chunkOccurrences.get(v);if(typeof b=="number"){const o=b-1;o<=0?this.chunkOccurrences.delete(v):this.chunkOccurrences.set(v,o)}}}}computeSimilarityScore(_,p,S){let v=0;for(const[b,o]of Object.entries(p)){const i=_.tf.get(b);if(!i)continue;let n=S.get(b);typeof n!="number"&&(n=this.computeIdf(b),S.set(b,n));const t=i*n;v+=t*o}return v}computeEmbedding(_){const p=k.termFrequencies(_);return this.computeTfidf(p)}computeIdf(_){var p;const S=(p=this.chunkOccurrences.get(_))!==null&&p!==void 0?p:0;return S>0?Math.log((this.chunkCount+1)/S):0}computeTfidf(_){const p=Object.create(null);for(const[S,v]of _){const b=this.computeIdf(S);b>0&&(p[S]=v*b)}return p}}e.TfIdfCalculator=k;function y(E){var _,p;const S=E.slice(0);S.sort((b,o)=>o.score-b.score);const v=(p=(_=S[0])===null||_===void 0?void 0:_.score)!==null&&p!==void 0?p:0;if(v>0)for(const b of S)b.score/=v;return S}e.normalizeTfIdfScores=y}),define(ie[20],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isString=void 0;function L(u){return typeof u=="string"}e.isString=L;function k(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}e.isObject=k;function y(u){const f=Object.getPrototypeOf(Uint8Array);return typeof u=="object"&&u instanceof f}e.isTypedArray=y;function E(u){return typeof u=="number"&&!isNaN(u)}e.isNumber=E;function _(u){return!!u&&typeof u[Symbol.iterator]=="function"}e.isIterable=_;function p(u){return u===!0||u===!1}e.isBoolean=p;function S(u){return typeof u>"u"}e.isUndefined=S;function v(u){return!b(u)}e.isDefined=v;function b(u){return S(u)||u===null}e.isUndefinedOrNull=b;function o(u,f){if(!u)throw new Error(f?`Unexpected type, expected '${f}'`:"Unexpected type")}e.assertType=o;function i(u){if(b(u))throw new Error("Assertion Failed: argument is undefined or null");return u}e.assertIsDefined=i;function n(u){return typeof u=="function"}e.isFunction=n;function t(u,f){const c=Math.min(u.length,f.length);for(let d=0;d{t[a]=u&&typeof u=="object"?k(u):u}),t}e.deepClone=k;function y(n){if(!n||typeof n!="object")return n;const t=[n];for(;t.length>0;){const a=t.shift();Object.freeze(a);for(const u in a)if(E.call(a,u)){const f=a[u];typeof f=="object"&&!Object.isFrozen(f)&&!(0,L.isTypedArray)(f)&&t.push(f)}}return n}e.deepFreeze=y;const E=Object.prototype.hasOwnProperty;function _(n,t){return p(n,t,new Set)}e.cloneAndChange=_;function p(n,t,a){if((0,L.isUndefinedOrNull)(n))return n;const u=t(n);if(typeof u<"u")return u;if(Array.isArray(n)){const f=[];for(const c of n)f.push(p(c,t,a));return f}if((0,L.isObject)(n)){if(a.has(n))throw new Error("Cannot clone recursive data-structure");a.add(n);const f={};for(const c in n)E.call(n,c)&&(f[c]=p(n[c],t,a));return a.delete(n),f}return n}function S(n,t,a=!0){return(0,L.isObject)(n)?((0,L.isObject)(t)&&Object.keys(t).forEach(u=>{u in n?a&&((0,L.isObject)(n[u])&&(0,L.isObject)(t[u])?S(n[u],t[u],a):n[u]=t[u]):n[u]=t[u]}),n):t}e.mixin=S;function v(n,t){if(n===t)return!0;if(n==null||t===null||t===void 0||typeof n!=typeof t||typeof n!="object"||Array.isArray(n)!==Array.isArray(t))return!1;let a,u;if(Array.isArray(n)){if(n.length!==t.length)return!1;for(a=0;afunction(){const c=Array.prototype.slice.call(arguments,0);return t(f,c)},u={};for(const f of n)u[f]=a(f);return u}e.createProxyObject=i}),define(ie[27],ne([1,0,26]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.ThemeColor=void 0;var k;(function(E){function _(p){return p&&typeof p=="object"&&typeof p.id=="string"}E.isThemeColor=_})(k||(e.ThemeColor=k={}));var y;(function(E){E.iconNameSegment="[A-Za-z0-9]+",E.iconNameExpression="[A-Za-z0-9-]+",E.iconModifierExpression="~[A-Za-z]+",E.iconNameCharacter="[A-Za-z0-9~-]";const _=new RegExp(`^(${E.iconNameExpression})(${E.iconModifierExpression})?$`);function p(f){const c=_.exec(f.id);if(!c)return p(L.Codicon.error);const[,d,r]=c,l=["codicon","codicon-"+d];return r&&l.push("codicon-modifier-"+r.substring(1)),l}E.asClassNameArray=p;function S(f){return p(f).join(" ")}E.asClassName=S;function v(f){return"."+p(f).join(".")}E.asCSSSelector=v;function b(f){return f&&typeof f=="object"&&typeof f.id=="string"&&(typeof f.color>"u"||k.isThemeColor(f.color))}E.isThemeIcon=b;const o=new RegExp(`^\\$\\((${E.iconNameExpression}(?:${E.iconModifierExpression})?)\\)$`);function i(f){const c=o.exec(f);if(!c)return;const[,d]=c;return{id:d}}E.fromString=i;function n(f){return{id:f}}E.fromId=n;function t(f,c){let d=f.id;const r=d.lastIndexOf("~");return r!==-1&&(d=d.substring(0,r)),c&&(d=`${d}~${c}`),{id:d}}E.modify=t;function a(f){const c=f.id.lastIndexOf("~");if(c!==-1)return f.id.substring(c+1)}E.getModifier=a;function u(f,c){var d,r;return f.id===c.id&&((d=f.color)===null||d===void 0?void 0:d.id)===((r=c.color)===null||r===void 0?void 0:r.id)}E.isEqual=u})(y||(e.ThemeIcon=y={}))}),define(ie[123],ne([1,0,71,12,27]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.getCodiconAriaLabel=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=void 0;const E="$(",_=new RegExp(`\\$\\(${y.ThemeIcon.iconNameExpression}(?:${y.ThemeIcon.iconModifierExpression})?\\)`,"g"),p=new RegExp(`(\\\\)?${_.source}`,"g");function S(f){return f.replace(p,(c,d)=>d?c:`\\${c}`)}e.escapeIcons=S;const v=new RegExp(`\\\\${_.source}`,"g");function b(f){return f.replace(v,c=>`\\${c}`)}e.markdownEscapeEscapedIcons=b;const o=new RegExp(`(\\s)?(\\\\)?${_.source}(\\s)?`,"g");function i(f){return f.indexOf(E)===-1?f:f.replace(o,(c,d,r,l)=>r?c:d||l||"")}e.stripIcons=i;function n(f){return f?f.replace(/\$\((.*?)\)/g,(c,d)=>` ${d} `).trim():""}e.getCodiconAriaLabel=n;const t=new RegExp(`\\$\\(${y.ThemeIcon.iconNameCharacter}+\\)`,"g");function a(f){t.lastIndex=0;let c="";const d=[];let r=0;for(;;){const l=t.lastIndex,s=t.exec(f),g=f.substring(l,s?.index);if(g.length>0){c+=g;for(let h=0;h255?255:y|0}e.toUint8=L;function k(y){return y<0?0:y>4294967295?4294967295:y|0}e.toUint32=k}),define(ie[173],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let L;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?L=crypto.getRandomValues.bind(crypto):L=function(E){for(let _=0;_o,asFile:()=>{},value:typeof o=="string"?o:void 0}}e.createStringDataTransferItem=E;function _(o,i,n){const t={id:(0,y.generateUuid)(),name:o,uri:i,data:n};return{asString:async()=>"",asFile:()=>t,value:void 0}}e.createFileDataTransferItem=_;class p{constructor(){this._entries=new Map}get size(){let i=0;for(const n of this._entries)i++;return i}has(i){return this._entries.has(this.toKey(i))}matches(i){const n=[...this._entries.keys()];return k.Iterable.some(this,([t,a])=>a.asFile())&&n.push("files"),b(S(i),n)}get(i){var n;return(n=this._entries.get(this.toKey(i)))===null||n===void 0?void 0:n[0]}append(i,n){const t=this._entries.get(i);t?t.push(n):this._entries.set(this.toKey(i),[n])}replace(i,n){this._entries.set(this.toKey(i),[n])}delete(i){this._entries.delete(this.toKey(i))}*[Symbol.iterator](){for(const[i,n]of this._entries)for(const t of n)yield[i,t]}toKey(i){return S(i)}}e.VSDataTransfer=p;function S(o){return o.toLowerCase()}function v(o,i){return b(S(o),i.map(S))}e.matchesMimeType=v;function b(o,i){if(o==="*/*")return i.length>0;if(i.includes(o))return!0;const n=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!n)return!1;const[t,a,u]=n;return u==="*"?i.some(f=>f.startsWith(a+"/")):!1}e.UriList=Object.freeze({create:o=>(0,L.distinct)(o.map(i=>i.toString())).join(`\r `),split:o=>o.split(`\r `),parse:o=>e.UriList.split(o).filter(i=>!i.startsWith("#"))})}),define(ie[269],ne([10]),{}),define(ie[403],ne([10]),{}),define(ie[404],ne([10]),{}),define(ie[405],ne([10]),{}),define(ie[406],ne([10]),{}),define(ie[175],ne([1,0,405,406]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ie[407],ne([10]),{}),define(ie[408],ne([10]),{}),define(ie[270],ne([10]),{}),define(ie[271],ne([10]),{}),define(ie[409],ne([10]),{}),define(ie[410],ne([10]),{}),define(ie[411],ne([10]),{}),define(ie[412],ne([10]),{}),define(ie[272],ne([10]),{}),define(ie[413],ne([10]),{}),define(ie[200],ne([1,0,413]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(ie[414],ne([10]),{}),define(ie[415],ne([10]),{}),define(ie[416],ne([10]),{}),define(ie[417],ne([10]),{}),define(ie[418],ne([10]),{}),define(ie[419],ne([10]),{}),define(ie[420],ne([10]),{}),define(ie[421],ne([10]),{}),define(ie[422],ne([10]),{}),define(ie[423],ne([10]),{}),define(ie[424],ne([10]),{}),define(ie[425],ne([10]),{}),define(ie[426],ne([10]),{}),define(ie[427],ne([10]),{}),define(ie[428],ne([10]),{}),define(ie[429],ne([10]),{}),define(ie[430],ne([10]),{}),define(ie[431],ne([10]),{}),define(ie[432],ne([10]),{}),define(ie[433],ne([10]),{}),define(ie[434],ne([10]),{}),define(ie[435],ne([10]),{}),define(ie[436],ne([10]),{}),define(ie[437],ne([10]),{}),define(ie[438],ne([10]),{}),define(ie[439],ne([10]),{}),define(ie[440],ne([10]),{}),define(ie[441],ne([10]),{}),define(ie[442],ne([10]),{}),define(ie[443],ne([10]),{}),define(ie[444],ne([10]),{}),define(ie[445],ne([10]),{}),define(ie[446],ne([10]),{}),define(ie[447],ne([10]),{}),define(ie[448],ne([10]),{}),define(ie[449],ne([10]),{}),define(ie[201],ne([10]),{}),define(ie[450],ne([10]),{}),define(ie[451],ne([10]),{}),define(ie[452],ne([10]),{}),define(ie[453],ne([10]),{}),define(ie[454],ne([10]),{}),define(ie[455],ne([10]),{}),define(ie[456],ne([10]),{}),define(ie[457],ne([10]),{}),define(ie[458],ne([10]),{}),define(ie[459],ne([10]),{}),define(ie[460],ne([10]),{}),define(ie[461],ne([10]),{}),define(ie[462],ne([10]),{}),define(ie[463],ne([10]),{}),define(ie[464],ne([10]),{}),define(ie[465],ne([10]),{}),define(ie[466],ne([10]),{}),define(ie[467],ne([10]),{}),define(ie[468],ne([10]),{}),define(ie[469],ne([10]),{}),define(ie[470],ne([10]),{}),define(ie[471],ne([10]),{}),define(ie[472],ne([10]),{}),define(ie[473],ne([10]),{}),define(ie[474],ne([10]),{}),define(ie[475],ne([10]),{}),define(ie[476],ne([10]),{}),define(ie[477],ne([10]),{}),define(ie[478],ne([10]),{}),define(ie[479],ne([10]),{}),define(ie[480],ne([10]),{}),define(ie[481],ne([10]),{}),define(ie[273],ne([10]),{}),define(ie[482],ne([10]),{}),define(ie[483],ne([10]),{}),define(ie[176],ne([10]),{}),define(ie[484],ne([10]),{}),define(ie[72],ne([1,0,40]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function k(y,E){y instanceof L.FastDomNode?(y.setFontFamily(E.getMassagedFontFamily()),y.setFontWeight(E.fontWeight),y.setFontSize(E.fontSize),y.setFontFeatureSettings(E.fontFeatureSettings),y.setFontVariationSettings(E.fontVariationSettings),y.setLineHeight(E.lineHeight),y.setLetterSpacing(E.letterSpacing)):(y.style.fontFamily=E.getMassagedFontFamily(),y.style.fontWeight=E.fontWeight,y.style.fontSize=E.fontSize+"px",y.style.fontFeatureSettings=E.fontFeatureSettings,y.style.fontVariationSettings=E.fontVariationSettings,y.style.lineHeight=E.lineHeight+"px",y.style.letterSpacing=E.letterSpacing+"px")}e.applyFontInfo=k}),define(ie[485],ne([1,0,48,72]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class y{constructor(S,v){this.chr=S,this.type=v,this.width=0}fulfill(S){this.width=S}}e.CharWidthRequest=y;class E{constructor(S,v){this._bareFontInfo=S,this._requests=v,this._container=null,this._testElements=null}read(){this._createDomElements(),L.$window.document.body.appendChild(this._container),this._readFromDomElements(),L.$window.document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const S=document.createElement("div");S.style.position="absolute",S.style.top="-50000px",S.style.width="50000px";const v=document.createElement("div");(0,k.applyFontInfo)(v,this._bareFontInfo),S.appendChild(v);const b=document.createElement("div");(0,k.applyFontInfo)(b,this._bareFontInfo),b.style.fontWeight="bold",S.appendChild(b);const o=document.createElement("div");(0,k.applyFontInfo)(o,this._bareFontInfo),o.style.fontStyle="italic",S.appendChild(o);const i=[];for(const n of this._requests){let t;n.type===0&&(t=v),n.type===2&&(t=b),n.type===1&&(t=o),t.appendChild(document.createElement("br"));const a=document.createElement("span");E._render(a,n),t.appendChild(a),i.push(a)}this._container=S,this._testElements=i}static _render(S,v){if(v.chr===" "){let b="\xA0";for(let o=0;o<8;o++)b+=b;S.innerText=b}else{let b=v.chr;for(let o=0;o<8;o++)b+=b;S.textContent=b}}_readFromDomElements(){for(let S=0,v=this._requests.length;SL._read(S,i),o=(i,n)=>L._write(S,i,n);this.migrate(v,b,o)}static _read(S,v){if(typeof S>"u")return;const b=v.indexOf(".");if(b>=0){const o=v.substring(0,b);return this._read(S[o],v.substring(b+1))}return S[v]}static _write(S,v,b){const o=v.indexOf(".");if(o>=0){const i=v.substring(0,o);S[i]=S[i]||{},this._write(S[i],v.substring(o+1),b);return}S[v]=b}}e.EditorSettingMigration=L,L.items=[];function k(p,S){L.items.push(new L(p,S))}function y(p,S){k(p,(v,b,o)=>{if(typeof v<"u"){for(const[i,n]of S)if(v===i){o(p,n);return}}})}function E(p){L.items.forEach(S=>S.apply(p))}e.migrateOptions=E,y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),y("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),y("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),k("autoClosingBrackets",(p,S,v)=>{p===!1&&(v("autoClosingBrackets","never"),typeof S("autoClosingQuotes")>"u"&&v("autoClosingQuotes","never"),typeof S("autoSurround")>"u"&&v("autoSurround","never"))}),k("renderIndentGuides",(p,S,v)=>{typeof p<"u"&&(v("renderIndentGuides",void 0),typeof S("guides.indentation")>"u"&&v("guides.indentation",!!p))}),k("highlightActiveIndentGuide",(p,S,v)=>{typeof p<"u"&&(v("highlightActiveIndentGuide",void 0),typeof S("guides.highlightActiveIndentation")>"u"&&v("guides.highlightActiveIndentation",!!p))});const _={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"};k("suggest.filteredTypes",(p,S,v)=>{if(p&&typeof p=="object"){for(const b of Object.entries(_))p[b[0]]===!1&&typeof S(`suggest.${b[1]}`)>"u"&&v(`suggest.${b[1]}`,!1);v("suggest.filteredTypes",void 0)}}),k("quickSuggestions",(p,S,v)=>{if(typeof p=="boolean"){const b=p?"on":"off";v("quickSuggestions",{comments:b,strings:b,other:b})}}),k("experimental.stickyScroll.enabled",(p,S,v)=>{typeof p=="boolean"&&(v("experimental.stickyScroll.enabled",void 0),typeof S("stickyScroll.enabled")>"u"&&v("stickyScroll.enabled",p))}),k("experimental.stickyScroll.maxLineCount",(p,S,v)=>{typeof p=="number"&&(v("experimental.stickyScroll.maxLineCount",void 0),typeof S("stickyScroll.maxLineCount")>"u"&&v("stickyScroll.maxLineCount",p))}),k("codeActionsOnSave",(p,S,v)=>{if(p&&typeof p=="object"){let b=!1;const o={};for(const i of Object.entries(p))typeof i[1]=="boolean"?(b=!0,o[i[0]]=i[1]?"explicit":"never"):o[i[0]]=i[1];b&&v("codeActionsOnSave",o)}}),k("codeActionWidget.includeNearbyQuickfixes",(p,S,v)=>{typeof p=="boolean"&&(v("codeActionWidget.includeNearbyQuickfixes",void 0),typeof S("codeActionWidget.includeNearbyQuickFixes")>"u"&&v("codeActionWidget.includeNearbyQuickFixes",p))})}),define(ie[202],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class k{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new L.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(E){this._tabFocus=E,this._onDidChangeTabFocus.fire(this._tabFocus)}}e.TabFocus=new k}),define(ie[124],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class L{static capture(y){if(y.getScrollTop()===0||y.hasPendingScrollAnimation())return new L(y.getScrollTop(),y.getContentHeight(),null,0,null);let E=null,_=0;const p=y.getVisibleRanges();if(p.length>0){E=p[0].getStartPosition();const S=y.getTopForPosition(E.lineNumber,E.column);_=y.getScrollTop()-S}return new L(y.getScrollTop(),y.getContentHeight(),E,_,y.getPosition())}constructor(y,E,_,p,S){this._initialScrollTop=y,this._initialContentHeight=E,this._visiblePosition=_,this._visiblePositionScrollDelta=p,this._cursorPosition=S}restore(y){if(!(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())&&this._visiblePosition){const E=y.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);y.setScrollTop(E+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(y){if(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())return;const E=y.getPosition();if(!this._cursorPosition||!E)return;const _=y.getTopForLineNumber(E.lineNumber)-y.getTopForLineNumber(this._cursorPosition.lineNumber);y.setScrollTop(y.getScrollTop()+_)}}e.StableEditorScrollState=L}),define(ie[146],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class L{constructor(b,o){this._restrictedRenderingContextBrand=void 0,this._viewLayout=b,this.viewportData=o,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(b){return b-this.scrollTop}getVerticalOffsetForLineNumber(b,o){return this._viewLayout.getVerticalOffsetForLineNumber(b,o)}getVerticalOffsetAfterLineNumber(b,o){return this._viewLayout.getVerticalOffsetAfterLineNumber(b,o)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=L;class k extends L{constructor(b,o,i){super(b,o),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(b,o){return this._viewLines.linesVisibleRangesForRange(b,o)}visibleRangeForPosition(b){return this._viewLines.visibleRangeForPosition(b)}}e.RenderingContext=k;class y{constructor(b,o,i,n){this.outsideRenderedLine=b,this.lineNumber=o,this.ranges=i,this.continuesOnNextLine=n}}e.LineVisibleRanges=y;class E{static from(b){const o=new Array(b.length);for(let i=0,n=b.length;i=o.left?S.width=Math.max(S.width,o.left+o.width-S.left):(_[p++]=S,S=o)}return _[p++]=S,_}static _createHorizontalRangesFromClientRects(E,_,p){if(!E||E.length===0)return null;const S=[];for(let v=0,b=E.length;vi)return null;if(_=Math.min(i,Math.max(0,_)),S=Math.min(i,Math.max(0,S)),_===S&&p===v&&p===0&&!E.children[_].firstChild){const u=E.children[_].getClientRects();return b.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,b.clientRectDeltaLeft,b.clientRectScale)}_!==S&&S>0&&v===0&&(S--,v=1073741824);let n=E.children[_].firstChild,t=E.children[S].firstChild;if((!n||!t)&&(!n&&p===0&&_>0&&(n=E.children[_-1].firstChild,p=1073741824),!t&&v===0&&S>0&&(t=E.children[S-1].firstChild,v=1073741824)),!n||!t)return null;p=Math.min(n.textContent.length,Math.max(0,p)),v=Math.min(t.textContent.length,Math.max(0,v));const a=this._readClientRects(n,p,t,v,b.endNode);return b.markDidDomLayout(),this._createHorizontalRangesFromClientRects(a,b.clientRectDeltaLeft,b.clientRectScale)}}e.RangeUtil=k}),define(ie[274],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const k=[];for(let y=32;y<=126;y++)k.push(y);return k.push(65533),k})();const L=(k,y)=>(k-=32,k<0||k>96?y<=2?(k+96)%96:96-1:k);e.getCharIndex=L}),define(ie[489],ne([1,0,274,172]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class y{constructor(_,p){this.scale=p,this._minimapCharRendererBrand=void 0,this.charDataNormal=y.soften(_,12/15),this.charDataLight=y.soften(_,50/60)}static soften(_,p){const S=new Uint8ClampedArray(_.length);for(let v=0,b=_.length;v_.width||S+d>_.height){console.warn("bad render request outside image data");return}const r=a?this.charDataLight:this.charDataNormal,l=(0,L.getCharIndex)(v,t),s=_.width*4,g=i.r,h=i.g,m=i.b,C=b.r-g,w=b.g-h,D=b.b-m,I=Math.max(o,n),M=_.data;let A=l*f*c,O=S*s+p*4;for(let T=0;T_.width||S+u>_.height){console.warn("bad render request outside image data");return}const f=_.width*4,c=.5*(b/255),d=o.r,r=o.g,l=o.b,s=v.r-d,g=v.g-r,h=v.b-l,m=d+s*c,C=r+g*c,w=l+h*c,D=Math.max(b,i),I=_.data;let M=S*f+p*4;for(let A=0;A{const _=new Uint8ClampedArray(E.length/2);for(let p=0;p>1]=k[E[p]]<<4|k[E[p+1]]&15;return _};e.prebakedMiniMaps={1:(0,L.createSingleCallFunction)(()=>y("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,L.createSingleCallFunction)(()=>y("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(ie[491],ne([1,0,489,274,490,172]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class _{static create(S,v){if(this.lastCreated&&S===this.lastCreated.scale&&v===this.lastFontFamily)return this.lastCreated;let b;return y.prebakedMiniMaps[S]?b=new L.MinimapCharRenderer(y.prebakedMiniMaps[S](),S):b=_.createFromSampleData(_.createSampleData(v).data,S),this.lastFontFamily=v,this.lastCreated=b,b}static createSampleData(S){const v=document.createElement("canvas"),b=v.getContext("2d");v.style.height="16px",v.height=16,v.width=96*10,v.style.width=96*10+"px",b.fillStyle="#ffffff",b.font=`bold 16px ${S}`,b.textBaseline="middle";let o=0;for(const i of k.allCharCodes)b.fillText(String.fromCharCode(i),o,16/2),o+=10;return b.getImageData(0,0,96*10,16)}static createFromSampleData(S,v){if(S.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const o=_._downsample(S,v);return new L.MinimapCharRenderer(o,v)}static _downsampleChar(S,v,b,o,i){const n=1*i,t=2*i;let a=o,u=0;for(let f=0;f0){const u=255/a;for(let f=0;fthis._itemData.get(S).getId()===y.getId()))!==null&&E!==void 0?E:p[0],this._unused.delete(_),this._itemData.set(_,y),_.setData(y)}return this._used.add(_),{object:_,dispose:()=>{this._used.delete(_),this._unused.size>5?_.dispose():this._unused.add(_)}}}dispose(){for(const y of this._used)y.dispose();for(const y of this._unused)y.dispose();this._used.clear(),this._unused.clear()}}e.ObjectPool=L}),define(ie[275],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffEditorDefaultOptions=void 0,e.diffEditorDefaultOptions={enableSplitViewResizing:!0,splitViewDefaultRatio:.5,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:!1,experimental:{showMoves:!1,showEmptyDecorations:!0},hideUnchangedRegions:{enabled:!1,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:!1,onlyShowAccessibleDiffViewer:!1,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:!0}}),define(ie[147],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorZoom=void 0,e.EditorZoom=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new L.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(k){k=Math.min(Math.max(-5,k),20),this._zoomLevel!==k&&(this._zoomLevel=k,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(ie[125],ne([1,0,172]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class k{constructor(_){const p=(0,L.toUint8)(_);this._defaultValue=p,this._asciiMap=k._createAsciiMap(p),this._map=new Map}static _createAsciiMap(_){const p=new Uint8Array(256);return p.fill(_),p}set(_,p){const S=(0,L.toUint8)(p);_>=0&&_<256?this._asciiMap[_]=S:this._map.set(_,S)}get(_){return _>=0&&_<256?this._asciiMap[_]:this._map.get(_)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=k;class y{constructor(){this._actual=new k(0)}add(_){this._actual.set(_,1)}has(_){return this._actual.get(_)===1}clear(){return this._actual.clear()}}e.CharacterSet=y}),define(ie[84],ne([1,0,12]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class k{static _nextVisibleColumn(E,_,p){return E===9?k.nextRenderTabStop(_,p):L.isFullWidthCharacter(E)||L.isEmojiImprecise(E)?_+2:_+1}static visibleColumnFromColumn(E,_,p){const S=Math.min(_-1,E.length),v=E.substring(0,S),b=new L.GraphemeIterator(v);let o=0;for(;!b.eol();){const i=L.getNextCodePoint(v,S,b.offset);b.nextGraphemeLength(),o=this._nextVisibleColumn(i,o,p)}return o}static columnFromVisibleColumn(E,_,p){if(_<=0)return 1;const S=E.length,v=new L.GraphemeIterator(E);let b=0,o=1;for(;!v.eol();){const i=L.getNextCodePoint(E,S,v.offset);v.nextGraphemeLength();const n=this._nextVisibleColumn(i,b,p),t=v.offset+1;if(n>=_){const a=_-b;return n-_p))return new k(_,p)}static ofLength(_){return new k(0,_)}static ofStartAndLength(_,p){return new k(_,_+p)}constructor(_,p){if(this.start=_,this.endExclusive=p,_>p)throw new L.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(_){return new k(this.start+_,this.endExclusive+_)}deltaStart(_){return new k(this.start+_,this.endExclusive)}deltaEnd(_){return new k(this.start,this.endExclusive+_)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(_){return this.start===_.start&&this.endExclusive===_.endExclusive}containsRange(_){return this.start<=_.start&&_.endExclusive<=this.endExclusive}contains(_){return this.start<=_&&_=_.endExclusive}slice(_){return _.slice(this.start,this.endExclusive)}clip(_){if(this.isEmpty)throw new L.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,_))}clipCyclic(_){if(this.isEmpty)throw new L.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return _=this.endExclusive?this.start+(_-this.start)%this.length:_}forEach(_){for(let p=this.start;p_.toString()).join(", ")}intersectsStrict(_){let p=0;for(;p_+p.length,0)}}e.OffsetRangeSet=y}),define(ie[11],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class L{constructor(y,E){this.lineNumber=y,this.column=E}with(y=this.lineNumber,E=this.column){return y===this.lineNumber&&E===this.column?this:new L(y,E)}delta(y=0,E=0){return this.with(this.lineNumber+y,this.column+E)}equals(y){return L.equals(this,y)}static equals(y,E){return!y&&!E?!0:!!y&&!!E&&y.lineNumber===E.lineNumber&&y.column===E.column}isBefore(y){return L.isBefore(this,y)}static isBefore(y,E){return y.lineNumberp||E===p&&_>S?(this.startLineNumber=p,this.startColumn=S,this.endLineNumber=E,this.endColumn=_):(this.startLineNumber=E,this.startColumn=_,this.endLineNumber=p,this.endColumn=S)}isEmpty(){return k.isEmpty(this)}static isEmpty(E){return E.startLineNumber===E.endLineNumber&&E.startColumn===E.endColumn}containsPosition(E){return k.containsPosition(this,E)}static containsPosition(E,_){return!(_.lineNumberE.endLineNumber||_.lineNumber===E.startLineNumber&&_.columnE.endColumn)}static strictContainsPosition(E,_){return!(_.lineNumberE.endLineNumber||_.lineNumber===E.startLineNumber&&_.column<=E.startColumn||_.lineNumber===E.endLineNumber&&_.column>=E.endColumn)}containsRange(E){return k.containsRange(this,E)}static containsRange(E,_){return!(_.startLineNumberE.endLineNumber||_.endLineNumber>E.endLineNumber||_.startLineNumber===E.startLineNumber&&_.startColumnE.endColumn)}strictContainsRange(E){return k.strictContainsRange(this,E)}static strictContainsRange(E,_){return!(_.startLineNumberE.endLineNumber||_.endLineNumber>E.endLineNumber||_.startLineNumber===E.startLineNumber&&_.startColumn<=E.startColumn||_.endLineNumber===E.endLineNumber&&_.endColumn>=E.endColumn)}plusRange(E){return k.plusRange(this,E)}static plusRange(E,_){let p,S,v,b;return _.startLineNumberE.endLineNumber?(v=_.endLineNumber,b=_.endColumn):_.endLineNumber===E.endLineNumber?(v=_.endLineNumber,b=Math.max(_.endColumn,E.endColumn)):(v=E.endLineNumber,b=E.endColumn),new k(p,S,v,b)}intersectRanges(E){return k.intersectRanges(this,E)}static intersectRanges(E,_){let p=E.startLineNumber,S=E.startColumn,v=E.endLineNumber,b=E.endColumn;const o=_.startLineNumber,i=_.startColumn,n=_.endLineNumber,t=_.endColumn;return pn?(v=n,b=t):v===n&&(b=Math.min(b,t)),p>v||p===v&&S>b?null:new k(p,S,v,b)}equalsRange(E){return k.equalsRange(this,E)}static equalsRange(E,_){return!E&&!_?!0:!!E&&!!_&&E.startLineNumber===_.startLineNumber&&E.startColumn===_.startColumn&&E.endLineNumber===_.endLineNumber&&E.endColumn===_.endColumn}getEndPosition(){return k.getEndPosition(this)}static getEndPosition(E){return new L.Position(E.endLineNumber,E.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(E){return new L.Position(E.startLineNumber,E.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(E,_){return new k(this.startLineNumber,this.startColumn,E,_)}setStartPosition(E,_){return new k(E,_,this.endLineNumber,this.endColumn)}collapseToStart(){return k.collapseToStart(this)}static collapseToStart(E){return new k(E.startLineNumber,E.startColumn,E.startLineNumber,E.startColumn)}collapseToEnd(){return k.collapseToEnd(this)}static collapseToEnd(E){return new k(E.endLineNumber,E.endColumn,E.endLineNumber,E.endColumn)}delta(E){return new k(this.startLineNumber+E,this.startColumn,this.endLineNumber+E,this.endColumn)}static fromPositions(E,_=E){return new k(E.lineNumber,E.column,_.lineNumber,_.column)}static lift(E){return E?new k(E.startLineNumber,E.startColumn,E.endLineNumber,E.endColumn):null}static isIRange(E){return E&&typeof E.startLineNumber=="number"&&typeof E.startColumn=="number"&&typeof E.endLineNumber=="number"&&typeof E.endColumn=="number"}static areIntersectingOrTouching(E,_){return!(E.endLineNumber<_.startLineNumber||E.endLineNumber===_.startLineNumber&&E.endColumn<_.startColumn||_.endLineNumberE.startLineNumber}toJSON(){return this}}e.Range=k}),define(ie[277],ne([1,0,12,5]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class y{constructor(p,S,v,b,o){this.value=p,this.selectionStart=S,this.selectionEnd=v,this.selection=b,this.newlineCountBeforeSelection=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(p,S){const v=p.getValue(),b=p.getSelectionStart(),o=p.getSelectionEnd();let i;if(S){const n=v.substring(0,b),t=S.value.substring(0,S.selectionStart);n===t&&(i=S.newlineCountBeforeSelection)}return new y(v,b,o,null,i)}collapseSelection(){return this.selectionStart===this.value.length?this:new y(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(p,S,v){e._debugComposition&&console.log(`writeToTextArea ${p}: ${this.toString()}`),S.setValue(p,this.value),v&&S.setSelectionRange(p,this.selectionStart,this.selectionEnd)}deduceEditorPosition(p){var S,v,b,o,i,n,t,a;if(p<=this.selectionStart){const c=this.value.substring(p,this.selectionStart);return this._finishDeduceEditorPosition((v=(S=this.selection)===null||S===void 0?void 0:S.getStartPosition())!==null&&v!==void 0?v:null,c,-1)}if(p>=this.selectionEnd){const c=this.value.substring(this.selectionEnd,p);return this._finishDeduceEditorPosition((o=(b=this.selection)===null||b===void 0?void 0:b.getEndPosition())!==null&&o!==void 0?o:null,c,1)}const u=this.value.substring(this.selectionStart,p);if(u.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition((n=(i=this.selection)===null||i===void 0?void 0:i.getStartPosition())!==null&&n!==void 0?n:null,u,1);const f=this.value.substring(p,this.selectionEnd);return this._finishDeduceEditorPosition((a=(t=this.selection)===null||t===void 0?void 0:t.getEndPosition())!==null&&a!==void 0?a:null,f,-1)}_finishDeduceEditorPosition(p,S,v){let b=0,o=-1;for(;(o=S.indexOf(` `,o+1))!==-1;)b++;return[p,v*S.length,b]}static deduceInput(p,S,v){if(!p)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${p.toString()}`),console.log(`CURRENT STATE: ${S.toString()}`));const b=Math.min(L.commonPrefixLength(p.value,S.value),p.selectionStart,S.selectionStart),o=Math.min(L.commonSuffixLength(p.value,S.value),p.value.length-p.selectionEnd,S.value.length-S.selectionEnd),i=p.value.substring(b,p.value.length-o),n=S.value.substring(b,S.value.length-o),t=p.selectionStart-b,a=p.selectionEnd-b,u=S.selectionStart-b,f=S.selectionEnd-b;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${i}>, selectionStart: ${t}, selectionEnd: ${a}`),console.log(`AFTER DIFFING CURRENT STATE: <${n}>, selectionStart: ${u}, selectionEnd: ${f}`)),u===f){const d=p.selectionStart-b;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${d} chars`),{text:n,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}const c=a-t;return{text:n,replacePrevCharCnt:c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(p,S){if(!p)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${p.toString()}`),console.log(`CURRENT STATE: ${S.toString()}`)),p.value===S.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:S.selectionEnd-p.selectionEnd};const v=Math.min(L.commonPrefixLength(p.value,S.value),p.selectionEnd),b=Math.min(L.commonSuffixLength(p.value,S.value),p.value.length-p.selectionEnd),o=p.value.substring(v,p.value.length-b),i=S.value.substring(v,S.value.length-b),n=p.selectionStart-v,t=p.selectionEnd-v,a=S.selectionStart-v,u=S.selectionEnd-v;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${o}>, selectionStart: ${n}, selectionEnd: ${t}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${a}, selectionEnd: ${u}`)),{text:i,replacePrevCharCnt:t,replaceNextCharCnt:o.length-t,positionDelta:u-i.length}}}e.TextAreaState=y,y.EMPTY=new y("",0,0,null,void 0);class E{static _getPageOfLine(p,S){return Math.floor((p-1)/S)}static _getRangeForPage(p,S){const v=p*S,b=v+1,o=v+S;return new k.Range(b,1,o+1,1)}static fromEditorSelection(p,S,v,b){const i=E._getPageOfLine(S.startLineNumber,v),n=E._getRangeForPage(i,v),t=E._getPageOfLine(S.endLineNumber,v),a=E._getRangeForPage(t,v);let u=n.intersectRanges(new k.Range(1,1,S.startLineNumber,S.startColumn));if(b&&p.getValueLengthInRange(u,1)>500){const g=p.modifyPosition(u.getEndPosition(),-500);u=k.Range.fromPositions(g,u.getEndPosition())}const f=p.getValueInRange(u,1),c=p.getLineCount(),d=p.getLineMaxColumn(c);let r=a.intersectRanges(new k.Range(S.endLineNumber,S.endColumn,c,d));if(b&&p.getValueLengthInRange(r,1)>500){const g=p.modifyPosition(r.getStartPosition(),500);r=k.Range.fromPositions(r.getStartPosition(),g)}const l=p.getValueInRange(r,1);let s;if(i===t||i+1===t)s=p.getValueInRange(S,1);else{const g=n.intersectRanges(S),h=a.intersectRanges(S);s=p.getValueInRange(g,1)+String.fromCharCode(8230)+p.getValueInRange(h,1)}return b&&s.length>2*500&&(s=s.substring(0,500)+String.fromCharCode(8230)+s.substring(s.length-500,s.length)),new y(f+s+l,f.length,f.length+s.length,S,u.endLineNumber-u.startLineNumber)}}e.PagedScreenReaderStrategy=E}),define(ie[494],ne([1,0,13,19,9,49,11,5]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class S{remove(){var n;(n=this.parent)===null||n===void 0||n.children.delete(this.id)}static findId(n,t){let a;typeof n=="string"?a=`${t.id}/${n}`:(a=`${t.id}/${n.name}`,t.children.get(a)!==void 0&&(a=`${t.id}/${n.name}_${n.range.startLineNumber}_${n.range.startColumn}`));let u=a;for(let f=0;t.children.get(u)!==void 0;f++)u=`${a}_${f}`;return u}static empty(n){return n.children.size===0}}e.TreeElement=S;class v extends S{constructor(n,t,a){super(),this.id=n,this.parent=t,this.symbol=a,this.children=new Map}}e.OutlineElement=v;class b extends S{constructor(n,t,a,u){super(),this.id=n,this.parent=t,this.label=a,this.order=u,this.children=new Map}}e.OutlineGroup=b;class o extends S{static create(n,t,a){const u=new k.CancellationTokenSource(a),f=new o(t.uri),c=n.ordered(t),d=c.map((l,s)=>{var g;const h=S.findId(`provider_${s}`,f),m=new b(h,f,(g=l.displayName)!==null&&g!==void 0?g:"Unknown Outline Provider",s);return Promise.resolve(l.provideDocumentSymbols(t,u.token)).then(C=>{for(const w of C||[])o._makeOutlineElement(w,m);return m},C=>((0,y.onUnexpectedExternalError)(C),m)).then(C=>{S.empty(C)?C.remove():f._groups.set(h,C)})}),r=n.onDidChange(()=>{const l=n.ordered(t);(0,L.equals)(l,c)||u.cancel()});return Promise.all(d).then(()=>u.token.isCancellationRequested&&!a.isCancellationRequested?o.create(n,t,a):f._compact()).finally(()=>{u.dispose(),r.dispose()})}static _makeOutlineElement(n,t){const a=S.findId(n,t),u=new v(a,t,n);if(n.children)for(const f of n.children)o._makeOutlineElement(f,u);t.children.set(u.id,u)}constructor(n){super(),this.uri=n,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let n=0;for(const[t,a]of this._groups)a.children.size===0?this._groups.delete(t):n+=1;if(n!==1)this.children=this._groups;else{const t=E.Iterable.first(this._groups.values());for(const[,a]of t.children)a.parent=this,this.children.set(a.id,a)}return this}getTopLevelSymbols(){const n=[];for(const t of this.children.values())t instanceof v?n.push(t.symbol):n.push(...E.Iterable.map(t.children.values(),a=>a.symbol));return n.sort((t,a)=>p.Range.compareRangesUsingStarts(t.range,a.range))}asListOfDocumentSymbols(){const n=this.getTopLevelSymbols(),t=[];return o._flattenDocumentSymbols(t,n,""),t.sort((a,u)=>_.Position.compare(p.Range.getStartPosition(a.range),p.Range.getStartPosition(u.range))||_.Position.compare(p.Range.getEndPosition(u.range),p.Range.getEndPosition(a.range)))}static _flattenDocumentSymbols(n,t,a){for(const u of t)n.push({kind:u.kind,tags:u.tags,name:u.name,detail:u.detail,containerName:u.containerName||a,range:u.range,selectionRange:u.selectionRange,children:void 0}),u.children&&o._flattenDocumentSymbols(n,u.children,u.name)}}e.OutlineModel=o}),define(ie[74],ne([1,0,5]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class k{static insert(E,_){return{range:new L.Range(E.lineNumber,E.column,E.lineNumber,E.column),text:_,forceMoveMarkers:!0}}static delete(E){return{range:E,text:null}}static replace(E,_){return{range:E,text:_}}static replaceMove(E,_){return{range:E,text:_,forceMoveMarkers:!0}}}e.EditOperation=k}),define(ie[495],ne([1,0,12,74,5]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class E{constructor(S,v){this._selection=S,this._cursors=v,this._selectionId=null}getEditOperations(S,v){const b=_(S,this._cursors);for(let o=0,i=b.length;on.lineNumber===t.lineNumber?n.column-t.column:n.lineNumber-t.lineNumber);for(let n=S.length-2;n>=0;n--)S[n].lineNumber===S[n+1].lineNumber&&S.splice(n,1);const v=[];let b=0,o=0;const i=S.length;for(let n=1,t=p.getLineCount();n<=t;n++){const a=p.getLineContent(n),u=a.length+1;let f=0;if(ob)throw new L.BugIndicatingError(`startLineNumber ${v} cannot be after endLineNumberExclusive ${b}`);this.startLineNumber=v,this.endLineNumberExclusive=b}contains(v){return this.startLineNumber<=v&&vi.endLineNumberExclusive>=v.startLineNumber),o=(0,E.findLastIdxMonotonous)(this._normalizedRanges,i=>i.startLineNumber<=v.endLineNumberExclusive)+1;if(b===o)this._normalizedRanges.splice(b,0,v);else if(b===o-1){const i=this._normalizedRanges[b];this._normalizedRanges[b]=i.join(v)}else{const i=this._normalizedRanges[b].join(this._normalizedRanges[o-1]).join(v);this._normalizedRanges.splice(b,o-b,i)}}contains(v){const b=(0,E.findLastMonotonous)(this._normalizedRanges,o=>o.startLineNumber<=v);return!!b&&b.endLineNumberExclusive>v}intersects(v){const b=(0,E.findLastMonotonous)(this._normalizedRanges,o=>o.startLineNumberv.startLineNumber}getUnion(v){if(this._normalizedRanges.length===0)return v;if(v._normalizedRanges.length===0)return this;const b=[];let o=0,i=0,n=null;for(;o=t.startLineNumber?n=new _(n.startLineNumber,Math.max(n.endLineNumberExclusive,t.endLineNumberExclusive)):(b.push(n),n=t)}return n!==null&&b.push(n),new p(b)}subtractFrom(v){const b=(0,E.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,t=>t.endLineNumberExclusive>=v.startLineNumber),o=(0,E.findLastIdxMonotonous)(this._normalizedRanges,t=>t.startLineNumber<=v.endLineNumberExclusive)+1;if(b===o)return new p([v]);const i=[];let n=v.startLineNumber;for(let t=b;tn&&i.push(new _(n,a.startLineNumber)),n=a.endLineNumberExclusive}return nv.toString()).join(", ")}getIntersection(v){const b=[];let o=0,i=0;for(;ob.delta(v)))}}e.LineRangeSet=p}),define(ie[278],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class L{constructor(y,E,_,p){this._rgba8Brand=void 0,this.r=L._clamp(y),this.g=L._clamp(E),this.b=L._clamp(_),this.a=L._clamp(p)}equals(y){return this.r===y.r&&this.g===y.g&&this.b===y.b&&this.a===y.a}static _clamp(y){return y<0?0:y>255?255:y|0}}e.RGBA8=L,L.Empty=new L(0,0,0,0)}),define(ie[24],ne([1,0,11,5]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class y extends k.Range{constructor(_,p,S,v){super(_,p,S,v),this.selectionStartLineNumber=_,this.selectionStartColumn=p,this.positionLineNumber=S,this.positionColumn=v}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(_){return y.selectionsEqual(this,_)}static selectionsEqual(_,p){return _.selectionStartLineNumber===p.selectionStartLineNumber&&_.selectionStartColumn===p.selectionStartColumn&&_.positionLineNumber===p.positionLineNumber&&_.positionColumn===p.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(_,p){return this.getDirection()===0?new y(this.startLineNumber,this.startColumn,_,p):new y(_,p,this.startLineNumber,this.startColumn)}getPosition(){return new L.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new L.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(_,p){return this.getDirection()===0?new y(_,p,this.endLineNumber,this.endColumn):new y(this.endLineNumber,this.endColumn,_,p)}static fromPositions(_,p=_){return new y(_.lineNumber,_.column,p.lineNumber,p.column)}static fromRange(_,p){return p===0?new y(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn):new y(_.endLineNumber,_.endColumn,_.startLineNumber,_.startColumn)}static liftSelection(_){return new y(_.selectionStartLineNumber,_.selectionStartColumn,_.positionLineNumber,_.positionColumn)}static selectionsArrEqual(_,p){if(_&&!p||!_&&p)return!1;if(!_&&!p)return!0;if(_.length!==p.length)return!1;for(let S=0,v=_.length;S(_.hasOwnProperty(p)||(_[p]=E(p)),_[p])}e.getMapForWordSeparators=y(E=>new k(E))}),define(ie[149],ne([1,0,49,66]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function y(v=""){let b="(-?\\d*\\.\\d\\w*)|([^";for(const o of e.USUAL_WORD_SEPARATORS)v.indexOf(o)>=0||(b+="\\"+o);return b+="\\s]+)",new RegExp(b,"g")}e.DEFAULT_WORD_REGEXP=y();function E(v){let b=e.DEFAULT_WORD_REGEXP;if(v&&v instanceof RegExp)if(v.global)b=v;else{let o="g";v.ignoreCase&&(o+="i"),v.multiline&&(o+="m"),v.unicode&&(o+="u"),b=new RegExp(v.source,o)}return b.lastIndex=0,b}e.ensureValidWordDefinition=E;const _=new k.LinkedList;_.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function p(v,b,o,i,n){if(b=E(b),n||(n=L.Iterable.first(_)),o.length>n.maxLen){let c=v-n.maxLen/2;return c<0?c=0:i+=c,o=o.substring(c,v+n.maxLen/2),p(v,b,o,i,n)}const t=Date.now(),a=v-1-i;let u=-1,f=null;for(let c=1;!(Date.now()-t>=n.timeBudget);c++){const d=a-n.windowSize*c;b.lastIndex=Math.max(0,d);const r=S(b,o,a,u);if(!r&&f||(f=r,d<=0))break;u=d}if(f){const c={word:f[0],startColumn:i+1+f.index,endColumn:i+1+f.index+f[0].length};return b.lastIndex=0,c}return null}e.getWordAtText=p;function S(v,b,o,i){let n;for(;n=v.exec(b);){const t=n.index||0;if(t<=o&&v.lastIndex>=o)return n;if(i>0&&t>i)return null}return null}}),define(ie[279],ne([1,0,84]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class k{static whitespaceVisibleColumn(E,_,p){const S=E.length;let v=0,b=-1,o=-1;for(let i=0;i{n.push(_.fromOffsetPairs(t?t.getEndExclusives():p.zero,a?a.getStarts():new p(i,(t?t.seq2Range.endExclusive-t.seq1Range.endExclusive:0)+i)))}),n}static fromOffsetPairs(o,i){return new _(new y.OffsetRange(o.offset1,i.offset1),new y.OffsetRange(o.offset2,i.offset2))}constructor(o,i){this.seq1Range=o,this.seq2Range=i}swap(){return new _(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(o){return new _(this.seq1Range.join(o.seq1Range),this.seq2Range.join(o.seq2Range))}delta(o){return o===0?this:new _(this.seq1Range.delta(o),this.seq2Range.delta(o))}deltaStart(o){return o===0?this:new _(this.seq1Range.deltaStart(o),this.seq2Range.deltaStart(o))}deltaEnd(o){return o===0?this:new _(this.seq1Range.deltaEnd(o),this.seq2Range.deltaEnd(o))}intersect(o){const i=this.seq1Range.intersect(o.seq1Range),n=this.seq2Range.intersect(o.seq2Range);if(!(!i||!n))return new _(i,n)}getStarts(){return new p(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new p(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}e.SequenceDiff=_;class p{constructor(o,i){this.offset1=o,this.offset2=i}toString(){return`${this.offset1} <-> ${this.offset2}`}}e.OffsetPair=p,p.zero=new p(0,0),p.max=new p(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class S{isValid(){return!0}}e.InfiniteTimeout=S,S.instance=new S;class v{constructor(o){if(this.timeout=o,this.startTime=Date.now(),this.valid=!0,o<=0)throw new k.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTimei.length||I>n.length)continue;const M=t(D,I);u.set(c,M);const A=D===C?f.get(c+1):f.get(c-1);if(f.set(c,M!==D?new E(A,D,I,M-D):A),u.get(c)===i.length&&u.get(c)-c===n.length)break e}}let d=f.get(c);const r=[];let l=i.length,s=n.length;for(;;){const g=d?d.x+d.length:0,h=d?d.y+d.length:0;if((g!==l||h!==s)&&r.push(new k.SequenceDiff(new L.OffsetRange(g,l),new L.OffsetRange(h,s))),!d)break;l=d.x,s=d.y,d=d.prev}return r.reverse(),new k.DiffAlgorithmResult(r,!1)}}e.MyersDiffAlgorithm=y;class E{constructor(v,b,o,i){this.prev=v,this.x=b,this.y=o,this.length=i}}class _{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(v){return v<0?(v=-v-1,this.negativeArr[v]):this.positiveArr[v]}set(v,b){if(v<0){if(v=-v-1,v>=this.negativeArr.length){const o=this.negativeArr;this.negativeArr=new Int32Array(o.length*2),this.negativeArr.set(o)}this.negativeArr[v]=b}else{if(v>=this.positiveArr.length){const o=this.positiveArr;this.positiveArr=new Int32Array(o.length*2),this.positiveArr.set(o)}this.positiveArr[v]=b}}}class p{constructor(){this.positiveArr=[],this.negativeArr=[]}get(v){return v<0?(v=-v-1,this.negativeArr[v]):this.positiveArr[v]}set(v,b){v<0?(v=-v-1,this.negativeArr[v]=b):this.positiveArr[v]=b}}}),define(ie[281],ne([1,0,13,73,150]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeVeryShortMatchingTextBetweenLongDiffs=e.removeVeryShortMatchingLinesBetweenDiffs=e.extendDiffsToEntireWordIfAppropriate=e.removeShortMatches=e.optimizeSequenceDiffs=void 0;function E(t,a,u){let f=u;return f=_(t,a,f),f=_(t,a,f),f=p(t,a,f),f}e.optimizeSequenceDiffs=E;function _(t,a,u){if(u.length===0)return u;const f=[];f.push(u[0]);for(let d=1;d0&&(l=l.delta(g))}c.push(l)}return f.length>0&&c.push(f[f.length-1]),c}function p(t,a,u){if(!t.getBoundaryScore||!a.getBoundaryScore)return u;for(let f=0;f0?u[f-1]:void 0,d=u[f],r=f+1=f.start&&t.seq2Range.start-r>=c.start&&u.isStronglyEqual(t.seq2Range.start-r,t.seq2Range.endExclusive-r)&&r<100;)r++;r--;let l=0;for(;t.seq1Range.start+lg&&(g=D,s=h)}return t.delta(s)}function v(t,a,u){const f=[];for(const c of u){const d=f[f.length-1];if(!d){f.push(c);continue}c.seq1Range.start-d.seq1Range.endExclusive<=2||c.seq2Range.start-d.seq2Range.endExclusive<=2?f[f.length-1]=new y.SequenceDiff(d.seq1Range.join(c.seq1Range),d.seq2Range.join(c.seq2Range)):f.push(c)}return f}e.removeShortMatches=v;function b(t,a,u){const f=[];let c;function d(){if(!c)return;const l=c.s1Range.length-c.deleted,s=c.s2Range.length-c.added;Math.max(c.deleted,c.added)+(c.count-1)>l&&f.push(new y.SequenceDiff(c.s1Range,c.s2Range)),c=void 0}for(const l of u){let s=function(w,D){var I,M,A,O;if(!c||!c.s1Range.containsRange(w)||!c.s2Range.containsRange(D))if(c&&!(c.s1Range.endExclusive0||a.length>0;){const f=t[0],c=a[0];let d;f&&(!c||f.seq1Range.start0&&u[u.length-1].seq1Range.endExclusive>=d.seq1Range.start?u[u.length-1]=u[u.length-1].join(d):u.push(d)}return u}function i(t,a,u){let f=u;if(f.length===0)return f;let c=0,d;do{d=!1;const r=[f[0]];for(let l=1;l5||w.seq1Range.length+w.seq2Range.length>5)};const s=f[l],g=r[r.length-1];h(g,s)?(d=!0,r[r.length-1]=r[r.length-1].join(s)):r.push(s)}f=r}while(c++<10&&d);return f}e.removeVeryShortMatchingLinesBetweenDiffs=i;function n(t,a,u){let f=u;if(f.length===0)return f;let c=0,d;do{d=!1;const l=[f[0]];for(let s=1;s5||I.length>500)return!1;const A=t.getText(I).trim();if(A.length>20||A.split(/\r\n|\r|\n/).length>1)return!1;const O=t.countLinesIn(w.seq1Range),T=w.seq1Range.length,N=a.countLinesIn(w.seq2Range),P=w.seq2Range.length,x=t.countLinesIn(D.seq1Range),R=D.seq1Range.length,B=a.countLinesIn(D.seq2Range),W=D.seq2Range.length,V=2*40+50;function U(F){return Math.min(F,V)}return Math.pow(Math.pow(U(O*40+T),1.5)+Math.pow(U(N*40+P),1.5),1.5)+Math.pow(Math.pow(U(x*40+R),1.5)+Math.pow(U(B*40+W),1.5),1.5)>(V**1.5)**1.5*1.3};const g=f[s],h=l[l.length-1];m(h,g)?(d=!0,l[l.length-1]=l[l.length-1].join(g)):l.push(g)}f=l}while(c++<10&&d);const r=[];return(0,L.forEachWithNeighbors)(f,(l,s,g)=>{let h=s;function m(A){return A.length>0&&A.trim().length<=3&&s.seq1Range.length+s.seq2Range.length>100}const C=t.extendToFullLines(s.seq1Range),w=t.getText(new k.OffsetRange(C.start,s.seq1Range.start));m(w)&&(h=h.deltaStart(-w.length));const D=t.getText(new k.OffsetRange(s.seq1Range.endExclusive,C.endExclusive));m(D)&&(h=h.deltaEnd(D.length));const I=y.SequenceDiff.fromOffsetPairs(l?l.getEndExclusives():y.OffsetPair.zero,g?g.getStarts():y.OffsetPair.max),M=h.intersect(I);r.push(M)}),r}e.removeVeryShortMatchingTextBetweenLongDiffs=n}),define(ie[498],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=void 0;class L{constructor(E,_){this.trimmedHash=E,this.lines=_}getElement(E){return this.trimmedHash[E]}get length(){return this.trimmedHash.length}getBoundaryScore(E){const _=E===0?0:k(this.lines[E-1]),p=E===this.lines.length?0:k(this.lines[E]);return 1e3-(_+p)}getText(E){return this.lines.slice(E.start,E.endExclusive).join(` `)}isStronglyEqual(E,_){return this.lines[E]===this.lines[_]}}e.LineSequence=L;function k(y){let E=0;for(;E0&&l>0&&i.get(r-1,l-1)===3&&(h+=n.get(r-1,l-1)),h+=b?b(r,l):1):h=-1;const m=Math.max(s,g,h);if(m===h){const C=r>0&&l>0?n.get(r-1,l-1):0;n.set(r,l,C+1),i.set(r,l,3)}else m===s?(n.set(r,l,0),i.set(r,l,1)):m===g&&(n.set(r,l,0),i.set(r,l,2));o.set(r,l,m)}const t=[];let a=p.length,u=S.length;function f(r,l){(r+1!==a||l+1!==u)&&t.push(new k.SequenceDiff(new L.OffsetRange(r+1,a),new L.OffsetRange(l+1,u))),a=r,u=l}let c=p.length-1,d=S.length-1;for(;c>=0&&d>=0;)i.get(c,d)===3?(f(c,d),c--,d--):i.get(c,d)===1?c--:d--;return f(-1,-1),t.reverse(),new k.DiffAlgorithmResult(t,!1)}}e.DynamicProgrammingDiffing=E}),define(ie[282],ne([1,0,60,73,11,5,204]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesSliceCharSequence=void 0;class p{constructor(n,t,a){this.lines=n,this.considerWhitespaceChanges=a,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let u=!1;t.start>0&&t.endExclusive>=n.length&&(t=new k.OffsetRange(t.start-1,t.endExclusive),u=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let f=this.lineRange.start;fString.fromCharCode(t)).join("")}getElement(n){return this.elements[n]}get length(){return this.elements.length}getBoundaryScore(n){const t=o(n>0?this.elements[n-1]:-1),a=o(na<=n);return new y.Position(this.lineRange.start+t+1,n-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(n){return E.Range.fromPositions(this.translateOffset(n.start),this.translateOffset(n.endExclusive))}findWordContaining(n){if(n<0||n>=this.elements.length||!S(this.elements[n]))return;let t=n;for(;t>0&&S(this.elements[t-1]);)t--;let a=n;for(;ac<=n.start))!==null&&t!==void 0?t:0,f=(a=(0,L.findFirstMonotonous)(this.firstCharOffsetByLine,c=>n.endExclusive<=c))!==null&&a!==void 0?a:this.elements.length;return new k.OffsetRange(u,f)}}e.LinesSliceCharSequence=p;function S(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}const v={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:3,[7]:10,[8]:10};function b(i){return v[i]}function o(i){return i===10?8:i===13?7:(0,_.isSpace)(i)?6:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:i===44||i===59?5:4}}),define(ie[205],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedText=e.LinesDiff=void 0;class L{constructor(E,_,p){this.changes=E,this.moves=_,this.hitTimeout=p}}e.LinesDiff=L;class k{constructor(E,_){this.lineRangeMapping=E,this.changes=_}}e.MovedText=k}),define(ie[110],ne([1,0,62]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.DetailedLineRangeMapping=e.LineRangeMapping=void 0;class k{static inverse(p,S,v){const b=[];let o=1,i=1;for(const t of p){const a=new y(new L.LineRange(o,t.original.startLineNumber),new L.LineRange(i,t.modified.startLineNumber),void 0);a.modified.isEmpty||b.push(a),o=t.original.endLineNumberExclusive,i=t.modified.endLineNumberExclusive}const n=new y(new L.LineRange(o,S+1),new L.LineRange(i,v+1),void 0);return n.modified.isEmpty||b.push(n),b}constructor(p,S){this.original=p,this.modified=S}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new k(this.modified,this.original)}join(p){return new k(this.original.join(p.original),this.modified.join(p.modified))}}e.LineRangeMapping=k;class y extends k{constructor(p,S,v){super(p,S),this.innerChanges=v}flip(){var p;return new y(this.modified,this.original,(p=this.innerChanges)===null||p===void 0?void 0:p.map(S=>S.flip()))}}e.DetailedLineRangeMapping=y;class E{constructor(p,S){this.originalRange=p,this.modifiedRange=S}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new E(this.modifiedRange,this.originalRange)}}e.RangeMapping=E}),define(ie[500],ne([1,0,150,110,13,60,53,62,73,282,204,280]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeMovedLines=void 0;function i(d,r,l,s,g,h){let{moves:m,excludedChanges:C}=t(d,r,l,h);if(!h.isValid())return[];const w=d.filter(I=>!C.has(I)),D=a(w,s,g,r,l,h);return(0,y.pushMany)(m,D),m=f(m),m=m.filter(I=>{const M=I.original.toOffsetRange().slice(r).map(O=>O.trim());return M.join(` `).length>=15&&n(M,O=>O.length>=2)>=2}),m=c(d,m),m}e.computeMovedLines=i;function n(d,r){let l=0;for(const s of d)r(s)&&l++;return l}function t(d,r,l,s){const g=[],h=d.filter(w=>w.modified.isEmpty&&w.original.length>=3).map(w=>new b.LineRangeFragment(w.original,r,w)),m=new Set(d.filter(w=>w.original.isEmpty&&w.modified.length>=3).map(w=>new b.LineRangeFragment(w.modified,l,w))),C=new Set;for(const w of h){let D=-1,I;for(const M of m){const A=w.computeSimilarity(M);A>D&&(D=A,I=M)}if(D>.9&&I&&(m.delete(I),g.push(new k.LineRangeMapping(w.range,I.range)),C.add(w.source),C.add(I.source)),!s.isValid())return{moves:g,excludedChanges:C}}return{moves:g,excludedChanges:C}}function a(d,r,l,s,g,h){const m=[],C=new _.SetMap;for(const A of d)for(let O=A.original.startLineNumber;OA.modified.startLineNumber,y.numberComparator));for(const A of d){let O=[];for(let T=A.modified.startLineNumber;T{for(const W of O)if(W.originalLineRange.endLineNumberExclusive+1===R.endLineNumberExclusive&&W.modifiedLineRange.endLineNumberExclusive+1===P.endLineNumberExclusive){W.originalLineRange=new p.LineRange(W.originalLineRange.startLineNumber,R.endLineNumberExclusive),W.modifiedLineRange=new p.LineRange(W.modifiedLineRange.startLineNumber,P.endLineNumberExclusive),x.push(W);return}const B={modifiedLineRange:P,originalLineRange:R};w.push(B),x.push(B)}),O=x}if(!h.isValid())return[]}w.sort((0,y.reverseOrder)((0,y.compareBy)(A=>A.modifiedLineRange.length,y.numberComparator)));const D=new p.LineRangeSet,I=new p.LineRangeSet;for(const A of w){const O=A.modifiedLineRange.startLineNumber-A.originalLineRange.startLineNumber,T=D.subtractFrom(A.modifiedLineRange),N=I.subtractFrom(A.originalLineRange).getWithDelta(O),P=T.getIntersection(N);for(const x of P.ranges){if(x.length<3)continue;const R=x,B=x.delta(-O);m.push(new k.LineRangeMapping(B,R)),D.addRange(R),I.addRange(B)}}m.sort((0,y.compareBy)(A=>A.original.startLineNumber,y.numberComparator));const M=new E.MonotonousArray(d);for(let A=0;AU.original.startLineNumber<=O.original.startLineNumber),N=(0,E.findLastMonotonous)(d,U=>U.modified.startLineNumber<=O.modified.startLineNumber),P=Math.max(O.original.startLineNumber-T.original.startLineNumber,O.modified.startLineNumber-N.modified.startLineNumber),x=M.findLastMonotonous(U=>U.original.startLineNumberU.modified.startLineNumbers.length||F>g.length||D.contains(F)||I.contains(U)||!u(s[U-1],g[F-1],h))break}W>0&&(I.addRange(new p.LineRange(O.original.startLineNumber-W,O.original.startLineNumber)),D.addRange(new p.LineRange(O.modified.startLineNumber-W,O.modified.startLineNumber)));let V;for(V=0;Vs.length||F>g.length||D.contains(F)||I.contains(U)||!u(s[U-1],g[F-1],h))break}V>0&&(I.addRange(new p.LineRange(O.original.endLineNumberExclusive,O.original.endLineNumberExclusive+V)),D.addRange(new p.LineRange(O.modified.endLineNumberExclusive,O.modified.endLineNumberExclusive+V))),(W>0||V>0)&&(m[A]=new k.LineRangeMapping(new p.LineRange(O.original.startLineNumber-W,O.original.endLineNumberExclusive+V),new p.LineRange(O.modified.startLineNumber-W,O.modified.endLineNumberExclusive+V)))}return m}function u(d,r,l){if(d.trim()===r.trim())return!0;if(d.length>300&&r.length>300)return!1;const g=new o.MyersDiffAlgorithm().compute(new v.LinesSliceCharSequence([d],new S.OffsetRange(0,1),!1),new v.LinesSliceCharSequence([r],new S.OffsetRange(0,1),!1),l);let h=0;const m=L.SequenceDiff.invert(g.diffs,d.length);for(const I of m)I.seq1Range.forEach(M=>{(0,b.isSpace)(d.charCodeAt(M))||h++});function C(I){let M=0;for(let A=0;Ar.length?d:r);return h/w>.6&&w>10}function f(d){if(d.length===0)return d;d.sort((0,y.compareBy)(l=>l.original.startLineNumber,y.numberComparator));const r=[d[0]];for(let l=1;l=0&&m>=0&&h+m<=2){r[r.length-1]=s.join(g);continue}r.push(g)}return r}function c(d,r){const l=new E.MonotonousArray(d);return r=r.filter(s=>{const g=l.findLastMonotonous(C=>C.original.startLineNumberC.modified.startLineNumberV===U))return new i.LinesDiff([],[],!1);if(r.length===1&&r[0].length===0||l.length===1&&l[0].length===0)return new i.LinesDiff([new n.DetailedLineRangeMapping(new y.LineRange(1,r.length+1),new y.LineRange(1,l.length+1),[new n.RangeMapping(new _.Range(1,1,r.length,r[0].length+1),new _.Range(1,1,l.length,l[0].length+1))])],[],!1);const g=s.maxComputationTimeMs===0?p.InfiniteTimeout.instance:new p.DateTimeout(s.maxComputationTimeMs),h=!s.ignoreTrimWhitespace,m=new Map;function C(V){let U=m.get(V);return U===void 0&&(U=m.size,m.set(V,U)),U}const w=r.map(V=>C(V.trim())),D=l.map(V=>C(V.trim())),I=new a.LineSequence(w,r),M=new a.LineSequence(D,l),A=(()=>I.length+M.length<1700?this.dynamicProgrammingDiffing.compute(I,M,g,(V,U)=>r[V]===l[U]?l[U].length===0?.1:1+Math.log(1+l[U].length):.99):this.myersDiffingAlgorithm.compute(I,M))();let O=A.diffs,T=A.hitTimeout;O=(0,o.optimizeSequenceDiffs)(I,M,O),O=(0,o.removeVeryShortMatchingLinesBetweenDiffs)(I,M,O);const N=[],P=V=>{if(h)for(let U=0;UV.seq1Range.start-x===V.seq2Range.start-R);const U=V.seq1Range.start-x;P(U),x=V.seq1Range.endExclusive,R=V.seq2Range.endExclusive;const F=this.refineDiff(r,l,V,g,h);F.hitTimeout&&(T=!0);for(const j of F.mappings)N.push(j)}P(r.length-x);const B=f(N,r,l);let W=[];return s.computeMoves&&(W=this.computeMoves(B,r,l,w,D,g,h)),(0,k.assertFn)(()=>{function V(F,j){if(F.lineNumber<1||F.lineNumber>j.length)return!1;const J=j[F.lineNumber-1];return!(F.column<1||F.column>J.length+1)}function U(F,j){return!(F.startLineNumber<1||F.startLineNumber>j.length+1||F.endLineNumberExclusive<1||F.endLineNumberExclusive>j.length+1)}for(const F of B){if(!F.innerChanges)return!1;for(const j of F.innerChanges)if(!(V(j.modifiedRange.getStartPosition(),l)&&V(j.modifiedRange.getEndPosition(),l)&&V(j.originalRange.getStartPosition(),r)&&V(j.originalRange.getEndPosition(),r)))return!1;if(!U(F.modified,l)||!U(F.original,r))return!1}return!0}),new i.LinesDiff(B,W,T)}computeMoves(r,l,s,g,h,m,C){return(0,b.computeMovedLines)(r,l,s,g,h,m).map(I=>{const M=this.refineDiff(l,s,new p.SequenceDiff(I.original.toOffsetRange(),I.modified.toOffsetRange()),m,C),A=f(M.mappings,l,s,!0);return new i.MovedText(I,A)})}refineDiff(r,l,s,g,h){const m=new t.LinesSliceCharSequence(r,s.seq1Range,h),C=new t.LinesSliceCharSequence(l,s.seq2Range,h),w=m.length+C.length<500?this.dynamicProgrammingDiffing.compute(m,C,g):this.myersDiffingAlgorithm.compute(m,C,g);let D=w.diffs;return D=(0,o.optimizeSequenceDiffs)(m,C,D),D=(0,o.extendDiffsToEntireWordIfAppropriate)(m,C,D),D=(0,o.removeShortMatches)(m,C,D),D=(0,o.removeVeryShortMatchingTextBetweenLongDiffs)(m,C,D),{mappings:D.map(M=>new n.RangeMapping(m.translateRange(M.seq1Range),C.translateRange(M.seq2Range))),hitTimeout:w.hitTimeout}}}e.DefaultLinesDiffComputer=u;function f(d,r,l,s=!1){const g=[];for(const h of(0,L.groupAdjacentBy)(d.map(m=>c(m,r,l)),(m,C)=>m.original.overlapOrTouch(C.original)||m.modified.overlapOrTouch(C.modified))){const m=h[0],C=h[h.length-1];g.push(new n.DetailedLineRangeMapping(m.original.join(C.original),m.modified.join(C.modified),h.map(w=>w.innerChanges[0])))}return(0,k.assertFn)(()=>!s&&g.length>0&&g[0].original.startLineNumber!==g[0].modified.startLineNumber?!1:(0,k.checkAdjacentItems)(g,(h,m)=>m.original.startLineNumber-h.original.endLineNumberExclusive===m.modified.startLineNumber-h.modified.endLineNumberExclusive&&h.original.endLineNumberExclusive=l[d.modifiedRange.startLineNumber-1].length&&d.originalRange.startColumn-1>=r[d.originalRange.startLineNumber-1].length&&d.originalRange.startLineNumber<=d.originalRange.endLineNumber+g&&d.modifiedRange.startLineNumber<=d.modifiedRange.endLineNumber+g&&(s=1);const h=new y.LineRange(d.originalRange.startLineNumber+s,d.originalRange.endLineNumber+1+g),m=new y.LineRange(d.modifiedRange.startLineNumber+s,d.modifiedRange.endLineNumber+1+g);return new n.DetailedLineRangeMapping(h,m,[d])}e.getLineRangeMapping=c}),define(ie[501],ne([1,0,171,205,110,12,5,98,62]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.LegacyLinesDiffComputer=void 0;const v=3;class b{computeDiff(s,g,h){var m;const w=new f(s,g,{maxComputationTime:h.maxComputationTimeMs,shouldIgnoreTrimWhitespace:h.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),D=[];let I=null;for(const M of w.changes){let A;M.originalEndLineNumber===0?A=new S.LineRange(M.originalStartLineNumber+1,M.originalStartLineNumber+1):A=new S.LineRange(M.originalStartLineNumber,M.originalEndLineNumber+1);let O;M.modifiedEndLineNumber===0?O=new S.LineRange(M.modifiedStartLineNumber+1,M.modifiedStartLineNumber+1):O=new S.LineRange(M.modifiedStartLineNumber,M.modifiedEndLineNumber+1);let T=new y.DetailedLineRangeMapping(A,O,(m=M.charChanges)===null||m===void 0?void 0:m.map(N=>new y.RangeMapping(new _.Range(N.originalStartLineNumber,N.originalStartColumn,N.originalEndLineNumber,N.originalEndColumn),new _.Range(N.modifiedStartLineNumber,N.modifiedStartColumn,N.modifiedEndLineNumber,N.modifiedEndColumn))));I&&(I.modified.endLineNumberExclusive===T.modified.startLineNumber||I.original.endLineNumberExclusive===T.original.startLineNumber)&&(T=new y.DetailedLineRangeMapping(I.original.join(T.original),I.modified.join(T.modified),I.innerChanges&&T.innerChanges?I.innerChanges.concat(T.innerChanges):void 0),D.pop()),D.push(T),I=T}return(0,p.assertFn)(()=>(0,p.checkAdjacentItems)(D,(M,A)=>A.original.startLineNumber-M.original.endLineNumberExclusive===A.modified.startLineNumber-M.modified.endLineNumberExclusive&&M.original.endLineNumberExclusive(s===10?"\\n":String.fromCharCode(s))+`-(${this._lineNumbers[g]},${this._columns[g]})`).join(", ")+"]"}_assertIndex(s,g){if(s<0||s>=g.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(s){return s>0&&s===this._lineNumbers.length?this.getEndLineNumber(s-1):(this._assertIndex(s,this._lineNumbers),this._lineNumbers[s])}getEndLineNumber(s){return s===-1?this.getStartLineNumber(s+1):(this._assertIndex(s,this._lineNumbers),this._charCodes[s]===10?this._lineNumbers[s]+1:this._lineNumbers[s])}getStartColumn(s){return s>0&&s===this._columns.length?this.getEndColumn(s-1):(this._assertIndex(s,this._columns),this._columns[s])}getEndColumn(s){return s===-1?this.getStartColumn(s+1):(this._assertIndex(s,this._columns),this._charCodes[s]===10?1:this._columns[s]+1)}}class t{constructor(s,g,h,m,C,w,D,I){this.originalStartLineNumber=s,this.originalStartColumn=g,this.originalEndLineNumber=h,this.originalEndColumn=m,this.modifiedStartLineNumber=C,this.modifiedStartColumn=w,this.modifiedEndLineNumber=D,this.modifiedEndColumn=I}static createFromDiffChange(s,g,h){const m=g.getStartLineNumber(s.originalStart),C=g.getStartColumn(s.originalStart),w=g.getEndLineNumber(s.originalStart+s.originalLength-1),D=g.getEndColumn(s.originalStart+s.originalLength-1),I=h.getStartLineNumber(s.modifiedStart),M=h.getStartColumn(s.modifiedStart),A=h.getEndLineNumber(s.modifiedStart+s.modifiedLength-1),O=h.getEndColumn(s.modifiedStart+s.modifiedLength-1);return new t(m,C,w,D,I,M,A,O)}}function a(l){if(l.length<=1)return l;const s=[l[0]];let g=s[0];for(let h=1,m=l.length;h0&&g.originalLength<20&&g.modifiedLength>0&&g.modifiedLength<20&&C()){const N=h.createCharSequence(s,g.originalStart,g.originalStart+g.originalLength-1),P=m.createCharSequence(s,g.modifiedStart,g.modifiedStart+g.modifiedLength-1);if(N.getElements().length>0&&P.getElements().length>0){let x=o(N,P,C,!0).changes;D&&(x=a(x)),T=[];for(let R=0,B=x.length;R1&&x>1;){const R=T.charCodeAt(P-2),B=N.charCodeAt(x-2);if(R!==B)break;P--,x--}(P>1||x>1)&&this._pushTrimWhitespaceCharChange(m,C+1,1,P,w+1,1,x)}{let P=d(T,1),x=d(N,1);const R=T.length+1,B=N.length+1;for(;P!0;const s=Date.now();return()=>Date.now()-snew L.LegacyLinesDiffComputer,getDefault:()=>new k.DefaultLinesDiffComputer}}),define(ie[284],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class L{constructor(y,E,_,p,S,v,b){this.id=y,this.label=E,this.alias=_,this.metadata=p,this._precondition=S,this._run=v,this._contextKeyService=b}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(y){return this.isSupported()?this._run(y):Promise.resolve(void 0)}}e.InternalEditorAction=L}),define(ie[178],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(ie[151],ne([1,0,178]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isCompositeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function k(p){return p&&typeof p.getEditorType=="function"?p.getEditorType()===L.EditorType.ICodeEditor:!1}e.isCodeEditor=k;function y(p){return p&&typeof p.getEditorType=="function"?p.getEditorType()===L.EditorType.IDiffEditor:!1}e.isDiffEditor=y;function E(p){return!!p&&typeof p=="object"&&typeof p.onDidChangeActiveEditor=="function"}e.isCompositeEditor=E;function _(p){return k(p)?p:y(p)?p.getModifiedEditor():E(p)&&k(p.activeCodeEditor)?p.activeCodeEditor:null}e.getCodeEditor=_}),define(ie[152],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const L=[];function k(E){L.push(E)}e.registerEditorFeature=k;function y(){return L.slice(0)}e.getEditorFeatures=y}),define(ie[503],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class L{get type(){return this._theme.type}get value(){return this._theme}constructor(y){this._theme=y}update(y){this._theme=y}getColor(y){return this._theme.getColor(y)}}e.EditorTheme=L}),define(ie[128],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=void 0;class L{static getLanguageId(y){return(y&255)>>>0}static getTokenType(y){return(y&768)>>>8}static containsBalancedBrackets(y){return(y&1024)!==0}static getFontStyle(y){return(y&30720)>>>11}static getForeground(y){return(y&16744448)>>>15}static getBackground(y){return(y&4278190080)>>>24}static getClassNameFromMetadata(y){let _="mtk"+this.getForeground(y);const p=this.getFontStyle(y);return p&1&&(_+=" mtki"),p&2&&(_+=" mtkb"),p&4&&(_+=" mtku"),p&8&&(_+=" mtks"),_}static getInlineStyleFromMetadata(y,E){const _=this.getForeground(y),p=this.getFontStyle(y);let S=`color: ${E[_]};`;p&1&&(S+="font-style: italic;"),p&2&&(S+="font-weight: bold;");let v="";return p&4&&(v+=" underline"),p&8&&(v+=" line-through"),v&&(S+=`text-decoration:${v};`),S}static getPresentationFromMetadata(y){const E=this.getForeground(y),_=this.getFontStyle(y);return{foreground:E,italic:!!(_&1),bold:!!(_&2),underline:!!(_&4),strikethrough:!!(_&8)}}}e.TokenMetadata=L}),define(ie[504],ne([1,0,38]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeDefaultDocumentColors=void 0;function k(i){const n=[];for(const t of i){const a=Number(t);(a||a===0&&t.replace(/\s/g,"")!=="")&&n.push(a)}return n}function y(i,n,t,a){return{red:i/255,blue:t/255,green:n/255,alpha:a}}function E(i,n){const t=n.index,a=n[0].length;if(!t)return;const u=i.positionAt(t);return{startLineNumber:u.lineNumber,startColumn:u.column,endLineNumber:u.lineNumber,endColumn:u.column+a}}function _(i,n){if(!i)return;const t=L.Color.Format.CSS.parseHex(n);if(t)return{range:i,color:y(t.rgba.r,t.rgba.g,t.rgba.b,t.rgba.a)}}function p(i,n,t){if(!i||n.length!==1)return;const u=n[0].values(),f=k(u);return{range:i,color:y(f[0],f[1],f[2],t?f[3]:1)}}function S(i,n,t){if(!i||n.length!==1)return;const u=n[0].values(),f=k(u),c=new L.Color(new L.HSLA(f[0],f[1]/100,f[2]/100,t?f[3]:1));return{range:i,color:y(c.rgba.r,c.rgba.g,c.rgba.b,c.rgba.a)}}function v(i,n){return typeof i=="string"?[...i.matchAll(n)]:i.findMatches(n)}function b(i){const n=[],a=v(i,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(a.length>0)for(const u of a){const f=u.filter(l=>l!==void 0),c=f[1],d=f[2];if(!d)continue;let r;if(c==="rgb"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;r=p(E(i,u),v(d,l),!1)}else if(c==="rgba"){const l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=p(E(i,u),v(d,l),!0)}else if(c==="hsl"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;r=S(E(i,u),v(d,l),!1)}else if(c==="hsla"){const l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;r=S(E(i,u),v(d,l),!0)}else c==="#"&&(r=_(E(i,u),c+d));r&&n.push(r)}return n}function o(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:b(i)}e.computeDefaultDocumentColors=o}),define(ie[111],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var L;(function(_){_[_.None=0]="None",_[_.Indent=1]="Indent",_[_.IndentOutdent=2]="IndentOutdent",_[_.Outdent=3]="Outdent"})(L||(e.IndentAction=L={}));class k{constructor(p){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=p.open,this.close=p.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(p.notIn))for(let S=0,v=p.notIn.length;Sn&&(n=d),c>t&&(t=c),r>t&&(t=r)}n++,t++;const a=new k(t,n,0);for(let u=0,f=i.length;u=this._maxCharCode?0:this._states.get(i,n)}}e.StateMachine=y;let E=null;function _(){return E===null&&(E=new y([[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]])),E}let p=null;function S(){if(p===null){p=new L.CharacterClassifier(0);const o=` <>'"\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 n=0;na);if(a>0){const c=n.charCodeAt(a-1),d=n.charCodeAt(f);(c===40&&d===41||c===91&&d===93||c===123&&d===125)&&f--}return{range:{startLineNumber:t,startColumn:a+1,endLineNumber:t,endColumn:f+2},url:n.substring(a,f+1)}}static computeLinks(i,n=_()){const t=S(),a=[];for(let u=1,f=i.getLineCount();u<=f;u++){const c=i.getLineContent(u),d=c.length;let r=0,l=0,s=0,g=1,h=!1,m=!1,C=!1,w=!1;for(;r0&&E.getLanguageId(o-1)===v;)o--;return new k(E,v,o,b+1,E.getStartOffset(o),E.getEndOffset(b))}e.createScopedLineTokens=L;class k{constructor(_,p,S,v,b,o){this._scopedLineTokensBrand=void 0,this._actual=_,this.languageId=p,this._firstTokenIndex=S,this._lastTokenIndex=v,this.firstCharOffset=b,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(_){return this._actual.getLineContent().substring(0,this.firstCharOffset+_)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(_){return this._actual.findTokenIndexAtOffset(_+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(_){return this._actual.getStandardTokenType(_+this._firstTokenIndex)}}e.ScopedLineTokens=k;function y(E){return(E&3)!==0}e.ignoreBracketsInToken=y}),define(ie[75],ne([1,0,11,5,24,129,84,203]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorConfiguration=void 0;const S=()=>!0,v=()=>!1,b=c=>c===" "||c===" ";class o{static shouldRecreate(d){return d.hasChanged(143)||d.hasChanged(129)||d.hasChanged(37)||d.hasChanged(76)||d.hasChanged(78)||d.hasChanged(79)||d.hasChanged(6)||d.hasChanged(7)||d.hasChanged(11)||d.hasChanged(9)||d.hasChanged(10)||d.hasChanged(14)||d.hasChanged(127)||d.hasChanged(50)||d.hasChanged(90)}constructor(d,r,l,s){var g;this.languageConfigurationService=s,this._cursorMoveConfigurationBrand=void 0,this._languageId=d;const h=l.options,m=h.get(143),C=h.get(50);this.readOnly=h.get(90),this.tabSize=r.tabSize,this.indentSize=r.indentSize,this.insertSpaces=r.insertSpaces,this.stickyTabStops=h.get(115),this.lineHeight=C.lineHeight,this.typicalHalfwidthCharacterWidth=C.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(m.height/this.lineHeight)-2),this.useTabStops=h.get(127),this.wordSeparators=h.get(129),this.emptySelectionClipboard=h.get(37),this.copyWithSyntaxHighlighting=h.get(25),this.multiCursorMergeOverlapping=h.get(76),this.multiCursorPaste=h.get(78),this.multiCursorLimit=h.get(79),this.autoClosingBrackets=h.get(6),this.autoClosingComments=h.get(7),this.autoClosingQuotes=h.get(11),this.autoClosingDelete=h.get(9),this.autoClosingOvertype=h.get(10),this.autoSurround=h.get(14),this.autoIndent=h.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(d,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(d,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(d,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(d).getAutoClosingPairs();const w=this.languageConfigurationService.getLanguageConfiguration(d).getSurroundingPairs();if(w)for(const I of w)this.surroundingPairs[I.open]=I.close;const D=this.languageConfigurationService.getLanguageConfiguration(d).comments;this.blockCommentStartToken=(g=D?.blockCommentStartToken)!==null&&g!==void 0?g:null}get electricChars(){var d;if(!this._electricChars){this._electricChars={};const r=(d=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||d===void 0?void 0:d.getElectricCharacters();if(r)for(const l of r)this._electricChars[l]=!0}return this._electricChars}onElectricCharacter(d,r,l){const s=(0,E.createScopedLineTokens)(r,l-1),g=this.languageConfigurationService.getLanguageConfiguration(s.languageId).electricCharacter;return g?g.onElectricCharacter(d,s,l-s.firstCharOffset):null}normalizeIndentation(d){return(0,p.normalizeIndentation)(d,this.indentSize,this.insertSpaces)}_getShouldAutoClose(d,r,l){switch(r){case"beforeWhitespace":return b;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(d,l);case"always":return S;case"never":return v}}_getLanguageDefinedShouldAutoClose(d,r){const l=this.languageConfigurationService.getLanguageConfiguration(d).getAutoCloseBeforeSet(r);return s=>l.indexOf(s)!==-1}visibleColumnFromColumn(d,r){return _.CursorColumns.visibleColumnFromColumn(d.getLineContent(r.lineNumber),r.column,this.tabSize)}columnFromVisibleColumn(d,r,l){const s=_.CursorColumns.columnFromVisibleColumn(d.getLineContent(r),l,this.tabSize),g=d.getLineMinColumn(r);if(sh?h:s}}e.CursorConfiguration=o;class i{static fromModelState(d){return new n(d)}static fromViewState(d){return new t(d)}static fromModelSelection(d){const r=y.Selection.liftSelection(d),l=new a(k.Range.fromPositions(r.getSelectionStart()),0,0,r.getPosition(),0);return i.fromModelState(l)}static fromModelSelections(d){const r=[];for(let l=0,s=d.length;lo,a=b>i,u=bi||gb||s0&&b--,E.columnSelect(p,S,v.fromViewLineNumber,v.fromViewVisualColumn,v.toViewLineNumber,b)}static columnSelectRight(p,S,v){let b=0;const o=Math.min(v.fromViewLineNumber,v.toViewLineNumber),i=Math.max(v.fromViewLineNumber,v.toViewLineNumber);for(let t=o;t<=i;t++){const a=S.getLineMaxColumn(t),u=p.visibleColumnFromColumn(S,new k.Position(t,a));b=Math.max(b,u)}let n=v.toViewVisualColumn;return no.getLineMinColumn(i.lineNumber))return i.delta(void 0,-L.prevCharLength(o.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new y.Position(n,o.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(o,i,n){if(i.column<=o.getLineIndentColumn(i.lineNumber)){const t=o.getLineMinColumn(i.lineNumber),a=o.getLineContent(i.lineNumber),u=_.AtomicTabMoveOperations.atomicPosition(a,i.column-1,n,0);if(u!==-1&&u+1>=t)return new y.Position(i.lineNumber,u+1)}return this.leftPosition(o,i)}static left(o,i,n){const t=o.stickyTabStops?v.leftPositionAtomicSoftTabs(i,n,o.tabSize):v.leftPosition(i,n);return new S(t.lineNumber,t.column,0)}static moveLeft(o,i,n,t,a){let u,f;if(n.hasSelection()&&!t)u=n.selection.startLineNumber,f=n.selection.startColumn;else{const c=n.position.delta(void 0,-(a-1)),d=i.normalizePosition(v.clipPositionColumn(c,i),0),r=v.left(o,i,d);u=r.lineNumber,f=r.column}return n.move(t,u,f,0)}static clipPositionColumn(o,i){return new y.Position(o.lineNumber,v.clipRange(o.column,i.getLineMinColumn(o.lineNumber),i.getLineMaxColumn(o.lineNumber)))}static clipRange(o,i,n){return on?n:o}static rightPosition(o,i,n){return nr?(n=r,f?t=i.getLineMaxColumn(n):t=Math.min(i.getLineMaxColumn(n),t)):t=o.columnFromVisibleColumn(i,n,d),g?a=0:a=d-k.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),t,o.tabSize),c!==void 0){const h=new y.Position(n,t),m=i.normalizePosition(h,c);a=a+(t-m.column),n=m.lineNumber,t=m.column}return new S(n,t,a)}static down(o,i,n,t,a,u,f){return this.vertical(o,i,n,t,a,n+u,f,4)}static moveDown(o,i,n,t,a){let u,f;n.hasSelection()&&!t?(u=n.selection.endLineNumber,f=n.selection.endColumn):(u=n.position.lineNumber,f=n.position.column);let c=0,d;do if(d=v.down(o,i,u+c,f,n.leftoverVisibleColumns,a,!0),i.normalizePosition(new y.Position(d.lineNumber,d.column),2).lineNumber>u)break;while(c++<10&&u+c1&&this._isBlankLine(i,a);)a--;for(;a>1&&!this._isBlankLine(i,a);)a--;return n.move(t,a,i.getLineMinColumn(a),0)}static moveToNextBlankLine(o,i,n,t){const a=i.getLineCount();let u=n.position.lineNumber;for(;u=s.length+1)return!1;const g=s.charAt(l.column-2),h=t.get(g);if(!h)return!1;if((0,y.isQuote)(g)){if(n==="never")return!1}else if(i==="never")return!1;const m=s.charAt(l.column-1);let C=!1;for(const w of h)w.open===g&&w.close===m&&(C=!0);if(!C)return!1;if(o==="auto"){let w=!1;for(let D=0,I=f.length;D1){const a=i.getLineContent(t.lineNumber),u=L.firstNonWhitespaceIndex(a),f=u===-1?a.length+1:u+1;if(t.column<=f){const c=n.visibleColumnFromColumn(i,t),d=E.CursorColumns.prevIndentTabStop(c,n.indentSize),r=n.columnFromVisibleColumn(i,t.lineNumber,d);return new p.Range(t.lineNumber,r,t.lineNumber,t.column)}}return p.Range.fromPositions(v.getPositionAfterDeleteLeft(t,i),t)}static getPositionAfterDeleteLeft(o,i){if(o.column>1){const n=L.getLeftDeleteOffset(o.column-1,i.getLineContent(o.lineNumber));return o.with(void 0,n+1)}else if(o.lineNumber>1){const n=o.lineNumber-1;return new S.Position(n,i.getLineMaxColumn(n))}else return o}static cut(o,i,n){const t=[];let a=null;n.sort((u,f)=>S.Position.compare(u.getStartPosition(),f.getEndPosition()));for(let u=0,f=n.length;u1&&a?.endLineNumber!==d.lineNumber?(r=d.lineNumber-1,l=i.getLineMaxColumn(d.lineNumber-1),s=d.lineNumber,g=i.getLineMaxColumn(d.lineNumber)):(r=d.lineNumber,l=1,s=d.lineNumber,g=i.getLineMaxColumn(d.lineNumber));const h=new p.Range(r,l,s,g);a=h,h.isEmpty()?t[u]=null:t[u]=new k.ReplaceCommand(h,"")}else t[u]=null;else t[u]=new k.ReplaceCommand(c,"")}return new y.EditOperationResult(0,t,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=v}),define(ie[179],ne([1,0,12,75,207,148,11,5]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class S{static _createWord(i,n,t,a,u){return{start:a,end:u,wordType:n,nextCharClass:t}}static _findPreviousWordOnLine(i,n,t){const a=n.getLineContent(t.lineNumber);return this._doFindPreviousWordOnLine(a,i,t)}static _doFindPreviousWordOnLine(i,n,t){let a=0;for(let u=t.column-2;u>=0;u--){const f=i.charCodeAt(u),c=n.get(f);if(c===0){if(a===2)return this._createWord(i,a,c,u+1,this._findEndOfWord(i,n,a,u+1));a=1}else if(c===2){if(a===1)return this._createWord(i,a,c,u+1,this._findEndOfWord(i,n,a,u+1));a=2}else if(c===1&&a!==0)return this._createWord(i,a,c,u+1,this._findEndOfWord(i,n,a,u+1))}return a!==0?this._createWord(i,a,1,0,this._findEndOfWord(i,n,a,0)):null}static _findEndOfWord(i,n,t,a){const u=i.length;for(let f=a;f=0;u--){const f=i.charCodeAt(u),c=n.get(f);if(c===1||t===1&&c===2||t===2&&c===0)return u+1}return 0}static moveWordLeft(i,n,t,a){let u=t.lineNumber,f=t.column;f===1&&u>1&&(u=u-1,f=n.getLineMaxColumn(u));let c=S._findPreviousWordOnLine(i,n,new _.Position(u,f));if(a===0)return new _.Position(u,c?c.start+1:1);if(a===1)return c&&c.wordType===2&&c.end-c.start===1&&c.nextCharClass===0&&(c=S._findPreviousWordOnLine(i,n,new _.Position(u,c.start+1))),new _.Position(u,c?c.start+1:1);if(a===3){for(;c&&c.wordType===2;)c=S._findPreviousWordOnLine(i,n,new _.Position(u,c.start+1));return new _.Position(u,c?c.start+1:1)}return c&&f<=c.end+1&&(c=S._findPreviousWordOnLine(i,n,new _.Position(u,c.start+1))),new _.Position(u,c?c.end+1:1)}static _moveWordPartLeft(i,n){const t=n.lineNumber,a=i.getLineMaxColumn(t);if(n.column===1)return t>1?new _.Position(t-1,i.getLineMaxColumn(t-1)):n;const u=i.getLineContent(t);for(let f=n.column-1;f>1;f--){const c=u.charCodeAt(f-2),d=u.charCodeAt(f-1);if(c===95&&d!==95)return new _.Position(t,f);if(c===45&&d!==45)return new _.Position(t,f);if((L.isLowerAsciiLetter(c)||L.isAsciiDigit(c))&&L.isUpperAsciiLetter(d))return new _.Position(t,f);if(L.isUpperAsciiLetter(c)&&L.isUpperAsciiLetter(d)&&f+1=d.start+1&&(d=S._findNextWordOnLine(i,n,new _.Position(u,d.end+1))),d?f=d.start+1:f=n.getLineMaxColumn(u);return new _.Position(u,f)}static _moveWordPartRight(i,n){const t=n.lineNumber,a=i.getLineMaxColumn(t);if(n.column===a)return t1?r=1:(d--,r=a.getLineMaxColumn(d)):(l&&r<=l.end+1&&(l=S._findPreviousWordOnLine(t,a,new _.Position(d,l.start+1))),l?r=l.end+1:r>1?r=1:(d--,r=a.getLineMaxColumn(d))),new p.Range(d,r,c.lineNumber,c.column)}static deleteInsideWord(i,n,t){if(!t.isEmpty())return t;const a=new _.Position(t.positionLineNumber,t.positionColumn),u=this._deleteInsideWordWhitespace(n,a);return u||this._deleteInsideWordDetermineDeleteRange(i,n,a)}static _charAtIsWhitespace(i,n){const t=i.charCodeAt(n);return t===32||t===9}static _deleteInsideWordWhitespace(i,n){const t=i.getLineContent(n.lineNumber),a=t.length;if(a===0)return null;let u=Math.max(n.column-2,0);if(!this._charAtIsWhitespace(t,u))return null;let f=Math.min(n.column-1,a-1);if(!this._charAtIsWhitespace(t,f))return null;for(;u>0&&this._charAtIsWhitespace(t,u-1);)u--;for(;f+11?new p.Range(t.lineNumber-1,n.getLineMaxColumn(t.lineNumber-1),t.lineNumber,1):t.lineNumbers.start+1<=t.column&&t.column<=s.end+1,c=(s,g)=>(s=Math.min(s,t.column),g=Math.max(g,t.column),new p.Range(t.lineNumber,s,t.lineNumber,g)),d=s=>{let g=s.start+1,h=s.end+1,m=!1;for(;h-11&&this._charAtIsWhitespace(a,g-2);)g--;return c(g,h)},r=S._findPreviousWordOnLine(i,n,t);if(r&&f(r))return d(r);const l=S._findNextWordOnLine(i,n,t);return l&&f(l)?d(l):r&&l?c(r.end+1,l.start+1):r?c(r.start+1,r.end+1):l?c(l.start+1,l.end+1):c(1,u+1)}static _deleteWordPartLeft(i,n){if(!n.isEmpty())return n;const t=n.getPosition(),a=S._moveWordPartLeft(i,t);return new p.Range(t.lineNumber,t.column,a.lineNumber,a.column)}static _findFirstNonWhitespaceChar(i,n){const t=i.length;for(let a=n;a=g.start+1&&(g=S._findNextWordOnLine(t,a,new _.Position(d,g.end+1))),g?r=g.start+1:r!!i)}}),define(ie[208],ne([1,0,20,75,206,179,11,5]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class S{static addCursorDown(o,i,n){const t=[];let a=0;for(let u=0,f=i.length;ud&&(r=d,l=o.model.getLineMaxColumn(r)),k.CursorState.fromModelState(new k.SingleCursorState(new p.Range(u.lineNumber,1,r,l),2,0,new _.Position(r,l),0))}const c=i.modelState.selectionStart.getStartPosition().lineNumber;if(u.lineNumberc){const d=o.getLineCount();let r=f.lineNumber+1,l=1;return r>d&&(r=d,l=o.getLineMaxColumn(r)),k.CursorState.fromViewState(i.viewState.move(!0,r,l,0))}else{const d=i.modelState.selectionStart.getEndPosition();return k.CursorState.fromModelState(i.modelState.move(!0,d.lineNumber,d.column,0))}}static word(o,i,n,t){const a=o.model.validatePosition(t);return k.CursorState.fromModelState(E.WordOperations.word(o.cursorConfig,o.model,i.modelState,n,a))}static cancelSelection(o,i){if(!i.modelState.hasSelection())return new k.CursorState(i.modelState,i.viewState);const n=i.viewState.position.lineNumber,t=i.viewState.position.column;return k.CursorState.fromViewState(new k.SingleCursorState(new p.Range(n,t,n,t),0,0,new _.Position(n,t),0))}static moveTo(o,i,n,t,a){if(n){if(i.modelState.selectionStartKind===1)return this.word(o,i,n,t);if(i.modelState.selectionStartKind===2)return this.line(o,i,n,t,a)}const u=o.model.validatePosition(t),f=a?o.coordinatesConverter.validateViewPosition(new _.Position(a.lineNumber,a.column),u):o.coordinatesConverter.convertModelPositionToViewPosition(u);return k.CursorState.fromViewState(i.viewState.move(n,f.lineNumber,f.column,0))}static simpleMove(o,i,n,t,a,u){switch(n){case 0:return u===4?this._moveHalfLineLeft(o,i,t):this._moveLeft(o,i,t,a);case 1:return u===4?this._moveHalfLineRight(o,i,t):this._moveRight(o,i,t,a);case 2:return u===2?this._moveUpByViewLines(o,i,t,a):this._moveUpByModelLines(o,i,t,a);case 3:return u===2?this._moveDownByViewLines(o,i,t,a):this._moveDownByModelLines(o,i,t,a);case 4:return u===2?i.map(f=>k.CursorState.fromViewState(y.MoveOperations.moveToPrevBlankLine(o.cursorConfig,o,f.viewState,t))):i.map(f=>k.CursorState.fromModelState(y.MoveOperations.moveToPrevBlankLine(o.cursorConfig,o.model,f.modelState,t)));case 5:return u===2?i.map(f=>k.CursorState.fromViewState(y.MoveOperations.moveToNextBlankLine(o.cursorConfig,o,f.viewState,t))):i.map(f=>k.CursorState.fromModelState(y.MoveOperations.moveToNextBlankLine(o.cursorConfig,o.model,f.modelState,t)));case 6:return this._moveToViewMinColumn(o,i,t);case 7:return this._moveToViewFirstNonWhitespaceColumn(o,i,t);case 8:return this._moveToViewCenterColumn(o,i,t);case 9:return this._moveToViewMaxColumn(o,i,t);case 10:return this._moveToViewLastNonWhitespaceColumn(o,i,t);default:return null}}static viewportMove(o,i,n,t,a){const u=o.getCompletelyVisibleViewRange(),f=o.coordinatesConverter.convertViewRangeToModelRange(u);switch(n){case 11:{const c=this._firstLineNumberInRange(o.model,f,a),d=o.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(o,i[0],t,c,d)]}case 13:{const c=this._lastLineNumberInRange(o.model,f,a),d=o.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(o,i[0],t,c,d)]}case 12:{const c=Math.round((f.startLineNumber+f.endLineNumber)/2),d=o.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(o,i[0],t,c,d)]}case 14:{const c=[];for(let d=0,r=i.length;dn.endLineNumber-1?u=n.endLineNumber-1:ak.CursorState.fromViewState(y.MoveOperations.moveLeft(o.cursorConfig,o,a.viewState,n,t)))}static _moveHalfLineLeft(o,i,n){const t=[];for(let a=0,u=i.length;ak.CursorState.fromViewState(y.MoveOperations.moveRight(o.cursorConfig,o,a.viewState,n,t)))}static _moveHalfLineRight(o,i,n){const t=[];for(let a=0,u=i.length;ao.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(o=>o.asCursorState())}getViewPositions(){return this.cursors.map(o=>o.viewState.position)}getTopMostViewPosition(){return(0,k.findFirstMinBy)(this.cursors,(0,L.compareBy)(o=>o.viewState.position,_.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,k.findLastMaxBy)(this.cursors,(0,L.compareBy)(o=>o.viewState.position,_.Position.compare)).viewState.position}getSelections(){return this.cursors.map(o=>o.modelState.selection)}getViewSelections(){return this.cursors.map(o=>o.viewState.selection)}setSelections(o){this.setStates(y.CursorState.fromModelSelections(o))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(o){o!==null&&(this.cursors[0].setState(this.context,o[0].modelState,o[0].viewState),this._setSecondaryStates(o.slice(1)))}_setSecondaryStates(o){const i=this.cursors.length-1,n=o.length;if(in){const t=i-n;for(let a=0;a=o+1&&this.lastAddedCursorIndex--,this.cursors[o+1].dispose(this.context),this.cursors.splice(o+1,1)}normalize(){if(this.cursors.length===1)return;const o=this.cursors.slice(0),i=[];for(let n=0,t=o.length;nn.selection,p.Range.compareRangesUsingStarts));for(let n=0;nl&&m.index--;o.splice(l,1),i.splice(r,1),this._removeSecondaryCursor(l-1),n--}}}}e.CursorCollection=v}),define(ie[509],ne([1,0,111]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class k{constructor(E){if(E.autoClosingPairs?this._autoClosingPairs=E.autoClosingPairs.map(_=>new L.StandardAutoClosingPairConditional(_)):E.brackets?this._autoClosingPairs=E.brackets.map(_=>new L.StandardAutoClosingPairConditional({open:_[0],close:_[1]})):this._autoClosingPairs=[],E.__electricCharacterSupport&&E.__electricCharacterSupport.docComment){const _=E.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new L.StandardAutoClosingPairConditional({open:_.open,close:_.close||""}))}this._autoCloseBeforeForQuotes=typeof E.autoCloseBefore=="string"?E.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof E.autoCloseBefore=="string"?E.autoCloseBefore:k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=E.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(E){return E?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=k,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> `,k.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> `}),define(ie[510],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function L(y){return y.global&&(y.lastIndex=0),!0}class k{constructor(E){this._indentationRules=E}shouldIncrease(E){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&L(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(E))}shouldDecrease(E){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&L(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(E))}shouldIndentNextLine(E){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&L(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(E))}shouldIgnore(E){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&L(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(E))}getIndentMetadata(E){let _=0;return this.shouldIncrease(E)&&(_+=1),this.shouldDecrease(E)&&(_+=2),this.shouldIndentNextLine(E)&&(_+=4),this.shouldIgnore(E)&&(_+=8),_}}e.IndentRulesSupport=k}),define(ie[511],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class L{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(y,E,_,p,S){if(y&&E){const v=this.doNavigateValueSet(E,S);if(v)return{range:y,value:v}}if(_&&p){const v=this.doNavigateValueSet(p,S);if(v)return{range:_,value:v}}return null}doNavigateValueSet(y,E){const _=this.numberReplace(y,E);return _!==null?_:this.textReplace(y,E)}numberReplace(y,E){const _=Math.pow(10,y.length-(y.lastIndexOf(".")+1));let p=Number(y);const S=parseFloat(y);return!isNaN(p)&&!isNaN(S)&&p===S?p===0&&!E?null:(p=Math.floor(p*_),p+=E?_:-_,String(p/_)):null}textReplace(y,E){return this.valueSetsReplace(this._defaultValueSet,y,E)}valueSetsReplace(y,E,_){let p=null;for(let S=0,v=y.length;p===null&&S=0?(p+=_?1:-1,p<0?p=y.length-1:p%=y.length,y[p]):null}}e.BasicInplaceReplace=L,L.INSTANCE=new L}),define(ie[512],ne([1,0,264]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class k{constructor(v,b){this.languageId=v;const o=b.brackets?y(b.brackets):[],i=new L.CachedFunction(a=>{const u=new Set;return{info:new _(this,a,u),closing:u}}),n=new L.CachedFunction(a=>{const u=new Set,f=new Set;return{info:new p(this,a,u,f),opening:u,openingColorized:f}});for(const[a,u]of o){const f=i.get(a),c=n.get(u);f.closing.add(c.info),c.opening.add(f.info)}const t=b.colorizedBracketPairs?y(b.colorizedBracketPairs):o.filter(a=>!(a[0]==="<"&&a[1]===">"));for(const[a,u]of t){const f=i.get(a),c=n.get(u);f.closing.add(c.info),c.openingColorized.add(f.info),c.opening.add(f.info)}this._openingBrackets=new Map([...i.cachedValues].map(([a,u])=>[a,u.info])),this._closingBrackets=new Map([...n.cachedValues].map(([a,u])=>[a,u.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(v){return this._openingBrackets.get(v)}getClosingBracketInfo(v){return this._closingBrackets.get(v)}getBracketInfo(v){return this.getOpeningBracketInfo(v)||this.getClosingBracketInfo(v)}}e.LanguageBracketsConfiguration=k;function y(S){return S.filter(([v,b])=>v!==""&&b!=="")}class E{constructor(v,b){this.config=v,this.bracketText=b}get languageId(){return this.config.languageId}}e.BracketKindBase=E;class _ extends E{constructor(v,b,o){super(v,b),this.openedBrackets=o,this.isOpeningBracket=!0}}e.OpeningBracketKind=_;class p extends E{constructor(v,b,o,i){super(v,b),this.openingBrackets=o,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(v){return v.config!==this.config?!1:this.openingBrackets.has(v)}closesColorized(v){return v.config!==this.config?!1:this.openingColorizedBrackets.has(v)}getOpeningBrackets(){return[...this.openingBrackets]}}e.ClosingBracketKind=p}),define(ie[513],ne([1,0,9,12,111]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class E{constructor(p){p=p||{},p.brackets=p.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],p.brackets.forEach(S=>{const v=E._createOpenBracketRegExp(S[0]),b=E._createCloseBracketRegExp(S[1]);v&&b&&this._brackets.push({open:S[0],openRegExp:v,close:S[1],closeRegExp:b})}),this._regExpRules=p.onEnterRules||[]}onEnter(p,S,v,b){if(p>=3)for(let o=0,i=this._regExpRules.length;oa.reg?(a.reg.lastIndex=0,a.reg.test(a.text)):!0))return n.action}if(p>=2&&v.length>0&&b.length>0)for(let o=0,i=this._brackets.length;o=2&&v.length>0){for(let o=0,i=this._brackets.length;o{const w=o(m.token,C.token);return w!==0?w:m.index-C.index});let f=0,c="000000",d="ffffff";for(;a.length>=1&&a[0].token==="";){const m=a.shift();m.fontStyle!==-1&&(f=m.fontStyle),m.foreground!==null&&(c=m.foreground),m.background!==null&&(d=m.background)}const r=new p;for(const m of u)r.getId(m);const l=r.getId(c),s=r.getId(d),g=new i(f,l,s),h=new n(g);for(let m=0,C=a.length;m"u"){const d=this._match(f),r=b(f);c=(d.metadata|r<<8)>>>0,this._cache.set(f,c)}return(c|u<<0)>>>0}}e.TokenTheme=S;const v=/\b(comment|string|regex|regexp)\b/;function b(a){const u=a.match(v);if(!u)return 0;switch(u[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=b;function o(a,u){return au?1:0}e.strcmp=o;class i{constructor(u,f,c){this._themeTrieElementRuleBrand=void 0,this._fontStyle=u,this._foreground=f,this._background=c,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(u,f,c){u!==-1&&(this._fontStyle=u),f!==0&&(this._foreground=f),c!==0&&(this._background=c),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=i;class n{constructor(u){this._themeTrieElementBrand=void 0,this._mainRule=u,this._children=new Map}match(u){if(u==="")return this._mainRule;const f=u.indexOf(".");let c,d;f===-1?(c=u,d=""):(c=u.substring(0,f),d=u.substring(f+1));const r=this._children.get(c);return typeof r<"u"?r.match(d):this._mainRule}insert(u,f,c,d){if(u===""){this._mainRule.acceptOverwrite(f,c,d);return}const r=u.indexOf(".");let l,s;r===-1?(l=u,s=""):(l=u.substring(0,r),s=u.substring(r+1));let g=this._children.get(l);typeof g>"u"&&(g=new n(this._mainRule.clone()),this._children.set(l,g)),g.insert(s,f,c,d)}}e.ThemeTrieElement=n;function t(a){const u=[];for(let f=1,c=a.length;f=p&&(h=h-s%p),h}e.lengthAdd=i;function n(s,g){return s.reduce((h,m)=>i(h,g(m)),e.lengthZero)}e.sumLengths=n;function t(s,g){return s===g}e.lengthEquals=t;function a(s,g){const h=s,m=g;if(m-h<=0)return e.lengthZero;const w=Math.floor(h/p),D=Math.floor(m/p),I=m-D*p;if(w===D){const M=h-w*p;return S(0,I-M)}else return S(D-w,I)}e.lengthDiffNonNegative=a;function u(s,g){return s=g}e.lengthGreaterThanEqual=c;function d(s){return S(s.lineNumber-1,s.column-1)}e.positionToLength=d;function r(s,g){const h=s,m=Math.floor(h/p),C=h-m*p,w=g,D=Math.floor(w/p),I=w-D*p;return new k.Range(m+1,C+1,D+1,I+1)}e.lengthsToRange=r;function l(s){const g=(0,L.splitLines)(s);return S(g.length-1,g[g.length-1].length)}e.lengthOfString=l}),define(ie[180],ne([1,0,5,89]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class y{static fromModelContentChanges(S){return S.map(b=>{const o=L.Range.lift(b.range);return new y((0,k.positionToLength)(o.getStartPosition()),(0,k.positionToLength)(o.getEndPosition()),(0,k.lengthOfString)(b.text))}).reverse()}constructor(S,v,b){this.startOffset=S,this.endOffset=v,this.newLength=b}toString(){return`[${(0,k.lengthToObj)(this.startOffset)}...${(0,k.lengthToObj)(this.endOffset)}) -> ${(0,k.lengthToObj)(this.newLength)}`}}e.TextEditInfo=y;class E{constructor(S){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=S.map(v=>_.from(v))}getOffsetBeforeChange(S){return this.adjustNextEdit(S),this.translateCurToOld(S)}getDistanceToNextChange(S){this.adjustNextEdit(S);const v=this.edits[this.nextEditIdx],b=v?this.translateOldToCur(v.offsetObj):null;return b===null?null:(0,k.lengthDiffNonNegative)(S,b)}translateOldToCur(S){return S.lineCount===this.deltaLineIdxInOld?(0,k.toLength)(S.lineCount+this.deltaOldToNewLineCount,S.columnCount+this.deltaOldToNewColumnCount):(0,k.toLength)(S.lineCount+this.deltaOldToNewLineCount,S.columnCount)}translateCurToOld(S){const v=(0,k.lengthToObj)(S);return v.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,k.toLength)(v.lineCount-this.deltaOldToNewLineCount,v.columnCount-this.deltaOldToNewColumnCount):(0,k.toLength)(v.lineCount-this.deltaOldToNewLineCount,v.columnCount)}adjustNextEdit(S){for(;this.nextEditIdx!0)||[];return i&&d.unshift(i),d}const c=[];for(;i&&!(0,y.lengthIsZero)(f);){const[d,r]=i.splitAt(f);c.push(d),f=(0,y.lengthDiffNonNegative)(d.lengthAfter,f),i=r??b.dequeue()}return(0,y.lengthIsZero)(f)||c.push(new _(!1,f,f)),c}const t=[];function a(f,c,d){if(t.length>0&&(0,y.lengthEquals)(t[t.length-1].endOffset,f)){const r=t[t.length-1];t[t.length-1]=new k.TextEditInfo(r.startOffset,c,(0,y.lengthAdd)(r.newLength,d))}else t.push({startOffset:f,endOffset:c,newLength:d})}let u=y.lengthZero;for(const f of o){const c=n(f.lengthBefore);if(f.modified){const d=(0,y.sumLengths)(c,l=>l.lengthBefore),r=(0,y.lengthAdd)(u,d);a(u,r,f.lengthAfter),u=r}else for(const d of c){const r=u;u=(0,y.lengthAdd)(u,d.lengthBefore),d.modified&&a(r,u,d.lengthAfter)}}return t}e.combineTextEditInfos=E;class _{constructor(v,b,o){this.modified=v,this.lengthBefore=b,this.lengthAfter=o}splitAt(v){const b=(0,y.lengthDiffNonNegative)(v,this.lengthAfter);return(0,y.lengthEquals)(b,y.lengthZero)?[this,void 0]:this.modified?[new _(this.modified,this.lengthBefore,v),new _(this.modified,y.lengthZero,b)]:[new _(this.modified,v,v),new _(this.modified,b,b)]}toString(){return`${this.modified?"M":"U"}:${(0,y.lengthToObj)(this.lengthBefore)} -> ${(0,y.lengthToObj)(this.lengthAfter)}`}}function p(S){const v=[];let b=y.lengthZero;for(const o of S){const i=(0,y.lengthDiffNonNegative)(b,o.startOffset);(0,y.lengthIsZero)(i)||v.push(new _(!1,i,i));const n=(0,y.lengthDiffNonNegative)(o.startOffset,o.endOffset);v.push(new _(!0,n,o.newLength)),b=o.endOffset}return v}}),define(ie[515],ne([1,0,89]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class k{constructor(p){this.lastOffset=L.lengthZero,this.nextNodes=[p],this.offsets=[L.lengthZero],this.idxs=[]}readLongestNodeAt(p,S){if((0,L.lengthLessThan)(p,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=p;;){const v=E(this.nextNodes);if(!v)return;const b=E(this.offsets);if((0,L.lengthLessThan)(p,b))return;if((0,L.lengthLessThan)(b,p))if((0,L.lengthAdd)(b,v.length)<=p)this.nextNodeAfterCurrent();else{const o=y(v);o!==-1?(this.nextNodes.push(v.getChild(o)),this.offsets.push(b),this.idxs.push(o)):this.nextNodeAfterCurrent()}else{if(S(v))return this.nextNodeAfterCurrent(),v;{const o=y(v);if(o===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(v.getChild(o)),this.offsets.push(b),this.idxs.push(o)}}}}nextNodeAfterCurrent(){for(;;){const p=E(this.offsets),S=E(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const v=E(this.nextNodes),b=y(v,this.idxs[this.idxs.length-1]);if(b!==-1){this.nextNodes.push(v.getChild(b)),this.offsets.push((0,L.lengthAdd)(p,S.length)),this.idxs[this.idxs.length-1]=b;break}else this.idxs.pop()}}}e.NodeReader=k;function y(_,p=-1){for(;;){if(p++,p>=_.childrenLength)return-1;if(_.getChild(p))return p}}function E(_){return _.length>0?_[_.length-1]:void 0}}),define(ie[130],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const L=[];class k{static create(_,p){if(_<=128&&p.length===0){let S=k.cache[_];return S||(S=new k(_,p),k.cache[_]=S),S}return new k(_,p)}static getEmpty(){return this.empty}constructor(_,p){this.items=_,this.additionalItems=p}add(_,p){const S=p.getKey(_);let v=S>>5;if(v===0){const o=1<=v.length)return null;const a=b,u=v[a].listHeight;for(b++;b=2?y(a===0&&b===v.length?v:v.slice(a,b),!1):v[a]}let i=o(),n=o();if(!n)return i;for(let a=o();a;a=o())E(i,n)<=E(n,a)?(i=_(i,n),n=a):n=_(n,a);return _(i,n)}e.concat23Trees=k;function y(v,b=!1){if(v.length===0)return null;if(v.length===1)return v[0];let o=v.length;for(;o>3;){const i=o>>1;for(let n=0;n=3?v[2]:null,b)}e.concat23TreesOfSameHeight=y;function E(v,b){return Math.abs(v.listHeight-b.listHeight)}function _(v,b){return v.listHeight===b.listHeight?L.ListAstNode.create23(v,b,null,!1):v.listHeight>b.listHeight?p(v,b):S(b,v)}function p(v,b){v=v.toMutable();let o=v;const i=[];let n;for(;;){if(b.listHeight===o.listHeight){n=b;break}if(o.kind!==4)throw new Error("unexpected");i.push(o),o=o.makeLastElementMutable()}for(let t=i.length-1;t>=0;t--){const a=i[t];n?a.childrenLength>=3?n=L.ListAstNode.create23(a.unappendChild(),n,null,!1):(a.appendChildOfSameHeight(n),n=void 0):a.handleChildrenChanged()}return n?L.ListAstNode.create23(v,n,null,!1):v}function S(v,b){v=v.toMutable();let o=v;const i=[];for(;b.listHeight!==o.listHeight;){if(o.kind!==4)throw new Error("unexpected");i.push(o),o=o.makeFirstElementMutable()}let n=b;for(let t=i.length-1;t>=0;t--){const a=i[t];n?a.childrenLength>=3?n=L.ListAstNode.create23(n,a.unprependChild(),null,!1):(a.prependChildOfSameHeight(n),n=void 0):a.handleChildrenChanged()}return n?L.ListAstNode.create23(n,v,null,!1):v}}),define(ie[286],ne([1,0,181,180,130,89,516,515]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function S(b,o,i,n){return new v(b,o,i,n).parseDocument()}e.parseDocument=S;class v{constructor(o,i,n,t){if(this.tokenizer=o,this.createImmutableLists=t,this._itemsConstructed=0,this._itemsFromCache=0,n&&t)throw new Error("Not supported");this.oldNodeReader=n?new p.NodeReader(n):void 0,this.positionMapper=new k.BeforeEditPositionMapper(i)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let o=this.parseList(y.SmallImmutableSet.getEmpty(),0);return o||(o=L.ListAstNode.getEmpty()),o}parseList(o,i){const n=[];for(;;){let a=this.tryReadChildFromCache(o);if(!a){const u=this.tokenizer.peek();if(!u||u.kind===2&&u.bracketIds.intersects(o))break;a=this.parseChild(o,i+1)}a.kind===4&&a.childrenLength===0||n.push(a)}return this.oldNodeReader?(0,_.concat23Trees)(n):(0,_.concat23TreesOfSameHeight)(n,this.createImmutableLists)}tryReadChildFromCache(o){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(i===null||!(0,E.lengthIsZero)(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),t=>i!==null&&!(0,E.lengthLessThan)(t.length,i)?!1:t.canBeReused(o));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(o,i){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new L.InvalidBracketAstNode(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(i>300)return new L.TextAstNode(n.length);const t=o.merge(n.bracketIds),a=this.parseList(t,i+1),u=this.tokenizer.peek();return u&&u.kind===2&&(u.bracketId===n.bracketId||u.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),L.PairAstNode.create(n.astNode,a,u.astNode)):L.PairAstNode.create(n.astNode,a,null)}default:throw new Error("unexpected")}}}}),define(ie[209],ne([1,0,9,128,181,89,130]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class p{constructor(i,n,t,a,u){this.length=i,this.kind=n,this.bracketId=t,this.bracketIds=a,this.astNode=u}}e.Token=p;class S{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.reader=new v(this.textModel,this.bracketTokens),this._offset=E.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,E.toLength)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(i){this.didPeek=!1,this._offset=(0,E.lengthAdd)(this._offset,i);const n=(0,E.lengthToObj)(this._offset);this.reader.setPosition(n.lineCount,n.columnCount)}read(){let i;return this.peeked?(this.didPeek=!1,i=this.peeked):i=this.reader.read(),i&&(this._offset=(0,E.lengthAdd)(this._offset,i.length)),i}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=S;class v{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}setPosition(i,n){i===this.lineIdx?(this.lineCharOffset=n,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=i,this.lineCharOffset=n,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const u=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,E.lengthGetColumnCountIfZeroLineCount)(u.length),u}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 i=this.lineIdx,n=this.lineCharOffset;let t=0;for(;;){const u=this.lineTokens,f=u.getCount();let c=null;if(this.lineTokenOffset1e3))break;if(t>1500)break}const a=(0,E.lengthDiff)(i,n,this.lineIdx,this.lineCharOffset);return new p(a,0,-1,_.SmallImmutableSet.getEmpty(),new y.TextAstNode(a))}}class b{constructor(i,n){this.text=i,this._offset=E.lengthZero,this.idx=0;const t=n.getRegExpStr(),a=t?new RegExp(t+`| `,"gi"):null,u=[];let f,c=0,d=0,r=0,l=0;const s=[];for(let m=0;m<60;m++)s.push(new p((0,E.toLength)(0,m),0,-1,_.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,E.toLength)(0,m))));const g=[];for(let m=0;m<60;m++)g.push(new p((0,E.toLength)(1,m),0,-1,_.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,E.toLength)(1,m))));if(a)for(a.lastIndex=0;(f=a.exec(i))!==null;){const m=f.index,C=f[0];if(C===` `)c++,d=m+1;else{if(r!==m){let w;if(l===c){const D=m-r;if(DS(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const o=this.getRegExpStr();this._regExpGlobal=o?new RegExp(o,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(o){return this.map.get(o.toLowerCase())}findClosingTokenText(o){for(const[i,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(o))return i}get isEmpty(){return this.map.size===0}}e.BracketTokens=p;function S(b){let o=(0,L.escapeRegExpCharacters)(b);return/^[\w ]+/.test(b)&&(o=`\\b${o}`),/[\w ]+$/.test(b)&&(o=`${o}\\b`),o}class v{constructor(o,i){this.denseKeyProvider=o,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(o){return this.languageIdToBracketTokens.has(o)}getSingleLanguageBracketTokens(o){let i=this.languageIdToBracketTokens.get(o);return i||(i=p.createFromLanguage(this.getLanguageConfiguration(o),this.denseKeyProvider),this.languageIdToBracketTokens.set(o,i)),i}}e.LanguageAgnosticBracketTokens=v}),define(ie[517],ne([1,0,287,89,286,130,209]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function p(v,b){const o=new E.DenseKeyProvider,i=new L.LanguageAgnosticBracketTokens(o,c=>b.getLanguageConfiguration(c)),n=new _.TextBufferTokenizer(new S([v]),i),t=(0,y.parseDocument)(n,[],void 0,!0);let a="";const u=v.getLineContent();function f(c,d){if(c.kind===2)if(f(c.openingBracket,d),d=(0,k.lengthAdd)(d,c.openingBracket.length),c.child&&(f(c.child,d),d=(0,k.lengthAdd)(d,c.child.length)),c.closingBracket)f(c.closingBracket,d),d=(0,k.lengthAdd)(d,c.closingBracket.length);else{const l=i.getSingleLanguageBracketTokens(c.openingBracket.languageId).findClosingTokenText(c.openingBracket.bracketIds);a+=l}else if(c.kind!==3){if(c.kind===0||c.kind===1)a+=u.substring((0,k.lengthGetColumnCountIfZeroLineCount)(d),(0,k.lengthGetColumnCountIfZeroLineCount)((0,k.lengthAdd)(d,c.length)));else if(c.kind===4)for(const r of c.children)f(r,d),d=(0,k.lengthAdd)(d,r.length)}}return f(t,k.lengthZero),a}e.fixBracketsInLine=p;class S{constructor(b){this.lines=b,this.tokenization={getLineTokens:o=>this.lines[o-1]}}getLineCount(){return this.lines.length}getLineLength(b){return this.lines[b-1].getLineContent().length}}}),define(ie[518],ne([1,0,13]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedArray=void 0;class k{constructor(_){this._default=_,this._store=[]}get(_){return _=this._store.length;)this._store[this._store.length]=this._default;this._store[_]=p}replace(_,p,S){if(_>=this._store.length)return;if(p===0){this.insert(_,S);return}else if(S===0){this.delete(_,p);return}const v=this._store.slice(0,_),b=this._store.slice(_+p),o=y(S,this._default);this._store=v.concat(o,b)}delete(_,p){p===0||_>=this._store.length||this._store.splice(_,p)}insert(_,p){if(p===0||_>=this._store.length)return;const S=[];for(let v=0;v0&&i>0||n>0&&t>0)return;const a=Math.abs(i-t),u=Math.abs(o-n);if(a===0){v.spacesDiff=u,u>0&&0<=n-1&&n-10?v++:m>1&&b++,k(o,i,l,h,u),u.looksLikeAlignment&&!(p&&_===u.spacesDiff)))continue;const w=u.spacesDiff;w<=t&&a[w]++,o=l,i=h}let f=p;v!==b&&(f=v{const l=a[r];l>d&&(d=l,c=r)}),c===4&&a[4]>0&&a[2]>0&&a[2]>=a[4]/2&&(c=2)}return{insertSpaces:f,tabSize:c}}e.guessIndentation=y}),define(ie[520],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeColor=void 0;function L(x){return(x.metadata&1)>>>0}e.getNodeColor=L;function k(x,R){x.metadata=x.metadata&254|R<<0}function y(x){return(x.metadata&2)>>>1===1}function E(x,R){x.metadata=x.metadata&253|(R?1:0)<<1}function _(x){return(x.metadata&4)>>>2===1}function p(x,R){x.metadata=x.metadata&251|(R?1:0)<<2}function S(x){return(x.metadata&64)>>>6===1}function v(x,R){x.metadata=x.metadata&191|(R?1:0)<<6}function b(x){return(x.metadata&24)>>>3}function o(x,R){x.metadata=x.metadata&231|R<<3}function i(x){return(x.metadata&32)>>>5===1}function n(x,R){x.metadata=x.metadata&223|(R?1:0)<<5}class t{constructor(R,B,W){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=B,this.end=W,this.delta=0,this.maxEnd=W,this.id=R,this.ownerId=0,this.options=null,p(this,!1),v(this,!1),o(this,1),n(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=W,this.range=null,E(this,!1)}reset(R,B,W,V){this.start=B,this.end=W,this.maxEnd=W,this.cachedVersionId=R,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=W,this.range=V}setOptions(R){this.options=R;const B=this.options.className;p(this,B==="squiggly-error"||B==="squiggly-warning"||B==="squiggly-info"),v(this,this.options.glyphMarginClassName!==null),o(this,this.options.stickiness),n(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(R,B,W){this.cachedVersionId!==W&&(this.range=null),this.cachedVersionId=W,this.cachedAbsoluteStart=R,this.cachedAbsoluteEnd=B}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=t,e.SENTINEL=new t(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,k(e.SENTINEL,0);class a{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(R,B,W,V,U,F){return this.root===e.SENTINEL?[]:h(this,R,B,W,V,U,F)}search(R,B,W,V){return this.root===e.SENTINEL?[]:g(this,R,B,W,V)}collectNodesFromOwner(R){return l(this,R)}collectNodesPostOrder(){return s(this)}insert(R){m(this,R),this._normalizeDeltaIfNecessary()}delete(R){w(this,R),this._normalizeDeltaIfNecessary()}resolveNode(R,B){const W=R;let V=0;for(;R!==this.root;)R===R.parent.right&&(V+=R.parent.delta),R=R.parent;const U=W.start+V,F=W.end+V;W.setCachedOffsets(U,F,B)}acceptReplace(R,B,W,V){const U=d(this,R,R+B);for(let F=0,j=U.length;FB||W===1?!1:W===2?!0:R}function c(x,R,B,W,V){const U=b(x),F=U===0||U===2,j=U===1||U===2,J=B-R,le=W,ee=Math.min(J,le),$=x.start;let te=!1;const G=x.end;let de=!1;R<=$&&G<=B&&i(x)&&(x.start=R,te=!0,x.end=R,de=!0);{const X=V?1:J>0?2:0;!te&&f($,F,R,X)&&(te=!0),!de&&f(G,j,R,X)&&(de=!0)}if(ee>0&&!V){const X=J>le?2:0;!te&&f($,F,R+ee,X)&&(te=!0),!de&&f(G,j,R+ee,X)&&(de=!0)}{const X=V?1:0;!te&&f($,F,B,X)&&(x.start=R+le,te=!0),!de&&f(G,j,B,X)&&(x.end=R+le,de=!0)}const ue=le-J;te||(x.start=Math.max(0,$+ue)),de||(x.end=Math.max(0,G+ue)),x.start>x.end&&(x.end=x.start)}e.nodeAcceptEdit=c;function d(x,R,B){let W=x.root,V=0,U=0,F=0,j=0;const J=[];let le=0;for(;W!==e.SENTINEL;){if(y(W)){E(W.left,!1),E(W.right,!1),W===W.parent.right&&(V-=W.parent.delta),W=W.parent;continue}if(!y(W.left)){if(U=V+W.maxEnd,UB){E(W,!0);continue}if(j=V+W.end,j>=R&&(W.setCachedOffsets(F,j,0),J[le++]=W),E(W,!0),W.right!==e.SENTINEL&&!y(W.right)){V+=W.delta,W=W.right;continue}}return E(x.root,!1),J}function r(x,R,B,W){let V=x.root,U=0,F=0,j=0;const J=W-(B-R);for(;V!==e.SENTINEL;){if(y(V)){E(V.left,!1),E(V.right,!1),V===V.parent.right&&(U-=V.parent.delta),T(V),V=V.parent;continue}if(!y(V.left)){if(F=U+V.maxEnd,FB){V.start+=J,V.end+=J,V.delta+=J,(V.delta<-1073741824||V.delta>1073741824)&&(x.requestNormalizeDelta=!0),E(V,!0);continue}if(E(V,!0),V.right!==e.SENTINEL&&!y(V.right)){U+=V.delta,V=V.right;continue}}E(x.root,!1)}function l(x,R){let B=x.root;const W=[];let V=0;for(;B!==e.SENTINEL;){if(y(B)){E(B.left,!1),E(B.right,!1),B=B.parent;continue}if(B.left!==e.SENTINEL&&!y(B.left)){B=B.left;continue}if(B.ownerId===R&&(W[V++]=B),E(B,!0),B.right!==e.SENTINEL&&!y(B.right)){B=B.right;continue}}return E(x.root,!1),W}function s(x){let R=x.root;const B=[];let W=0;for(;R!==e.SENTINEL;){if(y(R)){E(R.left,!1),E(R.right,!1),R=R.parent;continue}if(R.left!==e.SENTINEL&&!y(R.left)){R=R.left;continue}if(R.right!==e.SENTINEL&&!y(R.right)){R=R.right;continue}B[W++]=R,E(R,!0)}return E(x.root,!1),B}function g(x,R,B,W,V){let U=x.root,F=0,j=0,J=0;const le=[];let ee=0;for(;U!==e.SENTINEL;){if(y(U)){E(U.left,!1),E(U.right,!1),U===U.parent.right&&(F-=U.parent.delta),U=U.parent;continue}if(U.left!==e.SENTINEL&&!y(U.left)){U=U.left;continue}j=F+U.start,J=F+U.end,U.setCachedOffsets(j,J,W);let $=!0;if(R&&U.ownerId&&U.ownerId!==R&&($=!1),B&&_(U)&&($=!1),V&&!S(U)&&($=!1),$&&(le[ee++]=U),E(U,!0),U.right!==e.SENTINEL&&!y(U.right)){F+=U.delta,U=U.right;continue}}return E(x.root,!1),le}function h(x,R,B,W,V,U,F){let j=x.root,J=0,le=0,ee=0,$=0;const te=[];let G=0;for(;j!==e.SENTINEL;){if(y(j)){E(j.left,!1),E(j.right,!1),j===j.parent.right&&(J-=j.parent.delta),j=j.parent;continue}if(!y(j.left)){if(le=J+j.maxEnd,leB){E(j,!0);continue}if($=J+j.end,$>=R){j.setCachedOffsets(ee,$,U);let de=!0;W&&j.ownerId&&j.ownerId!==W&&(de=!1),V&&_(j)&&(de=!1),F&&!S(j)&&(de=!1),de&&(te[G++]=j)}if(E(j,!0),j.right!==e.SENTINEL&&!y(j.right)){J+=j.delta,j=j.right;continue}}return E(x.root,!1),te}function m(x,R){if(x.root===e.SENTINEL)return R.parent=e.SENTINEL,R.left=e.SENTINEL,R.right=e.SENTINEL,k(R,0),x.root=R,x.root;C(x,R),N(R.parent);let B=R;for(;B!==x.root&&L(B.parent)===1;)if(B.parent===B.parent.parent.left){const W=B.parent.parent.right;L(W)===1?(k(B.parent,0),k(W,0),k(B.parent.parent,1),B=B.parent.parent):(B===B.parent.right&&(B=B.parent,M(x,B)),k(B.parent,0),k(B.parent.parent,1),A(x,B.parent.parent))}else{const W=B.parent.parent.left;L(W)===1?(k(B.parent,0),k(W,0),k(B.parent.parent,1),B=B.parent.parent):(B===B.parent.left&&(B=B.parent,A(x,B)),k(B.parent,0),k(B.parent.parent,1),M(x,B.parent.parent))}return k(x.root,0),R}function C(x,R){let B=0,W=x.root;const V=R.start,U=R.end;for(;;)if(P(V,U,W.start+B,W.end+B)<0)if(W.left===e.SENTINEL){R.start-=B,R.end-=B,R.maxEnd-=B,W.left=R;break}else W=W.left;else if(W.right===e.SENTINEL){R.start-=B+W.delta,R.end-=B+W.delta,R.maxEnd-=B+W.delta,W.right=R;break}else B+=W.delta,W=W.right;R.parent=W,R.left=e.SENTINEL,R.right=e.SENTINEL,k(R,1)}function w(x,R){let B,W;if(R.left===e.SENTINEL?(B=R.right,W=R,B.delta+=R.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=R.delta,B.end+=R.delta):R.right===e.SENTINEL?(B=R.left,W=R):(W=D(R.right),B=W.right,B.start+=W.delta,B.end+=W.delta,B.delta+=W.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),W.start+=R.delta,W.end+=R.delta,W.delta=R.delta,(W.delta<-1073741824||W.delta>1073741824)&&(x.requestNormalizeDelta=!0)),W===x.root){x.root=B,k(B,0),R.detach(),I(),T(B),x.root.parent=e.SENTINEL;return}const V=L(W)===1;if(W===W.parent.left?W.parent.left=B:W.parent.right=B,W===R?B.parent=W.parent:(W.parent===R?B.parent=W:B.parent=W.parent,W.left=R.left,W.right=R.right,W.parent=R.parent,k(W,L(R)),R===x.root?x.root=W:R===R.parent.left?R.parent.left=W:R.parent.right=W,W.left!==e.SENTINEL&&(W.left.parent=W),W.right!==e.SENTINEL&&(W.right.parent=W)),R.detach(),V){N(B.parent),W!==R&&(N(W),N(W.parent)),I();return}N(B),N(B.parent),W!==R&&(N(W),N(W.parent));let U;for(;B!==x.root&&L(B)===0;)B===B.parent.left?(U=B.parent.right,L(U)===1&&(k(U,0),k(B.parent,1),M(x,B.parent),U=B.parent.right),L(U.left)===0&&L(U.right)===0?(k(U,1),B=B.parent):(L(U.right)===0&&(k(U.left,0),k(U,1),A(x,U),U=B.parent.right),k(U,L(B.parent)),k(B.parent,0),k(U.right,0),M(x,B.parent),B=x.root)):(U=B.parent.left,L(U)===1&&(k(U,0),k(B.parent,1),A(x,B.parent),U=B.parent.left),L(U.left)===0&&L(U.right)===0?(k(U,1),B=B.parent):(L(U.left)===0&&(k(U.right,0),k(U,1),M(x,U),U=B.parent.left),k(U,L(B.parent)),k(B.parent,0),k(U.left,0),A(x,B.parent),B=x.root));k(B,0),I()}function D(x){for(;x.left!==e.SENTINEL;)x=x.left;return x}function I(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function M(x,R){const B=R.right;B.delta+=R.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=R.delta,B.end+=R.delta,R.right=B.left,B.left!==e.SENTINEL&&(B.left.parent=R),B.parent=R.parent,R.parent===e.SENTINEL?x.root=B:R===R.parent.left?R.parent.left=B:R.parent.right=B,B.left=R,R.parent=B,T(R),T(B)}function A(x,R){const B=R.left;R.delta-=B.delta,(R.delta<-1073741824||R.delta>1073741824)&&(x.requestNormalizeDelta=!0),R.start-=B.delta,R.end-=B.delta,R.left=B.right,B.right!==e.SENTINEL&&(B.right.parent=R),B.parent=R.parent,R.parent===e.SENTINEL?x.root=B:R===R.parent.right?R.parent.right=B:R.parent.left=B,B.right=R,R.parent=B,T(R),T(B)}function O(x){let R=x.end;if(x.left!==e.SENTINEL){const B=x.left.maxEnd;B>R&&(R=B)}if(x.right!==e.SENTINEL){const B=x.right.maxEnd+x.delta;B>R&&(R=B)}return R}function T(x){x.maxEnd=O(x)}e.recomputeMaxEnd=T;function N(x){for(;x!==e.SENTINEL;){const R=O(x);if(x.maxEnd===R)return;x.maxEnd=R,x=x.parent}}function P(x,R,B,W){return x===B?R-W:x-B}e.intervalCompare=P}),define(ie[521],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class L{constructor(a,u){this.piece=a,this.color=u,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return k(this.right);let a=this;for(;a.parent!==e.SENTINEL&&a.parent.left!==a;)a=a.parent;return a.parent===e.SENTINEL?e.SENTINEL:a.parent}prev(){if(this.left!==e.SENTINEL)return y(this.left);let a=this;for(;a.parent!==e.SENTINEL&&a.parent.right!==a;)a=a.parent;return a.parent===e.SENTINEL?e.SENTINEL:a.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=L,e.SENTINEL=new L(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function k(t){for(;t.left!==e.SENTINEL;)t=t.left;return t}e.leftest=k;function y(t){for(;t.right!==e.SENTINEL;)t=t.right;return t}e.righttest=y;function E(t){return t===e.SENTINEL?0:t.size_left+t.piece.length+E(t.right)}function _(t){return t===e.SENTINEL?0:t.lf_left+t.piece.lineFeedCnt+_(t.right)}function p(){e.SENTINEL.parent=e.SENTINEL}function S(t,a){const u=a.right;u.size_left+=a.size_left+(a.piece?a.piece.length:0),u.lf_left+=a.lf_left+(a.piece?a.piece.lineFeedCnt:0),a.right=u.left,u.left!==e.SENTINEL&&(u.left.parent=a),u.parent=a.parent,a.parent===e.SENTINEL?t.root=u:a.parent.left===a?a.parent.left=u:a.parent.right=u,u.left=a,a.parent=u}e.leftRotate=S;function v(t,a){const u=a.left;a.left=u.right,u.right!==e.SENTINEL&&(u.right.parent=a),u.parent=a.parent,a.size_left-=u.size_left+(u.piece?u.piece.length:0),a.lf_left-=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),a.parent===e.SENTINEL?t.root=u:a===a.parent.right?a.parent.right=u:a.parent.left=u,u.right=a,a.parent=u}e.rightRotate=v;function b(t,a){let u,f;if(a.left===e.SENTINEL?(f=a,u=f.right):a.right===e.SENTINEL?(f=a,u=f.left):(f=k(a.right),u=f.right),f===t.root){t.root=u,u.color=0,a.detach(),p(),t.root.parent=e.SENTINEL;return}const c=f.color===1;if(f===f.parent.left?f.parent.left=u:f.parent.right=u,f===a?(u.parent=f.parent,n(t,u)):(f.parent===a?u.parent=f:u.parent=f.parent,n(t,u),f.left=a.left,f.right=a.right,f.parent=a.parent,f.color=a.color,a===t.root?t.root=f:a===a.parent.left?a.parent.left=f:a.parent.right=f,f.left!==e.SENTINEL&&(f.left.parent=f),f.right!==e.SENTINEL&&(f.right.parent=f),f.size_left=a.size_left,f.lf_left=a.lf_left,n(t,f)),a.detach(),u.parent.left===u){const r=E(u),l=_(u);if(r!==u.parent.size_left||l!==u.parent.lf_left){const s=r-u.parent.size_left,g=l-u.parent.lf_left;u.parent.size_left=r,u.parent.lf_left=l,i(t,u.parent,s,g)}}if(n(t,u.parent),c){p();return}let d;for(;u!==t.root&&u.color===0;)u===u.parent.left?(d=u.parent.right,d.color===1&&(d.color=0,u.parent.color=1,S(t,u.parent),d=u.parent.right),d.left.color===0&&d.right.color===0?(d.color=1,u=u.parent):(d.right.color===0&&(d.left.color=0,d.color=1,v(t,d),d=u.parent.right),d.color=u.parent.color,u.parent.color=0,d.right.color=0,S(t,u.parent),u=t.root)):(d=u.parent.left,d.color===1&&(d.color=0,u.parent.color=1,v(t,u.parent),d=u.parent.left),d.left.color===0&&d.right.color===0?(d.color=1,u=u.parent):(d.left.color===0&&(d.right.color=0,d.color=1,S(t,d),d=u.parent.left),d.color=u.parent.color,u.parent.color=0,d.left.color=0,v(t,u.parent),u=t.root));u.color=0,p()}e.rbDelete=b;function o(t,a){for(n(t,a);a!==t.root&&a.parent.color===1;)if(a.parent===a.parent.parent.left){const u=a.parent.parent.right;u.color===1?(a.parent.color=0,u.color=0,a.parent.parent.color=1,a=a.parent.parent):(a===a.parent.right&&(a=a.parent,S(t,a)),a.parent.color=0,a.parent.parent.color=1,v(t,a.parent.parent))}else{const u=a.parent.parent.left;u.color===1?(a.parent.color=0,u.color=0,a.parent.parent.color=1,a=a.parent.parent):(a===a.parent.left&&(a=a.parent,v(t,a)),a.parent.color=0,a.parent.parent.color=1,S(t,a.parent.parent))}t.root.color=0}e.fixInsert=o;function i(t,a,u,f){for(;a!==t.root&&a!==e.SENTINEL;)a.parent.left===a&&(a.parent.size_left+=u,a.parent.lf_left+=f),a=a.parent}e.updateTreeMetadata=i;function n(t,a){let u=0,f=0;if(a!==t.root){for(;a!==t.root&&a===a.parent.right;)a=a.parent;if(a!==t.root)for(a=a.parent,u=E(a.left)-a.size_left,f=_(a.left)-a.lf_left,a.size_left+=u,a.lf_left+=f;a!==t.root&&(u!==0||f!==0);)a.parent.left===a&&(a.parent.size_left+=u,a.parent.lf_left+=f),a=a.parent}}e.recomputeTreeMetadata=n}),define(ie[288],ne([1,0,13,172]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class y{constructor(S){this.values=S,this.prefixSum=new Uint32Array(S.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(S,v){S=(0,k.toUint32)(S);const b=this.values,o=this.prefixSum,i=v.length;return i===0?!1:(this.values=new Uint32Array(b.length+i),this.values.set(b.subarray(0,S),0),this.values.set(b.subarray(S),S+i),this.values.set(v,S),S-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(S,v){return S=(0,k.toUint32)(S),v=(0,k.toUint32)(v),this.values[S]===v?!1:(this.values[S]=v,S-1=b.length)return!1;const i=b.length-S;return v>=i&&(v=i),v===0?!1:(this.values=new Uint32Array(b.length-v),this.values.set(b.subarray(0,S),0),this.values.set(b.subarray(S+v),S),this.prefixSum=new Uint32Array(this.values.length),S-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(S){return S<0?0:(S=(0,k.toUint32)(S),this._getPrefixSum(S))}_getPrefixSum(S){if(S<=this.prefixSumValidIndex[0])return this.prefixSum[S];let v=this.prefixSumValidIndex[0]+1;v===0&&(this.prefixSum[0]=this.values[0],v++),S>=this.values.length&&(S=this.values.length-1);for(let b=v;b<=S;b++)this.prefixSum[b]=this.prefixSum[b-1]+this.values[b];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],S),this.prefixSum[S]}getIndexOf(S){S=Math.floor(S),this.getTotalSum();let v=0,b=this.values.length-1,o=0,i=0,n=0;for(;v<=b;)if(o=v+(b-v)/2|0,i=this.prefixSum[o],n=i-this.values[o],S=i)v=o+1;else break;return new _(o,S-n)}}e.PrefixSumComputer=y;class E{constructor(S){this._values=S,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(S){return this._ensureValid(),S===0?0:this._prefixSum[S-1]}getIndexOf(S){this._ensureValid();const v=this._indexBySum[S],b=v>0?this._prefixSum[v-1]:0;return new _(v,S-b)}removeValues(S,v){this._values.splice(S,v),this._invalidate(S)}insertValues(S,v){this._values=(0,L.arrayInsert)(this._values,S,v),this._invalidate(S)}_invalidate(S){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,S-1)}_ensureValid(){if(!this._isValid){for(let S=this._validEndIndex+1,v=this._values.length;S0?this._prefixSum[S-1]:0;this._prefixSum[S]=o+b;for(let i=0;i=0;let d=null;try{d=L.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:c,global:!0,unicode:!0})}catch{return null}if(!d)return null;let r=!this.isRegex&&!c;return r&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(r=this.matchCase),new _.SearchData(d,this.wordSeparators?(0,k.getMapForWordSeparators)(this.wordSeparators):null,r?this.searchString:null)}}e.SearchParams=S;function v(f){if(!f||f.length===0)return!1;for(let c=0,d=f.length;c=d)break;const l=f.charCodeAt(c);if(l===110||l===114||l===87)return!0}}return!1}e.isMultilineRegexSource=v;function b(f,c,d){if(!d)return new _.FindMatch(f,null);const r=[];for(let l=0,s=c.length;l>0);d[s]>=c?l=s-1:d[s+1]>=c?(r=s,l=s):r=s+1}return r+1}}class i{static findMatches(c,d,r,l,s){const g=d.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(c,r,new u(g.wordSeparators,g.regex),l,s):this._doFindMatchesLineByLine(c,r,g,l,s):[]}static _getMultilineMatchRange(c,d,r,l,s,g){let h,m=0;l?(m=l.findLineFeedCountBeforeOffset(s),h=d+s+m):h=d+s;let C;if(l){const M=l.findLineFeedCountBeforeOffset(s+g.length)-m;C=h+g.length+M}else C=h+g.length;const w=c.getPositionAt(h),D=c.getPositionAt(C);return new E.Range(w.lineNumber,w.column,D.lineNumber,D.column)}static _doFindMatchesMultiline(c,d,r,l,s){const g=c.getOffsetAt(d.getStartPosition()),h=c.getValueInRange(d,1),m=c.getEOL()===`\r `?new o(h):null,C=[];let w=0,D;for(r.reset(0);D=r.next(h);)if(C[w++]=b(this._getMultilineMatchRange(c,g,h,m,D.index,D[0]),D,l),w>=s)return C;return C}static _doFindMatchesLineByLine(c,d,r,l,s){const g=[];let h=0;if(d.startLineNumber===d.endLineNumber){const C=c.getLineContent(d.startLineNumber).substring(d.startColumn-1,d.endColumn-1);return h=this._findMatchesInLine(r,C,d.startLineNumber,d.startColumn-1,h,g,l,s),g}const m=c.getLineContent(d.startLineNumber).substring(d.startColumn-1);h=this._findMatchesInLine(r,m,d.startLineNumber,d.startColumn-1,h,g,l,s);for(let C=d.startLineNumber+1;C=m))return s;return s}const w=new u(c.wordSeparators,c.regex);let D;w.reset(0);do if(D=w.next(d),D&&(g[s++]=b(new E.Range(r,D.index+1+l,r,D.index+1+D[0].length+l),D,h),s>=m))return s;while(D);return s}static findNextMatch(c,d,r,l){const s=d.parseSearchRequest();if(!s)return null;const g=new u(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(c,r,g,l):this._doFindNextMatchLineByLine(c,r,g,l)}static _doFindNextMatchMultiline(c,d,r,l){const s=new y.Position(d.lineNumber,1),g=c.getOffsetAt(s),h=c.getLineCount(),m=c.getValueInRange(new E.Range(s.lineNumber,s.column,h,c.getLineMaxColumn(h)),1),C=c.getEOL()===`\r `?new o(m):null;r.reset(d.column-1);const w=r.next(m);return w?b(this._getMultilineMatchRange(c,g,m,C,w.index,w[0]),w,l):d.lineNumber!==1||d.column!==1?this._doFindNextMatchMultiline(c,new y.Position(1,1),r,l):null}static _doFindNextMatchLineByLine(c,d,r,l){const s=c.getLineCount(),g=d.lineNumber,h=c.getLineContent(g),m=this._findFirstMatchInLine(r,h,g,d.column,l);if(m)return m;for(let C=1;C<=s;C++){const w=(g+C-1)%s,D=c.getLineContent(w+1),I=this._findFirstMatchInLine(r,D,w+1,1,l);if(I)return I}return null}static _findFirstMatchInLine(c,d,r,l,s){c.reset(l-1);const g=c.next(d);return g?b(new E.Range(r,g.index+1,r,g.index+1+g[0].length),g,s):null}static findPreviousMatch(c,d,r,l){const s=d.parseSearchRequest();if(!s)return null;const g=new u(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(c,r,g,l):this._doFindPreviousMatchLineByLine(c,r,g,l)}static _doFindPreviousMatchMultiline(c,d,r,l){const s=this._doFindMatchesMultiline(c,new E.Range(1,1,d.lineNumber,d.column),r,l,10*p);if(s.length>0)return s[s.length-1];const g=c.getLineCount();return d.lineNumber!==g||d.column!==c.getLineMaxColumn(g)?this._doFindPreviousMatchMultiline(c,new y.Position(g,c.getLineMaxColumn(g)),r,l):null}static _doFindPreviousMatchLineByLine(c,d,r,l){const s=c.getLineCount(),g=d.lineNumber,h=c.getLineContent(g).substring(0,d.column-1),m=this._findLastMatchInLine(r,h,g,l);if(m)return m;for(let C=1;C<=s;C++){const w=(s+g-C-1)%s,D=c.getLineContent(w+1),I=this._findLastMatchInLine(r,D,w+1,l);if(I)return I}return null}static _findLastMatchInLine(c,d,r,l){let s=null,g;for(c.reset(0);g=c.next(d);)s=b(new E.Range(r,g.index+1,r,g.index+1+g[0].length),g,l);return s}}e.TextModelSearch=i;function n(f,c,d,r,l){if(r===0)return!0;const s=c.charCodeAt(r-1);if(f.get(s)!==0||s===13||s===10)return!0;if(l>0){const g=c.charCodeAt(r);if(f.get(g)!==0)return!0}return!1}function t(f,c,d,r,l){if(r+l===d)return!0;const s=c.charCodeAt(r+l);if(f.get(s)!==0||s===13||s===10)return!0;if(l>0){const g=c.charCodeAt(r+l-1);if(f.get(g)!==0)return!0}return!1}function a(f,c,d,r,l){return n(f,c,d,r,l)&&t(f,c,d,r,l)}e.isValidMatch=a;class u{constructor(c,d){this._wordSeparators=c,this._searchRegex=d,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(c){this._searchRegex.lastIndex=c,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(c){const d=c.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===d||(r=this._searchRegex.exec(c),!r))return null;const l=r.index,s=r[0].length;if(l===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){L.getNextCodePoint(c,d,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=l,this._prevMatchLength=s,!this._wordSeparators||a(this._wordSeparators,c,d,l,s))return r}while(r);return null}}e.Searcher=u}),define(ie[290],ne([1,0,11,5,43,521,182]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=void 0;const p=65535;function S(f){let c;return f[f.length-1]<65536?c=new Uint16Array(f.length):c=new Uint32Array(f.length),c.set(f,0),c}class v{constructor(c,d,r,l,s){this.lineStarts=c,this.cr=d,this.lf=r,this.crlf=l,this.isBasicASCII=s}}function b(f,c=!0){const d=[0];let r=1;for(let l=0,s=f.length;l126)&&(g=!1)}const h=new v(S(f),r,l,s,g);return f.length=0,h}e.createLineStarts=o;class i{constructor(c,d,r,l,s){this.bufferIndex=c,this.start=d,this.end=r,this.lineFeedCnt=l,this.length=s}}e.Piece=i;class n{constructor(c,d){this.buffer=c,this.lineStarts=d}}e.StringBuffer=n;class t{constructor(c,d){this._pieces=[],this._tree=c,this._BOM=d,this._index=0,c.root!==E.SENTINEL&&c.iterate(c.root,r=>(r!==E.SENTINEL&&this._pieces.push(r.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 a{constructor(c){this._limit=c,this._cache=[]}get(c){for(let d=this._cache.length-1;d>=0;d--){const r=this._cache[d];if(r.nodeStartOffset<=c&&r.nodeStartOffset+r.node.piece.length>=c)return r}return null}get2(c){for(let d=this._cache.length-1;d>=0;d--){const r=this._cache[d];if(r.nodeStartLineNumber&&r.nodeStartLineNumber=c)return r}return null}set(c){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(c)}validate(c){let d=!1;const r=this._cache;for(let l=0;l=c){r[l]=null,d=!0;continue}}if(d){const l=[];for(const s of r)s!==null&&l.push(s);this._cache=l}}}class u{constructor(c,d,r){this.create(c,d,r)}create(c,d,r){this._buffers=[new n("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=E.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=d,this._EOLLength=d.length,this._EOLNormalized=r;let l=null;for(let s=0,g=c.length;s0){c[s].lineStarts||(c[s].lineStarts=b(c[s].buffer));const h=new i(s+1,{line:0,column:0},{line:c[s].lineStarts.length-1,column:c[s].buffer.length-c[s].lineStarts[c[s].lineStarts.length-1]},c[s].lineStarts.length-1,c[s].buffer.length);this._buffers.push(c[s]),l=this.rbInsertRight(l,h)}this._searchCache=new a(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(c){const d=p,r=d-Math.floor(d/3),l=r*2;let s="",g=0;const h=[];if(this.iterate(this.root,m=>{const C=this.getNodeContent(m),w=C.length;if(g<=r||g+w0){const m=s.replace(/\r\n|\r|\n/g,c);h.push(new n(m,b(m)))}this.create(h,c,!0)}getEOL(){return this._EOL}setEOL(c){this._EOL=c,this._EOLLength=this._EOL.length,this.normalizeEOL(c)}createSnapshot(c){return new t(this,c)}getOffsetAt(c,d){let r=0,l=this.root;for(;l!==E.SENTINEL;)if(l.left!==E.SENTINEL&&l.lf_left+1>=c)l=l.left;else if(l.lf_left+l.piece.lineFeedCnt+1>=c){r+=l.size_left;const s=this.getAccumulatedValue(l,c-l.lf_left-2);return r+=s+d-1}else c-=l.lf_left+l.piece.lineFeedCnt,r+=l.size_left+l.piece.length,l=l.right;return r}getPositionAt(c){c=Math.floor(c),c=Math.max(0,c);let d=this.root,r=0;const l=c;for(;d!==E.SENTINEL;)if(d.size_left!==0&&d.size_left>=c)d=d.left;else if(d.size_left+d.piece.length>=c){const s=this.getIndexOf(d,c-d.size_left);if(r+=d.lf_left+s.index,s.index===0){const g=this.getOffsetAt(r+1,1),h=l-g;return new L.Position(r+1,h+1)}return new L.Position(r+1,s.remainder+1)}else if(c-=d.size_left+d.piece.length,r+=d.lf_left+d.piece.lineFeedCnt,d.right===E.SENTINEL){const s=this.getOffsetAt(r+1,1),g=l-c-s;return new L.Position(r+1,g+1)}else d=d.right;return new L.Position(1,1)}getValueInRange(c,d){if(c.startLineNumber===c.endLineNumber&&c.startColumn===c.endColumn)return"";const r=this.nodeAt2(c.startLineNumber,c.startColumn),l=this.nodeAt2(c.endLineNumber,c.endColumn),s=this.getValueInRange2(r,l);return d?d!==this._EOL||!this._EOLNormalized?s.replace(/\r\n|\r|\n/g,d):d===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,d):s}getValueInRange2(c,d){if(c.node===d.node){const h=c.node,m=this._buffers[h.piece.bufferIndex].buffer,C=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start);return m.substring(C+c.remainder,C+d.remainder)}let r=c.node;const l=this._buffers[r.piece.bufferIndex].buffer,s=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);let g=l.substring(s+c.remainder,s+r.piece.length);for(r=r.next();r!==E.SENTINEL;){const h=this._buffers[r.piece.bufferIndex].buffer,m=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===d.node){g+=h.substring(m,m+d.remainder);break}else g+=h.substr(m,r.piece.length);r=r.next()}return g}getLinesContent(){const c=[];let d=0,r="",l=!1;return this.iterate(this.root,s=>{if(s===E.SENTINEL)return!0;const g=s.piece;let h=g.length;if(h===0)return!0;const m=this._buffers[g.bufferIndex].buffer,C=this._buffers[g.bufferIndex].lineStarts,w=g.start.line,D=g.end.line;let I=C[w]+g.start.column;if(l&&(m.charCodeAt(I)===10&&(I++,h--),c[d++]=r,r="",l=!1,h===0))return!0;if(w===D)return!this._EOLNormalized&&m.charCodeAt(I+h-1)===13?(l=!0,r+=m.substr(I,h-1)):r+=m.substr(I,h),!0;r+=this._EOLNormalized?m.substring(I,Math.max(I,C[w+1]-this._EOLLength)):m.substring(I,C[w+1]).replace(/(\r\n|\r|\n)$/,""),c[d++]=r;for(let M=w+1;MR+A,d.reset(0)):(P=I.buffer,x=R=>R,d.reset(A));do if(T=d.next(P),T){if(x(T.index)>=O)return w;this.positionInBuffer(c,x(T.index)-M,N);const R=this.getLineFeedCnt(c.piece.bufferIndex,s,N),B=N.line===s.line?N.column-s.column+l:N.column+1,W=B+T[0].length;if(D[w++]=(0,_.createFindMatch)(new k.Range(r+R,B,r+R,W),T,m),x(T.index)+T[0].length>=O||w>=C)return w}while(T);return w}findMatchesLineByLine(c,d,r,l){const s=[];let g=0;const h=new _.Searcher(d.wordSeparators,d.regex);let m=this.nodeAt2(c.startLineNumber,c.startColumn);if(m===null)return[];const C=this.nodeAt2(c.endLineNumber,c.endColumn);if(C===null)return[];let w=this.positionInBuffer(m.node,m.remainder);const D=this.positionInBuffer(C.node,C.remainder);if(m.node===C.node)return this.findMatchesInNode(m.node,h,c.startLineNumber,c.startColumn,w,D,d,r,l,g,s),s;let I=c.startLineNumber,M=m.node;for(;M!==C.node;){const O=this.getLineFeedCnt(M.piece.bufferIndex,w,M.piece.end);if(O>=1){const N=this._buffers[M.piece.bufferIndex].lineStarts,P=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start),x=N[w.line+O],R=I===c.startLineNumber?c.startColumn:1;if(g=this.findMatchesInNode(M,h,I,R,w,this.positionInBuffer(M,x-P),d,r,l,g,s),g>=l)return s;I+=O}const T=I===c.startLineNumber?c.startColumn-1:0;if(I===c.endLineNumber){const N=this.getLineContent(I).substring(T,c.endColumn-1);return g=this._findMatchesInLine(d,h,N,c.endLineNumber,T,g,s,r,l),s}if(g=this._findMatchesInLine(d,h,this.getLineContent(I).substr(T),I,T,g,s,r,l),g>=l)return s;I++,m=this.nodeAt2(I,1),M=m.node,w=this.positionInBuffer(m.node,m.remainder)}if(I===c.endLineNumber){const O=I===c.startLineNumber?c.startColumn-1:0,T=this.getLineContent(I).substring(O,c.endColumn-1);return g=this._findMatchesInLine(d,h,T,c.endLineNumber,O,g,s,r,l),s}const A=I===c.startLineNumber?c.startColumn:1;return g=this.findMatchesInNode(C.node,h,I,A,w,D,d,r,l,g,s),s}_findMatchesInLine(c,d,r,l,s,g,h,m,C){const w=c.wordSeparators;if(!m&&c.simpleSearch){const I=c.simpleSearch,M=I.length,A=r.length;let O=-M;for(;(O=r.indexOf(I,O+M))!==-1;)if((!w||(0,_.isValidMatch)(w,r,A,O,M))&&(h[g++]=new y.FindMatch(new k.Range(l,O+1+s,l,O+1+M+s),null),g>=C))return g;return g}let D;d.reset(0);do if(D=d.next(r),D&&(h[g++]=(0,_.createFindMatch)(new k.Range(l,D.index+1+s,l,D.index+1+D[0].length+s),D,m),g>=C))return g;while(D);return g}insert(c,d,r=!1){if(this._EOLNormalized=this._EOLNormalized&&r,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==E.SENTINEL){const{node:l,remainder:s,nodeStartOffset:g}=this.nodeAt(c),h=l.piece,m=h.bufferIndex,C=this.positionInBuffer(l,s);if(l.piece.bufferIndex===0&&h.end.line===this._lastChangeBufferPos.line&&h.end.column===this._lastChangeBufferPos.column&&g+h.length===c&&d.lengthc){const w=[];let D=new i(h.bufferIndex,C,h.end,this.getLineFeedCnt(h.bufferIndex,C,h.end),this.offsetInBuffer(m,h.end)-this.offsetInBuffer(m,C));if(this.shouldCheckCRLF()&&this.endWithCR(d)&&this.nodeCharCodeAt(l,s)===10){const O={line:D.start.line+1,column:0};D=new i(D.bufferIndex,O,D.end,this.getLineFeedCnt(D.bufferIndex,O,D.end),D.length-1),d+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(d))if(this.nodeCharCodeAt(l,s-1)===13){const O=this.positionInBuffer(l,s-1);this.deleteNodeTail(l,O),d="\r"+d,l.piece.length===0&&w.push(l)}else this.deleteNodeTail(l,C);else this.deleteNodeTail(l,C);const I=this.createNewPieces(d);D.length>0&&this.rbInsertRight(l,D);let M=l;for(let A=0;A=0;g--)s=this.rbInsertLeft(s,l[g]);this.validateCRLFWithPrevNode(s),this.deleteNodes(r)}insertContentToNodeRight(c,d){this.adjustCarriageReturnFromNext(c,d)&&(c+=` `);const r=this.createNewPieces(c),l=this.rbInsertRight(d,r[0]);let s=l;for(let g=1;g=I)C=D+1;else break;return r?(r.line=D,r.column=m-M,null):{line:D,column:m-M}}getLineFeedCnt(c,d,r){if(r.column===0)return r.line-d.line;const l=this._buffers[c].lineStarts;if(r.line===l.length-1)return r.line-d.line;const s=l[r.line+1],g=l[r.line]+r.column;if(s>g+1)return r.line-d.line;const h=g-1;return this._buffers[c].buffer.charCodeAt(h)===13?r.line-d.line+1:r.line-d.line}offsetInBuffer(c,d){return this._buffers[c].lineStarts[d.line]+d.column}deleteNodes(c){for(let d=0;dp){const w=[];for(;c.length>p;){const I=c.charCodeAt(p-1);let M;I===13||I>=55296&&I<=56319?(M=c.substring(0,p-1),c=c.substring(p-1)):(M=c.substring(0,p),c=c.substring(p));const A=b(M);w.push(new i(this._buffers.length,{line:0,column:0},{line:A.length-1,column:M.length-A[A.length-1]},A.length-1,M.length)),this._buffers.push(new n(M,A))}const D=b(c);return w.push(new i(this._buffers.length,{line:0,column:0},{line:D.length-1,column:c.length-D[D.length-1]},D.length-1,c.length)),this._buffers.push(new n(c,D)),w}let d=this._buffers[0].buffer.length;const r=b(c,!1);let l=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===d&&d!==0&&this.startWithLF(c)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},l=this._lastChangeBufferPos;for(let w=0;w=c-1)r=r.left;else if(r.lf_left+r.piece.lineFeedCnt>c-1){const m=this.getAccumulatedValue(r,c-r.lf_left-2),C=this.getAccumulatedValue(r,c-r.lf_left-1),w=this._buffers[r.piece.bufferIndex].buffer,D=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);return g+=r.size_left,this._searchCache.set({node:r,nodeStartOffset:g,nodeStartLineNumber:h-(c-1-r.lf_left)}),w.substring(D+m,D+C-d)}else if(r.lf_left+r.piece.lineFeedCnt===c-1){const m=this.getAccumulatedValue(r,c-r.lf_left-2),C=this._buffers[r.piece.bufferIndex].buffer,w=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);l=C.substring(w+m,w+r.piece.length);break}else c-=r.lf_left+r.piece.lineFeedCnt,g+=r.size_left+r.piece.length,r=r.right}for(r=r.next();r!==E.SENTINEL;){const g=this._buffers[r.piece.bufferIndex].buffer;if(r.piece.lineFeedCnt>0){const h=this.getAccumulatedValue(r,0),m=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);return l+=g.substring(m,m+h-d),l}else{const h=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);l+=g.substr(h,r.piece.length)}r=r.next()}return l}computeBufferMetadata(){let c=this.root,d=1,r=0;for(;c!==E.SENTINEL;)d+=c.lf_left+c.piece.lineFeedCnt,r+=c.size_left+c.piece.length,c=c.right;this._lineCnt=d,this._length=r,this._searchCache.validate(this._length)}getIndexOf(c,d){const r=c.piece,l=this.positionInBuffer(c,d),s=l.line-r.start.line;if(this.offsetInBuffer(r.bufferIndex,r.end)-this.offsetInBuffer(r.bufferIndex,r.start)===d){const g=this.getLineFeedCnt(c.piece.bufferIndex,r.start,l);if(g!==s)return{index:g,remainder:0}}return{index:s,remainder:l.column}}getAccumulatedValue(c,d){if(d<0)return 0;const r=c.piece,l=this._buffers[r.bufferIndex].lineStarts,s=r.start.line+d+1;return s>r.end.line?l[r.end.line]+r.end.column-l[r.start.line]-r.start.column:l[s]-l[r.start.line]-r.start.column}deleteNodeTail(c,d){const r=c.piece,l=r.lineFeedCnt,s=this.offsetInBuffer(r.bufferIndex,r.end),g=d,h=this.offsetInBuffer(r.bufferIndex,g),m=this.getLineFeedCnt(r.bufferIndex,r.start,g),C=m-l,w=h-s,D=r.length+w;c.piece=new i(r.bufferIndex,r.start,g,m,D),(0,E.updateTreeMetadata)(this,c,w,C)}deleteNodeHead(c,d){const r=c.piece,l=r.lineFeedCnt,s=this.offsetInBuffer(r.bufferIndex,r.start),g=d,h=this.getLineFeedCnt(r.bufferIndex,g,r.end),m=this.offsetInBuffer(r.bufferIndex,g),C=h-l,w=s-m,D=r.length+w;c.piece=new i(r.bufferIndex,g,r.end,h,D),(0,E.updateTreeMetadata)(this,c,w,C)}shrinkNode(c,d,r){const l=c.piece,s=l.start,g=l.end,h=l.length,m=l.lineFeedCnt,C=d,w=this.getLineFeedCnt(l.bufferIndex,l.start,C),D=this.offsetInBuffer(l.bufferIndex,d)-this.offsetInBuffer(l.bufferIndex,s);c.piece=new i(l.bufferIndex,l.start,C,w,D),(0,E.updateTreeMetadata)(this,c,D-h,w-m);const I=new i(l.bufferIndex,r,g,this.getLineFeedCnt(l.bufferIndex,r,g),this.offsetInBuffer(l.bufferIndex,g)-this.offsetInBuffer(l.bufferIndex,r)),M=this.rbInsertRight(c,I);this.validateCRLFWithPrevNode(M)}appendToNode(c,d){this.adjustCarriageReturnFromNext(d,c)&&(d+=` `);const r=this.shouldCheckCRLF()&&this.startWithLF(d)&&this.endWithCR(c),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=d;const s=b(d,!1);for(let M=0;Mc)d=d.left;else if(d.size_left+d.piece.length>=c){l+=d.size_left;const s={node:d,remainder:c-d.size_left,nodeStartOffset:l};return this._searchCache.set(s),s}else c-=d.size_left+d.piece.length,l+=d.size_left+d.piece.length,d=d.right;return null}nodeAt2(c,d){let r=this.root,l=0;for(;r!==E.SENTINEL;)if(r.left!==E.SENTINEL&&r.lf_left>=c-1)r=r.left;else if(r.lf_left+r.piece.lineFeedCnt>c-1){const s=this.getAccumulatedValue(r,c-r.lf_left-2),g=this.getAccumulatedValue(r,c-r.lf_left-1);return l+=r.size_left,{node:r,remainder:Math.min(s+d-1,g),nodeStartOffset:l}}else if(r.lf_left+r.piece.lineFeedCnt===c-1){const s=this.getAccumulatedValue(r,c-r.lf_left-2);if(s+d-1<=r.piece.length)return{node:r,remainder:s+d-1,nodeStartOffset:l};d-=r.piece.length-s;break}else c-=r.lf_left+r.piece.lineFeedCnt,l+=r.size_left+r.piece.length,r=r.right;for(r=r.next();r!==E.SENTINEL;){if(r.piece.lineFeedCnt>0){const s=this.getAccumulatedValue(r,0),g=this.offsetOfNode(r);return{node:r,remainder:Math.min(d-1,s),nodeStartOffset:g}}else if(r.piece.length>=d-1){const s=this.offsetOfNode(r);return{node:r,remainder:d-1,nodeStartOffset:s}}else d-=r.piece.length;r=r.next()}return null}nodeCharCodeAt(c,d){if(c.piece.lineFeedCnt<1)return-1;const r=this._buffers[c.piece.bufferIndex],l=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start)+d;return r.buffer.charCodeAt(l)}offsetOfNode(c){if(!c)return 0;let d=c.size_left;for(;c!==this.root;)c.parent.right===c&&(d+=c.parent.size_left+c.parent.piece.length),c=c.parent;return d}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` `)}startWithLF(c){if(typeof c=="string")return c.charCodeAt(0)===10;if(c===E.SENTINEL||c.piece.lineFeedCnt===0)return!1;const d=c.piece,r=this._buffers[d.bufferIndex].lineStarts,l=d.start.line,s=r[l]+d.start.column;return l===r.length-1||r[l+1]>s+1?!1:this._buffers[d.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(c){return typeof c=="string"?c.charCodeAt(c.length-1)===13:c===E.SENTINEL||c.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(c,c.piece.length-1)===13}validateCRLFWithPrevNode(c){if(this.shouldCheckCRLF()&&this.startWithLF(c)){const d=c.prev();this.endWithCR(d)&&this.fixCRLF(d,c)}}validateCRLFWithNextNode(c){if(this.shouldCheckCRLF()&&this.endWithCR(c)){const d=c.next();this.startWithLF(d)&&this.fixCRLF(c,d)}}fixCRLF(c,d){const r=[],l=this._buffers[c.piece.bufferIndex].lineStarts;let s;c.piece.end.column===0?s={line:c.piece.end.line-1,column:l[c.piece.end.line]-l[c.piece.end.line-1]-1}:s={line:c.piece.end.line,column:c.piece.end.column-1};const g=c.piece.length-1,h=c.piece.lineFeedCnt-1;c.piece=new i(c.piece.bufferIndex,c.piece.start,s,h,g),(0,E.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&r.push(c);const m={line:d.piece.start.line+1,column:0},C=d.piece.length-1,w=this.getLineFeedCnt(d.piece.bufferIndex,m,d.piece.end);d.piece=new i(d.piece.bufferIndex,m,d.piece.end,w,C),(0,E.updateTreeMetadata)(this,d,-1,-1),d.piece.length===0&&r.push(d);const D=this.createNewPieces(`\r `);this.rbInsertRight(c,D[0]);for(let I=0;I0?this.wrappedTextIndentLength:0}getLineLength(o){const i=o>0?this.breakOffsets[o-1]:0;let t=this.breakOffsets[o]-i;return o>0&&(t+=this.wrappedTextIndentLength),t}getMaxOutputOffset(o){return this.getLineLength(o)}translateToInputOffset(o,i){o>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let t=o===0?i:this.breakOffsets[o-1]+i;if(this.injectionOffsets!==null)for(let a=0;athis.injectionOffsets[a];a++)t0?this.breakOffsets[a-1]:0,i===0)if(o<=u)t=a-1;else if(o>c)n=a+1;else break;else if(o=c)n=a+1;else break}let f=o-u;return a>0&&(f+=this.wrappedTextIndentLength),new v(a,f)}normalizeOutputPosition(o,i,n){if(this.injectionOffsets!==null){const t=this.outputPositionToOffsetInInputWithInjections(o,i),a=this.normalizeOffsetInInputWithInjectionsAroundInjections(t,n);if(a!==t)return this.offsetInInputWithInjectionsToOutputPosition(a,n)}if(n===0){if(o>0&&i===this.getMinOutputOffset(o))return new v(o-1,this.getMaxOutputOffset(o-1))}else if(n===1){const t=this.getOutputLineCount()-1;if(o0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(o>0?this.breakOffsets[o-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(o,i){const n=this.getInjectedTextAtOffset(o);if(!n)return o;if(i===2){if(o===n.offsetInInputWithInjections+n.length&&_(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let t=n.offsetInInputWithInjections;if(p(this.injectionOptions[n.injectedTextIndex].cursorStops))return t;let a=n.injectedTextIndex-1;for(;a>=0&&this.injectionOffsets[a]===this.injectionOffsets[n.injectedTextIndex]&&!(_(this.injectionOptions[a].cursorStops)||(t-=this.injectionOptions[a].content.length,p(this.injectionOptions[a].cursorStops)));)a--;return t}}else if(i===1||i===4){let t=n.offsetInInputWithInjections+n.length,a=n.injectedTextIndex;for(;a+1=0&&this.injectionOffsets[a-1]===this.injectionOffsets[a];)t-=this.injectionOptions[a-1].content.length,a--;return t}(0,L.assertNever)(i)}getInjectedText(o,i){const n=this.outputPositionToOffsetInInputWithInjections(o,i),t=this.getInjectedTextAtOffset(n);return t?{options:this.injectionOptions[t.injectedTextIndex]}:null}getInjectedTextAtOffset(o){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let t=0;for(let a=0;ao)break;if(o<=c)return{injectedTextIndex:a,offsetInInputWithInjections:f,length:u};t+=u}}}}e.ModelLineProjectionData=E;function _(b){return b==null?!0:b===y.InjectedTextCursorStops.Right||b===y.InjectedTextCursorStops.Both}function p(b){return b==null?!0:b===y.InjectedTextCursorStops.Left||b===y.InjectedTextCursorStops.Both}class S{constructor(o){this.options=o}}e.InjectedText=S;class v{constructor(o,i){this.outputLineIndex=o,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(o){return new k.Position(o+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=v}),define(ie[292],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DraggedTreeItemsIdentifier=e.TreeViewsDnDService=void 0;class L{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(E){if(E&&this._dragOperations.has(E)){const _=this._dragOperations.get(E);return this._dragOperations.delete(E),_}}}e.TreeViewsDnDService=L;class k{constructor(E){this.identifier=E}}e.DraggedTreeItemsIdentifier=k}),define(ie[293],ne([1,0,5,182,12,98,149]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class p{static computeUnicodeHighlights(i,n,t){const a=t?t.startLineNumber:1,u=t?t.endLineNumber:i.getLineCount(),f=new v(n),c=f.getCandidateCodePoints();let d;c==="allNonBasicAscii"?d=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):d=new RegExp(`${S(Array.from(c))}`,"g");const r=new k.Searcher(null,d),l=[];let s=!1,g,h=0,m=0,C=0;e:for(let w=a,D=u;w<=D;w++){const I=i.getLineContent(w),M=I.length;r.reset(0);do if(g=r.next(I),g){let A=g.index,O=g.index+g[0].length;if(A>0){const x=I.charCodeAt(A-1);y.isHighSurrogate(x)&&A--}if(O+1=x){s=!0;break e}l.push(new L.Range(w,A+1,w,O+1))}}while(g)}return{ranges:l,hasMore:s,ambiguousCharacterCount:h,invisibleCharacterCount:m,nonBasicAsciiCharacterCount:C}}static computeUnicodeHighlightReason(i,n){const t=new v(n);switch(t.shouldHighlightNonBasicASCII(i,null)){case 0:return null;case 2:return{kind:1};case 3:{const u=i.codePointAt(0),f=t.ambiguousCharacters.getPrimaryConfusable(u),c=y.AmbiguousCharacters.getLocales().filter(d=>!y.AmbiguousCharacters.getInstance(new Set([...n.allowedLocales,d])).isAmbiguous(u));return{kind:0,confusableWith:String.fromCodePoint(f),notAmbiguousInLocales:c}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=p;function S(o,i){return`[${y.escapeRegExpCharacters(o.map(t=>String.fromCodePoint(t)).join(""))}]`}class v{constructor(i){this.options=i,this.allowedCodePoints=new Set(i.allowedCodePoints),this.ambiguousCharacters=y.AmbiguousCharacters.getInstance(new Set(i.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const i=new Set;if(this.options.invisibleCharacters)for(const n of y.InvisibleCharacters.codePoints)b(String.fromCodePoint(n))||i.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())i.add(n);for(const n of this.allowedCodePoints)i.delete(n);return i}shouldHighlightNonBasicASCII(i,n){const t=i.codePointAt(0);if(this.allowedCodePoints.has(t))return 0;if(this.options.nonBasicASCII)return 1;let a=!1,u=!1;if(n)for(const f of n){const c=f.codePointAt(0),d=y.isBasicASCII(f);a=a||d,!d&&!this.ambiguousCharacters.isAmbiguous(c)&&!y.InvisibleCharacters.isInvisibleCharacter(c)&&(u=!0)}return!a&&u?0:this.options.invisibleCharacters&&!b(i)&&y.InvisibleCharacters.isInvisibleCharacter(t)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}function b(o){return o===" "||o===` `||o===" "}}),define(ie[211],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.ShowAiIconMode=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.GlyphMarginLane=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 L;(function(F){F[F.Unknown=0]="Unknown",F[F.Disabled=1]="Disabled",F[F.Enabled=2]="Enabled"})(L||(e.AccessibilitySupport=L={}));var k;(function(F){F[F.Invoke=1]="Invoke",F[F.Auto=2]="Auto"})(k||(e.CodeActionTriggerType=k={}));var y;(function(F){F[F.None=0]="None",F[F.KeepWhitespace=1]="KeepWhitespace",F[F.InsertAsSnippet=4]="InsertAsSnippet"})(y||(e.CompletionItemInsertTextRule=y={}));var E;(function(F){F[F.Method=0]="Method",F[F.Function=1]="Function",F[F.Constructor=2]="Constructor",F[F.Field=3]="Field",F[F.Variable=4]="Variable",F[F.Class=5]="Class",F[F.Struct=6]="Struct",F[F.Interface=7]="Interface",F[F.Module=8]="Module",F[F.Property=9]="Property",F[F.Event=10]="Event",F[F.Operator=11]="Operator",F[F.Unit=12]="Unit",F[F.Value=13]="Value",F[F.Constant=14]="Constant",F[F.Enum=15]="Enum",F[F.EnumMember=16]="EnumMember",F[F.Keyword=17]="Keyword",F[F.Text=18]="Text",F[F.Color=19]="Color",F[F.File=20]="File",F[F.Reference=21]="Reference",F[F.Customcolor=22]="Customcolor",F[F.Folder=23]="Folder",F[F.TypeParameter=24]="TypeParameter",F[F.User=25]="User",F[F.Issue=26]="Issue",F[F.Snippet=27]="Snippet"})(E||(e.CompletionItemKind=E={}));var _;(function(F){F[F.Deprecated=1]="Deprecated"})(_||(e.CompletionItemTag=_={}));var p;(function(F){F[F.Invoke=0]="Invoke",F[F.TriggerCharacter=1]="TriggerCharacter",F[F.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(p||(e.CompletionTriggerKind=p={}));var S;(function(F){F[F.EXACT=0]="EXACT",F[F.ABOVE=1]="ABOVE",F[F.BELOW=2]="BELOW"})(S||(e.ContentWidgetPositionPreference=S={}));var v;(function(F){F[F.NotSet=0]="NotSet",F[F.ContentFlush=1]="ContentFlush",F[F.RecoverFromMarkers=2]="RecoverFromMarkers",F[F.Explicit=3]="Explicit",F[F.Paste=4]="Paste",F[F.Undo=5]="Undo",F[F.Redo=6]="Redo"})(v||(e.CursorChangeReason=v={}));var b;(function(F){F[F.LF=1]="LF",F[F.CRLF=2]="CRLF"})(b||(e.DefaultEndOfLine=b={}));var o;(function(F){F[F.Text=0]="Text",F[F.Read=1]="Read",F[F.Write=2]="Write"})(o||(e.DocumentHighlightKind=o={}));var i;(function(F){F[F.None=0]="None",F[F.Keep=1]="Keep",F[F.Brackets=2]="Brackets",F[F.Advanced=3]="Advanced",F[F.Full=4]="Full"})(i||(e.EditorAutoIndentStrategy=i={}));var n;(function(F){F[F.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",F[F.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",F[F.accessibilitySupport=2]="accessibilitySupport",F[F.accessibilityPageSize=3]="accessibilityPageSize",F[F.ariaLabel=4]="ariaLabel",F[F.ariaRequired=5]="ariaRequired",F[F.autoClosingBrackets=6]="autoClosingBrackets",F[F.autoClosingComments=7]="autoClosingComments",F[F.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",F[F.autoClosingDelete=9]="autoClosingDelete",F[F.autoClosingOvertype=10]="autoClosingOvertype",F[F.autoClosingQuotes=11]="autoClosingQuotes",F[F.autoIndent=12]="autoIndent",F[F.automaticLayout=13]="automaticLayout",F[F.autoSurround=14]="autoSurround",F[F.bracketPairColorization=15]="bracketPairColorization",F[F.guides=16]="guides",F[F.codeLens=17]="codeLens",F[F.codeLensFontFamily=18]="codeLensFontFamily",F[F.codeLensFontSize=19]="codeLensFontSize",F[F.colorDecorators=20]="colorDecorators",F[F.colorDecoratorsLimit=21]="colorDecoratorsLimit",F[F.columnSelection=22]="columnSelection",F[F.comments=23]="comments",F[F.contextmenu=24]="contextmenu",F[F.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",F[F.cursorBlinking=26]="cursorBlinking",F[F.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",F[F.cursorStyle=28]="cursorStyle",F[F.cursorSurroundingLines=29]="cursorSurroundingLines",F[F.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",F[F.cursorWidth=31]="cursorWidth",F[F.disableLayerHinting=32]="disableLayerHinting",F[F.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",F[F.domReadOnly=34]="domReadOnly",F[F.dragAndDrop=35]="dragAndDrop",F[F.dropIntoEditor=36]="dropIntoEditor",F[F.emptySelectionClipboard=37]="emptySelectionClipboard",F[F.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",F[F.extraEditorClassName=39]="extraEditorClassName",F[F.fastScrollSensitivity=40]="fastScrollSensitivity",F[F.find=41]="find",F[F.fixedOverflowWidgets=42]="fixedOverflowWidgets",F[F.folding=43]="folding",F[F.foldingStrategy=44]="foldingStrategy",F[F.foldingHighlight=45]="foldingHighlight",F[F.foldingImportsByDefault=46]="foldingImportsByDefault",F[F.foldingMaximumRegions=47]="foldingMaximumRegions",F[F.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",F[F.fontFamily=49]="fontFamily",F[F.fontInfo=50]="fontInfo",F[F.fontLigatures=51]="fontLigatures",F[F.fontSize=52]="fontSize",F[F.fontWeight=53]="fontWeight",F[F.fontVariations=54]="fontVariations",F[F.formatOnPaste=55]="formatOnPaste",F[F.formatOnType=56]="formatOnType",F[F.glyphMargin=57]="glyphMargin",F[F.gotoLocation=58]="gotoLocation",F[F.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",F[F.hover=60]="hover",F[F.inDiffEditor=61]="inDiffEditor",F[F.inlineSuggest=62]="inlineSuggest",F[F.letterSpacing=63]="letterSpacing",F[F.lightbulb=64]="lightbulb",F[F.lineDecorationsWidth=65]="lineDecorationsWidth",F[F.lineHeight=66]="lineHeight",F[F.lineNumbers=67]="lineNumbers",F[F.lineNumbersMinChars=68]="lineNumbersMinChars",F[F.linkedEditing=69]="linkedEditing",F[F.links=70]="links",F[F.matchBrackets=71]="matchBrackets",F[F.minimap=72]="minimap",F[F.mouseStyle=73]="mouseStyle",F[F.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",F[F.mouseWheelZoom=75]="mouseWheelZoom",F[F.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",F[F.multiCursorModifier=77]="multiCursorModifier",F[F.multiCursorPaste=78]="multiCursorPaste",F[F.multiCursorLimit=79]="multiCursorLimit",F[F.occurrencesHighlight=80]="occurrencesHighlight",F[F.overviewRulerBorder=81]="overviewRulerBorder",F[F.overviewRulerLanes=82]="overviewRulerLanes",F[F.padding=83]="padding",F[F.pasteAs=84]="pasteAs",F[F.parameterHints=85]="parameterHints",F[F.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",F[F.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",F[F.quickSuggestions=88]="quickSuggestions",F[F.quickSuggestionsDelay=89]="quickSuggestionsDelay",F[F.readOnly=90]="readOnly",F[F.readOnlyMessage=91]="readOnlyMessage",F[F.renameOnType=92]="renameOnType",F[F.renderControlCharacters=93]="renderControlCharacters",F[F.renderFinalNewline=94]="renderFinalNewline",F[F.renderLineHighlight=95]="renderLineHighlight",F[F.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",F[F.renderValidationDecorations=97]="renderValidationDecorations",F[F.renderWhitespace=98]="renderWhitespace",F[F.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",F[F.roundedSelection=100]="roundedSelection",F[F.rulers=101]="rulers",F[F.scrollbar=102]="scrollbar",F[F.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",F[F.scrollBeyondLastLine=104]="scrollBeyondLastLine",F[F.scrollPredominantAxis=105]="scrollPredominantAxis",F[F.selectionClipboard=106]="selectionClipboard",F[F.selectionHighlight=107]="selectionHighlight",F[F.selectOnLineNumbers=108]="selectOnLineNumbers",F[F.showFoldingControls=109]="showFoldingControls",F[F.showUnused=110]="showUnused",F[F.snippetSuggestions=111]="snippetSuggestions",F[F.smartSelect=112]="smartSelect",F[F.smoothScrolling=113]="smoothScrolling",F[F.stickyScroll=114]="stickyScroll",F[F.stickyTabStops=115]="stickyTabStops",F[F.stopRenderingLineAfter=116]="stopRenderingLineAfter",F[F.suggest=117]="suggest",F[F.suggestFontSize=118]="suggestFontSize",F[F.suggestLineHeight=119]="suggestLineHeight",F[F.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",F[F.suggestSelection=121]="suggestSelection",F[F.tabCompletion=122]="tabCompletion",F[F.tabIndex=123]="tabIndex",F[F.unicodeHighlighting=124]="unicodeHighlighting",F[F.unusualLineTerminators=125]="unusualLineTerminators",F[F.useShadowDOM=126]="useShadowDOM",F[F.useTabStops=127]="useTabStops",F[F.wordBreak=128]="wordBreak",F[F.wordSeparators=129]="wordSeparators",F[F.wordWrap=130]="wordWrap",F[F.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",F[F.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",F[F.wordWrapColumn=133]="wordWrapColumn",F[F.wordWrapOverride1=134]="wordWrapOverride1",F[F.wordWrapOverride2=135]="wordWrapOverride2",F[F.wrappingIndent=136]="wrappingIndent",F[F.wrappingStrategy=137]="wrappingStrategy",F[F.showDeprecated=138]="showDeprecated",F[F.inlayHints=139]="inlayHints",F[F.editorClassName=140]="editorClassName",F[F.pixelRatio=141]="pixelRatio",F[F.tabFocusMode=142]="tabFocusMode",F[F.layoutInfo=143]="layoutInfo",F[F.wrappingInfo=144]="wrappingInfo",F[F.defaultColorDecorators=145]="defaultColorDecorators",F[F.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",F[F.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(n||(e.EditorOption=n={}));var t;(function(F){F[F.TextDefined=0]="TextDefined",F[F.LF=1]="LF",F[F.CRLF=2]="CRLF"})(t||(e.EndOfLinePreference=t={}));var a;(function(F){F[F.LF=0]="LF",F[F.CRLF=1]="CRLF"})(a||(e.EndOfLineSequence=a={}));var u;(function(F){F[F.Left=1]="Left",F[F.Right=2]="Right"})(u||(e.GlyphMarginLane=u={}));var f;(function(F){F[F.None=0]="None",F[F.Indent=1]="Indent",F[F.IndentOutdent=2]="IndentOutdent",F[F.Outdent=3]="Outdent"})(f||(e.IndentAction=f={}));var c;(function(F){F[F.Both=0]="Both",F[F.Right=1]="Right",F[F.Left=2]="Left",F[F.None=3]="None"})(c||(e.InjectedTextCursorStops=c={}));var d;(function(F){F[F.Type=1]="Type",F[F.Parameter=2]="Parameter"})(d||(e.InlayHintKind=d={}));var r;(function(F){F[F.Automatic=0]="Automatic",F[F.Explicit=1]="Explicit"})(r||(e.InlineCompletionTriggerKind=r={}));var l;(function(F){F[F.DependsOnKbLayout=-1]="DependsOnKbLayout",F[F.Unknown=0]="Unknown",F[F.Backspace=1]="Backspace",F[F.Tab=2]="Tab",F[F.Enter=3]="Enter",F[F.Shift=4]="Shift",F[F.Ctrl=5]="Ctrl",F[F.Alt=6]="Alt",F[F.PauseBreak=7]="PauseBreak",F[F.CapsLock=8]="CapsLock",F[F.Escape=9]="Escape",F[F.Space=10]="Space",F[F.PageUp=11]="PageUp",F[F.PageDown=12]="PageDown",F[F.End=13]="End",F[F.Home=14]="Home",F[F.LeftArrow=15]="LeftArrow",F[F.UpArrow=16]="UpArrow",F[F.RightArrow=17]="RightArrow",F[F.DownArrow=18]="DownArrow",F[F.Insert=19]="Insert",F[F.Delete=20]="Delete",F[F.Digit0=21]="Digit0",F[F.Digit1=22]="Digit1",F[F.Digit2=23]="Digit2",F[F.Digit3=24]="Digit3",F[F.Digit4=25]="Digit4",F[F.Digit5=26]="Digit5",F[F.Digit6=27]="Digit6",F[F.Digit7=28]="Digit7",F[F.Digit8=29]="Digit8",F[F.Digit9=30]="Digit9",F[F.KeyA=31]="KeyA",F[F.KeyB=32]="KeyB",F[F.KeyC=33]="KeyC",F[F.KeyD=34]="KeyD",F[F.KeyE=35]="KeyE",F[F.KeyF=36]="KeyF",F[F.KeyG=37]="KeyG",F[F.KeyH=38]="KeyH",F[F.KeyI=39]="KeyI",F[F.KeyJ=40]="KeyJ",F[F.KeyK=41]="KeyK",F[F.KeyL=42]="KeyL",F[F.KeyM=43]="KeyM",F[F.KeyN=44]="KeyN",F[F.KeyO=45]="KeyO",F[F.KeyP=46]="KeyP",F[F.KeyQ=47]="KeyQ",F[F.KeyR=48]="KeyR",F[F.KeyS=49]="KeyS",F[F.KeyT=50]="KeyT",F[F.KeyU=51]="KeyU",F[F.KeyV=52]="KeyV",F[F.KeyW=53]="KeyW",F[F.KeyX=54]="KeyX",F[F.KeyY=55]="KeyY",F[F.KeyZ=56]="KeyZ",F[F.Meta=57]="Meta",F[F.ContextMenu=58]="ContextMenu",F[F.F1=59]="F1",F[F.F2=60]="F2",F[F.F3=61]="F3",F[F.F4=62]="F4",F[F.F5=63]="F5",F[F.F6=64]="F6",F[F.F7=65]="F7",F[F.F8=66]="F8",F[F.F9=67]="F9",F[F.F10=68]="F10",F[F.F11=69]="F11",F[F.F12=70]="F12",F[F.F13=71]="F13",F[F.F14=72]="F14",F[F.F15=73]="F15",F[F.F16=74]="F16",F[F.F17=75]="F17",F[F.F18=76]="F18",F[F.F19=77]="F19",F[F.F20=78]="F20",F[F.F21=79]="F21",F[F.F22=80]="F22",F[F.F23=81]="F23",F[F.F24=82]="F24",F[F.NumLock=83]="NumLock",F[F.ScrollLock=84]="ScrollLock",F[F.Semicolon=85]="Semicolon",F[F.Equal=86]="Equal",F[F.Comma=87]="Comma",F[F.Minus=88]="Minus",F[F.Period=89]="Period",F[F.Slash=90]="Slash",F[F.Backquote=91]="Backquote",F[F.BracketLeft=92]="BracketLeft",F[F.Backslash=93]="Backslash",F[F.BracketRight=94]="BracketRight",F[F.Quote=95]="Quote",F[F.OEM_8=96]="OEM_8",F[F.IntlBackslash=97]="IntlBackslash",F[F.Numpad0=98]="Numpad0",F[F.Numpad1=99]="Numpad1",F[F.Numpad2=100]="Numpad2",F[F.Numpad3=101]="Numpad3",F[F.Numpad4=102]="Numpad4",F[F.Numpad5=103]="Numpad5",F[F.Numpad6=104]="Numpad6",F[F.Numpad7=105]="Numpad7",F[F.Numpad8=106]="Numpad8",F[F.Numpad9=107]="Numpad9",F[F.NumpadMultiply=108]="NumpadMultiply",F[F.NumpadAdd=109]="NumpadAdd",F[F.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",F[F.NumpadSubtract=111]="NumpadSubtract",F[F.NumpadDecimal=112]="NumpadDecimal",F[F.NumpadDivide=113]="NumpadDivide",F[F.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",F[F.ABNT_C1=115]="ABNT_C1",F[F.ABNT_C2=116]="ABNT_C2",F[F.AudioVolumeMute=117]="AudioVolumeMute",F[F.AudioVolumeUp=118]="AudioVolumeUp",F[F.AudioVolumeDown=119]="AudioVolumeDown",F[F.BrowserSearch=120]="BrowserSearch",F[F.BrowserHome=121]="BrowserHome",F[F.BrowserBack=122]="BrowserBack",F[F.BrowserForward=123]="BrowserForward",F[F.MediaTrackNext=124]="MediaTrackNext",F[F.MediaTrackPrevious=125]="MediaTrackPrevious",F[F.MediaStop=126]="MediaStop",F[F.MediaPlayPause=127]="MediaPlayPause",F[F.LaunchMediaPlayer=128]="LaunchMediaPlayer",F[F.LaunchMail=129]="LaunchMail",F[F.LaunchApp2=130]="LaunchApp2",F[F.Clear=131]="Clear",F[F.MAX_VALUE=132]="MAX_VALUE"})(l||(e.KeyCode=l={}));var s;(function(F){F[F.Hint=1]="Hint",F[F.Info=2]="Info",F[F.Warning=4]="Warning",F[F.Error=8]="Error"})(s||(e.MarkerSeverity=s={}));var g;(function(F){F[F.Unnecessary=1]="Unnecessary",F[F.Deprecated=2]="Deprecated"})(g||(e.MarkerTag=g={}));var h;(function(F){F[F.Inline=1]="Inline",F[F.Gutter=2]="Gutter"})(h||(e.MinimapPosition=h={}));var m;(function(F){F[F.UNKNOWN=0]="UNKNOWN",F[F.TEXTAREA=1]="TEXTAREA",F[F.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",F[F.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",F[F.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",F[F.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",F[F.CONTENT_TEXT=6]="CONTENT_TEXT",F[F.CONTENT_EMPTY=7]="CONTENT_EMPTY",F[F.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",F[F.CONTENT_WIDGET=9]="CONTENT_WIDGET",F[F.OVERVIEW_RULER=10]="OVERVIEW_RULER",F[F.SCROLLBAR=11]="SCROLLBAR",F[F.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",F[F.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(m||(e.MouseTargetType=m={}));var C;(function(F){F[F.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",F[F.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",F[F.TOP_CENTER=2]="TOP_CENTER"})(C||(e.OverlayWidgetPositionPreference=C={}));var w;(function(F){F[F.Left=1]="Left",F[F.Center=2]="Center",F[F.Right=4]="Right",F[F.Full=7]="Full"})(w||(e.OverviewRulerLane=w={}));var D;(function(F){F[F.Left=0]="Left",F[F.Right=1]="Right",F[F.None=2]="None",F[F.LeftOfInjectedText=3]="LeftOfInjectedText",F[F.RightOfInjectedText=4]="RightOfInjectedText"})(D||(e.PositionAffinity=D={}));var I;(function(F){F[F.Off=0]="Off",F[F.On=1]="On",F[F.Relative=2]="Relative",F[F.Interval=3]="Interval",F[F.Custom=4]="Custom"})(I||(e.RenderLineNumbersType=I={}));var M;(function(F){F[F.None=0]="None",F[F.Text=1]="Text",F[F.Blocks=2]="Blocks"})(M||(e.RenderMinimap=M={}));var A;(function(F){F[F.Smooth=0]="Smooth",F[F.Immediate=1]="Immediate"})(A||(e.ScrollType=A={}));var O;(function(F){F[F.Auto=1]="Auto",F[F.Hidden=2]="Hidden",F[F.Visible=3]="Visible"})(O||(e.ScrollbarVisibility=O={}));var T;(function(F){F[F.LTR=0]="LTR",F[F.RTL=1]="RTL"})(T||(e.SelectionDirection=T={}));var N;(function(F){F.Off="off",F.OnCode="onCode",F.On="on"})(N||(e.ShowAiIconMode=N={}));var P;(function(F){F[F.Invoke=1]="Invoke",F[F.TriggerCharacter=2]="TriggerCharacter",F[F.ContentChange=3]="ContentChange"})(P||(e.SignatureHelpTriggerKind=P={}));var x;(function(F){F[F.File=0]="File",F[F.Module=1]="Module",F[F.Namespace=2]="Namespace",F[F.Package=3]="Package",F[F.Class=4]="Class",F[F.Method=5]="Method",F[F.Property=6]="Property",F[F.Field=7]="Field",F[F.Constructor=8]="Constructor",F[F.Enum=9]="Enum",F[F.Interface=10]="Interface",F[F.Function=11]="Function",F[F.Variable=12]="Variable",F[F.Constant=13]="Constant",F[F.String=14]="String",F[F.Number=15]="Number",F[F.Boolean=16]="Boolean",F[F.Array=17]="Array",F[F.Object=18]="Object",F[F.Key=19]="Key",F[F.Null=20]="Null",F[F.EnumMember=21]="EnumMember",F[F.Struct=22]="Struct",F[F.Event=23]="Event",F[F.Operator=24]="Operator",F[F.TypeParameter=25]="TypeParameter"})(x||(e.SymbolKind=x={}));var R;(function(F){F[F.Deprecated=1]="Deprecated"})(R||(e.SymbolTag=R={}));var B;(function(F){F[F.Hidden=0]="Hidden",F[F.Blink=1]="Blink",F[F.Smooth=2]="Smooth",F[F.Phase=3]="Phase",F[F.Expand=4]="Expand",F[F.Solid=5]="Solid"})(B||(e.TextEditorCursorBlinkingStyle=B={}));var W;(function(F){F[F.Line=1]="Line",F[F.Block=2]="Block",F[F.Underline=3]="Underline",F[F.LineThin=4]="LineThin",F[F.BlockOutline=5]="BlockOutline",F[F.UnderlineThin=6]="UnderlineThin"})(W||(e.TextEditorCursorStyle=W={}));var V;(function(F){F[F.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",F[F.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",F[F.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",F[F.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(V||(e.TrackedRangeStickiness=V={}));var U;(function(F){F[F.None=0]="None",F[F.Same=1]="Same",F[F.Indent=2]="Indent",F[F.DeepIndent=3]="DeepIndent"})(U||(e.WrappingIndent=U={}))}),define(ie[523],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class L{constructor(_,p,S,v){this.range=_,this.nestingLevel=p,this.nestingLevelOfEqualBracketType=S,this.isInvalid=v}}e.BracketInfo=L;class k{constructor(_,p,S,v,b,o){this.range=_,this.openingBracketRange=p,this.closingBracketRange=S,this.nestingLevel=v,this.nestingLevelOfEqualBracketType=b,this.bracketPairNode=o}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=k;class y extends k{constructor(_,p,S,v,b,o,i){super(_,p,S,v,b,o),this.minVisibleColumnIndentation=i}}e.BracketPairWithMinIndentationInfo=y}),define(ie[524],ne([1,0,6,2,523,180,287,89,286,130,209,13,285]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class n extends k.Disposable{didLanguageChange(r){return this.brackets.didLanguageChange(r)}constructor(r,l){if(super(),this.textModel=r,this.getLanguageConfiguration=l,this.didChangeEmitter=new L.Emitter,this.denseKeyProvider=new v.DenseKeyProvider,this.brackets=new _.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],r.tokenization.hasTokens)r.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const s=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),g=new b.FastTokenizer(this.textModel.getValue(),s);this.initialAstWithoutTokens=(0,S.parseDocument)(g,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const r=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,r||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:r}){const l=r.map(s=>new E.TextEditInfo((0,p.toLength)(s.fromLineNumber-1,0),(0,p.toLength)(s.toLineNumber,0),(0,p.toLength)(s.toLineNumber-s.fromLineNumber+1,0)));this.handleEdits(l,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(r){const l=E.TextEditInfo.fromModelContentChanges(r.changes);this.handleEdits(l,!1)}handleEdits(r,l){const s=(0,i.combineTextEditInfos)(this.queuedTextEdits,r);this.queuedTextEdits=s,this.initialAstWithoutTokens&&!l&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,i.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,r))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(r,l,s){const h=l,m=new b.TextBufferTokenizer(this.textModel,this.brackets);return(0,S.parseDocument)(m,r,h,s)}getBracketsInRange(r,l){this.flushQueue();const s=(0,p.toLength)(r.startLineNumber-1,r.startColumn-1),g=(0,p.toLength)(r.endLineNumber-1,r.endColumn-1);return new o.CallbackIterable(h=>{const m=this.initialAstWithoutTokens||this.astWithTokens;u(m,p.lengthZero,m.length,s,g,h,0,0,new Map,l)})}getBracketPairsInRange(r,l){this.flushQueue();const s=(0,p.positionToLength)(r.getStartPosition()),g=(0,p.positionToLength)(r.getEndPosition());return new o.CallbackIterable(h=>{const m=this.initialAstWithoutTokens||this.astWithTokens,C=new f(h,l,this.textModel);c(m,p.lengthZero,m.length,s,g,C,0,new Map)})}getFirstBracketAfter(r){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return a(l,p.lengthZero,l.length,(0,p.positionToLength)(r))}getFirstBracketBefore(r){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return t(l,p.lengthZero,l.length,(0,p.positionToLength)(r))}}e.BracketPairsTree=n;function t(d,r,l,s){if(d.kind===4||d.kind===2){const g=[];for(const h of d.children)l=(0,p.lengthAdd)(r,h.length),g.push({nodeOffsetStart:r,nodeOffsetEnd:l}),r=l;for(let h=g.length-1;h>=0;h--){const{nodeOffsetStart:m,nodeOffsetEnd:C}=g[h];if((0,p.lengthLessThan)(m,s)){const w=t(d.children[h],m,C,s);if(w)return w}}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,p.lengthsToRange)(r,l);return{bracketInfo:d.bracketInfo,range:g}}}return null}function a(d,r,l,s){if(d.kind===4||d.kind===2){for(const g of d.children){if(l=(0,p.lengthAdd)(r,g.length),(0,p.lengthLessThan)(s,l)){const h=a(g,r,l,s);if(h)return h}r=l}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,p.lengthsToRange)(r,l);return{bracketInfo:d.bracketInfo,range:g}}}return null}function u(d,r,l,s,g,h,m,C,w,D,I=!1){if(m>200)return!0;e:for(;;)switch(d.kind){case 4:{const M=d.childrenLength;for(let A=0;A200)return!0;let D=!0;if(d.kind===2){let I=0;if(C){let O=C.get(d.openingBracket.text);O===void 0&&(O=0),I=O,O++,C.set(d.openingBracket.text,O)}const M=(0,p.lengthAdd)(r,d.openingBracket.length);let A=-1;if(h.includeMinIndentation&&(A=d.computeMinIndentation(r,h.textModel)),D=h.push(new y.BracketPairWithMinIndentationInfo((0,p.lengthsToRange)(r,l),(0,p.lengthsToRange)(r,M),d.closingBracket?(0,p.lengthsToRange)((0,p.lengthAdd)(M,((w=d.child)===null||w===void 0?void 0:w.length)||p.lengthZero),l):void 0,m,I,d,A)),r=M,D&&d.child){const O=d.child;if(l=(0,p.lengthAdd)(r,O.length),(0,p.lengthLessThanEqual)(r,g)&&(0,p.lengthGreaterThanEqual)(l,s)&&(D=c(O,r,l,s,g,h,m+1,C),!D))return!1}C?.set(d.openingBracket.text,I)}else{let I=r;for(const M of d.children){const A=I;if(I=(0,p.lengthAdd)(I,M.length),(0,p.lengthLessThanEqual)(A,g)&&(0,p.lengthLessThanEqual)(s,I)&&(D=c(M,A,I,s,g,h,m,C),!D))return!1}}return D}}),define(ie[112],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=void 0;class L{constructor(){this.changeType=1}}e.ModelRawFlush=L;class k{static applyInjectedText(i,n){if(!n||n.length===0)return i;let t="",a=0;for(const u of n)t+=i.substring(a,u.column-1),a=u.column-1,t+=u.options.content;return t+=i.substring(a),t}static fromDecorations(i){const n=[];for(const t of i)t.options.before&&t.options.before.content.length>0&&n.push(new k(t.ownerId,t.range.startLineNumber,t.range.startColumn,t.options.before,0)),t.options.after&&t.options.after.content.length>0&&n.push(new k(t.ownerId,t.range.endLineNumber,t.range.endColumn,t.options.after,1));return n.sort((t,a)=>t.lineNumber===a.lineNumber?t.column===a.column?t.order-a.order:t.column-a.column:t.lineNumber-a.lineNumber),n}constructor(i,n,t,a,u){this.ownerId=i,this.lineNumber=n,this.column=t,this.options=a,this.order=u}}e.LineInjectedText=k;class y{constructor(i,n,t){this.changeType=2,this.lineNumber=i,this.detail=n,this.injectedText=t}}e.ModelRawLineChanged=y;class E{constructor(i,n){this.changeType=3,this.fromLineNumber=i,this.toLineNumber=n}}e.ModelRawLinesDeleted=E;class _{constructor(i,n,t,a){this.changeType=4,this.injectedTexts=a,this.fromLineNumber=i,this.toLineNumber=n,this.detail=t}}e.ModelRawLinesInserted=_;class p{constructor(){this.changeType=5}}e.ModelRawEOLChanged=p;class S{constructor(i,n,t,a){this.changes=i,this.versionId=n,this.isUndoing=t,this.isRedoing=a,this.resultingSelection=null}containsEvent(i){for(let n=0,t=this.changes.length;nu)throw new v.BugIndicatingError("Illegal value for lineNumber");const f=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,c=!!(f&&f.offSide);let d=-2,r=-1,l=-2,s=-1;const g=P=>{if(d!==-1&&(d===-2||d>P-1)){d=-1,r=-1;for(let x=P-2;x>=0;x--){const R=this._computeIndentLevel(x);if(R>=0){d=x,r=R;break}}}if(l===-2){l=-1,s=-1;for(let x=P;x=0){l=x,s=R;break}}}};let h=-2,m=-1,C=-2,w=-1;const D=P=>{if(h===-2){h=-1,m=-1;for(let x=P-2;x>=0;x--){const R=this._computeIndentLevel(x);if(R>=0){h=x,m=R;break}}}if(C!==-1&&(C===-2||C=0){C=x,w=R;break}}}};let I=0,M=!0,A=0,O=!0,T=0,N=0;for(let P=0;M||O;P++){const x=n-P,R=n+P;P>1&&(x<1||x1&&(R>u||R>a)&&(O=!1),P>5e4&&(M=!1,O=!1);let B=-1;if(M&&x>=1){const V=this._computeIndentLevel(x-1);V>=0?(l=x-1,s=V,B=Math.ceil(V/this.textModel.getOptions().indentSize)):(g(x),B=this._getIndentLevelForWhitespaceLine(c,r,s))}let W=-1;if(O&&R<=u){const V=this._computeIndentLevel(R-1);V>=0?(h=R-1,m=V,W=Math.ceil(V/this.textModel.getOptions().indentSize)):(D(R),W=this._getIndentLevelForWhitespaceLine(c,m,w))}if(P===0){N=B;continue}if(P===1){if(R<=u&&W>=0&&N+1===W){M=!1,I=R,A=R,T=W;continue}if(x>=1&&B>=0&&B-1===N){O=!1,I=x,A=x,T=B;continue}if(I=n,A=n,T=N,T===0)return{startLineNumber:I,endLineNumber:A,indent:T}}M&&(B>=T?I=x:M=!1),O&&(W>=T?A=R:O=!1)}return{startLineNumber:I,endLineNumber:A,indent:T}}getLinesBracketGuides(n,t,a,u){var f;const c=[];for(let h=n;h<=t;h++)c.push([]);const d=!0,r=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new E.Range(n,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(a&&r.length>0){const h=(n<=a.lineNumber&&a.lineNumber<=t?r:this.textModel.bracketPairs.getBracketPairsInRange(E.Range.fromPositions(a)).toArray()).filter(m=>E.Range.strictContainsPosition(m.range,a));l=(f=(0,L.findLast)(h,m=>d||m.range.startLineNumber!==m.range.endLineNumber))===null||f===void 0?void 0:f.range}const s=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new o;for(const h of r){if(!h.closingBracketRange)continue;const m=l&&h.range.equalsRange(l);if(!m&&!u.includeInactive)continue;const C=g.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,s)+(u.highlightActive&&m?" "+g.activeClassName:""),w=h.openingBracketRange.getStartPosition(),D=h.closingBracketRange.getStartPosition(),I=u.horizontalGuides===S.HorizontalGuidesState.Enabled||u.horizontalGuides===S.HorizontalGuidesState.EnabledForActive&&m;if(h.range.startLineNumber===h.range.endLineNumber){d&&I&&c[h.range.startLineNumber-n].push(new S.IndentGuide(-1,h.openingBracketRange.getEndPosition().column,C,new S.IndentGuideHorizontalLine(!1,D.column),-1,-1));continue}const M=this.getVisibleColumnFromPosition(D),A=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),O=Math.min(A,M,h.minVisibleColumnIndentation+1);let T=!1;k.firstNonWhitespaceIndex(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=n&&A>O&&c[w.lineNumber-n].push(new S.IndentGuide(O,-1,C,new S.IndentGuideHorizontalLine(!1,w.column),-1,-1)),D.lineNumber<=t&&M>O&&c[D.lineNumber-n].push(new S.IndentGuide(O,-1,C,new S.IndentGuideHorizontalLine(!T,D.column),-1,-1)))}for(const h of c)h.sort((m,C)=>m.visibleColumn-C.visibleColumn);return c}getVisibleColumnFromPosition(n){return y.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(n.lineNumber),n.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(n,t){this.assertNotDisposed();const a=this.textModel.getLineCount();if(n<1||n>a)throw new Error("Illegal value for startLineNumber");if(t<1||t>a)throw new Error("Illegal value for endLineNumber");const u=this.textModel.getOptions(),f=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,c=!!(f&&f.offSide),d=new Array(t-n+1);let r=-2,l=-1,s=-2,g=-1;for(let h=n;h<=t;h++){const m=h-n,C=this._computeIndentLevel(h-1);if(C>=0){r=h-1,l=C,d[m]=Math.ceil(C/u.indentSize);continue}if(r===-2){r=-1,l=-1;for(let w=h-2;w>=0;w--){const D=this._computeIndentLevel(w);if(D>=0){r=w,l=D;break}}}if(s!==-1&&(s===-2||s=0){s=w,g=D;break}}}d[m]=this._getIndentLevelForWhitespaceLine(c,l,g)}return d}_getIndentLevelForWhitespaceLine(n,t,a){const u=this.textModel.getOptions();return t===-1||a===-1?0:t{this._tokenizationSupports.get(p)===S&&(this._tokenizationSupports.delete(p),this.handleChange([p]))})}get(p){return this._tokenizationSupports.get(p)||null}registerFactory(p,S){var v;(v=this._factories.get(p))===null||v===void 0||v.dispose();const b=new E(this,p,S);return this._factories.set(p,b),(0,k.toDisposable)(()=>{const o=this._factories.get(p);!o||o!==b||(this._factories.delete(p),o.dispose())})}async getOrCreate(p){const S=this.get(p);if(S)return S;const v=this._factories.get(p);return!v||v.isResolved?null:(await v.resolve(),this.get(p))}isResolved(p){if(this.get(p))return!0;const v=this._factories.get(p);return!!(!v||v.isResolved)}setColorMap(p){this._colorMap=p,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=y;class E extends k.Disposable{get isResolved(){return this._isResolved}constructor(p,S,v){super(),this._registry=p,this._languageId=S,this._factory=v,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 p=await this._factory.tokenizationSupport;this._isResolved=!0,p&&!this._isDisposed&&this._register(this._registry.register(this._languageId,p))}}}),define(ie[526],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class L{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(y,E){this._startLineNumber=y,this._tokens=E}getLineTokens(y){return this._tokens[y-this._startLineNumber]}appendLineTokens(y){this._tokens.push(y)}}e.ContiguousMultilineTokens=L}),define(ie[295],ne([1,0,526]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class k{constructor(){this._tokens=[]}add(E,_){if(this._tokens.length>0){const p=this._tokens[this._tokens.length-1];if(p.endLineNumber+1===E){p.appendLineTokens(_);return}}this._tokens.push(new L.ContiguousMultilineTokens(E,[_]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=k}),define(ie[93],ne([1,0,128]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class k{static createEmpty(_,p){const S=k.defaultTokenMetadata,v=new Uint32Array(2);return v[0]=_.length,v[1]=S,new k(v,_,p)}constructor(_,p,S){this._lineTokensBrand=void 0,this._tokens=_,this._tokensCount=this._tokens.length>>>1,this._text=p,this._languageIdCodec=S}equals(_){return _ instanceof k?this.slicedEquals(_,0,this._tokensCount):!1}slicedEquals(_,p,S){if(this._text!==_._text||this._tokensCount!==_._tokensCount)return!1;const v=p<<1,b=v+(S<<1);for(let o=v;o0?this._tokens[_-1<<1]:0}getMetadata(_){return this._tokens[(_<<1)+1]}getLanguageId(_){const p=this._tokens[(_<<1)+1],S=L.TokenMetadata.getLanguageId(p);return this._languageIdCodec.decodeLanguageId(S)}getStandardTokenType(_){const p=this._tokens[(_<<1)+1];return L.TokenMetadata.getTokenType(p)}getForeground(_){const p=this._tokens[(_<<1)+1];return L.TokenMetadata.getForeground(p)}getClassName(_){const p=this._tokens[(_<<1)+1];return L.TokenMetadata.getClassNameFromMetadata(p)}getInlineStyle(_,p){const S=this._tokens[(_<<1)+1];return L.TokenMetadata.getInlineStyleFromMetadata(S,p)}getPresentation(_){const p=this._tokens[(_<<1)+1];return L.TokenMetadata.getPresentationFromMetadata(p)}getEndOffset(_){return this._tokens[_<<1]}findTokenIndexAtOffset(_){return k.findIndexInTokensArray(this._tokens,_)}inflate(){return this}sliceAndInflate(_,p,S){return new y(this,_,p,S)}static convertToEndOffset(_,p){const v=(_.length>>>1)-1;for(let b=0;b>>1)-1;for(;Sp&&(v=b)}return S}withInserted(_){if(_.length===0)return this;let p=0,S=0,v="";const b=new Array;let o=0;for(;;){const i=po){v+=this._text.substring(o,n.offset);const t=this._tokens[(p<<1)+1];b.push(v.length,t),o=n.offset}v+=n.text,b.push(v.length,n.tokenMetadata),S++}else break}return new k(new Uint32Array(b),v,this._languageIdCodec)}}e.LineTokens=k,k.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class y{constructor(_,p,S,v){this._source=_,this._startOffset=p,this._endOffset=S,this._deltaOffset=v,this._firstTokenIndex=_.findTokenIndexAtOffset(p),this._tokensCount=0;for(let b=this._firstTokenIndex,o=_.getCount();b=S);b++)this._tokensCount++}getMetadata(_){return this._source.getMetadata(this._firstTokenIndex+_)}getLanguageId(_){return this._source.getLanguageId(this._firstTokenIndex+_)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(_){return _ instanceof y?this._startOffset===_._startOffset&&this._endOffset===_._endOffset&&this._deltaOffset===_._deltaOffset&&this._source.slicedEquals(_._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(_){return this._source.getForeground(this._firstTokenIndex+_)}getEndOffset(_){const p=this._source.getEndOffset(this._firstTokenIndex+_);return Math.min(this._endOffset,p)-this._startOffset+this._deltaOffset}getClassName(_){return this._source.getClassName(this._firstTokenIndex+_)}getInlineStyle(_,p){return this._source.getInlineStyle(this._firstTokenIndex+_,p)}getPresentation(_){return this._source.getPresentation(this._firstTokenIndex+_)}findTokenIndexAtOffset(_){return this._source.findTokenIndexAtOffset(_+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(ie[527],ne([1,0,93]),function(Q,e,L){"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 k{static deleteBeginning(_,p){return _===null||_===e.EMPTY_LINE_TOKENS?_:k.delete(_,0,p)}static deleteEnding(_,p){if(_===null||_===e.EMPTY_LINE_TOKENS)return _;const S=y(_),v=S[S.length-2];return k.delete(_,p,v)}static delete(_,p,S){if(_===null||_===e.EMPTY_LINE_TOKENS||p===S)return _;const v=y(_),b=v.length>>>1;if(p===0&&v[v.length-2]===S)return e.EMPTY_LINE_TOKENS;const o=L.LineTokens.findIndexInTokensArray(v,p),i=o>0?v[o-1<<1]:0,n=v[o<<1];if(Sa&&(v[t++]=d,v[t++]=v[(c<<1)+1],a=d)}if(t===v.length)return _;const f=new Uint32Array(t);return f.set(v.subarray(0,t),0),f.buffer}static append(_,p){if(p===e.EMPTY_LINE_TOKENS)return _;if(_===e.EMPTY_LINE_TOKENS)return p;if(_===null)return _;if(p===null)return null;const S=y(_),v=y(p),b=v.length>>>1,o=new Uint32Array(S.length+v.length);o.set(S,0);let i=S.length;const n=S[S.length-2];for(let t=0;t>>1;let o=L.LineTokens.findIndexInTokensArray(v,p);o>0&&v[o-1<<1]===p&&o--;for(let i=o;i0}getTokens(b,o,i){let n=null;if(o1&&(t=_.TokenMetadata.getLanguageId(n[1])!==b),!t)return y.EMPTY_LINE_TOKENS}if(!n||n.length===0){const t=new Uint32Array(2);return t[0]=o,t[1]=S(b),t.buffer}return n[n.length-2]=o,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(b){for(;b>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(b,o){o!==0&&(b+o>this._len&&(o=this._len-b),this._lineTokens.splice(b,o),this._len-=o)}_insertLines(b,o){if(o===0)return;const i=[];for(let n=0;n=this._len)return;if(b.startLineNumber===b.endLineNumber){if(b.startColumn===b.endColumn)return;this._lineTokens[o]=y.ContiguousTokensEditing.delete(this._lineTokens[o],b.startColumn-1,b.endColumn-1);return}this._lineTokens[o]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[o],b.startColumn-1);const i=b.endLineNumber-1;let n=null;i=this._len)){if(o===0){this._lineTokens[n]=y.ContiguousTokensEditing.insert(this._lineTokens[n],b.column-1,i);return}this._lineTokens[n]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[n],b.column-1),this._lineTokens[n]=y.ContiguousTokensEditing.insert(this._lineTokens[n],b.column-1,i),this._insertLines(b.lineNumber,o)}}setMultilineTokens(b,o){if(b.length===0)return{changes:[]};const i=[];for(let n=0,t=b.length;n>>0}}),define(ie[529],ne([1,0,11,5,126]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class E{static create(v,b){return new E(v,new _(b))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(v,b){this._startLineNumber=v,this._tokens=b,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(v){return this._startLineNumber<=v&&v<=this._endLineNumber?this._tokens.getLineTokens(v-this._startLineNumber):null}getRange(){const v=this._tokens.getRange();return v&&new k.Range(this._startLineNumber+v.startLineNumber,v.startColumn,this._startLineNumber+v.endLineNumber,v.endColumn)}removeTokens(v){const b=v.startLineNumber-this._startLineNumber,o=v.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(b,v.startColumn-1,o,v.endColumn-1),this._updateEndLineNumber()}split(v){const b=v.startLineNumber-this._startLineNumber,o=v.endLineNumber-this._startLineNumber,[i,n,t]=this._tokens.split(b,v.startColumn-1,o,v.endColumn-1);return[new E(this._startLineNumber,i),new E(this._startLineNumber+t,n)]}applyEdit(v,b){const[o,i,n]=(0,y.countEOL)(b);this.acceptEdit(v,o,i,n,b.length>0?b.charCodeAt(0):0)}acceptEdit(v,b,o,i,n){this._acceptDeleteRange(v),this._acceptInsertText(new L.Position(v.startLineNumber,v.startColumn),b,o,i,n),this._updateEndLineNumber()}_acceptDeleteRange(v){if(v.startLineNumber===v.endLineNumber&&v.startColumn===v.endColumn)return;const b=v.startLineNumber-this._startLineNumber,o=v.endLineNumber-this._startLineNumber;if(o<0){const n=o-b;this._startLineNumber-=n;return}const i=this._tokens.getMaxDeltaLine();if(!(b>=i+1)){if(b<0&&o>=i+1){this._startLineNumber=0,this._tokens.clear();return}if(b<0){const n=-b;this._startLineNumber-=n,this._tokens.acceptDeleteRange(v.startColumn-1,0,0,o,v.endColumn-1)}else this._tokens.acceptDeleteRange(0,b,v.startColumn-1,o,v.endColumn-1)}}_acceptInsertText(v,b,o,i,n){if(b===0&&o===0)return;const t=v.lineNumber-this._startLineNumber;if(t<0){this._startLineNumber+=b;return}const a=this._tokens.getMaxDeltaLine();t>=a+1||this._tokens.acceptInsertText(t,v.column-1,b,o,i,n)}}e.SparseMultilineTokens=E;class _{constructor(v){this._tokens=v,this._tokenCount=v.length/4}toString(v){const b=[];for(let o=0;ov)o=i-1;else{let t=i;for(;t>b&&this._getDeltaLine(t-1)===v;)t--;let a=i;for(;av||r===v&&s>=b)&&(rv||s===v&&h>=b){if(sn?g-=n-o:g=o;else if(l===b&&s===o)if(l===i&&g>n)g-=n-o;else{c=!0;continue}else if(ln)l=b,s=o,g=s+(g-n);else{c=!0;continue}else if(l>i){if(u===0&&!c){f=a;break}l-=u}else if(l===i&&s>=n)v&&l===0&&(s+=v,g+=v),l-=u,s-=n-o,g-=n-o;else throw new Error("Not possible!");const m=4*f;t[m]=l,t[m+1]=s,t[m+2]=g,t[m+3]=h,f++}this._tokenCount=f}acceptInsertText(v,b,o,i,n,t){const a=o===0&&i===1&&(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122),u=this._tokens,f=this._tokenCount;for(let c=0;c0){const b=p[0].getRange(),o=p[p.length-1].getRange();if(!b||!o)return _;S=_.plusRange(b).plusRange(o)}let v=null;for(let b=0,o=this._pieces.length;bS.endLineNumber){v=v||{index:b};break}if(i.removeTokens(S),i.isEmpty()){this._pieces.splice(b,1),b--,o--;continue}if(i.endLineNumberS.endLineNumber){v=v||{index:b};continue}const[n,t]=i.split(S);if(n.isEmpty()){v=v||{index:b};continue}t.isEmpty()||(this._pieces.splice(b,1,n,t),b++,o++,v=v||{index:b})}return v=v||{index:this._pieces.length},p.length>0&&(this._pieces=L.arrayInsert(this._pieces,v.index,p)),S}isComplete(){return this._isComplete}addSparseTokens(_,p){if(p.getLineContent().length===0)return p;const S=this._pieces;if(S.length===0)return p;const v=y._findFirstPieceWithLine(S,_),b=S[v].getLineTokens(_);if(!b)return p;const o=p.getCount(),i=b.getCount();let n=0;const t=[];let a=0,u=0;const f=(c,d)=>{c!==u&&(u=c,t[a++]=c,t[a++]=d)};for(let c=0;c>>0,g=~s>>>0;for(;np)v=b-1;else{for(;b>S&&_[b-1].startLineNumber<=p&&p<=_[b-1].endLineNumber;)b--;return b}}return S}acceptEdit(_,p,S,v,b){for(const o of this._pieces)o.acceptEdit(_,p,S,v,b)}}e.SparseTokensStore=y}),define(ie[153],ne([1,0,2]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class k extends L.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(E){return!1}onCompositionEnd(E){return!1}onConfigurationChanged(E){return!1}onCursorStateChanged(E){return!1}onDecorationsChanged(E){return!1}onFlushed(E){return!1}onFocusChanged(E){return!1}onLanguageConfigurationChanged(E){return!1}onLineMappingChanged(E){return!1}onLinesChanged(E){return!1}onLinesDeleted(E){return!1}onLinesInserted(E){return!1}onRevealRangeRequest(E){return!1}onScrollChanged(E){return!1}onThemeChanged(E){return!1}onTokensChanged(E){return!1}onTokensColorsChanged(E){return!1}onZonesChanged(E){return!1}handleEvents(E){let _=!1;for(let p=0,S=E.length;p{if(t.options.zIndexa.options.zIndex)return 1;const u=t.options.className,f=a.options.className;return uf?1:y.Range.compareRangesUsingStarts(t.range,a.range)});const o=p.visibleRange.startLineNumber,i=p.visibleRange.endLineNumber,n=[];for(let t=o;t<=i;t++){const a=t-o;n[a]=""}this._renderWholeLineDecorations(p,v,n),this._renderNormalDecorations(p,v,n),this._renderResult=n}_renderWholeLineDecorations(p,S,v){const b=String(this._lineHeight),o=p.visibleRange.startLineNumber,i=p.visibleRange.endLineNumber;for(let n=0,t=S.length;n
    ',f=Math.max(a.range.startLineNumber,o),c=Math.min(a.range.endLineNumber,i);for(let d=f;d<=c;d++){const r=d-o;v[r]+=u}}}_renderNormalDecorations(p,S,v){var b;const o=String(this._lineHeight),i=p.visibleRange.startLineNumber;let n=null,t=!1,a=null,u=!1;for(let f=0,c=S.length;f';t[d]+=h}}}render(p,S){if(!this._renderResult)return"";const v=S-p;return v<0||v>=this._renderResult.length?"":this._renderResult[v]}}e.DecorationsOverlay=E}),define(ie[213],ne([1,0,40,13,113,56,5,428]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginWidgets=e.DedupOverlay=e.VisibleLineDecorationsToRender=e.LineDecorationToRender=e.DecorationToRender=void 0;class p{constructor(u,f,c,d){this._decorationToRenderBrand=void 0,this.startLineNumber=+u,this.endLineNumber=+f,this.className=String(c),this.zIndex=d??0}}e.DecorationToRender=p;class S{constructor(u,f){this.className=u,this.zIndex=f}}e.LineDecorationToRender=S;class v{constructor(){this.decorations=[]}add(u){this.decorations.push(u)}getDecorations(){return this.decorations}}e.VisibleLineDecorationsToRender=v;class b extends y.DynamicViewOverlay{_render(u,f,c){const d=[];for(let s=u;s<=f;s++){const g=s-u;d[g]=new v}if(c.length===0)return d;c.sort((s,g)=>s.className===g.className?s.startLineNumber===g.startLineNumber?s.endLineNumber-g.endLineNumber:s.startLineNumber-g.startLineNumber:s.classNamed)continue;const h=Math.max(s,c),m=Math.min(r.preference.lane,this._glyphMarginDecorationLaneCount);f.push(new n(h,m,r.preference.zIndex,r))}}_collectSortedGlyphRenderRequests(u){const f=[];return this._collectDecorationBasedGlyphRenderRequest(u,f),this._collectWidgetBasedGlyphRenderRequest(u,f),f.sort((c,d)=>c.lineNumber===d.lineNumber?c.lane===d.lane?c.zIndex===d.zIndex?d.type===c.type?c.type===0&&d.type===0?c.className0;){const d=f.peek();if(!d)break;const r=f.takeWhile(s=>s.lineNumber===d.lineNumber&&s.lane===d.lane);if(!r||r.length===0)break;const l=r[0];if(l.type===0){const s=[];for(const g of r){if(g.zIndex!==l.zIndex||g.type!==l.type)break;(s.length===0||s[s.length-1]!==g.className)&&s.push(g.className)}c.push(l.accept(s.join(" ")))}else l.widget.renderInfo={lineNumber:l.lineNumber,lane:l.lane}}this._decorationGlyphsToRender=c}render(u){if(!this._glyphMargin){for(const c of Object.values(this._widgets))c.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const c=this._managedDomNodes.pop();c?.domNode.remove()}return}const f=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const c of Object.values(this._widgets))if(!c.renderInfo)c.domNode.setDisplay("none");else{const d=u.viewportData.relativeVerticalOffset[c.renderInfo.lineNumber-u.viewportData.startLineNumber],r=this._glyphMarginLeft+(c.renderInfo.lane-1)*this._lineHeight;c.domNode.setDisplay("block"),c.domNode.setTop(d),c.domNode.setLeft(r),c.domNode.setWidth(f),c.domNode.setHeight(this._lineHeight)}for(let c=0;cthis._decorationGlyphsToRender.length;){const c=this._managedDomNodes.pop();c?.domNode.remove()}}}e.GlyphMarginWidgets=o;class i{constructor(u,f,c,d){this.lineNumber=u,this.lane=f,this.zIndex=c,this.className=d,this.type=0}accept(u){return new t(this.lineNumber,this.lane,u)}}class n{constructor(u,f,c,d){this.lineNumber=u,this.lane=f,this.zIndex=c,this.widget=d,this.type=1}}class t{constructor(u,f,c){this.lineNumber=u,this.lane=f,this.combinedClassName=c}}}),define(ie[533],ne([1,0,213,432]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class k extends L.DedupOverlay{constructor(E){super(),this._context=E;const p=this._context.configuration.options.get(143);this._decorationsLeft=p.decorationsLeft,this._decorationsWidth=p.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){const p=this._context.configuration.options.get(143);return this._decorationsLeft=p.decorationsLeft,this._decorationsWidth=p.decorationsWidth,!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 _=E.getDecorationsInViewport(),p=[];let S=0;for(let v=0,b=_.length;v',i=[];for(let n=_;n<=p;n++){const t=n-_,a=S[t].getDecorations();let u="";for(const f of a)u+='
    ';v[o]=n}this._renderResult=v}render(E,_){return this._renderResult?this._renderResult[_-E]:""}}e.MarginViewLineDecorationsOverlay=k}),define(ie[535],ne([1,0,40,56,436]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class y extends k.ViewPart{constructor(_){super(_);const S=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=S.verticalScrollbarWidth,this._minimapWidth=S.minimap.minimapWidth,this._horizontalScrollbarHeight=S.horizontalScrollbarHeight,this._editorHeight=S.height,this._editorWidth=S.width,this._domNode=(0,L.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(_){const S=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=S.verticalScrollbarWidth,this._minimapWidth=S.minimap.minimapWidth,this._horizontalScrollbarHeight=S.horizontalScrollbarHeight,this._editorHeight=S.height,this._editorWidth=S.width,!0}addWidget(_){const p=(0,L.createFastDomNode)(_.getDomNode());this._widgets[_.getId()]={widget:_,preference:null,domNode:p},p.setPosition("absolute"),p.setAttribute("widgetId",_.getId()),this._domNode.appendChild(p),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(_,p){const S=this._widgets[_.getId()];return S.preference===p?(this._updateMaxMinWidth(),!1):(S.preference=p,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(_){const p=_.getId();if(this._widgets.hasOwnProperty(p)){const v=this._widgets[p].domNode.domNode;delete this._widgets[p],v.parentNode.removeChild(v),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var _,p;let S=0;const v=Object.keys(this._widgets);for(let b=0,o=v.length;b0;){const i=(0,L.createFastDomNode)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(b),this.domNode.appendChild(i),this._renderedRulers.push(i),o--}return}let S=_-p;for(;S>0;){const v=this._renderedRulers.pop();this.domNode.removeChild(v),S--}}render(_){this._ensureRulersCount();for(let p=0,S=this._rulers.length;p0;return this._shouldShow!==_?(this._shouldShow=_,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const p=this._context.configuration.options.get(143);p.minimap.renderMinimap===0||p.minimap.minimapWidth>0&&p.minimap.minimapLeft===0?this._width=p.width:this._width=p.width-p.verticalScrollbarWidth}onConfigurationChanged(_){const S=this._context.configuration.options.get(102);return this._useShadows=S.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(_){return this._scrollTop=_.scrollTop,this._updateShouldShow()}prepareRender(_){}render(_){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=y}),define(ie[538],ne([1,0,40,9,56,11]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const _=()=>{throw new Error("Invalid change accessor")};class p extends y.ViewPart{constructor(b){super(b);const o=this._context.configuration.options,i=o.get(143);this._lineHeight=o.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,L.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,L.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 b=this._context.viewLayout.getWhitespaces(),o=new Map;for(const n of b)o.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const t=Object.keys(this._zones);for(let a=0,u=t.length;a{const n={addZone:t=>(o=!0,this._addZone(i,t)),removeZone:t=>{t&&(o=this._removeZone(i,t)||o)},layoutZone:t=>{t&&(o=this._layoutZone(i,t)||o)}};S(b,n),n.addZone=_,n.removeZone=_,n.layoutZone=_}),o}_addZone(b,o){const i=this._computeWhitespaceProps(o),t={whitespaceId:b.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(o),i.heightInPx,i.minWidthInPx),delegate:o,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,L.createFastDomNode)(o.domNode),marginDomNode:o.marginDomNode?(0,L.createFastDomNode)(o.marginDomNode):null};return this._safeCallOnComputedHeight(t.delegate,i.heightInPx),t.domNode.setPosition("absolute"),t.domNode.domNode.style.width="100%",t.domNode.setDisplay("none"),t.domNode.setAttribute("monaco-view-zone",t.whitespaceId),this.domNode.appendChild(t.domNode),t.marginDomNode&&(t.marginDomNode.setPosition("absolute"),t.marginDomNode.domNode.style.width="100%",t.marginDomNode.setDisplay("none"),t.marginDomNode.setAttribute("monaco-view-zone",t.whitespaceId),this.marginDomNode.appendChild(t.marginDomNode)),this._zones[t.whitespaceId]=t,this.setShouldRender(),t.whitespaceId}_removeZone(b,o){if(this._zones.hasOwnProperty(o)){const i=this._zones[o];return delete this._zones[o],b.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(b,o){if(this._zones.hasOwnProperty(o)){const i=this._zones[o],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,b.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(b){return this._zones.hasOwnProperty(b)?!!this._zones[b].delegate.suppressMouseDown:!1}_heightInPixels(b){return typeof b.heightInPx=="number"?b.heightInPx:typeof b.heightInLines=="number"?this._lineHeight*b.heightInLines:this._lineHeight}_minWidthInPixels(b){return typeof b.minWidthInPx=="number"?b.minWidthInPx:0}_safeCallOnComputedHeight(b,o){if(typeof b.onComputedHeight=="function")try{b.onComputedHeight(o)}catch(i){(0,k.onUnexpectedError)(i)}}_safeCallOnDomNodeTop(b,o){if(typeof b.onDomNodeTop=="function")try{b.onDomNodeTop(o)}catch(i){(0,k.onUnexpectedError)(i)}}prepareRender(b){}render(b){const o=b.viewportData.whitespaceViewportData,i={};let n=!1;for(const a of o)this._zones[a.id].isInHiddenArea||(i[a.id]=a,n=!0);const t=Object.keys(this._zones);for(let a=0,u=t.length;a=i||(t[a++]=new k(Math.max(1,u.startColumn-o+1),Math.min(n+1,u.endColumn-o+1),u.className,u.type));return t}static filter(S,v,b,o){if(S.length===0)return[];const i=[];let n=0;for(let t=0,a=S.length;tv||f.isEmpty()&&(u.type===0||u.type===3))continue;const c=f.startLineNumber===v?f.startColumn:b,d=f.endLineNumber===v?f.endColumn:o;i[n++]=new k(c,d,u.inlineClassName,u.type)}return i}static _typeCompare(S,v){const b=[2,0,1,3];return b[S]-b[v]}static compare(S,v){if(S.startColumn!==v.startColumn)return S.startColumn-v.startColumn;if(S.endColumn!==v.endColumn)return S.endColumn-v.endColumn;const b=k._typeCompare(S.type,v.type);return b!==0?b:S.className!==v.className?S.className0&&this.stopOffsets[0]0&&v=S){this.stopOffsets.splice(o,0,S),this.classNames.splice(o,0,v),this.metadata.splice(o,0,b);break}this.count++}}class _{static normalize(S,v){if(v.length===0)return[];const b=[],o=new E;let i=0;for(let n=0,t=v.length;n1){const s=S.charCodeAt(u-2);L.isHighSurrogate(s)&&u--}if(f>1){const s=S.charCodeAt(f-2);L.isHighSurrogate(s)&&f--}const r=u-1,l=f-2;i=o.consumeLowerThan(r,i,b),o.count===0&&(i=r),o.insert(l,c,d)}return o.consumeLowerThan(1073741824,i,b),b}}e.LineDecorationsNormalizer=_}),define(ie[539],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class L{constructor(y,E,_,p){this.endIndex=y,this.type=E,this.metadata=_,this.containsRTL=p,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=L}),define(ie[540],ne([1,0,12]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class k{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(p){this._hasPending=!0,this._inserts.push(p)}change(p){this._hasPending=!0,this._changes.push(p)}remove(p){this._hasPending=!0,this._removes.push(p)}mustCommit(){return this._hasPending}commit(p){if(!this._hasPending)return;const S=this._inserts,v=this._changes,b=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],p._commitPendingChanges(S,v,b)}}class y{constructor(p,S,v,b,o){this.id=p,this.afterLineNumber=S,this.ordinal=v,this.height=b,this.minWidth=o,this.prefixSum=0}}e.EditorWhitespace=y;class E{constructor(p,S,v,b){this._instanceId=L.singleLetterHash(++E.INSTANCE_COUNT),this._pendingChanges=new k,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=p,this._lineHeight=S,this._paddingTop=v,this._paddingBottom=b}static findInsertionIndex(p,S,v){let b=0,o=p.length;for(;b>>1;S===p[i].afterLineNumber?v{S=!0,b=b|0,o=o|0,i=i|0,n=n|0;const t=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new y(t,b,o,i,n)),t},changeOneWhitespace:(b,o,i)=>{S=!0,o=o|0,i=i|0,this._pendingChanges.change({id:b,newAfterLineNumber:o,newHeight:i})},removeWhitespace:b=>{S=!0,this._pendingChanges.remove({id:b})}})}finally{this._pendingChanges.commit(this)}return S}_commitPendingChanges(p,S,v){if((p.length>0||v.length>0)&&(this._minWidth=-1),p.length+S.length+v.length<=1){for(const t of p)this._insertWhitespace(t);for(const t of S)this._changeOneWhitespace(t.id,t.newAfterLineNumber,t.newHeight);for(const t of v){const a=this._findWhitespaceIndex(t.id);a!==-1&&this._removeWhitespace(a)}return}const b=new Set;for(const t of v)b.add(t.id);const o=new Map;for(const t of S)o.set(t.id,t);const i=t=>{const a=[];for(const u of t)if(!b.has(u.id)){if(o.has(u.id)){const f=o.get(u.id);u.afterLineNumber=f.newAfterLineNumber,u.height=f.newHeight}a.push(u)}return a},n=i(this._arr).concat(i(p));n.sort((t,a)=>t.afterLineNumber===a.afterLineNumber?t.ordinal-a.ordinal:t.afterLineNumber-a.afterLineNumber),this._arr=n,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(p){const S=E.findInsertionIndex(this._arr,p.afterLineNumber,p.ordinal);this._arr.splice(S,0,p),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,S-1)}_findWhitespaceIndex(p){const S=this._arr;for(let v=0,b=S.length;vS&&(this._arr[v].afterLineNumber-=S-p+1)}}onLinesInserted(p,S){this._checkPendingChanges(),p=p|0,S=S|0,this._lineCount+=S-p+1;for(let v=0,b=this._arr.length;v=S.length||S[n+1].afterLineNumber>=p)return n;v=n+1|0}else b=n-1|0}return-1}_findFirstWhitespaceAfterLineNumber(p){p=p|0;const v=this._findLastWhitespaceBeforeLineNumber(p)+1;return v1?v=this._lineHeight*(p-1):v=0;const b=this.getWhitespaceAccumulatedHeightBeforeLineNumber(p-(S?1:0));return v+b+this._paddingTop}getVerticalOffsetAfterLineNumber(p,S=!1){this._checkPendingChanges(),p=p|0;const v=this._lineHeight*p,b=this.getWhitespaceAccumulatedHeightBeforeLineNumber(p+(S?1:0));return v+b+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let p=0;for(let S=0,v=this._arr.length;SS}isInTopPadding(p){return this._paddingTop===0?!1:(this._checkPendingChanges(),p=S-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(p){if(this._checkPendingChanges(),p=p|0,p<0)return 1;const S=this._lineCount|0,v=this._lineHeight;let b=1,o=S;for(;b=n+v)b=i+1;else{if(p>=n)return i;o=i}}return b>S?S:b}getLinesViewportData(p,S){this._checkPendingChanges(),p=p|0,S=S|0;const v=this._lineHeight,b=this.getLineNumberAtOrAfterVerticalOffset(p)|0,o=this.getVerticalOffsetForLineNumber(b)|0;let i=this._lineCount|0,n=this.getFirstWhitespaceIndexAfterLineNumber(b)|0;const t=this.getWhitespacesCount()|0;let a,u;n===-1?(n=t,u=i+1,a=0):(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,a=this.getHeightForWhitespaceIndex(n)|0);let f=o,c=f;const d=5e5;let r=0;o>=d&&(r=Math.floor(o/d)*d,r=Math.floor(r/v)*v,c-=r);const l=[],s=p+(S-p)/2;let g=-1;for(let w=b;w<=i;w++){if(g===-1){const D=f,I=f+v;(D<=s&&ss)&&(g=w)}for(f+=v,l[w-b]=c,c+=v;u===w;)c+=a,f+=a,n++,n>=t?u=i+1:(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,a=this.getHeightForWhitespaceIndex(n)|0);if(f>=S){i=w;break}}g===-1&&(g=i);const h=this.getVerticalOffsetForLineNumber(i)|0;let m=b,C=i;return mS&&C--,{bigNumbersDelta:r,startLineNumber:b,endLineNumber:i,relativeVerticalOffset:l,centeredLineNumber:g,completelyVisibleStartLineNumber:m,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(p){this._checkPendingChanges(),p=p|0;const S=this.getAfterLineNumberForWhitespaceIndex(p);let v;S>=1?v=this._lineHeight*S:v=0;let b;return p>0?b=this.getWhitespacesAccumulatedHeight(p-1):b=0,v+b+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(p){this._checkPendingChanges(),p=p|0;let S=0,v=this.getWhitespacesCount()-1;if(v<0)return-1;const b=this.getVerticalOffsetForWhitespaceIndex(v),o=this.getHeightForWhitespaceIndex(v);if(p>=b+o)return-1;for(;S=n+t)S=i+1;else{if(p>=n)return i;v=i}}return S}getWhitespaceAtVerticalOffset(p){this._checkPendingChanges(),p=p|0;const S=this.getWhitespaceIndexAtOrAfterVerticallOffset(p);if(S<0||S>=this.getWhitespacesCount())return null;const v=this.getVerticalOffsetForWhitespaceIndex(S);if(v>p)return null;const b=this.getHeightForWhitespaceIndex(S),o=this.getIdForWhitespaceIndex(S),i=this.getAfterLineNumberForWhitespaceIndex(S);return{id:o,afterLineNumber:i,verticalOffset:v,height:b}}getWhitespaceViewportData(p,S){this._checkPendingChanges(),p=p|0,S=S|0;const v=this.getWhitespaceIndexAtOrAfterVerticallOffset(p),b=this.getWhitespacesCount()-1;if(v<0)return[];const o=[];for(let i=v;i<=b;i++){const n=this.getVerticalOffsetForWhitespaceIndex(i),t=this.getHeightForWhitespaceIndex(i);if(n>=S)break;o.push({id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:n,height:t})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].id}getAfterLineNumberForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].afterLineNumber}getHeightForWhitespaceIndex(p){return this._checkPendingChanges(),p=p|0,this._arr[p].height}}e.LinesLayout=E,E.INSTANCE_COUNT=0}),define(ie[541],ne([1,0,5]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class k{constructor(E,_,p,S){this.selections=E,this.startLineNumber=_.startLineNumber|0,this.endLineNumber=_.endLineNumber|0,this.relativeVerticalOffset=_.relativeVerticalOffset,this.bigNumbersDelta=_.bigNumbersDelta|0,this.whitespaceViewportData=p,this._model=S,this.visibleRange=new L.Range(_.startLineNumber,this._model.getLineMinColumn(_.startLineNumber),_.endLineNumber,this._model.getLineMaxColumn(_.endLineNumber))}getViewLineRenderingData(E){return this._model.getViewportViewLineRenderingData(this.visibleRange,E)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=k}),define(ie[85],ne([1,0,13,12,5]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class E{constructor(t,a,u,f){this._viewportBrand=void 0,this.top=t|0,this.left=a|0,this.width=u|0,this.height=f|0}}e.Viewport=E;class _{constructor(t,a){this.tabSize=t,this.data=a}}e.MinimapLinesRenderingData=_;class p{constructor(t,a,u,f,c,d,r){this._viewLineDataBrand=void 0,this.content=t,this.continuesWithWrappedLine=a,this.minColumn=u,this.maxColumn=f,this.startVisibleColumn=c,this.tokens=d,this.inlineDecorations=r}}e.ViewLineData=p;class S{constructor(t,a,u,f,c,d,r,l,s,g){this.minColumn=t,this.maxColumn=a,this.content=u,this.continuesWithWrappedLine=f,this.isBasicASCII=S.isBasicASCII(u,d),this.containsRTL=S.containsRTL(u,this.isBasicASCII,c),this.tokens=r,this.inlineDecorations=l,this.tabSize=s,this.startVisibleColumn=g}static isBasicASCII(t,a){return a?k.isBasicASCII(t):!0}static containsRTL(t,a,u){return!a&&u?k.containsRTL(t):!1}}e.ViewLineRenderingData=S;class v{constructor(t,a,u){this.range=t,this.inlineClassName=a,this.type=u}}e.InlineDecoration=v;class b{constructor(t,a,u,f){this.startOffset=t,this.endOffset=a,this.inlineClassName=u,this.inlineClassNameAffectsLetterSpacing=f}toInlineDecoration(t){return new v(new y.Range(t,this.startOffset+1,t,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=b;class o{constructor(t,a){this._viewModelDecorationBrand=void 0,this.range=t,this.options=a}}e.ViewModelDecoration=o;class i{constructor(t,a,u){this.color=t,this.zIndex=a,this.data=u}static compareByRenderingProps(t,a){return t.zIndex===a.zIndex?t.colora.color?1:0:t.zIndex-a.zIndex}static equals(t,a){return t.color===a.color&&t.zIndex===a.zIndex&&L.equals(t.data,a.data)}static equalsArr(t,a){return L.equals(t,a,i.equals)}}e.OverviewRulerDecorationsGroup=i}),define(ie[542],ne([1,0,93,11,112,85]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function _(n,t){return n===null?t?S.INSTANCE:v.INSTANCE:new p(n,t)}e.createModelLineProjection=_;class p{constructor(t,a){this._projectionData=t,this._isVisible=a}isVisible(){return this._isVisible}setVisible(t){return this._isVisible=t,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(t,a,u){this._assertVisible();const f=u>0?this._projectionData.breakOffsets[u-1]:0,c=this._projectionData.breakOffsets[u];let d;if(this._projectionData.injectionOffsets!==null){const r=this._projectionData.injectionOffsets.map((s,g)=>new y.LineInjectedText(0,0,s+1,this._projectionData.injectionOptions[g],0));d=y.LineInjectedText.applyInjectedText(t.getLineContent(a),r).substring(f,c)}else d=t.getValueInRange({startLineNumber:a,startColumn:f+1,endLineNumber:a,endColumn:c+1});return u>0&&(d=o(this._projectionData.wrappedTextIndentLength)+d),d}getViewLineLength(t,a,u){return this._assertVisible(),this._projectionData.getLineLength(u)}getViewLineMinColumn(t,a,u){return this._assertVisible(),this._projectionData.getMinOutputOffset(u)+1}getViewLineMaxColumn(t,a,u){return this._assertVisible(),this._projectionData.getMaxOutputOffset(u)+1}getViewLineData(t,a,u){const f=new Array;return this.getViewLinesData(t,a,u,1,0,[!0],f),f[0]}getViewLinesData(t,a,u,f,c,d,r){this._assertVisible();const l=this._projectionData,s=l.injectionOffsets,g=l.injectionOptions;let h=null;if(s){h=[];let C=0,w=0;for(let D=0;D0?l.breakOffsets[D-1]:0,A=l.breakOffsets[D];for(;wA)break;if(M0?l.wrappedTextIndentLength:0,R=x+Math.max(T-M,0),B=x+Math.min(N-M,A-M);R!==B&&I.push(new E.SingleLineInlineDecoration(R,B,P.inlineClassName,P.inlineClassNameAffectsLetterSpacing))}}if(N<=A)C+=O,w++;else break}}}let m;s?m=t.tokenization.getLineTokens(a).withInserted(s.map((C,w)=>({offset:C,text:g[w].content,tokenMetadata:L.LineTokens.defaultTokenMetadata}))):m=t.tokenization.getLineTokens(a);for(let C=u;C0?f.wrappedTextIndentLength:0,d=u>0?f.breakOffsets[u-1]:0,r=f.breakOffsets[u],l=t.sliceAndInflate(d,r,c);let s=l.getLineContent();u>0&&(s=o(f.wrappedTextIndentLength)+s);const g=this._projectionData.getMinOutputOffset(u)+1,h=s.length+1,m=u+1=b.length)for(let t=1;t<=n;t++)b[t]=i(t);return b[n]}function i(n){return new Array(n+1).join(" ")}}),define(ie[543],ne([1,0,12,125,112,291]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class _{static create(f){return new _(f.get(132),f.get(131))}constructor(f,c){this.classifier=new p(f,c)}createLineBreaksComputer(f,c,d,r,l){const s=[],g=[],h=[];return{addRequest:(m,C,w)=>{s.push(m),g.push(C),h.push(w)},finalize:()=>{const m=f.typicalFullwidthCharacterWidth/f.typicalHalfwidthCharacterWidth,C=[];for(let w=0,D=s.length;w=0&&f<256?this._asciiMap[f]:f>=12352&&f<=12543||f>=13312&&f<=19903||f>=19968&&f<=40959?3:this._map.get(f)||this._defaultValue}}let S=[],v=[];function b(u,f,c,d,r,l,s,g){if(r===-1)return null;const h=c.length;if(h<=1)return null;const m=g==="keepAll",C=f.breakOffsets,w=f.breakOffsetsVisibleColumn,D=a(c,d,r,l,s),I=r-D,M=S,A=v;let O=0,T=0,N=0,P=r;const x=C.length;let R=0;if(R>=0){let B=Math.abs(w[R]-P);for(;R+1=B)break;B=W,R++}}for(;RB&&(B=T,W=N);let V=0,U=0,F=0,j=0;if(W<=P){let le=W,ee=B===0?0:c.charCodeAt(B-1),$=B===0?0:u.get(ee),te=!0;for(let G=B;GT&&t(ee,$,ue,X,m)&&(V=de,U=le),le+=Z,le>P){de>T?(F=de,j=le-Z):(F=G+1,j=le),le-U>I&&(V=0),te=!1;break}ee=ue,$=X}if(te){O>0&&(M[O]=C[C.length-1],A[O]=w[C.length-1],O++);break}}if(V===0){let le=W,ee=c.charCodeAt(B),$=u.get(ee),te=!1;for(let G=B-1;G>=T;G--){const de=G+1,ue=c.charCodeAt(G);if(ue===9){te=!0;break}let X,Z;if(L.isLowSurrogate(ue)?(G--,X=0,Z=2):(X=u.get(ue),Z=L.isFullWidthCharacter(ue)?l:1),le<=P){if(F===0&&(F=de,j=le),le<=P-I)break;if(t(ue,X,ee,$,m)){V=de,U=le;break}}le-=Z,ee=ue,$=X}if(V!==0){const G=I-(j-U);if(G<=d){const de=c.charCodeAt(F);let ue;L.isHighSurrogate(de)?ue=2:ue=i(de,j,d,l),G-ue<0&&(V=0)}}if(te){R--;continue}}if(V===0&&(V=F,U=j),V<=T){const le=c.charCodeAt(T);L.isHighSurrogate(le)?(V=T+2,U=N+2):(V=T+1,U=N+i(le,N,d,l))}for(T=V,M[O]=V,N=U,A[O]=U,O++,P=U+I;R<0||R=J)break;J=le,R++}}return O===0?null:(M.length=O,A.length=O,S=f.breakOffsets,v=f.breakOffsetsVisibleColumn,f.breakOffsets=M,f.breakOffsetsVisibleColumn=A,f.wrappedTextIndentLength=D,f)}function o(u,f,c,d,r,l,s,g){const h=y.LineInjectedText.applyInjectedText(f,c);let m,C;if(c&&c.length>0?(m=c.map(U=>U.options),C=c.map(U=>U.column-1)):(m=null,C=null),r===-1)return m?new E.ModelLineProjectionData(C,m,[h.length],[],0):null;const w=h.length;if(w<=1)return m?new E.ModelLineProjectionData(C,m,[h.length],[],0):null;const D=g==="keepAll",I=a(h,d,r,l,s),M=r-I,A=[],O=[];let T=0,N=0,P=0,x=r,R=h.charCodeAt(0),B=u.get(R),W=i(R,0,d,l),V=1;L.isHighSurrogate(R)&&(W+=1,R=h.charCodeAt(1),B=u.get(R),V++);for(let U=V;Ux&&((N===0||W-P>M)&&(N=F,P=W-le),A[T]=N,O[T]=P,T++,x=P+M,N=0),R=j,B=J}return T===0&&(!c||c.length===0)?null:(A[T]=w,O[T]=W,new E.ModelLineProjectionData(C,m,A,O,I))}function i(u,f,c,d){return u===9?c-f%c:L.isFullWidthCharacter(u)||u<32?d:1}function n(u,f){return f-u%f}function t(u,f,c,d,r){return c!==32&&(f===2&&d!==2||f!==1&&d===1||!r&&f===3&&d!==2||!r&&d===3&&f!==1)}function a(u,f,c,d,r){let l=0;if(r!==0){const s=L.firstNonWhitespaceIndex(u);if(s!==-1){for(let h=0;hc&&(l=0)}}return l}}),define(ie[297],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class L{constructor(_,p,S){this._colorZoneBrand=void 0,this.from=_|0,this.to=p|0,this.colorId=S|0}static compare(_,p){return _.colorId===p.colorId?_.from===p.from?_.to-p.to:_.from-p.from:_.colorId-p.colorId}}e.ColorZone=L;class k{constructor(_,p,S,v){this._overviewRulerZoneBrand=void 0,this.startLineNumber=_,this.endLineNumber=p,this.heightInLines=S,this.color=v,this._colorZone=null}static compare(_,p){return _.color===p.color?_.startLineNumber===p.startLineNumber?_.heightInLines===p.heightInLines?_.endLineNumber-p.endLineNumber:_.heightInLines-p.heightInLines:_.startLineNumber-p.startLineNumber:_.colorS&&(r=S-l);const s=a.color;let g=this._color2Id[s];g||(g=++this._lastAssignedId,this._color2Id[s]=g,this._id2Color[g]=s);const h=new L(r-l,r+l,g);a.setColorZone(h),i.push(h)}return this._colorZonesInvalid=!1,i.sort(L.compare),i}}e.OverviewZoneManager=y}),define(ie[544],ne([1,0,40,297,153]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class E extends y.ViewEventHandler{constructor(p,S){super(),this._context=p;const v=this._context.configuration.options;this._domNode=(0,L.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(S),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new k.OverviewZoneManager(b=>this._context.viewLayout.getVerticalOffsetForLineNumber(b)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(v.get(66)),this._zoneManager.setPixelRatio(v.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(p){const S=this._context.configuration.options;return p.hasChanged(66)&&(this._zoneManager.setLineHeight(S.get(66)),this._render()),p.hasChanged(141)&&(this._zoneManager.setPixelRatio(S.get(141)),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(p){return this._render(),!0}onScrollChanged(p){return p.scrollHeightChanged&&(this._zoneManager.setOuterHeight(p.scrollHeight),this._render()),!0}onZonesChanged(p){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(p){this._domNode.setTop(p.top),this._domNode.setRight(p.right);let S=!1;S=this._zoneManager.setDOMWidth(p.width)||S,S=this._zoneManager.setDOMHeight(p.height)||S,S&&(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(p){this._zoneManager.setZones(p),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const p=this._zoneManager.getCanvasWidth(),S=this._zoneManager.getCanvasHeight(),v=this._zoneManager.resolveColorZones(),b=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,p,S),v.length>0&&this._renderOneLane(o,v,b,p),!0}_renderOneLane(p,S,v,b){let o=0,i=0,n=0;for(const t of S){const a=t.colorId,u=t.from,f=t.to;a!==o?(p.fillRect(0,i,b,n-i),o=a,p.fillStyle=v[o],i=u,n=f):n>=u?n=Math.max(n,f):(p.fillRect(0,i,b,n-i),i=u,n=f)}p.fillRect(0,i,b,n-i)}}e.OverviewRuler=E}),define(ie[545],ne([1,0,503]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class k{constructor(E,_,p){this.configuration=E,this.theme=new L.EditorTheme(_),this.viewModel=p,this.viewLayout=p.viewLayout}addEventHandler(E){this.viewModel.addViewEventHandler(E)}removeEventHandler(E){this.viewModel.removeViewEventHandler(E)}}e.ViewContext=k}),define(ie[215],ne([1,0,6,2]),function(Q,e,L,k){"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.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class y extends k.Disposable{constructor(){super(),this._onEvent=this._register(new L.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(r){this._addOutgoingEvent(r),this._emitOutgoingEvents()}_addOutgoingEvent(r){for(let l=0,s=this._outgoingEvents.length;l0;){if(this._collector||this._isConsumingViewEventQueue)return;const r=this._outgoingEvents.shift();r.isNoOp()||this._onEvent.fire(r)}}addViewEventHandler(r){for(let l=0,s=this._eventHandlers.length;l0&&this._emitMany(l)}this._emitOutgoingEvents()}emitSingleViewEvent(r){try{this.beginEmitViewEvents().emitViewEvent(r)}finally{this.endEmitViewEvents()}}_emitMany(r){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(r):this._viewEventQueue=r,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const r=this._viewEventQueue;this._viewEventQueue=null;const l=this._eventHandlers.slice(0);for(const s of l)s.handleEvents(r)}}}e.ViewModelEventDispatcher=y;class E{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(r){this.viewEvents.push(r)}emitOutgoingEvent(r){this.outgoingEvents.push(r)}}e.ViewModelEventsCollector=E;class _{constructor(r,l,s,g){this.kind=0,this._oldContentWidth=r,this._oldContentHeight=l,this.contentWidth=s,this.contentHeight=g,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(r){return r.kind!==this.kind?null:new _(this._oldContentWidth,this._oldContentHeight,r.contentWidth,r.contentHeight)}}e.ContentSizeChangedEvent=_;class p{constructor(r,l){this.kind=1,this.oldHasFocus=r,this.hasFocus=l}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(r){return r.kind!==this.kind?null:new p(this.oldHasFocus,r.hasFocus)}}e.FocusChangedEvent=p;class S{constructor(r,l,s,g,h,m,C,w){this.kind=2,this._oldScrollWidth=r,this._oldScrollLeft=l,this._oldScrollHeight=s,this._oldScrollTop=g,this.scrollWidth=h,this.scrollLeft=m,this.scrollHeight=C,this.scrollTop=w,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(r){return r.kind!==this.kind?null:new S(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,r.scrollWidth,r.scrollLeft,r.scrollHeight,r.scrollTop)}}e.ScrollChangedEvent=S;class v{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(r){return r.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=v;class b{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(r){return r.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=b;class o{constructor(r,l,s,g,h,m,C){this.kind=6,this.oldSelections=r,this.selections=l,this.oldModelVersionId=s,this.modelVersionId=g,this.source=h,this.reason=m,this.reachedMaxCursorCount=C}static _selectionsAreEqual(r,l){if(!r&&!l)return!0;if(!r||!l)return!1;const s=r.length,g=l.length;if(s!==g)return!1;for(let h=0;h=t?0:u.horizontalScrollbarSize}_getContentHeight(n,t,a){const u=this._configuration.options;let f=this._linesLayout.getLinesTotalHeight();return u.get(104)?f+=Math.max(0,t-u.get(66)-u.get(83).bottom):u.get(102).ignoreHorizontalScrollbarInContentHeight||(f+=this._getHorizontalScrollbarHeight(n,a)),f}_updateHeight(){const n=this._scrollable.getScrollDimensions(),t=n.width,a=n.height,u=n.contentWidth;this._scrollable.setScrollDimensions(new v(t,n.contentWidth,a,this._getContentHeight(t,a,u)))}getCurrentViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new _.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}getFutureViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new _.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}_computeContentWidth(){const n=this._configuration.options,t=this._maxLineWidth,a=n.get(144),u=n.get(50),f=n.get(143);if(a.isViewportWrapping){const c=n.get(72);return t>f.contentWidth+u.typicalHalfwidthCharacterWidth&&c.enabled&&c.side==="right"?t+f.verticalScrollbarWidth:t}else{const c=n.get(103)*u.typicalHalfwidthCharacterWidth,d=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+c+f.verticalScrollbarWidth,d,this._overlayWidgetsMinWidth)}}setMaxLineWidth(n){this._maxLineWidth=n,this._updateContentWidth()}setOverlayWidgetsMinWidth(n){this._overlayWidgetsMinWidth=n,this._updateContentWidth()}_updateContentWidth(){const n=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new v(n.width,this._computeContentWidth(),n.height,n.contentHeight)),this._updateHeight()}saveState(){const n=this._scrollable.getFutureScrollPosition(),t=n.scrollTop,a=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),u=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(a);return{scrollTop:t,scrollTopWithoutViewZones:t-u,scrollLeft:n.scrollLeft}}changeWhitespace(n){const t=this._linesLayout.changeWhitespace(n);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(n,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(n,t)}getVerticalOffsetAfterLineNumber(n,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(n,t)}isAfterLines(n){return this._linesLayout.isAfterLines(n)}isInTopPadding(n){return this._linesLayout.isInTopPadding(n)}isInBottomPadding(n){return this._linesLayout.isInBottomPadding(n)}getLineNumberAtVerticalOffset(n){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n)}getWhitespaceAtVerticalOffset(n){return this._linesLayout.getWhitespaceAtVerticalOffset(n)}getLinesViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(n.top,n.top+n.height)}getLinesViewportDataAtScrollTop(n){const t=this._scrollable.getScrollDimensions();return n+t.height>t.scrollHeight&&(n=t.scrollHeight-t.height),n<0&&(n=0),this._linesLayout.getLinesViewportData(n,n+t.height)}getWhitespaceViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(n.top,n.top+n.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(n){return this._scrollable.validateScrollPosition(n)}setScrollPosition(n,t){t===1?this._scrollable.setScrollPositionNow(n):this._scrollable.setScrollPositionSmooth(n)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(n,t){const a=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:a.scrollLeft+n,scrollTop:a.scrollTop+t})}}e.ViewLayout=o}),define(ie[547],ne([1,0,5,24]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class y{constructor(_,p){this._selection=_,this._isMovingLeft=p}getEditOperations(_,p){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const S=this._selection.startLineNumber,v=this._selection.startColumn,b=this._selection.endColumn;if(!(this._isMovingLeft&&v===1)&&!(!this._isMovingLeft&&b===_.getLineMaxColumn(S)))if(this._isMovingLeft){const o=new L.Range(S,v-1,S,v),i=_.getValueInRange(o);p.addEditOperation(o,null),p.addEditOperation(new L.Range(S,b,S,b),i)}else{const o=new L.Range(S,b,S,b+1),i=_.getValueInRange(o);p.addEditOperation(o,null),p.addEditOperation(new L.Range(S,v,S,v),i)}}computeCursorState(_,p){return this._isMovingLeft?new k.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new k.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=y}),define(ie[114],ne([1,0,9]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionItem=e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionKind=void 0;class k{constructor(o){this.value=o}equals(o){return this.value===o.value}contains(o){return this.equals(o)||this.value===""||o.value.startsWith(this.value+k.sep)}intersects(o){return this.contains(o)||o.contains(this)}append(o){return new k(this.value+k.sep+o)}}e.CodeActionKind=k,k.sep=".",k.None=new k("@@none@@"),k.Empty=new k(""),k.QuickFix=new k("quickfix"),k.Refactor=new k("refactor"),k.RefactorExtract=k.Refactor.append("extract"),k.RefactorInline=k.Refactor.append("inline"),k.RefactorMove=k.Refactor.append("move"),k.RefactorRewrite=k.Refactor.append("rewrite"),k.Notebook=new k("notebook"),k.Source=new k("source"),k.SourceOrganizeImports=k.Source.append("organizeImports"),k.SourceFixAll=k.Source.append("fixAll"),k.SurroundWith=k.Refactor.append("surround");var y;(function(b){b.Refactor="refactor",b.RefactorPreview="refactor preview",b.Lightbulb="lightbulb",b.Default="other (default)",b.SourceAction="source action",b.QuickFix="quick fix action",b.FixAll="fix all",b.OrganizeImports="organize imports",b.AutoFix="auto fix",b.QuickFixHover="quick fix hover window",b.OnSave="save participants",b.ProblemsView="problems view"})(y||(e.CodeActionTriggerSource=y={}));function E(b,o){return!(b.include&&!b.include.intersects(o)||b.excludes&&b.excludes.some(i=>p(o,i,b.include))||!b.includeSourceActions&&k.Source.contains(o))}e.mayIncludeActionsOfKind=E;function _(b,o){const i=o.kind?new k(o.kind):void 0;return!(b.include&&(!i||!b.include.contains(i))||b.excludes&&i&&b.excludes.some(n=>p(i,n,b.include))||!b.includeSourceActions&&i&&k.Source.contains(i)||b.onlyIncludePreferredActions&&!o.isPreferred)}e.filtersAction=_;function p(b,o,i){return!(!o.contains(b)||i&&o.contains(i))}class S{static fromUser(o,i){return!o||typeof o!="object"?new S(i.kind,i.apply,!1):new S(S.getKindFromUser(o,i.kind),S.getApplyFromUser(o,i.apply),S.getPreferredUser(o))}static getApplyFromUser(o,i){switch(typeof o.apply=="string"?o.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(o,i){return typeof o.kind=="string"?new k(o.kind):i}static getPreferredUser(o){return typeof o.preferred=="boolean"?o.preferred:!1}constructor(o,i,n){this.kind=o,this.apply=i,this.preferred=n}}e.CodeActionCommandArgs=S;class v{constructor(o,i,n){this.action=o,this.provider=i,this.highlightRange=n}async resolve(o){var i;if(!((i=this.provider)===null||i===void 0)&&i.resolveCodeAction&&!this.action.edit){let n;try{n=await this.provider.resolveCodeAction(this.action,o)}catch(t){(0,L.onUnexpectedExternalError)(t)}n&&(this.action.edit=n.edit)}return this}}e.CodeActionItem=v}),define(ie[548],ne([1,0,6]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class k{get color(){return this._color}set color(E){this._color.equals(E)||(this._color=E,this._onDidChangeColor.fire(E))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(E){this._colorPresentations=E,this.presentationIndex>E.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(E,_,p){this.presentationIndex=p,this._onColorFlushed=new L.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new L.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new L.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=E,this._color=E,this._colorPresentations=_}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(E,_){let p=-1;for(let S=0;Si)return!1;for(let n=0;n=65&&t<=90&&t+32===a)&&!(a>=65&&a<=90&&a+32===t))return!1}return!0}_createOperationsForBlockComment(S,v,b,o,i,n){const t=S.startLineNumber,a=S.startColumn,u=S.endLineNumber,f=S.endColumn,c=i.getLineContent(t),d=i.getLineContent(u);let r=c.lastIndexOf(v,a-1+v.length),l=d.indexOf(b,f-1-b.length);if(r!==-1&&l!==-1)if(t===u)c.substring(r+v.length,l).indexOf(b)>=0&&(r=-1,l=-1);else{const g=c.substring(r+v.length),h=d.substring(0,l);(g.indexOf(b)>=0||h.indexOf(b)>=0)&&(r=-1,l=-1)}let s;r!==-1&&l!==-1?(o&&r+v.length0&&d.charCodeAt(l-1)===32&&(b=" "+b,l-=1),s=_._createRemoveBlockCommentOperations(new y.Range(t,r+v.length+1,u,l+1),v,b)):(s=_._createAddBlockCommentOperations(S,v,b,this._insertSpace),this._usedEndToken=s.length===1?b:null);for(const g of s)n.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(S,v,b){const o=[];return y.Range.isEmpty(S)?o.push(L.EditOperation.delete(new y.Range(S.startLineNumber,S.startColumn-v.length,S.endLineNumber,S.endColumn+b.length))):(o.push(L.EditOperation.delete(new y.Range(S.startLineNumber,S.startColumn-v.length,S.startLineNumber,S.startColumn))),o.push(L.EditOperation.delete(new y.Range(S.endLineNumber,S.endColumn,S.endLineNumber,S.endColumn+b.length)))),o}static _createAddBlockCommentOperations(S,v,b,o){const i=[];return y.Range.isEmpty(S)?i.push(L.EditOperation.replace(new y.Range(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn),v+" "+b)):(i.push(L.EditOperation.insert(new k.Position(S.startLineNumber,S.startColumn),v+(o?" ":""))),i.push(L.EditOperation.insert(new k.Position(S.endLineNumber,S.endColumn),(o?" ":"")+b))),i}getEditOperations(S,v){const b=this._selection.startLineNumber,o=this._selection.startColumn;S.tokenization.tokenizeIfCheap(b);const i=S.getLanguageIdAtPosition(b,o),n=this.languageConfigurationService.getLanguageConfiguration(i).comments;!n||!n.blockCommentStartToken||!n.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,n.blockCommentStartToken,n.blockCommentEndToken,this._insertSpace,S,v)}computeCursorState(S,v){const b=v.getInverseEditOperations();if(b.length===2){const o=b[0],i=b[1];return new E.Selection(o.range.endLineNumber,o.range.endColumn,i.range.startLineNumber,i.range.startColumn)}else{const o=b[0].range,i=this._usedEndToken?-this._usedEndToken.length-1:0;return new E.Selection(o.endLineNumber,o.endColumn+i,o.endLineNumber,o.endColumn+i)}}}e.BlockCommentCommand=_}),define(ie[549],ne([1,0,12,74,11,5,24,298]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class S{constructor(b,o,i,n,t,a,u){this.languageConfigurationService=b,this._selection=o,this._tabSize=i,this._type=n,this._insertSpace=t,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=a,this._ignoreFirstLine=u||!1}static _gatherPreflightCommentStrings(b,o,i,n){b.tokenization.tokenizeIfCheap(o);const t=b.getLanguageIdAtPosition(o,1),a=n.getLanguageConfiguration(t).comments,u=a?a.lineCommentToken:null;if(!u)return null;const f=[];for(let c=0,d=i-o+1;ct?o[f].commentStrOffset=a-1:o[f].commentStrOffset=a}}}e.LineCommentCommand=S}),define(ie[550],ne([1,0,5,24]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class y{constructor(_,p,S){this.selection=_,this.targetPosition=p,this.copy=S,this.targetSelection=null}getEditOperations(_,p){const S=_.getValueInRange(this.selection);if(this.copy||p.addEditOperation(this.selection,null),p.addEditOperation(new L.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),S),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 k.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 k.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.lineNumber0){const p=[];for(let b=0;bL.Range.compareRangesUsingStarts(b.range,o.range));const S=[];let v=p[0];for(let b=1;b0){const f=[],c=a.caseOps.length;let d=0;for(let r=0,l=u.length;r=c){f.push(u.slice(r));break}switch(a.caseOps[d]){case"U":f.push(u[r].toUpperCase());break;case"u":f.push(u[r].toUpperCase()),d++;break;case"L":f.push(u[r].toLowerCase());break;case"l":f.push(u[r].toLowerCase()),d++;break;default:f.push(u[r])}}u=f.join("")}i+=u}return i}static _substitute(b,o){if(o===null)return"";if(b===0)return o[0];let i="";for(;b>0;){if(b=n)break;const a=v.charCodeAt(i);switch(a){case 92:o.emitUnchanged(i-1),o.emitStatic("\\",i+1);break;case 110:o.emitUnchanged(i-1),o.emitStatic(` `,i+1);break;case 116:o.emitUnchanged(i-1),o.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:o.emitUnchanged(i-1),o.emitStatic("",i+1),b.push(String.fromCharCode(a));break}continue}if(t===36){if(i++,i>=n)break;const a=v.charCodeAt(i);if(a===36){o.emitUnchanged(i-1),o.emitStatic("$",i+1);continue}if(a===48||a===38){o.emitUnchanged(i-1),o.emitMatchIndex(0,i+1,b),b.length=0;continue}if(49<=a&&a<=57){let u=a-48;if(i+1e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=p,this._endIndexes=S,this._collapseStates=new k(p.length),this._userDefinedStates=new k(p.length),this._recoveredStates=new k(p.length),this._types=v,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const p=[],S=(v,b)=>{const o=p[p.length-1];return this.getStartLineNumber(o)<=v&&this.getEndLineNumber(o)>=b};for(let v=0,b=this._startIndexes.length;ve.MAX_LINE_NUMBER||i>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;p.length>0&&!S(o,i);)p.pop();const n=p.length>0?p[p.length-1]:-1;p.push(v),this._startIndexes[v]=o+((n&255)<<24),this._endIndexes[v]=i+((n&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(p){return this._startIndexes[p]&e.MAX_LINE_NUMBER}getEndLineNumber(p){return this._endIndexes[p]&e.MAX_LINE_NUMBER}getType(p){return this._types?this._types[p]:void 0}hasTypes(){return!!this._types}isCollapsed(p){return this._collapseStates.get(p)}setCollapsed(p,S){this._collapseStates.set(p,S)}isUserDefined(p){return this._userDefinedStates.get(p)}setUserDefined(p,S){return this._userDefinedStates.set(p,S)}isRecovered(p){return this._recoveredStates.get(p)}setRecovered(p,S){return this._recoveredStates.set(p,S)}getSource(p){return this.isUserDefined(p)?1:this.isRecovered(p)?2:0}setSource(p,S){S===1?(this.setUserDefined(p,!0),this.setRecovered(p,!1)):S===2?(this.setUserDefined(p,!1),this.setRecovered(p,!0)):(this.setUserDefined(p,!1),this.setRecovered(p,!1))}setCollapsedAllOfType(p,S){let v=!1;if(this._types)for(let b=0;b>>24)+((this._endIndexes[p]&L)>>>16);return S===e.MAX_FOLDING_REGIONS?-1:S}contains(p,S){return this.getStartLineNumber(p)<=S&&this.getEndLineNumber(p)>=S}findIndex(p){let S=0,v=this._startIndexes.length;if(v===0)return-1;for(;S=0){if(this.getEndLineNumber(S)>=p)return S;for(S=this.getParentIndex(S);S!==-1;){if(this.contains(S,p))return S;S=this.getParentIndex(S)}}return-1}toString(){const p=[];for(let S=0;SArray.isArray(l)?g=>gg=u.startLineNumber))a&&a.startLineNumber===u.startLineNumber?(u.source===1?l=u:(l=a,l.isCollapsed=u.isCollapsed&&a.endLineNumber===u.endLineNumber,l.source=0),a=o(++n)):(l=u,u.isCollapsed&&u.source===0&&(l.source=2)),u=i(++t);else{let s=t,g=u;for(;;){if(!g||g.startLineNumber>a.endLineNumber){l=a;break}if(g.source===1&&g.endLineNumber>a.endLineNumber)break;g=i(++s)}a=o(++n)}if(l){for(;c&&c.endLineNumberl.startLineNumber&&l.startLineNumber>d&&l.endLineNumber<=v&&(!c||c.endLineNumber>=l.endLineNumber)&&(r.push(l),d=l.startLineNumber,c&&f.push(c),c=l)}}return r}}e.FoldingRegions=y;class E{constructor(p,S){this.ranges=p,this.index=S}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(p){return p.startLineNumber<=this.startLineNumber&&p.endLineNumber>=this.endLineNumber}containsLine(p){return this.startLineNumber<=p&&p<=this.endLineNumber}}e.FoldingRegion=E}),define(ie[299],ne([1,0,6,183,122]),function(Q,e,L,k,y){"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 E{get regions(){return this._regions}get textModel(){return this._textModel}constructor(c,d){this._updateEventEmitter=new L.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=c,this._decorationProvider=d,this._regions=new k.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(c){if(!c.length)return;c=c.sort((r,l)=>r.regionIndex-l.regionIndex);const d={};this._decorationProvider.changeDecorations(r=>{let l=0,s=-1,g=-1;const h=m=>{for(;lg&&(g=C),l++}};for(const m of c){const C=m.regionIndex,w=this._editorDecorationIds[C];if(w&&!d[w]){d[w]=!0,h(C);const D=!this._regions.isCollapsed(C);this._regions.setCollapsed(C,D),s=Math.max(s,this._regions.getEndLineNumber(C))}}h(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:c})}removeManualRanges(c){const d=new Array,r=l=>{for(const s of c)if(!(s.startLineNumber>l.endLineNumber||l.startLineNumber>s.endLineNumber))return!0;return!1};for(let l=0;lr&&(r=h)}this._decorationProvider.changeDecorations(l=>this._editorDecorationIds=l.deltaDecorations(this._editorDecorationIds,d)),this._regions=c,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(c=[]){const d=(l,s)=>{for(const g of c)if(l=g.endLineNumber||g.startLineNumber<1||g.endLineNumber>r)continue;const h=this._getLinesChecksum(g.startLineNumber+1,g.endLineNumber);d.push({startLineNumber:g.startLineNumber,endLineNumber:g.endLineNumber,isCollapsed:g.isCollapsed,source:g.source,checksum:h})}return d.length>0?d:void 0}applyMemento(c){var d,r;if(!Array.isArray(c))return;const l=[],s=this._textModel.getLineCount();for(const h of c){if(h.startLineNumber>=h.endLineNumber||h.startLineNumber<1||h.endLineNumber>s)continue;const m=this._getLinesChecksum(h.startLineNumber+1,h.endLineNumber);(!h.checksum||m===h.checksum)&&l.push({startLineNumber:h.startLineNumber,endLineNumber:h.endLineNumber,type:void 0,isCollapsed:(d=h.isCollapsed)!==null&&d!==void 0?d:!0,source:(r=h.source)!==null&&r!==void 0?r:0})}const g=k.FoldingRegions.sanitizeAndMerge(this._regions,l,s);this.updatePost(k.FoldingRegions.fromFoldRanges(g))}_getLinesChecksum(c,d){return(0,y.hash)(this._textModel.getLineContent(c)+this._textModel.getLineContent(d))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(c,d){const r=[];if(this._regions){let l=this._regions.findRange(c),s=1;for(;l>=0;){const g=this._regions.toRegion(l);(!d||d(g,s))&&r.push(g),s++,l=g.parentIndex}}return r}getRegionAtLine(c){if(this._regions){const d=this._regions.findRange(c);if(d>=0)return this._regions.toRegion(d)}return null}getRegionsInside(c,d){const r=[],l=c?c.regionIndex+1:0,s=c?c.endLineNumber:Number.MAX_VALUE;if(d&&d.length===2){const g=[];for(let h=l,m=this._regions.length;h0&&!C.containedBy(g[g.length-1]);)g.pop();g.push(C),d(C,g.length)&&r.push(C)}else break}}else for(let g=l,h=this._regions.length;g1){const h=f.getRegionsInside(s,(m,C)=>m.isCollapsed!==g&&C0)for(const s of r){const g=f.getRegionAtLine(s);if(g&&(g.isCollapsed!==c&&l.push(g),d>1)){const h=f.getRegionsInside(g,(m,C)=>m.isCollapsed!==c&&Cg.isCollapsed!==c&&hh.isCollapsed!==c&&m<=d);l.push(...g)}f.toggleCollapseState(l)}e.setCollapseStateLevelsUp=S;function v(f,c,d){const r=[];for(const l of d){const s=f.getAllRegionsAtLine(l,g=>g.isCollapsed!==c);s.length>0&&r.push(s[0])}f.toggleCollapseState(r)}e.setCollapseStateUp=v;function b(f,c,d,r){const l=(g,h)=>h===c&&g.isCollapsed!==d&&!r.some(m=>g.containsLine(m)),s=f.getRegionsInside(null,l);f.toggleCollapseState(s)}e.setCollapseStateAtLevel=b;function o(f,c,d){const r=[];for(const g of d){const h=f.getAllRegionsAtLine(g,void 0);h.length>0&&r.push(h[0])}const l=g=>r.every(h=>!h.containedBy(g)&&!g.containedBy(h))&&g.isCollapsed!==c,s=f.getRegionsInside(null,l);f.toggleCollapseState(s)}e.setCollapseStateForRest=o;function i(f,c,d){const r=f.textModel,l=f.regions,s=[];for(let g=l.length-1;g>=0;g--)if(d!==l.isCollapsed(g)){const h=l.getStartLineNumber(g);c.test(r.getLineContent(h))&&s.push(l.toRegion(g))}f.toggleCollapseState(s)}e.setCollapseStateForMatchingLines=i;function n(f,c,d){const r=f.regions,l=[];for(let s=r.length-1;s>=0;s--)d!==r.isCollapsed(s)&&c===r.getType(s)&&l.push(r.toRegion(s));f.toggleCollapseState(l)}e.setCollapseStateForType=n;function t(f,c){let d=null;const r=c.getRegionAtLine(f);if(r!==null&&(d=r.startLineNumber,f===d)){const l=r.parentIndex;l!==-1?d=c.regions.getStartLineNumber(l):d=null}return d}e.getParentFoldLine=t;function a(f,c){let d=c.getRegionAtLine(f);if(d!==null&&d.startLineNumber===f){if(f!==d.startLineNumber)return d.startLineNumber;{const r=d.parentIndex;let l=0;for(r!==-1&&(l=c.regions.getStartLineNumber(d.parentIndex));d!==null;)if(d.regionIndex>0){if(d=c.regions.toRegion(d.regionIndex-1),d.startLineNumber<=l)return null;if(d.parentIndex===r)return d.startLineNumber}else return null}}else if(c.regions.length>0)for(d=c.regions.toRegion(c.regions.length-1);d!==null;){if(d.startLineNumber0?d=c.regions.toRegion(d.regionIndex-1):d=null}return null}e.getPreviousFoldLine=a;function u(f,c){let d=c.getRegionAtLine(f);if(d!==null&&d.startLineNumber===f){const r=d.parentIndex;let l=0;if(r!==-1)l=c.regions.getEndLineNumber(d.parentIndex);else{if(c.regions.length===0)return null;l=c.regions.getEndLineNumber(c.regions.length-1)}for(;d!==null;)if(d.regionIndex=l)return null;if(d.parentIndex===r)return d.startLineNumber}else return null}else if(c.regions.length>0)for(d=c.regions.toRegion(0);d!==null;){if(d.startLineNumber>f)return d.startLineNumber;d.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],b.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(b){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=b.changes.some(o=>o.range.endLineNumber!==o.range.startLineNumber||(0,E.countEOL)(o.text)[0]!==0))}updateHiddenRanges(){let b=!1;const o=[];let i=0,n=0,t=Number.MAX_VALUE,a=-1;const u=this._foldingModel.regions;for(;i0}isHidden(b){return S(this._hiddenRanges,b)!==null}adjustSelections(b){let o=!1;const i=this._foldingModel.textModel;let n=null;const t=a=>((!n||!p(a,n))&&(n=S(this._hiddenRanges,a)),n?n.startLineNumber-1:null);for(let a=0,u=b.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=_;function p(v,b){return v>=b.startLineNumber&&v<=b.endLineNumber}function S(v,b){const o=(0,L.findFirstIdxMonotonousOrArrLen)(v,i=>b=0&&v[o].endLineNumber>=b?v[o]:null}}),define(ie[300],ne([1,0,210,183]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const y=5e3,E="indent";class _{constructor(o,i,n){this.editorModel=o,this.languageConfigurationService=i,this.foldingRangesLimit=n,this.id=E}dispose(){}compute(o){const i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=i&&!!i.offSide,t=i&&i.markers;return Promise.resolve(v(this.editorModel,n,t,this.foldingRangesLimit))}}e.IndentRangeProvider=_;class p{constructor(o){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=o}insertFirst(o,i,n){if(o>k.MAX_LINE_NUMBER||i>k.MAX_LINE_NUMBER)return;const t=this._length;this._startIndexes[t]=o,this._endIndexes[t]=i,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(o){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let a=this._length-1,u=0;a>=0;a--,u++)n[u]=this._startIndexes[a],t[u]=this._endIndexes[a];return new k.FoldingRegions(n,t)}else{this._foldingRangesLimit.update(this._length,i);let n=0,t=this._indentOccurrences.length;for(let c=0;ci){t=c;break}n+=d}}const a=o.getOptions().tabSize,u=new Uint32Array(i),f=new Uint32Array(i);for(let c=this._length-1,d=0;c>=0;c--){const r=this._startIndexes[c],l=o.getLineContent(r),s=(0,L.computeIndentLevel)(l,a);(s{}};function v(b,o,i,n=S){const t=b.getOptions().tabSize,a=new p(n);let u;i&&(u=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const f=[],c=b.getLineCount()+1;f.push({indent:-1,endAbove:c,line:c});for(let d=b.getLineCount();d>0;d--){const r=b.getLineContent(d),l=(0,L.computeIndentLevel)(r,t);let s=f[f.length-1];if(l===-1){o&&(s.endAbove=d);continue}let g;if(u&&(g=r.match(u)))if(g[1]){let h=f.length-1;for(;h>0&&f[h].indent!==-2;)h--;if(h>0){f.length=h+1,s=f[h],a.insertFirst(d,s.line,l),s.line=d,s.indent=l,s.endAbove=d;continue}}else{f.push({indent:-2,endAbove:d,line:d});continue}if(s.indent>l){do f.pop(),s=f[f.length-1];while(s.indent>l);const h=s.endAbove-1;h-d>=1&&a.insertFirst(d,h,l)}s.indent===l?s.endAbove=d:f.push({indent:l,endAbove:d,line:d})}return a.toIndentRanges(b)}e.computeRanges=v}),define(ie[301],ne([1,0,9,2,183]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const E={},_="syntax";class p{constructor(i,n,t,a,u){this.editorModel=i,this.providers=n,this.handleFoldingRangesChange=t,this.foldingRangesLimit=a,this.fallbackRangeProvider=u,this.id=_,this.disposables=new k.DisposableStore,u&&this.disposables.add(u);for(const f of n)typeof f.onDidChange=="function"&&this.disposables.add(f.onDidChange(t))}compute(i){return S(this.providers,this.editorModel,i).then(n=>{var t,a;return n?b(n,this.foldingRangesLimit):(a=(t=this.fallbackRangeProvider)===null||t===void 0?void 0:t.compute(i))!==null&&a!==void 0?a:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=p;function S(o,i,n){let t=null;const a=o.map((u,f)=>Promise.resolve(u.provideFoldingRanges(i,E,n)).then(c=>{if(!n.isCancellationRequested&&Array.isArray(c)){Array.isArray(t)||(t=[]);const d=i.getLineCount();for(const r of c)r.start>0&&r.end>r.start&&r.end<=d&&t.push({start:r.start,end:r.end,rank:f,kind:r.kind})}},L.onUnexpectedExternalError));return Promise.all(a).then(u=>t)}class v{constructor(i){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=i}add(i,n,t,a){if(i>y.MAX_LINE_NUMBER||n>y.MAX_LINE_NUMBER)return;const u=this._length;this._startIndexes[u]=i,this._endIndexes[u]=n,this._nestingLevels[u]=a,this._types[u]=t,this._length++,a<30&&(this._nestingLevelCounts[a]=(this._nestingLevelCounts[a]||0)+1)}toIndentRanges(){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let a=0;ai){t=c;break}n+=d}}const a=new Uint32Array(i),u=new Uint32Array(i),f=[];for(let c=0,d=0;c{let d=f.start-c.start;return d===0&&(d=f.rank-c.rank),d}),t=new v(i);let a;const u=[];for(const f of n)if(!a)a=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else if(f.start>a.start)if(f.end<=a.end)u.push(a),a=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else{if(f.start>a.end){do a=u.pop();while(a&&f.start>a.end);a&&u.push(a),a=f}t.add(f.start,f.end,f.kind&&f.kind.value,u.length)}return t.toIndentRanges()}e.sanitizeRanges=b}),define(ie[302],ne([1,0,74,5,124]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class E{static _handleEolEdits(p,S){let v;const b=[];for(const o of S)typeof o.eol=="number"&&(v=o.eol),o.range&&typeof o.text=="string"&&b.push(o);return typeof v=="number"&&p.hasModel()&&p.getModel().pushEOL(v),b}static _isFullModelReplaceEdit(p,S){if(!p.hasModel())return!1;const v=p.getModel(),b=v.validateRange(S.range);return v.getFullModelRange().equalsRange(b)}static execute(p,S,v){v&&p.pushUndoStop();const b=y.StableEditorScrollState.capture(p),o=E._handleEolEdits(p,S);o.length===1&&E._isFullModelReplaceEdit(p,o[0])?p.executeEdits("formatEditsCommand",o.map(i=>L.EditOperation.replace(k.Range.lift(i.range),i.text))):p.executeEdits("formatEditsCommand",o.map(i=>L.EditOperation.replaceMove(k.Range.lift(i.range),i.text))),v&&p.pushUndoStop(),b.restoreRelativeVerticalPositionOfCursor(p)}}e.FormattingEdit=E}),define(ie[101],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class L{constructor(E,_,p,S){this.priority=E,this.range=_,this.initialMousePosX=p,this.initialMousePosY=S,this.type=1}equals(E){return E.type===1&&this.range.equalsRange(E.range)}canAdoptVisibleHover(E,_){return E.type===1&&_.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=L;class k{constructor(E,_,p,S,v,b){this.priority=E,this.owner=_,this.range=p,this.initialMousePosX=S,this.initialMousePosY=v,this.supportsMarkerHover=b,this.type=2}equals(E){return E.type===2&&this.owner===E.owner}canAdoptVisibleHover(E,_){return E.type===2&&this.owner===E.owner}}e.HoverForeignElementAnchor=k,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(E){this._participants.push(E)}getAll(){return this._participants}}}),define(ie[554],ne([1,0,24]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class k{constructor(E,_,p){this._editRange=E,this._originalSelection=_,this._text=p}getEditOperations(E,_){_.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(E,_){const S=_.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new L.Selection(S.endLineNumber,Math.min(this._originalSelection.positionColumn,S.endColumn),S.endLineNumber,Math.min(this._originalSelection.positionColumn,S.endColumn)):new L.Selection(S.endLineNumber,S.endColumn-this._text.length,S.endLineNumber,S.endColumn)}}e.InPlaceReplaceCommand=k}),define(ie[303],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function L(y,E){let _=0;for(let p=0;p{const r=_.Range.lift(d.range);return{startOffset:f.getOffset(r.getStartPosition()),endOffset:f.getOffset(r.getEndPosition()),text:d.text}});c.sort((d,r)=>r.startOffset-d.startOffset);for(const d of c)a=a.substring(0,d.startOffset)+d.text+a.substring(d.endOffset);return a}e.applyEdits=p;class S{constructor(u){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let f=0;ff)throw new L.BugIndicatingError(`startColumn ${u} cannot be after endColumnExclusive ${f}`)}toRange(u){return new _.Range(u,this.startColumn,u,this.endColumnExclusive)}equals(u){return this.startColumn===u.startColumn&&this.endColumnExclusive===u.endColumnExclusive}}e.ColumnRange=o;function i(a,u){const f=new k.DisposableStore,c=a.createDecorationsCollection();return f.add((0,y.autorunOpts)({debugName:()=>`Apply decorations from ${u.debugName}`},d=>{const r=u.read(d);c.set(r)})),f.add({dispose:()=>{c.clear()}}),f}e.applyObservableDecorations=i;function n(a,u){return new E.Position(a.lineNumber+u.lineNumber-1,u.lineNumber===1?a.column+u.column-1:u.column)}e.addPositions=n;function t(a){let u=1,f=1;for(const c of a)c===` `?(u++,f=1):f++;return new E.Position(u,f)}e.lengthOfText=t}),define(ie[217],ne([1,0,155]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ghostTextOrReplacementEquals=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class k{constructor(S,v){this.lineNumber=S,this.parts=v}equals(S){return this.lineNumber===S.lineNumber&&this.parts.length===S.parts.length&&this.parts.every((v,b)=>v.equals(S.parts[b]))}renderForScreenReader(S){if(this.parts.length===0)return"";const v=this.parts[this.parts.length-1],b=S.substr(0,v.column-1);return(0,L.applyEdits)(b,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)}get lineCount(){return 1+this.parts.reduce((S,v)=>S+v.lines.length-1,0)}}e.GhostText=k;class y{constructor(S,v,b){this.column=S,this.lines=v,this.preview=b}equals(S){return this.column===S.column&&this.lines.length===S.lines.length&&this.lines.every((v,b)=>v===S.lines[b])}}e.GhostTextPart=y;class E{constructor(S,v,b,o=0){this.lineNumber=S,this.columnRange=v,this.newLines=b,this.additionalReservedLineCount=o,this.parts=[new y(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(S){return this.newLines.join(` `)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(S=>S.lines.length===0)}equals(S){return this.lineNumber===S.lineNumber&&this.columnRange.equals(S.columnRange)&&this.newLines.length===S.newLines.length&&this.newLines.every((v,b)=>v===S.newLines[b])&&this.additionalReservedLineCount===S.additionalReservedLineCount}}e.GhostTextReplacement=E;function _(p,S){return p===S?!0:!p||!S?!1:p instanceof k&&S instanceof k||p instanceof E&&S instanceof E?p.equals(S):!1}e.ghostTextOrReplacementEquals=_}),define(ie[304],ne([1,0,171,12,5,217,155]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class p{constructor(t,a){this.range=t,this.text=a}removeCommonPrefix(t,a){const u=a?this.range.intersectRanges(a):this.range;if(!u)return this;const f=t.getValueInRange(u,1),c=(0,k.commonPrefixLength)(f,this.text),d=(0,_.addPositions)(this.range.getStartPosition(),(0,_.lengthOfText)(f.substring(0,c))),r=this.text.substring(c),l=y.Range.fromPositions(d,this.range.getEndPosition());return new p(l,r)}augments(t){return this.text.startsWith(t.text)&&S(this.range,t.range)}computeGhostText(t,a,u,f=0){let c=this.removeCommonPrefix(t);if(c.range.endLineNumber!==c.range.startLineNumber)return;const d=t.getLineContent(c.range.startLineNumber),r=(0,k.getLeadingWhitespace)(d).length;if(c.range.startColumn-1<=r){const w=(0,k.getLeadingWhitespace)(c.text).length,D=d.substring(c.range.startColumn-1,r),[I,M]=[c.range.getStartPosition(),c.range.getEndPosition()],A=I.column+D.length<=M.column?I.delta(0,D.length):M,O=y.Range.fromPositions(A,M),T=c.text.startsWith(D)?c.text.substring(D.length):c.text.substring(w);c=new p(O,T)}const s=t.getValueInRange(c.range),g=b(s,c.text);if(!g)return;const h=c.range.startLineNumber,m=new Array;if(a==="prefix"){const w=g.filter(D=>D.originalLength===0);if(w.length>1||w.length===1&&w[0].originalStart!==s.length)return}const C=c.text.length-f;for(const w of g){const D=c.range.startColumn+w.originalStart+w.originalLength;if(a==="subwordSmart"&&u&&u.lineNumber===c.range.startLineNumber&&D0)return;if(w.modifiedLength===0)continue;const I=w.modifiedStart+w.modifiedLength,M=Math.max(w.modifiedStart,Math.min(I,C)),A=c.text.substring(w.modifiedStart,M),O=c.text.substring(M,Math.max(w.modifiedStart,I));if(A.length>0){const T=(0,k.splitLines)(A);m.push(new E.GhostTextPart(D,T,!1))}if(O.length>0){const T=(0,k.splitLines)(O);m.push(new E.GhostTextPart(D,T,!0))}}return new E.GhostText(h,m)}}e.SingleTextEdit=p;function S(n,t){return t.getStartPosition().equals(n.getStartPosition())&&t.getEndPosition().isBeforeOrEqual(n.getEndPosition())}let v;function b(n,t){if(v?.originalValue===n&&v?.newValue===t)return v?.changes;{let a=i(n,t,!0);if(a){const u=o(a);if(u>0){const f=i(n,t,!1);f&&o(f)5e3||t.length>5e3)return;function u(s){let g=0;for(let h=0,m=s.length;hg&&(g=C)}return g}const f=Math.max(u(n),u(t));function c(s){if(s<0)throw new Error("unexpected");return f+s+1}function d(s){let g=0,h=0;const m=new Int32Array(s.length);for(let C=0,w=s.length;Cr},{getElements:()=>l}).ComputeDiff(!1).changes}}),define(ie[555],ne([1,0,5,24]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class y{constructor(_,p,S){this._selection=_,this._isCopyingDown=p,this._noop=S||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(_,p){let S=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,S.startLineNumber=o)return null;const i=[];for(let t=b;t<=o;t++)i.push(p.getLineContent(t));let n=i.slice(0);return n.sort(y.getCollator().compare),v===!0&&(n=n.reverse()),{startLineNumber:b,endLineNumber:o,before:i,after:n}}function _(p,S,v){const b=E(p,S,v);return b?L.EditOperation.replace(new k.Range(b.startLineNumber,1,b.endLineNumber,p.getLineMaxColumn(b.endLineNumber)),b.after.join(` `)):null}}),define(ie[305],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=void 0,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function L(k,y,E){var _;const p=(_=E.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:k.getLanguageId(),resource:k.uri}))===null||_===void 0?void 0:_.enabled;return typeof p=="boolean"?p:y.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=L}),define(ie[306],ne([1,0,66,11,5]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class E{async provideSelectionRanges(p,S){const v=[];for(const b of S){const o=[];v.push(o);const i=new Map;await new Promise(n=>E._bracketsRightYield(n,0,p,b,i)),await new Promise(n=>E._bracketsLeftYield(n,0,p,b,i,o))}return v}static _bracketsRightYield(p,S,v,b,o){const i=new Map,n=Date.now();for(;;){if(S>=E._maxRounds){p();break}if(!b){p();break}const t=v.bracketPairs.findNextBracket(b);if(!t){p();break}if(Date.now()-n>E._maxDuration){setTimeout(()=>E._bracketsRightYield(p,S+1,v,b,o));break}if(t.bracketInfo.isOpeningBracket){const u=t.bracketInfo.bracketText,f=i.has(u)?i.get(u):0;i.set(u,f+1)}else{const u=t.bracketInfo.getOpeningBrackets()[0].bracketText;let f=i.has(u)?i.get(u):0;if(f-=1,i.set(u,Math.max(0,f)),f<0){let c=o.get(u);c||(c=new L.LinkedList,o.set(u,c)),c.push(t.range)}}b=t.range.getEndPosition()}}static _bracketsLeftYield(p,S,v,b,o,i){const n=new Map,t=Date.now();for(;;){if(S>=E._maxRounds&&o.size===0){p();break}if(!b){p();break}const a=v.bracketPairs.findPrevBracket(b);if(!a){p();break}if(Date.now()-t>E._maxDuration){setTimeout(()=>E._bracketsLeftYield(p,S+1,v,b,o,i));break}if(a.bracketInfo.isOpeningBracket){const f=a.bracketInfo.bracketText;let c=n.has(f)?n.get(f):0;if(c-=1,n.set(f,Math.max(0,c)),c<0){const d=o.get(f);if(d){const r=d.shift();d.size===0&&o.delete(f);const l=y.Range.fromPositions(a.range.getEndPosition(),r.getStartPosition()),s=y.Range.fromPositions(a.range.getStartPosition(),r.getEndPosition());i.push({range:l}),i.push({range:s}),E._addBracketLeading(v,s,i)}}}else{const f=a.bracketInfo.getOpeningBrackets()[0].bracketText,c=n.has(f)?n.get(f):0;n.set(f,c+1)}b=a.range.getStartPosition()}}static _addBracketLeading(p,S,v){if(S.startLineNumber===S.endLineNumber)return;const b=S.startLineNumber,o=p.getLineFirstNonWhitespaceColumn(b);o!==0&&o!==S.startColumn&&(v.push({range:y.Range.fromPositions(new k.Position(b,o),S.getEndPosition())}),v.push({range:y.Range.fromPositions(new k.Position(b,1),S.getEndPosition())}));const i=b-1;if(i>0){const n=p.getLineFirstNonWhitespaceColumn(i);n===S.startColumn&&n!==p.getLineLastNonWhitespaceColumn(i)&&(v.push({range:y.Range.fromPositions(new k.Position(i,n),S.getEndPosition())}),v.push({range:y.Range.fromPositions(new k.Position(i,1),S.getEndPosition())}))}}}e.BracketSelectionRangeProvider=E,E._maxDuration=30,E._maxRounds=2}),define(ie[557],ne([1,0,12,5]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class y{constructor(_=!0){this.selectSubwords=_}provideSelectionRanges(_,p){const S=[];for(const v of p){const b=[];S.push(b),this.selectSubwords&&this._addInWordRanges(b,_,v),this._addWordRanges(b,_,v),this._addWhitespaceLine(b,_,v),b.push({range:_.getFullModelRange()})}return S}_addInWordRanges(_,p,S){const v=p.getWordAtPosition(S);if(!v)return;const{word:b,startColumn:o}=v,i=S.column-o;let n=i,t=i,a=0;for(;n>=0;n--){const u=b.charCodeAt(n);if(n!==i&&(u===95||u===45))break;if((0,L.isLowerAsciiLetter)(u)&&(0,L.isUpperAsciiLetter)(a))break;a=u}for(n+=1;t0&&p.getLineFirstNonWhitespaceColumn(S.lineNumber)===0&&p.getLineLastNonWhitespaceColumn(S.lineNumber)===0&&_.push({range:new k.Range(S.lineNumber,1,S.lineNumber,p.getLineMaxColumn(S.lineNumber))})}}e.WordSelectionRangeProvider=y}),define(ie[131],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class L{constructor(){this.value="",this.pos=0}static isDigitCharacter(a){return a>=48&&a<=57}static isVariableCharacter(a){return a===95||a>=97&&a<=122||a>=65&&a<=90}text(a){this.value=a,this.pos=0}tokenText(a){return this.value.substr(a.pos,a.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const a=this.pos;let u=0,f=this.value.charCodeAt(a),c;if(c=L._table[f],typeof c=="number")return this.pos+=1,{type:c,pos:a,len:1};if(L.isDigitCharacter(f)){c=8;do u+=1,f=this.value.charCodeAt(a+u);while(L.isDigitCharacter(f));return this.pos+=u,{type:c,pos:a,len:u}}if(L.isVariableCharacter(f)){c=9;do f=this.value.charCodeAt(a+ ++u);while(L.isVariableCharacter(f)||L.isDigitCharacter(f));return this.pos+=u,{type:c,pos:a,len:u}}c=10;do u+=1,f=this.value.charCodeAt(a+u);while(!isNaN(f)&&typeof L._table[f]>"u"&&!L.isDigitCharacter(f)&&!L.isVariableCharacter(f));return this.pos+=u,{type:c,pos:a,len:u}}}e.Scanner=L,L._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class k{constructor(){this._children=[]}appendChild(a){return a instanceof y&&this._children[this._children.length-1]instanceof y?this._children[this._children.length-1].value+=a.value:(a.parent=this,this._children.push(a)),this}replace(a,u){const{parent:f}=a,c=f.children.indexOf(a),d=f.children.slice(0);d.splice(c,1,...u),f._children=d,function r(l,s){for(const g of l)g.parent=s,r(g.children,g)}(u,f)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let a=this;for(;;){if(!a)return;if(a instanceof i)return a;a=a.parent}}toString(){return this.children.reduce((a,u)=>a+u.toString(),"")}len(){return 0}}e.Marker=k;class y extends k{constructor(a){super(),this.value=a}toString(){return this.value}len(){return this.value.length}clone(){return new y(this.value)}}e.Text=y;class E extends k{}e.TransformableMarker=E;class _ extends E{static compareByIndex(a,u){return a.index===u.index?0:a.isFinalTabstop?1:u.isFinalTabstop||a.indexu.index?1:0}constructor(a){super(),this.index=a}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof p?this._children[0]:void 0}clone(){const a=new _(this.index);return this.transform&&(a.transform=this.transform.clone()),a._children=this.children.map(u=>u.clone()),a}}e.Placeholder=_;class p extends k{constructor(){super(...arguments),this.options=[]}appendChild(a){return a instanceof y&&(a.parent=this,this.options.push(a)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const a=new p;return this.options.forEach(a.appendChild,a),a}}e.Choice=p;class S extends k{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(a){const u=this;let f=!1,c=a.replace(this.regexp,function(){return f=!0,u._replace(Array.prototype.slice.call(arguments,0,-2))});return!f&&this._children.some(d=>d instanceof v&&!!d.elseValue)&&(c=this._replace([])),c}_replace(a){let u="";for(const f of this._children)if(f instanceof v){let c=a[f.index]||"";c=f.resolve(c),u+=c}else u+=f.toString();return u}toString(){return""}clone(){const a=new S;return a.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),a._children=this.children.map(u=>u.clone()),a}}e.Transform=S;class v extends k{constructor(a,u,f,c){super(),this.index=a,this.shorthandName=u,this.ifValue=f,this.elseValue=c}resolve(a){return this.shorthandName==="upcase"?a?a.toLocaleUpperCase():"":this.shorthandName==="downcase"?a?a.toLocaleLowerCase():"":this.shorthandName==="capitalize"?a?a[0].toLocaleUpperCase()+a.substr(1):"":this.shorthandName==="pascalcase"?a?this._toPascalCase(a):"":this.shorthandName==="camelcase"?a?this._toCamelCase(a):"":a&&typeof this.ifValue=="string"?this.ifValue:!a&&typeof this.elseValue=="string"?this.elseValue:a||""}_toPascalCase(a){const u=a.match(/[a-z0-9]+/gi);return u?u.map(f=>f.charAt(0).toUpperCase()+f.substr(1)).join(""):a}_toCamelCase(a){const u=a.match(/[a-z0-9]+/gi);return u?u.map((f,c)=>c===0?f.charAt(0).toLowerCase()+f.substr(1):f.charAt(0).toUpperCase()+f.substr(1)).join(""):a}clone(){return new v(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=v;class b extends E{constructor(a){super(),this.name=a}resolve(a){let u=a.resolve(this);return this.transform&&(u=this.transform.resolve(u||"")),u!==void 0?(this._children=[new y(u)],!0):!1}clone(){const a=new b(this.name);return this.transform&&(a.transform=this.transform.clone()),a._children=this.children.map(u=>u.clone()),a}}e.Variable=b;function o(t,a){const u=[...t];for(;u.length>0;){const f=u.shift();if(!a(f))break;u.unshift(...f.children)}}class i extends k{get placeholderInfo(){if(!this._placeholders){const a=[];let u;this.walk(function(f){return f instanceof _&&(a.push(f),u=!u||u.indexc===a?(f=!0,!1):(u+=c.len(),!0)),f?u:-1}fullLen(a){let u=0;return o([a],f=>(u+=f.len(),!0)),u}enclosingPlaceholders(a){const u=[];let{parent:f}=a;for(;f;)f instanceof _&&u.push(f),f=f.parent;return u}resolveVariables(a){return this.walk(u=>(u instanceof b&&u.resolve(a)&&(this._placeholders=void 0),!0)),this}appendChild(a){return this._placeholders=void 0,super.appendChild(a)}replace(a,u){return this._placeholders=void 0,super.replace(a,u)}clone(){const a=new i;return this._children=this.children.map(u=>u.clone()),a}walk(a){o(this.children,a)}}e.TextmateSnippet=i;class n{constructor(){this._scanner=new L,this._token={type:14,pos:0,len:0}}static escape(a){return a.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(a){return/\${?CLIPBOARD/.test(a)}parse(a,u,f){const c=new i;return this.parseFragment(a,c),this.ensureFinalTabstop(c,f??!1,u??!1),c}parseFragment(a,u){const f=u.children.length;for(this._scanner.text(a),this._token=this._scanner.next();this._parse(u););const c=new Map,d=[];u.walk(s=>(s instanceof _&&(s.isFinalTabstop?c.set(0,void 0):!c.has(s.index)&&s.children.length>0?c.set(s.index,s.children):d.push(s)),!0));const r=(s,g)=>{const h=c.get(s.index);if(!h)return;const m=new _(s.index);m.transform=s.transform;for(const C of h){const w=C.clone();m.appendChild(w),w instanceof _&&c.has(w.index)&&!g.has(w.index)&&(g.add(w.index),r(w,g),g.delete(w.index))}u.replace(s,[m])},l=new Set;for(const s of d)r(s,l);return u.children.slice(f)}ensureFinalTabstop(a,u,f){(u||f&&a.placeholders.length>0)&&(a.placeholders.find(d=>d.index===0)||a.appendChild(new _(0)))}_accept(a,u){if(a===void 0||this._token.type===a){const f=u?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),f}return!1}_backTo(a){return this._scanner.pos=a.pos+a.len,this._token=a,!1}_until(a){const u=this._token;for(;this._token.type!==a;){if(this._token.type===14)return!1;if(this._token.type===5){const c=this._scanner.next();if(c.type!==0&&c.type!==4&&c.type!==5)return!1}this._token=this._scanner.next()}const f=this._scanner.value.substring(u.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),f}_parse(a){return this._parseEscaped(a)||this._parseTabstopOrVariableName(a)||this._parseComplexPlaceholder(a)||this._parseComplexVariable(a)||this._parseAnything(a)}_parseEscaped(a){let u;return(u=this._accept(5,!0))?(u=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||u,a.appendChild(new y(u)),!0):!1}_parseTabstopOrVariableName(a){let u;const f=this._token;return this._accept(0)&&(u=this._accept(9,!0)||this._accept(8,!0))?(a.appendChild(/^\d+$/.test(u)?new _(Number(u)):new b(u)),!0):this._backTo(f)}_parseComplexPlaceholder(a){let u;const f=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(8,!0))))return this._backTo(f);const d=new _(Number(u));if(this._accept(1))for(;;){if(this._accept(4))return a.appendChild(d),!0;if(!this._parse(d))return a.appendChild(new y("${"+u+":")),d.children.forEach(a.appendChild,a),!0}else if(d.index>0&&this._accept(7)){const r=new p;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(d.appendChild(r),this._accept(4)))return a.appendChild(d),!0}return this._backTo(f),!1}}else return this._accept(6)?this._parseTransform(d)?(a.appendChild(d),!0):(this._backTo(f),!1):this._accept(4)?(a.appendChild(d),!0):this._backTo(f)}_parseChoiceElement(a){const u=this._token,f=[];for(;!(this._token.type===2||this._token.type===7);){let c;if((c=this._accept(5,!0))?c=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||c:c=this._accept(void 0,!0),!c)return this._backTo(u),!1;f.push(c)}return f.length===0?(this._backTo(u),!1):(a.appendChild(new y(f.join(""))),!0)}_parseComplexVariable(a){let u;const f=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(9,!0))))return this._backTo(f);const d=new b(u);if(this._accept(1))for(;;){if(this._accept(4))return a.appendChild(d),!0;if(!this._parse(d))return a.appendChild(new y("${"+u+":")),d.children.forEach(a.appendChild,a),!0}else return this._accept(6)?this._parseTransform(d)?(a.appendChild(d),!0):(this._backTo(f),!1):this._accept(4)?(a.appendChild(d),!0):this._backTo(f)}_parseTransform(a){const u=new S;let f="",c="";for(;!this._accept(6);){let d;if(d=this._accept(5,!0)){d=this._accept(6,!0)||d,f+=d;continue}if(this._token.type!==14){f+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let d;if(d=this._accept(5,!0)){d=this._accept(5,!0)||this._accept(6,!0)||d,u.appendChild(new y(d));continue}if(!(this._parseFormatString(u)||this._parseAnything(u)))return!1}for(;!this._accept(4);){if(this._token.type!==14){c+=this._accept(void 0,!0);continue}return!1}try{u.regexp=new RegExp(f,c)}catch{return!1}return a.transform=u,!0}_parseFormatString(a){const u=this._token;if(!this._accept(0))return!1;let f=!1;this._accept(3)&&(f=!0);const c=this._accept(8,!0);if(c)if(f){if(this._accept(4))return a.appendChild(new v(Number(c))),!0;if(!this._accept(1))return this._backTo(u),!1}else return a.appendChild(new v(Number(c))),!0;else return this._backTo(u),!1;if(this._accept(6)){const d=this._accept(9,!0);return!d||!this._accept(4)?(this._backTo(u),!1):(a.appendChild(new v(Number(c),d)),!0)}else if(this._accept(11)){const d=this._until(4);if(d)return a.appendChild(new v(Number(c),void 0,d,void 0)),!0}else if(this._accept(12)){const d=this._until(4);if(d)return a.appendChild(new v(Number(c),void 0,void 0,d)),!0}else if(this._accept(13)){const d=this._until(1);if(d){const r=this._until(4);if(r)return a.appendChild(new v(Number(c),void 0,d,r)),!0}}else{const d=this._until(4);if(d)return a.appendChild(new v(Number(c),void 0,void 0,d)),!0}return this._backTo(u),!1}_parseAnything(a){return this._token.type!==14?(a.appendChild(new y(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=n}),define(ie[307],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class L{constructor(_,p){this.startLineNumber=_,this.endLineNumber=p}}e.StickyRange=L;class k{constructor(_,p,S){this.range=_,this.children=p,this.parent=S}}e.StickyElement=k;class y{constructor(_,p,S,v){this.uri=_,this.version=p,this.element=S,this.outlineProviderId=v}}e.StickyModel=y}),define(ie[308],ne([1,0,13,71,12]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class E{constructor(S,v){this.leadingLineContent=S,this.characterCountDelta=v}}e.LineContext=E;class _{constructor(S,v,b,o,i,n,t=k.FuzzyScoreOptions.default,a=void 0){this.clipboardText=a,this._snippetCompareFn=_._compareCompletionItems,this._items=S,this._column=v,this._wordDistance=o,this._options=i,this._refilterKind=1,this._lineContext=b,this._fuzzyScoreOptions=t,n==="top"?this._snippetCompareFn=_._compareCompletionItemsSnippetsUp:n==="bottom"&&(this._snippetCompareFn=_._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(S){(this._lineContext.leadingLineContent!==S.leadingLineContent||this._lineContext.characterCountDelta!==S.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta0&&b[0].container.incomplete&&S.add(v);return S}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const S=[],{leadingLineContent:v,characterCountDelta:b}=this._lineContext;let o="",i="";const n=this._refilterKind===1?this._items:this._filteredItems,t=[],a=!this._options.filterGraceful||n.length>2e3?k.fuzzyScore:k.fuzzyScoreGracefulAggressive;for(let u=0;u=r)f.score=k.FuzzyScore.Default;else if(typeof f.completion.filterText=="string"){const s=a(o,i,l,f.completion.filterText,f.filterTextLow,0,this._fuzzyScoreOptions);if(!s)continue;(0,y.compareIgnoreCase)(f.completion.filterText,f.textLabel)===0?f.score=s:(f.score=(0,k.anyScore)(o,i,l,f.textLabel,f.labelLow,0),f.score[0]=s[0])}else{const s=a(o,i,l,f.textLabel,f.labelLow,0,this._fuzzyScoreOptions);if(!s)continue;f.score=s}}f.idx=u,f.distance=this._wordDistance.distance(f.position,f.completion),t.push(f),S.push(f.textLabel.length)}this._filteredItems=t.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:S.length?(0,L.quickSelect)(S.length-.85,S,(u,f)=>u-f):0}}static _compareCompletionItems(S,v){return S.score[0]>v.score[0]?-1:S.score[0]v.distance?1:S.idxv.idx?1:0}static _compareCompletionItemsSnippetsDown(S,v){if(S.completion.kind!==v.completion.kind){if(S.completion.kind===27)return 1;if(v.completion.kind===27)return-1}return _._compareCompletionItems(S,v)}static _compareCompletionItemsSnippetsUp(S,v){if(S.completion.kind!==v.completion.kind){if(S.completion.kind===27)return-1;if(v.completion.kind===27)return 1}return _._compareCompletionItems(S,v)}}e.CompletionModel=_}),define(ie[558],ne([1,0,13,2,125]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class E{constructor(p,S,v,b){this._disposables=new k.DisposableStore,this._disposables.add(v.onDidSuggest(o=>{o.completionModel.items.length===0&&this.reset()})),this._disposables.add(v.onDidCancel(o=>{this.reset()})),this._disposables.add(S.onDidShow(()=>this._onItem(S.getFocusedItem()))),this._disposables.add(S.onDidFocus(this._onItem,this)),this._disposables.add(S.onDidHide(this.reset,this)),this._disposables.add(p.onWillType(o=>{if(this._active&&!S.isFrozen()&&v.state!==0){const i=o.charCodeAt(o.length-1);this._active.acceptCharacters.has(i)&&p.getOption(0)&&b(this._active.item)}}))}_onItem(p){if(!p||!(0,L.isNonEmptyArray)(p.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===p.item)return;const S=new y.CharacterSet;for(const v of p.item.completion.commitCharacters)v.length>0&&S.add(v.charCodeAt(0));this._active={acceptCharacters:S,item:p}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=E}),define(ie[559],ne([1,0,2]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class k{constructor(E,_){this._disposables=new L.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(E.onWillType(()=>{if(this._locked||!E.hasModel())return;const p=E.getSelections(),S=p.length;let v=!1;for(let o=0;ok._maxSelectionLength)return;this._lastOvertyped[o]={value:b.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}})),this._disposables.add(_.onDidTrigger(p=>{this._locked=!0})),this._disposables.add(_.onDidCancel(p=>{this._locked=!1}))}getLastOvertypedInfo(E){if(E>=0&&E=0?f[c]:f[Math.max(0,~c-1)];let r=o.length;for(const l of o){if(!k.Range.containsRange(l.range,d))break;r-=1}return r}}}}e.WordDistance=E,E.None=new class extends E{distance(){return 0}}}),define(ie[310],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function L(t){return Array.isArray(t)}e.isFuzzyActionArr=L;function k(t){return!L(t)}e.isFuzzyAction=k;function y(t){return typeof t=="string"}e.isString=y;function E(t){return!y(t)}e.isIAction=E;function _(t){return!t}e.empty=_;function p(t,a){return t.ignoreCase&&a?a.toLowerCase():a}e.fixCase=p;function S(t){return t.replace(/[&<>'"_]/g,"-")}e.sanitize=S;function v(t,a){console.log(`${t.languageId}: ${a}`)}e.log=v;function b(t,a){return new Error(`${t.languageId}: ${a}`)}e.createError=b;function o(t,a,u,f,c){const d=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return a.replace(d,function(l,s,g,h,m,C,w,D,I){return _(g)?_(h)?!_(m)&&m0;){const f=t.tokenizer[u];if(f)return f;const c=u.lastIndexOf(".");c<0?u=null:u=u.substr(0,c)}return null}e.findRules=i;function n(t,a){let u=a;for(;u&&u.length>0;){if(t.stateNames[u])return!0;const c=u.lastIndexOf(".");c<0?u=null:u=u.substr(0,c)}return!1}e.stateExists=n}),define(ie[560],ne([1,0,310]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function k(t,a){if(!a||!Array.isArray(a))return!1;for(const u of a)if(!t(u))return!1;return!0}function y(t,a){return typeof t=="boolean"?t:a}function E(t,a){return typeof t=="string"?t:a}function _(t){const a={};for(const u of t)a[u]=!0;return a}function p(t,a=!1){a&&(t=t.map(function(f){return f.toLowerCase()}));const u=_(t);return a?function(f){return u[f.toLowerCase()]!==void 0&&u.hasOwnProperty(f.toLowerCase())}:function(f){return u[f]!==void 0&&u.hasOwnProperty(f)}}function S(t,a){a=a.replace(/@@/g,"");let u=0,f;do f=!1,a=a.replace(/@(\w+)/g,function(d,r){f=!0;let l="";if(typeof t[r]=="string")l=t[r];else if(t[r]&&t[r]instanceof RegExp)l=t[r].source;else throw t[r]===void 0?L.createError(t,"language definition does not contain attribute '"+r+"', used at: "+a):L.createError(t,"attribute reference '"+r+"' must be a string, used at: "+a);return L.empty(l)?"":"(?:"+l+")"}),u++;while(f&&u<5);a=a.replace(/\x01/g,"@");const c=(t.ignoreCase?"i":"")+(t.unicode?"u":"");return new RegExp(a,c)}function v(t,a,u,f){if(f<0)return t;if(f=100){f=f-100;const c=u.split(".");if(c.unshift(u),f=0&&(f.tokenSubst=!0),typeof u.bracket=="string")if(u.bracket==="@open")f.bracket=1;else if(u.bracket==="@close")f.bracket=-1;else throw L.createError(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+a);if(u.next){if(typeof u.next!="string")throw L.createError(t,"the next state must be a string value in rule: "+a);{let c=u.next;if(!/^(@pop|@push|@popall)$/.test(c)&&(c[0]==="@"&&(c=c.substr(1)),c.indexOf("$")<0&&!L.stateExists(t,L.substituteMatches(t,c,"",[],""))))throw L.createError(t,"the next state '"+u.next+"' is not defined in rule: "+a);f.next=c}}return typeof u.goBack=="number"&&(f.goBack=u.goBack),typeof u.switchTo=="string"&&(f.switchTo=u.switchTo),typeof u.log=="string"&&(f.log=u.log),typeof u.nextEmbedded=="string"&&(f.nextEmbedded=u.nextEmbedded,t.usesEmbedded=!0),f}}else if(Array.isArray(u)){const f=[];for(let c=0,d=u.length;c0&&f[0]==="^",this.name=this.name+": "+f,this.regex=S(a,"^(?:"+(this.matchOnlyAtLineStart?f.substr(1):f)+")")}setAction(a,u){this.action=o(a,this.name,u)}}function n(t,a){if(!a||typeof a!="object")throw new Error("Monarch: expecting a language definition object");const u={};u.languageId=t,u.includeLF=y(a.includeLF,!1),u.noThrow=!1,u.maxStack=100,u.start=typeof a.start=="string"?a.start:null,u.ignoreCase=y(a.ignoreCase,!1),u.unicode=y(a.unicode,!1),u.tokenPostfix=E(a.tokenPostfix,"."+u.languageId),u.defaultToken=E(a.defaultToken,"source"),u.usesEmbedded=!1;const f=a;f.languageId=t,f.includeLF=u.includeLF,f.ignoreCase=u.ignoreCase,f.unicode=u.unicode,f.noThrow=u.noThrow,f.usesEmbedded=u.usesEmbedded,f.stateNames=a.tokenizer,f.defaultToken=u.defaultToken;function c(r,l,s){for(const g of s){let h=g.include;if(h){if(typeof h!="string")throw L.createError(u,"an 'include' attribute must be a string at: "+r);if(h[0]==="@"&&(h=h.substr(1)),!a.tokenizer[h])throw L.createError(u,"include target '"+h+"' is not defined at: "+r);c(r+"."+h,l,a.tokenizer[h])}else{const m=new i(r);if(Array.isArray(g)&&g.length>=1&&g.length<=3)if(m.setRegex(f,g[0]),g.length>=3)if(typeof g[1]=="string")m.setAction(f,{token:g[1],next:g[2]});else if(typeof g[1]=="object"){const C=g[1];C.next=g[2],m.setAction(f,C)}else throw L.createError(u,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else m.setAction(f,g[1]);else{if(!g.regex)throw L.createError(u,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);g.name&&typeof g.name=="string"&&(m.name=g.name),g.matchOnlyAtStart&&(m.matchOnlyAtLineStart=y(g.matchOnlyAtLineStart,!1)),m.setRegex(f,g.regex),m.setAction(f,g.action)}l.push(m)}}}if(!a.tokenizer||typeof a.tokenizer!="object")throw L.createError(u,"a language definition must define the 'tokenizer' attribute as an object");u.tokenizer=[];for(const r in a.tokenizer)if(a.tokenizer.hasOwnProperty(r)){u.start||(u.start=r);const l=a.tokenizer[r];u.tokenizer[r]=new Array,c("tokenizer."+r,u.tokenizer[r],l)}if(u.usesEmbedded=f.usesEmbedded,a.brackets){if(!Array.isArray(a.brackets))throw L.createError(u,"the 'brackets' attribute must be defined as an array")}else a.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const d=[];for(const r of a.brackets){let l=r;if(l&&Array.isArray(l)&&l.length===3&&(l={token:l[2],open:l[0],close:l[1]}),l.open===l.close)throw L.createError(u,"open and close brackets in a 'brackets' attribute must be different: "+l.open+` hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof l.open=="string"&&typeof l.token=="string"&&typeof l.close=="string")d.push({token:l.token+u.tokenPostfix,open:L.fixCase(u,l.open),close:L.fixCase(u,l.close)});else throw L.createError(u,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return u.brackets=d,u.noThrow=!0,u}e.compile=n}),define(ie[561],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(ie[562],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/findInput",e)}),define(ie[563],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(ie[564],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(ie[565],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/hover/hoverWidget",e)}),define(ie[566],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(ie[567],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(ie[568],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(ie[569],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(ie[570],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(ie[571],ne([3,4]),function(Q,e){return Q.create("vs/base/browser/ui/tree/abstractTree",e)}),define(ie[572],ne([3,4]),function(Q,e){return Q.create("vs/base/common/actions",e)}),define(ie[41],ne([1,0,6,2,572]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class E extends k.Disposable{constructor(i,n="",t="",a=!0,u){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=i,this._label=n,this._cssClass=t,this._enabled=a,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(i){this._setLabel(i)}_setLabel(i){this._label!==i&&(this._label=i,this._onDidChange.fire({label:i}))}get tooltip(){return this._tooltip||""}set tooltip(i){this._setTooltip(i)}_setTooltip(i){this._tooltip!==i&&(this._tooltip=i,this._onDidChange.fire({tooltip:i}))}get class(){return this._cssClass}set class(i){this._setClass(i)}_setClass(i){this._cssClass!==i&&(this._cssClass=i,this._onDidChange.fire({class:i}))}get enabled(){return this._enabled}set enabled(i){this._setEnabled(i)}_setEnabled(i){this._enabled!==i&&(this._enabled=i,this._onDidChange.fire({enabled:i}))}get checked(){return this._checked}set checked(i){this._setChecked(i)}_setChecked(i){this._checked!==i&&(this._checked=i,this._onDidChange.fire({checked:i}))}async run(i,n){this._actionCallback&&await this._actionCallback(i)}}e.Action=E;class _ extends k.Disposable{constructor(){super(...arguments),this._onWillRun=this._register(new L.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new L.Emitter),this.onDidRun=this._onDidRun.event}async run(i,n){if(!i.enabled)return;this._onWillRun.fire({action:i});let t;try{await this.runAction(i,n)}catch(a){t=a}this._onDidRun.fire({action:i,error:t})}async runAction(i,n){await i.run(n)}}e.ActionRunner=_;class p{constructor(){this.id=p.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...i){let n=[];for(const t of i)t.length&&(n.length?n=[...n,new p,...t]:n=t);return n}async run(){}}e.Separator=p,p.ID="vs.actions.separator";class S{get actions(){return this._actions}constructor(i,n,t,a){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=i,this.label=n,this.class=a,this._actions=t}async run(){}}e.SubmenuAction=S;class v extends E{constructor(){super(v.ID,y.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=v,v.ID="vs.actions.empty";function b(o){var i,n;return{id:o.id,label:o.label,class:o.class,enabled:(i=o.enabled)!==null&&i!==void 0?i:!0,checked:(n=o.checked)!==null&&n!==void 0?n:!1,run:async(...t)=>o.run(...t),tooltip:o.label}}e.toAction=b}),define(ie[573],ne([1,0,41]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionRunnerWithContext=void 0;class k extends L.ActionRunner{constructor(E){super(),this._getContext=E}runAction(E,_){return super.runAction(E,this._getContext())}}e.ActionRunnerWithContext=k}),define(ie[574],ne([3,4]),function(Q,e){return Q.create("vs/base/common/errorMessage",e)}),define(ie[575],ne([1,0,13,20,574]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function E(v,b){return b&&(v.stack||v.stacktrace)?y.localize(0,null,p(v),_(v.stack)||_(v.stacktrace)):p(v)}function _(v){return Array.isArray(v)?v.join(` `):v}function p(v){return v.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${v.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof v.code=="string"&&typeof v.errno=="number"&&typeof v.syscall=="string"?y.localize(1,null,v.message):v.message||y.localize(2,null)}function S(v=null,b=!1){if(!v)return y.localize(3,null);if(Array.isArray(v)){const o=L.coalesce(v),i=S(o[0],b);return o.length>1?y.localize(4,null,i,o.length):i}if(k.isString(v))return v;if(v.detail){const o=v.detail;if(o.error)return E(o.error,b);if(o.exception)return E(o.exception,b)}return v.stack?E(v,b):v.message?v.message:y.localize(5,null)}e.toErrorMessage=S}),define(ie[576],ne([3,4]),function(Q,e){return Q.create("vs/base/common/keybindingLabels",e)}),define(ie[218],ne([1,0,576]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class k{constructor(_,p,S=p){this.modifierLabels=[null],this.modifierLabels[2]=_,this.modifierLabels[1]=p,this.modifierLabels[3]=S}toLabel(_,p,S){if(p.length===0)return null;const v=[];for(let b=0,o=p.length;b=0,E=c.indexOf("Macintosh")>=0,o=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,_=c.indexOf("Linux")>=0,n=c?.indexOf("Mobi")>=0,v=!0,t=L.getConfiguredDefaultLocale(L.localize(0,null))||e.LANGUAGE_DEFAULT,a=t,u=navigator.language;else if(typeof r=="object"){y=r.platform==="win32",E=r.platform==="darwin",_=r.platform==="linux",p=_&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,b=l,i=!!r.env.CI||!!r.env.BUILD_ARTIFACTSTAGINGDIRECTORY,t=e.LANGUAGE_DEFAULT,a=e.LANGUAGE_DEFAULT;const w=r.env.VSCODE_NLS_CONFIG;if(w)try{const D=JSON.parse(w),I=D.availableLanguages["*"];t=D.locale,u=D.osLocale,a=I||e.LANGUAGE_DEFAULT,f=D._translationsConfigFile}catch{}S=!0}else console.error("Unable to resolve platform.");let g=0;E?g=1:y?g=3:_&&(g=2),e.isWindows=y,e.isMacintosh=E,e.isLinux=_,e.isNative=S,e.isWeb=v,e.isWebWorker=v&&typeof d.importScripts=="function",e.webWorkerOrigin=e.isWebWorker?d.origin:void 0,e.isIOS=o,e.isMobile=n,e.userAgent=c,e.language=a,e.setTimeout0IsFaster=typeof d.postMessage=="function"&&!d.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const w=[];d.addEventListener("message",I=>{if(I.data&&I.data.vscodeScheduleAsyncWork)for(let M=0,A=w.length;M{const M=++D;w.push({id:M,callback:I}),d.postMessage({vscodeScheduleAsyncWork:M},"*")}}return w=>setTimeout(w)})(),e.OS=E||o?2:y?1:3;let h=!0,m=!1;function C(){if(!m){m=!0;const w=new Uint8Array(2);w[0]=1,w[1]=2,h=new Uint16Array(w.buffer)[0]===(2<<8)+1}return h}e.isLittleEndian=C,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(ie[219],ne([1,0,54,48,17]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:y.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:y.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>y.isNative||L.isStandalone()?0:navigator.keyboard||L.isSafari?1:2)(),touch:"ontouchstart"in k.mainWindow||navigator.maxTouchPoints>0,pointerEvents:k.mainWindow.PointerEvent&&("ontouchstart"in k.mainWindow||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(ie[50],ne([1,0,54,65,121,17]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function _(i){if(i.charCode){const t=String.fromCharCode(i.charCode).toUpperCase();return k.KeyCodeUtils.fromString(t)}const n=i.keyCode;if(n===3)return 7;if(L.isFirefox)switch(n){case 59:return 85;case 60:if(E.isLinux)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(E.isMacintosh)return 57;break}else if(L.isWebKit){if(E.isMacintosh&&n===93)return 57;if(!E.isMacintosh&&n===92)return 57}return k.EVENT_KEY_CODE_MAP[n]||0}const p=E.isMacintosh?256:2048,S=512,v=1024,b=E.isMacintosh?2048:256;class o{constructor(n){this._standardKeyboardEventBrand=!0;const t=n;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=_(t),this.code=t.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._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(n){return this._asKeybinding===n}_computeKeybinding(){let n=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode);let t=0;return this.ctrlKey&&(t|=p),this.altKey&&(t|=S),this.shiftKey&&(t|=v),this.metaKey&&(t|=b),t|=n,t}_computeKeyCodeChord(){let n=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode),new y.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,n)}}e.StandardKeyboardEvent=o}),define(ie[67],ne([1,0,54,389,17]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class E{constructor(S,v){this.timestamp=Date.now(),this.browserEvent=v,this.leftButton=v.button===0,this.middleButton=v.button===1,this.rightButton=v.button===2,this.buttons=v.buttons,this.target=v.target,this.detail=v.detail||1,v.type==="dblclick"&&(this.detail=2),this.ctrlKey=v.ctrlKey,this.shiftKey=v.shiftKey,this.altKey=v.altKey,this.metaKey=v.metaKey,typeof v.pageX=="number"?(this.posx=v.pageX,this.posy=v.pageY):(this.posx=v.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=v.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const b=k.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(S,v.view);this.posx-=b.left,this.posy-=b.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=E;class _{constructor(S,v=0,b=0){if(this.browserEvent=S||null,this.target=S?S.target||S.targetNode||S.srcElement:null,this.deltaY=b,this.deltaX=v,S){const o=S,i=S;if(typeof o.wheelDeltaY<"u")this.deltaY=o.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(S.type==="wheel"){const n=S;n.deltaMode===n.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaY=-S.deltaY/3:this.deltaY=-S.deltaY:this.deltaY=-S.deltaY/40}if(typeof o.wheelDeltaX<"u")L.isSafari&&y.isWindows?this.deltaX=-(o.wheelDeltaX/120):this.deltaX=o.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-S.detail/3;else if(S.type==="wheel"){const n=S;n.deltaMode===n.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaX=-S.deltaX/3:this.deltaX=-S.deltaX:this.deltaX=-S.deltaX/40}this.deltaY===0&&this.deltaX===0&&S.wheelDelta&&(this.deltaY=S.wheelDelta/120)}}preventDefault(){var S;(S=this.browserEvent)===null||S===void 0||S.preventDefault()}stopPropagation(){var S;(S=this.browserEvent)===null||S===void 0||S.stopPropagation()}}e.StandardWheelEvent=_}),define(ie[14],ne([1,0,19,9,6,2,17,268]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.GlobalIdleValue=e.AbstractIdleValue=e._runWhenIdle=e.runWhenGlobalIdle=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.first=e.disposableTimeout=e.timeout=e.ThrottledDelayer=e.Delayer=e.Throttler=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function S(I){return!!I&&typeof I.then=="function"}e.isThenable=S;function v(I){const M=new L.CancellationTokenSource,A=I(M.token),O=new Promise((T,N)=>{const P=M.token.onCancellationRequested(()=>{P.dispose(),M.dispose(),N(new k.CancellationError)});Promise.resolve(A).then(x=>{P.dispose(),M.dispose(),T(x)},x=>{P.dispose(),M.dispose(),N(x)})});return new class{cancel(){M.cancel()}then(T,N){return O.then(T,N)}catch(T){return this.then(void 0,T)}finally(T){return O.finally(T)}}}e.createCancelablePromise=v;function b(I,M,A){return new Promise((O,T)=>{const N=M.onCancellationRequested(()=>{N.dispose(),O(A)});I.then(O,T).finally(()=>N.dispose())})}e.raceCancellation=b;class o{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(M){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=M,!this.queuedPromise){const A=()=>{if(this.queuedPromise=null,this.isDisposed)return;const O=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,O};this.queuedPromise=new Promise(O=>{this.activePromise.then(A,A).then(O)})}return new Promise((A,O)=>{this.queuedPromise.then(A,O)})}return this.activePromise=M(),new Promise((A,O)=>{this.activePromise.then(T=>{this.activePromise=null,A(T)},T=>{this.activePromise=null,O(T)})})}dispose(){this.isDisposed=!0}}e.Throttler=o;const i=(I,M)=>{let A=!0;const O=setTimeout(()=>{A=!1,M()},I);return{isTriggered:()=>A,dispose:()=>{clearTimeout(O),A=!1}}},n=I=>{let M=!0;return queueMicrotask(()=>{M&&(M=!1,I())}),{isTriggered:()=>M,dispose:()=>{M=!1}}};class t{constructor(M){this.defaultDelay=M,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(M,A=this.defaultDelay){this.task=M,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((T,N)=>{this.doResolve=T,this.doReject=N}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const T=this.task;return this.task=null,T()}}));const O=()=>{var T;this.deferred=null,(T=this.doResolve)===null||T===void 0||T.call(this,null)};return this.deferred=A===p.MicrotaskDelay?n(O):i(A,O),this.completionPromise}isTriggered(){var M;return!!(!((M=this.deferred)===null||M===void 0)&&M.isTriggered())}cancel(){var M;this.cancelTimeout(),this.completionPromise&&((M=this.doReject)===null||M===void 0||M.call(this,new k.CancellationError),this.completionPromise=null)}cancelTimeout(){var M;(M=this.deferred)===null||M===void 0||M.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=t;class a{constructor(M){this.delayer=new t(M),this.throttler=new o}trigger(M,A){return this.delayer.trigger(()=>this.throttler.queue(M),A)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=a;function u(I,M){return M?new Promise((A,O)=>{const T=setTimeout(()=>{N.dispose(),A()},I),N=M.onCancellationRequested(()=>{clearTimeout(T),N.dispose(),O(new k.CancellationError)})}):v(A=>u(I,A))}e.timeout=u;function f(I,M=0,A){const O=setTimeout(()=>{I(),A&&T.dispose()},M),T=(0,E.toDisposable)(()=>{clearTimeout(O),A?.deleteAndLeak(T)});return A?.add(T),T}e.disposableTimeout=f;function c(I,M=O=>!!O,A=null){let O=0;const T=I.length,N=()=>{if(O>=T)return Promise.resolve(A);const P=I[O++];return Promise.resolve(P()).then(R=>M(R)?Promise.resolve(R):N())};return N()}e.first=c;class d{constructor(M,A){this._token=-1,typeof M=="function"&&typeof A=="number"&&this.setIfNotSet(M,A)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(M,A){this.cancel(),this._token=setTimeout(()=>{this._token=-1,M()},A)}setIfNotSet(M,A){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,M()},A))}}e.TimeoutTimer=d;class r{constructor(){this.disposable=void 0}cancel(){var M;(M=this.disposable)===null||M===void 0||M.dispose(),this.disposable=void 0}cancelAndSet(M,A,O=globalThis){this.cancel();const T=O.setInterval(()=>{M()},A);this.disposable=(0,E.toDisposable)(()=>{O.clearInterval(T),this.disposable=void 0})}dispose(){this.cancel()}}e.IntervalTimer=r;class l{constructor(M,A){this.timeoutToken=-1,this.runner=M,this.timeout=A,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(M=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,M)}get delay(){return this.timeout}set delay(M){this.timeout=M}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var M;(M=this.runner)===null||M===void 0||M.call(this)}}e.RunOnceScheduler=l,function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?e._runWhenIdle=(I,M)=>{(0,_.setTimeout0)(()=>{if(A)return;const O=Date.now()+15;M(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,O-Date.now())}}))});let A=!1;return{dispose(){A||(A=!0)}}}:e._runWhenIdle=(I,M,A)=>{const O=I.requestIdleCallback(M,typeof A=="number"?{timeout:A}:void 0);let T=!1;return{dispose(){T||(T=!0,I.cancelIdleCallback(O))}}},e.runWhenGlobalIdle=I=>(0,e._runWhenIdle)(globalThis,I)}();class s{constructor(M,A){this._didRun=!1,this._executor=()=>{try{this._value=A()}catch(O){this._error=O}finally{this._didRun=!0}},this._handle=(0,e._runWhenIdle)(M,()=>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.AbstractIdleValue=s;class g extends s{constructor(M){super(globalThis,M)}}e.GlobalIdleValue=g;class h{get isRejected(){var M;return((M=this.outcome)===null||M===void 0?void 0:M.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((M,A)=>{this.completeCallback=M,this.errorCallback=A})}complete(M){return new Promise(A=>{this.completeCallback(M),this.outcome={outcome:0,value:M},A()})}error(M){return new Promise(A=>{this.errorCallback(M),this.outcome={outcome:1,value:M},A()})}cancel(){return this.error(new k.CancellationError)}}e.DeferredPromise=h;var m;(function(I){async function M(O){let T;const N=await Promise.all(O.map(P=>P.then(x=>x,x=>{T||(T=x)})));if(typeof T<"u")throw T;return N}I.settled=M;function A(O){return new Promise(async(T,N)=>{try{await O(T,N)}catch(P){N(P)}})}I.withAsyncBody=A})(m||(e.Promises=m={}));class C{static fromArray(M){return new C(A=>{A.emitMany(M)})}static fromPromise(M){return new C(async A=>{A.emitMany(await M)})}static fromPromises(M){return new C(async A=>{await Promise.all(M.map(async O=>A.emitOne(await O)))})}static merge(M){return new C(async A=>{await Promise.all(M.map(async O=>{for await(const T of O)A.emitOne(T)}))})}constructor(M){this._state=0,this._results=[],this._error=null,this._onStateChanged=new y.Emitter,queueMicrotask(async()=>{const A={emitOne:O=>this.emitOne(O),emitMany:O=>this.emitMany(O),reject:O=>this.reject(O)};try{await Promise.resolve(M(A)),this.resolve()}catch(O){this.reject(O)}finally{A.emitOne=void 0,A.emitMany=void 0,A.reject=void 0}})}[Symbol.asyncIterator](){let M=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(M{for await(const T of M)O.emitOne(A(T))})}map(M){return C.map(this,M)}static filter(M,A){return new C(async O=>{for await(const T of M)A(T)&&O.emitOne(T)})}filter(M){return C.filter(this,M)}static coalesce(M){return C.filter(M,A=>!!A)}coalesce(){return C.coalesce(this)}static async toPromise(M){const A=[];for await(const O of M)A.push(O);return A}toPromise(){return C.toPromise(this)}emitOne(M){this._state===0&&(this._results.push(M),this._onStateChanged.fire())}emitMany(M){this._state===0&&(this._results=this._results.concat(M),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(M){this._state===0&&(this._state=2,this._error=M,this._onStateChanged.fire())}}e.AsyncIterableObject=C,C.EMPTY=C.fromArray([]);class w extends C{constructor(M,A){super(A),this._source=M}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=w;function D(I){const M=new L.CancellationTokenSource,A=I(M.token);return new w(M,async O=>{const T=M.token.onCancellationRequested(()=>{T.dispose(),M.dispose(),O.reject(new k.CancellationError)});try{for await(const N of A){if(M.token.isCancellationRequested)return;O.emitOne(N)}T.dispose(),M.dispose()}catch(N){T.dispose(),M.dispose(),O.reject(N)}})}e.createCancelableAsyncIterable=D}),define(ie[578],ne([1,0,14,2]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class y extends k.Disposable{constructor(_,p,S){super(),this._visibility=_,this._visibleClassName=p,this._invisibleClassName=S,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new L.TimeoutTimer)}setVisibility(_){this._visibility!==_&&(this._visibility=_,this._updateShouldBeVisible())}setShouldBeVisible(_){this._rawShouldBeVisible=_,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const _=this._applyVisibilitySetting();this._shouldBeVisible!==_&&(this._shouldBeVisible=_,this.ensureVisibility())}setIsNeeded(_){this._isNeeded!==_&&(this._isNeeded=_,this.ensureVisibility())}setDomNode(_){this._domNode=_,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(()=>{var _;(_=this._domNode)===null||_===void 0||_.setClassName(this._visibleClassName)},0))}_hide(_){var p;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(p=this._domNode)===null||p===void 0||p.setClassName(this._invisibleClassName+(_?" fade":"")))}}e.ScrollbarVisibilityController=y}),define(ie[220],ne([1,0,141,13,14,268,171,6,49]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function v(n){return typeof n=="object"&&"visibility"in n&&"data"in n}e.isFilterResult=v;function b(n){switch(n){case!0:return 1;case!1:return 0;default:return n}}e.getVisibleState=b;function o(n){return typeof n.collapsible=="boolean"}class i{constructor(t,a,u,f={}){this.user=t,this.list=a,this.rootRef=[],this.eventBufferer=new p.EventBufferer,this._onDidChangeCollapseState=new p.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new p.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new p.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new y.Delayer(E.MicrotaskDelay),this.collapseByDefault=typeof f.collapseByDefault>"u"?!1:f.collapseByDefault,this.filter=f.filter,this.autoExpandSingleChildren=typeof f.autoExpandSingleChildren>"u"?!1:f.autoExpandSingleChildren,this.root={parent:void 0,element:u,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(t,a,u=S.Iterable.empty(),f={}){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");f.diffIdentityProvider?this.spliceSmart(f.diffIdentityProvider,t,a,u,f):this.spliceSimple(t,a,u,f)}spliceSmart(t,a,u,f,c,d){var r;f===void 0&&(f=S.Iterable.empty()),d===void 0&&(d=(r=c.diffDepth)!==null&&r!==void 0?r:0);const{parentNode:l}=this.getParentNodeWithListIndex(a);if(!l.lastDiffIds)return this.spliceSimple(a,u,f,c);const s=[...f],g=a[a.length-1],h=new _.LcsDiff({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,g),...s,...l.children.slice(g+u)].map(I=>t.getId(I.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(a,u,s,c);const m=a.slice(0,-1),C=(I,M,A)=>{if(d>0)for(let O=0;OA.originalStart-M.originalStart))C(w,D,w-(I.originalStart+I.originalLength)),w=I.originalStart,D=I.modifiedStart-g,this.spliceSimple([...m,w],I.originalLength,S.Iterable.slice(s,D,D+I.modifiedLength),c);C(w,D,w)}spliceSimple(t,a,u=S.Iterable.empty(),{onDidCreateNode:f,onDidDeleteNode:c,diffIdentityProvider:d}){const{parentNode:r,listIndex:l,revealed:s,visible:g}=this.getParentNodeWithListIndex(t),h=[],m=S.Iterable.map(u,x=>this.createTreeNode(x,r,r.visible?1:0,s,h,f)),C=t[t.length-1],w=r.children.length>0;let D=0;for(let x=C;x>=0&&xd.getId(x.element).toString())):r.lastDiffIds=r.children.map(x=>d.getId(x.element).toString()):r.lastDiffIds=void 0;let T=0;for(const x of O)x.visible&&T++;if(T!==0)for(let x=C+I.length;xR+(B.visible?B.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(r,A-x),this.list.splice(l,x,h)}if(O.length>0&&c){const x=R=>{c(R),R.children.forEach(x)};O.forEach(x)}this._onDidSplice.fire({insertedNodes:I,deletedNodes:O});const N=r.children.length>0;w!==N&&this.setCollapsible(t.slice(0,-1),N);let P=r;for(;P;){if(P.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}P=P.parent}}rerender(t){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");const{node:a,listIndex:u,revealed:f}=this.getTreeNodeWithListIndex(t);a.visible&&f&&this.list.splice(u,1,[a])}has(t){return this.hasTreeNode(t)}getListIndex(t){const{listIndex:a,visible:u,revealed:f}=this.getTreeNodeWithListIndex(t);return u&&f?a:-1}getListRenderCount(t){return this.getTreeNode(t).renderNodeCount}isCollapsible(t){return this.getTreeNode(t).collapsible}setCollapsible(t,a){const u=this.getTreeNode(t);typeof a>"u"&&(a=!u.collapsible);const f={collapsible:a};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,f))}isCollapsed(t){return this.getTreeNode(t).collapsed}setCollapsed(t,a,u){const f=this.getTreeNode(t);typeof a>"u"&&(a=!f.collapsed);const c={collapsed:a,recursive:u||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,c))}_setCollapseState(t,a){const{node:u,listIndex:f,revealed:c}=this.getTreeNodeWithListIndex(t),d=this._setListNodeCollapseState(u,f,c,a);if(u!==this.root&&this.autoExpandSingleChildren&&d&&!o(a)&&u.collapsible&&!u.collapsed&&!a.recursive){let r=-1;for(let l=0;l-1){r=-1;break}else r=l;r>-1&&this._setCollapseState([...t,r],a)}return d}_setListNodeCollapseState(t,a,u,f){const c=this._setNodeCollapseState(t,f,!1);if(!u||!t.visible||!c)return c;const d=t.renderNodeCount,r=this.updateNodeAfterCollapseChange(t),l=d-(a===-1?0:1);return this.list.splice(a+1,l,r.slice(1)),c}_setNodeCollapseState(t,a,u){let f;if(t===this.root?f=!1:(o(a)?(f=t.collapsible!==a.collapsible,t.collapsible=a.collapsible):t.collapsible?(f=t.collapsed!==a.collapsed,t.collapsed=a.collapsed):f=!1,f&&this._onDidChangeCollapseState.fire({node:t,deep:u})),!o(a)&&a.recursive)for(const c of t.children)f=this._setNodeCollapseState(c,a,!0)||f;return f}expandTo(t){this.eventBufferer.bufferEvents(()=>{let a=this.getTreeNode(t);for(;a.parent;)a=a.parent,t=t.slice(0,t.length-1),a.collapsed&&this._setCollapseState(t,{collapsed:!1,recursive:!1})})}refilter(){const t=this.root.renderNodeCount,a=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,t,a),this.refilterDelayer.cancel()}createTreeNode(t,a,u,f,c,d){const r={parent:a,element:t.element,children:[],depth:a.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof t.collapsible=="boolean"?t.collapsible:typeof t.collapsed<"u",collapsed:typeof t.collapsed>"u"?this.collapseByDefault:t.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(r,u);r.visibility=l,f&&c.push(r);const s=t.children||S.Iterable.empty(),g=f&&l!==0&&!r.collapsed;let h=0,m=1;for(const C of s){const w=this.createTreeNode(C,r,l,g,c,d);r.children.push(w),m+=w.renderNodeCount,w.visible&&(w.visibleChildIndex=h++)}return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=l===2?h>0:l===1,r.visible?r.collapsed||(r.renderNodeCount=m):(r.renderNodeCount=0,f&&c.pop()),d?.(r),r}updateNodeAfterCollapseChange(t){const a=t.renderNodeCount,u=[];return this._updateNodeAfterCollapseChange(t,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-a),u}_updateNodeAfterCollapseChange(t,a){if(t.visible===!1)return 0;if(a.push(t),t.renderNodeCount=1,!t.collapsed)for(const u of t.children)t.renderNodeCount+=this._updateNodeAfterCollapseChange(u,a);return this._onDidChangeRenderNodeCount.fire(t),t.renderNodeCount}updateNodeAfterFilterChange(t){const a=t.renderNodeCount,u=[];return this._updateNodeAfterFilterChange(t,t.visible?1:0,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-a),u}_updateNodeAfterFilterChange(t,a,u,f=!0){let c;if(t!==this.root){if(c=this._filterNode(t,a),c===0)return t.visible=!1,t.renderNodeCount=0,!1;f&&u.push(t)}const d=u.length;t.renderNodeCount=t===this.root?0:1;let r=!1;if(!t.collapsed||c!==0){let l=0;for(const s of t.children)r=this._updateNodeAfterFilterChange(s,c,u,f&&!t.collapsed)||r,s.visible&&(s.visibleChildIndex=l++);t.visibleChildrenCount=l}else t.visibleChildrenCount=0;return t!==this.root&&(t.visible=c===2?r:c===1,t.visibility=c),t.visible?t.collapsed||(t.renderNodeCount+=u.length-d):(t.renderNodeCount=0,f&&u.pop()),this._onDidChangeRenderNodeCount.fire(t),t.visible}_updateAncestorsRenderNodeCount(t,a){if(a!==0)for(;t;)t.renderNodeCount+=a,this._onDidChangeRenderNodeCount.fire(t),t=t.parent}_filterNode(t,a){const u=this.filter?this.filter.filter(t.element,a):1;return typeof u=="boolean"?(t.filterData=void 0,u?1:0):v(u)?(t.filterData=u.data,b(u.visibility)):(t.filterData=void 0,b(u))}hasTreeNode(t,a=this.root){if(!t||t.length===0)return!0;const[u,...f]=t;return u<0||u>a.children.length?!1:this.hasTreeNode(f,a.children[u])}getTreeNode(t,a=this.root){if(!t||t.length===0)return a;const[u,...f]=t;if(u<0||u>a.children.length)throw new L.TreeError(this.user,"Invalid tree location");return this.getTreeNode(f,a.children[u])}getTreeNodeWithListIndex(t){if(t.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:a,listIndex:u,revealed:f,visible:c}=this.getParentNodeWithListIndex(t),d=t[t.length-1];if(d<0||d>a.children.length)throw new L.TreeError(this.user,"Invalid tree location");const r=a.children[d];return{node:r,listIndex:u,revealed:f,visible:c&&r.visible}}getParentNodeWithListIndex(t,a=this.root,u=0,f=!0,c=!0){const[d,...r]=t;if(d<0||d>a.children.length)throw new L.TreeError(this.user,"Invalid tree location");for(let l=0;l{var a;if(t.element===null)return;const u=t;if(b.add(u.element),this.nodes.set(u.element,u),this.identityProvider){const f=this.identityProvider.getId(u.element).toString();o.add(f),this.nodesByIdentity.set(f,u)}(a=v.onDidCreateNode)===null||a===void 0||a.call(v,u)},n=t=>{var a;if(t.element===null)return;const u=t;if(b.has(u.element)||this.nodes.delete(u.element),this.identityProvider){const f=this.identityProvider.getId(u.element).toString();o.has(f)||this.nodesByIdentity.delete(f)}(a=v.onDidDeleteNode)===null||a===void 0||a.call(v,u)};this.model.splice([...p,0],Number.MAX_VALUE,S,{...v,onDidCreateNode:i,onDidDeleteNode:n})}preserveCollapseState(p=y.Iterable.empty()){return this.sorter&&(p=[...p].sort(this.sorter.compare.bind(this.sorter))),y.Iterable.map(p,S=>{let v=this.nodes.get(S.element);if(!v&&this.identityProvider){const i=this.identityProvider.getId(S.element).toString();v=this.nodesByIdentity.get(i)}if(!v){let i;return typeof S.collapsed>"u"?i=void 0:S.collapsed===k.ObjectTreeElementCollapseState.Collapsed||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed?i=!0:S.collapsed===k.ObjectTreeElementCollapseState.Expanded||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?i=!1:i=!!S.collapsed,{...S,children:this.preserveCollapseState(S.children),collapsed:i}}const b=typeof S.collapsible=="boolean"?S.collapsible:v.collapsible;let o;return typeof S.collapsed>"u"||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed||S.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?o=v.collapsed:S.collapsed===k.ObjectTreeElementCollapseState.Collapsed?o=!0:S.collapsed===k.ObjectTreeElementCollapseState.Expanded?o=!1:o=!!S.collapsed,{...S,collapsible:b,collapsed:o,children:this.preserveCollapseState(S.children)}})}rerender(p){const S=this.getElementLocation(p);this.model.rerender(S)}getFirstElementChild(p=null){const S=this.getElementLocation(p);return this.model.getFirstElementChild(S)}has(p){return this.nodes.has(p)}getListIndex(p){const S=this.getElementLocation(p);return this.model.getListIndex(S)}getListRenderCount(p){const S=this.getElementLocation(p);return this.model.getListRenderCount(S)}isCollapsible(p){const S=this.getElementLocation(p);return this.model.isCollapsible(S)}setCollapsible(p,S){const v=this.getElementLocation(p);return this.model.setCollapsible(v,S)}isCollapsed(p){const S=this.getElementLocation(p);return this.model.isCollapsed(S)}setCollapsed(p,S,v){const b=this.getElementLocation(p);return this.model.setCollapsed(b,S,v)}expandTo(p){const S=this.getElementLocation(p);this.model.expandTo(S)}refilter(){this.model.refilter()}getNode(p=null){if(p===null)return this.model.getNode(this.model.rootRef);const S=this.nodes.get(p);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${p}`);return S}getNodeLocation(p){return p.element}getParentNodeLocation(p){if(p===null)throw new k.TreeError(this.user,"Invalid getParentNodeLocation call");const S=this.nodes.get(p);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${p}`);const v=this.model.getNodeLocation(S),b=this.model.getParentNodeLocation(v);return this.model.getNode(b).element}getElementLocation(p){if(p===null)return[];const S=this.nodes.get(p);if(!S)throw new k.TreeError(this.user,`Tree element not found: ${p}`);return this.model.getNodeLocation(S)}}e.ObjectTreeModel=E}),define(ie[579],ne([1,0,221,141,13,6,49]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function p(d){const r=[d.element],l=d.incompressible||!1;return{element:{elements:r,incompressible:l},children:_.Iterable.map(_.Iterable.from(d.children),p),collapsible:d.collapsible,collapsed:d.collapsed}}function S(d){const r=[d.element],l=d.incompressible||!1;let s,g;for(;[g,s]=_.Iterable.consume(_.Iterable.from(d.children),2),!(g.length!==1||g[0].incompressible);)d=g[0],r.push(d.element);return{element:{elements:r,incompressible:l},children:_.Iterable.map(_.Iterable.concat(g,s),S),collapsible:d.collapsible,collapsed:d.collapsed}}e.compress=S;function v(d,r=0){let l;return rv(s,0)),r===0&&d.element.incompressible?{element:d.element.elements[r],children:l,incompressible:!0,collapsible:d.collapsible,collapsed:d.collapsed}:{element:d.element.elements[r],children:l,collapsible:d.collapsible,collapsed:d.collapsed}}function b(d){return v(d,0)}e.decompress=b;function o(d,r,l){return d.element===r?{...d,children:l}:{...d,children:_.Iterable.map(_.Iterable.from(d.children),s=>o(s,r,l))}}const i=d=>({getId(r){return r.elements.map(l=>d.getId(l).toString()).join("\0")}});class n{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(r,l,s={}){this.user=r,this.rootRef=null,this.nodes=new Map,this.model=new L.ObjectTreeModel(r,l,s),this.enabled=typeof s.compressionEnabled>"u"?!0:s.compressionEnabled,this.identityProvider=s.identityProvider}setChildren(r,l=_.Iterable.empty(),s){const g=s.diffIdentityProvider&&i(s.diffIdentityProvider);if(r===null){const T=_.Iterable.map(l,this.enabled?S:p);this._setChildren(null,T,{diffIdentityProvider:g,diffDepth:1/0});return}const h=this.nodes.get(r);if(!h)throw new k.TreeError(this.user,"Unknown compressed tree node");const m=this.model.getNode(h),C=this.model.getParentNodeLocation(h),w=this.model.getNode(C),D=b(m),I=o(D,r,l),M=(this.enabled?S:p)(I),A=s.diffIdentityProvider?(T,N)=>s.diffIdentityProvider.getId(T)===s.diffIdentityProvider.getId(N):void 0;if((0,y.equals)(M.element.elements,m.element.elements,A)){this._setChildren(h,M.children||_.Iterable.empty(),{diffIdentityProvider:g,diffDepth:1});return}const O=w.children.map(T=>T===m?M:T);this._setChildren(w.element,O,{diffIdentityProvider:g,diffDepth:m.depth-w.depth})}setCompressionEnabled(r){if(r===this.enabled)return;this.enabled=r;const s=this.model.getNode().children,g=_.Iterable.map(s,b),h=_.Iterable.map(g,r?S:p);this._setChildren(null,h,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(r,l,s){const g=new Set,h=C=>{for(const w of C.element.elements)g.add(w),this.nodes.set(w,C.element)},m=C=>{for(const w of C.element.elements)g.has(w)||this.nodes.delete(w)};this.model.setChildren(r,l,{...s,onDidCreateNode:h,onDidDeleteNode:m})}has(r){return this.nodes.has(r)}getListIndex(r){const l=this.getCompressedNode(r);return this.model.getListIndex(l)}getListRenderCount(r){const l=this.getCompressedNode(r);return this.model.getListRenderCount(l)}getNode(r){if(typeof r>"u")return this.model.getNode();const l=this.getCompressedNode(r);return this.model.getNode(l)}getNodeLocation(r){const l=this.model.getNodeLocation(r);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(r){const l=this.getCompressedNode(r),s=this.model.getParentNodeLocation(l);return s===null?null:s.elements[s.elements.length-1]}getFirstElementChild(r){const l=this.getCompressedNode(r);return this.model.getFirstElementChild(l)}isCollapsible(r){const l=this.getCompressedNode(r);return this.model.isCollapsible(l)}setCollapsible(r,l){const s=this.getCompressedNode(r);return this.model.setCollapsible(s,l)}isCollapsed(r){const l=this.getCompressedNode(r);return this.model.isCollapsed(l)}setCollapsed(r,l,s){const g=this.getCompressedNode(r);return this.model.setCollapsed(g,l,s)}expandTo(r){const l=this.getCompressedNode(r);this.model.expandTo(l)}rerender(r){const l=this.getCompressedNode(r);this.model.rerender(l)}refilter(){this.model.refilter()}getCompressedNode(r){if(r===null)return null;const l=this.nodes.get(r);if(!l)throw new k.TreeError(this.user,`Tree element not found: ${r}`);return l}}e.CompressedObjectTreeModel=n;const t=d=>d[d.length-1];e.DefaultElementMapper=t;class a{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(r=>new a(this.unwrapper,r))}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(r,l){this.unwrapper=r,this.node=l}}function u(d,r){return{splice(l,s,g){r.splice(l,s,g.map(h=>d.map(h)))},updateElementHeight(l,s){r.updateElementHeight(l,s)}}}function f(d,r){return{...r,identityProvider:r.identityProvider&&{getId(l){return r.identityProvider.getId(d(l))}},sorter:r.sorter&&{compare(l,s){return r.sorter.compare(l.elements[0],s.elements[0])}},filter:r.filter&&{filter(l,s){return r.filter.filter(d(l),s)}}}}class c{get onDidSplice(){return E.Event.map(this.model.onDidSplice,({insertedNodes:r,deletedNodes:l})=>({insertedNodes:r.map(s=>this.nodeMapper.map(s)),deletedNodes:l.map(s=>this.nodeMapper.map(s))}))}get onDidChangeCollapseState(){return E.Event.map(this.model.onDidChangeCollapseState,({node:r,deep:l})=>({node:this.nodeMapper.map(r),deep:l}))}get onDidChangeRenderNodeCount(){return E.Event.map(this.model.onDidChangeRenderNodeCount,r=>this.nodeMapper.map(r))}constructor(r,l,s={}){this.rootRef=null,this.elementMapper=s.elementMapper||e.DefaultElementMapper;const g=h=>this.elementMapper(h.elements);this.nodeMapper=new k.WeakMapper(h=>new a(g,h)),this.model=new n(r,u(this.nodeMapper,l),f(g,s))}setChildren(r,l=_.Iterable.empty(),s={}){this.model.setChildren(r,l,s)}setCompressionEnabled(r){this.model.setCompressionEnabled(r)}has(r){return this.model.has(r)}getListIndex(r){return this.model.getListIndex(r)}getListRenderCount(r){return this.model.getListRenderCount(r)}getNode(r){return this.nodeMapper.map(this.model.getNode(r))}getNodeLocation(r){return r.element}getParentNodeLocation(r){return this.model.getParentNodeLocation(r)}getFirstElementChild(r){const l=this.model.getFirstElementChild(r);return l===null||typeof l>"u"?l:this.elementMapper(l.elements)}isCollapsible(r){return this.model.isCollapsible(r)}setCollapsible(r,l){return this.model.setCollapsible(r,l)}isCollapsed(r){return this.model.isCollapsed(r)}setCollapsed(r,l,s){return this.model.setCollapsed(r,l,s)}expandTo(r){return this.model.expandTo(r)}rerender(r){return this.model.rerender(r)}refilter(){return this.model.refilter()}getCompressedTreeNode(r=null){return this.model.getNode(r)}}e.CompressibleObjectTreeModel=c}),define(ie[222],ne([1,0,17]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let k;const y=globalThis.vscode;if(typeof y<"u"&&typeof y.process<"u"){const E=y.process;k={get platform(){return E.platform},get arch(){return E.arch},get env(){return E.env},cwd(){return E.cwd()}}}else typeof process<"u"?k={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:k={get platform(){return L.isWindows?"win32":L.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=k.cwd,e.env=k.env,e.platform=k.platform}),define(ie[580],ne([1,0,222]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerHotReloadHandler=e.isHotReloadEnabled=void 0;function k(){return L.env&&!!L.env.VSCODE_DEV}e.isHotReloadEnabled=k;function y(p){if(k()){const S=E();return S.add(p),{dispose(){S.delete(p)}}}else return{dispose(){}}}e.registerHotReloadHandler=y;function E(){_||(_=new Set);const p=globalThis;return p.$hotReload_applyNewExports||(p.$hotReload_applyNewExports=S=>{for(const v of _){const b=v(S);if(b)return b}}),_}let _;k()&&y(({oldExports:p,newSrc:S})=>{if(S.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return v=>{var b,o;for(const i in v){const n=v[i];if(console.log(`[hot-reload] Patching prototype methods of '${i}'`,{exportedItem:n}),typeof n=="function"&&n.prototype){const t=p[i];if(t){for(const a of Object.getOwnPropertyNames(n.prototype)){const u=Object.getOwnPropertyDescriptor(n.prototype,a),f=Object.getOwnPropertyDescriptor(t.prototype,a);((b=u?.value)===null||b===void 0?void 0:b.toString())!==((o=f?.value)===null||o===void 0?void 0:o.toString())&&console.log(`[hot-reload] Patching prototype method '${i}.${a}'`),Object.defineProperty(t.prototype,a,u)}v[i]=t}}}return!0}})}),define(ie[94],ne([1,0,222]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const k=65,y=97,E=90,_=122,p=46,S=47,v=92,b=58,o=63;class i extends Error{constructor(g,h,m){let C;typeof h=="string"&&h.indexOf("not ")===0?(C="must not be",h=h.replace(/^not /,"")):C="must be";const w=g.indexOf(".")!==-1?"property":"argument";let D=`The "${g}" ${w} ${C} of type ${h}`;D+=`. Received type ${typeof m}`,super(D),this.code="ERR_INVALID_ARG_TYPE"}}function n(s,g){if(s===null||typeof s!="object")throw new i(g,"Object",s)}function t(s,g){if(typeof s!="string")throw new i(g,"string",s)}const a=L.platform==="win32";function u(s){return s===S||s===v}function f(s){return s===S}function c(s){return s>=k&&s<=E||s>=y&&s<=_}function d(s,g,h,m){let C="",w=0,D=-1,I=0,M=0;for(let A=0;A<=s.length;++A){if(A2){const O=C.lastIndexOf(h);O===-1?(C="",w=0):(C=C.slice(0,O),w=C.length-1-C.lastIndexOf(h)),D=A,I=0;continue}else if(C.length!==0){C="",w=0,D=A,I=0;continue}}g&&(C+=C.length>0?`${h}..`:"..",w=2)}else C.length>0?C+=`${h}${s.slice(D+1,A)}`:C=s.slice(D+1,A),w=A-D-1;D=A,I=0}else M===p&&I!==-1?++I:I=-1}return C}function r(s,g){n(g,"pathObject");const h=g.dir||g.root,m=g.base||`${g.name||""}${g.ext||""}`;return h?h===g.root?`${h}${m}`:`${h}${s}${m}`:m}e.win32={resolve(...s){let g="",h="",m=!1;for(let C=s.length-1;C>=-1;C--){let w;if(C>=0){if(w=s[C],t(w,"path"),w.length===0)continue}else g.length===0?w=L.cwd():(w=L.env[`=${g}`]||L.cwd(),(w===void 0||w.slice(0,2).toLowerCase()!==g.toLowerCase()&&w.charCodeAt(2)===v)&&(w=`${g}\\`));const D=w.length;let I=0,M="",A=!1;const O=w.charCodeAt(0);if(D===1)u(O)&&(I=1,A=!0);else if(u(O))if(A=!0,u(w.charCodeAt(1))){let T=2,N=T;for(;T2&&u(w.charCodeAt(2))&&(A=!0,I=3));if(M.length>0)if(g.length>0){if(M.toLowerCase()!==g.toLowerCase())continue}else g=M;if(m){if(g.length>0)break}else if(h=`${w.slice(I)}\\${h}`,m=A,A&&g.length>0)break}return h=d(h,!m,"\\",u),m?`${g}\\${h}`:`${g}${h}`||"."},normalize(s){t(s,"path");const g=s.length;if(g===0)return".";let h=0,m,C=!1;const w=s.charCodeAt(0);if(g===1)return f(w)?"\\":s;if(u(w))if(C=!0,u(s.charCodeAt(1))){let I=2,M=I;for(;I2&&u(s.charCodeAt(2))&&(C=!0,h=3));let D=h0&&u(s.charCodeAt(g-1))&&(D+="\\"),m===void 0?C?`\\${D}`:D:C?`${m}\\${D}`:`${m}${D}`},isAbsolute(s){t(s,"path");const g=s.length;if(g===0)return!1;const h=s.charCodeAt(0);return u(h)||g>2&&c(h)&&s.charCodeAt(1)===b&&u(s.charCodeAt(2))},join(...s){if(s.length===0)return".";let g,h;for(let w=0;w0&&(g===void 0?g=h=D:g+=`\\${D}`)}if(g===void 0)return".";let m=!0,C=0;if(typeof h=="string"&&u(h.charCodeAt(0))){++C;const w=h.length;w>1&&u(h.charCodeAt(1))&&(++C,w>2&&(u(h.charCodeAt(2))?++C:m=!1))}if(m){for(;C=2&&(g=`\\${g.slice(C)}`)}return e.win32.normalize(g)},relative(s,g){if(t(s,"from"),t(g,"to"),s===g)return"";const h=e.win32.resolve(s),m=e.win32.resolve(g);if(h===m||(s=h.toLowerCase(),g=m.toLowerCase(),s===g))return"";let C=0;for(;CC&&s.charCodeAt(w-1)===v;)w--;const D=w-C;let I=0;for(;II&&g.charCodeAt(M-1)===v;)M--;const A=M-I,O=DO){if(g.charCodeAt(I+N)===v)return m.slice(I+N+1);if(N===2)return m.slice(I+N)}D>O&&(s.charCodeAt(C+N)===v?T=N:N===2&&(T=3)),T===-1&&(T=0)}let P="";for(N=C+T+1;N<=w;++N)(N===w||s.charCodeAt(N)===v)&&(P+=P.length===0?"..":"\\..");return I+=T,P.length>0?`${P}${m.slice(I,M)}`:(m.charCodeAt(I)===v&&++I,m.slice(I,M))},toNamespacedPath(s){if(typeof s!="string"||s.length===0)return s;const g=e.win32.resolve(s);if(g.length<=2)return s;if(g.charCodeAt(0)===v){if(g.charCodeAt(1)===v){const h=g.charCodeAt(2);if(h!==o&&h!==p)return`\\\\?\\UNC\\${g.slice(2)}`}}else if(c(g.charCodeAt(0))&&g.charCodeAt(1)===b&&g.charCodeAt(2)===v)return`\\\\?\\${g}`;return s},dirname(s){t(s,"path");const g=s.length;if(g===0)return".";let h=-1,m=0;const C=s.charCodeAt(0);if(g===1)return u(C)?s:".";if(u(C)){if(h=m=1,u(s.charCodeAt(1))){let I=2,M=I;for(;I2&&u(s.charCodeAt(2))?3:2,m=h);let w=-1,D=!0;for(let I=g-1;I>=m;--I)if(u(s.charCodeAt(I))){if(!D){w=I;break}}else D=!1;if(w===-1){if(h===-1)return".";w=h}return s.slice(0,w)},basename(s,g){g!==void 0&&t(g,"ext"),t(s,"path");let h=0,m=-1,C=!0,w;if(s.length>=2&&c(s.charCodeAt(0))&&s.charCodeAt(1)===b&&(h=2),g!==void 0&&g.length>0&&g.length<=s.length){if(g===s)return"";let D=g.length-1,I=-1;for(w=s.length-1;w>=h;--w){const M=s.charCodeAt(w);if(u(M)){if(!C){h=w+1;break}}else I===-1&&(C=!1,I=w+1),D>=0&&(M===g.charCodeAt(D)?--D===-1&&(m=w):(D=-1,m=I))}return h===m?m=I:m===-1&&(m=s.length),s.slice(h,m)}for(w=s.length-1;w>=h;--w)if(u(s.charCodeAt(w))){if(!C){h=w+1;break}}else m===-1&&(C=!1,m=w+1);return m===-1?"":s.slice(h,m)},extname(s){t(s,"path");let g=0,h=-1,m=0,C=-1,w=!0,D=0;s.length>=2&&s.charCodeAt(1)===b&&c(s.charCodeAt(0))&&(g=m=2);for(let I=s.length-1;I>=g;--I){const M=s.charCodeAt(I);if(u(M)){if(!w){m=I+1;break}continue}C===-1&&(w=!1,C=I+1),M===p?h===-1?h=I:D!==1&&(D=1):h!==-1&&(D=-1)}return h===-1||C===-1||D===0||D===1&&h===C-1&&h===m+1?"":s.slice(h,C)},format:r.bind(null,"\\"),parse(s){t(s,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return g;const h=s.length;let m=0,C=s.charCodeAt(0);if(h===1)return u(C)?(g.root=g.dir=s,g):(g.base=g.name=s,g);if(u(C)){if(m=1,u(s.charCodeAt(1))){let T=2,N=T;for(;T0&&(g.root=s.slice(0,m));let w=-1,D=m,I=-1,M=!0,A=s.length-1,O=0;for(;A>=m;--A){if(C=s.charCodeAt(A),u(C)){if(!M){D=A+1;break}continue}I===-1&&(M=!1,I=A+1),C===p?w===-1?w=A:O!==1&&(O=1):w!==-1&&(O=-1)}return I!==-1&&(w===-1||O===0||O===1&&w===I-1&&w===D+1?g.base=g.name=s.slice(D,I):(g.name=s.slice(D,w),g.base=s.slice(D,I),g.ext=s.slice(w,I))),D>0&&D!==m?g.dir=s.slice(0,D-1):g.dir=g.root,g},sep:"\\",delimiter:";",win32:null,posix:null};const l=(()=>{if(a){const s=/\\/g;return()=>{const g=L.cwd().replace(s,"/");return g.slice(g.indexOf("/"))}}return()=>L.cwd()})();e.posix={resolve(...s){let g="",h=!1;for(let m=s.length-1;m>=-1&&!h;m--){const C=m>=0?s[m]:l();t(C,"path"),C.length!==0&&(g=`${C}/${g}`,h=C.charCodeAt(0)===S)}return g=d(g,!h,"/",f),h?`/${g}`:g.length>0?g:"."},normalize(s){if(t(s,"path"),s.length===0)return".";const g=s.charCodeAt(0)===S,h=s.charCodeAt(s.length-1)===S;return s=d(s,!g,"/",f),s.length===0?g?"/":h?"./":".":(h&&(s+="/"),g?`/${s}`:s)},isAbsolute(s){return t(s,"path"),s.length>0&&s.charCodeAt(0)===S},join(...s){if(s.length===0)return".";let g;for(let h=0;h0&&(g===void 0?g=m:g+=`/${m}`)}return g===void 0?".":e.posix.normalize(g)},relative(s,g){if(t(s,"from"),t(g,"to"),s===g||(s=e.posix.resolve(s),g=e.posix.resolve(g),s===g))return"";const h=1,m=s.length,C=m-h,w=1,D=g.length-w,I=CI){if(g.charCodeAt(w+A)===S)return g.slice(w+A+1);if(A===0)return g.slice(w+A)}else C>I&&(s.charCodeAt(h+A)===S?M=A:A===0&&(M=0));let O="";for(A=h+M+1;A<=m;++A)(A===m||s.charCodeAt(A)===S)&&(O+=O.length===0?"..":"/..");return`${O}${g.slice(w+M)}`},toNamespacedPath(s){return s},dirname(s){if(t(s,"path"),s.length===0)return".";const g=s.charCodeAt(0)===S;let h=-1,m=!0;for(let C=s.length-1;C>=1;--C)if(s.charCodeAt(C)===S){if(!m){h=C;break}}else m=!1;return h===-1?g?"/":".":g&&h===1?"//":s.slice(0,h)},basename(s,g){g!==void 0&&t(g,"ext"),t(s,"path");let h=0,m=-1,C=!0,w;if(g!==void 0&&g.length>0&&g.length<=s.length){if(g===s)return"";let D=g.length-1,I=-1;for(w=s.length-1;w>=0;--w){const M=s.charCodeAt(w);if(M===S){if(!C){h=w+1;break}}else I===-1&&(C=!1,I=w+1),D>=0&&(M===g.charCodeAt(D)?--D===-1&&(m=w):(D=-1,m=I))}return h===m?m=I:m===-1&&(m=s.length),s.slice(h,m)}for(w=s.length-1;w>=0;--w)if(s.charCodeAt(w)===S){if(!C){h=w+1;break}}else m===-1&&(C=!1,m=w+1);return m===-1?"":s.slice(h,m)},extname(s){t(s,"path");let g=-1,h=0,m=-1,C=!0,w=0;for(let D=s.length-1;D>=0;--D){const I=s.charCodeAt(D);if(I===S){if(!C){h=D+1;break}continue}m===-1&&(C=!1,m=D+1),I===p?g===-1?g=D:w!==1&&(w=1):g!==-1&&(w=-1)}return g===-1||m===-1||w===0||w===1&&g===m-1&&g===h+1?"":s.slice(g,m)},format:r.bind(null,"/"),parse(s){t(s,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return g;const h=s.charCodeAt(0)===S;let m;h?(g.root="/",m=1):m=0;let C=-1,w=0,D=-1,I=!0,M=s.length-1,A=0;for(;M>=m;--M){const O=s.charCodeAt(M);if(O===S){if(!I){w=M+1;break}continue}D===-1&&(I=!1,D=M+1),O===p?C===-1?C=M:A!==1&&(A=1):C!==-1&&(A=-1)}if(D!==-1){const O=w===0&&h?1:w;C===-1||A===0||A===1&&C===D-1&&C===w+1?g.base=g.name=s.slice(O,D):(g.name=s.slice(O,C),g.base=s.slice(O,D),g.ext=s.slice(C,D))}return w>0?g.dir=s.slice(0,w-1):h&&(g.dir="/"),g},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=a?e.win32.normalize:e.posix.normalize,e.resolve=a?e.win32.resolve:e.posix.resolve,e.relative=a?e.win32.relative:e.posix.relative,e.dirname=a?e.win32.dirname:e.posix.dirname,e.basename=a?e.win32.basename:e.posix.basename,e.extname=a?e.win32.extname:e.posix.extname,e.sep=a?e.win32.sep:e.posix.sep}),define(ie[223],ne([1,0,94,17,12]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function E(i){return i===47||i===92}e.isPathSeparator=E;function _(i){return i.replace(/[\\/]/g,L.posix.sep)}e.toSlashes=_;function p(i){return i.indexOf("/")===-1&&(i=_(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),i}e.toPosixPath=p;function S(i,n=L.posix.sep){if(!i)return"";const t=i.length,a=i.charCodeAt(0);if(E(a)){if(E(i.charCodeAt(1))&&!E(i.charCodeAt(2))){let f=3;const c=f;for(;fi.length)return!1;if(t){if(!(0,y.startsWithIgnoreCase)(i,n))return!1;if(n.length===i.length)return!0;let f=n.length;return n.charAt(n.length-1)===a&&f--,i.charAt(f)===a}return n.charAt(n.length-1)!==a&&(n+=a),i.indexOf(n)===0}e.isEqualOrParent=v;function b(i){return i>=65&&i<=90||i>=97&&i<=122}e.isWindowsDriveLetter=b;function o(i,n=k.isWindows){return n?b(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}e.hasDriveLetter=o}),define(ie[581],ne([1,0,71,94,17,12]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const _=[void 0,[]];function p(c,d,r=0,l=0){const s=d;return s.values&&s.values.length>1?S(c,s.values,r,l):v(c,d,r,l)}e.scoreFuzzy2=p;function S(c,d,r,l){let s=0;const g=[];for(const h of d){const[m,C]=v(c,h,r,l);if(typeof m!="number")return _;s+=m,g.push(...C)}return[s,o(g)]}function v(c,d,r,l){const s=(0,L.fuzzyScore)(d.original,d.originalLowercase,r,c,c.toLowerCase(),l,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return s?[s[0],(0,L.createMatches)(s)]:_}const b=Object.freeze({score:0});function o(c){const d=c.sort((s,g)=>s.start-g.start),r=[];let l;for(const s of d)!l||!i(l,s)?(l=s,r.push(s)):(l.start=Math.min(l.start,s.start),l.end=Math.max(l.end,s.end));return r}function i(c,d){return!(c.end=0,h=n(c);let m;const C=c.split(t);if(C.length>1)for(const w of C){const D=n(w),{pathNormalized:I,normalized:M,normalizedLowercase:A}=u(w);M&&(m||(m=[]),m.push({original:w,originalLowercase:w.toLowerCase(),pathNormalized:I,normalized:M,normalizedLowercase:A,expectContiguousMatch:D}))}return{original:c,originalLowercase:d,pathNormalized:r,normalized:l,normalizedLowercase:s,values:m,containsPathSeparator:g,expectContiguousMatch:h}}e.prepareQuery=a;function u(c){let d;y.isWindows?d=c.replace(/\//g,k.sep):d=c.replace(/\\/g,k.sep);const r=(0,E.stripWildcards)(d).replace(/\s|"/g,"");return{pathNormalized:d,normalized:r,normalizedLowercase:r.toLowerCase()}}function f(c){return Array.isArray(c)?a(c.map(d=>d.original).join(t)):a(c.original)}e.pieceToQuery=f}),define(ie[311],ne([1,0,14,223,53,94,17,12]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=void 0,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const S="[/\\\\]",v="[^/\\\\]",b=/\//g;function o(R,B){switch(R){case 0:return"";case 1:return`${v}*?`;default:return`(?:${S}|${v}+${S}${B?`|${S}${v}+`:""})*?`}}function i(R,B){if(!R)return[];const W=[];let V=!1,U=!1,F="";for(const j of R){switch(j){case B:if(!V&&!U){W.push(F),F="";continue}break;case"{":V=!0;break;case"}":V=!1;break;case"[":U=!0;break;case"]":U=!1;break}F+=j}return F&&W.push(F),W}e.splitGlobAware=i;function n(R){if(!R)return"";let B="";const W=i(R,e.GLOB_SPLIT);if(W.every(V=>V===e.GLOBSTAR))B=".*";else{let V=!1;W.forEach((U,F)=>{if(U===e.GLOBSTAR){if(V)return;B+=o(2,F===W.length-1)}else{let j=!1,J="",le=!1,ee="";for(const $ of U){if($!=="}"&&j){J+=$;continue}if(le&&($!=="]"||!ee)){let te;$==="-"?te=$:($==="^"||$==="!")&&!ee?te="^":$===e.GLOB_SPLIT?te="":te=(0,p.escapeRegExpCharacters)($),ee+=te;continue}switch($){case"{":j=!0;continue;case"[":le=!0;continue;case"}":{const G=`(?:${i(J,",").map(de=>n(de)).join("|")})`;B+=G,j=!1,J="";break}case"]":{B+="["+ee+"]",le=!1,ee="";break}case"?":B+=v;continue;case"*":B+=o(1);continue;default:B+=(0,p.escapeRegExpCharacters)($)}}Fg(J,B)).filter(J=>J!==s),R),V=W.length;if(!V)return s;if(V===1)return W[0];const U=function(J,le){for(let ee=0,$=W.length;ee<$;ee++)if(W[ee](J,le))return R;return null},F=W.find(J=>!!J.allBasenames);F&&(U.allBasenames=F.allBasenames);const j=W.reduce((J,le)=>le.allPaths?J.concat(le.allPaths):J,[]);return j.length&&(U.allPaths=j),U}function I(R,B,W){const V=E.sep===E.posix.sep,U=V?R:R.replace(b,E.sep),F=E.sep+U,j=E.posix.sep+R;let J;return W?J=function(le,ee){return typeof le=="string"&&(le===U||le.endsWith(F)||!V&&(le===R||le.endsWith(j)))?B:null}:J=function(le,ee){return typeof le=="string"&&(le===U||!V&&le===R)?B:null},J.allPaths=[(W?"*/":"./")+R],J}function M(R){try{const B=new RegExp(`^${n(R)}$`);return function(W){return B.lastIndex=0,typeof W=="string"&&B.test(W)?R:null}}catch{return s}}function A(R,B,W){return!R||typeof B!="string"?!1:O(R)(B,void 0,W)}e.match=A;function O(R,B={}){if(!R)return l;if(typeof R=="string"||T(R)){const W=g(R,B);if(W===s)return l;const V=function(U,F){return!!W(U,F)};return W.allBasenames&&(V.allBasenames=W.allBasenames),W.allPaths&&(V.allPaths=W.allPaths),V}return N(R,B)}e.parse=O;function T(R){const B=R;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=T;function N(R,B){const W=x(Object.getOwnPropertyNames(R).map(J=>P(J,R[J],B)).filter(J=>J!==s)),V=W.length;if(!V)return s;if(!W.some(J=>!!J.requiresSiblings)){if(V===1)return W[0];const J=function($,te){let G;for(let de=0,ue=W.length;de{for(const de of G){const ue=await de;if(typeof ue=="string")return ue}return null})():null},le=W.find($=>!!$.allBasenames);le&&(J.allBasenames=le.allBasenames);const ee=W.reduce(($,te)=>te.allPaths?$.concat(te.allPaths):$,[]);return ee.length&&(J.allPaths=ee),J}const U=function(J,le,ee){let $,te;for(let G=0,de=W.length;G{for(const G of te){const de=await G;if(typeof de=="string")return de}return null})():null},F=W.find(J=>!!J.allBasenames);F&&(U.allBasenames=F.allBasenames);const j=W.reduce((J,le)=>le.allPaths?J.concat(le.allPaths):J,[]);return j.length&&(U.allPaths=j),U}function P(R,B,W){if(B===!1)return s;const V=g(R,W);if(V===s)return s;if(typeof B=="boolean")return V;if(B){const U=B.when;if(typeof U=="string"){const F=(j,J,le,ee)=>{if(!ee||!V(j,J))return null;const $=U.replace("$(basename)",()=>le),te=ee($);return(0,L.isThenable)(te)?te.then(G=>G?R:null):te?R:null};return F.requiresSiblings=!0,F}}return V}function x(R,B){const W=R.filter(J=>!!J.basenames);if(W.length<2)return R;const V=W.reduce((J,le)=>{const ee=le.basenames;return ee?J.concat(ee):J},[]);let U;if(B){U=[];for(let J=0,le=V.length;J{const ee=le.patterns;return ee?J.concat(ee):J},[]);const F=function(J,le){if(typeof J!="string")return null;if(!le){let $;for($=J.length;$>0;$--){const te=J.charCodeAt($-1);if(te===47||te===92)break}le=J.substr($)}const ee=V.indexOf(le);return ee!==-1?U[ee]:null};F.basenames=V,F.patterns=U,F.allBasenames=V;const j=R.filter(J=>!J.basenames);return j.push(F),j}}),define(ie[582],ne([1,0,223,17]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function y(_,p=k.isWindows){return(0,L.hasDriveLetter)(_,p)?_.charAt(0).toUpperCase()+_.slice(1):_}e.normalizeDriveLetter=y;let E=Object.create(null)}),define(ie[22],ne([1,0,94,17]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const y=/^\w[\w\d+.-]*$/,E=/^\//,_=/^\/\//;function p(h,m){if(!h.scheme&&m)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${h.authority}", path: "${h.path}", query: "${h.query}", fragment: "${h.fragment}"}`);if(h.scheme&&!y.test(h.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(h.path){if(h.authority){if(!E.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(_.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 S(h,m){return!h&&!m?"file":h}function v(h,m){switch(h){case"https":case"http":case"file":m?m[0]!==o&&(m=o+m):m=o;break}return m}const b="",o="/",i=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class n{static isUri(m){return m instanceof n?!0:m?typeof m.authority=="string"&&typeof m.fragment=="string"&&typeof m.path=="string"&&typeof m.query=="string"&&typeof m.scheme=="string"&&typeof m.fsPath=="string"&&typeof m.with=="function"&&typeof m.toString=="function":!1}constructor(m,C,w,D,I,M=!1){typeof m=="object"?(this.scheme=m.scheme||b,this.authority=m.authority||b,this.path=m.path||b,this.query=m.query||b,this.fragment=m.fragment||b):(this.scheme=S(m,M),this.authority=C||b,this.path=v(this.scheme,w||b),this.query=D||b,this.fragment=I||b,p(this,M))}get fsPath(){return d(this,!1)}with(m){if(!m)return this;let{scheme:C,authority:w,path:D,query:I,fragment:M}=m;return C===void 0?C=this.scheme:C===null&&(C=b),w===void 0?w=this.authority:w===null&&(w=b),D===void 0?D=this.path:D===null&&(D=b),I===void 0?I=this.query:I===null&&(I=b),M===void 0?M=this.fragment:M===null&&(M=b),C===this.scheme&&w===this.authority&&D===this.path&&I===this.query&&M===this.fragment?this:new a(C,w,D,I,M)}static parse(m,C=!1){const w=i.exec(m);return w?new a(w[2]||b,g(w[4]||b),g(w[5]||b),g(w[7]||b),g(w[9]||b),C):new a(b,b,b,b,b)}static file(m){let C=b;if(k.isWindows&&(m=m.replace(/\\/g,o)),m[0]===o&&m[1]===o){const w=m.indexOf(o,2);w===-1?(C=m.substring(2),m=o):(C=m.substring(2,w),m=m.substring(w)||o)}return new a("file",C,m,b,b)}static from(m,C){return new a(m.scheme,m.authority,m.path,m.query,m.fragment,C)}static joinPath(m,...C){if(!m.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let w;return k.isWindows&&m.scheme==="file"?w=n.file(L.win32.join(d(m,!0),...C)).path:w=L.posix.join(m.path,...C),m.with({path:w})}toString(m=!1){return r(this,m)}toJSON(){return this}static revive(m){var C,w;if(m){if(m instanceof n)return m;{const D=new a(m);return D._formatted=(C=m.external)!==null&&C!==void 0?C:null,D._fsPath=m._sep===t&&(w=m.fsPath)!==null&&w!==void 0?w:null,D}}else return m}}e.URI=n;const t=k.isWindows?1:void 0;class a extends n{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=d(this,!1)),this._fsPath}toString(m=!1){return m?r(this,!0):(this._formatted||(this._formatted=r(this,!1)),this._formatted)}toJSON(){const m={$mid:1};return this._fsPath&&(m.fsPath=this._fsPath,m._sep=t),this._formatted&&(m.external=this._formatted),this.path&&(m.path=this.path),this.scheme&&(m.scheme=this.scheme),this.authority&&(m.authority=this.authority),this.query&&(m.query=this.query),this.fragment&&(m.fragment=this.fragment),m}}const u={[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 f(h,m,C){let w,D=-1;for(let I=0;I=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||m&&M===47||C&&M===91||C&&M===93||C&&M===58)D!==-1&&(w+=encodeURIComponent(h.substring(D,I)),D=-1),w!==void 0&&(w+=h.charAt(I));else{w===void 0&&(w=h.substr(0,I));const A=u[M];A!==void 0?(D!==-1&&(w+=encodeURIComponent(h.substring(D,I)),D=-1),w+=A):D===-1&&(D=I)}}return D!==-1&&(w+=encodeURIComponent(h.substring(D))),w!==void 0?w:h}function c(h){let m;for(let C=0;C1&&h.scheme==="file"?C=`//${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?m?C=h.path.substr(1):C=h.path[1].toLowerCase()+h.path.substr(2):C=h.path,k.isWindows&&(C=C.replace(/\//g,"\\")),C}e.uriToFsPath=d;function r(h,m){const C=m?c:f;let w="",{scheme:D,authority:I,path:M,query:A,fragment:O}=h;if(D&&(w+=D,w+=":"),(I||D==="file")&&(w+=o,w+=o),I){let T=I.indexOf("@");if(T!==-1){const N=I.substr(0,T);I=I.substr(T+1),T=N.lastIndexOf(":"),T===-1?w+=C(N,!1,!1):(w+=C(N.substr(0,T),!1,!1),w+=":",w+=C(N.substr(T+1),!1,!0)),w+="@"}I=I.toLowerCase(),T=I.lastIndexOf(":"),T===-1?w+=C(I,!1,!0):(w+=C(I.substr(0,T),!1,!0),w+=I.substr(T))}if(M){if(M.length>=3&&M.charCodeAt(0)===47&&M.charCodeAt(2)===58){const T=M.charCodeAt(1);T>=65&&T<=90&&(M=`/${String.fromCharCode(T+32)}:${M.substr(3)}`)}else if(M.length>=2&&M.charCodeAt(1)===58){const T=M.charCodeAt(0);T>=65&&T<=90&&(M=`${String.fromCharCode(T+32)}:${M.substr(2)}`)}w+=C(M,!0,!1)}return A&&(w+="?",w+=C(A,!1,!1)),O&&(w+="#",w+=m?O:f(O,!1,!1)),w}function l(h){try{return decodeURIComponent(h)}catch{return h.length>3?h.substr(0,3)+l(h.substr(3)):h}}const s=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function g(h){return h.match(s)?h.replace(s,m=>l(m)):h}}),define(ie[224],ne([1,0,142,22]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function y(S){return JSON.stringify(S,_)}e.stringify=y;function E(S){let v=JSON.parse(S);return v=p(v),v}e.parse=E;function _(S,v){return v instanceof RegExp?{$mid:2,source:v.source,flags:v.flags}:v}function p(S,v=0){if(!S||v>200)return S;if(typeof S=="object"){switch(S.$mid){case 1:return k.URI.revive(S);case 2:return new RegExp(S.source,S.flags);case 17:return new Date(S.source)}if(S instanceof L.VSBuffer||S instanceof Uint8Array)return S;if(Array.isArray(S))for(let b=0;bp(i,t))}e.matchesSomeScheme=S,e.connectionTokenQueryName="tkn";class v{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${_.vscodeRemoteResource}`}setPreferredWebSchema(n){this._preferredWebSchema=n}rewrite(n){if(this._delegate)try{return this._delegate(n)}catch(d){return L.onUnexpectedError(d),n}const t=n.authority;let a=this._hosts[t];a&&a.indexOf(":")!==-1&&a.indexOf("[")===-1&&(a=`[${a}]`);const u=this._ports[t],f=this._connectionTokens[t];let c=`path=${encodeURIComponent(n.path)}`;return typeof f=="string"&&(c+=`&${e.connectionTokenQueryName}=${encodeURIComponent(f)}`),E.URI.from({scheme:k.isWeb?this._preferredWebSchema:_.vscodeRemoteResource,authority:`${a}:${u}`,path:this._remoteResourcesPath,query:c})}}e.RemoteAuthorities=new v,e.VSCODE_AUTHORITY="vscode-app";class b{uriToBrowserUri(n){return n.scheme===_.vscodeRemote?e.RemoteAuthorities.rewrite(n):n.scheme===_.file&&(k.isNative||k.webWorkerOrigin===`${_.vscodeFileResource}://${b.FALLBACK_AUTHORITY}`)?n.with({scheme:_.vscodeFileResource,authority:n.authority||b.FALLBACK_AUTHORITY,query:null,fragment:null}):n}}b.FALLBACK_AUTHORITY=e.VSCODE_AUTHORITY,e.FileAccess=new b;var o;(function(i){const n=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(n.get("3"));const t="vscode-coi";function a(f){let c;typeof f=="string"?c=new URL(f).searchParams:f instanceof URL?c=f.searchParams:E.URI.isUri(f)&&(c=new URL(f.toString(!0)).searchParams);const d=c?.get(t);if(d)return n.get(d)}i.getHeadersFromQuery=a;function u(f,c,d){if(!globalThis.crossOriginIsolated)return;const r=c&&d?"3":d?"2":"1";f instanceof URLSearchParams?f.set(t,r):f[t]=r}i.addSearchParam=u})(o||(e.COI=o={}))}),define(ie[7],ne([1,0,54,219,50,67,14,9,6,312,2,44,17,122,48]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.ModifierKeyEmitter=e.basicMarkupHtmlTags=e.hookDomPurifyHrefAndSrcSanitizer=e.asCssValueWithDefault=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.hide=e.show=e.setVisibility=e.$=e.Namespace=e.reset=e.prepend=e.append=e.after=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.isEventLike=e.EventType=e.isKeyboardEvent=e.isMouseEvent=e.removeCSSRulesContainingSelector=e.createCSSRule=e.sharedMutationObserver=e.createStyleSheet=e.getActiveWindow=e.getActiveDocument=e.isAncestorOfActiveElement=e.isActiveElement=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.getDomNodeZoomLevel=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.WindowIntervalTimer=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.WindowIdleValue=e.runWhenWindowIdle=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.clearNode=e.onDidUnregisterWindow=e.onWillUnregisterWindow=e.onDidRegisterWindow=e.hasWindow=e.getWindowById=e.getWindowId=e.getWindowsCount=e.getWindows=e.getDocument=e.getWindow=e.registerWindow=void 0,a=function(){const we=new Map;(0,t.ensureCodeWindow)(t.mainWindow,1),we.set(t.mainWindow.vscodeWindowId,{window:t.mainWindow,disposables:new b.DisposableStore});const ye=new S.Emitter,Ie=new S.Emitter,Ae=new S.Emitter;return{onDidRegisterWindow:ye.event,onWillUnregisterWindow:Ae.event,onDidUnregisterWindow:Ie.event,registerWindow(ze){if(we.has(ze.vscodeWindowId))return b.Disposable.None;const xe=new b.DisposableStore,De={window:ze,disposables:xe.add(new b.DisposableStore)};return we.set(ze.vscodeWindowId,De),xe.add((0,b.toDisposable)(()=>{we.delete(ze.vscodeWindowId),Ie.fire(ze)})),xe.add(c(ze,e.EventType.BEFORE_UNLOAD,()=>{Ae.fire(ze)})),ye.fire(De),xe},getWindows(){return we.values()},getWindowsCount(){return we.size},getWindowId(ze){return ze.vscodeWindowId},hasWindow(ze){return we.has(ze)},getWindowById(ze){return we.get(ze)},getWindow(ze){var xe;const De=ze;if(!((xe=De?.ownerDocument)===null||xe===void 0)&&xe.defaultView)return De.ownerDocument.defaultView.window;const Fe=ze;return Fe?.view?Fe.view.window:t.mainWindow},getDocument(ze){const xe=ze;return(0,e.getWindow)(xe).document}}}(),e.registerWindow=a.registerWindow,e.getWindow=a.getWindow,e.getDocument=a.getDocument,e.getWindows=a.getWindows,e.getWindowsCount=a.getWindowsCount,e.getWindowId=a.getWindowId,e.getWindowById=a.getWindowById,e.hasWindow=a.hasWindow,e.onDidRegisterWindow=a.onDidRegisterWindow,e.onWillUnregisterWindow=a.onWillUnregisterWindow,e.onDidUnregisterWindow=a.onDidUnregisterWindow;function u(we){for(;we.firstChild;)we.firstChild.remove()}e.clearNode=u;class f{constructor(ye,Ie,Ae,ze){this._node=ye,this._type=Ie,this._handler=Ae,this._options=ze||!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 c(we,ye,Ie,Ae){return new f(we,ye,Ie,Ae)}e.addDisposableListener=c;function d(we,ye){return function(Ie){return ye(new E.StandardMouseEvent(we,Ie))}}function r(we){return function(ye){return we(new y.StandardKeyboardEvent(ye))}}const l=function(ye,Ie,Ae,ze){let xe=Ae;return Ie==="click"||Ie==="mousedown"?xe=d((0,e.getWindow)(ye),Ae):(Ie==="keydown"||Ie==="keypress"||Ie==="keyup")&&(xe=r(Ae)),c(ye,Ie,xe,ze)};e.addStandardDisposableListener=l;const s=function(ye,Ie,Ae){const ze=d((0,e.getWindow)(ye),Ie);return h(ye,ze,Ae)};e.addStandardDisposableGenericMouseDownListener=s;const g=function(ye,Ie,Ae){const ze=d((0,e.getWindow)(ye),Ie);return m(ye,ze,Ae)};e.addStandardDisposableGenericMouseUpListener=g;function h(we,ye,Ie){return c(we,i.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,ye,Ie)}e.addDisposableGenericMouseDownListener=h;function m(we,ye,Ie){return c(we,i.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,ye,Ie)}e.addDisposableGenericMouseUpListener=m;function C(we,ye,Ie){return(0,_._runWhenIdle)(we,ye,Ie)}e.runWhenWindowIdle=C;class w extends _.AbstractIdleValue{constructor(ye,Ie){super(ye,Ie)}}e.WindowIdleValue=w;class D extends _.IntervalTimer{cancelAndSet(ye,Ie,Ae){return super.cancelAndSet(ye,Ie,Ae)}}e.WindowIntervalTimer=D;class I{constructor(ye,Ie=0){this._runner=ye,this.priority=Ie,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(ye){(0,p.onUnexpectedError)(ye)}}static sort(ye,Ie){return Ie.priority-ye.priority}}(function(){const we=new Map,ye=new Map,Ie=new Map,Ae=new Map,ze=xe=>{var De;Ie.set(xe,!1);const Fe=(De=we.get(xe))!==null&&De!==void 0?De:[];for(ye.set(xe,Fe),we.set(xe,[]),Ae.set(xe,!0);Fe.length>0;)Fe.sort(I.sort),Fe.shift().execute();Ae.set(xe,!1)};e.scheduleAtNextAnimationFrame=(xe,De,Fe=0)=>{const We=(0,e.getWindowId)(xe),qe=new I(De,Fe);let Ze=we.get(We);return Ze||(Ze=[],we.set(We,Ze)),Ze.push(qe),Ie.get(We)||(Ie.set(We,!0),xe.requestAnimationFrame(()=>ze(We))),qe},e.runAtThisOrScheduleAtNextAnimationFrame=(xe,De,Fe)=>{const We=(0,e.getWindowId)(xe);if(Ae.get(We)){const qe=new I(De,Fe);let Ze=ye.get(We);return Ze||(Ze=[],ye.set(We,Ze)),Ze.push(qe),qe}else return(0,e.scheduleAtNextAnimationFrame)(xe,De,Fe)}})();function M(we){return(0,e.getWindow)(we).getComputedStyle(we,null)}e.getComputedStyle=M;function A(we,ye){const Ie=(0,e.getWindow)(we),Ae=Ie.document;if(we!==Ae.body)return new T(we.clientWidth,we.clientHeight);if(i.isIOS&&Ie?.visualViewport)return new T(Ie.visualViewport.width,Ie.visualViewport.height);if(Ie?.innerWidth&&Ie.innerHeight)return new T(Ie.innerWidth,Ie.innerHeight);if(Ae.body&&Ae.body.clientWidth&&Ae.body.clientHeight)return new T(Ae.body.clientWidth,Ae.body.clientHeight);if(Ae.documentElement&&Ae.documentElement.clientWidth&&Ae.documentElement.clientHeight)return new T(Ae.documentElement.clientWidth,Ae.documentElement.clientHeight);if(ye)return A(ye);throw new Error("Unable to figure out browser width and height")}e.getClientArea=A;class O{static convertToPixels(ye,Ie){return parseFloat(Ie)||0}static getDimension(ye,Ie,Ae){const ze=M(ye),xe=ze?ze.getPropertyValue(Ie):"0";return O.convertToPixels(ye,xe)}static getBorderLeftWidth(ye){return O.getDimension(ye,"border-left-width","borderLeftWidth")}static getBorderRightWidth(ye){return O.getDimension(ye,"border-right-width","borderRightWidth")}static getBorderTopWidth(ye){return O.getDimension(ye,"border-top-width","borderTopWidth")}static getBorderBottomWidth(ye){return O.getDimension(ye,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(ye){return O.getDimension(ye,"padding-left","paddingLeft")}static getPaddingRight(ye){return O.getDimension(ye,"padding-right","paddingRight")}static getPaddingTop(ye){return O.getDimension(ye,"padding-top","paddingTop")}static getPaddingBottom(ye){return O.getDimension(ye,"padding-bottom","paddingBottom")}static getMarginLeft(ye){return O.getDimension(ye,"margin-left","marginLeft")}static getMarginTop(ye){return O.getDimension(ye,"margin-top","marginTop")}static getMarginRight(ye){return O.getDimension(ye,"margin-right","marginRight")}static getMarginBottom(ye){return O.getDimension(ye,"margin-bottom","marginBottom")}}class T{constructor(ye,Ie){this.width=ye,this.height=Ie}with(ye=this.width,Ie=this.height){return ye!==this.width||Ie!==this.height?new T(ye,Ie):this}static is(ye){return typeof ye=="object"&&typeof ye.height=="number"&&typeof ye.width=="number"}static lift(ye){return ye instanceof T?ye:new T(ye.width,ye.height)}static equals(ye,Ie){return ye===Ie?!0:!ye||!Ie?!1:ye.width===Ie.width&&ye.height===Ie.height}}e.Dimension=T,T.None=new T(0,0);function N(we){let ye=we.offsetParent,Ie=we.offsetTop,Ae=we.offsetLeft;for(;(we=we.parentNode)!==null&&we!==we.ownerDocument.body&&we!==we.ownerDocument.documentElement;){Ie-=we.scrollTop;const ze=le(we)?null:M(we);ze&&(Ae-=ze.direction!=="rtl"?we.scrollLeft:-we.scrollLeft),we===ye&&(Ae+=O.getBorderLeftWidth(we),Ie+=O.getBorderTopWidth(we),Ie+=we.offsetTop,Ae+=we.offsetLeft,ye=we.offsetParent)}return{left:Ae,top:Ie}}e.getTopLeftOffset=N;function P(we,ye,Ie){typeof ye=="number"&&(we.style.width=`${ye}px`),typeof Ie=="number"&&(we.style.height=`${Ie}px`)}e.size=P;function x(we){const ye=we.getBoundingClientRect(),Ie=(0,e.getWindow)(we);return{left:ye.left+Ie.scrollX,top:ye.top+Ie.scrollY,width:ye.width,height:ye.height}}e.getDomNodePagePosition=x;function R(we){let ye=we,Ie=1;do{const Ae=M(ye).zoom;Ae!=null&&Ae!=="1"&&(Ie*=Ae),ye=ye.parentElement}while(ye!==null&&ye!==ye.ownerDocument.documentElement);return Ie}e.getDomNodeZoomLevel=R;function B(we){const ye=O.getMarginLeft(we)+O.getMarginRight(we);return we.offsetWidth+ye}e.getTotalWidth=B;function W(we){const ye=O.getBorderLeftWidth(we)+O.getBorderRightWidth(we),Ie=O.getPaddingLeft(we)+O.getPaddingRight(we);return we.offsetWidth-ye-Ie}e.getContentWidth=W;function V(we){const ye=O.getBorderTopWidth(we)+O.getBorderBottomWidth(we),Ie=O.getPaddingTop(we)+O.getPaddingBottom(we);return we.offsetHeight-ye-Ie}e.getContentHeight=V;function U(we){const ye=O.getMarginTop(we)+O.getMarginBottom(we);return we.offsetHeight+ye}e.getTotalHeight=U;function F(we,ye){return!!ye?.contains(we)}e.isAncestor=F;function j(we,ye,Ie){for(;we&&we.nodeType===we.ELEMENT_NODE;){if(we.classList.contains(ye))return we;if(Ie){if(typeof Ie=="string"){if(we.classList.contains(Ie))return null}else if(we===Ie)return null}we=we.parentNode}return null}e.findParentWithClass=j;function J(we,ye,Ie){return!!j(we,ye,Ie)}e.hasParentWithClass=J;function le(we){return we&&!!we.host&&!!we.mode}e.isShadowRoot=le;function ee(we){return!!$(we)}e.isInShadowDOM=ee;function $(we){for(var ye;we.parentNode;){if(we===((ye=we.ownerDocument)===null||ye===void 0?void 0:ye.body))return null;we=we.parentNode}return le(we)?we:null}e.getShadowRoot=$;function te(){let we=ue().activeElement;for(;we?.shadowRoot;)we=we.shadowRoot.activeElement;return we}e.getActiveElement=te;function G(we){return we.ownerDocument.activeElement===we}e.isActiveElement=G;function de(we){return F(we.ownerDocument.activeElement,we)}e.isAncestorOfActiveElement=de;function ue(){var we;return(0,e.getWindowsCount)()<=1?document:(we=Array.from((0,e.getWindows)()).map(({window:Ie})=>Ie.document).find(Ie=>Ie.hasFocus()))!==null&&we!==void 0?we:document}e.getActiveDocument=ue;function X(){var we,ye;return(ye=(we=ue().defaultView)===null||we===void 0?void 0:we.window)!==null&&ye!==void 0?ye:t.mainWindow}e.getActiveWindow=X;const Z=new Map;function re(we=t.mainWindow.document.head,ye,Ie){const Ae=document.createElement("style");if(Ae.type="text/css",Ae.media="screen",ye?.(Ae),we.appendChild(Ae),Ie&&Ie.add((0,b.toDisposable)(()=>we.removeChild(Ae))),we===t.mainWindow.document.head){const ze=new Set;Z.set(Ae,ze);for(const{window:xe,disposables:De}of(0,e.getWindows)()){if(xe===t.mainWindow)continue;const Fe=De.add(oe(Ae,ze,xe));Ie?.add(Fe)}}return Ae}e.createStyleSheet=re;function oe(we,ye,Ie){var Ae,ze;const xe=new b.DisposableStore,De=we.cloneNode(!0);Ie.document.head.appendChild(De),xe.add((0,b.toDisposable)(()=>Ie.document.head.removeChild(De)));for(const Fe of H(we))(Ae=De.sheet)===null||Ae===void 0||Ae.insertRule(Fe.cssText,(ze=De.sheet)===null||ze===void 0?void 0:ze.cssRules.length);return xe.add(e.sharedMutationObserver.observe(we,xe,{childList:!0})(()=>{De.textContent=we.textContent})),ye.add(De),xe.add((0,b.toDisposable)(()=>ye.delete(De))),xe}e.sharedMutationObserver=new class{constructor(){this.mutationObservers=new Map}observe(we,ye,Ie){let Ae=this.mutationObservers.get(we);Ae||(Ae=new Map,this.mutationObservers.set(we,Ae));const ze=(0,n.hash)(Ie);let xe=Ae.get(ze);if(xe)xe.users+=1;else{const De=new S.Emitter,Fe=new MutationObserver(qe=>De.fire(qe));Fe.observe(we,Ie);const We=xe={users:1,observer:Fe,onDidMutate:De.event};ye.add((0,b.toDisposable)(()=>{We.users-=1,We.users===0&&(De.dispose(),Fe.disconnect(),Ae?.delete(ze),Ae?.size===0&&this.mutationObservers.delete(we))})),Ae.set(ze,xe)}return xe.onDidMutate}};let Y=null;function K(){return Y||(Y=re()),Y}function H(we){var ye,Ie;return!((ye=we?.sheet)===null||ye===void 0)&&ye.rules?we.sheet.rules:!((Ie=we?.sheet)===null||Ie===void 0)&&Ie.cssRules?we.sheet.cssRules:[]}function z(we,ye,Ie=K()){var Ae,ze;if(!(!Ie||!ye)){(Ae=Ie.sheet)===null||Ae===void 0||Ae.insertRule(`${we} {${ye}}`,0);for(const xe of(ze=Z.get(Ie))!==null&&ze!==void 0?ze:[])z(we,ye,xe)}}e.createCSSRule=z;function se(we,ye=K()){var Ie,Ae;if(!ye)return;const ze=H(ye),xe=[];for(let De=0;De=0;De--)(Ie=ye.sheet)===null||Ie===void 0||Ie.deleteRule(xe[De]);for(const De of(Ae=Z.get(ye))!==null&&Ae!==void 0?Ae:[])se(we,De)}e.removeCSSRulesContainingSelector=se;function q(we){return typeof we.selectorText=="string"}function ae(we){return we instanceof MouseEvent||we instanceof(0,e.getWindow)(we).MouseEvent}e.isMouseEvent=ae;function ce(we){return we instanceof KeyboardEvent||we instanceof(0,e.getWindow)(we).KeyboardEvent}e.isKeyboardEvent=ce,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",PASTE:"paste",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:L.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:L.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:L.isWebKit?"webkitAnimationIteration":"animationiteration"};function ge(we){const ye=we;return!!(ye&&typeof ye.preventDefault=="function"&&typeof ye.stopPropagation=="function")}e.isEventLike=ge,e.EventHelper={stop:(we,ye)=>(we.preventDefault(),ye&&we.stopPropagation(),we)};function pe(we){const ye=[];for(let Ie=0;we&&we.nodeType===we.ELEMENT_NODE;Ie++)ye[Ie]=we.scrollTop,we=we.parentNode;return ye}e.saveParentsScrollTop=pe;function me(we,ye){for(let Ie=0;we&&we.nodeType===we.ELEMENT_NODE;Ie++)we.scrollTop!==ye[Ie]&&(we.scrollTop=ye[Ie]),we=we.parentNode}e.restoreParentsScrollTop=me;class ve extends b.Disposable{static hasFocusWithin(ye){if(ye instanceof HTMLElement){const Ie=$(ye),Ae=Ie?Ie.activeElement:ye.ownerDocument.activeElement;return F(Ae,ye)}else{const Ie=ye;return F(Ie.document.activeElement,Ie.document)}}constructor(ye){super(),this._onDidFocus=this._register(new S.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new S.Emitter),this.onDidBlur=this._onDidBlur.event;let Ie=ve.hasFocusWithin(ye),Ae=!1;const ze=()=>{Ae=!1,Ie||(Ie=!0,this._onDidFocus.fire())},xe=()=>{Ie&&(Ae=!0,(ye instanceof HTMLElement?(0,e.getWindow)(ye):ye).setTimeout(()=>{Ae&&(Ae=!1,Ie=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{ve.hasFocusWithin(ye)!==Ie&&(Ie?xe():ze())},this._register(c(ye,e.EventType.FOCUS,ze,!0)),this._register(c(ye,e.EventType.BLUR,xe,!0)),ye instanceof HTMLElement&&(this._register(c(ye,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(c(ye,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler())))}}function Ce(we){return new ve(we)}e.trackFocus=Ce;function Se(we,ye){return we.after(ye),ye}e.after=Se;function _e(we,...ye){if(we.append(...ye),ye.length===1&&typeof ye[0]!="string")return ye[0]}e.append=_e;function Te(we,ye){return we.insertBefore(ye,we.firstChild),ye}e.prepend=Te;function Me(we,...ye){we.innerText="",_e(we,...ye)}e.reset=Me;const Pe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Be;(function(we){we.HTML="http://www.w3.org/1999/xhtml",we.SVG="http://www.w3.org/2000/svg"})(Be||(e.Namespace=Be={}));function Le(we,ye,Ie,...Ae){const ze=Pe.exec(ye);if(!ze)throw new Error("Bad use of emmet");const xe=ze[1]||"div";let De;return we!==Be.HTML?De=document.createElementNS(we,xe):De=document.createElement(xe),ze[3]&&(De.id=ze[3]),ze[4]&&(De.className=ze[4].replace(/\./g," ").trim()),Ie&&Object.entries(Ie).forEach(([Fe,We])=>{typeof We>"u"||(/^on\w+$/.test(Fe)?De[Fe]=We:Fe==="selected"?We&&De.setAttribute(Fe,"true"):De.setAttribute(Fe,We))}),De.append(...Ae),De}function Ne(we,ye,...Ie){return Le(Be.HTML,we,ye,...Ie)}e.$=Ne,Ne.SVG=function(we,ye,...Ie){return Le(Be.SVG,we,ye,...Ie)};function fe(we,...ye){we?be(...ye):ke(...ye)}e.setVisibility=fe;function be(...we){for(const ye of we)ye.style.display="",ye.removeAttribute("aria-hidden")}e.show=be;function ke(...we){for(const ye of we)ye.style.display="none",ye.setAttribute("aria-hidden","true")}e.hide=ke;function Re(we,ye){const Ie=we.devicePixelRatio*ye;return Math.max(1,Math.floor(Ie))/we.devicePixelRatio}e.computeScreenAwareSize=Re;function Ve(we){t.mainWindow.open(we,"_blank","noopener")}e.windowOpenNoOpener=Ve;function Ke(we,ye){const Ie=()=>{ye(),Ae=(0,e.scheduleAtNextAnimationFrame)(we,Ie)};let Ae=(0,e.scheduleAtNextAnimationFrame)(we,Ie);return(0,b.toDisposable)(()=>Ae.dispose())}e.animate=Ke,o.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(t.mainWindow.location.href)?"https":"http");function je(we){return we?`url('${o.FileAccess.uriToBrowserUri(we).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=je;function st(we){return`'${we.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=st;function ot(we,ye){if(we!==void 0){const Ie=we.match(/^\s*var\((.+)\)$/);if(Ie){const Ae=Ie[1].split(",",2);return Ae.length===2&&(ye=ot(Ae[1].trim(),ye)),`var(${Ae[0]}, ${ye})`}return we}return ye}e.asCssValueWithDefault=ot;function nt(we,ye=!1){const Ie=document.createElement("a");return v.addHook("afterSanitizeAttributes",Ae=>{for(const ze of["href","src"])if(Ae.hasAttribute(ze)){const xe=Ae.getAttribute(ze);if(ze==="href"&&xe.startsWith("#"))continue;if(Ie.href=xe,!we.includes(Ie.protocol.replace(/:$/,""))){if(ye&&ze==="src"&&Ie.href.startsWith("data:"))continue;Ae.removeAttribute(ze)}}}),(0,b.toDisposable)(()=>{v.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=nt,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","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);const rt=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","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class Qe extends S.Emitter{constructor(){super(),this._subscriptions=new b.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(S.Event.runAndSubscribe(e.onDidRegisterWindow,({window:ye,disposables:Ie})=>this.registerListeners(ye,Ie),{window:t.mainWindow,disposables:this._subscriptions}))}registerListeners(ye,Ie){Ie.add(c(ye,"keydown",Ae=>{if(Ae.defaultPrevented)return;const ze=new y.StandardKeyboardEvent(Ae);if(!(ze.keyCode===6&&Ae.repeat)){if(Ae.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Ae.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Ae.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Ae.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(ze.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Ae.altKey,this._keyStatus.ctrlKey=Ae.ctrlKey,this._keyStatus.metaKey=Ae.metaKey,this._keyStatus.shiftKey=Ae.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Ae,this.fire(this._keyStatus))}},!0)),Ie.add(c(ye,"keyup",Ae=>{Ae.defaultPrevented||(!Ae.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Ae.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Ae.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Ae.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=Ae.altKey,this._keyStatus.ctrlKey=Ae.ctrlKey,this._keyStatus.metaKey=Ae.metaKey,this._keyStatus.shiftKey=Ae.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Ae,this.fire(this._keyStatus)))},!0)),Ie.add(c(ye.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),Ie.add(c(ye.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),Ie.add(c(ye.document.body,"mousemove",Ae=>{Ae.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),Ie.add(c(ye,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Qe.instance||(Qe.instance=new Qe),Qe.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=Qe;class ht extends b.Disposable{constructor(ye,Ie){super(),this.element=ye,this.callbacks=Ie,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(c(this.element,e.EventType.DRAG_START,ye=>{var Ie,Ae;(Ae=(Ie=this.callbacks).onDragStart)===null||Ae===void 0||Ae.call(Ie,ye)})),this.callbacks.onDrag&&this._register(c(this.element,e.EventType.DRAG,ye=>{var Ie,Ae;(Ae=(Ie=this.callbacks).onDrag)===null||Ae===void 0||Ae.call(Ie,ye)})),this._register(c(this.element,e.EventType.DRAG_ENTER,ye=>{var Ie,Ae;this.counter++,this.dragStartTime=ye.timeStamp,(Ae=(Ie=this.callbacks).onDragEnter)===null||Ae===void 0||Ae.call(Ie,ye)})),this._register(c(this.element,e.EventType.DRAG_OVER,ye=>{var Ie,Ae;ye.preventDefault(),(Ae=(Ie=this.callbacks).onDragOver)===null||Ae===void 0||Ae.call(Ie,ye,ye.timeStamp-this.dragStartTime)})),this._register(c(this.element,e.EventType.DRAG_LEAVE,ye=>{var Ie,Ae;this.counter--,this.counter===0&&(this.dragStartTime=0,(Ae=(Ie=this.callbacks).onDragLeave)===null||Ae===void 0||Ae.call(Ie,ye))})),this._register(c(this.element,e.EventType.DRAG_END,ye=>{var Ie,Ae;this.counter=0,this.dragStartTime=0,(Ae=(Ie=this.callbacks).onDragEnd)===null||Ae===void 0||Ae.call(Ie,ye)})),this._register(c(this.element,e.EventType.DROP,ye=>{var Ie,Ae;this.counter=0,this.dragStartTime=0,(Ae=(Ie=this.callbacks).onDrop)===null||Ae===void 0||Ae.call(Ie,ye)}))}}e.DragAndDropObserver=ht;const gt=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function ft(we,...ye){let Ie,Ae;Array.isArray(ye[0])?(Ie={},Ae=ye[0]):(Ie=ye[0]||{},Ae=ye[1]);const ze=gt.exec(we);if(!ze||!ze.groups)throw new Error("Bad use of h");const xe=ze.groups.tag||"div",De=document.createElement(xe);ze.groups.id&&(De.id=ze.groups.id);const Fe=[];if(ze.groups.class)for(const qe of ze.groups.class.split("."))qe!==""&&Fe.push(qe);if(Ie.className!==void 0)for(const qe of Ie.className.split("."))qe!==""&&Fe.push(qe);Fe.length>0&&(De.className=Fe.join(" "));const We={};if(ze.groups.name&&(We[ze.groups.name]=De),Ae)for(const qe of Ae)qe instanceof HTMLElement?De.appendChild(qe):typeof qe=="string"?De.append(qe):"root"in qe&&(Object.assign(We,qe),De.appendChild(qe.root));for(const[qe,Ze]of Object.entries(Ie))if(qe!=="className")if(qe==="style")for(const[ut,Xe]of Object.entries(Ze))De.style.setProperty(dt(ut),typeof Xe=="number"?Xe+"px":""+Xe);else qe==="tabIndex"?De.tabIndex=Ze:De.setAttribute(dt(qe),Ze.toString());return We.root=De,We}e.h=ft;function dt(we){return we.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(ie[313],ne([1,0,7]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function k(o,i={}){const n=E(i);return n.textContent=o,n}e.renderText=k;function y(o,i={}){const n=E(i);return p(n,S(o,!!i.renderCodeSegments),i.actionHandler,i.renderCodeSegments),n}e.renderFormattedText=y;function E(o){const i=o.inline?"span":"div",n=document.createElement(i);return o.className&&(n.className=o.className),n}e.createElement=E;class _{constructor(i){this.source=i,this.index=0}eos(){return this.index>=this.source.length}next(){const i=this.peek();return this.advance(),i}peek(){return this.source[this.index]}advance(){this.index++}}function p(o,i,n,t){let a;if(i.type===2)a=document.createTextNode(i.content||"");else if(i.type===3)a=document.createElement("b");else if(i.type===4)a=document.createElement("i");else if(i.type===7&&t)a=document.createElement("code");else if(i.type===5&&n){const u=document.createElement("a");n.disposables.add(L.addStandardDisposableListener(u,"click",f=>{n.callback(String(i.index),f)})),a=u}else i.type===8?a=document.createElement("br"):i.type===1&&(a=o);a&&o!==a&&o.appendChild(a),a&&Array.isArray(i.children)&&i.children.forEach(u=>{p(a,u,n,t)})}function S(o,i){const n={type:1,children:[]};let t=0,a=n;const u=[],f=new _(o);for(;!f.eos();){let c=f.next();const d=c==="\\"&&b(f.peek(),i)!==0;if(d&&(c=f.next()),!d&&v(c,i)&&c===f.peek()){f.advance(),a.type===2&&(a=u.pop());const r=b(c,i);if(a.type===r||a.type===5&&r===6)a=u.pop();else{const l={type:r,children:[]};r===5&&(l.index=t,t++),a.children.push(l),u.push(a),a=l}}else if(c===` `)a.type===2&&(a=u.pop()),a.children.push({type:8});else if(a.type!==2){const r={type:2,content:c};a.children.push(r),u.push(a),a=r}else a.content+=c}return a.type===2&&(a=u.pop()),u.length,n}function v(o,i){return b(o,i)!==0}function b(o,i){switch(o){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return i?7:0;default:return 0}}}),define(ie[156],ne([1,0,7,2]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class y{constructor(){this._hooks=new k.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(_,p){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const S=this._onStopCallback;this._onStopCallback=null,_&&S&&S(p)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(_,p,S,v,b){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=v,this._onStopCallback=b;let o=_;try{_.setPointerCapture(p),this._hooks.add((0,k.toDisposable)(()=>{try{_.releasePointerCapture(p)}catch{}}))}catch{o=L.getWindow(_)}this._hooks.add(L.addDisposableListener(o,L.EventType.POINTER_MOVE,i=>{if(i.buttons!==S){this.stopMonitoring(!0);return}i.preventDefault(),this._pointerMoveCallback(i)})),this._hooks.add(L.addDisposableListener(o,L.EventType.POINTER_UP,i=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=y}),define(ie[63],ne([1,0,7,48,13,106,6,2,66]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var v;(function(o){o.Tap="-monaco-gesturetap",o.Change="-monaco-gesturechange",o.Start="-monaco-gesturestart",o.End="-monaco-gesturesend",o.Contextmenu="-monaco-gesturecontextmenu"})(v||(e.EventType=v={}));class b extends p.Disposable{constructor(){super(),this.dispatched=!1,this.targets=new S.LinkedList,this.ignoreTargets=new S.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(_.Event.runAndSubscribe(L.onDidRegisterWindow,({window:i,disposables:n})=>{n.add(L.addDisposableListener(i.document,"touchstart",t=>this.onTouchStart(t),{passive:!1})),n.add(L.addDisposableListener(i.document,"touchend",t=>this.onTouchEnd(i,t))),n.add(L.addDisposableListener(i.document,"touchmove",t=>this.onTouchMove(t),{passive:!1}))},{window:k.mainWindow,disposables:this._store}))}static addTarget(i){if(!b.isTouchDevice())return p.Disposable.None;b.INSTANCE||(b.INSTANCE=(0,p.markAsSingleton)(new b));const n=b.INSTANCE.targets.push(i);return(0,p.toDisposable)(n)}static ignoreTarget(i){if(!b.isTouchDevice())return p.Disposable.None;b.INSTANCE||(b.INSTANCE=(0,p.markAsSingleton)(new b));const n=b.INSTANCE.ignoreTargets.push(i);return(0,p.toDisposable)(n)}static isTouchDevice(){return"ontouchstart"in k.mainWindow||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(i){const n=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let t=0,a=i.targetTouches.length;t=b.HOLD_DELAY&&Math.abs(d.initialPageX-y.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-y.tail(d.rollingPageY))<30){const l=this.newGestureEvent(v.Contextmenu,d.initialTarget);l.pageX=y.tail(d.rollingPageX),l.pageY=y.tail(d.rollingPageY),this.dispatchEvent(l)}else if(a===1){const l=y.tail(d.rollingPageX),s=y.tail(d.rollingPageY),g=y.tail(d.rollingTimestamps)-d.rollingTimestamps[0],h=l-d.rollingPageX[0],m=s-d.rollingPageY[0],C=[...this.targets].filter(w=>d.initialTarget instanceof Node&&w.contains(d.initialTarget));this.inertia(i,C,t,Math.abs(h)/g,h>0?1:-1,l,Math.abs(m)/g,m>0?1:-1,s)}this.dispatchEvent(this.newGestureEvent(v.End,d.initialTarget)),delete this.activeTouches[c.identifier]}this.dispatched&&(n.preventDefault(),n.stopPropagation(),this.dispatched=!1)}newGestureEvent(i,n){const t=document.createEvent("CustomEvent");return t.initEvent(i,!1,!0),t.initialTarget=n,t.tapCount=0,t}dispatchEvent(i){if(i.type===v.Tap){const n=new Date().getTime();let t=0;n-this._lastSetTapCountTime>b.CLEAR_TAP_COUNT_TIME?t=1:t=2,this._lastSetTapCountTime=n,i.tapCount=t}else(i.type===v.Change||i.type===v.Contextmenu)&&(this._lastSetTapCountTime=0);if(i.initialTarget instanceof Node){for(const n of this.ignoreTargets)if(n.contains(i.initialTarget))return;for(const n of this.targets)n.contains(i.initialTarget)&&(n.dispatchEvent(i),this.dispatched=!0)}}inertia(i,n,t,a,u,f,c,d,r){this.handle=L.scheduleAtNextAnimationFrame(i,()=>{const l=Date.now(),s=l-t;let g=0,h=0,m=!0;a+=b.SCROLL_FRICTION*s,c+=b.SCROLL_FRICTION*s,a>0&&(m=!1,g=u*a*s),c>0&&(m=!1,h=d*c*s);const C=this.newGestureEvent(v.Change);C.translationX=g,C.translationY=h,n.forEach(w=>w.dispatchEvent(C)),m||this.inertia(i,n,l,a,u,f+g,c,d,r+h)})}onTouchMove(i){const n=Date.now();for(let t=0,a=i.changedTouches.length;t3&&(f.rollingPageX.shift(),f.rollingPageY.shift(),f.rollingTimestamps.shift()),f.rollingPageX.push(u.pageX),f.rollingPageY.push(u.pageY),f.rollingTimestamps.push(n)}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}}e.Gesture=b,b.SCROLL_FRICTION=-.005,b.HOLD_DELAY=700,b.CLEAR_TAP_COUNT_TIME=400,Ee([E.memoize],b,"isTouchDevice",null)}),define(ie[51],ne([1,0,7,403]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const k=2e4;let y,E,_,p,S;function v(n){y=document.createElement("div"),y.className="monaco-aria-container";const t=()=>{const u=document.createElement("div");return u.className="monaco-alert",u.setAttribute("role","alert"),u.setAttribute("aria-atomic","true"),y.appendChild(u),u};E=t(),_=t();const a=()=>{const u=document.createElement("div");return u.className="monaco-status",u.setAttribute("aria-live","polite"),u.setAttribute("aria-atomic","true"),y.appendChild(u),u};p=a(),S=a(),n.appendChild(y)}e.setARIAContainer=v;function b(n){y&&(E.textContent!==n?(L.clearNode(_),i(E,n)):(L.clearNode(E),i(_,n)))}e.alert=b;function o(n){y&&(p.textContent!==n?(L.clearNode(S),i(p,n)):(L.clearNode(p),i(S,n)))}e.status=o;function i(n,t){L.clearNode(n),t.length>k&&(t=t.substr(0,k)),n.textContent=t,n.style.visibility="hidden",n.style.visibility="visible"}}),define(ie[314],ne([1,0,219,7,2,17,170,407]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=e.isAnchor=void 0;function p(i){const n=i;return!!n&&typeof n.x=="number"&&typeof n.y=="number"}e.isAnchor=p;var S;(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(S||(e.LayoutAnchorMode=S={}));function v(i,n,t){const a=t.mode===S.ALIGN?t.offset:t.offset+t.size,u=t.mode===S.ALIGN?t.offset+t.size:t.offset;return t.position===0?n<=i-a?a:n<=u?u-n:Math.max(i-n,0):n<=u?u-n:n<=i-a?a:0}e.layout=v;class b extends y.Disposable{constructor(n,t){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=y.Disposable.None,this.toDisposeOnSetContainer=y.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=k.$(".context-view"),k.hide(this.view),this.setContainer(n,t),this._register((0,y.toDisposable)(()=>this.setContainer(null,1)))}setContainer(n,t){var a;this.useFixedPosition=t!==1;const u=this.useShadowDOM;if(this.useShadowDOM=t===3,!(n===this.container&&u!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(a=this.shadowRootHostElement)===null||a===void 0||a.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),n)){if(this.container=n,this.useShadowDOM){this.shadowRootHostElement=k.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const c=document.createElement("style");c.textContent=o,this.shadowRoot.appendChild(c),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(k.$("slot"))}else this.container.appendChild(this.view);const f=new y.DisposableStore;b.BUBBLE_UP_EVENTS.forEach(c=>{f.add(k.addStandardDisposableListener(this.container,c,d=>{this.onDOMEvent(d,!1)}))}),b.BUBBLE_DOWN_EVENTS.forEach(c=>{f.add(k.addStandardDisposableListener(this.container,c,d=>{this.onDOMEvent(d,!0)},!0))}),this.toDisposeOnSetContainer=f}}show(n){var t,a;this.isVisible()&&this.hide(),k.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",k.show(this.view),this.toDisposeOnClean=n.render(this.view)||y.Disposable.None,this.delegate=n,this.doLayout(),(a=(t=this.delegate).focus)===null||a===void 0||a.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(E.isIOS&&L.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const n=this.delegate.getAnchor();let t;if(n instanceof HTMLElement){const h=k.getDomNodePagePosition(n),m=k.getDomNodeZoomLevel(n);t={top:h.top*m,left:h.left*m,width:h.width*m,height:h.height*m}}else p(n)?t={top:n.y,left:n.x,width:n.width||1,height:n.height||2}:t={top:n.posy,left:n.posx,width:2,height:2};const a=k.getTotalWidth(this.view),u=k.getTotalHeight(this.view),f=this.delegate.anchorPosition||0,c=this.delegate.anchorAlignment||0,d=this.delegate.anchorAxisAlignment||0;let r,l;const s=k.getActiveWindow();if(d===0){const h={offset:t.top-s.pageYOffset,size:t.height,position:f===0?0:1},m={offset:t.left,size:t.width,position:c===0?0:1,mode:S.ALIGN};r=v(s.innerHeight,u,h)+s.pageYOffset,_.Range.intersects({start:r,end:r+u},{start:h.offset,end:h.offset+h.size})&&(m.mode=S.AVOID),l=v(s.innerWidth,a,m)}else{const h={offset:t.left,size:t.width,position:c===0?0:1},m={offset:t.top,size:t.height,position:f===0?0:1,mode:S.ALIGN};l=v(s.innerWidth,a,h),_.Range.intersects({start:l,end:l+a},{start:h.offset,end:h.offset+h.size})&&(m.mode=S.AVOID),r=v(s.innerHeight,u,m)+s.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(f===0?"bottom":"top"),this.view.classList.add(c===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const g=k.getDomNodePagePosition(this.container);this.view.style.top=`${r-(this.useFixedPosition?k.getDomNodePagePosition(this.view).top:g.top)}px`,this.view.style.left=`${l-(this.useFixedPosition?k.getDomNodePagePosition(this.view).left:g.left)}px`,this.view.style.width="initial"}hide(n){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(n),this.toDisposeOnClean.dispose(),k.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(n,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(n,k.getWindow(n).document.activeElement):t&&!k.isAncestor(n.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=b,b.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],b.BUBBLE_DOWN_EVENTS=["click"];const o=` :host { all: initial; /* 1st rule so subsequent properties are reset. */ } .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(ie[315],ne([1,0,7,12,408]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class y{constructor(_,p,S){this.options=p,this.styles=S,this.count=0,this.element=(0,L.append)(_,(0,L.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(_){this.count=_,this.render()}setTitleFormat(_){this.titleFormat=_,this.render()}render(){var _,p;this.element.textContent=(0,k.format)(this.countFormat,this.count),this.element.title=(0,k.format)(this.titleFormat,this.count),this.element.style.backgroundColor=(_=this.styles.badgeBackground)!==null&&_!==void 0?_:"",this.element.style.color=(p=this.styles.badgeForeground)!==null&&p!==void 0?p:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}e.CountBadge=y}),define(ie[583],ne([1,0,7,50,63,41,6,270]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class p extends E.ActionRunner{constructor(b,o){super(),this._onDidChangeVisibility=this._register(new _.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,L.append)(b,(0,L.$)(".monaco-dropdown")),this._label=(0,L.append)(this._element,(0,L.$)(".dropdown-label"));let i=o.labelRenderer;i||(i=t=>(t.textContent=o.label||"",null));for(const t of[L.EventType.CLICK,L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this.element,t,a=>L.EventHelper.stop(a,!0)));for(const t of[L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this._label,t,a=>{(0,L.isMouseEvent)(a)&&(a.detail>1||a.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,L.addDisposableListener)(this._label,L.EventType.KEY_UP,t=>{const a=new k.StandardKeyboardEvent(t);(a.equals(3)||a.equals(10))&&(L.EventHelper.stop(t,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(y.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}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)}}class S extends p{constructor(b,o){super(b,o),this._options=o,this._actions=[],this.actions=o.actions||[]}set menuOptions(b){this._menuOptions=b}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(b){this._actions=b}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(b,o)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(b,o):void 0,getKeyBinding:b=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(b):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=S}),define(ie[115],ne([1,0,7,27]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const y=new RegExp(`(\\\\)?\\$\\((${k.ThemeIcon.iconNameExpression}(?:${k.ThemeIcon.iconModifierExpression})?)\\)`,"g");function E(p){const S=new Array;let v,b=0,o=0;for(;(v=y.exec(p))!==null;){o=v.index||0,b{b=o===`\r `?-1:0,i+=v;for(const n of S)n.end<=i||(n.start>=i&&(n.start+=b),n.end>=i&&(n.end+=b));return v+=b,"\u23CE"})}}e.HighlightedLabel=E}),define(ie[225],ne([1,0,7,218,55,568,412]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const _=L.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class p{constructor(v,b,o){this.os=b,this.keyElements=new Set,this.options=o||Object.create(null);const i=this.options.keybindingLabelForeground;this.domNode=L.append(v,_(".monaco-keybinding")),i&&(this.domNode.style.color=i),this.didEverRender=!1,v.appendChild(this.domNode)}get element(){return this.domNode}set(v,b){this.didEverRender&&this.keybinding===v&&p.areSame(this.matches,b)||(this.keybinding=v,this.matches=b,this.render())}render(){var v;if(this.clear(),this.keybinding){const b=this.keybinding.getChords();b[0]&&this.renderChord(this.domNode,b[0],this.matches?this.matches.firstPart:null);for(let i=1;i{for(const S of _)this.getRenderer(p).disposeTemplate(S.templateData),S.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(_){const p=this.renderers.get(_);if(!p)throw new Error(`No renderer found for ${_}`);return p}}e.RowCache=y}),define(ie[585],ne([1,0,7,14,2,414]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const E="done",_="active",p="infinite",S="infinite-long-running",v="discrete";class b extends y.Disposable{constructor(i,n){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new k.RunOnceScheduler(()=>(0,L.show)(this.element),0)),this.longRunningScheduler=this._register(new k.RunOnceScheduler(()=>this.infiniteLongRunning(),b.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(i,n)}create(i,n){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),i.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=n?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(_,p,S,v),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(i){return this.element.classList.add(E),this.element.classList.contains(p)?(this.bit.style.opacity="0",i?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",i?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(v,E,S),this.element.classList.add(_,p),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(S)}getContainer(){return this.element}}e.ProgressBar=b,b.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(ie[157],ne([1,0,7,83,63,14,106,6,2,17,415]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const b=!1;var o;(function(l){l.North="north",l.South="south",l.East="east",l.West="west"})(o||(e.OrthogonalEdge=o={}));let i=4;const n=new p.Emitter;let t=300;const a=new p.Emitter;class u{constructor(s){this.el=s,this.disposables=new S.DisposableStore}get onPointerMove(){return this.disposables.add(new k.DomEmitter((0,L.getWindow)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter((0,L.getWindow)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}Ee([_.memoize],u.prototype,"onPointerMove",null),Ee([_.memoize],u.prototype,"onPointerUp",null);class f{get onPointerMove(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new k.DomEmitter(this.el,y.EventType.End)).event}constructor(s){this.el=s,this.disposables=new S.DisposableStore}dispose(){this.disposables.dispose()}}Ee([_.memoize],f.prototype,"onPointerMove",null),Ee([_.memoize],f.prototype,"onPointerUp",null);class c{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(s){this.factory=s}dispose(){}}Ee([_.memoize],c.prototype,"onPointerMove",null),Ee([_.memoize],c.prototype,"onPointerUp",null);const d="pointer-events-disabled";class r extends S.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(s){this._state!==s&&(this.el.classList.toggle("disabled",s===0),this.el.classList.toggle("minimum",s===1),this.el.classList.toggle("maximum",s===2),this._state=s,this.onDidEnablementChange.fire(s))}set orthogonalStartSash(s){if(this._orthogonalStartSash!==s){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),s){const g=h=>{this.orthogonalStartDragHandleDisposables.clear(),h!==0&&(this._orthogonalStartDragHandle=(0,L.append)(this.el,(0,L.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,S.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>r.onMouseEnter(s),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>r.onMouseLeave(s),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(s.onDidEnablementChange.event(g,this)),g(s.state)}this._orthogonalStartSash=s}}set orthogonalEndSash(s){if(this._orthogonalEndSash!==s){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),s){const g=h=>{this.orthogonalEndDragHandleDisposables.clear(),h!==0&&(this._orthogonalEndDragHandle=(0,L.append)(this.el,(0,L.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,S.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>r.onMouseEnter(s),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>r.onMouseLeave(s),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(s.onDidEnablementChange.event(g,this)),g(s.state)}this._orthogonalEndSash=s}}constructor(s,g,h){super(),this.hoverDelay=t,this.hoverDelayer=this._register(new E.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new p.Emitter),this._onDidStart=this._register(new p.Emitter),this._onDidChange=this._register(new p.Emitter),this._onDidReset=this._register(new p.Emitter),this._onDidEnd=this._register(new p.Emitter),this.orthogonalStartSashDisposables=this._register(new S.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new S.DisposableStore),this.orthogonalEndSashDisposables=this._register(new S.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new S.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,L.append)(s,(0,L.$)(".monaco-sash")),h.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${h.orthogonalEdge}`),v.isMacintosh&&this.el.classList.add("mac");const m=this._register(new k.DomEmitter(this.el,"mousedown")).event;this._register(m(O=>this.onPointerStart(O,new u(s)),this));const C=this._register(new k.DomEmitter(this.el,"dblclick")).event;this._register(C(this.onPointerDoublePress,this));const w=this._register(new k.DomEmitter(this.el,"mouseenter")).event;this._register(w(()=>r.onMouseEnter(this)));const D=this._register(new k.DomEmitter(this.el,"mouseleave")).event;this._register(D(()=>r.onMouseLeave(this))),this._register(y.Gesture.addTarget(this.el));const I=this._register(new k.DomEmitter(this.el,y.EventType.Start)).event;this._register(I(O=>this.onPointerStart(O,new f(this.el)),this));const M=this._register(new k.DomEmitter(this.el,y.EventType.Tap)).event;let A;this._register(M(O=>{if(A){clearTimeout(A),A=void 0,this.onPointerDoublePress(O);return}clearTimeout(A),A=setTimeout(()=>A=void 0,250)},this)),typeof h.size=="number"?(this.size=h.size,h.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(n.event(O=>{this.size=O,this.layout()}))),this._register(a.event(O=>this.hoverDelay=O)),this.layoutProvider=g,this.orthogonalStartSash=h.orthogonalStartSash,this.orthogonalEndSash=h.orthogonalEndSash,this.orientation=h.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",b),this.layout()}onPointerStart(s,g){L.EventHelper.stop(s);let h=!1;if(!s.__orthogonalSashEvent){const P=this.getOrthogonalSash(s);P&&(h=!0,s.__orthogonalSashEvent=!0,P.onPointerStart(s,new c(g)))}if(this.linkedSash&&!s.__linkedSashEvent&&(s.__linkedSashEvent=!0,this.linkedSash.onPointerStart(s,new c(g))),!this.state)return;const m=this.el.ownerDocument.getElementsByTagName("iframe");for(const P of m)P.classList.add(d);const C=s.pageX,w=s.pageY,D=s.altKey,I={startX:C,currentX:C,startY:w,currentY:w,altKey:D};this.el.classList.add("active"),this._onDidStart.fire(I);const M=(0,L.createStyleSheet)(this.el),A=()=>{let P="";h?P="all-scroll":this.orientation===1?this.state===1?P="s-resize":this.state===2?P="n-resize":P=v.isMacintosh?"row-resize":"ns-resize":this.state===1?P="e-resize":this.state===2?P="w-resize":P=v.isMacintosh?"col-resize":"ew-resize",M.textContent=`* { cursor: ${P} !important; }`},O=new S.DisposableStore;A(),h||this.onDidEnablementChange.event(A,null,O);const T=P=>{L.EventHelper.stop(P,!1);const x={startX:C,currentX:P.pageX,startY:w,currentY:P.pageY,altKey:D};this._onDidChange.fire(x)},N=P=>{L.EventHelper.stop(P,!1),this.el.removeChild(M),this.el.classList.remove("active"),this._onDidEnd.fire(),O.dispose();for(const x of m)x.classList.remove(d)};g.onPointerMove(T,null,O),g.onPointerUp(N,null,O),O.add(g)}onPointerDoublePress(s){const g=this.getOrthogonalSash(s);g&&g._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(s,g=!1){s.el.classList.contains("active")?(s.hoverDelayer.cancel(),s.el.classList.add("hover")):s.hoverDelayer.trigger(()=>s.el.classList.add("hover"),s.hoverDelay).then(void 0,()=>{}),!g&&s.linkedSash&&r.onMouseEnter(s.linkedSash,!0)}static onMouseLeave(s,g=!1){s.hoverDelayer.cancel(),s.el.classList.remove("hover"),!g&&s.linkedSash&&r.onMouseLeave(s.linkedSash,!0)}clearSashHoverState(){r.onMouseLeave(this)}layout(){if(this.orientation===0){const s=this.layoutProvider;this.el.style.left=s.getVerticalSashLeft(this)-this.size/2+"px",s.getVerticalSashTop&&(this.el.style.top=s.getVerticalSashTop(this)+"px"),s.getVerticalSashHeight&&(this.el.style.height=s.getVerticalSashHeight(this)+"px")}else{const s=this.layoutProvider;this.el.style.top=s.getHorizontalSashTop(this)-this.size/2+"px",s.getHorizontalSashLeft&&(this.el.style.left=s.getHorizontalSashLeft(this)+"px"),s.getHorizontalSashWidth&&(this.el.style.width=s.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(s){var g;const h=(g=s.initialTarget)!==null&&g!==void 0?g:s.target;if(!(!h||!(h instanceof HTMLElement))&&h.classList.contains("orthogonal-drag-handle"))return h.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=r}),define(ie[226],ne([1,0,7,157,6,2]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class _{constructor(){this._onDidWillResize=new y.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new y.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new E.DisposableStore,this._size=new L.Dimension(0,0),this._minSize=new L.Dimension(0,0),this._maxSize=new L.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new k.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new k.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new k.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:k.OrthogonalEdge.North}),this._southSash=new k.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:k.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let S,v=0,b=0;this._sashListener.add(y.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{S===void 0&&(this._onDidWillResize.fire(),S=this._size,v=0,b=0)})),this._sashListener.add(y.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{S!==void 0&&(S=void 0,v=0,b=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(o=>{S&&(b=o.currentX-o.startX,this.layout(S.height+v,S.width+b),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(o=>{S&&(b=-(o.currentX-o.startX),this.layout(S.height+v,S.width+b),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(o=>{S&&(v=-(o.currentY-o.startY),this.layout(S.height+v,S.width+b),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(o=>{S&&(v=o.currentY-o.startY,this.layout(S.height+v,S.width+b),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(y.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(o=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(y.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(o=>{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(S,v,b,o){this._northSash.state=S?3:0,this._eastSash.state=v?3:0,this._southSash.state=b?3:0,this._westSash.state=o?3:0}layout(S=this.size.height,v=this.size.width){const{height:b,width:o}=this._minSize,{height:i,width:n}=this._maxSize;S=Math.max(b,Math.min(i,S)),v=Math.max(o,Math.min(n,v));const t=new L.Dimension(v,S);L.Dimension.equals(t,this._size)||(this.domNode.style.height=S+"px",this.domNode.style.width=v+"px",this._size=t,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(S){this._maxSize=S}get maxSize(){return this._maxSize}set minSize(S){this._minSize=S}get minSize(){return this._minSize}set preferredSize(S){this._preferredSize=S}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=_}),define(ie[586],ne([1,0,7,63,13,6,2,17]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class S extends _.Disposable{constructor(b,o,i,n){super(),this.selected=0,this.selectBoxOptions=n||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 E.Emitter),this.styles=i,this.registerListeners(),this.setOptions(b,o)}registerListeners(){this._register(k.Gesture.addTarget(this.selectElement)),[k.EventType.Tap].forEach(b=>{this._register(L.addDisposableListener(this.selectElement,b,o=>{this.selectElement.focus()}))}),this._register(L.addStandardDisposableListener(this.selectElement,"click",b=>{L.EventHelper.stop(b,!0)})),this._register(L.addStandardDisposableListener(this.selectElement,"change",b=>{this.selectElement.title=b.target.value,this._onDidSelect.fire({index:b.target.selectedIndex,selected:b.target.value})})),this._register(L.addStandardDisposableListener(this.selectElement,"keydown",b=>{let o=!1;p.isMacintosh?(b.keyCode===18||b.keyCode===16||b.keyCode===10)&&(o=!0):(b.keyCode===18&&b.altKey||b.keyCode===10||b.keyCode===3)&&(o=!0),o&&b.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(b,o){(!this.options||!y.equals(this.options,b))&&(this.options=b,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled))})),o!==void 0&&this.select(o)}select(b){this.options.length===0?this.selected=0:b>=0&&bthis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectedb(new y.StandardMouseEvent(L.getWindow(v),o))))}onmousedown(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_DOWN,o=>b(new y.StandardMouseEvent(L.getWindow(v),o))))}onmouseover(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_OVER,o=>b(new y.StandardMouseEvent(L.getWindow(v),o))))}onmouseleave(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_LEAVE,o=>b(new y.StandardMouseEvent(L.getWindow(v),o))))}onkeydown(v,b){this._register(L.addDisposableListener(v,L.EventType.KEY_DOWN,o=>b(new k.StandardKeyboardEvent(o))))}onkeyup(v,b){this._register(L.addDisposableListener(v,L.EventType.KEY_UP,o=>b(new k.StandardKeyboardEvent(o))))}oninput(v,b){this._register(L.addDisposableListener(v,L.EventType.INPUT,b))}onblur(v,b){this._register(L.addDisposableListener(v,L.EventType.BLUR,b))}onfocus(v,b){this._register(L.addDisposableListener(v,L.EventType.FOCUS,b))}ignoreGesture(v){return E.Gesture.ignoreTarget(v)}}e.Widget=p}),define(ie[227],ne([1,0,156,86,14,27,7]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class p extends k.Widget{constructor(v){super(),this._onActivate=v.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=v.bgWidth+"px",this.bgDomNode.style.height=v.bgHeight+"px",typeof v.top<"u"&&(this.bgDomNode.style.top="0px"),typeof v.left<"u"&&(this.bgDomNode.style.left="0px"),typeof v.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof v.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=v.className,this.domNode.classList.add(...E.ThemeIcon.asClassNameArray(v.icon)),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof v.top<"u"&&(this.domNode.style.top=v.top+"px"),typeof v.left<"u"&&(this.domNode.style.left=v.left+"px"),typeof v.bottom<"u"&&(this.domNode.style.bottom=v.bottom+"px"),typeof v.right<"u"&&(this.domNode.style.right=v.right+"px"),this._pointerMoveMonitor=this._register(new L.GlobalPointerMoveMonitor),this._register(_.addStandardDisposableListener(this.bgDomNode,_.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._register(_.addStandardDisposableListener(this.domNode,_.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._pointerdownRepeatTimer=this._register(new _.WindowIntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new y.TimeoutTimer)}_arrowPointerDown(v){if(!v.target||!(v.target instanceof Element))return;const b=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,_.getWindow(v))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(b,200),this._pointerMoveMonitor.startMonitoring(v.target,v.pointerId,v.buttons,o=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),v.preventDefault()}}e.ScrollbarArrow=p}),define(ie[317],ne([1,0,7,40,156,227,578,86,17]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const v=140;class b extends p.Widget{constructor(i){super(),this._lazyRender=i.lazyRender,this._host=i.host,this._scrollable=i.scrollable,this._scrollByPage=i.scrollByPage,this._scrollbarState=i.scrollbarState,this._visibilityController=this._register(new _.ScrollbarVisibilityController(i.visibility,"visible scrollbar "+i.extraScrollbarClassName,"invisible scrollbar "+i.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new y.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,k.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(L.addDisposableListener(this.domNode.domNode,L.EventType.POINTER_DOWN,n=>this._domNodePointerDown(n)))}_createArrow(i){const n=this._register(new E.ScrollbarArrow(i));this.domNode.domNode.appendChild(n.bgDomNode),this.domNode.domNode.appendChild(n.domNode)}_createSlider(i,n,t,a){this.slider=(0,k.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(i),this.slider.setLeft(n),typeof t=="number"&&this.slider.setWidth(t),typeof a=="number"&&this.slider.setHeight(a),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(L.addDisposableListener(this.slider.domNode,L.EventType.POINTER_DOWN,u=>{u.button===0&&(u.preventDefault(),this._sliderPointerDown(u))})),this.onclick(this.slider.domNode,u=>{u.leftButton&&u.stopPropagation()})}_onElementSize(i){return this._scrollbarState.setVisibleSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(i){return this._scrollbarState.setScrollSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(i){return this._scrollbarState.setScrollPosition(i)&&(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(i){i.target===this.domNode.domNode&&this._onPointerDown(i)}delegatePointerDown(i){const n=this.domNode.domNode.getClientRects()[0].top,t=n+this._scrollbarState.getSliderPosition(),a=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),u=this._sliderPointerPosition(i);t<=u&&u<=a?i.button===0&&(i.preventDefault(),this._sliderPointerDown(i)):this._onPointerDown(i)}_onPointerDown(i){let n,t;if(i.target===this.domNode.domNode&&typeof i.offsetX=="number"&&typeof i.offsetY=="number")n=i.offsetX,t=i.offsetY;else{const u=L.getDomNodePagePosition(this.domNode.domNode);n=i.pageX-u.left,t=i.pageY-u.top}const a=this._pointerDownRelativePosition(n,t);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(a):this._scrollbarState.getDesiredScrollPositionFromOffset(a)),i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))}_sliderPointerDown(i){if(!i.target||!(i.target instanceof Element))return;const n=this._sliderPointerPosition(i),t=this._sliderOrthogonalPointerPosition(i),a=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(i.target,i.pointerId,i.buttons,u=>{const f=this._sliderOrthogonalPointerPosition(u),c=Math.abs(f-t);if(S.isWindows&&c>v){this._setDesiredScrollPositionNow(a.getScrollPosition());return}const r=this._sliderPointerPosition(u)-n;this._setDesiredScrollPositionNow(a.getDesiredScrollPositionFromDelta(r))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(i){const n={};this.writeScrollPosition(n,i),this._scrollable.setScrollPositionNow(n)}updateScrollbarSize(i){this._updateScrollbarSize(i),this._scrollbarState.setScrollbarSize(i),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=b}),define(ie[587],ne([1,0,67,317,227,197,26]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class p extends k.AbstractScrollbar{constructor(v,b,o){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:o,scrollbarState:new E.ScrollbarState(b.horizontalHasArrows?b.arrowSize:0,b.horizontal===2?0:b.horizontalScrollbarSize,b.vertical===2?0:b.verticalScrollbarSize,i.width,i.scrollWidth,n.scrollLeft),visibility:b.horizontal,extraScrollbarClassName:"horizontal",scrollable:v,scrollByPage:b.scrollByPage}),b.horizontalHasArrows){const t=(b.arrowSize-y.ARROW_IMG_SIZE)/2,a=(b.horizontalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:_.Codicon.scrollbarButtonLeft,top:a,left:t,bottom:void 0,right:void 0,bgWidth:b.arrowSize,bgHeight:b.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:_.Codicon.scrollbarButtonRight,top:a,left:void 0,bottom:void 0,right:t,bgWidth:b.arrowSize,bgHeight:b.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((b.horizontalScrollbarSize-b.horizontalSliderSize)/2),0,void 0,b.horizontalSliderSize)}_updateSlider(v,b){this.slider.setWidth(v),this.slider.setLeft(b)}_renderDomNode(v,b){this.domNode.setWidth(v),this.domNode.setHeight(b),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(v){return this._shouldRender=this._onElementScrollSize(v.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(v.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(v.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(v,b){return v}_sliderPointerPosition(v){return v.pageX}_sliderOrthogonalPointerPosition(v){return v.pageY}_updateScrollbarSize(v){this.slider.setHeight(v)}writeScrollPosition(v,b){v.scrollLeft=b}updateOptions(v){this.updateScrollbarSize(v.horizontal===2?0:v.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(v.vertical===2?0:v.verticalScrollbarSize),this._visibilityController.setVisibility(v.horizontal),this._scrollByPage=v.scrollByPage}}e.HorizontalScrollbar=p}),define(ie[588],ne([1,0,67,317,227,197,26]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class p extends k.AbstractScrollbar{constructor(v,b,o){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:o,scrollbarState:new E.ScrollbarState(b.verticalHasArrows?b.arrowSize:0,b.vertical===2?0:b.verticalScrollbarSize,0,i.height,i.scrollHeight,n.scrollTop),visibility:b.vertical,extraScrollbarClassName:"vertical",scrollable:v,scrollByPage:b.scrollByPage}),b.verticalHasArrows){const t=(b.arrowSize-y.ARROW_IMG_SIZE)/2,a=(b.verticalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:_.Codicon.scrollbarButtonUp,top:t,left:a,bottom:void 0,right:void 0,bgWidth:b.verticalScrollbarSize,bgHeight:b.arrowSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:_.Codicon.scrollbarButtonDown,top:void 0,left:a,bottom:t,right:void 0,bgWidth:b.verticalScrollbarSize,bgHeight:b.arrowSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((b.verticalScrollbarSize-b.verticalSliderSize)/2),b.verticalSliderSize,void 0)}_updateSlider(v,b){this.slider.setHeight(v),this.slider.setTop(b)}_renderDomNode(v,b){this.domNode.setWidth(b),this.domNode.setHeight(v),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(v){return this._shouldRender=this._onElementScrollSize(v.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(v.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(v.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(v,b){return b}_sliderPointerPosition(v){return v.pageY}_sliderOrthogonalPointerPosition(v){return v.pageX}_updateScrollbarSize(v){this.slider.setWidth(v)}writeScrollPosition(v,b){v.scrollTop=b}updateOptions(v){this.updateScrollbarSize(v.vertical===2?0:v.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(v.vertical),this._scrollByPage=v.scrollByPage}}e.VerticalScrollbar=p}),define(ie[76],ne([1,0,54,7,40,67,587,588,86,14,6,2,17,145,416]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const t=500,a=50,u=!0;class f{constructor(m,C,w){this.timestamp=m,this.deltaX=C,this.deltaY=w,this.score=0}}class c{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let m=1,C=0,w=1,D=this._rear;do{const I=D===this._front?m:Math.pow(2,-w);if(m-=I,C+=this._memory[D].score*I,D===this._front)break;D=(this._capacity+D-1)%this._capacity,w++}while(!0);return C<=.5}acceptStandardWheelEvent(m){const C=k.getWindow(m.browserEvent).devicePixelRatio/(0,L.getZoomFactor)();i.isWindows||i.isLinux?this.accept(Date.now(),m.deltaX/C,m.deltaY/C):this.accept(Date.now(),m.deltaX,m.deltaY)}accept(m,C,w){const D=new f(m,C,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(m){if(Math.abs(m.deltaX)>0&&Math.abs(m.deltaY)>0)return 1;let C=.5;const w=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(m.deltaX)||!this._isAlmostInt(m.deltaY))&&(C+=.25),Math.min(Math.max(C,0),1)}_isAlmostInt(m){return Math.abs(Math.round(m)-m)<.01}}e.MouseWheelClassifier=c,c.INSTANCE=new c;class d extends S.Widget{get options(){return this._options}constructor(m,C,w){super(),this._onScroll=this._register(new b.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new b.Emitter),m.style.overflow="hidden",this._options=g(C),this._scrollable=w,this._register(this._scrollable.onScroll(I=>{this._onWillScroll.fire(I),this._onDidScroll(I),this._onScroll.fire(I)}));const D={onMouseWheel:I=>this._onMouseWheel(I),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new p.VerticalScrollbar(this._scrollable,this._options,D)),this._horizontalScrollbar=this._register(new _.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(m),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,y.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,I=>this._onMouseOver(I)),this.onmouseleave(this._listenOnDomNode,I=>this._onMouseLeave(I)),this._hideTimeout=this._register(new v.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,o.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(m){this._verticalScrollbar.delegatePointerDown(m)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(m){this._scrollable.setScrollDimensions(m,!1)}updateClassName(m){this._options.className=m,i.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(m){typeof m.handleMouseWheel<"u"&&(this._options.handleMouseWheel=m.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof m.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=m.mouseWheelScrollSensitivity),typeof m.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=m.fastScrollSensitivity),typeof m.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=m.scrollPredominantAxis),typeof m.horizontal<"u"&&(this._options.horizontal=m.horizontal),typeof m.vertical<"u"&&(this._options.vertical=m.vertical),typeof m.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=m.horizontalScrollbarSize),typeof m.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=m.verticalScrollbarSize),typeof m.scrollByPage<"u"&&(this._options.scrollByPage=m.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(m){this._onMouseWheel(new E.StandardWheelEvent(m))}_setListeningToMouseWheel(m){if(this._mouseWheelToDispose.length>0!==m&&(this._mouseWheelToDispose=(0,o.dispose)(this._mouseWheelToDispose),m)){const w=D=>{this._onMouseWheel(new E.StandardWheelEvent(D))};this._mouseWheelToDispose.push(k.addDisposableListener(this._listenOnDomNode,k.EventType.MOUSE_WHEEL,w,{passive:!1}))}}_onMouseWheel(m){var C;if(!((C=m.browserEvent)===null||C===void 0)&&C.defaultPrevented)return;const w=c.INSTANCE;u&&w.acceptStandardWheelEvent(m);let D=!1;if(m.deltaY||m.deltaX){let M=m.deltaY*this._options.mouseWheelScrollSensitivity,A=m.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&A+M===0?A=M=0:Math.abs(M)>=Math.abs(A)?A=0:M=0),this._options.flipAxes&&([M,A]=[A,M]);const O=!i.isMacintosh&&m.browserEvent&&m.browserEvent.shiftKey;(this._options.scrollYToX||O)&&!A&&(A=M,M=0),m.browserEvent&&m.browserEvent.altKey&&(A=A*this._options.fastScrollSensitivity,M=M*this._options.fastScrollSensitivity);const T=this._scrollable.getFutureScrollPosition();let N={};if(M){const P=a*M,x=T.scrollTop-(P<0?Math.floor(P):Math.ceil(P));this._verticalScrollbar.writeScrollPosition(N,x)}if(A){const P=a*A,x=T.scrollLeft-(P<0?Math.floor(P):Math.ceil(P));this._horizontalScrollbar.writeScrollPosition(N,x)}N=this._scrollable.validateScrollPosition(N),(T.scrollLeft!==N.scrollLeft||T.scrollTop!==N.scrollTop)&&(u&&this._options.mouseWheelSmoothScroll&&w.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(N):this._scrollable.setScrollPositionNow(N),D=!0)}let I=D;!I&&this._options.alwaysConsumeMouseWheel&&(I=!0),!I&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(I=!0),I&&(m.preventDefault(),m.stopPropagation())}_onDidScroll(m){this._shouldRender=this._horizontalScrollbar.onDidScroll(m)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(m)||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 m=this._scrollable.getCurrentScrollPosition(),C=m.scrollTop>0,w=m.scrollLeft>0,D=w?" left":"",I=C?" top":"",M=w||C?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${D}`),this._topShadowDomNode.setClassName(`shadow${I}`),this._topLeftShadowDomNode.setClassName(`shadow${M}${I}${D}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(m){this._mouseIsOver=!1,this._hide()}_onMouseOver(m){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(),t)}}e.AbstractScrollableElement=d;class r extends d{constructor(m,C){C=C||{},C.mouseWheelSmoothScroll=!1;const w=new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>k.scheduleAtNextAnimationFrame(k.getWindow(m),D)});super(m,C,w),this._register(w)}setScrollPosition(m){this._scrollable.setScrollPositionNow(m)}}e.ScrollableElement=r;class l extends d{constructor(m,C,w){super(m,C,w)}setScrollPosition(m){m.reuseAnimation?this._scrollable.setScrollPositionSmooth(m,m.reuseAnimation):this._scrollable.setScrollPositionNow(m)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=l;class s extends d{constructor(m,C){C=C||{},C.mouseWheelSmoothScroll=!1;const w=new n.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>k.scheduleAtNextAnimationFrame(k.getWindow(m),D)});super(m,C,w),this._register(w),this._element=m,this._register(this.onScroll(D=>{D.scrollTopChanged&&(this._element.scrollTop=D.scrollTop),D.scrollLeftChanged&&(this._element.scrollLeft=D.scrollLeft)})),this.scanDomNode()}setScrollPosition(m){this._scrollable.setScrollPositionNow(m)}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=s;function g(h){const m={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 m.horizontalSliderSize=typeof h.horizontalSliderSize<"u"?h.horizontalSliderSize:m.horizontalScrollbarSize,m.verticalSliderSize=typeof h.verticalSliderSize<"u"?h.verticalSliderSize:m.verticalScrollbarSize,i.isMacintosh&&(m.className+=" mac"),m}}),define(ie[318],ne([1,0,7,50,76,2,565,409]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverAccessibleViewHint=e.HoverAction=e.HoverWidget=void 0;const p=L.$;class S extends E.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 y.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=S;class v extends E.Disposable{static render(i,n,t){return new v(i,n,t)}constructor(i,n,t){super(),this.actionContainer=L.append(i,p("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=L.append(this.actionContainer,p("a.action")),this.action.setAttribute("role","button"),n.iconClass&&L.append(this.action,p(`span.icon.${n.iconClass}`));const a=L.append(this.action,p("span"));a.textContent=t?`${n.label} (${t})`:n.label,this._register(L.addDisposableListener(this.actionContainer,L.EventType.CLICK,u=>{u.stopPropagation(),u.preventDefault(),n.run(this.actionContainer)})),this._register(L.addDisposableListener(this.actionContainer,L.EventType.KEY_DOWN,u=>{const f=new k.StandardKeyboardEvent(u);(f.equals(3)||f.equals(10))&&(u.stopPropagation(),u.preventDefault(),n.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(i){i?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=v;function b(o,i){return o&&i?(0,_.localize)(0,null,i):o?(0,_.localize)(1,null):""}e.getHoverAccessibleViewHint=b}),define(ie[228],ne([1,0,198,7,83,63,76,13,14,106,6,2,170,145,400,584,9]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const f={CurrentDragAndDropData:void 0},c={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(m){return[m]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class d{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=d;class r{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=r;class l{constructor(){this.types=[],this.files=[]}update(C){if(C.types&&this.types.splice(0,this.types.length,...C.types),C.files){this.files.splice(0,this.files.length);for(let w=0;wI,C?.getPosInSet?this.getPosInSet=C.getPosInSet.bind(C):this.getPosInSet=(w,D)=>D+1,C?.getRole?this.getRole=C.getRole.bind(C):this.getRole=w=>"listitem",C?.isChecked?this.isChecked=C.isChecked.bind(C):this.isChecked=w=>{}}}class h{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get scrollableElementDomNode(){return this.scrollableElement.getDomNode()}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(C){if(C!==this._horizontalScrolling){if(C&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=C,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,k.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(C,w,D,I=c){var M,A,O,T,N,P,x,R,B,W,V,U,F;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 S.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=o.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=o.Disposable.None,this.onDragLeaveTimeout=o.Disposable.None,this.disposables=new o.DisposableStore,this._onDidChangeContentHeight=new b.Emitter,this._onDidChangeContentWidth=new b.Emitter,this.onDidChangeContentHeight=b.Event.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),this._horizontalScrolling=!1,I.horizontalScrolling&&I.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new t.RangeMap((M=I.paddingTop)!==null&&M!==void 0?M:0);for(const J of D)this.renderers.set(J.templateId,J);this.cache=this.disposables.add(new a.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 I.mouseSupport=="boolean"?I.mouseSupport:!0),this._horizontalScrolling=(A=I.horizontalScrolling)!==null&&A!==void 0?A:c.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof I.paddingBottom>"u"?0:I.paddingBottom,this.accessibilityProvider=new g(I.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((O=I.transformOptimization)!==null&&O!==void 0?O:c.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(E.Gesture.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(T=I.smoothScrolling)!==null&&T!==void 0&&T?125:0,scheduleAtNextAnimationFrame:J=>(0,k.scheduleAtNextAnimationFrame)((0,k.getWindow)(this.domNode),J)})),this.scrollableElement=this.disposables.add(new _.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(N=I.alwaysConsumeMouseWheel)!==null&&N!==void 0?N:c.alwaysConsumeMouseWheel,horizontal:1,vertical:(P=I.verticalScrollMode)!==null&&P!==void 0?P:c.verticalScrollMode,useShadows:(x=I.useShadows)!==null&&x!==void 0?x:c.useShadows,mouseWheelScrollSensitivity:I.mouseWheelScrollSensitivity,fastScrollSensitivity:I.fastScrollSensitivity,scrollByPage:I.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),C.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,k.addDisposableListener)(this.rowsContainer,E.EventType.Change,J=>this.onTouchChange(J))),this.disposables.add((0,k.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",J=>J.target.scrollTop=0)),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragover",J=>this.onDragOver(this.toDragEvent(J)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"drop",J=>this.onDrop(this.toDragEvent(J)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragleave",J=>this.onDragLeave(this.toDragEvent(J)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragend",J=>this.onDragEnd(J))),this.setRowLineHeight=(R=I.setRowLineHeight)!==null&&R!==void 0?R:c.setRowLineHeight,this.setRowHeight=(B=I.setRowHeight)!==null&&B!==void 0?B:c.setRowHeight,this.supportDynamicHeights=(W=I.supportDynamicHeights)!==null&&W!==void 0?W:c.supportDynamicHeights,this.dnd=(V=I.dnd)!==null&&V!==void 0?V:this.disposables.add(c.dnd),this.layout((U=I.initialSize)===null||U===void 0?void 0:U.height,(F=I.initialSize)===null||F===void 0?void 0:F.width)}updateOptions(C){C.paddingBottom!==void 0&&(this.paddingBottom=C.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),C.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(C.smoothScrolling?125:0),C.horizontalScrolling!==void 0&&(this.horizontalScrolling=C.horizontalScrolling);let w;if(C.scrollByPage!==void 0&&(w={...w??{},scrollByPage:C.scrollByPage}),C.mouseWheelScrollSensitivity!==void 0&&(w={...w??{},mouseWheelScrollSensitivity:C.mouseWheelScrollSensitivity}),C.fastScrollSensitivity!==void 0&&(w={...w??{},fastScrollSensitivity:C.fastScrollSensitivity}),w&&this.scrollableElement.updateOptions(w),C.paddingTop!==void 0&&C.paddingTop!==this.rangeMap.paddingTop){const D=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),I=C.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=C.paddingTop,this.render(D,Math.max(0,this.lastRenderTop+I),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(C,w,D=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(C,w,D)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(C,w,D=[]){const I=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),M={start:C,end:C+w},A=i.Range.intersect(I,M),O=new Map;for(let $=A.end-1;$>=A.start;$--){const te=this.items[$];if(te.dragStartDisposable.dispose(),te.checkedDisposable.dispose(),te.row){let G=O.get(te.templateId);G||(G=[],O.set(te.templateId,G));const de=this.renderers.get(te.templateId);de&&de.disposeElement&&de.disposeElement(te.element,$,te.row.templateData,te.size),G.push(te.row)}te.row=null}const T={start:C+w,end:this.items.length},N=i.Range.intersect(T,I),P=i.Range.relativeComplement(T,I),x=D.map($=>({id:String(this.itemId++),element:$,templateId:this.virtualDelegate.getTemplateId($),size:this.virtualDelegate.getHeight($),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight($),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:o.Disposable.None,checkedDisposable:o.Disposable.None}));let R;C===0&&w>=this.items.length?(this.rangeMap=new t.RangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,x),R=this.items,this.items=x):(this.rangeMap.splice(C,w,x),R=this.items.splice(C,w,...x));const B=D.length-w,W=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),V=(0,t.shift)(N,B),U=i.Range.intersect(W,V);for(let $=U.start;$(0,t.shift)($,B)),le=[{start:C,end:C+D.length},...j].map($=>i.Range.intersect(W,$)),ee=this.getNextToLastElement(le);for(const $ of le)for(let te=$.start;te<$.end;te++){const G=this.items[te],de=O.get(G.templateId),ue=de?.pop();this.insertItemInDOM(te,ee,ue)}for(const $ of O.values())for(const te of $)this.cache.release(te);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),R.map($=>$.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,k.scheduleAtNextAnimationFrame)((0,k.getWindow)(this.domNode),()=>{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 C=0;for(const w of this.items)typeof w.width<"u"&&(C=Math.max(C,w.width));this.scrollWidth=C,this.scrollableElement.setScrollDimensions({scrollWidth:C===0?0:C+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const C of this.items)C.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){return this.getRenderRange(this.lastRenderTop,this.lastRenderHeight).start}element(C){return this.items[C].element}indexOf(C){return this.items.findIndex(w=>w.element===C)}domElement(C){const w=this.items[C].row;return w&&w.domNode}elementHeight(C){return this.items[C].size}elementTop(C){return this.rangeMap.positionAt(C)}indexAt(C){return this.rangeMap.indexAt(C)}indexAfter(C){return this.rangeMap.indexAfter(C)}layout(C,w){const D={height:typeof C=="number"?C:(0,k.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,k.getContentWidth)(this.domNode)})}render(C,w,D,I,M,A=!1){const O=this.getRenderRange(w,D),T=i.Range.relativeComplement(O,C),N=i.Range.relativeComplement(C,O),P=this.getNextToLastElement(T);if(A){const x=i.Range.intersect(C,O);for(let R=x.start;R{for(const x of N)for(let R=x.start;RI.row.domNode.setAttribute("aria-checked",String(!!x));P(O.value),I.checkedDisposable=O.onDidChange(P)}(M||!I.row.domNode.parentElement)&&(w?this.rowsContainer.insertBefore(I.row.domNode,w):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,C);const T=this.renderers.get(I.templateId);if(!T)throw new Error(`No renderer found for template id ${I.templateId}`);T?.renderElement(I.element,C,I.row.templateData,I.size);const N=this.dnd.getDragURI(I.element);I.dragStartDisposable.dispose(),I.row.domNode.draggable=!!N,N&&(I.dragStartDisposable=(0,k.addDisposableListener)(I.row.domNode,"dragstart",P=>this.onDragStart(I.element,N,P))),this.horizontalScrolling&&(this.measureItemWidth(I),this.eventuallyUpdateScrollWidth())}measureItemWidth(C){if(!C.row||!C.row.domNode)return;C.row.domNode.style.width="fit-content",C.width=(0,k.getContentWidth)(C.row.domNode);const w=(0,k.getWindow)(C.row.domNode).getComputedStyle(C.row.domNode);w.paddingLeft&&(C.width+=parseFloat(w.paddingLeft)),w.paddingRight&&(C.width+=parseFloat(w.paddingRight)),C.row.domNode.style.width=""}updateItemInDOM(C,w){C.row.domNode.style.top=`${this.elementTop(w)}px`,this.setRowHeight&&(C.row.domNode.style.height=`${C.size}px`),this.setRowLineHeight&&(C.row.domNode.style.lineHeight=`${C.size}px`),C.row.domNode.setAttribute("data-index",`${w}`),C.row.domNode.setAttribute("data-last-element",w===this.length-1?"true":"false"),C.row.domNode.setAttribute("data-parity",w%2===0?"even":"odd"),C.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(C.element,w,this.length))),C.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(C.element,w))),C.row.domNode.setAttribute("id",this.getElementDomId(w)),C.row.domNode.classList.toggle("drop-target",C.dropTarget)}removeItemFromDOM(C){const w=this.items[C];if(w.dragStartDisposable.dispose(),w.checkedDisposable.dispose(),w.row){const D=this.renderers.get(w.templateId);D&&D.disposeElement&&D.disposeElement(w.element,C,w.row.templateData,w.size),this.cache.release(w.row),w.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(C,w){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:C,reuseAnimation:w})}get scrollTop(){return this.getScrollTop()}set scrollTop(C){this.setScrollTop(C)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"click")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseDblClick(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"dblclick")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseMiddleClick(){return b.Event.filter(b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"auxclick")).event,C=>this.toMouseEvent(C),this.disposables),C=>C.browserEvent.button===1,this.disposables)}get onMouseDown(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mousedown")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOver(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseover")).event,C=>this.toMouseEvent(C),this.disposables)}get onMouseOut(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseout")).event,C=>this.toMouseEvent(C),this.disposables)}get onContextMenu(){return b.Event.any(b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"contextmenu")).event,C=>this.toMouseEvent(C),this.disposables),b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,E.EventType.Contextmenu)).event,C=>this.toGestureEvent(C),this.disposables))}get onTouchStart(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"touchstart")).event,C=>this.toTouchEvent(C),this.disposables)}get onTap(){return b.Event.map(this.disposables.add(new y.DomEmitter(this.rowsContainer,E.EventType.Tap)).event,C=>this.toGestureEvent(C),this.disposables)}toMouseEvent(C){const w=this.getItemIndexFromEventTarget(C.target||null),D=typeof w>"u"?void 0:this.items[w],I=D&&D.element;return{browserEvent:C,index:w,element:I}}toTouchEvent(C){const w=this.getItemIndexFromEventTarget(C.target||null),D=typeof w>"u"?void 0:this.items[w],I=D&&D.element;return{browserEvent:C,index:w,element:I}}toGestureEvent(C){const w=this.getItemIndexFromEventTarget(C.initialTarget||null),D=typeof w>"u"?void 0:this.items[w],I=D&&D.element;return{browserEvent:C,index:w,element:I}}toDragEvent(C){const w=this.getItemIndexFromEventTarget(C.target||null),D=typeof w>"u"?void 0:this.items[w],I=D&&D.element;return{browserEvent:C,index:w,element:I}}onScroll(C){try{const w=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(w,C.scrollTop,C.height,C.scrollLeft,C.scrollWidth),this.supportDynamicHeights&&this._rerender(C.scrollTop,C.height,C.inSmoothScrolling)}catch(w){throw console.error("Got bad scroll event:",C),w}}onTouchChange(C){C.preventDefault(),C.stopPropagation(),this.scrollTop-=C.translationY}onDragStart(C,w,D){var I,M;if(!D.dataTransfer)return;const A=this.dnd.getDragElements(C);if(D.dataTransfer.effectAllowed="copyMove",D.dataTransfer.setData(L.DataTransfers.TEXT,w),D.dataTransfer.setDragImage){let O;this.dnd.getDragLabel&&(O=this.dnd.getDragLabel(A,D)),typeof O>"u"&&(O=String(A.length));const T=(0,k.$)(".monaco-drag-image");T.textContent=O;const P=(x=>{for(;x&&!x.classList.contains("monaco-workbench");)x=x.parentElement;return x||this.domNode.ownerDocument})(this.domNode);P.appendChild(T),D.dataTransfer.setDragImage(T,-10,-10),setTimeout(()=>P.removeChild(T),0)}this.domNode.classList.add("dragging"),this.currentDragData=new d(A),f.CurrentDragAndDropData=new r(A),(M=(I=this.dnd).onDragStart)===null||M===void 0||M.call(I,this.currentDragData,D)}onDragOver(C){var w;if(C.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),f.CurrentDragAndDropData&&f.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(C.browserEvent),!C.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(f.CurrentDragAndDropData)this.currentDragData=f.CurrentDragAndDropData;else{if(!C.browserEvent.dataTransfer.types)return!1;this.currentDragData=new l}const D=this.dnd.onDragOver(this.currentDragData,C.element,C.index,C.browserEvent);if(this.canDrop=typeof D=="boolean"?D:D.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;C.browserEvent.dataTransfer.dropEffect=typeof D!="boolean"&&D.effect===0?"copy":"move";let I;if(typeof D!="boolean"&&D.feedback?I=D.feedback:typeof C.index>"u"?I=[-1]:I=[C.index],I=(0,p.distinct)(I).filter(M=>M>=-1&&MM-A),I=I[0]===-1?[-1]:I,s(this.currentDragFeedback,I))return!0;if(this.currentDragFeedback=I,this.currentDragFeedbackDisposable.dispose(),I[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,o.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const M of I){const A=this.items[M];A.dropTarget=!0,(w=A.row)===null||w===void 0||w.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,o.toDisposable)(()=>{var M;for(const A of I){const O=this.items[A];O.dropTarget=!1,(M=O.row)===null||M===void 0||M.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(C){var w,D;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,S.disposableTimeout)(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((D=(w=this.dnd).onDragLeave)===null||D===void 0||D.call(w,this.currentDragData,C.element,C.index,C.browserEvent))}onDrop(C){if(!this.canDrop)return;const w=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,f.CurrentDragAndDropData=void 0,!(!w||!C.browserEvent.dataTransfer)&&(C.browserEvent.preventDefault(),w.update(C.browserEvent.dataTransfer),this.dnd.drop(w,C.element,C.index,C.browserEvent))}onDragEnd(C){var w,D;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,f.CurrentDragAndDropData=void 0,(D=(w=this.dnd).onDragEnd)===null||D===void 0||D.call(w,C)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=o.Disposable.None}setupDragAndDropScrollTopAnimation(C){if(!this.dragOverAnimationDisposable){const w=(0,k.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,k.animate)((0,k.getWindow)(this.domNode),this.animateDragAndDropScrollTop.bind(this,w))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,S.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=C.pageY}animateDragAndDropScrollTop(C){if(this.dragOverMouseY===void 0)return;const w=this.dragOverMouseY-C,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(C){const w=this.scrollableElement.getDomNode();let D=C;for(;D instanceof HTMLElement&&D!==this.rowsContainer&&w.contains(D);){const I=D.getAttribute("data-index");if(I){const M=Number(I);if(!isNaN(M))return M}D=D.parentElement}}getRenderRange(C,w){return{start:this.rangeMap.indexAt(C),end:this.rangeMap.indexAfter(C+w-1)}}_rerender(C,w,D){const I=this.getRenderRange(C,w);let M,A;C===this.elementTop(I.start)?(M=I.start,A=0):I.end-I.start>1&&(M=I.start+1,A=this.elementTop(M)-C);let O=0;for(;;){const T=this.getRenderRange(C,w);let N=!1;for(let P=T.start;PK.templateData===oe);if(Y>=0){const K=this.renderedElements[Y];this.trait.unrender(oe),K.index=re}else{const K={index:re,templateData:oe};this.renderedElements.push(K)}this.trait.renderIndex(re,oe)}splice(Z,re,oe){const Y=[];for(const K of this.renderedElements)K.index=Z+re&&Y.push({index:K.index+oe-re,templateData:K.templateData});this.renderedElements=Y}renderIndexes(Z){for(const{index:re,templateData:oe}of this.renderedElements)Z.indexOf(re)>-1&&this.trait.renderIndex(re,oe)}disposeTemplate(Z){const re=this.renderedElements.findIndex(oe=>oe.templateData===Z);re<0||this.renderedElements.splice(re,1)}}class s{get name(){return this._trait}get renderer(){return new l(this)}constructor(Z){this._trait=Z,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new i.Emitter,this.onChange=this._onChange.event}splice(Z,re,oe){var Y;re=Math.max(0,Math.min(re,this.length-Z));const K=oe.length-re,H=Z+re,z=[];let se=0;for(;se=H;)z.push(this.sortedIndexes[se++]+K);const q=this.length+K;if(this.sortedIndexes.length>0&&z.length===0&&q>0){const ae=(Y=this.sortedIndexes.find(ce=>ce>=Z))!==null&&Y!==void 0?Y:q-1;z.push(Math.min(ae,q-1))}this.renderer.splice(Z,re,oe.length),this._set(z,z),this.length=q}renderIndex(Z,re){re.classList.toggle(this._trait,this.contains(Z))}unrender(Z){Z.classList.remove(this._trait)}set(Z,re){return this._set(Z,[...Z].sort($),re)}_set(Z,re,oe){const Y=this.indexes,K=this.sortedIndexes;this.indexes=Z,this.sortedIndexes=re;const H=le(K,Z);return this.renderer.renderIndexes(H),this._onChange.fire({indexes:Z,browserEvent:oe}),Y}get(){return this.indexes}contains(Z){return(0,S.binarySearch)(this.sortedIndexes,Z,$)>=0}dispose(){(0,t.dispose)(this._onChange)}}Ee([o.memoize],s.prototype,"renderer",null);class g extends s{constructor(Z){super("selected"),this.setAriaSelected=Z}renderIndex(Z,re){super.renderIndex(Z,re),this.setAriaSelected&&(this.contains(Z)?re.setAttribute("aria-selected","true"):re.setAttribute("aria-selected","false"))}}class h{constructor(Z,re,oe){this.trait=Z,this.view=re,this.identityProvider=oe}splice(Z,re,oe){if(!this.identityProvider)return this.trait.splice(Z,re,new Array(oe.length).fill(!1));const Y=this.trait.get().map(z=>this.identityProvider.getId(this.view.element(z)).toString());if(Y.length===0)return this.trait.splice(Z,re,new Array(oe.length).fill(!1));const K=new Set(Y),H=oe.map(z=>K.has(this.identityProvider.getId(z).toString()));this.trait.splice(Z,re,H)}}function m(X){return X.tagName==="INPUT"||X.tagName==="TEXTAREA"}e.isInputElement=m;function C(X,Z){return X.classList.contains(Z)?!0:X.classList.contains("monaco-list")||!X.parentElement?!1:C(X.parentElement,Z)}function w(X){return C(X,"monaco-editor")}e.isMonacoEditor=w;function D(X){return C(X,"monaco-custom-toggle")}e.isMonacoCustomToggle=D;function I(X){return C(X,"action-item")}e.isActionItem=I;function M(X){return C(X,"monaco-tree-sticky-row")}e.isStickyScrollElement=M;function A(X){return X.tagName==="A"&&X.classList.contains("monaco-button")||X.tagName==="DIV"&&X.classList.contains("monaco-button-dropdown")?!0:X.classList.contains("monaco-list")||!X.parentElement?!1:A(X.parentElement)}e.isButton=A;class O{get onKeyDown(){return i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,Z=>Z.filter(re=>!m(re.target)).map(re=>new y.StandardKeyboardEvent(re)))}constructor(Z,re,oe){this.list=Z,this.view=re,this.disposables=new t.DisposableStore,this.multipleSelectionDisposables=new t.DisposableStore,this.multipleSelectionSupport=oe.multipleSelectionSupport,this.disposables.add(this.onKeyDown(Y=>{switch(Y.keyCode){case 3:return this.onEnter(Y);case 16:return this.onUpArrow(Y);case 18:return this.onDownArrow(Y);case 11:return this.onPageUpArrow(Y);case 12:return this.onPageDownArrow(Y);case 9:return this.onEscape(Y);case 31:this.multipleSelectionSupport&&(u.isMacintosh?Y.metaKey:Y.ctrlKey)&&this.onCtrlA(Y)}}))}updateOptions(Z){Z.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=Z.multipleSelectionSupport)}onEnter(Z){Z.preventDefault(),Z.stopPropagation(),this.list.setSelection(this.list.getFocus(),Z.browserEvent)}onUpArrow(Z){Z.preventDefault(),Z.stopPropagation(),this.list.focusPrevious(1,!1,Z.browserEvent);const re=this.list.getFocus()[0];this.list.setAnchor(re),this.list.reveal(re),this.view.domNode.focus()}onDownArrow(Z){Z.preventDefault(),Z.stopPropagation(),this.list.focusNext(1,!1,Z.browserEvent);const re=this.list.getFocus()[0];this.list.setAnchor(re),this.list.reveal(re),this.view.domNode.focus()}onPageUpArrow(Z){Z.preventDefault(),Z.stopPropagation(),this.list.focusPreviousPage(Z.browserEvent);const re=this.list.getFocus()[0];this.list.setAnchor(re),this.list.reveal(re),this.view.domNode.focus()}onPageDownArrow(Z){Z.preventDefault(),Z.stopPropagation(),this.list.focusNextPage(Z.browserEvent);const re=this.list.getFocus()[0];this.list.setAnchor(re),this.list.reveal(re),this.view.domNode.focus()}onCtrlA(Z){Z.preventDefault(),Z.stopPropagation(),this.list.setSelection((0,S.range)(this.list.length),Z.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(Z){this.list.getSelection().length&&(Z.preventDefault(),Z.stopPropagation(),this.list.setSelection([],Z.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Ee([o.memoize],O.prototype,"onKeyDown",null);var T;(function(X){X[X.Automatic=0]="Automatic",X[X.Trigger=1]="Trigger"})(T||(e.TypeNavigationMode=T={}));var N;(function(X){X[X.Idle=0]="Idle",X[X.Typing=1]="Typing"})(N||(N={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(X){return X.ctrlKey||X.metaKey||X.altKey?!1:X.keyCode>=31&&X.keyCode<=56||X.keyCode>=21&&X.keyCode<=30||X.keyCode>=98&&X.keyCode<=107||X.keyCode>=85&&X.keyCode<=95}};class P{constructor(Z,re,oe,Y,K){this.list=Z,this.view=re,this.keyboardNavigationLabelProvider=oe,this.keyboardNavigationEventFilter=Y,this.delegate=K,this.enabled=!1,this.state=N.Idle,this.mode=T.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new t.DisposableStore,this.disposables=new t.DisposableStore,this.updateOptions(Z.options)}updateOptions(Z){var re,oe;!((re=Z.typeNavigationEnabled)!==null&&re!==void 0)||re?this.enable():this.disable(),this.mode=(oe=Z.typeNavigationMode)!==null&&oe!==void 0?oe:T.Automatic}enable(){if(this.enabled)return;let Z=!1;const re=i.Event.chain(this.enabledDisposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,K=>K.filter(H=>!m(H.target)).filter(()=>this.mode===T.Automatic||this.triggered).map(H=>new y.StandardKeyboardEvent(H)).filter(H=>Z||this.keyboardNavigationEventFilter(H)).filter(H=>this.delegate.mightProducePrintableCharacter(H)).forEach(H=>L.EventHelper.stop(H,!0)).map(H=>H.browserEvent.key)),oe=i.Event.debounce(re,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);i.Event.reduce(i.Event.any(re,oe),(K,H)=>H===null?null:(K||"")+H,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),oe(this.onClear,this,this.enabledDisposables),re(()=>Z=!0,void 0,this.enabledDisposables),oe(()=>Z=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var Z;const re=this.list.getFocus();if(re.length>0&&re[0]===this.previouslyFocused){const oe=(Z=this.list.options.accessibilityProvider)===null||Z===void 0?void 0:Z.getAriaLabel(this.list.element(re[0]));oe&&(0,_.alert)(oe)}this.previouslyFocused=-1}onInput(Z){if(!Z){this.state=N.Idle,this.triggered=!1;return}const re=this.list.getFocus(),oe=re.length>0?re[0]:0,Y=this.state===N.Idle?1:0;this.state=N.Typing;for(let K=0;K1&&q.length===1){this.previouslyFocused=oe,this.list.setFocus([H]),this.list.reveal(H);return}}}else if(typeof se>"u"||(0,n.matchesPrefix)(Z,se)){this.previouslyFocused=oe,this.list.setFocus([H]),this.list.reveal(H);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class x{constructor(Z,re){this.list=Z,this.view=re,this.disposables=new t.DisposableStore;const oe=i.Event.chain(this.disposables.add(new k.DomEmitter(re.domNode,"keydown")).event,K=>K.filter(H=>!m(H.target)).map(H=>new y.StandardKeyboardEvent(H)));i.Event.chain(oe,K=>K.filter(H=>H.keyCode===2&&!H.ctrlKey&&!H.metaKey&&!H.shiftKey&&!H.altKey))(this.onTab,this,this.disposables)}onTab(Z){if(Z.target!==this.view.domNode)return;const re=this.list.getFocus();if(re.length===0)return;const oe=this.view.domElement(re[0]);if(!oe)return;const Y=oe.querySelector("[tabIndex]");if(!Y||!(Y instanceof HTMLElement)||Y.tabIndex===-1)return;const K=(0,L.getWindow)(Y).getComputedStyle(Y);K.visibility==="hidden"||K.display==="none"||(Z.preventDefault(),Z.stopPropagation(),Y.focus())}dispose(){this.disposables.dispose()}}function R(X){return u.isMacintosh?X.browserEvent.metaKey:X.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=R;function B(X){return X.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=B;function W(X){return(0,L.isMouseEvent)(X)&&X.button===2}const V={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:B};class U{constructor(Z){this.list=Z,this.disposables=new t.DisposableStore,this._onPointer=new i.Emitter,this.onPointer=this._onPointer.event,Z.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||V),this.mouseSupport=typeof Z.options.mouseSupport>"u"||!!Z.options.mouseSupport,this.mouseSupport&&(Z.onMouseDown(this.onMouseDown,this,this.disposables),Z.onContextMenu(this.onContextMenu,this,this.disposables),Z.onMouseDblClick(this.onDoubleClick,this,this.disposables),Z.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(E.Gesture.addTarget(Z.getHTMLElement()))),i.Event.any(Z.onMouseClick,Z.onMouseMiddleClick,Z.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(Z){Z.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,Z.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||V))}isSelectionSingleChangeEvent(Z){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(Z):!1}isSelectionRangeChangeEvent(Z){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(Z):!1}isSelectionChangeEvent(Z){return this.isSelectionSingleChangeEvent(Z)||this.isSelectionRangeChangeEvent(Z)}onMouseDown(Z){w(Z.browserEvent.target)||(0,L.getActiveElement)()!==Z.browserEvent.target&&this.list.domFocus()}onContextMenu(Z){if(m(Z.browserEvent.target)||w(Z.browserEvent.target))return;const re=typeof Z.index>"u"?[]:[Z.index];this.list.setFocus(re,Z.browserEvent)}onViewPointer(Z){if(!this.mouseSupport||m(Z.browserEvent.target)||w(Z.browserEvent.target)||Z.browserEvent.isHandledByList)return;Z.browserEvent.isHandledByList=!0;const re=Z.index;if(typeof re>"u"){this.list.setFocus([],Z.browserEvent),this.list.setSelection([],Z.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(Z))return this.changeSelection(Z);this.list.setFocus([re],Z.browserEvent),this.list.setAnchor(re),W(Z.browserEvent)||this.list.setSelection([re],Z.browserEvent),this._onPointer.fire(Z)}onDoubleClick(Z){if(m(Z.browserEvent.target)||w(Z.browserEvent.target)||this.isSelectionChangeEvent(Z)||Z.browserEvent.isHandledByList)return;Z.browserEvent.isHandledByList=!0;const re=this.list.getFocus();this.list.setSelection(re,Z.browserEvent)}changeSelection(Z){const re=Z.index;let oe=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(Z)){if(typeof oe>"u"){const ae=this.list.getFocus()[0];oe=ae??re,this.list.setAnchor(oe)}const Y=Math.min(oe,re),K=Math.max(oe,re),H=(0,S.range)(Y,K+1),z=this.list.getSelection(),se=J(le(z,[oe]),oe);if(se.length===0)return;const q=le(H,ee(z,se));this.list.setSelection(q,Z.browserEvent),this.list.setFocus([re],Z.browserEvent)}else if(this.isSelectionSingleChangeEvent(Z)){const Y=this.list.getSelection(),K=Y.filter(H=>H!==re);this.list.setFocus([re]),this.list.setAnchor(re),Y.length===K.length?this.list.setSelection([...K,re],Z.browserEvent):this.list.setSelection(K,Z.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=U;class F{constructor(Z,re){this.styleElement=Z,this.selectorSuffix=re}style(Z){var re,oe;const Y=this.selectorSuffix&&`.${this.selectorSuffix}`,K=[];Z.listBackground&&K.push(`.monaco-list${Y} .monaco-list-rows { background: ${Z.listBackground}; }`),Z.listFocusBackground&&(K.push(`.monaco-list${Y}:focus .monaco-list-row.focused { background-color: ${Z.listFocusBackground}; }`),K.push(`.monaco-list${Y}:focus .monaco-list-row.focused:hover { background-color: ${Z.listFocusBackground}; }`)),Z.listFocusForeground&&K.push(`.monaco-list${Y}:focus .monaco-list-row.focused { color: ${Z.listFocusForeground}; }`),Z.listActiveSelectionBackground&&(K.push(`.monaco-list${Y}:focus .monaco-list-row.selected { background-color: ${Z.listActiveSelectionBackground}; }`),K.push(`.monaco-list${Y}:focus .monaco-list-row.selected:hover { background-color: ${Z.listActiveSelectionBackground}; }`)),Z.listActiveSelectionForeground&&K.push(`.monaco-list${Y}:focus .monaco-list-row.selected { color: ${Z.listActiveSelectionForeground}; }`),Z.listActiveSelectionIconForeground&&K.push(`.monaco-list${Y}:focus .monaco-list-row.selected .codicon { color: ${Z.listActiveSelectionIconForeground}; }`),Z.listFocusAndSelectionBackground&&K.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.selected.focused { background-color: ${Z.listFocusAndSelectionBackground}; } `),Z.listFocusAndSelectionForeground&&K.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.selected.focused { color: ${Z.listFocusAndSelectionForeground}; } `),Z.listInactiveFocusForeground&&(K.push(`.monaco-list${Y} .monaco-list-row.focused { color: ${Z.listInactiveFocusForeground}; }`),K.push(`.monaco-list${Y} .monaco-list-row.focused:hover { color: ${Z.listInactiveFocusForeground}; }`)),Z.listInactiveSelectionIconForeground&&K.push(`.monaco-list${Y} .monaco-list-row.focused .codicon { color: ${Z.listInactiveSelectionIconForeground}; }`),Z.listInactiveFocusBackground&&(K.push(`.monaco-list${Y} .monaco-list-row.focused { background-color: ${Z.listInactiveFocusBackground}; }`),K.push(`.monaco-list${Y} .monaco-list-row.focused:hover { background-color: ${Z.listInactiveFocusBackground}; }`)),Z.listInactiveSelectionBackground&&(K.push(`.monaco-list${Y} .monaco-list-row.selected { background-color: ${Z.listInactiveSelectionBackground}; }`),K.push(`.monaco-list${Y} .monaco-list-row.selected:hover { background-color: ${Z.listInactiveSelectionBackground}; }`)),Z.listInactiveSelectionForeground&&K.push(`.monaco-list${Y} .monaco-list-row.selected { color: ${Z.listInactiveSelectionForeground}; }`),Z.listHoverBackground&&K.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${Z.listHoverBackground}; }`),Z.listHoverForeground&&K.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${Z.listHoverForeground}; }`);const H=(0,L.asCssValueWithDefault)(Z.listFocusAndSelectionOutline,(0,L.asCssValueWithDefault)(Z.listSelectionOutline,(re=Z.listFocusOutline)!==null&&re!==void 0?re:""));H&&K.push(`.monaco-list${Y}:focus .monaco-list-row.focused.selected { outline: 1px solid ${H}; outline-offset: -1px;}`),Z.listFocusOutline&&K.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.focused { outline: 1px solid ${Z.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${Y}.last-focused .monaco-list-row.focused { outline: 1px solid ${Z.listFocusOutline}; outline-offset: -1px; } `);const z=(0,L.asCssValueWithDefault)(Z.listSelectionOutline,(oe=Z.listInactiveFocusOutline)!==null&&oe!==void 0?oe:"");z&&K.push(`.monaco-list${Y} .monaco-list-row.focused.selected { outline: 1px dotted ${z}; outline-offset: -1px; }`),Z.listSelectionOutline&&K.push(`.monaco-list${Y} .monaco-list-row.selected { outline: 1px dotted ${Z.listSelectionOutline}; outline-offset: -1px; }`),Z.listInactiveFocusOutline&&K.push(`.monaco-list${Y} .monaco-list-row.focused { outline: 1px dotted ${Z.listInactiveFocusOutline}; outline-offset: -1px; }`),Z.listHoverOutline&&K.push(`.monaco-list${Y} .monaco-list-row:hover { outline: 1px dashed ${Z.listHoverOutline}; outline-offset: -1px; }`),Z.listDropBackground&&K.push(` .monaco-list${Y}.drop-target, .monaco-list${Y} .monaco-list-rows.drop-target, .monaco-list${Y} .monaco-list-row.drop-target { background-color: ${Z.listDropBackground} !important; color: inherit !important; } `),Z.tableColumnsBorder&&K.push(` .monaco-table > .monaco-split-view2, .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${Z.tableColumnsBorder}; } .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { border-color: transparent; } `),Z.tableOddRowsBackgroundColor&&K.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: ${Z.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=K.join(` `)}}e.DefaultStyleController=F,e.unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:b.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:b.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:b.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0};const j={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function J(X,Z){const re=X.indexOf(Z);if(re===-1)return[];const oe=[];let Y=re-1;for(;Y>=0&&X[Y]===Z-(re-Y);)oe.push(X[Y--]);for(oe.reverse(),Y=re;Y=X.length)re.push(Z[Y++]);else if(Y>=Z.length)re.push(X[oe++]);else if(X[oe]===Z[Y]){re.push(X[oe]),oe++,Y++;continue}else X[oe]=X.length)re.push(Z[Y++]);else if(Y>=Z.length)re.push(X[oe++]);else if(X[oe]===Z[Y]){oe++,Y++;continue}else X[oe]X-Z;class te{constructor(Z,re){this._templateId=Z,this.renderers=re}get templateId(){return this._templateId}renderTemplate(Z){return this.renderers.map(re=>re.renderTemplate(Z))}renderElement(Z,re,oe,Y){let K=0;for(const H of this.renderers)H.renderElement(Z,re,oe[K++],Y)}disposeElement(Z,re,oe,Y){var K;let H=0;for(const z of this.renderers)(K=z.disposeElement)===null||K===void 0||K.call(z,Z,re,oe[H],Y),H+=1}disposeTemplate(Z){let re=0;for(const oe of this.renderers)oe.disposeTemplate(Z[re++])}}class G{constructor(Z){this.accessibilityProvider=Z,this.templateId="a18n"}renderTemplate(Z){return Z}renderElement(Z,re,oe){const Y=this.accessibilityProvider.getAriaLabel(Z);Y?oe.setAttribute("aria-label",Y):oe.removeAttribute("aria-label");const K=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(Z);typeof K=="number"?oe.setAttribute("aria-level",`${K}`):oe.removeAttribute("aria-level")}disposeTemplate(Z){}}class de{constructor(Z,re){this.list=Z,this.dnd=re}getDragElements(Z){const re=this.list.getSelectedElements();return re.indexOf(Z)>-1?re:[Z]}getDragURI(Z){return this.dnd.getDragURI(Z)}getDragLabel(Z,re){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(Z,re)}onDragStart(Z,re){var oe,Y;(Y=(oe=this.dnd).onDragStart)===null||Y===void 0||Y.call(oe,Z,re)}onDragOver(Z,re,oe,Y){return this.dnd.onDragOver(Z,re,oe,Y)}onDragLeave(Z,re,oe,Y){var K,H;(H=(K=this.dnd).onDragLeave)===null||H===void 0||H.call(K,Z,re,oe,Y)}onDragEnd(Z){var re,oe;(oe=(re=this.dnd).onDragEnd)===null||oe===void 0||oe.call(re,Z)}drop(Z,re,oe,Y){this.dnd.drop(Z,re,oe,Y)}dispose(){this.dnd.dispose()}}class ue{get onDidChangeFocus(){return i.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),Z=>this.toListEvent(Z),this.disposables)}get onDidChangeSelection(){return i.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),Z=>this.toListEvent(Z),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 onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let Z=!1;const re=i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,K=>K.map(H=>new y.StandardKeyboardEvent(H)).filter(H=>Z=H.keyCode===58||H.shiftKey&&H.keyCode===68).map(H=>L.EventHelper.stop(H,!0)).filter(()=>!1)),oe=i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keyup")).event,K=>K.forEach(()=>Z=!1).map(H=>new y.StandardKeyboardEvent(H)).filter(H=>H.keyCode===58||H.shiftKey&&H.keyCode===68).map(H=>L.EventHelper.stop(H,!0)).map(({browserEvent:H})=>{const z=this.getFocus(),se=z.length?z[0]:void 0,q=typeof se<"u"?this.view.element(se):void 0,ae=typeof se<"u"?this.view.domElement(se):this.view.domNode;return{index:se,element:q,anchor:ae,browserEvent:H}})),Y=i.Event.chain(this.view.onContextMenu,K=>K.filter(H=>!Z).map(({element:H,index:z,browserEvent:se})=>({element:H,index:z,anchor:new r.StandardMouseEvent((0,L.getWindow)(this.view.domNode),se),browserEvent:se})));return i.Event.any(re,oe,Y)}get onKeyDown(){return this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return i.Event.signal(this.disposables.add(new k.DomEmitter(this.view.domNode,"focus",!0)).event)}constructor(Z,re,oe,Y,K=j){var H,z,se,q;this.user=Z,this._options=K,this.focus=new s("focused"),this.anchor=new s("anchor"),this.eventBufferer=new i.EventBufferer,this._ariaLabel="",this.disposables=new t.DisposableStore,this._onDidDispose=new i.Emitter,this.onDidDispose=this._onDidDispose.event;const ae=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(H=this._options.accessibilityProvider)===null||H===void 0?void 0:H.getWidgetRole():"list";this.selection=new g(ae!=="listbox");const ce=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=K.accessibilityProvider,this.accessibilityProvider&&(ce.push(new G(this.accessibilityProvider)),(se=(z=this.accessibilityProvider).onDidChangeActiveDescendant)===null||se===void 0||se.call(z,this.onDidChangeActiveDescendant,this,this.disposables)),Y=Y.map(pe=>new te(pe.templateId,[...ce,pe]));const ge={...K,dnd:K.dnd&&new de(this,K.dnd)};if(this.view=this.createListView(re,oe,Y,ge),this.view.domNode.setAttribute("role",ae),K.styleController)this.styleController=K.styleController(this.view.domId);else{const pe=(0,L.createStyleSheet)(this.view.domNode);this.styleController=new F(pe,this.view.domId)}if(this.spliceable=new p.CombinedSpliceable([new h(this.focus,this.view,K.identityProvider),new h(this.selection,this.view,K.identityProvider),new h(this.anchor,this.view,K.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 x(this,this.view)),(typeof K.keyboardSupport!="boolean"||K.keyboardSupport)&&(this.keyboardController=new O(this,this.view,K),this.disposables.add(this.keyboardController)),K.keyboardNavigationLabelProvider){const pe=K.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new P(this,this.view,K.keyboardNavigationLabelProvider,(q=K.keyboardNavigationEventFilter)!==null&&q!==void 0?q:()=>!0,pe),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(K),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")}createListView(Z,re,oe,Y){return new d.ListView(Z,re,oe,Y)}createMouseController(Z){return new U(this)}updateOptions(Z={}){var re,oe;this._options={...this._options,...Z},(re=this.typeNavigationController)===null||re===void 0||re.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(Z),(oe=this.keyboardController)===null||oe===void 0||oe.updateOptions(Z),this.view.updateOptions(Z)}get options(){return this._options}splice(Z,re,oe=[]){if(Z<0||Z>this.view.length)throw new c.ListError(this.user,`Invalid start index: ${Z}`);if(re<0)throw new c.ListError(this.user,`Invalid delete count: ${re}`);re===0&&oe.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(Z,re,oe))}rerender(){this.view.rerender()}element(Z){return this.view.element(Z)}indexOf(Z){return this.view.indexOf(Z)}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(Z){this.view.setScrollTop(Z)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(Z){this._ariaLabel=Z,this.view.domNode.setAttribute("aria-label",Z)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(Z,re){this.view.layout(Z,re)}setSelection(Z,re){for(const oe of Z)if(oe<0||oe>=this.length)throw new c.ListError(this.user,`Invalid index ${oe}`);this.selection.set(Z,re)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(Z=>this.view.element(Z))}setAnchor(Z){if(typeof Z>"u"){this.anchor.set([]);return}if(Z<0||Z>=this.length)throw new c.ListError(this.user,`Invalid index ${Z}`);this.anchor.set([Z])}getAnchor(){return(0,S.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const Z=this.getAnchor();return typeof Z>"u"?void 0:this.element(Z)}setFocus(Z,re){for(const oe of Z)if(oe<0||oe>=this.length)throw new c.ListError(this.user,`Invalid index ${oe}`);this.focus.set(Z,re)}focusNext(Z=1,re=!1,oe,Y){if(this.length===0)return;const K=this.focus.get(),H=this.findNextIndex(K.length>0?K[0]+Z:0,re,Y);H>-1&&this.setFocus([H],oe)}focusPrevious(Z=1,re=!1,oe,Y){if(this.length===0)return;const K=this.focus.get(),H=this.findPreviousIndex(K.length>0?K[0]-Z:0,re,Y);H>-1&&this.setFocus([H],oe)}async focusNextPage(Z,re){let oe=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);oe=oe===0?0:oe-1;const Y=this.getFocus()[0];if(Y!==oe&&(Y===void 0||oe>Y)){const K=this.findPreviousIndex(oe,!1,re);K>-1&&Y!==K?this.setFocus([K],Z):this.setFocus([oe],Z)}else{const K=this.view.getScrollTop();let H=K+this.view.renderHeight;oe>Y&&(H-=this.view.elementHeight(oe)),this.view.setScrollTop(H),this.view.getScrollTop()!==K&&(this.setFocus([]),await(0,v.timeout)(0),await this.focusNextPage(Z,re))}}async focusPreviousPage(Z,re){let oe;const Y=this.view.getScrollTop();Y===0?oe=this.view.indexAt(Y):oe=this.view.indexAfter(Y-1);const K=this.getFocus()[0];if(K!==oe&&(K===void 0||K>=oe)){const H=this.findNextIndex(oe,!1,re);H>-1&&K!==H?this.setFocus([H],Z):this.setFocus([oe],Z)}else{const H=Y;this.view.setScrollTop(Y-this.view.renderHeight),this.view.getScrollTop()!==H&&(this.setFocus([]),await(0,v.timeout)(0),await this.focusPreviousPage(Z,re))}}focusLast(Z,re){if(this.length===0)return;const oe=this.findPreviousIndex(this.length-1,!1,re);oe>-1&&this.setFocus([oe],Z)}focusFirst(Z,re){this.focusNth(0,Z,re)}focusNth(Z,re,oe){if(this.length===0)return;const Y=this.findNextIndex(Z,!1,oe);Y>-1&&this.setFocus([Y],re)}findNextIndex(Z,re=!1,oe){for(let Y=0;Y=this.length&&!re)return-1;if(Z=Z%this.length,!oe||oe(this.element(Z)))return Z;Z++}return-1}findPreviousIndex(Z,re=!1,oe){for(let Y=0;Ythis.view.element(Z))}reveal(Z,re,oe=0){if(Z<0||Z>=this.length)throw new c.ListError(this.user,`Invalid index ${Z}`);const Y=this.view.getScrollTop(),K=this.view.elementTop(Z),H=this.view.elementHeight(Z);if((0,f.isNumber)(re)){const z=H-this.view.renderHeight+oe;this.view.setScrollTop(z*(0,a.clamp)(re,0,1)+K-oe)}else{const z=K+H,se=Y+this.view.renderHeight;K=se||(K=se&&H>=this.view.renderHeight?this.view.setScrollTop(K-oe):z>=se&&this.view.setScrollTop(z-this.view.renderHeight))}}getRelativeTop(Z,re=0){if(Z<0||Z>=this.length)throw new c.ListError(this.user,`Invalid index ${Z}`);const oe=this.view.getScrollTop(),Y=this.view.elementTop(Z),K=this.view.elementHeight(Z);if(Yoe+this.view.renderHeight)return null;const H=K-this.view.renderHeight+re;return Math.abs((oe+re-Y)/H)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(Z){return this.view.getElementDomId(Z)}getElementTop(Z){return this.view.elementTop(Z)}style(Z){this.styleController.style(Z)}toListEvent({indexes:Z,browserEvent:re}){return{indexes:Z,elements:Z.map(oe=>this.view.element(oe)),browserEvent:re}}_onFocusChange(){const Z=this.focus.get();this.view.domNode.classList.toggle("element-focused",Z.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var Z;const re=this.focus.get();if(re.length>0){let oe;!((Z=this.accessibilityProvider)===null||Z===void 0)&&Z.getActiveDescendantId&&(oe=this.accessibilityProvider.getActiveDescendantId(this.view.element(re[0]))),this.view.domNode.setAttribute("aria-activedescendant",oe||this.view.getElementDomId(re[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const Z=this.selection.get();this.view.domNode.classList.toggle("selection-none",Z.length===0),this.view.domNode.classList.toggle("selection-single",Z.length===1),this.view.domNode.classList.toggle("selection-multiple",Z.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}e.List=ue,Ee([o.memoize],ue.prototype,"onDidChangeFocus",null),Ee([o.memoize],ue.prototype,"onDidChangeSelection",null),Ee([o.memoize],ue.prototype,"onContextMenu",null),Ee([o.memoize],ue.prototype,"onKeyDown",null),Ee([o.memoize],ue.prototype,"onDidFocus",null)}),define(ie[589],ne([1,0,13,19,6,2,116,272]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class p{get templateId(){return this.renderer.templateId}constructor(i,n){this.renderer=i,this.modelProvider=n}renderTemplate(i){return{data:this.renderer.renderTemplate(i),disposable:E.Disposable.None}}renderElement(i,n,t,a){var u;if((u=t.disposable)===null||u===void 0||u.dispose(),!t.data)return;const f=this.modelProvider();if(f.isResolved(i))return this.renderer.renderElement(f.get(i),i,t.data,a);const c=new k.CancellationTokenSource,d=f.resolve(i,c.token);t.disposable={dispose:()=>c.cancel()},this.renderer.renderPlaceholder(i,t.data),d.then(r=>this.renderer.renderElement(r,i,t.data,a))}disposeTemplate(i){i.disposable&&(i.disposable.dispose(),i.disposable=void 0),i.data&&(this.renderer.disposeTemplate(i.data),i.data=void 0)}}class S{constructor(i,n){this.modelProvider=i,this.accessibilityProvider=n}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(i){const n=this.modelProvider();return n.isResolved(i)?this.accessibilityProvider.getAriaLabel(n.get(i)):null}}function v(o,i){return{...i,accessibilityProvider:i.accessibilityProvider&&new S(o,i.accessibilityProvider)}}class b{constructor(i,n,t,a,u={}){const f=()=>this.model,c=a.map(d=>new p(d,f));this.list=new _.List(i,n,t,c,v(f,u))}updateOptions(i){this.list.updateOptions(i)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return y.Event.map(this.list.onMouseDblClick,({element:i,index:n,browserEvent:t})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:t}))}get onPointer(){return y.Event.map(this.list.onPointer,({element:i,index:n,browserEvent:t})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:t}))}get onDidChangeSelection(){return y.Event.map(this.list.onDidChangeSelection,({elements:i,indexes:n,browserEvent:t})=>({elements:i.map(a=>this._model.get(a)),indexes:n,browserEvent:t}))}get model(){return this._model}set model(i){this._model=i,this.list.splice(0,this.list.length,(0,L.range)(i.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(i=>this.model.get(i))}style(i){this.list.style(i)}dispose(){this.list.dispose()}}e.PagedList=b}),define(ie[319],ne([1,0,7,83,157,76,13,38,6,2,143,145,20,419]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const n={separatorBorder:p.Color.transparent};class t{set size(l){this._size=l}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(l,s){var g,h;if(l!==this.visible){l?(this.size=(0,b.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof s=="number"?s:this.size,this.size=0),this.container.classList.toggle("visible",l);try{(h=(g=this.view).setVisible)===null||h===void 0||h.call(g,l)}catch(m){console.error("Splitview: Failed to set visible view"),console.error(m)}}}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 proportionalLayout(){var l;return(l=this.view.proportionalLayout)!==null&&l!==void 0?l:!0}get snap(){return!!this.view.snap}set enabled(l){this.container.style.pointerEvents=l?"":"none"}constructor(l,s,g,h){this.container=l,this.view=s,this.disposable=h,this._cachedVisibleSize=void 0,typeof g=="number"?(this._size=g,this._cachedVisibleSize=void 0,l.classList.add("visible")):(this._size=0,this._cachedVisibleSize=g.cachedVisibleSize)}layout(l,s){this.layoutContainer(l);try{this.view.layout(this.size,l,s)}catch(g){console.error("Splitview: Failed to layout view"),console.error(g)}}dispose(){this.disposable.dispose()}}class a extends t{layoutContainer(l){this.container.style.top=`${l}px`,this.container.style.height=`${this.size}px`}}class u extends t{layoutContainer(l){this.container.style.left=`${l}px`,this.container.style.width=`${this.size}px`}}var f;(function(r){r[r.Idle=0]="Idle",r[r.Busy=1]="Busy"})(f||(f={}));var c;(function(r){r.Distribute={type:"distribute"};function l(h){return{type:"split",index:h}}r.Split=l;function s(h){return{type:"auto",index:h}}r.Auto=s;function g(h){return{type:"invisible",cachedVisibleSize:h}}r.Invisible=g})(c||(e.Sizing=c={}));class d extends v.Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(l){for(const s of this.sashItems)s.sash.orthogonalStartSash=l;this._orthogonalStartSash=l}set orthogonalEndSash(l){for(const s of this.sashItems)s.sash.orthogonalEndSash=l;this._orthogonalEndSash=l}set startSnappingEnabled(l){this._startSnappingEnabled!==l&&(this._startSnappingEnabled=l,this.updateSashEnablement())}set endSnappingEnabled(l){this._endSnappingEnabled!==l&&(this._endSnappingEnabled=l,this.updateSashEnablement())}constructor(l,s={}){var g,h,m,C,w;super(),this.size=0,this._contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=f.Idle,this._onDidSashChange=this._register(new S.Emitter),this._onDidSashReset=this._register(new S.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(g=s.orientation)!==null&&g!==void 0?g:0,this.inverseAltBehavior=(h=s.inverseAltBehavior)!==null&&h!==void 0?h:!1,this.proportionalLayout=(m=s.proportionalLayout)!==null&&m!==void 0?m:!0,this.getSashOrthogonalSize=s.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),l.appendChild(this.el),this.sashContainer=(0,L.append)(this.el,(0,L.$)(".sash-container")),this.viewContainer=(0,L.$)(".split-view-container"),this.scrollable=this._register(new o.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:I=>(0,L.scheduleAtNextAnimationFrame)((0,L.getWindow)(this.el),I)})),this.scrollableElement=this._register(new E.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(C=s.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(w=s.scrollbarVisibility)!==null&&w!==void 0?w:1:2},this.scrollable));const D=this._register(new k.DomEmitter(this.viewContainer,"scroll")).event;this._register(D(I=>{const M=this.scrollableElement.getScrollPosition(),A=Math.abs(this.viewContainer.scrollLeft-M.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,O=Math.abs(this.viewContainer.scrollTop-M.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(A!==void 0||O!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:A,scrollTop:O})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(I=>{I.scrollTopChanged&&(this.viewContainer.scrollTop=I.scrollTop),I.scrollLeftChanged&&(this.viewContainer.scrollLeft=I.scrollLeft)})),(0,L.append)(this.el,this.scrollableElement.getDomNode()),this.style(s.styles||n),s.descriptor&&(this.size=s.descriptor.size,s.descriptor.views.forEach((I,M)=>{const A=i.isUndefined(I.visible)||I.visible?I.size:{type:"invisible",cachedVisibleSize:I.size},O=I.view;this.doAddView(O,A,M,!0)}),this._contentSize=this.viewItems.reduce((I,M)=>I+M.size,0),this.saveProportions())}style(l){l.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",l.separatorBorder.toString()))}addView(l,s,g=this.viewItems.length,h){this.doAddView(l,s,g,h)}layout(l,s){const g=Math.max(this.size,this._contentSize);if(this.size=l,this.layoutContext=s,this.proportions){let h=0;for(let m=0;m0&&(C.size=(0,b.clamp)(Math.round(w*l/h),C.minimumSize,C.maximumSize))}}else{const h=(0,_.range)(this.viewItems.length),m=h.filter(w=>this.viewItems[w].priority===1),C=h.filter(w=>this.viewItems[w].priority===2);this.resize(this.viewItems.length-1,l-g,void 0,m,C)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this._contentSize>0&&(this.proportions=this.viewItems.map(l=>l.proportionalLayout&&l.visible?l.size/this._contentSize:void 0))}onSashStart({sash:l,start:s,alt:g}){for(const w of this.viewItems)w.enabled=!1;const h=this.sashItems.findIndex(w=>w.sash===l),m=(0,v.combinedDisposable)((0,L.addDisposableListener)(this.el.ownerDocument.body,"keydown",w=>C(this.sashDragState.current,w.altKey)),(0,L.addDisposableListener)(this.el.ownerDocument.body,"keyup",()=>C(this.sashDragState.current,!1))),C=(w,D)=>{const I=this.viewItems.map(N=>N.size);let M=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(D=!D),D)if(h===this.sashItems.length-1){const P=this.viewItems[h];M=(P.minimumSize-P.size)/2,A=(P.maximumSize-P.size)/2}else{const P=this.viewItems[h+1];M=(P.size-P.maximumSize)/2,A=(P.size-P.minimumSize)/2}let O,T;if(!D){const N=(0,_.range)(h,-1),P=(0,_.range)(h+1,this.viewItems.length),x=N.reduce((J,le)=>J+(this.viewItems[le].minimumSize-I[le]),0),R=N.reduce((J,le)=>J+(this.viewItems[le].viewMaximumSize-I[le]),0),B=P.length===0?Number.POSITIVE_INFINITY:P.reduce((J,le)=>J+(I[le]-this.viewItems[le].minimumSize),0),W=P.length===0?Number.NEGATIVE_INFINITY:P.reduce((J,le)=>J+(I[le]-this.viewItems[le].viewMaximumSize),0),V=Math.max(x,W),U=Math.min(B,R),F=this.findFirstSnapIndex(N),j=this.findFirstSnapIndex(P);if(typeof F=="number"){const J=this.viewItems[F],le=Math.floor(J.viewMinimumSize/2);O={index:F,limitDelta:J.visible?V-le:V+le,size:J.size}}if(typeof j=="number"){const J=this.viewItems[j],le=Math.floor(J.viewMinimumSize/2);T={index:j,limitDelta:J.visible?U+le:U-le,size:J.size}}}this.sashDragState={start:w,current:w,index:h,sizes:I,minDelta:M,maxDelta:A,alt:D,snapBefore:O,snapAfter:T,disposable:m}};C(s,g)}onSashChange({current:l}){const{index:s,start:g,sizes:h,alt:m,minDelta:C,maxDelta:w,snapBefore:D,snapAfter:I}=this.sashDragState;this.sashDragState.current=l;const M=l-g,A=this.resize(s,M,h,void 0,void 0,C,w,D,I);if(m){const O=s===this.sashItems.length-1,T=this.viewItems.map(W=>W.size),N=O?s:s+1,P=this.viewItems[N],x=P.size-P.maximumSize,R=P.size-P.minimumSize,B=O?s-1:s+1;this.resize(B,-A,T,void 0,void 0,x,R)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(l){this._onDidSashChange.fire(l),this.sashDragState.disposable.dispose(),this.saveProportions();for(const s of this.viewItems)s.enabled=!0}onViewChange(l,s){const g=this.viewItems.indexOf(l);g<0||g>=this.viewItems.length||(s=typeof s=="number"?s:l.size,s=(0,b.clamp)(s,l.minimumSize,l.maximumSize),this.inverseAltBehavior&&g>0?(this.resize(g-1,Math.floor((l.size-s)/2)),this.distributeEmptySpace(),this.layoutViews()):(l.size=s,this.relayout([g],void 0)))}resizeView(l,s){if(!(l<0||l>=this.viewItems.length)){if(this.state!==f.Idle)throw new Error("Cant modify splitview");this.state=f.Busy;try{const g=(0,_.range)(this.viewItems.length).filter(w=>w!==l),h=[...g.filter(w=>this.viewItems[w].priority===1),l],m=g.filter(w=>this.viewItems[w].priority===2),C=this.viewItems[l];s=Math.round(s),s=(0,b.clamp)(s,C.minimumSize,Math.min(C.maximumSize,this.size)),C.size=s,this.relayout(h,m)}finally{this.state=f.Idle}}}distributeViewSizes(){const l=[];let s=0;for(const w of this.viewItems)w.maximumSize-w.minimumSize>0&&(l.push(w),s+=w.size);const g=Math.floor(s/l.length);for(const w of l)w.size=(0,b.clamp)(g,w.minimumSize,w.maximumSize);const h=(0,_.range)(this.viewItems.length),m=h.filter(w=>this.viewItems[w].priority===1),C=h.filter(w=>this.viewItems[w].priority===2);this.relayout(m,C)}getViewSize(l){return l<0||l>=this.viewItems.length?-1:this.viewItems[l].size}doAddView(l,s,g=this.viewItems.length,h){if(this.state!==f.Idle)throw new Error("Cant modify splitview");this.state=f.Busy;try{const m=(0,L.$)(".split-view-view");g===this.viewItems.length?this.viewContainer.appendChild(m):this.viewContainer.insertBefore(m,this.viewContainer.children.item(g));const C=l.onDidChange(O=>this.onViewChange(M,O)),w=(0,v.toDisposable)(()=>this.viewContainer.removeChild(m)),D=(0,v.combinedDisposable)(C,w);let I;typeof s=="number"?I=s:(s.type==="auto"&&(this.areViewsDistributed()?s={type:"distribute"}:s={type:"split",index:s.index}),s.type==="split"?I=this.getViewSize(s.index)/2:s.type==="invisible"?I={cachedVisibleSize:s.cachedVisibleSize}:I=l.minimumSize);const M=this.orientation===0?new a(m,l,I,D):new u(m,l,I,D);if(this.viewItems.splice(g,0,M),this.viewItems.length>1){const O={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},T=this.orientation===0?new y.Sash(this.sashContainer,{getHorizontalSashTop:J=>this.getSashPosition(J),getHorizontalSashWidth:this.getSashOrthogonalSize},{...O,orientation:1}):new y.Sash(this.sashContainer,{getVerticalSashLeft:J=>this.getSashPosition(J),getVerticalSashHeight:this.getSashOrthogonalSize},{...O,orientation:0}),N=this.orientation===0?J=>({sash:T,start:J.startY,current:J.currentY,alt:J.altKey}):J=>({sash:T,start:J.startX,current:J.currentX,alt:J.altKey}),x=S.Event.map(T.onDidStart,N)(this.onSashStart,this),B=S.Event.map(T.onDidChange,N)(this.onSashChange,this),V=S.Event.map(T.onDidEnd,()=>this.sashItems.findIndex(J=>J.sash===T))(this.onSashEnd,this),U=T.onDidReset(()=>{const J=this.sashItems.findIndex(G=>G.sash===T),le=(0,_.range)(J,-1),ee=(0,_.range)(J+1,this.viewItems.length),$=this.findFirstSnapIndex(le),te=this.findFirstSnapIndex(ee);typeof $=="number"&&!this.viewItems[$].visible||typeof te=="number"&&!this.viewItems[te].visible||this._onDidSashReset.fire(J)}),F=(0,v.combinedDisposable)(x,B,V,U,T),j={sash:T,disposable:F};this.sashItems.splice(g-1,0,j)}m.appendChild(l.element);let A;typeof s!="number"&&s.type==="split"&&(A=[s.index]),h||this.relayout([g],A),!h&&typeof s!="number"&&s.type==="distribute"&&this.distributeViewSizes()}finally{this.state=f.Idle}}relayout(l,s){const g=this.viewItems.reduce((h,m)=>h+m.size,0);this.resize(this.viewItems.length-1,this.size-g,void 0,l,s),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(l,s,g=this.viewItems.map(M=>M.size),h,m,C=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,D,I){if(l<0||l>=this.viewItems.length)return 0;const M=(0,_.range)(l,-1),A=(0,_.range)(l+1,this.viewItems.length);if(m)for(const j of m)(0,_.pushToStart)(M,j),(0,_.pushToStart)(A,j);if(h)for(const j of h)(0,_.pushToEnd)(M,j),(0,_.pushToEnd)(A,j);const O=M.map(j=>this.viewItems[j]),T=M.map(j=>g[j]),N=A.map(j=>this.viewItems[j]),P=A.map(j=>g[j]),x=M.reduce((j,J)=>j+(this.viewItems[J].minimumSize-g[J]),0),R=M.reduce((j,J)=>j+(this.viewItems[J].maximumSize-g[J]),0),B=A.length===0?Number.POSITIVE_INFINITY:A.reduce((j,J)=>j+(g[J]-this.viewItems[J].minimumSize),0),W=A.length===0?Number.NEGATIVE_INFINITY:A.reduce((j,J)=>j+(g[J]-this.viewItems[J].maximumSize),0),V=Math.max(x,W,C),U=Math.min(B,R,w);let F=!1;if(D){const j=this.viewItems[D.index],J=s>=D.limitDelta;F=J!==j.visible,j.setVisible(J,D.size)}if(!F&&I){const j=this.viewItems[I.index],J=sw+D.size,0);let g=this.size-s;const h=(0,_.range)(this.viewItems.length-1,-1),m=h.filter(w=>this.viewItems[w].priority===1),C=h.filter(w=>this.viewItems[w].priority===2);for(const w of C)(0,_.pushToStart)(h,w);for(const w of m)(0,_.pushToEnd)(h,w);typeof l=="number"&&(0,_.pushToEnd)(h,l);for(let w=0;g!==0&&ws+g.size,0);let l=0;for(const s of this.viewItems)s.layout(l,this.layoutContext),l+=s.size;this.sashItems.forEach(s=>s.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 l=!1;const s=this.viewItems.map(D=>l=D.size-D.minimumSize>0||l);l=!1;const g=this.viewItems.map(D=>l=D.maximumSize-D.size>0||l),h=[...this.viewItems].reverse();l=!1;const m=h.map(D=>l=D.size-D.minimumSize>0||l).reverse();l=!1;const C=h.map(D=>l=D.maximumSize-D.size>0||l).reverse();let w=0;for(let D=0;D0||this.startSnappingEnabled)?I.state=1:B&&s[D]&&(w0)return;if(!g.visible&&g.snap)return s}}areViewsDistributed(){let l,s;for(const g of this.viewItems)if(l=l===void 0?g.size:Math.min(l,g.size),s=s===void 0?g.size:Math.max(s,g.size),s-l>2)return!1;return!0}dispose(){var l;(l=this.sashDragState)===null||l===void 0||l.disposable.dispose(),(0,v.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(s=>s.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=d}),define(ie[590],ne([1,0,7,116,319,6,2,420]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class p{constructor(i,n,t){this.columns=i,this.getColumnSize=t,this.templateId=p.TemplateId,this.renderedTemplates=new Set;const a=new Map(n.map(u=>[u.templateId,u]));this.renderers=[];for(const u of i){const f=a.get(u.templateId);if(!f)throw new Error(`Table cell renderer for template id ${u.templateId} not found.`);this.renderers.push(f)}}renderTemplate(i){const n=(0,L.append)(i,(0,L.$)(".monaco-table-tr")),t=[],a=[];for(let f=0;fnew v(l,s)),d={size:c.reduce((l,s)=>l+s.column.weight,0),views:c.map(l=>({size:l.column.weight,view:l}))};this.splitview=this.disposables.add(new y.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:d})),this.splitview.el.style.height=`${t.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${t.headerRowHeight}px`;const r=new p(a,u,l=>this.splitview.getViewSize(l));this.list=this.disposables.add(new k.List(i,this.domNode,S(t),[r],f)),E.Event.any(...c.map(l=>l.onDidLayout))(([l,s])=>r.layoutColumn(l,s),null,this.disposables),this.splitview.onDidSashReset(l=>{const s=a.reduce((h,m)=>h+m.weight,0),g=a[l].weight/s*this.cachedWidth;this.splitview.resizeView(l,g)},null,this.disposables),this.styleElement=(0,L.createStyleSheet)(this.domNode),this.style(k.unthemedListStyles)}updateOptions(i){this.list.updateOptions(i)}splice(i,n,t=[]){this.list.splice(i,n,t)}getHTMLElement(){return this.domNode}style(i){const n=[];n.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=n.join(` `),this.list.style(i)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}e.Table=b,b.InstanceCount=0}),define(ie[158],ne([1,0,86,27,6,421]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=e.unthemedToggleStyles=void 0,e.unthemedToggleStyles={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class E extends L.Widget{constructor(p){super(),this._onChange=this._register(new y.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new y.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=p,this._checked=this._opts.isChecked;const S=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,S.push(...k.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&S.push(...this._opts.actionClassName.split(" ")),this._checked&&S.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...S),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,v=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),v.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,v=>{if(v.keyCode===10||v.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),v.preventDefault(),v.stopPropagation();return}this._onKeyDown.fire(v)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(p){this._checked=p,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Toggle=E}),define(ie[320],ne([1,0,158,26,563]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const E=y.localize(0,null),_=y.localize(1,null),p=y.localize(2,null);class S extends L.Toggle{constructor(i){super({icon:k.Codicon.caseSensitive,title:E+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.CaseSensitiveToggle=S;class v extends L.Toggle{constructor(i){super({icon:k.Codicon.wholeWord,title:_+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.WholeWordsToggle=v;class b extends L.Toggle{constructor(i){super({icon:k.Codicon.regex,title:p+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.RegexToggle=b}),define(ie[45],ne([1,0,223,44,94,17,12,22]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=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 S(o){return(0,p.uriToFsPath)(o,!0)}e.originalFSPath=S;class v{constructor(i){this._ignorePathCasing=i}compare(i,n,t=!1){return i===n?0:(0,_.compare)(this.getComparisonKey(i,t),this.getComparisonKey(n,t))}isEqual(i,n,t=!1){return i===n?!0:!i||!n?!1:this.getComparisonKey(i,t)===this.getComparisonKey(n,t)}getComparisonKey(i,n=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:n?null:void 0}).toString()}isEqualOrParent(i,n,t=!1){if(i.scheme===n.scheme){if(i.scheme===k.Schemas.file)return L.isEqualOrParent(S(i),S(n),this._ignorePathCasing(i))&&i.query===n.query&&(t||i.fragment===n.fragment);if((0,e.isEqualAuthority)(i.authority,n.authority))return L.isEqualOrParent(i.path,n.path,this._ignorePathCasing(i),"/")&&i.query===n.query&&(t||i.fragment===n.fragment)}return!1}joinPath(i,...n){return p.URI.joinPath(i,...n)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return y.posix.basename(i.path)}extname(i){return y.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let n;return i.scheme===k.Schemas.file?n=p.URI.file(y.dirname(S(i))).path:(n=y.posix.dirname(i.path),i.authority&&n.length&&n.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),n="/")),i.with({path:n})}normalizePath(i){if(!i.path.length)return i;let n;return i.scheme===k.Schemas.file?n=p.URI.file(y.normalize(S(i))).path:n=y.posix.normalize(i.path),i.with({path:n})}relativePath(i,n){if(i.scheme!==n.scheme||!(0,e.isEqualAuthority)(i.authority,n.authority))return;if(i.scheme===k.Schemas.file){const u=y.relative(S(i),S(n));return E.isWindows?L.toSlashes(u):u}let t=i.path||"/";const a=n.path||"/";if(this._ignorePathCasing(i)){let u=0;for(const f=Math.min(t.length,a.length);uL.getRoot(t).length&&t[t.length-1]===n}else{const t=i.path;return t.length>1&&t.charCodeAt(t.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,n=y.sep){return(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,n=y.sep){let t=!1;if(i.scheme===k.Schemas.file){const a=S(i);t=a!==void 0&&a.length===L.getRoot(a).length&&a[a.length-1]===n}else{n="/";const a=i.path;t=a.length===1&&a.charCodeAt(a.length-1)===47}return!t&&!(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path+"/"}):i}}e.ExtUri=v,e.extUri=new v(()=>!1),e.extUriBiasedIgnorePathCase=new v(o=>o.scheme===k.Schemas.file?!E.isLinux:!0),e.extUriIgnorePathCase=new v(o=>!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);var b;(function(o){o.META_DATA_LABEL="label",o.META_DATA_DESCRIPTION="description",o.META_DATA_SIZE="size",o.META_DATA_MIME="mime";function i(n){const t=new Map;n.path.substring(n.path.indexOf(";")+1,n.path.lastIndexOf(";")).split(";").forEach(f=>{const[c,d]=f.split(":");c&&d&&t.set(c,d)});const u=n.path.substring(0,n.path.indexOf(";"));return u&&t.set(o.META_DATA_MIME,u),t}o.parseMetaData=i})(b||(e.DataUri=b={}))}),define(ie[58],ne([1,0,9,123,45,12,22]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class p{constructor(u="",f=!1){var c,d,r;if(this.value=u,typeof this.value!="string")throw(0,L.illegalArgument)("value");typeof f=="boolean"?(this.isTrusted=f,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(c=f.isTrusted)!==null&&c!==void 0?c:void 0,this.supportThemeIcons=(d=f.supportThemeIcons)!==null&&d!==void 0?d:!1,this.supportHtml=(r=f.supportHtml)!==null&&r!==void 0?r:!1)}appendText(u,f=0){return this.value+=o(this.supportThemeIcons?(0,k.escapeIcons)(u):u).replace(/([ \t]+)/g,(c,d)=>" ".repeat(d.length)).replace(/\>/gm,"\\>").replace(/\n/g,f===1?`\\ `:` `),this}appendMarkdown(u){return this.value+=u,this}appendCodeblock(u,f){return this.value+="\n```",this.value+=u,this.value+=` `,this.value+=f,this.value+="\n```\n",this}appendLink(u,f,c){return this.value+="[",this.value+=this._escape(f,"]"),this.value+="](",this.value+=this._escape(String(u),")"),c&&(this.value+=` "${this._escape(this._escape(c,'"'),")")}"`),this.value+=")",this}_escape(u,f){const c=new RegExp((0,E.escapeRegExpCharacters)(f),"g");return u.replace(c,(d,r)=>u.charAt(r-1)!=="\\"?`\\${d}`:d)}}e.MarkdownString=p;function S(a){return v(a)?!a.value:Array.isArray(a)?a.every(S):!0}e.isEmptyMarkdownString=S;function v(a){return a instanceof p?!0:a&&typeof a=="object"?typeof a.value=="string"&&(typeof a.isTrusted=="boolean"||typeof a.isTrusted=="object"||a.isTrusted===void 0)&&(typeof a.supportThemeIcons=="boolean"||a.supportThemeIcons===void 0):!1}e.isMarkdownString=v;function b(a,u){return a===u?!0:!a||!u?!1:a.value===u.value&&a.isTrusted===u.isTrusted&&a.supportThemeIcons===u.supportThemeIcons&&a.supportHtml===u.supportHtml&&(a.baseUri===u.baseUri||!!a.baseUri&&!!u.baseUri&&(0,y.isEqual)(_.URI.from(a.baseUri),_.URI.from(u.baseUri)))}e.markdownStringEqual=b;function o(a){return a.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=o;function i(a){return a.replace(/"/g,""")}e.escapeDoubleQuotes=i;function n(a){return a&&a.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}e.removeMarkdownEscapes=n;function t(a){const u=[],f=a.split("|").map(d=>d.trim());a=f[0];const c=f[1];if(c){const d=/height=(\d+)/.exec(c),r=/width=(\d+)/.exec(c),l=d?d[1]:"",s=r?r[1]:"",g=isFinite(parseInt(s)),h=isFinite(parseInt(l));g&&u.push(`width="${s}"`),h&&u.push(`height="${l}"`)}return{href:a,dimensions:u}}e.parseHrefAndDimensions=t}),define(ie[184],ne([1,0,7,312,83,313,50,67,115,9,6,58,123,168,99,2,395,224,44,55,45,12,22]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillInIncompleteTokens=e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const g=Object.freeze({image:(ee,$,te)=>{let G=[],de=[];return ee&&({href:ee,dimensions:G}=(0,o.parseHrefAndDimensions)(ee),de.push(`src="${(0,o.escapeDoubleQuotes)(ee)}"`)),te&&de.push(`alt="${(0,o.escapeDoubleQuotes)(te)}"`),$&&de.push(`title="${(0,o.escapeDoubleQuotes)($)}"`),G.length&&(de=de.concat(G)),""},paragraph:ee=>`

    ${ee}

    `,link:(ee,$,te)=>typeof ee!="string"?"":(ee===te&&(te=(0,o.removeMarkdownEscapes)(te)),$=typeof $=="string"?(0,o.escapeDoubleQuotes)((0,o.removeMarkdownEscapes)($)):"",ee=(0,o.removeMarkdownEscapes)(ee),ee=ee.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${te}`)});function h(ee,$={},te={}){var G,de;const ue=new a.DisposableStore;let X=!1;const Z=(0,E.createElement)($),re=function(ce){let ge;try{ge=(0,f.parse)(decodeURIComponent(ce))}catch{}return ge?(ge=(0,d.cloneAndChange)(ge,pe=>{if(ee.uris&&ee.uris[pe])return s.URI.revive(ee.uris[pe])}),encodeURIComponent(JSON.stringify(ge))):ce},oe=function(ce,ge){const pe=ee.uris&&ee.uris[ce];let me=s.URI.revive(pe);return ge?ce.startsWith(c.Schemas.data+":")?ce:(me||(me=s.URI.parse(ce)),c.FileAccess.uriToBrowserUri(me).toString(!0)):!me||s.URI.parse(ce).toString()===me.toString()?ce:(me.query&&(me=me.with({query:re(me.query)})),me.toString())},Y=new u.marked.Renderer;Y.image=g.image,Y.link=g.link,Y.paragraph=g.paragraph;const K=[],H=[];if($.codeBlockRendererSync?Y.code=(ce,ge)=>{const pe=n.defaultGenerator.nextId(),me=$.codeBlockRendererSync(m(ge),ce);return H.push([pe,me]),`
    ${(0,l.escape)(ce)}
    `}:$.codeBlockRenderer&&(Y.code=(ce,ge)=>{const pe=n.defaultGenerator.nextId(),me=$.codeBlockRenderer(m(ge),ce);return K.push(me.then(ve=>[pe,ve])),`
    ${(0,l.escape)(ce)}
    `}),$.actionHandler){const ce=function(me){let ve=me.target;if(!(ve.tagName!=="A"&&(ve=ve.parentElement,!ve||ve.tagName!=="A")))try{let Ce=ve.dataset.href;Ce&&(ee.baseUri&&(Ce=C(s.URI.from(ee.baseUri),Ce)),$.actionHandler.callback(Ce,me))}catch(Ce){(0,v.onUnexpectedError)(Ce)}finally{me.preventDefault()}},ge=$.actionHandler.disposables.add(new y.DomEmitter(Z,"click")),pe=$.actionHandler.disposables.add(new y.DomEmitter(Z,"auxclick"));$.actionHandler.disposables.add(b.Event.any(ge.event,pe.event)(me=>{const ve=new p.StandardMouseEvent(L.getWindow(Z),me);!ve.leftButton&&!ve.middleButton||ce(ve)})),$.actionHandler.disposables.add(L.addDisposableListener(Z,"keydown",me=>{const ve=new _.StandardKeyboardEvent(me);!ve.equals(10)&&!ve.equals(3)||ce(ve)}))}ee.supportHtml||(te.sanitizer=ce=>(ee.isTrusted?ce.match(/^(]+>)|(<\/\s*span>)$/):void 0)?ce:"",te.sanitize=!0,te.silent=!0),te.renderer=Y;let z=(G=ee.value)!==null&&G!==void 0?G:"";z.length>1e5&&(z=`${z.substr(0,1e5)}\u2026`),ee.supportThemeIcons&&(z=(0,i.markdownEscapeEscapedIcons)(z));let se;if($.fillInIncompleteTokens){const ce={...u.marked.defaults,...te},ge=u.marked.lexer(z,ce),pe=P(ge);se=u.marked.parser(pe,ce)}else se=u.marked.parse(z,te);ee.supportThemeIcons&&(se=(0,S.renderLabelWithIcons)(se).map(ge=>typeof ge=="string"?ge:ge.outerHTML).join(""));const ae=new DOMParser().parseFromString(w(ee,se),"text/html");if(ae.body.querySelectorAll("img").forEach(ce=>{const ge=ce.getAttribute("src");if(ge){let pe=ge;try{ee.baseUri&&(pe=C(s.URI.from(ee.baseUri),pe))}catch{}ce.src=oe(pe,!0)}}),ae.body.querySelectorAll("a").forEach(ce=>{const ge=ce.getAttribute("href");if(ce.setAttribute("href",""),!ge||/^data:|javascript:/i.test(ge)||/^command:/i.test(ge)&&!ee.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(ge))ce.replaceWith(...ce.childNodes);else{let pe=oe(ge,!1);ee.baseUri&&(pe=C(s.URI.from(ee.baseUri),ge)),ce.dataset.href=pe}}),Z.innerHTML=w(ee,ae.body.innerHTML),K.length>0)Promise.all(K).then(ce=>{var ge,pe;if(X)return;const me=new Map(ce),ve=Z.querySelectorAll("div[data-code]");for(const Ce of ve){const Se=me.get((ge=Ce.dataset.code)!==null&&ge!==void 0?ge:"");Se&&L.reset(Ce,Se)}(pe=$.asyncRenderCallback)===null||pe===void 0||pe.call($)});else if(H.length>0){const ce=new Map(H),ge=Z.querySelectorAll("div[data-code]");for(const pe of ge){const me=ce.get((de=pe.dataset.code)!==null&&de!==void 0?de:"");me&&L.reset(pe,me)}}if($.asyncRenderCallback)for(const ce of Z.getElementsByTagName("img")){const ge=ue.add(L.addDisposableListener(ce,"load",()=>{ge.dispose(),$.asyncRenderCallback()}))}return{element:Z,dispose:()=>{X=!0,ue.dispose()}}}e.renderMarkdown=h;function m(ee){if(!ee)return"";const $=ee.split(/[\s+|:|,|\{|\?]/,1);return $.length?$[0]:ee}function C(ee,$){return/^\w[\w\d+.-]*:/.test($)?$:ee.path.endsWith("/")?(0,r.resolvePath)(ee,$).toString():(0,r.resolvePath)((0,r.dirname)(ee),$).toString()}function w(ee,$){const{config:te,allowedSchemes:G}=D(ee);k.addHook("uponSanitizeAttribute",(ue,X)=>{if(X.attrName==="style"||X.attrName==="class"){if(ue.tagName==="SPAN"){if(X.attrName==="style"){X.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(X.attrValue);return}else if(X.attrName==="class"){X.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(X.attrValue);return}}X.keepAttr=!1;return}});const de=L.hookDomPurifyHrefAndSrcSanitizer(G);try{return k.sanitize($,{...te,RETURN_TRUSTED_TYPE:!0})}finally{k.removeHook("uponSanitizeAttribute"),de.dispose()}}e.allowedMarkdownAttr=["align","autoplay","alt","class","controls","data-code","data-href","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function D(ee){const $=[c.Schemas.http,c.Schemas.https,c.Schemas.mailto,c.Schemas.data,c.Schemas.file,c.Schemas.vscodeFileResource,c.Schemas.vscodeRemote,c.Schemas.vscodeRemoteResource];return ee.isTrusted&&$.push(c.Schemas.command),{config:{ALLOWED_TAGS:[...L.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:$}}function I(ee){return typeof ee=="string"?ee:M(ee)}e.renderStringAsPlaintext=I;function M(ee){var $;let te=($=ee.value)!==null&&$!==void 0?$:"";te.length>1e5&&(te=`${te.substr(0,1e5)}\u2026`);const G=u.marked.parse(te,{renderer:O.value}).replace(/&(#\d+|[a-zA-Z]+);/g,de=>{var ue;return(ue=A.get(de))!==null&&ue!==void 0?ue:de});return w({isTrusted:!1},G).toString()}e.renderMarkdownAsPlaintext=M;const A=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),O=new t.Lazy(()=>{const ee=new u.marked.Renderer;return ee.code=$=>$,ee.blockquote=$=>$,ee.html=$=>"",ee.heading=($,te,G)=>$+` `,ee.hr=()=>"",ee.list=($,te)=>$,ee.listitem=$=>$+` `,ee.paragraph=$=>$+` `,ee.table=($,te)=>$+te+` `,ee.tablerow=$=>$,ee.tablecell=($,te)=>$+" ",ee.strong=$=>$,ee.em=$=>$,ee.codespan=$=>$,ee.br=()=>` `,ee.del=$=>$,ee.image=($,te,G)=>"",ee.text=$=>$,ee.link=($,te,G)=>G,ee});function T(ee){let $="";return ee.forEach(te=>{$+=te.raw}),$}function N(ee){for(const $ of ee.tokens)if($.type==="text"){const te=$.raw.split(` `),G=te[te.length-1];if(G.includes("`"))return R(ee);if(G.includes("**"))return F(ee);if(G.match(/\*\w/))return B(ee);if(G.match(/(^|\s)__\w/))return j(ee);if(G.match(/(^|\s)_\w/))return W(ee);if(G.match(/(^|\s)\[.*\]\(\w*/))return V(ee);if(G.match(/(^|\s)\[\w/))return U(ee)}}function P(ee){let $,te;for($=0;$"u"&&X.match(/^\s*\|/)){const Z=X.match(/(\|[^\|]+)(?=\||$)/g);Z&&(G=Z.length)}else if(typeof G=="number")if(X.match(/^\s*\|/)){if(ue!==te.length-1)return;de=!0}else return}if(typeof G=="number"&&G>0){const ue=de?te.slice(0,-1).join(` `):$,X=!!ue.match(/\|\s*$/),Z=ue+(X?"":"|")+` |${" --- |".repeat(G)}`;return u.marked.lexer(Z)}}}),define(ie[229],ne([1,0,7,312,50,184,63,115,38,6,58,2,27,404]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:S.Color.white.toString(),buttonForeground:S.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};class n extends o.Disposable{get onDidClick(){return this._onDidClick.event}constructor(a,u){super(),this._label="",this._onDidClick=this._register(new v.Emitter),this.options=u,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!u.secondary);const f=u.secondary?u.buttonSecondaryBackground:u.buttonBackground,c=u.secondary?u.buttonSecondaryForeground:u.buttonForeground;this._element.style.color=c||"",this._element.style.backgroundColor=f||"",u.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),a.appendChild(this._element),this._register(_.Gesture.addTarget(this._element)),[L.EventType.CLICK,_.EventType.Tap].forEach(d=>{this._register((0,L.addDisposableListener)(this._element,d,r=>{if(!this.enabled){L.EventHelper.stop(r);return}this._onDidClick.fire(r)}))}),this._register((0,L.addDisposableListener)(this._element,L.EventType.KEY_DOWN,d=>{const r=new y.StandardKeyboardEvent(d);let l=!1;this.enabled&&(r.equals(3)||r.equals(10))?(this._onDidClick.fire(d),l=!0):r.equals(9)&&(this._element.blur(),l=!0),l&&L.EventHelper.stop(r,!0)})),this._register((0,L.addDisposableListener)(this._element,L.EventType.MOUSE_OVER,d=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,L.addDisposableListener)(this._element,L.EventType.MOUSE_OUT,d=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,L.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(a){const u=[];for(let f of(0,p.renderLabelWithIcons)(a))if(typeof f=="string"){if(f=f.trim(),f==="")continue;const c=document.createElement("span");c.textContent=f,u.push(c)}else u.push(f);return u}updateBackground(a){let u;this.options.secondary?u=a?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:u=a?this.options.buttonHoverBackground:this.options.buttonBackground,u&&(this._element.style.backgroundColor=u)}get element(){return this._element}set label(a){var u;if(this._label===a||(0,b.isMarkdownString)(this._label)&&(0,b.isMarkdownString)(a)&&(0,b.markdownStringEqual)(this._label,a))return;this._element.classList.add("monaco-text-button");const f=this.options.supportShortLabel?this._labelElement:this._element;if((0,b.isMarkdownString)(a)){const c=(0,E.renderMarkdown)(a,{inline:!0});c.dispose();const d=(u=c.element.querySelector("p"))===null||u===void 0?void 0:u.innerHTML;if(d){const r=(0,k.sanitize)(d,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});f.innerHTML=r}else(0,L.reset)(f)}else this.options.supportIcons?(0,L.reset)(f,...this.getContentElements(a)):f.textContent=a;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,E.renderStringAsPlaintext)(a)),this._label=a}get label(){return this._label}set icon(a){this._element.classList.add(...i.ThemeIcon.asClassNameArray(a))}set enabled(a){a?(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")}}e.Button=n}),define(ie[321],ne([1,0,7,14,19,58,123,2,20,566]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function b(n,t){(0,S.isString)(t)?n.title=(0,_.stripIcons)(t):t?.markdownNotSupportedFallback?n.title=t.markdownNotSupportedFallback:n.removeAttribute("title")}e.setupNativeHover=b;class o{constructor(t,a,u){this.hoverDelegate=t,this.target=a,this.fadeInAnimation=u}async update(t,a,u){var f;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let c;if(t===void 0||(0,S.isString)(t)||t instanceof HTMLElement)c=t;else if(!(0,S.isFunction)(t.markdown))c=(f=t.markdown)!==null&&f!==void 0?f:t.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,v.localize)(0,null),a),this._cancellationTokenSource=new y.CancellationTokenSource;const d=this._cancellationTokenSource.token;if(c=await t.markdown(d),c===void 0&&(c=t.markdownNotSupportedFallback),this.isDisposed||d.isCancellationRequested)return}this.show(c,a,u)}show(t,a,u){const f=this._hoverWidget;if(this.hasContent(t)){const c={content:t,target:this.target,appearance:{showPointer:this.hoverDelegate.placement==="element",skipFadeInAnimation:!this.fadeInAnimation||!!f},position:{hoverPosition:2},...u};this._hoverWidget=this.hoverDelegate.showHover(c,a)}f?.dispose()}hasContent(t){return t?(0,E.isMarkdownString)(t)?!!t.value:!0:!1}get isDisposed(){var t;return(t=this._hoverWidget)===null||t===void 0?void 0:t.isDisposed}dispose(){var t,a;(t=this._hoverWidget)===null||t===void 0||t.dispose(),(a=this._cancellationTokenSource)===null||a===void 0||a.dispose(!0),this._cancellationTokenSource=void 0}}function i(n,t,a,u){let f,c;const d=(C,w)=>{var D;const I=c!==void 0;C&&(c?.dispose(),c=void 0),w&&(f?.dispose(),f=void 0),I&&((D=n.onDidHideHover)===null||D===void 0||D.call(n))},r=(C,w,D)=>new k.TimeoutTimer(async()=>{(!c||c.isDisposed)&&(c=new o(n,D||t,C>0),await c.update(a,w,u))},C),l=()=>{if(f)return;const C=new p.DisposableStore,w=M=>d(!1,M.fromElement===t);C.add(L.addDisposableListener(t,L.EventType.MOUSE_LEAVE,w,!0));const D=()=>d(!0,!0);C.add(L.addDisposableListener(t,L.EventType.MOUSE_DOWN,D,!0));const I={targetElements:[t],dispose:()=>{}};if(n.placement===void 0||n.placement==="mouse"){const M=A=>{I.x=A.x+10,A.target instanceof HTMLElement&&A.target.classList.contains("action-label")&&d(!0,!0)};C.add(L.addDisposableListener(t,L.EventType.MOUSE_MOVE,M,!0))}C.add(r(n.delay,!1,I)),f=C},s=L.addDisposableListener(t,L.EventType.MOUSE_OVER,l,!0),g=()=>{if(f)return;const C={targetElements:[t],dispose:()=>{}},w=new p.DisposableStore,D=()=>d(!0,!0);w.add(L.addDisposableListener(t,L.EventType.BLUR,D,!0)),w.add(r(n.delay,!1,C)),f=w},h=L.addDisposableListener(t,L.EventType.FOCUS,g,!0);return{show:C=>{d(!1,!0),r(0,C)},hide:()=>{d(!0,!0)},update:async(C,w)=>{a=C,await c?.update(a,void 0,w)},dispose:()=>{s.dispose(),h.dispose(),d(!0,!0)}}}e.setupCustomHover=i}),define(ie[230],ne([1,0,7,316,321,2,55,170,410]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class S{constructor(t){this._element=t}get element(){return this._element}set textContent(t){this.disposed||t===this._textContent||(this._textContent=t,this._element.textContent=t)}set className(t){this.disposed||t===this._className||(this._className=t,this._element.className=t)}set empty(t){this.disposed||t===this._empty||(this._empty=t,this._element.style.marginLeft=t?"0":"")}dispose(){this.disposed=!0}}class v extends E.Disposable{constructor(t,a){super(),this.customHovers=new Map,this.creationOptions=a,this.domNode=this._register(new S(L.append(t,L.$(".monaco-icon-label")))),this.labelContainer=L.append(this.domNode.element,L.$(".monaco-icon-label-container")),this.nameContainer=L.append(this.labelContainer,L.$("span.monaco-icon-name-container")),a?.supportHighlights||a?.supportIcons?this.nameNode=new i(this.nameContainer,!!a.supportIcons):this.nameNode=new b(this.nameContainer),this.hoverDelegate=a?.hoverDelegate}get element(){return this.domNode.element}setLabel(t,a,u){var f;const c=["monaco-icon-label"],d=["monaco-icon-label-container"];let r="";if(u&&(u.extraClasses&&c.push(...u.extraClasses),u.italic&&c.push("italic"),u.strikethrough&&c.push("strikethrough"),u.disabledCommand&&d.push("disabled"),u.title&&(typeof u.title=="string"?r+=u.title:r+=t)),this.domNode.className=c.join(" "),this.domNode.element.setAttribute("aria-label",r),this.labelContainer.className=d.join(" "),this.setupHover(u?.descriptionTitle?this.labelContainer:this.element,u?.title),this.nameNode.setLabel(t,u),a||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof k.HighlightedLabel?(l.set(a||"",u?u.descriptionMatches:void 0,void 0,u?.labelEscapeNewLines),this.setupHover(l.element,u?.descriptionTitle)):(l.textContent=a&&u?.labelEscapeNewLines?k.HighlightedLabel.escapeNewLines(a,[]):a||"",this.setupHover(l.element,u?.descriptionTitle||""),l.empty=!a)}if(u?.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=(f=u?.suffix)!==null&&f!==void 0?f:""}}setupHover(t,a){const u=this.customHovers.get(t);if(u&&(u.dispose(),this.customHovers.delete(t)),!a){t.removeAttribute("title");return}if(!this.hoverDelegate)(0,y.setupNativeHover)(t,a);else{const f=(0,y.setupCustomHover)(this.hoverDelegate,t,a);f&&this.customHovers.set(t,f)}}dispose(){super.dispose();for(const t of this.customHovers.values())t.dispose();this.customHovers.clear()}getOrCreateSuffixNode(){if(!this.suffixNode){const t=this._register(new S(L.after(this.nameContainer,L.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new S(L.append(t.element,L.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var t;if(!this.descriptionNode){const a=this._register(new S(L.append(this.labelContainer,L.$("span.monaco-icon-description-container"))));!((t=this.creationOptions)===null||t===void 0)&&t.supportDescriptionHighlights?this.descriptionNode=new k.HighlightedLabel(L.append(a.element,L.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new S(L.append(a.element,L.$("span.label-description"))))}return this.descriptionNode}}e.IconLabel=v;class b{constructor(t){this.container=t,this.label=void 0,this.singleLabel=void 0}setLabel(t,a){if(!(this.label===t&&(0,_.equals)(this.options,a)))if(this.label=t,this.options=a,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=L.append(this.container,L.$("a.label-name",{id:a?.domId}))),this.singleLabel.textContent=t;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let u=0;u{const c={start:u,end:u+f.length},d=a.map(r=>p.Range.intersect(c,r)).filter(r=>!p.Range.isEmpty(r)).map(({start:r,end:l})=>({start:r-u,end:l-u}));return u=c.end+t.length,d})}class i{constructor(t,a){this.container=t,this.supportIcons=a,this.label=void 0,this.singleLabel=void 0}setLabel(t,a){if(!(this.label===t&&(0,_.equals)(this.options,a)))if(this.label=t,this.options=a,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new k.HighlightedLabel(L.append(this.container,L.$("a.label-name",{id:a?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(t,a?.matches,void 0,a?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const u=a?.separator||"/",f=o(t,u,a?.matches);for(let c=0;c{L.EventHelper.stop(l,!0)}))}registerListeners(){this._register(L.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(L.addDisposableListener(this.selectElement,L.EventType.CLICK,d=>{L.EventHelper.stop(d),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(L.addDisposableListener(this.selectElement,L.EventType.MOUSE_DOWN,d=>{L.EventHelper.stop(d)}));let c;this._register(L.addDisposableListener(this.selectElement,"touchstart",d=>{c=this._isVisible})),this._register(L.addDisposableListener(this.selectElement,"touchend",d=>{L.EventHelper.stop(d),c?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(L.addDisposableListener(this.selectElement,L.EventType.KEY_DOWN,d=>{const r=new y.StandardKeyboardEvent(d);let l=!1;o.isMacintosh?(r.keyCode===18||r.keyCode===16||r.keyCode===10||r.keyCode===3)&&(l=!0):(r.keyCode===18&&r.altKey||r.keyCode===16&&r.altKey||r.keyCode===10||r.keyCode===3)&&(l=!0),l&&(this.showSelectDropDown(),L.EventHelper.stop(d,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(c,d){p.equals(this.options,c)||(this.options=c,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((r,l)=>{this.selectElement.add(this.createOption(r.text,l,r.isDisabled)),typeof r.description=="string"&&(this._hasDetails=!0)})),d!==void 0&&(this.select(d),this._currentSelection=this.selected)}setOptionsList(){var c;(c=this.selectList)===null||c===void 0||c.splice(0,this.selectList.length,this.options)}select(c){c>=0&&cthis.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)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(c){this.selectElement.tabIndex=c?0:-1}render(c){this.container=c,c.classList.add("select-container"),c.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const c=[];this.styles.listFocusBackground&&c.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&&c.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&&c.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!==this.styles.selectBackground?(c.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),c.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),c.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(c.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),c.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&c.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&&c.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&&c.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&&c.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; }`),c.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; }"),c.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=c.join(` `)}styleSelectElement(){var c,d,r;const l=(c=this.styles.selectBackground)!==null&&c!==void 0?c:"",s=(d=this.styles.selectForeground)!==null&&d!==void 0?d:"",g=(r=this.styles.selectBorder)!==null&&r!==void 0?r:"";this.selectElement.style.backgroundColor=l,this.selectElement.style.color=s,this.selectElement.style.borderColor=g}styleList(){var c,d;const r=(c=this.styles.selectBackground)!==null&&c!==void 0?c:"",l=L.asCssValueWithDefault(this.styles.selectListBackground,r);this.selectDropDownListContainer.style.backgroundColor=l,this.selectionDetailsPane.style.backgroundColor=l;const s=(d=this.styles.focusBorder)!==null&&d!==void 0?d:"";this.selectDropDownContainer.style.outlineColor=s,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(c,d,r){const l=document.createElement("option");return l.value=c,l.text=c,l.disabled=!!r,l}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:c=>this.renderSelectDropDown(c,!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:c=>this.renderSelectDropDown(c),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(c){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),c&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(c,d){return c.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(d),{dispose:()=>{try{c.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let c=0;return this.options.forEach((d,r)=>{this.updateDetail(r),this.selectionDetailsPane.offsetHeight>c&&(c=this.selectionDetailsPane.offsetHeight)}),c}layoutSelectDropDown(c){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const d=L.getWindow(this.selectElement),r=L.getDomNodePagePosition(this.selectElement),l=L.getWindow(this.selectElement).getComputedStyle(this.selectElement),s=parseFloat(l.getPropertyValue("--dropdown-padding-top"))+parseFloat(l.getPropertyValue("--dropdown-padding-bottom")),g=d.innerHeight-r.top-r.height-(this.selectBoxOptions.minBottomMargin||0),h=r.top-u.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,m=this.selectElement.offsetWidth,C=this.setWidthControlElement(this.widthControlElement),w=Math.max(C,Math.round(m)).toString()+"px";this.selectDropDownContainer.style.width=w,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let D=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const I=this._hasDetails?this._cachedMaxDetailsHeight:0,M=D+s+I,A=Math.floor((g-s-I)/this.getHeight()),O=Math.floor((h-s-I)/this.getHeight());if(c)return r.top+r.height>d.innerHeight-22||r.topA&&this.options.length>A?(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(r.top+r.height>d.innerHeight-22||r.topg&&(D=A*this.getHeight())}else M>h&&(D=O*this.getHeight());return this.selectList.layout(D),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=D+s+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=D+s+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=w,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(c){let d=0;if(c){let r=0,l=0;this.options.forEach((s,g)=>{const h=s.detail?s.detail.length:0,m=s.decoratorRight?s.decoratorRight.length:0,C=s.text.length+h+m;C>l&&(r=g,l=C)}),c.textContent=this.options[r].text+(this.options[r].decoratorRight?this.options[r].decoratorRight+" ":""),d=L.getTotalWidth(c)}return d}createSelectList(c){if(this.selectList)return;this.selectDropDownListContainer=L.append(c,n(".select-box-dropdown-list-container")),this.listRenderer=new a,this.selectList=new _.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:l=>{let s=l.text;return l.detail&&(s+=`. ${l.detail}`),l.decoratorRight&&(s+=`. ${l.decoratorRight}`),l.description&&(s+=`. ${l.description}`),s},getWidgetAriaLabel:()=>(0,i.localize)(0,null),getRole:()=>o.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const d=this._register(new k.DomEmitter(this.selectDropDownListContainer,"keydown")),r=S.Event.chain(d.event,l=>l.filter(()=>this.selectList.length>0).map(s=>new y.StandardKeyboardEvent(s)));this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===3))(this.onEnter,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===2))(this.onEnter,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===9))(this.onEscape,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===16))(this.onUpArrow,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===18))(this.onDownArrow,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===12))(this.onPageDown,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===11))(this.onPageUp,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===14))(this.onHome,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode===13))(this.onEnd,this)),this._register(S.Event.chain(r,l=>l.filter(s=>s.keyCode>=21&&s.keyCode<=56||s.keyCode>=85&&s.keyCode<=113))(this.onCharacter,this)),this._register(L.addDisposableListener(this.selectList.getHTMLElement(),L.EventType.POINTER_UP,l=>this.onPointerUp(l))),this._register(this.selectList.onMouseOver(l=>typeof l.index<"u"&&this.selectList.setFocus([l.index]))),this._register(this.selectList.onDidChangeFocus(l=>this.onListFocus(l))),this._register(L.addDisposableListener(this.selectDropDownContainer,L.EventType.FOCUS_OUT,l=>{!this._isVisible||L.isAncestor(l.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(c){if(!this.selectList.length)return;L.EventHelper.stop(c);const d=c.target;if(!d||d.classList.contains("slider"))return;const r=d.closest(".monaco-list-row");if(!r)return;const l=Number(r.getAttribute("data-index")),s=r.classList.contains("option-disabled");l>=0&&l{for(let g=0;gthis.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(c){this.selected>0&&(L.EventHelper.stop(c,!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(c){L.EventHelper.stop(c),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{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(c){L.EventHelper.stop(c),!(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(c){L.EventHelper.stop(c),!(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(c){const d=v.KeyCodeUtils.toString(c.keyCode);let r=-1;for(let l=0;l{this.element&&this.handleActionChangeEvent(r)}))}handleActionChangeEvent(f){f.enabled!==void 0&&this.updateEnabled(),f.checked!==void 0&&this.updateChecked(),f.class!==void 0&&this.updateClass(),f.label!==void 0&&(this.updateLabel(),this.updateTooltip()),f.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new S.ActionRunner)),this._actionRunner}set actionRunner(f){this._actionRunner=f}isEnabled(){return this._action.enabled}setActionContext(f){this._context=f}render(f){const c=this.element=f;this._register(E.Gesture.addTarget(f));const d=this.options&&this.options.draggable;d&&(f.draggable=!0,L.isFirefox&&this._register((0,y.addDisposableListener)(f,y.EventType.DRAG_START,r=>{var l;return(l=r.dataTransfer)===null||l===void 0?void 0:l.setData(k.DataTransfers.TEXT,this._action.label)}))),this._register((0,y.addDisposableListener)(c,E.EventType.Tap,r=>this.onClick(r,!0))),this._register((0,y.addDisposableListener)(c,y.EventType.MOUSE_DOWN,r=>{d||y.EventHelper.stop(r,!0),this._action.enabled&&r.button===0&&c.classList.add("active")})),b.isMacintosh&&this._register((0,y.addDisposableListener)(c,y.EventType.CONTEXT_MENU,r=>{r.button===0&&r.ctrlKey===!0&&this.onClick(r)})),this._register((0,y.addDisposableListener)(c,y.EventType.CLICK,r=>{y.EventHelper.stop(r,!0),this.options&&this.options.isMenu||this.onClick(r)})),this._register((0,y.addDisposableListener)(c,y.EventType.DBLCLICK,r=>{y.EventHelper.stop(r,!0)})),[y.EventType.MOUSE_UP,y.EventType.MOUSE_OUT].forEach(r=>{this._register((0,y.addDisposableListener)(c,r,l=>{y.EventHelper.stop(l),c.classList.remove("active")}))})}onClick(f,c=!1){var d;y.EventHelper.stop(f,!0);const r=o.isUndefinedOrNull(this._context)?!((d=this.options)===null||d===void 0)&&d.useEventAsContext?f:{preserveFocus:c}:this._context;this.actionRunner.run(this._action,r)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(f){this.element&&(this.element.tabIndex=f?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getClass(){return this.action.class}getTooltip(){return this.action.tooltip}updateTooltip(){var f;if(!this.element)return;const c=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(c):(this.customHover=(0,_.setupCustomHover)(this.options.hoverDelegate,this.element,c),this._store.add(this.customHover))):this.element.title=c}updateAriaLabel(){var f;if(this.element){const c=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.element.setAttribute("aria-label",c)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}e.BaseActionViewItem=n;class t extends n{constructor(f,c,d){super(f,c,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(f){super.render(f),o.assertType(this.element);const c=document.createElement("a");if(c.classList.add("action-label"),c.setAttribute("role",this.getDefaultAriaRole()),this.label=c,this.element.appendChild(c),this.options.label&&this.options.keybinding){const d=document.createElement("span");d.classList.add("keybinding"),d.textContent=this.options.keybinding,this.element.appendChild(d)}this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===S.Separator.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(f){this.label&&(this.label.tabIndex=f?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let f=null;return this.action.tooltip?f=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(f=this.action.label,this.options.keybinding&&(f=i.localize(0,null,f,this.options.keybinding))),f??void 0}updateClass(){var f;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getClass(),this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(f=this.label)===null||f===void 0||f.classList.remove("codicon")}updateEnabled(){var f,c;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(f=this.element)===null||f===void 0||f.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(c=this.element)===null||c===void 0||c.classList.add("disabled"))}updateAriaLabel(){var f;if(this.label){const c=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.label.setAttribute("aria-label",c)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.removeAttribute("aria-checked"),this.label.setAttribute("role",this.getDefaultAriaRole())))}}e.ActionViewItem=t;class a extends n{constructor(f,c,d,r,l,s,g){super(f,c),this.selectBox=new p.SelectBox(d,r,l,s,g),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(f){this.selectBox.select(f)}registerListeners(){this._register(this.selectBox.onDidSelect(f=>this.runAction(f.selected,f.index)))}runAction(f,c){this.actionRunner.run(this._action,this.getActionContext(f,c))}getActionContext(f,c){return f}setFocusable(f){this.selectBox.setFocusable(f)}focus(){var f;(f=this.selectBox)===null||f===void 0||f.focus()}blur(){var f;(f=this.selectBox)===null||f===void 0||f.blur()}render(f){this.selectBox.render(f)}}e.SelectActionViewItem=a}),define(ie[77],ne([1,0,7,50,132,41,6,2,20,269]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class v extends p.Disposable{constructor(o,i={}){var n,t,a,u,f,c;super(),this._actionRunnerDisposables=this._register(new p.DisposableStore),this.viewItemDisposables=this._register(new p.DisposableMap),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new _.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new _.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new _.Emitter),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new _.Emitter),this.onWillRun=this._onWillRun.event,this.options=i,this._context=(n=i.context)!==null&&n!==void 0?n:null,this._orientation=(t=this.options.orientation)!==null&&t!==void 0?t:0,this._triggerKeys={keyDown:(u=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keyDown)!==null&&u!==void 0?u:!1,keys:(c=(f=this.options.triggerKeys)===null||f===void 0?void 0:f.keys)!==null&&c!==void 0?c:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new E.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 d,r;switch(this._orientation){case 0:d=[15],r=[17];break;case 1:d=[16],r=[18],this.domNode.className+=" vertical";break}this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_DOWN,l=>{const s=new k.StandardKeyboardEvent(l);let g=!0;const h=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;d&&(s.equals(d[0])||s.equals(d[1]))?g=this.focusPrevious():r&&(s.equals(r[0])||s.equals(r[1]))?g=this.focusNext():s.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():s.equals(14)?g=this.focusFirst():s.equals(13)?g=this.focusLast():s.equals(2)&&h instanceof y.BaseActionViewItem&&h.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(s)?this._triggerKeys.keyDown?this.doTrigger(s):this.triggerKeyDown=!0:g=!1,g&&(s.preventDefault(),s.stopPropagation())})),this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_UP,l=>{const s=new k.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)||s.equals(16)||s.equals(18)||s.equals(15)||s.equals(17))&&this.updateFocusedItem()})),this.focusTracker=this._register(L.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(L.getActiveElement()===this.domNode||!L.isAncestor(L.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),o.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(o){if(this.focusable=o,this.focusable){const i=this.viewItems.find(n=>n instanceof y.BaseActionViewItem&&n.isEnabled());i instanceof y.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof y.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(o){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||o.equals(n)}),i}updateFocusedItem(){var o,i;for(let n=0;ni.setActionContext(o))}get actionRunner(){return this._actionRunner}set actionRunner(o){this._actionRunner=o,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=o)}getContainer(){return this.domNode}getAction(o){var i;if(typeof o=="number")return(i=this.viewItems[o])===null||i===void 0?void 0:i.action;if(o instanceof HTMLElement){for(;o.parentElement!==this.actionsList;){if(!o.parentElement)return;o=o.parentElement}for(let n=0;n{const u=document.createElement("li");u.className="action-item",u.setAttribute("role","presentation");let f;const c={hoverDelegate:this.options.hoverDelegate,...i};this.options.actionViewItemProvider&&(f=this.options.actionViewItemProvider(a,c)),f||(f=new y.ActionViewItem(this.context,a,c)),this.options.allowContextMenu||this.viewItemDisposables.set(f,L.addDisposableListener(u,L.EventType.CONTEXT_MENU,d=>{L.EventHelper.stop(d,!0)})),f.actionRunner=this._actionRunner,f.setActionContext(this.context),f.render(u),this.focusable&&f instanceof y.BaseActionViewItem&&this.viewItems.length===0&&f.setFocusable(!0),t===null||t<0||t>=this.actionsList.children.length?(this.actionsList.appendChild(u),this.viewItems.push(f)):(this.actionsList.insertBefore(u,this.actionsList.children[t]),this.viewItems.splice(t,0,f),t++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,p.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),L.clearNode(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(o){let i=!1,n;if(o===void 0?i=!0:typeof o=="number"?n=o:typeof o=="boolean"&&(i=o),i&&typeof this.focusedItem>"u"){const t=this.viewItems.findIndex(a=>a.isEnabled());this.focusedItem=t===-1?void 0:t,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),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(o){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!o&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===E.Separator.ID));return this.updateFocus(),!0}focusPrevious(o){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!o&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===E.Separator.ID));return this.updateFocus(!0),!0}updateFocus(o,i,n=!1){var t,a;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((t=this.viewItems[this.previouslyFocusedItem])===null||t===void 0||t.blur());const u=this.focusedItem!==void 0?this.viewItems[this.focusedItem]:void 0;if(u){let f=!0;S.isFunction(u.focus)||(f=!1),this.options.focusOnlyEnabledItems&&S.isFunction(u.isEnabled)&&!u.isEnabled()&&(f=!1),u.action.id===E.Separator.ID&&(f=!1),f&&((a=u.showHover)===null||a===void 0||a.call(u)),f?(n||this.previouslyFocusedItem!==this.focusedItem)&&(u.focus(o),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(o){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof y.BaseActionViewItem){const n=i._context===null||i._context===void 0?o:i._context;this.run(i._action,n)}}async run(o,i){await this._actionRunner.run(o,i)}dispose(){this._context=void 0,this.viewItems=(0,p.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=v}),define(ie[322],ne([1,0,7,132,583,6,270]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class _ extends k.BaseActionViewItem{constructor(S,v,b,o=Object.create(null)){super(null,S,o),this.actionItem=null,this._onDidChangeVisibility=this._register(new E.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=v,this.contextMenuProvider=b,this.options=o,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(S){this.actionItem=S;const v=i=>{this.element=(0,L.append)(i,(0,L.$)("a.action-label"));let n=[];return typeof this.options.classNames=="string"?n=this.options.classNames.split(/\s+/g).filter(t=>!!t):this.options.classNames&&(n=this.options.classNames),n.find(t=>t==="icon")||n.push("codicon"),this.element.classList.add(...n),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},b=Array.isArray(this.menuActionsOrProvider),o={contextMenuProvider:this.contextMenuProvider,labelRenderer:v,menuAsChild:this.options.menuAsChild,actions:b?this.menuActionsOrProvider:void 0,actionProvider:b?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new y.DropdownMenu(S,o)),this._register(this.dropdownMenu.onDidChangeVisibility(i=>{var n;(n=this.element)===null||n===void 0||n.setAttribute("aria-expanded",`${i}`),this._onDidChangeVisibility.fire(i)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const i=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return i.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let S=null;return this.action.tooltip?S=this.action.tooltip:this.action.label&&(S=this.action.label),S??void 0}setActionContext(S){super.setActionContext(S),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=S:this.dropdownMenu.menuOptions={context:S})}show(){var S;(S=this.dropdownMenu)===null||S===void 0||S.show()}updateEnabled(){var S,v;const b=!this.action.enabled;(S=this.actionItem)===null||S===void 0||S.classList.toggle("disabled",b),(v=this.element)===null||v===void 0||v.classList.toggle("disabled",b)}}e.DropdownMenuActionViewItem=_}),define(ie[231],ne([1,0,7,83,313,77,51,76,86,6,398,55,567,411]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.unthemedInboxStyles=void 0;const n=L.$;e.unthemedInboxStyles={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class t extends S.Widget{constructor(f,c,d){var r;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new v.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new v.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=c,this.options=d,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(r=this.options.tooltip)!==null&&r!==void 0?r:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=L.append(f,n(".monaco-inputbox.idle"));const l=this.options.flexibleHeight?"textarea":"input",s=L.append(this.element,n(".ibwrapper"));if(this.input=L.append(s,n(l+".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=L.append(s,n("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new p.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),L.append(f,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(m=>this.input.scrollTop=m.scrollTop));const g=this._register(new k.DomEmitter(f.ownerDocument,"selectionchange")),h=v.Event.filter(g.event,()=>{const m=f.ownerDocument.getSelection();return m?.anchorNode===s});this._register(h(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 E.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(f){this.placeholder=f,this.input.setAttribute("placeholder",f)}setTooltip(f){this.tooltip=f,this.input.title=f}get inputElement(){return this.input}get value(){return this.input.value}set value(f){this.input.value!==f&&(this.input.value=f,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:L.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return L.isActiveElement(this.input)}select(f=null){this.input.select(),f&&(this.input.setSelectionRange(f.start,f.end),f.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()}set paddingRight(f){this.input.style.width=`calc(100% - ${f}px)`,this.mirror&&(this.mirror.style.paddingRight=f+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const f=this.cachedContentHeight,c=this.cachedHeight,d=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:f,height:c}),this.scrollableElement.setScrollPosition({scrollTop:d})}showMessage(f,c){if(this.state==="open"&&(0,o.equals)(this.message,f))return;this.message=f,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(f.type));const d=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${L.asCssValueWithDefault(d.border,"transparent")}`,this.message.content&&(this.hasFocus()||c)&&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()}validate(){let f=null;return this.validation&&(f=this.validation(this.value),f?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(f)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),f?.type}stylesForType(f){const c=this.options.inputBoxStyles;switch(f){case 1:return{border:c.inputValidationInfoBorder,background:c.inputValidationInfoBackground,foreground:c.inputValidationInfoForeground};case 2:return{border:c.inputValidationWarningBorder,background:c.inputValidationWarningBackground,foreground:c.inputValidationWarningForeground};default:return{border:c.inputValidationErrorBorder,background:c.inputValidationErrorBackground,foreground:c.inputValidationErrorForeground}}}classForType(f){switch(f){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let f;const c=()=>f.style.width=L.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:r=>{var l,s;if(!this.message)return null;f=L.append(r,n(".monaco-inputbox-container")),c();const g={inline:!0,className:"monaco-inputbox-message"},h=this.message.formatContent?(0,y.renderFormattedText)(this.message.content,g):(0,y.renderText)(this.message.content,g);h.classList.add(this.classForType(this.message.type));const m=this.stylesForType(this.message.type);return h.style.backgroundColor=(l=m.background)!==null&&l!==void 0?l:"",h.style.color=(s=m.foreground)!==null&&s!==void 0?s:"",h.style.border=m.border?`1px solid ${m.border}`:"",L.append(f,h),null},onHide:()=>{this.state="closed"},layout:c});let d;this.message.type===3?d=i.localize(0,null,this.message.content):this.message.type===2?d=i.localize(1,null,this.message.content):d=i.localize(2,null,this.message.content),_.alert(d),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 f=this.value,d=f.charCodeAt(f.length-1)===10?" ":"";(f+d).replace(/\u000c/g,"")?this.mirror.textContent=f+d:this.mirror.innerText="\xA0",this.layout()}applyStyles(){var f,c,d;const r=this.options.inputBoxStyles,l=(f=r.inputBackground)!==null&&f!==void 0?f:"",s=(c=r.inputForeground)!==null&&c!==void 0?c:"",g=(d=r.inputBorder)!==null&&d!==void 0?d:"";this.element.style.backgroundColor=l,this.element.style.color=s,this.input.style.backgroundColor="inherit",this.input.style.color=s,this.element.style.border=`1px solid ${L.asCssValueWithDefault(g,"transparent")}`}layout(){if(!this.mirror)return;const f=this.cachedContentHeight;this.cachedContentHeight=L.getTotalHeight(this.mirror),f!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(f){const c=this.inputElement,d=c.selectionStart,r=c.selectionEnd,l=c.value;d!==null&&r!==null&&(this.value=l.substr(0,d)+f+l.substr(r),c.setSelectionRange(d+1,d+1),this.layout())}dispose(){var f;this._hideMessage(),this.message=null,(f=this.actionbar)===null||f===void 0||f.dispose(),super.dispose()}}e.InputBox=t;class a extends t{constructor(f,c,d){const r=i.localize(3,null,"\u21C5"),l=i.localize(4,null,"\u21C5");super(f,c,d),this._onDidFocus=this._register(new v.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new v.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=new b.HistoryNavigator(d.history,100);const s=()=>{if(d.showHistoryHint&&d.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(l)&&this.history.getHistory().length){const g=this.placeholder.endsWith(")")?r:l,h=this.placeholder+g;d.showPlaceholderOnFocus&&!L.isActiveElement(this.input)?this.placeholder=h:this.setPlaceHolder(h)}};this.observer=new MutationObserver((g,h)=>{g.forEach(m=>{m.target.textContent||s()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>s()),this.onblur(this.input,()=>{const g=h=>{if(this.placeholder.endsWith(h)){const m=this.placeholder.slice(0,this.placeholder.length-h.length);return d.showPlaceholderOnFocus?this.placeholder=m:this.setPlaceHolder(m),!0}else return!1};g(l)||g(r)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(f){this.value&&(f||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let f=this.getNextValue();f&&(f=f===this.value?this.getNextValue():f),this.value=f??"",_.status(this.value?this.value:i.localize(5,null))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let f=this.getPreviousValue();f&&(f=f===this.value?this.getPreviousValue():f),f&&(this.value=f,_.status(this.value))}setPlaceHolder(f){super.setPlaceHolder(f),this.setTooltip(f)}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let f=this.history.current();return f||(f=this.history.last(),this.history.next()),f}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}e.HistoryInputBox=a}),define(ie[232],ne([1,0,7,320,231,86,6,562,2,271]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const v=p.localize(0,null);class b extends E.Widget{constructor(i,n,t){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new S.MutableDisposable),this.additionalToggles=[],this._onDidOptionChange=this._register(new _.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new _.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new _.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new _.Emitter),this._onKeyUp=this._register(new _.Emitter),this._onCaseSensitiveKeyDown=this._register(new _.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new _.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=t.placeholder||"",this.validation=t.validation,this.label=t.label||v,this.showCommonFindToggles=!!t.showCommonFindToggles;const a=t.appendCaseSensitiveLabel||"",u=t.appendWholeWordsLabel||"",f=t.appendRegexLabel||"",c=t.history||[],d=!!t.flexibleHeight,r=!!t.flexibleWidth,l=t.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,n,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:c,showHistoryHint:t.showHistoryHint,flexibleHeight:d,flexibleWidth:r,flexibleMaxHeight:l,inputBoxStyles:t.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new k.RegexToggle({appendTitle:f,isChecked:!1,...t.toggleStyles})),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 k.WholeWordsToggle({appendTitle:u,isChecked:!1,...t.toggleStyles})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new k.CaseSensitiveToggle({appendTitle:a,isChecked:!1,...t.toggleStyles})),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 s=[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=s.indexOf(this.domNode.ownerDocument.activeElement);if(h>=0){let m=-1;g.equals(17)?m=(h+1)%s.length:g.equals(15)&&(h===0?m=s.length-1:m=h-1),g.equals(9)?(s[h].blur(),this.inputBox.focus()):m>=0&&s[m].focus(),L.EventHelper.stop(g,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"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(t?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),i?.appendChild(this.domNode),this._register(L.addDisposableListener(this.inputBox.inputElement,"compositionstart",s=>{this.imeSessionInProgress=!0})),this._register(L.addDisposableListener(this.inputBox.inputElement,"compositionend",s=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,s=>this._onKeyDown.fire(s)),this.onkeyup(this.inputBox.inputElement,s=>this._onKeyUp.fire(s)),this.oninput(this.inputBox.inputElement,s=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,s=>this._onMouseDown.fire(s))}get onDidChange(){return this.inputBox.onDidChange}layout(i){this.inputBox.layout(),this.updateInputBoxPadding(i.collapsedFindWidget)}enable(){var i,n,t;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(i=this.regex)===null||i===void 0||i.enable(),(n=this.wholeWords)===null||n===void 0||n.enable(),(t=this.caseSensitive)===null||t===void 0||t.enable();for(const a of this.additionalToggles)a.enable()}disable(){var i,n,t;this.domNode.classList.add("disabled"),this.inputBox.disable(),(i=this.regex)===null||i===void 0||i.disable(),(n=this.wholeWords)===null||n===void 0||n.disable(),(t=this.caseSensitive)===null||t===void 0||t.disable();for(const a of this.additionalToggles)a.disable()}setFocusInputOnOptionClick(i){this.fixFocusOnOptionClickEnabled=i}setEnabled(i){i?this.enable():this.disable()}setAdditionalToggles(i){for(const n of this.additionalToggles)n.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new S.DisposableStore;for(const n of i??[])this.additionalTogglesDisposables.value.add(n),this.controls.appendChild(n.domNode),this.additionalTogglesDisposables.value.add(n.onChange(t=>{this._onDidOptionChange.fire(t),!t&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(n);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(i=!1){var n,t,a,u,f,c;i?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((t=(n=this.caseSensitive)===null||n===void 0?void 0:n.width())!==null&&t!==void 0?t:0)+((u=(a=this.wholeWords)===null||a===void 0?void 0:a.width())!==null&&u!==void 0?u:0)+((c=(f=this.regex)===null||f===void 0?void 0:f.width())!==null&&c!==void 0?c:0)+this.additionalToggles.reduce((d,r)=>d+r.width(),0)}getValue(){return this.inputBox.value}setValue(i){this.inputBox.value!==i&&(this.inputBox.value=i)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var i,n;return(n=(i=this.caseSensitive)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setCaseSensitive(i){this.caseSensitive&&(this.caseSensitive.checked=i)}getWholeWords(){var i,n;return(n=(i=this.wholeWords)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setWholeWords(i){this.wholeWords&&(this.wholeWords.checked=i)}getRegex(){var i,n;return(n=(i=this.regex)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setRegex(i){this.regex&&(this.regex.checked=i,this.validate())}focusOnCaseSensitive(){var i;(i=this.caseSensitive)===null||i===void 0||i.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()}}e.FindInput=b}),define(ie[593],ne([1,0,7,158,231,86,26,6,564,271]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const v=S.localize(0,null),b=S.localize(1,null);class o extends k.Toggle{constructor(t){super({icon:_.Codicon.preserveCase,title:b+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}}class i extends E.Widget{constructor(t,a,u,f){super(),this._showOptionButtons=u,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new p.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new p.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new p.Emitter),this._onInput=this._register(new p.Emitter),this._onKeyUp=this._register(new p.Emitter),this._onPreserveCaseKeyDown=this._register(new p.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=a,this.placeholder=f.placeholder||"",this.validation=f.validation,this.label=f.label||v;const c=f.appendPreserveCaseLabel||"",d=f.history||[],r=!!f.flexibleHeight,l=!!f.flexibleWidth,s=f.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:d,showHistoryHint:f.showHistoryHint,flexibleHeight:r,flexibleWidth:l,flexibleMaxHeight:s,inputBoxStyles:f.inputBoxStyles})),this.preserveCase=this._register(new o({appendTitle:c,isChecked:!1,...f.toggleStyles})),this._register(this.preserveCase.onChange(m=>{this._onDidOptionChange.fire(m),!m&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(m=>{this._onPreserveCaseKeyDown.fire(m)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,m=>{if(m.equals(15)||m.equals(17)||m.equals(9)){const C=g.indexOf(this.domNode.ownerDocument.activeElement);if(C>=0){let w=-1;m.equals(17)?w=(C+1)%g.length:m.equals(15)&&(C===0?w=g.length-1:w=C-1),m.equals(9)?(g[C].blur(),this.inputBox.focus()):w>=0&&g[w].focus(),L.EventHelper.stop(m,!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),t?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,m=>this._onKeyDown.fire(m)),this.onkeyup(this.inputBox.inputElement,m=>this._onKeyUp.fire(m)),this.oninput(this.inputBox.inputElement,m=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,m=>this._onMouseDown.fire(m))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(t){t?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(t){this.preserveCase.checked=t}focusOnPreserve(){this.preserveCase.focus()}validate(){var t;(t=this.inputBox)===null||t===void 0||t.validate()}set width(t){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=t+"px"}dispose(){super.dispose()}}e.ReplaceInput=i}),define(ie[594],ne([1,0,54,63,7,50,67,77,132,314,76,41,14,26,27,123,2,17,12]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=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(w){w[w.Right=0]="Right",w[w.Left=1]="Left"})(d||(e.Direction=d={}));class r extends p.ActionBar{constructor(D,I,M,A){D.classList.add("monaco-menu-container"),D.setAttribute("role","presentation");const O=document.createElement("div");O.classList.add("monaco-menu"),O.setAttribute("role","presentation"),super(O,{orientation:1,actionViewItemProvider:x=>this.doGetActionViewItem(x,M,T),context:M.context,actionRunner:M.actionRunner,ariaLabel:M.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...f.isMacintosh||f.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=A,this.menuElement=O,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(D,A),this._register(k.Gesture.addTarget(O)),this._register((0,y.addDisposableListener)(O,y.EventType.KEY_DOWN,x=>{new E.StandardKeyboardEvent(x).equals(2)&&x.preventDefault()})),M.enableMnemonics&&this._register((0,y.addDisposableListener)(O,y.EventType.KEY_DOWN,x=>{const R=x.key.toLocaleLowerCase();if(this.mnemonics.has(R)){y.EventHelper.stop(x,!0);const B=this.mnemonics.get(R);if(B.length===1&&(B[0]instanceof s&&B[0].container&&this.focusItemByElement(B[0].container),B[0].onClick(x)),B.length>1){const W=B.shift();W&&W.container&&(this.focusItemByElement(W.container),B.push(W)),this.mnemonics.set(R,B)}}})),f.isLinux&&this._register((0,y.addDisposableListener)(O,y.EventType.KEY_DOWN,x=>{const R=new E.StandardKeyboardEvent(x);R.equals(14)||R.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),y.EventHelper.stop(x,!0)):(R.equals(13)||R.equals(12))&&(this.focusedItem=0,this.focusPrevious(),y.EventHelper.stop(x,!0))})),this._register((0,y.addDisposableListener)(this.domNode,y.EventType.MOUSE_OUT,x=>{const R=x.relatedTarget;(0,y.isAncestor)(R,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),x.stopPropagation())})),this._register((0,y.addDisposableListener)(this.actionsList,y.EventType.MOUSE_OVER,x=>{let R=x.target;if(!(!R||!(0,y.isAncestor)(R,this.actionsList)||R===this.actionsList)){for(;R.parentElement!==this.actionsList&&R.parentElement!==null;)R=R.parentElement;if(R.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(R),B!==this.focusedItem&&this.updateFocus()}}})),this._register(k.Gesture.addTarget(this.actionsList)),this._register((0,y.addDisposableListener)(this.actionsList,k.EventType.Tap,x=>{let R=x.initialTarget;if(!(!R||!(0,y.isAncestor)(R,this.actionsList)||R===this.actionsList)){for(;R.parentElement!==this.actionsList&&R.parentElement!==null;)R=R.parentElement;if(R.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(R),B!==this.focusedItem&&this.updateFocus()}}}));const T={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new b.DomScrollableElement(O,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const N=this.scrollableElement.getDomNode();N.style.position="",this.styleScrollElement(N,A),this._register((0,y.addDisposableListener)(O,k.EventType.Change,x=>{y.EventHelper.stop(x,!0);const R=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:R-x.translationY})})),this._register((0,y.addDisposableListener)(N,y.EventType.MOUSE_UP,x=>{x.preventDefault()}));const P=(0,y.getWindow)(D);O.style.maxHeight=`${Math.max(10,P.innerHeight-D.getBoundingClientRect().top-35)}px`,I=I.filter(x=>{var R;return!((R=M.submenuIds)===null||R===void 0)&&R.has(x.id)?(console.warn(`Found submenu cycle: ${x.id}`),!1):!0}),this.push(I,{icon:!0,label:!0,isMenu:!0}),D.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(x=>!(x instanceof g)).forEach((x,R,B)=>{x.updatePositionInSet(R+1,B.length)})}initializeOrUpdateStyleSheet(D,I){this.styleSheet||((0,y.isInShadowDOM)(D)?this.styleSheet=(0,y.createStyleSheet)(D):(r.globalStyleSheet||(r.globalStyleSheet=(0,y.createStyleSheet)()),this.styleSheet=r.globalStyleSheet)),this.styleSheet.textContent=C(I,(0,y.isInShadowDOM)(D))}styleScrollElement(D,I){var M,A;const O=(M=I.foregroundColor)!==null&&M!==void 0?M:"",T=(A=I.backgroundColor)!==null&&A!==void 0?A:"",N=I.borderColor?`1px solid ${I.borderColor}`:"",P="5px",x=I.shadowColor?`0 2px 8px ${I.shadowColor}`:"";D.style.outline=N,D.style.borderRadius=P,D.style.color=O,D.style.backgroundColor=T,D.style.boxShadow=x}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(D){const I=this.focusedItem;this.setFocusedItem(D),I!==this.focusedItem&&this.updateFocus()}setFocusedItem(D){for(let I=0;I{this.element&&(this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_UP,O=>{if(y.EventHelper.stop(O,!0),L.isFirefox){if(new _.StandardMouseEvent((0,y.getWindow)(this.element),O).rightButton)return;this.onClick(O)}else setTimeout(()=>{this.onClick(O)},0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.CONTEXT_MENU,O=>{y.EventHelper.stop(O,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(D){super.render(D),this.element&&(this.container=D,this.item=(0,y.append)(this.element,(0,y.$)("a.action-menu-item")),this._action.id===o.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,y.append)(this.item,(0,y.$)("span.menu-item-check"+t.ThemeIcon.asCSSSelector(n.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,y.append)(this.item,(0,y.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,y.append)(this.item,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var D;super.focus(),(D=this.item)===null||D===void 0||D.focus(),this.applyStyle()}updatePositionInSet(D,I){this.item&&(this.item.setAttribute("aria-posinset",`${D}`),this.item.setAttribute("aria-setsize",`${I}`))}updateLabel(){var D;if(this.label&&this.options.label){(0,y.clearNode)(this.label);let I=(0,a.stripIcons)(this.action.label);if(I){const M=h(I);this.options.enableMnemonics||(I=M),this.label.setAttribute("aria-label",M.replace(/&&/g,"&"));const A=e.MENU_MNEMONIC_REGEX.exec(I);if(A){I=c.escape(I),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let O=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);for(;O&&O[1];)O=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);const T=N=>N.replace(/&&/g,"&");O?this.label.append(c.ltrim(T(I.substr(0,O.index))," "),(0,y.$)("u",{"aria-hidden":"true"},O[3]),c.rtrim(T(I.substr(O.index+O[0].length))," ")):this.label.innerText=T(I).trim(),(D=this.item)===null||D===void 0||D.setAttribute("aria-keyshortcuts",(A[1]?A[1]:A[3]).toLocaleLowerCase())}else this.label.innerText=I.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 D=this.action.checked;this.item.classList.toggle("checked",!!D),D!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",D?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const D=this.element&&this.element.classList.contains("focused"),I=D&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,M=D&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,A=D&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",O=D&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=I??"",this.item.style.backgroundColor=M??"",this.item.style.outline=A,this.item.style.outlineOffset=O),this.check&&(this.check.style.color=I??"")}}class s extends l{constructor(D,I,M,A,O){super(D,D,A,O),this.submenuActions=I,this.parentData=M,this.submenuOptions=A,this.mysubmenu=null,this.submenuDisposables=this._register(new u.DisposableStore),this.mouseOver=!1,this.expandDirection=A&&A.expandDirection!==void 0?A.expandDirection:d.Right,this.showScheduler=new i.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new i.RunOnceScheduler(()=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(D){super.render(D),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,y.append)(this.item,(0,y.$)("span.submenu-indicator"+t.ThemeIcon.asCSSSelector(n.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_UP,I=>{const M=new E.StandardKeyboardEvent(I);(M.equals(17)||M.equals(3))&&(y.EventHelper.stop(I,!0),this.createSubmenu(!0))})),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,I=>{const M=new E.StandardKeyboardEvent(I);(0,y.getActiveElement)()===this.item&&(M.equals(17)||M.equals(3))&&y.EventHelper.stop(I,!0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_OVER,I=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_LEAVE,I=>{this.mouseOver=!1})),this._register((0,y.addDisposableListener)(this.element,y.EventType.FOCUS_OUT,I=>{this.element&&!(0,y.isAncestor)((0,y.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(){}onClick(D){y.EventHelper.stop(D,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(D){if(this.parentData.submenu&&(D||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(D,I,M,A){const O={top:0,left:0};return O.left=(0,v.layout)(D.width,I.width,{position:A===d.Right?0:1,offset:M.left,size:M.width}),O.left>=M.left&&O.left{new E.StandardKeyboardEvent(R).equals(15)&&(y.EventHelper.stop(R,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_DOWN,R=>{new E.StandardKeyboardEvent(R).equals(15)&&y.EventHelper.stop(R,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(D),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(D){var I;this.item&&((I=this.item)===null||I===void 0||I.setAttribute("aria-expanded",D))}applyStyle(){super.applyStyle();const I=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=I??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class g extends S.ActionViewItem{constructor(D,I,M,A){super(D,I,M),this.menuStyles=A}render(D){super.render(D),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function h(w){const D=e.MENU_MNEMONIC_REGEX,I=D.exec(w);if(!I)return w;const M=!I[1];return w.replace(D,M?"$2$3":"").trim()}e.cleanMnemonic=h;function m(w){const D=(0,n.getCodiconFontCharacters)()[w.id];return`.codicon-${w.id}:before { content: '\\${D.toString(16)}'; }`}e.formatRule=m;function C(w,D){let I=` .monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px; } ${m(n.Codicon.menuSelection)} ${m(n.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; margin: 0 4px; border-radius: 4px; } .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: 4px 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(D){I+=` /* 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 M=w.scrollbarShadow;M&&(I+=` .monaco-scrollable-element > .shadow.top { box-shadow: ${M} 0 6px 6px -6px inset; } .monaco-scrollable-element > .shadow.left { box-shadow: ${M} 6px 0 6px -6px inset; } .monaco-scrollable-element > .shadow.top.left { box-shadow: ${M} 6px 6px 6px -6px inset; } `);const A=w.scrollbarSliderBackground;A&&(I+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${A}; } `);const O=w.scrollbarSliderHoverBackground;O&&(I+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${O}; } `);const T=w.scrollbarSliderActiveBackground;T&&(I+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${T}; } `)}return I}}),define(ie[595],ne([1,0,77,322,41,26,27,6,2,570,422]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class b extends S.Disposable{constructor(n,t,a={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new p.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new S.DisposableStore),this.options=a,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new o(()=>{var u;return(u=this.toggleMenuActionViewItem)===null||u===void 0?void 0:u.show()},a.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",n.appendChild(this.element),this.actionBar=this._register(new L.ActionBar(this.element,{orientation:a.orientation,ariaLabel:a.ariaLabel,actionRunner:a.actionRunner,allowContextMenu:a.allowContextMenu,highlightToggledItems:a.highlightToggledItems,actionViewItemProvider:(u,f)=>{var c;if(u.id===o.ID)return this.toggleMenuActionViewItem=new k.DropdownMenuActionViewItem(u,u.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:_.ThemeIcon.asClassNameArray((c=a.moreIcon)!==null&&c!==void 0?c:E.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry,isMenu:!0}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(a.actionViewItemProvider){const d=a.actionViewItemProvider(u,f);if(d)return d}if(u instanceof y.SubmenuAction){const d=new k.DropdownMenuActionViewItem(u,u.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:u.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return d.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(d),this.disposables.add(this._onDidChangeDropdownVisibility.add(d.onDidChangeVisibility)),d}}}))}set actionRunner(n){this.actionBar.actionRunner=n}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(n){return this.actionBar.getAction(n)}setActions(n,t){this.clear();const a=n?n.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),a.push(this.toggleMenuAction)),a.forEach(u=>{this.actionBar.push(u,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(u)})})}getKeybindingLabel(n){var t,a,u;const f=this.lookupKeybindings?(a=(t=this.options).getKeyBinding)===null||a===void 0?void 0:a.call(t,n):void 0;return(u=f?.getLabel())!==null&&u!==void 0?u:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}e.ToolBar=b;class o extends y.Action{constructor(n,t){t=t||v.localize(0,null),super(o.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=n}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(n){this._menuActions=n}}e.ToggleMenuAction=o,o.ID="toolbar.toggle.more"}),define(ie[185],ne([1,0,7,83,50,77,232,231,228,116,158,220,141,41,13,14,26,27,53,6,71,2,143,20,571,423]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMatchType=e.TreeFindMode=e.FuzzyToggle=e.ModeToggle=e.TreeRenderer=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class m extends S.ElementsDragAndDropData{constructor(X){super(X.elements.map(Z=>Z.element)),this.data=X}}function C(ue){return ue instanceof S.ElementsDragAndDropData?new m(ue):ue}class w{constructor(X,Z){this.modelProvider=X,this.dnd=Z,this.autoExpandDisposable=l.Disposable.None,this.disposables=new l.DisposableStore}getDragURI(X){return this.dnd.getDragURI(X.element)}getDragLabel(X,Z){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(X.map(re=>re.element),Z)}onDragStart(X,Z){var re,oe;(oe=(re=this.dnd).onDragStart)===null||oe===void 0||oe.call(re,C(X),Z)}onDragOver(X,Z,re,oe,Y=!0){const K=this.dnd.onDragOver(C(X),Z&&Z.element,re,oe),H=this.autoExpandNode!==Z;if(H&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=Z),typeof Z>"u")return K;if(H&&typeof K!="boolean"&&K.autoExpand&&(this.autoExpandDisposable=(0,a.disposableTimeout)(()=>{const ce=this.modelProvider(),ge=ce.getNodeLocation(Z);ce.isCollapsed(ge)&&ce.setCollapsed(ge,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof K=="boolean"||!K.accept||typeof K.bubble>"u"||K.feedback){if(!Y){const ce=typeof K=="boolean"?K:K.accept,ge=typeof K=="boolean"?void 0:K.effect;return{accept:ce,effect:ge,feedback:[re]}}return K}if(K.bubble===1){const ce=this.modelProvider(),ge=ce.getNodeLocation(Z),pe=ce.getParentNodeLocation(ge),me=ce.getNode(pe),ve=pe&&ce.getListIndex(pe);return this.onDragOver(X,me,ve,oe,!1)}const z=this.modelProvider(),se=z.getNodeLocation(Z),q=z.getListIndex(se),ae=z.getListRenderCount(se);return{...K,feedback:(0,t.range)(q,q+ae)}}drop(X,Z,re,oe){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(X),Z&&Z.element,re,oe)}onDragEnd(X){var Z,re;(re=(Z=this.dnd).onDragEnd)===null||re===void 0||re.call(Z,X)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function D(ue,X){return X&&{...X,identityProvider:X.identityProvider&&{getId(Z){return X.identityProvider.getId(Z.element)}},dnd:X.dnd&&new w(ue,X.dnd),multipleSelectionController:X.multipleSelectionController&&{isSelectionSingleChangeEvent(Z){return X.multipleSelectionController.isSelectionSingleChangeEvent({...Z,element:Z.element})},isSelectionRangeChangeEvent(Z){return X.multipleSelectionController.isSelectionRangeChangeEvent({...Z,element:Z.element})}},accessibilityProvider:X.accessibilityProvider&&{...X.accessibilityProvider,getSetSize(Z){const re=ue(),oe=re.getNodeLocation(Z),Y=re.getParentNodeLocation(oe);return re.getNode(Y).visibleChildrenCount},getPosInSet(Z){return Z.visibleChildIndex+1},isChecked:X.accessibilityProvider&&X.accessibilityProvider.isChecked?Z=>X.accessibilityProvider.isChecked(Z.element):void 0,getRole:X.accessibilityProvider&&X.accessibilityProvider.getRole?Z=>X.accessibilityProvider.getRole(Z.element):()=>"treeitem",getAriaLabel(Z){return X.accessibilityProvider.getAriaLabel(Z.element)},getWidgetAriaLabel(){return X.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:X.accessibilityProvider&&X.accessibilityProvider.getWidgetRole?()=>X.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:X.accessibilityProvider&&X.accessibilityProvider.getAriaLevel?Z=>X.accessibilityProvider.getAriaLevel(Z.element):Z=>Z.depth,getActiveDescendantId:X.accessibilityProvider.getActiveDescendantId&&(Z=>X.accessibilityProvider.getActiveDescendantId(Z.element))},keyboardNavigationLabelProvider:X.keyboardNavigationLabelProvider&&{...X.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(Z){return X.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Z.element)}}}}class I{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,Z){var re,oe;(oe=(re=this.delegate).setDynamicHeight)===null||oe===void 0||oe.call(re,X.element,Z)}}e.ComposedTreeDelegate=I;var M;(function(ue){ue.None="none",ue.OnHover="onHover",ue.Always="always"})(M||(e.RenderIndentGuides=M={}));class A{get elements(){return this._elements}constructor(X,Z=[]){this._elements=Z,this.disposables=new l.DisposableStore,this.onDidChange=d.Event.forEach(X,re=>this._elements=re,this.disposables)}dispose(){this.disposables.dispose()}}class O{constructor(X,Z,re,oe,Y,K={}){var H;this.renderer=X,this.modelProvider=Z,this.activeNodes=oe,this.renderedIndentGuides=Y,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=O.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this.templateId=X.templateId,this.updateOptions(K),d.Event.map(re,z=>z.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(H=X.onDidChangeTwistieState)===null||H===void 0||H.call(X,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(X={}){if(typeof X.indent<"u"){const Z=(0,s.clamp)(X.indent,0,40);if(Z!==this.indent){this.indent=Z;for(const[re,oe]of this.renderedNodes)this.renderTreeElement(re,oe)}}if(typeof X.renderIndentGuides<"u"){const Z=X.renderIndentGuides!==M.None;if(Z!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=Z;for(const[re,oe]of this.renderedNodes)this._renderIndentGuides(re,oe);if(this.indentGuidesDisposable.dispose(),Z){const re=new l.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,re),this.indentGuidesDisposable=re,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof X.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=X.hideTwistiesOfChildlessElements)}renderTemplate(X){const Z=(0,L.append)(X,(0,L.$)(".monaco-tl-row")),re=(0,L.append)(Z,(0,L.$)(".monaco-tl-indent")),oe=(0,L.append)(Z,(0,L.$)(".monaco-tl-twistie")),Y=(0,L.append)(Z,(0,L.$)(".monaco-tl-contents")),K=this.renderer.renderTemplate(Y);return{container:X,indent:re,twistie:oe,indentGuidesDisposable:l.Disposable.None,templateData:K}}renderElement(X,Z,re,oe){this.renderedNodes.set(X,re),this.renderedElements.set(X.element,X),this.renderTreeElement(X,re),this.renderer.renderElement(X,Z,re.templateData,oe)}disposeElement(X,Z,re,oe){var Y,K;re.indentGuidesDisposable.dispose(),(K=(Y=this.renderer).disposeElement)===null||K===void 0||K.call(Y,X,Z,re.templateData,oe),typeof oe=="number"&&(this.renderedNodes.delete(X),this.renderedElements.delete(X.element))}disposeTemplate(X){this.renderer.disposeTemplate(X.templateData)}onDidChangeTwistieState(X){const Z=this.renderedElements.get(X);Z&&this.onDidChangeNodeTwistieState(Z)}onDidChangeNodeTwistieState(X){const Z=this.renderedNodes.get(X);Z&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(X,Z))}renderTreeElement(X,Z){const re=O.DefaultIndent+(X.depth-1)*this.indent;Z.twistie.style.paddingLeft=`${re}px`,Z.indent.style.width=`${re+this.indent-16}px`,X.collapsible?Z.container.setAttribute("aria-expanded",String(!X.collapsed)):Z.container.removeAttribute("aria-expanded"),Z.twistie.classList.remove(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded));let oe=!1;this.renderer.renderTwistie&&(oe=this.renderer.renderTwistie(X.element,Z.twistie)),X.collapsible&&(!this.hideTwistiesOfChildlessElements||X.visibleChildrenCount>0)?(oe||Z.twistie.classList.add(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded)),Z.twistie.classList.add("collapsible"),Z.twistie.classList.toggle("collapsed",X.collapsed)):Z.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(X,Z)}_renderIndentGuides(X,Z){if((0,L.clearNode)(Z.indent),Z.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const re=new l.DisposableStore,oe=this.modelProvider();for(;;){const Y=oe.getNodeLocation(X),K=oe.getParentNodeLocation(Y);if(!K)break;const H=oe.getNode(K),z=(0,L.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(H)&&z.classList.add("active"),Z.indent.childElementCount===0?Z.indent.appendChild(z):Z.indent.insertBefore(z,Z.indent.firstElementChild),this.renderedIndentGuides.add(H,z),re.add((0,l.toDisposable)(()=>this.renderedIndentGuides.delete(H,z))),X=H}Z.indentGuidesDisposable=re}_onDidChangeActiveNodes(X){if(!this.shouldRenderIndentGuides)return;const Z=new Set,re=this.modelProvider();X.forEach(oe=>{const Y=re.getNodeLocation(oe);try{const K=re.getParentNodeLocation(Y);oe.collapsible&&oe.children.length>0&&!oe.collapsed?Z.add(oe):K&&Z.add(re.getNode(K))}catch{}}),this.activeIndentNodes.forEach(oe=>{Z.has(oe)||this.renderedIndentGuides.forEach(oe,Y=>Y.classList.remove("active"))}),Z.forEach(oe=>{this.activeIndentNodes.has(oe)||this.renderedIndentGuides.forEach(oe,Y=>Y.classList.add("active"))}),this.activeIndentNodes=Z}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,l.dispose)(this.disposables)}}e.TreeRenderer=O,O.DefaultIndent=8;class T{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(X,Z,re){this.tree=X,this.keyboardNavigationLabelProvider=Z,this._filter=re,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new l.DisposableStore,X.onWillRefilter(this.reset,this,this.disposables)}filter(X,Z){let re=1;if(this._filter){const K=this._filter.filter(X,Z);if(typeof K=="boolean"?re=K?1:0:(0,o.isFilterResult)(K)?re=(0,o.getVisibleState)(K.visibility):re=K,re===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:r.FuzzyScore.Default,visibility:re};const oe=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(X),Y=Array.isArray(oe)?oe:[oe];for(const K of Y){const H=K&&K.toString();if(typeof H>"u")return{data:r.FuzzyScore.Default,visibility:re};let z;if(this.tree.findMatchType===B.Contiguous){const se=H.toLowerCase().indexOf(this._lowercasePattern);if(se>-1){z=[Number.MAX_SAFE_INTEGER,0];for(let q=this._lowercasePattern.length;q>0;q--)z.push(se+q-1)}}else z=(0,r.fuzzyScore)(this._pattern,this._lowercasePattern,0,H,H.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(z)return this._matchCount++,Y.length===1?{data:z,visibility:re}:{data:{label:H,score:z},visibility:re}}return this.tree.findMode===R.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(X):2:{data:r.FuzzyScore.Default,visibility:re}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,l.dispose)(this.disposables)}}class N extends b.Toggle{constructor(X){var Z;super({icon:u.Codicon.listFilter,title:(0,h.localize)(0,null),isChecked:(Z=X.isChecked)!==null&&Z!==void 0?Z:!1,inputActiveOptionBorder:X.inputActiveOptionBorder,inputActiveOptionForeground:X.inputActiveOptionForeground,inputActiveOptionBackground:X.inputActiveOptionBackground})}}e.ModeToggle=N;class P extends b.Toggle{constructor(X){var Z;super({icon:u.Codicon.searchFuzzy,title:(0,h.localize)(1,null),isChecked:(Z=X.isChecked)!==null&&Z!==void 0?Z:!1,inputActiveOptionBorder:X.inputActiveOptionBorder,inputActiveOptionForeground:X.inputActiveOptionForeground,inputActiveOptionBackground:X.inputActiveOptionBackground})}}e.FuzzyToggle=P;const x={inputBoxStyles:p.unthemedInboxStyles,toggleStyles:b.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var R;(function(ue){ue[ue.Highlight=0]="Highlight",ue[ue.Filter=1]="Filter"})(R||(e.TreeFindMode=R={}));var B;(function(ue){ue[ue.Fuzzy=0]="Fuzzy",ue[ue.Contiguous=1]="Contiguous"})(B||(e.TreeFindMatchType=B={}));class W extends l.Disposable{set mode(X){this.modeToggle.checked=X===R.Filter,this.findInput.inputBox.setPlaceHolder(X===R.Filter?(0,h.localize)(2,null):(0,h.localize)(3,null))}set matchType(X){this.matchTypeToggle.checked=X===B.Fuzzy}constructor(X,Z,re,oe,Y,K){var H;super(),this.tree=Z,this.elements=(0,L.h)(".monaco-tree-type-filter",[(0,L.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,L.h)(".monaco-tree-type-filter-input@findInput"),(0,L.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new d.Emitter,X.appendChild(this.elements.root),this._register((0,l.toDisposable)(()=>X.removeChild(this.elements.root)));const z=(H=K?.styles)!==null&&H!==void 0?H:x;z.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=z.listFilterWidgetBackground),z.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${z.listFilterWidgetShadow}`),this.modeToggle=this._register(new N({...z.toggleStyles,isChecked:oe===R.Filter})),this.matchTypeToggle=this._register(new P({...z.toggleStyles,isChecked:Y===B.Fuzzy})),this.onDidChangeMode=d.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?R.Filter:R.Highlight,this._store),this.onDidChangeMatchType=d.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?B.Fuzzy:B.Contiguous,this._store),this.findInput=this._register(new _.FindInput(this.elements.findInput,re,{label:(0,h.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:z.inputBoxStyles,toggleStyles:z.toggleStyles,history:K?.history})),this.actionbar=this._register(new E.ActionBar(this.elements.actionbar)),this.mode=oe;const se=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),q=d.Event.chain(se.event,pe=>pe.map(me=>new y.StandardKeyboardEvent(me)));this._register(q(pe=>{if(pe.equals(3)){pe.preventDefault(),pe.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(pe.equals(18)){pe.preventDefault(),pe.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(pe.equals(16)){pe.preventDefault(),pe.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const ae=this._register(new n.Action("close",(0,h.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(ae,{icon:!0,label:!1});const ce=this._register(new k.DomEmitter(this.elements.grab,"mousedown"));this._register(ce.event(pe=>{const me=new l.DisposableStore,ve=me.add(new k.DomEmitter((0,L.getWindow)(pe),"mousemove")),Ce=me.add(new k.DomEmitter((0,L.getWindow)(pe),"mouseup")),Se=this.right,_e=pe.pageX,Te=this.top,Me=pe.pageY;this.elements.grab.classList.add("grabbing");const Pe=this.elements.root.style.transition;this.elements.root.style.transition="unset";const Be=Le=>{const Ne=Le.pageX-_e;this.right=Se-Ne;const fe=Le.pageY-Me;this.top=Te+fe,this.layout()};me.add(ve.event(Be)),me.add(Ce.event(Le=>{Be(Le),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=Pe,me.dispose()}))}));const ge=d.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event,pe=>pe.map(me=>new y.StandardKeyboardEvent(me)));this._register(ge(pe=>{let me,ve;if(pe.keyCode===15?me=Number.POSITIVE_INFINITY:pe.keyCode===17?me=0:pe.keyCode===10&&(me=this.right===0?Number.POSITIVE_INFINITY:0),pe.keyCode===16?ve=0:pe.keyCode===18&&(ve=Number.POSITIVE_INFINITY),me!==void 0&&(pe.preventDefault(),pe.stopPropagation(),this.right=me,this.layout()),ve!==void 0){pe.preventDefault(),pe.stopPropagation(),this.top=ve;const Ce=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=Ce},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(X=this.width){this.width=X,this.right=(0,s.clamp)(this.right,0,Math.max(0,X-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,s.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,a.timeout)(300),super.dispose()}}class V{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))}get matchType(){return this._matchType}set matchType(X){X!==this._matchType&&(this._matchType=X,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(X))}constructor(X,Z,re,oe,Y,K={}){var H,z;this.tree=X,this.view=re,this.filter=oe,this.contextViewProvider=Y,this.options=K,this._pattern="",this.width=0,this._onDidChangeMode=new d.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new d.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new d.Emitter,this._onDidChangeOpenState=new d.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new l.DisposableStore,this.disposables=new l.DisposableStore,this._mode=(H=X.options.defaultFindMode)!==null&&H!==void 0?H:R.Highlight,this._matchType=(z=X.options.defaultFindMatchType)!==null&&z!==void 0?z:B.Fuzzy,Z.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(X={}){X.defaultFindMode!==void 0&&(this.mode=X.defaultFindMode),X.defaultFindMatchType!==void 0&&(this.matchType=X.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var X,Z,re,oe;const Y=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&Y?!((X=this.tree.options.showNotFoundMessage)!==null&&X!==void 0)||X?(Z=this.widget)===null||Z===void 0||Z.showMessage({type:2,content:(0,h.localize)(6,null)}):(re=this.widget)===null||re===void 0||re.showMessage({type:2}):(oe=this.widget)===null||oe===void 0||oe.clearMessage()}shouldAllowFocus(X){return!this.widget||!this.pattern||this._mode===R.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!r.FuzzyScore.isDefault(X.filterData)}layout(X){var Z;this.width=X,(Z=this.widget)===null||Z===void 0||Z.layout(X)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function U(ue,X){return ue.position===X.position&&ue.node.element===X.node.element&&ue.startIndex===X.startIndex&&ue.height===X.height&&ue.endIndex===X.endIndex}class F extends l.Disposable{constructor(X=[]){super(),this.stickyNodes=X}get count(){return this.stickyNodes.length}equal(X){return(0,t.equals)(this.stickyNodes,X.stickyNodes,U)}addDisposable(X){this._register(X)}}class j extends l.Disposable{get firstVisibleNode(){const X=this.view.firstVisibleIndex;if(!(X<0||X>=this.view.length))return this.view.element(X)}constructor(X,Z,re,oe,Y,K={}){super(),this.tree=X,this.model=Z,this.view=re,this.treeDelegate=Y,this.maxWidgetViewRatio=.4;const H=this.validateStickySettings(K);this.stickyScrollMaxItemCount=H.stickyScrollMaxItemCount,this._widget=this._register(new J(re.getScrollableElement(),re,Z,oe,Y)),this._register(re.onDidScroll(()=>this.update())),this._register(re.onDidChangeContentHeight(()=>this.update())),this._register(X.onDidChangeCollapseState(()=>this.update())),this.update()}update(){const X=this.firstVisibleNode;if(!X||this.tree.scrollTop===0){this._widget.setState(void 0);return}const Z=this.findStickyState(X);this._widget.setState(Z)}findStickyState(X){const Z=[],re=this.view.renderHeight*this.maxWidgetViewRatio;let oe=X,Y=0,K=this.getNextStickyNode(oe,void 0,Y);for(;K&&Y+K.height=this.stickyScrollMaxItemCount||(oe=this.getNextVisibleNode(oe),!oe)));)K=this.getNextStickyNode(oe,K.node,Y);return Z.length?new F(Z):void 0}getNextVisibleNode(X){const Z=this.getNodeIndex(X);return Z===-1||Z===this.view.length-1?void 0:this.view.element(Z+1)}getNextStickyNode(X,Z,re){const oe=this.getAncestorUnderPrevious(X,Z);if(oe&&!(oe===X&&(!this.nodeIsUncollapsedParent(X)||this.nodeTopAlignsWithStickyNodesBottom(X,re))))return this.createStickyScrollNode(oe,re)}nodeTopAlignsWithStickyNodesBottom(X,Z){const re=this.getNodeIndex(X),oe=this.view.getElementTop(re),Y=Z;return this.view.scrollTop===oe-Y}createStickyScrollNode(X,Z){const re=this.treeDelegate.getHeight(X),{startIndex:oe,endIndex:Y}=this.getNodeRange(X),K=this.calculateStickyNodePosition(Y,Z);return{node:X,position:K,height:re,startIndex:oe,endIndex:Y}}getAncestorUnderPrevious(X,Z=void 0){let re=X,oe=this.getParentNode(re);for(;oe;){if(oe===Z)return re;re=oe,oe=this.getParentNode(re)}if(Z===void 0)return re}calculateStickyNodePosition(X,Z){let re=this.view.getRelativeTop(X);if(re===null&&this.view.firstVisibleIndex===X&&X+1K&&Z<=H?K:Z}getParentNode(X){const Z=this.model.getNodeLocation(X),re=this.model.getParentNodeLocation(Z);return re?this.model.getNode(re):void 0}nodeIsUncollapsedParent(X){const Z=this.model.getNodeLocation(X);return this.model.getListRenderCount(Z)>1}getNodeIndex(X,Z){return Z===void 0&&(Z=this.model.getNodeLocation(X)),this.model.getListIndex(Z)}getNodeRange(X){const Z=this.model.getNodeLocation(X),re=this.model.getListIndex(Z);if(re<0)throw new Error("Node not found in tree");const oe=this.model.getListRenderCount(Z),Y=re+oe-1;return{startIndex:re,endIndex:Y}}nodePositionTopBelowWidget(X){const Z=[];let re=this.getParentNode(X);for(;re;)Z.push(re),re=this.getParentNode(re);let oe=0;for(let Y=0;Y0,oe=!!X&&X.count>0;if(!re&&!oe||re&&oe&&this._previousState.equal(X)||(re!==oe&&this.setVisible(oe),(Z=this._previousState)===null||Z===void 0||Z.dispose(),this._previousState=X,!oe))return;for(let H=X.count-1;H>=0;H--){const z=X.stickyNodes[H],se=H?X.stickyNodes[H-1]:void 0,q=se?se.position+se.height:0,{element:ae,disposable:ce}=this.createElement(z,q);this._rootDomNode.appendChild(ae),X.addDisposable(ce)}const Y=(0,L.$)(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(Y),X.addDisposable((0,l.toDisposable)(()=>Y.remove()));const K=X.stickyNodes[X.count-1];this._rootDomNode.style.height=`${K.position+K.height}px`}createElement(X,Z){const re=this.model.getNodeLocation(X.node),oe=this.model.getListIndex(re),Y=document.createElement("div");Y.style.top=`${X.position}px`,Y.style.height=`${X.height}px`,Y.style.lineHeight=`${X.height}px`,Y.classList.add("monaco-tree-sticky-row"),Y.classList.add("monaco-list-row"),Y.setAttribute("data-index",`${oe}`),Y.setAttribute("data-parity",oe%2===0?"even":"odd"),Y.setAttribute("id",this.view.getElementID(oe));const K=this.treeDelegate.getTemplateId(X.node),H=this.treeRenderers.find(ae=>ae.templateId===K);if(!H)throw new Error(`No renderer found for template id ${K}`);const z=new Proxy(X.node,{}),se=H.renderTemplate(Y);H.renderElement(z,X.startIndex,se,X.height);const q=(0,l.toDisposable)(()=>{H.disposeElement(z,X.startIndex,se,X.height),H.disposeTemplate(se),Y.remove()});return{element:Y,disposable:q}}setVisible(X){this._rootDomNode.style.display=X?"block":"none"}dispose(){var X;(X=this._previousState)===null||X===void 0||X.dispose(),this._rootDomNode.remove()}}function le(ue){let X=i.TreeMouseEventTarget.Unknown;return(0,L.hasParentWithClass)(ue.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?X=i.TreeMouseEventTarget.Twistie:(0,L.hasParentWithClass)(ue.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?X=i.TreeMouseEventTarget.Element:(0,L.hasParentWithClass)(ue.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(X=i.TreeMouseEventTarget.Filter),{browserEvent:ue.browserEvent,element:ue.element?ue.element.element:null,target:X}}function ee(ue,X){X(ue),ue.children.forEach(Z=>ee(Z,X))}class ${get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(X,Z){this.getFirstViewElementWithTrait=X,this.identityProvider=Z,this.nodes=[],this._onDidChange=new d.Emitter,this.onDidChange=this._onDidChange.event}set(X,Z){!Z?.__forceEvent&&(0,t.equals)(this.nodes,X)||this._set(X,!1,Z)}_set(X,Z,re){if(this.nodes=[...X],this.elements=void 0,this._nodeSet=void 0,!Z){const oe=this;this._onDidChange.fire({get elements(){return oe.get()},browserEvent:re})}}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:Z}){if(!this.identityProvider){const z=this.createNodeSet(),se=q=>z.delete(q);Z.forEach(q=>ee(q,se)),this.set([...z.values()]);return}const re=new Set,oe=z=>re.add(this.identityProvider.getId(z.element).toString());Z.forEach(z=>ee(z,oe));const Y=new Map,K=z=>Y.set(this.identityProvider.getId(z.element).toString(),z);X.forEach(z=>ee(z,K));const H=[];for(const z of this.nodes){const se=this.identityProvider.getId(z.element).toString();if(!re.has(se))H.push(z);else{const ae=Y.get(se);ae&&ae.visible&&H.push(ae)}}if(this.nodes.length>0&&H.length===0){const z=this.getFirstViewElementWithTrait();z&&H.push(z)}this._set(H,!0)}createNodeSet(){const X=new Set;for(const Z of this.nodes)X.add(Z);return X}}class te extends v.MouseController{constructor(X,Z,re){super(X),this.tree=Z,this.stickyScrollProvider=re}onViewPointer(X){if((0,v.isButton)(X.browserEvent.target)||(0,v.isInputElement)(X.browserEvent.target)||(0,v.isMonacoEditor)(X.browserEvent.target)||X.browserEvent.isHandledByList)return;const Z=X.element;if(!Z)return super.onViewPointer(X);if(this.isSelectionRangeChangeEvent(X)||this.isSelectionSingleChangeEvent(X))return super.onViewPointer(X);const re=X.browserEvent.target,oe=re.classList.contains("monaco-tl-twistie")||re.classList.contains("monaco-icon-label")&&re.classList.contains("folder-icon")&&X.browserEvent.offsetX<16,Y=(0,v.isStickyScrollElement)(X.browserEvent.target);let K=!1;if(Y?K=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?K=this.tree.expandOnlyOnTwistieClick(Z.element):K=!!this.tree.expandOnlyOnTwistieClick,Y)this.handleStickyScrollMouseEvent(X,Z);else{if(K&&!oe&&X.browserEvent.detail!==2)return super.onViewPointer(X);if(!this.tree.expandOnDoubleClick&&X.browserEvent.detail===2)return super.onViewPointer(X)}if(Z.collapsible&&(!Y||oe)){const H=this.tree.getNodeLocation(Z),z=X.browserEvent.altKey;if(this.tree.setFocus([H]),this.tree.toggleCollapsed(H,z),K&&oe){X.browserEvent.isHandledByList=!0;return}}Y||super.onViewPointer(X)}handleStickyScrollMouseEvent(X,Z){if((0,v.isMonacoCustomToggle)(X.browserEvent.target)||(0,v.isActionItem)(X.browserEvent.target))return;const re=this.stickyScrollProvider();if(!re)throw new Error("Sticky scroll controller not found");const oe=this.list.indexOf(Z),Y=this.list.getElementTop(oe),K=re.nodePositionTopBelowWidget(Z);this.tree.scrollTop=Y-K,this.list.setFocus([oe]),this.list.setSelection([oe])}onDoubleClick(X){X.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||X.browserEvent.isHandledByList||super.onDoubleClick(X)}}class G extends v.List{constructor(X,Z,re,oe,Y,K,H,z){super(X,Z,re,oe,z),this.focusTrait=Y,this.selectionTrait=K,this.anchorTrait=H}createMouseController(X){return new te(this,X.tree,X.stickyScrollProvider)}splice(X,Z,re=[]){if(super.splice(X,Z,re),re.length===0)return;const oe=[],Y=[];let K;re.forEach((H,z)=>{this.focusTrait.has(H)&&oe.push(X+z),this.selectionTrait.has(H)&&Y.push(X+z),this.anchorTrait.has(H)&&(K=X+z)}),oe.length>0&&super.setFocus((0,t.distinct)([...super.getFocus(),...oe])),Y.length>0&&super.setSelection((0,t.distinct)([...super.getSelection(),...Y])),typeof K=="number"&&super.setAnchor(K)}setFocus(X,Z,re=!1){super.setFocus(X,Z),re||this.focusTrait.set(X.map(oe=>this.element(oe)),Z)}setSelection(X,Z,re=!1){super.setSelection(X,Z),re||this.selectionTrait.set(X.map(oe=>this.element(oe)),Z)}setAnchor(X,Z=!1){super.setAnchor(X),Z||(typeof X>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(X)]))}}class de{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 onMouseDblClick(){return d.Event.filter(d.Event.map(this.view.onMouseDblClick,le),X=>X.target!==i.TreeMouseEventTarget.Filter)}get onPointer(){return d.Event.map(this.view.onPointer,le)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return d.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var X,Z;return(Z=(X=this.findController)===null||X===void 0?void 0:X.mode)!==null&&Z!==void 0?Z:R.Highlight}set findMode(X){this.findController&&(this.findController.mode=X)}get findMatchType(){var X,Z;return(Z=(X=this.findController)===null||X===void 0?void 0:X.matchType)!==null&&Z!==void 0?Z:B.Fuzzy}set findMatchType(X){this.findController&&(this.findController.matchType=X)}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,Z,re,oe,Y={}){var K;this._user=X,this._options=Y,this.eventBufferer=new d.EventBufferer,this.onDidChangeFindOpenState=d.Event.None,this.disposables=new l.DisposableStore,this._onWillRefilter=new d.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new d.Emitter,this.treeDelegate=new I(re);const H=new d.Relay,z=new d.Relay,se=this.disposables.add(new A(z.event)),q=new c.SetMap;this.renderers=oe.map(me=>new O(me,()=>this.model,H.event,se,q,Y));for(const me of this.renderers)this.disposables.add(me);let ae;Y.keyboardNavigationLabelProvider&&(ae=new T(this,Y.keyboardNavigationLabelProvider,Y.filter),Y={...Y,filter:ae},this.disposables.add(ae)),this.focus=new $(()=>this.view.getFocusedElements()[0],Y.identityProvider),this.selection=new $(()=>this.view.getSelectedElements()[0],Y.identityProvider),this.anchor=new $(()=>this.view.getAnchorElement(),Y.identityProvider),this.view=new G(X,Z,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...D(()=>this.model,Y),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(X,this.view,Y),H.input=this.model.onDidChangeCollapseState;const ce=d.Event.forEach(this.model.onDidSplice,me=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(me),this.selection.onDidModelSplice(me)})},this.disposables);ce(()=>null,null,this.disposables);const ge=this.disposables.add(new d.Emitter),pe=this.disposables.add(new a.Delayer(0));if(this.disposables.add(d.Event.any(ce,this.focus.onDidChange,this.selection.onDidChange)(()=>{pe.trigger(()=>{const me=new Set;for(const ve of this.focus.getNodes())me.add(ve);for(const ve of this.selection.getNodes())me.add(ve);ge.fire([...me.values()])})})),z.input=ge.event,Y.keyboardSupport!==!1){const me=d.Event.chain(this.view.onKeyDown,ve=>ve.filter(Ce=>!(0,v.isInputElement)(Ce.target)).map(Ce=>new y.StandardKeyboardEvent(Ce)));d.Event.chain(me,ve=>ve.filter(Ce=>Ce.keyCode===15))(this.onLeftArrow,this,this.disposables),d.Event.chain(me,ve=>ve.filter(Ce=>Ce.keyCode===17))(this.onRightArrow,this,this.disposables),d.Event.chain(me,ve=>ve.filter(Ce=>Ce.keyCode===10))(this.onSpace,this,this.disposables)}if((!((K=Y.findWidgetEnabled)!==null&&K!==void 0)||K)&&Y.keyboardNavigationLabelProvider&&Y.contextViewProvider){const me=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new V(this,this.model,this.view,ae,Y.contextViewProvider,me),this.focusNavigationFilter=ve=>this.findController.shouldAllowFocus(ve),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=d.Event.None,this.onDidChangeFindMatchType=d.Event.None;Y.enableStickyScroll&&(this.stickyScrollController=new j(this,this.model,this.view,this.renderers,this.treeDelegate,Y)),this.styleElement=(0,L.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}updateOptions(X={}){var Z;this._options={...this._options,...X};for(const re of this.renderers)re.updateOptions(X);this.view.updateOptions(this._options),(Z=this.findController)===null||Z===void 0||Z.updateOptions(X),this.updateStickyScroll(X),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}get options(){return this._options}updateStickyScroll(X){var Z;!this.stickyScrollController&&this._options.enableStickyScroll?this.stickyScrollController=new j(this,this.model,this.view,this.renderers,this.treeDelegate,this._options):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(Z=this.stickyScrollController)===null||Z===void 0||Z.updateOptions(X)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(X){this.view.scrollTop=X}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(X,Z){var re;this.view.layout(X,Z),(0,g.isNumber)(Z)&&((re=this.findController)===null||re===void 0||re.layout(Z))}style(X){const Z=`.${this.view.domId}`,re=[];X.treeIndentGuidesStroke&&(re.push(`.monaco-list${Z}:hover .monaco-tl-indent > .indent-guide, .monaco-list${Z}.always .monaco-tl-indent > .indent-guide { border-color: ${X.treeInactiveIndentGuidesStroke}; }`),re.push(`.monaco-list${Z} .monaco-tl-indent > .indent-guide.active { border-color: ${X.treeIndentGuidesStroke}; }`)),X.listBackground&&(re.push(`.monaco-list${Z} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${X.listBackground}; }`),re.push(`.monaco-list${Z} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${X.listBackground}; }`)),this.styleElement.textContent=re.join(` `),this.view.style(X)}getParentElement(X){const Z=this.model.getParentNodeLocation(X);return this.model.getNode(Z).element}getFirstElementChild(X){return this.model.getFirstElementChild(X)}getNode(X){return this.model.getNode(X)}getNodeLocation(X){return this.model.getNodeLocation(X)}collapse(X,Z=!1){return this.model.setCollapsed(X,!0,Z)}expand(X,Z=!1){return this.model.setCollapsed(X,!1,Z)}toggleCollapsed(X,Z=!1){return this.model.setCollapsed(X,void 0,Z)}isCollapsible(X){return this.model.isCollapsible(X)}setCollapsible(X,Z){return this.model.setCollapsible(X,Z)}isCollapsed(X){return this.model.isCollapsed(X)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(X,Z){const re=X.map(Y=>this.model.getNode(Y));this.selection.set(re,Z);const oe=X.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setSelection(oe,Z,!0)}getSelection(){return this.selection.get()}setFocus(X,Z){const re=X.map(Y=>this.model.getNode(Y));this.focus.set(re,Z);const oe=X.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setFocus(oe,Z,!0)}getFocus(){return this.focus.get()}reveal(X,Z){this.model.expandTo(X);const re=this.model.getListIndex(X);if(re!==-1)if(!this.stickyScrollController)this.view.reveal(re,Z);else{const oe=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(X));this.view.reveal(re,Z,oe)}}onLeftArrow(X){X.preventDefault(),X.stopPropagation();const Z=this.view.getFocusedElements();if(Z.length===0)return;const re=Z[0],oe=this.model.getNodeLocation(re);if(!this.model.setCollapsed(oe,!0)){const K=this.model.getParentNodeLocation(oe);if(!K)return;const H=this.model.getListIndex(K);this.view.reveal(H),this.view.setFocus([H])}}onRightArrow(X){X.preventDefault(),X.stopPropagation();const Z=this.view.getFocusedElements();if(Z.length===0)return;const re=Z[0],oe=this.model.getNodeLocation(re);if(!this.model.setCollapsed(oe,!1)){if(!re.children.some(z=>z.visible))return;const[K]=this.view.getFocus(),H=K+1;this.view.reveal(H),this.view.setFocus([H])}}onSpace(X){X.preventDefault(),X.stopPropagation();const Z=this.view.getFocusedElements();if(Z.length===0)return;const re=Z[0],oe=this.model.getNodeLocation(re),Y=X.browserEvent.altKey;this.model.setCollapsed(oe,void 0,Y)}dispose(){var X;(0,l.dispose)(this.disposables),(X=this.stickyScrollController)===null||X===void 0||X.dispose(),this.view.dispose()}}e.AbstractTree=de}),define(ie[596],ne([1,0,185,221]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class y extends L.AbstractTree{constructor(_,p,S,v,b,o={}){super(_,p,S,v,o),this.user=_,this.dataSource=b,this.identityProvider=o.identityProvider}createModel(_,p,S){return new k.ObjectTreeModel(_,p,S)}}e.DataTree=y}),define(ie[323],ne([1,0,185,579,221,106,49]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class p extends L.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(i,n,t,a,u={}){super(i,n,t,a,u),this.user=i}setChildren(i,n=_.Iterable.empty(),t){this.model.setChildren(i,n,t)}rerender(i){if(i===void 0){this.view.rerender();return}this.model.rerender(i)}hasElement(i){return this.model.has(i)}createModel(i,n,t){return new y.ObjectTreeModel(i,n,t)}}e.ObjectTree=p;class S{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(i,n){this._compressedTreeNodeProvider=i,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(i){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(i)}}renderElement(i,n,t,a){const u=this.compressedTreeNodeProvider.getCompressedTreeNode(i.element);u.element.elements.length===1?(t.compressedTreeNode=void 0,this.renderer.renderElement(i,n,t.data,a)):(t.compressedTreeNode=u,this.renderer.renderCompressedElements(u,n,t.data,a))}disposeElement(i,n,t,a){var u,f,c,d;t.compressedTreeNode?(f=(u=this.renderer).disposeCompressedElements)===null||f===void 0||f.call(u,t.compressedTreeNode,n,t.data,a):(d=(c=this.renderer).disposeElement)===null||d===void 0||d.call(c,i,n,t.data,a)}disposeTemplate(i){this.renderer.disposeTemplate(i.data)}renderTwistie(i,n){return this.renderer.renderTwistie?this.renderer.renderTwistie(i,n):!1}}Ee([E.memoize],S.prototype,"compressedTreeNodeProvider",null);function v(o,i){return i&&{...i,keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let t;try{t=o().getCompressedTreeNode(n)}catch{return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return t.element.elements.length===1?i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.element.elements)}}}}class b extends p{constructor(i,n,t,a,u={}){const f=()=>this,c=a.map(d=>new S(f,d));super(i,n,t,c,v(f,u))}setChildren(i,n=_.Iterable.empty(),t){this.model.setChildren(i,n,t)}createModel(i,n,t){return new k.CompressibleObjectTreeModel(i,n,t)}updateOptions(i={}){super.updateOptions(i),typeof i.compressionEnabled<"u"&&this.model.setCompressionEnabled(i.compressionEnabled)}getCompressedTreeNode(i=null){return this.model.getCompressedTreeNode(i)}}e.CompressibleObjectTree=b}),define(ie[597],ne([1,0,228,185,220,323,141,14,26,27,9,6,49,2,20]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function a(T){return{...T,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function u(T,N){return N.parent?N.parent===T?!0:u(T,N.parent):!1}function f(T,N){return T===N||u(T,N)||u(N,T)}class c{get element(){return this.node.element.element}get children(){return this.node.children.map(N=>new c(N))}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(N){this.node=N}}class d{constructor(N,P,x){this.renderer=N,this.nodeMapper=P,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,P,x,R){this.renderer.renderElement(this.nodeMapper.map(N),P,x.templateData,R)}renderTwistie(N,P){return N.slow?(P.classList.add(...v.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!0):(P.classList.remove(...v.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!1)}disposeElement(N,P,x,R){var B,W;(W=(B=this.renderer).disposeElement)===null||W===void 0||W.call(B,this.nodeMapper.map(N),P,x.templateData,R)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear()}}function r(T){return{browserEvent:T.browserEvent,elements:T.elements.map(N=>N.element)}}function l(T){return{browserEvent:T.browserEvent,element:T.element&&T.element.element,target:T.target}}class s extends L.ElementsDragAndDropData{constructor(N){super(N.elements.map(P=>P.element)),this.data=N}}function g(T){return T instanceof L.ElementsDragAndDropData?new s(T):T}class h{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,P){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(x=>x.element),P)}onDragStart(N,P){var x,R;(R=(x=this.dnd).onDragStart)===null||R===void 0||R.call(x,g(N),P)}onDragOver(N,P,x,R,B=!0){return this.dnd.onDragOver(g(N),P&&P.element,x,R)}drop(N,P,x,R){this.dnd.drop(g(N),P&&P.element,x,R)}onDragEnd(N){var P,x;(x=(P=this.dnd).onDragEnd)===null||x===void 0||x.call(P,N)}dispose(){this.dnd.dispose()}}function m(T){return T&&{...T,collapseByDefault:!0,identityProvider:T.identityProvider&&{getId(N){return T.identityProvider.getId(N.element)}},dnd:T.dnd&&new h(T.dnd),multipleSelectionController:T.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return T.multipleSelectionController.isSelectionSingleChangeEvent({...N,element:N.element})},isSelectionRangeChangeEvent(N){return T.multipleSelectionController.isSelectionRangeChangeEvent({...N,element:N.element})}},accessibilityProvider:T.accessibilityProvider&&{...T.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:T.accessibilityProvider.getRole?N=>T.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:T.accessibilityProvider.isChecked?N=>{var P;return!!(!((P=T.accessibilityProvider)===null||P===void 0)&&P.isChecked(N.element))}:void 0,getAriaLabel(N){return T.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return T.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:T.accessibilityProvider.getWidgetRole?()=>T.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:T.accessibilityProvider.getAriaLevel&&(N=>T.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:T.accessibilityProvider.getActiveDescendantId&&(N=>T.accessibilityProvider.getActiveDescendantId(N.element))},filter:T.filter&&{filter(N,P){return T.filter.filter(N.element,P)}},keyboardNavigationLabelProvider:T.keyboardNavigationLabelProvider&&{...T.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(N){return T.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof T.expandOnlyOnTwistieClick>"u"?void 0:typeof T.expandOnlyOnTwistieClick!="function"?T.expandOnlyOnTwistieClick:N=>T.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof T.defaultFindVisibility=="number"?T.defaultFindVisibility:typeof T.defaultFindVisibility>"u"?2:T.defaultFindVisibility(N.element)}}function C(T,N){N(T),T.children.forEach(P=>C(P,N))}class w{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return o.Event.map(this.tree.onDidChangeFocus,r)}get onDidChangeSelection(){return o.Event.map(this.tree.onDidChangeSelection,r)}get onMouseDblClick(){return o.Event.map(this.tree.onMouseDblClick,l)}get onPointer(){return o.Event.map(this.tree.onPointer,l)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(N,P,x,R,B,W={}){this.user=N,this.dataSource=B,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new o.Emitter,this._onDidChangeNodeSlowState=new o.Emitter,this.nodeMapper=new _.WeakMapper(V=>new c(V)),this.disposables=new n.DisposableStore,this.identityProvider=W.identityProvider,this.autoExpandSingleChildren=typeof W.autoExpandSingleChildren>"u"?!1:W.autoExpandSingleChildren,this.sorter=W.sorter,this.getDefaultCollapseState=V=>W.collapseByDefault?W.collapseByDefault(V)?_.ObjectTreeElementCollapseState.PreserveOrCollapsed:_.ObjectTreeElementCollapseState.PreserveOrExpanded:void 0,this.tree=this.createTree(N,P,x,R,W),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=a({element:void 0,parent:null,hasChildren:!0,defaultCollapseState:void 0}),this.identityProvider&&(this.root={...this.root,id:null}),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(N,P,x,R,B){const W=new k.ComposedTreeDelegate(x),V=R.map(F=>new d(F,this.nodeMapper,this._onDidChangeNodeSlowState.event)),U=m(B)||{};return new E.ObjectTree(N,P,W,V,U)}updateOptions(N={}){this.tree.updateOptions(N)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(N){this.tree.scrollTop=N}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(N,P){this.tree.layout(N,P)}style(N){this.tree.style(N)}getInput(){return this.root.element}async setInput(N,P){this.refreshPromises.forEach(R=>R.cancel()),this.refreshPromises.clear(),this.root.element=N;const x=P&&{viewState:P,focus:[],selection:[]};await this._updateChildren(N,!0,!1,x),x&&(this.tree.setFocus(x.focus),this.tree.setSelection(x.selection)),P&&typeof P.scrollTop=="number"&&(this.scrollTop=P.scrollTop)}async _updateChildren(N=this.root.element,P=!0,x=!1,R,B){if(typeof this.root.element>"u")throw new _.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await o.Event.toPromise(this._onDidRender.event));const W=this.getDataNode(N);if(await this.refreshAndRenderNode(W,P,R,B),x)try{this.tree.rerender(W)}catch{}}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const P=this.getDataNode(N);this.tree.rerender(P)}getNode(N=this.root.element){const P=this.getDataNode(N),x=this.tree.getNode(P===this.root?null:P);return this.nodeMapper.map(x)}collapse(N,P=!1){const x=this.getDataNode(N);return this.tree.collapse(x===this.root?null:x,P)}async expand(N,P=!1){if(typeof this.root.element>"u")throw new _.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await o.Event.toPromise(this._onDidRender.event));const x=this.getDataNode(N);if(this.tree.hasElement(x)&&!this.tree.isCollapsible(x)||(x.refreshPromise&&(await this.root.refreshPromise,await o.Event.toPromise(this._onDidRender.event)),x!==this.root&&!x.refreshPromise&&!this.tree.isCollapsed(x)))return!1;const R=this.tree.expand(x===this.root?null:x,P);return x.refreshPromise&&(await this.root.refreshPromise,await o.Event.toPromise(this._onDidRender.event)),R}setSelection(N,P){const x=N.map(R=>this.getDataNode(R));this.tree.setSelection(x,P)}getSelection(){return this.tree.getSelection().map(P=>P.element)}setFocus(N,P){const x=N.map(R=>this.getDataNode(R));this.tree.setFocus(x,P)}getFocus(){return this.tree.getFocus().map(P=>P.element)}reveal(N,P){this.tree.reveal(this.getDataNode(N),P)}getParentElement(N){const P=this.tree.getParentElement(this.getDataNode(N));return P&&P.element}getFirstElementChild(N=this.root.element){const P=this.getDataNode(N),x=this.tree.getFirstElementChild(P===this.root?null:P);return x&&x.element}getDataNode(N){const P=this.nodes.get(N===this.root.element?null:N);if(!P)throw new _.TreeError(this.user,`Data tree node not found: ${N}`);return P}async refreshAndRenderNode(N,P,x,R){await this.refreshNode(N,P,x),this.render(N,x,R)}async refreshNode(N,P,x){let R;if(this.subTreeRefreshPromises.forEach((B,W)=>{!R&&f(W,N)&&(R=B.then(()=>this.refreshNode(N,P,x)))}),R)return R;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0;return}return this.doRefreshSubTree(N,P,x)}async doRefreshSubTree(N,P,x){let R;N.refreshPromise=new Promise(B=>R=B),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const B=await this.doRefreshNode(N,P,x);N.stale=!1,await p.Promises.settled(B.map(W=>this.doRefreshSubTree(W,P,x)))}finally{R()}}async doRefreshNode(N,P,x){N.hasChildren=!!this.dataSource.hasChildren(N.element);let R;if(!N.hasChildren)R=Promise.resolve(i.Iterable.empty());else{const B=this.doGetChildren(N);if((0,t.isIterable)(B))R=Promise.resolve(B);else{const W=(0,p.timeout)(800);W.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},V=>null),R=B.finally(()=>W.cancel())}}try{const B=await R;return this.setChildren(N,B,P,x)}catch(B){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,b.isCancellationError)(B))return[];throw B}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}}doGetChildren(N){let P=this.refreshPromises.get(N);if(P)return P;const x=this.dataSource.getChildren(N.element);return(0,t.isIterable)(x)?this.processChildren(x):(P=(0,p.createCancelablePromise)(async()=>this.processChildren(await x)),this.refreshPromises.set(N,P),P.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:P}){N.element!==null&&!N.collapsed&&N.element.stale&&(P?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(b.onUnexpectedError))}setChildren(N,P,x,R){const B=[...P];if(N.children.length===0&&B.length===0)return[];const W=new Map,V=new Map;for(const j of N.children)W.set(j.element,j),this.identityProvider&&V.set(j.id,{node:j,collapsed:this.tree.hasElement(j)&&this.tree.isCollapsed(j)});const U=[],F=B.map(j=>{const J=!!this.dataSource.hasChildren(j);if(!this.identityProvider){const te=a({element:j,parent:N,hasChildren:J,defaultCollapseState:this.getDefaultCollapseState(j)});return J&&te.defaultCollapseState===_.ObjectTreeElementCollapseState.PreserveOrExpanded&&U.push(te),te}const le=this.identityProvider.getId(j).toString(),ee=V.get(le);if(ee){const te=ee.node;return W.delete(te.element),this.nodes.delete(te.element),this.nodes.set(j,te),te.element=j,te.hasChildren=J,x?ee.collapsed?(te.children.forEach(G=>C(G,de=>this.nodes.delete(de.element))),te.children.splice(0,te.children.length),te.stale=!0):U.push(te):J&&!ee.collapsed&&U.push(te),te}const $=a({element:j,parent:N,id:le,hasChildren:J,defaultCollapseState:this.getDefaultCollapseState(j)});return R&&R.viewState.focus&&R.viewState.focus.indexOf(le)>-1&&R.focus.push($),R&&R.viewState.selection&&R.viewState.selection.indexOf(le)>-1&&R.selection.push($),(R&&R.viewState.expanded&&R.viewState.expanded.indexOf(le)>-1||J&&$.defaultCollapseState===_.ObjectTreeElementCollapseState.PreserveOrExpanded)&&U.push($),$});for(const j of W.values())C(j,J=>this.nodes.delete(J.element));for(const j of F)this.nodes.set(j.element,j);return N.children.splice(0,N.children.length,...F),N!==this.root&&this.autoExpandSingleChildren&&F.length===1&&U.length===0&&(F[0].forceExpanded=!0,U.push(F[0])),U}render(N,P,x){const R=N.children.map(W=>this.asTreeElement(W,P)),B=x&&{...x,diffIdentityProvider:x.diffIdentityProvider&&{getId(W){return x.diffIdentityProvider.getId(W.element)}}};this.tree.setChildren(N===this.root?null:N,R,B),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,P){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let x;return P&&P.viewState.expanded&&N.id&&P.viewState.expanded.indexOf(N.id)>-1?x=!1:N.forceExpanded?(x=!1,N.forceExpanded=!1):x=N.defaultCollapseState,{element:N,children:N.hasChildren?i.Iterable.map(N.children,R=>this.asTreeElement(R,P)):[],collapsible:N.hasChildren,collapsed:x}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose(),this.tree.dispose()}}e.AsyncDataTree=w;class D{get element(){return{elements:this.node.element.elements.map(N=>N.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(N=>new D(N))}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(N){this.node=N}}class I{constructor(N,P,x,R){this.renderer=N,this.nodeMapper=P,this.compressibleNodeMapperProvider=x,this.onDidChangeTwistieState=R,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,P,x,R){this.renderer.renderElement(this.nodeMapper.map(N),P,x.templateData,R)}renderCompressedElements(N,P,x,R){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),P,x.templateData,R)}renderTwistie(N,P){return N.slow?(P.classList.add(...v.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!0):(P.classList.remove(...v.ThemeIcon.asClassNameArray(S.Codicon.treeItemLoading)),!1)}disposeElement(N,P,x,R){var B,W;(W=(B=this.renderer).disposeElement)===null||W===void 0||W.call(B,this.nodeMapper.map(N),P,x.templateData,R)}disposeCompressedElements(N,P,x,R){var B,W;(W=(B=this.renderer).disposeCompressedElements)===null||W===void 0||W.call(B,this.compressibleNodeMapperProvider().map(N),P,x.templateData,R)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,n.dispose)(this.disposables)}}function M(T){const N=T&&m(T);return N&&{...N,keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&{...N.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(P){return T.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(P.map(x=>x.element))}}}}class A extends w{constructor(N,P,x,R,B,W,V={}){super(N,P,x,B,W,V),this.compressionDelegate=R,this.compressibleNodeMapper=new _.WeakMapper(U=>new D(U)),this.filter=V.filter}createTree(N,P,x,R,B){const W=new k.ComposedTreeDelegate(x),V=R.map(F=>new I(F,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),U=M(B)||{};return new E.CompressibleObjectTree(N,P,W,V,U)}asTreeElement(N,P){return{incompressible:this.compressionDelegate.isIncompressible(N.element),...super.asTreeElement(N,P)}}updateOptions(N={}){this.tree.updateOptions(N)}render(N,P){if(!this.identityProvider)return super.render(N,P);const x=le=>this.identityProvider.getId(le).toString(),R=le=>{const ee=new Set;for(const $ of le){const te=this.tree.getCompressedTreeNode($===this.root?null:$);if(te.element)for(const G of te.element.elements)ee.add(x(G.element))}return ee},B=R(this.tree.getSelection()),W=R(this.tree.getFocus());super.render(N,P);const V=this.getSelection();let U=!1;const F=this.getFocus();let j=!1;const J=le=>{const ee=le.element;if(ee)for(let $=0;${const x=this.filter.filter(P,1),R=O(x);if(R===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return R===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=A;function O(T){return typeof T=="boolean"?T?1:0:(0,y.isFilterResult)(T)?(0,y.getVisibleState)(T.visibility):(0,y.getVisibleState)(T)}}),define(ie[324],ne([1,0,9,6,2,55,17,12]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const S="$initialize";let v=!1;function b(g){_.isWeb&&(v||(v=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(g.message))}e.logOnceWebWorkerWarning=b;class o{constructor(h,m,C,w){this.vsWorker=h,this.req=m,this.method=C,this.args=w,this.type=0}}class i{constructor(h,m,C,w){this.vsWorker=h,this.seq=m,this.res=C,this.err=w,this.type=1}}class n{constructor(h,m,C,w){this.vsWorker=h,this.req=m,this.eventName=C,this.arg=w,this.type=2}}class t{constructor(h,m,C){this.vsWorker=h,this.req=m,this.event=C,this.type=3}}class a{constructor(h,m){this.vsWorker=h,this.req=m,this.type=4}}class u{constructor(h){this._workerId=-1,this._handler=h,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(h){this._workerId=h}sendMessage(h,m){const C=String(++this._lastSentReq);return new Promise((w,D)=>{this._pendingReplies[C]={resolve:w,reject:D},this._send(new o(this._workerId,C,h,m))})}listen(h,m){let C=null;const w=new k.Emitter({onWillAddFirstListener:()=>{C=String(++this._lastSentReq),this._pendingEmitters.set(C,w),this._send(new n(this._workerId,C,h,m))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(C),this._send(new a(this._workerId,C)),C=null}});return w.event}handleMessage(h){!h||!h.vsWorker||this._workerId!==-1&&h.vsWorker!==this._workerId||this._handleMessage(h)}_handleMessage(h){switch(h.type){case 1:return this._handleReplyMessage(h);case 0:return this._handleRequestMessage(h);case 2:return this._handleSubscribeEventMessage(h);case 3:return this._handleEventMessage(h);case 4:return this._handleUnsubscribeEventMessage(h)}}_handleReplyMessage(h){if(!this._pendingReplies[h.seq]){console.warn("Got reply to unknown seq");return}const m=this._pendingReplies[h.seq];if(delete this._pendingReplies[h.seq],h.err){let C=h.err;h.err.$isError&&(C=new Error,C.name=h.err.name,C.message=h.err.message,C.stack=h.err.stack),m.reject(C);return}m.resolve(h.res)}_handleRequestMessage(h){const m=h.req;this._handler.handleMessage(h.method,h.args).then(w=>{this._send(new i(this._workerId,m,w,void 0))},w=>{w.detail instanceof Error&&(w.detail=(0,L.transformErrorForSerialization)(w.detail)),this._send(new i(this._workerId,m,void 0,(0,L.transformErrorForSerialization)(w)))})}_handleSubscribeEventMessage(h){const m=h.req,C=this._handler.handleEvent(h.eventName,h.arg)(w=>{this._send(new t(this._workerId,m,w))});this._pendingEvents.set(m,C)}_handleEventMessage(h){if(!this._pendingEmitters.has(h.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(h.req).fire(h.event)}_handleUnsubscribeEventMessage(h){if(!this._pendingEvents.has(h.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(h.req).dispose(),this._pendingEvents.delete(h.req)}_send(h){const m=[];if(h.type===0)for(let C=0;C{this._protocol.handleMessage(T)},T=>{w?.(T)})),this._protocol=new u({sendMessage:(T,N)=>{this._worker.postMessage(T,N)},handleMessage:(T,N)=>{if(typeof C[T]!="function")return Promise.reject(new Error("Missing method "+T+" on main thread host."));try{return Promise.resolve(C[T].apply(C,N))}catch(P){return Promise.reject(P)}},handleEvent:(T,N)=>{if(d(T)){const P=C[T].call(C,N);if(typeof P!="function")throw new Error(`Missing dynamic event ${T} on main thread host.`);return P}if(c(T)){const P=C[T];if(typeof P!="function")throw new Error(`Missing event ${T} on main thread host.`);return P}throw new Error(`Malformed event name ${T}`)}}),this._protocol.setWorkerId(this._worker.getId());let D=null;const I=globalThis.require;typeof I<"u"&&typeof I.getConfig=="function"?D=I.getConfig():typeof globalThis.requirejs<"u"&&(D=globalThis.requirejs.s.contexts._.config);const M=(0,E.getAllMethodNames)(C);this._onModuleLoaded=this._protocol.sendMessage(S,[this._worker.getId(),JSON.parse(JSON.stringify(D)),m,M]);const A=(T,N)=>this._request(T,N),O=(T,N)=>this._protocol.listen(T,N);this._lazyProxy=new Promise((T,N)=>{w=N,this._onModuleLoaded.then(P=>{T(r(P,A,O))},P=>{N(P),this._onError("Worker failed to load "+m,P)})})}getProxyObject(){return this._lazyProxy}_request(h,m){return new Promise((C,w)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(h,m).then(C,w)},w)})}_onError(h,m){console.error(h),console.info(m)}}e.SimpleWorkerClient=f;function c(g){return g[0]==="o"&&g[1]==="n"&&p.isUpperAsciiLetter(g.charCodeAt(2))}function d(g){return/^onDynamic/.test(g)&&p.isUpperAsciiLetter(g.charCodeAt(9))}function r(g,h,m){const C=I=>function(){const M=Array.prototype.slice.call(arguments,0);return h(I,M)},w=I=>function(M){return m(I,M)},D={};for(const I of g){if(d(I)){D[I]=w(I);continue}if(c(I)){D[I]=m(I,void 0);continue}D[I]=C(I)}return D}class l{constructor(h,m){this._requestHandlerFactory=m,this._requestHandler=null,this._protocol=new u({sendMessage:(C,w)=>{h(C,w)},handleMessage:(C,w)=>this._handleMessage(C,w),handleEvent:(C,w)=>this._handleEvent(C,w)})}onmessage(h){this._protocol.handleMessage(h)}_handleMessage(h,m){if(h===S)return this.initialize(m[0],m[1],m[2],m[3]);if(!this._requestHandler||typeof this._requestHandler[h]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+h));try{return Promise.resolve(this._requestHandler[h].apply(this._requestHandler,m))}catch(C){return Promise.reject(C)}}_handleEvent(h,m){if(!this._requestHandler)throw new Error("Missing requestHandler");if(d(h)){const C=this._requestHandler[h].call(this._requestHandler,m);if(typeof C!="function")throw new Error(`Missing dynamic event ${h} on request handler.`);return C}if(c(h)){const C=this._requestHandler[h];if(typeof C!="function")throw new Error(`Missing event ${h} on request handler.`);return C}throw new Error(`Malformed event name ${h}`)}initialize(h,m,C,w){this._protocol.setWorkerId(h);const M=r(w,(A,O)=>this._protocol.sendMessage(A,O),(A,O)=>this._protocol.listen(A,O));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(M),Promise.resolve((0,E.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,globalThis.require.config(m)),new Promise((A,O)=>{(globalThis.require||Q)([C],N=>{if(this._requestHandler=N.create(M),!this._requestHandler){O(new Error("No RequestHandler!"));return}A((0,E.getAllMethodNames)(this._requestHandler))},O)}))}}e.SimpleWorkerServer=l;function s(g){return new l(g,null)}e.create=s}),define(ie[598],ne([1,0,92,9,44,324]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const _=(0,L.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:i=>i});function p(i){const n=globalThis.MonacoEnvironment;if(n){if(typeof n.getWorker=="function")return n.getWorker("workerMain.js",i);if(typeof n.getWorkerUrl=="function"){const t=n.getWorkerUrl("workerMain.js",i);return new Worker(_?_.createScriptURL(t):t,{name:i})}}if(typeof Q=="function"){const t=Q.toUrl("vs/base/worker/workerMain.js"),a=S(t,i);return new Worker(_?_.createScriptURL(a):a,{name:i})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function S(i,n){if(/^((http:)|(https:)|(file:))/.test(i)&&i.substring(0,globalThis.origin.length)!==globalThis.origin){const c="vs/base/worker/defaultWorkerFactory.js",d=Q.toUrl(c).slice(0,-c.length),r=`/*${n}*/globalThis.MonacoEnvironment={baseUrl: '${d}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${i}') ?? '${i}');/*${n}*/`,l=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(l)}const t=i.lastIndexOf("?"),a=i.lastIndexOf("#",t),u=t>0?new URLSearchParams(i.substring(t+1,~a?a:void 0)):new URLSearchParams;return y.COI.addSearchParam(u,!0,!0),u.toString()?`${i}?${u.toString()}#${n}`:`${i}#${n}`}e.getWorkerBootstrapUrl=S;function v(i){return typeof i.then=="function"}class b{constructor(n,t,a,u,f){this.id=t,this.label=a;const c=p(a);v(c)?this.worker=c:this.worker=Promise.resolve(c),this.postMessage(n,[]),this.worker.then(d=>{d.onmessage=function(r){u(r.data)},d.onmessageerror=f,typeof d.addEventListener=="function"&&d.addEventListener("error",f)})}getId(){return this.id}postMessage(n,t){var a;(a=this.worker)===null||a===void 0||a.then(u=>{try{u.postMessage(n,t)}catch(f){(0,k.onUnexpectedError)(f),(0,k.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:f}))}})}dispose(){var n;(n=this.worker)===null||n===void 0||n.then(t=>t.terminate()),this.worker=null}}class o{constructor(n){this._label=n,this._webWorkerFailedBeforeError=!1}create(n,t,a){const u=++o.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new b(n,u,this._label||"anonymous"+u,t,f=>{(0,E.logOnceWebWorkerWarning)(f),this._webWorkerFailedBeforeError=f,a(f)})}}e.DefaultWorkerFactory=o,o.LAST_WORKER_ID=0}),define(ie[599],ne([1,0,14,6,2,224,20]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var p;(function(o){o[o.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",o[o.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(p||(e.StorageHint=p={}));var S;(function(o){o[o.None=0]="None",o[o.Initialized=1]="Initialized",o[o.Closed=2]="Closed"})(S||(e.StorageState=S={}));class v extends y.Disposable{constructor(i,n=Object.create(null)){super(),this.database=i,this.options=n,this._onDidChangeStorage=this._register(new k.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=S.None,this.cache=new Map,this.flushDelayer=this._register(new L.ThrottledDelayer(v.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(i=>this.onDidChangeItemsExternal(i)))}onDidChangeItemsExternal(i){var n,t;this._onDidChangeStorage.pause();try{(n=i.changed)===null||n===void 0||n.forEach((a,u)=>this.acceptExternal(u,a)),(t=i.deleted)===null||t===void 0||t.forEach(a=>this.acceptExternal(a,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(i,n){if(this.state===S.Closed)return;let t=!1;(0,_.isUndefinedOrNull)(n)?t=this.cache.delete(i):this.cache.get(i)!==n&&(this.cache.set(i,n),t=!0),t&&this._onDidChangeStorage.fire({key:i,external:!0})}get(i,n){const t=this.cache.get(i);return(0,_.isUndefinedOrNull)(t)?n:t}getBoolean(i,n){const t=this.get(i);return(0,_.isUndefinedOrNull)(t)?n:t==="true"}getNumber(i,n){const t=this.get(i);return(0,_.isUndefinedOrNull)(t)?n:parseInt(t,10)}async set(i,n,t=!1){if(this.state===S.Closed)return;if((0,_.isUndefinedOrNull)(n))return this.delete(i,t);const a=(0,_.isObject)(n)||Array.isArray(n)?(0,E.stringify)(n):String(n);if(this.cache.get(i)!==a)return this.cache.set(i,a),this.pendingInserts.set(i,a),this.pendingDeletes.delete(i),this._onDidChangeStorage.fire({key:i,external:t}),this.doFlush()}async delete(i,n=!1){if(!(this.state===S.Closed||!this.cache.delete(i)))return this.pendingDeletes.has(i)||this.pendingDeletes.add(i),this.pendingInserts.delete(i),this._onDidChangeStorage.fire({key:i,external:n}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;const i={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(i).finally(()=>{var n;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(n=this.whenFlushedCallbacks.pop())===null||n===void 0||n()})}async doFlush(i){return this.options.hint===p.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),i)}}e.Storage=v,v.DEFAULT_FLUSH_DELAY=100;class b{constructor(){this.onDidChangeItemsExternal=k.Event.None,this.items=new Map}async updateItems(i){var n,t;(n=i.insert)===null||n===void 0||n.forEach((a,u)=>this.items.set(u,a)),(t=i.delete)===null||t===void 0||t.forEach(a=>this.items.delete(a))}}e.InMemoryStorageDatabase=b}),define(ie[325],ne([1,0,2,6,7]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class E extends L.Disposable{constructor(p,S){super(),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=p,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,S)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let p=null;const S=()=>{p?this.observe({width:p.width,height:p.height}):this.observe()};let v=!1,b=!1;const o=()=>{if(v&&!b)try{v=!1,b=!0,S()}finally{(0,y.scheduleAtNextAnimationFrame)((0,y.getWindow)(this._referenceDomElement),()=>{b=!1,o()})}};this._resizeObserver=new ResizeObserver(i=>{p=i&&i[0]&&i[0].contentRect?i[0].contentRect:null,v=!0,o()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(p){this.measureReferenceDomElement(!0,p)}measureReferenceDomElement(p,S){let v=0,b=0;S?(v=S.width,b=S.height):this._referenceDomElement&&(v=this._referenceDomElement.clientWidth,b=this._referenceDomElement.clientHeight),v=Math.max(5,v),b=Math.max(5,b),(this._width!==v||this._height!==b)&&(this._width=v,this._height=b,p&&this._onDidChange.fire())}}e.ElementSizeObserver=E}),define(ie[600],ne([1,0,7,40,56]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class E extends y.ViewPart{constructor(i,n){super(i),this._viewDomNode=n,this._widgets={},this.domNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,k.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].onConfigurationChanged(i);return!0}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLineMappingChanged(i){return this._updateAnchorsViewPositions(),!0}onLinesChanged(i){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(i){return this._updateAnchorsViewPositions(),!0}onLinesInserted(i){return this._updateAnchorsViewPositions(),!0}onScrollChanged(i){return!0}onZonesChanged(i){return!0}_updateAnchorsViewPositions(){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].updateAnchorViewPosition()}addWidget(i){const n=new _(this._context,this._viewDomNode,i);this._widgets[n.id]=n,n.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n.domNode):this.domNode.appendChild(n.domNode),this.setShouldRender()}setWidgetPosition(i,n,t,a,u){this._widgets[i.getId()].setPosition(n,t,a,u),this.setShouldRender()}removeWidget(i){const n=i.getId();if(this._widgets.hasOwnProperty(n)){const t=this._widgets[n];delete this._widgets[n];const a=t.domNode.domNode;a.parentNode.removeChild(a),a.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(i){return this._widgets.hasOwnProperty(i)?this._widgets[i].suppressMouseDown:!1}onBeforeRender(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].onBeforeRender(i)}prepareRender(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].prepareRender(i)}render(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].render(i)}}e.ViewContentWidgets=E;class _{constructor(i,n,t){this._primaryAnchor=new p(null,null),this._secondaryAnchor=new p(null,null),this._context=i,this._viewDomNode=n,this._actual=t,this.domNode=(0,k.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const a=this._context.configuration.options,u=a.get(143);this._fixedOverflowWidgets=a.get(42),this._contentWidth=u.contentWidth,this._contentLeft=u.contentLeft,this._lineHeight=a.get(66),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(i){const n=this._context.configuration.options;if(this._lineHeight=n.get(66),i.hasChanged(143)){const t=n.get(143);this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(i,n,t){this._affinity=i,this._primaryAnchor=a(n,this._context.viewModel,this._affinity),this._secondaryAnchor=a(t,this._context.viewModel,this._affinity);function a(u,f,c){if(!u)return new p(null,null);const d=f.model.validatePosition(u);if(f.coordinatesConverter.modelPositionIsVisible(d)){const r=f.coordinatesConverter.convertModelPositionToViewPosition(d,c??void 0);return new p(u,r)}return new p(u,null)}}_getMaxWidth(){const i=this.domNode.domNode.ownerDocument,n=i.defaultView;return this.allowEditorOverflow?n?.innerWidth||i.documentElement.offsetWidth||i.body.offsetWidth:this._contentWidth}setPosition(i,n,t,a){this._setPosition(a,i,n),this._preference=t,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(i,n,t,a){const u=i.top,f=u,c=i.top+i.height,d=a.viewportHeight-c,r=u-t,l=f>=t,s=c,g=d>=t;let h=i.left;return h+n>a.scrollLeft+a.viewportWidth&&(h=a.scrollLeft+a.viewportWidth-n),hr){const h=g-(r-a);g-=h,t-=h}if(g=D,A=h+t<=m.height-I;return this._fixedOverflowWidgets?{fitsAbove:M,aboveTop:Math.max(g,D),fitsBelow:A,belowTop:h,left:w}:{fitsAbove:M,aboveTop:c,fitsBelow:A,belowTop:d,left:C}}_prepareRenderWidgetAtExactPositionOverflowing(i){return new S(i.top,i.left+this._contentLeft)}_getAnchorsCoordinates(i){var n,t;const a=c(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),u=((n=this._secondaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)===((t=this._primaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)?this._secondaryAnchor.viewPosition:null,f=c(u,this._affinity,this._lineHeight);return{primary:a,secondary:f};function c(d,r,l){if(!d)return null;const s=i.visibleRangeForPosition(d);if(!s)return null;const g=d.column===1&&r===3?0:s.left,h=i.getVerticalOffsetForLineNumber(d.lineNumber)-i.scrollTop;return new v(h,g,l)}}_reduceAnchorCoordinates(i,n,t){if(!n)return i;const a=this._context.configuration.options.get(50);let u=n.left;return ui.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(i){this._renderData=this._prepareRenderWidget(i)}render(i){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&b(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+i.scrollTop-i.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"&&b(this._actual.afterRender,this._actual,this._renderData.position)}}class p{constructor(i,n){this.modelPosition=i,this.viewPosition=n}}class S{constructor(i,n){this.top=i,this.left=n,this._coordinateBrand=void 0}}class v{constructor(i,n,t){this.top=i,this.left=n,this.height=t,this._anchorCoordinateBrand=void 0}}function b(o,i,...n){try{return o.call(i,...n)}catch{return null}}}),define(ie[601],ne([1,0,7,9,2]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class E extends y.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new y.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(p,S,v){this._editor=p,this._instantiationService=v;for(const b of S){if(this._pending.has(b.id)){(0,k.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${b.id}`));continue}this._pending.set(b.id,b)}this._instantiateSome(0),this._register((0,L.runWhenWindowIdle)((0,L.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(1)})),this._register((0,L.runWhenWindowIdle)((0,L.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(2)})),this._register((0,L.runWhenWindowIdle)((0,L.getWindow)(this._editor.getDomNode()),()=>{this._instantiateSome(3)},5e3))}saveViewState(){const p={};for(const[S,v]of this._instances)typeof v.saveViewState=="function"&&(p[S]=v.saveViewState());return p}restoreViewState(p){for(const[S,v]of this._instances)typeof v.restoreViewState=="function"&&v.restoreViewState(p[S])}get(p){return this._instantiateById(p),this._instances.get(p)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){var p;this._register((0,L.runWhenWindowIdle)((0,L.getWindow)((p=this._editor)===null||p===void 0?void 0:p.getDomNode()),()=>{this._instantiateSome(1)},50))}_instantiateSome(p){if(this._finishedInstantiation[p])return;this._finishedInstantiation[p]=!0;const S=this._findPendingContributionsByInstantiation(p);for(const v of S)this._instantiateById(v.id)}_findPendingContributionsByInstantiation(p){const S=[];for(const[,v]of this._pending)v.instantiation===p&&S.push(v);return S}_instantiateById(p){const S=this._pending.get(p);if(S){if(this._pending.delete(p),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const v=this._instantiationService.createInstance(S.ctor,this._editor);this._instances.set(S.id,v),typeof v.restoreViewState=="function"&&S.instantiation!==0&&console.warn(`Editor contribution '${S.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(v){(0,k.onUnexpectedError)(v)}}}}e.CodeEditorContributions=E}),define(ie[602],ne([1,0,157,2,35]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=void 0;class E extends k.Disposable{constructor(p,S,v,b){super(),this._options=p,this._domNode=S,this._dimensions=v,this._sashes=b,this._sashRatio=(0,y.observableValue)(this,void 0),this.sashLeft=(0,y.derived)(this,o=>{var i;const n=(i=this._sashRatio.read(o))!==null&&i!==void 0?i:this._options.splitViewDefaultRatio.read(o);return this._computeSashLeft(n,o)}),this._sash=this._register(new L.Sash(this._domNode,{getVerticalSashTop:o=>0,getVerticalSashLeft:o=>this.sashLeft.get(),getVerticalSashHeight:o=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(o=>{const i=this._dimensions.width.get(),n=this._computeSashLeft((this._startSashPosition+(o.currentX-o.startX))/i,void 0);this._sashRatio.set(n/i,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register((0,y.autorun)(o=>{const i=this._sashes.read(o);i&&(this._sash.orthogonalEndSash=i.bottom)})),this._register((0,y.autorun)(o=>{const i=this._options.enableSplitViewResizing.read(o);this._sash.state=i?3:0,this.sashLeft.read(o),this._dimensions.height.read(o),this._sash.layout()}))}_computeSashLeft(p,S){const v=this._dimensions.width.read(S),b=Math.floor(this._options.splitViewDefaultRatio.read(S)*v),o=this._options.enableSplitViewResizing.read(S)?Math.floor(p*v):b,i=100;return v<=i*2?b:ov-i?v-i:o}}e.DiffEditorSash=E}),define(ie[90],ne([1,0,60,19,580,2,35,325,11,5,89]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindContextKey=e.translatePosition=e.DisposableCancellationTokenSource=e.applyViewZones=e.observeHotReloadableExports=e.readHotReloadableExport=e.applyStyle=e.ManagedOverlayWidget=e.PlaceholderViewZone=e.ViewZoneOverlayWidget=e.animatedObservable=e.ObservableElementSizeObserver=e.appendRemoveOnDispose=e.applyObservableDecorations=e.joinCombine=void 0;function o(I,M,A,O){if(I.length===0)return M;if(M.length===0)return I;const T=[];let N=0,P=0;for(;NW?(T.push(R),P++):(T.push(O(x,R)),N++,P++)}for(;N`Apply decorations from ${M.debugName}`},T=>{const N=M.read(T);O.set(N)})),A.add({dispose:()=>{O.clear()}}),A}e.applyObservableDecorations=i;function n(I,M){return I.appendChild(M),(0,E.toDisposable)(()=>{I.removeChild(M)})}e.appendRemoveOnDispose=n;class t extends E.Disposable{get width(){return this._width}get height(){return this._height}constructor(M,A){super(),this.elementSizeObserver=this._register(new p.ElementSizeObserver(M,A)),this._width=(0,_.observableValue)(this,this.elementSizeObserver.getWidth()),this._height=(0,_.observableValue)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(O=>(0,_.transaction)(T=>{this._width.set(this.elementSizeObserver.getWidth(),T),this._height.set(this.elementSizeObserver.getHeight(),T)})))}observe(M){this.elementSizeObserver.observe(M)}setAutomaticLayout(M){M?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}e.ObservableElementSizeObserver=t;function a(I,M,A){let O=M.get(),T=O,N=O;const P=(0,_.observableValue)("animatedValue",O);let x=-1;const R=300;let B;A.add((0,_.autorunHandleChanges)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(V,U)=>(V.didChange(M)&&(U.animate=U.animate||V.change),!0)},(V,U)=>{B!==void 0&&(I.cancelAnimationFrame(B),B=void 0),T=N,O=M.read(V),x=Date.now()-(U.animate?0:R),W()}));function W(){const V=Date.now()-x;N=Math.floor(u(V,T,O-T,R)),V{this._actualTop.set(O,void 0)},this.onComputedHeight=O=>{this._actualHeight.set(O,void 0)}}}e.PlaceholderViewZone=c;class d{constructor(M,A){this._editor=M,this._domElement=A,this._overlayWidgetId=`managedOverlayWidget-${d._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}e.ManagedOverlayWidget=d,d._counter=0;function r(I,M){return(0,_.autorun)(A=>{for(let[O,T]of Object.entries(M))T&&typeof T=="object"&&"read"in T&&(T=T.read(A)),typeof T=="number"&&(T=`${T}px`),O=O.replace(/[A-Z]/g,N=>"-"+N.toLowerCase()),I.style[O]=T})}e.applyStyle=r;function l(I,M){return s([I],M),I}e.readHotReloadableExport=l;function s(I,M){(0,y.isHotReloadEnabled)()&&(0,_.observableSignalFromEvent)("reload",O=>(0,y.registerHotReloadHandler)(({oldExports:T})=>{if([...Object.values(T)].some(N=>I.includes(N)))return N=>(O(void 0),!0)})).read(M)}e.observeHotReloadableExports=s;function g(I,M,A,O){const T=new E.DisposableStore,N=[];return T.add((0,_.autorunWithStore)((P,x)=>{const R=M.read(P),B=new Map,W=new Map;A&&A(!0),I.changeViewZones(V=>{for(const U of N)V.removeZone(U),O?.delete(U);N.length=0;for(const U of R){const F=V.addZone(U);U.setZoneId&&U.setZoneId(F),N.push(F),O?.add(F),B.set(U,F)}}),A&&A(!1),x.add((0,_.autorunHandleChanges)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(V,U){const F=W.get(V.changedObservable);return F!==void 0&&U.zoneIds.push(F),!0}},(V,U)=>{for(const F of R)F.onChange&&(W.set(F.onChange,B.get(F)),F.onChange.read(V));A&&A(!0),I.changeViewZones(F=>{for(const j of U.zoneIds)F.layoutZone(j)}),A&&A(!1)}))})),T.add({dispose(){A&&A(!0),I.changeViewZones(P=>{for(const x of N)P.removeZone(x)}),O?.clear(),A&&A(!1)}}),T}e.applyViewZones=g;class h extends k.CancellationTokenSource{dispose(){super.dispose(!0)}}e.DisposableCancellationTokenSource=h;function m(I,M){const A=(0,L.findLast)(M,T=>T.original.startLineNumber<=I.lineNumber);if(!A)return v.Range.fromPositions(I);if(A.original.endLineNumberExclusive<=I.lineNumber){const T=I.lineNumber-A.original.endLineNumberExclusive+A.modified.endLineNumberExclusive;return v.Range.fromPositions(new S.Position(T,I.column))}if(!A.innerChanges)return v.Range.fromPositions(new S.Position(A.modified.startLineNumber,1));const O=(0,L.findLast)(A.innerChanges,T=>T.originalRange.getStartPosition().isBeforeOrEqual(I));if(!O){const T=I.lineNumber-A.original.startLineNumber+A.modified.startLineNumber;return v.Range.fromPositions(new S.Position(T,I.column))}if(O.originalRange.containsPosition(I))return O.modifiedRange;{const T=C(O.originalRange.getEndPosition(),I);return v.Range.fromPositions(w(O.modifiedRange.getEndPosition(),T))}}e.translatePosition=m;function C(I,M){return I.lineNumber===M.lineNumber?new b.LengthObj(0,M.column-I.column):new b.LengthObj(M.lineNumber-I.lineNumber,M.column-1)}function w(I,M){return M.lineCount===0?new S.Position(I.lineNumber,I.column+M.columnCount):new S.Position(I.lineNumber+M.lineCount,M.columnCount+1)}function D(I,M,A){const O=I.bindTo(M);return(0,_.autorunOpts)({debugName:()=>`Update ${I.key}`},T=>{O.set(A(T))})}e.bindContextKey=D}),define(ie[102],ne([1,0,12,17,142]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let E;function _(){return E||(E=new TextDecoder("UTF-16LE")),E}let p;function S(){return p||(p=new TextDecoder("UTF-16BE")),p}let v;function b(){return v||(v=k.isLittleEndian()?_():S()),v}e.getPlatformTextDecoder=b;function o(t,a,u){const f=new Uint16Array(t.buffer,a,u);return u>0&&(f[0]===65279||f[0]===65534)?i(t,a,u):_().decode(f)}e.decodeUTF16LE=o;function i(t,a,u){const f=[];let c=0;for(let d=0;d=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=a;return}for(let f=0;fu});class b{static create(f){return new b(new WeakRef(f))}constructor(f){this.targetWindow=f}createLineBreaksComputer(f,c,d,r,l){const s=[],g=[];return{addRequest:(h,m,C)=>{s.push(h),g.push(m)},finalize:()=>o((0,y.assertIsDefined)(this.targetWindow.deref()),s,f,c,d,r,l,g)}}}e.DOMLineBreaksComputerFactory=b;function o(u,f,c,d,r,l,s,g){var h;function m(F){const j=g[F];if(j){const J=S.LineInjectedText.applyInjectedText(f[F],j),le=j.map($=>$.options),ee=j.map($=>$.column-1);return new p.ModelLineProjectionData(ee,le,[J.length],[],0)}else return null}if(r===-1){const F=[];for(let j=0,J=f.length;jC?(J=0,le=0):ee=C-G}const $=j.substr(J),te=i($,le,d,ee,A,I);O[F]=J,T[F]=le,N[F]=$,P[F]=te[0],x[F]=te[1]}const R=A.build(),B=(h=v?.createHTML(R))!==null&&h!==void 0?h:R;M.innerHTML=B,M.style.position="absolute",M.style.top="10000",s==="keepAll"?(M.style.wordBreak="keep-all",M.style.overflowWrap="anywhere"):(M.style.wordBreak="inherit",M.style.overflowWrap="break-word"),u.document.body.appendChild(M);const W=document.createRange(),V=Array.prototype.slice.call(M.children,0),U=[];for(let F=0;FX.options),de=ue.map(X=>X.column-1)):(G=null,de=null),U[F]=new p.ModelLineProjectionData(de,G,J,te,ee)}return u.document.body.removeChild(M),U}function i(u,f,c,d,r,l){if(l!==0){const D=String(l);r.appendString('
    ');const s=u.length;let g=f,h=0;const m=[],C=[];let w=0");for(let D=0;D"),m[D]=h,C[D]=g;const I=w;w=D+1"),m[u.length]=h,C[u.length]=g,r.appendString("
    "),[m,C]}function n(u,f,c,d){if(c.length<=1)return null;const r=Array.prototype.slice.call(f.children,0),l=[];try{t(u,r,d,0,null,c.length-1,null,l)}catch(s){return console.log(s),null}return l.length===0?null:(l.push(c.length),l)}function t(u,f,c,d,r,l,s,g){if(d===l||(r=r||a(u,f,c[d],c[d+1]),s=s||a(u,f,c[l],c[l+1]),Math.abs(r[0].top-s[0].top)<=.1))return;if(d+1===l){g.push(l);return}const h=d+(l-d)/2|0,m=a(u,f,c[h],c[h+1]);t(u,f,c,d,r,h,m,g),t(u,f,c,h,m,l,s,g)}function a(u,f,c,d){return u.setStart(f[c/16384|0].firstChild,c%16384),u.setEnd(f[d/16384|0].firstChild,d%16384),u.getClientRects()}}),define(ie[233],ne([1,0,40,92,9,102]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class _{constructor(b){this._createLine=b,this._set(1,[])}flush(){this._set(1,[])}_set(b,o){this._lines=o,this._rendLineNumberStart=b}_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(b){const o=b-this._rendLineNumberStart;if(o<0||o>=this._lines.length)throw new y.BugIndicatingError("Illegal value for lineNumber");return this._lines[o]}onLinesDeleted(b,o){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(on)return null;let t=0,a=0;for(let f=i;f<=n;f++){const c=f-this._rendLineNumberStart;b<=f&&f<=o&&(a===0?(t=c,a=1):a++)}if(b=n&&u<=t&&(this._lines[u-this._rendLineNumberStart].onContentChanged(),a=!0);return a}onLinesInserted(b,o){if(this.getCount()===0)return null;const i=o-b+1,n=this.getStartLineNumber(),t=this.getEndLineNumber();if(b<=n)return this._rendLineNumberStart+=i,null;if(b>t)return null;if(i+b>t)return this._lines.splice(b-this._rendLineNumberStart,t-b+1);const a=[];for(let r=0;ri)continue;const f=Math.max(o,u.fromLineNumber),c=Math.min(i,u.toLineNumber);for(let d=f;d<=c;d++){const r=d-this._rendLineNumberStart;this._lines[r].onTokensChanged(),n=!0}}return n}}e.RenderedLinesCollection=_;class p{constructor(b){this._host=b,this.domNode=this._createDomNode(),this._linesCollection=new _(()=>this._host.createVisibleLine())}_createDomNode(){const b=(0,L.createFastDomNode)(document.createElement("div"));return b.setClassName("view-layer"),b.setPosition("absolute"),b.domNode.setAttribute("role","presentation"),b.domNode.setAttribute("aria-hidden","true"),b}onConfigurationChanged(b){return!!b.hasChanged(143)}onFlushed(b){return this._linesCollection.flush(),!0}onLinesChanged(b){return this._linesCollection.onLinesChanged(b.fromLineNumber,b.count)}onLinesDeleted(b){const o=this._linesCollection.onLinesDeleted(b.fromLineNumber,b.toLineNumber);if(o)for(let i=0,n=o.length;io){const a=o,u=Math.min(i,t.rendLineNumberStart-1);a<=u&&(this._insertLinesBefore(t,a,u,n,o),t.linesLength+=u-a+1)}else if(t.rendLineNumberStart0&&(this._removeLinesBefore(t,a),t.linesLength-=a)}if(t.rendLineNumberStart=o,t.rendLineNumberStart+t.linesLength-1i){const a=Math.max(0,i-t.rendLineNumberStart+1),f=t.linesLength-1-a+1;f>0&&(this._removeLinesAfter(t,f),t.linesLength-=f)}return this._finishRendering(t,!1,n),t}_renderUntouchedLines(b,o,i,n,t){const a=b.rendLineNumberStart,u=b.lines;for(let f=o;f<=i;f++){const c=a+f;u[f].layoutLine(c,n[c-t])}}_insertLinesBefore(b,o,i,n,t){const a=[];let u=0;for(let f=o;f<=i;f++)a[u++]=this.host.createVisibleLine();b.lines=a.concat(b.lines)}_removeLinesBefore(b,o){for(let i=0;i=0;u--){const f=b.lines[u];n[u]&&(f.setDomNode(a),a=a.previousSibling)}}_finishRenderingInvalidLines(b,o,i){const n=document.createElement("div");S._ttPolicy&&(o=S._ttPolicy.createHTML(o)),n.innerHTML=o;for(let t=0;tv}),S._sb=new E.StringBuilder(1e5)}),define(ie[604],ne([1,0,40,72,233,56]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class _ extends E.ViewPart{constructor(o){super(o),this._visibleLines=new y.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);(0,k.applyFontInfo)(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let o=0,i=this._dynamicOverlays.length;on.shouldRender());for(let n=0,t=i.length;n'),t.appendString(a),t.appendString(""),!0)}layoutLine(o,i){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=p;class S extends _{constructor(o){super(o);const n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(o){const n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollWidthChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o),this.domNode.setWidth(Math.max(o.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=S;class v extends _{constructor(o){super(o);const i=this._context.configuration.options,n=i.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,k.applyFontInfo)(this.domNode,i.get(50))}onConfigurationChanged(o){const i=this._context.configuration.options;(0,k.applyFontInfo)(this.domNode,i.get(50));const n=i.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollHeightChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o);const i=Math.min(o.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=v}),define(ie[326],ne([1,0,142,102]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function y(S){return S.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class E{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(v,b,o,i){this.oldPosition=v,this.oldText=b,this.newPosition=o,this.newText=i}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${y(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${y(this.oldText)}")`:`(replace@${this.oldPosition} "${y(this.oldText)}" with "${y(this.newText)}")`}static _writeStringSize(v){return 4+2*v.length}static _writeString(v,b,o){const i=b.length;L.writeUInt32BE(v,i,o),o+=4;for(let n=0;no&&(o=n)}return o}else{if(typeof E=="string")return S?E==="*"?5:E===p?10:0:0;if(E){const{language:o,pattern:i,scheme:n,hasAccessToAllModels:t,notebookType:a}=E;if(!S&&!t)return 0;a&&v&&(_=v);let u=0;if(n)if(n===_.scheme)u=10;else if(n==="*")u=5;else return 0;if(o)if(o===p)u=10;else if(o==="*")u=Math.max(u,5);else return 0;if(a)if(a===b)u=10;else if(a==="*"&&b!==void 0)u=Math.max(u,5);else return 0;if(i){let f;if(typeof i=="string"?f=i:f={...i,base:(0,k.normalize)(i.base)},f===_.fsPath||(0,L.match)(f,_.fsPath))u=10;else return 0}return u}else return 0}}e.score=y}),define(ie[605],ne([1,0,6,2,43,327]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function _(b){return typeof b=="string"?!1:Array.isArray(b)?b.every(_):!!b.exclusive}class p{constructor(o,i,n,t){this.uri=o,this.languageId=i,this.notebookUri=n,this.notebookType=t}equals(o){var i,n;return this.notebookType===o.notebookType&&this.languageId===o.languageId&&this.uri.toString()===o.uri.toString()&&((i=this.notebookUri)===null||i===void 0?void 0:i.toString())===((n=o.notebookUri)===null||n===void 0?void 0:n.toString())}}class S{constructor(o){this._notebookInfoResolver=o,this._clock=0,this._entries=[],this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event}register(o,i){let n={selector:o,provider:i,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,k.toDisposable)(()=>{if(n){const t=this._entries.indexOf(n);t>=0&&(this._entries.splice(t,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(o){return this.all(o).length>0}all(o){if(!o)return[];this._updateScores(o);const i=[];for(const n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(o){const i=[];return this._orderedForEach(o,n=>i.push(n.provider)),i}orderedGroups(o){const i=[];let n,t;return this._orderedForEach(o,a=>{n&&t===a._score?n.push(a.provider):(t=a._score,n=[a.provider],i.push(n))}),i}_orderedForEach(o,i){this._updateScores(o);for(const n of this._entries)n._score>0&&i(n)}_updateScores(o){var i,n;const t=(i=this._notebookInfoResolver)===null||i===void 0?void 0:i.call(this,o.uri),a=t?new p(o.uri,o.getLanguageId(),t.uri,t.type):new p(o.uri,o.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(a))){this._lastCandidate=a;for(const u of this._entries)if(u._score=(0,E.score)(u.selector,a.uri,a.languageId,(0,y.shouldSynchronizeModel)(o),a.notebookUri,a.notebookType),_(u.selector)&&u._score>0){for(const f of this._entries)f._score=0;u._score=1e3;break}this._entries.sort(S._compareByScoreAndTime)}}static _compareByScoreAndTime(o,i){return o._scorei._score?-1:v(o.selector)&&!v(i.selector)?1:!v(o.selector)&&v(i.selector)?-1:o._timei._time?-1:0}}e.LanguageFeatureRegistry=S;function v(b){return typeof b=="string"?!1:Array.isArray(b)?b.some(v):!!b.isBuiltin}}),define(ie[234],ne([1,0,12,102,5]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class E{constructor(r,l,s,g,h,m){this._richEditBracketBrand=void 0,this.languageId=r,this.index=l,this.open=s,this.close=g,this.forwardRegex=h,this.reversedRegex=m,this._openSet=E._toSet(this.open),this._closeSet=E._toSet(this.close)}isOpen(r){return this._openSet.has(r)}isClose(r){return this._closeSet.has(r)}static _toSet(r){const l=new Set;for(const s of r)l.add(s);return l}}e.RichEditBracket=E;function _(d){const r=d.length;d=d.map(m=>[m[0].toLowerCase(),m[1].toLowerCase()]);const l=[];for(let m=0;m{const[w,D]=m,[I,M]=C;return w===I||w===M||D===I||D===M},g=(m,C)=>{const w=Math.min(m,C),D=Math.max(m,C);for(let I=0;I0&&h.push({open:C,close:w})}return h}class p{constructor(r,l){this._richEditBracketsBrand=void 0;const s=_(l);this.brackets=s.map((g,h)=>new E(r,h,g.open,g.close,o(g.open,g.close,s,h),i(g.open,g.close,s,h))),this.forwardRegex=n(this.brackets),this.reversedRegex=t(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=p;function S(d,r,l,s){for(let g=0,h=r.length;g=0&&s.push(C);for(const C of m.close)C.indexOf(d)>=0&&s.push(C)}}function v(d,r){return d.length-r.length}function b(d){if(d.length<=1)return d;const r=[],l=new Set;for(const s of d)l.has(s)||(r.push(s),l.add(s));return r}function o(d,r,l,s){let g=[];g=g.concat(d),g=g.concat(r);for(let h=0,m=g.length;h=0;m--)g[h++]=s.charCodeAt(m);return k.getPlatformTextDecoder().decode(g)}let r=null,l=null;return function(g){return r!==g&&(r=g,l=d(r)),l}}();class c{static _findPrevBracketInText(r,l,s,g){const h=s.match(r);if(!h)return null;const m=s.length-(h.index||0),C=h[0].length,w=g+m;return new y.Range(l,w-C+1,l,w+1)}static findPrevBracketInRange(r,l,s,g,h){const C=f(s).substring(s.length-h,s.length-g);return this._findPrevBracketInText(r,l,C,g)}static findNextBracketInText(r,l,s,g){const h=s.match(r);if(!h)return null;const m=h.index||0,C=h[0].length;if(C===0)return null;const w=g+m;return new y.Range(l,w+1,l,w+1+C)}static findNextBracketInRange(r,l,s,g,h){const m=s.substring(g,h);return this.findNextBracketInText(r,l,m,g)}}e.BracketsUtils=c}),define(ie[606],ne([1,0,13,129,234]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class E{constructor(p){this._richEditBrackets=p}getElectricCharacters(){const p=[];if(this._richEditBrackets)for(const S of this._richEditBrackets.brackets)for(const v of S.close){const b=v.charAt(v.length-1);p.push(b)}return(0,L.distinct)(p)}onElectricCharacter(p,S,v){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const b=S.findTokenIndexAtOffset(v-1);if((0,k.ignoreBracketsInToken)(S.getStandardTokenType(b)))return null;const o=this._richEditBrackets.reversedRegex,i=S.getLineContent().substring(0,v-1)+p,n=y.BracketsUtils.findPrevBracketInRange(o,1,i,0,i.length);if(!n)return null;const t=i.substring(n.startColumn-1,n.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[t])return null;const u=S.getActualLineContentBefore(n.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:t}:null}}e.BracketElectricCharacterSupport=E}),define(ie[607],ne([1,0,13,6,2,5,129,234,524]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class v extends y.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(a,u){super(),this.textModel=a,this.languageConfigurationService=u,this.bracketPairsTree=this._register(new y.MutableDisposable),this.onDidChangeEmitter=new k.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(f=>{var c;(!f.languageId||!((c=this.bracketPairsTree.value)===null||c===void 0)&&c.object.didLanguageChange(f.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(a){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(a){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(a){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleContentChanged(a)}handleDidChangeBackgroundTokenizationState(){var a;(a=this.bracketPairsTree.value)===null||a===void 0||a.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(a){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleDidChangeTokens(a)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const a=new y.DisposableStore;this.bracketPairsTree.value=b(a.add(new S.BracketPairsTree(this.textModel,u=>this.languageConfigurationService.getLanguageConfiguration(u))),a),a.add(this.bracketPairsTree.value.object.onDidChange(u=>this.onDidChangeEmitter.fire(u))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(a){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(a,!1))||L.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(a){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(a,!0))||L.CallbackIterable.empty}getBracketsInRange(a,u=!1){var f;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((f=this.bracketPairsTree.value)===null||f===void 0?void 0:f.object.getBracketsInRange(a,u))||L.CallbackIterable.empty}findMatchingBracketUp(a,u,f){const c=this.textModel.validatePosition(u),d=this.textModel.getLanguageIdAtPosition(c.lineNumber,c.column);if(this.canBuildAST){const r=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew.getClosingBracketInfo(a);if(!r)return null;const l=this.getBracketPairsInRange(E.Range.fromPositions(u,u)).findLast(s=>r.closes(s.openingBracketInfo));return l?l.openingBracketRange:null}else{const r=a.toLowerCase(),l=this.languageConfigurationService.getLanguageConfiguration(d).brackets;if(!l)return null;const s=l.textIsBracket[r];return s?n(this._findMatchingBracketUp(s,c,o(f))):null}}matchBracket(a,u){if(this.canBuildAST){const f=this.getBracketPairsInRange(E.Range.fromPositions(a,a)).filter(c=>c.closingBracketRange!==void 0&&(c.openingBracketRange.containsPosition(a)||c.closingBracketRange.containsPosition(a))).findLastMaxBy((0,L.compareBy)(c=>c.openingBracketRange.containsPosition(a)?c.openingBracketRange:c.closingBracketRange,E.Range.compareRangesUsingStarts));return f?[f.openingBracketRange,f.closingBracketRange]:null}else{const f=o(u);return this._matchBracket(this.textModel.validatePosition(a),f)}}_establishBracketSearchOffsets(a,u,f,c){const d=u.getCount(),r=u.getLanguageId(c);let l=Math.max(0,a.column-1-f.maxBracketLength);for(let g=c-1;g>=0;g--){const h=u.getEndOffset(g);if(h<=l)break;if((0,_.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==r){l=h;break}}let s=Math.min(u.getLineContent().length,a.column-1+f.maxBracketLength);for(let g=c+1;g=s)break;if((0,_.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==r){s=h;break}}return{searchStartOffset:l,searchEndOffset:s}}_matchBracket(a,u){const f=a.lineNumber,c=this.textModel.tokenization.getLineTokens(f),d=this.textModel.getLineContent(f),r=c.findTokenIndexAtOffset(a.column-1);if(r<0)return null;const l=this.languageConfigurationService.getLanguageConfiguration(c.getLanguageId(r)).brackets;if(l&&!(0,_.ignoreBracketsInToken)(c.getStandardTokenType(r))){let{searchStartOffset:s,searchEndOffset:g}=this._establishBracketSearchOffsets(a,c,l,r),h=null;for(;;){const m=p.BracketsUtils.findNextBracketInRange(l.forwardRegex,f,d,s,g);if(!m)break;if(m.startColumn<=a.column&&a.column<=m.endColumn){const C=d.substring(m.startColumn-1,m.endColumn-1).toLowerCase(),w=this._matchFoundBracket(m,l.textIsBracket[C],l.textIsOpenBracket[C],u);if(w){if(w instanceof i)return null;h=w}}s=m.endColumn-1}if(h)return h}if(r>0&&c.getStartOffset(r)===a.column-1){const s=r-1,g=this.languageConfigurationService.getLanguageConfiguration(c.getLanguageId(s)).brackets;if(g&&!(0,_.ignoreBracketsInToken)(c.getStandardTokenType(s))){const{searchStartOffset:h,searchEndOffset:m}=this._establishBracketSearchOffsets(a,c,g,s),C=p.BracketsUtils.findPrevBracketInRange(g.reversedRegex,f,d,h,m);if(C&&C.startColumn<=a.column&&a.column<=C.endColumn){const w=d.substring(C.startColumn-1,C.endColumn-1).toLowerCase(),D=this._matchFoundBracket(C,g.textIsBracket[w],g.textIsOpenBracket[w],u);if(D)return D instanceof i?null:D}}}return null}_matchFoundBracket(a,u,f,c){if(!u)return null;const d=f?this._findMatchingBracketDown(u,a.getEndPosition(),c):this._findMatchingBracketUp(u,a.getStartPosition(),c);return d?d instanceof i?d:[a,d]:null}_findMatchingBracketUp(a,u,f){const c=a.languageId,d=a.reversedRegex;let r=-1,l=0;const s=(g,h,m,C)=>{for(;;){if(f&&++l%100===0&&!f())return i.INSTANCE;const w=p.BracketsUtils.findPrevBracketInRange(d,g,h,m,C);if(!w)break;const D=h.substring(w.startColumn-1,w.endColumn-1).toLowerCase();if(a.isOpen(D)?r++:a.isClose(D)&&r--,r===0)return w;C=w.startColumn-1}return null};for(let g=u.lineNumber;g>=1;g--){const h=this.textModel.tokenization.getLineTokens(g),m=h.getCount(),C=this.textModel.getLineContent(g);let w=m-1,D=C.length,I=C.length;g===u.lineNumber&&(w=h.findTokenIndexAtOffset(u.column-1),D=u.column-1,I=u.column-1);let M=!0;for(;w>=0;w--){const A=h.getLanguageId(w)===c&&!(0,_.ignoreBracketsInToken)(h.getStandardTokenType(w));if(A)M?D=h.getStartOffset(w):(D=h.getStartOffset(w),I=h.getEndOffset(w));else if(M&&D!==I){const O=s(g,C,D,I);if(O)return O}M=A}if(M&&D!==I){const A=s(g,C,D,I);if(A)return A}}return null}_findMatchingBracketDown(a,u,f){const c=a.languageId,d=a.forwardRegex;let r=1,l=0;const s=(h,m,C,w)=>{for(;;){if(f&&++l%100===0&&!f())return i.INSTANCE;const D=p.BracketsUtils.findNextBracketInRange(d,h,m,C,w);if(!D)break;const I=m.substring(D.startColumn-1,D.endColumn-1).toLowerCase();if(a.isOpen(I)?r++:a.isClose(I)&&r--,r===0)return D;C=D.endColumn-1}return null},g=this.textModel.getLineCount();for(let h=u.lineNumber;h<=g;h++){const m=this.textModel.tokenization.getLineTokens(h),C=m.getCount(),w=this.textModel.getLineContent(h);let D=0,I=0,M=0;h===u.lineNumber&&(D=m.findTokenIndexAtOffset(u.column-1),I=u.column-1,M=u.column-1);let A=!0;for(;D=1;l--){const s=this.textModel.tokenization.getLineTokens(l),g=s.getCount(),h=this.textModel.getLineContent(l);let m=g-1,C=h.length,w=h.length;if(l===f.lineNumber){m=s.findTokenIndexAtOffset(f.column-1),C=f.column-1,w=f.column-1;const I=s.getLanguageId(m);c!==I&&(c=I,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,r=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew)}let D=!0;for(;m>=0;m--){const I=s.getLanguageId(m);if(c!==I){if(d&&r&&D&&C!==w){const A=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(A)return this._toFoundBracket(r,A);D=!1}c=I,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,r=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew}const M=!!d&&!(0,_.ignoreBracketsInToken)(s.getStandardTokenType(m));if(M)D?C=s.getStartOffset(m):(C=s.getStartOffset(m),w=s.getEndOffset(m));else if(r&&d&&D&&C!==w){const A=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(A)return this._toFoundBracket(r,A)}D=M}if(r&&d&&D&&C!==w){const I=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(I)return this._toFoundBracket(r,I)}}return null}findNextBracket(a){var u;const f=this.textModel.validatePosition(a);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getFirstBracketAfter(f))||null;const c=this.textModel.getLineCount();let d=null,r=null,l=null;for(let s=f.lineNumber;s<=c;s++){const g=this.textModel.tokenization.getLineTokens(s),h=g.getCount(),m=this.textModel.getLineContent(s);let C=0,w=0,D=0;if(s===f.lineNumber){C=g.findTokenIndexAtOffset(f.column-1),w=f.column-1,D=f.column-1;const M=g.getLanguageId(C);d!==M&&(d=M,r=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew)}let I=!0;for(;CI.closingBracketRange!==void 0&&I.range.strictContainsRange(w));return D?[D.openingBracketRange,D.closingBracketRange]:null}const c=o(u),d=this.textModel.getLineCount(),r=new Map;let l=[];const s=(w,D)=>{if(!r.has(w)){const I=[];for(let M=0,A=D?D.brackets.length:0;M{for(;;){if(c&&++g%100===0&&!c())return i.INSTANCE;const O=p.BracketsUtils.findNextBracketInRange(w.forwardRegex,D,I,M,A);if(!O)break;const T=I.substring(O.startColumn-1,O.endColumn-1).toLowerCase(),N=w.textIsBracket[T];if(N&&(N.isOpen(T)?l[N.index]++:N.isClose(T)&&l[N.index]--,l[N.index]===-1))return this._matchFoundBracket(O,N,!1,c);M=O.endColumn-1}return null};let m=null,C=null;for(let w=f.lineNumber;w<=d;w++){const D=this.textModel.tokenization.getLineTokens(w),I=D.getCount(),M=this.textModel.getLineContent(w);let A=0,O=0,T=0;if(w===f.lineNumber){A=D.findTokenIndexAtOffset(f.column-1),O=f.column-1,T=f.column-1;const P=D.getLanguageId(A);m!==P&&(m=P,C=this.languageConfigurationService.getLanguageConfiguration(m).brackets,s(m,C))}let N=!0;for(;Aa?.dispose()}}function o(t){if(typeof t>"u")return()=>!0;{const a=Date.now();return()=>Date.now()-a<=t}}class i{constructor(){this._searchCanceledBrand=void 0}}i.INSTANCE=new i;function n(t){return t instanceof i?null:t}}),define(ie[328],ne([1,0,6,12,5,43,290,126,326,2]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class b extends v.Disposable{constructor(i,n,t,a,u,f,c){super(),this._onDidChangeContent=this._register(new L.Emitter),this._BOM=n,this._mightContainNonBasicASCII=!f,this._mightContainRTL=a,this._mightContainUnusualLineTerminators=u,this._pieceTree=new _.PieceTreeBase(i,t,c)}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(i){return this._pieceTree.createSnapshot(i?this._BOM:"")}getOffsetAt(i,n){return this._pieceTree.getOffsetAt(i,n)}getPositionAt(i){return this._pieceTree.getPositionAt(i)}getRangeAt(i,n){const t=i+n,a=this.getPositionAt(i),u=this.getPositionAt(t);return new y.Range(a.lineNumber,a.column,u.lineNumber,u.column)}getValueInRange(i,n=0){if(i.isEmpty())return"";const t=this._getEndOfLine(n);return this._pieceTree.getValueInRange(i,t)}getValueLengthInRange(i,n=0){if(i.isEmpty())return 0;if(i.startLineNumber===i.endLineNumber)return i.endColumn-i.startColumn;const t=this.getOffsetAt(i.startLineNumber,i.startColumn),a=this.getOffsetAt(i.endLineNumber,i.endColumn);let u=0;const f=this._getEndOfLine(n),c=this.getEOL();if(f.length!==c.length){const d=f.length-c.length,r=i.endLineNumber-i.startLineNumber;u=d*r}return a-t+u}getCharacterCountInRange(i,n=0){if(this._mightContainNonBasicASCII){let t=0;const a=i.startLineNumber,u=i.endLineNumber;for(let f=a;f<=u;f++){const c=this.getLineContent(f),d=f===a?i.startColumn-1:0,r=f===u?i.endColumn-1:c.length;for(let l=d;lw.sortIndex-D.sortIndex)}this._mightContainRTL=a,this._mightContainUnusualLineTerminators=u,this._mightContainNonBasicASCII=f;const h=this._doApplyEdits(d);let m=null;if(n&&s.length>0){s.sort((C,w)=>w.lineNumber-C.lineNumber),m=[];for(let C=0,w=s.length;C0&&s[C-1].lineNumber===D)continue;const I=s[C].oldContent,M=this.getLineContent(D);M.length===0||M===I||k.firstNonWhitespaceIndex(M)!==-1||m.push(D)}}return this._onDidChangeContent.fire(),new E.ApplyEditsResult(g,h,m)}_reduceOperations(i){return i.length<1e3?i:[this._toSingleEditOperation(i)]}_toSingleEditOperation(i){let n=!1;const t=i[0].range,a=i[i.length-1].range,u=new y.Range(t.startLineNumber,t.startColumn,a.endLineNumber,a.endColumn);let f=t.startLineNumber,c=t.startColumn;const d=[];for(let h=0,m=i.length;h0&&d.push(C.text),f=w.endLineNumber,c=w.endColumn}const r=d.join(""),[l,s,g]=(0,p.countEOL)(r);return{sortIndex:0,identifier:i[0].identifier,range:u,rangeOffset:this.getOffsetAt(u.startLineNumber,u.startColumn),rangeLength:this.getValueLengthInRange(u,0),text:r,eolCount:l,firstLineLength:s,lastLineLength:g,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(i){i.sort(b._sortOpsDescending);const n=[];for(let t=0;t0){const g=d.eolCount+1;g===1?s=new y.Range(r,l,r,l+d.firstLineLength):s=new y.Range(r,l,r+g-1,d.lastLineLength+1)}else s=new y.Range(r,l,r,l);t=s.endLineNumber,a=s.endColumn,n.push(s),u=d}return n}static _sortOpsAscending(i,n){const t=y.Range.compareRangesUsingEnds(i.range,n.range);return t===0?i.sortIndex-n.sortIndex:t}static _sortOpsDescending(i,n){const t=y.Range.compareRangesUsingEnds(i.range,n.range);return t===0?n.sortIndex-i.sortIndex:-t}}e.PieceTreeTextBuffer=b}),define(ie[608],ne([1,0,12,290,328]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class E{constructor(S,v,b,o,i,n,t,a,u){this._chunks=S,this._bom=v,this._cr=b,this._lf=o,this._crlf=i,this._containsRTL=n,this._containsUnusualLineTerminators=t,this._isBasicASCII=a,this._normalizeEOL=u}_getEOL(S){const v=this._cr+this._lf+this._crlf,b=this._cr+this._crlf;return v===0?S===1?` `:`\r `:b>v/2?`\r `:` `}create(S){const v=this._getEOL(S),b=this._chunks;if(this._normalizeEOL&&(v===`\r `&&(this._cr>0||this._lf>0)||v===` `&&(this._cr>0||this._crlf>0)))for(let i=0,n=b.length;i=55296&&v<=56319?(this._acceptChunk1(S.substr(0,S.length-1),!1),this._hasPreviousChar=!0,this._previousChar=v):(this._acceptChunk1(S,!1),this._hasPreviousChar=!1,this._previousChar=v)}_acceptChunk1(S,v){!v&&S.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+S):this._acceptChunk2(S))}_acceptChunk2(S){const v=(0,k.createLineStarts)(this._tmpLineStarts,S);this.chunks.push(new k.StringBuffer(S,v.lineStarts)),this.cr+=v.cr,this.lf+=v.lf,this.crlf+=v.crlf,v.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=L.containsRTL(S)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=L.containsUnusualLineTerminators(S)))}finish(S=!0){return this._finish(),new E(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,S)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const S=this.chunks[this.chunks.length-1];S.buffer+=String.fromCharCode(this._previousChar);const v=(0,k.createLineStartsFast)(S.buffer);S.lineStarts=v,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=_}),define(ie[609],ne([1,0,142,17]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function y(S){for(let v=0,b=S.length;va.target.position?a.target.position.lineNumber:0,this._opts=v(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(a=>{if(a.hasChanged(77)){const u=v(this._editor.getOption(77));if(this._opts.equals(u))return;this._opts=u,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(a=>this._onEditorMouseMove(new _(a,this._opts)))),this._register(this._editor.onMouseDown(a=>this._onEditorMouseDown(new _(a,this._opts)))),this._register(this._editor.onMouseUp(a=>this._onEditorMouseUp(new _(a,this._opts)))),this._register(this._editor.onKeyDown(a=>this._onEditorKeyDown(new p(a,this._opts)))),this._register(this._editor.onKeyUp(a=>this._onEditorKeyUp(new p(a,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(a=>this._onDidChangeCursorSelection(a))),this._register(this._editor.onDidChangeModel(a=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(a=>{(a.scrollTopChanged||a.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(i){i.selection&&i.selection.startColumn!==i.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(i){this._lastMouseMoveEvent=i,this._onMouseMoveOrRelevantKeyDown.fire([i,null])}_onEditorMouseDown(i){this._hasTriggerKeyOnMouseDown=i.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(i)}_onEditorMouseUp(i){const n=this._extractLineNumberFromMouseEvent(i);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===n&&this._onExecute.fire(i)}_onEditorKeyDown(i){this._lastMouseMoveEvent&&(i.keyCodeIsTriggerKey||i.keyCodeIsSideBySideKey&&i.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,i]):i.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(i){i.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=b}),define(ie[329],ne([1,0,14,9,6,2]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class _{constructor(v,b,o){this.value=v,this.isComplete=b,this.hasLoadingMessage=o}}e.HoverResult=_;class p extends E.Disposable{constructor(v,b){super(),this._editor=v,this._computer=b,this._onResult=this._register(new y.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new L.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new L.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new L.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(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(v,b=!0){this._state=v,b&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,L.createCancelableAsyncIterable)(v=>this._computer.computeAsync(v)),(async()=>{try{for await(const v of this._asyncIterable)v&&(this._result.push(v),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(v){(0,k.onUnexpectedError)(v)}})()):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 v=this._state===0,b=this._state===4;this._onResult.fire(new _(this._result.slice(0),v,b))}start(v){if(v===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=p}),define(ie[610],ne([1,0,226,2,11,7]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableContentWidget=void 0;const _=30,p=24;class S extends k.Disposable{constructor(b,o=new E.Dimension(10,10)){super(),this._editor=b,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new L.ResizableHTMLElement),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=E.Dimension.lift(o),this._resizableNode.layout(o.height,o.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new E.Dimension(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var b;return!((b=this._contentPosition)===null||b===void 0)&&b.position?y.Position.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(b){const o=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(b);return!o||!i?void 0:E.getDomNodePagePosition(o).top+i.top-_}_availableVerticalSpaceBelow(b){const o=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(b);if(!o||!i)return;const n=E.getDomNodePagePosition(o),t=E.getClientArea(o.ownerDocument.body),a=n.top+i.top+i.height;return t.height-a-p}_findPositionPreference(b,o){var i,n;const t=Math.min((i=this._availableVerticalSpaceBelow(o))!==null&&i!==void 0?i:1/0,b),a=Math.min((n=this._availableVerticalSpaceAbove(o))!==null&&n!==void 0?n:1/0,b),u=Math.min(Math.max(a,t),b),f=Math.min(b,u);let c;return this._editor.getOption(60).above?c=f<=a?1:2:c=f<=t?2:1,c===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),c}_resize(b){this._resizableNode.layout(b.height,b.width)}}e.ResizableContentWidget=S}),define(ie[330],ne([1,0,9,2,11,5,44,22]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class S{constructor(n,t){this.range=n,this.direction=t}}e.InlayHintAnchor=S;class v{constructor(n,t,a){this.hint=n,this.anchor=t,this.provider=a,this._isResolved=!1}with(n){const t=new v(this.hint,n.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}async resolve(n){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,n.isCancellationRequested?void 0:this.resolve(n);this._isResolved||(this._currentResolve=this._doResolve(n).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(n){var t,a;try{const u=await Promise.resolve(this.provider.resolveInlayHint(this.hint,n));this.hint.tooltip=(t=u?.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(a=u?.label)!==null&&a!==void 0?a:this.hint.label,this._isResolved=!0}catch(u){(0,L.onUnexpectedExternalError)(u),this._isResolved=!1}}}e.InlayHintItem=v;class b{static async create(n,t,a,u){const f=[],c=n.ordered(t).reverse().map(d=>a.map(async r=>{try{const l=await d.provideInlayHints(t,r,u);l?.hints.length&&f.push([l,d])}catch(l){(0,L.onUnexpectedExternalError)(l)}}));if(await Promise.all(c.flat()),u.isCancellationRequested||t.isDisposed())throw new L.CancellationError;return new b(a,f,t)}constructor(n,t,a){this._disposables=new k.DisposableStore,this.ranges=n,this.provider=new Set;const u=[];for(const[f,c]of t){this._disposables.add(f),this.provider.add(c);for(const d of f.hints){const r=a.validatePosition(d.position);let l="before";const s=b._getRangeAtPosition(a,r);let g;s.getStartPosition().isBefore(r)?(g=E.Range.fromPositions(s.getStartPosition(),r),l="after"):(g=E.Range.fromPositions(r,s.getEndPosition()),l="before"),u.push(new v(d,new S(g,l),c))}}this.items=u.sort((f,c)=>y.Position.compare(f.hint.position,c.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(n,t){const a=t.lineNumber,u=n.getWordAtPosition(t);if(u)return new E.Range(a,u.startColumn,a,u.endColumn);n.tokenization.tokenizeIfCheap(a);const f=n.tokenization.getLineTokens(a),c=t.column-1,d=f.findTokenIndexAtOffset(c);let r=f.getStartOffset(d),l=f.getEndOffset(d);return l-r===1&&(r===c&&d>1?(r=f.getStartOffset(d-1),l=f.getEndOffset(d-1)):l===c&&dB.toString?B.toString():""+B).join(" -> ")}`));const R=new k.DeferredPromise;return w.set(N,R.p),(async()=>{if(!x){const B=C(N);for(const W of B){const V=await M(W);if(V&&V.items.length>0)return}}try{return await N.provideInlineCompletions(d,c,r,l)}catch(B){(0,_.onUnexpectedExternalError)(B);return}})().then(B=>R.complete(B),B=>R.error(B)),R.p}const A=await Promise.all(h.map(async N=>({provider:N,completions:await M(N)}))),O=new Map,T=[];for(const N of A){const P=N.completions;if(!P)continue;const x=new n(P,N.provider);T.push(x);for(const R of P.items){const B=t.from(R,x,g,d,s);O.set(B.hash(),B)}}return new i(Array.from(O.values()),new Set(O.keys()),T)}e.provideInlineCompletions=o;class i{constructor(c,d,r){this.completions=c,this.hashs=d,this.providerResults=r}has(c){return this.hashs.has(c.hash())}dispose(){for(const c of this.providerResults)c.removeRef()}}e.InlineCompletionProviderResult=i;class n{constructor(c,d){this.inlineCompletions=c,this.provider=d,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}e.InlineCompletionList=n;class t{static from(c,d,r,l,s){let g,h,m=c.range?p.Range.lift(c.range):r;if(typeof c.insertText=="string"){if(g=c.insertText,s&&c.completeBracketPairs){g=u(g,m.getStartPosition(),l,s);const C=g.length-c.insertText.length;C!==0&&(m=new p.Range(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn+C))}h=void 0}else if("snippet"in c.insertText){const C=c.insertText.snippet.length;if(s&&c.completeBracketPairs){c.insertText.snippet=u(c.insertText.snippet,m.getStartPosition(),l,s);const D=c.insertText.snippet.length-C;D!==0&&(m=new p.Range(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn+D))}const w=new b.SnippetParser().parse(c.insertText.snippet);w.children.length===1&&w.children[0]instanceof b.Text?(g=w.children[0].value,h=void 0):(g=w.toString(),h={snippet:c.insertText.snippet,range:m})}else(0,L.assertNever)(c.insertText);return new t(g,c.command,m,g,h,c.additionalTextEdits||(0,v.getReadonlyEmptyArray)(),c,d)}constructor(c,d,r,l,s,g,h,m){this.filterText=c,this.command=d,this.range=r,this.insertText=l,this.snippetInfo=s,this.additionalTextEdits=g,this.sourceInlineCompletion=h,this.source=m,c=c.replace(/\r\n|\r/g,` `),l=c.replace(/\r\n|\r/g,` `)}withRange(c){return new t(this.filterText,this.command,c,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}e.InlineCompletionItem=t;function a(f,c){const d=c.getWordAtPosition(f),r=c.getLineMaxColumn(f.lineNumber);return d?new p.Range(f.lineNumber,d.startColumn,f.lineNumber,r):p.Range.fromPositions(f,f.with(void 0,r))}function u(f,c,d,r){const s=d.getLineContent(c.lineNumber).substring(0,c.column-1)+f,g=d.tokenization.tokenizeLineWithEdit(c,s.length-(c.column-1),f),h=g?.sliceAndInflate(c.column-1,s.length,0);return h?(0,S.fixBracketsInLine)(h,r):f}}),define(ie[612],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/controller/textAreaHandler",e)}),define(ie[613],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/coreCommands",e)}),define(ie[614],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/editorExtensions",e)}),define(ie[615],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(ie[616],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/accessibleDiffViewer",e)}),define(ie[617],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/colors",e)}),define(ie[618],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/decorations",e)}),define(ie[619],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/diffEditor.contribution",e)}),define(ie[620],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/diffEditorDecorations",e)}),define(ie[621],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/diffEditorEditors",e)}),define(ie[622],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature",e)}),define(ie[623],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin",e)}),define(ie[624],ne([1,0,7,41,26,2,17,27,623]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class v extends E.Disposable{get visibility(){return this._visibility}set visibility(o){this._visibility!==o&&(this._visibility=o,this._diffActions.style.visibility=o?"visible":"hidden")}constructor(o,i,n,t,a,u,f,c,d){super(),this._getViewZoneId=o,this._marginDomNode=i,this._modifiedEditor=n,this._diff=t,this._editor=a,this._viewLineCounts=u,this._originalTextModel=f,this._contextMenuService=c,this._clipboardService=d,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=p.ThemeIcon.asClassName(y.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=this._modifiedEditor.getOption(66);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${r}px`,this._diffActions.style.lineHeight=`${r}px`,this._marginDomNode.appendChild(this._diffActions);let l=0;const s=n.getOption(126)&&!_.isIOS,g=(h,m)=>{var C;this._contextMenuService.showContextMenu({domForShadowRoot:s&&(C=n.getDomNode())!==null&&C!==void 0?C:void 0,getAnchor:()=>({x:h,y:m}),getActions:()=>{const w=[],D=t.modified.isEmpty;return w.push(new k.Action("diff.clipboard.copyDeletedContent",D?t.original.length>1?(0,S.localize)(0,null):(0,S.localize)(1,null):t.original.length>1?(0,S.localize)(2,null):(0,S.localize)(3,null),void 0,!0,async()=>{const M=this._originalTextModel.getValueInRange(t.original.toExclusiveRange());await this._clipboardService.writeText(M)})),t.original.length>1&&w.push(new k.Action("diff.clipboard.copyDeletedLineContent",D?(0,S.localize)(4,null,t.original.startLineNumber+l):(0,S.localize)(5,null,t.original.startLineNumber+l),void 0,!0,async()=>{let M=this._originalTextModel.getLineContent(t.original.startLineNumber+l);M===""&&(M=this._originalTextModel.getEndOfLineSequence()===0?` `:`\r `),await this._clipboardService.writeText(M)})),n.getOption(90)||w.push(new k.Action("diff.inline.revertChange",(0,S.localize)(6,null),void 0,!0,async()=>{this._editor.revert(this._diff)})),w},autoSelectFirstItem:!0})};this._register((0,L.addStandardDisposableListener)(this._diffActions,"mousedown",h=>{if(!h.leftButton)return;const{top:m,height:C}=(0,L.getDomNodePagePosition)(this._diffActions),w=Math.floor(r/3);h.preventDefault(),g(h.posx,m+C+w)})),this._register(n.onMouseMove(h=>{(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()?(l=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,r),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(h=>{h.event.leftButton&&(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()&&(h.event.preventDefault(),l=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,r),g(h.event.posx,h.event.posy+r))}))}_updateLightBulbPosition(o,i,n){const{top:t}=(0,L.getDomNodePagePosition)(o),a=i-t,u=Math.floor(a/n),f=u*n;if(this._diffActions.style.top=`${f}px`,this._viewLineCounts){let c=0;for(let d=0;dthis._editors.original.getScrollTop()),this._modifiedScrollTop=(0,v.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=(0,v.observableSignalFromEvent)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,v.observableValue)(this,0),this._modifiedViewZonesChangedSignal=(0,v.observableSignalFromEvent)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,v.observableSignalFromEvent)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,v.derivedWithStore)(this,(I,M)=>{var A;this._element.replaceChildren();const O=this._diffModel.read(I),T=(A=O?.diff.read(I))===null||A===void 0?void 0:A.movedTexts;if(!T||T.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(I);const N=this._originalEditorLayoutInfo.read(I),P=this._modifiedEditorLayoutInfo.read(I);if(!N||!P){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(I),this._originalViewZonesChangedSignal.read(I);const x=T.map(j=>{function J(Z,re){const oe=re.getTopForLineNumber(Z.startLineNumber,!0),Y=re.getTopForLineNumber(Z.endLineNumberExclusive,!0);return(oe+Y)/2}const le=J(j.lineRangeMapping.original,this._editors.original),ee=this._originalScrollTop.read(I),$=J(j.lineRangeMapping.modified,this._editors.modified),te=this._modifiedScrollTop.read(I),G=le-ee,de=$-te,ue=Math.min(le,$),X=Math.max(le,$);return{range:new i.OffsetRange(ue,X),from:G,to:de,fromWithoutScroll:le,toWithoutScroll:$,move:j}});x.sort((0,E.tieBreakComparators)((0,E.compareBy)(j=>j.fromWithoutScroll>j.toWithoutScroll,E.booleanComparator),(0,E.compareBy)(j=>j.fromWithoutScroll>j.toWithoutScroll?j.fromWithoutScroll:-j.toWithoutScroll,E.numberComparator)));const R=a.compute(x.map(j=>j.range)),B=10,W=N.verticalScrollbarWidth,V=(R.getTrackCount()-1)*10+B*2,U=W+V+(P.contentLeft-t.movedCodeBlockPadding);let F=0;for(const j of x){const J=R.getTrack(F),le=W+B+J*10,ee=15,$=15,te=U,G=P.glyphMarginWidth+P.lineNumbersWidth,de=18,ue=document.createElementNS("http://www.w3.org/2000/svg","rect");ue.classList.add("arrow-rectangle"),ue.setAttribute("x",`${te-G}`),ue.setAttribute("y",`${j.to-de/2}`),ue.setAttribute("width",`${G}`),ue.setAttribute("height",`${de}`),this._element.appendChild(ue);const X=document.createElementNS("http://www.w3.org/2000/svg","g"),Z=document.createElementNS("http://www.w3.org/2000/svg","path");Z.setAttribute("d",`M 0 ${j.from} L ${le} ${j.from} L ${le} ${j.to} L ${te-$} ${j.to}`),Z.setAttribute("fill","none"),X.appendChild(Z);const re=document.createElementNS("http://www.w3.org/2000/svg","polygon");re.classList.add("arrow"),M.add((0,v.autorun)(oe=>{Z.classList.toggle("currentMove",j.move===O.activeMovedText.read(oe)),re.classList.toggle("currentMove",j.move===O.activeMovedText.read(oe))})),re.setAttribute("points",`${te-$},${j.to-ee/2} ${te},${j.to} ${te-$},${j.to+ee/2}`),X.appendChild(re),this._element.appendChild(X),F++}this.width.set(V,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,S.toDisposable)(()=>this._element.remove())),this._register((0,v.autorun)(I=>{const M=this._originalEditorLayoutInfo.read(I),A=this._modifiedEditorLayoutInfo.read(I);!M||!A||(this._element.style.left=`${M.width-M.verticalScrollbarWidth}px`,this._element.style.height=`${M.height}px`,this._element.style.width=`${M.verticalScrollbarWidth+M.contentLeft-t.movedCodeBlockPadding+this.width.read(I)}px`)})),this._register((0,v.recomputeInitiallyAndOnChange)(this._state));const g=(0,v.derived)(I=>{const M=this._diffModel.read(I),A=M?.diff.read(I);return A?A.movedTexts.map(O=>({move:O,original:new o.PlaceholderViewZone((0,v.constObservable)(O.lineRangeMapping.original.startLineNumber-1),18),modified:new o.PlaceholderViewZone((0,v.constObservable)(O.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,o.applyViewZones)(this._editors.original,g.map(I=>I.map(M=>M.original)))),this._register((0,o.applyViewZones)(this._editors.modified,g.map(I=>I.map(M=>M.modified)))),this._register((0,v.autorunWithStore)((I,M)=>{const A=g.read(I);for(const O of A)M.add(new u(this._editors.original,O.original,O.move,"original",this._diffModel.get())),M.add(new u(this._editors.modified,O.modified,O.move,"modified",this._diffModel.get()))}));const h=(0,v.observableFromEvent)(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),m=(0,v.observableFromEvent)(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),C=(0,v.observableSignalFromEvent)("original.onDidFocusEditorWidget",I=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>I(void 0),0))),w=(0,v.observableSignalFromEvent)("modified.onDidFocusEditorWidget",I=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>I(void 0),0)));let D="modified";this._register((0,v.autorunHandleChanges)({createEmptyChangeSummary:()=>{},handleChange:(I,M)=>(I.didChange(C)&&(D="original"),I.didChange(w)&&(D="modified"),!0)},I=>{C.read(I),w.read(I);const M=this._diffModel.read(I);if(!M)return;const A=M.diff.read(I);let O;if(A&&D==="original"){const T=h.read(I);T&&(O=A.movedTexts.find(N=>N.lineRangeMapping.original.contains(T.lineNumber)))}if(A&&D==="modified"){const T=m.read(I);T&&(O=A.movedTexts.find(N=>N.lineRangeMapping.modified.contains(T.lineNumber)))}O!==M.movedTextToCompare.get()&&M.movedTextToCompare.set(void 0,void 0),M.setActiveMovedText(O)}))}}e.MovedBlocksLinesPart=t,t.movedCodeBlockPadding=4;class a{static compute(c){const d=[],r=[];for(const l of c){let s=d.findIndex(g=>!g.intersectsStrict(l));s===-1&&(d.length>=6?s=(0,_.findMaxIdxBy)(d,(0,E.compareBy)(h=>h.intersectWithRangeLength(l),E.numberComparator)):(s=d.length,d.push(new i.OffsetRangeSet))),d[s].addRange(l),r.push(s)}return new a(d.length,r)}constructor(c,d){this._trackCount=c,this.trackPerLineIdx=d}getTrack(c){return this.trackPerLineIdx[c]}getTrackCount(){return this._trackCount}}class u extends o.ViewZoneOverlayWidget{constructor(c,d,r,l,s){const g=(0,L.h)("div.diff-hidden-lines-widget");super(c,d,g.root),this._editor=c,this._move=r,this._kind=l,this._diffModel=s,this._nodes=(0,L.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,L.h)("div.text-content@textContent"),(0,L.h)("div.action-bar@actionBar")]),g.root.appendChild(this._nodes.root);const h=(0,v.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register((0,o.applyStyle)(this._nodes.root,{paddingRight:h.map(I=>I.verticalScrollbarWidth)}));let m;r.changes.length>0?m=this._kind==="original"?(0,n.localize)(0,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,n.localize)(1,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):m=this._kind==="original"?(0,n.localize)(2,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,n.localize)(3,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const C=this._register(new k.ActionBar(this._nodes.actionBar,{highlightToggledItems:!0})),w=new y.Action("",m,"",!1);C.push(w,{icon:!1,label:!0});const D=new y.Action("","Compare",b.ThemeIcon.asClassName(p.Codicon.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===r?void 0:this._move,void 0)});this._register((0,v.autorun)(I=>{const M=this._diffModel.movedTextToCompare.read(I)===r;D.checked=M})),C.push(D,{icon:!1,label:!0})}}}),define(ie[626],ne([3,4]),function(Q,e){return Q.create("vs/editor/browser/widget/multiDiffEditorWidget/colors",e)}),define(ie[627],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(ie[628],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/config/editorOptions",e)}),define(ie[36],ne([1,0,13,55,17,177,149,628]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.ShowAiIconMode=e.EditorLayoutInfoComputer=e.EditorFontVariations=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.clampedFloat=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class S{constructor(fe){this._values=fe}hasChanged(fe){return this._values[fe]}}e.ConfigurationChangedEvent=S;class v{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=v;class b{constructor(fe,be,ke,Re){this.id=fe,this.name=be,this.defaultValue=ke,this.schema=Re}applyUpdate(fe,be){return i(fe,be)}compute(fe,be,ke){return ke}}class o{constructor(fe,be){this.newValue=fe,this.didChange=be}}e.ApplyUpdateResult=o;function i(Ne,fe){if(typeof Ne!="object"||typeof fe!="object"||!Ne||!fe)return new o(fe,Ne!==fe);if(Array.isArray(Ne)||Array.isArray(fe)){const ke=Array.isArray(Ne)&&Array.isArray(fe)&&L.equals(Ne,fe);return new o(fe,!ke)}let be=!1;for(const ke in fe)if(fe.hasOwnProperty(ke)){const Re=i(Ne[ke],fe[ke]);Re.didChange&&(Ne[ke]=Re.newValue,be=!0)}return new o(Ne,be)}class n{constructor(fe){this.schema=void 0,this.id=fe,this.name="_never_",this.defaultValue=void 0}applyUpdate(fe,be){return i(fe,be)}validate(fe){return this.defaultValue}}class t{constructor(fe,be,ke,Re){this.id=fe,this.name=be,this.defaultValue=ke,this.schema=Re}applyUpdate(fe,be){return i(fe,be)}validate(fe){return typeof fe>"u"?this.defaultValue:fe}compute(fe,be,ke){return ke}}function a(Ne,fe){return typeof Ne>"u"?fe:Ne==="false"?!1:!!Ne}e.boolean=a;class u extends t{constructor(fe,be,ke,Re=void 0){typeof Re<"u"&&(Re.type="boolean",Re.default=ke),super(fe,be,ke,Re)}validate(fe){return a(fe,this.defaultValue)}}function f(Ne,fe,be,ke){if(typeof Ne>"u")return fe;let Re=parseInt(Ne,10);return isNaN(Re)?fe:(Re=Math.max(be,Re),Re=Math.min(ke,Re),Re|0)}e.clampedInt=f;class c extends t{static clampedInt(fe,be,ke,Re){return f(fe,be,ke,Re)}constructor(fe,be,ke,Re,Ve,Ke=void 0){typeof Ke<"u"&&(Ke.type="integer",Ke.default=ke,Ke.minimum=Re,Ke.maximum=Ve),super(fe,be,ke,Ke),this.minimum=Re,this.maximum=Ve}validate(fe){return c.clampedInt(fe,this.defaultValue,this.minimum,this.maximum)}}function d(Ne,fe,be,ke){if(typeof Ne>"u")return fe;const Re=r.float(Ne,fe);return r.clamp(Re,be,ke)}e.clampedFloat=d;class r extends t{static clamp(fe,be,ke){return feke?ke:fe}static float(fe,be){if(typeof fe=="number")return fe;if(typeof fe>"u")return be;const ke=parseFloat(fe);return isNaN(ke)?be:ke}constructor(fe,be,ke,Re,Ve){typeof Ve<"u"&&(Ve.type="number",Ve.default=ke),super(fe,be,ke,Ve),this.validationFn=Re}validate(fe){return this.validationFn(r.float(fe,this.defaultValue))}}class l extends t{static string(fe,be){return typeof fe!="string"?be:fe}constructor(fe,be,ke,Re=void 0){typeof Re<"u"&&(Re.type="string",Re.default=ke),super(fe,be,ke,Re)}validate(fe){return l.string(fe,this.defaultValue)}}function s(Ne,fe,be,ke){return typeof Ne!="string"?fe:ke&&Ne in ke?ke[Ne]:be.indexOf(Ne)===-1?fe:Ne}e.stringSet=s;class g extends t{constructor(fe,be,ke,Re,Ve=void 0){typeof Ve<"u"&&(Ve.type="string",Ve.enum=Re,Ve.default=ke),super(fe,be,ke,Ve),this._allowedValues=Re}validate(fe){return s(fe,this.defaultValue,this._allowedValues)}}class h extends b{constructor(fe,be,ke,Re,Ve,Ke,je=void 0){typeof je<"u"&&(je.type="string",je.enum=Ve,je.default=Re),super(fe,be,ke,je),this._allowedValues=Ve,this._convert=Ke}validate(fe){return typeof fe!="string"?this.defaultValue:this._allowedValues.indexOf(fe)===-1?this.defaultValue:this._convert(fe)}}function m(Ne){switch(Ne){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class C extends b{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p.localize(0,null),p.localize(1,null),p.localize(2,null)],default:"auto",tags:["accessibility"],description:p.localize(3,null)})}validate(fe){switch(fe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(fe,be,ke){return ke===0?fe.accessibilitySupport:ke}}class w extends b{constructor(){const fe={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",fe,{"editor.comments.insertSpace":{type:"boolean",default:fe.insertSpace,description:p.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:fe.ignoreEmptyLines,description:p.localize(5,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{insertSpace:a(be.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:a(be.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function D(Ne){switch(Ne){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var I;(function(Ne){Ne[Ne.Line=1]="Line",Ne[Ne.Block=2]="Block",Ne[Ne.Underline=3]="Underline",Ne[Ne.LineThin=4]="LineThin",Ne[Ne.BlockOutline=5]="BlockOutline",Ne[Ne.UnderlineThin=6]="UnderlineThin"})(I||(e.TextEditorCursorStyle=I={}));function M(Ne){switch(Ne){case"line":return I.Line;case"block":return I.Block;case"underline":return I.Underline;case"line-thin":return I.LineThin;case"block-outline":return I.BlockOutline;case"underline-thin":return I.UnderlineThin}}class A extends n{constructor(){super(140)}compute(fe,be,ke){const Re=["monaco-editor"];return be.get(39)&&Re.push(be.get(39)),fe.extraEditorClassName&&Re.push(fe.extraEditorClassName),be.get(73)==="default"?Re.push("mouse-default"):be.get(73)==="copy"&&Re.push("mouse-copy"),be.get(110)&&Re.push("showUnused"),be.get(138)&&Re.push("showDeprecated"),Re.join(" ")}}class O extends u{constructor(){super(37,"emptySelectionClipboard",!0,{description:p.localize(6,null)})}compute(fe,be,ke){return ke&&fe.emptySelectionClipboard}}class T extends b{constructor(){const fe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",fe,{"editor.find.cursorMoveOnType":{type:"boolean",default:fe.cursorMoveOnType,description:p.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:fe.seedSearchStringFromSelection,enumDescriptions:[p.localize(8,null),p.localize(9,null),p.localize(10,null)],description:p.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:fe.autoFindInSelection,enumDescriptions:[p.localize(12,null),p.localize(13,null),p.localize(14,null)],description:p.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:fe.globalFindClipboard,description:p.localize(16,null),included:y.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:fe.addExtraSpaceOnTop,description:p.localize(17,null)},"editor.find.loop":{type:"boolean",default:fe.loop,description:p.localize(18,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{cursorMoveOnType:a(be.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof fe.seedSearchStringFromSelection=="boolean"?fe.seedSearchStringFromSelection?"always":"never":s(be.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof fe.autoFindInSelection=="boolean"?fe.autoFindInSelection?"always":"never":s(be.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:a(be.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:a(be.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:a(be.loop,this.defaultValue.loop)}}}class N extends b{constructor(){super(51,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:p.localize(19,null)},{type:"string",description:p.localize(20,null)}],description:p.localize(21,null),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"?N.OFF:fe==="true"?N.ON:fe:fe?N.ON:N.OFF}}e.EditorFontLigatures=N,N.OFF='"liga" off, "calt" off',N.ON='"liga" on, "calt" on';class P extends b{constructor(){super(54,"fontVariations",P.OFF,{anyOf:[{type:"boolean",description:p.localize(22,null)},{type:"string",description:p.localize(23,null)}],description:p.localize(24,null),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"?P.OFF:fe==="true"?P.TRANSLATE:fe:fe?P.TRANSLATE:P.OFF}compute(fe,be,ke){return fe.fontInfo.fontVariationSettings}}e.EditorFontVariations=P,P.OFF="normal",P.TRANSLATE="translate";class x extends n{constructor(){super(50)}compute(fe,be,ke){return fe.fontInfo}}class R extends t{constructor(){super(52,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:p.localize(25,null)})}validate(fe){const be=r.float(fe,this.defaultValue);return be===0?e.EDITOR_FONT_DEFAULTS.fontSize:r.clamp(be,6,100)}compute(fe,be,ke){return fe.fontInfo.fontSize}}class B extends b{constructor(){super(53,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:B.MINIMUM_VALUE,maximum:B.MAXIMUM_VALUE,errorMessage:p.localize(26,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:B.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:p.localize(27,null)})}validate(fe){return fe==="normal"||fe==="bold"?fe:String(c.clampedInt(fe,e.EDITOR_FONT_DEFAULTS.fontWeight,B.MINIMUM_VALUE,B.MAXIMUM_VALUE))}}B.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],B.MINIMUM_VALUE=1,B.MAXIMUM_VALUE=1e3;class W extends b{constructor(){const fe={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:""},be={type:"string",enum:["peek","gotoAndPeek","goto"],default:fe.multiple,enumDescriptions:[p.localize(28,null),p.localize(29,null),p.localize(30,null)]},ke=["","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(58,"gotoLocation",fe,{"editor.gotoLocation.multiple":{deprecationMessage:p.localize(31,null)},"editor.gotoLocation.multipleDefinitions":{description:p.localize(32,null),...be},"editor.gotoLocation.multipleTypeDefinitions":{description:p.localize(33,null),...be},"editor.gotoLocation.multipleDeclarations":{description:p.localize(34,null),...be},"editor.gotoLocation.multipleImplementations":{description:p.localize(35,null),...be},"editor.gotoLocation.multipleReferences":{description:p.localize(36,null),...be},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:fe.alternativeDefinitionCommand,enum:ke,description:p.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:fe.alternativeTypeDefinitionCommand,enum:ke,description:p.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:fe.alternativeDeclarationCommand,enum:ke,description:p.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:fe.alternativeImplementationCommand,enum:ke,description:p.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:fe.alternativeReferenceCommand,enum:ke,description:p.localize(41,null)}})}validate(fe){var be,ke,Re,Ve,Ke;if(!fe||typeof fe!="object")return this.defaultValue;const je=fe;return{multiple:s(je.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(be=je.multipleDefinitions)!==null&&be!==void 0?be:s(je.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(ke=je.multipleTypeDefinitions)!==null&&ke!==void 0?ke:s(je.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Re=je.multipleDeclarations)!==null&&Re!==void 0?Re:s(je.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(Ve=je.multipleImplementations)!==null&&Ve!==void 0?Ve:s(je.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Ke=je.multipleReferences)!==null&&Ke!==void 0?Ke:s(je.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:l.string(je.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:l.string(je.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:l.string(je.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:l.string(je.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:l.string(je.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class V extends b{constructor(){const fe={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",fe,{"editor.hover.enabled":{type:"boolean",default:fe.enabled,description:p.localize(42,null)},"editor.hover.delay":{type:"number",default:fe.delay,minimum:0,maximum:1e4,description:p.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:fe.sticky,description:p.localize(44,null)},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:fe.hidingDelay,description:p.localize(45,null)},"editor.hover.above":{type:"boolean",default:fe.above,description:p.localize(46,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),delay:c.clampedInt(be.delay,this.defaultValue.delay,0,1e4),sticky:a(be.sticky,this.defaultValue.sticky),hidingDelay:c.clampedInt(be.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:a(be.above,this.defaultValue.above)}}}class U extends n{constructor(){super(143)}compute(fe,be,ke){return U.computeLayout(be,{memory:fe.memory,outerWidth:fe.outerWidth,outerHeight:fe.outerHeight,isDominatedByLongLines:fe.isDominatedByLongLines,lineHeight:fe.fontInfo.lineHeight,viewLineCount:fe.viewLineCount,lineNumbersDigitCount:fe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:fe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:fe.fontInfo.maxDigitWidth,pixelRatio:fe.pixelRatio,glyphMarginDecorationLaneCount:fe.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(fe){const be=fe.height/fe.lineHeight,ke=Math.floor(fe.paddingTop/fe.lineHeight);let Re=Math.floor(fe.paddingBottom/fe.lineHeight);fe.scrollBeyondLastLine&&(Re=Math.max(Re,be-1));const Ve=(ke+fe.viewLineCount+Re)/(fe.pixelRatio*fe.height),Ke=Math.floor(fe.viewLineCount/Ve);return{typicalViewportLineCount:be,extraLinesBeforeFirstLine:ke,extraLinesBeyondLastLine:Re,desiredRatio:Ve,minimapLineCount:Ke}}static _computeMinimapLayout(fe,be){const ke=fe.outerWidth,Re=fe.outerHeight,Ve=fe.pixelRatio;if(!fe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Ve*Re),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Re};const Ke=be.stableMinimapLayoutInput,je=Ke&&fe.outerHeight===Ke.outerHeight&&fe.lineHeight===Ke.lineHeight&&fe.typicalHalfwidthCharacterWidth===Ke.typicalHalfwidthCharacterWidth&&fe.pixelRatio===Ke.pixelRatio&&fe.scrollBeyondLastLine===Ke.scrollBeyondLastLine&&fe.paddingTop===Ke.paddingTop&&fe.paddingBottom===Ke.paddingBottom&&fe.minimap.enabled===Ke.minimap.enabled&&fe.minimap.side===Ke.minimap.side&&fe.minimap.size===Ke.minimap.size&&fe.minimap.showSlider===Ke.minimap.showSlider&&fe.minimap.renderCharacters===Ke.minimap.renderCharacters&&fe.minimap.maxColumn===Ke.minimap.maxColumn&&fe.minimap.scale===Ke.minimap.scale&&fe.verticalScrollbarWidth===Ke.verticalScrollbarWidth&&fe.isViewportWrapping===Ke.isViewportWrapping,st=fe.lineHeight,ot=fe.typicalHalfwidthCharacterWidth,nt=fe.scrollBeyondLastLine,rt=fe.minimap.renderCharacters;let Qe=Ve>=2?Math.round(fe.minimap.scale*2):fe.minimap.scale;const ht=fe.minimap.maxColumn,gt=fe.minimap.size,ft=fe.minimap.side,dt=fe.verticalScrollbarWidth,we=fe.viewLineCount,ye=fe.remainingWidth,Ie=fe.isViewportWrapping,Ae=rt?2:3;let ze=Math.floor(Ve*Re);const xe=ze/Ve;let De=!1,Fe=!1,We=Ae*Qe,qe=Qe/Ve,Ze=1;if(gt==="fill"||gt==="fit"){const{typicalViewportLineCount:Ue,extraLinesBeforeFirstLine:$e,extraLinesBeyondLastLine:et,desiredRatio:tt,minimapLineCount:at}=U.computeContainedMinimapLineCount({viewLineCount:we,scrollBeyondLastLine:nt,paddingTop:fe.paddingTop,paddingBottom:fe.paddingBottom,height:Re,lineHeight:st,pixelRatio:Ve});if(we/at>1)De=!0,Fe=!0,Qe=1,We=1,qe=Qe/Ve;else{let Je=!1,ct=Qe+1;if(gt==="fit"){const mt=Math.ceil(($e+we+et)*We);Ie&&je&&ye<=be.stableFitRemainingWidth?(Je=!0,ct=be.stableFitMaxMinimapScale):Je=mt>ze}if(gt==="fill"||Je){De=!0;const mt=Qe;We=Math.min(st*Ve,Math.max(1,Math.floor(1/tt))),Ie&&je&&ye<=be.stableFitRemainingWidth&&(ct=be.stableFitMaxMinimapScale),Qe=Math.min(ct,Math.max(1,Math.floor(We/Ae))),Qe>mt&&(Ze=Math.min(2,Qe/mt)),qe=Qe/Ve/Ze,ze=Math.ceil(Math.max(Ue,$e+we+et)*We),Ie?(be.stableMinimapLayoutInput=fe,be.stableFitRemainingWidth=ye,be.stableFitMaxMinimapScale=Qe):(be.stableMinimapLayoutInput=null,be.stableFitRemainingWidth=0)}}}const ut=Math.floor(ht*qe),Xe=Math.min(ut,Math.max(0,Math.floor((ye-dt-2)*qe/(ot+qe)))+e.MINIMAP_GUTTER_WIDTH);let lt=Math.floor(Ve*Xe);const Ge=lt/Ve;lt=Math.floor(lt*Ze);const Oe=rt?1:2,He=ft==="left"?0:ke-Xe-dt;return{renderMinimap:Oe,minimapLeft:He,minimapWidth:Xe,minimapHeightIsEditorHeight:De,minimapIsSampling:Fe,minimapScale:Qe,minimapLineHeight:We,minimapCanvasInnerWidth:lt,minimapCanvasInnerHeight:ze,minimapCanvasOuterWidth:Ge,minimapCanvasOuterHeight:xe}}static computeLayout(fe,be){const ke=be.outerWidth|0,Re=be.outerHeight|0,Ve=be.lineHeight|0,Ke=be.lineNumbersDigitCount|0,je=be.typicalHalfwidthCharacterWidth,st=be.maxDigitWidth,ot=be.pixelRatio,nt=be.viewLineCount,rt=fe.get(135),Qe=rt==="inherit"?fe.get(134):rt,ht=Qe==="inherit"?fe.get(130):Qe,gt=fe.get(133),ft=be.isDominatedByLongLines,dt=fe.get(57),we=fe.get(67).renderType!==0,ye=fe.get(68),Ie=fe.get(104),Ae=fe.get(83),ze=fe.get(72),xe=fe.get(102),De=xe.verticalScrollbarSize,Fe=xe.verticalHasArrows,We=xe.arrowSize,qe=xe.horizontalScrollbarSize,Ze=fe.get(43),ut=fe.get(109)!=="never";let Xe=fe.get(65);Ze&&ut&&(Xe+=16);let lt=0;if(we){const pt=Math.max(Ke,ye);lt=Math.round(pt*st)}let Ge=0;dt&&(Ge=Ve*be.glyphMarginDecorationLaneCount);let Oe=0,He=Oe+Ge,Ue=He+lt,$e=Ue+Xe;const et=ke-Ge-lt-Xe;let tt=!1,at=!1,it=-1;Qe==="inherit"&&ft?(tt=!0,at=!0):ht==="on"||ht==="bounded"?at=!0:ht==="wordWrapColumn"&&(it=gt);const Je=U._computeMinimapLayout({outerWidth:ke,outerHeight:Re,lineHeight:Ve,typicalHalfwidthCharacterWidth:je,pixelRatio:ot,scrollBeyondLastLine:Ie,paddingTop:Ae.top,paddingBottom:Ae.bottom,minimap:ze,verticalScrollbarWidth:De,viewLineCount:nt,remainingWidth:et,isViewportWrapping:at},be.memory||new v);Je.renderMinimap!==0&&Je.minimapLeft===0&&(Oe+=Je.minimapWidth,He+=Je.minimapWidth,Ue+=Je.minimapWidth,$e+=Je.minimapWidth);const ct=et-Je.minimapWidth,mt=Math.max(1,Math.floor((ct-De-2)/je)),kt=Fe?We:0;return at&&(it=Math.max(1,mt),ht==="bounded"&&(it=Math.min(it,gt))),{width:ke,height:Re,glyphMarginLeft:Oe,glyphMarginWidth:Ge,glyphMarginDecorationLaneCount:be.glyphMarginDecorationLaneCount,lineNumbersLeft:He,lineNumbersWidth:lt,decorationsLeft:Ue,decorationsWidth:Xe,contentLeft:$e,contentWidth:ct,minimap:Je,viewportColumn:mt,isWordWrapMinified:tt,isViewportWrapping:at,wrappingColumn:it,verticalScrollbarWidth:De,horizontalScrollbarHeight:qe,overviewRuler:{top:kt,width:De,height:Re-2*kt,right:0}}}}e.EditorLayoutInfoComputer=U;class F extends b{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[p.localize(47,null),p.localize(48,null)],type:"string",enum:["simple","advanced"],default:"simple",description:p.localize(49,null)}})}validate(fe){return s(fe,"simple",["simple","advanced"])}compute(fe,be,ke){return be.get(2)===2?"advanced":ke}}var j;(function(Ne){Ne.Off="off",Ne.OnCode="onCode",Ne.On="on"})(j||(e.ShowAiIconMode=j={}));class J extends b{constructor(){const fe={enabled:!0,experimental:{showAiIcon:j.Off}};super(64,"lightbulb",fe,{"editor.lightbulb.enabled":{type:"boolean",default:fe.enabled,description:p.localize(50,null)},"editor.lightbulb.experimental.showAiIcon":{type:"string",enum:[j.Off,j.OnCode,j.On],default:fe.experimental.showAiIcon,enumDescriptions:[p.localize(51,null),p.localize(52,null),p.localize(53,null)],description:p.localize(54,null)}})}validate(fe){var be,ke;if(!fe||typeof fe!="object")return this.defaultValue;const Re=fe;return{enabled:a(Re.enabled,this.defaultValue.enabled),experimental:{showAiIcon:s((be=Re.experimental)===null||be===void 0?void 0:be.showAiIcon,(ke=this.defaultValue.experimental)===null||ke===void 0?void 0:ke.showAiIcon,[j.Off,j.OnCode,j.On])}}}}class le extends b{constructor(){const fe={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",fe,{"editor.stickyScroll.enabled":{type:"boolean",default:fe.enabled,description:p.localize(55,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:fe.maxLineCount,minimum:1,maximum:10,description:p.localize(56,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:fe.defaultModel,description:p.localize(57,null)},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:fe.scrollWithEditor,description:p.localize(58,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),maxLineCount:c.clampedInt(be.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:s(be.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:a(be.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class ee extends b{constructor(){const fe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",fe,{"editor.inlayHints.enabled":{type:"string",default:fe.enabled,description:p.localize(59,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p.localize(60,null),p.localize(61,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),p.localize(62,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),p.localize(63,null)]},"editor.inlayHints.fontSize":{type:"number",default:fe.fontSize,markdownDescription:p.localize(64,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:fe.fontFamily,markdownDescription:p.localize(65,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:fe.padding,description:p.localize(66,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return typeof be.enabled=="boolean"&&(be.enabled=be.enabled?"on":"off"),{enabled:s(be.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:c.clampedInt(be.fontSize,this.defaultValue.fontSize,0,100),fontFamily:l.string(be.fontFamily,this.defaultValue.fontFamily),padding:a(be.padding,this.defaultValue.padding)}}}class $ extends b{constructor(){super(65,"lineDecorationsWidth",10)}validate(fe){return typeof fe=="string"&&/^\d+(\.\d+)?ch$/.test(fe)?-parseFloat(fe.substring(0,fe.length-2)):c.clampedInt(fe,this.defaultValue,0,1e3)}compute(fe,be,ke){return ke<0?c.clampedInt(-ke*fe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):ke}}class te extends r{constructor(){super(66,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,fe=>r.clamp(fe,0,150),{markdownDescription:p.localize(67,null)})}compute(fe,be,ke){return fe.fontInfo.lineHeight}}class G extends b{constructor(){const fe={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",fe,{"editor.minimap.enabled":{type:"boolean",default:fe.enabled,description:p.localize(68,null)},"editor.minimap.autohide":{type:"boolean",default:fe.autohide,description:p.localize(69,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p.localize(70,null),p.localize(71,null),p.localize(72,null)],default:fe.size,description:p.localize(73,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:fe.side,description:p.localize(74,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:fe.showSlider,description:p.localize(75,null)},"editor.minimap.scale":{type:"number",default:fe.scale,minimum:1,maximum:3,enum:[1,2,3],description:p.localize(76,null)},"editor.minimap.renderCharacters":{type:"boolean",default:fe.renderCharacters,description:p.localize(77,null)},"editor.minimap.maxColumn":{type:"number",default:fe.maxColumn,description:p.localize(78,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),autohide:a(be.autohide,this.defaultValue.autohide),size:s(be.size,this.defaultValue.size,["proportional","fill","fit"]),side:s(be.side,this.defaultValue.side,["right","left"]),showSlider:s(be.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:a(be.renderCharacters,this.defaultValue.renderCharacters),scale:c.clampedInt(be.scale,1,1,3),maxColumn:c.clampedInt(be.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function de(Ne){return Ne==="ctrlCmd"?y.isMacintosh?"metaKey":"ctrlKey":"altKey"}class ue extends b{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p.localize(79,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p.localize(80,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{top:c.clampedInt(be.top,0,0,1e3),bottom:c.clampedInt(be.bottom,0,0,1e3)}}}class X extends b{constructor(){const fe={enabled:!0,cycle:!0};super(85,"parameterHints",fe,{"editor.parameterHints.enabled":{type:"boolean",default:fe.enabled,description:p.localize(81,null)},"editor.parameterHints.cycle":{type:"boolean",default:fe.cycle,description:p.localize(82,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),cycle:a(be.cycle,this.defaultValue.cycle)}}}class Z extends n{constructor(){super(141)}compute(fe,be,ke){return fe.pixelRatio}}class re extends b{constructor(){const fe={other:"on",comments:"off",strings:"off"},be=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p.localize(83,null),p.localize(84,null),p.localize(85,null)]}];super(88,"quickSuggestions",fe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:be,default:fe.strings,description:p.localize(86,null)},comments:{anyOf:be,default:fe.comments,description:p.localize(87,null)},other:{anyOf:be,default:fe.other,description:p.localize(88,null)}},default:fe,markdownDescription:p.localize(89,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=fe}validate(fe){if(typeof fe=="boolean"){const ot=fe?"on":"off";return{comments:ot,strings:ot,other:ot}}if(!fe||typeof fe!="object")return this.defaultValue;const{other:be,comments:ke,strings:Re}=fe,Ve=["on","inline","off"];let Ke,je,st;return typeof be=="boolean"?Ke=be?"on":"off":Ke=s(be,this.defaultValue.other,Ve),typeof ke=="boolean"?je=ke?"on":"off":je=s(ke,this.defaultValue.comments,Ve),typeof Re=="boolean"?st=Re?"on":"off":st=s(Re,this.defaultValue.strings,Ve),{other:Ke,comments:je,strings:st}}}class oe extends b{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p.localize(90,null),p.localize(91,null),p.localize(92,null),p.localize(93,null)],default:"on",description:p.localize(94,null)})}validate(fe){let be=this.defaultValue.renderType,ke=this.defaultValue.renderFn;return typeof fe<"u"&&(typeof fe=="function"?(be=4,ke=fe):fe==="interval"?be=3:fe==="relative"?be=2:fe==="on"?be=1:be=0),{renderType:be,renderFn:ke}}}function Y(Ne){const fe=Ne.get(97);return fe==="editable"?Ne.get(90):fe!=="on"}e.filterValidationDecorations=Y;class K extends b{constructor(){const fe=[],be={type:"number",description:p.localize(95,null)};super(101,"rulers",fe,{type:"array",items:{anyOf:[be,{type:["object"],properties:{column:be,color:{type:"string",description:p.localize(96,null),format:"color-hex"}}}]},default:fe,description:p.localize(97,null)})}validate(fe){if(Array.isArray(fe)){const be=[];for(const ke of fe)if(typeof ke=="number")be.push({column:c.clampedInt(ke,0,0,1e4),color:null});else if(ke&&typeof ke=="object"){const Re=ke;be.push({column:c.clampedInt(Re.column,0,0,1e4),color:Re.color})}return be.sort((ke,Re)=>ke.column-Re.column),be}return this.defaultValue}}class H extends b{constructor(){super(91,"readOnlyMessage",void 0)}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:fe}}function z(Ne,fe){if(typeof Ne!="string")return fe;switch(Ne){case"hidden":return 2;case"visible":return 3;default:return 1}}class se extends b{constructor(){const fe={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,ignoreHorizontalScrollbarInContentHeight:!1};super(102,"scrollbar",fe,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p.localize(98,null),p.localize(99,null),p.localize(100,null)],default:"auto",description:p.localize(101,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p.localize(102,null),p.localize(103,null),p.localize(104,null)],default:"auto",description:p.localize(105,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:fe.verticalScrollbarSize,description:p.localize(106,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:fe.horizontalScrollbarSize,description:p.localize(107,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:fe.scrollByPage,description:p.localize(108,null)},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:fe.ignoreHorizontalScrollbarInContentHeight,description:p.localize(109,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe,ke=c.clampedInt(be.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Re=c.clampedInt(be.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:c.clampedInt(be.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:z(be.vertical,this.defaultValue.vertical),horizontal:z(be.horizontal,this.defaultValue.horizontal),useShadows:a(be.useShadows,this.defaultValue.useShadows),verticalHasArrows:a(be.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:a(be.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:a(be.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:a(be.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:ke,horizontalSliderSize:c.clampedInt(be.horizontalSliderSize,ke,0,1e3),verticalScrollbarSize:Re,verticalSliderSize:c.clampedInt(be.verticalSliderSize,Re,0,1e3),scrollByPage:a(be.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:a(be.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}}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 q extends b{constructor(){const fe={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",fe,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.nonBasicASCII,description:p.localize(110,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:fe.invisibleCharacters,description:p.localize(111,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:fe.ambiguousCharacters,description:p.localize(112,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeComments,description:p.localize(113,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeStrings,description:p.localize(114,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:fe.allowedCharacters,description:p.localize(115,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:fe.allowedLocales,description:p.localize(116,null)}})}applyUpdate(fe,be){let ke=!1;be.allowedCharacters&&fe&&(k.equals(fe.allowedCharacters,be.allowedCharacters)||(fe={...fe,allowedCharacters:be.allowedCharacters},ke=!0)),be.allowedLocales&&fe&&(k.equals(fe.allowedLocales,be.allowedLocales)||(fe={...fe,allowedLocales:be.allowedLocales},ke=!0));const Re=super.applyUpdate(fe,be);return ke?new o(Re.newValue,!0):Re}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{nonBasicASCII:pe(be.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:a(be.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:a(be.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:pe(be.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:pe(be.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(fe.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(fe.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(fe,be){if(typeof fe!="object"||!fe)return be;const ke={};for(const[Re,Ve]of Object.entries(fe))Ve===!0&&(ke[Re]=!0);return ke}}class ae extends b{constructor(){const fe={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",fe,{"editor.inlineSuggest.enabled":{type:"boolean",default:fe.enabled,description:p.localize(117,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:fe.showToolbar,enum:["always","onHover","never"],enumDescriptions:[p.localize(118,null),p.localize(119,null),p.localize(120,null)],description:p.localize(121,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:fe.suppressSuggestions,description:p.localize(122,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),mode:s(be.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:s(be.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:a(be.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:a(be.keepOnBlur,this.defaultValue.keepOnBlur)}}}class ce extends b{constructor(){const fe={enabled:E.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:E.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",fe,{"editor.bracketPairColorization.enabled":{type:"boolean",default:fe.enabled,markdownDescription:p.localize(123,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:fe.independentColorPoolPerBracketType,description:p.localize(124,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:a(be.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class ge extends b{constructor(){const fe={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",fe,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p.localize(125,null),p.localize(126,null),p.localize(127,null)],default:fe.bracketPairs,description:p.localize(128,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p.localize(129,null),p.localize(130,null),p.localize(131,null)],default:fe.bracketPairsHorizontal,description:p.localize(132,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:fe.highlightActiveBracketPair,description:p.localize(133,null)},"editor.guides.indentation":{type:"boolean",default:fe.indentation,description:p.localize(134,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[p.localize(135,null),p.localize(136,null),p.localize(137,null)],default:fe.highlightActiveIndentation,description:p.localize(138,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{bracketPairs:pe(be.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:pe(be.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:a(be.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:a(be.indentation,this.defaultValue.indentation),highlightActiveIndentation:pe(be.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function pe(Ne,fe,be){const ke=be.indexOf(Ne);return ke===-1?fe:be[ke]}class me extends b{constructor(){const fe={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",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(117,"suggest",fe,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p.localize(139,null),p.localize(140,null)],default:fe.insertMode,description:p.localize(141,null)},"editor.suggest.filterGraceful":{type:"boolean",default:fe.filterGraceful,description:p.localize(142,null)},"editor.suggest.localityBonus":{type:"boolean",default:fe.localityBonus,description:p.localize(143,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:fe.shareSuggestSelections,markdownDescription:p.localize(144,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[p.localize(145,null),p.localize(146,null),p.localize(147,null),p.localize(148,null)],default:fe.selectionMode,markdownDescription:p.localize(149,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:fe.snippetsPreventQuickSuggestions,description:p.localize(150,null)},"editor.suggest.showIcons":{type:"boolean",default:fe.showIcons,description:p.localize(151,null)},"editor.suggest.showStatusBar":{type:"boolean",default:fe.showStatusBar,description:p.localize(152,null)},"editor.suggest.preview":{type:"boolean",default:fe.preview,description:p.localize(153,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:fe.showInlineDetails,description:p.localize(154,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p.localize(155,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p.localize(156,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p.localize(157,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p.localize(158,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p.localize(159,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p.localize(160,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:p.localize(161,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p.localize(162,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p.localize(163,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p.localize(164,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p.localize(165,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p.localize(166,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p.localize(167,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p.localize(168,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p.localize(169,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p.localize(170,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p.localize(171,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p.localize(172,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p.localize(173,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p.localize(174,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p.localize(175,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p.localize(176,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p.localize(177,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p.localize(178,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p.localize(179,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p.localize(180,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p.localize(181,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p.localize(182,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p.localize(183,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p.localize(184,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p.localize(185,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p.localize(186,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{insertMode:s(be.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:a(be.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:a(be.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:a(be.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:a(be.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:s(be.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:a(be.showIcons,this.defaultValue.showIcons),showStatusBar:a(be.showStatusBar,this.defaultValue.showStatusBar),preview:a(be.preview,this.defaultValue.preview),previewMode:s(be.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:a(be.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:a(be.showMethods,this.defaultValue.showMethods),showFunctions:a(be.showFunctions,this.defaultValue.showFunctions),showConstructors:a(be.showConstructors,this.defaultValue.showConstructors),showDeprecated:a(be.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:a(be.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:a(be.showFields,this.defaultValue.showFields),showVariables:a(be.showVariables,this.defaultValue.showVariables),showClasses:a(be.showClasses,this.defaultValue.showClasses),showStructs:a(be.showStructs,this.defaultValue.showStructs),showInterfaces:a(be.showInterfaces,this.defaultValue.showInterfaces),showModules:a(be.showModules,this.defaultValue.showModules),showProperties:a(be.showProperties,this.defaultValue.showProperties),showEvents:a(be.showEvents,this.defaultValue.showEvents),showOperators:a(be.showOperators,this.defaultValue.showOperators),showUnits:a(be.showUnits,this.defaultValue.showUnits),showValues:a(be.showValues,this.defaultValue.showValues),showConstants:a(be.showConstants,this.defaultValue.showConstants),showEnums:a(be.showEnums,this.defaultValue.showEnums),showEnumMembers:a(be.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:a(be.showKeywords,this.defaultValue.showKeywords),showWords:a(be.showWords,this.defaultValue.showWords),showColors:a(be.showColors,this.defaultValue.showColors),showFiles:a(be.showFiles,this.defaultValue.showFiles),showReferences:a(be.showReferences,this.defaultValue.showReferences),showFolders:a(be.showFolders,this.defaultValue.showFolders),showTypeParameters:a(be.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:a(be.showSnippets,this.defaultValue.showSnippets),showUsers:a(be.showUsers,this.defaultValue.showUsers),showIssues:a(be.showIssues,this.defaultValue.showIssues)}}}class ve extends b{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p.localize(187,null),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:p.localize(188,null),default:!0,type:"boolean"}})}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:a(fe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:a(fe.selectSubwords,this.defaultValue.selectSubwords)}}}class Ce extends b{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[p.localize(189,null),p.localize(190,null),p.localize(191,null),p.localize(192,null)],description:p.localize(193,null),default:"same"}})}validate(fe){switch(fe){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(fe,be,ke){return be.get(2)===2?0:ke}}class Se extends n{constructor(){super(144)}compute(fe,be,ke){const Re=be.get(143);return{isDominatedByLongLines:fe.isDominatedByLongLines,isWordWrapMinified:Re.isWordWrapMinified,isViewportWrapping:Re.isViewportWrapping,wrappingColumn:Re.wrappingColumn}}}class _e extends b{constructor(){const fe={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",fe,{"editor.dropIntoEditor.enabled":{type:"boolean",default:fe.enabled,markdownDescription:p.localize(194,null)},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:p.localize(195,null),enum:["afterDrop","never"],enumDescriptions:[p.localize(196,null),p.localize(197,null)],default:"afterDrop"}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),showDropSelector:s(be.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Te extends b{constructor(){const fe={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",fe,{"editor.pasteAs.enabled":{type:"boolean",default:fe.enabled,markdownDescription:p.localize(198,null)},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:p.localize(199,null),enum:["afterPaste","never"],enumDescriptions:[p.localize(200,null),p.localize(201,null)],default:"afterPaste"}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:a(be.enabled,this.defaultValue.enabled),showPasteSelector:s(be.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const Me="Consolas, 'Courier New', monospace",Pe="Menlo, Monaco, 'Courier New', monospace",Be="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:y.isMacintosh?Pe:y.isLinux?Be:Me,fontWeight:"normal",fontSize:y.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function Le(Ne){return e.editorOptionsRegistry[Ne.id]=Ne,Ne}e.EditorOptions={acceptSuggestionOnCommitCharacter:Le(new u(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p.localize(202,null)})),acceptSuggestionOnEnter:Le(new g(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p.localize(203,null),""],markdownDescription:p.localize(204,null)})),accessibilitySupport:Le(new C),accessibilityPageSize:Le(new c(3,"accessibilityPageSize",10,1,1073741824,{description:p.localize(205,null),tags:["accessibility"]})),ariaLabel:Le(new l(4,"ariaLabel",p.localize(206,null))),ariaRequired:Le(new u(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:Le(new u(8,"screenReaderAnnounceInlineSuggestion",!0,{description:p.localize(207,null),tags:["accessibility"]})),autoClosingBrackets:Le(new g(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(208,null),p.localize(209,null),""],description:p.localize(210,null)})),autoClosingComments:Le(new g(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(211,null),p.localize(212,null),""],description:p.localize(213,null)})),autoClosingDelete:Le(new g(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p.localize(214,null),""],description:p.localize(215,null)})),autoClosingOvertype:Le(new g(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p.localize(216,null),""],description:p.localize(217,null)})),autoClosingQuotes:Le(new g(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(218,null),p.localize(219,null),""],description:p.localize(220,null)})),autoIndent:Le(new h(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],m,{enumDescriptions:[p.localize(221,null),p.localize(222,null),p.localize(223,null),p.localize(224,null),p.localize(225,null)],description:p.localize(226,null)})),automaticLayout:Le(new u(13,"automaticLayout",!1)),autoSurround:Le(new g(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p.localize(227,null),p.localize(228,null),p.localize(229,null),""],description:p.localize(230,null)})),bracketPairColorization:Le(new ce),bracketPairGuides:Le(new ge),stickyTabStops:Le(new u(115,"stickyTabStops",!1,{description:p.localize(231,null)})),codeLens:Le(new u(17,"codeLens",!0,{description:p.localize(232,null)})),codeLensFontFamily:Le(new l(18,"codeLensFontFamily","",{description:p.localize(233,null)})),codeLensFontSize:Le(new c(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p.localize(234,null)})),colorDecorators:Le(new u(20,"colorDecorators",!0,{description:p.localize(235,null)})),colorDecoratorActivatedOn:Le(new g(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[p.localize(236,null),p.localize(237,null),p.localize(238,null)],description:p.localize(239,null)})),colorDecoratorsLimit:Le(new c(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:p.localize(240,null)})),columnSelection:Le(new u(22,"columnSelection",!1,{description:p.localize(241,null)})),comments:Le(new w),contextmenu:Le(new u(24,"contextmenu",!0)),copyWithSyntaxHighlighting:Le(new u(25,"copyWithSyntaxHighlighting",!0,{description:p.localize(242,null)})),cursorBlinking:Le(new h(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],D,{description:p.localize(243,null)})),cursorSmoothCaretAnimation:Le(new g(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[p.localize(244,null),p.localize(245,null),p.localize(246,null)],description:p.localize(247,null)})),cursorStyle:Le(new h(28,"cursorStyle",I.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],M,{description:p.localize(248,null)})),cursorSurroundingLines:Le(new c(29,"cursorSurroundingLines",0,0,1073741824,{description:p.localize(249,null)})),cursorSurroundingLinesStyle:Le(new g(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p.localize(250,null),p.localize(251,null)],markdownDescription:p.localize(252,null)})),cursorWidth:Le(new c(31,"cursorWidth",0,0,1073741824,{markdownDescription:p.localize(253,null)})),disableLayerHinting:Le(new u(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:Le(new u(33,"disableMonospaceOptimizations",!1)),domReadOnly:Le(new u(34,"domReadOnly",!1)),dragAndDrop:Le(new u(35,"dragAndDrop",!0,{description:p.localize(254,null)})),emptySelectionClipboard:Le(new O),dropIntoEditor:Le(new _e),stickyScroll:Le(new le),experimentalWhitespaceRendering:Le(new g(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[p.localize(255,null),p.localize(256,null),p.localize(257,null)],description:p.localize(258,null)})),extraEditorClassName:Le(new l(39,"extraEditorClassName","")),fastScrollSensitivity:Le(new r(40,"fastScrollSensitivity",5,Ne=>Ne<=0?5:Ne,{markdownDescription:p.localize(259,null)})),find:Le(new T),fixedOverflowWidgets:Le(new u(42,"fixedOverflowWidgets",!1)),folding:Le(new u(43,"folding",!0,{description:p.localize(260,null)})),foldingStrategy:Le(new g(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p.localize(261,null),p.localize(262,null)],description:p.localize(263,null)})),foldingHighlight:Le(new u(45,"foldingHighlight",!0,{description:p.localize(264,null)})),foldingImportsByDefault:Le(new u(46,"foldingImportsByDefault",!1,{description:p.localize(265,null)})),foldingMaximumRegions:Le(new c(47,"foldingMaximumRegions",5e3,10,65e3,{description:p.localize(266,null)})),unfoldOnClickAfterEndOfLine:Le(new u(48,"unfoldOnClickAfterEndOfLine",!1,{description:p.localize(267,null)})),fontFamily:Le(new l(49,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:p.localize(268,null)})),fontInfo:Le(new x),fontLigatures2:Le(new N),fontSize:Le(new R),fontWeight:Le(new B),fontVariations:Le(new P),formatOnPaste:Le(new u(55,"formatOnPaste",!1,{description:p.localize(269,null)})),formatOnType:Le(new u(56,"formatOnType",!1,{description:p.localize(270,null)})),glyphMargin:Le(new u(57,"glyphMargin",!0,{description:p.localize(271,null)})),gotoLocation:Le(new W),hideCursorInOverviewRuler:Le(new u(59,"hideCursorInOverviewRuler",!1,{description:p.localize(272,null)})),hover:Le(new V),inDiffEditor:Le(new u(61,"inDiffEditor",!1)),letterSpacing:Le(new r(63,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,Ne=>r.clamp(Ne,-5,20),{description:p.localize(273,null)})),lightbulb:Le(new J),lineDecorationsWidth:Le(new $),lineHeight:Le(new te),lineNumbers:Le(new oe),lineNumbersMinChars:Le(new c(68,"lineNumbersMinChars",5,1,300)),linkedEditing:Le(new u(69,"linkedEditing",!1,{description:p.localize(274,null)})),links:Le(new u(70,"links",!0,{description:p.localize(275,null)})),matchBrackets:Le(new g(71,"matchBrackets","always",["always","near","never"],{description:p.localize(276,null)})),minimap:Le(new G),mouseStyle:Le(new g(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Le(new r(74,"mouseWheelScrollSensitivity",1,Ne=>Ne===0?1:Ne,{markdownDescription:p.localize(277,null)})),mouseWheelZoom:Le(new u(75,"mouseWheelZoom",!1,{markdownDescription:p.localize(278,null)})),multiCursorMergeOverlapping:Le(new u(76,"multiCursorMergeOverlapping",!0,{description:p.localize(279,null)})),multiCursorModifier:Le(new h(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],de,{markdownEnumDescriptions:[p.localize(280,null),p.localize(281,null)],markdownDescription:p.localize(282,null)})),multiCursorPaste:Le(new g(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p.localize(283,null),p.localize(284,null)],markdownDescription:p.localize(285,null)})),multiCursorLimit:Le(new c(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:p.localize(286,null)})),occurrencesHighlight:Le(new g(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[p.localize(287,null),p.localize(288,null),p.localize(289,null)],markdownDescription:p.localize(290,null)})),overviewRulerBorder:Le(new u(81,"overviewRulerBorder",!0,{description:p.localize(291,null)})),overviewRulerLanes:Le(new c(82,"overviewRulerLanes",3,0,3)),padding:Le(new ue),pasteAs:Le(new Te),parameterHints:Le(new X),peekWidgetDefaultFocus:Le(new g(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p.localize(292,null),p.localize(293,null)],description:p.localize(294,null)})),definitionLinkOpensInPeek:Le(new u(87,"definitionLinkOpensInPeek",!1,{description:p.localize(295,null)})),quickSuggestions:Le(new re),quickSuggestionsDelay:Le(new c(89,"quickSuggestionsDelay",10,0,1073741824,{description:p.localize(296,null)})),readOnly:Le(new u(90,"readOnly",!1)),readOnlyMessage:Le(new H),renameOnType:Le(new u(92,"renameOnType",!1,{description:p.localize(297,null),markdownDeprecationMessage:p.localize(298,null)})),renderControlCharacters:Le(new u(93,"renderControlCharacters",!0,{description:p.localize(299,null),restricted:!0})),renderFinalNewline:Le(new g(94,"renderFinalNewline",y.isLinux?"dimmed":"on",["off","on","dimmed"],{description:p.localize(300,null)})),renderLineHighlight:Le(new g(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p.localize(301,null)],description:p.localize(302,null)})),renderLineHighlightOnlyWhenFocus:Le(new u(96,"renderLineHighlightOnlyWhenFocus",!1,{description:p.localize(303,null)})),renderValidationDecorations:Le(new g(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Le(new g(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p.localize(304,null),p.localize(305,null),p.localize(306,null),""],description:p.localize(307,null)})),revealHorizontalRightPadding:Le(new c(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:Le(new u(100,"roundedSelection",!0,{description:p.localize(308,null)})),rulers:Le(new K),scrollbar:Le(new se),scrollBeyondLastColumn:Le(new c(103,"scrollBeyondLastColumn",4,0,1073741824,{description:p.localize(309,null)})),scrollBeyondLastLine:Le(new u(104,"scrollBeyondLastLine",!0,{description:p.localize(310,null)})),scrollPredominantAxis:Le(new u(105,"scrollPredominantAxis",!0,{description:p.localize(311,null)})),selectionClipboard:Le(new u(106,"selectionClipboard",!0,{description:p.localize(312,null),included:y.isLinux})),selectionHighlight:Le(new u(107,"selectionHighlight",!0,{description:p.localize(313,null)})),selectOnLineNumbers:Le(new u(108,"selectOnLineNumbers",!0)),showFoldingControls:Le(new g(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p.localize(314,null),p.localize(315,null),p.localize(316,null)],description:p.localize(317,null)})),showUnused:Le(new u(110,"showUnused",!0,{description:p.localize(318,null)})),showDeprecated:Le(new u(138,"showDeprecated",!0,{description:p.localize(319,null)})),inlayHints:Le(new ee),snippetSuggestions:Le(new g(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p.localize(320,null),p.localize(321,null),p.localize(322,null),p.localize(323,null)],description:p.localize(324,null)})),smartSelect:Le(new ve),smoothScrolling:Le(new u(113,"smoothScrolling",!1,{description:p.localize(325,null)})),stopRenderingLineAfter:Le(new c(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Le(new me),inlineSuggest:Le(new ae),inlineCompletionsAccessibilityVerbose:Le(new u(147,"inlineCompletionsAccessibilityVerbose",!1,{description:p.localize(326,null)})),suggestFontSize:Le(new c(118,"suggestFontSize",0,0,1e3,{markdownDescription:p.localize(327,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:Le(new c(119,"suggestLineHeight",0,0,1e3,{markdownDescription:p.localize(328,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:Le(new u(120,"suggestOnTriggerCharacters",!0,{description:p.localize(329,null)})),suggestSelection:Le(new g(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p.localize(330,null),p.localize(331,null),p.localize(332,null)],description:p.localize(333,null)})),tabCompletion:Le(new g(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p.localize(334,null),p.localize(335,null),p.localize(336,null)],description:p.localize(337,null)})),tabIndex:Le(new c(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:Le(new q),unusualLineTerminators:Le(new g(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p.localize(338,null),p.localize(339,null),p.localize(340,null)],description:p.localize(341,null)})),useShadowDOM:Le(new u(126,"useShadowDOM",!0)),useTabStops:Le(new u(127,"useTabStops",!0,{description:p.localize(342,null)})),wordBreak:Le(new g(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[p.localize(343,null),p.localize(344,null)],description:p.localize(345,null)})),wordSeparators:Le(new l(129,"wordSeparators",_.USUAL_WORD_SEPARATORS,{description:p.localize(346,null)})),wordWrap:Le(new g(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p.localize(347,null),p.localize(348,null),p.localize(349,null),p.localize(350,null)],description:p.localize(351,null)})),wordWrapBreakAfterCharacters:Le(new l(131,"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:Le(new l(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Le(new c(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:p.localize(352,null)})),wordWrapOverride1:Le(new g(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Le(new g(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:Le(new A),defaultColorDecorators:Le(new u(145,"defaultColorDecorators",!1,{markdownDescription:p.localize(353,null)})),pixelRatio:Le(new Z),tabFocusMode:Le(new u(142,"tabFocusMode",!1,{markdownDescription:p.localize(354,null)})),layoutInfo:Le(new U),wrappingInfo:Le(new Se),wrappingIndent:Le(new Ce),wrappingStrategy:Le(new F)}}),define(ie[629],ne([1,0,7,40,12,72,36,11,5,200]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class b{constructor(n,t,a,u,f,c,d){this.top=n,this.left=t,this.paddingLeft=a,this.width=u,this.height=f,this.textContent=c,this.textContentClassName=d}}class o{constructor(n){this._context=n;const t=this._context.configuration.options,a=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,k.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${v.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,E.applyFontInfo)(this._domNode,a),this._domNode.setDisplay("none"),this._position=new p.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(n){const t=this._context.configuration.options,a=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,E.applyFontInfo)(this._domNode,a),!0}onCursorPositionChanged(n,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=n,!0}_getGraphemeAwarePosition(){const{lineNumber:n,column:t}=this._position,a=this._context.viewModel.getLineContent(n),[u,f]=y.getCharContainingOffset(a,t-1);return[new p.Position(n,u+1),a.substring(u,f)]}_prepareRender(n){let t="",a="";const[u,f]=this._getGraphemeAwarePosition();if(this._cursorStyle===_.TextEditorCursorStyle.Line||this._cursorStyle===_.TextEditorCursorStyle.LineThin){const h=n.visibleRangeForPosition(u);if(!h||h.outsideRenderedLine)return null;const m=L.getWindow(this._domNode.domNode);let C;this._cursorStyle===_.TextEditorCursorStyle.Line?(C=L.computeScreenAwareSize(m,this._lineCursorWidth>0?this._lineCursorWidth:2),C>2&&(t=f,a=this._getTokenClassName(u))):C=L.computeScreenAwareSize(m,1);let w=h.left,D=0;C>=2&&w>=1&&(D=1,w-=D);const I=n.getVerticalOffsetForLineNumber(u.lineNumber)-n.bigNumbersDelta;return new b(I,w,D,C,this._lineHeight,t,a)}const c=n.linesVisibleRangesForRange(new S.Range(u.lineNumber,u.column,u.lineNumber,u.column+f.length),!1);if(!c||c.length===0)return null;const d=c[0];if(d.outsideRenderedLine||d.ranges.length===0)return null;const r=d.ranges[0],l=f===" "?this._typicalHalfwidthCharacterWidth:r.width<1?this._typicalHalfwidthCharacterWidth:r.width;this._cursorStyle===_.TextEditorCursorStyle.Block&&(t=f,a=this._getTokenClassName(u));let s=n.getVerticalOffsetForLineNumber(u.lineNumber)-n.bigNumbersDelta,g=this._lineHeight;return(this._cursorStyle===_.TextEditorCursorStyle.Underline||this._cursorStyle===_.TextEditorCursorStyle.UnderlineThin)&&(s+=this._lineHeight-2,g=2),new b(s,r.left,0,l,g,t,a)}_getTokenClassName(n){const t=this._context.viewModel.getViewLineData(n.lineNumber),a=t.tokens.findTokenIndexAtOffset(n.column-1);return t.tokens.getClassName(a)}prepareRender(n){this._renderData=this._prepareRender(n)}render(n){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${v.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=o}),define(ie[630],ne([1,0,35,275,36]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorOptions=void 0;class E{get editorOptions(){return this._options}constructor(S){this._diffEditorWidth=(0,L.observableValue)(this,0),this.couldShowInlineViewBecauseOfSize=(0,L.derived)(this,b=>this._options.read(b).renderSideBySide&&this._diffEditorWidth.read(b)<=this._options.read(b).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=(0,L.derived)(this,b=>this._options.read(b).renderOverviewRuler),this.renderSideBySide=(0,L.derived)(this,b=>this._options.read(b).renderSideBySide&&!(this._options.read(b).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(b))),this.readOnly=(0,L.derived)(this,b=>this._options.read(b).readOnly),this.shouldRenderRevertArrows=(0,L.derived)(this,b=>!(!this._options.read(b).renderMarginRevertIcon||!this.renderSideBySide.read(b)||this.readOnly.read(b))),this.renderIndicators=(0,L.derived)(this,b=>this._options.read(b).renderIndicators),this.enableSplitViewResizing=(0,L.derived)(this,b=>this._options.read(b).enableSplitViewResizing),this.splitViewDefaultRatio=(0,L.derived)(this,b=>this._options.read(b).splitViewDefaultRatio),this.ignoreTrimWhitespace=(0,L.derived)(this,b=>this._options.read(b).ignoreTrimWhitespace),this.maxComputationTimeMs=(0,L.derived)(this,b=>this._options.read(b).maxComputationTime),this.showMoves=(0,L.derived)(this,b=>this._options.read(b).experimental.showMoves&&this.renderSideBySide.read(b)),this.isInEmbeddedEditor=(0,L.derived)(this,b=>this._options.read(b).isInEmbeddedEditor),this.diffWordWrap=(0,L.derived)(this,b=>this._options.read(b).diffWordWrap),this.originalEditable=(0,L.derived)(this,b=>this._options.read(b).originalEditable),this.diffCodeLens=(0,L.derived)(this,b=>this._options.read(b).diffCodeLens),this.accessibilityVerbose=(0,L.derived)(this,b=>this._options.read(b).accessibilityVerbose),this.diffAlgorithm=(0,L.derived)(this,b=>this._options.read(b).diffAlgorithm),this.showEmptyDecorations=(0,L.derived)(this,b=>this._options.read(b).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=(0,L.derived)(this,b=>this._options.read(b).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=(0,L.derived)(this,b=>this._options.read(b).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=(0,L.derived)(this,b=>this._options.read(b).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=(0,L.derived)(this,b=>this._options.read(b).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=(0,L.derived)(this,b=>this._options.read(b).hideUnchangedRegions.minimumLineCount);const v={...S,..._(S,k.diffEditorDefaultOptions)};this._options=(0,L.observableValue)(this,v)}updateOptions(S){const v=_(S,this._options.get()),b={...this._options.get(),...S,...v};this._options.set(b,void 0,{changedOptions:S})}setWidth(S){this._diffEditorWidth.set(S,void 0)}}e.DiffEditorOptions=E;function _(p,S){var v,b,o,i,n,t,a,u;return{enableSplitViewResizing:(0,y.boolean)(p.enableSplitViewResizing,S.enableSplitViewResizing),splitViewDefaultRatio:(0,y.clampedFloat)(p.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,y.boolean)(p.renderSideBySide,S.renderSideBySide),renderMarginRevertIcon:(0,y.boolean)(p.renderMarginRevertIcon,S.renderMarginRevertIcon),maxComputationTime:(0,y.clampedInt)(p.maxComputationTime,S.maxComputationTime,0,1073741824),maxFileSize:(0,y.clampedInt)(p.maxFileSize,S.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,y.boolean)(p.ignoreTrimWhitespace,S.ignoreTrimWhitespace),renderIndicators:(0,y.boolean)(p.renderIndicators,S.renderIndicators),originalEditable:(0,y.boolean)(p.originalEditable,S.originalEditable),diffCodeLens:(0,y.boolean)(p.diffCodeLens,S.diffCodeLens),renderOverviewRuler:(0,y.boolean)(p.renderOverviewRuler,S.renderOverviewRuler),diffWordWrap:(0,y.stringSet)(p.diffWordWrap,S.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,y.stringSet)(p.diffAlgorithm,S.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,y.boolean)(p.accessibilityVerbose,S.accessibilityVerbose),experimental:{showMoves:(0,y.boolean)((v=p.experimental)===null||v===void 0?void 0:v.showMoves,S.experimental.showMoves),showEmptyDecorations:(0,y.boolean)((b=p.experimental)===null||b===void 0?void 0:b.showEmptyDecorations,S.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,y.boolean)((i=(o=p.hideUnchangedRegions)===null||o===void 0?void 0:o.enabled)!==null&&i!==void 0?i:(n=p.experimental)===null||n===void 0?void 0:n.collapseUnchangedRegions,S.hideUnchangedRegions.enabled),contextLineCount:(0,y.clampedInt)((t=p.hideUnchangedRegions)===null||t===void 0?void 0:t.contextLineCount,S.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,y.clampedInt)((a=p.hideUnchangedRegions)===null||a===void 0?void 0:a.minimumLineCount,S.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,y.clampedInt)((u=p.hideUnchangedRegions)===null||u===void 0?void 0:u.revealLineCount,S.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,y.boolean)(p.isInEmbeddedEditor,S.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,y.boolean)(p.onlyShowAccessibleDiffViewer,S.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,y.clampedInt)(p.renderSideBySideInlineBreakpoint,S.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,y.boolean)(p.useInlineViewWhenSpaceIsLimited,S.useInlineViewWhenSpaceIsLimited)}}}),define(ie[235],ne([1,0,17,36,147]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const E=L.isMacintosh?1.5:1.35,_=8;class p{static createFromValidatedSettings(b,o,i){const n=b.get(49),t=b.get(53),a=b.get(52),u=b.get(51),f=b.get(54),c=b.get(66),d=b.get(63);return p._create(n,t,a,u,f,c,d,o,i)}static _create(b,o,i,n,t,a,u,f,c){a===0?a=E*i:a<_&&(a=a*i),a=Math.round(a),a<_&&(a=_);const d=1+(c?0:y.EditorZoom.getZoomLevel()*.1);return i*=d,a*=d,t===k.EditorFontVariations.TRANSLATE&&(o==="normal"||o==="bold"?t=k.EditorFontVariations.OFF:(t=`'wght' ${parseInt(o,10)}`,o="normal")),new p({pixelRatio:f,fontFamily:b,fontWeight:o,fontSize:i,fontFeatureSettings:n,fontVariationSettings:t,lineHeight:a,letterSpacing:u})}constructor(b){this._bareFontInfoBrand=void 0,this.pixelRatio=b.pixelRatio,this.fontFamily=String(b.fontFamily),this.fontWeight=String(b.fontWeight),this.fontSize=b.fontSize,this.fontFeatureSettings=b.fontFeatureSettings,this.fontVariationSettings=b.fontVariationSettings,this.lineHeight=b.lineHeight|0,this.letterSpacing=b.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const b=k.EDITOR_FONT_DEFAULTS.fontFamily,o=p._wrapInQuotes(this.fontFamily);return b&&this.fontFamily!==b?`${o}, ${b}`:o}static _wrapInQuotes(b){return/[,"']/.test(b)?b:/[+ ]/.test(b)?`"${b}"`:b}}e.BareFontInfo=p,e.SERIALIZED_FONT_INFO_VERSION=2;class S extends p{constructor(b,o){super(b),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=o,this.isMonospace=b.isMonospace,this.typicalHalfwidthCharacterWidth=b.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=b.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=b.canUseHalfwidthRightwardsArrow,this.spaceWidth=b.spaceWidth,this.middotWidth=b.middotWidth,this.wsmiddotWidth=b.wsmiddotWidth,this.maxDigitWidth=b.maxDigitWidth}equals(b){return this.fontFamily===b.fontFamily&&this.fontWeight===b.fontWeight&&this.fontSize===b.fontSize&&this.fontFeatureSettings===b.fontFeatureSettings&&this.fontVariationSettings===b.fontVariationSettings&&this.lineHeight===b.lineHeight&&this.letterSpacing===b.letterSpacing&&this.typicalHalfwidthCharacterWidth===b.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===b.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===b.canUseHalfwidthRightwardsArrow&&this.spaceWidth===b.spaceWidth&&this.middotWidth===b.middotWidth&&this.wsmiddotWidth===b.wsmiddotWidth&&this.maxDigitWidth===b.maxDigitWidth}}e.FontInfo=S}),define(ie[332],ne([1,0,54,48,6,2,485,36,235]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=e.FontMeasurementsImpl=void 0;class v extends E.Disposable{constructor(){super(),this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new b,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new b,this._onDidChange.fire()}_writeToCache(i,n){this._cache.put(i,n),!n.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=k.mainWindow.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const i=this._cache.getValues();let n=!1;for(const t of i)t.isTrusted||(n=!0,this._cache.remove(t));n&&this._onDidChange.fire()}readFontInfo(i){if(!this._cache.has(i)){let n=this._actualReadFontInfo(i);(n.typicalHalfwidthCharacterWidth<=2||n.typicalFullwidthCharacterWidth<=2||n.spaceWidth<=2||n.maxDigitWidth<=2)&&(n=new S.FontInfo({pixelRatio:L.PixelRatio.value,fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,fontFeatureSettings:n.fontFeatureSettings,fontVariationSettings:n.fontVariationSettings,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,isMonospace:n.isMonospace,typicalHalfwidthCharacterWidth:Math.max(n.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(n.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:n.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(n.spaceWidth,5),middotWidth:Math.max(n.middotWidth,5),wsmiddotWidth:Math.max(n.wsmiddotWidth,5),maxDigitWidth:Math.max(n.maxDigitWidth,5)},!1)),this._writeToCache(i,n)}return this._cache.get(i)}_createRequest(i,n,t,a){const u=new _.CharWidthRequest(i,n);return t.push(u),a?.push(u),u}_actualReadFontInfo(i){const n=[],t=[],a=this._createRequest("n",0,n,t),u=this._createRequest("\uFF4D",0,n,null),f=this._createRequest(" ",0,n,t),c=this._createRequest("0",0,n,t),d=this._createRequest("1",0,n,t),r=this._createRequest("2",0,n,t),l=this._createRequest("3",0,n,t),s=this._createRequest("4",0,n,t),g=this._createRequest("5",0,n,t),h=this._createRequest("6",0,n,t),m=this._createRequest("7",0,n,t),C=this._createRequest("8",0,n,t),w=this._createRequest("9",0,n,t),D=this._createRequest("\u2192",0,n,t),I=this._createRequest("\uFFEB",0,n,null),M=this._createRequest("\xB7",0,n,t),A=this._createRequest(String.fromCharCode(11825),0,n,null),O="|/-_ilm%";for(let R=0,B=O.length;R.001){N=!1;break}}let x=!0;return N&&I.width!==P&&(x=!1),I.width>D.width&&(x=!1),new S.FontInfo({pixelRatio:L.PixelRatio.value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:N,typicalHalfwidthCharacterWidth:a.width,typicalFullwidthCharacterWidth:u.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:f.width,middotWidth:M.width,wsmiddotWidth:A.width,maxDigitWidth:T},!0)}}e.FontMeasurementsImpl=v;class b{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(i){const n=i.getId();return!!this._values[n]}get(i){const n=i.getId();return this._values[n]}put(i,n){const t=i.getId();this._keys[t]=i,this._values[t]=n}remove(i){const n=i.getId();delete this._keys[n],delete this._values[n]}getValues(){return Object.keys(this._keys).map(i=>this._values[i])}}e.FontMeasurements=new v}),define(ie[333],ne([1,0,11,5,85,36]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class _{constructor(i,n,t,a,u){this.editorId=i,this.model=n,this.configuration=t,this._linesCollection=a,this._coordinatesConverter=u,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(i){const n=i.id;let t=this._decorationsCache[n];if(!t){const a=i.range,u=i.options;let f;if(u.isWholeLine){const c=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(a.startLineNumber,1),0,!1,!0),d=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber)),1);f=new k.Range(c.lineNumber,c.column,d.lineNumber,d.column)}else f=this._coordinatesConverter.convertModelRangeToViewRange(a,1);t=new y.ViewModelDecoration(f,u),this._decorationsCache[n]=t}return t}getMinimapDecorationsInRange(i){return this._getDecorationsInRange(i,!0,!1).decorations}getDecorationsViewportData(i){let n=this._cachedModelDecorationsResolver!==null;return n=n&&i.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(i,!1,!1),this._cachedModelDecorationsResolverViewRange=i),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(i,n=!1,t=!1){const a=new k.Range(i,this._linesCollection.getViewLineMinColumn(i),i,this._linesCollection.getViewLineMaxColumn(i));return this._getDecorationsInRange(a,n,t).inlineDecorations[0]}_getDecorationsInRange(i,n,t){const a=this._linesCollection.getDecorationsInRange(i,this.editorId,(0,E.filterValidationDecorations)(this.configuration.options),n,t),u=i.startLineNumber,f=i.endLineNumber,c=[];let d=0;const r=[];for(let l=u;l<=f;l++)r[l-u]=[];for(let l=0,s=a.length;ln===1)}e.isModelDecorationInComment=S;function v(o,i){return b(o,i.range,n=>n===2)}e.isModelDecorationInString=v;function b(o,i,n){for(let t=i.startLineNumber;t<=i.endLineNumber;t++){const a=o.tokenization.getLineTokens(t),u=t===i.startLineNumber,f=t===i.endLineNumber;let c=u?a.findTokenIndexAtOffset(i.startColumn-1):0;for(;ci.endColumn-1);){if(!n(a.getStandardTokenType(c)))return!1;c++}}return!0}}),define(ie[631],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/core/editorColorRegistry",e)}),define(ie[632],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/editorContextKeys",e)}),define(ie[633],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/languages",e)}),define(ie[31],ne([1,0,26,22,5,525,633]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.LazyTokenizationSupport=e.InlayHintKind=e.Command=e.FoldingRangeKind=e.TextEdit=e.SymbolKinds=e.getAriaLabelForSymbol=e.symbolKindNames=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.SelectedSuggestionInfo=e.InlineCompletionTriggerKind=e.CompletionItemKinds=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=void 0;class p{constructor(h,m,C){this.offset=h,this.type=m,this.language=C,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=p;class S{constructor(h,m){this.tokens=h,this.endState=m,this._tokenizationResultBrand=void 0}}e.TokenizationResult=S;class v{constructor(h,m){this.tokens=h,this.endState=m,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=v;var b;(function(g){const h=new Map;h.set(0,L.Codicon.symbolMethod),h.set(1,L.Codicon.symbolFunction),h.set(2,L.Codicon.symbolConstructor),h.set(3,L.Codicon.symbolField),h.set(4,L.Codicon.symbolVariable),h.set(5,L.Codicon.symbolClass),h.set(6,L.Codicon.symbolStruct),h.set(7,L.Codicon.symbolInterface),h.set(8,L.Codicon.symbolModule),h.set(9,L.Codicon.symbolProperty),h.set(10,L.Codicon.symbolEvent),h.set(11,L.Codicon.symbolOperator),h.set(12,L.Codicon.symbolUnit),h.set(13,L.Codicon.symbolValue),h.set(15,L.Codicon.symbolEnum),h.set(14,L.Codicon.symbolConstant),h.set(15,L.Codicon.symbolEnum),h.set(16,L.Codicon.symbolEnumMember),h.set(17,L.Codicon.symbolKeyword),h.set(27,L.Codicon.symbolSnippet),h.set(18,L.Codicon.symbolText),h.set(19,L.Codicon.symbolColor),h.set(20,L.Codicon.symbolFile),h.set(21,L.Codicon.symbolReference),h.set(22,L.Codicon.symbolCustomColor),h.set(23,L.Codicon.symbolFolder),h.set(24,L.Codicon.symbolTypeParameter),h.set(25,L.Codicon.account),h.set(26,L.Codicon.issues);function m(D){let I=h.get(D);return I||(console.info("No codicon found for CompletionItemKind "+D),I=L.Codicon.symbolProperty),I}g.toIcon=m;const C=new Map;C.set("method",0),C.set("function",1),C.set("constructor",2),C.set("field",3),C.set("variable",4),C.set("class",5),C.set("struct",6),C.set("interface",7),C.set("module",8),C.set("property",9),C.set("event",10),C.set("operator",11),C.set("unit",12),C.set("value",13),C.set("constant",14),C.set("enum",15),C.set("enum-member",16),C.set("enumMember",16),C.set("keyword",17),C.set("snippet",27),C.set("text",18),C.set("color",19),C.set("file",20),C.set("reference",21),C.set("customcolor",22),C.set("folder",23),C.set("type-parameter",24),C.set("typeParameter",24),C.set("account",25),C.set("issue",26);function w(D,I){let M=C.get(D);return typeof M>"u"&&!I&&(M=9),M}g.fromString=w})(b||(e.CompletionItemKinds=b={}));var o;(function(g){g[g.Automatic=0]="Automatic",g[g.Explicit=1]="Explicit"})(o||(e.InlineCompletionTriggerKind=o={}));class i{constructor(h,m,C,w){this.range=h,this.text=m,this.completionKind=C,this.isSnippetText=w}equals(h){return y.Range.lift(this.range).equalsRange(h.range)&&this.text===h.text&&this.completionKind===h.completionKind&&this.isSnippetText===h.isSnippetText}}e.SelectedSuggestionInfo=i;var n;(function(g){g[g.Invoke=1]="Invoke",g[g.TriggerCharacter=2]="TriggerCharacter",g[g.ContentChange=3]="ContentChange"})(n||(e.SignatureHelpTriggerKind=n={}));var t;(function(g){g[g.Text=0]="Text",g[g.Read=1]="Read",g[g.Write=2]="Write"})(t||(e.DocumentHighlightKind=t={}));function a(g){return g&&k.URI.isUri(g.uri)&&y.Range.isIRange(g.range)&&(y.Range.isIRange(g.originSelectionRange)||y.Range.isIRange(g.targetSelectionRange))}e.isLocationLink=a,e.symbolKindNames={[17]:(0,_.localize)(0,null),[16]:(0,_.localize)(1,null),[4]:(0,_.localize)(2,null),[13]:(0,_.localize)(3,null),[8]:(0,_.localize)(4,null),[9]:(0,_.localize)(5,null),[21]:(0,_.localize)(6,null),[23]:(0,_.localize)(7,null),[7]:(0,_.localize)(8,null),[0]:(0,_.localize)(9,null),[11]:(0,_.localize)(10,null),[10]:(0,_.localize)(11,null),[19]:(0,_.localize)(12,null),[5]:(0,_.localize)(13,null),[1]:(0,_.localize)(14,null),[2]:(0,_.localize)(15,null),[20]:(0,_.localize)(16,null),[15]:(0,_.localize)(17,null),[18]:(0,_.localize)(18,null),[24]:(0,_.localize)(19,null),[3]:(0,_.localize)(20,null),[6]:(0,_.localize)(21,null),[14]:(0,_.localize)(22,null),[22]:(0,_.localize)(23,null),[25]:(0,_.localize)(24,null),[12]:(0,_.localize)(25,null)};function u(g,h){return(0,_.localize)(26,null,g,e.symbolKindNames[h])}e.getAriaLabelForSymbol=u;var f;(function(g){const h=new Map;h.set(0,L.Codicon.symbolFile),h.set(1,L.Codicon.symbolModule),h.set(2,L.Codicon.symbolNamespace),h.set(3,L.Codicon.symbolPackage),h.set(4,L.Codicon.symbolClass),h.set(5,L.Codicon.symbolMethod),h.set(6,L.Codicon.symbolProperty),h.set(7,L.Codicon.symbolField),h.set(8,L.Codicon.symbolConstructor),h.set(9,L.Codicon.symbolEnum),h.set(10,L.Codicon.symbolInterface),h.set(11,L.Codicon.symbolFunction),h.set(12,L.Codicon.symbolVariable),h.set(13,L.Codicon.symbolConstant),h.set(14,L.Codicon.symbolString),h.set(15,L.Codicon.symbolNumber),h.set(16,L.Codicon.symbolBoolean),h.set(17,L.Codicon.symbolArray),h.set(18,L.Codicon.symbolObject),h.set(19,L.Codicon.symbolKey),h.set(20,L.Codicon.symbolNull),h.set(21,L.Codicon.symbolEnumMember),h.set(22,L.Codicon.symbolStruct),h.set(23,L.Codicon.symbolEvent),h.set(24,L.Codicon.symbolOperator),h.set(25,L.Codicon.symbolTypeParameter);function m(C){let w=h.get(C);return w||(console.info("No codicon found for SymbolKind "+C),w=L.Codicon.symbolProperty),w}g.toIcon=m})(f||(e.SymbolKinds=f={}));class c{}e.TextEdit=c;class d{static fromValue(h){switch(h){case"comment":return d.Comment;case"imports":return d.Imports;case"region":return d.Region}return new d(h)}constructor(h){this.value=h}}e.FoldingRangeKind=d,d.Comment=new d("comment"),d.Imports=new d("imports"),d.Region=new d("region");var r;(function(g){function h(m){return!m||typeof m!="object"?!1:typeof m.id=="string"&&typeof m.title=="string"}g.is=h})(r||(e.Command=r={}));var l;(function(g){g[g.Type=1]="Type",g[g.Parameter=2]="Parameter"})(l||(e.InlayHintKind=l={}));class s{constructor(h){this.createSupport=h,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(h=>{h&&h.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=s,e.TokenizationRegistry=new E.TokenizationRegistry}),define(ie[159],ne([1,0,31]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(E){return this===E}};function k(E,_){return new L.TokenizationResult([new L.Token(0,"",E)],_)}e.nullTokenize=k;function y(E,_){const p=new Uint32Array(2);return p[0]=0,p[1]=(E<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new L.EncodedTokenizationResult(p,_===null?e.NullState:_)}e.nullTokenizeEncoded=y}),define(ie[334],ne([1,0,12,93,31,159]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const _={getInitialState:()=>E.NullState,tokenizeEncoded:(b,o,i)=>(0,E.nullTokenizeEncoded)(0,i)};async function p(b,o,i){if(!i)return v(o,b.languageIdCodec,_);const n=await y.TokenizationRegistry.getOrCreate(i);return v(o,b.languageIdCodec,n||_)}e.tokenizeToString=p;function S(b,o,i,n,t,a,u){let f="
    ",c=n,d=0,r=!0;for(let l=0,s=o.getCount();l0;)u&&r?(h+=" ",r=!1):(h+=" ",r=!0),C--;break}case 60:h+="<",r=!1;break;case 62:h+=">",r=!1;break;case 38:h+="&",r=!1;break;case 0:h+="�",r=!1;break;case 65279:case 8232:case 8233:case 133:h+="\uFFFD",r=!1;break;case 13:h+="​",r=!1;break;case 32:u&&r?(h+=" ",r=!1):(h+=" ",r=!0);break;default:h+=String.fromCharCode(m),r=!1}}if(f+=`${h}`,g>t||c>=t)break}return f+="
    ",f}e.tokenizeLineToHTML=S;function v(b,o,i){let n='
    ';const t=L.splitLines(b);let a=i.getInitialState();for(let u=0,f=t.length;u0&&(n+="
    ");const d=i.tokenizeEncoded(c,!0,a);k.LineTokens.convertToEndOffset(d.tokens,c.length);const l=new k.LineTokens(d.tokens,c,o).inflate();let s=0;for(let g=0,h=l.getCount();g${L.escape(c.substring(s,C))}`,s=C}a=d.endState}return n+="
    ",n}e._tokenizeToString=v}),define(ie[634],ne([1,0,14,9,17,61,126,62,73,159,518,295,93]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBackgroundTokenizer=e.RangePriorityQueueImpl=e.TokenizationStateStore=e.TrackingTokenizationStateStore=e.TokenizerWithStateStoreAndTextModel=e.TokenizerWithStateStore=void 0;class n{constructor(l,s){this.tokenizationSupport=s,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new a(l)}getStartState(l){return this.store.getStartState(l,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}e.TokenizerWithStateStore=n;class t extends n{constructor(l,s,g,h){super(l,s),this._textModel=g,this._languageIdCodec=h}updateTokensUntilLine(l,s){const g=this._textModel.getLanguageId();for(;;){const h=this.getFirstInvalidLine();if(!h||h.lineNumber>s)break;const m=this._textModel.getLineContent(h.lineNumber),C=c(this._languageIdCodec,g,this.tokenizationSupport,m,!0,h.startState);l.add(h.lineNumber,C.tokens),this.store.setEndState(h.lineNumber,C.endState)}}getTokenTypeIfInsertingCharacter(l,s){const g=this.getStartState(l.lineNumber);if(!g)return 0;const h=this._textModel.getLanguageId(),m=this._textModel.getLineContent(l.lineNumber),C=m.substring(0,l.column-1)+s+m.substring(l.column-1),w=c(this._languageIdCodec,h,this.tokenizationSupport,C,!0,g),D=new i.LineTokens(w.tokens,C,this._languageIdCodec);if(D.getCount()===0)return 0;const I=D.findTokenIndexAtOffset(l.column-1);return D.getStandardTokenType(I)}tokenizeLineWithEdit(l,s,g){const h=l.lineNumber,m=l.column,C=this.getStartState(h);if(!C)return null;const w=this._textModel.getLineContent(h),D=w.substring(0,m-1)+g+w.substring(m-1+s),I=this._textModel.getLanguageIdAtPosition(h,0),M=c(this._languageIdCodec,I,this.tokenizationSupport,D,!0,C);return new i.LineTokens(M.tokens,D,this._languageIdCodec)}isCheapToTokenize(l){const s=this.store.getFirstInvalidEndStateLineNumberOrMax();return l1&&w>=1;w--){const D=this._textModel.getLineFirstNonWhitespaceColumn(w);if(D!==0&&D0&&g>0&&(g--,s--),this._lineEndStates.replace(l.startLineNumber,g,s)}}e.TokenizationStateStore=u;class f{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(l){const s=this._ranges.findIndex(g=>g.contains(l));if(s!==-1){const g=this._ranges[s];g.start===l?g.endExclusive===l+1?this._ranges.splice(s,1):this._ranges[s]=new S.OffsetRange(l+1,g.endExclusive):g.endExclusive===l+1?this._ranges[s]=new S.OffsetRange(g.start,l):this._ranges.splice(s,1,new S.OffsetRange(g.start,l),new S.OffsetRange(l+1,g.endExclusive))}}addRange(l){S.OffsetRange.addRange(l,this._ranges)}addRangeAndResize(l,s){let g=0;for(;!(g>=this._ranges.length||l.start<=this._ranges[g].endExclusive);)g++;let h=g;for(;!(h>=this._ranges.length||l.endExclusivel.toString()).join(" + ")}}e.RangePriorityQueueImpl=f;function c(r,l,s,g,h,m){let C=null;if(s)try{C=s.tokenizeEncoded(g,h,m.clone())}catch(w){(0,k.onUnexpectedError)(w)}return C||(C=(0,v.nullTokenizeEncoded)(r.encodeLanguageId(l),m)),i.LineTokens.convertToEndOffset(C.tokens,g.length),C}class d{constructor(l,s){this._tokenizerWithStateStore=l,this._backgroundTokenStore=s,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,L.runWhenGlobalIdle)(l=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(l)}))}_backgroundTokenizeWithDeadline(l){const s=Date.now()+l.timeRemaining(),g=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(s)>=l)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(s.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(l){var s;const g=(s=this._tokenizerWithStateStore)===null||s===void 0?void 0:s.getFirstInvalidLine();return g?(this._tokenizerWithStateStore.updateTokensUntilLine(l,g.lineNumber),g.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(l,s){this._tokenizerWithStateStore.store.invalidateEndStateRange(new p.LineRange(l,s))}}e.DefaultBackgroundTokenizer=d}),define(ie[635],ne([1,0,13,14,9,6,2,126,62,11,149,31,289,634,295,528,530]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class f extends i.TextModelPart{constructor(l,s,g,h,m,C){super(),this._languageService=l,this._languageConfigurationService=s,this._textModel=g,this._bracketPairsTextModelPart=h,this._languageId=m,this._attachedViews=C,this._semanticTokens=new u.SparseTokensStore(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new E.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new E.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new E.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new c(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(w=>{w.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(w=>{this._emitModelTokensChangedEvent(w)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(w=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(l){if(l.isFlush)this._semanticTokens.flush();else if(!l.isEolChange)for(const s of l.changes){const[g,h,m]=(0,p.countEOL)(s.text);this._semanticTokens.acceptEdit(s.range,g,h,m,s.text.length>0?s.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(l)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(l){this.validateLineNumber(l);const s=this.grammarTokens.getLineTokens(l);return this._semanticTokens.addSparseTokens(l,s)}_emitModelTokensChangedEvent(l){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(l),this._onDidChangeTokens.fire(l))}validateLineNumber(l){if(l<1||l>this._textModel.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(l){this.validateLineNumber(l),this.grammarTokens.forceTokenization(l)}isCheapToTokenize(l){return this.validateLineNumber(l),this.grammarTokens.isCheapToTokenize(l)}tokenizeIfCheap(l){this.validateLineNumber(l),this.grammarTokens.tokenizeIfCheap(l)}getTokenTypeIfInsertingCharacter(l,s,g){return this.grammarTokens.getTokenTypeIfInsertingCharacter(l,s,g)}tokenizeLineWithEdit(l,s,g){return this.grammarTokens.tokenizeLineWithEdit(l,s,g)}setSemanticTokens(l,s){this._semanticTokens.set(l,s),this._emitModelTokensChangedEvent({semanticTokensApplied:l!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(l,s){if(this.hasCompleteSemanticTokens())return;const g=this._textModel.validateRange(this._semanticTokens.setPartial(l,s));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:g.startLineNumber,toLineNumber:g.endLineNumber}]})}getWordAtPosition(l){this.assertNotDisposed();const s=this._textModel.validatePosition(l),g=this._textModel.getLineContent(s.lineNumber),h=this.getLineTokens(s.lineNumber),m=h.findTokenIndexAtOffset(s.column-1),[C,w]=f._findLanguageBoundaries(h,m),D=(0,b.getWordAtText)(s.column,this.getLanguageConfiguration(h.getLanguageId(m)).getWordDefinition(),g.substring(C,w),C);if(D&&D.startColumn<=l.column&&l.column<=D.endColumn)return D;if(m>0&&C===s.column-1){const[I,M]=f._findLanguageBoundaries(h,m-1),A=(0,b.getWordAtText)(s.column,this.getLanguageConfiguration(h.getLanguageId(m-1)).getWordDefinition(),g.substring(I,M),I);if(A&&A.startColumn<=l.column&&l.column<=A.endColumn)return A}return null}getLanguageConfiguration(l){return this._languageConfigurationService.getLanguageConfiguration(l)}static _findLanguageBoundaries(l,s){const g=l.getLanguageId(s);let h=0;for(let C=s;C>=0&&l.getLanguageId(C)===g;C--)h=l.getStartOffset(C);let m=l.getLineContent().length;for(let C=s,w=l.getCount();C{const C=this.getLanguageId();m.changedLanguages.indexOf(C)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(h.onDidChangeVisibleRanges(({view:m,state:C})=>{if(C){let w=this._attachedViewStates.get(m);w||(w=new d(()=>this.refreshRanges(w.lineRanges)),this._attachedViewStates.set(m,w)),w.handleStateChange(C)}else this._attachedViewStates.deleteAndDispose(m)}))}resetTokenization(l=!0){var s;this._tokens.flush(),(s=this._debugBackgroundTokens)===null||s===void 0||s.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new n.TrackingTokenizationStateStore(this._textModel.getLineCount())),l&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const g=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const C=o.TokenizationRegistry.get(this.getLanguageId());if(!C)return[null,null];let w;try{w=C.getInitialState()}catch(D){return(0,y.onUnexpectedError)(D),[null,null]}return[C,w]},[h,m]=g();if(h&&m?this._tokenizer=new n.TokenizerWithStateStoreAndTextModel(this._textModel.getLineCount(),h,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const C={setTokens:w=>{this.setTokens(w)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const w=2;this._backgroundTokenizationState=w,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(w,D)=>{var I;if(!this._tokenizer)return;const M=this._tokenizer.store.getFirstInvalidEndStateLineNumber();M!==null&&w>=M&&((I=this._tokenizer)===null||I===void 0||I.store.setEndState(w,D))}};h&&h.createBackgroundTokenizer&&!h.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=h.createBackgroundTokenizer(this._textModel,C)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new n.DefaultBackgroundTokenizer(this._tokenizer,C),this._defaultBackgroundTokenizer.handleChanges()),h?.backgroundTokenizerShouldOnlyVerifyTokens&&h.createBackgroundTokenizer?(this._debugBackgroundTokens=new a.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundStates=new n.TrackingTokenizationStateStore(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=h.createBackgroundTokenizer(this._textModel,{setTokens:w=>{var D;(D=this._debugBackgroundTokens)===null||D===void 0||D.setMultilineTokens(w,this._textModel)},backgroundTokenizationFinished(){},setEndState:(w,D)=>{var I;(I=this._debugBackgroundStates)===null||I===void 0||I.setEndState(w,D)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var l;(l=this._defaultBackgroundTokenizer)===null||l===void 0||l.handleChanges()}handleDidChangeContent(l){var s,g,h;if(l.isFlush)this.resetTokenization(!1);else if(!l.isEolChange){for(const m of l.changes){const[C,w]=(0,p.countEOL)(m.text);this._tokens.acceptEdit(m.range,C,w),(s=this._debugBackgroundTokens)===null||s===void 0||s.acceptEdit(m.range,C,w)}(g=this._debugBackgroundStates)===null||g===void 0||g.acceptChanges(l.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(l.changes),(h=this._defaultBackgroundTokenizer)===null||h===void 0||h.handleChanges()}}setTokens(l){const{changes:s}=this._tokens.setMultilineTokens(l,this._textModel);return s.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:s}),{changes:s}}refreshAllVisibleLineTokens(){const l=S.LineRange.joinMany([...this._attachedViewStates].map(([s,g])=>g.lineRanges));this.refreshRanges(l)}refreshRanges(l){for(const s of l)this.refreshRange(s.startLineNumber,s.endLineNumberExclusive-1)}refreshRange(l,s){var g,h;if(!this._tokenizer)return;l=Math.max(1,Math.min(this._textModel.getLineCount(),l)),s=Math.min(this._textModel.getLineCount(),s);const m=new t.ContiguousMultilineTokensBuilder,{heuristicTokens:C}=this._tokenizer.tokenizeHeuristically(m,l,s),w=this.setTokens(m.finalize());if(C)for(const D of w.changes)(g=this._backgroundTokenizer.value)===null||g===void 0||g.requestTokens(D.fromLineNumber,D.toLineNumber+1);(h=this._defaultBackgroundTokenizer)===null||h===void 0||h.checkFinished()}forceTokenization(l){var s,g;const h=new t.ContiguousMultilineTokensBuilder;(s=this._tokenizer)===null||s===void 0||s.updateTokensUntilLine(h,l),this.setTokens(h.finalize()),(g=this._defaultBackgroundTokenizer)===null||g===void 0||g.checkFinished()}isCheapToTokenize(l){return this._tokenizer?this._tokenizer.isCheapToTokenize(l):!0}tokenizeIfCheap(l){this.isCheapToTokenize(l)&&this.forceTokenization(l)}getLineTokens(l){var s;const g=this._textModel.getLineContent(l),h=this._tokens.getTokens(this._textModel.getLanguageId(),l-1,g);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>l&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>l){const m=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),l-1,g);!h.equals(m)&&(!((s=this._debugBackgroundTokenizer.value)===null||s===void 0)&&s.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(l)}return h}getTokenTypeIfInsertingCharacter(l,s,g){if(!this._tokenizer)return 0;const h=this._textModel.validatePosition(new v.Position(l,s));return this.forceTokenization(h.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(h,g)}tokenizeLineWithEdit(l,s,g){if(!this._tokenizer)return null;const h=this._textModel.validatePosition(l);return this.forceTokenization(h.lineNumber),this._tokenizer.tokenizeLineWithEdit(h,s,g)}get hasTokens(){return this._tokens.hasTokens}}class d extends _.Disposable{get lineRanges(){return this._lineRanges}constructor(l){super(),this._refreshTokens=l,this.runner=this._register(new k.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,L.equals)(this._computedLineRanges,this._lineRanges,(l,s)=>l.equals(s))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(l){this._lineRanges=l.visibleLineRanges,l.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(ie[335],ne([1,0,19,6,65,22,11,5,24,31,211]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class o{static chord(t,a){return(0,y.KeyChord)(t,a)}}e.KeyMod=o,o.CtrlCmd=2048,o.Shift=1024,o.Alt=512,o.WinCtrl=256;function i(){return{editor:void 0,languages:void 0,CancellationTokenSource:L.CancellationTokenSource,Emitter:k.Emitter,KeyCode:b.KeyCode,KeyMod:o,Position:_.Position,Range:p.Range,Selection:S.Selection,SelectionDirection:b.SelectionDirection,MarkerSeverity:b.MarkerSeverity,MarkerTag:b.MarkerTag,Uri:E.URI,Token:v.Token}}e.createMonacoBaseAPI=i}),define(ie[636],ne([1,0,171,22,11,5,522,149,505,511,335,61,293,502,55,504]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class u extends _.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(r){const l=[];for(let s=0;sthis._lines.length)l=this._lines.length,s=this._lines[l-1].length+1,g=!0;else{const h=this._lines[l-1].length+1;s<1?(s=1,g=!0):s>h&&(s=h,g=!0)}return g?{lineNumber:l,column:s}:r}}class f{constructor(r,l){this._host=r,this._models=Object.create(null),this._foreignModuleFactory=l,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(r){return this._models[r]}_getModels(){const r=[];return Object.keys(this._models).forEach(l=>r.push(this._models[l])),r}acceptNewModel(r){this._models[r.url]=new u(k.URI.parse(r.url),r.lines,r.EOL,r.versionId)}acceptModelChanged(r,l){if(!this._models[r])return;this._models[r].onEvents(l)}acceptRemovedModel(r){this._models[r]&&delete this._models[r]}async computeUnicodeHighlights(r,l,s){const g=this._getModel(r);return g?i.UnicodeTextModelHighlighter.computeUnicodeHighlights(g,l,s):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(r,l,s,g){const h=this._getModel(r),m=this._getModel(l);return!h||!m?null:f.computeDiff(h,m,s,g)}static computeDiff(r,l,s,g){const h=g==="advanced"?n.linesDiffComputers.getDefault():n.linesDiffComputers.getLegacy(),m=r.getLinesContent(),C=l.getLinesContent(),w=h.computeDiff(m,C,s),D=w.changes.length>0?!1:this._modelsAreIdentical(r,l);function I(M){return M.map(A=>{var O;return[A.original.startLineNumber,A.original.endLineNumberExclusive,A.modified.startLineNumber,A.modified.endLineNumberExclusive,(O=A.innerChanges)===null||O===void 0?void 0:O.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])]})}return{identical:D,quitEarly:w.hitTimeout,changes:I(w.changes),moves:w.moves.map(M=>[M.lineRangeMapping.original.startLineNumber,M.lineRangeMapping.original.endLineNumberExclusive,M.lineRangeMapping.modified.startLineNumber,M.lineRangeMapping.modified.endLineNumberExclusive,I(M.changes)])}}static _modelsAreIdentical(r,l){const s=r.getLineCount(),g=l.getLineCount();if(s!==g)return!1;for(let h=1;h<=s;h++){const m=r.getLineContent(h),C=l.getLineContent(h);if(m!==C)return!1}return!0}async computeMoreMinimalEdits(r,l,s){const g=this._getModel(r);if(!g)return l;const h=[];let m;l=l.slice(0).sort((w,D)=>{if(w.range&&D.range)return E.Range.compareRangesUsingStarts(w.range,D.range);const I=w.range?0:1,M=D.range?0:1;return I-M});let C=0;for(let w=1;wf._diffLimit){h.push({range:w,text:D});continue}const A=(0,L.stringDiff)(M,D,s),O=g.offsetAt(E.Range.lift(w).getStartPosition());for(const T of A){const N=g.positionAt(O+T.originalStart),P=g.positionAt(O+T.originalStart+T.originalLength),x={text:D.substr(T.modifiedStart,T.modifiedLength),range:{startLineNumber:N.lineNumber,startColumn:N.column,endLineNumber:P.lineNumber,endColumn:P.column}};g.getValueInRange(x.range)!==x.text&&h.push(x)}}return typeof m=="number"&&h.push({eol:m,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),h}async computeLinks(r){const l=this._getModel(r);return l?(0,S.computeLinks)(l):null}async computeDefaultDocumentColors(r){const l=this._getModel(r);return l?(0,a.computeDefaultDocumentColors)(l):null}async textualSuggest(r,l,s,g){const h=new o.StopWatch,m=new RegExp(s,g),C=new Set;e:for(const w of r){const D=this._getModel(w);if(D){for(const I of D.words(m))if(!(I===l||!isNaN(Number(I)))&&(C.add(I),C.size>f._suggestionsLimit))break e}}return{words:Array.from(C),duration:h.elapsed()}}async computeWordRanges(r,l,s,g){const h=this._getModel(r);if(!h)return Object.create(null);const m=new RegExp(s,g),C=Object.create(null);for(let w=l.startLineNumber;wthis._host.fhr(C,w),m={host:(0,t.createProxyObject)(s,g),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(m,l),Promise.resolve((0,t.getAllMethodNames)(this._foreignModule))):new Promise((C,w)=>{Q([r],D=>{this._foreignModule=D.create(m,l),C((0,t.getAllMethodNames)(this._foreignModule))},w)})}fmr(r,l){if(!this._foreignModule||typeof this._foreignModule[r]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+r));try{return Promise.resolve(this._foreignModule[r].apply(this._foreignModule,l))}catch(s){return Promise.reject(s)}}}e.EditorSimpleWorker=f,f._diffLimit=1e5,f._suggestionsLimit=1e4;function c(d){return new f(d,null)}e.create=c,typeof importScripts=="function"&&(globalThis.monaco=(0,b.createMonacoBaseAPI)())}),define(ie[336],ne([1,0,6,2,278,31]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class _ extends k.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.markAsSingleton)(new _)),this._INSTANCE}constructor(){super(),this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(E.TokenizationRegistry.onDidChange(S=>{S.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const S=E.TokenizationRegistry.getColorMap();if(!S){this._colors=[y.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[y.RGBA8.Empty];for(let b=1;b=.5,this._onDidChange.fire(void 0)}getColor(S){return(S<1||S>=this._colors.length)&&(S=2),this._colors[S]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=_,_._INSTANCE=null}),define(ie[637],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/languages/modesRegistry",e)}),define(ie[638],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/model/editStack",e)}),define(ie[337],ne([1,0,638,9,24,22,326,142,45]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function v(u){return u.toString()}class b{static create(f,c){const d=f.getAlternativeVersionId(),r=n(f);return new b(d,d,r,r,c,c,[])}constructor(f,c,d,r,l,s,g){this.beforeVersionId=f,this.afterVersionId=c,this.beforeEOL=d,this.afterEOL=r,this.beforeCursorState=l,this.afterCursorState=s,this.changes=g}append(f,c,d,r,l){c.length>0&&(this.changes=(0,_.compressConsecutiveTextChanges)(this.changes,c)),this.afterEOL=d,this.afterVersionId=r,this.afterCursorState=l}static _writeSelectionsSize(f){return 4+4*4*(f?f.length:0)}static _writeSelections(f,c,d){if(p.writeUInt32BE(f,c?c.length:0,d),d+=4,c)for(const r of c)p.writeUInt32BE(f,r.selectionStartLineNumber,d),d+=4,p.writeUInt32BE(f,r.selectionStartColumn,d),d+=4,p.writeUInt32BE(f,r.positionLineNumber,d),d+=4,p.writeUInt32BE(f,r.positionColumn,d),d+=4;return d}static _readSelections(f,c,d){const r=p.readUInt32BE(f,c);c+=4;for(let l=0;lc.toString()).join(", ")}matchesResource(f){return(E.URI.isUri(this.model)?this.model:this.model.uri).toString()===f.toString()}setModel(f){this.model=f}canAppend(f){return this.model===f&&this._data instanceof b}append(f,c,d,r,l){this._data instanceof b&&this._data.append(f,c,d,r,l)}close(){this._data instanceof b&&(this._data=this._data.serialize())}open(){this._data instanceof b||(this._data=b.deserialize(this._data))}undo(){if(E.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof b&&(this._data=this._data.serialize());const f=b.deserialize(this._data);this.model._applyUndo(f.changes,f.beforeEOL,f.beforeVersionId,f.beforeCursorState)}redo(){if(E.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof b&&(this._data=this._data.serialize());const f=b.deserialize(this._data);this.model._applyRedo(f.changes,f.afterEOL,f.afterVersionId,f.afterCursorState)}heapSize(){return this._data instanceof b&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=o;class i{get resources(){return this._editStackElementsArr.map(f=>f.resource)}constructor(f,c,d){this.label=f,this.code=c,this.type=1,this._isOpen=!0,this._editStackElementsArr=d.slice(0),this._editStackElementsMap=new Map;for(const r of this._editStackElementsArr){const l=v(r.resource);this._editStackElementsMap.set(l,r)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(f){const c=v(f);return this._editStackElementsMap.has(c)}setModel(f){const c=v(E.URI.isUri(f)?f:f.uri);this._editStackElementsMap.has(c)&&this._editStackElementsMap.get(c).setModel(f)}canAppend(f){if(!this._isOpen)return!1;const c=v(f.uri);return this._editStackElementsMap.has(c)?this._editStackElementsMap.get(c).canAppend(f):!1}append(f,c,d,r,l){const s=v(f.uri);this._editStackElementsMap.get(s).append(f,c,d,r,l)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const f of this._editStackElementsArr)f.undo()}redo(){for(const f of this._editStackElementsArr)f.redo()}heapSize(f){const c=v(f);return this._editStackElementsMap.has(c)?this._editStackElementsMap.get(c).heapSize():0}split(){return this._editStackElementsArr}toString(){const f=[];for(const c of this._editStackElementsArr)f.push(`${(0,S.basename)(c.resource)}: ${c}`);return`{${f.join(", ")}}`}}e.MultiModelEditStackElement=i;function n(u){return u.getEOL()===` `?0:1}function t(u){return u?u instanceof o||u instanceof i:!1}e.isEditStackElement=t;class a{constructor(f,c){this._model=f,this._undoRedoService=c}pushStackElement(){const f=this._undoRedoService.getLastElement(this._model.uri);t(f)&&f.close()}popStackElement(){const f=this._undoRedoService.getLastElement(this._model.uri);t(f)&&f.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(f,c){const d=this._undoRedoService.getLastElement(this._model.uri);if(t(d)&&d.canAppend(this._model))return d;const r=new o(L.localize(0,null),"undoredo.textBufferEdit",this._model,f);return this._undoRedoService.pushElement(r,c),r}pushEOL(f){const c=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(f),c.append(this._model,[],n(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(f,c,d,r){const l=this._getOrCreateEditStackElement(f,r),s=this._model.applyEdits(c,!0),g=a._computeCursorState(d,s),h=s.map((m,C)=>({index:C,textChange:m.textChange}));return h.sort((m,C)=>m.textChange.oldPosition===C.textChange.oldPosition?m.index-C.index:m.textChange.oldPosition-C.textChange.oldPosition),l.append(this._model,h.map(m=>m.textChange),n(this._model),this._model.getAlternativeVersionId(),g),g}static _computeCursorState(f,c){try{return f?f(c):null}catch(d){return(0,k.onUnexpectedError)(d),null}}}e.EditStack=a}),define(ie[639],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/standaloneStrings",e)}),define(ie[95],ne([1,0,639]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=void 0;var k;(function(o){o.inspectTokensAction=L.localize(0,null)})(k||(e.InspectTokensNLS=k={}));var y;(function(o){o.gotoLineActionLabel=L.localize(1,null)})(y||(e.GoToLineNLS=y={}));var E;(function(o){o.helpQuickAccessActionLabel=L.localize(2,null)})(E||(e.QuickHelpNLS=E={}));var _;(function(o){o.quickCommandActionLabel=L.localize(3,null),o.quickCommandHelp=L.localize(4,null)})(_||(e.QuickCommandNLS=_={}));var p;(function(o){o.quickOutlineActionLabel=L.localize(5,null),o.quickOutlineByCategoryActionLabel=L.localize(6,null)})(p||(e.QuickOutlineNLS=p={}));var S;(function(o){o.editorViewAccessibleLabel=L.localize(7,null),o.accessibilityHelpMessage=L.localize(8,null)})(S||(e.StandaloneCodeEditorNLS=S={}));var v;(function(o){o.toggleHighContrast=L.localize(9,null)})(v||(e.ToggleHighContrastNLS=v={}));var b;(function(o){o.bulkEditServiceSummary=L.localize(10,null)})(b||(e.StandaloneServicesNLS=b={}))}),define(ie[640],ne([3,4]),function(Q,e){return Q.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(ie[117],ne([1,0,640,12,102,154,539]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class p{constructor(w,D){this.startOffset=w,this.endOffset=D}equals(w){return this.startOffset===w.startOffset&&this.endOffset===w.endOffset}}e.LineRange=p;class S{constructor(w,D,I,M,A,O,T,N,P,x,R,B,W,V,U,F,j,J,le){this.useMonospaceOptimizations=w,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.continuesWithWrappedLine=M,this.isBasicASCII=A,this.containsRTL=O,this.fauxIndentLength=T,this.lineTokens=N,this.lineDecorations=P.sort(E.LineDecoration.compare),this.tabSize=x,this.startVisibleColumn=R,this.spaceWidth=B,this.stopRenderingLineAfter=U,this.renderWhitespace=F==="all"?4:F==="boundary"?1:F==="selection"?2:F==="trailing"?3:0,this.renderControlCharacters=j,this.fontLigatures=J,this.selectionsOnLine=le&&le.sort((te,G)=>te.startOffset>>16}static getCharIndex(w){return(w&65535)>>>0}constructor(w,D){this.length=w,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(w,D,I,M){const A=(D<<16|I<<0)>>>0;this._data[w-1]=A,this._horizontalOffset[w-1]=M}getHorizontalOffset(w){return this._horizontalOffset.length===0?0:this._horizontalOffset[w-1]}charOffsetToPartData(w){return this.length===0?0:w<0?this._data[0]:w>=this.length?this._data[this.length-1]:this._data[w]}getDomPosition(w){const D=this.charOffsetToPartData(w-1),I=b.getPartIndex(D),M=b.getCharIndex(D);return new v(I,M)}getColumn(w,D){return this.partDataToCharOffset(w.partIndex,D,w.charIndex)+1}partDataToCharOffset(w,D,I){if(this.length===0)return 0;const M=(w<<16|I<<0)>>>0;let A=0,O=this.length-1;for(;A+1>>1,F=this._data[U];if(F===M)return U;F>M?O=U:A=U}if(A===O)return A;const T=this._data[A],N=this._data[O];if(T===M)return A;if(N===M)return O;const P=b.getPartIndex(T),x=b.getCharIndex(T),R=b.getPartIndex(N);let B;P!==R?B=D:B=b.getCharIndex(N);const W=I-x,V=B-I;return W<=V?A:O}}e.CharacterMapping=b;class o{constructor(w,D,I){this._renderLineOutputBrand=void 0,this.characterMapping=w,this.containsRTL=D,this.containsForeignElements=I}}e.RenderLineOutput=o;function i(C,w){if(C.lineContent.length===0){if(C.lineDecorations.length>0){w.appendString("");let D=0,I=0,M=0;for(const O of C.lineDecorations)(O.type===1||O.type===2)&&(w.appendString(''),O.type===1&&(M|=1,D++),O.type===2&&(M|=2,I++));w.appendString("");const A=new b(1,D+I);return A.setColumnInfo(1,D,0,0),new o(A,!1,M)}return w.appendString(""),new o(new b(0,0),!1,0)}return g(u(C),w)}e.renderViewLine=i;class n{constructor(w,D,I,M){this.characterMapping=w,this.html=D,this.containsRTL=I,this.containsForeignElements=M}}e.RenderLineOutput2=n;function t(C){const w=new y.StringBuilder(1e4),D=i(C,w);return new n(D.characterMapping,w.build(),D.containsRTL,D.containsForeignElements)}e.renderViewLine2=t;class a{constructor(w,D,I,M,A,O,T,N,P,x,R,B,W,V,U,F){this.fontIsMonospace=w,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.len=M,this.isOverflowing=A,this.overflowingCharCount=O,this.parts=T,this.containsForeignElements=N,this.fauxIndentLength=P,this.tabSize=x,this.startVisibleColumn=R,this.containsRTL=B,this.spaceWidth=W,this.renderSpaceCharCode=V,this.renderWhitespace=U,this.renderControlCharacters=F}}function u(C){const w=C.lineContent;let D,I,M;C.stopRenderingLineAfter!==-1&&C.stopRenderingLineAfter0){for(let T=0,N=C.lineDecorations.length;T0&&(A[O++]=new _.LinePart(I,"",0,!1));let T=I;for(let N=0,P=D.getCount();N=M){const W=w?k.containsRTL(C.substring(T,M)):!1;A[O++]=new _.LinePart(M,R,0,W);break}const B=w?k.containsRTL(C.substring(T,x)):!1;A[O++]=new _.LinePart(x,R,0,B),T=x}return A}function c(C,w,D){let I=0;const M=[];let A=0;if(D)for(let O=0,T=w.length;O=50&&(M[A++]=new _.LinePart(W+1,x,R,B),V=W+1,W=-1);V!==P&&(M[A++]=new _.LinePart(P,x,R,B))}else M[A++]=N;I=P}else for(let O=0,T=w.length;O50){const R=N.type,B=N.metadata,W=N.containsRTL,V=Math.ceil(x/50);for(let U=1;U=8234&&C<=8238||C>=8294&&C<=8297||C>=8206&&C<=8207||C===1564}function r(C,w){const D=[];let I=new _.LinePart(0,"",0,!1),M=0;for(const A of w){const O=A.endIndex;for(;MI.endIndex&&(I=new _.LinePart(M,A.type,A.metadata,A.containsRTL),D.push(I)),I=new _.LinePart(M+1,"mtkcontrol",A.metadata,!1),D.push(I))}M>I.endIndex&&(I=new _.LinePart(O,A.type,A.metadata,A.containsRTL),D.push(I))}return D}function l(C,w,D,I){const M=C.continuesWithWrappedLine,A=C.fauxIndentLength,O=C.tabSize,T=C.startVisibleColumn,N=C.useMonospaceOptimizations,P=C.selectionsOnLine,x=C.renderWhitespace===1,R=C.renderWhitespace===3,B=C.renderSpaceWidth!==C.spaceWidth,W=[];let V=0,U=0,F=I[U].type,j=I[U].containsRTL,J=I[U].endIndex;const le=I.length;let ee=!1,$=k.firstNonWhitespaceIndex(w),te;$===-1?(ee=!0,$=D,te=D):te=k.lastNonWhitespaceIndex(w);let G=!1,de=0,ue=P&&P[de],X=T%O;for(let re=A;re=ue.endOffset&&(de++,ue=P&&P[de]);let Y;if(re<$||re>te)Y=!0;else if(oe===9)Y=!0;else if(oe===32)if(x)if(G)Y=!0;else{const K=re+1re),Y&&R&&(Y=ee||re>te),Y&&j&&re>=$&&re<=te&&(Y=!1),G){if(!Y||!N&&X>=O){if(B){const K=V>0?W[V-1].endIndex:A;for(let H=K+1;H<=re;H++)W[V++]=new _.LinePart(H,"mtkw",1,!1)}else W[V++]=new _.LinePart(re,"mtkw",1,!1);X=X%O}}else(re===J||Y&&re>A)&&(W[V++]=new _.LinePart(re,F,0,j),X=X%O);for(oe===9?X=O:k.isFullWidthCharacter(oe)?X+=2:X++,G=Y;re===J&&(U++,U0?w.charCodeAt(D-1):0,oe=D>1?w.charCodeAt(D-2):0;re===32&&oe!==32&&oe!==9||(Z=!0)}else Z=!0;if(Z)if(B){const re=V>0?W[V-1].endIndex:A;for(let oe=re+1;oe<=D;oe++)W[V++]=new _.LinePart(oe,"mtkw",1,!1)}else W[V++]=new _.LinePart(D,"mtkw",1,!1);else W[V++]=new _.LinePart(D,F,0,j);return W}function s(C,w,D,I){I.sort(E.LineDecoration.compare);const M=E.LineDecorationsNormalizer.normalize(C,I),A=M.length;let O=0;const T=[];let N=0,P=0;for(let R=0,B=D.length;RP&&(P=J.startOffset,T[N++]=new _.LinePart(P,U,F,j)),J.endOffset+1<=V)P=J.endOffset+1,T[N++]=new _.LinePart(P,U+" "+J.className,F|J.metadata,j),O++;else{P=V,T[N++]=new _.LinePart(P,U+" "+J.className,F|J.metadata,j);break}}V>P&&(P=V,T[N++]=new _.LinePart(P,U,F,j))}const x=D[D.length-1].endIndex;if(O'):w.appendString("");for(let ue=0,X=P.length;ue=x&&(ae+=ge)}}for(H&&(w.appendString(' style="width:'),w.appendString(String(V*se)),w.appendString('px"')),w.appendASCIICharCode(62);ee1?w.appendCharCode(8594):w.appendCharCode(65515);for(let ge=2;ge<=ce;ge++)w.appendCharCode(160)}else ae=2,ce=1,w.appendCharCode(U),w.appendCharCode(8204);te+=ae,G+=ce,ee>=x&&($+=ce)}}else for(w.appendASCIICharCode(62);ee=x&&($+=ae)}z?de++:de=0,ee>=O&&!le&&Z.isPseudoAfter()&&(le=!0,J.setColumnInfo(ee+1,ue,te,G)),w.appendString("")}return le||J.setColumnInfo(O+1,P.length-1,te,G),T&&(w.appendString(''),w.appendString(L.localize(0,null,m(N))),w.appendString("")),w.appendString(""),new o(J,W,M)}function h(C){return C.toString(16).toUpperCase().padStart(4,"0")}function m(C){return C<1024?L.localize(1,null,C):C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/1024/1024).toFixed(1)} MB`}}),define(ie[641],ne([1,0,92,72,36,102,154,117,85]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderOptions=e.LineSource=e.renderLines=void 0;const v=(0,L.createTrustedTypesPolicy)("diffEditorWidget",{createHTML:t=>t});function b(t,a,u,f){(0,k.applyFontInfo)(f,a.fontInfo);const c=u.length>0,d=new E.StringBuilder(1e4);let r=0,l=0;const s=[];for(let C=0;C');const s=a.getLineContent(),g=S.ViewLineRenderingData.isBasicASCII(s,c),h=S.ViewLineRenderingData.containsRTL(s,g,d),m=(0,p.renderViewLine)(new p.RenderLineInput(r.fontInfo.isMonospace&&!r.disableMonospaceOptimizations,r.fontInfo.canUseHalfwidthRightwardsArrow,s,!1,g,h,0,a,u,r.tabSize,0,r.fontInfo.spaceWidth,r.fontInfo.middotWidth,r.fontInfo.wsmiddotWidth,r.stopRenderingLineAfter,r.renderWhitespace,r.renderControlCharacters,r.fontLigatures!==y.EditorFontLigatures.OFF,null),l);return l.appendString(""),m.characterMapping.getHorizontalOffset(m.characterMapping.length)}}),define(ie[642],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(ie[643],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(ie[644],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(ie[645],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(ie[646],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(ie[647],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(ie[648],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(ie[649],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(ie[650],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeActionController",e)}),define(ie[651],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(ie[652],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(ie[653],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(ie[654],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(ie[655],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(ie[656],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/comment/browser/comment",e)}),define(ie[657],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(ie[658],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(ie[659],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution",e)}),define(ie[660],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteController",e)}),define(ie[661],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/dropOrPasteInto/browser/defaultProviders",e)}),define(ie[662],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution",e)}),define(ie[663],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController",e)}),define(ie[664],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(ie[665],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/find/browser/findController",e)}),define(ie[666],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/find/browser/findWidget",e)}),define(ie[667],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/folding/browser/folding",e)}),define(ie[668],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(ie[669],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(ie[670],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/format/browser/formatActions",e)}),define(ie[671],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(ie[672],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(ie[673],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(ie[674],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(ie[675],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(ie[676],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(ie[677],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(ie[678],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(ie[160],ne([1,0,9,6,168,2,53,45,12,5,678]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class o{constructor(u,f,c,d){this.isProviderFirst=u,this.parent=f,this.link=c,this._rangeCallback=d,this.id=y.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var u,f;return(f=(u=this._range)!==null&&u!==void 0?u:this.link.targetSelectionRange)!==null&&f!==void 0?f:this.link.range}set range(u){this._range=u,this._rangeCallback(this)}get ariaMessage(){var u;const f=(u=this.parent.getPreview(this))===null||u===void 0?void 0:u.preview(this.range);return f?(0,b.localize)(1,null,f.value,(0,p.basename)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,b.localize)(0,null,(0,p.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=o;class i{constructor(u){this._modelReference=u}dispose(){this._modelReference.dispose()}preview(u,f=8){const c=this._modelReference.object.textEditorModel;if(!c)return;const{startLineNumber:d,startColumn:r,endLineNumber:l,endColumn:s}=u,g=c.getWordUntilPosition({lineNumber:d,column:r-f}),h=new v.Range(d,g.startColumn,d,r),m=new v.Range(l,s,l,1073741824),C=c.getValueInRange(h).replace(/^\s+/,""),w=c.getValueInRange(u),D=c.getValueInRange(m).replace(/\s+$/,"");return{value:C+w+D,highlight:{start:C.length,end:C.length+w.length}}}}e.FilePreview=i;class n{constructor(u,f){this.parent=u,this.uri=f,this.children=[],this._previews=new _.ResourceMap}dispose(){(0,E.dispose)(this._previews.values()),this._previews.clear()}getPreview(u){return this._previews.get(u.uri)}get ariaMessage(){const u=this.children.length;return u===1?(0,b.localize)(2,null,(0,p.basename)(this.uri),this.uri.fsPath):(0,b.localize)(3,null,u,(0,p.basename)(this.uri),this.uri.fsPath)}async resolve(u){if(this._previews.size!==0)return this;for(const f of this.children)if(!this._previews.has(f.uri))try{const c=await u.createModelReference(f.uri);this._previews.set(f.uri,new i(c))}catch(c){(0,L.onUnexpectedError)(c)}return this}}e.FileReferences=n;class t{constructor(u,f){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new k.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=u,this._title=f;const[c]=u;u.sort(t._compareReferences);let d;for(const r of u)if((!d||!p.extUri.isEqual(d.uri,r.uri,!0))&&(d=new n(this,r.uri),this.groups.push(d)),d.children.length===0||t._compareReferences(r,d.children[d.children.length-1])!==0){const l=new o(c===r,d,r,s=>this._onDidChangeReferenceRange.fire(s));this.references.push(l),d.children.push(l)}}dispose(){(0,E.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new t(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,b.localize)(4,null):this.references.length===1?(0,b.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,b.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,b.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(u,f){const{parent:c}=u;let d=c.children.indexOf(u);const r=c.children.length,l=c.parent.groups.length;return l===1||f&&d+10?(f?d=(d+1)%r:d=(d+r-1)%r,c.children[d]):(d=c.parent.groups.indexOf(c),f?(d=(d+1)%l,c.parent.groups[d].children[0]):(d=(d+l-1)%l,c.parent.groups[d].children[c.parent.groups[d].children.length-1]))}nearestReference(u,f){const c=this.references.map((d,r)=>({idx:r,prefixLen:S.commonPrefixLength(d.uri.toString(),u.toString()),offsetDist:Math.abs(d.range.startLineNumber-f.lineNumber)*100+Math.abs(d.range.startColumn-f.column)})).sort((d,r)=>d.prefixLen>r.prefixLen?-1:d.prefixLenr.offsetDist?1:0)[0];if(c)return this.references[c.idx]}referenceAt(u,f){for(const c of this.references)if(c.uri.toString()===u.toString()&&v.Range.containsPosition(c.range,f))return c}firstReference(){for(const u of this.references)if(u.isProviderFirst)return u;return this.references[0]}static _compareReferences(u,f){return p.extUri.compare(u.uri,f.uri)||v.Range.compareRangesUsingStarts(u.range,f.range)}}e.ReferencesModel=t}),define(ie[679],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(ie[680],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/hover",e)}),define(ie[681],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(ie[682],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(ie[683],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(ie[684],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(ie[685],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(ie[686],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(ie[687],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(ie[688],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(ie[689],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController",e)}),define(ie[690],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(ie[691],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(ie[692],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(ie[693],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(ie[694],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/links/browser/links",e)}),define(ie[695],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/message/browser/messageController",e)}),define(ie[696],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(ie[697],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(ie[698],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(ie[699],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(ie[700],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(ie[701],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(ie[702],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(ie[703],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/rename/browser/rename",e)}),define(ie[704],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(ie[705],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(ie[706],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(ie[707],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(ie[708],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(ie[709],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(ie[710],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(ie[711],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(ie[712],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(ie[713],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(ie[714],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(ie[715],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(ie[716],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(ie[717],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(ie[718],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(ie[719],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(ie[720],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(ie[721],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(ie[722],ne([3,4]),function(Q,e){return Q.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(ie[723],ne([3,4]),function(Q,e){return Q.create("vs/platform/action/common/actionCommonCategories",e)}),define(ie[724],ne([3,4]),function(Q,e){return Q.create("vs/platform/actionWidget/browser/actionList",e)}),define(ie[725],ne([3,4]),function(Q,e){return Q.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(ie[726],ne([3,4]),function(Q,e){return Q.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(ie[727],ne([3,4]),function(Q,e){return Q.create("vs/platform/actions/browser/toolbar",e)}),define(ie[728],ne([3,4]),function(Q,e){return Q.create("vs/platform/actions/common/menuService",e)}),define(ie[729],ne([3,4]),function(Q,e){return Q.create("vs/platform/audioCues/browser/audioCueService",e)}),define(ie[730],ne([3,4]),function(Q,e){return Q.create("vs/platform/configuration/common/configurationRegistry",e)}),define(ie[731],ne([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(ie[732],ne([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/common/contextkey",e)}),define(ie[733],ne([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/common/contextkeys",e)}),define(ie[734],ne([3,4]),function(Q,e){return Q.create("vs/platform/contextkey/common/scanner",e)}),define(ie[735],ne([3,4]),function(Q,e){return Q.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(ie[736],ne([3,4]),function(Q,e){return Q.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(ie[737],ne([3,4]),function(Q,e){return Q.create("vs/platform/list/browser/listService",e)}),define(ie[738],ne([3,4]),function(Q,e){return Q.create("vs/platform/markers/common/markers",e)}),define(ie[739],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(ie[740],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(ie[741],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/quickInput",e)}),define(ie[742],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/quickInputController",e)}),define(ie[743],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/quickInputList",e)}),define(ie[744],ne([3,4]),function(Q,e){return Q.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(ie[745],ne([3,4]),function(Q,e){return Q.create("vs/platform/theme/common/colorRegistry",e)}),define(ie[746],ne([3,4]),function(Q,e){return Q.create("vs/platform/theme/common/iconRegistry",e)}),define(ie[747],ne([3,4]),function(Q,e){return Q.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(ie[748],ne([3,4]),function(Q,e){return Q.create("vs/platform/workspace/common/workspace",e)}),define(ie[749],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function L(k){return k?k.condition!==void 0:!1}e.isICommandActionToggleInfo=L}),define(ie[750],ne([1,0,723]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:{value:(0,L.localize)(0,null),original:"View"},Help:{value:(0,L.localize)(1,null),original:"Help"},Test:{value:(0,L.localize)(2,null),original:"Test"},File:{value:(0,L.localize)(3,null),original:"File"},Preferences:{value:(0,L.localize)(4,null),original:"Preferences"},Developer:{value:(0,L.localize)(5,null),original:"Developer"}})}),define(ie[751],ne([1,0,9,734]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function y(...S){switch(S.length){case 1:return(0,k.localize)(0,null,S[0]);case 2:return(0,k.localize)(1,null,S[0],S[1]);case 3:return(0,k.localize)(2,null,S[0],S[1],S[2]);default:return}}const E=(0,k.localize)(3,null),_=(0,k.localize)(4,null);class p{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(v){switch(v.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return v.isTripleEq?"===":"==";case 4:return v.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return v.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return v.lexeme;case 18:return v.lexeme;case 19:return v.lexeme;case 20:return"EOF";default:throw(0,L.illegalState)(`unhandled token type: ${JSON.stringify(v)}; have you forgotten to add a case?`)}}reset(v){return this._input=v,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const b=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:b})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const b=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:b})}else this._match(126)?this._addToken(9):this._error(y("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(y("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(y("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(v){return this._isAtEnd()||this._input.charCodeAt(this._current)!==v?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(v){this._tokens.push({type:v,offset:this._start})}_error(v){const b=this._start,o=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:o};this._errors.push({offset:b,lexeme:o,additionalInfo:v}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const v=this.stringRe.exec(this._input);if(v){this._current=this._start+v[0].length;const b=this._input.substring(this._start,this._current),o=p._keywords.get(b);o?this._addToken(o):this._tokens.push({type:17,lexeme:b,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(E);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let v=this._current,b=!1,o=!1;for(;;){if(v>=this._input.length){this._current=v,this._error(_);return}const n=this._input.charCodeAt(v);if(b)b=!1;else if(n===47&&!o){v++;break}else n===91?o=!0:n===92?b=!0:n===93&&(o=!1);v++}for(;v=this._input.length}}e.Scanner=p,p._regexFlags=new Set(["i","g","s","m","y","u"].map(S=>S.charCodeAt(0))),p._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}),define(ie[752],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenSource=void 0;var L;(function(k){k[k.API=0]="API",k[k.USER=1]="USER"})(L||(e.EditorOpenSource=L={}))}),define(ie[753],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifierSet=e.ExtensionIdentifier=void 0;class L{constructor(E){this.value=E,this._lower=E.toLowerCase()}static toKey(E){return typeof E=="string"?E.toLowerCase():E._lower}}e.ExtensionIdentifier=L;class k{constructor(E){if(this._set=new Set,E)for(const _ of E)this.add(_)}add(E){this._set.add(L.toKey(E))}has(E){return this._set.has(L.toKey(E))}}e.ExtensionIdentifierSet=k}),define(ie[338],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var L;(function(k){k[k.FILE=0]="FILE",k[k.FOLDER=1]="FOLDER",k[k.ROOT_FOLDER=2]="ROOT_FOLDER"})(L||(e.FileKind=L={}))}),define(ie[754],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function L(k){var y,E;return((y=k.lookupKeybinding("history.showPrevious"))===null||y===void 0?void 0:y.getElectronAccelerator())==="Up"&&((E=k.lookupKeybinding("history.showNext"))===null||E===void 0?void 0:E.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=L}),define(ie[236],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class L{constructor(y,E=[],_=!1){this.ctor=y,this.staticArguments=E,this.supportsDelayedInstantiation=_}}e.SyncDescriptor=L}),define(ie[46],ne([1,0,236]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function y(_,p,S){p instanceof L.SyncDescriptor||(p=new L.SyncDescriptor(p,[],!!S)),k.push([_,p])}e.registerSingleton=y;function E(){return k}e.getSingletonServiceDescriptors=E}),define(ie[755],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class L{constructor(E,_){this.key=E,this.data=_,this.incoming=new Map,this.outgoing=new Map}}e.Node=L;class k{constructor(E){this._hashFn=E,this._nodes=new Map}roots(){const E=[];for(const _ of this._nodes.values())_.outgoing.size===0&&E.push(_);return E}insertEdge(E,_){const p=this.lookupOrInsertNode(E),S=this.lookupOrInsertNode(_);p.outgoing.set(S.key,S),S.incoming.set(p.key,p)}removeNode(E){const _=this._hashFn(E);this._nodes.delete(_);for(const p of this._nodes.values())p.outgoing.delete(_),p.incoming.delete(_)}lookupOrInsertNode(E){const _=this._hashFn(E);let p=this._nodes.get(_);return p||(p=new L(_,E),this._nodes.set(_,p)),p}isEmpty(){return this._nodes.size===0}toString(){const E=[];for(const[_,p]of this._nodes)E.push(`${_} (-> incoming)[${[...p.incoming.keys()].join(", ")}] (outgoing ->)[${[...p.outgoing.keys()].join(",")}] `);return E.join(` `)}findCycleSlow(){for(const[E,_]of this._nodes){const p=new Set([E]),S=this._findCycle(_,p);if(S)return S}}_findCycle(E,_){for(const[p,S]of E.outgoing){if(_.has(p))return[..._,p].join(" -> ");_.add(p);const v=this._findCycle(S,_);if(v)return v;_.delete(p)}}}e.Graph=k}),define(ie[8],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var L;(function(E){E.serviceIds=new Map,E.DI_TARGET="$di$target",E.DI_DEPENDENCIES="$di$dependencies";function _(p){return p[E.DI_DEPENDENCIES]||[]}E.getServiceDependencies=_})(L||(e._util=L={})),e.IInstantiationService=y("instantiationService");function k(E,_,p){_[L.DI_TARGET]===_?_[L.DI_DEPENDENCIES].push({id:E,index:p}):(_[L.DI_DEPENDENCIES]=[{id:E,index:p}],_[L.DI_TARGET]=_)}function y(E){if(L.serviceIds.has(E))return L.serviceIds.get(E);const _=function(p,S,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(_,p,v)};return _.toString=()=>E,L.serviceIds.set(E,_),_}e.createDecorator=y}),define(ie[133],ne([1,0,8,22,20]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,L.createDecorator)("IWorkspaceEditService");class E{constructor(v){this.metadata=v}static convert(v){return v.edits.map(b=>{if(_.is(b))return _.lift(b);if(p.is(b))return p.lift(b);throw new Error("Unsupported edit")})}}e.ResourceEdit=E;class _ extends E{static is(v){return v instanceof _?!0:(0,y.isObject)(v)&&k.URI.isUri(v.resource)&&(0,y.isObject)(v.textEdit)}static lift(v){return v instanceof _?v:new _(v.resource,v.textEdit,v.versionId,v.metadata)}constructor(v,b,o=void 0,i){super(i),this.resource=v,this.textEdit=b,this.versionId=o}}e.ResourceTextEdit=_;class p extends E{static is(v){return v instanceof p?!0:(0,y.isObject)(v)&&(!!v.newResource||!!v.oldResource)}static lift(v){return v instanceof p?v:new p(v.oldResource,v.newResource,v.options,v.metadata)}constructor(v,b,o={},i){super(i),this.oldResource=v,this.newResource=b,this.options=o}}e.ResourceFileEdit=p}),define(ie[33],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,L.createDecorator)("codeEditorService")}),define(ie[42],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,L.createDecorator)("languageService")}),define(ie[118],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,L.createDecorator)("editorWorkerService")}),define(ie[18],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,L.createDecorator)("ILanguageFeaturesService")});var he=this&&this.__param||function(Q,e){return function(L,k){e(L,k,Q)}};define(ie[756],ne([1,0,7,115,13,26,6,58,2,35,169,27,20,494,90,62,11,5,31,18,622]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideUnchangedRegionsFeature=void 0;let l=class extends S.Disposable{get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(m,C,w,D){super(),this._editors=m,this._diffModel=C,this._options=w,this._languageFeaturesService=D,this._modifiedOutlineSource=(0,b.derivedDisposable)(this,O=>{const T=this._editors.modifiedModel.read(O);return T?new g(this._languageFeaturesService,T):void 0}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(O=>{if(O.reason===3){const T=this._diffModel.get();(0,v.transaction)(N=>{for(const P of this._editors.original.getSelections()||[])T?.ensureOriginalLineIsVisible(P.getStartPosition().lineNumber,N),T?.ensureOriginalLineIsVisible(P.getEndPosition().lineNumber,N)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(O=>{if(O.reason===3){const T=this._diffModel.get();(0,v.transaction)(N=>{for(const P of this._editors.modified.getSelections()||[])T?.ensureModifiedLineIsVisible(P.getStartPosition().lineNumber,N),T?.ensureModifiedLineIsVisible(P.getEndPosition().lineNumber,N)})}}));const I=this._diffModel.map((O,T)=>{var N,P;return((N=O?.diff.read(T))===null||N===void 0?void 0:N.mappings.length)===0?[]:(P=O?.unchangedRegions.read(T))!==null&&P!==void 0?P:[]});this.viewZones=(0,v.derivedWithStore)(this,(O,T)=>{const N=this._modifiedOutlineSource.read(O);if(!N)return{origViewZones:[],modViewZones:[]};const P=[],x=[],R=this._options.renderSideBySide.read(O),B=I.read(O);for(const W of B)if(!W.shouldHideControls(O)){{const V=(0,v.derived)(this,F=>W.getHiddenOriginalRange(F).startLineNumber-1),U=new t.PlaceholderViewZone(V,24);P.push(U),T.add(new s(this._editors.original,U,W,W.originalUnchangedRange,!R,N,F=>this._diffModel.get().ensureModifiedLineIsVisible(F,void 0),this._options))}{const V=(0,v.derived)(this,F=>W.getHiddenModifiedRange(F).startLineNumber-1),U=new t.PlaceholderViewZone(V,24);x.push(U),T.add(new s(this._editors.modified,U,W,W.modifiedUnchangedRange,!1,N,F=>this._diffModel.get().ensureModifiedLineIsVisible(F,void 0),this._options))}}return{origViewZones:P,modViewZones:x}});const M={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},A={description:"Fold Unchanged",glyphMarginHoverMessage:new p.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,r.localize)(0,null)),glyphMarginClassName:"fold-unchanged "+o.ThemeIcon.asClassName(E.Codicon.fold),zIndex:10001};this._register((0,t.applyObservableDecorations)(this._editors.original,(0,v.derived)(this,O=>{const T=I.read(O),N=T.map(P=>({range:P.originalUnchangedRange.toInclusiveRange(),options:M}));for(const P of T)P.shouldHideControls(O)&&N.push({range:f.Range.fromPositions(new u.Position(P.originalLineNumber,1)),options:A});return N}))),this._register((0,t.applyObservableDecorations)(this._editors.modified,(0,v.derived)(this,O=>{const T=I.read(O),N=T.map(P=>({range:P.modifiedUnchangedRange.toInclusiveRange(),options:M}));for(const P of T)P.shouldHideControls(O)&&N.push({range:a.LineRange.ofLength(P.modifiedLineNumber,1).toInclusiveRange(),options:A});return N}))),this._register((0,v.autorun)(O=>{const T=I.read(O);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(T.map(N=>N.getHiddenOriginalRange(O).toInclusiveRange()).filter(i.isDefined)),this._editors.modified.setHiddenAreas(T.map(N=>N.getHiddenModifiedRange(O).toInclusiveRange()).filter(i.isDefined))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(O=>{var T;if(!O.event.rightButton&&O.target.position&&(!((T=O.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const N=O.target.position.lineNumber,P=this._diffModel.get();if(!P)return;const x=P.unchangedRegions.get().find(R=>R.modifiedUnchangedRange.includes(N));if(!x)return;x.collapseAll(void 0),O.event.stopPropagation(),O.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(O=>{var T;if(!O.event.rightButton&&O.target.position&&(!((T=O.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const N=O.target.position.lineNumber,P=this._diffModel.get();if(!P)return;const x=P.unchangedRegions.get().find(R=>R.originalUnchangedRange.includes(N));if(!x)return;x.collapseAll(void 0),O.event.stopPropagation(),O.event.preventDefault()}}))}};e.HideUnchangedRegionsFeature=l,e.HideUnchangedRegionsFeature=l=Ee([he(3,d.ILanguageFeaturesService)],l);class s extends t.ViewZoneOverlayWidget{constructor(m,C,w,D,I,M,A,O){const T=(0,L.h)("div.diff-hidden-lines-widget");super(m,C,T.root),this._editor=m,this._unchangedRegion=w,this._unchangedRegionRange=D,this._hide=I,this._modifiedOutlineSource=M,this._revealModifiedHiddenLine=A,this._options=O,this._nodes=(0,L.h)("div.diff-hidden-lines",[(0,L.h)("div.top@top",{title:(0,r.localize)(1,null)}),(0,L.h)("div.center@content",{style:{display:"flex"}},[(0,L.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,L.$)("a",{title:(0,r.localize)(2,null),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,k.renderLabelWithIcons)("$(unfold)"))]),(0,L.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,L.h)("div.bottom@bottom",{title:(0,r.localize)(3,null),role:"button"})]),T.root.appendChild(this._nodes.root);const N=(0,v.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?(0,L.reset)(this._nodes.first):this._register((0,t.applyStyle)(this._nodes.first,{width:N.map(x=>x.contentLeft)})),this._register((0,v.autorun)(x=>{const R=this._unchangedRegion.visibleLineCountTop.read(x)+this._unchangedRegion.visibleLineCountBottom.read(x)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!R),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(x)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(x)>0),this._nodes.top.classList.toggle("canMoveBottom",!R);const B=this._unchangedRegion.isDragged.read(x),W=this._editor.getDomNode();W&&(W.classList.toggle("draggingUnchangedRegion",!!B),B==="top"?(W.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(x)>0),W.classList.toggle("canMoveBottom",!R)):B==="bottom"?(W.classList.toggle("canMoveTop",!R),W.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(x)>0)):(W.classList.toggle("canMoveTop",!1),W.classList.toggle("canMoveBottom",!1)))}));const P=this._editor;this._register((0,L.addDisposableListener)(this._nodes.top,"mousedown",x=>{if(x.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),x.preventDefault();const R=x.clientY;let B=!1;const W=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const V=(0,L.getWindow)(this._nodes.top),U=(0,L.addDisposableListener)(V,"mousemove",j=>{const le=j.clientY-R;B=B||Math.abs(le)>2;const ee=Math.round(le/P.getOption(66)),$=Math.max(0,Math.min(W+ee,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set($,void 0)}),F=(0,L.addDisposableListener)(V,"mouseup",j=>{B||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(void 0,void 0),U.dispose(),F.dispose()})})),this._register((0,L.addDisposableListener)(this._nodes.bottom,"mousedown",x=>{if(x.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),x.preventDefault();const R=x.clientY;let B=!1;const W=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const V=(0,L.getWindow)(this._nodes.bottom),U=(0,L.addDisposableListener)(V,"mousemove",j=>{const le=j.clientY-R;B=B||Math.abs(le)>2;const ee=Math.round(le/P.getOption(66)),$=Math.max(0,Math.min(W-ee,this._unchangedRegion.getMaxVisibleLineCountBottom())),te=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set($,void 0);const G=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);P.setScrollTop(P.getScrollTop()+(G-te))}),F=(0,L.addDisposableListener)(V,"mouseup",j=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!B){const J=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const le=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);P.setScrollTop(P.getScrollTop()+(le-J))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),U.dispose(),F.dispose()})})),this._register((0,v.autorun)(x=>{const R=[];if(!this._hide){const B=w.getHiddenModifiedRange(x).length,W=(0,r.localize)(4,null,B),V=(0,L.$)("span",{title:(0,r.localize)(5,null)},W);V.addEventListener("dblclick",j=>{j.button===0&&(j.preventDefault(),this._unchangedRegion.showAll(void 0))}),R.push(V);const U=this._unchangedRegion.getHiddenModifiedRange(x),F=this._modifiedOutlineSource.getBreadcrumbItems(U,x);if(F.length>0){R.push((0,L.$)("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let j=0;j{this._revealModifiedHiddenLine(J.startLineNumber)}}}}(0,L.reset)(this._nodes.others,...R)}))}}let g=class extends S.Disposable{constructor(m,C){super(),this._languageFeaturesService=m,this._textModel=C,this._currentModel=(0,v.observableValue)(this,void 0);const w=(0,v.observableSignalFromEvent)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),D=(0,v.observableSignalFromEvent)("_textModel.onDidChangeContent",_.Event.debounce(I=>this._textModel.onDidChangeContent(I),()=>{},100));this._register((0,v.autorunWithStore)(async(I,M)=>{w.read(I),D.read(I);const A=M.add(new t.DisposableCancellationTokenSource),O=await n.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,A.token);M.isDisposed||this._currentModel.set(O,void 0)}))}getBreadcrumbItems(m,C){const w=this._currentModel.read(C);if(!w)return[];const D=w.asListOfDocumentSymbols().filter(I=>m.contains(I.range.startLineNumber)&&!m.contains(I.range.endLineNumber));return D.sort((0,y.reverseOrder)((0,y.compareBy)(I=>I.range.endLineNumber-I.range.startLineNumber,y.numberComparator))),D.map(I=>({name:I.name,kind:I.kind,startLineNumber:I.range.startLineNumber}))}};g=Ee([he(0,d.ILanguageFeaturesService)],g)}),define(ie[757],ne([1,0,605,18,46]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class E{constructor(){this.referenceProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.multiDocumentHighlightProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentOnDropEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this))}_score(p){var S;return(S=this._notebookTypeResolver)===null||S===void 0?void 0:S.call(this,p)}}e.LanguageFeaturesService=E,(0,y.registerSingleton)(k.ILanguageFeaturesService,E,1)}),define(ie[237],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,L.createDecorator)("markerDecorationsService")}),define(ie[52],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,L.createDecorator)("modelService")}),define(ie[68],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,L.createDecorator)("textModelService")}),define(ie[238],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,L.createDecorator)("semanticTokensStylingService")}),define(ie[187],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,L.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,L.createDecorator)("textResourcePropertiesService")}),define(ie[758],ne([1,0,46,8,292]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsDnDService=void 0,e.ITreeViewsDnDService=(0,k.createDecorator)("treeViewsDndService"),(0,L.registerSingleton)(e.ITreeViewsDnDService,y.TreeViewsDnDService,1)}),define(ie[339],ne([1,0,133]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sortEditsByYieldTo=e.createCombinedWorkspaceEdit=void 0;function k(E,_,p){var S,v;return{edits:[..._.map(b=>new L.ResourceTextEdit(E,typeof p.insertText=="string"?{range:b,text:p.insertText,insertAsSnippet:!1}:{range:b,text:p.insertText.snippet,insertAsSnippet:!0})),...(v=(S=p.additionalEdit)===null||S===void 0?void 0:S.edits)!==null&&v!==void 0?v:[]]}}e.createCombinedWorkspaceEdit=k;function y(E){var _;function p(i,n){return"providerId"in i&&i.providerId===n.providerId||"mimeType"in i&&i.mimeType===n.handledMimeType}const S=new Map;for(const i of E)for(const n of(_=i.yieldTo)!==null&&_!==void 0?_:[])for(const t of E)if(t!==i&&p(n,t)){let a=S.get(i);a||(a=[],S.set(i,a)),a.push(t)}if(!S.size)return Array.from(E);const v=new Set,b=[];function o(i){if(!i.length)return[];const n=i[0];if(b.includes(n))return console.warn(`Yield to cycle detected for ${n.providerId}`),i;if(v.has(n))return o(i.slice(1));let t=[];const a=S.get(n);return a&&(b.push(n),t=o(a),b.pop()),v.add(n),[...t,n,...o(i.slice(1))]}return o(Array.from(E))}e.sortEditsByYieldTo=y}),define(ie[759],ne([1,0,92,6,2,35,12,72,36,11,5,102,42,43,93,154,117,217,155,460]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=e.GHOST_TEXT_DESCRIPTION=void 0,e.GHOST_TEXT_DESCRIPTION="ghost-text";let d=class extends y.Disposable{constructor(h,m,C){super(),this.editor=h,this.model=m,this.languageService=C,this.isDisposed=(0,E.observableValue)(this,!1),this.currentTextModel=(0,E.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=(0,E.derived)(this,w=>{if(this.isDisposed.read(w))return;const D=this.currentTextModel.read(w);if(D!==this.model.targetTextModel.read(w))return;const I=this.model.ghostText.read(w);if(!I)return;const M=I instanceof f.GhostTextReplacement?I.columnRange:void 0,A=[],O=[];function T(B,W){if(O.length>0){const V=O[O.length-1];W&&V.decorations.push(new a.LineDecoration(V.content.length+1,V.content.length+1+B[0].length,W,0)),V.content+=B[0],B=B.slice(1)}for(const V of B)O.push({content:V,decorations:W?[new a.LineDecoration(1,V.length+1,W,0)]:[]})}const N=D.getLineContent(I.lineNumber);let P,x=0;for(const B of I.parts){let W=B.lines;P===void 0?(A.push({column:B.column,text:W[0],preview:B.preview}),W=W.slice(1)):T([N.substring(x,B.column-1)],void 0),W.length>0&&(T(W,e.GHOST_TEXT_DESCRIPTION),P===void 0&&B.column<=N.length&&(P=B.column)),x=B.column-1}P!==void 0&&T([N.substring(x)],void 0);const R=P!==void 0?new c.ColumnRange(P,N.length+1):void 0;return{replacedRange:M,inlineTexts:A,additionalLines:O,hiddenRange:R,lineNumber:I.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(w),targetTextModel:D}}),this.decorations=(0,E.derived)(this,w=>{const D=this.uiState.read(w);if(!D)return[];const I=[];D.replacedRange&&I.push({range:D.replacedRange.toRange(D.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),D.hiddenRange&&I.push({range:D.hiddenRange.toRange(D.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const M of D.inlineTexts)I.push({range:b.Range.fromPositions(new v.Position(D.lineNumber,M.column)),options:{description:e.GHOST_TEXT_DESCRIPTION,after:{content:M.text,inlineClassName:M.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:n.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return I}),this.additionalLinesWidget=this._register(new r(this.editor,this.languageService.languageIdCodec,(0,E.derived)(w=>{const D=this.uiState.read(w);return D?{lineNumber:D.lineNumber,additionalLines:D.additionalLines,minReservedLineCount:D.additionalReservedLineCount,targetTextModel:D.targetTextModel}:void 0}))),this._register((0,y.toDisposable)(()=>{this.isDisposed.set(!0,void 0)})),this._register((0,c.applyObservableDecorations)(this.editor,this.decorations))}ownsViewZone(h){return this.additionalLinesWidget.viewZoneId===h}};e.GhostTextWidget=d,e.GhostTextWidget=d=Ee([he(2,i.ILanguageService)],d);class r extends y.Disposable{get viewZoneId(){return this._viewZoneId}constructor(h,m,C){super(),this.editor=h,this.languageIdCodec=m,this.lines=C,this._viewZoneId=void 0,this.editorOptionsChanged=(0,E.observableSignalFromEvent)("editorOptionChanged",k.Event.filter(this.editor.onDidChangeConfiguration,w=>w.hasChanged(33)||w.hasChanged(116)||w.hasChanged(98)||w.hasChanged(93)||w.hasChanged(51)||w.hasChanged(50)||w.hasChanged(66))),this._register((0,E.autorun)(w=>{const D=this.lines.read(w);this.editorOptionsChanged.read(w),D?this.updateLines(D.lineNumber,D.additionalLines,D.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(h=>{this._viewZoneId&&(h.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(h,m,C){const w=this.editor.getModel();if(!w)return;const{tabSize:D}=w.getOptions();this.editor.changeViewZones(I=>{this._viewZoneId&&(I.removeZone(this._viewZoneId),this._viewZoneId=void 0);const M=Math.max(m.length,C);if(M>0){const A=document.createElement("div");l(A,D,m,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=I.addZone({afterLineNumber:h,heightInLines:M,domNode:A,afterColumnAffinity:1})}})}}function l(g,h,m,C,w){const D=C.get(33),I=C.get(116),M="none",A=C.get(93),O=C.get(51),T=C.get(50),N=C.get(66),P=new o.StringBuilder(1e4);P.appendString('
    ');for(let B=0,W=m.length;B');const F=_.isBasicASCII(U),j=_.containsRTL(U),J=t.LineTokens.createEmpty(U,w);(0,u.renderViewLine)(new u.RenderLineInput(T.isMonospace&&!D,T.canUseHalfwidthRightwardsArrow,U,!1,F,j,0,J,V.decorations,h,0,T.spaceWidth,T.middotWidth,T.wsmiddotWidth,I,M,A,O!==S.EditorFontLigatures.OFF,null),P),P.appendString("
    ")}P.appendString(""),(0,p.applyFontInfo)(g,T);const x=P.build(),R=s?s.createHTML(x):x;g.innerHTML=R}const s=(0,L.createTrustedTypesPolicy)("editorGhostText",{createHTML:g=>g})}),define(ie[134],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,L.createDecorator)("themeService")}),define(ie[161],ne([1,0,8,729]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.SoundSource=e.Sound=e.IAudioCueService=void 0,e.IAudioCueService=(0,L.createDecorator)("audioCue");class y{static register(S){return new y(S.fileName)}constructor(S){this.fileName=S}}e.Sound=y,y.error=y.register({fileName:"error.mp3"}),y.warning=y.register({fileName:"warning.mp3"}),y.foldedArea=y.register({fileName:"foldedAreas.mp3"}),y.break=y.register({fileName:"break.mp3"}),y.quickFixes=y.register({fileName:"quickFixes.mp3"}),y.taskCompleted=y.register({fileName:"taskCompleted.mp3"}),y.taskFailed=y.register({fileName:"taskFailed.mp3"}),y.terminalBell=y.register({fileName:"terminalBell.mp3"}),y.diffLineInserted=y.register({fileName:"diffLineInserted.mp3"}),y.diffLineDeleted=y.register({fileName:"diffLineDeleted.mp3"}),y.diffLineModified=y.register({fileName:"diffLineModified.mp3"}),y.chatRequestSent=y.register({fileName:"chatRequestSent.mp3"}),y.chatResponsePending=y.register({fileName:"chatResponsePending.mp3"}),y.chatResponseReceived1=y.register({fileName:"chatResponseReceived1.mp3"}),y.chatResponseReceived2=y.register({fileName:"chatResponseReceived2.mp3"}),y.chatResponseReceived3=y.register({fileName:"chatResponseReceived3.mp3"}),y.chatResponseReceived4=y.register({fileName:"chatResponseReceived4.mp3"}),y.clear=y.register({fileName:"clear.mp3"}),y.save=y.register({fileName:"save.mp3"}),y.format=y.register({fileName:"format.mp3"});class E{constructor(S){this.randomOneOf=S}}e.SoundSource=E;class _{static register(S){const v=new E("randomOneOf"in S.sound?S.sound.randomOneOf:[S.sound]),b=new _(v,S.name,S.settingsKey);return _._audioCues.add(b),b}constructor(S,v,b){this.sound=S,this.name=v,this.settingsKey=b}}e.AudioCue=_,_._audioCues=new Set,_.error=_.register({name:(0,k.localize)(0,null),sound:y.error,settingsKey:"audioCues.lineHasError"}),_.warning=_.register({name:(0,k.localize)(1,null),sound:y.warning,settingsKey:"audioCues.lineHasWarning"}),_.foldedArea=_.register({name:(0,k.localize)(2,null),sound:y.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),_.break=_.register({name:(0,k.localize)(3,null),sound:y.break,settingsKey:"audioCues.lineHasBreakpoint"}),_.inlineSuggestion=_.register({name:(0,k.localize)(4,null),sound:y.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),_.terminalQuickFix=_.register({name:(0,k.localize)(5,null),sound:y.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),_.onDebugBreak=_.register({name:(0,k.localize)(6,null),sound:y.break,settingsKey:"audioCues.onDebugBreak"}),_.noInlayHints=_.register({name:(0,k.localize)(7,null),sound:y.error,settingsKey:"audioCues.noInlayHints"}),_.taskCompleted=_.register({name:(0,k.localize)(8,null),sound:y.taskCompleted,settingsKey:"audioCues.taskCompleted"}),_.taskFailed=_.register({name:(0,k.localize)(9,null),sound:y.taskFailed,settingsKey:"audioCues.taskFailed"}),_.terminalCommandFailed=_.register({name:(0,k.localize)(10,null),sound:y.error,settingsKey:"audioCues.terminalCommandFailed"}),_.terminalBell=_.register({name:(0,k.localize)(11,null),sound:y.terminalBell,settingsKey:"audioCues.terminalBell"}),_.notebookCellCompleted=_.register({name:(0,k.localize)(12,null),sound:y.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),_.notebookCellFailed=_.register({name:(0,k.localize)(13,null),sound:y.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),_.diffLineInserted=_.register({name:(0,k.localize)(14,null),sound:y.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),_.diffLineDeleted=_.register({name:(0,k.localize)(15,null),sound:y.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),_.diffLineModified=_.register({name:(0,k.localize)(16,null),sound:y.diffLineModified,settingsKey:"audioCues.diffLineModified"}),_.chatRequestSent=_.register({name:(0,k.localize)(17,null),sound:y.chatRequestSent,settingsKey:"audioCues.chatRequestSent"}),_.chatResponseReceived=_.register({name:(0,k.localize)(18,null),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[y.chatResponseReceived1,y.chatResponseReceived2,y.chatResponseReceived3,y.chatResponseReceived4]}}),_.chatResponsePending=_.register({name:(0,k.localize)(19,null),sound:y.chatResponsePending,settingsKey:"audioCues.chatResponsePending"}),_.clear=_.register({name:(0,k.localize)(20,null),sound:y.clear,settingsKey:"audioCues.clear"}),_.save=_.register({name:(0,k.localize)(21,null),sound:y.save,settingsKey:"audioCues.save"}),_.format=_.register({name:(0,k.localize)(22,null),sound:y.format,settingsKey:"audioCues.format"})}),define(ie[103],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,L.createDecorator)("clipboardService")}),define(ie[25],ne([1,0,6,49,2,66,20,8]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,p.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new L.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(S,v){if(!S)throw new Error("invalid command");if(typeof S=="string"){if(!v)throw new Error("invalid command");return this.registerCommand({id:S,handler:v})}if(S.metadata&&Array.isArray(S.metadata.args)){const t=[];for(const u of S.metadata.args)t.push(u.constraint);const a=S.handler;S.handler=function(u,...f){return(0,_.validateConstraints)(f,t),a(u,...f)}}const{id:b}=S;let o=this._commands.get(b);o||(o=new E.LinkedList,this._commands.set(b,o));const i=o.unshift(S),n=(0,y.toDisposable)(()=>{i();const t=this._commands.get(b);t?.isEmpty()&&this._commands.delete(b)});return this._onDidRegisterCommand.fire(b),n}registerCommandAlias(S,v){return e.CommandsRegistry.registerCommand(S,(b,...o)=>b.get(e.ICommandService).executeCommand(v,...o))}getCommand(S){const v=this._commands.get(S);if(!(!v||v.isEmpty()))return k.Iterable.first(v)}getCommands(){const S=new Map;for(const v of this._commands.keys()){const b=this.getCommand(v);b&&S.set(v,b)}return S}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(ie[340],ne([1,0,19,9,2,20,22,52,25,18]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class b{constructor(){this.lenses=[],this._disposables=new y.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(n,t){this._disposables.add(n);for(const a of n.lenses)this.lenses.push({symbol:a,provider:t})}}e.CodeLensModel=b;async function o(i,n,t){const a=i.ordered(n),u=new Map,f=new b,c=a.map(async(d,r)=>{u.set(d,r);try{const l=await Promise.resolve(d.provideCodeLenses(n,t));l&&f.add(l,d)}catch(l){(0,k.onUnexpectedExternalError)(l)}});return await Promise.all(c),f.lenses=f.lenses.sort((d,r)=>d.symbol.range.startLineNumberr.symbol.range.startLineNumber?1:u.get(d.provider)u.get(r.provider)?1:d.symbol.range.startColumnr.symbol.range.startColumn?1:0),f}e.getCodeLensModel=o,S.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(i,...n){let[t,a]=n;(0,E.assertType)(_.URI.isUri(t)),(0,E.assertType)(typeof a=="number"||!a);const{codeLensProvider:u}=i.get(v.ILanguageFeaturesService),f=i.get(p.IModelService).getModel(t);if(!f)throw(0,k.illegalArgument)();const c=[],d=new y.DisposableStore;return o(u,f,L.CancellationToken.None).then(r=>{d.add(r);const l=[];for(const s of r.lenses)a==null||s.symbol.command?c.push(s.symbol):a-- >0&&s.provider.resolveCodeLens&&l.push(Promise.resolve(s.provider.resolveCodeLens(f,s.symbol,L.CancellationToken.None)).then(g=>c.push(g||s.symbol)));return Promise.all(l)}).then(()=>c).finally(()=>{setTimeout(()=>d.dispose(),100)})})}),define(ie[760],ne([1,0,13,19,9,2,20,22,5,52,25,18]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class i{constructor(u,f){this._link=u,this._provider=f}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(u){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,u)).then(f=>(this._link=f||this._link,this._link.url?this.resolve(u):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}}e.Link=i;class n{constructor(u){this._disposables=new E.DisposableStore;let f=[];for(const[c,d]of u){const r=c.links.map(l=>new i(l,d));f=n._union(f,r),(0,E.isDisposable)(c)&&this._disposables.add(c)}this.links=f}dispose(){this._disposables.dispose(),this.links.length=0}static _union(u,f){const c=[];let d,r,l,s;for(d=0,l=0,r=u.length,s=f.length;dPromise.resolve(r.provideLinks(u,f)).then(s=>{s&&(c[l]=[s,r])},y.onUnexpectedExternalError));return Promise.all(d).then(()=>{const r=new n((0,L.coalesce)(c));return f.isCancellationRequested?(r.dispose(),new n([])):r})}e.getLinks=t,b.CommandsRegistry.registerCommand("_executeLinkProvider",async(a,...u)=>{let[f,c]=u;(0,_.assertType)(f instanceof p.URI),typeof c!="number"&&(c=0);const{linkProvider:d}=a.get(o.ILanguageFeaturesService),r=a.get(v.IModelService).getModel(f);if(!r)return[];const l=await t(d,r,k.CancellationToken.None);if(!l)return[];for(let g=0;g0?h[0]:[]}async function u(s,g,h,m,C){const w=a(s,g),D=await Promise.all(w.map(async I=>{let M,A=null;try{M=await I.provideDocumentSemanticTokens(g,I===h?m:null,C)}catch(O){A=O,M=null}return(!M||!o(M)&&!i(M))&&(M=null),new n(I,M,A)}));for(const I of D){if(I.error)throw I.error;if(I.tokens)return I}return D.length>0?D[0]:null}e.getDocumentSemanticTokens=u;function f(s,g){const h=s.orderedGroups(g);return h.length>0?h[0]:null}class c{constructor(g,h){this.provider=g,this.tokens=h}}function d(s,g){return s.has(g)}e.hasDocumentRangeSemanticTokensProvider=d;function r(s,g){const h=s.orderedGroups(g);return h.length>0?h[0]:[]}async function l(s,g,h,m){const C=r(s,g),w=await Promise.all(C.map(async D=>{let I;try{I=await D.provideDocumentRangeSemanticTokens(g,h,m)}catch(M){(0,k.onUnexpectedExternalError)(M),I=null}return(!I||!o(I))&&(I=null),new c(D,I)}));for(const D of w)if(D.tokens)return D;return w.length>0?w[0]:null}e.getDocumentRangeSemanticTokens=l,_.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(s,...g)=>{const[h]=g;(0,p.assertType)(h instanceof y.URI);const m=s.get(E.IModelService).getModel(h);if(!m)return;const{documentSemanticTokensProvider:C}=s.get(b.ILanguageFeaturesService),w=f(C,m);return w?w[0].getLegend():s.get(_.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",h)}),_.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(s,...g)=>{const[h]=g;(0,p.assertType)(h instanceof y.URI);const m=s.get(E.IModelService).getModel(h);if(!m)return;const{documentSemanticTokensProvider:C}=s.get(b.ILanguageFeaturesService);if(!t(C,m))return s.get(_.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",h,m.getFullModelRange());const w=await u(C,m,null,null,L.CancellationToken.None);if(!w)return;const{provider:D,tokens:I}=w;if(!I||!o(I))return;const M=(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:I.data});return I.resultId&&D.releaseDocumentSemanticTokens(I.resultId),M}),_.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(s,...g)=>{const[h,m]=g;(0,p.assertType)(h instanceof y.URI);const C=s.get(E.IModelService).getModel(h);if(!C)return;const{documentRangeSemanticTokensProvider:w}=s.get(b.ILanguageFeaturesService),D=r(w,C);if(D.length===0)return;if(D.length===1)return D[0].getLegend();if(!m||!v.Range.isIRange(m))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),D[0].getLegend();const I=await l(w,C,v.Range.lift(m),L.CancellationToken.None);if(I)return I.provider.getLegend()}),_.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(s,...g)=>{const[h,m]=g;(0,p.assertType)(h instanceof y.URI),(0,p.assertType)(v.Range.isIRange(m));const C=s.get(E.IModelService).getModel(h);if(!C)return;const{documentRangeSemanticTokensProvider:w}=s.get(b.ILanguageFeaturesService),D=await l(w,C,v.Range.lift(m),L.CancellationToken.None);if(!(!D||!D.tokens))return(0,S.encodeSemanticTokensDto)({id:0,type:"full",data:D.tokens.data})})}),define(ie[28],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=(0,L.createDecorator)("configurationService");function k(v,b){const o=Object.create(null);for(const i in v)y(o,i,v[i],b);return o}e.toValuesTree=k;function y(v,b,o,i){const n=b.split("."),t=n.pop();let a=v;for(let u=0;u"u"?o:t}e.getConfigurationValue=p;function S(v){return v.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=S}),define(ie[342],ne([1,0,2,31,159,310,28]),function(Q,e,L,k,y,E,_){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const S=5;class v{static create(d,r){return this._INSTANCE.create(d,r)}constructor(d){this._maxCacheDepth=d,this._entries=Object.create(null)}create(d,r){if(d!==null&&d.depth>=this._maxCacheDepth)return new b(d,r);let l=b.getStackElementId(d);l.length>0&&(l+="|"),l+=r;let s=this._entries[l];return s||(s=new b(d,r),this._entries[l]=s,s)}}v._INSTANCE=new v(S);class b{constructor(d,r){this.parent=d,this.state=r,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(d){let r="";for(;d!==null;)r.length>0&&(r+="|"),r+=d.state,d=d.parent;return r}static _equals(d,r){for(;d!==null&&r!==null;){if(d===r)return!0;if(d.state!==r.state)return!1;d=d.parent,r=r.parent}return d===null&&r===null}equals(d){return b._equals(this,d)}push(d){return v.create(this,d)}pop(){return this.parent}popall(){let d=this;for(;d.parent;)d=d.parent;return d}switchTo(d){return v.create(this.parent,d)}}class o{constructor(d,r){this.languageId=d,this.state=r}equals(d){return this.languageId===d.languageId&&this.state.equals(d.state)}clone(){return this.state.clone()===this.state?this:new o(this.languageId,this.state)}}class i{static create(d,r){return this._INSTANCE.create(d,r)}constructor(d){this._maxCacheDepth=d,this._entries=Object.create(null)}create(d,r){if(r!==null)return new n(d,r);if(d!==null&&d.depth>=this._maxCacheDepth)return new n(d,r);const l=b.getStackElementId(d);let s=this._entries[l];return s||(s=new n(d,null),this._entries[l]=s,s)}}i._INSTANCE=new i(S);class n{constructor(d,r){this.stack=d,this.embeddedLanguageData=r}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:i.create(this.stack,this.embeddedLanguageData)}equals(d){return!(d instanceof n)||!this.stack.equals(d.stack)?!1:this.embeddedLanguageData===null&&d.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||d.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(d.embeddedLanguageData)}}class t{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(d){this._languageId=d}emit(d,r){this._lastTokenType===r&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=r,this._lastTokenLanguage=this._languageId,this._tokens.push(new k.Token(d,r,this._languageId)))}nestedLanguageTokenize(d,r,l,s){const g=l.languageId,h=l.state,m=k.TokenizationRegistry.get(g);if(!m)return this.enterLanguage(g),this.emit(s,""),h;const C=m.tokenize(d,r,h);if(s!==0)for(const w of C.tokens)this._tokens.push(new k.Token(w.offset+s,w.type,w.language));else this._tokens=this._tokens.concat(C.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,C.endState}finalize(d){return new k.TokenizationResult(this._tokens,d)}}class a{constructor(d,r){this._languageService=d,this._theme=r,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(d){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(d)}emit(d,r){const l=this._theme.match(this._currentLanguageId,r)|1024;this._lastTokenMetadata!==l&&(this._lastTokenMetadata=l,this._tokens.push(d),this._tokens.push(l))}static _merge(d,r,l){const s=d!==null?d.length:0,g=r.length,h=l!==null?l.length:0;if(s===0&&g===0&&h===0)return new Uint32Array(0);if(s===0&&g===0)return l;if(g===0&&h===0)return d;const m=new Uint32Array(s+g+h);d!==null&&m.set(d);for(let C=0;C{if(h)return;let C=!1;for(let w=0,D=m.changedLanguages.length;w{m.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const d=[];for(const r in this._embeddedLanguages){const l=k.TokenizationRegistry.get(r);if(l){if(l instanceof p){const s=l.getLoadStatus();s.loaded===!1&&d.push(s.promise)}continue}k.TokenizationRegistry.isResolved(r)||d.push(k.TokenizationRegistry.getOrCreate(r))}return d.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(d).then(r=>{})}}getInitialState(){const d=v.create(null,this._lexer.start);return i.create(d,null)}tokenize(d,r,l){if(d.length>=this._maxTokenizationLineLength)return(0,y.nullTokenize)(this._languageId,l);const s=new t,g=this._tokenize(d,r,l,s);return s.finalize(g)}tokenizeEncoded(d,r,l){if(d.length>=this._maxTokenizationLineLength)return(0,y.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),l);const s=new a(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),g=this._tokenize(d,r,l,s);return s.finalize(g)}_tokenize(d,r,l,s){return l.embeddedLanguageData?this._nestedTokenize(d,r,l,0,s):this._myTokenize(d,r,l,0,s)}_findLeavingNestedLanguageOffset(d,r){let l=this._lexer.tokenizer[r.stack.state];if(!l&&(l=E.findRules(this._lexer,r.stack.state),!l))throw E.createError(this._lexer,"tokenizer state is not defined: "+r.stack.state);let s=-1,g=!1;for(const h of l){if(!E.isIAction(h.action)||h.action.nextEmbedded!=="@pop")continue;g=!0;let m=h.regex;const C=h.regex.source;if(C.substr(0,4)==="^(?:"&&C.substr(C.length-1,1)===")"){const D=(m.ignoreCase?"i":"")+(m.unicode?"u":"");m=new RegExp(C.substr(4,C.length-5),D)}const w=d.search(m);w===-1||w!==0&&h.matchOnlyAtLineStart||(s===-1||w0&&g.nestedLanguageTokenize(m,!1,l.embeddedLanguageData,s);const C=d.substring(h);return this._myTokenize(C,r,l,s+h,g)}_safeRuleName(d){return d?d.name:"(unknown)"}_myTokenize(d,r,l,s,g){g.enterLanguage(this._languageId);const h=d.length,m=r&&this._lexer.includeLF?d+` `:d,C=m.length;let w=l.embeddedLanguageData,D=l.stack,I=0,M=null,A=!0;for(;A||I=C)break;A=!1;let j=this._lexer.tokenizer[P];if(!j&&(j=E.findRules(this._lexer,P),!j))throw E.createError(this._lexer,"tokenizer state is not defined: "+P);const J=m.substr(I);for(const le of j)if((I===0||!le.matchOnlyAtLineStart)&&(x=J.match(le.regex),x)){R=x[0],B=le.action;break}}if(x||(x=[""],R=""),B||(I=this._lexer.maxStack)throw E.createError(this._lexer,"maximum tokenizer stack size reached: ["+D.state+","+D.parent.state+",...]");D=D.push(P)}else if(B.next==="@pop"){if(D.depth<=1)throw E.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(W));D=D.pop()}else if(B.next==="@popall")D=D.popall();else{let j=E.substituteMatches(this._lexer,B.next,R,x,P);if(j[0]==="@"&&(j=j.substr(1)),E.findRules(this._lexer,j))D=D.push(j);else throw E.createError(this._lexer,"trying to set a next state '"+j+"' that is undefined in rule: "+this._safeRuleName(W))}}B.log&&typeof B.log=="string"&&E.log(this._lexer,this._lexer.languageId+": "+E.substituteMatches(this._lexer,B.log,R,x,P))}if(U===null)throw E.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(W));const F=j=>{const J=this._languageService.getLanguageIdByLanguageName(j)||this._languageService.getLanguageIdByMimeType(j)||j,le=this._getNestedEmbeddedLanguageData(J);if(I0)throw E.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(W));if(x.length!==U.length+1)throw E.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(W));let j=0;for(let J=1;Jt});class b{static colorizeElement(a,u,f,c){c=c||{};const d=c.theme||"vs",r=c.mimeType||f.getAttribute("lang")||f.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();const l=u.getLanguageIdByMimeType(r)||r;a.setTheme(d);const s=f.firstChild?f.firstChild.nodeValue:"";f.className+=" "+d;const g=h=>{var m;const C=(m=v?.createHTML(h))!==null&&m!==void 0?m:h;f.innerHTML=C};return this.colorize(u,s||"",l,c).then(g,h=>console.error(h))}static async colorize(a,u,f,c){const d=a.languageIdCodec;let r=4;c&&typeof c.tabSize=="number"&&(r=c.tabSize),k.startsWithUTF8BOM(u)&&(u=u.substr(1));const l=k.splitLines(u);if(!a.isRegisteredLanguageId(f))return i(l,r,d);const s=await y.TokenizationRegistry.getOrCreate(f);return s?o(l,r,s,d):i(l,r,d)}static colorizeLine(a,u,f,c,d=4){const r=p.ViewLineRenderingData.isBasicASCII(a,u),l=p.ViewLineRenderingData.containsRTL(a,r,f);return(0,_.renderViewLine2)(new _.RenderLineInput(!1,!0,a,!1,r,l,0,c,[],d,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(a,u,f=4){const c=a.getLineContent(u);a.tokenization.forceTokenization(u);const r=a.tokenization.getLineTokens(u).inflate();return this.colorizeLine(c,a.mightContainNonBasicASCII(),a.mightContainRTL(),r,f)}}e.Colorizer=b;function o(t,a,u,f){return new Promise((c,d)=>{const r=()=>{const l=n(t,a,u,f);if(u instanceof S.MonarchTokenizer){const s=u.getLoadStatus();if(s.loaded===!1){s.promise.then(r,d);return}}c(l)};r()})}function i(t,a,u){let f=[];const d=new Uint32Array(2);d[0]=0,d[1]=33587200;for(let r=0,l=t.length;r")}return f.join("")}function n(t,a,u,f){let c=[],d=u.getInitialState();for(let r=0,l=t.length;r"),d=g.endState}return c.join("")}}),define(ie[15],ne([1,0,17,12,751,8,732]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=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.Parser=void 0;const p=new Map;p.set("false",!1),p.set("true",!0),p.set("isMac",L.isMacintosh),p.set("isLinux",L.isLinux),p.set("isWindows",L.isWindows),p.set("isWeb",L.isWeb),p.set("isMacNative",L.isMacintosh&&!L.isWeb),p.set("isEdge",L.isEdge),p.set("isFirefox",L.isFirefox),p.set("isChrome",L.isChrome),p.set("isSafari",L.isSafari);const S=Object.prototype.hasOwnProperty,v={regexParsingWithErrorRecovery:!0},b=(0,_.localize)(0,null),o=(0,_.localize)(1,null),i=(0,_.localize)(2,null),n=(0,_.localize)(3,null),t=(0,_.localize)(4,null),a=(0,_.localize)(5,null),u=(0,_.localize)(6,null),f=(0,_.localize)(7,null);class c{constructor($=v){this._config=$,this._scanner=new y.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse($){if($===""){this._parsingErrors.push({message:b,offset:0,lexeme:"",additionalInfo:o});return}this._tokens=this._scanner.reset($).scan(),this._current=0,this._parsingErrors=[];try{const te=this._expr();if(!this._isAtEnd()){const G=this._peek(),de=G.type===17?a:void 0;throw this._parsingErrors.push({message:t,offset:G.offset,lexeme:y.Scanner.getLexeme(G),additionalInfo:de}),c._parseError}return te}catch(te){if(te!==c._parseError)throw te;return}}_expr(){return this._or()}_or(){const $=[this._and()];for(;this._matchOne(16);){const te=this._and();$.push(te)}return $.length===1?$[0]:d.or(...$)}_and(){const $=[this._term()];for(;this._matchOne(15);){const te=this._term();$.push(te)}return $.length===1?$[0]:d.and(...$)}_term(){if(this._matchOne(2)){const $=this._peek();switch($.type){case 11:return this._advance(),s.INSTANCE;case 12:return this._advance(),g.INSTANCE;case 0:{this._advance();const te=this._expr();return this._consume(1,n),te?.negate()}case 17:return this._advance(),I.create($.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",$)}}return this._primary()}_primary(){const $=this._peek();switch($.type){case 11:return this._advance(),d.true();case 12:return this._advance(),d.false();case 0:{this._advance();const te=this._expr();return this._consume(1,n),te}case 17:{const te=$.lexeme;if(this._advance(),this._matchOne(9)){const de=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),de.type!==10)throw this._errExpectedButGot("REGEX",de);const ue=de.lexeme,X=ue.lastIndexOf("/"),Z=X===ue.length-1?void 0:this._removeFlagsGY(ue.substring(X+1));let re;try{re=new RegExp(ue.substring(1,X),Z)}catch{throw this._errExpectedButGot("REGEX",de)}return P.create(te,re)}switch(de.type){case 10:case 19:{const ue=[de.lexeme];this._advance();let X=this._peek(),Z=0;for(let H=0;H=0){const oe=ue.slice(Z+1,re),Y=ue[re+1]==="i"?"i":"";try{X=new RegExp(oe,Y)}catch{throw this._errExpectedButGot("REGEX",de)}}}if(X===null)throw this._errExpectedButGot("REGEX",de);return P.create(te,X)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,i);const de=this._value();return d.notIn(te,de)}switch(this._peek().type){case 3:{this._advance();const de=this._value();if(this._previous().type===18)return d.equals(te,de);switch(de){case"true":return d.has(te);case"false":return d.not(te);default:return d.equals(te,de)}}case 4:{this._advance();const de=this._value();if(this._previous().type===18)return d.notEquals(te,de);switch(de){case"true":return d.not(te);case"false":return d.has(te);default:return d.notEquals(te,de)}}case 5:return this._advance(),T.create(te,this._value());case 6:return this._advance(),N.create(te,this._value());case 7:return this._advance(),A.create(te,this._value());case 8:return this._advance(),O.create(te,this._value());case 13:return this._advance(),d.in(te,this._value());default:return d.has(te)}}case 20:throw this._parsingErrors.push({message:u,offset:$.offset,lexeme:"",additionalInfo:f}),c._parseError;default:throw this._errExpectedButGot(`true | false | KEY | KEY '=~' REGEX | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const $=this._peek();switch($.type){case 17:case 18:return this._advance(),$.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY($){return $.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne($){return this._check($)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume($,te){if(this._check($))return this._advance();throw this._errExpectedButGot(te,this._peek())}_errExpectedButGot($,te,G){const de=(0,_.localize)(8,null,$,y.Scanner.getLexeme(te)),ue=te.offset,X=y.Scanner.getLexeme(te);return this._parsingErrors.push({message:de,offset:ue,lexeme:X,additionalInfo:G}),c._parseError}_check($){return this._peek().type===$}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=c,c._parseError=new Error;class d{static false(){return s.INSTANCE}static true(){return g.INSTANCE}static has($){return h.create($)}static equals($,te){return m.create($,te)}static notEquals($,te){return D.create($,te)}static regex($,te){return P.create($,te)}static in($,te){return C.create($,te)}static notIn($,te){return w.create($,te)}static not($){return I.create($)}static and(...$){return B.create($,null,!0)}static or(...$){return W.create($,null,!0)}static deserialize($){return $==null?void 0:this._parser.parse($)}}e.ContextKeyExpr=d,d._parser=new c({regexParsingWithErrorRecovery:!1});function r(ee,$){const te=ee?ee.substituteConstants():void 0,G=$?$.substituteConstants():void 0;return!te&&!G?!0:!te||!G?!1:te.equals(G)}e.expressionsAreEqualWithConstantSubstitution=r;function l(ee,$){return ee.cmp($)}class s{constructor(){this.type=0}cmp($){return this.type-$.type}equals($){return $.type===this.type}substituteConstants(){return this}evaluate($){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}e.ContextKeyFalseExpr=s,s.INSTANCE=new s;class g{constructor(){this.type=1}cmp($){return this.type-$.type}equals($){return $.type===this.type}substituteConstants(){return this}evaluate($){return!0}serialize(){return"true"}keys(){return[]}negate(){return s.INSTANCE}}e.ContextKeyTrueExpr=g,g.INSTANCE=new g;class h{static create($,te=null){const G=p.get($);return typeof G=="boolean"?G?g.INSTANCE:s.INSTANCE:new h($,te)}constructor($,te){this.key=$,this.negated=te,this.type=2}cmp($){return $.type!==this.type?this.type-$.type:U(this.key,$.key)}equals($){return $.type===this.type?this.key===$.key:!1}substituteConstants(){const $=p.get(this.key);return typeof $=="boolean"?$?g.INSTANCE:s.INSTANCE:this}evaluate($){return!!$.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=I.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=h;class m{static create($,te,G=null){if(typeof te=="boolean")return te?h.create($,G):I.create($,G);const de=p.get($);return typeof de=="boolean"?te===(de?"true":"false")?g.INSTANCE:s.INSTANCE:new m($,te,G)}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=4}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){const $=p.get(this.key);if(typeof $=="boolean"){const te=$?"true":"false";return this.value===te?g.INSTANCE:s.INSTANCE}return this}evaluate($){return $.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=m;class C{static create($,te){return new C($,te)}constructor($,te){this.key=$,this.valueKey=te,this.type=10,this.negated=null}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.valueKey,$.key,$.valueKey)}equals($){return $.type===this.type?this.key===$.key&&this.valueKey===$.valueKey:!1}substituteConstants(){return this}evaluate($){const te=$.getValue(this.valueKey),G=$.getValue(this.key);return Array.isArray(te)?te.includes(G):typeof G=="string"&&typeof te=="object"&&te!==null?S.call(te,G):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=w.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=C;class w{static create($,te){return new w($,te)}constructor($,te){this.key=$,this.valueKey=te,this.type=11,this._negated=C.create($,te)}cmp($){return $.type!==this.type?this.type-$.type:this._negated.cmp($._negated)}equals($){return $.type===this.type?this._negated.equals($._negated):!1}substituteConstants(){return this}evaluate($){return!this._negated.evaluate($)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}e.ContextKeyNotInExpr=w;class D{static create($,te,G=null){if(typeof te=="boolean")return te?I.create($,G):h.create($,G);const de=p.get($);return typeof de=="boolean"?te===(de?"true":"false")?s.INSTANCE:g.INSTANCE:new D($,te,G)}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=5}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){const $=p.get(this.key);if(typeof $=="boolean"){const te=$?"true":"false";return this.value===te?s.INSTANCE:g.INSTANCE}return this}evaluate($){return $.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=m.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=D;class I{static create($,te=null){const G=p.get($);return typeof G=="boolean"?G?s.INSTANCE:g.INSTANCE:new I($,te)}constructor($,te){this.key=$,this.negated=te,this.type=3}cmp($){return $.type!==this.type?this.type-$.type:U(this.key,$.key)}equals($){return $.type===this.type?this.key===$.key:!1}substituteConstants(){const $=p.get(this.key);return typeof $=="boolean"?$?s.INSTANCE:g.INSTANCE:this}evaluate($){return!$.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=I;function M(ee,$){if(typeof ee=="string"){const te=parseFloat(ee);isNaN(te)||(ee=te)}return typeof ee=="string"||typeof ee=="number"?$(ee):s.INSTANCE}class A{static create($,te,G=null){return M(te,de=>new A($,de,G))}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=12}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){return this}evaluate($){return typeof this.value=="string"?!1:parseFloat($.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=A;class O{static create($,te,G=null){return M(te,de=>new O($,de,G))}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=13}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){return this}evaluate($){return typeof this.value=="string"?!1:parseFloat($.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=O;class T{static create($,te,G=null){return M(te,de=>new T($,de,G))}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=14}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){return this}evaluate($){return typeof this.value=="string"?!1:parseFloat($.getValue(this.key))new N($,de,G))}constructor($,te,G){this.key=$,this.value=te,this.negated=G,this.type=15}cmp($){return $.type!==this.type?this.type-$.type:F(this.key,this.value,$.key,$.value)}equals($){return $.type===this.type?this.key===$.key&&this.value===$.value:!1}substituteConstants(){return this}evaluate($){return typeof this.value=="string"?!1:parseFloat($.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=N;class P{static create($,te){return new P($,te)}constructor($,te){this.key=$,this.regexp=te,this.type=7,this.negated=null}cmp($){if($.type!==this.type)return this.type-$.type;if(this.key<$.key)return-1;if(this.key>$.key)return 1;const te=this.regexp?this.regexp.source:"",G=$.regexp?$.regexp.source:"";return teG?1:0}equals($){if($.type===this.type){const te=this.regexp?this.regexp.source:"",G=$.regexp?$.regexp.source:"";return this.key===$.key&&te===G}return!1}substituteConstants(){return this}evaluate($){const te=$.getValue(this.key);return this.regexp?this.regexp.test(te):!1}serialize(){const $=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${$}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}e.ContextKeyRegexExpr=P;class x{static create($){return new x($)}constructor($){this._actual=$,this.type=8}cmp($){return $.type!==this.type?this.type-$.type:this._actual.cmp($._actual)}equals($){return $.type===this.type?this._actual.equals($._actual):!1}substituteConstants(){return this}evaluate($){return!this._actual.evaluate($)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=x;function R(ee){let $=null;for(let te=0,G=ee.length;te$.expr.length)return 1;for(let te=0,G=this.expr.length;te1;){const X=de[de.length-1];if(X.type!==9)break;de.pop();const Z=de.pop(),re=de.length===0,oe=W.create(X.expr.map(Y=>B.create([Y,Z],null,G)),null,re);oe&&(de.push(oe),de.sort(l))}if(de.length===1)return de[0];if(G){for(let X=0;X$.serialize()).join(" && ")}keys(){const $=[];for(const te of this.expr)$.push(...te.keys());return $}negate(){if(!this.negated){const $=[];for(const te of this.expr)$.push(te.negate());this.negated=W.create($,this,!0)}return this.negated}}e.ContextKeyAndExpr=B;class W{static create($,te,G){return W._normalizeArr($,te,G)}constructor($,te){this.expr=$,this.negated=te,this.type=9}cmp($){if($.type!==this.type)return this.type-$.type;if(this.expr.length<$.expr.length)return-1;if(this.expr.length>$.expr.length)return 1;for(let te=0,G=this.expr.length;te$.serialize()).join(" || ")}keys(){const $=[];for(const te of this.expr)$.push(...te.keys());return $}negate(){if(!this.negated){const $=[];for(const te of this.expr)$.push(te.negate());for(;$.length>1;){const te=$.shift(),G=$.shift(),de=[];for(const ue of le(te))for(const X of le(G))de.push(B.create([ue,X],null,!1));$.unshift(W.create(de,null,!1))}this.negated=W.create($,this,!0)}return this.negated}}e.ContextKeyOrExpr=W;class V extends h{static all(){return V._info.values()}constructor($,te,G){super($,null),this._defaultValue=te,typeof G=="object"?V._info.push({...G,key:$}):G!==!0&&V._info.push({key:$,description:G,type:te!=null?typeof te:void 0})}bindTo($){return $.createKey(this.key,this._defaultValue)}getValue($){return $.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo($){return m.create(this.key,$)}}e.RawContextKey=V,V._info=[],e.IContextKeyService=(0,E.createDecorator)("contextKeyService");function U(ee,$){return ee<$?-1:ee>$?1:0}function F(ee,$,te,G){return eete?1:$G?1:0}function j(ee,$){if(ee.type===0||$.type===1)return!0;if(ee.type===9)return $.type===9?J(ee.expr,$.expr):!1;if($.type===9){for(const te of $.expr)if(j(ee,te))return!0;return!1}if(ee.type===6){if($.type===6)return J($.expr,ee.expr);for(const te of ee.expr)if(j(te,$))return!0;return!1}return ee.equals($)}e.implies=j;function J(ee,$){let te=0,G=0;for(;te{const n=this.model.read(i),t=n?.state.read(i),a=!!t?.inlineCompletion&&t?.ghostText!==void 0&&!t?.ghostText.isEmpty();this.inlineCompletionVisible.set(a),t?.ghostText&&t?.inlineCompletion&&this.suppressSuggestions.set(t.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,L.autorun)(i=>{const n=this.model.read(i);let t=!1,a=!0;const u=n?.ghostText.read(i);if(n?.selectedSuggestItem&&u&&u.parts.length>0){const{column:f,lines:c}=u.parts[0],d=c[0],r=n.textModel.getLineIndentColumn(u.lineNumber);if(f<=r){let s=(0,k.firstNonWhitespaceIndex)(d);s===-1&&(s=d.length-1),t=s>0;const g=n.textModel.getOptions().tabSize;a=y.CursorColumns.visibleColumnFromColumn(d,s+1,g){const[a,u,f]=t;(0,y.assertType)(E.URI.isUri(a)),(0,y.assertType)(_.Position.isIPosition(u)),(0,y.assertType)(typeof f=="string"||!f);const c=n.get(S.ILanguageFeaturesService),d=await n.get(v.ITextModelService).createModelReference(a);try{const r=await i(c.signatureHelpProvider,d.object.textEditorModel,_.Position.lift(u),{triggerKind:p.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:f},L.CancellationToken.None);return r?(setTimeout(()=>r.dispose(),0),r.value):void 0}finally{d.dispose()}})}),define(ie[762],ne([1,0,14,9,6,2,125,31,240]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var v;(function(i){i.Default={type:0};class n{constructor(u,f){this.request=u,this.previouslyActiveHints=f,this.type=2}}i.Pending=n;class t{constructor(u){this.hints=u,this.type=1}}i.Active=t})(v||(v={}));class b extends E.Disposable{constructor(n,t,a=b.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new y.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=v.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new E.MutableDisposable),this.triggerChars=new _.CharacterSet,this.retriggerChars=new _.CharacterSet,this.triggerId=0,this.editor=n,this.providers=t,this.throttledDelayer=new L.Delayer(a),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(u=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(u=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(u=>this.onCursorChange(u))),this._register(this.editor.onDidChangeModelContent(u=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(u=>this.onDidType(u))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(n){this._state.type===2&&this._state.request.cancel(),this._state=n}cancel(n=!1){this.state=v.Default,this.throttledDelayer.cancel(),n||this._onChangedHints.fire(void 0)}trigger(n,t){const a=this.editor.getModel();if(!a||!this.providers.has(a))return;const u=++this.triggerId;this._pendingTriggers.push(n),this.throttledDelayer.trigger(()=>this.doTrigger(u),t).catch(k.onUnexpectedError)}next(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,t=this.state.hints.activeSignature,a=t%n===n-1,u=this.editor.getOption(85).cycle;if((n<2||a)&&!u){this.cancel();return}this.updateActiveSignature(a&&u?0:t+1)}previous(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,t=this.state.hints.activeSignature,a=t===0,u=this.editor.getOption(85).cycle;if((n<2||a)&&!u){this.cancel();return}this.updateActiveSignature(a&&u?n-1:t-1)}updateActiveSignature(n){this.state.type===1&&(this.state=new v.Active({...this.state.hints,activeSignature:n}),this._onChangedHints.fire(this.state.hints))}async doTrigger(n){const t=this.state.type===1||this.state.type===2,a=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const u=this._pendingTriggers.reduce(o);this._pendingTriggers=[];const f={triggerKind:u.triggerKind,triggerCharacter:u.triggerCharacter,isRetrigger:t,activeSignatureHelp:a};if(!this.editor.hasModel())return!1;const c=this.editor.getModel(),d=this.editor.getPosition();this.state=new v.Pending((0,L.createCancelablePromise)(r=>(0,S.provideSignatureHelp)(this.providers,c,d,f,r)),a);try{const r=await this.state.request;return n!==this.triggerId?(r?.dispose(),!1):!r||!r.value.signatures||r.value.signatures.length===0?(r?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new v.Active(r.value),this._lastSignatureHelpResult.value=r,this._onChangedHints.fire(this.state.hints),!0)}catch(r){return n===this.triggerId&&(this.state=v.Default),(0,k.onUnexpectedError)(r),!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 n=this.editor.getModel();if(n)for(const t of this.providers.ordered(n)){for(const a of t.signatureHelpTriggerCharacters||[])if(a.length){const u=a.charCodeAt(0);this.triggerChars.add(u),this.retriggerChars.add(u)}for(const a of t.signatureHelpRetriggerCharacters||[])a.length&&this.retriggerChars.add(a.charCodeAt(0))}}onDidType(n){if(!this.triggerOnType)return;const t=n.length-1,a=n.charCodeAt(t);(this.triggerChars.has(a)||this.isTriggered&&this.retriggerChars.has(a))&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:n.charAt(t)})}onCursorChange(n){n.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:p.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=b,b.DEFAULT_DELAY=120;function o(i,n){switch(n.triggerKind){case p.SignatureHelpTriggerKind.Invoke:return n;case p.SignatureHelpTriggerKind.ContentChange:return i;case p.SignatureHelpTriggerKind.TriggerCharacter:default:return n}}}),define(ie[763],ne([1,0,15]),function(Q,e,L){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let y=k=class{constructor(_,p){this._editor=_,this._index=0,this._ckOtherSuggestions=k.OtherSuggestions.bindTo(p)}dispose(){this.reset()}reset(){var _;this._ckOtherSuggestions.reset(),(_=this._listener)===null||_===void 0||_.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:_,index:p},S){if(_.items.length===0){this.reset();return}if(k._moveIndex(!0,_,p)===p){this.reset();return}this._acceptNext=S,this._model=_,this._index=p,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(_,p,S){let v=S;for(let b=p.items.length;b>0&&(v=(v+p.items.length+(_?1:-1))%p.items.length,!(v===S||!p.items[v].completion.additionalTextEdits));b--);return v}next(){this._move(!0)}prev(){this._move(!1)}_move(_){if(this._model)try{this._ignore=!0,this._index=k._moveIndex(_,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};e.SuggestAlternatives=y,y.OtherSuggestions=new L.RawContextKey("hasOtherSuggestions",!1),e.SuggestAlternatives=y=k=Ee([he(1,L.IContextKeyService)],y)}),define(ie[764],ne([1,0,15]),function(Q,e,L){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let y=k=class{constructor(_,p){this._editor=_,this._enabled=!1,this._ckAtEnd=k.AtEnd.bindTo(p),this._configListener=this._editor.onDidChangeConfiguration(S=>S.hasChanged(122)&&this._update()),this._update()}dispose(){var _;this._configListener.dispose(),(_=this._selectionListener)===null||_===void 0||_.dispose(),this._ckAtEnd.reset()}_update(){const _=this._editor.getOption(122)==="on";if(this._enabled!==_)if(this._enabled=_,this._enabled){const p=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const S=this._editor.getModel(),v=this._editor.getSelection(),b=S.getWordAtPosition(v.getStartPosition());if(!b){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(b.endColumn===v.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(p),p()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};e.WordContextKey=y,y.AtEnd=new L.RawContextKey("atEndOfWord",!1),e.WordContextKey=y=k=Ee([he(1,L.IContextKeyService)],y)}),define(ie[69],ne([1,0,15,8]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAccessibleNotificationService=e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,k.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new L.RawContextKey("accessibilityModeEnabled",!1),e.IAccessibleNotificationService=(0,k.createDecorator)("accessibleNotificationService")}),define(ie[765],ne([1,0,54,13,6,2,55,17,325,332,486,202,36,147,235,69]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let u=class extends E.Disposable{constructor(h,m,C,w){super(),this._accessibilityService=w,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new y.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new i.ComputeOptionsMemory,this.isSimpleWidget=h,this._containerObserver=this._register(new S.ElementSizeObserver(C,m.dimension)),this._rawOptions=s(m),this._validatedOptions=l.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(n.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(o.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(v.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(L.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const h=this._computeOptions(),m=l.checkEquals(this.options,h);m!==null&&(this.options=h,this._onDidChangeFast.fire(m),this._onDidChange.fire(m))}_computeOptions(){const h=this._readEnvConfiguration(),m=t.BareFontInfo.createFromValidatedSettings(this._validatedOptions,h.pixelRatio,this.isSimpleWidget),C=this._readFontInfo(m),w={memory:this._computeOptionsMemory,outerWidth:h.outerWidth,outerHeight:h.outerHeight-this._reservedHeight,fontInfo:C,extraEditorClassName:h.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:h.emptySelectionClipboard,pixelRatio:h.pixelRatio,tabFocusMode:o.TabFocus.getTabFocusMode(),accessibilitySupport:h.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return l.computeOptions(this._validatedOptions,w)}_readEnvConfiguration(){return{extraEditorClassName:c(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:L.isWebKit||L.isFirefox,pixelRatio:L.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(h){return v.FontMeasurements.readFontInfo(h)}getRawOptions(){return this._rawOptions}updateOptions(h){const m=s(h);l.applyUpdate(this._rawOptions,m)&&(this._validatedOptions=l.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(h){this._containerObserver.observe(h)}setIsDominatedByLongLines(h){this._isDominatedByLongLines!==h&&(this._isDominatedByLongLines=h,this._recomputeOptions())}setModelLineCount(h){const m=f(h);this._lineNumbersDigitCount!==m&&(this._lineNumbersDigitCount=m,this._recomputeOptions())}setViewLineCount(h){this._viewLineCount!==h&&(this._viewLineCount=h,this._recomputeOptions())}setReservedHeight(h){this._reservedHeight!==h&&(this._reservedHeight=h,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(h){this._glyphMarginDecorationLaneCount!==h&&(this._glyphMarginDecorationLaneCount=h,this._recomputeOptions())}};e.EditorConfiguration=u,e.EditorConfiguration=u=Ee([he(3,a.IAccessibilityService)],u);function f(g){let h=0;for(;g;)g=Math.floor(g/10),h++;return h||1}function c(){let g="";return!L.isSafari&&!L.isWebkitWebView&&(g+="no-user-select "),L.isSafari&&(g+="no-minimap-shadow ",g+="enable-user-select "),p.isMacintosh&&(g+="mac "),g}class d{constructor(){this._values=[]}_read(h){return this._values[h]}get(h){return this._values[h]}_write(h,m){this._values[h]=m}}class r{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,m){this._values[h]=m}}e.ComputedEditorOptions=r;class l{static validateOptions(h){const m=new d;for(const C of i.editorOptionsRegistry){const w=C.name==="_never_"?void 0:h[C.name];m._write(C.id,C.validate(w))}return m}static computeOptions(h,m){const C=new r;for(const w of i.editorOptionsRegistry)C._write(w.id,w.compute(m,C,h._read(w.id)));return C}static _deepEquals(h,m){if(typeof h!="object"||typeof m!="object"||!h||!m)return h===m;if(Array.isArray(h)||Array.isArray(m))return Array.isArray(h)&&Array.isArray(m)?k.equals(h,m):!1;if(Object.keys(h).length!==Object.keys(m).length)return!1;for(const C in h)if(!l._deepEquals(h[C],m[C]))return!1;return!0}static checkEquals(h,m){const C=[];let w=!1;for(const D of i.editorOptionsRegistry){const I=!l._deepEquals(h._read(D.id),m._read(D.id));C[D.id]=I,I&&(w=!0)}return w?new i.ConfigurationChangedEvent(C):null}static applyUpdate(h,m){let C=!1;for(const w of i.editorOptionsRegistry)if(m.hasOwnProperty(w.name)){const D=w.applyUpdate(h[w.name],m[w.name]);h[w.name]=D.newValue,C=C||D.didChange}return C}}function s(g){const h=_.deepClone(g);return(0,b.migrateOptions)(h),h}}),define(ie[766],ne([1,0,6,49,2,55,199,22,731,25,28,15]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const i="data-keybinding-context";class n{constructor(D,I){this._id=D,this._parent=I,this._value=Object.create(null),this._value._contextId=D}get value(){return{...this._value}}setValue(D,I){return this._value[D]!==I?(this._value[D]=I,!0):!1}removeValue(D){return D in this._value?(delete this._value[D],!0):!1}getValue(D){const I=this._value[D];return typeof I>"u"&&this._parent?this._parent.getValue(D):I}}e.Context=n;class t extends n{constructor(){super(-1,null)}setValue(D,I){return!1}removeValue(D){return!1}getValue(D){}}t.INSTANCE=new t;class a extends n{constructor(D,I,M){super(D,null),this._configurationService=I,this._values=_.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(A=>{if(A.source===7){const O=Array.from(this._values,([T])=>T);this._values.clear(),M.fire(new c(O))}else{const O=[];for(const T of A.affectedKeys){const N=`config.${T}`,P=this._values.findSuperstr(N);P!==void 0&&(O.push(...k.Iterable.map(P,([x])=>x)),this._values.deleteSuperstr(N)),this._values.has(N)&&(O.push(N),this._values.delete(N))}M.fire(new c(O))}})}dispose(){this._listener.dispose()}getValue(D){if(D.indexOf(a._keyPrefix)!==0)return super.getValue(D);if(this._values.has(D))return this._values.get(D);const I=D.substr(a._keyPrefix.length),M=this._configurationService.getValue(I);let A;switch(typeof M){case"number":case"boolean":case"string":A=M;break;default:Array.isArray(M)?A=JSON.stringify(M):A=M}return this._values.set(D,A),A}setValue(D,I){return super.setValue(D,I)}removeValue(D){return super.removeValue(D)}}a._keyPrefix="config.";class u{constructor(D,I,M){this._service=D,this._key=I,this._defaultValue=M,this.reset()}set(D){this._service.setContext(this._key,D)}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 f{constructor(D){this.key=D}affectsSome(D){return D.has(this.key)}allKeysContainedIn(D){return this.affectsSome(D)}}class c{constructor(D){this.keys=D}affectsSome(D){for(const I of this.keys)if(D.has(I))return!0;return!1}allKeysContainedIn(D){return this.keys.every(I=>D.has(I))}}class d{constructor(D){this.events=D}affectsSome(D){for(const I of this.events)if(I.affectsSome(D))return!0;return!1}allKeysContainedIn(D){return this.events.every(I=>I.allKeysContainedIn(D))}}function r(w,D){return w.allKeysContainedIn(new Set(Object.keys(D)))}class l extends y.Disposable{constructor(D){super(),this._onDidChangeContext=this._register(new L.PauseableEmitter({merge:I=>new d(I)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=D}createKey(D,I){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new u(this,D,I)}bufferChangeEvents(D){this._onDidChangeContext.pause();try{D()}finally{this._onDidChangeContext.resume()}}createScoped(D){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new g(this,D)}contextMatchesRules(D){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const I=this.getContextValuesContainer(this._myContextId);return D?D.evaluate(I):!0}getContextKeyValue(D){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(D)}setContext(D,I){if(this._isDisposed)return;const M=this.getContextValuesContainer(this._myContextId);M&&M.setValue(D,I)&&this._onDidChangeContext.fire(new f(D))}removeContext(D){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(D)&&this._onDidChangeContext.fire(new f(D))}getContext(D){return this._isDisposed?t.INSTANCE:this.getContextValuesContainer(h(D))}dispose(){super.dispose(),this._isDisposed=!0}}e.AbstractContextKeyService=l;let s=class extends l{constructor(D){super(0),this._contexts=new Map,this._lastContextId=0;const I=this._register(new a(this._myContextId,D,this._onDidChangeContext));this._contexts.set(this._myContextId,I)}getContextValuesContainer(D){return this._isDisposed?t.INSTANCE:this._contexts.get(D)||t.INSTANCE}createChildContext(D=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const I=++this._lastContextId;return this._contexts.set(I,new n(I,this.getContextValuesContainer(D))),I}disposeContext(D){this._isDisposed||this._contexts.delete(D)}};e.ContextKeyService=s,e.ContextKeyService=s=Ee([he(0,b.IConfigurationService)],s);class g extends l{constructor(D,I){if(super(D.createChildContext()),this._parentChangeListener=this._register(new y.MutableDisposable),this._parent=D,this._updateParentChangeListener(),this._domNode=I,this._domNode.hasAttribute(i)){let M="";this._domNode.classList&&(M=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${M?": "+M:""}`)}this._domNode.setAttribute(i,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(D=>{const M=this._parent.getContextValuesContainer(this._myContextId).value;r(D,M)||this._onDidChangeContext.fire(D)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(i),super.dispose())}getContextValuesContainer(D){return this._isDisposed?t.INSTANCE:this._parent.getContextValuesContainer(D)}createChildContext(D=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(D)}disposeContext(D){this._isDisposed||this._parent.disposeContext(D)}}function h(w){for(;w;){if(w.hasAttribute(i)){const D=w.getAttribute(i);return D?parseInt(D,10):NaN}w=w.parentElement}return 0}function m(w,D,I){w.get(o.IContextKeyService).createKey(String(D),C(I))}e.setContext=m;function C(w){return(0,E.cloneAndChange)(w,D=>{if(typeof D=="object"&&D.$mid===1)return p.URI.revive(D).toString();if(D instanceof p.URI)return D.toString()})}v.CommandsRegistry.registerCommand("_setContext",m),v.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...o.RawContextKey.all()].sort((w,D)=>w.key.localeCompare(D.key))},metadata:{description:(0,S.localize)(0,null),args:[]}}),v.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const w=[],D=new Set;for(const I of o.RawContextKey.all())D.has(I.key)||(D.add(I.key),w.push(I));w.sort((I,M)=>I.key.localeCompare(M.key)),console.log(JSON.stringify(w,void 0,2))})}),define(ie[241],ne([1,0,17,733,15]),function(Q,e,L,k,y){"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 y.RawContextKey("isMac",L.isMacintosh,(0,k.localize)(0,null)),e.IsLinuxContext=new y.RawContextKey("isLinux",L.isLinux,(0,k.localize)(1,null)),e.IsWindowsContext=new y.RawContextKey("isWindows",L.isWindows,(0,k.localize)(2,null)),e.IsWebContext=new y.RawContextKey("isWeb",L.isWeb,(0,k.localize)(3,null)),e.IsMacNativeContext=new y.RawContextKey("isMacNative",L.isMacintosh&&!L.isWeb,(0,k.localize)(4,null)),e.IsIOSContext=new y.RawContextKey("isIOS",L.isIOS,(0,k.localize)(5,null)),e.IsMobileContext=new y.RawContextKey("isMobile",L.isMobile,(0,k.localize)(6,null)),e.IsDevelopmentContext=new y.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new y.RawContextKey("productQualityType","",(0,k.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new y.RawContextKey(e.InputFocusedContextKey,!1,(0,k.localize)(8,null))}),define(ie[59],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,L.createDecorator)("contextViewService"),e.IContextMenuService=(0,L.createDecorator)("contextMenuService")}),define(ie[162],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,L.createDecorator)("dialogService")}),define(ie[242],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEnvironmentService=void 0,e.IEnvironmentService=(0,L.createDecorator)("environmentService")}),define(ie[163],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class L{constructor(...y){this._entries=new Map;for(const[E,_]of y)this.set(E,_)}set(y,E){const _=this._entries.get(y);return this._entries.set(y,E),_}get(y){return this._entries.get(y)}}e.ServiceCollection=L}),define(ie[767],ne([1,0,14,9,2,236,755,8,163,66]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const b=!1;class o extends Error{constructor(a){var u;super("cyclic dependency between services"),this.message=(u=a.findCycleSlow())!==null&&u!==void 0?u:`UNABLE to detect cycle, dumping graph: ${a.toString()}`}}class i{constructor(a=new S.ServiceCollection,u=!1,f,c=b){var d;this._services=a,this._strict=u,this._parent=f,this._enableTracing=c,this._activeInstantiations=new Set,this._services.set(p.IInstantiationService,this),this._globalGraph=c?(d=f?._globalGraph)!==null&&d!==void 0?d:new _.Graph(r=>r):void 0}createChild(a){return new i(a,this._strict,this,this._enableTracing)}invokeFunction(a,...u){const f=n.traceInvocation(this._enableTracing,a);let c=!1;try{return a({get:r=>{if(c)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(r,f);if(!l)throw new Error(`[invokeFunction] unknown service '${r}'`);return l}},...u)}finally{c=!0,f.stop()}}createInstance(a,...u){let f,c;return a instanceof E.SyncDescriptor?(f=n.traceCreation(this._enableTracing,a.ctor),c=this._createInstance(a.ctor,a.staticArguments.concat(u),f)):(f=n.traceCreation(this._enableTracing,a),c=this._createInstance(a,u,f)),f.stop(),c}_createInstance(a,u=[],f){const c=p._util.getServiceDependencies(a).sort((l,s)=>l.index-s.index),d=[];for(const l of c){const s=this._getOrCreateServiceInstance(l.id,f);s||this._throwIfStrict(`[createInstance] ${a.name} depends on UNKNOWN service ${l.id}.`,!1),d.push(s)}const r=c.length>0?c[0].index:u.length;if(u.length!==r){console.trace(`[createInstance] First service dependency of ${a.name} at position ${r+1} conflicts with ${u.length} static arguments`);const l=r-u.length;l>0?u=u.concat(new Array(l)):u=u.slice(0,r)}return Reflect.construct(a,u.concat(d))}_setServiceInstance(a,u){if(this._services.get(a)instanceof E.SyncDescriptor)this._services.set(a,u);else if(this._parent)this._parent._setServiceInstance(a,u);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(a){const u=this._services.get(a);return!u&&this._parent?this._parent._getServiceInstanceOrDescriptor(a):u}_getOrCreateServiceInstance(a,u){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(a));const f=this._getServiceInstanceOrDescriptor(a);return f instanceof E.SyncDescriptor?this._safeCreateAndCacheServiceInstance(a,f,u.branch(a,!0)):(u.branch(a,!1),f)}_safeCreateAndCacheServiceInstance(a,u,f){if(this._activeInstantiations.has(a))throw new Error(`illegal state - RECURSIVELY instantiating service '${a}'`);this._activeInstantiations.add(a);try{return this._createAndCacheServiceInstance(a,u,f)}finally{this._activeInstantiations.delete(a)}}_createAndCacheServiceInstance(a,u,f){var c;const d=new _.Graph(s=>s.id.toString());let r=0;const l=[{id:a,desc:u,_trace:f}];for(;l.length;){const s=l.pop();if(d.lookupOrInsertNode(s),r++>1e3)throw new o(d);for(const g of p._util.getServiceDependencies(s.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(g.id);if(h||this._throwIfStrict(`[createInstance] ${a} depends on ${g.id} which is NOT registered.`,!0),(c=this._globalGraph)===null||c===void 0||c.insertEdge(String(s.id),String(g.id)),h instanceof E.SyncDescriptor){const m={id:g.id,desc:h,_trace:s._trace.branch(g.id,!0)};d.insertEdge(s,m),l.push(m)}}}for(;;){const s=d.roots();if(s.length===0){if(!d.isEmpty())throw new o(d);break}for(const{data:g}of s){if(this._getServiceInstanceOrDescriptor(g.id)instanceof E.SyncDescriptor){const m=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,m)}d.removeNode(g)}}return this._getServiceInstanceOrDescriptor(a)}_createServiceInstanceWithOwner(a,u,f=[],c,d){if(this._services.get(a)instanceof E.SyncDescriptor)return this._createServiceInstance(a,u,f,c,d);if(this._parent)return this._parent._createServiceInstanceWithOwner(a,u,f,c,d);throw new Error(`illegalState - creating UNKNOWN service instance ${u.name}`)}_createServiceInstance(a,u,f=[],c,d){if(c){const r=new i(void 0,this._strict,this,this._enableTracing);r._globalGraphImplicitDependency=String(a);const l=new Map,s=new L.GlobalIdleValue(()=>{const g=r._createInstance(u,f,d);for(const[h,m]of l){const C=g[h];if(typeof C=="function")for(const w of m)C.apply(g,w)}return l.clear(),g});return new Proxy(Object.create(null),{get(g,h){if(!s.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let w=l.get(h);return w||(w=new v.LinkedList,l.set(h,w)),(I,M,A)=>{const O=w.push([I,M,A]);return(0,y.toDisposable)(O)}}if(h in g)return g[h];const m=s.value;let C=m[h];return typeof C!="function"||(C=C.bind(m),g[h]=C),C},set(g,h,m){return s.value[h]=m,!0},getPrototypeOf(g){return u.prototype}})}else return this._createInstance(u,f,d)}_throwIfStrict(a,u){if(u&&console.warn(a),this._strict)throw new Error(a)}}e.InstantiationService=i;class n{static traceInvocation(a,u){return a?new n(2,u.name||new Error().stack.split(` `).slice(3,4).join(` `)):n._None}static traceCreation(a,u){return a?new n(1,u.name):n._None}constructor(a,u){this.type=a,this.name=u,this._start=Date.now(),this._dep=[]}branch(a,u){const f=new n(3,a.toString());return this._dep.push([a,u,f]),f}stop(){const a=Date.now()-this._start;n._totals+=a;let u=!1;function f(d,r){const l=[],s=new Array(d+1).join(" ");for(const[g,h,m]of r._dep)if(h&&m){u=!0,l.push(`${s}CREATES -> ${g}`);const C=f(d+1,m);C&&l.push(C)}else l.push(`${s}uses -> ${g}`);return l.join(` `)}const c=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${f(1,this)}`,`DONE, took ${a.toFixed(2)}ms (grand total ${n._totals.toFixed(2)}ms)`];(a>2||u)&&n.all.add(c.join(` `))}}e.Trace=n,n.all=new Set,n._None=new class extends n{constructor(){super(0,null)}stop(){}branch(){return this}},n._totals=0}),define(ie[768],ne([1,0,9,218,121]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class E extends y.ResolvedKeybinding{constructor(p,S){if(super(),S.length===0)throw(0,L.illegalArgument)("chords");this._os=p,this._chords=S}getLabel(){return k.UILabelProvider.toLabel(this._os,this._chords,p=>this._getLabel(p))}getAriaLabel(){return k.AriaLabelProvider.toLabel(this._os,this._chords,p=>this._getAriaLabel(p))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:k.ElectronAcceleratorLabelProvider.toLabel(this._os,this._chords,p=>this._getElectronAccelerator(p))}getUserSettingsLabel(){return k.UserSettingsLabelProvider.toLabel(this._os,this._chords,p=>this._getUserSettingsLabel(p))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(p=>this._getChord(p))}_getChord(p){return new y.ResolvedChord(p.ctrlKey,p.shiftKey,p.altKey,p.metaKey,this._getLabel(p),this._getAriaLabel(p))}getDispatchChords(){return this._chords.map(p=>this._getChordDispatch(p))}getSingleModifierDispatchChords(){return this._chords.map(p=>this._getSingleModifierChordDispatch(p))}}e.BaseResolvedKeybinding=E}),define(ie[34],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,L.createDecorator)("keybindingService")}),define(ie[343],ne([1,0,7,229,41,6,2,133,15,59,8,34,451]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.PostEditWidgetManager=void 0;let n=i=class extends _.Disposable{constructor(u,f,c,d,r,l,s,g,h,m){super(),this.typeId=u,this.editor=f,this.showCommand=d,this.range=r,this.edits=l,this.onSelectNewEdit=s,this._contextMenuService=g,this._keybindingService=m,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=c.bindTo(h),this.visibleContext.set(!0),this._register((0,_.toDisposable)(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,_.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(C=>{r.containsPosition(C.position)||this.dispose()})),this._register(E.Event.runAndSubscribe(m.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var u;const f=(u=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||u===void 0?void 0:u.getLabel();this.button.element.title=this.showCommand.label+(f?` (${f})`:"")}create(){this.domNode=L.$(".post-edit-widget"),this.button=this._register(new k.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(L.addDisposableListener(this.domNode,L.EventType.CLICK,()=>this.showSelector()))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const u=L.getDomNodePagePosition(this.button.element);return{x:u.left+u.width,y:u.top+u.height}},getActions:()=>this.edits.allEdits.map((u,f)=>(0,y.toAction)({id:"",label:u.label,checked:f===this.edits.activeEditIndex,run:()=>{if(f!==this.edits.activeEditIndex)return this.onSelectNewEdit(f)}}))})}};n.baseId="editor.widget.postEditWidget",n=i=Ee([he(7,v.IContextMenuService),he(8,S.IContextKeyService),he(9,o.IKeybindingService)],n);let t=class extends _.Disposable{constructor(u,f,c,d,r,l){super(),this._id=u,this._editor=f,this._visibleContext=c,this._showCommand=d,this._instantiationService=r,this._bulkEditService=l,this._currentWidget=this._register(new _.MutableDisposable),this._register(E.Event.any(f.onDidChangeModel,f.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(u,f,c,d){var r,l;const s=this._editor.getModel();if(!s||!u.length)return;const g=f.allEdits[f.activeEditIndex];if(!g)return;let h=[];(typeof g.insertText=="string"?g.insertText==="":g.insertText.snippet==="")?h=[]:h=u.map(A=>new p.ResourceTextEdit(s.uri,typeof g.insertText=="string"?{range:A,text:g.insertText,insertAsSnippet:!1}:{range:A,text:g.insertText.snippet,insertAsSnippet:!0}));const C={edits:[...h,...(l=(r=g.additionalEdit)===null||r===void 0?void 0:r.edits)!==null&&l!==void 0?l:[]]},w=u[0],D=s.deltaDecorations([],[{range:w,options:{description:"paste-line-suffix",stickiness:0}}]);let I,M;try{I=await this._bulkEditService.apply(C,{editor:this._editor,token:d}),M=s.getDecorationRange(D[0])}finally{s.deltaDecorations(D,[])}c&&I.isApplied&&f.allEdits.length>1&&this.show(M??w,f,async A=>{const O=this._editor.getModel();O&&(await O.undo(),this.applyEditAndShowIfNeeded(u,{activeEditIndex:A,allEdits:f.allEdits},c,d))})}show(u,f,c){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(n,this._id,this._editor,this._visibleContext,this._showCommand,u,f,c))}clear(){this._currentWidget.clear()}tryShowSelector(){var u;(u=this._currentWidget.value)===null||u===void 0||u.showSelector()}};e.PostEditWidgetManager=t,e.PostEditWidgetManager=t=Ee([he(4,b.IInstantiationService),he(5,p.IBulkEditService)],t)}),define(ie[344],ne([1,0,15]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=e.NoMatchingKb=void 0,e.NoMatchingKb={kind:0};const k={kind:1};function y(S,v,b){return{kind:2,commandId:S,commandArgs:v,isBubble:b}}class E{constructor(v,b,o){var i;this._log=o,this._defaultKeybindings=v,this._defaultBoundCommands=new Map;for(const n of v){const t=n.command;t&&t.charAt(0)!=="-"&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=E.handleRemovals([].concat(v).concat(b));for(let n=0,t=this._keybindings.length;n"u"){this._map.set(v,[b]),this._addToLookupMap(b);return}for(let i=o.length-1;i>=0;i--){const n=o[i];if(n.command===b.command)continue;let t=!0;for(let a=1;a"u"?(b=[v],this._lookupMap.set(v.command,b)):b.push(v)}_removeFromLookupMap(v){if(!v.command)return;const b=this._lookupMap.get(v.command);if(!(typeof b>"u")){for(let o=0,i=b.length;o"u"||o.length===0)return null;if(o.length===1)return o[0];for(let i=o.length-1;i>=0;i--){const n=o[i];if(b.contextMatchesRules(n.when))return n}return o[o.length-1]}resolve(v,b,o){const i=[...b,o];this._log(`| Resolving ${i}`);const n=this._map.get(i[0]);if(n===void 0)return this._log("\\ No keybinding entries."),e.NoMatchingKb;let t=null;if(i.length<2)t=n;else{t=[];for(let u=0,f=n.length;uc.chords.length)continue;let d=!0;for(let r=1;r=0;o--){const i=b[o];if(E._contextMatchesRules(v,i.when))return i}return null}static _contextMatchesRules(v,b){return b?b.evaluate(v):!0}}e.KeybindingResolver=E;function _(S){return S?`${S.serialize()}`:"no when condition"}function p(S){return S.extensionId?S.isBuiltinExtension?`built-in extension ${S.extensionId}`:`user extension ${S.extensionId}`:S.isDefault?"built-in":"user"}}),define(ie[769],ne([1,0,14,9,6,267,2,736,344]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const v=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class b extends _.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:y.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(n,t,a,u,f){super(),this._contextKeyService=n,this._commandService=t,this._telemetryService=a,this._notificationService=u,this._logService=f,this._onDidUpdateKeybindings=this._register(new y.Emitter),this._currentChords=[],this._currentChordChecker=new L.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=o.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new L.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}_log(n){this._logging&&this._logService.info(`[KeybindingService]: ${n}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(n,t){const a=this._getResolver().lookupPrimaryKeybinding(n,t||this._contextKeyService);if(a)return a.resolvedKeybinding}dispatchEvent(n,t){return this._dispatch(n,t)}softDispatch(n,t){this._log("/ Soft dispatching keyboard event");const a=this.resolveKeyboardEvent(n);if(a.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),S.NoMatchingKb;const[u]=a.getDispatchChords();if(u===null)return this._log("\\ Keyboard event cannot be dispatched"),S.NoMatchingKb;const f=this._contextKeyService.getContext(t),c=this._currentChords.map(({keypress:d})=>d);return this._getResolver().resolve(f,c,u)}_scheduleLeaveChordMode(){const n=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-n>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(n,t){switch(this._currentChords.push({keypress:n,label:t}),this._currentChords.length){case 0:throw(0,k.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(p.localize(0,null,t));break;default:{const a=this._currentChords.map(({label:u})=>u).join(", ");this._currentChordStatusMessage=this._notificationService.status(p.localize(1,null,a))}}this._scheduleLeaveChordMode(),E.IME.enabled&&E.IME.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],E.IME.enable()}_dispatch(n,t){return this._doDispatch(this.resolveKeyboardEvent(n),t,!1)}_singleModifierDispatch(n,t){const a=this.resolveKeyboardEvent(n),[u]=a.getSingleModifierDispatchChords();if(u)return this._ignoreSingleModifiers.has(u)?(this._log(`+ Ignoring single modifier ${u} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=o.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=o.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${u}.`),this._currentSingleModifier=u,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):u===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${u} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(a,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[f]=a.getChords();return this._ignoreSingleModifiers=new o(f),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(n,t,a=!1){var u;let f=!1;if(n.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let c=null,d=null;if(a){const[g]=n.getSingleModifierDispatchChords();c=g,d=g?[g]:[]}else[c]=n.getDispatchChords(),d=this._currentChords.map(({keypress:g})=>g);if(c===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),f;const r=this._contextKeyService.getContext(t),l=n.getLabel(),s=this._getResolver().resolve(r,d,c);switch(s.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",l,"[ No matching keybinding ]"),this.inChordMode){const g=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${g}, ${l}".`),this._notificationService.status(p.localize(2,null,g,l),{hideAfter:10*1e3}),this._leaveChordMode(),f=!0}return f}case 1:return this._logService.trace("KeybindingService#dispatch",l,"[ Several keybindings match - more chords needed ]"),f=!0,this._expectAnotherChord(c,l),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),f;case 2:{if(this._logService.trace("KeybindingService#dispatch",l,`[ Will dispatch command ${s.commandId} ]`),s.commandId===null||s.commandId===""){if(this.inChordMode){const g=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${g}, ${l}".`),this._notificationService.status(p.localize(3,null,g,l),{hideAfter:10*1e3}),this._leaveChordMode(),f=!0}}else this.inChordMode&&this._leaveChordMode(),s.isBubble||(f=!0),this._log(`+ Invoking command ${s.commandId}.`),typeof s.commandArgs>"u"?this._commandService.executeCommand(s.commandId).then(void 0,g=>this._notificationService.warn(g)):this._commandService.executeCommand(s.commandId,s.commandArgs).then(void 0,g=>this._notificationService.warn(g)),v.test(s.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:s.commandId,from:"keybinding",detail:(u=n.getUserSettingsLabel())!==null&&u!==void 0?u:void 0});return f}}}mightProducePrintableCharacter(n){return n.ctrlKey||n.metaKey?!1:n.keyCode>=31&&n.keyCode<=56||n.keyCode>=21&&n.keyCode<=30}}e.AbstractKeybindingService=b;class o{constructor(n){this._ctrlKey=n?n.ctrlKey:!1,this._shiftKey=n?n.shiftKey:!1,this._altKey=n?n.altKey:!1,this._metaKey=n?n.metaKey:!1}has(n){switch(n){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}o.EMPTY=new o(null)}),define(ie[345],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class L{constructor(E,_,p,S,v,b,o){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=E,this.chords=E?k(E.getDispatchChords()):[],E&&this.chords.length===0&&(this.chords=k(E.getSingleModifierDispatchChords())),this.bubble=_?_.charCodeAt(0)===94:!1,this.command=this.bubble?_.substr(1):_,this.commandArgs=p,this.when=S,this.isDefault=v,this.extensionId=b,this.isBuiltinExtension=o}}e.ResolvedKeybindingItem=L;function k(y){const E=[];for(let _=0,p=y.length;_this._toKeyCodeChord(o)));return b.length>0?[new _(b,v)]:[]}}e.USLayoutResolvedKeybinding=_}),define(ie[164],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,L.createDecorator)("labelService")}),define(ie[135],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,L.createDecorator)("layoutService")}),define(ie[346],ne([1,0,7,6,135,33,46,13,48]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let v=class{get mainContainer(){var i,n;return(n=(i=(0,p.firstOrDefault)(this._codeEditorService.listCodeEditors()))===null||i===void 0?void 0:i.getContainerDomNode())!==null&&n!==void 0?n:S.mainWindow.document.body}get activeContainer(){var i,n;const t=(i=this._codeEditorService.getFocusedCodeEditor())!==null&&i!==void 0?i:this._codeEditorService.getActiveCodeEditor();return(n=t?.getContainerDomNode())!==null&&n!==void 0?n:this.mainContainer}get mainContainerDimension(){return L.getClientArea(this.mainContainer)}get activeContainerDimension(){return L.getClientArea(this.activeContainer)}get containers(){return(0,p.coalesce)(this._codeEditorService.listCodeEditors().map(i=>i.getContainerDomNode()))}getContainer(){return this.activeContainer}focus(){var i;(i=this._codeEditorService.getFocusedCodeEditor())===null||i===void 0||i.focus()}constructor(i){this._codeEditorService=i,this.onDidLayoutMainContainer=k.Event.None,this.onDidLayoutActiveContainer=k.Event.None,this.onDidLayoutContainer=k.Event.None,this.onDidChangeActiveContainer=k.Event.None,this.onDidAddContainer=k.Event.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};v=Ee([he(0,E.ICodeEditorService)],v);let b=class extends v{get mainContainer(){return this._container}constructor(i,n){super(n),this._container=i}};e.EditorScopedLayoutService=b,e.EditorScopedLayoutService=b=Ee([he(1,E.ICodeEditorService)],b),(0,_.registerSingleton)(y.ILayoutService,v,1)}),define(ie[771],ne([1,0,7,48,6,2,69,28,15,135]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let b=class extends E.Disposable{constructor(i,n,t){super(),this._contextKeyService=i,this._layoutService=n,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new y.Emitter,this._onDidChangeReducedMotion=new y.Emitter,this._accessibilityModeEnabledContext=_.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const a=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(f=>{f.affectsConfiguration("editor.accessibilitySupport")&&(a(),this._onDidChangeScreenReaderOptimized.fire()),f.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),a(),this._register(this.onDidChangeScreenReaderOptimized(()=>a()));const u=k.mainWindow.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=u.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(u)}initReducedMotionListeners(i){this._register((0,L.addDisposableListener)(i,"change",()=>{this._systemMotionReduced=i.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const n=()=>{const t=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("reduce-motion",t),this._layoutService.mainContainer.classList.toggle("enable-motion",!t)};n(),this._register(this.onDidChangeReducedMotion(()=>n()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const i=this._configurationService.getValue("editor.accessibilitySupport");return i==="on"||i==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const i=this._configMotionReduced;return i==="on"||i==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};e.AccessibilityService=b,e.AccessibilityService=b=Ee([he(0,S.IContextKeyService),he(1,v.ILayoutService),he(2,p.IConfigurationService)],b)}),define(ie[772],ne([1,0,314,2,135,7]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let _=class extends k.Disposable{constructor(S){super(),this.layoutService=S,this.currentViewDisposable=k.Disposable.None,this.contextView=this._register(new L.ContextView(this.layoutService.mainContainer,1)),this.layout(),this._register(S.onDidLayoutContainer(()=>this.layout()))}showContextView(S,v,b){let o;v?v===this.layoutService.getContainer((0,E.getWindow)(v))?o=1:b?o=3:o=2:o=1,this.contextView.setContainer(v??this.layoutService.activeContainer,o),this.contextView.show(S);const i=(0,k.toDisposable)(()=>{this.currentViewDisposable===i&&this.hideContextView()});return this.currentViewDisposable=i,i}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(S){this.contextView.hide(S)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=k.Disposable.None}};e.ContextViewService=_,e.ContextViewService=_=Ee([he(0,y.ILayoutService)],_)}),define(ie[64],ne([1,0,6,2,15,8]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.LogLevelToString=e.MultiplexLogger=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,E.createDecorator)("logService");var _;(function(o){o[o.Off=0]="Off",o[o.Trace=1]="Trace",o[o.Debug=2]="Debug",o[o.Info=3]="Info",o[o.Warning=4]="Warning",o[o.Error=5]="Error"})(_||(e.LogLevel=_={})),e.DEFAULT_LOG_LEVEL=_.Info;class p extends k.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new L.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(i){this.level!==i&&(this.level=i,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(i){return this.level!==_.Off&&this.level<=i}}e.AbstractLogger=p;class S extends p{constructor(i=e.DEFAULT_LOG_LEVEL,n=!0){super(),this.useColors=n,this.setLevel(i)}trace(i,...n){this.checkLogLevel(_.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",i,...n):console.log(i,...n))}debug(i,...n){this.checkLogLevel(_.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",i,...n):console.log(i,...n))}info(i,...n){this.checkLogLevel(_.Info)&&(this.useColors?console.log("%c INFO","color: #33f",i,...n):console.log(i,...n))}warn(i,...n){this.checkLogLevel(_.Warning)&&(this.useColors?console.log("%c WARN","color: #993",i,...n):console.log(i,...n))}error(i,...n){this.checkLogLevel(_.Error)&&(this.useColors?console.log("%c ERR","color: #f33",i,...n):console.error(i,...n))}dispose(){}}e.ConsoleLogger=S;class v extends p{constructor(i){super(),this.loggers=i,i.length&&this.setLevel(i[0].getLevel())}setLevel(i){for(const n of this.loggers)n.setLevel(i);super.setLevel(i)}trace(i,...n){for(const t of this.loggers)t.trace(i,...n)}debug(i,...n){for(const t of this.loggers)t.debug(i,...n)}info(i,...n){for(const t of this.loggers)t.info(i,...n)}warn(i,...n){for(const t of this.loggers)t.warn(i,...n)}error(i,...n){for(const t of this.loggers)t.error(i,...n)}dispose(){for(const i of this.loggers)i.dispose()}}e.MultiplexLogger=v;function b(o){switch(o){case _.Trace:return"trace";case _.Debug:return"debug";case _.Info:return"info";case _.Warning:return"warn";case _.Error:return"error";case _.Off:return"off"}}e.LogLevelToString=b,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",b(_.Info))}),define(ie[188],ne([1,0,54,7,83,50,263,14,6,2,108,12,277,24,69,64]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.ClipboardEventUtils=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var u;(function(l){l.Tap="-monaco-textarea-synthetic-tap"})(u||(e.TextAreaSyntethicEvents=u={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class f{constructor(){this._lastState=null}set(s,g){this._lastState={lastCopiedValue:s,data:g}}get(s){return this._lastState&&this._lastState.lastCopiedValue===s?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=f,f.INSTANCE=new f;class c{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(s){s=s||"";const g={text:s,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=s.length,g}}let d=class extends v.Disposable{get textAreaState(){return this._textAreaState}constructor(s,g,h,m,C,w){super(),this._host=s,this._textArea=g,this._OS=h,this._browser=m,this._accessibilityService=C,this._logService=w,this._onFocus=this._register(new S.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new S.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new S.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new S.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new S.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new S.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new S.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new S.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new S.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new S.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new v.MutableDisposable),this._asyncTriggerCut=this._register(new p.RunOnceScheduler(()=>this._onCut.fire(),0)),this._textAreaState=i.TextAreaState.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(S.Event.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=this._register(new p.RunOnceScheduler(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let D=null;this._register(this._textArea.onKeyDown(I=>{const M=new E.StandardKeyboardEvent(I);(M.keyCode===114||this._currentComposition&&M.keyCode===1)&&M.stopPropagation(),M.equals(9)&&M.preventDefault(),D=M,this._onKeyDown.fire(M)})),this._register(this._textArea.onKeyUp(I=>{const M=new E.StandardKeyboardEvent(I);this._onKeyUp.fire(M)})),this._register(this._textArea.onCompositionStart(I=>{i._debugComposition&&console.log("[compositionstart]",I);const M=new c;if(this._currentComposition){this._currentComposition=M;return}if(this._currentComposition=M,this._OS===2&&D&&D.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===I.data&&(D.code==="ArrowRight"||D.code==="ArrowLeft")){i._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",I),M.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:I.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:I.data});return}this._onCompositionStart.fire({data:I.data})})),this._register(this._textArea.onCompositionUpdate(I=>{i._debugComposition&&console.log("[compositionupdate]",I);const M=this._currentComposition;if(!M)return;if(this._browser.isAndroid){const O=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,O);this._textAreaState=O,this._onType.fire(T),this._onCompositionUpdate.fire(I);return}const A=M.handleCompositionUpdate(I.data);this._textAreaState=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(A),this._onCompositionUpdate.fire(I)})),this._register(this._textArea.onCompositionEnd(I=>{i._debugComposition&&console.log("[compositionend]",I);const M=this._currentComposition;if(!M)return;if(this._currentComposition=null,this._browser.isAndroid){const O=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),T=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,O);this._textAreaState=O,this._onType.fire(T),this._onCompositionEnd.fire();return}const A=M.handleCompositionUpdate(I.data);this._textAreaState=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(A),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(I=>{if(i._debugComposition&&console.log("[input]",I),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const M=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),A=i.TextAreaState.deduceInput(this._textAreaState,M,this._OS===2);A.replacePrevCharCnt===0&&A.text.length===1&&(o.isHighSurrogate(A.text.charCodeAt(0))||A.text.charCodeAt(0)===127)||(this._textAreaState=M,(A.text!==""||A.replacePrevCharCnt!==0||A.replaceNextCharCnt!==0||A.positionDelta!==0)&&this._onType.fire(A))})),this._register(this._textArea.onCut(I=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(I),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(I=>{this._ensureClipboardGetsEditorSelection(I)})),this._register(this._textArea.onPaste(I=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),I.preventDefault(),!I.clipboardData)return;let[M,A]=e.ClipboardEventUtils.getTextData(I.clipboardData);M&&(A=A||f.INSTANCE.get(M),this._onPaste.fire({text:M,metadata:A}))})),this._register(this._textArea.onFocus(()=>{const I=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!I&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new p.RunOnceScheduler(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let s=0;return k.addDisposableListener(this._textArea.ownerDocument,"selectionchange",g=>{if(_.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const h=Date.now(),m=h-s;if(s=h,m<5)return;const C=h-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),C<100||!this._textAreaState.selection)return;const w=this._textArea.getValue();if(this._textAreaState.value!==w)return;const D=this._textArea.getSelectionStart(),I=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===D&&this._textAreaState.selectionEnd===I)return;const M=this._textAreaState.deduceEditorPosition(D),A=this._host.deduceModelPosition(M[0],M[1],M[2]),O=this._textAreaState.deduceEditorPosition(I),T=this._host.deduceModelPosition(O[0],O[1],O[2]),N=new n.Selection(A.lineNumber,A.column,T.lineNumber,T.column);this._onSelectionChangeRequest.fire(N)})}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(s){this._hasFocus!==s&&(this._hasFocus=s,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(s,g){this._hasFocus||(g=g.collapseSelection()),g.writeToTextArea(s,this._textArea,this._hasFocus),this._textAreaState=g}writeNativeTextAreaContent(s){!this._accessibilityService.isScreenReaderOptimized()&&s==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${s})`),this._setAndWriteTextAreaState(s,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(s){const g=this._host.getDataToCopy(),h={version:1,isFromEmptySelection:g.isFromEmptySelection,multicursorText:g.multicursorText,mode:g.mode};f.INSTANCE.set(this._browser.isFirefox?g.text.replace(/\r\n/g,` `):g.text,h),s.preventDefault(),s.clipboardData&&e.ClipboardEventUtils.setTextData(s.clipboardData,g.text,g.html,h)}};e.TextAreaInput=d,e.TextAreaInput=d=Ee([he(4,t.IAccessibilityService),he(5,a.ILogService)],d),e.ClipboardEventUtils={getTextData(l){const s=l.getData(b.Mimes.text);let g=null;const h=l.getData("vscode-editor-data");if(typeof h=="string")try{g=JSON.parse(h),g.version!==1&&(g=null)}catch{}return s.length===0&&g===null&&l.files.length>0?[Array.prototype.slice.call(l.files,0).map(C=>C.name).join(` `),null]:[s,g]},setTextData(l,s,g,h){l.setData(b.Mimes.text,s),typeof g=="string"&&l.setData("text/html",g),l.setData("vscode-editor-data",JSON.stringify(h))}};class r extends v.Disposable{get ownerDocument(){return this._actual.ownerDocument}constructor(s){super(),this._actual=s,this.onKeyDown=this._register(new y.DomEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(new y.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new y.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new y.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new y.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new y.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new y.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new y.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new y.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new y.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new y.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new y.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new S.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>_.inputLatency.onKeyDown())),this._register(this.onBeforeInput(()=>_.inputLatency.onBeforeInput())),this._register(this.onInput(()=>_.inputLatency.onInput())),this._register(this.onKeyUp(()=>_.inputLatency.onKeyUp())),this._register(k.addDisposableListener(this._actual,u.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const s=k.getShadowRoot(this._actual);return s?s.activeElement===this._actual:this._actual.isConnected?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(s){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(s,g){const h=this._actual;h.value!==g&&(this.setIgnoreSelectionChangeTime("setValue"),h.value=g)}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(s,g,h){const m=this._actual;let C=null;const w=k.getShadowRoot(m);w?C=w.activeElement:C=m.ownerDocument.activeElement;const D=k.getWindow(C),I=C===m,M=m.selectionStart,A=m.selectionEnd;if(I&&M===g&&A===h){L.isFirefox&&D.parent!==D&&m.focus();return}if(I){this.setIgnoreSelectionChangeTime("setSelectionRange"),m.setSelectionRange(g,h),L.isFirefox&&D.parent!==D&&m.focus();return}try{const O=k.saveParentsScrollTop(m);this.setIgnoreSelectionChangeTime("setSelectionRange"),m.focus(),m.setSelectionRange(g,h),k.restoreParentsScrollTop(m,O)}catch{}}}e.TextAreaWrapper=r}),define(ie[78],ne([1,0,122,53,143,242,46,8,64,44]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,p.createDecorator)("ILanguageFeatureDebounceService");var b;(function(t){const a=new WeakMap;let u=0;function f(c){let d=a.get(c);return d===void 0&&(d=++u,a.set(c,d)),d}t.of=f})(b||(b={}));class o{constructor(a){this._default=a}get(a){return this._default}update(a,u){return this._default}default(){return this._default}}class i{constructor(a,u,f,c,d,r){this._logService=a,this._name=u,this._registry=f,this._default=c,this._min=d,this._max=r,this._cache=new k.LRUCache(50,.7)}_key(a){return a.id+this._registry.all(a).reduce((u,f)=>(0,L.doHash)(b.of(f),u),0)}get(a){const u=this._key(a),f=this._cache.get(u);return f?(0,y.clamp)(f.value,this._min,this._max):this.default()}update(a,u){const f=this._key(a);let c=this._cache.get(f);c||(c=new y.SlidingWindowAverage(6),this._cache.set(f,c));const d=(0,y.clamp)(c.update(u),this._min,this._max);return(0,v.matchesScheme)(a.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${a.uri.toString()} is ${d}ms`),d}_overall(){const a=new y.MovingAverage;for(const[,u]of this._cache)a.update(u.value);return a.value}default(){const a=this._overall()|0||this._default;return(0,y.clamp)(a,this._min,this._max)}}let n=class{constructor(a,u){this._logService=a,this._data=new Map,this._isDev=u.isExtensionDevelopment||!u.isBuilt}for(a,u,f){var c,d,r;const l=(c=f?.min)!==null&&c!==void 0?c:50,s=(d=f?.max)!==null&&d!==void 0?d:l**2,g=(r=f?.key)!==null&&r!==void 0?r:void 0,h=`${b.of(a)},${l}${g?","+g:""}`;let m=this._data.get(h);return m||(this._isDev?m=new i(this._logService,u,a,this._overallAverage()|0||l*1.5,l,s):(this._logService.debug(`[DEBOUNCE: ${u}] is disabled in developed mode`),m=new o(l*1.5)),this._data.set(h,m)),m}_overallAverage(){const a=new y.MovingAverage;for(const u of this._data.values())a.update(u.default());return a.value}};e.LanguageFeatureDebounceService=n,e.LanguageFeatureDebounceService=n=Ee([he(0,S.ILogService),he(1,E.IEnvironmentService)],n),(0,_.registerSingleton)(e.ILanguageFeatureDebounceService,n,1)}),define(ie[189],ne([1,0,13,19,9,49,53,11,5,78,8,46,52,2,18]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class a{remove(){var l;(l=this.parent)===null||l===void 0||l.children.delete(this.id)}static findId(l,s){let g;typeof l=="string"?g=`${s.id}/${l}`:(g=`${s.id}/${l.name}`,s.children.get(g)!==void 0&&(g=`${s.id}/${l.name}_${l.range.startLineNumber}_${l.range.startColumn}`));let h=g;for(let m=0;s.children.get(h)!==void 0;m++)h=`${g}_${m}`;return h}static empty(l){return l.children.size===0}}e.TreeElement=a;class u extends a{constructor(l,s,g){super(),this.id=l,this.parent=s,this.symbol=g,this.children=new Map}}e.OutlineElement=u;class f extends a{constructor(l,s,g,h){super(),this.id=l,this.parent=s,this.label=g,this.order=h,this.children=new Map}}e.OutlineGroup=f;class c extends a{static create(l,s,g){const h=new k.CancellationTokenSource(g),m=new c(s.uri),C=l.ordered(s),w=C.map((I,M)=>{var A;const O=a.findId(`provider_${M}`,m),T=new f(O,m,(A=I.displayName)!==null&&A!==void 0?A:"Unknown Outline Provider",M);return Promise.resolve(I.provideDocumentSymbols(s,h.token)).then(N=>{for(const P of N||[])c._makeOutlineElement(P,T);return T},N=>((0,y.onUnexpectedExternalError)(N),T)).then(N=>{a.empty(N)?N.remove():m._groups.set(O,N)})}),D=l.onDidChange(()=>{const I=l.ordered(s);(0,L.equals)(I,C)||h.cancel()});return Promise.all(w).then(()=>h.token.isCancellationRequested&&!g.isCancellationRequested?c.create(l,s,g):m._compact()).finally(()=>{h.dispose(),D.dispose(),h.dispose()})}static _makeOutlineElement(l,s){const g=a.findId(l,s),h=new u(g,s,l);if(l.children)for(const m of l.children)c._makeOutlineElement(m,h);s.children.set(h.id,h)}constructor(l){super(),this.uri=l,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let l=0;for(const[s,g]of this._groups)g.children.size===0?this._groups.delete(s):l+=1;if(l!==1)this.children=this._groups;else{const s=E.Iterable.first(this._groups.values());for(const[,g]of s.children)g.parent=this,this.children.set(g.id,g)}return this}getTopLevelSymbols(){const l=[];for(const s of this.children.values())s instanceof u?l.push(s.symbol):l.push(...E.Iterable.map(s.children.values(),g=>g.symbol));return l.sort((s,g)=>S.Range.compareRangesUsingStarts(s.range,g.range))}asListOfDocumentSymbols(){const l=this.getTopLevelSymbols(),s=[];return c._flattenDocumentSymbols(s,l,""),s.sort((g,h)=>p.Position.compare(S.Range.getStartPosition(g.range),S.Range.getStartPosition(h.range))||p.Position.compare(S.Range.getEndPosition(h.range),S.Range.getEndPosition(g.range)))}static _flattenDocumentSymbols(l,s,g){for(const h of s)l.push({kind:h.kind,tags:h.tags,name:h.name,detail:h.detail,containerName:h.containerName||g,range:h.range,selectionRange:h.selectionRange,children:void 0}),h.children&&c._flattenDocumentSymbols(l,h.children,h.name)}}e.OutlineModel=c,e.IOutlineModelService=(0,b.createDecorator)("IOutlineModelService");let d=class{constructor(l,s,g){this._languageFeaturesService=l,this._disposables=new n.DisposableStore,this._cache=new _.LRUCache(10,.7),this._debounceInformation=s.for(l.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(g.onModelRemoved(h=>{this._cache.delete(h.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(l,s){const g=this._languageFeaturesService.documentSymbolProvider,h=g.ordered(l);let m=this._cache.get(l.id);if(!m||m.versionId!==l.getVersionId()||!(0,L.equals)(m.provider,h)){const w=new k.CancellationTokenSource;m={versionId:l.getVersionId(),provider:h,promiseCnt:0,source:w,promise:c.create(g,l,w.token),model:void 0},this._cache.set(l.id,m);const D=Date.now();m.promise.then(I=>{m.model=I,this._debounceInformation.update(l,Date.now()-D)}).catch(I=>{this._cache.delete(l.id)})}if(m.model)return m.model;m.promiseCnt+=1;const C=s.onCancellationRequested(()=>{--m.promiseCnt===0&&(m.source.cancel(),this._cache.delete(l.id))});try{return await m.promise}finally{C.dispose()}}};e.OutlineModelService=d,e.OutlineModelService=d=Ee([he(0,t.ILanguageFeaturesService),he(1,v.ILanguageFeatureDebounceService),he(2,i.IModelService)],d),(0,o.registerSingleton)(e.IOutlineModelService,d,1)}),define(ie[773],ne([1,0,19,20,22,68,189,25]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),p.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(S,...v){const[b]=v;(0,k.assertType)(y.URI.isUri(b));const o=S.get(_.IOutlineModelService),n=await S.get(E.ITextModelService).createModelReference(b);try{return(await o.getOrCreate(n.object.textEditorModel,L.CancellationToken.None)).getTopLevelSymbols()}finally{n.dispose()}})}),define(ie[774],ne([1,0,54,7,14,6,2,135,64]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let v=class extends _.Disposable{constructor(o,i){super(),this.layoutService=o,this.logService=i,this.mapTextToType=new Map,this.findText="",this.resources=[],(L.isSafari||L.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const o=()=>{const i=new y.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=i,navigator.clipboard.write([new ClipboardItem({"text/plain":i.p})]).catch(async n=>{(!(n instanceof Error)||n.name!=="NotAllowedError"||!i.isRejected)&&this.logService.error(n)})};this._register(E.Event.runAndSubscribe(this.layoutService.onDidAddContainer,({container:i,disposables:n})=>{n.add((0,k.addDisposableListener)(i,"click",o)),n.add((0,k.addDisposableListener)(i,"keydown",o))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(o,i){if(i){this.mapTextToType.set(i,o);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(o);try{return await navigator.clipboard.writeText(o)}catch(u){console.error(u)}const n=(0,k.getActiveDocument)(),t=n.activeElement,a=n.body.appendChild((0,k.$)("textarea",{"aria-hidden":!0}));a.style.height="1px",a.style.width="1px",a.style.position="absolute",a.value=o,a.focus(),a.select(),n.execCommand("copy"),t instanceof HTMLElement&&t.focus(),n.body.removeChild(a)}async readText(o){if(o)return this.mapTextToType.get(o)||"";try{return await navigator.clipboard.readText()}catch(i){return console.error(i),""}}async readFindText(){return this.findText}async writeFindText(o){this.findText=o}async writeResources(o){this.resources=o}async readResources(){return this.resources}};e.BrowserClipboardService=v,e.BrowserClipboardService=v=Ee([he(0,p.ILayoutService),he(1,S.ILogService)],v)}),define(ie[775],ne([1,0,2,64]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class y extends L.Disposable{constructor(_,p=[]){super(),this.logger=new k.MultiplexLogger([_,...p]),this._register(_.onDidChangeLogLevel(S=>this.setLevel(S)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(_){this.logger.setLevel(_)}getLevel(){return this.logger.getLevel()}trace(_,...p){this.logger.trace(_,...p)}debug(_,...p){this.logger.debug(_,...p)}info(_,...p){this.logger.info(_,...p)}warn(_,...p){this.logger.warn(_,...p)}error(_,...p){this.logger.error(_,...p)}}e.LogService=y}),define(ie[96],ne([1,0,100,738,8]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var E;(function(p){p[p.Hint=1]="Hint",p[p.Info=2]="Info",p[p.Warning=4]="Warning",p[p.Error=8]="Error"})(E||(e.MarkerSeverity=E={})),function(p){function S(n,t){return t-n}p.compare=S;const v=Object.create(null);v[p.Error]=(0,k.localize)(0,null),v[p.Warning]=(0,k.localize)(1,null),v[p.Info]=(0,k.localize)(2,null);function b(n){return v[n]||""}p.toString=b;function o(n){switch(n){case L.default.Error:return p.Error;case L.default.Warning:return p.Warning;case L.default.Info:return p.Info;case L.default.Ignore:return p.Hint}}p.fromSeverity=o;function i(n){switch(n){case p.Error:return L.default.Error;case p.Warning:return L.default.Warning;case p.Info:return L.default.Info;case p.Hint:return L.default.Ignore}}p.toSeverity=i}(E||(e.MarkerSeverity=E={}));var _;(function(p){const S="";function v(o){return b(o,!0)}p.makeKey=v;function b(o,i){const n=[S];return o.source?n.push(o.source.replace("\xA6","\\\xA6")):n.push(S),o.code?typeof o.code=="string"?n.push(o.code.replace("\xA6","\\\xA6")):n.push(o.code.value.replace("\xA6","\\\xA6")):n.push(S),o.severity!==void 0&&o.severity!==null?n.push(E.toString(o.severity)):n.push(S),o.message&&i?n.push(o.message.replace("\xA6","\\\xA6")):n.push(S),o.startLineNumber!==void 0&&o.startLineNumber!==null?n.push(o.startLineNumber.toString()):n.push(S),o.startColumn!==void 0&&o.startColumn!==null?n.push(o.startColumn.toString()):n.push(S),o.endLineNumber!==void 0&&o.endLineNumber!==null?n.push(o.endLineNumber.toString()):n.push(S),o.endColumn!==void 0&&o.endColumn!==null?n.push(o.endColumn.toString()):n.push(S),n.push(S),n.join("\xA6")}p.makeKeyOptionalMessage=b})(_||(e.IMarkerData=_={})),e.IMarkerService=(0,y.createDecorator)("markerService")}),define(ie[776],ne([1,0,13,6,2,66,12,22,5,46,8,96,28]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class n{constructor(f,c,d){this.marker=f,this.index=c,this.total=d}}e.MarkerCoordinate=n;let t=class{constructor(f,c,d){this._markerService=c,this._configService=d,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new y.DisposableStore,this._markers=[],this._nextIdx=-1,p.URI.isUri(f)?this._resourceFilter=g=>g.toString()===f.toString():f&&(this._resourceFilter=f);const r=this._configService.getValue("problems.sortOrder"),l=(g,h)=>{let m=(0,_.compare)(g.resource.toString(),h.resource.toString());return m===0&&(r==="position"?m=S.Range.compareRangesUsingStarts(g,h)||o.MarkerSeverity.compare(g.severity,h.severity):m=o.MarkerSeverity.compare(g.severity,h.severity)||S.Range.compareRangesUsingStarts(g,h)),m},s=()=>{this._markers=this._markerService.read({resource:p.URI.isUri(f)?f:void 0,severities:o.MarkerSeverity.Error|o.MarkerSeverity.Warning|o.MarkerSeverity.Info}),typeof f=="function"&&(this._markers=this._markers.filter(g=>this._resourceFilter(g.resource))),this._markers.sort(l)};s(),this._dispoables.add(c.onMarkerChanged(g=>{(!this._resourceFilter||g.some(h=>this._resourceFilter(h)))&&(s(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(f){return!this._resourceFilter&&!f?!0:!this._resourceFilter||!f?!1:this._resourceFilter(f)}get selected(){const f=this._markers[this._nextIdx];return f&&new n(f,this._nextIdx+1,this._markers.length)}_initIdx(f,c,d){let r=!1,l=this._markers.findIndex(s=>s.resource.toString()===f.uri.toString());l<0&&(l=(0,L.binarySearch)(this._markers,{resource:f.uri},(s,g)=>(0,_.compare)(s.resource.toString(),g.resource.toString())),l<0&&(l=~l));for(let s=l;sr.resource.toString()===f.toString());if(!(d<0)){for(;dc[1])}}class b{constructor(n){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new E.ResourceMap,this._service=n,this._subscription=n.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(n){for(const t of n){const a=this._data.get(t);a&&this._substract(a);const u=this._resourceStats(t);this._add(u),this._data.set(t,u)}}_resourceStats(n){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(n.scheme))return t;for(const{severity:a}of this._service.read({resource:n}))a===S.MarkerSeverity.Error?t.errors+=1:a===S.MarkerSeverity.Warning?t.warnings+=1:a===S.MarkerSeverity.Info?t.infos+=1:t.unknowns+=1;return t}_substract(n){this.errors-=n.errors,this.warnings-=n.warnings,this.infos-=n.infos,this.unknowns-=n.unknowns}_add(n){this.errors+=n.errors,this.warnings+=n.warnings,this.infos+=n.infos,this.unknowns+=n.unknowns}}class o{constructor(){this._onMarkerChanged=new k.DebounceEmitter({delay:0,merge:o._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new v,this._stats=new b(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(n,t){for(const a of t||[])this.changeOne(n,a,[])}changeOne(n,t,a){if((0,L.isFalsyOrEmpty)(a))this._data.delete(t,n)&&this._onMarkerChanged.fire([t]);else{const u=[];for(const f of a){const c=o._toMarker(n,t,f);c&&u.push(c)}this._data.set(t,n,u),this._onMarkerChanged.fire([t])}}static _toMarker(n,t,a){let{code:u,severity:f,message:c,source:d,startLineNumber:r,startColumn:l,endLineNumber:s,endColumn:g,relatedInformation:h,tags:m}=a;if(c)return r=r>0?r:1,l=l>0?l:1,s=s>=r?s:r,g=g>0?g:l,{resource:t,owner:n,code:u,severity:f,message:c,source:d,startLineNumber:r,startColumn:l,endLineNumber:s,endColumn:g,relatedInformation:h,tags:m}}changeAll(n,t){const a=[],u=this._data.values(n);if(u)for(const f of u){const c=y.Iterable.first(f);c&&(a.push(c.resource),this._data.delete(c.resource,n))}if((0,L.isNonEmptyArray)(t)){const f=new E.ResourceMap;for(const{resource:c,marker:d}of t){const r=o._toMarker(n,c,d);if(!r)continue;const l=f.get(c);l?l.push(r):(f.set(c,[r]),a.push(c))}for(const[c,d]of f)this._data.set(c,n,d)}a.length>0&&this._onMarkerChanged.fire(a)}read(n=Object.create(null)){let{owner:t,resource:a,severities:u,take:f}=n;if((!f||f<0)&&(f=-1),t&&a){const c=this._data.get(a,t);if(c){const d=[];for(const r of c)if(o._accept(r,u)){const l=d.push(r);if(f>0&&l===f)break}return d}else return[]}else if(!t&&!a){const c=[];for(const d of this._data.values())for(const r of d)if(o._accept(r,u)){const l=c.push(r);if(f>0&&l===f)return c}return c}else{const c=this._data.values(a??t),d=[];for(const r of c)for(const l of r)if(o._accept(l,u)){const s=d.push(l);if(f>0&&s===f)return d}return d}}static _accept(n,t){return t===void 0||(t&n.severity)===n.severity}static _merge(n){const t=new E.ResourceMap;for(const a of n)for(const u of a)t.set(u,!0);return Array.from(t.keys())}}e.MarkerService=o}),define(ie[47],ne([1,0,100,8]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=L.default,e.INotificationService=(0,k.createDecorator)("notificationService");class y{}e.NoOpNotification=y}),define(ie[57],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.IOpenerService=void 0,e.IOpenerService=(0,L.createDecorator)("openerService");function k(y){let E;const _=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(y.fragment);return _&&(E={startLineNumber:parseInt(_[1]),startColumn:_[2]?parseInt(_[2]):1,endLineNumber:_[4]?parseInt(_[4]):void 0,endColumn:_[4]?_[5]?parseInt(_[5]):1:void 0},y=y.with({fragment:""})),{selection:E,uri:y}}e.extractSelection=k}),define(ie[778],ne([1,0,7,48,19,66,53,224,44,45,22,33,25,752,57]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let a=class{constructor(d){this._commandService=d}async open(d,r){if(!(0,S.matchesScheme)(d,S.Schemas.command))return!1;if(!r?.allowCommands||(typeof d=="string"&&(d=b.URI.parse(d)),Array.isArray(r.allowCommands)&&!r.allowCommands.includes(d.path)))return!0;let l=[];try{l=(0,p.parse)(decodeURIComponent(d.query))}catch{try{l=(0,p.parse)(d.query)}catch{}}return Array.isArray(l)||(l=[l]),await this._commandService.executeCommand(d.path,...l),!0}};a=Ee([he(0,i.ICommandService)],a);let u=class{constructor(d){this._editorService=d}async open(d,r){typeof d=="string"&&(d=b.URI.parse(d));const{selection:l,uri:s}=(0,t.extractSelection)(d);return d=s,d.scheme===S.Schemas.file&&(d=(0,v.normalizePath)(d)),await this._editorService.openCodeEditor({resource:d,options:{selection:l,source:r?.fromUserGesture?n.EditorOpenSource.USER:n.EditorOpenSource.API,...r?.editorOptions}},this._editorService.getFocusedCodeEditor(),r?.openToSide),!0}};u=Ee([he(0,o.ICodeEditorService)],u);let f=class{constructor(d,r){this._openers=new E.LinkedList,this._validators=new E.LinkedList,this._resolvers=new E.LinkedList,this._resolvedUriTargets=new _.ResourceMap(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new E.LinkedList,this._defaultExternalOpener={openExternal:async l=>((0,S.matchesSomeScheme)(l,S.Schemas.http,S.Schemas.https)?L.windowOpenNoOpener(l):k.mainWindow.location.href=l,!0)},this._openers.push({open:async(l,s)=>s?.openExternal||(0,S.matchesSomeScheme)(l,S.Schemas.mailto,S.Schemas.http,S.Schemas.https,S.Schemas.vsls)?(await this._doOpenExternal(l,s),!0):!1}),this._openers.push(new a(r)),this._openers.push(new u(d))}registerOpener(d){return{dispose:this._openers.unshift(d)}}async open(d,r){var l;const s=typeof d=="string"?b.URI.parse(d):d,g=(l=this._resolvedUriTargets.get(s))!==null&&l!==void 0?l:d;for(const h of this._validators)if(!await h.shouldOpen(g,r))return!1;for(const h of this._openers)if(await h.open(d,r))return!0;return!1}async resolveExternalUri(d,r){for(const l of this._resolvers)try{const s=await l.resolveExternalUri(d,r);if(s)return this._resolvedUriTargets.has(s.resolved)||this._resolvedUriTargets.set(s.resolved,d),s}catch{}throw new Error("Could not resolve external URI: "+d.toString())}async _doOpenExternal(d,r){const l=typeof d=="string"?b.URI.parse(d):d;let s;try{s=(await this.resolveExternalUri(l,r)).resolved}catch{s=l}let g;if(typeof d=="string"&&l.toString()===s.toString()?g=d:g=encodeURI(s.toString(!0)),r?.allowContributedOpeners){const h=typeof r?.allowContributedOpeners=="string"?r?.allowContributedOpeners:void 0;for(const m of this._externalOpeners)if(await m.openExternal(g,{sourceUri:l,preferredOpenerId:h},y.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(g,{sourceUri:l},y.CancellationToken.None)}dispose(){this._validators.clear()}};e.OpenerService=f,e.OpenerService=f=Ee([he(0,o.ICodeEditorService),he(1,i.ICommandService)],f)}),define(ie[779],ne([1,0,7,83,50,63,6,2,57,483]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let v=class extends p.Disposable{get enabled(){return this._enabled}set enabled(o){o?(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=o}constructor(o,i,n={},t){var a;super(),this._link=i,this._enabled=!0,this.el=(0,L.append)(o,(0,L.$)("a.monaco-link",{tabIndex:(a=i.tabIndex)!==null&&a!==void 0?a:0,href:i.href,title:i.title},i.label)),this.el.setAttribute("role","button");const u=this._register(new k.DomEmitter(this.el,"click")),f=this._register(new k.DomEmitter(this.el,"keypress")),c=_.Event.chain(f.event,l=>l.map(s=>new y.StandardKeyboardEvent(s)).filter(s=>s.keyCode===3)),d=this._register(new k.DomEmitter(this.el,E.EventType.Tap)).event;this._register(E.Gesture.addTarget(this.el));const r=_.Event.any(u.event,c,d);this._register(r(l=>{this.enabled&&(L.EventHelper.stop(l,!0),n?.opener?n.opener(this._link.href):t.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e.Link=v,e.Link=v=Ee([he(3,S.IOpenerService)],v)}),define(ie[780],ne([1,0,222]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k;const y=globalThis.vscode;if(typeof y<"u"&&typeof y.context<"u"){const E=y.context.configuration();if(E)k=E.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(globalThis._VSCODE_PRODUCT_JSON&&globalThis._VSCODE_PACKAGE_JSON){if(k=globalThis._VSCODE_PRODUCT_JSON,L.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 E=globalThis._VSCODE_PACKAGE_JSON;Object.assign(k,{version:E.version})}}else k={},Object.keys(k).length===0&&Object.assign(k,{version:"1.82.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",serverLicenseUrl:"https://github.com/microsoft/vscode/blob/main/LICENSE.txt"});e.default=k}),define(ie[87],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=e.IProgressService=void 0,e.IProgressService=(0,L.createDecorator)("progressService"),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class k{constructor(E){this.callback=E}report(E){this._value=E,this.callback(this._value)}}e.Progress=k,k.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,L.createDecorator)("editorProgressService")}),define(ie[781],ne([1,0,14,19,2,20]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var _;(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"})(_||(e.TriggerAction=_={}));function p(b){const o=b;return Array.isArray(o.items)}function S(b){const o=b;return!!o.picks&&o.additionalPicks instanceof Promise}class v extends y.Disposable{constructor(o,i){super(),this.prefix=o,this.options=i}provide(o,i,n){var t;const a=new y.DisposableStore;o.canAcceptInBackground=!!(!((t=this.options)===null||t===void 0)&&t.canAcceptInBackground),o.matchOnLabel=o.matchOnDescription=o.matchOnDetail=o.sortByLabel=!1;let u;const f=a.add(new y.MutableDisposable),c=async()=>{const d=f.value=new y.DisposableStore;u?.dispose(!0),o.busy=!1,u=new k.CancellationTokenSource(i);const r=u.token,l=o.value.substr(this.prefix.length).trim(),s=this._getPicks(l,d,r,n),g=(m,C)=>{var w;let D,I;if(p(m)?(D=m.items,I=m.active):D=m,D.length===0){if(C)return!1;(l.length>0||o.hideInput)&&(!((w=this.options)===null||w===void 0)&&w.noResultsPick)&&((0,E.isFunction)(this.options.noResultsPick)?D=[this.options.noResultsPick(l)]:D=[this.options.noResultsPick])}return o.items=D,I&&(o.activeItems=[I]),!0},h=async m=>{let C=!1,w=!1;await Promise.all([(async()=>{typeof m.mergeDelay=="number"&&(await(0,L.timeout)(m.mergeDelay),r.isCancellationRequested)||w||(C=g(m.picks,!0))})(),(async()=>{o.busy=!0;try{const D=await m.additionalPicks;if(r.isCancellationRequested)return;let I,M;p(m.picks)?(I=m.picks.items,M=m.picks.active):I=m.picks;let A,O;if(p(D)?(A=D.items,O=D.active):A=D,A.length>0||!C){let T;if(!M&&!O){const N=o.activeItems[0];N&&I.indexOf(N)!==-1&&(T=N)}g({items:[...I,...A],active:M||O||T})}}finally{r.isCancellationRequested||(o.busy=!1),w=!0}})()])};if(s!==null)if(S(s))await h(s);else if(!(s instanceof Promise))g(s);else{o.busy=!0;try{const m=await s;if(r.isCancellationRequested)return;S(m)?await h(m):g(m)}finally{r.isCancellationRequested||(o.busy=!1)}}};return a.add(o.onDidChangeValue(()=>c())),c(),a.add(o.onDidAccept(d=>{const[r]=o.selectedItems;typeof r?.accept=="function"&&(d.inBackground||o.hide(),r.accept(o.keyMods,d))})),a.add(o.onDidTriggerItemButton(async({button:d,item:r})=>{var l,s;if(typeof r.trigger=="function"){const g=(s=(l=r.buttons)===null||l===void 0?void 0:l.indexOf(d))!==null&&s!==void 0?s:-1;if(g>=0){const h=r.trigger(g,o.keyMods),m=typeof h=="number"?h:await h;if(i.isCancellationRequested)return;switch(m){case _.NO_ACTION:break;case _.CLOSE_PICKER:o.hide();break;case _.REFRESH_PICKER:c();break;case _.REMOVE_ITEM:{const C=o.items.indexOf(r);if(C!==-1){const w=o.items.slice(),D=w.splice(C,1),I=o.activeItems.filter(A=>A!==D[0]),M=o.keepScrollPosition;o.keepScrollPosition=!0,o.items=w,I&&(o.activeItems=I),o.keepScrollPosition=M}break}}}}})),a}}e.PickerQuickAccessProvider=v}),define(ie[782],ne([1,0,7,232,2,100,176]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const _=L.$;class p extends y.Disposable{constructor(v,b,o){super(),this.parent=v,this.onKeyDown=n=>L.addStandardDisposableListener(this.findInput.inputBox.inputElement,L.EventType.KEY_DOWN,n),this.onMouseDown=n=>L.addStandardDisposableListener(this.findInput.inputBox.inputElement,L.EventType.MOUSE_DOWN,n),this.onDidChange=n=>this.findInput.onDidChange(n),this.container=L.append(this.parent,_(".quick-input-box")),this.findInput=this._register(new k.FindInput(this.container,void 0,{label:"",inputBoxStyles:b,toggleStyles:o}));const i=this.findInput.inputBox.inputElement;i.role="combobox",i.ariaHasPopup="menu",i.ariaAutoComplete="list",i.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(v){this.findInput.setValue(v)}select(v=null){this.findInput.inputBox.select(v)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(v){this.findInput.inputBox.setPlaceHolder(v)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(v){this.findInput.inputBox.inputElement.type=v?"password":"text"}set enabled(v){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!v)}set toggles(v){this.findInput.setAdditionalToggles(v)}setAttribute(v,b){this.findInput.inputBox.inputElement.setAttribute(v,b)}showDecoration(v){v===E.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:v===E.default.Info?1:v===E.default.Warning?2:3,content:""})}stylesForType(v){return this.findInput.inputBox.stylesForType(v===E.default.Info?1:v===E.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=p}),define(ie[347],ne([1,0,7,83,6,50,63,115,168,394,744,176]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const o={},i=new S.IdGenerator("quick-input-button-icon-");function n(a){if(!a)return;let u;const f=a.dark.toString();return o[f]?u=o[f]:(u=i.nextId(),L.createCSSRule(`.${u}, .hc-light .${u}`,`background-image: ${L.asCSSUrl(a.light||a.dark)}`),L.createCSSRule(`.vs-dark .${u}, .hc-black .${u}`,`background-image: ${L.asCSSUrl(a.dark)}`),o[f]=u),u}e.getIconClass=n;function t(a,u,f){L.reset(u);const c=(0,v.parseLinkedText)(a);let d=0;for(const r of c.nodes)if(typeof r=="string")u.append(...(0,p.renderLabelWithIcons)(r));else{let l=r.title;!l&&r.href.startsWith("command:")?l=(0,b.localize)(0,null,r.href.substring(8)):l||(l=r.href);const s=L.$("a",{href:r.href,title:l,tabIndex:d++},r.label);s.style.textDecoration="underline";const g=D=>{L.isEventLike(D)&&L.EventHelper.stop(D,!0),f.callback(r.href)},h=f.disposables.add(new k.DomEmitter(s,L.EventType.CLICK)).event,m=f.disposables.add(new k.DomEmitter(s,L.EventType.KEY_DOWN)).event,C=y.Event.chain(m,D=>D.filter(I=>{const M=new E.StandardKeyboardEvent(I);return M.equals(10)||M.equals(3)}));f.disposables.add(_.Gesture.addTarget(s));const w=f.disposables.add(new k.DomEmitter(s,_.EventType.Tap)).event;y.Event.any(h,w,C)(g,null,f.disposables),u.appendChild(s)}}e.renderQuickInputDescription=t}),define(ie[70],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var k;(function(_){_[_.Blur=1]="Blur",_[_.Gesture=2]="Gesture",_[_.Other=3]="Other"})(k||(e.QuickInputHideReason=k={}));var y;(function(_){_[_.NONE=0]="NONE",_[_.FIRST=1]="FIRST",_[_.SECOND=2]="SECOND",_[_.LAST=3]="LAST"})(y||(e.ItemActivation=y={}));class E{constructor(p){this.options=p}}e.QuickPickItemScorerAccessor=E,e.quickPickItemScorerAccessor=new E,e.IQuickInputService=(0,L.createDecorator)("quickInputService")}),define(ie[37],ne([1,0,98,20]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class y{constructor(){this.data=new Map}add(_,p){L.ok(k.isString(_)),L.ok(k.isObject(p)),L.ok(!this.data.has(_),"There is already an extension with this id"),this.data.set(_,p)}as(_){return this.data.get(_)||null}}e.Registry=new y}),define(ie[348],ne([1,0,37]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalSelectionTransfer=e.Extensions=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};class k{}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},L.Registry.add(e.Extensions.DragAndDropContribution,new k);class y{constructor(){}static getInstance(){return y.INSTANCE}hasData(_){return _&&_===this.proto}getData(_){if(this.hasData(_))return this.data}}e.LocalSelectionTransfer=y,y.INSTANCE=new y}),define(ie[349],ne([1,0,198,174,108,22,348]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExternalVSDataTransfer=e.toVSDataTransfer=void 0;function p(o){const i=new k.VSDataTransfer;for(const n of o.items){const t=n.type;if(n.kind==="string"){const a=new Promise(u=>n.getAsString(u));i.append(t,(0,k.createStringDataTransferItem)(a))}else if(n.kind==="file"){const a=n.getAsFile();a&&i.append(t,S(a))}}return i}e.toVSDataTransfer=p;function S(o){const i=o.path?E.URI.parse(o.path):void 0;return(0,k.createFileDataTransferItem)(o.name,i,async()=>new Uint8Array(await o.arrayBuffer()))}const v=Object.freeze([_.CodeDataTransfers.EDITORS,_.CodeDataTransfers.FILES,L.DataTransfers.RESOURCES,L.DataTransfers.INTERNAL_URI_LIST]);function b(o,i=!1){const n=p(o),t=n.get(L.DataTransfers.INTERNAL_URI_LIST);if(t)n.replace(y.Mimes.uriList,t);else if(i||!n.has(y.Mimes.uriList)){const a=[];for(const u of o.items){const f=u.getAsFile();if(f){const c=f.path;try{c?a.push(E.URI.file(c).toString()):a.push(E.URI.parse(f.name,!0).toString())}catch{}}}a.length&&n.replace(y.Mimes.uriList,(0,k.createStringDataTransferItem)(k.UriList.create(a)))}for(const a of v)n.delete(a);return n}e.toExternalVSDataTransfer=b}),define(ie[243],ne([1,0,6,37]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function y(p){return p.length>0&&p.charAt(p.length-1)==="#"?p.substring(0,p.length-1):p}class E{constructor(){this._onDidChangeSchema=new L.Emitter,this.schemasById={}}registerSchema(S,v){this.schemasById[y(S)]=v,this._onDidChangeSchema.fire(S)}notifySchemaChanged(S){this._onDidChangeSchema.fire(S)}}const _=new E;k.Registry.add(e.Extensions.JSONContribution,_)}),define(ie[97],ne([1,0,13,6,20,730,28,243,37]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},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";const v=S.Registry.as(p.Extensions.JSONContribution);class b{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new k.Emitter,this._onDidUpdateConfiguration=new k.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:E.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(c,d=!0){this.registerConfigurations([c],d)}registerConfigurations(c,d=!0){const r=new Set;this.doRegisterConfigurations(c,d,r),v.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:r})}registerDefaultConfigurations(c){const d=new Set;this.doRegisterDefaultConfigurations(c,d),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:d,defaultsOverrides:!0})}doRegisterDefaultConfigurations(c,d){var r;const l=[];for(const{overrides:s,source:g}of c)for(const h in s)if(d.add(h),e.OVERRIDE_PROPERTY_REGEX.test(h)){const m=this.configurationDefaultsOverrides.get(h),C=(r=m?.valuesSources)!==null&&r!==void 0?r:new Map;if(g)for(const M of Object.keys(s[h]))C.set(M,g);const w={...m?.value||{},...s[h]};this.configurationDefaultsOverrides.set(h,{source:g,value:w,valuesSources:C});const D=(0,_.getLanguageTagSettingPlainKey)(h),I={type:"object",default:w,description:E.localize(1,null,D),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:w,source:y.isString(g)?void 0:g,defaultValueSource:g};l.push(...n(h)),this.configurationProperties[h]=I,this.defaultLanguageConfigurationOverridesNode.properties[h]=I}else{this.configurationDefaultsOverrides.set(h,{value:s[h],source:g});const m=this.configurationProperties[h];m&&(this.updatePropertyDefaultValue(h,m),this.updateSchema(h,m))}this.doRegisterOverrideIdentifiers(l)}registerOverrideIdentifiers(c){this.doRegisterOverrideIdentifiers(c),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(c){for(const d of c)this.overrideIdentifiers.add(d);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(c,d,r){c.forEach(l=>{this.validateAndRegisterProperties(l,d,l.extensionInfo,l.restrictedProperties,void 0,r),this.configurationContributors.push(l),this.registerJSONConfiguration(l)})}validateAndRegisterProperties(c,d=!0,r,l,s=3,g){var h;s=y.isUndefinedOrNull(c.scope)?s:c.scope;const m=c.properties;if(m)for(const w in m){const D=m[w];if(d&&u(w,D)){delete m[w];continue}if(D.source=r,D.defaultDefaultValue=m[w].default,this.updatePropertyDefaultValue(w,D),e.OVERRIDE_PROPERTY_REGEX.test(w)?D.scope=void 0:(D.scope=y.isUndefinedOrNull(D.scope)?s:D.scope,D.restricted=y.isUndefinedOrNull(D.restricted)?!!l?.includes(w):D.restricted),m[w].hasOwnProperty("included")&&!m[w].included){this.excludedConfigurationProperties[w]=m[w],delete m[w];continue}else this.configurationProperties[w]=m[w],!((h=m[w].policy)===null||h===void 0)&&h.name&&this.policyConfigurations.set(m[w].policy.name,w);!m[w].deprecationMessage&&m[w].markdownDeprecationMessage&&(m[w].deprecationMessage=m[w].markdownDeprecationMessage),g.add(w)}const C=c.allOf;if(C)for(const w of C)this.validateAndRegisterProperties(w,d,r,l,s,g)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(c){const d=r=>{const l=r.properties;if(l)for(const g in l)this.updateSchema(g,l[g]);const s=r.allOf;s?.forEach(d)};d(c)}updateSchema(c,d){switch(e.allSettings.properties[c]=d,d.scope){case 1:e.applicationSettings.properties[c]=d;break;case 2:e.machineSettings.properties[c]=d;break;case 6:e.machineOverridableSettings.properties[c]=d;break;case 3:e.windowSettings.properties[c]=d;break;case 4:e.resourceSettings.properties[c]=d;break;case 5:e.resourceSettings.properties[c]=d,this.resourceLanguageSettingsSchema.properties[c]=d;break}}updateOverridePropertyPatternKey(){for(const c of this.overrideIdentifiers.values()){const d=`[${c}]`,r={type:"object",description:E.localize(2,null),errorMessage:E.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(d,r),e.allSettings.properties[d]=r,e.applicationSettings.properties[d]=r,e.machineSettings.properties[d]=r,e.machineOverridableSettings.properties[d]=r,e.windowSettings.properties[d]=r,e.resourceSettings.properties[d]=r}}registerOverridePropertyPatternKey(){const c={type:"object",description:E.localize(4,null),errorMessage:E.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=c,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(c,d){const r=this.configurationDefaultsOverrides.get(c);let l=r?.value,s=r?.source;y.isUndefined(l)&&(l=d.defaultDefaultValue,s=void 0),y.isUndefined(l)&&(l=t(d.type)),d.default=l,d.defaultValueSource=s}}const o="\\[([^\\]]+)\\]",i=new RegExp(o,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${o})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function n(f){const c=[];if(e.OVERRIDE_PROPERTY_REGEX.test(f)){let d=i.exec(f);for(;d?.length;){const r=d[1].trim();r&&c.push(r),d=i.exec(f)}}return(0,L.distinct)(c)}e.overrideIdentifiersFromKey=n;function t(f){switch(Array.isArray(f)?f[0]:f){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=t;const a=new b;S.Registry.add(e.Extensions.Configuration,a);function u(f,c){var d,r,l,s;return f.trim()?e.OVERRIDE_PROPERTY_REGEX.test(f)?E.localize(7,null,f):a.getConfigurationProperties()[f]!==void 0?E.localize(8,null,f):!((d=c.policy)===null||d===void 0)&&d.name&&a.getPolicyConfigurations().get((r=c.policy)===null||r===void 0?void 0:r.name)!==void 0?E.localize(9,null,f,(l=c.policy)===null||l===void 0?void 0:l.name,a.getPolicyConfigurations().get((s=c.policy)===null||s===void 0?void 0:s.name)):null:E.localize(6,null)}e.validateProperty=u}),define(ie[244],ne([1,0,275,36,177,627,97,37]),function(Q,e,L,k,y,E,_,p){"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:E.localize(0,null),scope:5});const S={...e.editorConfigurationBaseNode,properties:{"editor.tabSize":{type:"number",default:y.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:E.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:E.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:E.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:E.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:E.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:E.localize(6,null)},"editor.wordBasedSuggestions":{enum:["off","currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[E.localize(7,null),E.localize(8,null),E.localize(9,null),E.localize(10,null)],description:E.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[E.localize(12,null),E.localize(13,null),E.localize(14,null)],default:"configuredByTheme",description:E.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:E.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:E.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:E.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:E.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:E.localize(20,null),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:E.localize(21,null),items:{type:"array",items:[{type:"string",description:E.localize(22,null)},{type:"string",description:E.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:E.localize(24,null),items:{type:"array",items:[{type:"string",description:E.localize(25,null)},{type:"string",description:E.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:L.diffEditorDefaultOptions.maxComputationTime,description:E.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:L.diffEditorDefaultOptions.maxFileSize,description:E.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:L.diffEditorDefaultOptions.renderSideBySide,description:E.localize(29,null)},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:L.diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,description:E.localize(30,null)},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:L.diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,description:E.localize(31,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:L.diffEditorDefaultOptions.renderMarginRevertIcon,description:E.localize(32,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:L.diffEditorDefaultOptions.ignoreTrimWhitespace,description:E.localize(33,null)},"diffEditor.renderIndicators":{type:"boolean",default:L.diffEditorDefaultOptions.renderIndicators,description:E.localize(34,null)},"diffEditor.codeLens":{type:"boolean",default:L.diffEditorDefaultOptions.diffCodeLens,description:E.localize(35,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:L.diffEditorDefaultOptions.diffWordWrap,markdownEnumDescriptions:[E.localize(36,null),E.localize(37,null),E.localize(38,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:L.diffEditorDefaultOptions.diffAlgorithm,markdownEnumDescriptions:[E.localize(39,null),E.localize(40,null)],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:L.diffEditorDefaultOptions.hideUnchangedRegions.enabled,markdownDescription:E.localize(41,null)},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.revealLineCount,markdownDescription:E.localize(42,null),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.minimumLineCount,markdownDescription:E.localize(43,null),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.contextLineCount,markdownDescription:E.localize(44,null),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:L.diffEditorDefaultOptions.experimental.showMoves,markdownDescription:E.localize(45,null)},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:L.diffEditorDefaultOptions.experimental.showEmptyDecorations,description:E.localize(46,null)}}};function v(a){return typeof a.type<"u"||typeof a.anyOf<"u"}for(const a of k.editorOptionsRegistry){const u=a.schema;if(typeof u<"u")if(v(u))S.properties[`editor.${a.name}`]=u;else for(const f in u)Object.hasOwnProperty.call(u,f)&&(S.properties[f]=u[f])}let b=null;function o(){return b===null&&(b=Object.create(null),Object.keys(S.properties).forEach(a=>{b[a]=!0})),b}function i(a){return o()[`editor.${a}`]||!1}e.isEditorConfigurationKey=i;function n(a){return o()[`diffEditor.${a}`]||!1}e.isDiffEditorConfigurationKey=n,p.Registry.as(_.Extensions.Configuration).registerConfiguration(S)}),define(ie[79],ne([1,0,637,6,37,108,97]),function(Q,e,L,k,y,E,_){"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 p{constructor(){this._onDidChangeLanguages=new k.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(v){return this._languages.push(v),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let b=0,o=this._languages.length;b{const B=R.change.keys.some(V=>x.has(V)),W=R.change.overrides.filter(([V,U])=>U.some(F=>x.has(F))).map(([V])=>V);if(B)this.configurations.clear(),this.onDidChangeEmitter.fire(new d(void 0));else for(const V of W)this.languageService.isRegisteredLanguageId(V)&&(this.configurations.delete(V),this.onDidChangeEmitter.fire(new d(V)))})),this._register(this._registry.onDidChange(R=>{this.configurations.delete(R.languageId),this.onDidChangeEmitter.fire(new d(R.languageId))}))}register(N,P,x){return this._registry.register(N,P,x)}getLanguageConfiguration(N){let P=this.configurations.get(N);return P||(P=l(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,P)),P}};e.LanguageConfigurationService=r,e.LanguageConfigurationService=r=Ee([he(0,t.IConfigurationService),he(1,a.ILanguageService)],r);function l(T,N,P,x){let R=N.getLanguageConfiguration(T);if(!R){if(!x.isRegisteredLanguageId(T))return new O(T,{});R=new O(T,{})}const B=g(R.languageId,P),W=D([R.underlyingConfig,B]);return new O(R.languageId,W)}const s={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function g(T,N){const P=N.getValue(s.brackets,{overrideIdentifier:T}),x=N.getValue(s.colorizedBracketPairs,{overrideIdentifier:T});return{brackets:h(P),colorizedBracketPairs:h(x)}}function h(T){if(Array.isArray(T))return T.map(N=>{if(!(!Array.isArray(N)||N.length!==2))return[N[0],N[1]]}).filter(N=>!!N)}function m(T,N,P){const x=T.getLineContent(N);let R=y.getLeadingWhitespace(x);return R.length>P-1&&(R=R.substring(0,P-1)),R}e.getIndentationAtPosition=m;function C(T,N,P){T.tokenization.forceTokenization(N);const x=T.tokenization.getLineTokens(N),R=typeof P>"u"?T.getLineMaxColumn(N)-1:P-1;return(0,p.createScopedLineTokens)(x,R)}e.getScopedLineTokens=C;class w{constructor(N){this.languageId=N,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(N,P){const x=new I(N,P,++this._order);return this._entries.push(x),this._resolved=null,(0,k.toDisposable)(()=>{for(let R=0;RN.configuration)))}}function D(T){let N={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 P of T)N={comments:P.comments||N.comments,brackets:P.brackets||N.brackets,wordPattern:P.wordPattern||N.wordPattern,indentationRules:P.indentationRules||N.indentationRules,onEnterRules:P.onEnterRules||N.onEnterRules,autoClosingPairs:P.autoClosingPairs||N.autoClosingPairs,surroundingPairs:P.surroundingPairs||N.surroundingPairs,autoCloseBefore:P.autoCloseBefore||N.autoCloseBefore,folding:P.folding||N.folding,colorizedBracketPairs:P.colorizedBracketPairs||N.colorizedBracketPairs,__electricCharacterSupport:P.__electricCharacterSupport||N.__electricCharacterSupport};return N}class I{constructor(N,P,x){this.configuration=N,this.priority=P,this.order=x}static cmp(N,P){return N.priority===P.priority?N.order-P.order:N.priority-P.priority}}class M{constructor(N){this.languageId=N}}e.LanguageConfigurationChangeEvent=M;class A extends k.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(f.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(N,P,x=0){let R=this._entries.get(N);R||(R=new w(N),this._entries.set(N,R));const B=R.register(P,x);return this._onDidChange.fire(new M(N)),(0,k.toDisposable)(()=>{B.dispose(),this._onDidChange.fire(new M(N))})}getLanguageConfiguration(N){const P=this._entries.get(N);return P?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=A;class O{constructor(N,P){this.languageId=N,this.underlyingConfig=P,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new o.OnEnterSupport(this.underlyingConfig):null,this.comments=O._handleComments(this.underlyingConfig),this.characterPair=new S.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||E.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new b.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new c.LanguageBracketsConfiguration(N,this.underlyingConfig)}getWordDefinition(){return(0,E.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new i.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new v.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(N,P,x,R){return this._onEnterSupport?this._onEnterSupport.onEnter(N,P,x,R):null}getAutoClosingPairs(){return new _.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(N){return this.characterPair.getAutoCloseBeforeSet(N)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(N){const P=N.comments;if(!P)return null;const x={};if(P.lineComment&&(x.lineCommentToken=P.lineComment),P.blockComment){const[R,B]=P.blockComment;x.blockCommentStartToken=R,x.blockCommentEndToken=B}return x}}e.ResolvedLanguageConfiguration=O,(0,u.registerSingleton)(e.ILanguageConfigurationService,r,1)}),define(ie[245],ne([1,0,14,2,324,598,5,32,636,52,187,13,64,61,9,18,205,110,62,48,7]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"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 g(A,O){const T=A.getModel(O);return!(!T||T.isTooLargeForSyncing())}let h=class extends k.Disposable{constructor(O,T,N,P,x){super(),this._modelService=O,this._workerManager=this._register(new C(this._modelService,P)),this._logService=N,this._register(x.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(R,B)=>g(this._modelService,R.uri)?this._workerManager.withWorker().then(W=>W.computeLinks(R.uri)).then(W=>W&&{links:W}):Promise.resolve({links:[]})})),this._register(x.completionProvider.register("*",new m(this._workerManager,T,this._modelService,P)))}dispose(){super.dispose()}canComputeUnicodeHighlights(O){return g(this._modelService,O)}computedUnicodeHighlights(O,T,N){return this._workerManager.withWorker().then(P=>P.computedUnicodeHighlights(O,T,N))}async computeDiff(O,T,N,P){const x=await this._workerManager.withWorker().then(W=>W.computeDiff(O,T,N,P));if(!x)return null;return{identical:x.identical,quitEarly:x.quitEarly,changes:B(x.changes),moves:x.moves.map(W=>new u.MovedText(new f.LineRangeMapping(new c.LineRange(W[0],W[1]),new c.LineRange(W[2],W[3])),B(W[4])))};function B(W){return W.map(V=>{var U;return new f.DetailedLineRangeMapping(new c.LineRange(V[0],V[1]),new c.LineRange(V[2],V[3]),(U=V[4])===null||U===void 0?void 0:U.map(F=>new f.RangeMapping(new _.Range(F[0],F[1],F[2],F[3]),new _.Range(F[4],F[5],F[6],F[7]))))})}}computeMoreMinimalEdits(O,T,N=!1){if((0,o.isNonEmptyArray)(T)){if(!g(this._modelService,O))return Promise.resolve(T);const P=n.StopWatch.create(),x=this._workerManager.withWorker().then(R=>R.computeMoreMinimalEdits(O,T,N));return x.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",O.toString(!0),P.elapsed())),Promise.race([x,(0,L.timeout)(1e3).then(()=>T)])}else return Promise.resolve(void 0)}canNavigateValueSet(O){return g(this._modelService,O)}navigateValueSet(O,T,N){return this._workerManager.withWorker().then(P=>P.navigateValueSet(O,T,N))}canComputeWordRanges(O){return g(this._modelService,O)}computeWordRanges(O,T){return this._workerManager.withWorker().then(N=>N.computeWordRanges(O,T))}};e.EditorWorkerService=h,e.EditorWorkerService=h=Ee([he(0,v.IModelService),he(1,b.ITextResourceConfigurationService),he(2,i.ILogService),he(3,p.ILanguageConfigurationService),he(4,a.ILanguageFeaturesService)],h);class m{constructor(O,T,N,P){this.languageConfigurationService=P,this._debugDisplayName="wordbasedCompletions",this._workerManager=O,this._configurationService=T,this._modelService=N}async provideCompletionItems(O,T){const N=this._configurationService.getValue(O.uri,T,"editor");if(N.wordBasedSuggestions==="off")return;const P=[];if(N.wordBasedSuggestions==="currentDocument")g(this._modelService,O.uri)&&P.push(O.uri);else for(const F of this._modelService.getModels())g(this._modelService,F.uri)&&(F===O?P.unshift(F.uri):(N.wordBasedSuggestions==="allDocuments"||F.getLanguageId()===O.getLanguageId())&&P.push(F.uri));if(P.length===0)return;const x=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition(),R=O.getWordAtPosition(T),B=R?new _.Range(T.lineNumber,R.startColumn,T.lineNumber,R.endColumn):_.Range.fromPositions(T),W=B.setEndPosition(T.lineNumber,T.column),U=await(await this._workerManager.withWorker()).textualSuggest(P,R?.word,x);if(U)return{duration:U.duration,suggestions:U.words.map(F=>({kind:18,label:F,insertText:F,range:{insert:W,replace:B}}))}}}class C extends k.Disposable{constructor(O,T){super(),this.languageConfigurationService=T,this._modelService=O,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new r.WindowIntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(s/2),d.$window),this._register(this._modelService.onModelRemoved(P=>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 w extends k.Disposable{constructor(O,T,N){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=O,this._modelService=T,!N){const P=new L.IntervalTimer;P.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(P)}}dispose(){for(const O in this._syncedModels)(0,k.dispose)(this._syncedModels[O]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(O,T){for(const N of O){const P=N.toString();this._syncedModels[P]||this._beginModelSync(N,T),this._syncedModels[P]&&(this._syncedModelsLastUsedTime[P]=new Date().getTime())}}_checkStopModelSync(){const O=new Date().getTime(),T=[];for(const N in this._syncedModelsLastUsedTime)O-this._syncedModelsLastUsedTime[N]>l&&T.push(N);for(const N of T)this._stopModelSync(N)}_beginModelSync(O,T){const N=this._modelService.getModel(O);if(!N||!T&&N.isTooLargeForSyncing())return;const P=O.toString();this._proxy.acceptNewModel({url:N.uri.toString(),lines:N.getLinesContent(),EOL:N.getEOL(),versionId:N.getVersionId()});const x=new k.DisposableStore;x.add(N.onDidChangeContent(R=>{this._proxy.acceptModelChanged(P.toString(),R)})),x.add(N.onWillDispose(()=>{this._stopModelSync(P)})),x.add((0,k.toDisposable)(()=>{this._proxy.acceptRemovedModel(P)})),this._syncedModels[P]=x}_stopModelSync(O){const T=this._syncedModels[O];delete this._syncedModels[O],delete this._syncedModelsLastUsedTime[O],(0,k.dispose)(T)}}class D{constructor(O){this._instance=O,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class I{constructor(O){this._workerClient=O}fhr(O,T){return this._workerClient.fhr(O,T)}}e.EditorWorkerHost=I;class M extends k.Disposable{constructor(O,T,N,P){super(),this.languageConfigurationService=P,this._disposed=!1,this._modelService=O,this._keepIdleModels=T,this._workerFactory=new E.DefaultWorkerFactory(N),this._worker=null,this._modelManager=null}fhr(O,T){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new y.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new I(this)))}catch(O){(0,y.logOnceWebWorkerWarning)(O),this._worker=new D(new S.EditorSimpleWorker(new I(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,O=>((0,y.logOnceWebWorkerWarning)(O),this._worker=new D(new S.EditorSimpleWorker(new I(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(O){return this._modelManager||(this._modelManager=this._register(new w(O,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(O,T=!1){return this._disposed?Promise.reject((0,t.canceled)()):this._getProxy().then(N=>(this._getOrCreateModelManager(N).ensureSyncedResources(O,T),N))}computedUnicodeHighlights(O,T,N){return this._withSyncedResources([O]).then(P=>P.computeUnicodeHighlights(O.toString(),T,N))}computeDiff(O,T,N,P){return this._withSyncedResources([O,T],!0).then(x=>x.computeDiff(O.toString(),T.toString(),N,P))}computeMoreMinimalEdits(O,T,N){return this._withSyncedResources([O]).then(P=>P.computeMoreMinimalEdits(O.toString(),T,N))}computeLinks(O){return this._withSyncedResources([O]).then(T=>T.computeLinks(O.toString()))}computeDefaultDocumentColors(O){return this._withSyncedResources([O]).then(T=>T.computeDefaultDocumentColors(O.toString()))}async textualSuggest(O,T,N){const P=await this._withSyncedResources(O),x=N.source,R=N.flags;return P.textualSuggest(O.map(B=>B.toString()),T,x,R)}computeWordRanges(O,T){return this._withSyncedResources([O]).then(N=>{const P=this._modelService.getModel(O);if(!P)return Promise.resolve(null);const x=this.languageConfigurationService.getLanguageConfiguration(P.getLanguageId()).getWordDefinition(),R=x.source,B=x.flags;return N.computeWordRanges(O.toString(),T,R,B)})}navigateValueSet(O,T,N){return this._withSyncedResources([O]).then(P=>{const x=this._modelService.getModel(O);if(!x)return null;const R=this.languageConfigurationService.getLanguageConfiguration(x.getLanguageId()).getWordDefinition(),B=R.source,W=R.flags;return P.navigateValueSet(O.toString(),T,N,B,W)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=M}),define(ie[783],ne([1,0,55,245]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function y(_,p,S){return new E(_,p,S)}e.createWebWorker=y;class E extends k.EditorWorkerClient{constructor(p,S,v){super(p,v.keepIdleModels||!1,v.label,S),this._foreignModuleId=v.moduleId,this._foreignModuleCreateData=v.createData||null,this._foreignModuleHost=v.host||null,this._foreignProxy=null}fhr(p,S){if(!this._foreignModuleHost||typeof this._foreignModuleHost[p]!="function")return Promise.reject(new Error("Missing method "+p+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[p].apply(this._foreignModuleHost,S))}catch(v){return Promise.reject(v)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(p=>{const S=this._foreignModuleHost?(0,L.getAllMethodNames)(this._foreignModuleHost):[];return p.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,S).then(v=>{this._foreignModuleCreateData=null;const b=(n,t)=>p.fmr(n,t),o=(n,t)=>function(){const a=Array.prototype.slice.call(arguments,0);return t(n,a)},i={};for(const n of v)i[n]=o(n,b);return i})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(p){return this._withSyncedResources(p).then(S=>this.getProxy())}}}),define(ie[246],ne([1,0,12,111,129,32]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function _(i,n,t){const a=i.tokenization.getLanguageIdAtPosition(n,0);if(n>1){let u,f=-1;for(u=n-1;u>=1;u--){if(i.tokenization.getLanguageIdAtPosition(u,0)!==a)return f;const c=i.getLineContent(u);if(t.shouldIgnore(c)||/^\s+$/.test(c)||c===""){f=u;continue}return u}}return-1}function p(i,n,t,a=!0,u){if(i<4)return null;const f=u.getLanguageConfiguration(n.tokenization.getLanguageId()).indentRulesSupport;if(!f)return null;if(t<=1)return{indentation:"",action:null};for(let r=t-1;r>0&&n.getLineContent(r)==="";r--)if(r===1)return{indentation:"",action:null};const c=_(n,t,f);if(c<0)return null;if(c<1)return{indentation:"",action:null};const d=n.getLineContent(c);if(f.shouldIncrease(d)||f.shouldIndentNextLine(d))return{indentation:L.getLeadingWhitespace(d),action:k.IndentAction.Indent,line:c};if(f.shouldDecrease(d))return{indentation:L.getLeadingWhitespace(d),action:null,line:c};{if(c===1)return{indentation:L.getLeadingWhitespace(n.getLineContent(c)),action:null,line:c};const r=c-1,l=f.getIndentMetadata(n.getLineContent(r));if(!(l&3)&&l&4){let s=0;for(let g=r-1;g>0;g--)if(!f.shouldIndentNextLine(n.getLineContent(g))){s=g;break}return{indentation:L.getLeadingWhitespace(n.getLineContent(s+1)),action:null,line:s+1}}if(a)return{indentation:L.getLeadingWhitespace(n.getLineContent(c)),action:null,line:c};for(let s=c;s>0;s--){const g=n.getLineContent(s);if(f.shouldIncrease(g))return{indentation:L.getLeadingWhitespace(g),action:k.IndentAction.Indent,line:s};if(f.shouldIndentNextLine(g)){let h=0;for(let m=s-1;m>0;m--)if(!f.shouldIndentNextLine(n.getLineContent(s))){h=m;break}return{indentation:L.getLeadingWhitespace(n.getLineContent(h+1)),action:null,line:h+1}}else if(f.shouldDecrease(g))return{indentation:L.getLeadingWhitespace(g),action:null,line:s}}return{indentation:L.getLeadingWhitespace(n.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=p;function S(i,n,t,a,u,f){if(i<4)return null;const c=f.getLanguageConfiguration(t);if(!c)return null;const d=f.getLanguageConfiguration(t).indentRulesSupport;if(!d)return null;const r=p(i,n,a,void 0,f),l=n.getLineContent(a);if(r){const s=r.line;if(s!==void 0){let g=!0;for(let h=s;h0&&f.getLanguageId(0)!==c.languageId?(r=!0,l=d.substr(0,t.startColumn-1-c.firstCharOffset)):l=f.getLineContent().substring(0,t.startColumn-1);let s;t.isEmpty()?s=d.substr(t.startColumn-1-c.firstCharOffset):s=(0,E.getScopedLineTokens)(n,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset);const g=u.getLanguageConfiguration(c.languageId).indentRulesSupport;if(!g)return null;const h=l,m=L.getLeadingWhitespace(l),C={tokenization:{getLineTokens:M=>n.tokenization.getLineTokens(M),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(M,A)=>n.getLanguageIdAtPosition(M,A)},getLineContent:M=>M===t.startLineNumber?h:n.getLineContent(M)},w=L.getLeadingWhitespace(f.getLineContent()),D=p(i,C,t.startLineNumber+1,void 0,u);if(!D){const M=r?w:m;return{beforeEnter:M,afterEnter:M}}let I=r?w:D.indentation;return D.action===k.IndentAction.Indent&&(I=a.shiftIndent(I)),g.shouldDecrease(s)&&(I=a.unshiftIndent(I)),{beforeEnter:r?w:m,afterEnter:I}}e.getIndentForEnter=v;function b(i,n,t,a,u,f){if(i<4)return null;const c=(0,E.getScopedLineTokens)(n,t.startLineNumber,t.startColumn);if(c.firstCharOffset)return null;const d=f.getLanguageConfiguration(c.languageId).indentRulesSupport;if(!d)return null;const r=c.getLineContent(),l=r.substr(0,t.startColumn-1-c.firstCharOffset);let s;if(t.isEmpty()?s=r.substr(t.startColumn-1-c.firstCharOffset):s=(0,E.getScopedLineTokens)(n,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset),!d.shouldDecrease(l+s)&&d.shouldDecrease(l+a+s)){const g=p(i,n,t.startLineNumber,!1,f);if(!g)return null;let h=g.indentation;return g.action!==k.IndentAction.Indent&&(h=u.unshiftIndent(h)),h}return null}e.getIndentActionForType=b;function o(i,n,t){const a=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!a||n<1||n>i.getLineCount()?null:a.getIndentMetadata(i.getLineContent(n))}e.getIndentMetadata=o}),define(ie[247],ne([1,0,111,32]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function y(E,_,p,S){const v=(0,k.getScopedLineTokens)(_,p.startLineNumber,p.startColumn),b=S.getLanguageConfiguration(v.languageId);if(!b)return null;const o=v.getLineContent(),i=o.substr(0,p.startColumn-1-v.firstCharOffset);let n;p.isEmpty()?n=o.substr(p.startColumn-1-v.firstCharOffset):n=(0,k.getScopedLineTokens)(_,p.endLineNumber,p.endColumn).getLineContent().substr(p.endColumn-1-v.firstCharOffset);let t="";if(p.startLineNumber>1&&v.firstCharOffset===0){const r=(0,k.getScopedLineTokens)(_,p.startLineNumber-1);r.languageId===v.languageId&&(t=r.getLineContent())}const a=b.onEnter(E,t,i,n);if(!a)return null;const u=a.indentAction;let f=a.appendText;const c=a.removeText||0;f?u===L.IndentAction.Indent&&(f=" "+f):u===L.IndentAction.Indent||u===L.IndentAction.IndentOutdent?f=" ":f="";let d=(0,k.getIndentationAtPosition)(_,p.startLineNumber,p.startColumn);return c&&(d=d.substring(0,d.length-c)),{indentAction:u,appendText:f,removeText:c,indentation:d}}e.getEnterAction=y}),define(ie[248],ne([1,0,12,84,5,24,247,32]),function(Q,e,L,k,y,E,_,p){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const v=Object.create(null);function b(i,n){if(n<=0)return"";v[i]||(v[i]=["",i]);const t=v[i];for(let a=t.length;a<=n;a++)t[a]=t[a-1]+i;return t[n]}let o=S=class{static unshiftIndent(n,t,a,u,f){const c=k.CursorColumns.visibleColumnFromColumn(n,t,a);if(f){const d=b(" ",u),l=k.CursorColumns.prevIndentTabStop(c,u)/u;return b(d,l)}else{const d=" ",l=k.CursorColumns.prevRenderTabStop(c,a)/a;return b(d,l)}}static shiftIndent(n,t,a,u,f){const c=k.CursorColumns.visibleColumnFromColumn(n,t,a);if(f){const d=b(" ",u),l=k.CursorColumns.nextIndentTabStop(c,u)/u;return b(d,l)}else{const d=" ",l=k.CursorColumns.nextRenderTabStop(c,a)/a;return b(d,l)}}constructor(n,t,a){this._languageConfigurationService=a,this._opts=t,this._selection=n,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(n,t,a){this._useLastEditRangeForCursorEndPosition?n.addTrackedEditOperation(t,a):n.addEditOperation(t,a)}getEditOperations(n,t){const a=this._selection.startLineNumber;let u=this._selection.endLineNumber;this._selection.endColumn===1&&a!==u&&(u=u-1);const{tabSize:f,indentSize:c,insertSpaces:d}=this._opts,r=a===u;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(n.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,s=0;for(let g=a;g<=u;g++,l=s){s=0;const h=n.getLineContent(g);let m=L.firstNonWhitespaceIndex(h);if(this._opts.isUnshift&&(h.length===0||m===0)||!r&&!this._opts.isUnshift&&h.length===0)continue;if(m===-1&&(m=h.length),g>1&&k.CursorColumns.visibleColumnFromColumn(h,m+1,f)%c!==0&&n.tokenization.isCheapToTokenize(g-1)){const D=(0,_.getEnterAction)(this._opts.autoIndent,n,new y.Range(g-1,n.getLineMaxColumn(g-1),g-1,n.getLineMaxColumn(g-1)),this._languageConfigurationService);if(D){if(s=l,D.appendText)for(let I=0,M=D.appendText.length;I1){let M;for(M=C-1;M>=1;M--){const T=m.getLineContent(M);if(k.lastNonWhitespaceIndex(T)>=0)break}if(M<1)return null;const A=m.getLineMaxColumn(M),O=(0,a.getEnterAction)(h.autoIndent,m,new v.Range(M,A,M,A),h.languageConfigurationService);O&&(D=O.indentation+O.appendText)}return w&&(w===o.IndentAction.Indent&&(D=u.shiftIndent(h,D)),w===o.IndentAction.Outdent&&(D=u.unshiftIndent(h,D)),D=h.normalizeIndentation(D)),D||null}static _replaceJumpToNextIndent(h,m,C,w){let D="";const I=C.getStartPosition();if(h.insertSpaces){const M=h.visibleColumnFromColumn(m,I),A=h.indentSize,O=A-M%A;for(let T=0;Tthis._compositionType(C,T,D,I,M,A));return new p.EditOperationResult(4,O,{shouldPushStackElementBefore:r(h,4),shouldPushStackElementAfter:!1})}static _compositionType(h,m,C,w,D,I){if(!m.isEmpty())return null;const M=m.getPosition(),A=Math.max(1,M.column-w),O=Math.min(h.getLineMaxColumn(M.lineNumber),M.column+D),T=new v.Range(M.lineNumber,A,M.lineNumber,O);return h.getValueInRange(T)===C&&I===0?null:new y.ReplaceCommandWithOffsetCursorState(T,C,0,I)}static _typeCommand(h,m,C){return C?new y.ReplaceCommandWithoutChangingPosition(h,m,!0):new y.ReplaceCommand(h,m,!0)}static _enter(h,m,C,w){if(h.autoIndent===0)return u._typeCommand(w,` `,C);if(!m.tokenization.isCheapToTokenize(w.getStartPosition().lineNumber)||h.autoIndent===1){const A=m.getLineContent(w.startLineNumber),O=k.getLeadingWhitespace(A).substring(0,w.startColumn-1);return u._typeCommand(w,` `+h.normalizeIndentation(O),C)}const D=(0,a.getEnterAction)(h.autoIndent,m,w,h.languageConfigurationService);if(D){if(D.indentAction===o.IndentAction.None)return u._typeCommand(w,` `+h.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===o.IndentAction.Indent)return u._typeCommand(w,` `+h.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===o.IndentAction.IndentOutdent){const A=h.normalizeIndentation(D.indentation),O=h.normalizeIndentation(D.indentation+D.appendText),T=` `+O+` `+A;return C?new y.ReplaceCommandWithoutChangingPosition(w,T,!0):new y.ReplaceCommandWithOffsetCursorState(w,T,-1,O.length-A.length,!0)}else if(D.indentAction===o.IndentAction.Outdent){const A=u.unshiftIndent(h,D.indentation);return u._typeCommand(w,` `+h.normalizeIndentation(A+D.appendText),C)}}const I=m.getLineContent(w.startLineNumber),M=k.getLeadingWhitespace(I).substring(0,w.startColumn-1);if(h.autoIndent>=4){const A=(0,t.getIndentForEnter)(h.autoIndent,m,w,{unshiftIndent:O=>u.unshiftIndent(h,O),shiftIndent:O=>u.shiftIndent(h,O),normalizeIndentation:O=>h.normalizeIndentation(O)},h.languageConfigurationService);if(A){let O=h.visibleColumnFromColumn(m,w.getEndPosition());const T=w.endColumn,N=m.getLineContent(w.endLineNumber),P=k.firstNonWhitespaceIndex(N);if(P>=0?w=w.setEndPosition(w.endLineNumber,Math.max(w.endColumn,P+1)):w=w.setEndPosition(w.endLineNumber,m.getLineMaxColumn(w.endLineNumber)),C)return new y.ReplaceCommandWithoutChangingPosition(w,` `+h.normalizeIndentation(A.afterEnter),!0);{let x=0;return T<=P+1&&(h.insertSpaces||(O=Math.ceil(O/h.indentSize)),x=Math.min(O+1-h.normalizeIndentation(A.afterEnter).length-1,0)),new y.ReplaceCommandWithOffsetCursorState(w,` `+h.normalizeIndentation(A.afterEnter),0,x,!0)}}}return u._typeCommand(w,` `+h.normalizeIndentation(M),C)}static _isAutoIndentType(h,m,C){if(h.autoIndent<4)return!1;for(let w=0,D=C.length;wu.shiftIndent(h,M),unshiftIndent:M=>u.unshiftIndent(h,M)},h.languageConfigurationService);if(I===null)return null;if(I!==h.normalizeIndentation(D)){const M=m.getLineFirstNonWhitespaceColumn(C.startLineNumber);return M===0?u._typeCommand(new v.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),h.normalizeIndentation(I)+w,!1):u._typeCommand(new v.Range(C.startLineNumber,1,C.endLineNumber,C.endColumn),h.normalizeIndentation(I)+m.getLineContent(C.startLineNumber).substring(M-1,C.startColumn-1)+w,!1)}return null}static _isAutoClosingOvertype(h,m,C,w,D){if(h.autoClosingOvertype==="never"||!h.autoClosingPairs.autoClosingPairsCloseSingleChar.has(D))return!1;for(let I=0,M=C.length;I2?T.charCodeAt(O.column-2):0)===92&&P)return!1;if(h.autoClosingOvertype==="auto"){let R=!1;for(let B=0,W=w.length;Bm.startsWith(A.open)),M=D.some(A=>m.startsWith(A.close));return!I&&M}static _findAutoClosingPairOpen(h,m,C,w){const D=h.autoClosingPairs.autoClosingPairsOpenByEnd.get(w);if(!D)return null;let I=null;for(const M of D)if(I===null||M.open.length>I.open.length){let A=!0;for(const O of C)if(m.getValueInRange(new v.Range(O.lineNumber,O.column-M.open.length+1,O.lineNumber,O.column))+w!==M.open){A=!1;break}A&&(I=M)}return I}static _findContainedAutoClosingPair(h,m){if(m.open.length<=1)return null;const C=m.close.charAt(m.close.length-1),w=h.autoClosingPairs.autoClosingPairsCloseByEnd.get(C)||[];let D=null;for(const I of w)I.open!==m.open&&m.open.includes(I.open)&&m.close.endsWith(I.close)&&(!D||I.open.length>D.open.length)&&(D=I);return D}static _getAutoClosingPairClose(h,m,C,w,D){for(const R of C)if(!R.isEmpty())return null;const I=C.map(R=>{const B=R.getPosition();return D?{lineNumber:B.lineNumber,beforeColumn:B.column-w.length,afterColumn:B.column}:{lineNumber:B.lineNumber,beforeColumn:B.column,afterColumn:B.column}}),M=this._findAutoClosingPairOpen(h,m,I.map(R=>new b.Position(R.lineNumber,R.beforeColumn)),w);if(!M)return null;let A,O;if((0,p.isQuote)(w)?(A=h.autoClosingQuotes,O=h.shouldAutoCloseBefore.quote):(h.blockCommentStartToken?M.open.includes(h.blockCommentStartToken):!1)?(A=h.autoClosingComments,O=h.shouldAutoCloseBefore.comment):(A=h.autoClosingBrackets,O=h.shouldAutoCloseBefore.bracket),A==="never")return null;const N=this._findContainedAutoClosingPair(h,M),P=N?N.close:"";let x=!0;for(const R of I){const{lineNumber:B,beforeColumn:W,afterColumn:V}=R,U=m.getLineContent(B),F=U.substring(0,W-1),j=U.substring(V-1);if(j.startsWith(P)||(x=!1),j.length>0){const $=j.charAt(0);if(!u._isBeforeClosingBrace(h,j)&&!O($))return null}if(M.open.length===1&&(w==="'"||w==='"')&&A!=="always"){const $=(0,S.getMapForWordSeparators)(h.wordSeparators);if(F.length>0){const te=F.charCodeAt(F.length-1);if($.get(te)===0)return null}}if(!m.tokenization.isCheapToTokenize(B))return null;m.tokenization.forceTokenization(B);const J=m.tokenization.getLineTokens(B),le=(0,n.createScopedLineTokens)(J,W-1);if(!M.shouldAutoClose(le,W-le.firstCharOffset))return null;const ee=M.findNeutralCharacter();if(ee){const $=m.tokenization.getTokenTypeIfInsertingCharacter(B,W,ee);if(!M.isOK($))return null}}return x?M.close.substring(0,M.close.length-P.length):M.close}static _runAutoClosingOpenCharType(h,m,C,w,D,I,M){const A=[];for(let O=0,T=w.length;Onew y.ReplaceCommand(new v.Range(P.positionLineNumber,P.positionColumn,P.positionLineNumber,P.positionColumn+1),"",!1));return new p.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const T=this._getAutoClosingPairClose(m,C,D,A,!0);return T!==null?this._runAutoClosingOpenCharType(h,m,C,D,A,!0,T):null}static typeWithInterceptors(h,m,C,w,D,I,M){if(!h&&M===` `){const T=[];for(let N=0,P=D.length;N0){const s=this._cursors.getSelections();for(let g=0;gw&&(m=m.slice(0,w),C=!0);const D=u.from(this._model,this);return this._cursors.setStates(m),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(s,g,h,D,C)}setCursorColumnSelectData(s){this._columnSelectData=s}revealPrimary(s,g,h,m,C,w){const D=this._cursors.getViewPositions();let I=null,M=null;D.length>1?M=this._cursors.getViewSelections():I=v.Range.fromPositions(D[0],D[0]),s.emitViewEvent(new i.ViewRevealRangeRequestEvent(g,h,I,M,m,C,w))}saveState(){const s=[],g=this._cursors.getSelections();for(let h=0,m=g.length;h0){const C=E.CursorState.fromModelSelections(h.resultingSelection);this.setStates(s,"modelChange",h.isUndoing?5:h.isRedoing?6:2,C)&&this.revealPrimary(s,"modelChange",!1,0,!0,0)}else{const C=this._cursors.readSelectionFromMarkers();this.setStates(s,"modelChange",2,E.CursorState.fromModelSelections(C))}}}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 s=this._cursors.getPrimaryCursor(),g=s.viewState.selectionStart.getStartPosition(),h=s.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()}setSelections(s,g,h,m){this.setStates(s,g,m,E.CursorState.fromModelSelections(h))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(s){this._prevEditOperationType=s}_pushAutoClosedAction(s,g){const h=[],m=[];for(let D=0,I=s.length;D0&&this._pushAutoClosedAction(h,m),this._prevEditOperationType=s.type}s.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(s){(!s||s.length===0)&&(s=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(s),this._cursors.normalize()}_emitStateChangedIfNecessary(s,g,h,m,C){const w=u.from(this._model,this);if(w.equals(m))return!1;const D=this._cursors.getSelections(),I=this._cursors.getViewSelections();if(s.emitViewEvent(new i.ViewCursorStateChangedEvent(I,D,h)),!m||m.cursorState.length!==w.cursorState.length||w.cursorState.some((M,A)=>!M.modelState.equals(m.cursorState[A].modelState))){const M=m?m.cursorState.map(O=>O.modelState.selection):null,A=m?m.modelVersionId:0;s.emitOutgoingEvent(new t.CursorStateChangedEvent(M,D,A,w.modelVersionId,g||"keyboard",h,C))}return!0}_findAutoClosingPairs(s){if(!s.length)return null;const g=[];for(let h=0,m=s.length;h=0)return null;const w=C.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!w)return null;const D=w[1],I=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(D);if(!I||I.length!==1)return null;const M=I[0].open,A=C.text.length-w[2].length-1,O=C.text.lastIndexOf(M,A-1);if(O===-1)return null;g.push([O,A])}return g}executeEdits(s,g,h,m){let C=null;g==="snippet"&&(C=this._findAutoClosingPairs(h)),C&&(h[0]._isTracked=!0);const w=[],D=[],I=this._model.pushEditOperations(this.getSelections(),h,M=>{if(C)for(let O=0,T=C.length;O0&&this._pushAutoClosedAction(w,D)}_executeEdit(s,g,h,m=0){if(this.context.cursorConfig.readOnly)return;const C=u.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),s()}catch(w){(0,L.onUnexpectedError)(w)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(g,h,m,C,!1)&&this.revealPrimary(g,h,!1,0,!0,0)}getAutoClosedCharacters(){return f.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(s){this._compositionState=new r(this._model,this.getSelections())}endComposition(s,g){const h=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{g==="keyboard"&&this._executeEditOperation(S.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,h,this.getSelections(),this.getAutoClosedCharacters()))},s,g)}type(s,g,h){this._executeEdit(()=>{if(h==="keyboard"){const m=g.length;let C=0;for(;C{const M=I.getPosition();return new b.Selection(M.lineNumber,M.column+C,M.lineNumber,M.column+C)});this.setSelections(s,w,D,0)}return}this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g,h,m,C))},s,w)}paste(s,g,h,m,C){this._executeEdit(()=>{this._executeEditOperation(S.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),g,h,m||[]))},s,C,4)}cut(s,g){this._executeEdit(()=>{this._executeEditOperation(p.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},s,g)}executeCommand(s,g,h){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new E.EditOperationResult(0,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},s,h)}executeCommands(s,g,h){this._executeEdit(()=>{this._executeEditOperation(new E.EditOperationResult(0,g,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},s,h)}}e.CursorsController=a;class u{static from(s,g){return new u(s.getVersionId(),g.getCursorStates())}constructor(s,g){this.modelVersionId=s,this.cursorState=g}equals(s){if(!s||this.modelVersionId!==s.modelVersionId||this.cursorState.length!==s.cursorState.length)return!1;for(let g=0,h=this.cursorState.length;g=g.length||!g[h].strictContainsRange(s[h]))return!1;return!0}}class c{static executeCommands(s,g,h){const m={model:s,selectionsBefore:g,trackedRanges:[],trackedRangesDirection:[]},C=this._innerExecuteCommands(m,h);for(let w=0,D=m.trackedRanges.length;w0&&(w[0]._isTracked=!0);let D=s.model.pushEditOperations(s.selectionsBefore,w,M=>{const A=[];for(let N=0;NN.identifier.minor-P.identifier.minor,T=[];for(let N=0;N0?(A[N].sort(O),T[N]=g[N].computeCursorState(s.model,{getInverseEditOperations:()=>A[N],getTrackedSelection:P=>{const x=parseInt(P,10),R=s.model._getTrackedRange(s.trackedRanges[x]);return s.trackedRangesDirection[x]===0?new b.Selection(R.startLineNumber,R.startColumn,R.endLineNumber,R.endColumn):new b.Selection(R.endLineNumber,R.endColumn,R.startLineNumber,R.startColumn)}})):T[N]=s.selectionsBefore[N];return T});D||(D=s.selectionsBefore);const I=[];for(const M in C)C.hasOwnProperty(M)&&I.push(parseInt(M,10));I.sort((M,A)=>A-M);for(const M of I)D.splice(M,1);return D}static _arrayIsEmpty(s){for(let g=0,h=s.length;g{v.Range.isEmpty(O)&&T===""||m.push({identifier:{major:g,minor:C++},range:O,text:T,forceMoveMarkers:N,isAutoWhitespaceEdit:h.insertsAutoWhitespace})};let D=!1;const A={addEditOperation:w,addTrackedEditOperation:(O,T,N)=>{D=!0,w(O,T,N)},trackSelection:(O,T)=>{const N=b.Selection.liftSelection(O);let P;if(N.isEmpty())if(typeof T=="boolean")T?P=2:P=3;else{const B=s.model.getLineMaxColumn(N.startLineNumber);N.startColumn===B?P=2:P=3}else P=1;const x=s.trackedRanges.length,R=s.model._setTrackedRange(null,N,P);return s.trackedRanges[x]=R,s.trackedRangesDirection[x]=N.getDirection(),x.toString()}};try{h.getEditOperations(s.model,A)}catch(O){return(0,L.onUnexpectedError)(O),{operations:[],hadTrackedEditOperation:!1}}return{operations:m,hadTrackedEditOperation:D}}static _getLoserCursorMap(s){s=s.slice(0),s.sort((h,m)=>-v.Range.compareRangesUsingEnds(h.range,m.range));const g={};for(let h=1;hC.identifier.major?w=m.identifier.major:w=C.identifier.major,g[w.toString()]=!0;for(let D=0;D0&&h--}}return g}}class d{constructor(s,g,h){this.text=s,this.startSelection=g,this.endSelection=h}}class r{static _capture(s,g){const h=[];for(const m of g){if(m.startLineNumber!==m.endLineNumber)return null;h.push(new d(s.getLineContent(m.startLineNumber),m.startColumn-1,m.endColumn-1))}return h}constructor(s,g){this._original=r._capture(s,g)}deduceOutcome(s,g){if(!this._original)return null;const h=r._capture(s,g);if(!h||this._original.length!==h.length)return null;const m=[];for(let C=0,w=this._original.length;C{h.mime===g.mime||h.userConfigured||(g.extension&&h.extension===g.extension&&console.warn(`Overwriting extension <<${g.extension}>> to now point to mime <<${g.mime}>>`),g.filename&&h.filename===g.filename&&console.warn(`Overwriting filename <<${g.filename}>> to now point to mime <<${g.mime}>>`),g.filepattern&&h.filepattern===g.filepattern&&console.warn(`Overwriting filepattern <<${g.filepattern}>> to now point to mime <<${g.mime}>>`),g.firstline&&h.firstline===g.firstline&&console.warn(`Overwriting firstline <<${g.firstline}>> to now point to mime <<${g.mime}>>`))})}function t(r,l){return{id:r.id,mime:r.mime,filename:r.filename,extension:r.extension,filepattern:r.filepattern,firstline:r.firstline,userConfigured:l,filenameLowercase:r.filename?r.filename.toLowerCase():void 0,extensionLowercase:r.extension?r.extension.toLowerCase():void 0,filepatternLowercase:r.filepattern?(0,L.parse)(r.filepattern.toLowerCase()):void 0,filepatternOnPath:r.filepattern?r.filepattern.indexOf(E.posix.sep)>=0:!1}}function a(){v=v.filter(r=>r.userConfigured),b=[]}e.clearPlatformLanguageAssociations=a;function u(r,l){return f(r,l).map(s=>s.id)}e.getLanguageIds=u;function f(r,l){let s;if(r)switch(r.scheme){case y.Schemas.file:s=r.fsPath;break;case y.Schemas.data:{s=_.DataUri.parseMetaData(r).get(_.DataUri.META_DATA_LABEL);break}case y.Schemas.vscodeNotebookCell:s=void 0;break;default:s=r.path}if(!s)return[{id:"unknown",mime:k.Mimes.unknown}];s=s.toLowerCase();const g=(0,E.basename)(s),h=c(s,g,o);if(h)return[h,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];const m=c(s,g,b);if(m)return[m,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];if(l){const C=d(l);if(C)return[C,{id:S.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}]}return[{id:"unknown",mime:k.Mimes.unknown}]}function c(r,l,s){var g;let h,m,C;for(let w=s.length-1;w>=0;w--){const D=s[w];if(l===D.filenameLowercase){h=D;break}if(D.filepattern&&(!m||D.filepattern.length>m.filepattern.length)){const I=D.filepatternOnPath?r:l;!((g=D.filepatternLowercase)===null||g===void 0)&&g.call(D,I)&&(m=D)}D.extension&&(!C||D.extension.length>C.extension.length)&&l.endsWith(D.extensionLowercase)&&(C=D)}if(h)return h;if(m)return m;if(C)return C}function d(r){if((0,p.startsWithUTF8BOM)(r)&&(r=r.substr(1)),r.length>0)for(let l=v.length-1;l>=0;l--){const s=v[l];if(!s.firstline)continue;const g=r.match(s.firstline);if(g&&g.length>0)return s}}}),define(ie[787],ne([1,0,6,2,12,786,79,97,37]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const v=Object.prototype.hasOwnProperty,b="vs.editor.nullLanguage";class o{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(b,0),this._register(_.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(t,a){this._languageIdToLanguage[a]=t,this._languageToLanguageId.set(t,a)}register(t){if(this._languageToLanguageId.has(t))return;const a=this._nextLanguageId++;this._register(t,a)}encodeLanguageId(t){return this._languageToLanguageId.get(t)||0}decodeLanguageId(t){return this._languageIdToLanguage[t]||b}}e.LanguageIdCodec=o;class i extends k.Disposable{constructor(t=!0,a=!1){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=a,this.languageIdCodec=new o,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},t&&(this._initializeFromRegistry(),this._register(_.ModesRegistry.onDidChangeLanguages(u=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,E.clearPlatformLanguageAssociations)();const t=[].concat(_.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(t)}_registerLanguages(t){for(const a of t)this._registerLanguage(a);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(a=>{const u=this._languages[a];u.name&&(this._nameMap[u.name]=u.identifier),u.aliases.forEach(f=>{this._lowercaseNameMap[f.toLowerCase()]=u.identifier}),u.mimetypes.forEach(f=>{this._mimeTypesMap[f]=u.identifier})}),S.Registry.as(p.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(t){const a=t.id;let u;v.call(this._languages,a)?u=this._languages[a]:(this.languageIdCodec.register(a),u={identifier:a,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[a]=u),this._mergeLanguage(u,t)}_mergeLanguage(t,a){const u=a.id;let f=null;if(Array.isArray(a.mimetypes)&&a.mimetypes.length>0&&(t.mimetypes.push(...a.mimetypes),f=a.mimetypes[0]),f||(f=`text/x-${u}`,t.mimetypes.push(f)),Array.isArray(a.extensions)){a.configuration?t.extensions=a.extensions.concat(t.extensions):t.extensions=t.extensions.concat(a.extensions);for(const r of a.extensions)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,extension:r},this._warnOnOverwrite)}if(Array.isArray(a.filenames))for(const r of a.filenames)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,filename:r},this._warnOnOverwrite),t.filenames.push(r);if(Array.isArray(a.filenamePatterns))for(const r of a.filenamePatterns)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,filepattern:r},this._warnOnOverwrite);if(typeof a.firstLine=="string"&&a.firstLine.length>0){let r=a.firstLine;r.charAt(0)!=="^"&&(r="^"+r);try{const l=new RegExp(r);(0,y.regExpLeadsToEndlessLoop)(l)||(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${a.id}]: Invalid regular expression \`${r}\`: `,l)}}t.aliases.push(u);let c=null;if(typeof a.aliases<"u"&&Array.isArray(a.aliases)&&(a.aliases.length===0?c=[null]:c=a.aliases),c!==null)for(const r of c)!r||r.length===0||t.aliases.push(r);const d=c!==null&&c.length>0;if(!(d&&c[0]===null)){const r=(d?c[0]:null)||u;(d||!t.name)&&(t.name=r)}a.configuration&&t.configurationFiles.push(a.configuration),a.icon&&t.icons.push(a.icon)}isRegisteredLanguageId(t){return t?v.call(this._languages,t):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(t){const a=t.toLowerCase();return v.call(this._lowercaseNameMap,a)?this._lowercaseNameMap[a]:null}getLanguageIdByMimeType(t){return t&&v.call(this._mimeTypesMap,t)?this._mimeTypesMap[t]:null}guessLanguageIdByFilepathOrFirstLine(t,a){return!t&&!a?[]:(0,E.getLanguageIds)(t,a)}}e.LanguagesRegistry=i,i.instanceCount=0}),define(ie[788],ne([1,0,6,2,787,13,31,79]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class S extends k.Disposable{constructor(o=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new L.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new L.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new L.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,S.instanceCount++,this._registry=this._register(new y.LanguagesRegistry(!0,o)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){S.instanceCount--,super.dispose()}isRegisteredLanguageId(o){return this._registry.isRegisteredLanguageId(o)}getLanguageIdByLanguageName(o){return this._registry.getLanguageIdByLanguageName(o)}getLanguageIdByMimeType(o){return this._registry.getLanguageIdByMimeType(o)}guessLanguageIdByFilepathOrFirstLine(o,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(o,i);return(0,E.firstOrDefault)(n,null)}createById(o){return new v(this.onDidChange,()=>this._createAndGetLanguageIdentifier(o))}createByFilepathOrFirstLine(o,i){return new v(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(o,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(o){return(!o||!this.isRegisteredLanguageId(o))&&(o=p.PLAINTEXT_LANGUAGE_ID),o}requestBasicLanguageFeatures(o){this._requestedBasicLanguages.has(o)||(this._requestedBasicLanguages.add(o),this._onDidRequestBasicLanguageFeatures.fire(o))}requestRichLanguageFeatures(o){this._requestedRichLanguages.has(o)||(this._requestedRichLanguages.add(o),this.requestBasicLanguageFeatures(o),_.TokenizationRegistry.getOrCreate(o),this._onDidRequestRichLanguageFeatures.fire(o))}}e.LanguageService=S,S.instanceCount=0;class v{constructor(o,i){this._onDidChangeLanguages=o,this._selector=i,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 L.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var o;const i=this._selector();i!==this.languageId&&(this.languageId=i,(o=this._emitter)===null||o===void 0||o.fire(this.languageId))}}}),define(ie[350],ne([1,0,38,245,52,32,2,18,152]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDocumentColorProvider=void 0;class v{constructor(i,n){this._editorWorkerClient=new k.EditorWorkerClient(i,!1,"editorWorkerService",n)}async provideDocumentColors(i,n){return this._editorWorkerClient.computeDefaultDocumentColors(i.uri)}provideColorPresentations(i,n,t){const a=n.range,u=n.color,f=u.alpha,c=new L.Color(new L.RGBA(Math.round(255*u.red),Math.round(255*u.green),Math.round(255*u.blue),f)),d=f?L.Color.Format.CSS.formatRGB(c):L.Color.Format.CSS.formatRGBA(c),r=f?L.Color.Format.CSS.formatHSL(c):L.Color.Format.CSS.formatHSLA(c),l=f?L.Color.Format.CSS.formatHex(c):L.Color.Format.CSS.formatHexA(c),s=[];return s.push({label:d,textEdit:{range:a,text:d}}),s.push({label:r,textEdit:{range:a,text:r}}),s.push({label:l,textEdit:{range:a,text:l}}),s}}e.DefaultDocumentColorProvider=v;let b=class extends _.Disposable{constructor(i,n,t){super(),this._register(t.colorProvider.register("*",new v(i,n)))}};b=Ee([he(0,y.IModelService),he(1,E.ILanguageConfigurationService),he(2,p.ILanguageFeaturesService)],b),(0,S.registerEditorFeature)(b)}),define(ie[351],ne([1,0,19,9,22,5,52,25,18,350,28]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;async function o(c,d,r,l=!0){return u(new n,c,d,r,l)}e.getColors=o;function i(c,d,r,l){return Promise.resolve(r.provideColorPresentations(c,d,l))}e.getColorPresentations=i;class n{constructor(){}async compute(d,r,l,s){const g=await d.provideDocumentColors(r,l);if(Array.isArray(g))for(const h of g)s.push({colorInfo:h,provider:d});return Array.isArray(g)}}class t{constructor(){}async compute(d,r,l,s){const g=await d.provideDocumentColors(r,l);if(Array.isArray(g))for(const h of g)s.push({range:h.range,color:[h.color.red,h.color.green,h.color.blue,h.color.alpha]});return Array.isArray(g)}}class a{constructor(d){this.colorInfo=d}async compute(d,r,l,s){const g=await d.provideColorPresentations(r,this.colorInfo,L.CancellationToken.None);return Array.isArray(g)&&s.push(...g),Array.isArray(g)}}async function u(c,d,r,l,s){let g=!1,h;const m=[],C=d.ordered(r);for(let w=C.length-1;w>=0;w--){const D=C[w];if(D instanceof v.DefaultDocumentColorProvider)h=D;else try{await c.compute(D,r,l,m)&&(g=!0)}catch(I){(0,k.onUnexpectedExternalError)(I)}}return g?m:h&&s?(await c.compute(h,r,l,m),m):[]}function f(c,d){const{colorProvider:r}=c.get(S.ILanguageFeaturesService),l=c.get(_.IModelService).getModel(d);if(!l)throw(0,k.illegalArgument)();const s=c.get(b.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:d});return{model:l,colorProviderRegistry:r,isDefaultColorDecoratorsEnabled:s}}p.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(c,...d){const[r]=d;if(!(r instanceof y.URI))throw(0,k.illegalArgument)();const{model:l,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:g}=f(c,r);return u(new t,s,l,L.CancellationToken.None,g)}),p.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(c,...d){const[r,l]=d,{uri:s,range:g}=l;if(!(s instanceof y.URI)||!Array.isArray(r)||r.length!==4||!E.Range.isIRange(g))throw(0,k.illegalArgument)();const{model:h,colorProviderRegistry:m,isDefaultColorDecoratorsEnabled:C}=f(c,s),[w,D,I,M]=r;return u(new a({range:g,color:{red:w,green:D,blue:I,alpha:M}}),m,h,L.CancellationToken.None,C)})}),define(ie[789],ne([1,0,19,71,2,35,11,31,32,18,611,304]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let i=class extends y.Disposable{constructor(l,s,g,h,m){super(),this.textModel=l,this.versionId=s,this._debounceValue=g,this.languageFeaturesService=h,this.languageConfigurationService=m,this._updateOperation=this._register(new y.MutableDisposable),this.inlineCompletions=(0,E.disposableObservableValue)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,E.disposableObservableValue)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(l,s,g){var h,m;const C=new t(l,s,this.textModel.getVersionId()),w=s.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((h=this._updateOperation.value)===null||h===void 0)&&h.request.satisfies(C))return this._updateOperation.value.promise;if(!((m=w.get())===null||m===void 0)&&m.request.satisfies(C))return Promise.resolve(!0);const D=!!this._updateOperation.value;this._updateOperation.clear();const I=new L.CancellationTokenSource,M=(async()=>{if((D||s.triggerKind===p.InlineCompletionTriggerKind.Automatic)&&await n(this._debounceValue.get(this.textModel)),I.token.isCancellationRequested||this.textModel.getVersionId()!==C.versionId)return!1;const T=new Date,N=await(0,b.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,l,this.textModel,s,I.token,this.languageConfigurationService);if(I.token.isCancellationRequested||this.textModel.getVersionId()!==C.versionId)return!1;const P=new Date;this._debounceValue.update(this.textModel,P.getTime()-T.getTime());const x=new f(N,C,this.textModel,this.versionId);if(g){const R=g.toInlineCompletion(void 0);g.canBeReused(this.textModel,l)&&!N.has(R)&&x.prepend(g.inlineCompletion,R.range,!0)}return this._updateOperation.clear(),(0,E.transaction)(R=>{w.set(x,R)}),!0})(),A=new u(C,I,M);return this._updateOperation.value=A,M}clear(l){this._updateOperation.clear(),this.inlineCompletions.set(void 0,l),this.suggestWidgetInlineCompletions.set(void 0,l)}clearSuggestWidgetInlineCompletions(l){var s;!((s=this._updateOperation.value)===null||s===void 0)&&s.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,l)}cancelUpdate(){this._updateOperation.clear()}};e.InlineCompletionsSource=i,e.InlineCompletionsSource=i=Ee([he(3,v.ILanguageFeaturesService),he(4,S.ILanguageConfigurationService)],i);function n(r,l){return new Promise(s=>{let g;const h=setTimeout(()=>{g&&g.dispose(),s()},r);l&&(g=l.onCancellationRequested(()=>{clearTimeout(h),g&&g.dispose(),s()}))})}class t{constructor(l,s,g){this.position=l,this.context=s,this.versionId=g}satisfies(l){return this.position.equals(l.position)&&a(this.context.selectedSuggestionInfo,l.context.selectedSuggestionInfo,(s,g)=>s.equals(g))&&(l.context.triggerKind===p.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===p.InlineCompletionTriggerKind.Explicit)&&this.versionId===l.versionId}}function a(r,l,s){return!r||!l?r===l:s(r,l)}class u{constructor(l,s,g){this.request=l,this.cancellationTokenSource=s,this.promise=g}dispose(){this.cancellationTokenSource.cancel()}}class f{get inlineCompletions(){return this._inlineCompletions}constructor(l,s,g,h){this.inlineCompletionProviderResult=l,this.request=s,this.textModel=g,this.versionId=h,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,E.derived)(this,C=>{this.versionId.read(C);let w=!1;for(const D of this._inlineCompletions)w=w||D._updateRange(this.textModel);return w&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const m=g.deltaDecorations([],l.completions.map(C=>({range:C.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=l.completions.map((C,w)=>new c(C,m[w],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(l=>l.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const l of this._prependedInlineCompletionItems)l.source.removeRef()}}prepend(l,s,g){g&&l.source.addRef();const h=this.textModel.deltaDecorations([],[{range:s,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new c(l,h,this._rangeVersionId,s)),this._prependedInlineCompletionItems.push(l)}}e.UpToDateInlineCompletions=f;class c{get forwardStable(){var l;return(l=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&l!==void 0?l:!1}constructor(l,s,g,h){this.inlineCompletion=l,this.decorationId=s,this.rangeVersion=g,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=h??l.range}toInlineCompletion(l){return this.inlineCompletion.withRange(this._getUpdatedRange(l))}toSingleTextEdit(l){return new o.SingleTextEdit(this._getUpdatedRange(l),this.inlineCompletion.insertText)}isVisible(l,s,g){const h=this._toFilterTextReplacement(g).removeCommonPrefix(l);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(g).getStartPosition())||s.lineNumber!==h.range.startLineNumber)return!1;const m=l.getValueInRange(h.range,1),C=h.text,w=Math.max(0,s.column-h.range.startColumn);let D=C.substring(0,w),I=C.substring(w),M=m.substring(0,w),A=m.substring(w);const O=l.getLineIndentColumn(h.range.startLineNumber);return h.range.startColumn<=O&&(M=M.trimStart(),M.length===0&&(A=A.trimStart()),D=D.trimStart(),D.length===0&&(I=I.trimStart())),D.startsWith(M)&&!!(0,k.matchesSubString)(A,I)}canBeReused(l,s){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(s)&&this.isVisible(l,s,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(l){return new o.SingleTextEdit(this._getUpdatedRange(l),this.inlineCompletion.filterText)}_isSmallerThanOriginal(l){return d(this._getUpdatedRange(l)).isBefore(d(this.inlineCompletion.range))}_getUpdatedRange(l){return this.rangeVersion.read(l),this._updatedRange}_updateRange(l){const s=l.getDecorationRange(this.decorationId);return s?this._updatedRange.equalsRange(s)?!1:(this._updatedRange=s,!0):(this._isValid=!1,!0)}}e.InlineCompletionWithUpdatedRange=c;function d(r){return r.startLineNumber===r.endLineNumber?new _.Position(1,1+r.endColumn-r.startColumn):new _.Position(1+r.endLineNumber-r.startLineNumber,r.endColumn)}}),define(ie[790],ne([1,0,12,248,5,24,111,32,303,246,247]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let o=class{constructor(n,t,a,u){this._languageConfigurationService=u,this._selection=n,this._isMovingDown=t,this._autoIndent=a,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(n,t){const a=n.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===a){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let u=this._selection;u.startLineNumbern.tokenization.getLineTokens(s),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(s,g)=>n.getLanguageIdAtPosition(s,g)},getLineContent:null};if(u.startLineNumber===u.endLineNumber&&n.getLineMaxColumn(u.startLineNumber)===1){const s=u.startLineNumber,g=this._isMovingDown?s+1:s-1;n.getLineMaxColumn(g)===1?t.addEditOperation(new y.Range(1,1,1,1),null):(t.addEditOperation(new y.Range(s,1,s,1),n.getLineContent(g)),t.addEditOperation(new y.Range(g,1,g,n.getLineMaxColumn(g)),null)),u=new E.Selection(g,1,g,1)}else{let s,g;if(this._isMovingDown){s=u.endLineNumber+1,g=n.getLineContent(s),t.addEditOperation(new y.Range(s-1,n.getLineMaxColumn(s-1),s,n.getLineMaxColumn(s)),null);let h=g;if(this.shouldAutoIndent(n,u)){const m=this.matchEnterRule(n,r,f,s,u.startLineNumber-1);if(m!==null){const w=L.getLeadingWhitespace(n.getLineContent(s)),D=m+S.getSpaceCnt(w,f);h=S.generateIndent(D,f,d)+this.trimStart(g)}else{l.getLineContent=D=>D===u.startLineNumber?n.getLineContent(s):n.getLineContent(D);const w=(0,v.getGoodIndentForLine)(this._autoIndent,l,n.getLanguageIdAtPosition(s,1),u.startLineNumber,r,this._languageConfigurationService);if(w!==null){const D=L.getLeadingWhitespace(n.getLineContent(s)),I=S.getSpaceCnt(w,f),M=S.getSpaceCnt(D,f);I!==M&&(h=S.generateIndent(I,f,d)+this.trimStart(g))}}t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+` `);const C=this.matchEnterRuleMovingDown(n,r,f,u.startLineNumber,s,h);if(C!==null)C!==0&&this.getIndentEditsOfMovingBlock(n,t,u,f,d,C);else{l.getLineContent=D=>D===u.startLineNumber?h:D>=u.startLineNumber+1&&D<=u.endLineNumber+1?n.getLineContent(D-1):n.getLineContent(D);const w=(0,v.getGoodIndentForLine)(this._autoIndent,l,n.getLanguageIdAtPosition(s,1),u.startLineNumber+1,r,this._languageConfigurationService);if(w!==null){const D=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),I=S.getSpaceCnt(w,f),M=S.getSpaceCnt(D,f);if(I!==M){const A=I-M;this.getIndentEditsOfMovingBlock(n,t,u,f,d,A)}}}}else t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+` `)}else if(s=u.startLineNumber-1,g=n.getLineContent(s),t.addEditOperation(new y.Range(s,1,s+1,1),null),t.addEditOperation(new y.Range(u.endLineNumber,n.getLineMaxColumn(u.endLineNumber),u.endLineNumber,n.getLineMaxColumn(u.endLineNumber)),` `+g),this.shouldAutoIndent(n,u)){l.getLineContent=m=>m===s?n.getLineContent(u.startLineNumber):n.getLineContent(m);const h=this.matchEnterRule(n,r,f,u.startLineNumber,u.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(n,t,u,f,d,h);else{const m=(0,v.getGoodIndentForLine)(this._autoIndent,l,n.getLanguageIdAtPosition(u.startLineNumber,1),s,r,this._languageConfigurationService);if(m!==null){const C=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),w=S.getSpaceCnt(m,f),D=S.getSpaceCnt(C,f);if(w!==D){const I=w-D;this.getIndentEditsOfMovingBlock(n,t,u,f,d,I)}}}}}this._selectionId=t.trackSelection(u)}buildIndentConverter(n,t,a){return{shiftIndent:u=>k.ShiftCommand.shiftIndent(u,u.length+1,n,t,a),unshiftIndent:u=>k.ShiftCommand.unshiftIndent(u,u.length+1,n,t,a)}}parseEnterResult(n,t,a,u,f){if(f){let c=f.indentation;f.indentAction===_.IndentAction.None||f.indentAction===_.IndentAction.Indent?c=f.indentation+f.appendText:f.indentAction===_.IndentAction.IndentOutdent?c=f.indentation:f.indentAction===_.IndentAction.Outdent&&(c=t.unshiftIndent(f.indentation)+f.appendText);const d=n.getLineContent(u);if(this.trimStart(d).indexOf(this.trimStart(c))>=0){const r=L.getLeadingWhitespace(n.getLineContent(u));let l=L.getLeadingWhitespace(c);const s=(0,v.getIndentMetadata)(n,u,this._languageConfigurationService);s!==null&&s&2&&(l=t.unshiftIndent(l));const g=S.getSpaceCnt(l,a),h=S.getSpaceCnt(r,a);return g-h}}return null}matchEnterRuleMovingDown(n,t,a,u,f,c){if(L.lastNonWhitespaceIndex(c)>=0){const d=n.getLineMaxColumn(f),r=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(f,d,f,d),this._languageConfigurationService);return this.parseEnterResult(n,t,a,u,r)}else{let d=u-1;for(;d>=1;){const s=n.getLineContent(d);if(L.lastNonWhitespaceIndex(s)>=0)break;d--}if(d<1||u>n.getLineCount())return null;const r=n.getLineMaxColumn(d),l=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(d,r,d,r),this._languageConfigurationService);return this.parseEnterResult(n,t,a,u,l)}}matchEnterRule(n,t,a,u,f,c){let d=f;for(;d>=1;){let s;if(d===f&&c!==void 0?s=c:s=n.getLineContent(d),L.lastNonWhitespaceIndex(s)>=0)break;d--}if(d<1||u>n.getLineCount())return null;const r=n.getLineMaxColumn(d),l=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(d,r,d,r),this._languageConfigurationService);return this.parseEnterResult(n,t,a,u,l)}trimStart(n){return n.replace(/^\s+/,"")}shouldAutoIndent(n,t){if(this._autoIndent<4||!n.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const a=n.getLanguageIdAtPosition(t.startLineNumber,1),u=n.getLanguageIdAtPosition(t.endLineNumber,1);return!(a!==u||this._languageConfigurationService.getLanguageConfiguration(a).indentRulesSupport===null)}getIndentEditsOfMovingBlock(n,t,a,u,f,c){for(let d=a.startLineNumber;d<=a.endLineNumber;d++){const r=n.getLineContent(d),l=L.getLeadingWhitespace(r),g=S.getSpaceCnt(l,u)+c,h=S.generateIndent(g,u,f);h!==l&&(t.addEditOperation(new y.Range(d,1,d,l.length+1),h),d===a.endLineNumber&&a.endColumn<=l.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(n,t){let a=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(a=a.setEndPosition(a.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&a.startLineNumber{}};const r=new _.DisposableStore,l=r.add((0,L.renderMarkdown)(f,{...this._getRenderOptions(f,r),...c},d));return l.element.classList.add("rendered-markdown"),{element:l.element,dispose:()=>r.dispose()}}_getRenderOptions(f,c){return{codeBlockRenderer:async(d,r)=>{var l,s,g;let h;d?h=this._languageService.getLanguageIdByLanguageName(d):this._options.editor&&(h=(l=this._options.editor.getModel())===null||l===void 0?void 0:l.getLanguageId()),h||(h=v.PLAINTEXT_LANGUAGE_ID);const m=await(0,b.tokenizeToString)(this._languageService,r,h),C=document.createElement("span");if(C.innerHTML=(g=(s=i._ttpTokenizer)===null||s===void 0?void 0:s.createHTML(m))!==null&&g!==void 0?g:m,this._options.editor){const w=this._options.editor.getOption(50);(0,p.applyFontInfo)(C,w)}else this._options.codeBlockFontFamily&&(C.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(C.style.fontSize=this._options.codeBlockFontSize),C},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:d=>t(this._openerService,d,f.isTrusted),disposables:c}}}};e.MarkdownRenderer=n,n._ttpTokenizer=(0,k.createTrustedTypesPolicy)("tokenizeToString",{createHTML(u){return u}}),e.MarkdownRenderer=n=i=Ee([he(1,S.ILanguageService),he(2,o.IOpenerService)],n);async function t(u,f,c){try{return await u.open(f,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:a(c)})}catch(d){return(0,y.onUnexpectedError)(d),!1}}e.openLinkFromMarkdown=t;function a(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}}),define(ie[791],ne([1,0,7,13,58,2,119,329,318]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const v=L.$;class b extends E.Disposable{constructor(n,t,a){super(),this._renderDisposeables=this._register(new E.DisposableStore),this._editor=n,this._isVisible=!1,this._messages=[],this._hover=this._register(new S.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new _.MarkdownRenderer({editor:this._editor},t,a)),this._computer=new o(this._editor),this._hoverOperation=this._register(new p.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(u=>{this._withResult(u.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(n){this._computer.lineNumber!==n&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=n,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(n){this._messages=n,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(n,t){this._renderDisposeables.clear();const a=document.createDocumentFragment();for(const u of t){const f=v("div.hover-row.markdown-hover"),c=L.append(f,v("div.hover-contents")),d=this._renderDisposeables.add(this._markdownRenderer.render(u.value));c.appendChild(d.element),a.appendChild(f)}this._updateContents(a),this._showAt(n)}_updateContents(n){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(n),this._updateFont()}_showAt(n){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),a=this._editor.getTopForLineNumber(n),u=this._editor.getScrollTop(),f=this._editor.getOption(66),c=this._hover.containerDomNode.clientHeight,d=a-u-(c-f)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(d),0)}px`}}e.MarginHoverWidget=b,b.ID="editor.contrib.modesGlyphHoverWidget";class o{get lineNumber(){return this._lineNumber}set lineNumber(n){this._lineNumber=n}constructor(n){this._editor=n,this._lineNumber=-1}computeSync(){const n=u=>({value:u}),t=this._editor.getLineDecorations(this._lineNumber),a=[];if(!t)return a;for(const u of t){if(!u.options.glyphMarginClassName)continue;const f=u.options.glyphMarginHoverMessage;!f||(0,y.isEmptyMarkdownString)(f)||a.push(...(0,k.asArray)(f).map(n))}return a}}}),define(ie[352],ne([1,0,7,76,26,27,6,58,2,119,226,712,8]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function n(u){return!!u&&!!(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}e.canExpandCompletionItem=n;let t=class{constructor(f,c){this._editor=f,this._onDidClose=new _.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new _.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new S.DisposableStore,this._renderDisposeable=new S.DisposableStore,this._borderWidth=1,this._size=new L.Dimension(330,0),this.domNode=L.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=c.createInstance(v.MarkdownRenderer,{editor:f}),this._body=L.$(".body"),this._scrollbar=new k.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),L.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=L.append(this._body,L.$(".header")),this._close=L.append(this._header,L.$("span"+E.ThemeIcon.asCSSSelector(y.Codicon.close))),this._close.title=o.localize(0,null),this._type=L.append(this._header,L.$("p.type")),this._docs=L.append(this._body,L.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const f=this._editor.getOptions(),c=f.get(50),d=c.getMassagedFontFamily(),r=f.get(118)||c.fontSize,l=f.get(119)||c.lineHeight,s=c.fontWeight,g=`${r}px`,h=`${l}px`;this.domNode.style.fontSize=g,this.domNode.style.lineHeight=`${l/r}`,this.domNode.style.fontWeight=s,this.domNode.style.fontFeatureSettings=c.fontFeatureSettings,this._type.style.fontFamily=d,this._close.style.height=h,this._close.style.width=h}getLayoutInfo(){const f=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,c=this._borderWidth,d=c*2;return{lineHeight:f,borderWidth:c,borderHeight:d,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=o.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(f,c){var d,r;this._renderDisposeable.clear();let{detail:l,documentation:s}=f.completion;if(c){let g="";g+=`score: ${f.score[0]} `,g+=`prefix: ${(d=f.word)!==null&&d!==void 0?d:"(no prefix)"} `,g+=`word: ${f.completion.filterText?f.completion.filterText+" (filterText)":f.textLabel} `,g+=`distance: ${f.distance} (localityBonus-setting) `,g+=`index: ${f.idx}, based on ${f.completion.sortText&&`sortText: "${f.completion.sortText}"`||"label"} `,g+=`commit_chars: ${(r=f.completion.commitCharacters)===null||r===void 0?void 0:r.join("")} `,s=new p.MarkdownString().appendCodeblock("empty",g),l=`Provider: ${f.provider._debugDisplayName}`}if(!c&&!n(f)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),l){const g=l.length>1e5?`${l.substr(0,1e5)}\u2026`:l;this._type.textContent=g,this._type.title=g,L.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(g))}else L.clearNode(this._type),this._type.title="",L.hide(this._type),this.domNode.classList.add("no-type");if(L.clearNode(this._docs),typeof s=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),L.clearNode(this._docs);const g=this._markdownRenderer.render(s);this._docs.appendChild(g.element),this._renderDisposeable.add(g),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=g=>{g.preventDefault(),g.stopPropagation()},this._close.onclick=g=>{g.preventDefault(),g.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(f,c){const d=new L.Dimension(f,c);L.Dimension.equals(d,this._size)||(this._size=d,L.size(this.domNode,f,c)),this._scrollbar.scanDomNode()}scrollDown(f=8){this._body.scrollTop+=f}scrollUp(f=8){this._body.scrollTop-=f}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(f){this._borderWidth=f}get borderWidth(){return this._borderWidth}};e.SuggestDetailsWidget=t,e.SuggestDetailsWidget=t=Ee([he(1,i.IInstantiationService)],t);class a{constructor(f,c){this.widget=f,this._editor=c,this._disposables=new S.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new b.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(f.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let d,r,l=0,s=0;this._disposables.add(this._resizable.onDidWillResize(()=>{d=this._topLeft,r=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(g=>{if(d&&r){this.widget.layout(g.dimension.width,g.dimension.height);let h=!1;g.west&&(s=r.width-g.dimension.width,h=!0),g.north&&(l=r.height-g.dimension.height,h=!0),h&&this._applyTopLeft({top:d.top+l,left:d.left+s})}g.done&&(d=void 0,r=void 0,l=0,s=0,this._userSize=g.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var g;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(g=this._userSize)!==null&&g!==void 0?g: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(f=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),f&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(f,c){var d;const r=f.getBoundingClientRect();this._anchorBox=r,this._preferAlignAtTop=c,this._placeAtAnchor(this._anchorBox,(d=this._userSize)!==null&&d!==void 0?d:this.widget.size,c)}_placeAtAnchor(f,c,d){var r;const l=L.getClientArea(this.getDomNode().ownerDocument.body),s=this.widget.getLayoutInfo(),g=new L.Dimension(220,2*s.lineHeight),h=f.top,m=function(){const P=l.width-(f.left+f.width+s.borderWidth+s.horizontalPadding),x=-s.borderWidth+f.left+f.width,R=new L.Dimension(P,l.height-f.top-s.borderHeight-s.verticalPadding),B=R.with(void 0,f.top+f.height-s.borderHeight-s.verticalPadding);return{top:h,left:x,fit:P-c.width,maxSizeTop:R,maxSizeBottom:B,minSize:g.with(Math.min(P,g.width))}}(),C=function(){const P=f.left-s.borderWidth-s.horizontalPadding,x=Math.max(s.horizontalPadding,f.left-c.width-s.borderWidth),R=new L.Dimension(P,l.height-f.top-s.borderHeight-s.verticalPadding),B=R.with(void 0,f.top+f.height-s.borderHeight-s.verticalPadding);return{top:h,left:x,fit:P-c.width,maxSizeTop:R,maxSizeBottom:B,minSize:g.with(Math.min(P,g.width))}}(),w=function(){const P=f.left,x=-s.borderWidth+f.top+f.height,R=new L.Dimension(f.width-s.borderHeight,l.height-f.top-f.height-s.verticalPadding);return{top:x,left:P,fit:R.height-c.height,maxSizeBottom:R,maxSizeTop:R,minSize:g.with(R.width)}}(),D=[m,C,w],I=(r=D.find(P=>P.fit>=0))!==null&&r!==void 0?r:D.sort((P,x)=>x.fit-P.fit)[0],M=f.top+f.height-s.borderHeight;let A,O=c.height;const T=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);O>T&&(O=T);let N;d?O<=I.maxSizeTop.height?(A=!0,N=I.maxSizeTop):(A=!1,N=I.maxSizeBottom):O<=I.maxSizeBottom.height?(A=!1,N=I.maxSizeBottom):(A=!0,N=I.maxSizeTop),this._applyTopLeft({left:I.left,top:A?I.top:M-O}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!A,I===m,A,I!==m),this._resizable.minSize=I.minSize,this._resizable.maxSize=N,this._resizable.layout(O,Math.min(N.width,c.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(f){this._topLeft=f,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=a}),define(ie[353],ne([1,0,13,53,55,20,22,28,97,37]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function b(u){return Object.isFrozen(u)?u:y.deepFreeze(u)}class o{constructor(f={},c=[],d=[],r){this._contents=f,this._keys=c,this._overrides=d,this.raw=r,this.overrideConfigurations=new Map}get rawConfiguration(){var f;if(!this._rawConfiguration)if(!((f=this.raw)===null||f===void 0)&&f.length){const c=this.raw.map(d=>{if(d instanceof o)return d;const r=new i("");return r.parseRaw(d),r.configurationModel});this._rawConfiguration=c.reduce((d,r)=>r===d?r:d.merge(r),c[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(f){return f?(0,p.getConfigurationValue)(this.contents,f):this.contents}inspect(f,c){const d=this.rawConfiguration.getValue(f),r=c?this.rawConfiguration.getOverrideValue(f,c):void 0,l=c?this.rawConfiguration.override(c).getValue(f):d;return{value:d,override:r,merged:l}}getOverrideValue(f,c){const d=this.getContentsForOverrideIdentifer(c);return d?f?(0,p.getConfigurationValue)(d,f):d:void 0}override(f){let c=this.overrideConfigurations.get(f);return c||(c=this.createOverrideConfigurationModel(f),this.overrideConfigurations.set(f,c)),c}merge(...f){var c,d;const r=y.deepClone(this.contents),l=y.deepClone(this.overrides),s=[...this.keys],g=!((c=this.raw)===null||c===void 0)&&c.length?[...this.raw]:[this];for(const h of f)if(g.push(...!((d=h.raw)===null||d===void 0)&&d.length?h.raw:[h]),!h.isEmpty()){this.mergeContents(r,h.contents);for(const m of h.overrides){const[C]=l.filter(w=>L.equals(w.identifiers,m.identifiers));C?(this.mergeContents(C.contents,m.contents),C.keys.push(...m.keys),C.keys=L.distinct(C.keys)):l.push(y.deepClone(m))}for(const m of h.keys)s.indexOf(m)===-1&&s.push(m)}return new o(r,s,l,g.every(h=>h instanceof o)?void 0:g)}createOverrideConfigurationModel(f){const c=this.getContentsForOverrideIdentifer(f);if(!c||typeof c!="object"||!Object.keys(c).length)return this;const d={};for(const r of L.distinct([...Object.keys(this.contents),...Object.keys(c)])){let l=this.contents[r];const s=c[r];s&&(typeof l=="object"&&typeof s=="object"?(l=y.deepClone(l),this.mergeContents(l,s)):l=s),d[r]=l}return new o(d,this.keys,this.overrides)}mergeContents(f,c){for(const d of Object.keys(c)){if(d in f&&E.isObject(f[d])&&E.isObject(c[d])){this.mergeContents(f[d],c[d]);continue}f[d]=y.deepClone(c[d])}}getContentsForOverrideIdentifer(f){let c=null,d=null;const r=l=>{l&&(d?this.mergeContents(d,l):d=y.deepClone(l))};for(const l of this.overrides)l.identifiers.length===1&&l.identifiers[0]===f?c=l.contents:l.identifiers.includes(f)&&r(l.contents);return r(c),d}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(f,c){this.updateValue(f,c,!0)}setValue(f,c){this.updateValue(f,c,!1)}removeValue(f){const c=this.keys.indexOf(f);c!==-1&&(this.keys.splice(c,1),(0,p.removeFromValueTree)(this.contents,f),S.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.splice(this.overrides.findIndex(d=>L.equals(d.identifiers,(0,S.overrideIdentifiersFromKey)(f))),1))}updateValue(f,c,d){(0,p.addToValueTree)(this.contents,f,c,r=>console.error(r)),d=d||this.keys.indexOf(f)===-1,d&&this.keys.push(f),S.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.push({identifiers:(0,S.overrideIdentifiersFromKey)(f),keys:Object.keys(this.contents[f]),contents:(0,p.toValuesTree)(this.contents[f],r=>console.error(r))})}}e.ConfigurationModel=o;class i{constructor(f){this._name=f,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new o}parseRaw(f,c){this._raw=f;const{contents:d,keys:r,overrides:l,restricted:s,hasExcludedProperties:g}=this.doParseRaw(f,c);this._configurationModel=new o(d,r,l,g?[f]:void 0),this._restrictedConfigurations=s||[]}doParseRaw(f,c){const d=v.Registry.as(S.Extensions.Configuration).getConfigurationProperties(),r=this.filter(f,d,!0,c);f=r.raw;const l=(0,p.toValuesTree)(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`)),s=Object.keys(f),g=this.toOverrides(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`));return{contents:l,keys:s,overrides:g,restricted:r.restricted,hasExcludedProperties:r.hasExcludedProperties}}filter(f,c,d,r){var l,s,g;let h=!1;if(!r?.scopes&&!r?.skipRestricted&&!(!((l=r?.exclude)===null||l===void 0)&&l.length))return{raw:f,restricted:[],hasExcludedProperties:h};const m={},C=[];for(const w in f)if(S.OVERRIDE_PROPERTY_REGEX.test(w)&&d){const D=this.filter(f[w],c,!1,r);m[w]=D.raw,h=h||D.hasExcludedProperties,C.push(...D.restricted)}else{const D=c[w],I=D?typeof D.scope<"u"?D.scope:3:void 0;D?.restricted&&C.push(w),!(!((s=r.exclude)===null||s===void 0)&&s.includes(w))&&(!((g=r.include)===null||g===void 0)&&g.includes(w)||(I===void 0||r.scopes===void 0||r.scopes.includes(I))&&!(r.skipRestricted&&D?.restricted))?m[w]=f[w]:h=!0}return{raw:m,restricted:C,hasExcludedProperties:h}}toOverrides(f,c){const d=[];for(const r of Object.keys(f))if(S.OVERRIDE_PROPERTY_REGEX.test(r)){const l={};for(const s in f[r])l[s]=f[r][s];d.push({identifiers:(0,S.overrideIdentifiersFromKey)(r),keys:Object.keys(l),contents:(0,p.toValuesTree)(l,c)})}return d}}e.ConfigurationModelParser=i;class n{constructor(f,c,d,r,l,s,g,h,m,C,w,D,I){this.key=f,this.overrides=c,this._value=d,this.overrideIdentifiers=r,this.defaultConfiguration=l,this.policyConfiguration=s,this.applicationConfiguration=g,this.userConfiguration=h,this.localUserConfiguration=m,this.remoteUserConfiguration=C,this.workspaceConfiguration=w,this.folderConfigurationModel=D,this.memoryConfigurationModel=I}inspect(f,c,d){const r=f.inspect(c,d);return{get value(){return b(r.value)},get override(){return b(r.override)},get merged(){return b(r.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class t{constructor(f,c,d,r,l=new o,s=new o,g=new k.ResourceMap,h=new o,m=new k.ResourceMap){this._defaultConfiguration=f,this._policyConfiguration=c,this._applicationConfiguration=d,this._localUserConfiguration=r,this._remoteUserConfiguration=l,this._workspaceConfiguration=s,this._folderConfigurations=g,this._memoryConfiguration=h,this._memoryConfigurationByResource=m,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(f,c,d){return this.getConsolidatedConfigurationModel(f,c,d).getValue(f)}updateValue(f,c,d={}){let r;d.resource?(r=this._memoryConfigurationByResource.get(d.resource),r||(r=new o,this._memoryConfigurationByResource.set(d.resource,r))):r=this._memoryConfiguration,c===void 0?r.removeValue(f):r.setValue(f,c),d.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(f,c,d){const r=this.getConsolidatedConfigurationModel(f,c,d),l=this.getFolderConfigurationModelForResource(c.resource,d),s=c.resource?this._memoryConfigurationByResource.get(c.resource)||this._memoryConfiguration:this._memoryConfiguration,g=new Set;for(const h of r.overrides)for(const m of h.identifiers)r.getOverrideValue(f,m)!==void 0&&g.add(m);return new n(f,c,r.getValue(f),g.size?[...g]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,d?this._workspaceConfiguration:void 0,l||void 0,s)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(f,c,d){let r=this.getConsolidatedConfigurationModelForResource(c,d);return c.overrideIdentifier&&(r=r.override(c.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(f)!==void 0&&(r=r.merge(this._policyConfiguration)),r}getConsolidatedConfigurationModelForResource({resource:f},c){let d=this.getWorkspaceConsolidatedConfiguration();if(c&&f){const r=c.getFolder(f);r&&(d=this.getFolderConsolidatedConfiguration(r.uri)||d);const l=this._memoryConfigurationByResource.get(f);l&&(d=d.merge(l))}return d}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(f){let c=this._foldersConsolidatedConfigurations.get(f);if(!c){const d=this.getWorkspaceConsolidatedConfiguration(),r=this._folderConfigurations.get(f);r?(c=d.merge(r),this._foldersConsolidatedConfigurations.set(f,c)):c=d}return c}getFolderConfigurationModelForResource(f,c){if(c&&f){const d=c.getFolder(f);if(d)return this._folderConfigurations.get(d.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((f,c)=>{const{contents:d,overrides:r,keys:l}=this._folderConfigurations.get(c);return f.push([c,{contents:d,overrides:r,keys:l}]),f},[])}}static parse(f){const c=this.parseConfigurationModel(f.defaults),d=this.parseConfigurationModel(f.policy),r=this.parseConfigurationModel(f.application),l=this.parseConfigurationModel(f.user),s=this.parseConfigurationModel(f.workspace),g=f.folders.reduce((h,m)=>(h.set(_.URI.revive(m[0]),this.parseConfigurationModel(m[1])),h),new k.ResourceMap);return new t(c,d,r,l,new o,s,g,new o,new k.ResourceMap)}static parseConfigurationModel(f){return new o(f.contents,f.keys,f.overrides)}}e.Configuration=t;class a{constructor(f,c,d,r){this.change=f,this.previous=c,this.currentConfiguraiton=d,this.currentWorkspace=r,this._marker=` `,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const l of f.keys)this.affectedKeys.add(l);for(const[,l]of f.overrides)for(const s of l)this.affectedKeys.add(s);this._affectsConfigStr=this._marker;for(const l of this.affectedKeys)this._affectsConfigStr+=l+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=t.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(f,c){var d;const r=this._marker+f,l=this._affectsConfigStr.indexOf(r);if(l<0)return!1;const s=l+r.length;if(s>=this._affectsConfigStr.length)return!1;const g=this._affectsConfigStr.charCodeAt(s);if(g!==this._markerCode1&&g!==this._markerCode2)return!1;if(c){const h=this.previousConfiguration?this.previousConfiguration.getValue(f,c,(d=this.previous)===null||d===void 0?void 0:d.workspace):void 0,m=this.currentConfiguraiton.getValue(f,c,this.currentWorkspace);return!y.equals(h,m)}return!0}}e.ConfigurationChangeEvent=a}),define(ie[792],ne([1,0,2,353,97,37]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class _ extends L.Disposable{constructor(){super(...arguments),this._configurationModel=new k.ConfigurationModel}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new k.ConfigurationModel;const S=E.Registry.as(y.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(S),S)}updateConfigurationModel(S,v){const b=this.getConfigurationDefaultOverrides();for(const o of S){const i=b[o],n=v[o];i!==void 0?this._configurationModel.addValue(o,i):n?this._configurationModel.addValue(o,n.default):this._configurationModel.removeValue(o)}}}e.DefaultConfiguration=_}),define(ie[120],ne([1,0,121,17,25,37,2,66]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class S{constructor(){this._coreKeybindings=new p.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(o){if(k.OS===1){if(o&&o.win)return o.win}else if(k.OS===2){if(o&&o.mac)return o.mac}else if(o&&o.linux)return o.linux;return o}registerKeybindingRule(o){const i=S.bindToCurrentPlatform(o),n=new _.DisposableStore;if(i&&i.primary){const t=(0,L.decodeKeybinding)(i.primary,k.OS);t&&n.add(this._registerDefaultKeybinding(t,o.id,o.args,o.weight,0,o.when))}if(i&&Array.isArray(i.secondary))for(let t=0,a=i.secondary.length;t{f(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(v)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new S,e.Extensions={EditorModes:"platform.keybindingsRegistry"},E.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function v(b,o){if(b.weight1!==o.weight1)return b.weight1-o.weight1;if(b.command&&o.command){if(b.commando.command)return 1}return b.weight2-o.weight2}}),define(ie[29],ne([1,0,41,27,6,2,66,25,15,8,120]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.registerAction2=e.Action2=e.MenuItemAction=e.SubmenuItemAction=e.MenuRegistry=e.IMenuService=e.MenuId=e.isISubmenuItem=e.isIMenuItem=void 0;function i(r){return r.command!==void 0}e.isIMenuItem=i;function n(r){return r.submenu!==void 0}e.isISubmenuItem=n;class t{constructor(l){if(t._instances.has(l))throw new TypeError(`MenuId with identifier '${l}' already exists. Use MenuId.for(ident) or a unique identifier`);t._instances.set(l,this),this.id=l}}e.MenuId=t,t._instances=new Map,t.CommandPalette=new t("CommandPalette"),t.DebugBreakpointsContext=new t("DebugBreakpointsContext"),t.DebugCallStackContext=new t("DebugCallStackContext"),t.DebugConsoleContext=new t("DebugConsoleContext"),t.DebugVariablesContext=new t("DebugVariablesContext"),t.DebugWatchContext=new t("DebugWatchContext"),t.DebugToolBar=new t("DebugToolBar"),t.DebugToolBarStop=new t("DebugToolBarStop"),t.EditorContext=new t("EditorContext"),t.SimpleEditorContext=new t("SimpleEditorContext"),t.EditorContent=new t("EditorContent"),t.EditorLineNumberContext=new t("EditorLineNumberContext"),t.EditorContextCopy=new t("EditorContextCopy"),t.EditorContextPeek=new t("EditorContextPeek"),t.EditorContextShare=new t("EditorContextShare"),t.EditorTitle=new t("EditorTitle"),t.EditorTitleRun=new t("EditorTitleRun"),t.EditorTitleContext=new t("EditorTitleContext"),t.EditorTitleContextShare=new t("EditorTitleContextShare"),t.EmptyEditorGroup=new t("EmptyEditorGroup"),t.EmptyEditorGroupContext=new t("EmptyEditorGroupContext"),t.EditorTabsBarContext=new t("EditorTabsBarContext"),t.EditorTabsBarShowTabsSubmenu=new t("EditorTabsBarShowTabsSubmenu"),t.EditorActionsPositionSubmenu=new t("EditorActionsPositionSubmenu"),t.ExplorerContext=new t("ExplorerContext"),t.ExplorerContextShare=new t("ExplorerContextShare"),t.ExtensionContext=new t("ExtensionContext"),t.GlobalActivity=new t("GlobalActivity"),t.CommandCenter=new t("CommandCenter"),t.CommandCenterCenter=new t("CommandCenterCenter"),t.LayoutControlMenuSubmenu=new t("LayoutControlMenuSubmenu"),t.LayoutControlMenu=new t("LayoutControlMenu"),t.MenubarMainMenu=new t("MenubarMainMenu"),t.MenubarAppearanceMenu=new t("MenubarAppearanceMenu"),t.MenubarDebugMenu=new t("MenubarDebugMenu"),t.MenubarEditMenu=new t("MenubarEditMenu"),t.MenubarCopy=new t("MenubarCopy"),t.MenubarFileMenu=new t("MenubarFileMenu"),t.MenubarGoMenu=new t("MenubarGoMenu"),t.MenubarHelpMenu=new t("MenubarHelpMenu"),t.MenubarLayoutMenu=new t("MenubarLayoutMenu"),t.MenubarNewBreakpointMenu=new t("MenubarNewBreakpointMenu"),t.PanelAlignmentMenu=new t("PanelAlignmentMenu"),t.PanelPositionMenu=new t("PanelPositionMenu"),t.ActivityBarPositionMenu=new t("ActivityBarPositionMenu"),t.MenubarPreferencesMenu=new t("MenubarPreferencesMenu"),t.MenubarRecentMenu=new t("MenubarRecentMenu"),t.MenubarSelectionMenu=new t("MenubarSelectionMenu"),t.MenubarShare=new t("MenubarShare"),t.MenubarSwitchEditorMenu=new t("MenubarSwitchEditorMenu"),t.MenubarSwitchGroupMenu=new t("MenubarSwitchGroupMenu"),t.MenubarTerminalMenu=new t("MenubarTerminalMenu"),t.MenubarViewMenu=new t("MenubarViewMenu"),t.MenubarHomeMenu=new t("MenubarHomeMenu"),t.OpenEditorsContext=new t("OpenEditorsContext"),t.OpenEditorsContextShare=new t("OpenEditorsContextShare"),t.ProblemsPanelContext=new t("ProblemsPanelContext"),t.SCMInputBox=new t("SCMInputBox"),t.SCMHistoryItem=new t("SCMHistoryItem"),t.SCMChangeContext=new t("SCMChangeContext"),t.SCMResourceContext=new t("SCMResourceContext"),t.SCMResourceContextShare=new t("SCMResourceContextShare"),t.SCMResourceFolderContext=new t("SCMResourceFolderContext"),t.SCMResourceGroupContext=new t("SCMResourceGroupContext"),t.SCMSourceControl=new t("SCMSourceControl"),t.SCMTitle=new t("SCMTitle"),t.SearchContext=new t("SearchContext"),t.SearchActionMenu=new t("SearchActionContext"),t.StatusBarWindowIndicatorMenu=new t("StatusBarWindowIndicatorMenu"),t.StatusBarRemoteIndicatorMenu=new t("StatusBarRemoteIndicatorMenu"),t.StickyScrollContext=new t("StickyScrollContext"),t.TestItem=new t("TestItem"),t.TestItemGutter=new t("TestItemGutter"),t.TestMessageContext=new t("TestMessageContext"),t.TestMessageContent=new t("TestMessageContent"),t.TestPeekElement=new t("TestPeekElement"),t.TestPeekTitle=new t("TestPeekTitle"),t.TouchBarContext=new t("TouchBarContext"),t.TitleBarContext=new t("TitleBarContext"),t.TitleBarTitleContext=new t("TitleBarTitleContext"),t.TunnelContext=new t("TunnelContext"),t.TunnelPrivacy=new t("TunnelPrivacy"),t.TunnelProtocol=new t("TunnelProtocol"),t.TunnelPortInline=new t("TunnelInline"),t.TunnelTitle=new t("TunnelTitle"),t.TunnelLocalAddressInline=new t("TunnelLocalAddressInline"),t.TunnelOriginInline=new t("TunnelOriginInline"),t.ViewItemContext=new t("ViewItemContext"),t.ViewContainerTitle=new t("ViewContainerTitle"),t.ViewContainerTitleContext=new t("ViewContainerTitleContext"),t.ViewTitle=new t("ViewTitle"),t.ViewTitleContext=new t("ViewTitleContext"),t.CommentEditorActions=new t("CommentEditorActions"),t.CommentThreadTitle=new t("CommentThreadTitle"),t.CommentThreadActions=new t("CommentThreadActions"),t.CommentThreadAdditionalActions=new t("CommentThreadAdditionalActions"),t.CommentThreadTitleContext=new t("CommentThreadTitleContext"),t.CommentThreadCommentContext=new t("CommentThreadCommentContext"),t.CommentTitle=new t("CommentTitle"),t.CommentActions=new t("CommentActions"),t.InteractiveToolbar=new t("InteractiveToolbar"),t.InteractiveCellTitle=new t("InteractiveCellTitle"),t.InteractiveCellDelete=new t("InteractiveCellDelete"),t.InteractiveCellExecute=new t("InteractiveCellExecute"),t.InteractiveInputExecute=new t("InteractiveInputExecute"),t.NotebookToolbar=new t("NotebookToolbar"),t.NotebookStickyScrollContext=new t("NotebookStickyScrollContext"),t.NotebookCellTitle=new t("NotebookCellTitle"),t.NotebookCellDelete=new t("NotebookCellDelete"),t.NotebookCellInsert=new t("NotebookCellInsert"),t.NotebookCellBetween=new t("NotebookCellBetween"),t.NotebookCellListTop=new t("NotebookCellTop"),t.NotebookCellExecute=new t("NotebookCellExecute"),t.NotebookCellExecutePrimary=new t("NotebookCellExecutePrimary"),t.NotebookDiffCellInputTitle=new t("NotebookDiffCellInputTitle"),t.NotebookDiffCellMetadataTitle=new t("NotebookDiffCellMetadataTitle"),t.NotebookDiffCellOutputsTitle=new t("NotebookDiffCellOutputsTitle"),t.NotebookOutputToolbar=new t("NotebookOutputToolbar"),t.NotebookEditorLayoutConfigure=new t("NotebookEditorLayoutConfigure"),t.NotebookKernelSource=new t("NotebookKernelSource"),t.BulkEditTitle=new t("BulkEditTitle"),t.BulkEditContext=new t("BulkEditContext"),t.TimelineItemContext=new t("TimelineItemContext"),t.TimelineTitle=new t("TimelineTitle"),t.TimelineTitleContext=new t("TimelineTitleContext"),t.TimelineFilterSubMenu=new t("TimelineFilterSubMenu"),t.AccountsContext=new t("AccountsContext"),t.SidebarTitle=new t("SidebarTitle"),t.PanelTitle=new t("PanelTitle"),t.AuxiliaryBarTitle=new t("AuxiliaryBarTitle"),t.TerminalInstanceContext=new t("TerminalInstanceContext"),t.TerminalEditorInstanceContext=new t("TerminalEditorInstanceContext"),t.TerminalNewDropdownContext=new t("TerminalNewDropdownContext"),t.TerminalTabContext=new t("TerminalTabContext"),t.TerminalTabEmptyAreaContext=new t("TerminalTabEmptyAreaContext"),t.TerminalStickyScrollContext=new t("TerminalStickyScrollContext"),t.WebviewContext=new t("WebviewContext"),t.InlineCompletionsActions=new t("InlineCompletionsActions"),t.NewFile=new t("NewFile"),t.MergeInput1Toolbar=new t("MergeToolbar1Toolbar"),t.MergeInput2Toolbar=new t("MergeToolbar2Toolbar"),t.MergeBaseToolbar=new t("MergeBaseToolbar"),t.MergeInputResultToolbar=new t("MergeToolbarResultToolbar"),t.InlineSuggestionToolbar=new t("InlineSuggestionToolbar"),t.ChatContext=new t("ChatContext"),t.ChatCodeBlock=new t("ChatCodeblock"),t.ChatMessageTitle=new t("ChatMessageTitle"),t.ChatExecute=new t("ChatExecute"),t.ChatInputSide=new t("ChatInputSide"),t.AccessibleView=new t("AccessibleView"),t.MultiDiffEditorFileToolbar=new t("MultiDiffEditorFileToolbar"),e.IMenuService=(0,v.createDecorator)("menuService");class a{static for(l){let s=this._all.get(l);return s||(s=new a(l),this._all.set(l,s)),s}static merge(l){const s=new Set;for(const g of l)g instanceof a&&s.add(g.id);return s}constructor(l){this.id=l,this.has=s=>s===l}}a._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new y.MicrotaskEmitter({merge:a.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(r){return this._commands.set(r.id,r),this._onDidChangeMenu.fire(a.for(t.CommandPalette)),(0,E.toDisposable)(()=>{this._commands.delete(r.id)&&this._onDidChangeMenu.fire(a.for(t.CommandPalette))})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((l,s)=>r.set(s,l)),r}appendMenuItem(r,l){let s=this._menuItems.get(r);s||(s=new _.LinkedList,this._menuItems.set(r,s));const g=s.push(l);return this._onDidChangeMenu.fire(a.for(r)),(0,E.toDisposable)(()=>{g(),this._onDidChangeMenu.fire(a.for(r))})}appendMenuItems(r){const l=new E.DisposableStore;for(const{id:s,item:g}of r)l.add(this.appendMenuItem(s,g));return l}getMenuItems(r){let l;return this._menuItems.has(r)?l=[...this._menuItems.get(r)]:l=[],r===t.CommandPalette&&this._appendImplicitItems(l),l}_appendImplicitItems(r){const l=new Set;for(const s of r)i(s)&&(l.add(s.command.id),s.alt&&l.add(s.alt.id));this._commands.forEach((s,g)=>{l.has(g)||r.push({command:s})})}};class u extends L.SubmenuAction{constructor(l,s,g){super(`submenuitem.${l.submenu.id}`,typeof l.title=="string"?l.title:l.title.value,g,"submenu"),this.item=l,this.hideActions=s}}e.SubmenuItemAction=u;let f=o=class{static label(l,s){return s?.renderShortTitle&&l.shortTitle?typeof l.shortTitle=="string"?l.shortTitle:l.shortTitle.value:typeof l.title=="string"?l.title:l.title.value}constructor(l,s,g,h,m,C){var w,D;this.hideActions=h,this._commandService=C,this.id=l.id,this.label=o.label(l,g),this.tooltip=(D=typeof l.tooltip=="string"?l.tooltip:(w=l.tooltip)===null||w===void 0?void 0:w.value)!==null&&D!==void 0?D:"",this.enabled=!l.precondition||m.contextMatchesRules(l.precondition),this.checked=void 0;let I;if(l.toggled){const M=l.toggled.condition?l.toggled:{condition:l.toggled};this.checked=m.contextMatchesRules(M.condition),this.checked&&M.tooltip&&(this.tooltip=typeof M.tooltip=="string"?M.tooltip:M.tooltip.value),this.checked&&k.ThemeIcon.isThemeIcon(M.icon)&&(I=M.icon),this.checked&&M.title&&(this.label=typeof M.title=="string"?M.title:M.title.value)}I||(I=k.ThemeIcon.isThemeIcon(l.icon)?l.icon:void 0),this.item=l,this.alt=s?new o(s,void 0,g,h,m,C):void 0,this._options=g,this.class=I&&k.ThemeIcon.asClassName(I)}run(...l){var s,g;let h=[];return!((s=this._options)===null||s===void 0)&&s.arg&&(h=[...h,this._options.arg]),!((g=this._options)===null||g===void 0)&&g.shouldForwardArgs&&(h=[...h,...l]),this._commandService.executeCommand(this.id,...h)}};e.MenuItemAction=f,e.MenuItemAction=f=o=Ee([he(4,S.IContextKeyService),he(5,p.ICommandService)],f);class c{constructor(l){this.desc=l}}e.Action2=c;function d(r){const l=new E.DisposableStore,s=new r,{f1:g,menu:h,keybinding:m,...C}=s.desc;if(l.add(p.CommandsRegistry.registerCommand({id:C.id,handler:(w,...D)=>s.run(w,...D),metadata:C.metadata})),Array.isArray(h))for(const w of h)l.add(e.MenuRegistry.appendMenuItem(w.id,{command:{...C,precondition:w.precondition===null?void 0:C.precondition},...w}));else h&&l.add(e.MenuRegistry.appendMenuItem(h.id,{command:{...C,precondition:h.precondition===null?void 0:C.precondition},...h}));if(g&&(l.add(e.MenuRegistry.appendMenuItem(t.CommandPalette,{command:C,when:C.precondition})),l.add(e.MenuRegistry.addCommand(C))),Array.isArray(m))for(const w of m)l.add(b.KeybindingsRegistry.registerKeybindingRule({...w,id:C.id,when:C.precondition?S.ContextKeyExpr.and(C.precondition,w.when):w.when}));else m&&l.add(b.KeybindingsRegistry.registerKeybindingRule({...m,id:C.id,when:C.precondition?S.ContextKeyExpr.and(C.precondition,m.when):m.when}));return l}e.registerAction2=d}),define(ie[793],ne([1,0,51,202,716,29]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class _ extends E.Action2{constructor(){super({id:_.ID,title:{value:y.localize(0,null),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const v=!k.TabFocus.getTabFocusMode();k.TabFocus.setTabFocusMode(v),v?(0,L.alert)(y.localize(1,null)):(0,L.alert)(y.localize(2,null))}}e.ToggleTabFocusModeAction=_,_.ID="editor.action.toggleTabFocusMode",(0,E.registerAction2)(_)}),define(ie[354],ne([1,0,232,593,15,120,735,2,7]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new y.RawContextKey("suggestWidgetVisible",!1,(0,_.localize)(0,null));const v="historyNavigationWidgetFocus",b="historyNavigationForwardsEnabled",o="historyNavigationBackwardsEnabled";let i;const n=[];function t(f,c){if(n.includes(c))throw new Error("Cannot register the same widget multiple times");n.push(c);const d=new p.DisposableStore,r=new y.RawContextKey(v,!1).bindTo(f),l=new y.RawContextKey(b,!0).bindTo(f),s=new y.RawContextKey(o,!0).bindTo(f),g=()=>{r.set(!0),i=c},h=()=>{r.set(!1),i===c&&(i=void 0)};return(0,S.isActiveElement)(c.element)&&g(),d.add(c.onDidFocus(()=>g())),d.add(c.onDidBlur(()=>h())),d.add((0,p.toDisposable)(()=>{n.splice(n.indexOf(c),1),h()})),{historyNavigationForwardsEnablement:l,historyNavigationBackwardsEnablement:s,dispose(){d.dispose()}}}e.registerAndCreateHistoryNavigationContext=t;let a=class extends L.FindInput{constructor(c,d,r,l){super(c,d,r);const s=this._register(l.createScoped(this.inputBox.element));this._register(t(s,this.inputBox))}};e.ContextScopedFindInput=a,e.ContextScopedFindInput=a=Ee([he(3,y.IContextKeyService)],a);let u=class extends k.ReplaceInput{constructor(c,d,r,l,s=!1){super(c,d,s,r);const g=this._register(l.createScoped(this.inputBox.element));this._register(t(g,this.inputBox))}};e.ContextScopedReplaceInput=u,e.ContextScopedReplaceInput=u=Ee([he(3,y.IContextKeyService)],u),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(v),y.ContextKeyExpr.equals(o,!0),y.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:f=>{i?.showPreviousValue()}}),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(v),y.ContextKeyExpr.equals(b,!0),y.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:f=>{i?.showNextValue()}})}),define(ie[136],ne([1,0,19,9,71,2,61,20,22,11,5,68,131,709,29,25,15,18,354]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:c.historyNavigationVisible,HasFocusedSuggestion:new u.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,n.localize)(0,null)),DetailsVisible:new u.RawContextKey("suggestWidgetDetailsVisible",!1,(0,n.localize)(1,null)),MultipleSuggestions:new u.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,n.localize)(2,null)),MakesTextEdit:new u.RawContextKey("suggestionMakesTextEdit",!0,(0,n.localize)(3,null)),AcceptSuggestionsOnEnter:new u.RawContextKey("acceptSuggestionOnEnter",!0,(0,n.localize)(4,null)),HasInsertAndReplaceRange:new u.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,n.localize)(5,null)),InsertMode:new u.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,n.localize)(6,null)}),CanResolve:new u.RawContextKey("suggestionCanResolve",!1,(0,n.localize)(7,null))},e.suggestWidgetStatusbarMenu=new t.MenuId("suggestWidgetStatusBar");class d{constructor(T,N,P,x){var R;this.position=T,this.completion=N,this.container=P,this.provider=x,this.isInvalid=!1,this.score=y.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:(R=N.label)===null||R===void 0?void 0:R.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=N.sortText&&N.sortText.toLowerCase(),this.filterTextLow=N.filterText&&N.filterText.toLowerCase(),this.extensionId=N.extensionId,b.Range.isIRange(N.range)?(this.editStart=new v.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new v.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new v.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||b.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==T.lineNumber):(this.editStart=new v.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new v.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new v.Position(N.range.replace.endLineNumber,N.range.replace.endColumn),this.isInvalid=this.isInvalid||b.Range.spansMultipleLines(N.range.insert)||b.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==T.lineNumber||N.range.replace.startLineNumber!==T.lineNumber||N.range.insert.startColumn!==N.range.replace.startColumn),typeof x.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}async resolve(T){if(!this._resolveCache){const N=T.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),P=new _.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,T)).then(x=>{Object.assign(this.completion,x),this._resolveDuration=P.elapsed()},x=>{(0,k.isCancellationError)(x)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{N.dispose()})}return this._resolveCache}}e.CompletionItem=d;class r{constructor(T=2,N=new Set,P=new Set,x=new Map,R=!0){this.snippetSortOrder=T,this.kindFilter=N,this.providerFilter=P,this.providerItemsToReuse=x,this.showDeprecated=R}}e.CompletionOptions=r,r.default=new r;let l;function s(){return l}e.getSnippetSuggestSupport=s;class g{constructor(T,N,P,x){this.items=T,this.needsClipboard=N,this.durations=P,this.disposable=x}}e.CompletionItemModel=g;async function h(O,T,N,P=r.default,x={triggerKind:0},R=L.CancellationToken.None){const B=new _.StopWatch;N=N.clone();const W=T.getWordAtPosition(N),V=W?new b.Range(N.lineNumber,W.startColumn,N.lineNumber,W.endColumn):b.Range.fromPositions(N),U={replace:V,insert:V.setEndPosition(N.lineNumber,N.column)},F=[],j=new E.DisposableStore,J=[];let le=!1;const ee=(te,G,de)=>{var ue,X,Z;let re=!1;if(!G)return re;for(const oe of G.suggestions)if(!P.kindFilter.has(oe.kind)){if(!P.showDeprecated&&(!((ue=oe?.tags)===null||ue===void 0)&&ue.includes(1)))continue;oe.range||(oe.range=U),oe.sortText||(oe.sortText=typeof oe.label=="string"?oe.label:oe.label.label),!le&&oe.insertTextRules&&oe.insertTextRules&4&&(le=i.SnippetParser.guessNeedsClipboard(oe.insertText)),F.push(new d(N,oe,G,te)),re=!0}return(0,E.isDisposable)(G)&&j.add(G),J.push({providerName:(X=te._debugDisplayName)!==null&&X!==void 0?X:"unknown_provider",elapsedProvider:(Z=G.duration)!==null&&Z!==void 0?Z:-1,elapsedOverall:de.elapsed()}),re},$=(async()=>{if(!l||P.kindFilter.has(27))return;const te=P.providerItemsToReuse.get(l);if(te){te.forEach(ue=>F.push(ue));return}if(P.providerFilter.size>0&&!P.providerFilter.has(l))return;const G=new _.StopWatch,de=await l.provideCompletionItems(T,N,x,R);ee(l,de,G)})();for(const te of O.orderedGroups(T)){let G=!1;if(await Promise.all(te.map(async de=>{if(P.providerItemsToReuse.has(de)){const ue=P.providerItemsToReuse.get(de);ue.forEach(X=>F.push(X)),G=G||ue.length>0;return}if(!(P.providerFilter.size>0&&!P.providerFilter.has(de)))try{const ue=new _.StopWatch,X=await de.provideCompletionItems(T,N,x,R);G=ee(de,X,ue)||G}catch(ue){(0,k.onUnexpectedExternalError)(ue)}})),G||R.isCancellationRequested)break}return await $,R.isCancellationRequested?(j.dispose(),Promise.reject(new k.CancellationError)):new g(F.sort(I(P.snippetSortOrder)),le,{entries:J,elapsed:B.elapsed()},j)}e.provideSuggestionItems=h;function m(O,T){if(O.sortTextLow&&T.sortTextLow){if(O.sortTextLowT.sortTextLow)return 1}return O.textLabelT.textLabel?1:O.completion.kind-T.completion.kind}function C(O,T){if(O.completion.kind!==T.completion.kind){if(O.completion.kind===27)return-1;if(T.completion.kind===27)return 1}return m(O,T)}function w(O,T){if(O.completion.kind!==T.completion.kind){if(O.completion.kind===27)return 1;if(T.completion.kind===27)return-1}return m(O,T)}const D=new Map;D.set(0,C),D.set(2,w),D.set(1,m);function I(O){return D.get(O)}e.getSuggestionComparator=I,a.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(O,...T)=>{const[N,P,x,R]=T;(0,p.assertType)(S.URI.isUri(N)),(0,p.assertType)(v.Position.isIPosition(P)),(0,p.assertType)(typeof x=="string"||!x),(0,p.assertType)(typeof R=="number"||!R);const{completionProvider:B}=O.get(f.ILanguageFeaturesService),W=await O.get(o.ITextModelService).createModelReference(N);try{const V={incomplete:!1,suggestions:[]},U=[],F=W.object.textEditorModel.validatePosition(P),j=await h(B,W.object.textEditorModel,F,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const J of j.items)U.length<(R??0)&&U.push(J.resolve(L.CancellationToken.None)),V.incomplete=V.incomplete||J.container.incomplete,V.suggestions.push(J.completion);try{return await Promise.all(U),V}finally{setTimeout(()=>j.disposable.dispose(),100)}}finally{W.dispose()}});function M(O,T){var N;(N=O.getContribution("editor.contrib.suggestController"))===null||N===void 0||N.triggerSuggest(new Set().add(T),void 0,!0)}e.showSimpleSuggestions=M;class A{static isAllOff(T){return T.other==="off"&&T.comments==="off"&&T.strings==="off"}static isAllOn(T){return T.other==="on"&&T.comments==="on"&&T.strings==="on"}static valueFor(T,N){switch(N){case 1:return T.comments;case 2:return T.strings;default:return T.other}}}e.QuickSuggestionsOptions=A}),define(ie[137],ne([1,0,13,2,37]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var E;(function(p){p[p.PRESERVE=0]="PRESERVE",p[p.LAST=1]="LAST"})(E||(e.DefaultQuickAccessFilterValue=E={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class _{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(S){return S.prefix.length===0?this.defaultProvider=S:this.providers.push(S),this.providers.sort((v,b)=>b.prefix.length-v.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(S),1),this.defaultProvider===S&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,L.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(S){return S&&this.providers.find(b=>S.startsWith(b.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=_,y.Registry.add(e.Extensions.Quickaccess,new _)}),define(ie[794],ne([1,0,740,37,2,34,137,70]),function(Q,e,L,k,y,E,_,p){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let v=S=class{constructor(o,i){this.quickInputService=o,this.keybindingService=i,this.registry=k.Registry.as(_.Extensions.Quickaccess)}provide(o){const i=new y.DisposableStore;return i.add(o.onDidAccept(()=>{const[n]=o.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),i.add(o.onDidChangeValue(n=>{const t=this.registry.getQuickAccessProvider(n.substr(S.PREFIX.length));t&&t.prefix&&t.prefix!==S.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),o.items=this.getQuickAccessProviders().filter(n=>n.prefix!==S.PREFIX),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)).flatMap(i=>this.createPicks(i))}createPicks(o){return o.helpEntries.map(i=>{const n=i.prefix||o.prefix,t=n||"\u2026";return{prefix:n,label:t,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:(0,L.localize)(0,null,t,i.description),description:i.description}})}};e.HelpQuickAccessProvider=v,v.PREFIX="?",e.HelpQuickAccessProvider=v=S=Ee([he(0,p.IQuickInputService),he(1,E.IKeybindingService)],v)}),define(ie[795],ne([1,0,37,137,95,794]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),L.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:E.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:y.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(ie[796],ne([1,0,14,19,6,2,8,137,70,37]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let b=class extends E.Disposable{constructor(i,n){super(),this.quickInputService=i,this.instantiationService=n,this.registry=v.Registry.as(p.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(i="",n){this.doShowOrPick(i,!1,n)}doShowOrPick(i,n,t){var a;const[u,f]=this.getOrInstantiateProvider(i),c=this.visibleQuickAccess,d=c?.descriptor;if(c&&f&&d===f){i!==f.prefix&&!t?.preserveValue&&(c.picker.value=i),this.adjustValueSelection(c.picker,f,t);return}if(f&&!t?.preserveValue){let h;if(c&&d&&d!==f){const m=c.value.substr(d.prefix.length);m&&(h=`${f.prefix}${m}`)}if(!h){const m=u?.defaultFilterValue;m===p.DefaultQuickAccessFilterValue.LAST?h=this.lastAcceptedPickerValues.get(f):typeof m=="string"&&(h=`${f.prefix}${m}`)}typeof h=="string"&&(i=h)}const r=new E.DisposableStore,l=r.add(this.quickInputService.createQuickPick());l.value=i,this.adjustValueSelection(l,f,t),l.placeholder=f?.placeholder,l.quickNavigate=t?.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!c,(typeof t?.itemActivation=="number"||t?.quickNavigateConfiguration)&&(l.itemActivation=(a=t?.itemActivation)!==null&&a!==void 0?a:S.ItemActivation.SECOND),l.contextKey=f?.contextKey,l.filterValue=h=>h.substring(f?f.prefix.length:0);let s;n&&(s=new L.DeferredPromise,r.add(y.Event.once(l.onWillAccept)(h=>{h.veto(),l.hide()}))),r.add(this.registerPickerListeners(l,u,f,i,t?.providerOptions));const g=r.add(new k.CancellationTokenSource);if(u&&r.add(u.provide(l,g.token,t?.providerOptions)),y.Event.once(l.onDidHide)(()=>{l.selectedItems.length===0&&g.cancel(),r.dispose(),s?.complete(l.selectedItems.slice(0))}),l.show(),n)return s?.p}adjustValueSelection(i,n,t){var a;let u;t?.preserveValue?u=[i.value.length,i.value.length]:u=[(a=n?.prefix.length)!==null&&a!==void 0?a:0,i.value.length],i.valueSelection=u}registerPickerListeners(i,n,t,a,u){const f=new E.DisposableStore,c=this.visibleQuickAccess={picker:i,descriptor:t,value:a};return f.add((0,E.toDisposable)(()=>{c===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),f.add(i.onDidChangeValue(d=>{const[r]=this.getOrInstantiateProvider(d);r!==n?this.show(d,{preserveValue:!0,providerOptions:u}):c.value=d})),t&&f.add(i.onDidAccept(()=>{this.lastAcceptedPickerValues.set(t,i.value)})),f}getOrInstantiateProvider(i){const n=this.registry.getQuickAccessProvider(i);if(!n)return[void 0,void 0];let t=this.mapProviderToDescriptor.get(n);return t||(t=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,t)),[t,n]}};e.QuickAccessController=b,e.QuickAccessController=b=Ee([he(0,S.IQuickInputService),he(1,_.IInstantiationService)],b)}),define(ie[797],ne([1,0,26,27,100,484]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var E;(function(_){function p(S){switch(S){case y.default.Ignore:return"severity-ignore "+k.ThemeIcon.asClassName(L.Codicon.info);case y.default.Info:return k.ThemeIcon.asClassName(L.Codicon.info);case y.default.Warning:return k.ThemeIcon.asClassName(L.Codicon.warning);case y.default.Error:return k.ThemeIcon.asClassName(L.Codicon.error);default:return""}}_.className=p})(E||(e.SeverityIcon=E={}))}),define(ie[91],ne([1,0,6,2,20,599,8]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.loadKeyTargets=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,_.createDecorator)("storageService");var p;(function(o){o[o.NONE=0]="NONE",o[o.SHUTDOWN=1]="SHUTDOWN"})(p||(e.WillSaveStateReason=p={}));function S(o){const i=o.get(e.TARGET_KEY);if(i)try{return JSON.parse(i)}catch{}return Object.create(null)}e.loadKeyTargets=S;class v extends k.Disposable{constructor(i={flushInterval:v.DEFAULT_FLUSH_INTERVAL}){super(),this.options=i,this._onDidChangeValue=this._register(new L.PauseableEmitter),this._onDidChangeTarget=this._register(new L.PauseableEmitter),this._onWillSaveState=this._register(new L.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(i,n,t){return L.Event.filter(this._onDidChangeValue.event,a=>a.scope===i&&(n===void 0||a.key===n),t)}emitDidChangeValue(i,n){const{key:t,external:a}=n;if(t===e.TARGET_KEY){switch(i){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:i})}else this._onDidChangeValue.fire({scope:i,key:t,target:this.getKeyTargets(i)[t],external:a})}get(i,n,t){var a;return(a=this.getStorage(n))===null||a===void 0?void 0:a.get(i,t)}getBoolean(i,n,t){var a;return(a=this.getStorage(n))===null||a===void 0?void 0:a.getBoolean(i,t)}getNumber(i,n,t){var a;return(a=this.getStorage(n))===null||a===void 0?void 0:a.getNumber(i,t)}store(i,n,t,a,u=!1){if((0,y.isUndefinedOrNull)(n)){this.remove(i,t,u);return}this.withPausedEmitters(()=>{var f;this.updateKeyTarget(i,t,a),(f=this.getStorage(t))===null||f===void 0||f.set(i,n,u)})}remove(i,n,t=!1){this.withPausedEmitters(()=>{var a;this.updateKeyTarget(i,n,void 0),(a=this.getStorage(n))===null||a===void 0||a.delete(i,t)})}withPausedEmitters(i){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{i()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(i,n,t,a=!1){var u,f;const c=this.getKeyTargets(n);typeof t=="number"?c[i]!==t&&(c[i]=t,(u=this.getStorage(n))===null||u===void 0||u.set(e.TARGET_KEY,JSON.stringify(c),a)):typeof c[i]=="number"&&(delete c[i],(f=this.getStorage(n))===null||f===void 0||f.set(e.TARGET_KEY,JSON.stringify(c),a))}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(i){switch(i){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(i){const n=this.getStorage(i);return n?S(n):Object.create(null)}}e.AbstractStorageService=v,v.DEFAULT_FLUSH_INTERVAL=60*1e3;class b extends v{constructor(){super(),this.applicationStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase,{hint:E.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(i=>this.emitDidChangeValue(1,i))),this._register(this.profileStorage.onDidChangeStorage(i=>this.emitDidChangeValue(0,i))),this._register(this.applicationStorage.onDidChangeStorage(i=>this.emitDidChangeValue(-1,i)))}getStorage(i){switch(i){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}e.InMemoryStorageService=b}),define(ie[798],ne([1,0,6,53,5,340,46,8,91,48,7]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,p.createDecorator)("ICodeLensCache");class o{constructor(t,a){this.lineCount=t,this.data=a}}let i=class{constructor(t){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k.LRUCache(20,.75);const a="codelens/cache";(0,b.runWhenWindowIdle)(v.mainWindow,()=>t.remove(a,1));const u="codelens/cache2",f=t.get(u,1,"{}");this._deserialize(f),L.Event.once(t.onWillSaveState)(c=>{c.reason===S.WillSaveStateReason.SHUTDOWN&&t.store(u,this._serialize(),1,1)})}put(t,a){const u=a.lenses.map(d=>{var r;return{range:d.symbol.range,command:d.symbol.command&&{id:"",title:(r=d.symbol.command)===null||r===void 0?void 0:r.title}}}),f=new E.CodeLensModel;f.add({lenses:u,dispose:()=>{}},this._fakeProvider);const c=new o(t.getLineCount(),f);this._cache.set(t.uri.toString(),c)}get(t){const a=this._cache.get(t.uri.toString());return a&&a.lineCount===t.getLineCount()?a.data:void 0}delete(t){this._cache.delete(t.uri.toString())}_serialize(){const t=Object.create(null);for(const[a,u]of this._cache){const f=new Set;for(const c of u.data.lenses)f.add(c.symbol.range.startLineNumber);t[a]={lineCount:u.lineCount,lines:[...f.values()]}}return JSON.stringify(t)}_deserialize(t){try{const a=JSON.parse(t);for(const u in a){const f=a[u],c=[];for(const r of f.lines)c.push({range:new y.Range(r,1,r,11)});const d=new E.CodeLensModel;d.add({lenses:c,dispose(){}},this._fakeProvider),this._cache.set(u,new o(f.lineCount,d))}}catch{}}};e.CodeLensCache=i,e.CodeLensCache=i=Ee([he(0,S.IStorageService)],i),(0,_.registerSingleton)(e.ICodeLensCache,i,1)}),define(ie[355],ne([1,0,14,2,53,199,31,28,46,8,91]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class i{constructor(c){this.name=c}select(c,d,r){if(r.length===0)return 0;const l=r[0].score[0];for(let s=0;sm&&D.type===r[C].completion.kind&&D.insertText===r[C].completion.insertText&&(m=D.touch,h=C),r[C].completion.preselect&&g===-1)return g=C}return h!==-1?h:g!==-1?g:0}toJSON(){return this._cache.toJSON()}fromJSON(c){this._cache.clear();const d=0;for(const[r,l]of c)l.touch=d,l.type=typeof l.type=="number"?l.type:_.CompletionItemKinds.fromString(l.type),this._cache.set(r,l);this._seq=this._cache.size}}e.LRUMemory=t;class a extends i{constructor(){super("recentlyUsedByPrefix"),this._trie=E.TernarySearchTree.forStrings(),this._seq=0}memorize(c,d,r){const{word:l}=c.getWordUntilPosition(d),s=`${c.getLanguageId()}/${l}`;this._trie.set(s,{type:r.completion.kind,insertText:r.completion.insertText,touch:this._seq++})}select(c,d,r){const{word:l}=c.getWordUntilPosition(d);if(!l)return super.select(c,d,r);const s=`${c.getLanguageId()}/${l}`;let g=this._trie.get(s);if(g||(g=this._trie.findSubstr(s)),g)for(let h=0;hc.push([r,d])),c.sort((d,r)=>-(d[1].touch-r[1].touch)).forEach((d,r)=>d[1].touch=r),c.slice(0,200)}fromJSON(c){if(this._trie.clear(),c.length>0){this._seq=c[0][1].touch+1;for(const[d,r]of c)r.type=typeof r.type=="number"?r.type:_.CompletionItemKinds.fromString(r.type),this._trie.set(d,r)}}}e.PrefixMemory=a;let u=o=class{constructor(c,d){this._storageService=c,this._configService=d,this._disposables=new k.DisposableStore,this._persistSoon=new L.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(c.onWillSaveState(r=>{r.reason===b.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(c,d,r){this._withStrategy(c,d).memorize(c,d,r),this._persistSoon.schedule()}select(c,d,r){return this._withStrategy(c,d).select(c,d,r)}_withStrategy(c,d){var r;const l=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:c.getLanguageIdAtPosition(d.lineNumber,d.column),resource:c.uri});if(((r=this._strategy)===null||r===void 0?void 0:r.name)!==l){this._saveState();const s=o._strategyCtors.get(l)||n;this._strategy=new s;try{const h=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,m=this._storageService.get(`${o._storagePrefix}/${l}`,h);m&&this._strategy.fromJSON(JSON.parse(m))}catch{}}return this._strategy}_saveState(){if(this._strategy){const d=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,r=JSON.stringify(this._strategy);this._storageService.store(`${o._storagePrefix}/${this._strategy.name}`,r,d,1)}}};e.SuggestMemoryService=u,u._strategyCtors=new Map([["recentlyUsedByPrefix",a],["recentlyUsed",t],["first",n]]),u._storagePrefix="suggest/memories",e.SuggestMemoryService=u=o=Ee([he(0,b.IStorageService),he(1,p.IConfigurationService)],u),e.ISuggestMemoryService=(0,v.createDecorator)("ISuggestMemories"),(0,S.registerSingleton)(e.ISuggestMemoryService,u,1)}),define(ie[799],ne([1,0,14,6,2,29,25,15,41,91,13,728]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";var i,n;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let t=class{constructor(r,l){this._commandService=r,this._hiddenStates=new a(l)}createMenu(r,l,s){return new f(r,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...s},this._commandService,l)}resetHiddenStates(r){this._hiddenStates.reset(r)}};e.MenuService=t,e.MenuService=t=Ee([he(0,_.ICommandService),he(1,v.IStorageService)],t);let a=i=class{constructor(r){this._storageService=r,this._disposables=new y.DisposableStore,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const l=r.get(i._key,0,"{}");this._data=JSON.parse(l)}catch{this._data=Object.create(null)}this._disposables.add(r.onDidChangeValue(0,i._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const l=r.get(i._key,0,"{}");this._data=JSON.parse(l)}catch(l){console.log("FAILED to read storage after UPDATE",l)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(r,l){var s;return(s=this._hiddenByDefaultCache.get(`${r.id}/${l}`))!==null&&s!==void 0?s:!1}setDefaultState(r,l,s){this._hiddenByDefaultCache.set(`${r.id}/${l}`,s)}isHidden(r,l){var s,g;const h=this._isHiddenByDefault(r,l),m=(g=(s=this._data[r.id])===null||s===void 0?void 0:s.includes(l))!==null&&g!==void 0?g:!1;return h?!m:m}updateHidden(r,l,s){this._isHiddenByDefault(r,l)&&(s=!s);const h=this._data[r.id];if(s)h?h.indexOf(l)<0&&h.push(l):this._data[r.id]=[l];else if(h){const m=h.indexOf(l);m>=0&&(0,b.removeFastWithoutKeepingOrder)(h,m),h.length===0&&delete this._data[r.id]}this._persist()}reset(r){if(r===void 0)this._data=Object.create(null),this._persist();else{for(const{id:l}of r)this._data[l]&&delete this._data[l];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const r=JSON.stringify(this._data);this._storageService.store(i._key,r,0,0)}finally{this._ignoreChangeEvent=!1}}};a._key="menu.hiddenCommands",a=i=Ee([he(0,v.IStorageService)],a);let u=n=class{constructor(r,l,s,g,h){this._id=r,this._hiddenStates=l,this._collectContextKeysForSubmenus=s,this._commandService=g,this._contextKeyService=h,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 r=E.MenuRegistry.getMenuItems(this._id);let l;r.sort(n._compareMenuItems);for(const s of r){const g=s.group||"";(!l||l[0]!==g)&&(l=[g,[]],this._menuGroups.push(l)),l[1].push(s),this._collectContextKeys(s)}}_collectContextKeys(r){if(n._fillInKbExprKeys(r.when,this._structureContextKeys),(0,E.isIMenuItem)(r)){if(r.command.precondition&&n._fillInKbExprKeys(r.command.precondition,this._preconditionContextKeys),r.command.toggled){const l=r.command.toggled.condition||r.command.toggled;n._fillInKbExprKeys(l,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&E.MenuRegistry.getMenuItems(r.submenu).forEach(this._collectContextKeys,this)}createActionGroups(r){const l=[];for(const s of this._menuGroups){const[g,h]=s,m=[];for(const C of h)if(this._contextKeyService.contextMatchesRules(C.when)){const w=(0,E.isIMenuItem)(C);w&&this._hiddenStates.setDefaultState(this._id,C.command.id,!!C.isHiddenByDefault);const D=c(this._id,w?C.command:C,this._hiddenStates);if(w)m.push(new E.MenuItemAction(C.command,C.alt,r,D,this._contextKeyService,this._commandService));else{const I=new n(C.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(r),M=S.Separator.join(...I.map(A=>A[1]));M.length>0&&m.push(new E.SubmenuItemAction(C,D,M))}}m.length>0&&l.push([g,m])}return l}static _fillInKbExprKeys(r,l){if(r)for(const s of r.keys())l.add(s)}static _compareMenuItems(r,l){const s=r.group,g=l.group;if(s!==g){if(s){if(!g)return-1}else return 1;if(s==="navigation")return-1;if(g==="navigation")return 1;const C=s.localeCompare(g);if(C!==0)return C}const h=r.order||0,m=l.order||0;return hm?1:n._compareTitles((0,E.isIMenuItem)(r)?r.command.title:r.title,(0,E.isIMenuItem)(l)?l.command.title:l.title)}static _compareTitles(r,l){const s=typeof r=="string"?r:r.original,g=typeof l=="string"?l:l.original;return s.localeCompare(g)}};u=n=Ee([he(3,_.ICommandService),he(4,p.IContextKeyService)],u);let f=class{constructor(r,l,s,g,h){this._disposables=new y.DisposableStore,this._menuInfo=new u(r,l,s.emitEventsForSubmenuChanges,g,h);const m=new L.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},s.eventDebounceDelay);this._disposables.add(m),this._disposables.add(E.MenuRegistry.onDidChangeMenu(I=>{I.has(r)&&m.schedule()}));const C=this._disposables.add(new y.DisposableStore),w=I=>{let M=!1,A=!1,O=!1;for(const T of I)if(M=M||T.isStructuralChange,A=A||T.isEnablementChange,O=O||T.isToggleChange,M&&A&&O)break;return{menu:this,isStructuralChange:M,isEnablementChange:A,isToggleChange:O}},D=()=>{C.add(h.onDidChangeContext(I=>{const M=I.affectsSome(this._menuInfo.structureContextKeys),A=I.affectsSome(this._menuInfo.preconditionContextKeys),O=I.affectsSome(this._menuInfo.toggledContextKeys);(M||A||O)&&this._onDidChange.fire({menu:this,isStructuralChange:M,isEnablementChange:A,isToggleChange:O})})),C.add(l.onDidChange(I=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new k.DebounceEmitter({onWillAddFirstListener:D,onDidRemoveLastListener:C.clear.bind(C),delay:s.eventDebounceDelay,merge:w}),this.onDidChange=this._onDidChange.event}getActions(r){return this._menuInfo.createActionGroups(r)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};f=Ee([he(3,_.ICommandService),he(4,p.IContextKeyService)],f);function c(d,r,l){const s=(0,E.isISubmenuItem)(r)?r.submenu.id:r.id,g=typeof r.title=="string"?r.title:r.title.value,h=(0,S.toAction)({id:`hide/${d.id}/${s}`,label:(0,o.localize)(0,null,g),run(){l.updateHidden(d,s,!0)}}),m=(0,S.toAction)({id:`toggle/${d.id}/${s}`,label:g,get checked(){return!l.isHidden(d,s)},run(){l.updateHidden(d,s,!!this.checked)}});return{hide:h,toggle:m,get isHidden(){return!m.checked}}}}),define(ie[80],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,L.createDecorator)("telemetryService")}),define(ie[16],ne([1,0,614,22,33,11,52,68,29,25,15,8,120,37,80,20,64,7]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=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 c{constructor(x){this.id=x.id,this.precondition=x.precondition,this._kbOpts=x.kbOpts,this._menuOpts=x.menuOpts,this.metadata=x.metadata}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const x=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const R of x){let B=R.kbExpr;this.precondition&&(B?B=b.ContextKeyExpr.and(B,this.precondition):B=this.precondition);const W={id:this.id,weight:R.weight,args:R.args,when:B,primary:R.primary,secondary:R.secondary,win:R.win,linux:R.linux,mac:R.mac};i.KeybindingsRegistry.registerKeybindingRule(W)}}v.CommandsRegistry.registerCommand({id:this.id,handler:(x,R)=>this.runCommand(x,R),metadata:this.metadata})}_registerMenuItem(x){S.MenuRegistry.appendMenuItem(x.menuId,{group:x.group,command:{id:this.id,title:x.title,icon:x.icon,precondition:this.precondition},when:x.when,order:x.order})}}e.Command=c;class d extends c{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,R,B,W){return this._implementations.push({priority:x,name:R,implementation:B,when:W}),this._implementations.sort((V,U)=>U.priority-V.priority),{dispose:()=>{for(let V=0;V{if(F.get(b.IContextKeyService).contextMatchesRules(B??void 0))return W(F,U,R)})}runCommand(x,R){return l.runEditorCommand(x,R,this.precondition,(B,W,V)=>this.runEditorCommand(B,W,V))}}e.EditorCommand=l;class s extends l{static convertOptions(x){let R;Array.isArray(x.menuOpts)?R=x.menuOpts:x.menuOpts?R=[x.menuOpts]:R=[];function B(W){return W.menuId||(W.menuId=S.MenuId.EditorContext),W.title||(W.title=x.label),W.when=b.ContextKeyExpr.and(x.precondition,W.when),W}return Array.isArray(x.contextMenuOpts)?R.push(...x.contextMenuOpts.map(B)):x.contextMenuOpts&&R.push(B(x.contextMenuOpts)),x.menuOpts=R,x}constructor(x){super(s.convertOptions(x)),this.label=x.label,this.alias=x.alias}runEditorCommand(x,R,B){return this.reportTelemetry(x,R),this.run(x,R,B||{})}reportTelemetry(x,R){x.get(t.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=s;class g extends s{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,R){return this._implementations.push([x,R]),this._implementations.sort((B,W)=>W[0]-B[0]),{dispose:()=>{for(let B=0;B{var U,F;const j=V.get(b.IContextKeyService),J=V.get(u.ILogService);if(!j.contextMatchesRules((U=this.desc.precondition)!==null&&U!==void 0?U:void 0)){J.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(F=this.desc.precondition)===null||F===void 0?void 0:F.serialize());return}return this.runEditorCommand(V,W,...R)})}}e.EditorAction2=h;function m(P,x){v.CommandsRegistry.registerCommand(P,function(R,...B){const W=R.get(o.IInstantiationService),[V,U]=B;(0,a.assertType)(k.URI.isUri(V)),(0,a.assertType)(E.Position.isIPosition(U));const F=R.get(_.IModelService).getModel(V);if(F){const j=E.Position.lift(U);return W.invokeFunction(x,F,j,...B.slice(2))}return R.get(p.ITextModelService).createModelReference(V).then(j=>new Promise((J,le)=>{try{const ee=W.invokeFunction(x,j.object.textEditorModel,E.Position.lift(U),B.slice(2));J(ee)}catch(ee){le(ee)}}).finally(()=>{j.dispose()}))})}e.registerModelAndPositionCommand=m;function C(P){return T.INSTANCE.registerEditorCommand(P),P}e.registerEditorCommand=C;function w(P){const x=new P;return T.INSTANCE.registerEditorAction(x),x}e.registerEditorAction=w;function D(P){return T.INSTANCE.registerEditorAction(P),P}e.registerMultiEditorAction=D;function I(P){T.INSTANCE.registerEditorAction(P)}e.registerInstantiatedEditorAction=I;function M(P,x,R){T.INSTANCE.registerEditorContribution(P,x,R)}e.registerEditorContribution=M;var A;(function(P){function x(U){return T.INSTANCE.getEditorCommand(U)}P.getEditorCommand=x;function R(){return T.INSTANCE.getEditorActions()}P.getEditorActions=R;function B(){return T.INSTANCE.getEditorContributions()}P.getEditorContributions=B;function W(U){return T.INSTANCE.getEditorContributions().filter(F=>U.indexOf(F.id)>=0)}P.getSomeEditorContributions=W;function V(){return T.INSTANCE.getDiffEditorContributions()}P.getDiffEditorContributions=V})(A||(e.EditorExtensionsRegistry=A={}));const O={EditorCommonContributions:"editor.contributions"};class T{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(x,R,B){this.editorContributions.push({id:x,ctor:R,instantiation:B})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(x){x.register(),this.editorActions.push(x)}getEditorActions(){return this.editorActions}registerEditorCommand(x){x.register(),this.editorCommands[x.id]=x}getEditorCommand(x){return this.editorCommands[x]||null}}T.INSTANCE=new T,n.Registry.add(O.EditorCommonContributions,T.INSTANCE);function N(P){return P.register(),P}e.UndoCommand=N(new d({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:S.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(0,null),order:1},{menuId:S.MenuId.CommandPalette,group:"",title:L.localize(1,null),order:1}]})),N(new r(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=N(new d({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:S.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(2,null),order:2},{menuId:S.MenuId.CommandPalette,group:"",title:L.localize(3,null),order:1}]})),N(new r(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=N(new d({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:S.MenuId.MenubarSelectionMenu,group:"1_basic",title:L.localize(4,null),order:1},{menuId:S.MenuId.CommandPalette,group:"",title:L.localize(5,null),order:1}]}))}),define(ie[190],ne([1,0,613,54,20,51,16,33,506,75,207,208,249,11,5,21,15,120,7]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const d=0;class r extends _.EditorCommand{runEditorCommand(O,T,N){const P=T._getViewModel();P&&this.runCoreEditorCommand(P,N||{})}}e.CoreEditorCommand=r;var l;(function(A){const O=function(N){if(!y.isObject(N))return!1;const P=N;return!(!y.isString(P.to)||!y.isUndefined(P.by)&&!y.isString(P.by)||!y.isUndefined(P.value)&&!y.isNumber(P.value)||!y.isUndefined(P.revealCursor)&&!y.isBoolean(P.revealCursor))};A.metadata={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:O,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"}}}}]},A.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},A.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function T(N){let P;switch(N.to){case A.RawDirection.Up:P=1;break;case A.RawDirection.Right:P=2;break;case A.RawDirection.Down:P=3;break;case A.RawDirection.Left:P=4;break;default:return null}let x;switch(N.by){case A.RawUnit.Line:x=1;break;case A.RawUnit.WrappedLine:x=2;break;case A.RawUnit.Page:x=3;break;case A.RawUnit.HalfPage:x=4;break;case A.RawUnit.Editor:x=5;break;case A.RawUnit.Column:x=6;break;default:x=2}const R=Math.floor(N.value||1),B=!!N.revealCursor;return{direction:P,unit:x,value:R,revealCursor:B,select:!!N.select}}A.parse=T})(l||(e.EditorScroll_=l={}));var s;(function(A){const O=function(T){if(!y.isObject(T))return!1;const N=T;return!(!y.isNumber(N.lineNumber)&&!y.isString(N.lineNumber)||!y.isUndefined(N.at)&&!y.isString(N.at))};A.metadata={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:O,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},A.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(s||(e.RevealLine_=s={}));class g{constructor(O){O.addImplementation(1e4,"code-editor",(T,N)=>{const P=T.get(p.ICodeEditorService).getFocusedCodeEditor();return P&&P.hasTextFocus()?this._runEditorCommand(T,P,N):!1}),O.addImplementation(1e3,"generic-dom-input-textarea",(T,N)=>{const P=(0,c.getActiveElement)();return P&&["input","textarea"].indexOf(P.tagName.toLowerCase())>=0?(this.runDOMCommand(P),!0):!1}),O.addImplementation(0,"generic-dom",(T,N)=>{const P=T.get(p.ICodeEditorService).getActiveCodeEditor();return P?(P.focus(),this._runEditorCommand(T,P,N)):!1})}_runEditorCommand(O,T,N){const P=this.runEditorCommand(O,T,N);return P||!0}}var h;(function(A){class O extends r{constructor(G){super(G),this._inSelectionMode=G.inSelectionMode}runCoreEditorCommand(G,de){if(!de.position)return;G.model.pushStackElement(),G.setCursorStates(de.source,3,[o.CursorMoveCommands.moveTo(G,G.getPrimaryCursorState(),this._inSelectionMode,de.position,de.viewPosition)])&&de.revealType!==2&&G.revealPrimaryCursor(de.source,!0,!0)}}A.MoveTo=(0,_.registerEditorCommand)(new O({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),A.MoveToSelect=(0,_.registerEditorCommand)(new O({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class T extends r{runCoreEditorCommand(G,de){G.model.pushStackElement();const ue=this._getColumnSelectResult(G,G.getPrimaryCursorState(),G.getCursorColumnSelectData(),de);ue!==null&&(G.setCursorStates(de.source,3,ue.viewStates.map(X=>v.CursorState.fromViewState(X))),G.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ue.fromLineNumber,fromViewVisualColumn:ue.fromVisualColumn,toViewLineNumber:ue.toLineNumber,toViewVisualColumn:ue.toVisualColumn}),ue.reversed?G.revealTopMostCursor(de.source):G.revealBottomMostCursor(de.source))}}A.ColumnSelect=(0,_.registerEditorCommand)(new class extends T{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(te,G,de,ue){if(typeof ue.position>"u"||typeof ue.viewPosition>"u"||typeof ue.mouseColumn>"u")return null;const X=te.model.validatePosition(ue.position),Z=te.coordinatesConverter.validateViewPosition(new n.Position(ue.viewPosition.lineNumber,ue.viewPosition.column),X),re=ue.doColumnSelect?de.fromViewLineNumber:Z.lineNumber,oe=ue.doColumnSelect?de.fromViewVisualColumn:ue.mouseColumn-1;return S.ColumnSelection.columnSelect(te.cursorConfig,te,re,oe,Z.lineNumber,ue.mouseColumn-1)}}),A.CursorColumnSelectLeft=(0,_.registerEditorCommand)(new class extends T{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(te,G,de,ue){return S.ColumnSelection.columnSelectLeft(te.cursorConfig,te,de)}}),A.CursorColumnSelectRight=(0,_.registerEditorCommand)(new class extends T{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(te,G,de,ue){return S.ColumnSelection.columnSelectRight(te.cursorConfig,te,de)}});class N extends T{constructor(G){super(G),this._isPaged=G.isPaged}_getColumnSelectResult(G,de,ue,X){return S.ColumnSelection.columnSelectUp(G.cursorConfig,G,ue,this._isPaged)}}A.CursorColumnSelectUp=(0,_.registerEditorCommand)(new N({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),A.CursorColumnSelectPageUp=(0,_.registerEditorCommand)(new N({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class P extends T{constructor(G){super(G),this._isPaged=G.isPaged}_getColumnSelectResult(G,de,ue,X){return S.ColumnSelection.columnSelectDown(G.cursorConfig,G,ue,this._isPaged)}}A.CursorColumnSelectDown=(0,_.registerEditorCommand)(new P({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),A.CursorColumnSelectPageDown=(0,_.registerEditorCommand)(new P({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class x extends r{constructor(){super({id:"cursorMove",precondition:void 0,metadata:o.CursorMove.metadata})}runCoreEditorCommand(G,de){const ue=o.CursorMove.parse(de);ue&&this._runCursorMove(G,de.source,ue)}_runCursorMove(G,de,ue){G.model.pushStackElement(),G.setCursorStates(de,3,x._move(G,G.getCursorStates(),ue)),G.revealPrimaryCursor(de,!0)}static _move(G,de,ue){const X=ue.select,Z=ue.value;switch(ue.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return o.CursorMoveCommands.simpleMove(G,de,ue.direction,X,Z,ue.unit);case 11:case 13:case 12:case 14:return o.CursorMoveCommands.viewportMove(G,de,ue.direction,X,Z);default:return null}}}A.CursorMoveImpl=x,A.CursorMove=(0,_.registerEditorCommand)(new x);class R extends r{constructor(G){super(G),this._staticArgs=G.args}runCoreEditorCommand(G,de){let ue=this._staticArgs;this._staticArgs.value===-1&&(ue={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:de.pageSize||G.cursorConfig.pageSize}),G.model.pushStackElement(),G.setCursorStates(de.source,3,o.CursorMoveCommands.simpleMove(G,G.getCursorStates(),ue.direction,ue.select,ue.value,ue.unit)),G.revealPrimaryCursor(de.source,!0)}}A.CursorLeft=(0,_.registerEditorCommand)(new R({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),A.CursorLeftSelect=(0,_.registerEditorCommand)(new R({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1039}})),A.CursorRight=(0,_.registerEditorCommand)(new R({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),A.CursorRightSelect=(0,_.registerEditorCommand)(new R({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1041}})),A.CursorUp=(0,_.registerEditorCommand)(new R({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),A.CursorUpSelect=(0,_.registerEditorCommand)(new R({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),A.CursorPageUp=(0,_.registerEditorCommand)(new R({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:11}})),A.CursorPageUpSelect=(0,_.registerEditorCommand)(new R({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1035}})),A.CursorDown=(0,_.registerEditorCommand)(new R({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),A.CursorDownSelect=(0,_.registerEditorCommand)(new R({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),A.CursorPageDown=(0,_.registerEditorCommand)(new R({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:12}})),A.CursorPageDownSelect=(0,_.registerEditorCommand)(new R({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1036}})),A.CreateCursor=(0,_.registerEditorCommand)(new class extends r{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(te,G){if(!G.position)return;let de;G.wholeLine?de=o.CursorMoveCommands.line(te,te.getPrimaryCursorState(),!1,G.position,G.viewPosition):de=o.CursorMoveCommands.moveTo(te,te.getPrimaryCursorState(),!1,G.position,G.viewPosition);const ue=te.getCursorStates();if(ue.length>1){const X=de.modelState?de.modelState.position:null,Z=de.viewState?de.viewState.position:null;for(let re=0,oe=ue.length;reZ&&(X=Z);const re=new t.Range(X,1,X,te.model.getLineMaxColumn(X));let oe=0;if(de.at)switch(de.at){case s.RawAtArgument.Top:oe=3;break;case s.RawAtArgument.Center:oe=1;break;case s.RawAtArgument.Bottom:oe=4;break;default:break}const Y=te.coordinatesConverter.convertModelRangeToViewRange(re);te.revealRange(G.source,!1,Y,oe,0)}}),A.SelectAll=new class extends g{constructor(){super(_.SelectAllCommand)}runDOMCommand(te){k.isFirefox&&(te.focus(),te.select()),te.ownerDocument.execCommand("selectAll")}runEditorCommand(te,G,de){const ue=G._getViewModel();ue&&this.runCoreEditorCommand(ue,de)}runCoreEditorCommand(te,G){te.model.pushStackElement(),te.setCursorStates("keyboard",3,[o.CursorMoveCommands.selectAll(te,te.getPrimaryCursorState())])}},A.SetSelection=(0,_.registerEditorCommand)(new class extends r{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(te,G){G.selection&&(te.model.pushStackElement(),te.setCursorStates(G.source,3,[v.CursorState.fromModelSelection(G.selection)]))}})})(h||(e.CoreNavigationCommands=h={}));const m=u.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,a.EditorContextKeys.columnSelection);function C(A,O){f.KeybindingsRegistry.registerKeybindingRule({id:A,primary:O,when:m,weight:d+1})}C(h.CursorColumnSelectLeft.id,1039),C(h.CursorColumnSelectRight.id,1041),C(h.CursorColumnSelectUp.id,1040),C(h.CursorColumnSelectPageUp.id,1035),C(h.CursorColumnSelectDown.id,1042),C(h.CursorColumnSelectPageDown.id,1036);function w(A){return A.register(),A}var D;(function(A){class O extends _.EditorCommand{runEditorCommand(N,P,x){const R=P._getViewModel();R&&this.runCoreEditingCommand(P,R,x||{})}}A.CoreEditingCommand=O,A.LineBreakInsert=(0,_.registerEditorCommand)(new class extends O{constructor(){super({id:"lineBreakInsert",precondition:a.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(T,N,P){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.lineBreakInsert(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection)))}}),A.Outdent=(0,_.registerEditorCommand)(new class extends O{constructor(){super({id:"outdent",precondition:a.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:u.ContextKeyExpr.and(a.EditorContextKeys.editorTextFocus,a.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(T,N,P){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.outdent(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection))),T.pushUndoStop()}}),A.Tab=(0,_.registerEditorCommand)(new class extends O{constructor(){super({id:"tab",precondition:a.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:u.ContextKeyExpr.and(a.EditorContextKeys.editorTextFocus,a.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(T,N,P){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.tab(N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection))),T.pushUndoStop()}}),A.DeleteLeft=(0,_.registerEditorCommand)(new class extends O{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(T,N,P){const[x,R]=b.DeleteOperations.deleteLeft(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(B=>B.modelState.selection),N.getCursorAutoClosedCharacters());x&&T.pushUndoStop(),T.executeCommands(this.id,R),N.setPrevEditOperationType(2)}}),A.DeleteRight=(0,_.registerEditorCommand)(new class extends O{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:d,kbExpr:a.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(T,N,P){const[x,R]=b.DeleteOperations.deleteRight(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(B=>B.modelState.selection));x&&T.pushUndoStop(),T.executeCommands(this.id,R),N.setPrevEditOperationType(3)}}),A.Undo=new class extends g{constructor(){super(_.UndoCommand)}runDOMCommand(T){T.ownerDocument.execCommand("undo")}runEditorCommand(T,N,P){if(!(!N.hasModel()||N.getOption(90)===!0))return N.getModel().undo()}},A.Redo=new class extends g{constructor(){super(_.RedoCommand)}runDOMCommand(T){T.ownerDocument.execCommand("redo")}runEditorCommand(T,N,P){if(!(!N.hasModel()||N.getOption(90)===!0))return N.getModel().redo()}}})(D||(e.CoreEditingCommands=D={}));class I extends _.Command{constructor(O,T,N){super({id:O,precondition:void 0,metadata:N}),this._handlerId=T}runCommand(O,T){const N=O.get(p.ICodeEditorService).getFocusedCodeEditor();N&&N.trigger("keyboard",this._handlerId,T)}}function M(A,O){w(new I("default:"+A,A)),w(new I(A,A,O))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")}),define(ie[800],ne([1,0,237,16]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let y=class{constructor(_,p){}dispose(){}};e.MarkerDecorationsContribution=y,y.ID="editor.contrib.markerDecorations",e.MarkerDecorationsContribution=y=Ee([he(1,L.IMarkerDecorationsService)],y),(0,k.registerEditorContribution)(y.ID,y,0)}),define(ie[801],ne([1,0,190,11,17]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class E{constructor(p,S,v,b){this.configuration=p,this.viewModel=S,this.userInputEvents=v,this.commandDelegate=b}paste(p,S,v,b){this.commandDelegate.paste(p,S,v,b)}type(p){this.commandDelegate.type(p)}compositionType(p,S,v,b){this.commandDelegate.compositionType(p,S,v,b)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(p){L.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:p})}_validateViewColumn(p){const S=this.viewModel.getLineMinColumn(p.lineNumber);return p.column=4?this._selectAll():p.mouseDownCount===3?this._hasMulticursorModifier(p)?p.inSelectionMode?this._lastCursorLineSelectDrag(p.position,p.revealType):this._lastCursorLineSelect(p.position,p.revealType):p.inSelectionMode?this._lineSelectDrag(p.position,p.revealType):this._lineSelect(p.position,p.revealType):p.mouseDownCount===2?p.onInjectedText||(this._hasMulticursorModifier(p)?this._lastCursorWordSelect(p.position,p.revealType):p.inSelectionMode?this._wordSelectDrag(p.position,p.revealType):this._wordSelect(p.position,p.revealType)):this._hasMulticursorModifier(p)?this._hasNonMulticursorModifier(p)||(p.shiftKey?this._columnSelect(p.position,p.mouseColumn,!0):p.inSelectionMode?this._lastCursorMoveToSelect(p.position,p.revealType):this._createCursor(p.position,!1)):p.inSelectionMode?p.altKey?this._columnSelect(p.position,p.mouseColumn,!0):b?this._columnSelect(p.position,p.mouseColumn,!0):this._moveToSelect(p.position,p.revealType):this.moveTo(p.position,p.revealType)}_usualArgs(p,S){return p=this._validateViewColumn(p),{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,revealType:S}}moveTo(p,S){L.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_moveToSelect(p,S){L.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_columnSelect(p,S,v){p=this._validateViewColumn(p),L.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,mouseColumn:S,doColumnSelect:v})}_createCursor(p,S){p=this._validateViewColumn(p),L.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,wholeLine:S})}_lastCursorMoveToSelect(p,S){L.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_wordSelect(p,S){L.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_wordSelectDrag(p,S){L.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_lastCursorWordSelect(p,S){L.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_lineSelect(p,S){L.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_lineSelectDrag(p,S){L.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_lastCursorLineSelect(p,S){L.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_lastCursorLineSelectDrag(p,S){L.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,S))}_selectAll(){L.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(p){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(p)}emitKeyDown(p){this.userInputEvents.emitKeyDown(p)}emitKeyUp(p){this.userInputEvents.emitKeyUp(p)}emitContextMenu(p){this.userInputEvents.emitContextMenu(p)}emitMouseMove(p){this.userInputEvents.emitMouseMove(p)}emitMouseLeave(p){this.userInputEvents.emitMouseLeave(p)}emitMouseUp(p){this.userInputEvents.emitMouseUp(p)}emitMouseDown(p){this.userInputEvents.emitMouseDown(p)}emitMouseDrag(p){this.userInputEvents.emitMouseDrag(p)}emitMouseDrop(p){this.userInputEvents.emitMouseDrop(p)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(p){this.userInputEvents.emitMouseWheel(p)}}e.ViewController=E}),define(ie[802],ne([1,0,6,61,62,110,118,80]),function(Q,e,L,k,y,E,_,p){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let v=S=class{constructor(o,i,n){this.editorWorkerService=i,this.telemetryService=n,this.onDidChangeEventEmitter=new L.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(o)}dispose(){var o;(o=this.diffAlgorithmOnDidChangeSubscription)===null||o===void 0||o.dispose()}async computeDiff(o,i,n,t){var a,u;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(o,i,n,t);if(o.getLineCount()===1&&o.getLineMaxColumn(1)===1)return i.getLineCount()===1&&i.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new E.DetailedLineRangeMapping(new y.LineRange(1,2),new y.LineRange(1,i.getLineCount()+1),[new E.RangeMapping(o.getFullModelRange(),i.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const f=JSON.stringify([o.uri.toString(),i.uri.toString()]),c=JSON.stringify([o.id,i.id,o.getAlternativeVersionId(),i.getAlternativeVersionId(),JSON.stringify(n)]),d=S.diffCache.get(f);if(d&&d.context===c)return d.result;const r=k.StopWatch.create(),l=await this.editorWorkerService.computeDiff(o.uri,i.uri,n,this.diffAlgorithm),s=r.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:s,timedOut:(a=l?.quitEarly)!==null&&a!==void 0?a:!0,detectedMoves:n.computeMoves?(u=l?.moves.length)!==null&&u!==void 0?u:0:-1}),t.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!l)throw new Error("no diff result available");return S.diffCache.size>10&&S.diffCache.delete(S.diffCache.keys().next().value),S.diffCache.set(f,{result:l,context:c}),l}setOptions(o){var i;let n=!1;o.diffAlgorithm&&this.diffAlgorithm!==o.diffAlgorithm&&((i=this.diffAlgorithmOnDidChangeSubscription)===null||i===void 0||i.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=o.diffAlgorithm,typeof o.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=o.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=v,v.diffCache=new Map,e.WorkerBasedDocumentDiffProvider=v=S=Ee([he(1,_.IEditorWorkerService),he(2,p.ITelemetryService)],v)}),define(ie[803],ne([1,0,802,46,8]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffProviderFactoryService=e.IDiffProviderFactoryService=void 0,e.IDiffProviderFactoryService=(0,y.createDecorator)("diffProviderFactoryService");let E=class{constructor(p){this.instantiationService=p}createDiffProvider(p){return this.instantiationService.createInstance(L.WorkerBasedDocumentDiffProvider,p)}};e.DiffProviderFactoryService=E,e.DiffProviderFactoryService=E=Ee([he(0,y.IInstantiationService)],E),(0,k.registerSingleton)(e.IDiffProviderFactoryService,E,1)}),define(ie[356],ne([1,0,14,19,2,35,803,90,62,283,110,180,285,281]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;let t=class extends y.Disposable{setActiveMovedText(g){this._activeMovedText.set(g,void 0)}constructor(g,h,m){super(),this.model=g,this._options=h,this._diffProviderFactoryService=m,this._isDiffUpToDate=(0,E.observableValue)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,E.observableValue)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,E.observableValue)(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=(0,E.derived)(this,I=>this._options.hideUnchangedRegions.read(I)?this._unchangedRegions.read(I).regions:((0,E.transaction)(M=>{for(const A of this._unchangedRegions.get().regions)A.collapseAll(M)}),[])),this.movedTextToCompare=(0,E.observableValue)(this,void 0),this._activeMovedText=(0,E.observableValue)(this,void 0),this._hoveredMovedText=(0,E.observableValue)(this,void 0),this.activeMovedText=(0,E.derived)(this,I=>{var M,A;return(A=(M=this.movedTextToCompare.read(I))!==null&&M!==void 0?M:this._hoveredMovedText.read(I))!==null&&A!==void 0?A:this._activeMovedText.read(I)}),this._cancellationTokenSource=new k.CancellationTokenSource,this._diffProvider=(0,E.derived)(this,I=>{const M=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(I)}),A=(0,E.observableSignalFromEvent)("onDidChange",M.onDidChange);return{diffProvider:M,onChangeSignal:A}}),this._register((0,y.toDisposable)(()=>this._cancellationTokenSource.cancel()));const C=(0,E.observableSignal)("contentChangedSignal"),w=this._register(new L.RunOnceScheduler(()=>C.trigger(void 0),200)),D=(I,M,A)=>{const O=d.fromDiffs(I.changes,g.original.getLineCount(),g.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(A),this._options.hideUnchangedRegionsContextLineCount.read(A)),T=this._unchangedRegions.get(),N=T.originalDecorationIds.map(B=>g.original.getDecorationRange(B)).map(B=>B?S.LineRange.fromRange(B):void 0),P=T.modifiedDecorationIds.map(B=>g.modified.getDecorationRange(B)).map(B=>B?S.LineRange.fromRange(B):void 0),x=g.original.deltaDecorations(T.originalDecorationIds,O.map(B=>({range:B.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),R=g.modified.deltaDecorations(T.modifiedDecorationIds,O.map(B=>({range:B.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const B of O)for(let W=0;W{if(this._diff.get()){const A=o.TextEditInfo.fromModelContentChanges(I.changes),O=(this._lastDiff,g.original,g.modified,void 0);O&&(this._lastDiff=O,(0,E.transaction)(T=>{this._diff.set(f.fromDiffResult(this._lastDiff),T),D(O,T);const N=this.movedTextToCompare.get();this.movedTextToCompare.set(N?this._lastDiff.moves.find(P=>P.lineRangeMapping.modified.intersect(N.lineRangeMapping.modified)):void 0,T)}))}this._isDiffUpToDate.set(!1,void 0),w.schedule()})),this._register(g.original.onDidChangeContent(I=>{if(this._diff.get()){const A=o.TextEditInfo.fromModelContentChanges(I.changes),O=(this._lastDiff,g.original,g.modified,void 0);O&&(this._lastDiff=O,(0,E.transaction)(T=>{this._diff.set(f.fromDiffResult(this._lastDiff),T),D(O,T);const N=this.movedTextToCompare.get();this.movedTextToCompare.set(N?this._lastDiff.moves.find(P=>P.lineRangeMapping.modified.intersect(N.lineRangeMapping.modified)):void 0,T)}))}this._isDiffUpToDate.set(!1,void 0),w.schedule()})),this._register((0,E.autorunWithStore)(async(I,M)=>{var A,O;this._options.hideUnchangedRegionsMinimumLineCount.read(I),this._options.hideUnchangedRegionsContextLineCount.read(I),w.cancel(),C.read(I);const T=this._diffProvider.read(I);T.onChangeSignal.read(I),(0,p.readHotReloadableExport)(v.DefaultLinesDiffComputer,I),(0,p.readHotReloadableExport)(n.optimizeSequenceDiffs,I),this._isDiffUpToDate.set(!1,void 0);let N=[];M.add(g.original.onDidChangeContent(R=>{const B=o.TextEditInfo.fromModelContentChanges(R.changes);N=(0,i.combineTextEditInfos)(N,B)}));let P=[];M.add(g.modified.onDidChangeContent(R=>{const B=o.TextEditInfo.fromModelContentChanges(R.changes);P=(0,i.combineTextEditInfos)(P,B)}));let x=await T.diffProvider.computeDiff(g.original,g.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(I),maxComputationTimeMs:this._options.maxComputationTimeMs.read(I),computeMoves:this._options.showMoves.read(I)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(x=a(x,g.original,g.modified),x=(A=(g.original,g.modified,void 0))!==null&&A!==void 0?A:x,x=(O=(g.original,g.modified,void 0))!==null&&O!==void 0?O:x,(0,E.transaction)(R=>{D(x,R),this._lastDiff=x;const B=f.fromDiffResult(x);this._diff.set(B,R),this._isDiffUpToDate.set(!0,R);const W=this.movedTextToCompare.get();this.movedTextToCompare.set(W?this._lastDiff.moves.find(V=>V.lineRangeMapping.modified.intersect(W.lineRangeMapping.modified)):void 0,R)}))}))}ensureModifiedLineIsVisible(g,h){var m;if(((m=this.diff.get())===null||m===void 0?void 0:m.mappings.length)===0)return;const C=this._unchangedRegions.get().regions;for(const w of C)if(w.getHiddenModifiedRange(void 0).contains(g)){w.showModifiedLine(g,h);return}}ensureOriginalLineIsVisible(g,h){var m;if(((m=this.diff.get())===null||m===void 0?void 0:m.mappings.length)===0)return;const C=this._unchangedRegions.get().regions;for(const w of C)if(w.getHiddenOriginalRange(void 0).contains(g)){w.showOriginalLine(g,h);return}}async waitForDiff(){await(0,E.waitForState)(this.isDiffUpToDate,g=>g)}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(h=>({range:h.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(g){const h=g.collapsedRegions.map(C=>S.LineRange.deserialize(C.range)),m=this._unchangedRegions.get();(0,E.transaction)(C=>{for(const w of m.regions)for(const D of h)if(w.modifiedUnchangedRange.intersect(D)){w.setHiddenModifiedRange(D,C);break}})}};e.DiffEditorViewModel=t,e.DiffEditorViewModel=t=Ee([he(2,_.IDiffProviderFactoryService)],t);function a(s,g,h){return{changes:s.changes.map(m=>new b.DetailedLineRangeMapping(m.original,m.modified,m.innerChanges?m.innerChanges.map(C=>u(C,g,h)):void 0)),moves:s.moves,identical:s.identical,quitEarly:s.quitEarly}}function u(s,g,h){let m=s.originalRange,C=s.modifiedRange;return(m.endColumn!==1||C.endColumn!==1)&&m.endColumn===g.getLineMaxColumn(m.endLineNumber)&&C.endColumn===h.getLineMaxColumn(C.endLineNumber)&&m.endLineNumbernew c(h)),g.moves||[],g.identical,g.quitEarly)}constructor(g,h,m,C){this.mappings=g,this.movedTexts=h,this.identical=m,this.quitEarly=C}}e.DiffState=f;class c{constructor(g){this.lineRangeMapping=g}}e.DiffMapping=c;class d{static fromDiffs(g,h,m,C,w){const D=b.DetailedLineRangeMapping.inverse(g,h,m),I=[];for(const M of D){let A=M.original.startLineNumber,O=M.modified.startLineNumber,T=M.original.length;const N=A===1&&O===1,P=A+T===h+1&&O+T===m+1;(N||P)&&T>=w+C?(N&&!P&&(T-=w),P&&!N&&(A+=w,O+=w,T-=w),I.push(new d(A,O,T,0,0))):T>=w*2+C&&(A+=w,O+=w,T-=w*2,I.push(new d(A,O,T,0,0)))}return I}get originalUnchangedRange(){return S.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return S.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(g,h,m,C,w){this.originalLineNumber=g,this.modifiedLineNumber=h,this.lineCount=m,this._visibleLineCountTop=(0,E.observableValue)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,E.observableValue)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,E.derived)(this,D=>this.visibleLineCountTop.read(D)+this.visibleLineCountBottom.read(D)===this.lineCount&&!this.isDragged.read(D)),this.isDragged=(0,E.observableValue)(this,void 0),this._visibleLineCountTop.set(C,void 0),this._visibleLineCountBottom.set(w,void 0)}shouldHideControls(g){return this._shouldHideControls.read(g)}getHiddenOriginalRange(g){return S.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(g),this.lineCount-this._visibleLineCountTop.read(g)-this._visibleLineCountBottom.read(g))}getHiddenModifiedRange(g){return S.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(g),this.lineCount-this._visibleLineCountTop.read(g)-this._visibleLineCountBottom.read(g))}setHiddenModifiedRange(g,h){const m=g.startLineNumber-this.modifiedLineNumber,C=this.modifiedLineNumber+this.lineCount-g.endLineNumberExclusive;this.setState(m,C,h)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(g=10,h){const m=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+g,m),h)}showMoreBelow(g=10,h){const m=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+g,m),h)}showAll(g){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),g)}showModifiedLine(g,h){const m=g+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),C=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-g;mthis.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const f=this.editor.getPosition();this.editor.changeDecorations(c=>{this.decorationId&&c.removeDecoration(this.decorationId),this.decorationId=c.addDecoration(_.Selection.fromPositions(f,f),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,S.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,L.alert)((0,S.localize)(1,null,f.lineNumber,f.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const f=this.editor.getModel().getDecorationRange(this.decorationId);f&&this.editor.setPosition(f.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const f=this.editor.getModel().getDecorationRange(this.decorationId);if(f){const c=this.editor.getPosition();this.editor.setSelection(_.Selection.fromPositions(f.getStartPosition(),c)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const f=this.decorationId;this.editor.changeDecorations(c=>{c.removeDecoration(f),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};o.ID="editor.contrib.selectionAnchorController",o=b=Ee([he(1,v.IContextKeyService)],o);class i extends E.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,S.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2080),weight:100}})}async run(f,c){var d;(d=o.get(c))===null||d===void 0||d.setSelectionAnchor()}}class n extends E.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,S.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(f,c){var d;(d=o.get(c))===null||d===void 0||d.goToSelectionAnchor()}}class t extends E.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,S.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2089),weight:100}})}async run(f,c){var d;(d=o.get(c))===null||d===void 0||d.selectFromAnchorToCursor()}}class a extends E.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,S.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(f,c){var d;(d=o.get(c))===null||d===void 0||d.cancelSelectionAnchor()}}(0,E.registerEditorContribution)(o.ID,o,4),(0,E.registerEditorAction)(i),(0,E.registerEditorAction)(n),(0,E.registerEditorAction)(t),(0,E.registerEditorAction)(a)}),define(ie[805],ne([1,0,16,21,547,644]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends L.EditorAction{constructor(b,o){super(o),this.left=b}run(b,o){if(!o.hasModel())return;const i=[],n=o.getSelections();for(const t of n)i.push(new y.MoveCaretCommand(t,this.left));o.pushUndoStop(),o.executeCommands(this.id,i),o.pushUndoStop()}}class p extends _{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:E.localize(0,null),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class S extends _{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:E.localize(1,null),alias:"Move Selected Text Right",precondition:k.EditorContextKeys.writable})}}(0,L.registerEditorAction)(p),(0,L.registerEditorAction)(S)}),define(ie[806],ne([1,0,16,127,206,5,21,645]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends L.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:p.localize(0,null),alias:"Transpose Letters",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(b,o){if(!o.hasModel())return;const i=o.getModel(),n=[],t=o.getSelections();for(const a of t){if(!a.isEmpty())continue;const u=a.startLineNumber,f=a.startColumn,c=i.getLineMaxColumn(u);if(u===1&&(f===1||f===2&&c===2))continue;const d=f===c?a.getPosition():y.MoveOperations.rightPosition(i,a.getPosition().lineNumber,a.getPosition().column),r=y.MoveOperations.leftPosition(i,d),l=y.MoveOperations.leftPosition(i,r),s=i.getValueInRange(E.Range.fromPositions(l,r)),g=i.getValueInRange(E.Range.fromPositions(r,d)),h=E.Range.fromPositions(l,d);n.push(new k.ReplaceCommand(h,g+s))}n.length>0&&(o.pushUndoStop(),o.executeCommands(this.id,n),o.pushUndoStop())}}(0,L.registerEditorAction)(S)}),define(ie[807],ne([1,0,54,7,17,188,16,33,21,646,29,103,15]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const n="9_cutcopypaste",t=y.isNative||document.queryCommandSupported("cut"),a=y.isNative||document.queryCommandSupported("copy"),u=typeof navigator.clipboard>"u"||L.isFirefox?document.queryCommandSupported("paste"):!0;function f(r){return r.register(),r}e.CutAction=t?f(new _.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:y.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:b.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(0,null),order:1},{menuId:b.MenuId.EditorContext,group:n,title:v.localize(1,null),when:S.EditorContextKeys.writable,order:1},{menuId:b.MenuId.CommandPalette,group:"",title:v.localize(2,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:n,title:v.localize(3,null),when:S.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=a?f(new _.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:y.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:b.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(4,null),order:2},{menuId:b.MenuId.EditorContext,group:n,title:v.localize(5,null),order:2},{menuId:b.MenuId.CommandPalette,group:"",title:v.localize(6,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:n,title:v.localize(7,null),order:2}]})):void 0,b.MenuRegistry.appendMenuItem(b.MenuId.MenubarEditMenu,{submenu:b.MenuId.MenubarCopy,title:{value:v.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,{submenu:b.MenuId.EditorContextCopy,title:{value:v.localize(9,null),original:"Copy As"},group:n,order:3}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,{submenu:b.MenuId.EditorContextShare,title:{value:v.localize(10,null),original:"Share"},group:"11_share",order:-1,when:i.ContextKeyExpr.and(i.ContextKeyExpr.notEquals("resourceScheme","output"),S.EditorContextKeys.editorTextFocus)}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorTitleContext,{submenu:b.MenuId.EditorTitleContextShare,title:{value:v.localize(11,null),original:"Share"},group:"11_share",order:-1}),b.MenuRegistry.appendMenuItem(b.MenuId.ExplorerContext,{submenu:b.MenuId.ExplorerContextShare,title:{value:v.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=u?f(new _.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:y.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:v.localize(13,null),order:4},{menuId:b.MenuId.EditorContext,group:n,title:v.localize(14,null),when:S.EditorContextKeys.writable,order:4},{menuId:b.MenuId.CommandPalette,group:"",title:v.localize(15,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:n,title:v.localize(16,null),when:S.EditorContextKeys.writable,order:4}]})):void 0;class c extends _.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(l,s){!s.hasModel()||!s.getOption(37)&&s.getSelection().isEmpty()||(E.CopyOptions.forceCopyWithSyntaxHighlighting=!0,s.focus(),s.getContainerDomNode().ownerDocument.execCommand("copy"),E.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function d(r,l){r&&(r.addImplementation(1e4,"code-editor",(s,g)=>{const h=s.get(p.ICodeEditorService).getFocusedCodeEditor();if(h&&h.hasTextFocus()){const m=h.getOption(37),C=h.getSelection();return C&&C.isEmpty()&&!m||h.getContainerDomNode().ownerDocument.execCommand(l),!0}return!1}),r.addImplementation(0,"generic-dom",(s,g)=>((0,k.getActiveDocument)().execCommand(l),!0)))}d(e.CutAction,"cut"),d(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(r,l)=>{const s=r.get(p.ICodeEditorService),g=r.get(o.IClipboardService),h=s.getFocusedCodeEditor();return h&&h.hasTextFocus()?!h.getContainerDomNode().ownerDocument.execCommand("paste")&&y.isWeb?(async()=>{const C=await g.readText();if(C!==""){const w=E.InMemoryClipboardMetadataManager.INSTANCE.get(C);let D=!1,I=null,M=null;w&&(D=h.getOption(37)&&!!w.isFromEmptySelection,I=typeof w.multicursorText<"u"?w.multicursorText:null,M=w.mode),h.trigger("keyboard","paste",{text:C,pasteOnNewLine:D,multicursorText:I,mode:M})}})():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(r,l)=>((0,k.getActiveDocument)().execCommand("paste"),!0))),a&&(0,_.registerEditorAction)(c)}),define(ie[808],ne([1,0,65,16,5,21,32,298,549,656,29]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class o extends k.EditorAction{constructor(f,c){super(c),this._type=f}run(f,c){const d=f.get(_.ILanguageConfigurationService);if(!c.hasModel())return;const r=c.getModel(),l=[],s=r.getOptions(),g=c.getOption(23),h=c.getSelections().map((C,w)=>({selection:C,index:w,ignoreFirstLine:!1}));h.sort((C,w)=>y.Range.compareRangesUsingStarts(C.selection,w.selection));let m=h[0];for(let C=1;C{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeModelContent(n=>{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeCursorSelection(n=>{if(this._isCursorUndoRedo||!n.oldSelections||n.oldModelVersionId!==n.modelVersionId)return;const t=new _(n.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(t)||(this._undoStack.push(new p(t,i.getScrollTop(),i.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new p(new _(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 p(new _(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(i){this._isCursorUndoRedo=!0,this._editor.setSelections(i.cursorState.selections),this._editor.setScrollPosition({scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=S,S.ID="editor.contrib.cursorUndoRedoController";class v extends k.EditorAction{constructor(){super({id:"cursorUndo",label:E.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(i,n,t){var a;(a=S.get(n))===null||a===void 0||a.cursorUndo()}}e.CursorUndo=v;class b extends k.EditorAction{constructor(){super({id:"cursorRedo",label:E.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(i,n,t){var a;(a=S.get(n))===null||a===void 0||a.cursorRedo()}}e.CursorRedo=b,(0,k.registerEditorContribution)(S.ID,S,0),(0,k.registerEditorAction)(v),(0,k.registerEditorAction)(b)}),define(ie[810],ne([1,0,16,15,19,66,8,46,664]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const v=(0,_.createDecorator)("IEditorCancelService"),b=new k.RawContextKey("cancellableOperation",!1,(0,S.localize)(0,null));(0,p.registerSingleton)(v,class{constructor(){this._tokens=new WeakMap}add(i,n){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(u=>{const f=b.bindTo(u.get(k.IContextKeyService)),c=new E.LinkedList;return{key:f,tokens:c}}),this._tokens.set(i,t));let a;return t.key.set(!0),a=t.tokens.push(n),()=>{a&&(a(),t.key.set(!t.tokens.isEmpty()),a=void 0)}}cancel(i){const n=this._tokens.get(i);if(!n)return;const t=n.tokens.pop();t&&(t.cancel(),n.key.set(!n.tokens.isEmpty()))}},1);class o extends y.CancellationTokenSource{constructor(n,t){super(t),this.editor=n,this._unregister=n.invokeWithinContext(a=>a.get(v).add(n,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=o,(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:b})}runEditorCommand(i,n){i.get(v).cancel(n)}})}),define(ie[104],ne([1,0,12,5,19,2,810]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class p{constructor(o,i){if(this.flags=i,this.flags&1){const n=o.getModel();this.modelVersionId=n?L.format("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=o.getPosition():this.position=null,this.flags&2?this.selection=o.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=o.getScrollLeft(),this.scrollTop=o.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(o){if(!(o instanceof p))return!1;const i=o;return!(this.modelVersionId!==i.modelVersionId||this.scrollLeft!==i.scrollLeft||this.scrollTop!==i.scrollTop||!this.position&&i.position||this.position&&!i.position||this.position&&i.position&&!this.position.equals(i.position)||!this.selection&&i.selection||this.selection&&!i.selection||this.selection&&i.selection&&!this.selection.equalsRange(i.selection))}validate(o){return this._equals(new p(o,this.flags))}}e.EditorState=p;class S extends _.EditorKeybindingCancellationTokenSource{constructor(o,i,n,t){super(o,t),this._listener=new E.DisposableStore,i&4&&this._listener.add(o.onDidChangeCursorPosition(a=>{(!n||!k.Range.containsPosition(n,a.position))&&this.cancel()})),i&2&&this._listener.add(o.onDidChangeCursorSelection(a=>{(!n||!k.Range.containsRange(n,a.selection))&&this.cancel()})),i&8&&this._listener.add(o.onDidScrollChange(a=>this.cancel())),i&1&&(this._listener.add(o.onDidChangeModel(a=>this.cancel())),this._listener.add(o.onDidChangeModelContent(a=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=S;class v extends y.CancellationTokenSource{constructor(o,i){super(i),this._listener=o.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=v}),define(ie[138],ne([1,0,13,19,9,2,22,133,5,24,18,52,104,647,25,47,87,80,114]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyCodeAction=e.ApplyCodeActionReason=e.getCodeActions=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class d extends E.Disposable{static codeActionsPreferredComparator(I,M){return I.isPreferred&&!M.isPreferred?-1:!I.isPreferred&&M.isPreferred?1:0}static codeActionsComparator({action:I},{action:M}){return I.isAI&&!M.isAI?1:!I.isAI&&M.isAI?-1:(0,L.isNonEmptyArray)(I.diagnostics)?(0,L.isNonEmptyArray)(M.diagnostics)?d.codeActionsPreferredComparator(I,M):-1:(0,L.isNonEmptyArray)(M.diagnostics)?1:d.codeActionsPreferredComparator(I,M)}constructor(I,M,A){super(),this.documentation=M,this._register(A),this.allActions=[...I].sort(d.codeActionsComparator),this.validActions=this.allActions.filter(({action:O})=>!O.disabled)}get hasAutoFix(){return this.validActions.some(({action:I})=>!!I.kind&&c.CodeActionKind.QuickFix.contains(new c.CodeActionKind(I.kind))&&!!I.isPreferred)}get hasAIFix(){return this.validActions.some(({action:I})=>!!I.isAI)}get allAIFixes(){return this.validActions.every(({action:I})=>!!I.isAI)}}const r={actions:[],documentation:void 0};async function l(D,I,M,A,O,T){var N;const P=A.filter||{},x={...P,excludes:[...P.excludes||[],c.CodeActionKind.Notebook]},R={only:(N=P.include)===null||N===void 0?void 0:N.value,trigger:A.type},B=new i.TextModelCancellationTokenSource(I,T),W=A.type===2,V=s(D,I,W?x:P),U=new E.DisposableStore,F=V.map(async J=>{try{O.report(J);const le=await J.provideCodeActions(I,M,R,B.token);if(le&&U.add(le),B.token.isCancellationRequested)return r;const ee=(le?.actions||[]).filter(te=>te&&(0,c.filtersAction)(P,te)),$=h(J,ee,P.include);return{actions:ee.map(te=>new c.CodeActionItem(te,J)),documentation:$}}catch(le){if((0,y.isCancellationError)(le))throw le;return(0,y.onUnexpectedExternalError)(le),r}}),j=D.onDidChange(()=>{const J=D.all(I);(0,L.equals)(J,V)||B.cancel()});try{const J=await Promise.all(F),le=J.map($=>$.actions).flat(),ee=[...(0,L.coalesce)(J.map($=>$.documentation)),...g(D,I,A,le)];return new d(le,ee,U)}finally{j.dispose(),B.dispose()}}e.getCodeActions=l;function s(D,I,M){return D.all(I).filter(A=>A.providedCodeActionKinds?A.providedCodeActionKinds.some(O=>(0,c.mayIncludeActionsOfKind)(M,new c.CodeActionKind(O))):!0)}function*g(D,I,M,A){var O,T,N;if(I&&A.length)for(const P of D.all(I))P._getAdditionalMenuItems&&(yield*(O=P._getAdditionalMenuItems)===null||O===void 0?void 0:O.call(P,{trigger:M.type,only:(N=(T=M.filter)===null||T===void 0?void 0:T.include)===null||N===void 0?void 0:N.value},A.map(x=>x.action)))}function h(D,I,M){if(!D.documentation)return;const A=D.documentation.map(O=>({kind:new c.CodeActionKind(O.kind),command:O.command}));if(M){let O;for(const T of A)T.kind.contains(M)&&(O?O.kind.contains(T.kind)&&(O=T):O=T);if(O)return O?.command}for(const O of I)if(O.kind){for(const T of A)if(T.kind.contains(new c.CodeActionKind(O.kind)))return T.command}}var m;(function(D){D.OnSave="onSave",D.FromProblemsView="fromProblemsView",D.FromCodeActions="fromCodeActions"})(m||(e.ApplyCodeActionReason=m={}));async function C(D,I,M,A,O=k.CancellationToken.None){var T;const N=D.get(p.IBulkEditService),P=D.get(t.ICommandService),x=D.get(f.ITelemetryService),R=D.get(a.INotificationService);if(x.publicLog2("codeAction.applyCodeAction",{codeActionTitle:I.action.title,codeActionKind:I.action.kind,codeActionIsPreferred:!!I.action.isPreferred,reason:M}),await I.resolve(O),!O.isCancellationRequested&&!(!((T=I.action.edit)===null||T===void 0)&&T.edits.length&&!(await N.apply(I.action.edit,{editor:A?.editor,label:I.action.title,quotableLabel:I.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:M!==m.OnSave,showPreview:A?.preview})).isApplied)&&I.action.command)try{await P.executeCommand(I.action.command.id,...I.action.command.arguments||[])}catch(B){const W=w(B);R.error(typeof W=="string"?W:n.localize(0,null))}}e.applyCodeAction=C;function w(D){return typeof D=="string"?D:D instanceof Error&&typeof D.message=="string"?D.message:void 0}t.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(D,I,M,A,O){if(!(I instanceof _.URI))throw(0,y.illegalArgument)();const{codeActionProvider:T}=D.get(b.ILanguageFeaturesService),N=D.get(o.IModelService).getModel(I);if(!N)throw(0,y.illegalArgument)();const P=v.Selection.isISelection(M)?v.Selection.liftSelection(M):S.Range.isIRange(M)?N.validateRange(M):void 0;if(!P)throw(0,y.illegalArgument)();const x=typeof A=="string"?new c.CodeActionKind(A):void 0,R=await l(T,N,P,{type:1,triggerAction:c.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:x}},u.Progress.None,k.CancellationToken.None),B=[],W=Math.min(R.validActions.length,typeof O=="number"?O:0);for(let V=0;VV.action)}finally{setTimeout(()=>R.dispose(),100)}})}),define(ie[811],ne([1,0,99,138,114,34]),function(Q,e,L,k,y,E){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let p=_=class{constructor(v){this.keybindingService=v}getResolver(){const v=new L.Lazy(()=>this.keybindingService.getKeybindings().filter(b=>_.codeActionCommands.indexOf(b.command)>=0).filter(b=>b.resolvedKeybinding).map(b=>{let o=b.commandArgs;return b.command===k.organizeImportsCommandId?o={kind:y.CodeActionKind.SourceOrganizeImports.value}:b.command===k.fixAllCommandId&&(o={kind:y.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:b.resolvedKeybinding,...y.CodeActionCommandArgs.fromUser(o,{kind:y.CodeActionKind.None,apply:"never"})}}));return b=>{if(b.kind){const o=this.bestKeybindingForCodeAction(b,v.value);return o?.resolvedKeybinding}}}bestKeybindingForCodeAction(v,b){if(!v.kind)return;const o=new y.CodeActionKind(v.kind);return b.filter(i=>i.kind.contains(o)).filter(i=>i.preferred?v.isPreferred:!0).reduceRight((i,n)=>i?i.kind.contains(n.kind)?n:i:n,void 0)}};e.CodeActionKeybindingResolver=p,p.codeActionCommands=[k.refactorCommandId,k.codeActionCommandId,k.sourceActionCommandId,k.organizeImportsCommandId,k.fixAllCommandId],e.CodeActionKeybindingResolver=p=_=Ee([he(0,E.IKeybindingService)],p)}),define(ie[357],ne([1,0,14,9,6,2,45,36,11,24,15,87,114,138]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new b.RawContextKey("supportedCodeAction","");class t extends E.Disposable{constructor(d,r,l,s=250){super(),this._editor=d,this._markerService=r,this._signalChange=l,this._delay=s,this._autoTriggerTimer=this._register(new L.TimeoutTimer),this._register(this._markerService.onMarkerChanged(g=>this._onMarkerChanges(g))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(d){const r=this._getRangeOfSelectionUnlessWhitespaceEnclosed(d);this._signalChange(r?{trigger:d,selection:r}:void 0)}_onMarkerChanges(d){const r=this._editor.getModel();r&&d.some(l=>(0,_.isEqual)(l,r.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:i.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(d){var r;if(!this._editor.hasModel())return;const l=this._editor.getModel(),s=this._editor.getSelection();if(s.isEmpty()&&d.type===2){const{lineNumber:g,column:h}=s.getPosition(),m=l.getLineContent(g);if(m.length===0){if(!(((r=this._editor.getOption(64).experimental)===null||r===void 0?void 0:r.showAiIcon)===p.ShowAiIconMode.On))return}else if(h===1){if(/\s/.test(m[0]))return}else if(h===l.getLineMaxColumn(g)){if(/\s/.test(m[m.length-1]))return}else if(/\s/.test(m[h-2])&&/\s/.test(m[h-1]))return}return s}}var a;(function(c){c.Empty={type:0};class d{constructor(l,s,g){this.trigger=l,this.position=s,this._cancellablePromise=g,this.type=1,this.actions=g.catch(h=>{if((0,k.isCancellationError)(h))return u;throw h})}cancel(){this._cancellablePromise.cancel()}}c.Triggered=d})(a||(e.CodeActionsState=a={}));const u=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class f extends E.Disposable{constructor(d,r,l,s,g,h){super(),this._editor=d,this._registry=r,this._markerService=l,this._progressService=g,this._configurationService=h,this._codeActionOracle=this._register(new E.MutableDisposable),this._state=a.Empty,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(s),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(a.Empty,!0))}_settingEnabledNearbyQuickfixes(){var d;const r=(d=this._editor)===null||d===void 0?void 0:d.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:r?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(a.Empty);const d=this._editor.getModel();if(d&&this._registry.has(d)&&!this._editor.getOption(90)){const r=this._registry.all(d).flatMap(l=>{var s;return(s=l.providedCodeActionKinds)!==null&&s!==void 0?s:[]});this._supportedCodeActions.set(r.join(" ")),this._codeActionOracle.value=new t(this._editor,this._markerService,l=>{var s;if(!l){this.setState(a.Empty);return}const g=l.selection.getStartPosition(),h=(0,L.createCancelablePromise)(async m=>{var C,w,D,I,M,A;if(this._settingEnabledNearbyQuickfixes()&&l.trigger.type===1&&(l.trigger.triggerAction===i.CodeActionTriggerSource.QuickFix||!((w=(C=l.trigger.filter)===null||C===void 0?void 0:C.include)===null||w===void 0)&&w.contains(i.CodeActionKind.QuickFix))){const O=await(0,n.getCodeActions)(this._registry,d,l.selection,l.trigger,o.Progress.None,m),T=[...O.allActions];if(m.isCancellationRequested)return u;if(!((D=O.validActions)===null||D===void 0?void 0:D.some(P=>P.action.kind?i.CodeActionKind.QuickFix.contains(new i.CodeActionKind(P.action.kind)):!1))){const P=this._markerService.read({resource:d.uri});if(P.length>0){const x=l.selection.getPosition();let R=x,B=Number.MAX_VALUE;const W=[...O.validActions];for(const U of P){const F=U.endColumn,j=U.endLineNumber,J=U.startLineNumber;if(j===x.lineNumber||J===x.lineNumber){R=new S.Position(j,F);const le={type:l.trigger.type,triggerAction:l.trigger.triggerAction,filter:{include:!((I=l.trigger.filter)===null||I===void 0)&&I.include?(M=l.trigger.filter)===null||M===void 0?void 0:M.include:i.CodeActionKind.QuickFix},autoApply:l.trigger.autoApply,context:{notAvailableMessage:((A=l.trigger.context)===null||A===void 0?void 0:A.notAvailableMessage)||"",position:R}},ee=new v.Selection(R.lineNumber,R.column,R.lineNumber,R.column),$=await(0,n.getCodeActions)(this._registry,d,ee,le,o.Progress.None,m);if($.validActions.length!==0){for(const te of $.validActions)te.highlightRange=te.action.isPreferred;O.allActions.length===0&&T.push(...$.allActions),Math.abs(x.column-F)j.findIndex(J=>J.action.title===U.action.title)===F);return V.sort((U,F)=>U.action.isPreferred&&!F.action.isPreferred?-1:!U.action.isPreferred&&F.action.isPreferred||U.action.isAI&&!F.action.isAI?1:!U.action.isAI&&F.action.isAI?-1:0),{validActions:V,allActions:T,documentation:O.documentation,hasAutoFix:O.hasAutoFix,hasAIFix:O.hasAIFix,allAIFixes:O.allAIFixes,dispose:()=>{O.dispose()}}}}}return(0,n.getCodeActions)(this._registry,d,l.selection,l.trigger,o.Progress.None,m)});l.trigger.type===1&&((s=this._progressService)===null||s===void 0||s.showWhile(h,250)),this.setState(new a.Triggered(l.trigger,g,h))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:i.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(d){var r;(r=this._codeActionOracle.value)===null||r===void 0||r.trigger(d)}setState(d,r){d!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=d,!r&&!this._disposed&&this._onDidChangeState.fire(d))}}e.CodeActionModel=f}),define(ie[358],ne([1,0,7,63,26,6,2,27,36,210,138,652,25,34,448]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var a;(function(f){f.Hidden={type:0};class c{constructor(r,l,s,g){this.actions=r,this.trigger=l,this.editorPosition=s,this.widgetPosition=g,this.type=1}}f.Showing=c})(a||(a={}));let u=t=class extends _.Disposable{constructor(c,d,r){super(),this._editor=c,this._keybindingService=d,this._onClick=this._register(new E.Emitter),this.onClick=this._onClick.event,this._state=a.Hidden,this._iconClasses=[],this._domNode=L.$("div.lightBulbWidget"),this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(l=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide()})),this._register(L.addStandardDisposableGenericMouseDownListener(this._domNode,l=>{var s;if(this.state.type!==1)return;const g=this._editor.getOption(64).experimental.showAiIcon;if((g===S.ShowAiIconMode.On||g===S.ShowAiIconMode.OnCode)&&this.state.actions.allAIFixes&&this.state.actions.validActions.length===1){const D=this.state.actions.validActions[0].action;if(!((s=D.command)===null||s===void 0)&&s.id){r.executeCommand(D.command.id,...D.command.arguments||[]),l.preventDefault();return}}this._editor.focus(),l.preventDefault();const{top:h,height:m}=L.getDomNodePagePosition(this._domNode),C=this._editor.getOption(66);let w=Math.floor(C/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(l.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(64)&&(this._editor.getOption(64).enabled||this.hide(),this._updateLightBulbTitleAndIcon())})),this._register(E.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var l,s,g,h;this._preferredKbLabel=(s=(l=this._keybindingService.lookupKeybinding(b.autoFixCommandId))===null||l===void 0?void 0:l.getLabel())!==null&&s!==void 0?s:void 0,this._quickFixKbLabel=(h=(g=this._keybindingService.lookupKeybinding(b.quickFixCommandId))===null||g===void 0?void 0:g.getLabel())!==null&&h!==void 0?h:void 0,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,d,r){if(c.validActions.length<=0)return this.hide();const l=this._editor.getOptions();if(!l.get(64).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:g,column:h}=s.validatePosition(r),m=s.getOptions().tabSize,C=l.get(50),w=s.getLineContent(g),D=(0,v.computeIndentLevel)(w,m),I=C.spaceWidth*D>22,M=O=>O>2&&this._editor.getTopForLineNumber(O)===this._editor.getTopForLineNumber(O-1);let A=g;if(!I){if(g>1&&!M(g-1))A-=1;else if(!M(g+1))A+=1;else if(h*C.spaceWidth<22)return this.hide()}this.state=new a.Showing(c,d,r,{position:{lineNumber:A,column:s.getLineContent(A).match(/^\S\s*$/)?2:1},preference:t._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==a.Hidden&&(this.state=a.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(c){this._state=c,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){var c,d,r;if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;const l=()=>{this._preferredKbLabel&&(this.title=o.localize(0,null,this._preferredKbLabel))},s=()=>{this._quickFixKbLabel?this.title=o.localize(1,null,this._quickFixKbLabel):this.title=o.localize(2,null)};let g;const h=this._editor.getOption(64).experimental.showAiIcon;if(h===S.ShowAiIconMode.On||h===S.ShowAiIconMode.OnCode)if(h===S.ShowAiIconMode.On&&this.state.actions.allAIFixes)if(g=y.Codicon.sparkleFilled,this.state.actions.allAIFixes&&this.state.actions.validActions.length===1)if(((c=this.state.actions.validActions[0].action.command)===null||c===void 0?void 0:c.id)==="inlineChat.start"){const m=(r=(d=this._keybindingService.lookupKeybinding("inlineChat.start"))===null||d===void 0?void 0:d.getLabel())!==null&&r!==void 0?r:void 0;this.title=m?o.localize(3,null,m):o.localize(4,null)}else this.title=o.localize(5,null);else s();else this.state.actions.hasAutoFix?(this.state.actions.hasAIFix?g=y.Codicon.lightbulbSparkleAutofix:g=y.Codicon.lightbulbAutofix,l()):this.state.actions.hasAIFix?(g=y.Codicon.lightbulbSparkle,s()):(g=y.Codicon.lightBulb,s());else this.state.actions.hasAutoFix?(g=y.Codicon.lightbulbAutofix,l()):(g=y.Codicon.lightBulb,s());this._iconClasses=p.ThemeIcon.asClassNameArray(g),this._domNode.classList.add(...this._iconClasses)}set title(c){this._domNode.title=c}};e.LightBulbWidget=u,u.ID="editor.contrib.lightbulbWidget",u._posPref=[0],e.LightBulbWidget=u=t=Ee([he(1,n.IKeybindingService),he(2,i.ICommandService)],u)}),define(ie[812],ne([1,0,16,147,669]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:y.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(v,b){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class _ extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:y.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(v,b){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()-1)}}class p extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:y.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(v,b){k.EditorZoom.setZoomLevel(0)}}(0,L.registerEditorAction)(E),(0,L.registerEditorAction)(_),(0,L.registerEditorAction)(p)}),define(ie[359],ne([1,0,13,19,9,49,66,20,22,104,151,11,5,24,118,68,302,25,753,8,18,64,69]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s){"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.getRealAndSyntheticDocumentFormattersOrdered=void 0;function g(O,T,N){const P=[],x=new c.ExtensionIdentifierSet,R=O.ordered(N);for(const W of R)P.push(W),W.extensionId&&x.add(W.extensionId);const B=T.ordered(N);for(const W of B){if(W.extensionId){if(x.has(W.extensionId))continue;x.add(W.extensionId)}P.push({displayName:W.displayName,extensionId:W.extensionId,provideDocumentFormattingEdits(V,U,F){return W.provideDocumentRangeFormattingEdits(V,V.getFullModelRange(),U,F)}})}return P}e.getRealAndSyntheticDocumentFormattersOrdered=g;class h{static setFormatterSelector(T){return{dispose:h._selectors.unshift(T)}}static async select(T,N,P){if(T.length===0)return;const x=E.Iterable.first(h._selectors);if(x)return await x(T,N,P)}}e.FormattingConflicts=h,h._selectors=new _.LinkedList;async function m(O,T,N,P,x,R,B){const W=O.get(d.IInstantiationService),{documentRangeFormattingEditProvider:V}=O.get(r.ILanguageFeaturesService),U=(0,b.isCodeEditor)(T)?T.getModel():T,F=V.ordered(U),j=await h.select(F,U,P);j&&(x.report(j),await W.invokeFunction(C,j,T,N,R,B))}e.formatDocumentRangesWithSelectedProvider=m;async function C(O,T,N,P,x,R){var B,W;const V=O.get(t.IEditorWorkerService),U=O.get(l.ILogService),F=O.get(s.IAccessibleNotificationService);let j,J;(0,b.isCodeEditor)(N)?(j=N.getModel(),J=new v.EditorStateCancellationTokenSource(N,5,void 0,x)):(j=N,J=new v.TextModelCancellationTokenSource(N,x));const le=[];let ee=0;for(const ue of(0,L.asArray)(P).sort(i.Range.compareRangesUsingStarts))ee>0&&i.Range.areIntersectingOrTouching(le[ee-1],ue)?le[ee-1]=i.Range.fromPositions(le[ee-1].getStartPosition(),ue.getEndPosition()):ee=le.push(ue);const $=async ue=>{var X,Z;U.trace("[format][provideDocumentRangeFormattingEdits] (request)",(X=T.extensionId)===null||X===void 0?void 0:X.value,ue);const re=await T.provideDocumentRangeFormattingEdits(j,ue,j.getFormattingOptions(),J.token)||[];return U.trace("[format][provideDocumentRangeFormattingEdits] (response)",(Z=T.extensionId)===null||Z===void 0?void 0:Z.value,re),re},te=(ue,X)=>{if(!ue.length||!X.length)return!1;const Z=ue.reduce((re,oe)=>i.Range.plusRange(re,oe.range),ue[0].range);if(!X.some(re=>i.Range.intersectRanges(Z,re.range)))return!1;for(const re of ue)for(const oe of X)if(i.Range.intersectRanges(re.range,oe.range))return!0;return!1},G=[],de=[];try{if(typeof T.provideDocumentRangesFormattingEdits=="function"){U.trace("[format][provideDocumentRangeFormattingEdits] (request)",(B=T.extensionId)===null||B===void 0?void 0:B.value,le);const ue=await T.provideDocumentRangesFormattingEdits(j,le,j.getFormattingOptions(),J.token)||[];U.trace("[format][provideDocumentRangeFormattingEdits] (response)",(W=T.extensionId)===null||W===void 0?void 0:W.value,ue),de.push(ue)}else{for(const ue of le){if(J.token.isCancellationRequested)return!0;de.push(await $(ue))}for(let ue=0;ue({text:Z.text,range:i.Range.lift(Z.range),forceMoveMarkers:!0})),Z=>{for(const{range:re}of Z)if(i.Range.areIntersectingOrTouching(re,X))return[new n.Selection(re.startLineNumber,re.startColumn,re.endLineNumber,re.endColumn)];return null})}return F.notify("format",R),!0}e.formatDocumentRangesWithProvider=C;async function w(O,T,N,P,x,R){const B=O.get(d.IInstantiationService),W=O.get(r.ILanguageFeaturesService),V=(0,b.isCodeEditor)(T)?T.getModel():T,U=g(W.documentFormattingEditProvider,W.documentRangeFormattingEditProvider,V),F=await h.select(U,V,N);F&&(P.report(F),await B.invokeFunction(D,F,T,N,x,R))}e.formatDocumentWithSelectedProvider=w;async function D(O,T,N,P,x,R){const B=O.get(t.IEditorWorkerService),W=O.get(s.IAccessibleNotificationService);let V,U;(0,b.isCodeEditor)(N)?(V=N.getModel(),U=new v.EditorStateCancellationTokenSource(N,5,void 0,x)):(V=N,U=new v.TextModelCancellationTokenSource(N,x));let F;try{const j=await T.provideDocumentFormattingEdits(V,V.getFormattingOptions(),U.token);if(F=await B.computeMoreMinimalEdits(V.uri,j),U.token.isCancellationRequested)return!0}finally{U.dispose()}if(!F||F.length===0)return!1;if((0,b.isCodeEditor)(N))u.FormattingEdit.execute(N,F,P!==2),P!==2&&N.revealPositionInCenterIfOutsideViewport(N.getPosition(),1);else{const[{range:j}]=F,J=new n.Selection(j.startLineNumber,j.startColumn,j.endLineNumber,j.endColumn);V.pushEditOperations([J],F.map(le=>({text:le.text,range:i.Range.lift(le.range),forceMoveMarkers:!0})),le=>{for(const{range:ee}of le)if(i.Range.areIntersectingOrTouching(ee,J))return[new n.Selection(ee.startLineNumber,ee.startColumn,ee.endLineNumber,ee.endColumn)];return null})}return W.notify("format",R),!0}e.formatDocumentWithProvider=D;async function I(O,T,N,P,x,R){const B=T.documentRangeFormattingEditProvider.ordered(N);for(const W of B){const V=await Promise.resolve(W.provideDocumentRangeFormattingEdits(N,P,x,R)).catch(y.onUnexpectedExternalError);if((0,L.isNonEmptyArray)(V))return await O.computeMoreMinimalEdits(N.uri,V)}}e.getDocumentRangeFormattingEditsUntilResult=I;async function M(O,T,N,P,x){const R=g(T.documentFormattingEditProvider,T.documentRangeFormattingEditProvider,N);for(const B of R){const W=await Promise.resolve(B.provideDocumentFormattingEdits(N,P,x)).catch(y.onUnexpectedExternalError);if((0,L.isNonEmptyArray)(W))return await O.computeMoreMinimalEdits(N.uri,W)}}e.getDocumentFormattingEditsUntilResult=M;function A(O,T,N,P,x,R,B){const W=T.onTypeFormattingEditProvider.ordered(N);return W.length===0||W[0].autoFormatTriggerCharacters.indexOf(x)<0?Promise.resolve(void 0):Promise.resolve(W[0].provideOnTypeFormattingEdits(N,P,x,R,B)).catch(y.onUnexpectedExternalError).then(V=>O.computeMoreMinimalEdits(N.uri,V))}e.getOnTypeFormattingEdits=A,f.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(O,...T){const[N,P,x]=T;(0,p.assertType)(S.URI.isUri(N)),(0,p.assertType)(i.Range.isIRange(P));const R=O.get(a.ITextModelService),B=O.get(t.IEditorWorkerService),W=O.get(r.ILanguageFeaturesService),V=await R.createModelReference(N);try{return I(B,W,V.object.textEditorModel,i.Range.lift(P),x,k.CancellationToken.None)}finally{V.dispose()}}),f.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(O,...T){const[N,P]=T;(0,p.assertType)(S.URI.isUri(N));const x=O.get(a.ITextModelService),R=O.get(t.IEditorWorkerService),B=O.get(r.ILanguageFeaturesService),W=await x.createModelReference(N);try{return M(R,B,W.object.textEditorModel,P,k.CancellationToken.None)}finally{W.dispose()}}),f.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(O,...T){const[N,P,x,R]=T;(0,p.assertType)(S.URI.isUri(N)),(0,p.assertType)(o.Position.isIPosition(P)),(0,p.assertType)(typeof x=="string");const B=O.get(a.ITextModelService),W=O.get(t.IEditorWorkerService),V=O.get(r.ILanguageFeaturesService),U=await B.createModelReference(N);try{return A(W,V,U.object.textEditorModel,o.Position.lift(P),x,R,k.CancellationToken.None)}finally{U.dispose()}})}),define(ie[813],ne([1,0,13,19,9,65,2,16,33,125,5,21,118,18,359,302,670,69,25,15,8,87]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormatOnType=void 0;let s=class{constructor(w,D,I,M){this._editor=w,this._languageFeaturesService=D,this._workerService=I,this._accessibleNotificationService=M,this._disposables=new _.DisposableStore,this._sessionDisposables=new _.DisposableStore,this._disposables.add(D.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(w.onDidChangeModel(()=>this._update())),this._disposables.add(w.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(w.onDidChangeConfiguration(A=>{A.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const w=this._editor.getModel(),[D]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(w);if(!D||!D.autoFormatTriggerCharacters)return;const I=new v.CharacterSet;for(const M of D.autoFormatTriggerCharacters)I.add(M.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(M=>{const A=M.charCodeAt(M.length-1);I.has(A)&&this._trigger(String.fromCharCode(A))}))}_trigger(w){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const D=this._editor.getModel(),I=this._editor.getPosition(),M=new k.CancellationTokenSource,A=this._editor.onDidChangeModelContent(O=>{if(O.isFlush){M.cancel(),A.dispose();return}for(let T=0,N=O.changes.length;T{M.token.isCancellationRequested||(0,L.isNonEmptyArray)(O)&&(this._accessibleNotificationService.notify("format",!1),a.FormattingEdit.execute(this._editor,O,!0))}).finally(()=>{A.dispose()})}};e.FormatOnType=s,s.ID="editor.contrib.autoFormat",e.FormatOnType=s=Ee([he(1,n.ILanguageFeaturesService),he(2,i.IEditorWorkerService),he(3,f.IAccessibleNotificationService)],s);let g=class{constructor(w,D,I){this.editor=w,this._languageFeaturesService=D,this._instantiationService=I,this._callOnDispose=new _.DisposableStore,this._callOnModel=new _.DisposableStore,this._callOnDispose.add(w.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(w.onDidChangeModel(()=>this._update())),this._callOnDispose.add(w.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(D.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:w})=>this._trigger(w)))}_trigger(w){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(t.formatDocumentRangesWithSelectedProvider,this.editor,w,2,l.Progress.None,k.CancellationToken.None,!1).catch(y.onUnexpectedError))}};g.ID="editor.contrib.formatOnPaste",g=Ee([he(1,n.ILanguageFeaturesService),he(2,r.IInstantiationService)],g);class h extends p.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:u.localize(0,null),alias:"Format Document",precondition:d.ContextKeyExpr.and(o.EditorContextKeys.notInCompositeEditor,o.EditorContextKeys.writable,o.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(w,D){if(D.hasModel()){const I=w.get(r.IInstantiationService);await w.get(l.IEditorProgressService).showWhile(I.invokeFunction(t.formatDocumentWithSelectedProvider,D,1,l.Progress.None,k.CancellationToken.None,!0),250)}}}class m extends p.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:u.localize(1,null),alias:"Format Selection",precondition:d.ContextKeyExpr.and(o.EditorContextKeys.writable,o.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:o.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(w,D){if(!D.hasModel())return;const I=w.get(r.IInstantiationService),M=D.getModel(),A=D.getSelections().map(T=>T.isEmpty()?new b.Range(T.startLineNumber,1,T.startLineNumber,M.getLineMaxColumn(T.startLineNumber)):T);await w.get(l.IEditorProgressService).showWhile(I.invokeFunction(t.formatDocumentRangesWithSelectedProvider,D,A,1,l.Progress.None,k.CancellationToken.None,!0),250)}}(0,p.registerEditorContribution)(s.ID,s,2),(0,p.registerEditorContribution)(g.ID,g,2),(0,p.registerEditorAction)(h),(0,p.registerEditorAction)(m),c.CommandsRegistry.registerCommand("editor.action.format",async C=>{const w=C.get(S.ICodeEditorService).getFocusedCodeEditor();if(!w||!w.hasModel())return;const D=C.get(c.ICommandService);w.getSelection().isEmpty()?await D.executeCommand("editor.action.formatDocument"):await D.executeCommand("editor.action.formatSelection")})}),define(ie[250],ne([1,0,13,19,9,16,18,160]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;async function S(a,u,f,c){const r=f.ordered(a).map(s=>Promise.resolve(c(s,a,u)).then(void 0,g=>{(0,y.onUnexpectedExternalError)(g)})),l=await Promise.all(r);return(0,L.coalesce)(l.flat())}function v(a,u,f,c){return S(u,f,a,(d,r,l)=>d.provideDefinition(r,l,c))}e.getDefinitionsAtPosition=v;function b(a,u,f,c){return S(u,f,a,(d,r,l)=>d.provideDeclaration(r,l,c))}e.getDeclarationsAtPosition=b;function o(a,u,f,c){return S(u,f,a,(d,r,l)=>d.provideImplementation(r,l,c))}e.getImplementationsAtPosition=o;function i(a,u,f,c){return S(u,f,a,(d,r,l)=>d.provideTypeDefinition(r,l,c))}e.getTypeDefinitionsAtPosition=i;function n(a,u,f,c,d){return S(u,f,a,async(r,l,s)=>{const g=await r.provideReferences(l,s,{includeDeclaration:!0},d);if(!c||!g||g.length!==2)return g;const h=await r.provideReferences(l,s,{includeDeclaration:!1},d);return h&&h.length===1?h:g})}e.getReferencesAtPosition=n;async function t(a){const u=await a(),f=new p.ReferencesModel(u,""),c=f.references.map(d=>d.link);return f.dispose(),c}(0,E.registerModelAndPositionCommand)("_executeDefinitionProvider",(a,u,f)=>{const c=a.get(_.ILanguageFeaturesService),d=v(c.definitionProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(a,u,f)=>{const c=a.get(_.ILanguageFeaturesService),d=i(c.typeDefinitionProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeDeclarationProvider",(a,u,f)=>{const c=a.get(_.ILanguageFeaturesService),d=b(c.declarationProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeReferenceProvider",(a,u,f)=>{const c=a.get(_.ILanguageFeaturesService),d=n(c.referenceProvider,u,f,!1,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeImplementationProvider",(a,u,f)=>{const c=a.get(_.ILanguageFeaturesService),d=o(c.implementationProvider,u,f,k.CancellationToken.None);return t(()=>d)})}),define(ie[814],ne([1,0,6,2,45,16,33,5,679,15,46,8,34,120,47]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new v.RawContextKey("hasSymbols",!1,(0,S.localize)(0,null)),e.ISymbolNavigationService=(0,o.createDecorator)("ISymbolNavigationService");let a=class{constructor(c,d,r,l){this._editorService=d,this._notificationService=r,this._keybindingService=l,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(c)}reset(){var c,d;this._ctxHasSymbols.reset(),(c=this._currentState)===null||c===void 0||c.dispose(),(d=this._currentMessage)===null||d===void 0||d.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(c){const d=c.parent.parent;if(d.references.length<=1){this.reset();return}this._currentModel=d,this._currentIdx=d.references.indexOf(c),this._ctxHasSymbols.set(!0),this._showMessage();const r=new u(this._editorService),l=r.onDidChange(s=>{if(this._ignoreEditorChange)return;const g=this._editorService.getActiveCodeEditor();if(!g)return;const h=g.getModel(),m=g.getPosition();if(!h||!m)return;let C=!1,w=!1;for(const D of d.references)if((0,y.isEqual)(D.uri,h.uri))C=!0,w=w||p.Range.containsPosition(D.range,m);else if(C)break;(!C||!w)&&this.reset()});this._currentState=(0,k.combinedDisposable)(r,l)}revealNext(c){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:p.Range.collapseToStart(d.range),selectionRevealType:3}},c).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var c;(c=this._currentMessage)===null||c===void 0||c.dispose();const d=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),r=d?(0,S.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,d.getLabel()):(0,S.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(r)}};a=Ee([he(0,v.IContextKeyService),he(1,_.ICodeEditorService),he(2,t.INotificationService),he(3,i.IKeybindingService)],a),(0,b.registerSingleton)(e.ISymbolNavigationService,a,1),(0,E.registerEditorCommand)(new class extends E.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(f,c){return f.get(e.ISymbolNavigationService).revealNext(c)}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(f){f.get(e.ISymbolNavigationService).reset()}});let u=class{constructor(c){this._listener=new Map,this._disposables=new k.DisposableStore,this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(c.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(c.onCodeEditorAdd(this._onDidAddEditor,this)),c.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,k.dispose)(this._listener.values())}_onDidAddEditor(c){this._listener.set(c,(0,k.combinedDisposable)(c.onDidChangeCursorPosition(d=>this._onDidChange.fire({editor:c})),c.onDidChangeModelContent(d=>this._onDidChange.fire({editor:c}))))}_onDidRemoveEditor(c){var d;(d=this._listener.get(c))===null||d===void 0||d.dispose(),this._listener.delete(c)}};u=Ee([he(0,_.ICodeEditorService)],u)}),define(ie[360],ne([1,0,14,19,9,16,18]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class p{constructor(n,t,a){this.provider=n,this.hover=t,this.ordinal=a}}e.HoverProviderResult=p;async function S(i,n,t,a,u){try{const f=await Promise.resolve(i.provideHover(t,a,u));if(f&&o(f))return new p(i,f,n)}catch(f){(0,y.onUnexpectedExternalError)(f)}}function v(i,n,t,a){const f=i.ordered(n).map((c,d)=>S(c,d,n,t,a));return L.AsyncIterableObject.fromPromises(f).coalesce()}e.getHover=v;function b(i,n,t,a){return v(i,n,t,a).map(u=>u.hover).toPromise()}e.getHoverPromise=b,(0,E.registerModelAndPositionCommand)("_executeHoverProvider",(i,n,t)=>{const a=i.get(_.ILanguageFeaturesService);return b(a.hoverProvider,n,t,k.CancellationToken.None)});function o(i){const n=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return n&&t}}),define(ie[251],ne([1,0,7,13,14,58,2,119,11,5,42,360,681,28,57,18]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const u=L.$;class f{constructor(l,s,g,h,m){this.owner=l,this.range=s,this.contents=g,this.isBeforeContent=h,this.ordinal=m}isValidForHoverAnchor(l){return l.type===1&&this.range.startColumn<=l.range.startColumn&&this.range.endColumn>=l.range.endColumn}}e.MarkdownHover=f;let c=class{constructor(l,s,g,h,m){this._editor=l,this._languageService=s,this._openerService=g,this._configurationService=h,this._languageFeaturesService=m,this.hoverOrdinal=3}createLoadingMessage(l){return new f(this,l.range,[new E.MarkdownString().appendText(i.localize(0,null))],!1,2e3)}computeSync(l,s){if(!this._editor.hasModel()||l.type!==1)return[];const g=this._editor.getModel(),h=l.range.startLineNumber,m=g.getLineMaxColumn(h),C=[];let w=1e3;const D=g.getLineLength(h),I=g.getLanguageIdAtPosition(l.range.startLineNumber,l.range.startColumn),M=this._editor.getOption(116),A=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:I});let O=!1;M>=0&&D>M&&l.range.startColumn>=M&&(O=!0,C.push(new f(this,l.range,[{value:i.localize(1,null)}],!1,w++))),!O&&typeof A=="number"&&D>=A&&C.push(new f(this,l.range,[{value:i.localize(2,null)}],!1,w++));let T=!1;for(const N of s){const P=N.range.startLineNumber===h?N.range.startColumn:1,x=N.range.endLineNumber===h?N.range.endColumn:m,R=N.options.hoverMessage;if(!R||(0,E.isEmptyMarkdownString)(R))continue;N.options.beforeContentClassName&&(T=!0);const B=new v.Range(l.range.startLineNumber,P,l.range.startLineNumber,x);C.push(new f(this,B,(0,k.asArray)(R),T,w++))}return C}computeAsync(l,s,g){if(!this._editor.hasModel()||l.type!==1)return y.AsyncIterableObject.EMPTY;const h=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(h))return y.AsyncIterableObject.EMPTY;const m=new S.Position(l.range.startLineNumber,l.range.startColumn);return(0,o.getHover)(this._languageFeaturesService.hoverProvider,h,m,g).filter(C=>!(0,E.isEmptyMarkdownString)(C.hover.contents)).map(C=>{const w=C.hover.range?v.Range.lift(C.hover.range):l.range;return new f(this,w,C.hover.contents,!1,C.ordinal)})}renderHoverParts(l,s){return d(l,s,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=c,e.MarkdownHoverParticipant=c=Ee([he(1,b.ILanguageService),he(2,t.IOpenerService),he(3,n.IConfigurationService),he(4,a.ILanguageFeaturesService)],c);function d(r,l,s,g,h){l.sort((C,w)=>C.ordinal-w.ordinal);const m=new _.DisposableStore;for(const C of l)for(const w of C.contents){if((0,E.isEmptyMarkdownString)(w))continue;const D=u("div.hover-row.markdown-hover"),I=L.append(D,u("div.hover-contents")),M=m.add(new p.MarkdownRenderer({editor:s},g,h));m.add(M.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",r.onContentsChanged()}));const A=m.add(M.render(w));I.appendChild(A.element),r.fragment.appendChild(D)}return m}e.renderMarkdownHovers=d}),define(ie[815],ne([1,0,2,12,16,248,74,5,24,21,32,52,303,684,70,203,246]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function f(O,T,N,P,x){if(O.getLineCount()===1&&O.getLineMaxColumn(1)===1)return[];const R=T.getLanguageConfiguration(O.getLanguageId()).indentationRules;if(!R)return[];for(P=Math.min(P,O.getLineCount());N<=P&&R.unIndentedLinePattern;){const te=O.getLineContent(N);if(!R.unIndentedLinePattern.test(te))break;N++}if(N>P-1)return[];const{tabSize:B,indentSize:W,insertSpaces:V}=O.getOptions(),U=(te,G)=>(G=G||1,E.ShiftCommand.shiftIndent(te,te.length+G,B,W,V)),F=(te,G)=>(G=G||1,E.ShiftCommand.unshiftIndent(te,te.length+G,B,W,V)),j=[];let J;const le=O.getLineContent(N);let ee=le;if(x!=null){J=x;const te=k.getLeadingWhitespace(le);ee=J+le.substring(te.length),R.decreaseIndentPattern&&R.decreaseIndentPattern.test(ee)&&(J=F(J),ee=J+le.substring(te.length)),le!==ee&&j.push(_.EditOperation.replaceMove(new S.Selection(N,1,N,te.length+1),(0,a.normalizeIndentation)(J,W,V)))}else J=k.getLeadingWhitespace(le);let $=J;R.increaseIndentPattern&&R.increaseIndentPattern.test(ee)?($=U($),J=U(J)):R.indentNextLinePattern&&R.indentNextLinePattern.test(ee)&&($=U($)),N++;for(let te=N;te<=P;te++){const G=O.getLineContent(te),de=k.getLeadingWhitespace(G),ue=$+G.substring(de.length);R.decreaseIndentPattern&&R.decreaseIndentPattern.test(ue)&&($=F($),J=F(J)),de!==$&&j.push(_.EditOperation.replaceMove(new S.Selection(te,1,te,de.length+1),(0,a.normalizeIndentation)($,W,V))),!(R.unIndentedLinePattern&&R.unIndentedLinePattern.test(G))&&(R.increaseIndentPattern&&R.increaseIndentPattern.test(ue)?(J=U(J),$=J):R.indentNextLinePattern&&R.indentNextLinePattern.test(ue)?$=U($):$=J)}return j}e.getReindentEditOperations=f;class c extends y.EditorAction{constructor(){super({id:c.ID,label:n.localize(0,null),alias:"Convert Indentation to Spaces",precondition:v.EditorContextKeys.writable})}run(T,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),R=N.getSelection();if(!R)return;const B=new M(R,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[B]),N.pushUndoStop(),P.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=c,c.ID="editor.action.indentationToSpaces";class d extends y.EditorAction{constructor(){super({id:d.ID,label:n.localize(1,null),alias:"Convert Indentation to Tabs",precondition:v.EditorContextKeys.writable})}run(T,N){const P=N.getModel();if(!P)return;const x=P.getOptions(),R=N.getSelection();if(!R)return;const B=new A(R,x.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[B]),N.pushUndoStop(),P.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=d,d.ID="editor.action.indentationToTabs";class r extends y.EditorAction{constructor(T,N,P){super(P),this.insertSpaces=T,this.displaySizeOnly=N}run(T,N){const P=T.get(t.IQuickInputService),x=T.get(o.IModelService),R=N.getModel();if(!R)return;const B=x.getCreationOptions(R.getLanguageId(),R.uri,R.isForSimpleWidget),W=R.getOptions(),V=[1,2,3,4,5,6,7,8].map(F=>({id:F.toString(),label:F.toString(),description:F===B.tabSize&&F===W.tabSize?n.localize(2,null):F===B.tabSize?n.localize(3,null):F===W.tabSize?n.localize(4,null):void 0})),U=Math.min(R.getOptions().tabSize-1,7);setTimeout(()=>{P.pick(V,{placeHolder:n.localize(5,null),activeItem:V[U]}).then(F=>{if(F&&R&&!R.isDisposed()){const j=parseInt(F.label,10);this.displaySizeOnly?R.updateOptions({tabSize:j}):R.updateOptions({tabSize:j,indentSize:j,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=r;class l extends r{constructor(){super(!1,!1,{id:l.ID,label:n.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=l,l.ID="editor.action.indentUsingTabs";class s extends r{constructor(){super(!0,!1,{id:s.ID,label:n.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=s,s.ID="editor.action.indentUsingSpaces";class g extends r{constructor(){super(!0,!0,{id:g.ID,label:n.localize(8,null),alias:"Change Tab Display Size",precondition:void 0})}}e.ChangeTabDisplaySize=g,g.ID="editor.action.changeTabDisplaySize";class h extends y.EditorAction{constructor(){super({id:h.ID,label:n.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(T,N){const P=T.get(o.IModelService),x=N.getModel();if(!x)return;const R=P.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget);x.detectIndentation(R.insertSpaces,R.tabSize)}}e.DetectIndentation=h,h.ID="editor.action.detectIndentation";class m extends y.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:n.localize(10,null),alias:"Reindent Lines",precondition:v.EditorContextKeys.writable})}run(T,N){const P=T.get(b.ILanguageConfigurationService),x=N.getModel();if(!x)return;const R=f(x,P,1,x.getLineCount());R.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,R),N.pushUndoStop())}}e.ReindentLinesAction=m;class C extends y.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:n.localize(11,null),alias:"Reindent Selected Lines",precondition:v.EditorContextKeys.writable})}run(T,N){const P=T.get(b.ILanguageConfigurationService),x=N.getModel();if(!x)return;const R=N.getSelections();if(R===null)return;const B=[];for(const W of R){let V=W.startLineNumber,U=W.endLineNumber;if(V!==U&&W.endColumn===1&&U--,V===1){if(V===U)continue}else V--;const F=f(x,P,V,U);B.push(...F)}B.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,B),N.pushUndoStop())}}e.ReindentSelectedLinesAction=C;class w{constructor(T,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const P of T)P.range&&typeof P.text=="string"&&this._edits.push(P)}getEditOperations(T,N){for(const x of this._edits)N.addEditOperation(p.Range.lift(x.range),x.text);let P=!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?(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(P=!0,this._selectionId=N.trackSelection(this._initialSelection,!1))),P||(this._selectionId=N.trackSelection(this._initialSelection))}computeCursorState(T,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=w;let D=class{constructor(T,N){this.editor=T,this._languageConfigurationService=N,this.callOnDispose=new L.DisposableStore,this.callOnModel=new L.DisposableStore,this.callOnDispose.add(T.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(T.onDidChangeModel(()=>this.update())),this.callOnDispose.add(T.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:T})=>{this.trigger(T)}))}trigger(T){const N=this.editor.getSelections();if(N===null||N.length>1)return;const P=this.editor.getModel();if(!P||!P.tokenization.isCheapToTokenize(T.getStartPosition().lineNumber))return;const x=this.editor.getOption(12),{tabSize:R,indentSize:B,insertSpaces:W}=P.getOptions(),V=[],U={shiftIndent:le=>E.ShiftCommand.shiftIndent(le,le.length+1,R,B,W),unshiftIndent:le=>E.ShiftCommand.unshiftIndent(le,le.length+1,R,B,W)};let F=T.startLineNumber;for(;F<=T.endLineNumber;){if(this.shouldIgnoreLine(P,F)){F++;continue}break}if(F>T.endLineNumber)return;let j=P.getLineContent(F);if(!/\S/.test(j.substring(0,T.startColumn-1))){const le=(0,u.getGoodIndentForLine)(x,P,P.getLanguageId(),F,U,this._languageConfigurationService);if(le!==null){const ee=k.getLeadingWhitespace(j),$=i.getSpaceCnt(le,R),te=i.getSpaceCnt(ee,R);if($!==te){const G=i.generateIndent($,R,W);V.push({range:new p.Range(F,1,F,ee.length+1),text:G}),j=G+j.substr(ee.length)}else{const G=(0,u.getIndentMetadata)(P,F,this._languageConfigurationService);if(G===0||G===8)return}}}const J=F;for(;FP.tokenization.getLineTokens($),getLanguageId:()=>P.getLanguageId(),getLanguageIdAtPosition:($,te)=>P.getLanguageIdAtPosition($,te)},getLineContent:$=>$===J?j:P.getLineContent($)},ee=(0,u.getGoodIndentForLine)(x,le,P.getLanguageId(),F+1,U,this._languageConfigurationService);if(ee!==null){const $=i.getSpaceCnt(ee,R),te=i.getSpaceCnt(k.getLeadingWhitespace(P.getLineContent(F+1)),R);if($!==te){const G=$-te;for(let de=F+1;de<=T.endLineNumber;de++){const ue=P.getLineContent(de),X=k.getLeadingWhitespace(ue),re=i.getSpaceCnt(X,R)+G,oe=i.generateIndent(re,R,W);oe!==X&&V.push({range:new p.Range(de,1,de,X.length+1),text:oe})}}}}if(V.length>0){this.editor.pushUndoStop();const le=new w(V,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",le),this.editor.pushUndoStop()}}shouldIgnoreLine(T,N){T.tokenization.forceTokenization(N);const P=T.getLineFirstNonWhitespaceColumn(N);if(P===0)return!0;const x=T.tokenization.getLineTokens(N);if(x.getCount()>0){const R=x.findTokenIndexAtOffset(P);if(R>=0&&x.getStandardTokenType(R)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=D,D.ID="editor.contrib.autoIndentOnPaste",e.AutoIndentOnPaste=D=Ee([he(1,b.ILanguageConfigurationService)],D);function I(O,T,N,P){if(O.getLineCount()===1&&O.getLineMaxColumn(1)===1)return;let x="";for(let B=0;B({selection:oe,index:Y,ignore:!1}));X.sort((oe,Y)=>b.Range.compareRangesUsingStarts(oe.selection,Y.selection));let Z=X[0];for(let oe=1;oenew v.Position(Y.positionLineNumber,Y.positionColumn)));const re=ue.getSelection();if(re===null)return;const oe=new _.TrimTrailingWhitespaceCommand(re,Z);ue.pushUndoStop(),ue.executeCommands(this.id,[oe]),ue.pushUndoStop()}}e.TrimTrailingWhitespaceAction=M,M.ID="editor.action.trimTrailingWhitespace";class A extends y.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:u.localize(14,null),alias:"Delete Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(de,ue){if(!ue.hasModel())return;const X=this._getLinesToRemove(ue),Z=ue.getModel();if(Z.getLineCount()===1&&Z.getLineMaxColumn(1)===1)return;let re=0;const oe=[],Y=[];for(let K=0,H=X.length;K1&&(se-=1,ae=Z.getLineMaxColumn(se)),oe.push(S.EditOperation.replace(new o.Selection(se,ae,q,ce),"")),Y.push(new o.Selection(se-re,z.positionColumn,se-re,z.positionColumn)),re+=z.endLineNumber-z.startLineNumber+1}ue.pushUndoStop(),ue.executeEdits(this.id,oe,Y),ue.pushUndoStop()}_getLinesToRemove(de){const ue=de.getSelections().map(re=>{let oe=re.endLineNumber;return re.startLineNumberre.startLineNumber===oe.startLineNumber?re.endLineNumber-oe.endLineNumber:re.startLineNumber-oe.startLineNumber);const X=[];let Z=ue[0];for(let re=1;re=ue[re].startLineNumber?Z.endLineNumber=ue[re].endLineNumber:(X.push(Z),Z=ue[re]);return X.push(Z),X}}e.DeleteLinesAction=A;class O extends y.EditorAction{constructor(){super({id:"editor.action.indentLines",label:u.localize(15,null),alias:"Indent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2142,weight:100}})}run(de,ue){const X=ue._getViewModel();X&&(ue.pushUndoStop(),ue.executeCommands(this.id,p.TypeOperations.indent(X.cursorConfig,ue.getModel(),ue.getSelections())),ue.pushUndoStop())}}e.IndentLinesAction=O;class T extends y.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:u.localize(16,null),alias:"Outdent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2140,weight:100}})}run(de,ue){k.CoreEditingCommands.Outdent.runEditorCommand(de,ue,null)}}class N extends y.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:u.localize(17,null),alias:"Insert Line Above",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(de,ue){const X=ue._getViewModel();X&&(ue.pushUndoStop(),ue.executeCommands(this.id,p.TypeOperations.lineInsertBefore(X.cursorConfig,ue.getModel(),ue.getSelections())))}}e.InsertLineBeforeAction=N;class P extends y.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:u.localize(18,null),alias:"Insert Line Below",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(de,ue){const X=ue._getViewModel();X&&(ue.pushUndoStop(),ue.executeCommands(this.id,p.TypeOperations.lineInsertAfter(X.cursorConfig,ue.getModel(),ue.getSelections())))}}e.InsertLineAfterAction=P;class x extends y.EditorAction{run(de,ue){if(!ue.hasModel())return;const X=ue.getSelection(),Z=this._getRangesToDelete(ue),re=[];for(let K=0,H=Z.length-1;KS.EditOperation.replace(K,""));ue.pushUndoStop(),ue.executeEdits(this.id,Y,oe),ue.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=x;class R extends x{constructor(){super({id:"deleteAllLeft",label:u.localize(19,null),alias:"Delete All Left",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(de,ue){let X=null;const Z=[];let re=0;return ue.forEach(oe=>{let Y;if(oe.endColumn===1&&re>0){const K=oe.startLineNumber-re;Y=new o.Selection(K,oe.startColumn,K,oe.startColumn)}else Y=new o.Selection(oe.startLineNumber,oe.startColumn,oe.startLineNumber,oe.startColumn);re+=oe.endLineNumber-oe.startLineNumber,oe.intersectRanges(de)?X=Y:Z.push(Y)}),X&&Z.unshift(X),Z}_getRangesToDelete(de){const ue=de.getSelections();if(ue===null)return[];let X=ue;const Z=de.getModel();return Z===null?[]:(X.sort(b.Range.compareRangesUsingStarts),X=X.map(re=>{if(re.isEmpty())if(re.startColumn===1){const oe=Math.max(1,re.startLineNumber-1),Y=re.startLineNumber===1?1:Z.getLineLength(oe)+1;return new b.Range(oe,Y,re.startLineNumber,1)}else return new b.Range(re.startLineNumber,1,re.startLineNumber,re.startColumn);else return new b.Range(re.startLineNumber,1,re.endLineNumber,re.endColumn)}),X)}}e.DeleteAllLeftAction=R;class B extends x{constructor(){super({id:"deleteAllRight",label:u.localize(20,null),alias:"Delete All Right",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(de,ue){let X=null;const Z=[];for(let re=0,oe=ue.length,Y=0;re{if(re.isEmpty()){const oe=ue.getLineMaxColumn(re.startLineNumber);return re.startColumn===oe?new b.Range(re.startLineNumber,re.startColumn,re.startLineNumber+1,1):new b.Range(re.startLineNumber,re.startColumn,re.startLineNumber,oe)}return re});return Z.sort(b.Range.compareRangesUsingStarts),Z}}e.DeleteAllRightAction=B;class W extends y.EditorAction{constructor(){super({id:"editor.action.joinLines",label:u.localize(21,null),alias:"Join Lines",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(de,ue){const X=ue.getSelections();if(X===null)return;let Z=ue.getSelection();if(Z===null)return;X.sort(b.Range.compareRangesUsingStarts);const re=[],oe=X.reduce((q,ae)=>q.isEmpty()?q.endLineNumber===ae.startLineNumber?(Z.equalsSelection(q)&&(Z=ae),ae):ae.startLineNumber>q.endLineNumber+1?(re.push(q),ae):new o.Selection(q.startLineNumber,q.startColumn,ae.endLineNumber,ae.endColumn):ae.startLineNumber>q.endLineNumber?(re.push(q),ae):new o.Selection(q.startLineNumber,q.startColumn,ae.endLineNumber,ae.endColumn));re.push(oe);const Y=ue.getModel();if(Y===null)return;const K=[],H=[];let z=Z,se=0;for(let q=0,ae=re.length;q=1){let Le=!0;_e===""&&(Le=!1),Le&&(_e.charAt(_e.length-1)===" "||_e.charAt(_e.length-1)===" ")&&(Le=!1,_e=_e.replace(/[\s\uFEFF\xA0]+$/g," "));const Ne=Pe.substr(Be-1);_e+=(Le?" ":"")+Ne,Le?me=Ne.length+1:me=Ne.length}else me=0}const Te=new b.Range(ge,pe,ve,Ce);if(!Te.isEmpty()){let Me;ce.isEmpty()?(K.push(S.EditOperation.replace(Te,_e)),Me=new o.Selection(Te.startLineNumber-se,_e.length-me+1,ge-se,_e.length-me+1)):ce.startLineNumber===ce.endLineNumber?(K.push(S.EditOperation.replace(Te,_e)),Me=new o.Selection(ce.startLineNumber-se,ce.startColumn,ce.endLineNumber-se,ce.endColumn)):(K.push(S.EditOperation.replace(Te,_e)),Me=new o.Selection(ce.startLineNumber-se,ce.startColumn,ce.startLineNumber-se,_e.length-Se)),b.Range.intersectRanges(Te,Z)!==null?z=Me:H.push(Me)}se+=Te.endLineNumber-Te.startLineNumber}H.unshift(z),ue.pushUndoStop(),ue.executeEdits(this.id,K,H),ue.pushUndoStop()}}e.JoinLinesAction=W;class V extends y.EditorAction{constructor(){super({id:"editor.action.transpose",label:u.localize(22,null),alias:"Transpose Characters around the Cursor",precondition:i.EditorContextKeys.writable})}run(de,ue){const X=ue.getSelections();if(X===null)return;const Z=ue.getModel();if(Z===null)return;const re=[];for(let oe=0,Y=X.length;oe=z){if(H.lineNumber===Z.getLineCount())continue;const se=new b.Range(H.lineNumber,Math.max(1,H.column-1),H.lineNumber+1,1),q=Z.getValueInRange(se).split("").reverse().join("");re.push(new E.ReplaceCommand(new o.Selection(H.lineNumber,Math.max(1,H.column-1),H.lineNumber+1,1),q))}else{const se=new b.Range(H.lineNumber,Math.max(1,H.column-1),H.lineNumber,H.column+1),q=Z.getValueInRange(se).split("").reverse().join("");re.push(new E.ReplaceCommandThatPreservesSelection(se,q,new o.Selection(H.lineNumber,H.column+1,H.lineNumber,H.column+1)))}}ue.pushUndoStop(),ue.executeCommands(this.id,re),ue.pushUndoStop()}}e.TransposeAction=V;class U extends y.EditorAction{run(de,ue){const X=ue.getSelections();if(X===null)return;const Z=ue.getModel();if(Z===null)return;const re=ue.getOption(129),oe=[];for(const Y of X)if(Y.isEmpty()){const K=Y.getStartPosition(),H=ue.getConfiguredWordAtPosition(K);if(!H)continue;const z=new b.Range(K.lineNumber,H.startColumn,K.lineNumber,H.endColumn),se=Z.getValueInRange(z);oe.push(S.EditOperation.replace(z,this._modifyText(se,re)))}else{const K=Z.getValueInRange(Y);oe.push(S.EditOperation.replace(Y,this._modifyText(K,re)))}ue.pushUndoStop(),ue.executeEdits(this.id,oe),ue.pushUndoStop()}}e.AbstractCaseAction=U;class F extends U{constructor(){super({id:"editor.action.transformToUppercase",label:u.localize(23,null),alias:"Transform to Uppercase",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){return de.toLocaleUpperCase()}}e.UpperCaseAction=F;class j extends U{constructor(){super({id:"editor.action.transformToLowercase",label:u.localize(24,null),alias:"Transform to Lowercase",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){return de.toLocaleLowerCase()}}e.LowerCaseAction=j;class J{constructor(de,ue){this._pattern=de,this._flags=ue,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 le extends U{constructor(){super({id:"editor.action.transformToTitlecase",label:u.localize(25,null),alias:"Transform to Title Case",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){const X=le.titleBoundary.get();return X?de.toLocaleLowerCase().replace(X,Z=>Z.toLocaleUpperCase()):de}}e.TitleCaseAction=le,le.titleBoundary=new J("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class ee extends U{constructor(){super({id:"editor.action.transformToSnakecase",label:u.localize(26,null),alias:"Transform to Snake Case",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){const X=ee.caseBoundary.get(),Z=ee.singleLetters.get();return!X||!Z?de:de.replace(X,"$1_$2").replace(Z,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=ee,ee.caseBoundary=new J("(\\p{Ll})(\\p{Lu})","gmu"),ee.singleLetters=new J("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class $ extends U{constructor(){super({id:"editor.action.transformToCamelcase",label:u.localize(27,null),alias:"Transform to Camel Case",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){const X=$.wordBoundary.get();if(!X)return de;const Z=de.split(X);return Z.shift()+Z.map(oe=>oe.substring(0,1).toLocaleUpperCase()+oe.substring(1)).join("")}}e.CamelCaseAction=$,$.wordBoundary=new J("[_\\s-]","gm");class te extends U{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(ue=>ue.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:u.localize(28,null),alias:"Transform to Kebab Case",precondition:i.EditorContextKeys.writable})}_modifyText(de,ue){const X=te.caseBoundary.get(),Z=te.singleLetters.get(),re=te.underscoreBoundary.get();return!X||!Z||!re?de:de.replace(re,"$1-$3").replace(X,"$1-$2").replace(Z,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=te,te.caseBoundary=new J("(\\p{Ll})(\\p{Lu})","gmu"),te.singleLetters=new J("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),te.underscoreBoundary=new J("(\\S)(_)(\\S)","gm"),(0,y.registerEditorAction)(r),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(s),(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(D),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(P),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(B),(0,y.registerEditorAction)(W),(0,y.registerEditorAction)(V),(0,y.registerEditorAction)(F),(0,y.registerEditorAction)(j),ee.caseBoundary.isSupported()&&ee.singleLetters.isSupported()&&(0,y.registerEditorAction)(ee),$.wordBoundary.isSupported()&&(0,y.registerEditorAction)($),le.titleBoundary.isSupported()&&(0,y.registerEditorAction)(le),te.isSupported()&&(0,y.registerEditorAction)(te)}),define(ie[818],ne([1,0,2,16]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends L.Disposable{constructor(_){super(),this._editor=_,this._register(this._editor.onMouseDown(p=>{const S=this._editor.getOption(116);S>=0&&p.target.type===6&&p.target.position.column>=S&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}y.ID="editor.contrib.longLinesHelper",(0,k.registerEditorContribution)(y.ID,y,2)}),define(ie[191],ne([1,0,184,51,6,58,2,16,5,119,695,15,57,7,466]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let a=t=class{static get(d){return d.getContribution(t.ID)}constructor(d,r,l){this._openerService=l,this._messageWidget=new _.MutableDisposable,this._messageListeners=new _.DisposableStore,this._mouseOverMessage=!1,this._editor=d,this._visible=t.MESSAGE_VISIBLE.bindTo(r)}dispose(){var d;(d=this._message)===null||d===void 0||d.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(d,r){(0,k.alert)((0,E.isMarkdownString)(d)?d.value:d),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,E.isMarkdownString)(d)?(0,L.renderMarkdown)(d,{actionHandler:{callback:s=>(0,v.openLinkFromMarkdown)(this._openerService,s,(0,E.isMarkdownString)(d)?d.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new f(this._editor,r,typeof d=="string"?d:this._message.element),this._messageListeners.add(y.Event.debounce(this._editor.onDidBlurEditorText,(s,g)=>g,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&n.isAncestor(n.getActiveElement(),this._messageWidget.value.getDomNode())||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(n.addDisposableListener(this._messageWidget.value.getDomNode(),n.EventType.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(n.addDisposableListener(this._messageWidget.value.getDomNode(),n.EventType.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let l;this._messageListeners.add(this._editor.onMouseMove(s=>{s.target.position&&(l?l.containsPosition(s.target.position)||this.closeMessage():l=new S.Range(r.lineNumber-3,1,s.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(f.fadeOut(this._messageWidget.value))}};e.MessageController=a,a.ID="editor.contrib.messageController",a.MESSAGE_VISIBLE=new o.RawContextKey("messageVisible",!1,b.localize(0,null)),e.MessageController=a=t=Ee([he(1,o.IContextKeyService),he(2,i.IOpenerService)],a);const u=p.EditorCommand.bindToContribution(a.get);(0,p.registerEditorCommand)(new u({id:"leaveEditorMessage",precondition:a.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class f{static fadeOut(d){const r=()=>{d.dispose(),clearTimeout(l),d.getDomNode().removeEventListener("animationend",r)},l=setTimeout(r,110);return d.getDomNode().addEventListener("animationend",r),d.getDomNode().classList.add("fadeOut"),{dispose:r}}constructor(d,{lineNumber:r,column:l},s){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=d,this._editor.revealLinesInCenterIfOutsideViewport(r,r,0),this._position={lineNumber:r,column:l},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const g=document.createElement("div");g.classList.add("anchor","top"),this._domNode.appendChild(g);const h=document.createElement("div");typeof s=="string"?(h.classList.add("message"),h.textContent=s):(s.classList.add("message"),h.appendChild(s)),this._domNode.appendChild(h);const m=document.createElement("div");m.classList.add("anchor","below"),this._domNode.appendChild(m),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(d){this._domNode.classList.toggle("below",d===2)}}(0,p.registerEditorContribution)(a.ID,a,4)}),define(ie[819],ne([1,0,58,2,16,191,702]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class p extends k.Disposable{constructor(v){super(),this.editor=v,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const v=E.MessageController.get(this.editor);if(v&&this.editor.hasModel()){let b=this.editor.getOptions().get(91);b||(this.editor.isSimpleWidget?b=new L.MarkdownString(_.localize(0,null)):b=new L.MarkdownString(_.localize(1,null))),v.showMessage(b,this.editor.getPosition())}}}e.ReadOnlyMessageController=p,p.ID="editor.contrib.readOnlyMessageController",(0,y.registerEditorContribution)(p.ID,p,2)}),define(ie[820],ne([1,0,13,19,9,16,11,5,24,21,306,557,705,29,25,18,68,20,22]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class r{constructor(w,D){this.index=w,this.ranges=D}mov(w){const D=this.index+(w?1:-1);if(D<0||D>=this.ranges.length)return this;const I=new r(D,this.ranges);return I.ranges[D].equalsRange(this.ranges[this.index])?I.mov(w):I}}let l=d=class{static get(w){return w.getContribution(d.ID)}constructor(w,D){this._editor=w,this._languageFeaturesService=D,this._ignoreSelection=!1}dispose(){var w;(w=this._selectionListener)===null||w===void 0||w.dispose()}async run(w){if(!this._editor.hasModel())return;const D=this._editor.getSelections(),I=this._editor.getModel();if(this._state||await m(this._languageFeaturesService.selectionRangeProvider,I,D.map(A=>A.getPosition()),this._editor.getOption(112),k.CancellationToken.None).then(A=>{var O;if(!(!L.isNonEmptyArray(A)||A.length!==D.length)&&!(!this._editor.hasModel()||!L.equals(this._editor.getSelections(),D,(T,N)=>T.equalsSelection(N)))){for(let T=0;TN.containsPosition(D[T].getStartPosition())&&N.containsPosition(D[T].getEndPosition())),A[T].unshift(D[T]);this._state=A.map(T=>new r(0,T)),(O=this._selectionListener)===null||O===void 0||O.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var T;this._ignoreSelection||((T=this._selectionListener)===null||T===void 0||T.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(A=>A.mov(w));const M=this._state.map(A=>S.Selection.fromPositions(A.ranges[A.index].getStartPosition(),A.ranges[A.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(M)}finally{this._ignoreSelection=!1}}};e.SmartSelectController=l,l.ID="editor.contrib.smartSelectController",e.SmartSelectController=l=d=Ee([he(1,a.ILanguageFeaturesService)],l);class s extends E.EditorAction{constructor(w,D){super(D),this._forward=w}async run(w,D){const I=l.get(D);I&&await I.run(this._forward)}}class g extends s{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:i.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"1_basic",title:i.localize(1,null),order:2}})}}t.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class h extends s{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:i.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"1_basic",title:i.localize(3,null),order:3}})}}(0,E.registerEditorContribution)(l.ID,l,4),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(h);async function m(C,w,D,I,M){const A=C.all(w).concat(new o.WordSelectionRangeProvider(I.selectSubwords));A.length===1&&A.unshift(new b.BracketSelectionRangeProvider);const O=[],T=[];for(const N of A)O.push(Promise.resolve(N.provideSelectionRanges(w,D,M)).then(P=>{if(L.isNonEmptyArray(P)&&P.length===D.length)for(let x=0;x{if(N.length===0)return[];N.sort((B,W)=>_.Position.isBefore(B.getStartPosition(),W.getStartPosition())?1:_.Position.isBefore(W.getStartPosition(),B.getStartPosition())||_.Position.isBefore(B.getEndPosition(),W.getEndPosition())?-1:_.Position.isBefore(W.getEndPosition(),B.getEndPosition())?1:0);const P=[];let x;for(const B of N)(!x||p.Range.containsRange(B,x)&&!p.Range.equalsRange(B,x))&&(P.push(B),x=B);if(!I.selectLeadingAndTrailingWhitespace)return P;const R=[P[0]];for(let B=1;B0&&this.word.startColumn===h.startColumn&&this.word.endColumn=0&&I.resolve(L.CancellationToken.None)}return g}};c=Ee([he(5,i.ISuggestMemoryService)],c);let d=class{constructor(s,g,h,m){this._getEditorOption=s,this._languageFeatureService=g,this._clipboardService=h,this._suggestMemoryService=m}async provideInlineCompletions(s,g,h,m){var C;if(h.selectedSuggestionInfo)return;const w=this._getEditorOption(88,s);if(o.QuickSuggestionsOptions.isAllOff(w))return;s.tokenization.tokenizeIfCheap(g.lineNumber);const D=s.tokenization.getLineTokens(g.lineNumber),I=D.getStandardTokenType(D.findTokenIndexAtOffset(Math.max(g.column-1-1,0)));if(o.QuickSuggestionsOptions.valueFor(w,I)!=="inline")return;let M=s.getWordAtPosition(g),A;if(M?.word||(A=this._getTriggerCharacterInfo(s,g)),!M?.word&&!A||(M||(M=s.getWordUntilPosition(g)),M.endColumn!==g.column))return;let O;const T=s.getValueInRange(new S.Range(g.lineNumber,1,g.lineNumber,g.column));if(!A&&(!((C=this._lastResult)===null||C===void 0)&&C.canBeReused(s,g.lineNumber,M))){const N=new b.LineContext(T,g.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=N,this._lastResult.acquire(),O=this._lastResult}else{const N=await(0,o.provideSuggestionItems)(this._languageFeatureService.completionProvider,s,g,new o.CompletionOptions(void 0,void 0,A?.providers),A&&{triggerKind:1,triggerCharacter:A.ch},m);let P;N.needsClipboard&&(P=await this._clipboardService.readText());const x=new b.CompletionModel(N.items,g.column,new b.LineContext(T,0),n.WordDistance.None,this._getEditorOption(117,s),this._getEditorOption(111,s),{boostFullMatch:!1,firstMatchCanBeWeak:!1},P);O=new c(s,g.lineNumber,M,x,N,this._suggestMemoryService)}return this._lastResult=O,O}handleItemDidShow(s,g){g.completion.resolve(L.CancellationToken.None)}freeInlineCompletions(s){s.release()}_getTriggerCharacterInfo(s,g){var h;const m=s.getValueInRange(S.Range.fromPositions({lineNumber:g.lineNumber,column:g.column-1},g)),C=new Set;for(const w of this._languageFeatureService.completionProvider.all(s))!((h=w.triggerCharacters)===null||h===void 0)&&h.includes(m)&&C.add(w);if(C.size!==0)return{providers:C,ch:m}}};e.SuggestInlineCompletions=d,e.SuggestInlineCompletions=d=Ee([he(1,v.ILanguageFeaturesService),he(2,t.IClipboardService),he(3,i.ISuggestMemoryService)],d);let r=u=class{constructor(s,g,h,m){if(++u._counter===1){const C=m.createInstance(d,(w,D)=>{var I;return((I=h.listCodeEditors().find(A=>A.getModel()===D))!==null&&I!==void 0?I:s).getOption(w)});u._disposable=g.inlineCompletionsProvider.register("*",C)}}dispose(){var s;--u._counter===0&&((s=u._disposable)===null||s===void 0||s.dispose(),u._disposable=void 0)}};r._counter=0,r=u=Ee([he(1,v.ILanguageFeaturesService),he(2,p.ICodeEditorService),he(3,a.IInstantiationService)],r),(0,_.registerEditorContribution)("suggest.inlineCompletionsProvider",r,0)}),define(ie[822],ne([1,0,61,16,717]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends k.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:y.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(p,S){if(!S.hasModel())return;const v=S.getModel();v.tokenization.resetTokenization();const b=new L.StopWatch;v.tokenization.forceTokenization(v.getLineCount()),b.stop(),console.log(`tokenization took ${b.elapsed()}`)}}(0,k.registerEditorAction)(E)}),define(ie[823],ne([1,0,2,45,16,33,719,162]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const S="ignoreUnusualLineTerminators";function v(i,n,t){i.setModelProperty(n.uri,S,t)}function b(i,n){return i.getModelProperty(n.uri,S)}let o=class extends L.Disposable{constructor(n,t,a){super(),this._editor=n,this._dialogService=t,this._codeEditorService=a,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(u=>{u.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const n=this._editor.getModel();if(!n.mightContainUnusualLineTerminators()||b(this._codeEditorService,n)===!0||this._editor.getOption(90))return;if(this._config==="auto"){n.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let a;try{this._isPresentingDialog=!0,a=await this._dialogService.confirm({title:_.localize(0,null),message:_.localize(1,null),detail:_.localize(2,null,(0,k.basename)(n.uri)),primaryButton:_.localize(3,null),cancelButton:_.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!a.confirmed){v(this._codeEditorService,n,!0);return}n.removeUnusualLineTerminators(this._editor.getSelections())}};e.UnusualLineTerminatorsDetector=o,o.ID="editor.contrib.unusualLineTerminatorsDetector",e.UnusualLineTerminatorsDetector=o=Ee([he(1,p.IDialogService),he(2,E.ICodeEditorService)],o),(0,y.registerEditorContribution)(o.ID,o,1)}),define(ie[361],ne([1,0,16,127,36,75,179,148,11,5,24,21,32,722,69,15,241]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"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 f extends L.EditorCommand{constructor($){super($),this._inSelectionMode=$.inSelectionMode,this._wordNavigationType=$.wordNavigationType}runEditorCommand($,te,G){if(!te.hasModel())return;const de=(0,p.getMapForWordSeparators)(te.getOption(129)),ue=te.getModel(),Z=te.getSelections().map(re=>{const oe=new S.Position(re.positionLineNumber,re.positionColumn),Y=this._move(de,ue,oe,this._wordNavigationType);return this._moveTo(re,Y,this._inSelectionMode)});if(ue.pushStackElement(),te._getViewModel().setCursorStates("moveWordCommand",3,Z.map(re=>E.CursorState.fromModelSelection(re))),Z.length===1){const re=new S.Position(Z[0].positionLineNumber,Z[0].positionColumn);te.revealPosition(re,0)}}_moveTo($,te,G){return G?new b.Selection($.selectionStartLineNumber,$.selectionStartColumn,te.lineNumber,te.column):new b.Selection(te.lineNumber,te.column,te.lineNumber,te.column)}}e.MoveWordCommand=f;class c extends f{_move($,te,G,de){return _.WordOperations.moveWordLeft($,te,G,de)}}e.WordLeftCommand=c;class d extends f{_move($,te,G,de){return _.WordOperations.moveWordRight($,te,G,de)}}e.WordRightCommand=d;class r extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=r;class l extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=l;class s extends c{constructor(){var $;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,($=a.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=s;class g extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=g;class h extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=h;class m extends c{constructor(){var $;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,($=a.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=m;class C extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move($,te,G,de){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),te,G,de)}}e.CursorWordAccessibilityLeft=C;class w extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move($,te,G,de){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),te,G,de)}}e.CursorWordAccessibilityLeftSelect=w;class D extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=D;class I extends d{constructor(){var $;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,($=a.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=I;class M extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=M;class A extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=A;class O extends d{constructor(){var $;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:a.ContextKeyExpr.and(o.EditorContextKeys.textInputFocus,($=a.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=O;class T extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=T;class N extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move($,te,G,de){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),te,G,de)}}e.CursorWordAccessibilityRight=N;class P extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move($,te,G,de){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),te,G,de)}}e.CursorWordAccessibilityRightSelect=P;class x extends L.EditorCommand{constructor($){super($),this._whitespaceHeuristics=$.whitespaceHeuristics,this._wordNavigationType=$.wordNavigationType}runEditorCommand($,te,G){const de=$.get(i.ILanguageConfigurationService);if(!te.hasModel())return;const ue=(0,p.getMapForWordSeparators)(te.getOption(129)),X=te.getModel(),Z=te.getSelections(),re=te.getOption(6),oe=te.getOption(11),Y=de.getLanguageConfiguration(X.getLanguageId()).getAutoClosingPairs(),K=te._getViewModel(),H=Z.map(z=>{const se=this._delete({wordSeparators:ue,model:X,selection:z,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:te.getOption(9),autoClosingBrackets:re,autoClosingQuotes:oe,autoClosingPairs:Y,autoClosedCharacters:K.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(se,"")});te.pushUndoStop(),te.executeCommands(this.id,H),te.pushUndoStop()}}e.DeleteWordCommand=x;class R extends x{_delete($,te){const G=_.WordOperations.deleteWordLeft($,te);return G||new v.Range(1,1,1,1)}}e.DeleteWordLeftCommand=R;class B extends x{_delete($,te){const G=_.WordOperations.deleteWordRight($,te);if(G)return G;const de=$.model.getLineCount(),ue=$.model.getLineMaxColumn(de);return new v.Range(de,ue,de,ue)}}e.DeleteWordRightCommand=B;class W extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:o.EditorContextKeys.writable})}}e.DeleteWordStartLeft=W;class V extends R{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:o.EditorContextKeys.writable})}}e.DeleteWordEndLeft=V;class U extends R{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=U;class F extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:o.EditorContextKeys.writable})}}e.DeleteWordStartRight=F;class j extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:o.EditorContextKeys.writable})}}e.DeleteWordEndRight=j;class J extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:o.EditorContextKeys.writable,kbOpts:{kbExpr:o.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=J;class le extends L.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:o.EditorContextKeys.writable,label:n.localize(0,null),alias:"Delete Word"})}run($,te,G){if(!te.hasModel())return;const de=(0,p.getMapForWordSeparators)(te.getOption(129)),ue=te.getModel(),Z=te.getSelections().map(re=>{const oe=_.WordOperations.deleteInsideWord(de,ue,re);return new k.ReplaceCommand(oe,"")});te.pushUndoStop(),te.executeCommands(this.id,Z),te.pushUndoStop()}}e.DeleteInsideWord=le,(0,L.registerEditorCommand)(new r),(0,L.registerEditorCommand)(new l),(0,L.registerEditorCommand)(new s),(0,L.registerEditorCommand)(new g),(0,L.registerEditorCommand)(new h),(0,L.registerEditorCommand)(new m),(0,L.registerEditorCommand)(new D),(0,L.registerEditorCommand)(new I),(0,L.registerEditorCommand)(new M),(0,L.registerEditorCommand)(new A),(0,L.registerEditorCommand)(new O),(0,L.registerEditorCommand)(new T),(0,L.registerEditorCommand)(new C),(0,L.registerEditorCommand)(new w),(0,L.registerEditorCommand)(new N),(0,L.registerEditorCommand)(new P),(0,L.registerEditorCommand)(new W),(0,L.registerEditorCommand)(new V),(0,L.registerEditorCommand)(new U),(0,L.registerEditorCommand)(new F),(0,L.registerEditorCommand)(new j),(0,L.registerEditorCommand)(new J),(0,L.registerEditorAction)(le)}),define(ie[824],ne([1,0,16,179,5,21,361,25]),function(Q,e,L,k,y,E,_,p){"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 S extends _.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(f,c){const d=k.WordPartOperations.deleteWordPartLeft(f);return d||new y.Range(1,1,1,1)}}e.DeleteWordPartLeft=S;class v extends _.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(f,c){const d=k.WordPartOperations.deleteWordPartRight(f);if(d)return d;const r=f.model.getLineCount(),l=f.model.getLineMaxColumn(r);return new y.Range(r,l,r,l)}}e.DeleteWordPartRight=v;class b extends _.MoveWordCommand{_move(f,c,d,r){return k.WordPartOperations.moveWordPartLeft(f,c,d)}}e.WordPartLeftCommand=b;class o extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=o,p.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class i extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=i,p.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class n extends _.MoveWordCommand{_move(f,c,d,r){return k.WordPartOperations.moveWordPartRight(f,c,d)}}e.WordPartRightCommand=n;class t extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=t;class a extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=a,(0,L.registerEditorCommand)(new S),(0,L.registerEditorCommand)(new v),(0,L.registerEditorCommand)(new o),(0,L.registerEditorCommand)(new i),(0,L.registerEditorCommand)(new t),(0,L.registerEditorCommand)(new a)}),define(ie[825],ne([1,0,7,2,16,17,478]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class _ extends k.Disposable{constructor(v){super(),this.editor=v,this.widget=null,E.isIOS&&(this._register(v.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const v=!this.editor.getOption(90);!this.widget&&v?this.widget=new p(this.editor):this.widget&&!v&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=_,_.ID="editor.contrib.iPadShowKeyboard";class p extends k.Disposable{constructor(v){super(),this.editor=v,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(L.addDisposableListener(this._domNode,"touchstart",b=>{this.editor.focus()})),this._register(L.addDisposableListener(this._domNode,"focus",b=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return p.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}p.ID="editor.contrib.ShowKeyboardWidget",(0,y.registerEditorContribution)(_.ID,_,3)}),define(ie[826],ne([1,0,7,38,2,16,31,128,159,42,134,95,479]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0});let n=i=class extends y.Disposable{static get(d){return d.getContribution(i.ID)}constructor(d,r,l){super(),this._editor=d,this._languageService=l,this._widget=null,this._register(this._editor.onDidChangeModel(s=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(s=>this.stop())),this._register(_.TokenizationRegistry.onDidChange(s=>this.stop())),this._register(this._editor.onKeyUp(s=>s.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new f(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};n.ID="editor.contrib.inspectTokens",n=i=Ee([he(1,b.IStandaloneThemeService),he(2,v.ILanguageService)],n);class t extends E.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:o.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(d,r){const l=n.get(r);l?.launch()}}function a(c){let d="";for(let r=0,l=c.length;rS.NullState,tokenize:(s,g,h)=>(0,S.nullTokenize)(d,h),tokenizeEncoded:(s,g,h)=>(0,S.nullTokenizeEncoded)(l,h)}}class f extends y.Disposable{constructor(d,r){super(),this.allowEditorOverflow=!0,this._editor=d,this._languageService=r,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=u(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(l=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return f._ID}_compute(d){const r=this._getTokensAtLine(d.lineNumber);let l=0;for(let C=r.tokens1.length-1;C>=0;C--){const w=r.tokens1[C];if(d.column-1>=w.offset){l=C;break}}let s=0;for(let C=r.tokens2.length>>>1;C>=0;C--)if(d.column-1>=r.tokens2[C<<1]){s=C;break}const g=this._model.getLineContent(d.lineNumber);let h="";if(l{const W=new S.TfIdfCalculator;W.updateDocuments(A.map(U=>({key:U.commandId,textChunks:[this.getTfIdfChunk(U)]})));const V=W.calculateScores(g,m);return(0,S.normalizeTfIdfScores)(V).filter(U=>U.score>c.TFIDF_THRESHOLD).slice(0,c.TFIDF_MAX_RESULTS)}),T=[];for(const W of A){const V=(w=c.WORD_FILTER(g,W.label))!==null&&w!==void 0?w:void 0,U=W.commandAlias&&(D=c.WORD_FILTER(g,W.commandAlias))!==null&&D!==void 0?D:void 0;if(V||U)W.highlights={label:V,detail:this.options.showAlias?U:void 0},T.push(W);else if(g===W.commandId)T.push(W);else if(g.length>=3){const F=O();if(m.isCancellationRequested)return[];const j=F.find(J=>J.key===W.commandId);j&&(W.tfIdfScore=j.score,T.push(W))}}const N=new Map;for(const W of T){const V=N.get(W.label);V?(W.description=W.commandId,V.description=V.commandId):N.set(W.label,W)}T.sort((W,V)=>{if(W.tfIdfScore&&V.tfIdfScore)return W.tfIdfScore===V.tfIdfScore?W.label.localeCompare(V.label):V.tfIdfScore-W.tfIdfScore;if(W.tfIdfScore)return 1;if(V.tfIdfScore)return-1;const U=this.commandsHistory.peek(W.commandId),F=this.commandsHistory.peek(V.commandId);if(U&&F)return U>F?-1:1;if(U)return-1;if(F)return 1;if(this.options.suggestedCommandIds){const j=this.options.suggestedCommandIds.has(W.commandId),J=this.options.suggestedCommandIds.has(V.commandId);if(j&&J)return 0;if(j)return-1;if(J)return 1}return W.label.localeCompare(V.label)});const P=[];let x=!1,R=!0,B=!!this.options.suggestedCommandIds;for(let W=0;W{var W;const V=await this.getAdditionalCommandPicks(A,T,g,m);if(m.isCancellationRequested)return[];const U=V.map(F=>this.toCommandPick(F,C));return R&&((W=U[0])===null||W===void 0?void 0:W.type)!=="separator"&&U.unshift({type:"separator",label:(0,v.localize)(4,null)}),U})()}:P}toCommandPick(g,h){if(g.type==="separator")return g;const m=this.keybindingService.lookupKeybinding(g.commandId),C=m?(0,v.localize)(5,null,g.label,m.getAriaLabel()):g.label;return{...g,ariaLabel:C,detail:this.options.showAlias&&g.commandAlias!==g.label?g.commandAlias:void 0,keybinding:m,accept:async()=>{var w,D;this.commandsHistory.push(g.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:g.commandId,from:(w=h?.from)!==null&&w!==void 0?w:"quick open"});try{!((D=g.args)===null||D===void 0)&&D.length?await this.commandService.executeCommand(g.commandId,...g.args):await this.commandService.executeCommand(g.commandId)}catch(I){(0,k.isCancellationError)(I)||this.dialogService.error((0,v.localize)(6,null,g.label),(0,L.toErrorMessage)(I))}}}}getTfIdfChunk({label:g,commandAlias:h,commandDescription:m}){let C=g;return h&&h!==g&&(C+=` - ${h}`),m&&m.value!==g&&(C+=` - ${m.value===m.original?m.value:`${m.value} (${m.original})`}`),C}};e.AbstractCommandsQuickAccessProvider=r,r.PREFIX=">",r.TFIDF_THRESHOLD=.5,r.TFIDF_MAX_RESULTS=5,r.WORD_FILTER=(0,y.or)(y.matchesPrefix,y.matchesWords,y.matchesContiguousSubString),e.AbstractCommandsQuickAccessProvider=r=c=Ee([he(1,n.IInstantiationService),he(2,t.IKeybindingService),he(3,b.ICommandService),he(4,f.ITelemetryService),he(5,i.IDialogService)],r);let l=d=class extends _.Disposable{constructor(g,h){super(),this.storageService=g,this.configurationService=h,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(g=>this.updateConfiguration(g))),this._register(this.storageService.onWillSaveState(g=>{g.reason===u.WillSaveStateReason.SHUTDOWN&&this.saveState()}))}updateConfiguration(g){g&&!g.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=d.getConfiguredCommandHistoryLength(this.configurationService),d.cache&&d.cache.limit!==this.configuredCommandsHistoryLength&&(d.cache.limit=this.configuredCommandsHistoryLength,d.hasChanges=!0))}load(){const g=this.storageService.get(d.PREF_KEY_CACHE,0);let h;if(g)try{h=JSON.parse(g)}catch{}const m=d.cache=new p.LRUCache(this.configuredCommandsHistoryLength,1);if(h){let C;h.usesLRU?C=h.entries:C=h.entries.sort((w,D)=>w.value-D.value),C.forEach(w=>m.set(w.key,w.value))}d.counter=this.storageService.getNumber(d.PREF_KEY_COUNTER,0,d.counter)}push(g){d.cache&&(d.cache.set(g,d.counter++),d.hasChanges=!0)}peek(g){var h;return(h=d.cache)===null||h===void 0?void 0:h.peek(g)}saveState(){if(!d.cache||!d.hasChanges)return;const g={usesLRU:!0,entries:[]};d.cache.forEach((h,m)=>g.entries.push({key:m,value:h})),this.storageService.store(d.PREF_KEY_CACHE,JSON.stringify(g),0,0),this.storageService.store(d.PREF_KEY_COUNTER,d.counter,0,0),d.hasChanges=!1}static getConfiguredCommandHistoryLength(g){var h,m;const w=(m=(h=g.getValue().workbench)===null||h===void 0?void 0:h.commandPalette)===null||m===void 0?void 0:m.history;return typeof w=="number"?w:d.DEFAULT_COMMANDS_HISTORY_LENGTH}};e.CommandsHistory=l,l.DEFAULT_COMMANDS_HISTORY_LENGTH=50,l.PREF_KEY_CACHE="commandPalette.mru.cache",l.PREF_KEY_COUNTER="commandPalette.mru.counter",l.counter=1,l.hasChanges=!1,e.CommandsHistory=l=d=Ee([he(0,u.IStorageService),he(1,o.IConfigurationService)],l)}),define(ie[828],ne([1,0,123,827]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class y extends k.AbstractCommandsQuickAccessProvider{constructor(_,p,S,v,b,o){super(_,p,S,v,b,o)}getCodeEditorCommandPicks(){const _=this.activeTextEditorControl;if(!_)return[];const p=[];for(const S of _.getSupportedActions())p.push({commandId:S.id,commandAlias:S.alias,label:(0,L.stripIcons)(S.label)||S.id});return p}}e.AbstractEditorCommandsQuickAccessProvider=y}),define(ie[829],ne([1,0,37,137,95,33,828,8,34,25,80,162,16,21,70]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let a=class extends _.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){var c;return(c=this.codeEditorService.getFocusedCodeEditor())!==null&&c!==void 0?c:void 0}constructor(c,d,r,l,s,g){super({showAlias:!1},c,r,l,s,g),this.codeEditorService=d}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};e.StandaloneCommandsQuickAccessProvider=a,e.StandaloneCommandsQuickAccessProvider=a=Ee([he(0,p.IInstantiationService),he(1,E.ICodeEditorService),he(2,S.IKeybindingService),he(3,v.ICommandService),he(4,b.ITelemetryService),he(5,o.IDialogService)],a);class u extends i.EditorAction{constructor(){super({id:u.ID,label:y.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:n.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(c){c.get(t.IQuickInputService).quickAccess.show(a.PREFIX)}}e.GotoLineAction=u,u.ID="editor.action.quickCommand",(0,i.registerEditorAction)(u),L.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:a,prefix:a.PREFIX,helpEntries:[{description:y.QuickCommandNLS.quickCommandHelp,commandId:u.ID}]})}),define(ie[30],ne([1,0,14,38,6,98,745,243,37]),function(Q,e,L,k,y,E,_,p,S){"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.minimapError=e.minimapWarning=e.minimapInfo=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.checkboxSelectBorder=e.checkboxBorder=e.checkboxForeground=e.checkboxSelectBackground=e.checkboxBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeInactiveIndentGuidesStroke=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.diffUnchangedTextBackground=e.diffUnchangedRegionForeground=e.diffUnchangedRegionBackground=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.editorLightBulbAiForeground=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.searchResultsInfoForeground=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.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.widgetBorder=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatBackground=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.registerColor=e.Extensions=e.asCssVariableWithDefault=e.asCssVariable=e.asCssVariableName=void 0;function v(A){return`--vscode-${A.replace(/\./g,"-")}`}e.asCssVariableName=v;function b(A){return`var(${v(A)})`}e.asCssVariable=b;function o(A,O){return`var(${v(A)}, ${O})`}e.asCssVariableWithDefault=o,e.Extensions={ColorContribution:"base.contributions.colors"};class i{constructor(){this._onDidChangeSchema=new y.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(O,T,N,P=!1,x){const R={id:O,description:N,defaults:T,needsTransparency:P,deprecationMessage:x};this.colorsById[O]=R;const B={type:"string",description:N,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return x&&(B.deprecationMessage=x),this.colorSchema.properties[O]=B,this.colorReferenceSchema.enum.push(O),this.colorReferenceSchema.enumDescriptions.push(N),this._onDidChangeSchema.fire(),O}getColors(){return Object.keys(this.colorsById).map(O=>this.colorsById[O])}resolveDefaultColor(O,T){const N=this.colorsById[O];if(N&&N.defaults){const P=N.defaults[T.type];return D(P,T)}}getColorSchema(){return this.colorSchema}toString(){const O=(T,N)=>{const P=T.indexOf(".")===-1?0:1,x=N.indexOf(".")===-1?0:1;return P!==x?P-x:T.localeCompare(N)};return Object.keys(this.colorsById).sort(O).map(T=>`- \`${T}\`: ${this.colorsById[T].description}`).join(` `)}}const n=new i;S.Registry.add(e.Extensions.ColorContribution,n);function t(A,O,T,N,P){return n.registerColor(A,O,T,N,P)}e.registerColor=t,e.foreground=t("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},_.localize(0,null)),e.disabledForeground=t("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},_.localize(1,null)),e.errorForeground=t("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},_.localize(2,null)),e.descriptionForeground=t("descriptionForeground",{light:"#717171",dark:h(e.foreground,.7),hcDark:h(e.foreground,.7),hcLight:h(e.foreground,.7)},_.localize(3,null)),e.iconForeground=t("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},_.localize(4,null)),e.focusBorder=t("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},_.localize(5,null)),e.contrastBorder=t("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},_.localize(6,null)),e.activeContrastBorder=t("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},_.localize(7,null)),e.selectionBackground=t("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},_.localize(8,null)),e.textSeparatorForeground=t("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:k.Color.black,hcLight:"#292929"},_.localize(9,null)),e.textLinkForeground=t("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},_.localize(10,null)),e.textLinkActiveForeground=t("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},_.localize(11,null)),e.textPreformatForeground=t("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},_.localize(12,null)),e.textPreformatBackground=t("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},_.localize(13,null)),e.textBlockQuoteBackground=t("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},_.localize(14,null)),e.textBlockQuoteBorder=t("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:k.Color.white,hcLight:"#292929"},_.localize(15,null)),e.textCodeBlockBackground=t("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:k.Color.black,hcLight:"#F2F2F2"},_.localize(16,null)),e.widgetShadow=t("widget.shadow",{dark:h(k.Color.black,.36),light:h(k.Color.black,.16),hcDark:null,hcLight:null},_.localize(17,null)),e.widgetBorder=t("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(18,null)),e.inputBackground=t("input.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},_.localize(19,null)),e.inputForeground=t("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},_.localize(20,null)),e.inputBorder=t("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(21,null)),e.inputActiveOptionBorder=t("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(22,null)),e.inputActiveOptionHoverBackground=t("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},_.localize(23,null)),e.inputActiveOptionBackground=t("inputOption.activeBackground",{dark:h(e.focusBorder,.4),light:h(e.focusBorder,.2),hcDark:k.Color.transparent,hcLight:k.Color.transparent},_.localize(24,null)),e.inputActiveOptionForeground=t("inputOption.activeForeground",{dark:k.Color.white,light:k.Color.black,hcDark:e.foreground,hcLight:e.foreground},_.localize(25,null)),e.inputPlaceholderForeground=t("input.placeholderForeground",{light:h(e.foreground,.5),dark:h(e.foreground,.5),hcDark:h(e.foreground,.7),hcLight:h(e.foreground,.7)},_.localize(26,null)),e.inputValidationInfoBackground=t("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:k.Color.black,hcLight:k.Color.white},_.localize(27,null)),e.inputValidationInfoForeground=t("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},_.localize(28,null)),e.inputValidationInfoBorder=t("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(29,null)),e.inputValidationWarningBackground=t("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:k.Color.black,hcLight:k.Color.white},_.localize(30,null)),e.inputValidationWarningForeground=t("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},_.localize(31,null)),e.inputValidationWarningBorder=t("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(32,null)),e.inputValidationErrorBackground=t("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:k.Color.black,hcLight:k.Color.white},_.localize(33,null)),e.inputValidationErrorForeground=t("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},_.localize(34,null)),e.inputValidationErrorBorder=t("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(35,null)),e.selectBackground=t("dropdown.background",{dark:"#3C3C3C",light:k.Color.white,hcDark:k.Color.black,hcLight:k.Color.white},_.localize(36,null)),e.selectListBackground=t("dropdown.listBackground",{dark:null,light:null,hcDark:k.Color.black,hcLight:k.Color.white},_.localize(37,null)),e.selectForeground=t("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:k.Color.white,hcLight:e.foreground},_.localize(38,null)),e.selectBorder=t("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(39,null)),e.buttonForeground=t("button.foreground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:k.Color.white},_.localize(40,null)),e.buttonSeparator=t("button.separator",{dark:h(e.buttonForeground,.4),light:h(e.buttonForeground,.4),hcDark:h(e.buttonForeground,.4),hcLight:h(e.buttonForeground,.4)},_.localize(41,null)),e.buttonBackground=t("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},_.localize(42,null)),e.buttonHoverBackground=t("button.hoverBackground",{dark:g(e.buttonBackground,.2),light:s(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},_.localize(43,null)),e.buttonBorder=t("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(44,null)),e.buttonSecondaryForeground=t("button.secondaryForeground",{dark:k.Color.white,light:k.Color.white,hcDark:k.Color.white,hcLight:e.foreground},_.localize(45,null)),e.buttonSecondaryBackground=t("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:k.Color.white},_.localize(46,null)),e.buttonSecondaryHoverBackground=t("button.secondaryHoverBackground",{dark:g(e.buttonSecondaryBackground,.2),light:s(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},_.localize(47,null)),e.badgeBackground=t("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:k.Color.black,hcLight:"#0F4A85"},_.localize(48,null)),e.badgeForeground=t("badge.foreground",{dark:k.Color.white,light:"#333",hcDark:k.Color.white,hcLight:k.Color.white},_.localize(49,null)),e.scrollbarShadow=t("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},_.localize(50,null)),e.scrollbarSliderBackground=t("scrollbarSlider.background",{dark:k.Color.fromHex("#797979").transparent(.4),light:k.Color.fromHex("#646464").transparent(.4),hcDark:h(e.contrastBorder,.6),hcLight:h(e.contrastBorder,.4)},_.localize(51,null)),e.scrollbarSliderHoverBackground=t("scrollbarSlider.hoverBackground",{dark:k.Color.fromHex("#646464").transparent(.7),light:k.Color.fromHex("#646464").transparent(.7),hcDark:h(e.contrastBorder,.8),hcLight:h(e.contrastBorder,.8)},_.localize(52,null)),e.scrollbarSliderActiveBackground=t("scrollbarSlider.activeBackground",{dark:k.Color.fromHex("#BFBFBF").transparent(.4),light:k.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(53,null)),e.progressBarBackground=t("progressBar.background",{dark:k.Color.fromHex("#0E70C0"),light:k.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(54,null)),e.editorErrorBackground=t("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(55,null),!0),e.editorErrorForeground=t("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},_.localize(56,null)),e.editorErrorBorder=t("editorError.border",{dark:null,light:null,hcDark:k.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},_.localize(57,null)),e.editorWarningBackground=t("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(58,null),!0),e.editorWarningForeground=t("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},_.localize(59,null)),e.editorWarningBorder=t("editorWarning.border",{dark:null,light:null,hcDark:k.Color.fromHex("#FFCC00").transparent(.8),hcLight:k.Color.fromHex("#FFCC00").transparent(.8)},_.localize(60,null)),e.editorInfoBackground=t("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(61,null),!0),e.editorInfoForeground=t("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},_.localize(62,null)),e.editorInfoBorder=t("editorInfo.border",{dark:null,light:null,hcDark:k.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},_.localize(63,null)),e.editorHintForeground=t("editorHint.foreground",{dark:k.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},_.localize(64,null)),e.editorHintBorder=t("editorHint.border",{dark:null,light:null,hcDark:k.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},_.localize(65,null)),e.sashHoverBorder=t("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},_.localize(66,null)),e.editorBackground=t("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:k.Color.black,hcLight:k.Color.white},_.localize(67,null)),e.editorForeground=t("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:k.Color.white,hcLight:e.foreground},_.localize(68,null)),e.editorStickyScrollBackground=t("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},_.localize(69,null)),e.editorStickyScrollHoverBackground=t("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},_.localize(70,null)),e.editorWidgetBackground=t("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:k.Color.white},_.localize(71,null)),e.editorWidgetForeground=t("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},_.localize(72,null)),e.editorWidgetBorder=t("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(73,null)),e.editorWidgetResizeBorder=t("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},_.localize(74,null)),e.quickInputBackground=t("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(75,null)),e.quickInputForeground=t("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},_.localize(76,null)),e.quickInputTitleBackground=t("quickInputTitle.background",{dark:new k.Color(new k.RGBA(255,255,255,.105)),light:new k.Color(new k.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:k.Color.white},_.localize(77,null)),e.pickerGroupForeground=t("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:k.Color.white,hcLight:"#0F4A85"},_.localize(78,null)),e.pickerGroupBorder=t("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:k.Color.white,hcLight:"#0F4A85"},_.localize(79,null)),e.keybindingLabelBackground=t("keybindingLabel.background",{dark:new k.Color(new k.RGBA(128,128,128,.17)),light:new k.Color(new k.RGBA(221,221,221,.4)),hcDark:k.Color.transparent,hcLight:k.Color.transparent},_.localize(80,null)),e.keybindingLabelForeground=t("keybindingLabel.foreground",{dark:k.Color.fromHex("#CCCCCC"),light:k.Color.fromHex("#555555"),hcDark:k.Color.white,hcLight:e.foreground},_.localize(81,null)),e.keybindingLabelBorder=t("keybindingLabel.border",{dark:new k.Color(new k.RGBA(51,51,51,.6)),light:new k.Color(new k.RGBA(204,204,204,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.contrastBorder},_.localize(82,null)),e.keybindingLabelBottomBorder=t("keybindingLabel.bottomBorder",{dark:new k.Color(new k.RGBA(68,68,68,.6)),light:new k.Color(new k.RGBA(187,187,187,.4)),hcDark:new k.Color(new k.RGBA(111,195,223)),hcLight:e.foreground},_.localize(83,null)),e.editorSelectionBackground=t("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},_.localize(84,null)),e.editorSelectionForeground=t("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:k.Color.white},_.localize(85,null)),e.editorInactiveSelection=t("editor.inactiveSelectionBackground",{light:h(e.editorSelectionBackground,.5),dark:h(e.editorSelectionBackground,.5),hcDark:h(e.editorSelectionBackground,.7),hcLight:h(e.editorSelectionBackground,.5)},_.localize(86,null),!0),e.editorSelectionHighlight=t("editor.selectionHighlightBackground",{light:w(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:w(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},_.localize(87,null),!0),e.editorSelectionHighlightBorder=t("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(88,null)),e.editorFindMatch=t("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},_.localize(89,null)),e.editorFindMatchHighlight=t("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},_.localize(90,null),!0),e.editorFindRangeHighlight=t("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},_.localize(91,null),!0),e.editorFindMatchBorder=t("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(92,null)),e.editorFindMatchHighlightBorder=t("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(93,null)),e.editorFindRangeHighlightBorder=t("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:h(e.activeContrastBorder,.4),hcLight:h(e.activeContrastBorder,.4)},_.localize(94,null),!0),e.searchEditorFindMatch=t("searchEditor.findMatchBackground",{light:h(e.editorFindMatchHighlight,.66),dark:h(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},_.localize(95,null)),e.searchEditorFindMatchBorder=t("searchEditor.findMatchBorder",{light:h(e.editorFindMatchHighlightBorder,.66),dark:h(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},_.localize(96,null)),e.searchResultsInfoForeground=t("search.resultsInfoForeground",{light:e.foreground,dark:h(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},_.localize(97,null)),e.editorHoverHighlight=t("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},_.localize(98,null),!0),e.editorHoverBackground=t("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(99,null)),e.editorHoverForeground=t("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},_.localize(100,null)),e.editorHoverBorder=t("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},_.localize(101,null)),e.editorHoverStatusBarBackground=t("editorHoverWidget.statusBarBackground",{dark:g(e.editorHoverBackground,.2),light:s(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(102,null)),e.editorActiveLinkForeground=t("editorLink.activeForeground",{dark:"#4E94CE",light:k.Color.blue,hcDark:k.Color.cyan,hcLight:"#292929"},_.localize(103,null)),e.editorInlayHintForeground=t("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:k.Color.white,hcLight:k.Color.black},_.localize(104,null)),e.editorInlayHintBackground=t("editorInlayHint.background",{dark:h(e.badgeBackground,.1),light:h(e.badgeBackground,.1),hcDark:h(k.Color.white,.1),hcLight:h(e.badgeBackground,.1)},_.localize(105,null)),e.editorInlayHintTypeForeground=t("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},_.localize(106,null)),e.editorInlayHintTypeBackground=t("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},_.localize(107,null)),e.editorInlayHintParameterForeground=t("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},_.localize(108,null)),e.editorInlayHintParameterBackground=t("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},_.localize(109,null)),e.editorLightBulbForeground=t("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},_.localize(110,null)),e.editorLightBulbAutoFixForeground=t("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},_.localize(111,null)),e.editorLightBulbAiForeground=t("editorLightBulbAi.foreground",{dark:s(e.iconForeground,.4),light:g(e.iconForeground,1.7),hcDark:e.iconForeground,hcLight:e.iconForeground},_.localize(112,null)),e.defaultInsertColor=new k.Color(new k.RGBA(155,185,85,.2)),e.defaultRemoveColor=new k.Color(new k.RGBA(255,0,0,.2)),e.diffInserted=t("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},_.localize(113,null),!0),e.diffRemoved=t("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},_.localize(114,null),!0),e.diffInsertedLine=t("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},_.localize(115,null),!0),e.diffRemovedLine=t("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},_.localize(116,null),!0),e.diffInsertedLineGutter=t("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(117,null)),e.diffRemovedLineGutter=t("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(118,null)),e.diffOverviewRulerInserted=t("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(119,null)),e.diffOverviewRulerRemoved=t("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(120,null)),e.diffInsertedOutline=t("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},_.localize(121,null)),e.diffRemovedOutline=t("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},_.localize(122,null)),e.diffBorder=t("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(123,null)),e.diffDiagonalFill=t("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},_.localize(124,null)),e.diffUnchangedRegionBackground=t("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},_.localize(125,null)),e.diffUnchangedRegionForeground=t("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},_.localize(126,null)),e.diffUnchangedTextBackground=t("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},_.localize(127,null)),e.listFocusBackground=t("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(128,null)),e.listFocusForeground=t("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(129,null)),e.listFocusOutline=t("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(130,null)),e.listFocusAndSelectionOutline=t("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(131,null)),e.listActiveSelectionBackground=t("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},_.localize(132,null)),e.listActiveSelectionForeground=t("list.activeSelectionForeground",{dark:k.Color.white,light:k.Color.white,hcDark:null,hcLight:null},_.localize(133,null)),e.listActiveSelectionIconForeground=t("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(134,null)),e.listInactiveSelectionBackground=t("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},_.localize(135,null)),e.listInactiveSelectionForeground=t("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(136,null)),e.listInactiveSelectionIconForeground=t("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(137,null)),e.listInactiveFocusBackground=t("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(138,null)),e.listInactiveFocusOutline=t("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(139,null)),e.listHoverBackground=t("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:k.Color.white.transparent(.1),hcLight:k.Color.fromHex("#0F4A85").transparent(.1)},_.localize(140,null)),e.listHoverForeground=t("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(141,null)),e.listDropBackground=t("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},_.localize(142,null)),e.listHighlightForeground=t("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},_.localize(143,null)),e.listFocusHighlightForeground=t("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:C(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},_.localize(144,null)),e.listInvalidItemForeground=t("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},_.localize(145,null)),e.listErrorForeground=t("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},_.localize(146,null)),e.listWarningForeground=t("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},_.localize(147,null)),e.listFilterWidgetBackground=t("listFilterWidget.background",{light:s(e.editorWidgetBackground,0),dark:g(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(148,null)),e.listFilterWidgetOutline=t("listFilterWidget.outline",{dark:k.Color.transparent,light:k.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},_.localize(149,null)),e.listFilterWidgetNoMatchesOutline=t("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(150,null)),e.listFilterWidgetShadow=t("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},_.localize(151,null)),e.listFilterMatchHighlight=t("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},_.localize(152,null)),e.listFilterMatchHighlightBorder=t("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},_.localize(153,null)),e.treeIndentGuidesStroke=t("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},_.localize(154,null)),e.treeInactiveIndentGuidesStroke=t("tree.inactiveIndentGuidesStroke",{dark:h(e.treeIndentGuidesStroke,.4),light:h(e.treeIndentGuidesStroke,.4),hcDark:h(e.treeIndentGuidesStroke,.4),hcLight:h(e.treeIndentGuidesStroke,.4)},_.localize(155,null)),e.tableColumnsBorder=t("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},_.localize(156,null)),e.tableOddRowsBackgroundColor=t("tree.tableOddRowsBackground",{dark:h(e.foreground,.04),light:h(e.foreground,.04),hcDark:null,hcLight:null},_.localize(157,null)),e.listDeemphasizedForeground=t("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},_.localize(158,null)),e.checkboxBackground=t("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},_.localize(159,null)),e.checkboxSelectBackground=t("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(160,null)),e.checkboxForeground=t("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},_.localize(161,null)),e.checkboxBorder=t("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},_.localize(162,null)),e.checkboxSelectBorder=t("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},_.localize(163,null)),e._deprecatedQuickInputListFocusBackground=t("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,_.localize(164,null)),e.quickInputListFocusForeground=t("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},_.localize(165,null)),e.quickInputListFocusIconForeground=t("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},_.localize(166,null)),e.quickInputListFocusBackground=t("quickInputList.focusBackground",{dark:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},_.localize(167,null)),e.menuBorder=t("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(168,null)),e.menuForeground=t("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},_.localize(169,null)),e.menuBackground=t("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},_.localize(170,null)),e.menuSelectionForeground=t("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},_.localize(171,null)),e.menuSelectionBackground=t("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},_.localize(172,null)),e.menuSelectionBorder=t("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(173,null)),e.menuSeparatorBackground=t("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},_.localize(174,null)),e.toolbarHoverBackground=t("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},_.localize(175,null)),e.toolbarHoverOutline=t("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},_.localize(176,null)),e.toolbarActiveBackground=t("toolbar.activeBackground",{dark:g(e.toolbarHoverBackground,.1),light:s(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},_.localize(177,null)),e.snippetTabstopHighlightBackground=t("editor.snippetTabstopHighlightBackground",{dark:new k.Color(new k.RGBA(124,124,124,.3)),light:new k.Color(new k.RGBA(10,50,100,.2)),hcDark:new k.Color(new k.RGBA(124,124,124,.3)),hcLight:new k.Color(new k.RGBA(10,50,100,.2))},_.localize(178,null)),e.snippetTabstopHighlightBorder=t("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(179,null)),e.snippetFinalTabstopHighlightBackground=t("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(180,null)),e.snippetFinalTabstopHighlightBorder=t("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new k.Color(new k.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},_.localize(181,null)),e.breadcrumbsForeground=t("breadcrumb.foreground",{light:h(e.foreground,.8),dark:h(e.foreground,.8),hcDark:h(e.foreground,.8),hcLight:h(e.foreground,.8)},_.localize(182,null)),e.breadcrumbsBackground=t("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},_.localize(183,null)),e.breadcrumbsFocusForeground=t("breadcrumb.focusForeground",{light:s(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},_.localize(184,null)),e.breadcrumbsActiveSelectionForeground=t("breadcrumb.activeSelectionForeground",{light:s(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},_.localize(185,null)),e.breadcrumbsPickerBackground=t("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},_.localize(186,null));const a=.5,u=k.Color.fromHex("#40C8AE").transparent(a),f=k.Color.fromHex("#40A6FF").transparent(a),c=k.Color.fromHex("#606060").transparent(.4),d=.4,r=1;e.mergeCurrentHeaderBackground=t("merge.currentHeaderBackground",{dark:u,light:u,hcDark:null,hcLight:null},_.localize(187,null),!0),e.mergeCurrentContentBackground=t("merge.currentContentBackground",{dark:h(e.mergeCurrentHeaderBackground,d),light:h(e.mergeCurrentHeaderBackground,d),hcDark:h(e.mergeCurrentHeaderBackground,d),hcLight:h(e.mergeCurrentHeaderBackground,d)},_.localize(188,null),!0),e.mergeIncomingHeaderBackground=t("merge.incomingHeaderBackground",{dark:f,light:f,hcDark:null,hcLight:null},_.localize(189,null),!0),e.mergeIncomingContentBackground=t("merge.incomingContentBackground",{dark:h(e.mergeIncomingHeaderBackground,d),light:h(e.mergeIncomingHeaderBackground,d),hcDark:h(e.mergeIncomingHeaderBackground,d),hcLight:h(e.mergeIncomingHeaderBackground,d)},_.localize(190,null),!0),e.mergeCommonHeaderBackground=t("merge.commonHeaderBackground",{dark:c,light:c,hcDark:null,hcLight:null},_.localize(191,null),!0),e.mergeCommonContentBackground=t("merge.commonContentBackground",{dark:h(e.mergeCommonHeaderBackground,d),light:h(e.mergeCommonHeaderBackground,d),hcDark:h(e.mergeCommonHeaderBackground,d),hcLight:h(e.mergeCommonHeaderBackground,d)},_.localize(192,null),!0),e.mergeBorder=t("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},_.localize(193,null)),e.overviewRulerCurrentContentForeground=t("editorOverviewRuler.currentContentForeground",{dark:h(e.mergeCurrentHeaderBackground,r),light:h(e.mergeCurrentHeaderBackground,r),hcDark:e.mergeBorder,hcLight:e.mergeBorder},_.localize(194,null)),e.overviewRulerIncomingContentForeground=t("editorOverviewRuler.incomingContentForeground",{dark:h(e.mergeIncomingHeaderBackground,r),light:h(e.mergeIncomingHeaderBackground,r),hcDark:e.mergeBorder,hcLight:e.mergeBorder},_.localize(195,null)),e.overviewRulerCommonContentForeground=t("editorOverviewRuler.commonContentForeground",{dark:h(e.mergeCommonHeaderBackground,r),light:h(e.mergeCommonHeaderBackground,r),hcDark:e.mergeBorder,hcLight:e.mergeBorder},_.localize(196,null)),e.overviewRulerFindMatchForeground=t("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},_.localize(197,null),!0),e.overviewRulerSelectionHighlightForeground=t("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},_.localize(198,null),!0),e.minimapFindMatch=t("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},_.localize(199,null),!0),e.minimapSelectionOccurrenceHighlight=t("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},_.localize(200,null),!0),e.minimapSelection=t("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},_.localize(201,null),!0),e.minimapInfo=t("minimap.infoHighlight",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoBorder,hcLight:e.editorInfoBorder},_.localize(202,null)),e.minimapWarning=t("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},_.localize(203,null)),e.minimapError=t("minimap.errorHighlight",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},_.localize(204,null)),e.minimapBackground=t("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},_.localize(205,null)),e.minimapForegroundOpacity=t("minimap.foregroundOpacity",{dark:k.Color.fromHex("#000f"),light:k.Color.fromHex("#000f"),hcDark:k.Color.fromHex("#000f"),hcLight:k.Color.fromHex("#000f")},_.localize(206,null)),e.minimapSliderBackground=t("minimapSlider.background",{light:h(e.scrollbarSliderBackground,.5),dark:h(e.scrollbarSliderBackground,.5),hcDark:h(e.scrollbarSliderBackground,.5),hcLight:h(e.scrollbarSliderBackground,.5)},_.localize(207,null)),e.minimapSliderHoverBackground=t("minimapSlider.hoverBackground",{light:h(e.scrollbarSliderHoverBackground,.5),dark:h(e.scrollbarSliderHoverBackground,.5),hcDark:h(e.scrollbarSliderHoverBackground,.5),hcLight:h(e.scrollbarSliderHoverBackground,.5)},_.localize(208,null)),e.minimapSliderActiveBackground=t("minimapSlider.activeBackground",{light:h(e.scrollbarSliderActiveBackground,.5),dark:h(e.scrollbarSliderActiveBackground,.5),hcDark:h(e.scrollbarSliderActiveBackground,.5),hcLight:h(e.scrollbarSliderActiveBackground,.5)},_.localize(209,null)),e.problemsErrorIconForeground=t("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},_.localize(210,null)),e.problemsWarningIconForeground=t("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},_.localize(211,null)),e.problemsInfoIconForeground=t("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},_.localize(212,null)),e.chartsForeground=t("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},_.localize(213,null)),e.chartsLines=t("charts.lines",{dark:h(e.foreground,.5),light:h(e.foreground,.5),hcDark:h(e.foreground,.5),hcLight:h(e.foreground,.5)},_.localize(214,null)),e.chartsRed=t("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},_.localize(215,null)),e.chartsBlue=t("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},_.localize(216,null)),e.chartsYellow=t("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},_.localize(217,null)),e.chartsOrange=t("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},_.localize(218,null)),e.chartsGreen=t("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},_.localize(219,null)),e.chartsPurple=t("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},_.localize(220,null));function l(A,O){var T,N,P,x;switch(A.op){case 0:return(T=D(A.value,O))===null||T===void 0?void 0:T.darken(A.factor);case 1:return(N=D(A.value,O))===null||N===void 0?void 0:N.lighten(A.factor);case 2:return(P=D(A.value,O))===null||P===void 0?void 0:P.transparent(A.factor);case 3:{const R=D(A.background,O);return R?(x=D(A.value,O))===null||x===void 0?void 0:x.makeOpaque(R):D(A.value,O)}case 4:for(const R of A.values){const B=D(R,O);if(B)return B}return;case 6:return D(O.defines(A.if)?A.then:A.else,O);case 5:{const R=D(A.value,O);if(!R)return;const B=D(A.background,O);return B?R.isDarkerThan(B)?k.Color.getLighterColor(R,B,A.factor).transparent(A.transparency):k.Color.getDarkerColor(R,B,A.factor).transparent(A.transparency):R.transparent(A.factor*A.transparency)}default:throw(0,E.assertNever)(A)}}e.executeTransform=l;function s(A,O){return{op:0,value:A,factor:O}}e.darken=s;function g(A,O){return{op:1,value:A,factor:O}}e.lighten=g;function h(A,O){return{op:2,value:A,factor:O}}e.transparent=h;function m(...A){return{op:4,values:A}}e.oneOf=m;function C(A,O,T){return{op:6,if:A,then:O,else:T}}e.ifDefinedThenElse=C;function w(A,O,T,N){return{op:5,value:A,background:O,factor:T,transparency:N}}function D(A,O){if(A!==null){if(typeof A=="string")return A[0]==="#"?k.Color.fromHex(A):O.getColor(A);if(A instanceof k.Color)return A;if(typeof A=="object")return l(A,O)}}e.resolveColorValue=D,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const I=S.Registry.as(p.Extensions.JSONContribution);I.registerSchema(e.workbenchColorsSchemaId,n.getColorSchema());const M=new L.RunOnceScheduler(()=>I.notifySchemaChanged(e.workbenchColorsSchemaId),200);n.onDidChangeSchema(()=>{M.isScheduled()||M.schedule()})}),define(ie[165],ne([1,0,7,156,67,14,2,30]),function(Q,e,L,k,y,E,_,p){"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 S{constructor(s,g){this.x=s,this.y=g,this._pageCoordinatesBrand=void 0}toClientCoordinates(s){return new v(this.x-s.scrollX,this.y-s.scrollY)}}e.PageCoordinates=S;class v{constructor(s,g){this.clientX=s,this.clientY=g,this._clientCoordinatesBrand=void 0}toPageCoordinates(s){return new S(this.clientX+s.scrollX,this.clientY+s.scrollY)}}e.ClientCoordinates=v;class b{constructor(s,g,h,m){this.x=s,this.y=g,this.width=h,this.height=m,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=b;class o{constructor(s,g){this.x=s,this.y=g,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=o;function i(l){const s=L.getDomNodePagePosition(l);return new b(s.left,s.top,s.width,s.height)}e.createEditorPagePosition=i;function n(l,s,g){const h=s.width/l.offsetWidth,m=s.height/l.offsetHeight,C=(g.x-s.x)/h,w=(g.y-s.y)/m;return new o(C,w)}e.createCoordinatesRelativeToEditor=n;class t extends y.StandardMouseEvent{constructor(s,g,h){super(L.getWindow(h),s),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=g,this.pos=new S(this.posx,this.posy),this.editorPos=i(h),this.relativePos=n(h,this.editorPos,this.pos)}}e.EditorMouseEvent=t;class a{constructor(s){this._editorViewDomNode=s}_create(s){return new t(s,!1,this._editorViewDomNode)}onContextMenu(s,g){return L.addDisposableListener(s,"contextmenu",h=>{g(this._create(h))})}onMouseUp(s,g){return L.addDisposableListener(s,"mouseup",h=>{g(this._create(h))})}onMouseDown(s,g){return L.addDisposableListener(s,L.EventType.MOUSE_DOWN,h=>{g(this._create(h))})}onPointerDown(s,g){return L.addDisposableListener(s,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onMouseLeave(s,g){return L.addDisposableListener(s,L.EventType.MOUSE_LEAVE,h=>{g(this._create(h))})}onMouseMove(s,g){return L.addDisposableListener(s,"mousemove",h=>g(this._create(h)))}}e.EditorMouseEventFactory=a;class u{constructor(s){this._editorViewDomNode=s}_create(s){return new t(s,!1,this._editorViewDomNode)}onPointerUp(s,g){return L.addDisposableListener(s,"pointerup",h=>{g(this._create(h))})}onPointerDown(s,g){return L.addDisposableListener(s,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onPointerLeave(s,g){return L.addDisposableListener(s,L.EventType.POINTER_LEAVE,h=>{g(this._create(h))})}onPointerMove(s,g){return L.addDisposableListener(s,"pointermove",h=>g(this._create(h)))}}e.EditorPointerEventFactory=u;class f extends _.Disposable{constructor(s){super(),this._editorViewDomNode=s,this._globalPointerMoveMonitor=this._register(new k.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(s,g,h,m,C){this._keydownListener=L.addStandardDisposableListener(s.ownerDocument,"keydown",w=>{w.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,w.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(s,g,h,w=>{m(new t(w,!0,this._editorViewDomNode))},w=>{this._keydownListener.dispose(),C(w)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=f;class c{constructor(s){this._editor=s,this._instanceId=++c._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new E.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(s){const g=this.getOrCreateRule(s);return g.increaseRefCount(),{className:g.className,dispose:()=>{g.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(s){const g=this.computeUniqueKey(s);let h=this._rules.get(g);if(!h){const m=this._counter++;h=new d(g,`dyn-rule-${this._instanceId}-${m}`,L.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,s),this._rules.set(g,h)}return h}computeUniqueKey(s){return JSON.stringify(s)}garbageCollect(){for(const s of this._rules.values())s.hasReferences()||(this._rules.delete(s.key),s.dispose())}}e.DynamicCssRules=c,c._idPool=0;class d{constructor(s,g,h,m){this.key=s,this.className=g,this.properties=m,this._referenceCount=0,this._styleElementDisposables=new _.DisposableStore,this._styleElement=L.createStyleSheet(h,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(s,g){let h=`.${s} {`;for(const m in g){const C=g[m];let w;typeof C=="object"?w=(0,p.asCssVariable)(C.id):w=C;const D=r(m);h+=` ${D}: ${w};`}return h+=` }`,h}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function r(l){return l.replace(/(^[A-Z])/,([s])=>s.toLowerCase()).replace(/([A-Z])/g,([s])=>`-${s.toLowerCase()}`)}}),define(ie[830],ne([1,0,7,40,156,2,17,12,233,56,36,5,278,336,85,30,24,63,491,43,107,435]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const l=140,s=2;class g{constructor(T,N,P){const x=T.options,R=x.get(141),B=x.get(143),W=B.minimap,V=x.get(50),U=x.get(72);this.renderMinimap=W.renderMinimap,this.size=U.size,this.minimapHeightIsEditorHeight=W.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=x.get(104),this.paddingTop=x.get(83).top,this.paddingBottom=x.get(83).bottom,this.showSlider=U.showSlider,this.autohide=U.autohide,this.pixelRatio=R,this.typicalHalfwidthCharacterWidth=V.typicalHalfwidthCharacterWidth,this.lineHeight=x.get(66),this.minimapLeft=W.minimapLeft,this.minimapWidth=W.minimapWidth,this.minimapHeight=B.height,this.canvasInnerWidth=W.minimapCanvasInnerWidth,this.canvasInnerHeight=W.minimapCanvasInnerHeight,this.canvasOuterWidth=W.minimapCanvasOuterWidth,this.canvasOuterHeight=W.minimapCanvasOuterHeight,this.isSampling=W.minimapIsSampling,this.editorHeight=B.height,this.fontScale=W.minimapScale,this.minimapLineHeight=W.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,r.createSingleCallFunction)(()=>c.MinimapCharRendererFactory.create(this.fontScale,V.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=g._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=g._getMinimapForegroundOpacity(N)}static _getMinimapBackground(T,N){const P=T.getColor(a.minimapBackground);return P?new i.RGBA8(P.rgba.r,P.rgba.g,P.rgba.b,Math.round(255*P.rgba.a)):N}static _getMinimapForegroundOpacity(T){const N=T.getColor(a.minimapForegroundOpacity);return N?i.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(T){return this.renderMinimap===T.renderMinimap&&this.size===T.size&&this.minimapHeightIsEditorHeight===T.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===T.scrollBeyondLastLine&&this.paddingTop===T.paddingTop&&this.paddingBottom===T.paddingBottom&&this.showSlider===T.showSlider&&this.autohide===T.autohide&&this.pixelRatio===T.pixelRatio&&this.typicalHalfwidthCharacterWidth===T.typicalHalfwidthCharacterWidth&&this.lineHeight===T.lineHeight&&this.minimapLeft===T.minimapLeft&&this.minimapWidth===T.minimapWidth&&this.minimapHeight===T.minimapHeight&&this.canvasInnerWidth===T.canvasInnerWidth&&this.canvasInnerHeight===T.canvasInnerHeight&&this.canvasOuterWidth===T.canvasOuterWidth&&this.canvasOuterHeight===T.canvasOuterHeight&&this.isSampling===T.isSampling&&this.editorHeight===T.editorHeight&&this.fontScale===T.fontScale&&this.minimapLineHeight===T.minimapLineHeight&&this.minimapCharWidth===T.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(T.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(T.backgroundColor)&&this.foregroundAlpha===T.foregroundAlpha}}class h{constructor(T,N,P,x,R,B,W,V,U){this.scrollTop=T,this.scrollHeight=N,this.sliderNeeded=P,this._computedSliderRatio=x,this.sliderTop=R,this.sliderHeight=B,this.topPaddingLineCount=W,this.startLineNumber=V,this.endLineNumber=U}getDesiredScrollTopFromDelta(T){return Math.round(this.scrollTop+T/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(T){return Math.round((T-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(T){const N=Math.max(this.startLineNumber,T.startLineNumber),P=Math.min(this.endLineNumber,T.endLineNumber);return N>P?null:[N,P]}getYForLineNumber(T,N){return+(T-this.startLineNumber+this.topPaddingLineCount)*N}static create(T,N,P,x,R,B,W,V,U,F,j){const J=T.pixelRatio,le=T.minimapLineHeight,ee=Math.floor(T.canvasInnerHeight/le),$=T.lineHeight;if(T.minimapHeightIsEditorHeight){let re=V*T.lineHeight+T.paddingTop+T.paddingBottom;T.scrollBeyondLastLine&&(re+=Math.max(0,R-T.lineHeight-T.paddingBottom));const oe=Math.max(1,Math.floor(R*R/re)),Y=Math.max(0,T.minimapHeight-oe),K=Y/(F-R),H=U*K,z=Y>0,se=Math.floor(T.canvasInnerHeight/T.minimapLineHeight),q=Math.floor(T.paddingTop/T.lineHeight);return new h(U,F,z,K,H,oe,q,1,Math.min(W,se))}let te;if(B&&P!==W){const re=P-N+1;te=Math.floor(re*le/J)}else{const re=R/$;te=Math.floor(re*le/J)}const G=Math.floor(T.paddingTop/$);let de=Math.floor(T.paddingBottom/$);if(T.scrollBeyondLastLine){const re=R/$;de=Math.max(de,re-1)}let ue;if(de>0){const re=R/$;ue=(G+W+de-re-1)*le/J}else ue=Math.max(0,(G+W)*le/J-te);ue=Math.min(T.minimapHeight-te,ue);const X=ue/(F-R),Z=U*X;if(ee>=G+W+de){const re=ue>0;return new h(U,F,re,X,Z,te,G,1,W)}else{let re;N>1?re=N+G:re=Math.max(1,U/$);let oe,Y=Math.max(1,Math.floor(re-Z*J/le));YU&&(Y=Math.min(Y,j.startLineNumber),oe=Math.max(oe,j.topPaddingLineCount)),j.scrollTop=T.paddingTop?z=(N-Y+oe+H)*le/J:z=U/T.paddingTop*(oe+H)*le/J,new h(U,F,!0,X,z,te,oe,Y,K)}}}class m{constructor(T){this.dy=T}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}m.INVALID=new m(-1);class C{constructor(T,N,P){this.renderedLayout=T,this._imageData=N,this._renderedLines=new S.RenderedLinesCollection(()=>m.INVALID),this._renderedLines._set(T.startLineNumber,P)}linesEquals(T){if(!this.scrollEquals(T))return!1;const P=this._renderedLines._get().lines;for(let x=0,R=P.length;x1){for(let G=0,de=x-1;G0&&this.minimapLines[P-1]>=T;)P--;let x=this.modelLineToMinimapLine(N)-1;for(;x+1N)return null}return[P+1,x+1]}decorationLineRangeToMinimapLineRange(T,N){let P=this.modelLineToMinimapLine(T),x=this.modelLineToMinimapLine(N);return T!==N&&x===P&&(x===this.minimapLines.length?P>1&&P--:x++),[P,x]}onLinesDeleted(T){const N=T.toLineNumber-T.fromLineNumber+1;let P=this.minimapLines.length,x=0;for(let R=this.minimapLines.length-1;R>=0&&!(this.minimapLines[R]=0&&!(this.minimapLines[P]0,scrollWidth:T.scrollWidth,scrollHeight:T.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:T.getVerticalOffsetForLineNumber(N),scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,viewportWidth:T.viewportWidth,viewportHeight:T.viewportHeight};this._actual.render(x)}_recreateLineSampling(){this._minimapSelections=null;const T=!!this._samplingState,[N,P]=D.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,T&&this._samplingState)for(const x of P)switch(x.type){case"deleted":this._actual.onLinesDeleted(x.deleteFromLineNumber,x.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(x.insertFromLineNumber,x.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(T){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[T-1]):this._context.viewModel.getLineContent(T)}getLineMaxColumn(T){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[T-1]):this._context.viewModel.getLineMaxColumn(T)}getMinimapLinesRenderingData(T,N,P){if(this._samplingState){const x=[];for(let R=0,B=N-T+1;R{if(P.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(P.button===0&&this._lastRenderData){const U=L.getDomNodePagePosition(this._slider.domNode),F=U.top+U.height/2;this._startSliderDragging(P,F,this._lastRenderData.renderedLayout)}return}const R=this._model.options.minimapLineHeight,B=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.offsetY;let V=Math.floor(B/R)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;V=Math.min(V,this._model.getLineCount()),this._model.revealLineNumber(V)}),this._sliderPointerMoveMonitor=new y.GlobalPointerMoveMonitor,this._sliderPointerDownListener=L.addStandardDisposableListener(this._slider.domNode,L.EventType.POINTER_DOWN,P=>{P.preventDefault(),P.stopPropagation(),P.button===0&&this._lastRenderData&&this._startSliderDragging(P,P.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=f.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Start,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(P))},{passive:!1}),this._sliderTouchMoveListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Change,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(P)},{passive:!1}),this._sliderTouchEndListener=L.addStandardDisposableListener(this._domNode.domNode,f.EventType.End,P=>{P.preventDefault(),P.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(T,N,P){if(!T.target||!(T.target instanceof Element))return;const x=T.pageX;this._slider.toggleClassName("active",!0);const R=(B,W)=>{const V=L.getDomNodePagePosition(this._domNode.domNode),U=Math.min(Math.abs(W-x),Math.abs(W-V.left),Math.abs(W-V.left-V.width));if(_.isWindows&&U>l){this._model.setScrollTop(P.scrollTop);return}const F=B-N;this._model.setScrollTop(P.getDesiredScrollTopFromDelta(F))};T.pageY!==N&&R(T.pageY,x),this._sliderPointerMoveMonitor.startMonitoring(T.target,T.pointerId,T.buttons,B=>R(B.pageY,B.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(T){const N=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(T.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 T=["minimap"];return this._model.options.showSlider==="always"?T.push("slider-always"):T.push("slider-mouseover"),this._model.options.autohide&&T.push("autohide"),T.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 w(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(T,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(T,N):!1}onLinesDeleted(T,N){var P;return(P=this._lastRenderData)===null||P===void 0||P.onLinesDeleted(T,N),!0}onLinesInserted(T,N){var P;return(P=this._lastRenderData)===null||P===void 0||P.onLinesInserted(T,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(a.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(T){return this._lastRenderData?this._lastRenderData.onTokensChanged(T):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(T){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}T.scrollLeft+T.viewportWidth>=T.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const P=h.create(this._model.options,T.viewportStartLineNumber,T.viewportEndLineNumber,T.viewportStartLineNumberVerticalOffset,T.viewportHeight,T.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),T.scrollTop,T.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(T){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(o.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(T.startLineNumber,T.endLineNumber);P.sort((J,le)=>(J.options.zIndex||0)-(le.options.zIndex||0));const{canvasInnerWidth:x,canvasInnerHeight:R}=this._model.options,B=this._model.options.minimapLineHeight,W=this._model.options.minimapCharWidth,V=this._model.getOptions().tabSize,U=this._decorationsCanvas.domNode.getContext("2d");U.clearRect(0,0,x,R);const F=new A(T.startLineNumber,T.endLineNumber,!1);this._renderSelectionLineHighlights(U,N,F,T,B),this._renderDecorationsLineHighlights(U,P,F,T,B);const j=new A(T.startLineNumber,T.endLineNumber,null);this._renderSelectionsHighlights(U,N,j,T,B,V,W,x),this._renderDecorationsHighlights(U,P,j,T,B,V,W,x)}}_renderSelectionLineHighlights(T,N,P,x,R){if(!this._selectionColor||this._selectionColor.isTransparent())return;T.fillStyle=this._selectionColor.transparent(.5).toString();let B=0,W=0;for(const V of N){const U=x.intersectWithViewport(V);if(!U)continue;const[F,j]=U;for(let ee=F;ee<=j;ee++)P.set(ee,!0);const J=x.getYForLineNumber(F,R),le=x.getYForLineNumber(j,R);W>=J||(W>B&&T.fillRect(b.MINIMAP_GUTTER_WIDTH,B,T.canvas.width,W-B),B=J),W=le}W>B&&T.fillRect(b.MINIMAP_GUTTER_WIDTH,B,T.canvas.width,W-B)}_renderDecorationsLineHighlights(T,N,P,x,R){const B=new Map;for(let W=N.length-1;W>=0;W--){const V=N[W],U=V.options.minimap;if(!U||U.position!==d.MinimapPosition.Inline)continue;const F=x.intersectWithViewport(V.range);if(!F)continue;const[j,J]=F,le=U.getColor(this._theme.value);if(!le||le.isTransparent())continue;let ee=B.get(le.toString());ee||(ee=le.transparent(.5).toString(),B.set(le.toString(),ee)),T.fillStyle=ee;for(let $=j;$<=J;$++){if(P.has($))continue;P.set($,!0);const te=x.getYForLineNumber(j,R);T.fillRect(b.MINIMAP_GUTTER_WIDTH,te,T.canvas.width,R)}}}_renderSelectionsHighlights(T,N,P,x,R,B,W,V){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const U of N){const F=x.intersectWithViewport(U);if(!F)continue;const[j,J]=F;for(let le=j;le<=J;le++)this.renderDecorationOnLine(T,P,U,this._selectionColor,x,le,R,R,B,W,V)}}_renderDecorationsHighlights(T,N,P,x,R,B,W,V){for(const U of N){const F=U.options.minimap;if(!F)continue;const j=x.intersectWithViewport(U.range);if(!j)continue;const[J,le]=j,ee=F.getColor(this._theme.value);if(!(!ee||ee.isTransparent()))for(let $=J;$<=le;$++)switch(F.position){case d.MinimapPosition.Inline:this.renderDecorationOnLine(T,P,U.range,ee,x,$,R,R,B,W,V);continue;case d.MinimapPosition.Gutter:{const te=x.getYForLineNumber($,R),G=2;this.renderDecoration(T,ee,G,te,s,R);continue}}}}renderDecorationOnLine(T,N,P,x,R,B,W,V,U,F,j){const J=R.getYForLineNumber(B,V);if(J+W<0||J>this._model.options.canvasInnerHeight)return;const{startLineNumber:le,endLineNumber:ee}=P,$=le===B?P.startColumn:1,te=ee===B?P.endColumn:this._model.getLineMaxColumn(B),G=this.getXOffsetForPosition(N,B,$,U,F,j),de=this.getXOffsetForPosition(N,B,te,U,F,j);this.renderDecoration(T,x,G,J,de-G,W)}getXOffsetForPosition(T,N,P,x,R,B){if(P===1)return b.MINIMAP_GUTTER_WIDTH;if((P-1)*R>=B)return B;let V=T.get(N);if(!V){const U=this._model.getLineContent(N);V=[b.MINIMAP_GUTTER_WIDTH];let F=b.MINIMAP_GUTTER_WIDTH;for(let j=1;j=B){V[j]=B;break}V[j]=ee,F=ee}T.set(N,V)}return P-1Z?Math.floor((x-Z)/2):0,oe=J.a/255,Y=new i.RGBA8(Math.round((J.r-j.r)*oe+j.r),Math.round((J.g-j.g)*oe+j.g),Math.round((J.b-j.b)*oe+j.b),255);let K=T.topPaddingLineCount*x;const H=[];for(let ce=0,ge=P-N+1;ce=0&&zde)return;const se=te.charCodeAt(Z);if(se===9){const q=J-(Z+re)%J;re+=q-1,X+=q*B}else if(se===32)X+=B;else{const q=p.isFullWidthCharacter(se)?2:1;for(let ae=0;aede)return}}}}}class A{constructor(T,N,P){this._startLineNumber=T,this._endLineNumber=N,this._defaultValue=P,this._values=[];for(let x=0,R=this._endLineNumber-this._startLineNumber+1;xthis._endLineNumber||(this._values[T-this._startLineNumber]=N)}get(T){return Tthis._endLineNumber?this._defaultValue:this._values[T-this._startLineNumber]}}}),define(ie[831],ne([1,0,617,30]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffEditorUnchangedRegionShadow=e.diffMoveBorderActive=e.diffMoveBorder=void 0,e.diffMoveBorder=(0,k.registerColor)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,L.localize)(0,null)),e.diffMoveBorderActive=(0,k.registerColor)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,L.localize)(1,null)),e.diffEditorUnchangedRegionShadow=(0,k.registerColor)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,L.localize)(2,null))}),define(ie[832],ne([1,0,626,30]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiDiffEditorHeaderBackground=void 0,e.multiDiffEditorHeaderBackground=(0,k.registerColor)("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},(0,L.localize)(0,null))}),define(ie[252],ne([1,0,715,30,473]),function(Q,e,L,k){"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,k.registerColor)("symbolIcon.arrayForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,k.registerColor)("symbolIcon.booleanForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,k.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,k.registerColor)("symbolIcon.colorForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,k.registerColor)("symbolIcon.constantForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,k.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,k.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,k.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,k.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,k.registerColor)("symbolIcon.fileForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,k.registerColor)("symbolIcon.folderForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,k.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,k.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,k.registerColor)("symbolIcon.keyForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,k.registerColor)("symbolIcon.keywordForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,k.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,k.registerColor)("symbolIcon.moduleForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,k.registerColor)("symbolIcon.namespaceForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,k.registerColor)("symbolIcon.nullForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,k.registerColor)("symbolIcon.numberForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,k.registerColor)("symbolIcon.objectForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,k.registerColor)("symbolIcon.operatorForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,k.registerColor)("symbolIcon.packageForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,k.registerColor)("symbolIcon.propertyForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,k.registerColor)("symbolIcon.referenceForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,k.registerColor)("symbolIcon.snippetForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,k.registerColor)("symbolIcon.stringForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,k.registerColor)("symbolIcon.structForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,k.registerColor)("symbolIcon.textForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,k.registerColor)("symbolIcon.typeParameterForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,k.registerColor)("symbolIcon.unitForeground",{dark:k.foreground,light:k.foreground,hcDark:k.foreground,hcLight:k.foreground},(0,L.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,k.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(32,null))}),define(ie[833],ne([1,0,26,114,651,175,252]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const E=Object.freeze({kind:k.CodeActionKind.Empty,title:(0,y.localize)(0,null)}),_=Object.freeze([{kind:k.CodeActionKind.QuickFix,title:(0,y.localize)(1,null)},{kind:k.CodeActionKind.RefactorExtract,title:(0,y.localize)(2,null),icon:L.Codicon.wrench},{kind:k.CodeActionKind.RefactorInline,title:(0,y.localize)(3,null),icon:L.Codicon.wrench},{kind:k.CodeActionKind.RefactorRewrite,title:(0,y.localize)(4,null),icon:L.Codicon.wrench},{kind:k.CodeActionKind.RefactorMove,title:(0,y.localize)(5,null),icon:L.Codicon.wrench},{kind:k.CodeActionKind.SurroundWith,title:(0,y.localize)(6,null),icon:L.Codicon.symbolSnippet},{kind:k.CodeActionKind.Source,title:(0,y.localize)(7,null),icon:L.Codicon.symbolFile},E]);function p(S,v,b){if(!v)return S.map(n=>{var t;return{kind:"action",item:n,group:E,disabled:!!n.action.disabled,label:n.action.disabled||n.action.title,canPreview:!!(!((t=n.action.edit)===null||t===void 0)&&t.edits.length)}});const o=_.map(n=>({group:n,actions:[]}));for(const n of S){const t=n.action.kind?new k.CodeActionKind(n.action.kind):k.CodeActionKind.None;for(const a of o)if(a.group.kind.contains(t)){a.actions.push(n);break}}const i=[];for(const n of o)if(n.actions.length){i.push({kind:"header",group:n.group});for(const t of n.actions){const a=n.group;i.push({kind:"action",item:t,group:t.action.isAI?{title:a.title,kind:a.kind,icon:L.Codicon.sparkle}:a,label:t.action.title,disabled:!!t.action.disabled,keybinding:b(t.action)})}}return i}e.toMenuItems=p}),define(ie[105],ne([1,0,30,38]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultMenuStyles=e.defaultSelectBoxStyles=e.getListStyles=e.defaultListStyles=e.defaultBreadcrumbsWidgetStyles=e.defaultCountBadgeStyles=e.defaultFindWidgetStyles=e.defaultInputBoxStyles=e.defaultDialogStyles=e.defaultCheckboxStyles=e.defaultToggleStyles=e.defaultProgressBarStyles=e.defaultButtonStyles=e.defaultKeybindingLabelStyles=void 0;function y(_,p){const S={...p};for(const v in _){const b=_[v];S[v]=b!==void 0?(0,L.asCssVariable)(b):void 0}return S}e.defaultKeybindingLabelStyles={keybindingLabelBackground:(0,L.asCssVariable)(L.keybindingLabelBackground),keybindingLabelForeground:(0,L.asCssVariable)(L.keybindingLabelForeground),keybindingLabelBorder:(0,L.asCssVariable)(L.keybindingLabelBorder),keybindingLabelBottomBorder:(0,L.asCssVariable)(L.keybindingLabelBottomBorder),keybindingLabelShadow:(0,L.asCssVariable)(L.widgetShadow)},e.defaultButtonStyles={buttonForeground:(0,L.asCssVariable)(L.buttonForeground),buttonSeparator:(0,L.asCssVariable)(L.buttonSeparator),buttonBackground:(0,L.asCssVariable)(L.buttonBackground),buttonHoverBackground:(0,L.asCssVariable)(L.buttonHoverBackground),buttonSecondaryForeground:(0,L.asCssVariable)(L.buttonSecondaryForeground),buttonSecondaryBackground:(0,L.asCssVariable)(L.buttonSecondaryBackground),buttonSecondaryHoverBackground:(0,L.asCssVariable)(L.buttonSecondaryHoverBackground),buttonBorder:(0,L.asCssVariable)(L.buttonBorder)},e.defaultProgressBarStyles={progressBarBackground:(0,L.asCssVariable)(L.progressBarBackground)},e.defaultToggleStyles={inputActiveOptionBorder:(0,L.asCssVariable)(L.inputActiveOptionBorder),inputActiveOptionForeground:(0,L.asCssVariable)(L.inputActiveOptionForeground),inputActiveOptionBackground:(0,L.asCssVariable)(L.inputActiveOptionBackground)},e.defaultCheckboxStyles={checkboxBackground:(0,L.asCssVariable)(L.checkboxBackground),checkboxBorder:(0,L.asCssVariable)(L.checkboxBorder),checkboxForeground:(0,L.asCssVariable)(L.checkboxForeground)},e.defaultDialogStyles={dialogBackground:(0,L.asCssVariable)(L.editorWidgetBackground),dialogForeground:(0,L.asCssVariable)(L.editorWidgetForeground),dialogShadow:(0,L.asCssVariable)(L.widgetShadow),dialogBorder:(0,L.asCssVariable)(L.contrastBorder),errorIconForeground:(0,L.asCssVariable)(L.problemsErrorIconForeground),warningIconForeground:(0,L.asCssVariable)(L.problemsWarningIconForeground),infoIconForeground:(0,L.asCssVariable)(L.problemsInfoIconForeground),textLinkForeground:(0,L.asCssVariable)(L.textLinkForeground)},e.defaultInputBoxStyles={inputBackground:(0,L.asCssVariable)(L.inputBackground),inputForeground:(0,L.asCssVariable)(L.inputForeground),inputBorder:(0,L.asCssVariable)(L.inputBorder),inputValidationInfoBorder:(0,L.asCssVariable)(L.inputValidationInfoBorder),inputValidationInfoBackground:(0,L.asCssVariable)(L.inputValidationInfoBackground),inputValidationInfoForeground:(0,L.asCssVariable)(L.inputValidationInfoForeground),inputValidationWarningBorder:(0,L.asCssVariable)(L.inputValidationWarningBorder),inputValidationWarningBackground:(0,L.asCssVariable)(L.inputValidationWarningBackground),inputValidationWarningForeground:(0,L.asCssVariable)(L.inputValidationWarningForeground),inputValidationErrorBorder:(0,L.asCssVariable)(L.inputValidationErrorBorder),inputValidationErrorBackground:(0,L.asCssVariable)(L.inputValidationErrorBackground),inputValidationErrorForeground:(0,L.asCssVariable)(L.inputValidationErrorForeground)},e.defaultFindWidgetStyles={listFilterWidgetBackground:(0,L.asCssVariable)(L.listFilterWidgetBackground),listFilterWidgetOutline:(0,L.asCssVariable)(L.listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:(0,L.asCssVariable)(L.listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:(0,L.asCssVariable)(L.listFilterWidgetShadow),inputBoxStyles:e.defaultInputBoxStyles,toggleStyles:e.defaultToggleStyles},e.defaultCountBadgeStyles={badgeBackground:(0,L.asCssVariable)(L.badgeBackground),badgeForeground:(0,L.asCssVariable)(L.badgeForeground),badgeBorder:(0,L.asCssVariable)(L.contrastBorder)},e.defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:(0,L.asCssVariable)(L.breadcrumbsBackground),breadcrumbsForeground:(0,L.asCssVariable)(L.breadcrumbsForeground),breadcrumbsHoverForeground:(0,L.asCssVariable)(L.breadcrumbsFocusForeground),breadcrumbsFocusForeground:(0,L.asCssVariable)(L.breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:(0,L.asCssVariable)(L.breadcrumbsActiveSelectionForeground)},e.defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,L.asCssVariable)(L.listFocusBackground),listFocusForeground:(0,L.asCssVariable)(L.listFocusForeground),listFocusOutline:(0,L.asCssVariable)(L.listFocusOutline),listActiveSelectionBackground:(0,L.asCssVariable)(L.listActiveSelectionBackground),listActiveSelectionForeground:(0,L.asCssVariable)(L.listActiveSelectionForeground),listActiveSelectionIconForeground:(0,L.asCssVariable)(L.listActiveSelectionIconForeground),listFocusAndSelectionOutline:(0,L.asCssVariable)(L.listFocusAndSelectionOutline),listFocusAndSelectionBackground:(0,L.asCssVariable)(L.listActiveSelectionBackground),listFocusAndSelectionForeground:(0,L.asCssVariable)(L.listActiveSelectionForeground),listInactiveSelectionBackground:(0,L.asCssVariable)(L.listInactiveSelectionBackground),listInactiveSelectionIconForeground:(0,L.asCssVariable)(L.listInactiveSelectionIconForeground),listInactiveSelectionForeground:(0,L.asCssVariable)(L.listInactiveSelectionForeground),listInactiveFocusBackground:(0,L.asCssVariable)(L.listInactiveFocusBackground),listInactiveFocusOutline:(0,L.asCssVariable)(L.listInactiveFocusOutline),listHoverBackground:(0,L.asCssVariable)(L.listHoverBackground),listHoverForeground:(0,L.asCssVariable)(L.listHoverForeground),listDropBackground:(0,L.asCssVariable)(L.listDropBackground),listSelectionOutline:(0,L.asCssVariable)(L.activeContrastBorder),listHoverOutline:(0,L.asCssVariable)(L.activeContrastBorder),treeIndentGuidesStroke:(0,L.asCssVariable)(L.treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:(0,L.asCssVariable)(L.treeInactiveIndentGuidesStroke),tableColumnsBorder:(0,L.asCssVariable)(L.tableColumnsBorder),tableOddRowsBackgroundColor:(0,L.asCssVariable)(L.tableOddRowsBackgroundColor)};function E(_){return y(_,e.defaultListStyles)}e.getListStyles=E,e.defaultSelectBoxStyles={selectBackground:(0,L.asCssVariable)(L.selectBackground),selectListBackground:(0,L.asCssVariable)(L.selectListBackground),selectForeground:(0,L.asCssVariable)(L.selectForeground),decoratorRightForeground:(0,L.asCssVariable)(L.pickerGroupForeground),selectBorder:(0,L.asCssVariable)(L.selectBorder),focusBorder:(0,L.asCssVariable)(L.focusBorder),listFocusBackground:(0,L.asCssVariable)(L.quickInputListFocusBackground),listInactiveSelectionIconForeground:(0,L.asCssVariable)(L.quickInputListFocusIconForeground),listFocusForeground:(0,L.asCssVariable)(L.quickInputListFocusForeground),listFocusOutline:(0,L.asCssVariableWithDefault)(L.activeContrastBorder,k.Color.transparent.toString()),listHoverBackground:(0,L.asCssVariable)(L.listHoverBackground),listHoverForeground:(0,L.asCssVariable)(L.listHoverForeground),listHoverOutline:(0,L.asCssVariable)(L.activeContrastBorder),selectListBorder:(0,L.asCssVariable)(L.editorWidgetBorder),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},e.defaultMenuStyles={shadowColor:(0,L.asCssVariable)(L.widgetShadow),borderColor:(0,L.asCssVariable)(L.menuBorder),foregroundColor:(0,L.asCssVariable)(L.menuForeground),backgroundColor:(0,L.asCssVariable)(L.menuBackground),selectionForegroundColor:(0,L.asCssVariable)(L.menuSelectionForeground),selectionBackgroundColor:(0,L.asCssVariable)(L.menuSelectionBackground),selectionBorderColor:(0,L.asCssVariable)(L.menuSelectionBorder),separatorColor:(0,L.asCssVariable)(L.menuSeparatorBackground),scrollbarShadow:(0,L.asCssVariable)(L.scrollbarShadow),scrollbarSliderBackground:(0,L.asCssVariable)(L.scrollbarSliderBackground),scrollbarSliderHoverBackground:(0,L.asCssVariable)(L.scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:(0,L.asCssVariable)(L.scrollbarSliderActiveBackground)}}),define(ie[834],ne([1,0,7,315,316,230,71,2,45,68,676,8,34,164,105,160]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let f=class{constructor(w){this._resolverService=w}hasChildren(w){return w instanceof a.ReferencesModel||w instanceof a.FileReferences}getChildren(w){if(w instanceof a.ReferencesModel)return w.groups;if(w instanceof a.FileReferences)return w.resolve(this._resolverService).then(D=>D.children);throw new Error("bad tree")}};e.DataSource=f,e.DataSource=f=Ee([he(0,v.ITextModelService)],f);class c{getHeight(){return 23}getTemplateId(w){return w instanceof a.FileReferences?s.id:h.id}}e.Delegate=c;let d=class{constructor(w){this._keybindingService=w}getKeyboardNavigationLabel(w){var D;if(w instanceof a.OneReference){const I=(D=w.parent.getPreview(w))===null||D===void 0?void 0:D.preview(w.range);if(I)return I.value}return(0,S.basename)(w.uri)}};e.StringRepresentationProvider=d,e.StringRepresentationProvider=d=Ee([he(0,i.IKeybindingService)],d);class r{getId(w){return w instanceof a.OneReference?w.id:w.uri}}e.IdentityProvider=r;let l=class extends p.Disposable{constructor(w,D){super(),this._labelService=D;const I=document.createElement("div");I.classList.add("reference-file"),this.file=this._register(new E.IconLabel(I,{supportHighlights:!0})),this.badge=new k.CountBadge(L.append(I,L.$(".count")),{},t.defaultCountBadgeStyles),w.appendChild(I)}set(w,D){const I=(0,S.dirname)(w.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(w.uri),this._labelService.getUriLabel(I,{relative:!0}),{title:this._labelService.getUriLabel(w.uri),matches:D});const M=w.children.length;this.badge.setCount(M),M>1?this.badge.setTitleFormat((0,b.localize)(0,null,M)):this.badge.setTitleFormat((0,b.localize)(1,null,M))}};l=Ee([he(1,n.ILabelService)],l);let s=u=class{constructor(w){this._instantiationService=w,this.templateId=u.id}renderTemplate(w){return this._instantiationService.createInstance(l,w)}renderElement(w,D,I){I.set(w.element,(0,_.createMatches)(w.filterData))}disposeTemplate(w){w.dispose()}};e.FileReferencesRenderer=s,s.id="FileReferencesRenderer",e.FileReferencesRenderer=s=u=Ee([he(0,o.IInstantiationService)],s);class g{constructor(w){this.label=new y.HighlightedLabel(w)}set(w,D){var I;const M=(I=w.parent.getPreview(w))===null||I===void 0?void 0:I.preview(w.range);if(!M||!M.value)this.label.set(`${(0,S.basename)(w.uri)}:${w.range.startLineNumber+1}:${w.range.startColumn+1}`);else{const{value:A,highlight:O}=M;D&&!_.FuzzyScore.isDefault(D)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(A,(0,_.createMatches)(D))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(A,[O]))}}}class h{constructor(){this.templateId=h.id}renderTemplate(w){return new g(w)}renderElement(w,D,I){I.set(w.element,w.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=h,h.id="OneReferenceRenderer";class m{getWidgetAriaLabel(){return(0,b.localize)(2,null)}getAriaLabel(w){return w.ariaMessage}}e.AccessibilityProvider=m}),define(ie[835],ne([1,0,7,225,116,19,26,2,17,27,724,59,34,105,30,273]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionList=e.previewSelectedActionCommand=e.acceptSelectedActionCommand=void 0,e.acceptSelectedActionCommand="acceptSelectedCodeAction",e.previewSelectedActionCommand="previewSelectedCodeAction";class a{get templateId(){return"header"}renderTemplate(g){g.classList.add("group-header");const h=document.createElement("span");return g.append(h),{container:g,text:h}}renderElement(g,h,m){var C,w;m.text.textContent=(w=(C=g.group)===null||C===void 0?void 0:C.title)!==null&&w!==void 0?w:""}disposeTemplate(g){}}let u=class{get templateId(){return"action"}constructor(g,h){this._supportsPreview=g,this._keybindingService=h}renderTemplate(g){g.classList.add(this.templateId);const h=document.createElement("div");h.className="icon",g.append(h);const m=document.createElement("span");m.className="title",g.append(m);const C=new k.KeybindingLabel(g,S.OS);return{container:g,icon:h,text:m,keybinding:C}}renderElement(g,h,m){var C,w,D;if(!((C=g.group)===null||C===void 0)&&C.icon?(m.icon.className=v.ThemeIcon.asClassName(g.group.icon),g.group.icon.color&&(m.icon.style.color=(0,t.asCssVariable)(g.group.icon.color.id))):(m.icon.className=v.ThemeIcon.asClassName(_.Codicon.lightBulb),m.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!g.item||!g.label)return;m.text.textContent=l(g.label),m.keybinding.set(g.keybinding),L.setVisibility(!!g.keybinding,m.keybinding.element);const I=(w=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand))===null||w===void 0?void 0:w.getLabel(),M=(D=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand))===null||D===void 0?void 0:D.getLabel();m.container.classList.toggle("option-disabled",g.disabled),g.disabled?m.container.title=g.label:I&&M?this._supportsPreview&&g.canPreview?m.container.title=(0,b.localize)(0,null,I,M):m.container.title=(0,b.localize)(1,null,I):m.container.title=""}disposeTemplate(g){}};u=Ee([he(1,i.IKeybindingService)],u);class f extends UIEvent{constructor(){super("acceptSelectedAction")}}class c extends UIEvent{constructor(){super("previewSelectedAction")}}function d(s){if(s.kind==="action")return s.label}let r=class extends p.Disposable{constructor(g,h,m,C,w,D){super(),this._delegate=C,this._contextViewService=w,this._keybindingService=D,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new E.CancellationTokenSource),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const I={getHeight:M=>M.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:M=>M.kind};this._list=this._register(new y.List(g,this.domNode,I,[new u(h,this._keybindingService),new a],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:d},accessibilityProvider:{getAriaLabel:M=>{if(M.kind==="action"){let A=M.label?l(M?.label):"";return M.disabled&&(A=(0,b.localize)(2,null,A,M.disabled)),A}return null},getWidgetAriaLabel:()=>(0,b.localize)(3,null),getRole:M=>M.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(n.defaultListStyles),this._register(this._list.onMouseClick(M=>this.onListClick(M))),this._register(this._list.onMouseOver(M=>this.onListHover(M))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(M=>this.onListSelection(M))),this._allMenuItems=m,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(g){return!g.disabled&&g.kind==="action"}hide(g){this._delegate.onHide(g),this.cts.cancel(),this._contextViewService.hideContextView()}layout(g){const h=this._allMenuItems.filter(M=>M.kind==="header").length,C=this._allMenuItems.length*this._actionLineHeight+h*this._headerLineHeight-h*this._actionLineHeight;this._list.layout(C);let w=g;if(this._allMenuItems.length>=50)w=380;else{const M=this._allMenuItems.map((A,O)=>{const T=this.domNode.ownerDocument.getElementById(this._list.getElementID(O));if(T){T.style.width="auto";const N=T.getBoundingClientRect().width;return T.style.width="",N}return 0});w=Math.max(...M,g)}const D=.7,I=Math.min(C,this.domNode.ownerDocument.body.clientHeight*D);return this._list.layout(I,w),this.domNode.style.height=`${I}px`,this._list.domFocus(),w}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(g){const h=this._list.getFocus();if(h.length===0)return;const m=h[0],C=this._list.element(m);if(!this.focusCondition(C))return;const w=g?new c:new f;this._list.setSelection([m],w)}onListSelection(g){if(!g.elements.length)return;const h=g.elements[0];h.item&&this.focusCondition(h)?this._delegate.onSelect(h.item,g.browserEvent instanceof c):this._list.setSelection([])}onFocus(){var g,h;this._list.domFocus();const m=this._list.getFocus();if(m.length===0)return;const C=m[0],w=this._list.element(C);(h=(g=this._delegate).onFocus)===null||h===void 0||h.call(g,w.item)}async onListHover(g){const h=g.element;if(h&&h.item&&this.focusCondition(h)){if(this._delegate.onHover&&!h.disabled&&h.kind==="action"){const m=await this._delegate.onHover(h.item,this.cts.token);h.canPreview=m?m.canPreview:void 0}g.index&&this._list.splice(g.index,1,[h])}this._list.setFocus(typeof g.index=="number"?[g.index]:[])}onListClick(g){g.element&&this.focusCondition(g.element)&&this._list.setFocus([])}};e.ActionList=r,e.ActionList=r=Ee([he(4,o.IContextViewService),he(5,i.IKeybindingService)],r);function l(s){return s.replace(/\r\n|\r|\n/g," ")}}),define(ie[836],ne([1,0,7,77,2,725,835,29,15,59,46,8,30,273]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0,(0,i.registerColor)("actionBar.toggledBackground",{dark:i.inputActiveOptionBackground,light:i.inputActiveOptionBackground,hcDark:i.inputActiveOptionBackground,hcLight:i.inputActiveOptionBackground},(0,E.localize)(0,null));const n={Visible:new S.RawContextKey("codeActionMenuVisible",!1,(0,E.localize)(1,null))};e.IActionWidgetService=(0,o.createDecorator)("actionWidgetService");let t=class extends y.Disposable{get isVisible(){return n.Visible.getValue(this._contextKeyService)||!1}constructor(f,c,d){super(),this._contextViewService=f,this._contextKeyService=c,this._instantiationService=d,this._list=this._register(new y.MutableDisposable)}show(f,c,d,r,l,s,g){const h=n.Visible.bindTo(this._contextKeyService),m=this._instantiationService.createInstance(_.ActionList,f,c,d,r);this._contextViewService.showContextView({getAnchor:()=>l,render:C=>(h.set(!0),this._renderWidget(C,m,g??[])),onHide:C=>{h.reset(),this._onWidgetClosed(C)}},s,!1)}acceptSelected(f){var c;(c=this._list.value)===null||c===void 0||c.acceptSelected(f)}focusPrevious(){var f,c;(c=(f=this._list)===null||f===void 0?void 0:f.value)===null||c===void 0||c.focusPrevious()}focusNext(){var f,c;(c=(f=this._list)===null||f===void 0?void 0:f.value)===null||c===void 0||c.focusNext()}hide(){var f;(f=this._list.value)===null||f===void 0||f.hide(),this._list.clear()}_renderWidget(f,c,d){var r;const l=document.createElement("div");if(l.classList.add("action-widget"),f.appendChild(l),this._list.value=c,this._list.value)l.appendChild(this._list.value.domNode);else throw new Error("List has no value");const s=new y.DisposableStore,g=document.createElement("div"),h=f.appendChild(g);h.classList.add("context-view-block"),s.add(L.addDisposableListener(h,L.EventType.MOUSE_DOWN,M=>M.stopPropagation()));const m=document.createElement("div"),C=f.appendChild(m);C.classList.add("context-view-pointerBlock"),s.add(L.addDisposableListener(C,L.EventType.POINTER_MOVE,()=>C.remove())),s.add(L.addDisposableListener(C,L.EventType.MOUSE_DOWN,()=>C.remove()));let w=0;if(d.length){const M=this._createActionBar(".action-widget-action-bar",d);M&&(l.appendChild(M.getContainer().parentElement),s.add(M),w=M.getContainer().offsetWidth)}const D=(r=this._list.value)===null||r===void 0?void 0:r.layout(w);l.style.width=`${D}px`;const I=s.add(L.trackFocus(f));return s.add(I.onDidBlur(()=>this.hide())),s}_createActionBar(f,c){if(!c.length)return;const d=L.$(f),r=new k.ActionBar(d);return r.push(c,{icon:!1,label:!0}),r}_onWidgetClosed(f){var c;(c=this._list.value)===null||c===void 0||c.hide(f)}};t=Ee([he(0,v.IContextViewService),he(1,S.IContextKeyService),he(2,o.IInstantiationService)],t),(0,b.registerSingleton)(e.IActionWidgetService,t,1);const a=100+1e3;(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,E.localize)(2,null),original:"Hide action widget"},precondition:n.Visible,keybinding:{weight:a,primary:9,secondary:[1033]}})}run(u){u.get(e.IActionWidgetService).hide()}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,E.localize)(3,null),original:"Select previous action"},precondition:n.Visible,keybinding:{weight:a,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.focusPrevious()}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:(0,E.localize)(4,null),original:"Select next action"},precondition:n.Visible,keybinding:{weight:a,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.focusNext()}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:_.acceptSelectedActionCommand,title:{value:(0,E.localize)(5,null),original:"Accept selected action"},precondition:n.Visible,keybinding:{weight:a,primary:3,secondary:[2137]}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.acceptSelected()}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:_.previewSelectedActionCommand,title:{value:(0,E.localize)(6,null),original:"Preview selected action"},precondition:n.Visible,keybinding:{weight:a,primary:2051}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.acceptSelected(!0)}})}),define(ie[837],ne([1,0,7,67,594,41,9,2,105]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class v{constructor(o,i,n,t){this.contextViewService=o,this.telemetryService=i,this.notificationService=n,this.keybindingService=t,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(o){this.options=o}showContextMenu(o){const i=o.getActions();if(!i.length)return;this.focusToReturn=(0,L.getActiveElement)();let n;const t=o.domForShadowRoot instanceof HTMLElement?o.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>o.getAnchor(),canRelayout:!1,anchorAlignment:o.anchorAlignment,anchorAxisAlignment:o.anchorAxisAlignment,render:a=>{var u;this.lastContainer=a;const f=o.getMenuClassName?o.getMenuClassName():"";f&&(a.className+=" "+f),this.options.blockMouse&&(this.block=a.appendChild((0,L.$)(".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",(u=this.blockDisposable)===null||u===void 0||u.dispose(),this.blockDisposable=(0,L.addDisposableListener)(this.block,L.EventType.MOUSE_DOWN,l=>l.stopPropagation()));const c=new p.DisposableStore,d=o.actionRunner||new E.ActionRunner;d.onWillRun(l=>this.onActionRun(l,!o.skipTelemetry),this,c),d.onDidRun(this.onDidActionRun,this,c),n=new y.Menu(a,i,{actionViewItemProvider:o.getActionViewItem,context:o.getActionsContext?o.getActionsContext():null,actionRunner:d,getKeyBinding:o.getKeyBinding?o.getKeyBinding:l=>this.keybindingService.lookupKeybinding(l.id)},S.defaultMenuStyles),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,c),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,c);const r=(0,L.getWindow)(a);return c.add((0,L.addDisposableListener)(r,L.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),c.add((0,L.addDisposableListener)(r,L.EventType.MOUSE_DOWN,l=>{if(l.defaultPrevented)return;const s=new k.StandardMouseEvent(r,l);let g=s.target;if(!s.rightButton){for(;g;){if(g===a)return;g=g.parentElement}this.contextViewService.hideContextView(!0)}})),(0,p.combinedDisposable)(c,n)},focus:()=>{n?.focus(!!o.autoSelectFirstItem)},onHide:a=>{var u,f,c;(u=o.onHide)===null||u===void 0||u.call(o,!!a),this.block&&(this.block.remove(),this.block=null),(f=this.blockDisposable)===null||f===void 0||f.dispose(),this.blockDisposable=null,this.lastContainer&&((0,L.getActiveElement)()===this.lastContainer||(0,L.isAncestor)((0,L.getActiveElement)(),this.lastContainer))&&((c=this.focusToReturn)===null||c===void 0||c.focus()),this.lastContainer=null}},t,!!t)}onActionRun(o,i){i&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:o.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(o){o.error&&!(0,_.isCancellationError)(o.error)&&this.notificationService.error(o.error)}}e.ContextMenuHandler=v}),define(ie[192],ne([1,0,7,589,116,590,185,597,596,323,6,2,737,28,97,15,241,59,8,34,780,37,105]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=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.WorkbenchListScrollAtBottomContextKey=e.WorkbenchListScrollAtTopContextKey=e.RawWorkbenchListScrollAtBoundaryContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,c.createDecorator)("listService");class g{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new o.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(me){var ve,Ce;me!==this._lastFocusedWidget&&((ve=this._lastFocusedWidget)===null||ve===void 0||ve.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=me,(Ce=this._lastFocusedWidget)===null||Ce===void 0||Ce.getHTMLElement().classList.add("last-focused"))}register(me,ve){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new y.DefaultStyleController((0,L.createStyleSheet)(),"").style(s.defaultListStyles)),this.lists.some(Se=>Se.widget===me))throw new Error("Cannot register the same widget multiple times");const Ce={widget:me,extraContextKeys:ve};return this.lists.push(Ce),(0,L.isActiveElement)(me.getHTMLElement())&&this.setLastFocusedList(me),(0,o.combinedDisposable)(me.onDidFocus(()=>this.setLastFocusedList(me)),(0,o.toDisposable)(()=>this.lists.splice(this.lists.indexOf(Ce),1)),me.onDidDispose(()=>{this.lists=this.lists.filter(Se=>Se!==Ce),this._lastFocusedWidget===me&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}e.ListService=g,e.RawWorkbenchListScrollAtBoundaryContextKey=new a.RawContextKey("listScrollAtBoundary","none"),e.WorkbenchListScrollAtTopContextKey=a.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("top"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.WorkbenchListScrollAtBottomContextKey=a.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("bottom"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.RawWorkbenchListFocusContextKey=new a.RawContextKey("listFocus",!0),e.WorkbenchListSupportsMultiSelectContextKey=new a.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=a.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,a.ContextKeyExpr.not(u.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new a.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new a.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new a.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new a.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new a.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new a.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new a.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new a.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new a.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new a.RawContextKey("treeFindOpen",!1);const h="listTypeNavigationMode",m="listAutomaticKeyboardNavigation";function C(pe,me){const ve=pe.createScoped(me.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(ve),ve}function w(pe,me){const ve=e.RawWorkbenchListScrollAtBoundaryContextKey.bindTo(pe),Ce=()=>{const Se=me.scrollTop===0,_e=me.scrollHeight-me.renderHeight-me.scrollTop<1;Se&&_e?ve.set("both"):Se?ve.set("top"):_e?ve.set("bottom"):ve.set("none")};return Ce(),me.onDidScroll(Ce)}const D="workbench.list.multiSelectModifier",I="workbench.list.openMode",M="workbench.list.horizontalScrolling",A="workbench.list.defaultFindMode",O="workbench.list.typeNavigationMode",T="workbench.list.keyboardNavigation",N="workbench.list.scrollByPage",P="workbench.list.defaultFindMatchType",x="workbench.tree.indent",R="workbench.tree.renderIndentGuides",B="workbench.list.smoothScrolling",W="workbench.list.mouseWheelScrollSensitivity",V="workbench.list.fastScrollSensitivity",U="workbench.tree.expandMode",F="workbench.tree.enableStickyScroll",j="workbench.tree.stickyScrollMaxItemCount";function J(pe){return pe.getValue(D)==="alt"}class le extends o.Disposable{constructor(me){super(),this.configurationService=me,this.useAltAsMultipleSelectionModifier=J(me),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(me=>{me.affectsConfiguration(D)&&(this.useAltAsMultipleSelectionModifier=J(this.configurationService))}))}isSelectionSingleChangeEvent(me){return this.useAltAsMultipleSelectionModifier?me.browserEvent.altKey:(0,y.isSelectionSingleChangeEvent)(me)}isSelectionRangeChangeEvent(me){return(0,y.isSelectionRangeChangeEvent)(me)}}function ee(pe,me){var ve;const Ce=pe.get(n.IConfigurationService),Se=pe.get(d.IKeybindingService),_e=new o.DisposableStore;return[{...me,keyboardNavigationDelegate:{mightProducePrintableCharacter(Me){return Se.mightProducePrintableCharacter(Me)}},smoothScrolling:!!Ce.getValue(B),mouseWheelScrollSensitivity:Ce.getValue(W),fastScrollSensitivity:Ce.getValue(V),multipleSelectionController:(ve=me.multipleSelectionController)!==null&&ve!==void 0?ve:_e.add(new le(Ce)),keyboardNavigationEventFilter:re(Se),scrollByPage:!!Ce.getValue(N)},_e]}let $=class extends y.List{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be){const Le=typeof _e.horizontalScrolling<"u"?_e.horizontalScrolling:!!Pe.getValue(M),[Ne,fe]=Be.invokeFunction(ee,_e);super(me,ve,Ce,Se,{keyboardSupport:!1,...Ne,horizontalScrolling:Le}),this.disposables.add(fe),this.contextKeyService=C(Te,this),this.disposables.add(w(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(_e.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!_e.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=_e.horizontalScrolling,this._useAltAsMultipleSelectionModifier=J(Pe),this.disposables.add(this.contextKeyService),this.disposables.add(Me.register(this)),this.updateStyles(_e.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const ke=this.getSelection(),Re=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(ke.length>0||Re.length>0),this.listMultiSelection.set(ke.length>1),this.listDoubleSelection.set(ke.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const ke=this.getSelection(),Re=this.getFocus();this.listHasSelectionOrFocus.set(ke.length>0||Re.length>0)})),this.disposables.add(Pe.onDidChangeConfiguration(ke=>{ke.affectsConfiguration(D)&&(this._useAltAsMultipleSelectionModifier=J(Pe));let Re={};if(ke.affectsConfiguration(M)&&this.horizontalScrolling===void 0){const Ve=!!Pe.getValue(M);Re={...Re,horizontalScrolling:Ve}}if(ke.affectsConfiguration(N)){const Ve=!!Pe.getValue(N);Re={...Re,scrollByPage:Ve}}if(ke.affectsConfiguration(B)){const Ve=!!Pe.getValue(B);Re={...Re,smoothScrolling:Ve}}if(ke.affectsConfiguration(W)){const Ve=Pe.getValue(W);Re={...Re,mouseWheelScrollSensitivity:Ve}}if(ke.affectsConfiguration(V)){const Ve=Pe.getValue(V);Re={...Re,fastScrollSensitivity:Ve}}Object.keys(Re).length>0&&this.updateOptions(Re)})),this.navigator=new ue(this,{configurationService:Pe,..._e}),this.disposables.add(this.navigator)}updateOptions(me){super.updateOptions(me),me.overrideStyles!==void 0&&this.updateStyles(me.overrideStyles),me.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!me.multipleSelectionSupport)}updateStyles(me){this.style(me?(0,s.getListStyles)(me):s.defaultListStyles)}};e.WorkbenchList=$,e.WorkbenchList=$=Ee([he(5,a.IContextKeyService),he(6,e.IListService),he(7,n.IConfigurationService),he(8,c.IInstantiationService)],$);let te=class extends k.PagedList{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be){const Le=typeof _e.horizontalScrolling<"u"?_e.horizontalScrolling:!!Pe.getValue(M),[Ne,fe]=Be.invokeFunction(ee,_e);super(me,ve,Ce,Se,{keyboardSupport:!1,...Ne,horizontalScrolling:Le}),this.disposables=new o.DisposableStore,this.disposables.add(fe),this.contextKeyService=C(Te,this),this.disposables.add(w(this.contextKeyService,this.widget)),this.horizontalScrolling=_e.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(_e.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!_e.selectionNavigation),this._useAltAsMultipleSelectionModifier=J(Pe),this.disposables.add(this.contextKeyService),this.disposables.add(Me.register(this)),this.updateStyles(_e.overrideStyles),this.disposables.add(Pe.onDidChangeConfiguration(ke=>{ke.affectsConfiguration(D)&&(this._useAltAsMultipleSelectionModifier=J(Pe));let Re={};if(ke.affectsConfiguration(M)&&this.horizontalScrolling===void 0){const Ve=!!Pe.getValue(M);Re={...Re,horizontalScrolling:Ve}}if(ke.affectsConfiguration(N)){const Ve=!!Pe.getValue(N);Re={...Re,scrollByPage:Ve}}if(ke.affectsConfiguration(B)){const Ve=!!Pe.getValue(B);Re={...Re,smoothScrolling:Ve}}if(ke.affectsConfiguration(W)){const Ve=Pe.getValue(W);Re={...Re,mouseWheelScrollSensitivity:Ve}}if(ke.affectsConfiguration(V)){const Ve=Pe.getValue(V);Re={...Re,fastScrollSensitivity:Ve}}Object.keys(Re).length>0&&this.updateOptions(Re)})),this.navigator=new ue(this,{configurationService:Pe,..._e}),this.disposables.add(this.navigator)}updateOptions(me){super.updateOptions(me),me.overrideStyles!==void 0&&this.updateStyles(me.overrideStyles),me.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!me.multipleSelectionSupport)}updateStyles(me){this.style(me?(0,s.getListStyles)(me):s.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=te,e.WorkbenchPagedList=te=Ee([he(5,a.IContextKeyService),he(6,e.IListService),he(7,n.IConfigurationService),he(8,c.IInstantiationService)],te);let G=class extends E.Table{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le){const Ne=typeof Te.horizontalScrolling<"u"?Te.horizontalScrolling:!!Be.getValue(M),[fe,be]=Le.invokeFunction(ee,Te);super(me,ve,Ce,Se,_e,{keyboardSupport:!1,...fe,horizontalScrolling:Ne}),this.disposables.add(be),this.contextKeyService=C(Me,this),this.disposables.add(w(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Te.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Te.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Te.horizontalScrolling,this._useAltAsMultipleSelectionModifier=J(Be),this.disposables.add(this.contextKeyService),this.disposables.add(Pe.register(this)),this.updateStyles(Te.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Re=this.getSelection(),Ve=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Re.length>0||Ve.length>0),this.listMultiSelection.set(Re.length>1),this.listDoubleSelection.set(Re.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Re=this.getSelection(),Ve=this.getFocus();this.listHasSelectionOrFocus.set(Re.length>0||Ve.length>0)})),this.disposables.add(Be.onDidChangeConfiguration(Re=>{Re.affectsConfiguration(D)&&(this._useAltAsMultipleSelectionModifier=J(Be));let Ve={};if(Re.affectsConfiguration(M)&&this.horizontalScrolling===void 0){const Ke=!!Be.getValue(M);Ve={...Ve,horizontalScrolling:Ke}}if(Re.affectsConfiguration(N)){const Ke=!!Be.getValue(N);Ve={...Ve,scrollByPage:Ke}}if(Re.affectsConfiguration(B)){const Ke=!!Be.getValue(B);Ve={...Ve,smoothScrolling:Ke}}if(Re.affectsConfiguration(W)){const Ke=Be.getValue(W);Ve={...Ve,mouseWheelScrollSensitivity:Ke}}if(Re.affectsConfiguration(V)){const Ke=Be.getValue(V);Ve={...Ve,fastScrollSensitivity:Ke}}Object.keys(Ve).length>0&&this.updateOptions(Ve)})),this.navigator=new X(this,{configurationService:Be,...Te}),this.disposables.add(this.navigator)}updateOptions(me){super.updateOptions(me),me.overrideStyles!==void 0&&this.updateStyles(me.overrideStyles),me.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!me.multipleSelectionSupport)}updateStyles(me){this.style(me?(0,s.getListStyles)(me):s.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=G,e.WorkbenchTable=G=Ee([he(6,a.IContextKeyService),he(7,e.IListService),he(8,n.IConfigurationService),he(9,c.IInstantiationService)],G);class de extends o.Disposable{constructor(me,ve){var Ce;super(),this.widget=me,this._onDidOpen=this._register(new b.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(b.Event.filter(this.widget.onDidChangeSelection,Se=>(0,L.isKeyboardEvent)(Se.browserEvent))(Se=>this.onSelectionFromKeyboard(Se))),this._register(this.widget.onPointer(Se=>this.onPointer(Se.element,Se.browserEvent))),this._register(this.widget.onMouseDblClick(Se=>this.onMouseDblClick(Se.element,Se.browserEvent))),typeof ve?.openOnSingleClick!="boolean"&&ve?.configurationService?(this.openOnSingleClick=ve?.configurationService.getValue(I)!=="doubleClick",this._register(ve?.configurationService.onDidChangeConfiguration(Se=>{Se.affectsConfiguration(I)&&(this.openOnSingleClick=ve?.configurationService.getValue(I)!=="doubleClick")}))):this.openOnSingleClick=(Ce=ve?.openOnSingleClick)!==null&&Ce!==void 0?Ce:!0}onSelectionFromKeyboard(me){if(me.elements.length!==1)return;const ve=me.browserEvent,Ce=typeof ve.preserveFocus=="boolean"?ve.preserveFocus:!0,Se=typeof ve.pinned=="boolean"?ve.pinned:!Ce,_e=!1;this._open(this.getSelectedElement(),Ce,Se,_e,me.browserEvent)}onPointer(me,ve){if(!this.openOnSingleClick||ve.detail===2)return;const Se=ve.button===1,_e=!0,Te=Se,Me=ve.ctrlKey||ve.metaKey||ve.altKey;this._open(me,_e,Te,Me,ve)}onMouseDblClick(me,ve){if(!ve)return;const Ce=ve.target;if(Ce.classList.contains("monaco-tl-twistie")||Ce.classList.contains("monaco-icon-label")&&Ce.classList.contains("folder-icon")&&ve.offsetX<16)return;const _e=!1,Te=!0,Me=ve.ctrlKey||ve.metaKey||ve.altKey;this._open(me,_e,Te,Me,ve)}_open(me,ve,Ce,Se,_e){me&&this._onDidOpen.fire({editorOptions:{preserveFocus:ve,pinned:Ce,revealIfVisible:!0},sideBySide:Se,element:me,browserEvent:_e})}}class ue extends de{constructor(me,ve){super(me,ve),this.widget=me}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class X extends de{constructor(me,ve){super(me,ve)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Z extends de{constructor(me,ve){super(me,ve)}getSelectedElement(){var me;return(me=this.widget.getSelection()[0])!==null&&me!==void 0?me:void 0}}function re(pe){let me=!1;return ve=>{if(ve.toKeyCodeChord().isModifierKey())return!1;if(me)return me=!1,!1;const Ce=pe.softDispatch(ve,ve.target);return Ce.kind===1?(me=!0,!1):(me=!1,Ce.kind===0)}}let oe=class extends v.ObjectTree{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be){const{options:Le,getTypeNavigationMode:Ne,disposable:fe}=Te.invokeFunction(ae,_e);super(me,ve,Ce,Se,Le),this.disposables.add(fe),this.internals=new ce(this,_e,Ne,_e.overrideStyles,Me,Pe,Be),this.disposables.add(this.internals)}updateOptions(me){super.updateOptions(me),this.internals.updateOptions(me)}};e.WorkbenchObjectTree=oe,e.WorkbenchObjectTree=oe=Ee([he(5,c.IInstantiationService),he(6,a.IContextKeyService),he(7,e.IListService),he(8,n.IConfigurationService)],oe);let Y=class extends v.CompressibleObjectTree{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be){const{options:Le,getTypeNavigationMode:Ne,disposable:fe}=Te.invokeFunction(ae,_e);super(me,ve,Ce,Se,Le),this.disposables.add(fe),this.internals=new ce(this,_e,Ne,_e.overrideStyles,Me,Pe,Be),this.disposables.add(this.internals)}updateOptions(me={}){super.updateOptions(me),me.overrideStyles&&this.internals.updateStyleOverrides(me.overrideStyles),this.internals.updateOptions(me)}};e.WorkbenchCompressibleObjectTree=Y,e.WorkbenchCompressibleObjectTree=Y=Ee([he(5,c.IInstantiationService),he(6,a.IContextKeyService),he(7,e.IListService),he(8,n.IConfigurationService)],Y);let K=class extends S.DataTree{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le){const{options:Ne,getTypeNavigationMode:fe,disposable:be}=Me.invokeFunction(ae,Te);super(me,ve,Ce,Se,_e,Ne),this.disposables.add(be),this.internals=new ce(this,Te,fe,Te.overrideStyles,Pe,Be,Le),this.disposables.add(this.internals)}updateOptions(me={}){super.updateOptions(me),me.overrideStyles!==void 0&&this.internals.updateStyleOverrides(me.overrideStyles),this.internals.updateOptions(me)}};e.WorkbenchDataTree=K,e.WorkbenchDataTree=K=Ee([he(6,c.IInstantiationService),he(7,a.IContextKeyService),he(8,e.IListService),he(9,n.IConfigurationService)],K);let H=class extends p.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le){const{options:Ne,getTypeNavigationMode:fe,disposable:be}=Me.invokeFunction(ae,Te);super(me,ve,Ce,Se,_e,Ne),this.disposables.add(be),this.internals=new ce(this,Te,fe,Te.overrideStyles,Pe,Be,Le),this.disposables.add(this.internals)}updateOptions(me={}){super.updateOptions(me),me.overrideStyles&&this.internals.updateStyleOverrides(me.overrideStyles),this.internals.updateOptions(me)}};e.WorkbenchAsyncDataTree=H,e.WorkbenchAsyncDataTree=H=Ee([he(6,c.IInstantiationService),he(7,a.IContextKeyService),he(8,e.IListService),he(9,n.IConfigurationService)],H);let z=class extends p.CompressibleAsyncDataTree{constructor(me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le,Ne){const{options:fe,getTypeNavigationMode:be,disposable:ke}=Pe.invokeFunction(ae,Me);super(me,ve,Ce,Se,_e,Te,fe),this.disposables.add(ke),this.internals=new ce(this,Me,be,Me.overrideStyles,Be,Le,Ne),this.disposables.add(this.internals)}updateOptions(me){super.updateOptions(me),this.internals.updateOptions(me)}};e.WorkbenchCompressibleAsyncDataTree=z,e.WorkbenchCompressibleAsyncDataTree=z=Ee([he(7,c.IInstantiationService),he(8,a.IContextKeyService),he(9,e.IListService),he(10,n.IConfigurationService)],z);function se(pe){const me=pe.getValue(A);if(me==="highlight")return _.TreeFindMode.Highlight;if(me==="filter")return _.TreeFindMode.Filter;const ve=pe.getValue(T);if(ve==="simple"||ve==="highlight")return _.TreeFindMode.Highlight;if(ve==="filter")return _.TreeFindMode.Filter}function q(pe){const me=pe.getValue(P);if(me==="fuzzy")return _.TreeFindMatchType.Fuzzy;if(me==="contiguous")return _.TreeFindMatchType.Contiguous}function ae(pe,me){var ve;const Ce=pe.get(n.IConfigurationService),Se=pe.get(f.IContextViewService),_e=pe.get(a.IContextKeyService),Te=pe.get(c.IInstantiationService),Me=()=>{const be=_e.getContextKeyValue(h);if(be==="automatic")return y.TypeNavigationMode.Automatic;if(be==="trigger"||_e.getContextKeyValue(m)===!1)return y.TypeNavigationMode.Trigger;const Re=Ce.getValue(O);if(Re==="automatic")return y.TypeNavigationMode.Automatic;if(Re==="trigger")return y.TypeNavigationMode.Trigger},Pe=me.horizontalScrolling!==void 0?me.horizontalScrolling:!!Ce.getValue(M),[Be,Le]=Te.invokeFunction(ee,me),Ne=me.paddingBottom,fe=me.renderIndentGuides!==void 0?me.renderIndentGuides:Ce.getValue(R);return{getTypeNavigationMode:Me,disposable:Le,options:{keyboardSupport:!1,...Be,indent:typeof Ce.getValue(x)=="number"?Ce.getValue(x):void 0,renderIndentGuides:fe,smoothScrolling:!!Ce.getValue(B),defaultFindMode:se(Ce),defaultFindMatchType:q(Ce),horizontalScrolling:Pe,scrollByPage:!!Ce.getValue(N),paddingBottom:Ne,hideTwistiesOfChildlessElements:me.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(ve=me.expandOnlyOnTwistieClick)!==null&&ve!==void 0?ve:Ce.getValue(U)==="doubleClick",contextViewProvider:Se,findWidgetStyles:s.defaultFindWidgetStyles,enableStickyScroll:!!Ce.getValue(F),stickyScrollMaxItemCount:Number(Ce.getValue(j))}}}let ce=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(me,ve,Ce,Se,_e,Te,Me){var Pe;this.tree=me,this.disposables=[],this.contextKeyService=C(_e,me),this.disposables.push(w(this.contextKeyService,me)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ve.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ve.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set((Pe=ve.findWidgetEnabled)!==null&&Pe!==void 0?Pe:!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=J(Me),this.updateStyleOverrides(Se);const Le=()=>{const fe=me.getFocus()[0];if(!fe)return;const be=me.getNode(fe);this.treeElementCanCollapse.set(be.collapsible&&!be.collapsed),this.treeElementHasParent.set(!!me.getParentElement(fe)),this.treeElementCanExpand.set(be.collapsible&&be.collapsed),this.treeElementHasChild.set(!!me.getFirstElementChild(fe))},Ne=new Set;Ne.add(h),Ne.add(m),this.disposables.push(this.contextKeyService,Te.register(me),me.onDidChangeSelection(()=>{const fe=me.getSelection(),be=me.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(fe.length>0||be.length>0),this.hasMultiSelection.set(fe.length>1),this.hasDoubleSelection.set(fe.length===2)})}),me.onDidChangeFocus(()=>{const fe=me.getSelection(),be=me.getFocus();this.hasSelectionOrFocus.set(fe.length>0||be.length>0),Le()}),me.onDidChangeCollapseState(Le),me.onDidChangeModel(Le),me.onDidChangeFindOpenState(fe=>this.treeFindOpen.set(fe)),Me.onDidChangeConfiguration(fe=>{let be={};if(fe.affectsConfiguration(D)&&(this._useAltAsMultipleSelectionModifier=J(Me)),fe.affectsConfiguration(x)){const ke=Me.getValue(x);be={...be,indent:ke}}if(fe.affectsConfiguration(R)&&ve.renderIndentGuides===void 0){const ke=Me.getValue(R);be={...be,renderIndentGuides:ke}}if(fe.affectsConfiguration(B)){const ke=!!Me.getValue(B);be={...be,smoothScrolling:ke}}if(fe.affectsConfiguration(A)||fe.affectsConfiguration(T)){const ke=se(Me);be={...be,defaultFindMode:ke}}if(fe.affectsConfiguration(O)||fe.affectsConfiguration(T)){const ke=Ce();be={...be,typeNavigationMode:ke}}if(fe.affectsConfiguration(P)){const ke=q(Me);be={...be,defaultFindMatchType:ke}}if(fe.affectsConfiguration(M)&&ve.horizontalScrolling===void 0){const ke=!!Me.getValue(M);be={...be,horizontalScrolling:ke}}if(fe.affectsConfiguration(N)){const ke=!!Me.getValue(N);be={...be,scrollByPage:ke}}if(fe.affectsConfiguration(U)&&ve.expandOnlyOnTwistieClick===void 0&&(be={...be,expandOnlyOnTwistieClick:Me.getValue(U)==="doubleClick"}),fe.affectsConfiguration(F)){const ke=Me.getValue(F);be={...be,enableStickyScroll:ke}}if(fe.affectsConfiguration(j)){const ke=Math.max(1,Me.getValue(j));be={...be,stickyScrollMaxItemCount:ke}}if(fe.affectsConfiguration(W)){const ke=Me.getValue(W);be={...be,mouseWheelScrollSensitivity:ke}}if(fe.affectsConfiguration(V)){const ke=Me.getValue(V);be={...be,fastScrollSensitivity:ke}}Object.keys(be).length>0&&me.updateOptions(be)}),this.contextKeyService.onDidChangeContext(fe=>{fe.affectsSome(Ne)&&me.updateOptions({typeNavigationMode:Ce()})})),this.navigator=new Z(me,{configurationService:Me,...ve}),this.disposables.push(this.navigator)}updateOptions(me){me.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!me.multipleSelectionSupport)}updateStyleOverrides(me){this.tree.style(me?(0,s.getListStyles)(me):s.defaultListStyles)}dispose(){this.disposables=(0,o.dispose)(this.disposables)}};ce=Ee([he(4,a.IContextKeyService),he(5,e.IListService),he(6,n.IConfigurationService)],ce),l.Registry.as(t.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,i.localize)(0,null),type:"object",properties:{[D]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,i.localize)(1,null),(0,i.localize)(2,null)],default:"ctrlCmd",description:(0,i.localize)(3,null)},[I]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(4,null)},[M]:{type:"boolean",default:!1,description:(0,i.localize)(5,null)},[N]:{type:"boolean",default:!1,description:(0,i.localize)(6,null)},[x]:{type:"number",default:8,minimum:4,maximum:40,description:(0,i.localize)(7,null)},[R]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,i.localize)(8,null)},[B]:{type:"boolean",default:!1,description:(0,i.localize)(9,null)},[W]:{type:"number",default:1,markdownDescription:(0,i.localize)(10,null)},[V]:{type:"number",default:5,markdownDescription:(0,i.localize)(11,null)},[A]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,i.localize)(12,null),(0,i.localize)(13,null)],default:"highlight",description:(0,i.localize)(14,null)},[T]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,i.localize)(15,null),(0,i.localize)(16,null),(0,i.localize)(17,null)],default:"highlight",description:(0,i.localize)(18,null),deprecated:!0,deprecationMessage:(0,i.localize)(19,null)},[P]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,i.localize)(20,null),(0,i.localize)(21,null)],default:"fuzzy",description:(0,i.localize)(22,null)},[U]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(23,null)},[F]:{type:"boolean",default:typeof r.default.quality=="string"&&r.default.quality!=="stable",description:(0,i.localize)(24,null)},[j]:{type:"number",minimum:1,default:7,markdownDescription:(0,i.localize)(25,null)},[O]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,i.localize)(26,null)}}})}),define(ie[81],ne([1,0,14,26,27,6,20,22,746,243,37]),function(Q,e,L,k,y,E,_,p,S,v,b){"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 o;(function(r){function l(s,g){let h=s.defaults;for(;y.ThemeIcon.isThemeIcon(h);){const m=t.getIcon(h.id);if(!m)return;h=m.defaults}return h}r.getDefinition=l})(o||(e.IconContribution=o={}));var i;(function(r){function l(g){return{weight:g.weight,style:g.style,src:g.src.map(h=>({format:h.format,location:h.location.toString()}))}}r.toJSONObject=l;function s(g){const h=m=>(0,_.isString)(m)?m:void 0;if(g&&Array.isArray(g.src)&&g.src.every(m=>(0,_.isString)(m.format)&&(0,_.isString)(m.location)))return{weight:h(g.weight),style:h(g.style),src:g.src.map(m=>({format:m.format,location:p.URI.parse(m.location)}))}}r.fromJSONObject=s})(i||(e.IconFontDefinition=i={}));class n{constructor(){this._onDidChange=new E.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,S.localize)(0,null)},fontCharacter:{type:"string",description:(0,S.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${y.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(l,s,g,h){const m=this.iconsById[l];if(m){if(g&&!m.description){m.description=g,this.iconSchema.properties[l].markdownDescription=`${g} $(${l})`;const D=this.iconReferenceSchema.enum.indexOf(l);D!==-1&&(this.iconReferenceSchema.enumDescriptions[D]=g),this._onDidChange.fire()}return m}const C={id:l,description:g,defaults:s,deprecationMessage:h};this.iconsById[l]=C;const w={$ref:"#/definitions/icons"};return h&&(w.deprecationMessage=h),g&&(w.markdownDescription=`${g}: $(${l})`),this.iconSchema.properties[l]=w,this.iconReferenceSchema.enum.push(l),this.iconReferenceSchema.enumDescriptions.push(g||""),this._onDidChange.fire(),{id:l}}getIcons(){return Object.keys(this.iconsById).map(l=>this.iconsById[l])}getIcon(l){return this.iconsById[l]}getIconSchema(){return this.iconSchema}toString(){const l=(m,C)=>m.id.localeCompare(C.id),s=m=>{for(;y.ThemeIcon.isThemeIcon(m.defaults);)m=this.iconsById[m.defaults.id];return`codicon codicon-${m?m.id:""}`},g=[];g.push("| preview | identifier | default codicon ID | description"),g.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const h=Object.keys(this.iconsById).map(m=>this.iconsById[m]);for(const m of h.filter(C=>!!C.description).sort(l))g.push(`||${m.id}|${y.ThemeIcon.isThemeIcon(m.defaults)?m.defaults.id:m.id}|${m.description||""}|`);g.push("| preview | identifier "),g.push("| ----------- | --------------------------------- |");for(const m of h.filter(C=>!y.ThemeIcon.isThemeIcon(C.defaults)).sort(l))g.push(`||${m.id}|`);return g.join(` `)}}const t=new n;b.Registry.add(e.Extensions.IconContribution,t);function a(r,l,s,g){return t.registerIcon(r,l,s,g)}e.registerIcon=a;function u(){return t}e.getIconRegistry=u;function f(){const r=(0,k.getCodiconFontCharacters)();for(const l in r){const s="\\"+r[l].toString(16);t.registerIcon(l,{fontCharacter:s})}}f(),e.iconsSchemaId="vscode://schemas/icons";const c=b.Registry.as(v.Extensions.JSONContribution);c.registerSchema(e.iconsSchemaId,t.getIconSchema());const d=new L.RunOnceScheduler(()=>c.notifySchemaChanged(e.iconsSchemaId),200);t.onDidChange(()=>{d.isScheduled()||d.schedule()}),e.widgetClose=a("widget-close",k.Codicon.close,(0,S.localize)(2,null)),e.gotoPreviousLocation=a("goto-previous-location",k.Codicon.arrowUp,(0,S.localize)(3,null)),e.gotoNextLocation=a("goto-next-location",k.Codicon.arrowDown,(0,S.localize)(4,null)),e.syncing=y.ThemeIcon.modify(k.Codicon.sync,"spin"),e.spinningLoading=y.ThemeIcon.modify(k.Codicon.loading,"spin")}),define(ie[838],ne([1,0,7,92,77,76,41,13,26,2,35,27,72,90,36,62,73,11,5,110,42,93,117,85,616,161,8,81,442]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibleDiffViewer=void 0;const D=(0,w.registerIcon)("diff-review-insert",S.Codicon.add,(0,h.localize)(0,null)),I=(0,w.registerIcon)("diff-review-remove",S.Codicon.remove,(0,h.localize)(1,null)),M=(0,w.registerIcon)("diff-review-close",S.Codicon.close,(0,h.localize)(2,null));let A=class extends v.Disposable{constructor(j,J,le,ee,$,te,G,de,ue){super(),this._parentNode=j,this._visible=J,this._setVisible=le,this._canClose=ee,this._width=$,this._height=te,this._diffs=G,this._editors=de,this._instantiationService=ue,this._state=(0,b.derivedWithStore)(this,(X,Z)=>{const re=this._visible.read(X);if(this._parentNode.style.visibility=re?"visible":"hidden",!re)return null;const oe=Z.add(this._instantiationService.createInstance(O,this._diffs,this._editors,this._setVisible,this._canClose)),Y=Z.add(this._instantiationService.createInstance(U,this._parentNode,oe,this._width,this._height,this._editors));return{model:oe,view:Y}}).recomputeInitiallyAndOnChange(this._store)}next(){(0,b.transaction)(j=>{const J=this._visible.get();this._setVisible(!0,j),J&&this._state.get().model.nextGroup(j)})}prev(){(0,b.transaction)(j=>{this._setVisible(!0,j),this._state.get().model.previousGroup(j)})}close(){(0,b.transaction)(j=>{this._setVisible(!1,j)})}};e.AccessibleDiffViewer=A,A._ttPolicy=(0,k.createTrustedTypesPolicy)("diffReview",{createHTML:F=>F}),e.AccessibleDiffViewer=A=Ee([he(8,C.IInstantiationService)],A);let O=class extends v.Disposable{constructor(j,J,le,ee,$){super(),this._diffs=j,this._editors=J,this._setVisible=le,this.canClose=ee,this._audioCueService=$,this._groups=(0,b.observableValue)(this,[]),this._currentGroupIdx=(0,b.observableValue)(this,0),this._currentElementIdx=(0,b.observableValue)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((te,G)=>this._groups.read(G)[te]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((te,G)=>{var de;return(de=this.currentGroup.read(G))===null||de===void 0?void 0:de.lines[te]}),this._register((0,b.autorun)(te=>{const G=this._diffs.read(te);if(!G){this._groups.set([],void 0);return}const de=N(G,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());(0,b.transaction)(ue=>{const X=this._editors.modified.getPosition();if(X){const Z=de.findIndex(re=>X?.lineNumber{const G=this.currentElement.read(te);G?.type===P.Deleted?this._audioCueService.playAudioCue(m.AudioCue.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):G?.type===P.Added&&this._audioCueService.playAudioCue(m.AudioCue.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register((0,b.autorun)(te=>{var G;const de=this.currentElement.read(te);if(de&&de.type!==P.Header){const ue=(G=de.modifiedLineNumber)!==null&&G!==void 0?G:de.diff.modified.startLineNumber;this._editors.modified.setSelection(c.Range.fromPositions(new f.Position(ue,1)))}}))}_goToGroupDelta(j,J){const le=this.groups.get();!le||le.length<=1||(0,b.subtransaction)(J,ee=>{this._currentGroupIdx.set(u.OffsetRange.ofLength(le.length).clipCyclic(this._currentGroupIdx.get()+j),ee),this._currentElementIdx.set(0,ee)})}nextGroup(j){this._goToGroupDelta(1,j)}previousGroup(j){this._goToGroupDelta(-1,j)}_goToLineDelta(j){const J=this.currentGroup.get();!J||J.lines.length<=1||(0,b.transaction)(le=>{this._currentElementIdx.set(u.OffsetRange.ofLength(J.lines.length).clip(this._currentElementIdx.get()+j),le)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(j){const J=this.currentGroup.get();if(!J)return;const le=J.lines.indexOf(j);le!==-1&&(0,b.transaction)(ee=>{this._currentElementIdx.set(le,ee)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const j=this.currentElement.get();j&&(j.type===P.Deleted?(this._editors.original.setSelection(c.Range.fromPositions(new f.Position(j.originalLineNumber,1))),this._editors.original.revealLine(j.originalLineNumber),this._editors.original.focus()):(j.type!==P.Header&&(this._editors.modified.setSelection(c.Range.fromPositions(new f.Position(j.modifiedLineNumber,1))),this._editors.modified.revealLine(j.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};O=Ee([he(4,m.IAudioCueService)],O);const T=3;function N(F,j,J){const le=[];for(const ee of(0,p.groupAdjacentBy)(F,($,te)=>te.modified.startLineNumber-$.modified.endLineNumberExclusive<2*T)){const $=[];$.push(new R);const te=new a.LineRange(Math.max(1,ee[0].original.startLineNumber-T),Math.min(ee[ee.length-1].original.endLineNumberExclusive+T,j+1)),G=new a.LineRange(Math.max(1,ee[0].modified.startLineNumber-T),Math.min(ee[ee.length-1].modified.endLineNumberExclusive+T,J+1));(0,p.forEachAdjacent)(ee,(X,Z)=>{const re=new a.LineRange(X?X.original.endLineNumberExclusive:te.startLineNumber,Z?Z.original.startLineNumber:te.endLineNumberExclusive),oe=new a.LineRange(X?X.modified.endLineNumberExclusive:G.startLineNumber,Z?Z.modified.startLineNumber:G.endLineNumberExclusive);re.forEach(Y=>{$.push(new V(Y,oe.startLineNumber+(Y-re.startLineNumber)))}),Z&&(Z.original.forEach(Y=>{$.push(new B(Z,Y))}),Z.modified.forEach(Y=>{$.push(new W(Z,Y))}))});const de=ee[0].modified.join(ee[ee.length-1].modified),ue=ee[0].original.join(ee[ee.length-1].original);le.push(new x(new d.LineRangeMapping(de,ue),$))}return le}var P;(function(F){F[F.Header=0]="Header",F[F.Unchanged=1]="Unchanged",F[F.Deleted=2]="Deleted",F[F.Added=3]="Added"})(P||(P={}));class x{constructor(j,J){this.range=j,this.lines=J}}class R{constructor(){this.type=P.Header}}class B{constructor(j,J){this.diff=j,this.originalLineNumber=J,this.type=P.Deleted,this.modifiedLineNumber=void 0}}class W{constructor(j,J){this.diff=j,this.modifiedLineNumber=J,this.type=P.Added,this.originalLineNumber=void 0}}class V{constructor(j,J){this.originalLineNumber=j,this.modifiedLineNumber=J,this.type=P.Unchanged}}let U=class extends v.Disposable{constructor(j,J,le,ee,$,te){super(),this._element=j,this._model=J,this._width=le,this._height=ee,this._editors=$,this._languageService=te,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const G=document.createElement("div");G.className="diff-review-actions",this._actionBar=this._register(new y.ActionBar(G)),this._register((0,b.autorun)(de=>{this._actionBar.clear(),this._model.canClose.read(de)&&this._actionBar.push(new _.Action("diffreview.close",(0,h.localize)(3,null),"close-diff-review "+o.ThemeIcon.asClassName(M),!0,async()=>J.close()),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new E.DomScrollableElement(this._content,{})),(0,L.reset)(this.domNode,this._scrollbar.getDomNode(),G),this._register((0,v.toDisposable)(()=>{(0,L.reset)(this.domNode)})),this._register((0,n.applyStyle)(this.domNode,{width:this._width,height:this._height})),this._register((0,n.applyStyle)(this._content,{width:this._width,height:this._height})),this._register((0,b.autorunWithStore)((de,ue)=>{this._model.currentGroup.read(de),this._render(ue)})),this._register((0,L.addStandardDisposableListener)(this.domNode,"keydown",de=>{(de.equals(18)||de.equals(2066)||de.equals(530))&&(de.preventDefault(),this._model.goToNextLine()),(de.equals(16)||de.equals(2064)||de.equals(528))&&(de.preventDefault(),this._model.goToPreviousLine()),(de.equals(9)||de.equals(2057)||de.equals(521)||de.equals(1033))&&(de.preventDefault(),this._model.close()),(de.equals(10)||de.equals(3))&&(de.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(j){const J=this._editors.original.getOptions(),le=this._editors.modified.getOptions(),ee=document.createElement("div");ee.className="diff-review-table",ee.setAttribute("role","list"),ee.setAttribute("aria-label",(0,h.localize)(4,null)),(0,i.applyFontInfo)(ee,le.get(50)),(0,L.reset)(this._content,ee);const $=this._editors.original.getModel(),te=this._editors.modified.getModel();if(!$||!te)return;const G=$.getOptions(),de=te.getOptions(),ue=le.get(66),X=this._model.currentGroup.get();for(const Z of X?.lines||[]){if(!X)break;let re;if(Z.type===P.Header){const Y=document.createElement("div");Y.className="diff-review-row",Y.setAttribute("role","listitem");const K=X.range,H=this._model.currentGroupIndex.get(),z=this._model.groups.get().length,se=ge=>ge===0?(0,h.localize)(5,null):ge===1?(0,h.localize)(6,null):(0,h.localize)(7,null,ge),q=se(K.original.length),ae=se(K.modified.length);Y.setAttribute("aria-label",(0,h.localize)(8,null,H+1,z,K.original.startLineNumber,q,K.modified.startLineNumber,ae));const ce=document.createElement("div");ce.className="diff-review-cell diff-review-summary",ce.appendChild(document.createTextNode(`${H+1}/${z}: @@ -${K.original.startLineNumber},${K.original.length} +${K.modified.startLineNumber},${K.modified.length} @@`)),Y.appendChild(ce),re=Y}else re=this._createRow(Z,ue,this._width.get(),J,$,G,le,te,de);ee.appendChild(re);const oe=(0,b.derived)(Y=>this._model.currentElement.read(Y)===Z);j.add((0,b.autorun)(Y=>{const K=oe.read(Y);re.tabIndex=K?0:-1,K&&re.focus()})),j.add((0,L.addDisposableListener)(re,"focus",()=>{this._model.goToLine(Z)}))}this._scrollbar.scanDomNode()}_createRow(j,J,le,ee,$,te,G,de,ue){const X=ee.get(143),Z=X.glyphMarginWidth+X.lineNumbersWidth,re=G.get(143),oe=10+re.glyphMarginWidth+re.lineNumbersWidth;let Y="diff-review-row",K="";const H="diff-review-spacer";let z=null;switch(j.type){case P.Added:Y="diff-review-row line-insert",K=" char-insert",z=D;break;case P.Deleted:Y="diff-review-row line-delete",K=" char-delete",z=I;break}const se=document.createElement("div");se.style.minWidth=le+"px",se.className=Y,se.setAttribute("role","listitem"),se.ariaLevel="";const q=document.createElement("div");q.className="diff-review-cell",q.style.height=`${J}px`,se.appendChild(q);const ae=document.createElement("span");ae.style.width=Z+"px",ae.style.minWidth=Z+"px",ae.className="diff-review-line-number"+K,j.originalLineNumber!==void 0?ae.appendChild(document.createTextNode(String(j.originalLineNumber))):ae.innerText="\xA0",q.appendChild(ae);const ce=document.createElement("span");ce.style.width=oe+"px",ce.style.minWidth=oe+"px",ce.style.paddingRight="10px",ce.className="diff-review-line-number"+K,j.modifiedLineNumber!==void 0?ce.appendChild(document.createTextNode(String(j.modifiedLineNumber))):ce.innerText="\xA0",q.appendChild(ce);const ge=document.createElement("span");if(ge.className=H,z){const ve=document.createElement("span");ve.className=o.ThemeIcon.asClassName(z),ve.innerText="\xA0\xA0",ge.appendChild(ve)}else ge.innerText="\xA0\xA0";q.appendChild(ge);let pe;if(j.modifiedLineNumber!==void 0){let ve=this._getLineHtml(de,G,ue.tabSize,j.modifiedLineNumber,this._languageService.languageIdCodec);A._ttPolicy&&(ve=A._ttPolicy.createHTML(ve)),q.insertAdjacentHTML("beforeend",ve),pe=de.getLineContent(j.modifiedLineNumber)}else{let ve=this._getLineHtml($,ee,te.tabSize,j.originalLineNumber,this._languageService.languageIdCodec);A._ttPolicy&&(ve=A._ttPolicy.createHTML(ve)),q.insertAdjacentHTML("beforeend",ve),pe=$.getLineContent(j.originalLineNumber)}pe.length===0&&(pe=(0,h.localize)(9,null));let me="";switch(j.type){case P.Unchanged:j.originalLineNumber===j.modifiedLineNumber?me=(0,h.localize)(10,null,pe,j.originalLineNumber):me=(0,h.localize)(11,null,pe,j.originalLineNumber,j.modifiedLineNumber);break;case P.Added:me=(0,h.localize)(12,null,pe,j.modifiedLineNumber);break;case P.Deleted:me=(0,h.localize)(13,null,pe,j.originalLineNumber);break}return se.setAttribute("aria-label",me),se}_getLineHtml(j,J,le,ee,$){const te=j.getLineContent(ee),G=J.get(50),de=l.LineTokens.createEmpty(te,$),ue=g.ViewLineRenderingData.isBasicASCII(te,j.mightContainNonBasicASCII()),X=g.ViewLineRenderingData.containsRTL(te,ue,j.mightContainRTL());return(0,s.renderViewLine2)(new s.RenderLineInput(G.isMonospace&&!J.get(33),G.canUseHalfwidthRightwardsArrow,te,!1,ue,X,0,de,[],le,0,G.spaceWidth,G.middotWidth,G.wsmiddotWidth,J.get(116),J.get(98),J.get(93),J.get(51)!==t.EditorFontLigatures.OFF,null)).html}};U=Ee([he(5,r.ILanguageService)],U)}),define(ie[839],ne([1,0,54,7,156,86,26,38,6,2,27,654,30,81,201]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const t=k.$;class a extends v.Disposable{constructor(m,C,w,D=!1){super(),this.model=C,this.showingStandaloneColorPicker=D,this._closeButton=null,this._domNode=t(".colorpicker-header"),k.append(m,this._domNode),this._pickedColorNode=k.append(this._domNode,t(".picked-color")),k.append(this._pickedColorNode,t("span.codicon.codicon-color-mode")),this._pickedColorPresentation=k.append(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const I=(0,o.localize)(0,null);this._pickedColorNode.setAttribute("title",I),this._originalColorNode=k.append(this._domNode,t(".original-color")),this._originalColorNode.style.backgroundColor=p.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=w.getColorTheme().getColor(i.editorHoverBackground)||p.Color.white,this._register(w.onDidColorThemeChange(M=>{this.backgroundColor=M.getColor(i.editorHoverBackground)||p.Color.white})),this._register(k.addDisposableListener(this._pickedColorNode,k.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(k.addDisposableListener(this._originalColorNode,k.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this._register(C.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=p.Color.Format.CSS.format(C.color)||"",this._pickedColorNode.classList.toggle("light",C.color.rgba.a<.5?this.backgroundColor.isLighter():C.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new u(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(m){this._pickedColorNode.style.backgroundColor=p.Color.Format.CSS.format(m)||"",this._pickedColorNode.classList.toggle("light",m.rgba.a<.5?this.backgroundColor.isLighter():m.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}e.ColorPickerHeader=a;class u extends v.Disposable{constructor(m){super(),this._onClicked=this._register(new S.Emitter),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),k.append(m,this._button);const C=document.createElement("div");C.classList.add("close-button-inner-div"),k.append(this._button,C),k.append(C,t(".button"+b.ThemeIcon.asCSSSelector((0,n.registerIcon)("color-picker-close",_.Codicon.close,(0,o.localize)(1,null))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class f extends v.Disposable{constructor(m,C,w,D=!1){super(),this.model=C,this.pixelRatio=w,this._insertButton=null,this._domNode=t(".colorpicker-body"),k.append(m,this._domNode),this._saturationBox=new c(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 r(this._domNode,this.model,D),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new l(this._domNode,this.model,D),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),D&&(this._insertButton=this._register(new s(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:m,v:C}){const w=this.model.color.hsva;this.model.color=new p.Color(new p.HSVA(w.h,m,C,w.a))}onDidOpacityChange(m){const C=this.model.color.hsva;this.model.color=new p.Color(new p.HSVA(C.h,C.s,C.v,m))}onDidHueChange(m){const C=this.model.color.hsva,w=(1-m)*360;this.model.color=new p.Color(new p.HSVA(w===360?0:w,C.s,C.v,C.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}e.ColorPickerBody=f;class c extends v.Disposable{constructor(m,C,w){super(),this.model=C,this.pixelRatio=w,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._domNode=t(".saturation-wrap"),k.append(m,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",k.append(this._domNode,this._canvas),this.selection=t(".saturation-selection"),k.append(this._domNode,this.selection),this.layout(),this._register(k.addDisposableListener(this._domNode,k.EventType.POINTER_DOWN,D=>this.onPointerDown(D))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(m){if(!m.target||!(m.target instanceof Element))return;this.monitor=this._register(new y.GlobalPointerMoveMonitor);const C=k.getDomNodePagePosition(this._domNode);m.target!==this.selection&&this.onDidChangePosition(m.offsetX,m.offsetY),this.monitor.startMonitoring(m.target,m.pointerId,m.buttons,D=>this.onDidChangePosition(D.pageX-C.left,D.pageY-C.top),()=>null);const w=k.addDisposableListener(m.target.ownerDocument,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),w.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(m,C){const w=Math.max(0,Math.min(1,m/this.width)),D=Math.max(0,Math.min(1,1-C/this.height));this.paintSelection(w,D),this._onDidChange.fire({s:w,v:D})}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 m=this.model.color.hsva;this.paintSelection(m.s,m.v)}paint(){const m=this.model.color.hsva,C=new p.Color(new p.HSVA(m.h,1,1,1)),w=this._canvas.getContext("2d"),D=w.createLinearGradient(0,0,this._canvas.width,0);D.addColorStop(0,"rgba(255, 255, 255, 1)"),D.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),D.addColorStop(1,"rgba(255, 255, 255, 0)");const I=w.createLinearGradient(0,0,0,this._canvas.height);I.addColorStop(0,"rgba(0, 0, 0, 0)"),I.addColorStop(1,"rgba(0, 0, 0, 1)"),w.rect(0,0,this._canvas.width,this._canvas.height),w.fillStyle=p.Color.Format.CSS.format(C),w.fill(),w.fillStyle=D,w.fill(),w.fillStyle=I,w.fill()}paintSelection(m,C){this.selection.style.left=`${m*this.width}px`,this.selection.style.top=`${this.height-C*this.height}px`}onDidChangeColor(m){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const C=m.hsva;this.paintSelection(C.s,C.v)}}class d extends v.Disposable{constructor(m,C,w=!1){super(),this.model=C,this._onDidChange=new S.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Emitter,this.onColorFlushed=this._onColorFlushed.event,w?(this.domNode=k.append(m,t(".standalone-strip")),this.overlay=k.append(this.domNode,t(".standalone-overlay"))):(this.domNode=k.append(m,t(".strip")),this.overlay=k.append(this.domNode,t(".overlay"))),this.slider=k.append(this.domNode,t(".slider")),this.slider.style.top="0px",this._register(k.addDisposableListener(this.domNode,k.EventType.POINTER_DOWN,D=>this.onPointerDown(D))),this._register(C.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const m=this.getValue(this.model.color);this.updateSliderPosition(m)}onDidChangeColor(m){const C=this.getValue(m);this.updateSliderPosition(C)}onPointerDown(m){if(!m.target||!(m.target instanceof Element))return;const C=this._register(new y.GlobalPointerMoveMonitor),w=k.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),m.target!==this.slider&&this.onDidChangeTop(m.offsetY),C.startMonitoring(m.target,m.pointerId,m.buttons,I=>this.onDidChangeTop(I.pageY-w.top),()=>null);const D=k.addDisposableListener(m.target.ownerDocument,k.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),D.dispose(),C.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(m){const C=Math.max(0,Math.min(1,1-m/this.height));this.updateSliderPosition(C),this._onDidChange.fire(C)}updateSliderPosition(m){this.slider.style.top=`${(1-m)*this.height}px`}}class r extends d{constructor(m,C,w=!1){super(m,C,w),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(m){super.onDidChangeColor(m);const{r:C,g:w,b:D}=m.rgba,I=new p.Color(new p.RGBA(C,w,D,1)),M=new p.Color(new p.RGBA(C,w,D,0));this.overlay.style.background=`linear-gradient(to bottom, ${I} 0%, ${M} 100%)`}getValue(m){return m.hsva.a}}class l extends d{constructor(m,C,w=!1){super(m,C,w),this.domNode.classList.add("hue-strip")}getValue(m){return 1-m.hsva.h/360}}class s extends v.Disposable{constructor(m){super(),this._onClicked=this._register(new S.Emitter),this.onClicked=this._onClicked.event,this._button=k.append(m,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=C=>{this._onClicked.fire()}}get button(){return this._button}}e.InsertButton=s;class g extends E.Widget{constructor(m,C,w,D,I=!1){super(),this.model=C,this.pixelRatio=w,this._register(L.PixelRatio.onDidChange(()=>this.layout()));const M=t(".colorpicker-widget");m.appendChild(M),this.header=this._register(new a(M,this.model,D,I)),this.body=this._register(new f(M,this.model,this.pixelRatio,I))}layout(){this.body.layout()}}e.ColorPickerWidget=g}),define(ie[840],ne([1,0,7,51,76,26,6,2,12,20,42,119,240,698,15,57,30,81,27,467]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const r=L.$,l=(0,f.registerIcon)("parameter-hints-next",E.Codicon.chevronDown,n.localize(0,null)),s=(0,f.registerIcon)("parameter-hints-previous",E.Codicon.chevronUp,n.localize(1,null));let g=d=class extends p.Disposable{constructor(m,C,w,D,I){super(),this.editor=m,this.model=C,this.renderDisposeables=this._register(new p.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new o.MarkdownRenderer({editor:m},I,D)),this.keyVisible=i.Context.Visible.bindTo(w),this.keyMultipleSignatures=i.Context.MultipleSignatures.bindTo(w)}createParameterHintDOMNodes(){const m=r(".editor-widget.parameter-hints-widget"),C=L.append(m,r(".phwrapper"));C.tabIndex=-1;const w=L.append(C,r(".controls")),D=L.append(w,r(".button"+c.ThemeIcon.asCSSSelector(s))),I=L.append(w,r(".overloads")),M=L.append(w,r(".button"+c.ThemeIcon.asCSSSelector(l)));this._register(L.addDisposableListener(D,"click",x=>{L.EventHelper.stop(x),this.previous()})),this._register(L.addDisposableListener(M,"click",x=>{L.EventHelper.stop(x),this.next()}));const A=r(".body"),O=new y.DomScrollableElement(A,{alwaysConsumeMouseWheel:!0});this._register(O),C.appendChild(O.getDomNode());const T=L.append(A,r(".signature")),N=L.append(A,r(".docs"));m.style.userSelect="text",this.domNodes={element:m,signature:T,overloads:I,docs:N,scrollbar:O},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(x=>{this.visible&&this.editor.layoutContentWidget(this)}));const P=()=>{if(!this.domNodes)return;const x=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${x.fontSize}px`,this.domNodes.element.style.lineHeight=`${x.lineHeight/x.fontSize}`};P(),this._register(_.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor),x=>x.filter(R=>R.hasChanged(50)))(P)),this._register(this.editor.onDidLayoutChange(x=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var m;(m=this.domNodes)===null||m===void 0||m.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var m;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(m=this.domNodes)===null||m===void 0||m.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(m){var C;if(this.renderDisposeables.clear(),!this.domNodes)return;const w=m.signatures.length>1;this.domNodes.element.classList.toggle("multiple",w),this.keyMultipleSignatures.set(w),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const D=m.signatures[m.activeSignature];if(!D)return;const I=L.append(this.domNodes.signature,r(".code")),M=this.editor.getOption(50);I.style.fontSize=`${M.fontSize}px`,I.style.fontFamily=M.fontFamily;const A=D.parameters.length>0,O=(C=D.activeParameter)!==null&&C!==void 0?C:m.activeParameter;if(A)this.renderParameters(I,D,O);else{const P=L.append(I,r("span"));P.textContent=D.label}const T=D.parameters[O];if(T?.documentation){const P=r("span.documentation");if(typeof T.documentation=="string")P.textContent=T.documentation;else{const x=this.renderMarkdownDocs(T.documentation);P.appendChild(x.element)}L.append(this.domNodes.docs,r("p",{},P))}if(D.documentation!==void 0)if(typeof D.documentation=="string")L.append(this.domNodes.docs,r("p",{},D.documentation));else{const P=this.renderMarkdownDocs(D.documentation);L.append(this.domNodes.docs,P.element)}const N=this.hasDocs(D,T);if(this.domNodes.signature.classList.toggle("has-docs",N),this.domNodes.docs.classList.toggle("empty",!N),this.domNodes.overloads.textContent=String(m.activeSignature+1).padStart(m.signatures.length.toString().length,"0")+"/"+m.signatures.length,T){let P="";const x=D.parameters[O];Array.isArray(x.label)?P=D.label.substring(x.label[0],x.label[1]):P=x.label,x.documentation&&(P+=typeof x.documentation=="string"?`, ${x.documentation}`:`, ${x.documentation.value}`),D.documentation&&(P+=typeof D.documentation=="string"?`, ${D.documentation}`:`, ${D.documentation.value}`),this.announcedLabel!==P&&(k.alert(n.localize(2,null,P)),this.announcedLabel=P)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(m){const C=this.renderDisposeables.add(this.markdownRenderer.render(m,{asyncRenderCallback:()=>{var w;(w=this.domNodes)===null||w===void 0||w.scrollbar.scanDomNode()}}));return C.element.classList.add("markdown-docs"),C}hasDocs(m,C){return!!(C&&typeof C.documentation=="string"&&(0,v.assertIsDefined)(C.documentation).length>0||C&&typeof C.documentation=="object"&&(0,v.assertIsDefined)(C.documentation).value.length>0||m.documentation&&typeof m.documentation=="string"&&(0,v.assertIsDefined)(m.documentation).length>0||m.documentation&&typeof m.documentation=="object"&&(0,v.assertIsDefined)(m.documentation.value).length>0)}renderParameters(m,C,w){const[D,I]=this.getParameterLabelOffsets(C,w),M=document.createElement("span");M.textContent=C.label.substring(0,D);const A=document.createElement("span");A.textContent=C.label.substring(D,I),A.className="parameter active";const O=document.createElement("span");O.textContent=C.label.substring(I),L.append(m,M,A,O)}getParameterLabelOffsets(m,C){const w=m.parameters[C];if(w){if(Array.isArray(w.label))return w.label;if(w.label.length){const D=new RegExp(`(\\W|^)${(0,S.escapeRegExpCharacters)(w.label)}(?=\\W|$)`,"g");D.test(m.label);const I=D.lastIndex-w.label.length;return I>=0?[I,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 d.ID}updateMaxHeight(){if(!this.domNodes)return;const C=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=C;const w=this.domNodes.element.getElementsByClassName("phwrapper");w.length&&(w[0].style.maxHeight=C)}};e.ParameterHintsWidget=g,g.ID="editor.widget.parameterHintsWidget",e.ParameterHintsWidget=g=d=Ee([he(2,t.IContextKeyService),he(3,a.IOpenerService),he(4,b.ILanguageService)],g),(0,u.registerColor)("editorHoverWidget.highlightForeground",{dark:u.listHighlightForeground,light:u.listHighlightForeground,hcDark:u.listHighlightForeground,hcLight:u.listHighlightForeground},n.localize(3,null))}),define(ie[841],ne([1,0,99,2,16,21,31,18,762,240,697,15,8,840]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=e.ParameterHintsController=void 0;let a=t=class extends k.Disposable{static get(r){return r.getContribution(t.ID)}constructor(r,l,s){super(),this.editor=r,this.model=this._register(new S.ParameterHintsModel(r,s.signatureHelpProvider)),this._register(this.model.onChangedHints(g=>{var h;g?(this.widget.value.show(),this.widget.value.render(g)):(h=this.widget.rawValue)===null||h===void 0||h.hide()})),this.widget=new L.Lazy(()=>this._register(l.createInstance(n.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var r;(r=this.widget.rawValue)===null||r===void 0||r.previous()}next(){var r;(r=this.widget.rawValue)===null||r===void 0||r.next()}trigger(r){this.model.trigger(r,0)}};e.ParameterHintsController=a,a.ID="editor.controller.parameterHints",e.ParameterHintsController=a=t=Ee([he(1,i.IInstantiationService),he(2,p.ILanguageFeaturesService)],a);class u extends y.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:b.localize(0,null),alias:"Trigger Parameter Hints",precondition:E.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(r,l){const s=a.get(l);s?.trigger({triggerKind:_.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=u,(0,y.registerEditorContribution)(a.ID,a,2),(0,y.registerEditorAction)(u);const f=100+75,c=y.EditorCommand.bindToContribution(a.get);(0,y.registerEditorCommand)(new c({id:"closeParameterHints",precondition:v.Context.Visible,handler:d=>d.cancel(),kbOpts:{weight:f,kbExpr:E.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new c({id:"showPrevParameterHint",precondition:o.ContextKeyExpr.and(v.Context.Visible,v.Context.MultipleSignatures),handler:d=>d.previous(),kbOpts:{weight:f,kbExpr:E.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,y.registerEditorCommand)(new c({id:"showNextParameterHint",precondition:o.ContextKeyExpr.and(v.Context.Visible,v.Context.MultipleSignatures),handler:d=>d.next(),kbOpts:{weight:f,kbExpr:E.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(ie[842],ne([1,0,7,77,41,2,119,8,779,81,27,474]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const o=26;let i=class extends E.Disposable{constructor(a,u){super(),this._editor=a,this.instantiationService=u,this.banner=this._register(this.instantiationService.createInstance(n))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(a){this.banner.show({...a,onClose:()=>{var u;this.hide(),(u=a.onClose)===null||u===void 0||u.call(a)}}),this._editor.setBanner(this.banner.element,o)}};e.BannerController=i,e.BannerController=i=Ee([he(1,p.IInstantiationService)],i);let n=class extends E.Disposable{constructor(a){super(),this.instantiationService=a,this.markdownRenderer=this.instantiationService.createInstance(_.MarkdownRenderer,{}),this.element=(0,L.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(a){if(a.ariaLabel)return a.ariaLabel;if(typeof a.message=="string")return a.message}getBannerMessage(a){if(typeof a=="string"){const u=(0,L.$)("span");return u.innerText=a,u}return this.markdownRenderer.render(a).element}clear(){(0,L.clearNode)(this.element)}show(a){(0,L.clearNode)(this.element);const u=this.getAriaLabel(a);u&&this.element.setAttribute("aria-label",u);const f=(0,L.append)(this.element,(0,L.$)("div.icon-container"));f.setAttribute("aria-hidden","true"),a.icon&&f.appendChild((0,L.$)(`div${b.ThemeIcon.asCSSSelector(a.icon)}`));const c=(0,L.append)(this.element,(0,L.$)("div.message-container"));if(c.setAttribute("aria-hidden","true"),c.appendChild(this.getBannerMessage(a.message)),this.messageActionsContainer=(0,L.append)(this.element,(0,L.$)("div.message-actions-container")),a.actions)for(const r of a.actions)this._register(this.instantiationService.createInstance(S.Link,this.messageActionsContainer,{...r,tabIndex:-1},{}));const d=(0,L.append)(this.element,(0,L.$)("div.action-container"));this.actionBar=this._register(new k.ActionBar(d)),this.actionBar.push(this._register(new y.Action("banner.close","Close Banner",b.ThemeIcon.asClassName(v.widgetClose),!0,()=>{typeof a.onClose=="function"&&a.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};n=Ee([he(0,p.IInstantiationService)],n)}),define(ie[843],ne([1,0,7,6,2,27,81]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function p(v){const b=new y.DisposableStore,o=b.add(new k.Emitter),i=(0,_.getIconRegistry)();return b.add(i.onDidChange(()=>o.fire())),v&&b.add(v.onDidProductIconThemeChange(()=>o.fire())),{dispose:()=>b.dispose(),onDidChange:o.event,getCSS(){const n=v?v.getProductIconTheme():new S,t={},a=f=>{const c=n.getIcon(f);if(!c)return;const d=c.font;return d?(t[d.id]=d.definition,`.codicon-${f.id}:before { content: '${c.fontCharacter}'; font-family: ${(0,L.asCSSPropertyValue)(d.id)}; }`):`.codicon-${f.id}:before { content: '${c.fontCharacter}'; }`},u=[];for(const f of i.getIcons()){const c=a(f);c&&u.push(c)}for(const f in t){const c=t[f],d=c.weight?`font-weight: ${c.weight};`:"",r=c.style?`font-style: ${c.style};`:"",l=c.src.map(s=>`${(0,L.asCSSUrl)(s.location)} format('${s.format}')`).join(", ");u.push(`@font-face { src: ${l}; font-family: ${(0,L.asCSSPropertyValue)(f)};${d}${r} font-display: block; }`)}return u.join(` `)}}}e.getIconsStyleSheet=p;class S{getIcon(b){const o=(0,_.getIconRegistry)();let i=b.defaults;for(;E.ThemeIcon.isThemeIcon(i);){const n=o.getIcon(i.id);if(!n)return;i=n.defaults}return i}}e.UnthemedProductIconTheme=S}),define(ie[88],ne([1,0]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var L;(function(E){E.DARK="dark",E.LIGHT="light",E.HIGH_CONTRAST_DARK="hcDark",E.HIGH_CONTRAST_LIGHT="hcLight"})(L||(e.ColorScheme=L={}));function k(E){return E===L.HIGH_CONTRAST_DARK||E===L.HIGH_CONTRAST_LIGHT}e.isHighContrast=k;function y(E){return E===L.DARK||E===L.HIGH_CONTRAST_DARK}e.isDark=y}),define(ie[253],ne([1,0,54,40,17,488,146,154,117,88,36]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnOfNodeOffset=e.ViewLine=e.ViewLineOptions=void 0;const o=function(){return y.isNative?!0:!(y.isLinux||L.isFirefox||L.isSafari)}();let i=!0;class n{constructor(g,h){this.themeType=h;const m=g.options,C=m.get(50);m.get(38)==="off"?this.renderWhitespace=m.get(98):this.renderWhitespace="none",this.renderControlCharacters=m.get(93),this.spaceWidth=C.spaceWidth,this.middotWidth=C.middotWidth,this.wsmiddotWidth=C.wsmiddotWidth,this.useMonospaceOptimizations=C.isMonospace&&!m.get(33),this.canUseHalfwidthRightwardsArrow=C.canUseHalfwidthRightwardsArrow,this.lineHeight=m.get(66),this.stopRenderingLineAfter=m.get(116),this.fontLigatures=m.get(51)}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=n;class t{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,k.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,v.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(g,h,m,C){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const w=m.getViewLineRenderingData(g),D=this._options,I=p.LineDecoration.filter(w.inlineDecorations,g,w.minColumn,w.maxColumn);let M=null;if((0,v.isHighContrast)(D.themeType)||this._options.renderWhitespace==="selection"){const N=m.selections;for(const P of N){if(P.endLineNumberg)continue;const x=P.startLineNumber===g?P.startColumn:w.minColumn,R=P.endLineNumber===g?P.endColumn:w.maxColumn;x');const O=(0,S.renderViewLine)(A,C);C.appendString("");let T=null;return i&&o&&w.isBasicASCII&&D.useMonospaceOptimizations&&O.containsForeignElements===0&&(T=new a(this._renderedViewLine?this._renderedViewLine.domNode:null,A,O.characterMapping)),T||(T=c(this._renderedViewLine?this._renderedViewLine.domNode:null,A,O.characterMapping,O.containsRTL,O.containsForeignElements)),this._renderedViewLine=T,!0}layoutLine(g,h){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(h),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(g){return this._renderedViewLine?this._renderedViewLine.getWidth(g):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof a:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof a?this._renderedViewLine.monospaceAssumptionsAreValid():i}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof a&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(g,h,m,C){if(!this._renderedViewLine)return null;h=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,h)),m=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,m));const w=this._renderedViewLine.input.stopRenderingLineAfter;if(w!==-1&&h>w+1&&m>w+1)return new _.VisibleRanges(!0,[new _.FloatHorizontalRange(this.getWidth(C),0)]);w!==-1&&h>w+1&&(h=w+1),w!==-1&&m>w+1&&(m=w+1);const D=this._renderedViewLine.getVisibleRangesForRange(g,h,m,C);return D&&D.length>0?new _.VisibleRanges(!1,D):null}getColumnOfNodeOffset(g,h){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(g,h):1}}e.ViewLine=t,t.CLASS_NAME="view-line";class a{constructor(g,h,m){this._cachedWidth=-1,this.domNode=g,this.input=h;const C=Math.floor(h.lineContent.length/300);if(C>0){this._keyColumnPixelOffsetCache=new Float32Array(C);for(let w=0;w=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),i=!1)}return i}toSlowRenderedLine(){return c(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(g,h,m,C){const w=this._getColumnPixelOffset(g,h,C),D=this._getColumnPixelOffset(g,m,C);return[new _.FloatHorizontalRange(w,D-w)]}_getColumnPixelOffset(g,h,m){if(h<=300){const A=this._characterMapping.getHorizontalOffset(h);return this._charWidth*A}const C=Math.floor((h-1)/300)-1,w=(C+1)*300+1;let D=-1;if(this._keyColumnPixelOffsetCache&&(D=this._keyColumnPixelOffsetCache[C],D===-1&&(D=this._actualReadPixelOffset(g,w,m),this._keyColumnPixelOffsetCache[C]=D)),D===-1){const A=this._characterMapping.getHorizontalOffset(h);return this._charWidth*A}const I=this._characterMapping.getHorizontalOffset(w),M=this._characterMapping.getHorizontalOffset(h);return D+this._charWidth*(M-I)}_getReadingTarget(g){return g.domNode.firstChild}_actualReadPixelOffset(g,h,m){if(!this.domNode)return-1;const C=this._characterMapping.getDomPosition(h),w=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),C.partIndex,C.charIndex,C.partIndex,C.charIndex,m);return!w||w.length===0?-1:w[0].left}getColumnOfNodeOffset(g,h){return l(this._characterMapping,g,h)}}class u{constructor(g,h,m,C,w){if(this.domNode=g,this.input=h,this._characterMapping=m,this._isWhitespaceOnly=/^\s*$/.test(h.lineContent),this._containsForeignElements=w,this._cachedWidth=-1,this._pixelOffsetCache=null,!C||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let D=0,I=this._characterMapping.length;D<=I;D++)this._pixelOffsetCache[D]=-1}}_getReadingTarget(g){return g.domNode.firstChild}getWidth(g){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,g?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(g,h,m,C){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const w=this._readPixelOffset(this.domNode,g,h,C);if(w===-1)return null;const D=this._readPixelOffset(this.domNode,g,m,C);return D===-1?null:[new _.FloatHorizontalRange(w,D-w)]}return this._readVisibleRangesForRange(this.domNode,g,h,m,C)}_readVisibleRangesForRange(g,h,m,C,w){if(m===C){const D=this._readPixelOffset(g,h,m,w);return D===-1?null:[new _.FloatHorizontalRange(D,0)]}else return this._readRawVisibleRangesForRange(g,m,C,w)}_readPixelOffset(g,h,m,C){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(C);const w=this._getReadingTarget(g);return w.firstChild?(C.markDidDomLayout(),w.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const w=this._pixelOffsetCache[m];if(w!==-1)return w;const D=this._actualReadPixelOffset(g,h,m,C);return this._pixelOffsetCache[m]=D,D}return this._actualReadPixelOffset(g,h,m,C)}_actualReadPixelOffset(g,h,m,C){if(this._characterMapping.length===0){const M=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),0,0,0,0,C);return!M||M.length===0?-1:M[0].left}if(m===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(C);const w=this._characterMapping.getDomPosition(m),D=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,w.partIndex,w.charIndex,C);if(!D||D.length===0)return-1;const I=D[0].left;if(this.input.isBasicASCII){const M=this._characterMapping.getHorizontalOffset(m),A=Math.round(this.input.spaceWidth*M);if(Math.abs(A-I)<=1)return A}return I}_readRawVisibleRangesForRange(g,h,m,C){if(h===1&&m===this._characterMapping.length)return[new _.FloatHorizontalRange(0,this.getWidth(C))];const w=this._characterMapping.getDomPosition(h),D=this._characterMapping.getDomPosition(m);return E.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,D.partIndex,D.charIndex,C)}getColumnOfNodeOffset(g,h){return l(this._characterMapping,g,h)}}class f extends u{_readVisibleRangesForRange(g,h,m,C,w){const D=super._readVisibleRangesForRange(g,h,m,C,w);if(!D||D.length===0||m===C||m===1&&C===this._characterMapping.length)return D;if(!this.input.containsRTL){const I=this._readPixelOffset(g,h,C,w);if(I!==-1){const M=D[D.length-1];M.left=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 isChildOfOverflowGuard(m){return m.length>=1&&m[0]===3}static isChildOfOverflowingContentWidgets(m){return m.length>=1&&m[0]===2}static isChildOfOverlayWidgets(m){return m.length>=2&&m[0]===3&&m[1]===4}}class u{constructor(m,C,w){this.viewModel=m.viewModel;const D=m.configuration.options;this.layoutInfo=D.get(143),this.viewDomNode=C.viewDomNode,this.lineHeight=D.get(66),this.stickyTabStops=D.get(115),this.typicalHalfwidthCharacterWidth=D.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=w,this._context=m,this._viewHelper=C}getZoneAtCoord(m){return u.getZoneAtCoord(this._context,m)}static getZoneAtCoord(m,C){const w=m.viewLayout.getWhitespaceAtVerticalOffset(C);if(w){const D=w.verticalOffset+w.height/2,I=m.viewModel.getLineCount();let M=null,A,O=null;return w.afterLineNumber!==I&&(O=new E.Position(w.afterLineNumber+1,1)),w.afterLineNumber>0&&(M=new E.Position(w.afterLineNumber,m.viewModel.getLineMaxColumn(w.afterLineNumber))),O===null?A=M:M===null?A=O:C=m.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,l._getMouseColumn(this.mouseContentHorizontalOffset,m.typicalHalfwidthCharacterWidth))}}class c extends f{constructor(m,C,w,D,I){super(m,C,w,D),this._ctx=m,I?(this.target=I,this.targetPath=k.PartFingerprints.collect(I,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.columnM.contentLeft+M.width)continue;const A=m.getVerticalOffsetForLineNumber(M.position.lineNumber);if(A<=I&&I<=A+M.height)return C.fulfillContentText(M.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(m,C){const w=m.getZoneAtCoord(C.mouseVerticalOffset);if(w){const D=C.isInContentArea?8:5;return C.fulfillViewZone(D,w.position,w)}return null}static _hitTestTextArea(m,C){return a.isTextArea(C.targetPath)?m.lastRenderData.lastTextareaPosition?C.fulfillContentText(m.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):C.fulfillTextarea():null}static _hitTestMargin(m,C){if(C.isInMarginArea){const w=m.getFullLineRangeAtCoord(C.mouseVerticalOffset),D=w.range.getStartPosition();let I=Math.abs(C.relativePos.x);const M={isAfterLines:w.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:I};return I-=m.layoutInfo.glyphMarginLeft,I<=m.layoutInfo.glyphMarginWidth?C.fulfillMargin(2,D,w.range,M):(I-=m.layoutInfo.glyphMarginWidth,I<=m.layoutInfo.lineNumbersWidth?C.fulfillMargin(3,D,w.range,M):(I-=m.layoutInfo.lineNumbersWidth,C.fulfillMargin(4,D,w.range,M)))}return null}static _hitTestViewLines(m,C,w){if(!a.isChildOfViewLines(C.targetPath))return null;if(m.isInTopPadding(C.mouseVerticalOffset))return C.fulfillContentEmpty(new E.Position(1,1),d);if(m.isAfterLines(C.mouseVerticalOffset)||m.isInBottomPadding(C.mouseVerticalOffset)){const I=m.viewModel.getLineCount(),M=m.viewModel.getLineMaxColumn(I);return C.fulfillContentEmpty(new E.Position(I,M),d)}if(w){if(a.isStrictChildOfViewLines(C.targetPath)){const I=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset);if(m.viewModel.getLineLength(I)===0){const A=m.getLineWidth(I),O=r(C.mouseContentHorizontalOffset-A);return C.fulfillContentEmpty(new E.Position(I,1),O)}const M=m.getLineWidth(I);if(C.mouseContentHorizontalOffset>=M){const A=r(C.mouseContentHorizontalOffset-M),O=new E.Position(I,m.viewModel.getLineMaxColumn(I));return C.fulfillContentEmpty(O,A)}}return C.fulfillUnknown()}const D=l._doHitTest(m,C);return D.type===1?l.createMouseTargetFromHitTestPosition(m,C,D.spanNode,D.position,D.injectedText):this._createMouseTarget(m,C.withTarget(D.hitTarget),!0)}static _hitTestMinimap(m,C){if(a.isChildOfMinimap(C.targetPath)){const w=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.viewModel.getLineMaxColumn(w);return C.fulfillScrollbar(new E.Position(w,D))}return null}static _hitTestScrollbarSlider(m,C){if(a.isChildOfScrollableElement(C.targetPath)&&C.target&&C.target.nodeType===1){const w=C.target.className;if(w&&/\b(slider|scrollbar)\b/.test(w)){const D=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),I=m.viewModel.getLineMaxColumn(D);return C.fulfillScrollbar(new E.Position(D,I))}}return null}static _hitTestScrollbar(m,C){if(a.isChildOfScrollableElement(C.targetPath)){const w=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.viewModel.getLineMaxColumn(w);return C.fulfillScrollbar(new E.Position(w,D))}return null}getMouseColumn(m){const C=this._context.configuration.options,w=C.get(143),D=this._context.viewLayout.getCurrentScrollLeft()+m.x-w.contentLeft;return l._getMouseColumn(D,C.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(m,C){return m<0?1:Math.round(m/C)+1}static createMouseTargetFromHitTestPosition(m,C,w,D,I){const M=D.lineNumber,A=D.column,O=m.getLineWidth(M);if(C.mouseContentHorizontalOffset>O){const U=r(C.mouseContentHorizontalOffset-O);return C.fulfillContentEmpty(D,U)}const T=m.visibleRangeForPosition(M,A);if(!T)return C.fulfillUnknown(D);const N=T.left;if(Math.abs(C.mouseContentHorizontalOffset-N)<1)return C.fulfillContentText(D,null,{mightBeForeignElement:!!I,injectedText:I});const P=[];if(P.push({offset:T.left,column:A}),A>1){const U=m.visibleRangeForPosition(M,A-1);U&&P.push({offset:U.left,column:A-1})}const x=m.viewModel.getLineMaxColumn(M);if(AU.offset-F.offset);const R=C.pos.toClientCoordinates(S.getWindow(m.viewDomNode)),B=w.getBoundingClientRect(),W=B.left<=R.clientX&&R.clientX<=B.right;let V=null;for(let U=1;UI)){const A=Math.floor((D+I)/2);let O=C.pos.y+(A-C.mouseVerticalOffset);O<=C.editorPos.y&&(O=C.editorPos.y+1),O>=C.editorPos.y+C.editorPos.height&&(O=C.editorPos.y+C.editorPos.height-1);const T=new L.PageCoordinates(C.pos.x,O),N=this._actualDoHitTestWithCaretRangeFromPoint(m,T.toClientCoordinates(S.getWindow(m.viewDomNode)));if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(m,C.pos.toClientCoordinates(S.getWindow(m.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(m,C){const w=S.getShadowRoot(m.viewDomNode);let D;if(w?typeof w.caretRangeFromPoint>"u"?D=s(w,C.clientX,C.clientY):D=w.caretRangeFromPoint(C.clientX,C.clientY):D=m.viewDomNode.ownerDocument.caretRangeFromPoint(C.clientX,C.clientY),!D||!D.startContainer)return new b;const I=D.startContainer;if(I.nodeType===I.TEXT_NODE){const M=I.parentNode,A=M?M.parentNode:null,O=A?A.parentNode:null;return(O&&O.nodeType===O.ELEMENT_NODE?O.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(m,M,D.startOffset):new b(I.parentNode)}else if(I.nodeType===I.ELEMENT_NODE){const M=I.parentNode,A=M?M.parentNode:null;return(A&&A.nodeType===A.ELEMENT_NODE?A.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(m,I,I.textContent.length):new b(I)}return new b}static _doHitTestWithCaretPositionFromPoint(m,C){const w=m.viewDomNode.ownerDocument.caretPositionFromPoint(C.clientX,C.clientY);if(w.offsetNode.nodeType===w.offsetNode.TEXT_NODE){const D=w.offsetNode.parentNode,I=D?D.parentNode:null,M=I?I.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(m,w.offsetNode.parentNode,w.offset):new b(w.offsetNode.parentNode)}if(w.offsetNode.nodeType===w.offsetNode.ELEMENT_NODE){const D=w.offsetNode.parentNode,I=D&&D.nodeType===D.ELEMENT_NODE?D.className:null,M=D?D.parentNode:null,A=M&&M.nodeType===M.ELEMENT_NODE?M.className:null;if(I===y.ViewLine.CLASS_NAME){const O=w.offsetNode.childNodes[Math.min(w.offset,w.offsetNode.childNodes.length-1)];if(O)return i.createFromDOMInfo(m,O,0)}else if(A===y.ViewLine.CLASS_NAME)return i.createFromDOMInfo(m,w.offsetNode,0)}return new b(w.offsetNode)}static _snapToSoftTabBoundary(m,C){const w=C.getLineContent(m.lineNumber),{tabSize:D}=C.model.getOptions(),I=v.AtomicTabMoveOperations.atomicPosition(w,m.column-1,D,2);return I!==-1?new E.Position(m.lineNumber,I+1):m}static _doHitTest(m,C){let w=new b;if(typeof m.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?w=this._doHitTestWithCaretRangeFromPoint(m,C):m.viewDomNode.ownerDocument.caretPositionFromPoint&&(w=this._doHitTestWithCaretPositionFromPoint(m,C.pos.toClientCoordinates(S.getWindow(m.viewDomNode)))),w.type===1){const D=m.viewModel.getInjectedTextAt(w.position),I=m.viewModel.normalizePosition(w.position,2);(D||!I.equals(w.position))&&(w=new o(I,w.spanNode,D))}return w}}e.MouseTargetFactory=l;function s(h,m,C){const w=document.createRange();let D=h.elementFromPoint(m,C);if(D!==null){for(;D&&D.firstChild&&D.firstChild.nodeType!==D.firstChild.TEXT_NODE&&D.lastChild&&D.lastChild.firstChild;)D=D.lastChild;const I=D.getBoundingClientRect(),M=S.getWindow(D),A=M.getComputedStyle(D,null).getPropertyValue("font-style"),O=M.getComputedStyle(D,null).getPropertyValue("font-variant"),T=M.getComputedStyle(D,null).getPropertyValue("font-weight"),N=M.getComputedStyle(D,null).getPropertyValue("font-size"),P=M.getComputedStyle(D,null).getPropertyValue("line-height"),x=M.getComputedStyle(D,null).getPropertyValue("font-family"),R=`${A} ${O} ${T} ${N}/${P} ${x}`,B=D.innerText;let W=I.left,V=0,U;if(m>I.left+I.width)V=B.length;else{const F=g.getInstance();for(let j=0;jthis._createMouseTarget(h,m),h=>this._getMouseColumn(h))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const s=new p.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(s.onContextMenu(this.viewHelper.viewDomNode,h=>this._onContextMenu(h,!0))),this._register(s.onMouseMove(this.viewHelper.viewDomNode,h=>{this._onMouseMove(h),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=L.addDisposableListener(this.viewHelper.viewDomNode.ownerDocument,"mousemove",m=>{this.viewHelper.viewDomNode.contains(m.target)||this._onMouseLeave(new p.EditorMouseEvent(m,!1,this.viewHelper.viewDomNode))}))})),this._register(s.onMouseUp(this.viewHelper.viewDomNode,h=>this._onMouseUp(h))),this._register(s.onMouseLeave(this.viewHelper.viewDomNode,h=>this._onMouseLeave(h)));let g=0;this._register(s.onPointerDown(this.viewHelper.viewDomNode,(h,m)=>{g=m})),this._register(L.addDisposableListener(this.viewHelper.viewDomNode,L.EventType.POINTER_UP,h=>{this._mouseDownOperation.onPointerUp()})),this._register(s.onMouseDown(this.viewHelper.viewDomNode,h=>this._onMouseDown(h,g))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const d=i.MouseWheelClassifier.INSTANCE;let r=0,l=S.EditorZoom.getZoomLevel(),s=!1,g=0;const h=C=>{if(this.viewController.emitMouseWheel(C),!this._context.configuration.options.get(75))return;const w=new k.StandardWheelEvent(C);if(d.acceptStandardWheelEvent(w),d.isPhysicalMouseWheel()){if(m(C)){const D=S.EditorZoom.getZoomLevel(),I=w.deltaY>0?1:-1;S.EditorZoom.setZoomLevel(D+I),w.preventDefault(),w.stopPropagation()}}else Date.now()-r>50&&(l=S.EditorZoom.getZoomLevel(),s=m(C),g=0),r=Date.now(),g+=w.deltaY,s&&(S.EditorZoom.setZoomLevel(l+g/5),w.preventDefault(),w.stopPropagation())};this._register(L.addDisposableListener(this.viewHelper.viewDomNode,L.EventType.MOUSE_WHEEL,h,{capture:!0,passive:!1}));function m(C){return E.isMacintosh?(C.metaKey||C.ctrlKey)&&!C.shiftKey&&!C.altKey:C.ctrlKey&&!C.metaKey&&!C.shiftKey&&!C.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(d){if(d.hasChanged(143)){const r=this._context.configuration.options.get(143).height;this._height!==r&&(this._height=r,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(d){return this._mouseDownOperation.onCursorStateChanged(d),!1}onFocusChanged(d){return!1}getTargetAtClientPoint(d,r){const s=new p.ClientCoordinates(d,r).toPageCoordinates(L.getWindow(this.viewHelper.viewDomNode)),g=(0,p.createEditorPagePosition)(this.viewHelper.viewDomNode);if(s.yg.y+g.height||s.xg.x+g.width)return null;const h=(0,p.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,g,s);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),g,s,h,null)}_createMouseTarget(d,r){let l=d.target;if(!this.viewHelper.viewDomNode.contains(l)){const s=L.getShadowRoot(this.viewHelper.viewDomNode);s&&(l=s.elementsFromPoint(d.posx,d.posy).find(g=>this.viewHelper.viewDomNode.contains(g)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),d.editorPos,d.pos,d.relativePos,r?l:null)}_getMouseColumn(d){return this.mouseTargetFactory.getMouseColumn(d.relativePos)}_onContextMenu(d,r){this.viewController.emitContextMenu({event:d,target:this._createMouseTarget(d,r)})}_onMouseMove(d){this.mouseTargetFactory.mouseTargetIsWidget(d)||d.preventDefault(),!(this._mouseDownOperation.isActive()||d.timestamp{d.preventDefault(),this.viewHelper.focusTextArea()};if(D&&(s||h&&m))I(),this._mouseDownOperation.start(l.type,d,r);else if(g)d.preventDefault();else if(C){const M=l.detail;D&&this.viewHelper.shouldSuppressMouseDownOnViewZone(M.viewZoneId)&&(I(),this._mouseDownOperation.start(l.type,d,r),d.preventDefault())}else w&&this.viewHelper.shouldSuppressMouseDownOnWidget(l.detail)&&(I(),d.preventDefault());this.viewController.emitMouseDown({event:d,target:l})}}e.MouseHandler=n;class t extends y.Disposable{constructor(d,r,l,s,g,h){super(),this._context=d,this._viewController=r,this._viewHelper=l,this._mouseTargetFactory=s,this._createMouseTarget=g,this._getMouseColumn=h,this._mouseMoveMonitor=this._register(new p.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new a(this._context,this._viewHelper,this._mouseTargetFactory,(m,C,w)=>this._dispatchMouse(m,C,w))),this._mouseState=new f,this._currentSelection=new b.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(d){this._lastMouseEvent=d,this._mouseState.setModifiers(d);const r=this._findMousePosition(d,!1);r&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:d,target:r}):r.type===13&&(r.outsidePosition==="above"||r.outsidePosition==="below")?this._topBottomDragScrolling.start(r,d):(this._topBottomDragScrolling.stop(),this._dispatchMouse(r,!0,1)))}start(d,r,l){this._lastMouseEvent=r,this._mouseState.setStartedOnLineNumbers(d===3),this._mouseState.setStartButtons(r),this._mouseState.setModifiers(r);const s=this._findMousePosition(r,!0);if(!s||!s.position)return;this._mouseState.trySetCount(r.detail,s.position),r.detail=this._mouseState.count;const g=this._context.configuration.options;if(!g.get(90)&&g.get(35)&&!g.get(22)&&!this._mouseState.altKey&&r.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&s.type===6&&s.position&&this._currentSelection.containsPosition(s.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,r.buttons,h=>this._onMouseDownThenMove(h),h=>{const m=this._findMousePosition(this._lastMouseEvent,!1);L.isKeyboardEvent(h)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:m?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(s,r.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,r.buttons,h=>this._onMouseDownThenMove(h),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(d){this._currentSelection=d.selections[0]}_getPositionOutsideEditor(d){const r=d.editorPos,l=this._context.viewModel,s=this._context.viewLayout,g=this._getMouseColumn(d);if(d.posyr.y+r.height){const m=d.posy-r.y-r.height,C=s.getCurrentScrollTop()+d.relativePos.y,w=_.HitTestContext.getZoneAtCoord(this._context,C);if(w){const I=this._helpPositionJumpOverViewZone(w);if(I)return _.MouseTarget.createOutsideEditor(g,I,"below",m)}const D=s.getLineNumberAtVerticalOffset(C);return _.MouseTarget.createOutsideEditor(g,new v.Position(D,l.getLineMaxColumn(D)),"below",m)}const h=s.getLineNumberAtVerticalOffset(s.getCurrentScrollTop()+d.relativePos.y);if(d.posxr.x+r.width){const m=d.posx-r.x-r.width;return _.MouseTarget.createOutsideEditor(g,new v.Position(h,l.getLineMaxColumn(h)),"right",m)}return null}_findMousePosition(d,r){const l=this._getPositionOutsideEditor(d);if(l)return l;const s=this._createMouseTarget(d,r);if(!s.position)return null;if(s.type===8||s.type===5){const h=this._helpPositionJumpOverViewZone(s.detail);if(h)return _.MouseTarget.createViewZone(s.type,s.element,s.mouseColumn,h,s.detail)}return s}_helpPositionJumpOverViewZone(d){const r=new v.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=d.positionBefore,s=d.positionAfter;return l&&s?l.isBefore(r)?l:s:null}_dispatchMouse(d,r,l){d.position&&this._viewController.dispatchMouse({position:d.position,mouseColumn:d.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:l,inSelectionMode:r,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:d.type===6&&d.detail.injectedText!==null})}}class a extends y.Disposable{constructor(d,r,l,s){super(),this._context=d,this._viewHelper=r,this._mouseTargetFactory=l,this._dispatchMouse=s,this._operation=null}dispose(){super.dispose(),this.stop()}start(d,r){this._operation?this._operation.setPosition(d,r):this._operation=new u(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,d,r)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class u extends y.Disposable{constructor(d,r,l,s,g,h){super(),this._context=d,this._viewHelper=r,this._mouseTargetFactory=l,this._dispatchMouse=s,this._position=g,this._mouseEvent=h,this._lastTime=Date.now(),this._animationFrameDisposable=L.scheduleAtNextAnimationFrame(L.getWindow(h.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(d,r){this._position=d,this._mouseEvent=r}_tick(){const d=Date.now(),r=d-this._lastTime;return this._lastTime=d,r}_getScrollSpeed(){const d=this._context.configuration.options.get(66),r=this._context.configuration.options.get(143).height/d,l=this._position.outsideDistance/d;return l<=1.5?Math.max(30,r*(1+l)):l<=3?Math.max(60,r*(2+l)):Math.max(200,r*(7+l))}_execute(){const d=this._context.configuration.options.get(66),r=this._getScrollSpeed(),l=this._tick(),s=r*(l/1e3)*d,g=this._position.outsidePosition==="above"?-s:s;this._context.viewModel.viewLayout.deltaScrollNow(0,g),this._viewHelper.renderNow();const h=this._context.viewLayout.getLinesViewportData(),m=this._position.outsidePosition==="above"?h.startLineNumber:h.endLineNumber;let C;{const w=(0,p.createEditorPagePosition)(this._viewHelper.viewDomNode),D=this._context.configuration.options.get(143).horizontalScrollbarHeight,I=new p.PageCoordinates(this._mouseEvent.pos.x,w.y+w.height-D-.1),M=(0,p.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,w,I);C=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),w,I,M,null)}(!C.position||C.position.lineNumber!==m)&&(this._position.outsidePosition==="above"?C=_.MouseTarget.createOutsideEditor(this._position.mouseColumn,new v.Position(m,1),"above",this._position.outsideDistance):C=_.MouseTarget.createOutsideEditor(this._position.mouseColumn,new v.Position(m,this._context.viewModel.getLineMaxColumn(m)),"below",this._position.outsideDistance)),this._dispatchMouse(C,!0,2),this._animationFrameDisposable=L.scheduleAtNextAnimationFrame(L.getWindow(C.element),()=>this._execute())}}class f{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(d){this._altKey=d.altKey,this._ctrlKey=d.ctrlKey,this._metaKey=d.metaKey,this._shiftKey=d.shiftKey}setStartButtons(d){this._leftButton=d.leftButton,this._middleButton=d.middleButton}setStartedOnLineNumbers(d){this._startedOnLineNumbers=d}trySetCount(d,r){const l=new Date().getTime();l-this._lastSetMouseDownCountTime>f.CLEAR_MOUSE_DOWN_COUNT_TIME&&(d=1),this._lastSetMouseDownCountTime=l,d>this._lastMouseDownCount+1&&(d=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(r)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=r,this._lastMouseDownCount=Math.min(d,this._lastMouseDownPositionEqualCount)}}f.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(ie[845],ne([1,0,7,17,63,2,844,165,219,188,48]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class o extends _.MouseHandler{constructor(a,u,f){super(a,u,f),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,d=>this.onTap(d))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,d=>this.onChange(d))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,d=>this._onContextMenu(new p.EditorMouseEvent(d,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",d=>{const r=d.pointerType;if(r==="mouse"){this._lastPointerType="mouse";return}else r==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const c=new p.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(c.onPointerMove(this.viewHelper.viewDomNode,d=>this._onMouseMove(d))),this._register(c.onPointerUp(this.viewHelper.viewDomNode,d=>this._onMouseUp(d))),this._register(c.onPointerLeave(this.viewHelper.viewDomNode,d=>this._onMouseLeave(d))),this._register(c.onPointerDown(this.viewHelper.viewDomNode,(d,r)=>this._onMouseDown(d,r)))}onTap(a){if(!a.initialTarget||!this.viewHelper.linesContentDomNode.contains(a.initialTarget))return;a.preventDefault(),this.viewHelper.focusTextArea();const u=this._createMouseTarget(new p.EditorMouseEvent(a,!1,this.viewHelper.viewDomNode),!1);u.position&&this.viewController.dispatchMouse({position:u.position,mouseColumn:u.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:a.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:u.type===6&&u.detail.injectedText!==null})}onChange(a){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY)}_onMouseDown(a,u){a.browserEvent.pointerType!=="touch"&&super._onMouseDown(a,u)}}e.PointerEventHandler=o;class i extends _.MouseHandler{constructor(a,u,f){super(a,u,f),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,c=>this.onTap(c))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,c=>this.onChange(c))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,c=>this._onContextMenu(new p.EditorMouseEvent(c,!1,this.viewHelper.viewDomNode),!1)))}onTap(a){a.preventDefault(),this.viewHelper.focusTextArea();const u=this._createMouseTarget(new p.EditorMouseEvent(a,!1,this.viewHelper.viewDomNode),!1);if(u.position){const f=document.createEvent("CustomEvent");f.initEvent(v.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(f),this.viewController.moveTo(u.position,1)}}onChange(a){this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY)}}class n extends E.Disposable{constructor(a,u,f){super(),k.isIOS&&S.BrowserFeatures.pointerEvents?this.handler=this._register(new o(a,u,f)):b.mainWindow.TouchEvent?this.handler=this._register(new i(a,u,f)):this.handler=this._register(new _.MouseHandler(a,u,f))}getTargetAtClientPoint(a,u){return this.handler.getTargetAtClientPoint(a,u)}}e.PointerHandler=n}),define(ie[846],ne([1,0,200,14,17,72,146,233,56,487,253,11,5,431]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class n{constructor(){this._currentVisibleRange=new i.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(c){this._currentVisibleRange=c}}class t{constructor(c,d,r,l,s,g,h){this.minimalReveal=c,this.lineNumber=d,this.startColumn=r,this.endColumn=l,this.startScrollTop=s,this.stopScrollTop=g,this.scrollType=h,this.type="range",this.minLineNumber=d,this.maxLineNumber=d}}class a{constructor(c,d,r,l,s){this.minimalReveal=c,this.selections=d,this.startScrollTop=r,this.stopScrollTop=l,this.scrollType=s,this.type="selections";let g=d[0].startLineNumber,h=d[0].endLineNumber;for(let m=1,C=d.length;m{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new k.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new n,this._horizontalRevealRequest=null,this._stickyScrollEnabled=l.get(114).enabled,this._maxNumberStickyLines=l.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new b.ViewLine(this._viewLineOptions)}onConfigurationChanged(c){this._visibleLines.onConfigurationChanged(c),c.hasChanged(144)&&(this._maxLineWidth=0);const d=this._context.configuration.options,r=d.get(50),l=d.get(144);return this._lineHeight=d.get(66),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._isViewportWrapping=l.isViewportWrapping,this._revealHorizontalRightPadding=d.get(99),this._cursorSurroundingLines=d.get(29),this._cursorSurroundingLinesStyle=d.get(30),this._canUseLayerHinting=!d.get(32),this._stickyScrollEnabled=d.get(114).enabled,this._maxNumberStickyLines=d.get(114).maxLineCount,(0,E.applyFontInfo)(this.domNode,r),this._onOptionsMaybeChanged(),c.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const c=this._context.configuration,d=new b.ViewLineOptions(c,this._context.theme.type);if(!this._viewLineOptions.equals(d)){this._viewLineOptions=d;const r=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let s=r;s<=l;s++)this._visibleLines.getVisibleLine(s).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(c){const d=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();let l=!1;for(let s=d;s<=r;s++)l=this._visibleLines.getVisibleLine(s).onSelectionChanged()||l;return l}onDecorationsChanged(c){{const d=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();for(let l=d;l<=r;l++)this._visibleLines.getVisibleLine(l).onDecorationsChanged()}return!0}onFlushed(c){const d=this._visibleLines.onFlushed(c);return this._maxLineWidth=0,d}onLinesChanged(c){return this._visibleLines.onLinesChanged(c)}onLinesDeleted(c){return this._visibleLines.onLinesDeleted(c)}onLinesInserted(c){return this._visibleLines.onLinesInserted(c)}onRevealRangeRequest(c){const d=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),c.source,c.minimalReveal,c.range,c.selections,c.verticalType);if(d===-1)return!1;let r=this._context.viewLayout.validateScrollPosition({scrollTop:d});c.revealHorizontal?c.range&&c.range.startLineNumber!==c.range.endLineNumber?r={scrollTop:r.scrollTop,scrollLeft:0}:c.range?this._horizontalRevealRequest=new t(c.minimalReveal,c.range.startLineNumber,c.range.startColumn,c.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),r.scrollTop,c.scrollType):c.selections&&c.selections.length>0&&(this._horizontalRevealRequest=new a(c.minimalReveal,c.selections,this._context.viewLayout.getCurrentScrollTop(),r.scrollTop,c.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-r.scrollTop)<=this._lineHeight?1:c.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(r,s),!0}onScrollChanged(c){if(this._horizontalRevealRequest&&c.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&c.scrollTopChanged){const d=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),r=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(c.scrollTopr)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(c.scrollWidth),this._visibleLines.onScrollChanged(c)||!0}onTokensChanged(c){return this._visibleLines.onTokensChanged(c)}onZonesChanged(c){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(c)}onThemeChanged(c){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(c,d){const r=this._getViewLineDomNode(c);if(r===null)return null;const l=this._getLineNumberFor(r);if(l===-1||l<1||l>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(l)===1)return new o.Position(l,1);const s=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();if(lg)return null;let h=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(c,d);const m=this._context.viewModel.getLineMinColumn(l);return hr)return-1;const l=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(c).getWidth(l);return this._updateLineWidthsSlowIfDomDidLayout(l),s}linesVisibleRangesForRange(c,d){if(this.shouldRender())return null;const r=c.endLineNumber,l=i.Range.intersectRanges(c,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;const s=[];let g=0;const h=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let m=0;d&&(m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(l.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),w=this._visibleLines.getEndLineNumber();for(let D=l.startLineNumber;D<=l.endLineNumber;D++){if(Dw)continue;const I=D===l.startLineNumber?l.startColumn:1,M=D!==l.endLineNumber,A=M?this._context.viewModel.getLineMaxColumn(D):l.endColumn,O=this._visibleLines.getVisibleLine(D).getVisibleRangesForRange(D,I,A,h);if(O){if(d&&Dthis._visibleLines.getEndLineNumber())return null;const l=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),s=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(c,d,r,l);return this._updateLineWidthsSlowIfDomDidLayout(l),s}visibleRangeForPosition(c){const d=this._visibleRangesForLineRange(c.lineNumber,c.column,c.column);return d?new _.HorizontalPosition(d.outsideRenderedLine,d.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(c){c.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(c){const d=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();let l=1,s=!0;for(let g=d;g<=r;g++){const h=this._visibleLines.getVisibleLine(g);if(c&&!h.getWidthIsFast()){s=!1;continue}l=Math.max(l,h.getWidth(null))}return s&&d===1&&r===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),s}_checkMonospaceFontAssumptions(){let c=-1,d=-1;const r=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let s=r;s<=l;s++){const g=this._visibleLines.getVisibleLine(s);if(g.needsMonospaceFontCheck()){const h=g.getWidth(null);h>d&&(d=h,c=s)}}if(c!==-1&&!this._visibleLines.getVisibleLine(c).monospaceAssumptionsAreValid())for(let s=r;s<=l;s++)this._visibleLines.getVisibleLine(s).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(c){if(this._visibleLines.renderLines(c),this._lastRenderedData.setCurrentVisibleRange(c.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const r=this._horizontalRevealRequest;if(c.startLineNumber<=r.minLineNumber&&r.maxLineNumber<=c.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const l=this._computeScrollLeftToReveal(r);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:l.scrollLeft},r.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),y.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const r=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let s=r;s<=l;s++)if(this._visibleLines.getVisibleLine(s).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const d=this._context.viewLayout.getCurrentScrollTop()-c.bigNumbersDelta;this._linesContent.setTop(-d),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(c){const d=Math.ceil(c);this._maxLineWidth0){let N=s[0].startLineNumber,P=s[0].endLineNumber;for(let x=1,R=s.length;xm){if(!w)return-1;T=D}else if(g===5||g===6)if(g===6&&h<=D&&I<=C)T=h;else{const N=Math.max(5*this._lineHeight,m*.2),P=D-N,x=I-m;T=Math.max(x,P)}else if(g===1||g===2)if(g===2&&h<=D&&I<=C)T=h;else{const N=(D+I)/2;T=Math.max(0,N-m/2)}else T=this._computeMinimumScrolling(h,C,D,I,g===3,g===4);return T}_computeScrollLeftToReveal(c){const d=this._context.viewLayout.getCurrentViewport(),r=this._context.configuration.options.get(143),l=d.left,s=l+d.width-r.verticalScrollbarWidth;let g=1073741824,h=0;if(c.type==="range"){const C=this._visibleRangesForLineRange(c.lineNumber,c.startColumn,c.endColumn);if(!C)return null;for(const w of C.ranges)g=Math.min(g,Math.round(w.left)),h=Math.max(h,Math.round(w.left+w.width))}else for(const C of c.selections){if(C.startLineNumber!==C.endLineNumber)return null;const w=this._visibleRangesForLineRange(C.startLineNumber,C.startColumn,C.endColumn);if(!w)return null;for(const D of w.ranges)g=Math.min(g,Math.round(D.left)),h=Math.max(h,Math.round(D.left+D.width))}return c.minimalReveal||(g=Math.max(0,g-u.HORIZONTAL_EXTRA_PX),h+=this._revealHorizontalRightPadding),c.type==="selections"&&h-g>d.width?null:{scrollLeft:this._computeMinimumScrolling(l,s,g,h),maxHorizontalOffset:h}}_computeMinimumScrolling(c,d,r,l,s,g){c=c|0,d=d|0,r=r|0,l=l|0,s=!!s,g=!!g;const h=d-c;if(l-rd)return Math.max(0,l-h)}else return r;return c}}e.ViewLines=u,u.HORIZONTAL_EXTRA_PX=30}),define(ie[363],ne([1,0,7,50,77,230,225,13,14,393,106,9,6,123,2,17,12,743,347,99,22,88,176]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const s=L.$;class g{constructor(T,N,P,x,R,B,W){var V,U,F;this._checked=!1,this._hidden=!1,this.hasCheckbox=x,this.index=P,this.fireButtonTriggered=R,this.fireSeparatorButtonTriggered=B,this._onChecked=W,this.onChecked=x?i.Event.map(i.Event.filter(this._onChecked.event,j=>j.listElement===this),j=>j.checked):i.Event.None,T.type==="separator"?this._separator=T:(this.item=T,N&&N.type==="separator"&&!N.buttons&&(this._separator=N),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(V=this.item.highlights)===null||V===void 0?void 0:V.label,this._descriptionHighlights=(U=this.item.highlights)===null||U===void 0?void 0:U.description,this._detailHighlights=(F=this.item.highlights)===null||F===void 0?void 0:F.detail,this.saneTooltip=this.item.tooltip),this._init=new d.Lazy(()=>{var j;const J=(j=T.label)!==null&&j!==void 0?j:"",le=(0,n.parseLabelWithIcons)(J).text.trim(),ee=T.ariaLabel||[J,this.saneDescription,this.saneDetail].map($=>(0,n.getCodiconAriaLabel)($)).filter($=>!!$).join(", ");return{saneLabel:J,saneSortLabel:le,saneAriaLabel:ee}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(T){this._element=T}get hidden(){return this._hidden}set hidden(T){this._hidden=T}get checked(){return this._checked}set checked(T){T!==this._checked&&(this._checked=T,this._onChecked.fire({listElement:this,checked:T}))}get separator(){return this._separator}set separator(T){this._separator=T}get labelHighlights(){return this._labelHighlights}set labelHighlights(T){this._labelHighlights=T}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(T){this._descriptionHighlights=T}get detailHighlights(){return this._detailHighlights}set detailHighlights(T){this._detailHighlights=T}}class h{constructor(T){this.themeService=T}get templateId(){return h.ID}renderTemplate(T){const N=Object.create(null);N.toDisposeElement=[],N.toDisposeTemplate=[],N.entry=L.append(T,s(".quick-input-list-entry"));const P=L.append(N.entry,s("label.quick-input-list-label"));N.toDisposeTemplate.push(L.addStandardDisposableListener(P,L.EventType.CLICK,U=>{N.checkbox.offsetParent||U.preventDefault()})),N.checkbox=L.append(P,s("input.quick-input-list-checkbox")),N.checkbox.type="checkbox",N.toDisposeTemplate.push(L.addStandardDisposableListener(N.checkbox,L.EventType.CHANGE,U=>{N.element.checked=N.checkbox.checked}));const x=L.append(P,s(".quick-input-list-rows")),R=L.append(x,s(".quick-input-list-row")),B=L.append(x,s(".quick-input-list-row"));N.label=new E.IconLabel(R,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),N.toDisposeTemplate.push(N.label),N.icon=L.prepend(N.label.element,s(".quick-input-list-icon"));const W=L.append(R,s(".quick-input-list-entry-keybinding"));N.keybinding=new _.KeybindingLabel(W,a.OS);const V=L.append(B,s(".quick-input-list-label-meta"));return N.detail=new E.IconLabel(V,{supportHighlights:!0,supportIcons:!0}),N.toDisposeTemplate.push(N.detail),N.separator=L.append(N.entry,s(".quick-input-list-separator")),N.actionBar=new y.ActionBar(N.entry),N.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),N.toDisposeTemplate.push(N.actionBar),N}renderElement(T,N,P){var x,R,B,W;P.element=T,T.element=(x=P.entry)!==null&&x!==void 0?x:void 0;const V=T.item?T.item:T.separator;P.checkbox.checked=T.checked,P.toDisposeElement.push(T.onChecked(ee=>P.checkbox.checked=ee));const{labelHighlights:U,descriptionHighlights:F,detailHighlights:j}=T;if(!((R=T.item)===null||R===void 0)&&R.iconPath){const ee=(0,l.isDark)(this.themeService.getColorTheme().type)?T.item.iconPath.dark:(B=T.item.iconPath.light)!==null&&B!==void 0?B:T.item.iconPath.dark,$=r.URI.revive(ee);P.icon.className="quick-input-list-icon",P.icon.style.backgroundImage=L.asCSSUrl($)}else P.icon.style.backgroundImage="",P.icon.className=!((W=T.item)===null||W===void 0)&&W.iconClass?`quick-input-list-icon ${T.item.iconClass}`:"";const J={matches:U||[],descriptionTitle:T.saneDescription,descriptionMatches:F||[],labelEscapeNewLines:!0};V.type!=="separator"?(J.extraClasses=V.iconClasses,J.italic=V.italic,J.strikethrough=V.strikethrough,P.entry.classList.remove("quick-input-list-separator-as-item")):P.entry.classList.add("quick-input-list-separator-as-item"),P.label.setLabel(T.saneLabel,T.saneDescription,J),P.keybinding.set(V.type==="separator"?void 0:V.keybinding),T.saneDetail?(P.detail.element.style.display="",P.detail.setLabel(T.saneDetail,void 0,{matches:j,title:T.saneDetail,labelEscapeNewLines:!0})):P.detail.element.style.display="none",T.item&&T.separator&&T.separator.label?(P.separator.textContent=T.separator.label,P.separator.style.display=""):P.separator.style.display="none",P.entry.classList.toggle("quick-input-list-separator-border",!!T.separator);const le=V.buttons;le&&le.length?(P.actionBar.push(le.map((ee,$)=>{let te=ee.iconClass||(ee.iconPath?(0,c.getIconClass)(ee.iconPath):void 0);return ee.alwaysVisible&&(te=te?`${te} always-visible`:"always-visible"),{id:`id-${$}`,class:te,enabled:!0,label:"",tooltip:ee.tooltip||"",run:()=>{V.type!=="separator"?T.fireButtonTriggered({button:ee,item:V}):T.fireSeparatorButtonTriggered({button:ee,separator:V})}}}),{icon:!0,label:!1}),P.entry.classList.add("has-actions")):P.entry.classList.remove("has-actions")}disposeElement(T,N,P){P.toDisposeElement=(0,t.dispose)(P.toDisposeElement),P.actionBar.clear()}disposeTemplate(T){T.toDisposeElement=(0,t.dispose)(T.toDisposeElement),T.toDisposeTemplate=(0,t.dispose)(T.toDisposeTemplate)}}h.ID="listelement";class m{getHeight(T){return T.item?T.saneDetail?44:22:24}getTemplateId(T){return h.ID}}var C;(function(O){O[O.First=1]="First",O[O.Second=2]="Second",O[O.Last=3]="Last",O[O.Next=4]="Next",O[O.Previous=5]="Previous",O[O.NextPage=6]="NextPage",O[O.PreviousPage=7]="PreviousPage"})(C||(e.QuickInputListFocus=C={}));class w{constructor(T,N,P,x){this.parent=T,this.options=P,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new i.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new i.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new i.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new i.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new i.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new i.Emitter,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new i.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new i.Emitter,this.onLeave=this._onLeave.event,this._listElementChecked=new i.Emitter,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=N,this.container=L.append(this.parent,s(".quick-input-list"));const R=new m,B=new A;if(this.list=P.createList("QuickInput",this.container,R,[new h(x)],{identityProvider:{getId:W=>{var V,U,F,j,J,le,ee,$;return($=(le=(j=(U=(V=W.item)===null||V===void 0?void 0:V.id)!==null&&U!==void 0?U:(F=W.item)===null||F===void 0?void 0:F.label)!==null&&j!==void 0?j:(J=W.separator)===null||J===void 0?void 0:J.id)!==null&&le!==void 0?le:(ee=W.separator)===null||ee===void 0?void 0:ee.label)!==null&&$!==void 0?$:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:B}),this.list.getHTMLElement().id=N,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(W=>{const V=new k.StandardKeyboardEvent(W);switch(V.keyCode){case 10:this.toggleCheckbox();break;case 31:(a.isMacintosh?W.metaKey:W.ctrlKey)&&this.list.setFocus((0,p.range)(this.list.length));break;case 16:{const U=this.list.getFocus();U.length===1&&U[0]===0&&this._onLeave.fire();break}case 18:{const U=this.list.getFocus();U.length===1&&U[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(V)})),this.disposables.push(this.list.onMouseDown(W=>{W.browserEvent.button!==2&&W.browserEvent.preventDefault()})),this.disposables.push(L.addDisposableListener(this.container,L.EventType.CLICK,W=>{(W.x||W.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(W=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(W=>{typeof W.index=="number"&&(W.browserEvent.preventDefault(),this.list.setSelection([W.index]))})),P.hoverDelegate){const W=new S.ThrottledDelayer(P.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async V=>{var U;if(V.browserEvent.target instanceof HTMLAnchorElement){W.cancel();return}if(!(!(V.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&L.isAncestor(V.browserEvent.relatedTarget,(U=V.element)===null||U===void 0?void 0:U.element)))try{await W.trigger(async()=>{V.element&&this.showHover(V.element)})}catch(F){if(!(0,o.isCancellationError)(F))throw F}})),this.disposables.push(this.list.onMouseOut(V=>{var U;L.isAncestor(V.browserEvent.relatedTarget,(U=V.element)===null||U===void 0?void 0:U.element)||W.cancel()})),this.disposables.push(W)}this.disposables.push(this._listElementChecked.event(W=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return i.Event.map(this.list.onDidChangeFocus,T=>T.elements.map(N=>N.item))}get onDidChangeSelection(){return i.Event.map(this.list.onDidChangeSelection,T=>({items:T.elements.map(N=>N.item),event:T.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(T){this.list.scrollTop=T}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(T){this.list.getHTMLElement().ariaLabel=T}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(T,N=!0){for(let P=0,x=T.length;P{N.hidden||(N.checked=T)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(T){this.elementDisposables=(0,t.dispose)(this.elementDisposables);const N=B=>this.fireButtonTriggered(B),P=B=>this.fireSeparatorButtonTriggered(B);this.inputElements=T;const x=new Map,R=this.parent.classList.contains("show-checkboxes");this.elements=T.reduce((B,W,V)=>{var U;const F=V>0?T[V-1]:void 0;if(W.type==="separator"&&!W.buttons)return B;const j=new g(W,F,V,R,N,P,this._listElementChecked),J=B.length;return B.push(j),x.set((U=j.item)!==null&&U!==void 0?U:j.separator,J),B},[]),this.elementsToIndexes=x,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(T=>T.item)}setFocusedElements(T){if(this.list.setFocus(T.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N))),T.length>0){const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(T){this.list.setSelection(T.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N)))}getCheckedElements(){return this.elements.filter(T=>T.checked).map(T=>T.item).filter(T=>!!T)}setCheckedElements(T){try{this._fireCheckedEvents=!1;const N=new Set;for(const P of T)N.add(P);for(const P of this.elements)P.checked=N.has(P.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(T){this.list.getHTMLElement().style.pointerEvents=T?"":"none"}focus(T){if(!this.list.length)return;switch(T===C.Second&&this.list.length<2&&(T=C.First),T){case C.First:this.list.scrollTop=0,this.list.focusFirst(void 0,P=>!!P.item);break;case C.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,P=>!!P.item);break;case C.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,P=>!!P.item);break;case C.Next:{this.list.focusNext(void 0,!0,void 0,x=>!!x.item);const P=this.list.getFocus()[0];P!==0&&!this.elements[P-1].item&&this.list.firstVisibleIndex>P-1&&this.list.reveal(P-1);break}case C.Previous:{this.list.focusPrevious(void 0,!0,void 0,x=>!!x.item);const P=this.list.getFocus()[0];P!==0&&!this.elements[P-1].item&&this.list.firstVisibleIndex>P-1&&this.list.reveal(P-1);break}case C.NextPage:this.list.focusNextPage(void 0,P=>!!P.item);break;case C.PreviousPage:this.list.focusPreviousPage(void 0,P=>!!P.item);break}const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(T){var N,P,x;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((P=(N=this.options.hoverDelegate).onDidHideHover)===null||P===void 0||P.call(N),(x=this._lastHover)===null||x===void 0||x.dispose()),!(!T.element||!T.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:T.saneTooltip,target:T.element,linkHandler:R=>{this.options.linkOpenerDelegate(R)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1)))}layout(T){this.list.getHTMLElement().style.maxHeight=T?`${Math.floor(T/44)*44+6}px`:"",this.list.layout()}filter(T){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const N=T;if(T=T.trim(),!T||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(x=>{x.labelHighlights=void 0,x.descriptionHighlights=void 0,x.detailHighlights=void 0,x.hidden=!1;const R=x.index&&this.inputElements[x.index-1];x.item&&(x.separator=R&&R.type==="separator"&&!R.buttons?R:void 0)});else{let x;this.elements.forEach(R=>{var B,W,V,U;let F;this.matchOnLabelMode==="fuzzy"?F=this.matchOnLabel&&(B=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(R.saneLabel)))!==null&&B!==void 0?B:void 0:F=this.matchOnLabel&&(W=D(N,(0,n.parseLabelWithIcons)(R.saneLabel)))!==null&&W!==void 0?W:void 0;const j=this.matchOnDescription&&(V=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(R.saneDescription||"")))!==null&&V!==void 0?V:void 0,J=this.matchOnDetail&&(U=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(R.saneDetail||"")))!==null&&U!==void 0?U:void 0;if(F||j||J?(R.labelHighlights=F,R.descriptionHighlights=j,R.detailHighlights=J,R.hidden=!1):(R.labelHighlights=void 0,R.descriptionHighlights=void 0,R.detailHighlights=void 0,R.hidden=R.item?!R.item.alwaysShow:!0),R.item?R.separator=void 0:R.separator&&(R.hidden=!0),!this.sortByLabel){const le=R.index&&this.inputElements[R.index-1];x=le&&le.type==="separator"?le:x,x&&!R.hidden&&(R.separator=x,x=void 0)}})}const P=this.elements.filter(x=>!x.hidden);if(this.sortByLabel&&T){const x=T.toLowerCase();P.sort((R,B)=>M(R,B,x))}return this.elementsToIndexes=P.reduce((x,R,B)=>{var W;return x.set((W=R.item)!==null&&W!==void 0?W:R.separator,B),x},new Map),this.list.splice(0,this.list.length,P),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(P.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const T=this.list.getFocusedElements(),N=this.allVisibleChecked(T);for(const P of T)P.checked=!N}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(T){this.container.style.display=T?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,t.dispose)(this.elementDisposables),this.disposables=(0,t.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(T){this._onButtonTriggered.fire(T)}fireSeparatorButtonTriggered(T){this._onSeparatorButtonTriggered.fire(T)}style(T){this.list.style(T)}toggleHover(){const T=this.list.getFocusedElements()[0];if(!T?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const N=this.list.getFocusedElements()[0];if(!N)return;this.showHover(N);const P=new t.DisposableStore;P.add(this.list.onDidChangeFocus(x=>{x.indexes.length&&this.showHover(x.elements[0])})),this._lastHover&&P.add(this._lastHover),this._toggleHover=P,this.elementDisposables.push(this._toggleHover)}}e.QuickInputList=w,Ee([b.memoize],w.prototype,"onDidChangeFocus",null),Ee([b.memoize],w.prototype,"onDidChangeSelection",null);function D(O,T){const{text:N,iconOffsets:P}=T;if(!P||P.length===0)return I(O,N);const x=(0,u.ltrim)(N," "),R=N.length-x.length,B=I(O,x);if(B)for(const W of B){const V=P[W.start+R]+R;W.start+=V,W.end+=V}return B}function I(O,T){const N=T.toLowerCase().indexOf(O.toLowerCase());return N!==-1?[{start:N,end:N+O.length}]:null}function M(O,T,N){const P=O.labelHighlights||[],x=T.labelHighlights||[];return P.length&&!x.length?-1:!P.length&&x.length?1:P.length===0&&x.length===0?0:(0,v.compareAnything)(O.saneSortLabel,T.saneSortLabel,N)}class A{getWidgetAriaLabel(){return(0,f.localize)(0,null)}getAriaLabel(T){var N;return!((N=T.separator)===null||N===void 0)&&N.label?`${T.saneAriaLabel}, ${T.separator.label}`:T.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(T){return T.hasCheckbox?"checkbox":"option"}isChecked(T){if(T.hasCheckbox)return{value:T.checked,onDidChange:T.onChecked}}}}),define(ie[847],ne([1,0,7,50,158,41,13,14,26,6,2,17,100,27,741,70,363,347,176]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputBox=e.QuickPick=e.backButton=void 0,e.backButton={iconClass:n.ThemeIcon.asClassName(S.Codicon.quickInputBack),tooltip:(0,t.localize)(0,null),handle:-1};class c extends b.Disposable{constructor(s){super(),this.ui=s,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=c.noPromptMessage,this._severity=i.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new v.Emitter),this.onDidHideEmitter=this._register(new v.Emitter),this.onDisposeEmitter=this._register(new v.Emitter),this.visibleDisposables=this._register(new b.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(s){this._title=s,this.update()}get description(){return this._description}set description(s){this._description=s,this.update()}get step(){return this._steps}set step(s){this._steps=s,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(s){this._totalSteps=s,this.update()}get enabled(){return this._enabled}set enabled(s){this._enabled=s,this.update()}get contextKey(){return this._contextKey}set contextKey(s){this._contextKey=s,this.update()}get busy(){return this._busy}set busy(s){this._busy=s,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(s){const g=this._ignoreFocusOut!==s&&!o.isIOS;this._ignoreFocusOut=s&&!o.isIOS,g&&this.update()}get buttons(){return this._buttons}set buttons(s){this._buttons=s,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(s){this._toggles=s??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(s){this._validationMessage=s,this.update()}get severity(){return this._severity}set severity(s){this._severity=s,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(s=>{this.buttons.indexOf(s)!==-1&&this.onDidTriggerButtonEmitter.fire(s)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(s=a.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:s})}update(){var s,g;if(!this.visible)return;const h=this.getTitle();h&&this.ui.title.textContent!==h?this.ui.title.textContent=h:!h&&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._widgetUpdated&&(this._widgetUpdated=!1,this._widget?L.reset(this.ui.widget,this._widget):L.reset(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new p.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 w=this.buttons.filter(I=>I===e.backButton);this.ui.leftActionBar.push(w.map((I,M)=>{const A=new E.Action(`id-${M}`,"",I.iconClass||(0,f.getIconClass)(I.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(I)});return A.tooltip=I.tooltip||"",A}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const D=this.buttons.filter(I=>I!==e.backButton);this.ui.rightActionBar.push(D.map((I,M)=>{const A=new E.Action(`id-${M}`,"",I.iconClass||(0,f.getIconClass)(I.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(I)});return A.tooltip=I.tooltip||"",A}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const w=(g=(s=this.toggles)===null||s===void 0?void 0:s.filter(D=>D instanceof y.Toggle))!==null&&g!==void 0?g:[];this.ui.inputBox.toggles=w}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const C=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==C&&(this._lastValidationMessage=C,L.reset(this.ui.message),(0,f.renderQuickInputDescription)(C,this.ui.message,{callback:w=>{this.ui.linkOpenerDelegate(w)},disposables:this.visibleDisposables})),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,t.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(s){if(this.ui.inputBox.showDecoration(s),s!==i.default.Ignore){const g=this.ui.inputBox.stylesForType(s);this.ui.message.style.color=g.foreground?`${g.foreground}`:"",this.ui.message.style.backgroundColor=g.background?`${g.background}`:"",this.ui.message.style.border=g.border?`1px solid ${g.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()}}c.noPromptMessage=(0,t.localize)(1,null);class d extends c{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new v.Emitter),this.onWillAcceptEmitter=this._register(new v.Emitter),this.onDidAcceptEmitter=this._register(new v.Emitter),this.onDidCustomEmitter=this._register(new v.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=a.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new v.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new v.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new v.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new v.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=s=>s,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.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(s){this._quickNavigate=s,this.update()}get value(){return this._value}set value(s){this.doSetValue(s)}doSetValue(s,g){this._value!==s&&(this._value=s,g||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(s){this._ariaLabel=s,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(s){this._placeholder=s,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(s){this.ui.list.scrollTop=s}set items(s){this._items=s,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(s){this._canSelectMany=s,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(s){this._canAcceptInBackground=s}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(s){this._matchOnDescription=s,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(s){this._matchOnDetail=s,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(s){this._matchOnLabel=s,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(s){this._matchOnLabelMode=s,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(s){this._sortByLabel=s,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(s){this._autoFocusOnList=s,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(s){this._keepScrollPosition=s}get itemActivation(){return this._itemActivation}set itemActivation(s){this._itemActivation=s}get activeItems(){return this._activeItems}set activeItems(s){this._activeItems=s,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(s){this._selectedItems=s,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?a.NO_KEY_MODS:this.ui.keyMods}set valueSelection(s){this._valueSelection=s,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(s){this._customButton=s,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(s){this._customButtonLabel=s,this.update()}get customHover(){return this._customButtonHover}set customHover(s){this._customButtonHover=s,this.update()}get ok(){return this._ok}set ok(s){this._ok=s,this.update()}get hideInput(){return!!this._hideInput}set hideInput(s){this._hideInput=s,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(u.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(s=>{this.doSetValue(s,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(s=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(s=>{switch(s.keyCode){case 18:this.ui.list.focus(u.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(s,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(u.QuickInputListFocus.Previous):this.ui.list.focus(u.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(s,!0);break;case 12:this.ui.list.focus(u.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(s,!0);break;case 11:this.ui.list.focus(u.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(s,!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:(s.ctrlKey||s.metaKey)&&!s.shiftKey&&!s.altKey&&(this.ui.list.focus(u.QuickInputListFocus.First),L.EventHelper.stop(s,!0));break;case 13:(s.ctrlKey||s.metaKey)&&!s.shiftKey&&!s.altKey&&(this.ui.list.focus(u.QuickInputListFocus.Last),L.EventHelper.stop(s,!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(s=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,_.equals)(s,this._activeItems,(g,h)=>g===h)||(this._activeItems=s,this.onDidChangeActiveEmitter.fire(s))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:s,event:g})=>{if(this.canSelectMany){s.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,_.equals)(s,this._selectedItems,(h,m)=>h===m)||(this._selectedItems=s,this.onDidChangeSelectionEmitter.fire(s),s.length&&this.handleAccept(L.isMouseEvent(g)&&g.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(s=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,_.equals)(s,this._selectedItems,(g,h)=>g===h)||(this._selectedItems=s,this.onDidChangeSelectionEmitter.fire(s)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(s=>this.onDidTriggerItemButtonEmitter.fire(s))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(s=>this.onDidTriggerSeparatorButtonEmitter.fire(s))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(s){let g=!1;this.onWillAcceptEmitter.fire({veto:()=>g=!0}),g||this.onDidAcceptEmitter.fire({inBackground:s})}registerQuickNavigation(){return L.addDisposableListener(this.ui.container,L.EventType.KEY_UP,s=>{if(this.canSelectMany||!this._quickNavigate)return;const g=new k.StandardKeyboardEvent(s),h=g.keyCode;this._quickNavigate.keybindings.some(w=>{const D=w.getChords();return D.length>1?!1:D[0].shiftKey&&h===4?!(g.ctrlKey||g.altKey||g.metaKey):!!(D[0].altKey&&h===6||D[0].ctrlKey&&h===5||D[0].metaKey&&h===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 s=this.keepScrollPosition?this.scrollTop:0,g=!!this.description,h={title:!!this.title||!!this.step||!!this.buttons.length,description:g,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||g,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(h),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 m=this.ariaLabel;if(!m&&h.inputBox&&(m=this.placeholder||d.DEFAULT_ARIA_LABEL,this.title&&(m+=` - ${this.title}`)),this.ui.list.ariaLabel!==m&&(this.ui.list.ariaLabel=m??null),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(u.QuickInputListFocus.Second),this._itemActivation=a.ItemActivation.FIRST;break;case a.ItemActivation.LAST:this.ui.list.focus(u.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||"",h.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(u.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=s)}}e.QuickPick=d,d.DEFAULT_ARIA_LABEL=(0,t.localize)(3,null);class r extends c{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new v.Emitter),this.onDidAcceptEmitter=this._register(new v.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(s){this._value=s||"",this.update()}get placeholder(){return this._placeholder}set placeholder(s){this._placeholder=s,this.update()}get password(){return this._password}set password(s){this._password=s,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(s=>{s!==this.value&&(this._value=s,this.onDidValueChangeEmitter.fire(s))})),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 s={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(s),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)}}e.InputBox=r}),define(ie[848],ne([1,0,7,77,229,315,585,19,6,2,100,742,70,782,363,847,48]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const f=L.$;class c extends v.Disposable{constructor(r,l,s){super(),this.options=r,this.themeService=l,this.layoutService=s,this.enabled=!0,this.onDidAcceptEmitter=this._register(new S.Emitter),this.onDidCustomEmitter=this._register(new S.Emitter),this.onDidTriggerButtonEmitter=this._register(new S.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new S.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new S.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=r.idPrefix,this.parentElement=r.container,this.styles=r.styles,this._register(S.Event.runAndSubscribe(L.onDidRegisterWindow,({window:g,disposables:h})=>this.registerKeyModsListeners(g,h),{window:u.mainWindow,disposables:this._store})),this._register(L.onWillUnregisterWindow(g=>{this.ui&&L.getWindow(this.ui.container)===g&&this.reparentUI(this.layoutService.mainContainer)}))}registerKeyModsListeners(r,l){const s=g=>{this.keyMods.ctrlCmd=g.ctrlKey||g.metaKey,this.keyMods.alt=g.altKey};for(const g of[L.EventType.KEY_DOWN,L.EventType.KEY_UP,L.EventType.MOUSE_DOWN])l.add(L.addDisposableListener(r,g,s,!0))}getUI(r){if(this.ui)return r&&this.parentElement.ownerDocument!==this.layoutService.activeContainer.ownerDocument&&this.reparentUI(this.layoutService.activeContainer),this.ui;const l=L.append(this.parentElement,f(".quick-input-widget.show-file-icons"));l.tabIndex=-1,l.style.display="none";const s=L.createStyleSheet(l),g=L.append(l,f(".quick-input-titlebar")),h=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,m=this._register(new k.ActionBar(g,h));m.domNode.classList.add("quick-input-left-action-bar");const C=L.append(g,f(".quick-input-title")),w=this._register(new k.ActionBar(g,h));w.domNode.classList.add("quick-input-right-action-bar");const D=L.append(l,f(".quick-input-header")),I=L.append(D,f("input.quick-input-check-all"));I.type="checkbox",I.setAttribute("aria-label",(0,o.localize)(0,null)),this._register(L.addStandardDisposableListener(I,L.EventType.CHANGE,G=>{const de=I.checked;$.setAllVisibleChecked(de)})),this._register(L.addDisposableListener(I,L.EventType.CLICK,G=>{(G.x||G.y)&&T.setFocus()}));const M=L.append(D,f(".quick-input-description")),A=L.append(D,f(".quick-input-and-message")),O=L.append(A,f(".quick-input-filter")),T=this._register(new n.QuickInputBox(O,this.styles.inputBox,this.styles.toggle));T.setAttribute("aria-describedby",`${this.idPrefix}message`);const N=L.append(O,f(".quick-input-visible-count"));N.setAttribute("aria-live","polite"),N.setAttribute("aria-atomic","true");const P=new E.CountBadge(N,{countFormat:(0,o.localize)(1,null)},this.styles.countBadge),x=L.append(O,f(".quick-input-count"));x.setAttribute("aria-live","polite");const R=new E.CountBadge(x,{countFormat:(0,o.localize)(2,null)},this.styles.countBadge),B=L.append(D,f(".quick-input-action")),W=this._register(new y.Button(B,this.styles.button));W.label=(0,o.localize)(3,null),this._register(W.onDidClick(G=>{this.onDidAcceptEmitter.fire()}));const V=L.append(D,f(".quick-input-action")),U=this._register(new y.Button(V,this.styles.button));U.label=(0,o.localize)(4,null),this._register(U.onDidClick(G=>{this.onDidCustomEmitter.fire()}));const F=L.append(A,f(`#${this.idPrefix}message.quick-input-message`)),j=this._register(new _.ProgressBar(l,this.styles.progressBar));j.getContainer().classList.add("quick-input-progress");const J=L.append(l,f(".quick-input-html-widget"));J.tabIndex=-1;const le=L.append(l,f(".quick-input-description")),ee=this.idPrefix+"list",$=this._register(new t.QuickInputList(l,ee,this.options,this.themeService));T.setAttribute("aria-controls",ee),this._register($.onDidChangeFocus(()=>{var G;T.setAttribute("aria-activedescendant",(G=$.getActiveDescendant())!==null&&G!==void 0?G:"")})),this._register($.onChangedAllVisibleChecked(G=>{I.checked=G})),this._register($.onChangedVisibleCount(G=>{P.setCount(G)})),this._register($.onChangedCheckedCount(G=>{R.setCount(G)})),this._register($.onLeave(()=>{setTimeout(()=>{T.setFocus(),this.controller instanceof a.QuickPick&&this.controller.canSelectMany&&$.clearFocus()},0)}));const te=L.trackFocus(l);return this._register(te),this._register(L.addDisposableListener(l,L.EventType.FOCUS,G=>{L.isAncestor(G.relatedTarget,l)||(this.previousFocusElement=G.relatedTarget instanceof HTMLElement?G.relatedTarget:void 0)},!0)),this._register(te.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(i.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(L.addDisposableListener(l,L.EventType.FOCUS,G=>{T.setFocus()})),this._register(L.addStandardDisposableListener(l,L.EventType.KEY_DOWN,G=>{if(!L.isAncestor(G.target,J))switch(G.keyCode){case 3:L.EventHelper.stop(G,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:L.EventHelper.stop(G,!0),this.hide(i.QuickInputHideReason.Gesture);break;case 2:if(!G.altKey&&!G.ctrlKey&&!G.metaKey){const de=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(l.classList.contains("show-checkboxes")?de.push("input"):de.push("input[type=text]"),this.getUI().list.isDisplayed()&&de.push(".monaco-list"),this.getUI().message&&de.push(".quick-input-message a"),this.getUI().widget){if(L.isAncestor(G.target,this.getUI().widget))break;de.push(".quick-input-html-widget")}const ue=l.querySelectorAll(de.join(", "));G.shiftKey&&G.target===ue[0]?(L.EventHelper.stop(G,!0),$.clearFocus()):!G.shiftKey&&L.isAncestor(G.target,ue[ue.length-1])&&(L.EventHelper.stop(G,!0),ue[0].focus())}break;case 10:G.ctrlKey&&(L.EventHelper.stop(G,!0),this.getUI().list.toggleHover());break}})),this.ui={container:l,styleSheet:s,leftActionBar:m,titleBar:g,title:C,description1:le,description2:M,widget:J,rightActionBar:w,checkAll:I,inputContainer:A,filterContainer:O,inputBox:T,visibleCountContainer:N,visibleCount:P,countContainer:x,count:R,okContainer:B,ok:W,message:F,customButtonContainer:V,customButton:U,list:$,progressBar:j,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:G=>this.show(G),hide:()=>this.hide(),setVisibilities:G=>this.setVisibilities(G),setEnabled:G=>this.setEnabled(G),setContextKey:G=>this.options.setContextKey(G),linkOpenerDelegate:G=>this.options.linkOpenerDelegate(G)},this.updateStyles(),this.ui}reparentUI(r){this.ui&&(this.parentElement=r,L.append(this.parentElement,this.ui.container))}pick(r,l={},s=p.CancellationToken.None){return new Promise((g,h)=>{let m=I=>{var M;m=g,(M=l.onKeyMods)===null||M===void 0||M.call(l,C.keyMods),g(I)};if(s.isCancellationRequested){m(void 0);return}const C=this.createQuickPick();let w;const D=[C,C.onDidAccept(()=>{if(C.canSelectMany)m(C.selectedItems.slice()),C.hide();else{const I=C.activeItems[0];I&&(m(I),C.hide())}}),C.onDidChangeActive(I=>{const M=I[0];M&&l.onDidFocus&&l.onDidFocus(M)}),C.onDidChangeSelection(I=>{if(!C.canSelectMany){const M=I[0];M&&(m(M),C.hide())}}),C.onDidTriggerItemButton(I=>l.onDidTriggerItemButton&&l.onDidTriggerItemButton({...I,removeItem:()=>{const M=C.items.indexOf(I.item);if(M!==-1){const A=C.items.slice(),O=A.splice(M,1),T=C.activeItems.filter(P=>P!==O[0]),N=C.keepScrollPosition;C.keepScrollPosition=!0,C.items=A,T&&(C.activeItems=T),C.keepScrollPosition=N}}})),C.onDidTriggerSeparatorButton(I=>{var M;return(M=l.onDidTriggerSeparatorButton)===null||M===void 0?void 0:M.call(l,I)}),C.onDidChangeValue(I=>{w&&!I&&(C.activeItems.length!==1||C.activeItems[0]!==w)&&(C.activeItems=[w])}),s.onCancellationRequested(()=>{C.hide()}),C.onDidHide(()=>{(0,v.dispose)(D),m(void 0)})];C.title=l.title,C.canSelectMany=!!l.canPickMany,C.placeholder=l.placeHolder,C.ignoreFocusOut=!!l.ignoreFocusLost,C.matchOnDescription=!!l.matchOnDescription,C.matchOnDetail=!!l.matchOnDetail,C.matchOnLabel=l.matchOnLabel===void 0||l.matchOnLabel,C.autoFocusOnList=l.autoFocusOnList===void 0||l.autoFocusOnList,C.quickNavigate=l.quickNavigate,C.hideInput=!!l.hideInput,C.contextKey=l.contextKey,C.busy=!0,Promise.all([r,l.activeItem]).then(([I,M])=>{w=M,C.busy=!1,C.items=I,C.canSelectMany&&(C.selectedItems=I.filter(A=>A.type!=="separator"&&A.picked)),w&&(C.activeItems=[w])}),C.show(),Promise.resolve(r).then(void 0,I=>{h(I),C.hide()})})}createQuickPick(){const r=this.getUI(!0);return new a.QuickPick(r)}createInputBox(){const r=this.getUI(!0);return new a.InputBox(r)}show(r){const l=this.getUI(!0);this.onShowEmitter.fire();const s=this.controller;this.controller=r,s?.didHide(),this.setEnabled(!0),l.leftActionBar.clear(),l.title.textContent="",l.description1.textContent="",l.description2.textContent="",L.reset(l.widget),l.rightActionBar.clear(),l.checkAll.checked=!1,l.inputBox.placeholder="",l.inputBox.password=!1,l.inputBox.showDecoration(b.default.Ignore),l.visibleCount.setCount(0),l.count.setCount(0),L.reset(l.message),l.progressBar.stop(),l.list.setElements([]),l.list.matchOnDescription=!1,l.list.matchOnDetail=!1,l.list.matchOnLabel=!0,l.list.sortByLabel=!0,l.ignoreFocusOut=!1,l.inputBox.toggles=void 0;const g=this.options.backKeybindingLabel();a.backButton.tooltip=g?(0,o.localize)(5,null,g):(0,o.localize)(6,null),l.container.style.display="",this.updateLayout(),l.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(r){const l=this.getUI();l.title.style.display=r.title?"":"none",l.description1.style.display=r.description&&(r.inputBox||r.checkAll)?"":"none",l.description2.style.display=r.description&&!(r.inputBox||r.checkAll)?"":"none",l.checkAll.style.display=r.checkAll?"":"none",l.inputContainer.style.display=r.inputBox?"":"none",l.filterContainer.style.display=r.inputBox?"":"none",l.visibleCountContainer.style.display=r.visibleCount?"":"none",l.countContainer.style.display=r.count?"":"none",l.okContainer.style.display=r.ok?"":"none",l.customButtonContainer.style.display=r.customButton?"":"none",l.message.style.display=r.message?"":"none",l.progressBar.getContainer().style.display=r.progressBar?"":"none",l.list.display(!!r.list),l.container.classList.toggle("show-checkboxes",!!r.checkBox),l.container.classList.toggle("hidden-input",!r.inputBox&&!r.description),this.updateLayout()}setEnabled(r){if(r!==this.enabled){this.enabled=r;for(const l of this.getUI().leftActionBar.viewItems)l.action.enabled=r;for(const l of this.getUI().rightActionBar.viewItems)l.action.enabled=r;this.getUI().checkAll.disabled=!r,this.getUI().inputBox.enabled=r,this.getUI().ok.enabled=r,this.getUI().list.enabled=r}}hide(r){var l,s;const g=this.controller;if(!g)return;const h=(l=this.ui)===null||l===void 0?void 0:l.container,m=h&&!L.isAncestorOfActiveElement(h);if(this.controller=null,this.onHideEmitter.fire(),h&&(h.style.display="none"),!m){let C=this.previousFocusElement;for(;C&&!C.offsetParent;)C=(s=C.parentElement)!==null&&s!==void 0?s:void 0;C?.offsetParent?(C.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}g.didHide(r)}layout(r,l){this.dimension=r,this.titleBarOffset=l,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const r=this.ui.container.style,l=Math.min(this.dimension.width*.62,c.MAX_WIDTH);r.width=l+"px",r.marginLeft="-"+l/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(r){this.styles=r,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:r,quickInputBackground:l,quickInputForeground:s,widgetBorder:g,widgetShadow:h}=this.styles.widget;this.ui.titleBar.style.backgroundColor=r??"",this.ui.container.style.backgroundColor=l??"",this.ui.container.style.color=s??"",this.ui.container.style.border=g?`1px solid ${g}`:"",this.ui.container.style.boxShadow=h?`0 0 8px 2px ${h}`:"",this.ui.list.style(this.styles.list);const m=[];this.styles.pickerGroup.pickerGroupBorder&&m.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&m.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&m.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(m.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&m.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&m.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&m.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&m.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&m.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),m.push("}"));const C=m.join(` `);C!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=C)}}}e.QuickInputController=c,c.MAX_WIDTH=600}),define(ie[23],ne([1,0,6,2,8,37,88]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.themeColorFromId=e.IThemeService=void 0,e.IThemeService=(0,y.createDecorator)("themeService");function p(n){return{id:n}}e.themeColorFromId=p;function S(n){switch(n){case _.ColorScheme.DARK:return"vs-dark";case _.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case _.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=S,e.Extensions={ThemingContribution:"base.contributions.theming"};class v{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new L.Emitter}onColorThemeChange(t){return this.themingParticipants.push(t),this.onThemingParticipantAddedEmitter.fire(t),(0,k.toDisposable)(()=>{const a=this.themingParticipants.indexOf(t);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}const b=new v;E.Registry.add(e.Extensions.ThemingContribution,b);function o(n){return b.onColorThemeChange(n)}e.registerThemingParticipant=o;class i extends k.Disposable{constructor(t){super(),this.themeService=t,this.theme=t.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(t){this.theme=t,this.updateStyles()}updateStyles(){}}e.Themable=i}),define(ie[849],ne([1,0,6,2,66,23]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let _=class extends k.Disposable{constructor(v){super(),this._themeService=v,this._onWillCreateCodeEditor=this._register(new L.Emitter),this._onCodeEditorAdd=this._register(new L.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new L.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new L.Emitter),this._onDiffEditorAdd=this._register(new L.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new L.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new y.LinkedList,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(v){this._codeEditors[v.getId()]=v,this._onCodeEditorAdd.fire(v)}removeCodeEditor(v){delete this._codeEditors[v.getId()]&&this._onCodeEditorRemove.fire(v)}listCodeEditors(){return Object.keys(this._codeEditors).map(v=>this._codeEditors[v])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(v){this._diffEditors[v.getId()]=v,this._onDiffEditorAdd.fire(v)}listDiffEditors(){return Object.keys(this._diffEditors).map(v=>this._diffEditors[v])}getFocusedCodeEditor(){let v=null;const b=this.listCodeEditors();for(const o of b){if(o.hasTextFocus())return o;o.hasWidgetFocus()&&(v=o)}return v}removeDecorationType(v){const b=this._decorationOptionProviders.get(v);b&&(b.refCount--,b.refCount<=0&&(this._decorationOptionProviders.delete(v),b.dispose(),this.listCodeEditors().forEach(o=>o.removeDecorationsByType(v))))}setModelProperty(v,b,o){const i=v.toString();let n;this._modelProperties.has(i)?n=this._modelProperties.get(i):(n=new Map,this._modelProperties.set(i,n)),n.set(b,o)}getModelProperty(v,b){const o=v.toString();if(this._modelProperties.has(o))return this._modelProperties.get(o).get(b)}async openCodeEditor(v,b,o){for(const i of this._codeEditorOpenHandlers){const n=await i(v,b,o);if(n!==null)return n}return null}registerCodeEditorOpenHandler(v){const b=this._codeEditorOpenHandlers.unshift(v);return(0,k.toDisposable)(b)}};e.AbstractCodeEditorService=_,e.AbstractCodeEditorService=_=Ee([he(0,E.IThemeService)],_);class p{constructor(v){this._styleSheet=v}}e.GlobalStyleSheet=p}),define(ie[850],ne([1,0,7,40,76,56,23]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class p extends E.ViewPart{constructor(v,b,o,i){super(v);const n=this._context.configuration.options,t=n.get(102),a=n.get(74),u=n.get(40),f=n.get(105),c={listenOnDomNode:o.domNode,className:"editor-scrollable "+(0,_.getThemeTypeSelector)(v.theme.type),useShadows:!1,lazyRender:!0,vertical:t.vertical,horizontal:t.horizontal,verticalHasArrows:t.verticalHasArrows,horizontalHasArrows:t.horizontalHasArrows,verticalScrollbarSize:t.verticalScrollbarSize,verticalSliderSize:t.verticalSliderSize,horizontalScrollbarSize:t.horizontalScrollbarSize,horizontalSliderSize:t.horizontalSliderSize,handleMouseWheel:t.handleMouseWheel,alwaysConsumeMouseWheel:t.alwaysConsumeMouseWheel,arrowSize:t.arrowSize,mouseWheelScrollSensitivity:a,fastScrollSensitivity:u,scrollPredominantAxis:f,scrollByPage:t.scrollByPage};this.scrollbar=this._register(new y.SmoothScrollableElement(b.domNode,c,this._context.viewLayout.getScrollable())),E.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,k.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(r,l,s)=>{const g={};if(l){const h=r.scrollTop;h&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+h,r.scrollTop=0)}if(s){const h=r.scrollLeft;h&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+h,r.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(L.addDisposableListener(o.domNode,"scroll",r=>d(o.domNode,!0,!0))),this._register(L.addDisposableListener(b.domNode,"scroll",r=>d(b.domNode,!0,!1))),this._register(L.addDisposableListener(i.domNode,"scroll",r=>d(i.domNode,!0,!1))),this._register(L.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",r=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const v=this._context.configuration.options,b=v.get(143);this.scrollbarDomNode.setLeft(b.contentLeft),v.get(72).side==="right"?this.scrollbarDomNode.setWidth(b.contentWidth+b.minimap.minimapWidth):this.scrollbarDomNode.setWidth(b.contentWidth),this.scrollbarDomNode.setHeight(b.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(v){this.scrollbar.delegateVerticalScrollbarPointerDown(v)}delegateScrollFromMouseWheelEvent(v){this.scrollbar.delegateScrollFromMouseWheelEvent(v)}onConfigurationChanged(v){if(v.hasChanged(102)||v.hasChanged(74)||v.hasChanged(40)){const b=this._context.configuration.options,o=b.get(102),i=b.get(74),n=b.get(40),t=b.get(105),a={vertical:o.vertical,horizontal:o.horizontal,verticalScrollbarSize:o.verticalScrollbarSize,horizontalScrollbarSize:o.horizontalScrollbarSize,scrollByPage:o.scrollByPage,handleMouseWheel:o.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:t};this.scrollbar.updateOptions(a)}return v.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(v){return!0}onThemeChanged(v){return this.scrollbar.updateClassName("editor-scrollable "+(0,_.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(v){}render(v){this.scrollbar.renderNow()}}e.EditorScrollbar=p}),define(ie[851],ne([1,0,113,30,23,439]),function(Q,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class E{constructor(i){this.left=i.left,this.width=i.width,this.startStyle=null,this.endStyle=null}}class _{constructor(i,n){this.lineNumber=i,this.ranges=n}}function p(o){return new E(o)}function S(o){return new _(o.lineNumber,o.ranges.map(p))}class v extends L.DynamicViewOverlay{constructor(i){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=i;const n=this._context.configuration.options;this._lineHeight=n.get(66),this._roundedSelection=n.get(100),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const n=this._context.configuration.options;return this._lineHeight=n.get(66),this._roundedSelection=n.get(100),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(i){return this._selections=i.selections.slice(0),!0}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLinesChanged(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollTopChanged}onZonesChanged(i){return!0}_visibleRangesHaveGaps(i){for(let n=0,t=i.length;n1)return!0;return!1}_enrichVisibleRangesWithStyle(i,n,t){const a=this._typicalHalfwidthCharacterWidth/4;let u=null,f=null;if(t&&t.length>0&&n.length>0){const c=n[0].lineNumber;if(c===i.startLineNumber)for(let r=0;!u&&r=0;r--)t[r].lineNumber===d&&(f=t[r].ranges[0]);u&&!u.startStyle&&(u=null),f&&!f.startStyle&&(f=null)}for(let c=0,d=n.length;c0){const m=n[c-1].ranges[0].left,C=n[c-1].ranges[0].left+n[c-1].ranges[0].width;b(l-m)m&&(g.top=1),b(s-C)'}_actualRenderOneSelection(i,n,t,a){if(a.length===0)return;const u=!!a[0].ranges[0].startStyle,f=this._lineHeight.toString(),c=(this._lineHeight-1).toString(),d=a[0].lineNumber,r=a[a.length-1].lineNumber;for(let l=0,s=a.length;l1,r)}this._previousFrameVisibleRangesWithStyle=u,this._renderResult=n.map(([f,c])=>f+c)}render(i,n){if(!this._renderResult)return"";const t=n-i;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.SelectionsOverlay=v,v.SELECTION_CLASS_NAME="selected-text",v.SELECTION_TOP_LEFT="top-left-radius",v.SELECTION_BOTTOM_LEFT="bottom-left-radius",v.SELECTION_TOP_RIGHT="top-right-radius",v.SELECTION_BOTTOM_RIGHT="bottom-right-radius",v.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",v.ROUNDED_PIECE_WIDTH=10,(0,y.registerThemingParticipant)((o,i)=>{const n=o.getColor(k.editorSelectionForeground);n&&!n.isTransparent()&&i.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function b(o){return o<0?-o:o}}),define(ie[364],ne([1,0,7,40,197,2,35,90,11,297,30,23]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerPart=void 0;let n=i=class extends E.Disposable{constructor(a,u,f,c,d,r,l){super(),this._editors=a,this._rootElement=u,this._diffModel=f,this._rootWidth=c,this._rootHeight=d,this._modifiedEditorLayoutInfo=r,this._themeService=l,this.width=i.ENTIRE_DIFF_OVERVIEW_WIDTH;const s=(0,_.observableFromEvent)(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),g=(0,_.derived)(C=>{const w=s.read(C),D=w.getColor(b.diffOverviewRulerInserted)||(w.getColor(b.diffInserted)||b.defaultInsertColor).transparent(2),I=w.getColor(b.diffOverviewRulerRemoved)||(w.getColor(b.diffRemoved)||b.defaultRemoveColor).transparent(2);return{insertColor:D,removeColor:I}}),h=(0,k.createFastDomNode)(document.createElement("div"));h.setClassName("diffViewport"),h.setPosition("absolute");const m=(0,L.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:i.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;this._register((0,p.appendRemoveOnDispose)(m,h.domNode)),this._register((0,L.addStandardDisposableListener)(m,L.EventType.POINTER_DOWN,C=>{this._editors.modified.delegateVerticalScrollbarPointerDown(C)})),this._register((0,L.addDisposableListener)(m,L.EventType.MOUSE_WHEEL,C=>{this._editors.modified.delegateScrollFromMouseWheelEvent(C)},{passive:!1})),this._register((0,p.appendRemoveOnDispose)(this._rootElement,m)),this._register((0,_.autorunWithStore)((C,w)=>{const D=this._diffModel.read(C),I=this._editors.original.createOverviewRuler("original diffOverviewRuler");I&&(w.add(I),w.add((0,p.appendRemoveOnDispose)(m,I.getDomNode())));const M=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(M&&(w.add(M),w.add((0,p.appendRemoveOnDispose)(m,M.getDomNode()))),!I||!M)return;const A=(0,_.observableSignalFromEvent)("viewZoneChanged",this._editors.original.onDidChangeViewZones),O=(0,_.observableSignalFromEvent)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),T=(0,_.observableSignalFromEvent)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),N=(0,_.observableSignalFromEvent)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);w.add((0,_.autorun)(P=>{var x;A.read(P),O.read(P),T.read(P),N.read(P);const R=g.read(P),B=(x=D?.diff.read(P))===null||x===void 0?void 0:x.mappings;function W(F,j,J){const le=J._getViewModel();return le?F.filter(ee=>ee.length>0).map(ee=>{const $=le.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(ee.startLineNumber,1)),te=le.coordinatesConverter.convertModelPositionToViewPosition(new S.Position(ee.endLineNumberExclusive,1)),G=te.lineNumber-$.lineNumber;return new v.OverviewRulerZone($.lineNumber,te.lineNumber,G,j.toString())}):[]}const V=W((B||[]).map(F=>F.lineRangeMapping.original),R.removeColor,this._editors.original),U=W((B||[]).map(F=>F.lineRangeMapping.modified),R.insertColor,this._editors.modified);I?.setZones(V),M?.setZones(U)})),w.add((0,_.autorun)(P=>{const x=this._rootHeight.read(P),R=this._rootWidth.read(P),B=this._modifiedEditorLayoutInfo.read(P);if(B){const W=i.ENTIRE_DIFF_OVERVIEW_WIDTH-2*i.ONE_OVERVIEW_WIDTH;I.setLayout({top:0,height:x,right:W+i.ONE_OVERVIEW_WIDTH,width:i.ONE_OVERVIEW_WIDTH}),M.setLayout({top:0,height:x,right:0,width:i.ONE_OVERVIEW_WIDTH});const V=this._editors.modifiedScrollTop.read(P),U=this._editors.modifiedScrollHeight.read(P),F=this._editors.modified.getOption(102),j=new y.ScrollbarState(F.verticalHasArrows?F.arrowSize:0,F.verticalScrollbarSize,0,B.height,U,V);h.setTop(j.getSliderPosition()),h.setHeight(j.getSliderSize())}else h.setTop(0),h.setHeight(0);m.style.height=x+"px",m.style.left=R-i.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",h.setWidth(i.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};e.OverviewRulerPart=n,n.ONE_OVERVIEW_WIDTH=15,n.ENTIRE_DIFF_OVERVIEW_WIDTH=i.ONE_OVERVIEW_WIDTH*2,e.OverviewRulerPart=n=i=Ee([he(6,o.IThemeService)],n)}),define(ie[852],ne([1,0,6,2,35,364,36,621,8,34,11]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorEditors=void 0;let o=class extends k.Disposable{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(n,t,a,u,f,c,d){super(),this.originalEditorElement=n,this.modifiedEditorElement=t,this._options=a,this._createInnerEditor=f,this._instantiationService=c,this._keybindingService=d,this._onDidContentSizeChange=this._register(new L.Emitter),this.original=this._register(this._createLeftHandSideEditor(a.editorOptions.get(),u.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(a.editorOptions.get(),u.modifiedEditor||{})),this.modifiedModel=(0,y.observableFromEvent)(this.modified.onDidChangeModel,()=>this.modified.getModel()),this.modifiedScrollTop=(0,y.observableFromEvent)(this.modified.onDidScrollChange,()=>this.modified.getScrollTop()),this.modifiedScrollHeight=(0,y.observableFromEvent)(this.modified.onDidScrollChange,()=>this.modified.getScrollHeight()),this.modifiedSelections=(0,y.observableFromEvent)(this.modified.onDidChangeCursorSelection,()=>{var r;return(r=this.modified.getSelections())!==null&&r!==void 0?r:[]}),this.modifiedCursor=(0,y.observableFromEvent)(this.modified.onDidChangeCursorPosition,()=>{var r;return(r=this.modified.getPosition())!==null&&r!==void 0?r:new b.Position(1,1)}),this._register((0,y.autorunHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:(r,l)=>(r.didChange(a.editorOptions)&&Object.assign(l,r.change.changedOptions),!0)},(r,l)=>{a.editorOptions.read(r),this._options.renderSideBySide.read(r),this.modified.updateOptions(this._adjustOptionsForRightHandSide(r,l)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(r,l))}))}_createLeftHandSideEditor(n,t){const a=this._adjustOptionsForLeftHandSide(void 0,n),u=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,a,t);return u.setContextValue("isInDiffLeftEditor",!0),u}_createRightHandSideEditor(n,t){const a=this._adjustOptionsForRightHandSide(void 0,n),u=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,a,t);return u.setContextValue("isInDiffRightEditor",!0),u}_constructInnerEditor(n,t,a,u){const f=this._createInnerEditor(n,t,a,u);return this._register(f.onDidContentSizeChange(c=>{const d=this.original.getContentWidth()+this.modified.getContentWidth()+E.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,r=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:r,contentWidth:d,contentHeightChanged:c.contentHeightChanged,contentWidthChanged:c.contentWidthChanged})})),f}_adjustOptionsForLeftHandSide(n,t){const a=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(a.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},a.wordWrapOverride1=this._options.diffWordWrap.get()):(a.wordWrapOverride1="off",a.wordWrapOverride2="off",a.stickyScroll={enabled:!1},a.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),a.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(a.ariaLabel=t.originalAriaLabel),a.ariaLabel=this._updateAriaLabel(a.ariaLabel),a.readOnly=!this._options.originalEditable.get(),a.dropIntoEditor={enabled:!a.readOnly},a.extraEditorClassName="original-in-monaco-diff-editor",a}_adjustOptionsForRightHandSide(n,t){const a=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(a.ariaLabel=t.modifiedAriaLabel),a.ariaLabel=this._updateAriaLabel(a.ariaLabel),a.wordWrapOverride1=this._options.diffWordWrap.get(),a.revealHorizontalRightPadding=_.EditorOptions.revealHorizontalRightPadding.defaultValue+E.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,a.scrollbar.verticalHasArrows=!1,a.extraEditorClassName="modified-in-monaco-diff-editor",a}_adjustOptionsForSubEditor(n){const t={...n,dimension:{height:0,width:0}};return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar={...t.scrollbar||{}},t.folding=!1,t.codeLens=this._options.diffCodeLens.get(),t.fixedOverflowWidgets=!0,t.minimap={...t.minimap||{}},t.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?t.stickyScroll={enabled:!1}:t.stickyScroll=this._options.editorOptions.get().stickyScroll,t}_updateAriaLabel(n){var t;n||(n="");const a=(0,p.localize)(0,null,(t=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||t===void 0?void 0:t.getAriaLabel());return this._options.accessibilityVerbose.get()?n+a:n?n.replaceAll(a,""):""}};e.DiffEditorEditors=o,e.DiffEditorEditors=o=Ee([he(5,S.IInstantiationService),he(6,v.IKeybindingService)],o)}),define(ie[82],ne([1,0,631,38,30,23]),function(Q,e,L,k,y,E){"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.editorDimmedLineNumber=e.editorActiveLineNumber=e.editorActiveIndentGuide6=e.editorActiveIndentGuide5=e.editorActiveIndentGuide4=e.editorActiveIndentGuide3=e.editorActiveIndentGuide2=e.editorActiveIndentGuide1=e.editorIndentGuide6=e.editorIndentGuide5=e.editorIndentGuide4=e.editorIndentGuide3=e.editorIndentGuide2=e.editorIndentGuide1=e.deprecatedEditorActiveIndentGuides=e.deprecatedEditorIndentGuides=e.editorLineNumbers=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,y.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(0,null)),e.editorLineHighlightBorder=(0,y.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:y.contrastBorder},L.localize(1,null)),e.editorRangeHighlight=(0,y.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},L.localize(2,null),!0),e.editorRangeHighlightBorder=(0,y.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(3,null),!0),e.editorSymbolHighlight=(0,y.registerColor)("editor.symbolHighlightBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},L.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,y.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(5,null),!0),e.editorCursorForeground=(0,y.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:k.Color.black,hcDark:k.Color.white,hcLight:"#0F4A85"},L.localize(6,null)),e.editorCursorBackground=(0,y.registerColor)("editorCursor.background",null,L.localize(7,null)),e.editorWhitespaces=(0,y.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},L.localize(8,null)),e.editorLineNumbers=(0,y.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:k.Color.white,hcLight:"#292929"},L.localize(9,null)),e.deprecatedEditorIndentGuides=(0,y.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},L.localize(10,null),!1,L.localize(11,null)),e.deprecatedEditorActiveIndentGuides=(0,y.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},L.localize(12,null),!1,L.localize(13,null)),e.editorIndentGuide1=(0,y.registerColor)("editorIndentGuide.background1",{dark:e.deprecatedEditorIndentGuides,light:e.deprecatedEditorIndentGuides,hcDark:e.deprecatedEditorIndentGuides,hcLight:e.deprecatedEditorIndentGuides},L.localize(14,null)),e.editorIndentGuide2=(0,y.registerColor)("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(15,null)),e.editorIndentGuide3=(0,y.registerColor)("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(16,null)),e.editorIndentGuide4=(0,y.registerColor)("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(17,null)),e.editorIndentGuide5=(0,y.registerColor)("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(18,null)),e.editorIndentGuide6=(0,y.registerColor)("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(19,null)),e.editorActiveIndentGuide1=(0,y.registerColor)("editorIndentGuide.activeBackground1",{dark:e.deprecatedEditorActiveIndentGuides,light:e.deprecatedEditorActiveIndentGuides,hcDark:e.deprecatedEditorActiveIndentGuides,hcLight:e.deprecatedEditorActiveIndentGuides},L.localize(20,null)),e.editorActiveIndentGuide2=(0,y.registerColor)("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(21,null)),e.editorActiveIndentGuide3=(0,y.registerColor)("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(22,null)),e.editorActiveIndentGuide4=(0,y.registerColor)("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(23,null)),e.editorActiveIndentGuide5=(0,y.registerColor)("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(24,null)),e.editorActiveIndentGuide6=(0,y.registerColor)("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(25,null));const _=(0,y.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(26,null),!1,L.localize(27,null));e.editorActiveLineNumber=(0,y.registerColor)("editorLineNumber.activeForeground",{dark:_,light:_,hcDark:_,hcLight:_},L.localize(28,null)),e.editorDimmedLineNumber=(0,y.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(29,null)),e.editorRuler=(0,y.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:k.Color.lightgrey,hcDark:k.Color.white,hcLight:"#292929"},L.localize(30,null)),e.editorCodeLensForeground=(0,y.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},L.localize(31,null)),e.editorBracketMatchBackground=(0,y.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},L.localize(32,null)),e.editorBracketMatchBorder=(0,y.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:y.contrastBorder,hcLight:y.contrastBorder},L.localize(33,null)),e.editorOverviewRulerBorder=(0,y.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},L.localize(34,null)),e.editorOverviewRulerBackground=(0,y.registerColor)("editorOverviewRuler.background",null,L.localize(35,null)),e.editorGutter=(0,y.registerColor)("editorGutter.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},L.localize(36,null)),e.editorUnnecessaryCodeBorder=(0,y.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:y.contrastBorder},L.localize(37,null)),e.editorUnnecessaryCodeOpacity=(0,y.registerColor)("editorUnnecessaryCode.opacity",{dark:k.Color.fromHex("#000a"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},L.localize(38,null)),e.ghostTextBorder=(0,y.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:k.Color.fromHex("#fff").transparent(.8),hcLight:k.Color.fromHex("#292929").transparent(.8)},L.localize(39,null)),e.ghostTextForeground=(0,y.registerColor)("editorGhostText.foreground",{dark:k.Color.fromHex("#ffffff56"),light:k.Color.fromHex("#0007"),hcDark:null,hcLight:null},L.localize(40,null)),e.ghostTextBackground=(0,y.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(41,null));const p=new k.Color(new k.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,y.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:p,light:p,hcDark:p,hcLight:p},L.localize(42,null),!0),e.overviewRulerError=(0,y.registerColor)("editorOverviewRuler.errorForeground",{dark:new k.Color(new k.RGBA(255,18,18,.7)),light:new k.Color(new k.RGBA(255,18,18,.7)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:"#B5200D"},L.localize(43,null)),e.overviewRulerWarning=(0,y.registerColor)("editorOverviewRuler.warningForeground",{dark:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningBorder,hcLight:y.editorWarningBorder},L.localize(44,null)),e.overviewRulerInfo=(0,y.registerColor)("editorOverviewRuler.infoForeground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoBorder,hcLight:y.editorInfoBorder},L.localize(45,null)),e.editorBracketHighlightingForeground1=(0,y.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},L.localize(46,null)),e.editorBracketHighlightingForeground2=(0,y.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},L.localize(47,null)),e.editorBracketHighlightingForeground3=(0,y.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},L.localize(48,null)),e.editorBracketHighlightingForeground4=(0,y.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(49,null)),e.editorBracketHighlightingForeground5=(0,y.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(50,null)),e.editorBracketHighlightingForeground6=(0,y.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(51,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,y.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new k.Color(new k.RGBA(255,18,18,.8)),light:new k.Color(new k.RGBA(255,18,18,.8)),hcDark:new k.Color(new k.RGBA(255,50,50,1)),hcLight:""},L.localize(52,null)),e.editorBracketPairGuideBackground1=(0,y.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(53,null)),e.editorBracketPairGuideBackground2=(0,y.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(54,null)),e.editorBracketPairGuideBackground3=(0,y.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(55,null)),e.editorBracketPairGuideBackground4=(0,y.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(56,null)),e.editorBracketPairGuideBackground5=(0,y.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(57,null)),e.editorBracketPairGuideBackground6=(0,y.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(58,null)),e.editorBracketPairGuideActiveBackground1=(0,y.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(59,null)),e.editorBracketPairGuideActiveBackground2=(0,y.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(60,null)),e.editorBracketPairGuideActiveBackground3=(0,y.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(61,null)),e.editorBracketPairGuideActiveBackground4=(0,y.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(62,null)),e.editorBracketPairGuideActiveBackground5=(0,y.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(63,null)),e.editorBracketPairGuideActiveBackground6=(0,y.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(64,null)),e.editorUnicodeHighlightBorder=(0,y.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},L.localize(65,null)),e.editorUnicodeHighlightBackground=(0,y.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},L.localize(66,null)),(0,E.registerThemingParticipant)((S,v)=>{const b=S.getColor(y.editorBackground),o=S.getColor(e.editorLineHighlight),i=o&&!o.isTransparent()?o:b;i&&v.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)})}),define(ie[853],ne([1,0,113,82,13,23,24,88,426]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class S extends L.DynamicViewOverlay{constructor(i){super(),this._context=i;const n=this._context.configuration.options,t=n.get(143);this._lineHeight=n.get(66),this._renderLineHighlight=n.get(95),this._renderLineHighlightOnlyWhenFocus=n.get(96),this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let i=!1;const n=this._selections.map(a=>a.positionLineNumber);n.sort((a,u)=>a-u),y.equals(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,i=!0);const t=this._selections.every(a=>a.isEmpty());return this._selectionIsEmpty!==t&&(this._selectionIsEmpty=t,i=!0),i}onThemeChanged(i){return this._readFromSelections()}onConfigurationChanged(i){const n=this._context.configuration.options,t=n.get(143);return this._lineHeight=n.get(66),this._renderLineHighlight=n.get(95),this._renderLineHighlightOnlyWhenFocus=n.get(96),this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,!0}onCursorStateChanged(i){return this._selections=i.selections,this._readFromSelections()}onFlushed(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollWidthChanged||i.scrollTopChanged}onZonesChanged(i){return!0}onFocusChanged(i){return this._renderLineHighlightOnlyWhenFocus?(this._focused=i.isFocused,!0):!1}prepareRender(i){if(!this._shouldRenderThis()){this._renderData=null;return}const n=this._renderOne(i),t=i.visibleRange.startLineNumber,a=i.visibleRange.endLineNumber,u=this._cursorLineNumbers.length;let f=0;const c=[];for(let d=t;d<=a;d++){const r=d-t;for(;f=this._renderData.length?"":this._renderData[t]}_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=S;class v extends S{_renderOne(i){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=v;class b extends S{_renderOne(i){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=b,(0,E.registerThemingParticipant)((o,i)=>{const n=o.getColor(k.editorLineHighlight);if(n&&(i.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),i.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||o.defines(k.editorLineHighlightBorder)){const t=o.getColor(k.editorLineHighlightBorder);t&&(i.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${t}; }`),i.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${t}; }`),(0,p.isHighContrast)(o.type)&&(i.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),i.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(ie[854],ne([1,0,113,82,23,11,13,20,294,212,429]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class b extends L.DynamicViewOverlay{constructor(n){super(),this._context=n,this._primaryPosition=null;const t=this._context.configuration.options,a=t.get(144),u=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*u.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const t=this._context.configuration.options,a=t.get(144),u=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*u.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(n){var t;const u=n.selections[0].getPosition();return!((t=this._primaryPosition)===null||t===void 0)&&t.equals(u)?!1:(this._primaryPosition=u,!0)}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}onLanguageConfigurationChanged(n){return!0}prepareRender(n){var t,a,u,f;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const c=n.visibleRange.startLineNumber,d=n.visibleRange.endLineNumber,r=n.scrollWidth,l=this._lineHeight,s=this._primaryPosition,g=this.getGuidesByLine(c,Math.min(d+1,this._context.viewModel.getLineCount()),s),h=[];for(let m=c;m<=d;m++){const C=m-c,w=g[C];let D="";const I=(a=(t=n.visibleRangeForPosition(new E.Position(m,1)))===null||t===void 0?void 0:t.left)!==null&&a!==void 0?a:0;for(const M of w){const A=M.column===-1?I+(M.visibleColumn-1)*this._spaceWidth:n.visibleRangeForPosition(new E.Position(m,M.column)).left;if(A>r||this._maxIndentLeft>0&&A>this._maxIndentLeft)break;const O=M.horizontalLine?M.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",T=M.horizontalLine?((f=(u=n.visibleRangeForPosition(new E.Position(m,M.horizontalLine.endColumn)))===null||u===void 0?void 0:u.left)!==null&&f!==void 0?f:A+this._spaceWidth)-A:this._spaceWidth;D+=`
    `}h[C]=D}this._renderResult=h}getGuidesByLine(n,t,a){const u=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(n,t,a,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?v.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?v.HorizontalGuidesState.EnabledForActive:v.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,f=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(n,t):null;let c=0,d=0,r=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&a){const g=this._context.viewModel.getActiveIndentGuide(a.lineNumber,n,t);c=g.startLineNumber,d=g.endLineNumber,r=g.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),s=[];for(let g=n;g<=t;g++){const h=new Array;s.push(h);const m=u?u[g-n]:[],C=new _.ArrayQueue(m),w=f?f[g-n]:0;for(let D=1;D<=w;D++){const I=(D-1)*l+1,M=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||m.length===0)&&c<=g&&g<=d&&D===r;h.push(...C.takeWhile(O=>O.visibleColumn!0)||[])}return s}render(n,t){if(!this._renderResult)return"";const a=t-n;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}e.IndentGuidesOverlay=b;function o(i){if(!(i&&i.isTransparent()))return i}(0,y.registerThemingParticipant)((i,n)=>{const t=[{bracketColor:k.editorBracketHighlightingForeground1,guideColor:k.editorBracketPairGuideBackground1,guideColorActive:k.editorBracketPairGuideActiveBackground1},{bracketColor:k.editorBracketHighlightingForeground2,guideColor:k.editorBracketPairGuideBackground2,guideColorActive:k.editorBracketPairGuideActiveBackground2},{bracketColor:k.editorBracketHighlightingForeground3,guideColor:k.editorBracketPairGuideBackground3,guideColorActive:k.editorBracketPairGuideActiveBackground3},{bracketColor:k.editorBracketHighlightingForeground4,guideColor:k.editorBracketPairGuideBackground4,guideColorActive:k.editorBracketPairGuideActiveBackground4},{bracketColor:k.editorBracketHighlightingForeground5,guideColor:k.editorBracketPairGuideBackground5,guideColorActive:k.editorBracketPairGuideActiveBackground5},{bracketColor:k.editorBracketHighlightingForeground6,guideColor:k.editorBracketPairGuideBackground6,guideColorActive:k.editorBracketPairGuideActiveBackground6}],a=new S.BracketPairGuidesClassNames,u=[{indentColor:k.editorIndentGuide1,indentColorActive:k.editorActiveIndentGuide1},{indentColor:k.editorIndentGuide2,indentColorActive:k.editorActiveIndentGuide2},{indentColor:k.editorIndentGuide3,indentColorActive:k.editorActiveIndentGuide3},{indentColor:k.editorIndentGuide4,indentColorActive:k.editorActiveIndentGuide4},{indentColor:k.editorIndentGuide5,indentColorActive:k.editorActiveIndentGuide5},{indentColor:k.editorIndentGuide6,indentColorActive:k.editorActiveIndentGuide6}],f=t.map(d=>{var r,l;const s=i.getColor(d.bracketColor),g=i.getColor(d.guideColor),h=i.getColor(d.guideColorActive),m=o((r=o(g))!==null&&r!==void 0?r:s?.transparent(.3)),C=o((l=o(h))!==null&&l!==void 0?l:s);if(!(!m||!C))return{guideColor:m,guideColorActive:C}}).filter(p.isDefined),c=u.map(d=>{const r=i.getColor(d.indentColor),l=i.getColor(d.indentColorActive),s=o(r),g=o(l);if(!(!s||!g))return{indentColor:s,indentColorActive:g}}).filter(p.isDefined);if(f.length>0){for(let d=0;d<30;d++){const r=f[d%f.length];n.addRule(`.monaco-editor .${a.getInlineClassNameOfLevel(d).replace(/ /g,".")} { --guide-color: ${r.guideColor}; --guide-color-active: ${r.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${a.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${a.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${a.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(c.length>0){for(let d=0;d<30;d++){const r=c[d%c.length];n.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${d} { --indent-color: ${r.indentColor}; --indent-color-active: ${r.indentColorActive}; }`)}n.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),n.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})}),define(ie[365],ne([1,0,17,113,11,23,82,430]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class p extends k.DynamicViewOverlay{constructor(v){super(),this._context=v,this._readConfig(),this._lastCursorModelPosition=new y.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const v=this._context.configuration.options;this._lineHeight=v.get(66);const b=v.get(67);this._renderLineNumbers=b.renderType,this._renderCustomLineNumbers=b.renderFn,this._renderFinalNewline=v.get(94);const o=v.get(143);this._lineNumbersLeft=o.lineNumbersLeft,this._lineNumbersWidth=o.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(v){return this._readConfig(),!0}onCursorStateChanged(v){const b=v.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(b);let o=!1;return this._activeLineNumber!==b.lineNumber&&(this._activeLineNumber=b.lineNumber,o=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(o=!0),o}onFlushed(v){return!0}onLinesChanged(v){return!0}onLinesDeleted(v){return!0}onLinesInserted(v){return!0}onScrollChanged(v){return v.scrollTopChanged}onZonesChanged(v){return!0}_getLineRenderLineNumber(v){const b=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new y.Position(v,1));if(b.column!==1)return"";const o=b.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(o);if(this._renderLineNumbers===2){const i=Math.abs(this._lastCursorModelPosition.lineNumber-o);return i===0?''+o+"":String(i)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===o||o%10===0?String(o):"":String(o)}prepareRender(v){if(this._renderLineNumbers===0){this._renderResult=null;return}const b=L.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",o=v.visibleRange.startLineNumber,i=v.visibleRange.endLineNumber,n=this._context.viewModel.getLineCount(),t=[];for(let a=o;a<=i;a++){const u=a-o,f=this._getLineRenderLineNumber(a);if(!f){t[u]="";continue}let c="";if(a===n&&this._context.viewModel.getLineLength(a)===0){if(this._renderFinalNewline==="off"){t[u]="";continue}this._renderFinalNewline==="dimmed"&&(c=" dimmed-line-number")}a===this._activeLineNumber&&(c=" active-line-number"),t[u]=`
    ${f}
    `}this._renderResult=t}render(v,b){if(!this._renderResult)return"";const o=b-v;return o<0||o>=this._renderResult.length?"":this._renderResult[o]}}e.LineNumbersOverlay=p,p.CLASS_NAME="line-numbers",(0,E.registerThemingParticipant)((S,v)=>{const b=S.getColor(_.editorLineNumbers),o=S.getColor(_.editorDimmedLineNumber);o?v.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${o}; }`):b&&v.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${b.transparent(.4)}; }`)})}),define(ie[855],ne([1,0,612,54,40,17,12,72,188,277,56,365,296,36,148,11,5,24,200,31,38,267,34,8,424]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class h{constructor(I,M,A,O,T){this._context=I,this.modelLineNumber=M,this.distanceToModelLineStart=A,this.widthOfHiddenLineTextBefore=O,this.distanceToModelLineEnd=T,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(I){const M=new a.Position(this.modelLineNumber,this.distanceToModelLineStart+1),A=new a.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(M),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(A),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=I.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=I.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(I){return this._previousPresentation||(I?this._previousPresentation=I:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const m=k.isFirefox;let C=class extends b.ViewPart{constructor(I,M,A,O,T){super(I),this._keybindingService=O,this._instantiationService=T,this._primaryCursorPosition=new a.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=M,this._visibleRangeProvider=A,this._scrollLeft=0,this._scrollTop=0;const N=this._context.configuration.options,P=N.get(143);this._setAccessibilityOptions(N),this._contentLeft=P.contentLeft,this._contentWidth=P.contentWidth,this._contentHeight=P.height,this._fontInfo=N.get(50),this._lineHeight=N.get(66),this._emptySelectionClipboard=N.get(37),this._copyWithSyntaxHighlighting=N.get(25),this._visibleTextArea=null,this._selections=[new f.Selection(1,1,1,1)],this._modelSelections=[new f.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,y.createFastDomNode)(document.createElement("textarea")),b.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${c.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:x}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${x*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(N)),this.textArea.setAttribute("aria-required",N.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(N.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",L.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",N.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,y.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const R={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:V=>this._context.viewModel.getLineMaxColumn(V),getValueInRange:(V,U)=>this._context.viewModel.getValueInRange(V,U),getValueLengthInRange:(V,U)=>this._context.viewModel.getValueLengthInRange(V,U),modifyPosition:(V,U)=>this._context.viewModel.modifyPosition(V,U)},B={getDataToCopy:()=>{const V=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,E.isWindows),U=this._context.viewModel.model.getEOL(),F=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),j=Array.isArray(V)?V:null,J=Array.isArray(V)?V.join(U):V;let le,ee=null;if(S.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&J.length<65536){const $=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);$&&(le=$.html,ee=$.mode)}return{isFromEmptySelection:F,multicursorText:j,text:J,html:le,mode:ee}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const V=this._selections[0];if(E.isMacintosh&&V.isEmpty()){const F=V.getStartPosition();let j=this._getWordBeforePosition(F);if(j.length===0&&(j=this._getCharacterBeforePosition(F)),j.length>0)return new v.TextAreaState(j,j.length,j.length,u.Range.fromPositions(F),0)}const U=500;if(E.isMacintosh&&!V.isEmpty()&&R.getValueLengthInRange(V,0)0)return new v.TextAreaState(F,j,j,u.Range.fromPositions(U),0)}return v.TextAreaState.EMPTY}return v.PagedScreenReaderStrategy.fromEditorSelection(R,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(V,U,F)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(V,U,F)},W=this._register(new S.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(S.TextAreaInput,B,W,E.OS,{isAndroid:k.isAndroid,isChrome:k.isChrome,isFirefox:k.isFirefox,isSafari:k.isSafari})),this._register(this._textAreaInput.onKeyDown(V=>{this._viewController.emitKeyDown(V)})),this._register(this._textAreaInput.onKeyUp(V=>{this._viewController.emitKeyUp(V)})),this._register(this._textAreaInput.onPaste(V=>{let U=!1,F=null,j=null;V.metadata&&(U=this._emptySelectionClipboard&&!!V.metadata.isFromEmptySelection,F=typeof V.metadata.multicursorText<"u"?V.metadata.multicursorText:null,j=V.metadata.mode),this._viewController.paste(V.text,U,F,j)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(V=>{V.replacePrevCharCnt||V.replaceNextCharCnt||V.positionDelta?(v._debugComposition&&console.log(` => compositionType: <<${V.text}>>, ${V.replacePrevCharCnt}, ${V.replaceNextCharCnt}, ${V.positionDelta}`),this._viewController.compositionType(V.text,V.replacePrevCharCnt,V.replaceNextCharCnt,V.positionDelta)):(v._debugComposition&&console.log(` => type: <<${V.text}>>`),this._viewController.type(V.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(V=>{this._viewController.setSelection(V)})),this._register(this._textAreaInput.onCompositionStart(V=>{const U=this.textArea.domNode,F=this._modelSelections[0],{distanceToModelLineStart:j,widthOfHiddenTextBefore:J}=(()=>{const ee=U.value.substring(0,Math.min(U.selectionStart,U.selectionEnd)),$=ee.lastIndexOf(` `),te=ee.substring($+1),G=te.lastIndexOf(" "),de=te.length-G-1,ue=F.getStartPosition(),X=Math.min(ue.column-1,de),Z=ue.column-1-X,re=te.substring(0,te.length-X),{tabSize:oe}=this._context.viewModel.model.getOptions(),Y=w(this.textArea.domNode.ownerDocument,re,this._fontInfo,oe);return{distanceToModelLineStart:Z,widthOfHiddenTextBefore:Y}})(),{distanceToModelLineEnd:le}=(()=>{const ee=U.value.substring(Math.max(U.selectionStart,U.selectionEnd)),$=ee.indexOf(` `),te=$===-1?ee:ee.substring(0,$),G=te.indexOf(" "),de=G===-1?te.length:te.length-G-1,ue=F.getEndPosition(),X=Math.min(this._context.viewModel.model.getLineMaxColumn(ue.lineNumber)-ue.column,de);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(ue.lineNumber)-ue.column-X}})();this._context.viewModel.revealRange("keyboard",!0,u.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new h(this._context,F.startLineNumber,j,J,le),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${c.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(V=>{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 ${c.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)})),this._register(l.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(I){this._textAreaInput.writeNativeTextAreaContent(I)}dispose(){super.dispose()}_getAndroidWordAtPosition(I){const M='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',A=this._context.viewModel.getLineContent(I.lineNumber),O=(0,t.getMapForWordSeparators)(M);let T=!0,N=I.column,P=!0,x=I.column,R=0;for(;R<50&&(T||P);){if(T&&N<=1&&(T=!1),T){const B=A.charCodeAt(N-2);O.get(B)!==0?T=!1:N--}if(P&&x>A.length&&(P=!1),P){const B=A.charCodeAt(x-1);O.get(B)!==0?P=!1:x++}R++}return[A.substring(N-1,x-1),I.column-N]}_getWordBeforePosition(I){const M=this._context.viewModel.getLineContent(I.lineNumber),A=(0,t.getMapForWordSeparators)(this._context.configuration.options.get(129));let O=I.column,T=0;for(;O>1;){const N=M.charCodeAt(O-2);if(A.get(N)!==0||T>50)return M.substring(O-1,I.column-1);T++,O--}return M.substring(0,I.column-1)}_getCharacterBeforePosition(I){if(I.column>1){const A=this._context.viewModel.getLineContent(I.lineNumber).charAt(I.column-2);if(!_.isHighSurrogate(A.charCodeAt(0)))return A}return""}_getAriaLabel(I){var M,A,O;if(I.get(2)===1){const N=(M=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||M===void 0?void 0:M.getAriaLabel(),P=(A=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||A===void 0?void 0:A.getAriaLabel(),x=(O=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||O===void 0?void 0:O.getAriaLabel(),R=L.localize(1,null);return N?L.localize(2,null,R,N):P?L.localize(3,null,R,P):x?L.localize(4,null,R,x):R}return I.get(4)}_setAccessibilityOptions(I){this._accessibilitySupport=I.get(2);const M=I.get(3);this._accessibilitySupport===2&&M===n.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=M;const O=I.get(143).wrappingColumn;if(O!==-1&&this._accessibilitySupport!==1){const T=I.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(O*T.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=m?0:1}onConfigurationChanged(I){const M=this._context.configuration.options,A=M.get(143);this._setAccessibilityOptions(M),this._contentLeft=A.contentLeft,this._contentWidth=A.contentWidth,this._contentHeight=A.height,this._fontInfo=M.get(50),this._lineHeight=M.get(66),this._emptySelectionClipboard=M.get(37),this._copyWithSyntaxHighlighting=M.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:O}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${O*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(M)),this.textArea.setAttribute("aria-required",M.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(M.get(123))),(I.hasChanged(34)||I.hasChanged(90))&&this._ensureReadOnlyAttribute(),I.hasChanged(2)&&this._textAreaInput.writeNativeTextAreaContent("strategy changed"),!0}onCursorStateChanged(I){return this._selections=I.selections.slice(0),this._modelSelections=I.modelSelections.slice(0),this._textAreaInput.writeNativeTextAreaContent("selection changed"),!0}onDecorationsChanged(I){return!0}onFlushed(I){return!0}onLinesChanged(I){return!0}onLinesDeleted(I){return!0}onLinesInserted(I){return!0}onScrollChanged(I){return this._scrollLeft=I.scrollLeft,this._scrollTop=I.scrollTop,!0}onZonesChanged(I){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(I){I.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",I.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),I.role&&this.textArea.setAttribute("role",I.role)}_ensureReadOnlyAttribute(){const I=this._context.configuration.options;!l.IME.enabled||I.get(34)&&I.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(I){var M;this._primaryCursorPosition=new a.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=I.visibleRangeForPosition(this._primaryCursorPosition),(M=this._visibleTextArea)===null||M===void 0||M.prepareRender(I)}render(I){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var I;if(this._visibleTextArea){const O=this._visibleTextArea.visibleTextareaStart,T=this._visibleTextArea.visibleTextareaEnd,N=this._visibleTextArea.startPosition,P=this._visibleTextArea.endPosition;if(N&&P&&O&&T&&T.left>=this._scrollLeft&&O.left<=this._scrollLeft+this._contentWidth){const x=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,R=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let B=this._visibleTextArea.widthOfHiddenLineTextBefore,W=this._contentLeft+O.left-this._scrollLeft,V=T.left-O.left+1;if(Wthis._contentWidth&&(V=this._contentWidth);const U=this._context.viewModel.getViewLineData(N.lineNumber),F=U.tokens.findTokenIndexAtOffset(N.column-1),j=U.tokens.findTokenIndexAtOffset(P.column-1),J=F===j,le=this._visibleTextArea.definePresentation(J?U.tokens.getPresentation(F):null);this.textArea.domNode.scrollTop=R*this._lineHeight,this.textArea.domNode.scrollLeft=B,this._doRender({lastRenderPosition:null,top:x,left:W,width:V,height:this._lineHeight,useCover:!1,color:(d.TokenizationRegistry.getColorMap()||[])[le.foreground],italic:le.italic,bold:le.bold,underline:le.underline,strikethrough:le.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const M=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(Mthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const A=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(A<0||A>this._contentHeight){this._renderAtTopLeft();return}if(E.isMacintosh||this._accessibilitySupport===2){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:A,left:this._textAreaWrapping?this._contentLeft:M,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const O=(I=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&I!==void 0?I:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=O*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:A,left:this._textAreaWrapping?this._contentLeft:M,width:this._textAreaWidth,height:m?0:1,useCover:!1})}_newlinecount(I){let M=0,A=-1;do{if(A=I.indexOf(` `,A+1),A===-1)break;M++}while(!0);return M}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:m?0:1,useCover:!0})}_doRender(I){this._lastRenderPosition=I.lastRenderPosition;const M=this.textArea,A=this.textAreaCover;(0,p.applyFontInfo)(M,this._fontInfo),M.setTop(I.top),M.setLeft(I.left),M.setWidth(I.width),M.setHeight(I.height),M.setColor(I.color?r.Color.Format.CSS.formatHex(I.color):""),M.setFontStyle(I.italic?"italic":""),I.bold&&M.setFontWeight("bold"),M.setTextDecoration(`${I.underline?" underline":""}${I.strikethrough?" line-through":""}`),A.setTop(I.useCover?I.top:0),A.setLeft(I.useCover?I.left:0),A.setWidth(I.useCover?I.width:0),A.setHeight(I.useCover?I.height:0);const O=this._context.configuration.options;O.get(57)?A.setClassName("monaco-editor-background textAreaCover "+i.Margin.OUTER_CLASS_NAME):O.get(67).renderType!==0?A.setClassName("monaco-editor-background textAreaCover "+o.LineNumbersOverlay.CLASS_NAME):A.setClassName("monaco-editor-background textAreaCover")}};e.TextAreaHandler=C,e.TextAreaHandler=C=Ee([he(3,s.IKeybindingService),he(4,g.IInstantiationService)],C);function w(D,I,M,A){if(I.length===0)return 0;const O=D.createElement("div");O.style.position="absolute",O.style.top="-50000px",O.style.width="50000px";const T=D.createElement("span");(0,p.applyFontInfo)(T,M),T.style.whiteSpace="pre",T.style.tabSize=`${A*M.spaceWidth}px`,T.append(I),O.appendChild(T),D.body.appendChild(O);const N=T.offsetWidth;return D.body.removeChild(O),N}}),define(ie[856],ne([1,0,40,38,56,11,31,82,85,13]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class b{constructor(n,t){const a=n.options;this.lineHeight=a.get(66),this.pixelRatio=a.get(141),this.overviewRulerLanes=a.get(82),this.renderBorder=a.get(81);const u=t.getColor(p.editorOverviewRulerBorder);this.borderColor=u?u.toString():null,this.hideCursor=a.get(59);const f=t.getColor(p.editorCursorForeground);this.cursorColor=f?f.transparent(.7).toString():null,this.themeType=t.type;const c=a.get(72),d=c.enabled,r=c.side,l=t.getColor(p.editorOverviewRulerBackground),s=_.TokenizationRegistry.getDefaultBackground();l?this.backgroundColor=l:d&&r==="right"?this.backgroundColor=s:this.backgroundColor=null;const h=a.get(143).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.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,C]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=m,this.w=C}_initLanes(n,t,a){const u=t-n;if(a>=3){const f=Math.floor(u/3),c=Math.floor(u/3),d=u-f-c,r=n,l=r+f,s=r+f+d;return[[0,r,l,r,s,r,l,r],[0,f,d,f+d,c,f+d+c,d+c,f+d+c]]}else if(a===2){const f=Math.floor(u/2),c=u-f,d=n,r=d+f;return[[0,d,d,d,r,d,d,d],[0,f,f,f,c,f+c,f+c,f+c]]}else{const f=n,c=u;return[[0,f,f,f,f,f,f,f],[0,c,c,c,c,c,c,c]]}}equals(n){return this.lineHeight===n.lineHeight&&this.pixelRatio===n.pixelRatio&&this.overviewRulerLanes===n.overviewRulerLanes&&this.renderBorder===n.renderBorder&&this.borderColor===n.borderColor&&this.hideCursor===n.hideCursor&&this.cursorColor===n.cursorColor&&this.themeType===n.themeType&&k.Color.equals(this.backgroundColor,n.backgroundColor)&&this.top===n.top&&this.right===n.right&&this.domWidth===n.domWidth&&this.domHeight===n.domHeight&&this.canvasWidth===n.canvasWidth&&this.canvasHeight===n.canvasHeight}}class o extends y.ViewPart{constructor(n){super(n),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,L.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=_.TokenizationRegistry.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(n){const t=new b(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(this._settings=t,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,n&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(n){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(n){this._cursorPositions=[];for(let t=0,a=n.selections.length;tC.lineNumber===w.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const a=this._settings.canvasWidth,u=this._settings.canvasHeight,f=this._settings.lineHeight,c=this._context.viewLayout,d=this._context.viewLayout.getScrollHeight(),r=u/d,l=6*this._settings.pixelRatio|0,s=l/2|0,g=this._domNode.domNode.getContext("2d");n?n.isOpaque()?(g.fillStyle=k.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,a,u)):(g.clearRect(0,0,a,u),g.fillStyle=k.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,a,u)):g.clearRect(0,0,a,u);const h=this._settings.x,m=this._settings.w;for(const C of t){const w=C.color,D=C.data;g.fillStyle=w;let I=0,M=0,A=0;for(let O=0,T=D.length/3;Ou&&(V=u-s),R=V-s,B=V+s}R>A+1||N!==I?(O!==0&&g.fillRect(h[I],M,m[I],A-M),I=N,M=R,A=B):B>A&&(A=B)}g.fillRect(h[I],M,m[I],A-M)}if(!this._settings.hideCursor&&this._settings.cursorColor){const C=2*this._settings.pixelRatio|0,w=C/2|0,D=this._settings.x[7],I=this._settings.w[7];g.fillStyle=this._settings.cursorColor;let M=-100,A=-100;for(let O=0,T=this._cursorPositions.length;Ou&&(P=u-w);const x=P-w,R=x+C;x>A+1?(O!==0&&g.fillRect(D,M,I,A-M),M=x,A=R):R>A&&(A=R)}g.fillRect(D,M,I,A-M)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(g.beginPath(),g.lineWidth=1,g.strokeStyle=this._settings.borderColor,g.moveTo(0,0),g.lineTo(0,u),g.stroke(),g.moveTo(0,0),g.lineTo(a,0),g.stroke())}}e.DecorationsOverviewRuler=o}),define(ie[857],ne([1,0,40,14,56,629,36,82,23,88,7,440]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class o extends y.ViewPart{constructor(n){super(n);const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new E.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,L.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 k.TimeoutTimer,this._cursorFlatBlinkInterval=new b.WindowIntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(n){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(n){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(n){const t=this._context.configuration.options;this._readOnly=t.get(90),this._cursorBlinking=t.get(26),this._cursorStyle=t.get(28),this._cursorSmoothCaretAnimation=t.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(n);for(let a=0,u=this._secondaryCursors.length;at.length){const f=this._secondaryCursors.length-t.length;for(let c=0;c{for(let u=0,f=n.ranges.length;u{this._isVisible?this._hide():this._show()},o.BLINK_INTERVAL,(0,b.getWindow)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},o.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let n="cursors-layer";switch(this._selectionIsEmpty||(n+=" has-selection"),this._cursorStyle){case _.TextEditorCursorStyle.Line:n+=" cursor-line-style";break;case _.TextEditorCursorStyle.Block:n+=" cursor-block-style";break;case _.TextEditorCursorStyle.Underline:n+=" cursor-underline-style";break;case _.TextEditorCursorStyle.LineThin:n+=" cursor-line-thin-style";break;case _.TextEditorCursorStyle.BlockOutline:n+=" cursor-block-outline-style";break;case _.TextEditorCursorStyle.UnderlineThin:n+=" cursor-underline-thin-style";break;default:n+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:n+=" cursor-blink";break;case 2:n+=" cursor-smooth";break;case 3:n+=" cursor-phase";break;case 4:n+=" cursor-expand";break;case 5:n+=" cursor-solid";break;default:n+=" cursor-solid"}else n+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(n+=" cursor-smooth-caret-animation"),n}_show(){this._primaryCursor.show();for(let n=0,t=this._secondaryCursors.length;n{const t=i.getColor(p.editorCursorForeground);if(t){let a=i.getColor(p.editorCursorBackground);a||(a=t.opposite()),n.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${a}; }`),(0,v.isHighContrast)(i.type)&&n.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${a}; border-right: 1px solid ${a}; }`)}})}),define(ie[858],ne([1,0,113,12,117,11,82,441]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class p extends L.DynamicViewOverlay{constructor(b){super(),this._context=b,this._options=new S(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){const o=new S(this._context.configuration);return this._options.equals(o)?b.hasChanged(143):(this._options=o,!0)}onCursorStateChanged(b){return this._selection=b.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(b){return!0}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}prepareRender(b){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const o=b.visibleRange.startLineNumber,n=b.visibleRange.endLineNumber-o+1,t=new Array(n);for(let u=0;uu)continue;const s=l.startLineNumber===u?l.startColumn:c.minColumn,g=l.endLineNumber===u?l.endColumn:c.maxColumn;s=P.endOffset&&(N++,P=i&&i[N]),B!==9&&B!==32||l&&!A&&R<=T)continue;if(r&&R>=O&&R<=T&&B===32){const V=R-1>=0?u.charCodeAt(R-1):0,U=R+1=0?u.charCodeAt(R-1):0;if(B===32&&V!==32&&V!==9)continue}if(i&&(!P||P.startOffset>R||P.endOffset<=R))continue;const W=b.visibleRangeForPosition(new E.Position(o,R+1));W&&(a?(x=Math.max(x,W.left),B===9?M+=this._renderArrow(s,m,W.left):M+=``):B===9?M+=`
    ${I?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:M+=`
    ${String.fromCharCode(D)}
    `)}return a?(x=Math.round(x+m),``+M+""):M}_renderArrow(b,o,i){const n=o/7,t=o,a=b/2,u=i,f={x:0,y:n/2},c={x:100/125*t,y:f.y},d={x:c.x-.2*c.x,y:c.y+.2*c.x},r={x:d.x+.1*c.x,y:d.y+.1*c.x},l={x:r.x+.35*c.x,y:r.y-.35*c.x},s={x:l.x,y:-l.y},g={x:r.x,y:-r.y},h={x:d.x,y:-d.y},m={x:c.x,y:-c.y},C={x:f.x,y:-f.y};return``}render(b,o){if(!this._renderResult)return"";const i=o-b;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}e.WhitespaceOverlay=p;class S{constructor(b){const o=b.options,i=o.get(50),n=o.get(38);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=o.get(98),this.renderWithSVG=!0):(this.renderWhitespace=o.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=o.get(66),this.stopRenderingLineAfter=o.get(116)}equals(b){return this.renderWhitespace===b.renderWhitespace&&this.renderWithSVG===b.renderWithSVG&&this.spaceWidth===b.spaceWidth&&this.middotWidth===b.middotWidth&&this.wsmiddotWidth===b.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===b.canUseHalfwidthRightwardsArrow&&this.lineHeight===b.lineHeight&&this.stopRenderingLineAfter===b.stopRenderingLineAfter}}}),define(ie[859],ne([1,0,7,24,5,40,9,845,855,801,276,604,56,600,853,532,850,854,365,846,533,296,534,830,535,856,544,536,537,851,857,538,11,146,545,541,153,23,362,531,263,858,213,43,8]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A,O,T,N,P,x,R,B,W,V,U,F,j,J){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;let le=class extends x.ViewEventHandler{constructor(G,de,ue,X,Z,re,oe){super(),this._instantiationService=oe,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new k.Selection(1,1,1,1)],this._renderAnimationFrame=null;const Y=new v.ViewController(de,X,Z,G);this._context=new N.ViewContext(de,ue,X),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(S.TextAreaHandler,this._context,Y,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,E.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,E.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,E.createFastDomNode)(document.createElement("div")),i.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new u.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 A.ViewZones(this._context),this._viewParts.push(this._viewZones);const K=new m.DecorationsOverviewRuler(this._context);this._viewParts.push(K);const H=new D.ScrollDecorationViewPart(this._context);this._viewParts.push(H);const z=new o.ContentViewOverlays(this._context);this._viewParts.push(z),z.addDynamicOverlay(new t.CurrentLineHighlightOverlay(this._context)),z.addDynamicOverlay(new I.SelectionsOverlay(this._context)),z.addDynamicOverlay(new f.IndentGuidesOverlay(this._context)),z.addDynamicOverlay(new a.DecorationsOverlay(this._context)),z.addDynamicOverlay(new U.WhitespaceOverlay(this._context));const se=new o.MarginViewOverlays(this._context);this._viewParts.push(se),se.addDynamicOverlay(new t.CurrentLineMarginHighlightOverlay(this._context)),se.addDynamicOverlay(new s.MarginViewLineDecorationsOverlay(this._context)),se.addDynamicOverlay(new r.LinesDecorationsOverlay(this._context)),se.addDynamicOverlay(new c.LineNumbersOverlay(this._context)),this._glyphMarginWidgets=new F.GlyphMarginWidgets(this._context),this._viewParts.push(this._glyphMarginWidgets);const q=new l.Margin(this._context);q.getDomNode().appendChild(this._viewZones.marginDomNode),q.getDomNode().appendChild(se.getDomNode()),q.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(q),this._contentWidgets=new n.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new M.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new h.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const ae=new w.Rulers(this._context);this._viewParts.push(ae);const ce=new W.BlockDecorations(this._context);this._viewParts.push(ce);const ge=new g.Minimap(this._context);if(this._viewParts.push(ge),K){const pe=this._scrollbar.getOverviewRulerLayoutInfo();pe.parent.insertBefore(K.getDomNode(),pe.insertBefore)}this._linesContent.appendChild(z.getDomNode()),this._linesContent.appendChild(ae.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(q.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(H.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(ge.getDomNode()),this._overflowGuardContainer.appendChild(ce.domNode),this.domNode.appendChild(this._overflowGuardContainer),re?re.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new p.PointerHandler(this._context,Y,this._createPointerHandlerHelper()))}_computeGlyphMarginLaneCount(){const G=this._context.viewModel.model;let de=[];de=de.concat(G.getAllMarginDecorations().map(Z=>{var re,oe;const Y=(oe=(re=Z.options.glyphMargin)===null||re===void 0?void 0:re.position)!==null&&oe!==void 0?oe:j.GlyphMarginLane.Left;return{range:Z.range,lane:Y}})),de=de.concat(this._glyphMarginWidgets.getWidgets().map(Z=>({range:G.validateRange(Z.preference.range),lane:Z.preference.lane}))),de.sort((Z,re)=>y.Range.compareRangesUsingStarts(Z.range,re.range));let ue=null,X=null;for(const Z of de)if(Z.lane===j.GlyphMarginLane.Left&&(!ue||y.Range.compareRangesUsingEnds(ue,Z.range)<0)&&(ue=Z.range),Z.lane===j.GlyphMarginLane.Right&&(!X||y.Range.compareRangesUsingEnds(X,Z.range)<0)&&(X=Z.range),ue&&X){if(ue.endLineNumber{this.focus()},dispatchTextAreaEvent:G=>{this._textAreaHandler.textArea.domNode.dispatchEvent(G)},getLastRenderData:()=>{const G=this._viewCursors.getLastRenderData()||[],de=this._textAreaHandler.getLastRenderData();return new B.PointerHandlerLastRenderData(G,de)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:G=>this._viewZones.shouldSuppressMouseDownOnViewZone(G),shouldSuppressMouseDownOnWidget:G=>this._contentWidgets.shouldSuppressMouseDownOnWidget(G),getPositionFromDOMInfo:(G,de)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(G,de)),visibleRangeForPosition:(G,de)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new O.Position(G,de))),getLineWidth:G=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(G))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:G=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(G))}}_applyLayout(){const de=this._context.configuration.options.get(143);this.domNode.setWidth(de.width),this.domNode.setHeight(de.height),this._overflowGuardContainer.setWidth(de.width),this._overflowGuardContainer.setHeight(de.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const G=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+(0,R.getThemeTypeSelector)(this._context.theme.type)+G}handleEvents(G){super.handleEvents(G),this._scheduleRender()}onConfigurationChanged(G){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(G){return this._selections=G.selections,!1}onDecorationsChanged(G){return G.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(G){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(G){return this._context.theme.update(G.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 G of this._viewParts)G.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new _.BugIndicatingError;if(this._renderAnimationFrame===null){const G=this._createCoordinatedRendering();this._renderAnimationFrame=$.INSTANCE.scheduleCoordinatedRendering({window:L.getWindow(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new _.BugIndicatingError;try{return G.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new _.BugIndicatingError;return G.renderText()},prepareRender:(de,ue)=>{if(this._store.isDisposed)throw new _.BugIndicatingError;return G.prepareRender(de,ue)},render:(de,ue)=>{if(this._store.isDisposed)throw new _.BugIndicatingError;return G.render(de,ue)}})}}_flushAccumulatedAndRenderNow(){const G=this._createCoordinatedRendering();ee(()=>G.prepareRenderText());const de=ee(()=>G.renderText());if(de){const[ue,X]=de;ee(()=>G.prepareRender(ue,X)),ee(()=>G.render(ue,X))}}_getViewPartsToRender(){const G=[];let de=0;for(const ue of this._viewParts)ue.shouldRender()&&(G[de++]=ue);return G}_createCoordinatedRendering(){return{prepareRenderText:()=>{this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),V.inputLatency.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let G=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&G.length===0)return null;const de=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(de.startLineNumber,de.endLineNumber,de.centeredLineNumber);const ue=new P.ViewportData(this._selections,de,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(ue),this._viewLines.shouldRender()&&(this._viewLines.renderText(ue),this._viewLines.onDidRender(),G=this._getViewPartsToRender()),[G,new T.RenderingContext(this._context.viewLayout,ue,this._viewLines)]},prepareRender:(G,de)=>{for(const ue of G)ue.prepareRender(de)},render:(G,de)=>{for(const ue of G)ue.render(de),ue.onDidRender()}}}delegateVerticalScrollbarPointerDown(G){this._scrollbar.delegateVerticalScrollbarPointerDown(G)}delegateScrollFromMouseWheelEvent(G){this._scrollbar.delegateScrollFromMouseWheelEvent(G)}restoreState(G){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:G.scrollTop,scrollLeft:G.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(G,de){const ue=this._context.viewModel.model.validatePosition({lineNumber:G,column:de}),X=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(ue);this._flushAccumulatedAndRenderNow();const Z=this._viewLines.visibleRangeForPosition(new O.Position(X.lineNumber,X.column));return Z?Z.left:-1}getTargetAtClientPoint(G,de){const ue=this._pointerHandler.getTargetAtClientPoint(G,de);return ue?b.ViewUserInputEvents.convertViewToModelMouseTarget(ue,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(G){return new C.OverviewRuler(this._context,G)}change(G){this._viewZones.changeViewZones(G),this._scheduleRender()}render(G,de){if(de){this._viewLines.forceShouldRender();for(const ue of this._viewParts)ue.forceShouldRender()}G?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(G){this._textAreaHandler.writeScreenReaderContent(G)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(G){this._textAreaHandler.setAriaOptions(G)}addContentWidget(G){this._contentWidgets.addWidget(G.widget),this.layoutContentWidget(G),this._scheduleRender()}layoutContentWidget(G){var de,ue,X,Z,re,oe,Y,K;this._contentWidgets.setWidgetPosition(G.widget,(ue=(de=G.position)===null||de===void 0?void 0:de.position)!==null&&ue!==void 0?ue:null,(Z=(X=G.position)===null||X===void 0?void 0:X.secondaryPosition)!==null&&Z!==void 0?Z:null,(oe=(re=G.position)===null||re===void 0?void 0:re.preference)!==null&&oe!==void 0?oe:null,(K=(Y=G.position)===null||Y===void 0?void 0:Y.positionAffinity)!==null&&K!==void 0?K:null),this._scheduleRender()}removeContentWidget(G){this._contentWidgets.removeWidget(G.widget),this._scheduleRender()}addOverlayWidget(G){this._overlayWidgets.addWidget(G.widget),this.layoutOverlayWidget(G),this._scheduleRender()}layoutOverlayWidget(G){const de=G.position?G.position.preference:null;this._overlayWidgets.setWidgetPosition(G.widget,de)&&this._scheduleRender()}removeOverlayWidget(G){this._overlayWidgets.removeWidget(G.widget),this._scheduleRender()}addGlyphMarginWidget(G){this._glyphMarginWidgets.addWidget(G.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(G){const de=G.position;this._glyphMarginWidgets.setWidgetPosition(G.widget,de)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(G){this._glyphMarginWidgets.removeWidget(G.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};e.View=le,e.View=le=Ee([he(6,J.IInstantiationService)],le);function ee(te){try{return te()}catch(G){return(0,_.onUnexpectedError)(G),null}}class ${constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(G){return this._coordinatedRenderings.push(G),this._scheduleRender(G.window),{dispose:()=>{const de=this._coordinatedRenderings.indexOf(G);if(de!==-1&&(this._coordinatedRenderings.splice(de,1),this._coordinatedRenderings.length===0)){for(const[ue,X]of this._animationFrameRunners)X.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(G){if(!this._animationFrameRunners.has(G)){const de=()=>{this._animationFrameRunners.delete(G),this._onRenderScheduled()};this._animationFrameRunners.set(G,L.runAtThisOrScheduleAtNextAnimationFrame(G,de,100))}}_onRenderScheduled(){const G=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const ue of G)ee(()=>ue.prepareRenderText());const de=[];for(let ue=0,X=G.length;ueZ.renderText())}for(let ue=0,X=G.length;ueZ.prepareRender(oe,Y))}for(let ue=0,X=G.length;ueZ.render(oe,Y))}}}$.INSTANCE=new $}),define(ie[860],ne([1,0,6,2,5,82,23]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class p extends k.Disposable{constructor(b){super(),this.textModel=b,this.colorProvider=new S,this.onDidChangeEmitter=new L.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=b.getOptions().bracketPairColorizationOptions,this._register(b.bracketPairs.onDidChange(o=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(b){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(b,o,i,n){return n?[]:o===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(b,!0).map(a=>({id:`bracket${a.range.toString()}-${a.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(a,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:a.range})).toArray():[]}getAllDecorations(b,o){return b===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new y.Range(1,1,this.textModel.getLineCount(),1),b,o):[]}}e.ColorizedBracketPairsDecorationProvider=p;class S{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(b,o){return b.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(o?b.nestingLevelOfEqualBracketType:b.nestingLevel)}getInlineClassNameOfLevel(b){return`bracket-highlighting-${b%30}`}}(0,_.registerThemingParticipant)((v,b)=>{const o=[E.editorBracketHighlightingForeground1,E.editorBracketHighlightingForeground2,E.editorBracketHighlightingForeground3,E.editorBracketHighlightingForeground4,E.editorBracketHighlightingForeground5,E.editorBracketHighlightingForeground6],i=new S;b.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${v.getColor(E.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const n=o.map(t=>v.getColor(t)).filter(t=>!!t).filter(t=>!t.isTransparent());for(let t=0;t<30;t++){const a=n[t%n.length];b.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(t)} { color: ${a}; }`)}})}),define(ie[861],ne([1,0,96,2,43,23,82,52,5,44,6,30,53,265]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;let t=class extends k.Disposable{constructor(f,c){super(),this._markerService=c,this._onDidChangeMarker=this._register(new b.Emitter),this._markerDecorations=new i.ResourceMap,f.getModels().forEach(d=>this._onModelAdded(d)),this._register(f.onModelAdded(this._onModelAdded,this)),this._register(f.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(f=>f.dispose()),this._markerDecorations.clear()}getMarker(f,c){const d=this._markerDecorations.get(f);return d&&d.getMarker(c)||null}_handleMarkerChange(f){f.forEach(c=>{const d=this._markerDecorations.get(c);d&&this._updateDecorations(d)})}_onModelAdded(f){const c=new a(f);this._markerDecorations.set(f.uri,c),this._updateDecorations(c)}_onModelRemoved(f){var c;const d=this._markerDecorations.get(f.uri);d&&(d.dispose(),this._markerDecorations.delete(f.uri)),(f.uri.scheme===v.Schemas.inMemory||f.uri.scheme===v.Schemas.internal||f.uri.scheme===v.Schemas.vscode)&&((c=this._markerService)===null||c===void 0||c.read({resource:f.uri}).map(r=>r.owner).forEach(r=>this._markerService.remove(r,[f.uri])))}_updateDecorations(f){const c=this._markerService.read({resource:f.model.uri,take:500});f.update(c)&&this._onDidChangeMarker.fire(f.model)}};e.MarkerDecorationsService=t,e.MarkerDecorationsService=t=Ee([he(0,p.IModelService),he(1,L.IMarkerService)],t);class a extends k.Disposable{constructor(f){super(),this.model=f,this._map=new i.BidirectionalMap,this._register((0,k.toDisposable)(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(f){const{added:c,removed:d}=(0,n.diffSets)(new Set(this._map.keys()),new Set(f));if(c.length===0&&d.length===0)return!1;const r=d.map(g=>this._map.get(g)),l=c.map(g=>({range:this._createDecorationRange(this.model,g),options:this._createDecorationOption(g)})),s=this.model.deltaDecorations(r,l);for(const g of d)this._map.delete(g);for(let g=0;g=r)return d;const l=f.getWordAtPosition(d.getStartPosition());l&&(d=new S.Range(d.startLineNumber,l.startColumn,d.endLineNumber,l.endColumn))}else if(c.endColumn===Number.MAX_VALUE&&c.startColumn===1&&d.startLineNumber===d.endLineNumber){const r=f.getLineFirstNonWhitespaceColumn(c.startLineNumber);r=0:!1}}}),define(ie[254],ne([1,0,128,23,64,529,42]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let p=class{constructor(i,n,t,a){this._legend=i,this._themeService=n,this._languageService=t,this._logService=a,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new b}getMetadata(i,n,t){const a=this._languageService.languageIdCodec.encodeLanguageId(t),u=this._hashTable.get(i,n,a);let f;if(u)f=u.metadata,this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${n}: foreground ${L.TokenMetadata.getForeground(f)}, fontStyle ${L.TokenMetadata.getFontStyle(f).toString(2)}`);else{let c=this._legend.tokenTypes[i];const d=[];if(c){let r=n;for(let s=0;r>0&&s>1;r>0&&this._logService.getLevel()===y.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${n.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),d.push("not-in-legend"));const l=this._themeService.getColorTheme().getTokenStyleMetadata(c,d,t);if(typeof l>"u")f=2147483647;else{if(f=0,typeof l.italic<"u"){const s=(l.italic?1:0)<<11;f|=s|1}if(typeof l.bold<"u"){const s=(l.bold?2:0)<<11;f|=s|2}if(typeof l.underline<"u"){const s=(l.underline?4:0)<<11;f|=s|4}if(typeof l.strikethrough<"u"){const s=(l.strikethrough?8:0)<<11;f|=s|8}if(l.foreground){const s=l.foreground<<15;f|=s|16}f===0&&(f=2147483647)}}else this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),f=2147483647,c="not-in-legend";this._hashTable.add(i,n,a,f),this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${c}) / ${n} (${d.join(" ")}): foreground ${L.TokenMetadata.getForeground(f)}, fontStyle ${L.TokenMetadata.getFontStyle(f).toString(2)}`)}return f}warnOverlappingSemanticTokens(i,n){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${n}`))}warnInvalidLengthSemanticTokens(i,n){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${i}, column ${n}`))}warnInvalidEditStart(i,n,t,a,u){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${i}, resultId: ${n}) at edit #${t}: The provided start offset ${a} is outside the previous data (length ${u}).`))}};e.SemanticTokensProviderStyling=p,e.SemanticTokensProviderStyling=p=Ee([he(1,k.IThemeService),he(2,_.ILanguageService),he(3,y.ILogService)],p);function S(o,i,n){const t=o.data,a=o.data.length/5|0,u=Math.max(Math.ceil(a/1024),400),f=[];let c=0,d=1,r=0;for(;cl&&t[5*I]===0;)I--;if(I-1===l){let M=s;for(;M+1T)i.warnOverlappingSemanticTokens(O,T+1);else{const B=i.getMetadata(x,R,n);B!==2147483647&&(m===0&&(m=O),g[h]=O-m,g[h+1]=T,g[h+2]=P,g[h+3]=B,h+=4,C=O,w=P)}d=O,r=T,c++}h!==g.length&&(g=g.subarray(0,h));const D=E.SparseMultilineTokens.create(m,g);f.push(D)}return f}e.toMultilineTokens2=S;class v{constructor(i,n,t,a){this.tokenTypeIndex=i,this.tokenModifierSet=n,this.languageId=t,this.metadata=a,this.next=null}}class b{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const u=this._elements;this._currentLengthIndex++,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{this._caches=new WeakMap}))}getStyling(o){return this._caches.has(o)||this._caches.set(o,new _.SemanticTokensProviderStyling(o.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(o)}};e.SemanticTokensStylingService=v,e.SemanticTokensStylingService=v=Ee([he(0,y.IThemeService),he(1,E.ILogService),he(2,k.ILanguageService)],v),(0,S.registerSingleton)(p.ISemanticTokensStylingService,v,1)}),define(ie[366],ne([1,0,107,2,151,43,82,23,51]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class v{constructor(o){this.options=o,this.rangeHighlightDecorationId=void 0}provide(o,i){var n;const t=new k.DisposableStore;o.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),o.matchOnLabel=o.matchOnDescription=o.matchOnDetail=o.sortByLabel=!1;const a=t.add(new k.MutableDisposable);return a.value=this.doProvide(o,i),t.add(this.onDidActiveTextEditorControlChange(()=>{a.value=void 0,a.value=this.doProvide(o,i)})),t}doProvide(o,i){var n;const t=new k.DisposableStore,a=this.activeTextEditorControl;if(a&&this.canProvideWithTextEditor(a)){const u={editor:a},f=(0,y.getCodeEditor)(a);if(f){let c=(n=a.saveViewState())!==null&&n!==void 0?n:void 0;t.add(f.onDidChangeCursorPosition(()=>{var d;c=(d=a.saveViewState())!==null&&d!==void 0?d:void 0})),u.restoreViewState=()=>{c&&a===this.activeTextEditorControl&&a.restoreViewState(c)},t.add((0,L.createSingleCallFunction)(i.onCancellationRequested)(()=>{var d;return(d=u.restoreViewState)===null||d===void 0?void 0:d.call(u)}))}t.add((0,k.toDisposable)(()=>this.clearDecorations(a))),t.add(this.provideWithTextEditor(u,o,i))}else t.add(this.provideWithoutTextEditor(o,i));return t}canProvideWithTextEditor(o){return!0}gotoLocation({editor:o},i){o.setSelection(i.range),o.revealRangeInCenter(i.range,0),i.preserveFocus||o.focus();const n=o.getModel();n&&"getLineContent"in n&&(0,S.status)(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(o){var i;return(0,y.isDiffEditor)(o)?(i=o.getModel())===null||i===void 0?void 0:i.modified:o.getModel()}addDecorations(o,i){o.changeDecorations(n=>{const t=[];this.rangeHighlightDecorationId&&(t.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),t.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const a=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,p.themeColorFromId)(_.overviewRulerRangeHighlight),position:E.OverviewRulerLane.Full}}}],[u,f]=n.deltaDecorations(t,a);this.rangeHighlightDecorationId={rangeHighlightId:u,overviewRulerDecorationId:f}})}clearDecorations(o){const i=this.rangeHighlightDecorationId;i&&(o.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=v}),define(ie[863],ne([1,0,2,151,366,700]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class _ extends y.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(S){const v=(0,E.localize)(0,null);return S.items=[{label:v}],S.ariaLabel=v,L.Disposable.None}provideWithTextEditor(S,v,b){const o=S.editor,i=new L.DisposableStore;i.add(v.onDidAccept(a=>{const[u]=v.selectedItems;if(u){if(!this.isValidLineNumber(o,u.lineNumber))return;this.gotoLocation(S,{range:this.toRange(u.lineNumber,u.column),keyMods:v.keyMods,preserveFocus:a.inBackground}),a.inBackground||v.hide()}}));const n=()=>{const a=this.parsePosition(o,v.value.trim().substr(_.PREFIX.length)),u=this.getPickLabel(o,a.lineNumber,a.column);if(v.items=[{lineNumber:a.lineNumber,column:a.column,label:u}],v.ariaLabel=u,!this.isValidLineNumber(o,a.lineNumber)){this.clearDecorations(o);return}const f=this.toRange(a.lineNumber,a.column);o.revealRangeInCenter(f,0),this.addDecorations(o,f)};n(),i.add(v.onDidChangeValue(()=>n()));const t=(0,k.getCodeEditor)(o);return t&&t.getOptions().get(67).renderType===2&&(t.updateOptions({lineNumbers:"on"}),i.add((0,L.toDisposable)(()=>t.updateOptions({lineNumbers:"relative"})))),i}toRange(S=1,v=1){return{startLineNumber:S,startColumn:v,endLineNumber:S,endColumn:v}}parsePosition(S,v){const b=v.split(/,|:|#/).map(i=>parseInt(i,10)).filter(i=>!isNaN(i)),o=this.lineCount(S)+1;return{lineNumber:b[0]>0?b[0]:o+b[0],column:b[1]}}getPickLabel(S,v,b){if(this.isValidLineNumber(S,v))return this.isValidColumn(S,v,b)?(0,E.localize)(1,null,v,b):(0,E.localize)(2,null,v);const o=S.getPosition()||{lineNumber:1,column:1},i=this.lineCount(S);return i>1?(0,E.localize)(3,null,o.lineNumber,o.column,i):(0,E.localize)(4,null,o.lineNumber,o.column)}isValidLineNumber(S,v){return!v||typeof v!="number"?!1:v>0&&v<=this.lineCount(S)}isValidColumn(S,v,b){if(!b||typeof b!="number")return!1;const o=this.getModel(S);if(!o)return!1;const i={lineNumber:v,column:b};return o.validatePosition(i).equals(i)}lineCount(S){var v,b;return(b=(v=this.getModel(S))===null||v===void 0?void 0:v.getLineCount())!==null&&b!==void 0?b:0}}e.AbstractGotoLineQuickAccessProvider=_,_.PREFIX=":"}),define(ie[864],ne([1,0,14,19,26,27,581,2,12,5,31,189,366,701,18,60]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let f=u=class extends i.AbstractEditorNavigationQuickAccessProvider{constructor(l,s,g=Object.create(null)){super(g),this._languageFeaturesService=l,this._outlineModelService=s,this.options=g,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(l){return this.provideLabelPick(l,(0,n.localize)(0,null)),p.Disposable.None}provideWithTextEditor(l,s,g){const h=l.editor,m=this.getModel(h);return m?this._languageFeaturesService.documentSymbolProvider.has(m)?this.doProvideWithEditorSymbols(l,m,s,g):this.doProvideWithoutEditorSymbols(l,m,s,g):p.Disposable.None}doProvideWithoutEditorSymbols(l,s,g,h){const m=new p.DisposableStore;return this.provideLabelPick(g,(0,n.localize)(1,null)),(async()=>!await this.waitForLanguageSymbolRegistry(s,m)||h.isCancellationRequested||m.add(this.doProvideWithEditorSymbols(l,s,g,h)))(),m}provideLabelPick(l,s){l.items=[{label:s,index:0,kind:14}],l.ariaLabel=s}async waitForLanguageSymbolRegistry(l,s){if(this._languageFeaturesService.documentSymbolProvider.has(l))return!0;const g=new L.DeferredPromise,h=s.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(l)&&(h.dispose(),g.complete(!0))}));return s.add((0,p.toDisposable)(()=>g.complete(!1))),g.p}doProvideWithEditorSymbols(l,s,g,h){var m;const C=l.editor,w=new p.DisposableStore;w.add(g.onDidAccept(A=>{const[O]=g.selectedItems;O&&O.range&&(this.gotoLocation(l,{range:O.range.selection,keyMods:g.keyMods,preserveFocus:A.inBackground}),A.inBackground||g.hide())})),w.add(g.onDidTriggerItemButton(({item:A})=>{A&&A.range&&(this.gotoLocation(l,{range:A.range.selection,keyMods:g.keyMods,forceSideBySide:!0}),g.hide())}));const D=this.getDocumentSymbols(s,h);let I;const M=async A=>{I?.dispose(!0),g.busy=!1,I=new k.CancellationTokenSource(h),g.busy=!0;try{const O=(0,_.prepareQuery)(g.value.substr(u.PREFIX.length).trim()),T=await this.doGetSymbolPicks(D,O,void 0,I.token);if(h.isCancellationRequested)return;if(T.length>0){if(g.items=T,A&&O.original.length===0){const N=(0,a.findLast)(T,P=>!!(P.type!=="separator"&&P.range&&v.Range.containsPosition(P.range.decoration,A)));N&&(g.activeItems=[N])}}else O.original.length>0?this.provideLabelPick(g,(0,n.localize)(2,null)):this.provideLabelPick(g,(0,n.localize)(3,null))}finally{h.isCancellationRequested||(g.busy=!1)}};return w.add(g.onDidChangeValue(()=>M(void 0))),M((m=C.getSelection())===null||m===void 0?void 0:m.getPosition()),w.add(g.onDidChangeActive(()=>{const[A]=g.activeItems;A&&A.range&&(C.revealRangeInCenter(A.range.selection,0),this.addDecorations(C,A.range.decoration))})),w}async doGetSymbolPicks(l,s,g,h){var m,C;const w=await l;if(h.isCancellationRequested)return[];const D=s.original.indexOf(u.SCOPE_PREFIX)===0,I=D?1:0;let M,A;s.values&&s.values.length>1?(M=(0,_.pieceToQuery)(s.values[0]),A=(0,_.pieceToQuery)(s.values.slice(1))):M=s;let O;const T=(C=(m=this.options)===null||m===void 0?void 0:m.openSideBySideDirection)===null||C===void 0?void 0:C.call(m);T&&(O=[{iconClass:T==="right"?E.ThemeIcon.asClassName(y.Codicon.splitHorizontal):E.ThemeIcon.asClassName(y.Codicon.splitVertical),tooltip:T==="right"?(0,n.localize)(4,null):(0,n.localize)(5,null)}]);const N=[];for(let R=0;RI){let te=!1;if(M!==s&&([j,J]=(0,_.scoreFuzzy2)(V,{...s,values:void 0},I,U),typeof j=="number"&&(te=!0)),typeof j!="number"&&([j,J]=(0,_.scoreFuzzy2)(V,M,I,U),typeof j!="number"))continue;if(!te&&A){if(F&&A.original.length>0&&([le,ee]=(0,_.scoreFuzzy2)(F,A)),typeof le!="number")continue;typeof j=="number"&&(j+=le)}}const $=B.tags&&B.tags.indexOf(1)>=0;N.push({index:R,kind:B.kind,score:j,label:V,ariaLabel:(0,b.getAriaLabelForSymbol)(B.name,B.kind),description:F,highlights:$?void 0:{label:J,description:ee},range:{selection:v.Range.collapseToStart(B.selectionRange),decoration:B.range},strikethrough:$,buttons:O})}const P=N.sort((R,B)=>D?this.compareByKindAndScore(R,B):this.compareByScore(R,B));let x=[];if(D){let V=function(){B&&typeof R=="number"&&W>0&&(B.label=(0,S.format)(d[R]||c,W))},R,B,W=0;for(const U of P)R!==U.kind?(V(),R=U.kind,W=1,B={type:"separator"},x.push(B)):W++,x.push(U);V()}else P.length>0&&(x=[{label:(0,n.localize)(6,null,N.length),type:"separator"},...P]);return x}compareByScore(l,s){if(typeof l.score!="number"&&typeof s.score=="number")return 1;if(typeof l.score=="number"&&typeof s.score!="number")return-1;if(typeof l.score=="number"&&typeof s.score=="number"){if(l.score>s.score)return-1;if(l.scores.index?1:0}compareByKindAndScore(l,s){const g=d[l.kind]||c,h=d[s.kind]||c,m=g.localeCompare(h);return m===0?this.compareByScore(l,s):m}async getDocumentSymbols(l,s){const g=await this._outlineModelService.getOrCreate(l,s);return s.isCancellationRequested?[]:g.asListOfDocumentSymbols()}};e.AbstractGotoSymbolQuickAccessProvider=f,f.PREFIX="@",f.SCOPE_PREFIX=":",f.PREFIX_BY_CATEGORY=`${u.PREFIX}${u.SCOPE_PREFIX}`,e.AbstractGotoSymbolQuickAccessProvider=f=u=Ee([he(0,t.ILanguageFeaturesService),he(1,o.IOutlineModelService)],f);const c=(0,n.localize)(7,null),d={[5]:(0,n.localize)(8,null),[11]:(0,n.localize)(9,null),[8]:(0,n.localize)(10,null),[12]:(0,n.localize)(11,null),[4]:(0,n.localize)(12,null),[22]:(0,n.localize)(13,null),[23]:(0,n.localize)(14,null),[24]:(0,n.localize)(15,null),[10]:(0,n.localize)(16,null),[2]:(0,n.localize)(17,null),[3]:(0,n.localize)(18,null),[25]:(0,n.localize)(19,null),[1]:(0,n.localize)(20,null),[6]:(0,n.localize)(21,null),[9]:(0,n.localize)(22,null),[21]:(0,n.localize)(23,null),[14]:(0,n.localize)(24,null),[0]:(0,n.localize)(25,null),[17]:(0,n.localize)(26,null),[15]:(0,n.localize)(27,null),[16]:(0,n.localize)(28,null),[18]:(0,n.localize)(29,null),[19]:(0,n.localize)(30,null),[7]:(0,n.localize)(31,null),[13]:(0,n.localize)(32,null)}}),define(ie[865],ne([1,0,2,11,704,15,34,30,23,469]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new E.RawContextKey("renameInputVisible",!1,(0,y.localize)(0,null));let v=class{constructor(o,i,n,t,a){this._editor=o,this._acceptKeybindings=i,this._themeService=n,this._keybindingService=t,this._disposables=new L.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(a),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return 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,y.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(o){var i,n,t,a;if(!this._input||!this._domNode)return;const u=o.getColor(p.widgetShadow),f=o.getColor(p.widgetBorder);this._domNode.style.backgroundColor=String((i=o.getColor(p.editorWidgetBackground))!==null&&i!==void 0?i:""),this._domNode.style.boxShadow=u?` 0 0 8px 2px ${u}`:"",this._domNode.style.border=f?`1px solid ${f}`:"",this._domNode.style.color=String((n=o.getColor(p.inputForeground))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((t=o.getColor(p.inputBackground))!==null&&t!==void 0?t:"");const c=o.getColor(p.inputBorder);this._input.style.borderWidth=c?"1px":"0px",this._input.style.borderStyle=c?"solid":"none",this._input.style.borderColor=(a=c?.toString())!==null&&a!==void 0?a:"none"}_updateFont(){if(!this._input||!this._label)return;const o=this._editor.getOption(50);this._input.style.fontFamily=o.fontFamily,this._input.style.fontWeight=o.fontWeight,this._input.style.fontSize=`${o.fontSize}px`,this._label.style.fontSize=`${o.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var o,i;const[n,t]=this._acceptKeybindings;return this._label.innerText=(0,y.localize)(2,null,(o=this._keybindingService.lookupKeybinding(n))===null||o===void 0?void 0:o.getLabel(),(i=this._keybindingService.lookupKeybinding(t))===null||i===void 0?void 0:i.getLabel()),null}afterRender(o){o||this.cancelInput(!0)}acceptInput(o){var i;(i=this._currentAcceptInput)===null||i===void 0||i.call(this,o)}cancelInput(o){var i;(i=this._currentCancelInput)===null||i===void 0||i.call(this,o)}getInput(o,i,n,t,a,u){this._domNode.classList.toggle("preview",a),this._position=new k.Position(o.startLineNumber,o.startColumn),this._input.value=i,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",t.toString()),this._input.size=Math.max((o.endColumn-o.startColumn)*1.1,20);const f=new L.DisposableStore;return new Promise(c=>{this._currentCancelInput=d=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,c(d),!0),this._currentAcceptInput=d=>{if(this._input.value.trim().length===0||this._input.value===i){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,c({newName:this._input.value,wantsPreview:a&&d})},f.add(u.onCancellationRequested(()=>this.cancelInput(!0))),f.add(this._editor.onDidBlurEditorWidget(()=>{var d;return this.cancelInput(!(!((d=this._domNode)===null||d===void 0)&&d.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{f.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)}};e.RenameInputField=v,e.RenameInputField=v=Ee([he(2,S.IThemeService),he(3,_.IKeybindingService),he(4,E.IContextKeyService)],v)}),define(ie[866],ne([1,0,51,14,19,9,2,20,22,104,16,133,33,11,5,21,187,191,703,97,15,8,64,47,87,37,865,18]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class I{constructor(P,x,R){this.model=P,this.position=x,this._providerRenameIdx=0,this._providers=R.ordered(P)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(P){const x=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?x.join(` `):void 0}:{range:t.Range.fromPositions(this.position),text:"",rejectReason:x.length>0?x.join(` `):void 0}}async provideRenameEdits(P,x){return this._provideRenameEdits(P,this._providerRenameIdx,[],x)}async _provideRenameEdits(P,x,R,B){const W=this._providers[x];if(!W)return{edits:[],rejectReason:R.join(` `)};const V=await W.provideRenameEdits(this.model,this.position,P,B);if(V){if(V.rejectReason)return this._provideRenameEdits(P,x+1,R.concat(V.rejectReason),B)}else return this._provideRenameEdits(P,x+1,R.concat(c.localize(0,null)),B);return V}}async function M(N,P,x,R){const B=new I(P,x,N),W=await B.resolveRenameLocation(y.CancellationToken.None);return W?.rejectReason?{edits:[],rejectReason:W.rejectReason}:B.provideRenameEdits(R,y.CancellationToken.None)}e.rename=M;let A=D=class{static get(P){return P.getContribution(D.ID)}constructor(P,x,R,B,W,V,U,F){this.editor=P,this._instaService=x,this._notificationService=R,this._bulkEditService=B,this._progressService=W,this._logService=V,this._configService=U,this._languageFeaturesService=F,this._disposableStore=new _.DisposableStore,this._cts=new y.CancellationTokenSource,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(C.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){var P,x;if(this._cts.dispose(!0),this._cts=new y.CancellationTokenSource,!this.editor.hasModel())return;const R=this.editor.getPosition(),B=new I(this.editor.getModel(),R,this._languageFeaturesService.renameProvider);if(!B.hasProvider())return;const W=new v.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let V;try{const te=B.resolveRenameLocation(W.token);this._progressService.showWhile(te,250),V=await te}catch(te){(P=f.MessageController.get(this.editor))===null||P===void 0||P.showMessage(te||c.localize(1,null),R);return}finally{W.dispose()}if(!V)return;if(V.rejectReason){(x=f.MessageController.get(this.editor))===null||x===void 0||x.showMessage(V.rejectReason,R);return}if(W.token.isCancellationRequested)return;const U=new v.EditorStateCancellationTokenSource(this.editor,5,V.range,this._cts.token),F=this.editor.getSelection();let j=0,J=V.text.length;!t.Range.isEmpty(F)&&!t.Range.spansMultipleLines(F)&&t.Range.containsRange(V.range,F)&&(j=Math.max(0,F.startColumn-V.range.startColumn),J=Math.min(V.range.endColumn,F.endColumn)-V.range.startColumn);const le=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ee=await this._renameInputField.getInput(V.range,V.text,j,J,le,U.token);if(typeof ee=="boolean"){ee&&this.editor.focus(),U.dispose();return}this.editor.focus();const $=(0,k.raceCancellation)(B.provideRenameEdits(ee.newName,U.token),U.token).then(async te=>{if(!(!te||!this.editor.hasModel())){if(te.rejectReason){this._notificationService.info(te.rejectReason);return}this.editor.setSelection(t.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(te,{editor:this.editor,showPreview:ee.wantsPreview,label:c.localize(2,null,V?.text,ee.newName),code:"undoredo.rename",quotableLabel:c.localize(3,null,V?.text,ee.newName),respectAutoSaveConfig:!0}).then(G=>{G.ariaSummary&&(0,L.alert)(c.localize(4,null,V.text,ee.newName,G.ariaSummary))}).catch(G=>{this._notificationService.error(c.localize(5,null)),this._logService.error(G)})}},te=>{this._notificationService.error(c.localize(6,null)),this._logService.error(te)}).finally(()=>{U.dispose()});return this._progressService.showWhile($,250),$}acceptRenameInput(P){this._renameInputField.acceptInput(P)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};A.ID="editor.contrib.renameController",A=D=Ee([he(1,l.IInstantiationService),he(2,g.INotificationService),he(3,o.IBulkEditService),he(4,h.IEditorProgressService),he(5,s.ILogService),he(6,u.ITextResourceConfigurationService),he(7,w.ILanguageFeaturesService)],A);class O extends b.EditorAction{constructor(){super({id:"editor.action.rename",label:c.localize(7,null),alias:"Rename Symbol",precondition:r.ContextKeyExpr.and(a.EditorContextKeys.writable,a.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(P,x){const R=P.get(i.ICodeEditorService),[B,W]=Array.isArray(x)&&x||[void 0,void 0];return S.URI.isUri(B)&&n.Position.isIPosition(W)?R.openCodeEditor({resource:B},R.getActiveCodeEditor()).then(V=>{V&&(V.setPosition(W),V.invokeWithinContext(U=>(this.reportTelemetry(U,V),this.run(U,V))))},E.onUnexpectedError):super.runCommand(P,x)}run(P,x){const R=A.get(x);return R?R.run():Promise.resolve()}}e.RenameAction=O,(0,b.registerEditorContribution)(A.ID,A,4),(0,b.registerEditorAction)(O);const T=b.EditorCommand.bindToContribution(A.get);(0,b.registerEditorCommand)(new T({id:"acceptRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:r.ContextKeyExpr.and(a.EditorContextKeys.focus,r.ContextKeyExpr.not("isComposing")),primary:3}})),(0,b.registerEditorCommand)(new T({id:"acceptRenameInputWithPreview",precondition:r.ContextKeyExpr.and(C.CONTEXT_RENAME_INPUT_VISIBLE,r.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:N=>N.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:r.ContextKeyExpr.and(a.EditorContextKeys.focus,r.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,b.registerEditorCommand)(new T({id:"cancelRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:a.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,b.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(N,P,x,...R){const[B]=R;(0,p.assertType)(typeof B=="string");const{renameProvider:W}=N.get(w.ILanguageFeaturesService);return M(W,P,x,B)}),(0,b.registerModelAndPositionCommand)("_executePrepareRename",async function(N,P,x){const{renameProvider:R}=N.get(w.ILanguageFeaturesService),W=await new I(P,x,R).resolveRenameLocation(y.CancellationToken.None);if(W?.rejectReason)throw new Error(W.rejectReason);return W}),m.Registry.as(d.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:c.localize(8,null),default:!0,type:"boolean"}}})}),define(ie[867],ne([1,0,2,9,52,28,14,19,23,254,341,78,61,18,238,152,305]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let c=class extends L.Disposable{constructor(s,g,h,m,C,w){super(),this._watchers=Object.create(null);const D=A=>{this._watchers[A.uri.toString()]=new d(A,s,h,C,w)},I=(A,O)=>{O.dispose(),delete this._watchers[A.uri.toString()]},M=()=>{for(const A of g.getModels()){const O=this._watchers[A.uri.toString()];(0,u.isSemanticColoringEnabled)(A,h,m)?O||D(A):O&&I(A,O)}};this._register(g.onModelAdded(A=>{(0,u.isSemanticColoringEnabled)(A,h,m)&&D(A)})),this._register(g.onModelRemoved(A=>{const O=this._watchers[A.uri.toString()];O&&I(A,O)})),this._register(m.onDidChangeConfiguration(A=>{A.affectsConfiguration(u.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&M()})),this._register(h.onDidColorThemeChange(M))}dispose(){for(const s of Object.values(this._watchers))s.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=c,e.DocumentSemanticTokensFeature=c=Ee([he(0,t.ISemanticTokensStylingService),he(1,y.IModelService),he(2,S.IThemeService),he(3,E.IConfigurationService),he(4,o.ILanguageFeatureDebounceService),he(5,n.ILanguageFeaturesService)],c);let d=f=class extends L.Disposable{constructor(s,g,h,m,C){super(),this._semanticTokensStylingService=g,this._isDisposed=!1,this._model=s,this._provider=C.documentSemanticTokensProvider,this._debounceInformation=m.for(this._provider,"DocumentSemanticTokens",{min:f.REQUEST_MIN_DELAY,max:f.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new _.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),f.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.onDidChangeAttached(()=>{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 w=()=>{(0,L.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const D of this._provider.all(s))typeof D.onDidChange=="function"&&this._documentProvidersChangeListeners.push(D.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};w(),this._register(this._provider.onDidChange(()=>{w(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(h.onDidColorThemeChange(D=>{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),(0,L.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,b.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const s=new p.CancellationTokenSource,g=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,h=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,m=(0,b.getDocumentSemanticTokens)(this._provider,this._model,g,h,s.token);this._currentDocumentRequestCancellationTokenSource=s,this._providersChangedDuringRequest=!1;const C=[],w=this._model.onDidChangeContent(I=>{C.push(I)}),D=new i.StopWatch(!1);m.then(I=>{if(this._debounceInformation.update(this._model,D.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,w.dispose(),!I)this._setDocumentSemanticTokens(null,null,null,C);else{const{provider:M,tokens:A}=I,O=this._semanticTokensStylingService.getStyling(M);this._setDocumentSemanticTokens(M,A||null,O,C)}},I=>{I&&(k.isCancellationError(I)||typeof I.message=="string"&&I.message.indexOf("busy")!==-1)||k.onUnexpectedError(I),this._currentDocumentRequestCancellationTokenSource=null,w.dispose(),(C.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(s,g,h,m,C){C=Math.min(C,h.length-m,s.length-g);for(let w=0;w{(m.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){s&&g&&s.releaseDocumentSemanticTokens(g.resultId);return}if(!s||!h){this._model.tokenization.setSemanticTokens(null,!1);return}if(!g){this._model.tokenization.setSemanticTokens(null,!0),w();return}if((0,b.isSemanticTokensEdits)(g)){if(!C){this._model.tokenization.setSemanticTokens(null,!0);return}if(g.edits.length===0)g={resultId:g.resultId,data:C.data};else{let D=0;for(const T of g.edits)D+=(T.data?T.data.length:0)-T.deleteCount;const I=C.data,M=new Uint32Array(I.length+D);let A=I.length,O=M.length;for(let T=g.edits.length-1;T>=0;T--){const N=g.edits[T];if(N.start>I.length){h.warnInvalidEditStart(C.resultId,g.resultId,T,N.start,I.length),this._model.tokenization.setSemanticTokens(null,!0);return}const P=A-(N.start+N.deleteCount);P>0&&(f._copy(I,A-P,M,O-P,P),O-=P),N.data&&(f._copy(N.data,0,M,O-N.data.length,N.data.length),O-=N.data.length),A=N.start}A>0&&f._copy(I,0,M,0,A),g={resultId:g.resultId,data:M}}}if((0,b.isSemanticTokens)(g)){this._currentDocumentResponse=new r(s,g.resultId,g.data);const D=(0,v.toMultilineTokens2)(g,h,this._model.getLanguageId());if(m.length>0)for(const I of m)for(const M of D)for(const A of I.changes)M.applyEdit(A.range,A.text);this._model.tokenization.setSemanticTokens(D,!0)}else this._model.tokenization.setSemanticTokens(null,!0);w()}};d.REQUEST_MIN_DELAY=300,d.REQUEST_MAX_DELAY=2e3,d=f=Ee([he(1,t.ISemanticTokensStylingService),he(2,S.IThemeService),he(3,o.ILanguageFeatureDebounceService),he(4,n.ILanguageFeaturesService)],d);class r{constructor(s,g,h){this.provider=s,this.resultId=g,this.data=h}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,a.registerEditorFeature)(c)}),define(ie[868],ne([1,0,14,2,16,341,305,254,28,23,78,61,18,238]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let t=class extends k.Disposable{constructor(u,f,c,d,r,l){super(),this._semanticTokensStylingService=f,this._themeService=c,this._configurationService=d,this._editor=u,this._provider=l.documentRangeSemanticTokensProvider,this._debounceInformation=r.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new L.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const s=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{s()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),s()})),this._register(this._editor.onDidChangeModelContent(g=>{this._cancelAll(),s()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),s()})),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(_.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),s())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),s()})),s()}_cancelAll(){for(const u of this._outstandingRequests)u.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(u){for(let f=0,c=this._outstandingRequests.length;fthis._requestRange(u,c)))}_requestRange(u,f){const c=u.getVersionId(),d=(0,L.createCancelablePromise)(l=>Promise.resolve((0,E.getDocumentRangeSemanticTokens)(this._provider,u,f,l))),r=new o.StopWatch(!1);return d.then(l=>{if(this._debounceInformation.update(u,r.elapsed()),!l||!l.tokens||u.isDisposed()||u.getVersionId()!==c)return;const{provider:s,tokens:g}=l,h=this._semanticTokensStylingService.getStyling(s);u.tokenization.setPartialSemanticTokens(f,(0,p.toMultilineTokens2)(g,h,u.getLanguageId()))}).then(()=>this._removeOutstandingRequest(d),()=>this._removeOutstandingRequest(d)),d}};e.ViewportSemanticTokensContribution=t,t.ID="editor.contrib.viewportSemanticTokens",e.ViewportSemanticTokensContribution=t=Ee([he(1,n.ISemanticTokensStylingService),he(2,v.IThemeService),he(3,S.IConfigurationService),he(4,b.ILanguageFeatureDebounceService),he(5,i.ILanguageFeaturesService)],t),(0,y.registerEditorContribution)(t.ID,t,1)}),define(ie[869],ne([1,0,7,230,26,27,6,71,2,22,31,785,52,42,713,338,81,23,352]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function r(m){return`suggest-aria-id:${m}`}e.getAriaId=r;const l=(0,u.registerIcon)("suggest-more-info",y.Codicon.chevronRight,t.localize(0,null)),s=new(d=class{extract(C,w){if(C.textLabel.match(d._regexStrict))return w[0]=C.textLabel,!0;if(C.completion.detail&&C.completion.detail.match(d._regexStrict))return w[0]=C.completion.detail,!0;if(typeof C.completion.documentation=="string"){const D=d._regexRelaxed.exec(C.completion.documentation);if(D&&(D.index===0||D.index+D[0].length===C.completion.documentation.length))return w[0]=D[0],!0}return!1}},d._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*\))/,d._regexStrict=new RegExp(`^${d._regexRelaxed.source}$`,"i"),d);let g=class{constructor(C,w,D,I){this._editor=C,this._modelService=w,this._languageService=D,this._themeService=I,this._onDidToggleDetails=new _.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(C){const w=new S.DisposableStore,D=C;D.classList.add("show-file-icons");const I=(0,L.append)(C,(0,L.$)(".icon")),M=(0,L.append)(I,(0,L.$)("span.colorspan")),A=(0,L.append)(C,(0,L.$)(".contents")),O=(0,L.append)(A,(0,L.$)(".main")),T=(0,L.append)(O,(0,L.$)(".icon-label.codicon")),N=(0,L.append)(O,(0,L.$)("span.left")),P=(0,L.append)(O,(0,L.$)("span.right")),x=new k.IconLabel(N,{supportHighlights:!0,supportIcons:!0});w.add(x);const R=(0,L.append)(N,(0,L.$)("span.signature-label")),B=(0,L.append)(N,(0,L.$)("span.qualifier-label")),W=(0,L.append)(P,(0,L.$)("span.details-label")),V=(0,L.append)(P,(0,L.$)("span.readMore"+E.ThemeIcon.asCSSSelector(l)));V.title=t.localize(1,null);const U=()=>{const F=this._editor.getOptions(),j=F.get(50),J=j.getMassagedFontFamily(),le=j.fontFeatureSettings,ee=F.get(118)||j.fontSize,$=F.get(119)||j.lineHeight,te=j.fontWeight,G=j.letterSpacing,de=`${ee}px`,ue=`${$}px`,X=`${G}px`;D.style.fontSize=de,D.style.fontWeight=te,D.style.letterSpacing=X,O.style.fontFamily=J,O.style.fontFeatureSettings=le,O.style.lineHeight=ue,I.style.height=ue,I.style.width=ue,V.style.height=ue,V.style.width=ue};return U(),w.add(this._editor.onDidChangeConfiguration(F=>{(F.hasChanged(50)||F.hasChanged(118)||F.hasChanged(119))&&U()})),{root:D,left:N,right:P,icon:I,colorspan:M,iconLabel:x,iconContainer:T,parametersLabel:R,qualifierLabel:B,detailsLabel:W,readMore:V,disposables:w}}renderElement(C,w,D){const{completion:I}=C;D.root.id=r(w),D.colorspan.style.backgroundColor="";const M={labelEscapeNewLines:!0,matches:(0,p.createMatches)(C.score)},A=[];if(I.kind===19&&s.extract(C,A))D.icon.className="icon customcolor",D.iconContainer.className="icon hide",D.colorspan.style.backgroundColor=A[0];else if(I.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){D.icon.className="icon hide",D.iconContainer.className="icon hide";const O=(0,o.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:C.textLabel}),a.FileKind.FILE),T=(0,o.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:I.detail}),a.FileKind.FILE);M.extraClasses=O.length>T.length?O:T}else I.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(D.icon.className="icon hide",D.iconContainer.className="icon hide",M.extraClasses=[(0,o.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:C.textLabel}),a.FileKind.FOLDER),(0,o.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:I.detail}),a.FileKind.FOLDER)].flat()):(D.icon.className="icon hide",D.iconContainer.className="",D.iconContainer.classList.add("suggest-icon",...E.ThemeIcon.asClassNameArray(b.CompletionItemKinds.toIcon(I.kind))));I.tags&&I.tags.indexOf(1)>=0&&(M.extraClasses=(M.extraClasses||[]).concat(["deprecated"]),M.matches=[]),D.iconLabel.setLabel(C.textLabel,void 0,M),typeof I.label=="string"?(D.parametersLabel.textContent="",D.detailsLabel.textContent=h(I.detail||""),D.root.classList.add("string-label")):(D.parametersLabel.textContent=h(I.label.detail||""),D.detailsLabel.textContent=h(I.label.description||""),D.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?(0,L.show)(D.detailsLabel):(0,L.hide)(D.detailsLabel),(0,c.canExpandCompletionItem)(C)?(D.right.classList.add("can-expand-details"),(0,L.show)(D.readMore),D.readMore.onmousedown=O=>{O.stopPropagation(),O.preventDefault()},D.readMore.onclick=O=>{O.stopPropagation(),O.preventDefault(),this._onDidToggleDetails.fire()}):(D.right.classList.remove("can-expand-details"),(0,L.hide)(D.readMore),D.readMore.onmousedown=null,D.readMore.onclick=null)}disposeTemplate(C){C.disposables.dispose()}};e.ItemRenderer=g,e.ItemRenderer=g=Ee([he(1,i.IModelService),he(2,n.ILanguageService),he(3,f.IThemeService)],g);function h(m){return m.replace(/\r\n|\r|\n/g,"")}}),define(ie[870],ne([1,0,863,37,137,33,95,6,16,21,70]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let o=class extends L.AbstractGotoLineQuickAccessProvider{constructor(t){super(),this.editorService=t,this.onDidActiveTextEditorControlChange=p.Event.None}get activeTextEditorControl(){var t;return(t=this.editorService.getFocusedCodeEditor())!==null&&t!==void 0?t:void 0}};e.StandaloneGotoLineQuickAccessProvider=o,e.StandaloneGotoLineQuickAccessProvider=o=Ee([he(0,E.ICodeEditorService)],o);class i extends S.EditorAction{constructor(){super({id:i.ID,label:_.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(t){t.get(b.IQuickInputService).quickAccess.show(o.PREFIX)}}e.GotoLineAction=i,i.ID="editor.action.gotoLine",(0,S.registerEditorAction)(i),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:o,prefix:o.PREFIX,helpEntries:[{description:_.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(ie[871],ne([1,0,864,37,137,33,95,6,16,21,70,189,18,175,252]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let n=class extends L.AbstractGotoSymbolQuickAccessProvider{constructor(u,f,c){super(f,c),this.editorService=u,this.onDidActiveTextEditorControlChange=p.Event.None}get activeTextEditorControl(){var u;return(u=this.editorService.getFocusedCodeEditor())!==null&&u!==void 0?u:void 0}};e.StandaloneGotoSymbolQuickAccessProvider=n,e.StandaloneGotoSymbolQuickAccessProvider=n=Ee([he(0,E.ICodeEditorService),he(1,i.ILanguageFeaturesService),he(2,o.IOutlineModelService)],n);class t extends S.EditorAction{constructor(){super({id:t.ID,label:_.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:v.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(u){u.get(b.IQuickInputService).quickAccess.show(L.AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:b.ItemActivation.NONE})}}e.GotoSymbolAction=t,t.ID="editor.action.quickOutline",(0,S.registerEditorAction)(t),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:_.QuickOutlineNLS.quickOutlineActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:t.ID},{description:_.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(ie[367],ne([1,0,7,44,849,33,15,46,23]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let v=class extends y.AbstractCodeEditorService{constructor(o,i){super(i),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=o.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,t,a)=>t?this.doOpenEditor(t,n):null))}_checkContextKey(){let o=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){o=!0;break}this._editorIsOpen.set(o)}setActiveCodeEditor(o){this._activeCodeEditor=o}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(o,i){if(!this.findModel(o,i.resource)){if(i.resource){const a=i.resource.scheme;if(a===k.Schemas.http||a===k.Schemas.https)return(0,L.windowOpenNoOpener)(i.resource.toString()),o}return null}const t=i.options?i.options.selection:null;if(t)if(typeof t.endLineNumber=="number"&&typeof t.endColumn=="number")o.setSelection(t),o.revealRangeInCenter(t,1);else{const a={lineNumber:t.startLineNumber,column:t.startColumn};o.setPosition(a),o.revealPositionInCenter(a,1)}return o}findModel(o,i){const n=o.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};e.StandaloneCodeEditorService=v,e.StandaloneCodeEditorService=v=Ee([he(0,_.IContextKeyService),he(1,S.IThemeService)],v),(0,p.registerSingleton)(E.ICodeEditorService,v,0)}),define(ie[872],ne([1,0,82,30]),function(Q,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_light=e.hc_black=e.vs_dark=e.vs=void 0,e.vs={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[k.editorBackground]:"#FFFFFE",[k.editorForeground]:"#000000",[k.editorInactiveSelection]:"#E5EBF1",[L.editorIndentGuide1]:"#D3D3D3",[L.editorActiveIndentGuide1]:"#939393",[k.editorSelectionHighlight]:"#ADD6FF4D"}},e.vs_dark={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[k.editorBackground]:"#1E1E1E",[k.editorForeground]:"#D4D4D4",[k.editorInactiveSelection]:"#3A3D41",[L.editorIndentGuide1]:"#404040",[L.editorActiveIndentGuide1]:"#707070",[k.editorSelectionHighlight]:"#ADD6FF26"}},e.hc_black={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[k.editorBackground]:"#000000",[k.editorForeground]:"#FFFFFF",[L.editorIndentGuide1]:"#FFFFFF",[L.editorActiveIndentGuide1]:"#FFFFFF"}},e.hc_light={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[k.editorBackground]:"#FFFFFF",[k.editorForeground]:"#292929",[L.editorIndentGuide1]:"#292929",[L.editorActiveIndentGuide1]:"#292929"}}}),define(ie[368],ne([1,0,7,54,38,6,31,128,514,872,37,30,23,2,88,843,48]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeService=e.HC_LIGHT_THEME_NAME=e.HC_BLACK_THEME_NAME=e.VS_DARK_THEME_NAME=e.VS_LIGHT_THEME_NAME=void 0,e.VS_LIGHT_THEME_NAME="vs",e.VS_DARK_THEME_NAME="vs-dark",e.HC_BLACK_THEME_NAME="hc-black",e.HC_LIGHT_THEME_NAME="hc-light";const f=b.Registry.as(o.Extensions.ColorContribution),c=b.Registry.as(i.Extensions.ThemingContribution);class d{constructor(m,C){this.semanticHighlighting=!1,this.themeData=C;const w=C.base;m.length>0?(r(m)?this.id=m:this.id=w+" "+m,this.themeName=m):(this.id=w,this.themeName=w),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const m=new Map;for(const C in this.themeData.colors)m.set(C,y.Color.fromHex(this.themeData.colors[C]));if(this.themeData.inherit){const C=l(this.themeData.base);for(const w in C.colors)m.has(w)||m.set(w,y.Color.fromHex(C.colors[w]))}this.colors=m}return this.colors}getColor(m,C){const w=this.getColors().get(m);if(w)return w;if(C!==!1)return this.getDefault(m)}getDefault(m){let C=this.defaultColors[m];return C||(C=f.resolveDefaultColor(m,this),this.defaultColors[m]=C,C)}defines(m){return this.getColors().has(m)}get type(){switch(this.base){case e.VS_LIGHT_THEME_NAME:return t.ColorScheme.LIGHT;case e.HC_BLACK_THEME_NAME:return t.ColorScheme.HIGH_CONTRAST_DARK;case e.HC_LIGHT_THEME_NAME:return t.ColorScheme.HIGH_CONTRAST_LIGHT;default:return t.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let m=[],C=[];if(this.themeData.inherit){const I=l(this.themeData.base);m=I.rules,I.encodedTokensColors&&(C=I.encodedTokensColors)}const w=this.themeData.colors["editor.foreground"],D=this.themeData.colors["editor.background"];if(w||D){const I={token:""};w&&(I.foreground=w),D&&(I.background=D),m.push(I)}m=m.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(C=this.themeData.encodedTokensColors),this._tokenTheme=S.TokenTheme.createFromRawTokenTheme(m,C)}return this._tokenTheme}getTokenStyleMetadata(m,C,w){const I=this.tokenTheme._match([m].concat(C).join(".")).metadata,M=p.TokenMetadata.getForeground(I),A=p.TokenMetadata.getFontStyle(I);return{foreground:M,italic:!!(A&1),bold:!!(A&2),underline:!!(A&4),strikethrough:!!(A&8)}}}function r(h){return h===e.VS_LIGHT_THEME_NAME||h===e.VS_DARK_THEME_NAME||h===e.HC_BLACK_THEME_NAME||h===e.HC_LIGHT_THEME_NAME}function l(h){switch(h){case e.VS_LIGHT_THEME_NAME:return v.vs;case e.VS_DARK_THEME_NAME:return v.vs_dark;case e.HC_BLACK_THEME_NAME:return v.hc_black;case e.HC_LIGHT_THEME_NAME:return v.hc_light}}function s(h){const m=l(h);return new d(h,m)}class g extends n.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new E.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new E.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new a.UnthemedProductIconTheme,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(e.VS_LIGHT_THEME_NAME,s(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,s(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,s(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,s(e.HC_LIGHT_THEME_NAME));const m=this._register((0,a.getIconsStyleSheet)(this));this._codiconCSS=m.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} ${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(e.VS_LIGHT_THEME_NAME),this._onOSSchemeChanged(),this._register(m.onDidChange(()=>{this._codiconCSS=m.getCSS(),this._updateCSS()})),(0,k.addMatchMediaChangeListener)("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(m){return L.isInShadowDOM(m)?this._registerShadowDomContainer(m):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=L.createStyleSheet(void 0,m=>{m.className="monaco-colors",m.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),n.Disposable.None}_registerShadowDomContainer(m){const C=L.createStyleSheet(m,w=>{w.className="monaco-colors",w.textContent=this._allCSS});return this._styleElements.push(C),{dispose:()=>{for(let w=0;w{w.base===m&&w.notifyBaseUpdated()}),this._theme.themeName===m&&this.setTheme(m)}getColorTheme(){return this._theme}setColorMapOverride(m){this._colorMapOverride=m,this._updateThemeOrColorMap()}setTheme(m){let C;this._knownThemes.has(m)?C=this._knownThemes.get(m):C=this._knownThemes.get(e.VS_LIGHT_THEME_NAME),this._updateActualTheme(C)}_updateActualTheme(m){!m||this._theme===m||(this._theme=m,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const m=u.mainWindow.matchMedia("(forced-colors: active)").matches;if(m!==(0,t.isHighContrast)(this._theme.type)){let C;(0,t.isDark)(this._theme.type)?C=m?e.HC_BLACK_THEME_NAME:e.VS_DARK_THEME_NAME:C=m?e.HC_LIGHT_THEME_NAME:e.VS_LIGHT_THEME_NAME,this._updateActualTheme(this._knownThemes.get(C))}}}setAutoDetectHighContrast(m){this._autoDetectHighContrast=m,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const m=[],C={},w={addRule:M=>{C[M]||(m.push(M),C[M]=!0)}};c.getThemingParticipants().forEach(M=>M(this._theme,w,this._environment));const D=[];for(const M of f.getColors()){const A=this._theme.getColor(M.id,!0);A&&D.push(`${(0,o.asCssVariableName)(M.id)}: ${A.toString()};`)}w.addRule(`.monaco-editor, .monaco-diff-editor, .monaco-component { ${D.join(` `)} }`);const I=this._colorMapOverride||this._theme.tokenTheme.getColorMap();w.addRule((0,S.generateTokensCSSForColorMap)(I)),this._themeCSS=m.join(` `),this._updateCSS(),_.TokenizationRegistry.setColorMap(I),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} ${this._themeCSS}`,this._styleElements.forEach(m=>m.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}e.StandaloneThemeService=g}),define(ie[873],ne([1,0,16,134,95,88,368]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class p extends L.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:y.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(v,b){const o=v.get(k.IStandaloneThemeService),i=o.getColorTheme();(0,E.isHighContrast)(i.type)?(o.setTheme(this._originalThemeName||((0,E.isDark)(i.type)?_.VS_DARK_THEME_NAME:_.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(o.setTheme((0,E.isDark)(i.type)?_.HC_BLACK_THEME_NAME:_.HC_LIGHT_THEME_NAME),this._originalThemeName=i.themeName)}}(0,L.registerEditorAction)(p)}),define(ie[139],ne([1,0,7,50,132,322,41,218,2,17,726,29,749,15,59,8,34,47,91,23,27,88,20,30,105,69,482]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function C(N,P,x,R){const B=N.getActions(P),W=L.ModifierKeyEmitter.getInstance(),V=W.keyStatus.altKey||(v.isWindows||v.isLinux)&&W.keyStatus.shiftKey;D(B,x,V,R?U=>U===R:U=>U==="navigation")}e.createAndFillInContextMenuActions=C;function w(N,P,x,R,B,W){const V=N.getActions(P);D(V,x,!1,typeof R=="string"?F=>F===R:R,B,W)}e.createAndFillInActionBarActions=w;function D(N,P,x,R=V=>V==="navigation",B=()=>!1,W=!1){let V,U;Array.isArray(P)?(V=P,U=P):(V=P.primary,U=P.secondary);const F=new Set;for(const[j,J]of N){let le;R(j)?(le=V,le.length>0&&W&&le.push(new _.Separator)):(le=U,le.length>0&&le.push(new _.Separator));for(let ee of J){x&&(ee=ee instanceof o.MenuItemAction&&ee.alt?ee.alt:ee);const $=le.push(ee);ee instanceof _.SubmenuAction&&F.add({group:j,action:ee,index:$-1})}}for(const{group:j,action:J,index:le}of F){const ee=R(j)?V:U,$=J.actions;B(J,j,ee.length)&&ee.splice(le,1,...$)}}let I=class extends y.ActionViewItem{constructor(P,x,R,B,W,V,U,F){super(void 0,P,{icon:!!(P.class||P.item.icon),label:!P.class&&!P.item.icon,draggable:x?.draggable,keybinding:x?.keybinding,hoverDelegate:x?.hoverDelegate}),this._keybindingService=R,this._notificationService=B,this._contextKeyService=W,this._themeService=V,this._contextMenuService=U,this._accessibilityService=F,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new S.MutableDisposable),this._altKey=L.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(P){P.preventDefault(),P.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(x){this._notificationService.error(x)}}render(P){if(super.render(P),P.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let x=!1;const R=()=>{var B;const W=!!(!((B=this._menuItemAction.alt)===null||B===void 0)&&B.enabled)&&(!this._accessibilityService.isMotionReduced()||x)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&x);W!==this._wantsAltCommand&&(this._wantsAltCommand=W,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(R)),this._register((0,L.addDisposableListener)(P,"mouseleave",B=>{x=!1,R()})),this._register((0,L.addDisposableListener)(P,"mouseenter",B=>{x=!0,R()})),R()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var P;const x=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),R=x&&x.getLabel(),B=this._commandAction.tooltip||this._commandAction.label;let W=R?(0,b.localize)(0,null,B,R):B;if(!this._wantsAltCommand&&(!((P=this._menuItemAction.alt)===null||P===void 0)&&P.enabled)){const V=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,U=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),F=U&&U.getLabel(),j=F?(0,b.localize)(1,null,V,F):V;W=(0,b.localize)(2,null,W,p.UILabelProvider.modifierLabels[v.OS].altKey,j)}return W}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(P){this._itemClassDispose.value=void 0;const{element:x,label:R}=this;if(!x||!R)return;const B=this._commandAction.checked&&(0,i.isICommandActionToggleInfo)(P.toggled)&&P.toggled.icon?P.toggled.icon:P.icon;if(B)if(r.ThemeIcon.isThemeIcon(B)){const W=r.ThemeIcon.asClassNameArray(B);R.classList.add(...W),this._itemClassDispose.value=(0,S.toDisposable)(()=>{R.classList.remove(...W)})}else R.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(B.dark):(0,L.asCSSUrl)(B.light),R.classList.add("icon"),this._itemClassDispose.value=(0,S.combinedDisposable)((0,S.toDisposable)(()=>{R.style.backgroundImage="",R.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};e.MenuEntryActionViewItem=I,e.MenuEntryActionViewItem=I=Ee([he(2,u.IKeybindingService),he(3,f.INotificationService),he(4,n.IContextKeyService),he(5,d.IThemeService),he(6,t.IContextMenuService),he(7,m.IAccessibilityService)],I);let M=class extends E.DropdownMenuActionViewItem{constructor(P,x,R,B,W){var V,U,F;const j={...x,menuAsChild:(V=x?.menuAsChild)!==null&&V!==void 0?V:!1,classNames:(U=x?.classNames)!==null&&U!==void 0?U:r.ThemeIcon.isThemeIcon(P.item.icon)?r.ThemeIcon.asClassName(P.item.icon):void 0,keybindingProvider:(F=x?.keybindingProvider)!==null&&F!==void 0?F:J=>R.lookupKeybinding(J.id)};super(P,{getActions:()=>P.actions},B,j),this._keybindingService=R,this._contextMenuService=B,this._themeService=W}render(P){super.render(P),(0,s.assertType)(this.element),P.classList.add("menu-entry");const x=this._action,{icon:R}=x.item;if(R&&!r.ThemeIcon.isThemeIcon(R)){this.element.classList.add("icon");const B=()=>{this.element&&(this.element.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(R.dark):(0,L.asCSSUrl)(R.light))};B(),this._register(this._themeService.onDidColorThemeChange(()=>{B()}))}}};e.SubmenuEntryActionViewItem=M,e.SubmenuEntryActionViewItem=M=Ee([he(2,u.IKeybindingService),he(3,t.IContextMenuService),he(4,d.IThemeService)],M);let A=class extends y.BaseActionViewItem{constructor(P,x,R,B,W,V,U,F){var j,J,le;super(null,P),this._keybindingService=R,this._notificationService=B,this._contextMenuService=W,this._menuService=V,this._instaService=U,this._storageService=F,this._container=null,this._options=x,this._storageKey=`${P.item.submenu.id}_lastActionId`;let ee;const $=x?.persistLastActionId?F.get(this._storageKey,1):void 0;$&&(ee=P.actions.find(G=>$===G.id)),ee||(ee=P.actions[0]),this._defaultAction=this._instaService.createInstance(I,ee,{keybinding:this._getDefaultActionKeybindingLabel(ee)});const te={keybindingProvider:G=>this._keybindingService.lookupKeybinding(G.id),...x,menuAsChild:(j=x?.menuAsChild)!==null&&j!==void 0?j:!0,classNames:(J=x?.classNames)!==null&&J!==void 0?J:["codicon","codicon-chevron-down"],actionRunner:(le=x?.actionRunner)!==null&&le!==void 0?le:new _.ActionRunner};this._dropdown=new E.DropdownMenuActionViewItem(P,P.actions,this._contextMenuService,te),this._dropdown.actionRunner.onDidRun(G=>{G.action instanceof o.MenuItemAction&&this.update(G.action)})}update(P){var x;!((x=this._options)===null||x===void 0)&&x.persistLastActionId&&this._storageService.store(this._storageKey,P.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(I,P,{keybinding:this._getDefaultActionKeybindingLabel(P)}),this._defaultAction.actionRunner=new class extends _.ActionRunner{async runAction(R,B){await R.run(void 0)}},this._container&&this._defaultAction.render((0,L.prepend)(this._container,(0,L.$)(".action-container")))}_getDefaultActionKeybindingLabel(P){var x;let R;if(!((x=this._options)===null||x===void 0)&&x.renderKeybindingWithDefaultActionLabel){const B=this._keybindingService.lookupKeybinding(P.id);B&&(R=`(${B.getLabel()})`)}return R}setActionContext(P){super.setActionContext(P),this._defaultAction.setActionContext(P),this._dropdown.setActionContext(P)}render(P){this._container=P,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const x=(0,L.$)(".action-container");this._defaultAction.render((0,L.append)(this._container,x)),this._register((0,L.addDisposableListener)(x,L.EventType.KEY_DOWN,B=>{const W=new k.StandardKeyboardEvent(B);W.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),W.stopPropagation())}));const R=(0,L.$)(".dropdown-action-container");this._dropdown.render((0,L.append)(this._container,R)),this._register((0,L.addDisposableListener)(R,L.EventType.KEY_DOWN,B=>{var W;const V=new k.StandardKeyboardEvent(B);V.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(W=this._defaultAction.element)===null||W===void 0||W.focus(),V.stopPropagation())}))}focus(P){P?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(P){P?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};e.DropdownWithDefaultActionViewItem=A,e.DropdownWithDefaultActionViewItem=A=Ee([he(2,u.IKeybindingService),he(3,f.INotificationService),he(4,t.IContextMenuService),he(5,o.IMenuService),he(6,a.IInstantiationService),he(7,c.IStorageService)],A);let O=class extends y.SelectActionViewItem{constructor(P,x){super(null,P,P.actions.map(R=>({text:R.id===_.Separator.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":R.label,isDisabled:!R.enabled})),0,x,h.defaultSelectBoxStyles,{ariaLabel:P.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,P.actions.findIndex(R=>R.checked)))}render(P){super.render(P),P.style.borderColor=(0,g.asCssVariable)(g.selectBorder)}runAction(P,x){const R=this.action.actions[x];R&&this.actionRunner.run(R)}};O=Ee([he(1,t.IContextViewService)],O);function T(N,P,x){return P instanceof o.MenuItemAction?N.createInstance(I,P,x):P instanceof o.SubmenuItemAction?P.item.isSelection?N.createInstance(O,P):P.item.rememberDefaultAction?N.createInstance(A,P,{...x,persistLastActionId:!0}):N.createInstance(M,P,x):void 0}e.createActionViewItem=T}),define(ie[874],ne([1,0,7,77,2,714,139,29,15,8]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class b extends _.MenuEntryActionViewItem{updateLabel(){const n=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!n)return super.updateLabel();this.label&&(this.label.textContent=(0,E.localize)(0,null,this._action.label,b.symbolPrintEnter(n)))}static symbolPrintEnter(n){var t;return(t=n.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let o=class{constructor(n,t,a,u,f){this._menuId=t,this._menuService=u,this._contextKeyService=f,this._menuDisposables=new y.DisposableStore,this.element=L.append(n,L.$(".suggest-status-bar"));const c=d=>d instanceof p.MenuItemAction?a.createInstance(b,d,void 0):void 0;this._leftActions=new k.ActionBar(this.element,{actionViewItemProvider:c}),this._rightActions=new k.ActionBar(this.element,{actionViewItemProvider:c}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const n=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const a=[],u=[];for(const[f,c]of n.getActions())f==="left"?a.push(...c):u.push(...c);this._leftActions.clear(),this._leftActions.push(a),this._rightActions.clear(),this._rightActions.push(u)};this._menuDisposables.add(n.onDidChange(()=>t())),this._menuDisposables.add(n)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=o,e.SuggestWidgetStatus=o=Ee([he(2,v.IInstantiationService),he(3,p.IMenuService),he(4,S.IContextKeyService)],o)}),define(ie[369],ne([1,0,7,67,595,41,13,265,9,6,49,2,727,139,29,15,59,34,80]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuWorkbenchToolBar=e.WorkbenchToolBar=void 0;let d=class extends y.ToolBar{constructor(s,g,h,m,C,w,D){super(s,C,{getKeyBinding:M=>{var A;return(A=w.lookupKeybinding(M.id))!==null&&A!==void 0?A:void 0},...g,allowContextMenu:!0,skipTelemetry:typeof g?.telemetrySource=="string"}),this._options=g,this._menuService=h,this._contextKeyService=m,this._contextMenuService=C,this._sessionDisposables=this._store.add(new o.DisposableStore);const I=g?.telemetrySource;I&&this._store.add(this.actionBar.onDidRun(M=>D.publicLog2("workbenchActionExecuted",{id:M.action.id,from:I})))}setActions(s,g=[],h){var m,C,w;this._sessionDisposables.clear();const D=s.slice(),I=g.slice(),M=[];let A=0;const O=[];let T=!1;if(((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)!==-1)for(let N=0;NR?.id)),P=this._options.overflowBehavior.maxItems-N.size;let x=0;for(let R=0;R=P&&(D[R]=void 0,O[R]=B))}}(0,_.coalesceInPlace)(D),(0,_.coalesceInPlace)(O),super.setActions(D,E.Separator.join(O,I)),M.length>0&&this._sessionDisposables.add((0,L.addDisposableListener)(this.getElement(),"contextmenu",N=>{var P,x,R,B,W;const V=new k.StandardMouseEvent((0,L.getWindow)(this.getElement()),N),U=this.getItemAction(V.target);if(!U)return;V.preventDefault(),V.stopPropagation();let F=!1;if(A===1&&((P=this._options)===null||P===void 0?void 0:P.hiddenItemStrategy)===0){F=!0;for(let le=0;lethis._menuService.resetHiddenStates(h)}))),this._contextMenuService.showContextMenu({getAnchor:()=>V,getActions:()=>J,menuId:(R=this._options)===null||R===void 0?void 0:R.contextMenu,menuActionOptions:{renderShortTitle:!0,...(B=this._options)===null||B===void 0?void 0:B.menuOptions},skipTelemetry:typeof((W=this._options)===null||W===void 0?void 0:W.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};e.WorkbenchToolBar=d,e.WorkbenchToolBar=d=Ee([he(2,t.IMenuService),he(3,a.IContextKeyService),he(4,u.IContextMenuService),he(5,f.IKeybindingService),he(6,c.ITelemetryService)],d);let r=class extends d{constructor(s,g,h,m,C,w,D,I){super(s,{resetMenu:g,...h},m,C,w,D,I),this._onDidChangeMenuItems=this._store.add(new v.Emitter);const M=this._store.add(m.createMenu(g,C,{emitEventsForSubmenuChanges:!0})),A=()=>{var O,T,N;const P=[],x=[];(0,n.createAndFillInActionBarActions)(M,h?.menuOptions,{primary:P,secondary:x},(O=h?.toolbarOptions)===null||O===void 0?void 0:O.primaryGroup,(T=h?.toolbarOptions)===null||T===void 0?void 0:T.shouldInlineSubmenu,(N=h?.toolbarOptions)===null||N===void 0?void 0:N.useSeparatorsInPrimaryActions),s.classList.toggle("has-no-actions",P.length===0&&x.length===0),super.setActions(P,x)};this._store.add(M.onDidChange(()=>{A(),this._onDidChangeMenuItems.fire(this)})),A()}setActions(){throw new S.BugIndicatingError("This toolbar is populated from a menu.")}};e.MenuWorkbenchToolBar=r,e.MenuWorkbenchToolBar=r=Ee([he(3,t.IMenuService),he(4,a.IContextKeyService),he(5,u.IContextMenuService),he(6,f.IKeybindingService),he(7,c.ITelemetryService)],r)}),define(ie[255],ne([1,0,7,132,225,41,13,14,26,2,35,17,27,11,31,216,690,139,369,29,25,15,59,8,34,80,81,461]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=e.InlineCompletionsHintsWidget=void 0;let D=class extends v.Disposable{constructor(x,R,B){super(),this.editor=x,this.model=R,this.instantiationService=B,this.alwaysShowToolbar=(0,b.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=(0,b.derived)(this,W=>{var V,U,F;const j=(V=this.model.read(W))===null||V===void 0?void 0:V.ghostText.read(W);if(!this.alwaysShowToolbar.read(W)||!j||j.parts.length===0)return this.sessionPosition=void 0,null;const J=j.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==j.lineNumber&&(this.sessionPosition=void 0);const le=new n.Position(j.lineNumber,Math.min(J,(F=(U=this.sessionPosition)===null||U===void 0?void 0:U.column)!==null&&F!==void 0?F:Number.MAX_SAFE_INTEGER));return this.sessionPosition=le,le}),this._register((0,b.autorunWithStore)((W,V)=>{const U=this.model.read(W);if(!U||!this.alwaysShowToolbar.read(W))return;const F=V.add(this.instantiationService.createInstance(A,this.editor,!0,this.position,U.selectedInlineCompletionIndex,U.inlineCompletionsCount,U.selectedInlineCompletion.map(j=>{var J;return(J=j?.inlineCompletion.source.inlineCompletions.commands)!==null&&J!==void 0?J:[]})));x.addContentWidget(F),V.add((0,v.toDisposable)(()=>x.removeContentWidget(F))),V.add((0,b.autorun)(j=>{this.position.read(j)&&U.lastTriggerKind.read(j)!==t.InlineCompletionTriggerKind.Explicit&&U.triggerExplicitly()}))}))}};e.InlineCompletionsHintsWidget=D,e.InlineCompletionsHintsWidget=D=Ee([he(2,g.IInstantiationService)],D);const I=(0,C.registerIcon)("inline-suggestion-hints-next",S.Codicon.chevronRight,(0,u.localize)(0,null)),M=(0,C.registerIcon)("inline-suggestion-hints-previous",S.Codicon.chevronLeft,(0,u.localize)(1,null));let A=w=class extends v.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(x,R,B){const W=new E.Action(x,R,B,!0,()=>this._commandService.executeCommand(x)),V=this.keybindingService.lookupKeybinding(x,this._contextKeyService);let U=R;return V&&(U=(0,u.localize)(2,null,R,V.getLabel())),W.tooltip=U,W}constructor(x,R,B,W,V,U,F,j,J,le,ee){super(),this.editor=x,this.withBorder=R,this._position=B,this._currentSuggestionIdx=W,this._suggestionCount=V,this._extraCommands=U,this._commandService=F,this.keybindingService=J,this._contextKeyService=le,this._menuService=ee,this.id=`InlineSuggestionHintsContentWidget${w.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,L.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,L.h)("div@toolBar")]),this.previousAction=this.createCommandAction(a.showPreviousInlineSuggestionActionId,(0,u.localize)(3,null),i.ThemeIcon.asClassName(M)),this.availableSuggestionCountAction=new E.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(a.showNextInlineSuggestionActionId,(0,u.localize)(4,null),i.ThemeIcon.asClassName(I)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(d.MenuId.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new p.RunOnceScheduler(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new p.RunOnceScheduler(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(j.createInstance(N,this.nodes.toolBar,d.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:$=>$.startsWith("primary")},actionViewItemProvider:($,te)=>{if($ instanceof d.MenuItemAction)return j.createInstance(T,$,void 0);if($===this.availableSuggestionCountAction){const G=new O(void 0,$,{label:!0,icon:!1});return G.setClass("availableSuggestionCount"),G}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility($=>{w._dropDownVisible=$})),this._register((0,b.autorun)($=>{this._position.read($),this.editor.layoutContentWidget(this)})),this._register((0,b.autorun)($=>{const te=this._suggestionCount.read($),G=this._currentSuggestionIdx.read($);te!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${G+1}/${te}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),te!==void 0&&te>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,b.autorun)($=>{const te=this._extraCommands.read($);if((0,_.equals)(this.lastCommands,te))return;this.lastCommands=te;const G=te.map(de=>({class:void 0,id:de.id,enabled:!0,tooltip:de.tooltip||"",label:de.title,run:ue=>this._commandService.executeCommand(de.id)}));for(const[de,ue]of this.inlineCompletionsActionsMenus.getActions())for(const X of ue)X instanceof d.MenuItemAction&&G.push(X);G.length>0&&G.unshift(new E.Separator),this.toolBar.setAdditionalSecondaryActions(G)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};e.InlineSuggestionHintsContentWidget=A,A._dropDownVisible=!1,A.id=0,e.InlineSuggestionHintsContentWidget=A=w=Ee([he(6,r.ICommandService),he(7,g.IInstantiationService),he(8,h.IKeybindingService),he(9,l.IContextKeyService),he(10,d.IMenuService)],A);class O extends k.ActionViewItem{constructor(){super(...arguments),this._className=void 0}setClass(x){this._className=x}render(x){super.render(x),this._className&&x.classList.add(this._className)}}class T extends f.MenuEntryActionViewItem{updateLabel(){const x=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!x)return super.updateLabel();if(this.label){const R=(0,L.h)("div.keybinding").root;new y.KeybindingLabel(R,o.OS,{disableTitle:!0,...y.unthemedKeybindingLabelOptions}).set(x),this.label.textContent=this._action.label,this.label.appendChild(R),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let N=class extends c.WorkbenchToolBar{constructor(x,R,B,W,V,U,F,j){super(x,{resetMenu:R,...B},W,V,U,F,j),this.menuId=R,this.options2=B,this.menuService=W,this.contextKeyService=V,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var x,R,B,W,V,U,F;const j=[],J=[];(0,f.createAndFillInActionBarActions)(this.menu,(x=this.options2)===null||x===void 0?void 0:x.menuOptions,{primary:j,secondary:J},(B=(R=this.options2)===null||R===void 0?void 0:R.toolbarOptions)===null||B===void 0?void 0:B.primaryGroup,(V=(W=this.options2)===null||W===void 0?void 0:W.toolbarOptions)===null||V===void 0?void 0:V.shouldInlineSubmenu,(F=(U=this.options2)===null||U===void 0?void 0:U.toolbarOptions)===null||F===void 0?void 0:F.useSeparatorsInPrimaryActions),J.push(...this.additionalActions),j.unshift(...this.prependedPrimaryActions),this.setActions(j,J)}setPrependedPrimaryActions(x){(0,_.equals)(this.prependedPrimaryActions,x,(R,B)=>R===B)||(this.prependedPrimaryActions=x,this.updateToolbar())}setAdditionalSecondaryActions(x){(0,_.equals)(this.additionalActions,x,(R,B)=>R===B)||(this.additionalActions=x,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=N,e.CustomizedMenuWorkbenchToolBar=N=Ee([he(3,d.IMenuService),he(4,l.IContextKeyService),he(5,s.IContextMenuService),he(6,h.IKeybindingService),he(7,m.ITelemetryService)],N)}),define(ie[875],ne([1,0,7,41,6,2,139,29,15,34,47,80,837,59]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let t=class extends E.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new i.ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(f,c,d,r,l,s){super(),this.telemetryService=f,this.notificationService=c,this.contextViewService=d,this.keybindingService=r,this.menuService=l,this.contextKeyService=s,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new y.Emitter),this._onDidHideContextMenu=this._store.add(new y.Emitter)}configure(f){this.contextMenuHandler.configure(f)}showContextMenu(f){f=a.transform(f,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...f,onHide:c=>{var d;(d=f.onHide)===null||d===void 0||d.call(f,c),this._onDidHideContextMenu.fire()}}),L.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};e.ContextMenuService=t,e.ContextMenuService=t=Ee([he(0,o.ITelemetryService),he(1,b.INotificationService),he(2,n.IContextViewService),he(3,v.IKeybindingService),he(4,p.IMenuService),he(5,S.IContextKeyService)],t);var a;(function(u){function f(d){return d&&d.menuId instanceof p.MenuId}function c(d,r,l){if(!f(d))return d;const{menuId:s,menuActionOptions:g,contextKeyService:h}=d;return{...d,getActions:()=>{const m=[];if(s){const C=r.createMenu(s,h??l);(0,_.createAndFillInContextMenuActions)(C,g,m),C.dispose()}return d.getActions?k.Separator.join(d.getActions(),m):m}}}u.transform=c})(a||(e.ContextMenuMenuDelegate=a={}))}),define(ie[876],ne([1,0,19,6,15,8,135,192,57,796,105,30,23,848]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let t=class extends i.Themable{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(v.QuickAccessController))),this._quickAccess}constructor(u,f,c,d){super(c),this.instantiationService=u,this.contextKeyService=f,this.layoutService=d,this._onShow=this._register(new k.Emitter),this._onHide=this._register(new k.Emitter),this.contexts=new Map}createController(u=this.layoutService,f){const c={idPrefix:"quickInput_",container:u.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:r=>this.setContextKey(r),linkOpenerDelegate:r=>{this.instantiationService.invokeFunction(l=>{l.get(S.IOpenerService).open(r,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>u.focus(),createList:(r,l,s,g,h)=>this.instantiationService.createInstance(p.WorkbenchList,r,l,s,g,h),styles:this.computeStyles()},d=this._register(new n.QuickInputController({...c,...f},this.themeService,this.layoutService));return d.layout(u.activeContainerDimension,u.activeContainerOffset.quickPickTop),this._register(u.onDidLayoutActiveContainer(r=>d.layout(r,u.activeContainerOffset.quickPickTop))),this._register(u.onDidChangeActiveContainer(()=>{d.isVisible()||d.layout(u.activeContainerDimension,u.activeContainerOffset.quickPickTop)})),this._register(d.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(d.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),d}setContextKey(u){let f;u&&(f=this.contexts.get(u),f||(f=new y.RawContextKey(u,!1).bindTo(this.contextKeyService),this.contexts.set(u,f))),!(f&&f.get())&&(this.resetContextKeys(),f?.set(!0))}resetContextKeys(){this.contexts.forEach(u=>{u.get()&&u.reset()})}pick(u,f={},c=L.CancellationToken.None){return this.controller.pick(u,f,c)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,o.asCssVariable)(o.quickInputBackground),quickInputForeground:(0,o.asCssVariable)(o.quickInputForeground),quickInputTitleBackground:(0,o.asCssVariable)(o.quickInputTitleBackground),widgetBorder:(0,o.asCssVariable)(o.widgetBorder),widgetShadow:(0,o.asCssVariable)(o.widgetShadow)},inputBox:b.defaultInputBoxStyles,toggle:b.defaultToggleStyles,countBadge:b.defaultCountBadgeStyles,button:b.defaultButtonStyles,progressBar:b.defaultProgressBarStyles,keybindingLabel:b.defaultKeybindingLabelStyles,list:(0,b.getListStyles)({listBackground:o.quickInputBackground,listFocusBackground:o.quickInputListFocusBackground,listFocusForeground:o.quickInputListFocusForeground,listInactiveFocusForeground:o.quickInputListFocusForeground,listInactiveSelectionIconForeground:o.quickInputListFocusIconForeground,listInactiveFocusBackground:o.quickInputListFocusBackground,listFocusOutline:o.activeContrastBorder,listInactiveFocusOutline:o.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,o.asCssVariable)(o.pickerGroupBorder),pickerGroupForeground:(0,o.asCssVariable)(o.pickerGroupForeground)}}}};e.QuickInputService=t,e.QuickInputService=t=Ee([he(0,E.IInstantiationService),he(1,y.IContextKeyService),he(2,i.IThemeService),he(3,_.ILayoutService)],t)}),define(ie[877],ne([1,0,6,16,23,19,8,15,346,33,876,107,480]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let i=class extends b.QuickInputService{constructor(f,c,d,r,l){super(c,d,r,new S.EditorScopedLayoutService(f.getContainerDomNode(),l)),this.host=void 0;const s=t.get(f);if(s){const g=s.widget;this.host={_serviceBrand:void 0,get mainContainer(){return g.getDomNode()},getContainer(){return g.getDomNode()},get containers(){return[g.getDomNode()]},get activeContainer(){return g.getDomNode()},get mainContainerDimension(){return f.getLayoutInfo()},get activeContainerDimension(){return f.getLayoutInfo()},get onDidLayoutMainContainer(){return f.onDidLayoutChange},get onDidLayoutActiveContainer(){return f.onDidLayoutChange},get onDidLayoutContainer(){return L.Event.map(f.onDidLayoutChange,h=>({container:g.getDomNode(),dimension:h}))},get onDidChangeActiveContainer(){return L.Event.None},get onDidAddContainer(){return L.Event.None},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>f.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};i=Ee([he(1,_.IInstantiationService),he(2,p.IContextKeyService),he(3,y.IThemeService),he(4,v.ICodeEditorService)],i);let n=class{get activeService(){const f=this.codeEditorService.getFocusedCodeEditor();if(!f)throw new Error("Quick input service needs a focused editor to work.");let c=this.mapEditorToService.get(f);if(!c){const d=c=this.instantiationService.createInstance(i,f);this.mapEditorToService.set(f,c),(0,o.createSingleCallFunction)(f.onDidDispose)(()=>{d.dispose(),this.mapEditorToService.delete(f)})}return c}get quickAccess(){return this.activeService.quickAccess}constructor(f,c){this.instantiationService=f,this.codeEditorService=c,this.mapEditorToService=new Map}pick(f,c={},d=E.CancellationToken.None){return this.activeService.pick(f,c,d)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};e.StandaloneQuickInputService=n,e.StandaloneQuickInputService=n=Ee([he(0,_.IInstantiationService),he(1,v.ICodeEditorService)],n);class t{static get(f){return f.getContribution(t.ID)}constructor(f){this.editor=f,this.widget=new a(this.editor)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=t,t.ID="editor.controller.quickInput";class a{constructor(f){this.codeEditor=f,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return a.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=a,a.ID="editor.contrib.quickInputWidget",(0,k.registerEditorContribution)(t.ID,t,4)}),define(ie[193],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,L.createDecorator)("undoRedoService");class k{constructor(p,S){this.resource=p,this.elements=S}}e.ResourceEditStackSnapshot=k;class y{constructor(){this.id=y._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=y,y._ID=0,y.None=new y;class E{constructor(){this.id=E._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=E,E._ID=0,E.None=new E}),define(ie[39],ne([1,0,13,38,9,6,2,12,22,126,203,62,11,5,24,177,42,32,43,607,860,337,294,519,520,328,608,182,635,112,193]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedViews=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationGlyphMarginOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactory=void 0;function O(H){const z=new C.PieceTreeTextBufferBuilder;return z.acceptChunk(H),z.finish()}e.createTextBufferFactory=O;function T(H){const z=new C.PieceTreeTextBufferBuilder;let se;for(;typeof(se=H.read())=="string";)z.acceptChunk(se);return z.finish()}e.createTextBufferFactoryFromSnapshot=T;function N(H,z){let se;return typeof H=="string"?se=O(H):c.isITextSnapshot(H)?se=T(H):se=H,se.create(z)}e.createTextBuffer=N;let P=0;const x=999,R=1e4;class B{constructor(z){this._source=z,this._eos=!1}read(){if(this._eos)return null;const z=[];let se=0,q=0;do{const ae=this._source.read();if(ae===null)return this._eos=!0,se===0?null:z.join("");if(ae.length>0&&(z[se++]=ae,q+=ae.length),q>=64*1024)return z.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};let V=A=class extends _.Disposable{static resolveOptions(z,se){if(se.detectIndentation){const q=(0,g.guessIndentation)(z,se.tabSize,se.insertSpaces);return new c.TextModelResolvedOptions({tabSize:q.tabSize,indentSize:"tabSize",insertSpaces:q.insertSpaces,trimAutoWhitespace:se.trimAutoWhitespace,defaultEOL:se.defaultEOL,bracketPairColorizationOptions:se.bracketPairColorizationOptions})}return new c.TextModelResolvedOptions(se)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(z){return this._eventEmitter.slowEvent(se=>z(se.contentChangedEvent))}onDidChangeContentOrInjectedText(z){return(0,_.combinedDisposable)(this._eventEmitter.fastEvent(se=>z(se)),this._onDidChangeInjectedText.event(se=>z(se)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(z,se,q,ae=null,ce,ge,pe){super(),this._undoRedoService=ce,this._languageService=ge,this._languageConfigurationService=pe,this._onWillDispose=this._register(new E.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new re(Te=>this.handleBeforeFireDecorationsChangedEvent(Te))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new E.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new E.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new E.Emitter),this._eventEmitter=this._register(new oe),this._languageSelectionListener=this._register(new _.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new Y,P++,this.id="$model"+P,this.isForSimpleWidget=q.isForSimpleWidget,typeof ae>"u"||ae===null?this._associatedResource=S.URI.parse("inmemory://model/"+P):this._associatedResource=ae,this._attachedEditorCount=0;const{textBuffer:me,disposable:ve}=N(z,q.defaultEOL);this._buffer=me,this._bufferDisposable=ve,this._options=A.resolveOptions(this._buffer,q);const Ce=typeof se=="string"?se:se.languageId;typeof se!="string"&&(this._languageSelectionListener.value=se.onDidChange(()=>this._setLanguage(se.languageId))),this._bracketPairs=this._register(new d.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new s.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new r.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new D.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,Ce,this._attachedViews);const Se=this._buffer.getLineCount(),_e=this._buffer.getValueLengthInRange(new n.Range(1,1,Se,this._buffer.getLineLength(Se)+1),0);q.largeFileOptimizations?(this._isTooLargeForTokenization=_e>A.LARGE_FILE_SIZE_THRESHOLD||Se>A.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=_e>A.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=_e>A._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=p.singleLetterHash(P),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new J,this._commandManager=new l.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()})),this._languageService.requestRichLanguageFeatures(Ce)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const z=new m.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);z.dispose(),this._buffer=z,this._bufferDisposable=_.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(z,se){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(se),this._bracketPairs.handleDidChangeContent(se),this._eventEmitter.fire(new I.InternalModelContentChangeEvent(z,se)))}setValue(z){if(this._assertNotDisposed(),z==null)throw(0,y.illegalArgument)();const{textBuffer:se,disposable:q}=N(z,this._options.defaultEOL);this._setValueFromTextBuffer(se,q)}_createContentChanged2(z,se,q,ae,ce,ge,pe,me){return{changes:[{range:z,rangeOffset:se,rangeLength:q,text:ae}],eol:this._buffer.getEOL(),isEolChange:me,versionId:this.getVersionId(),isUndoing:ce,isRedoing:ge,isFlush:pe}}_setValueFromTextBuffer(z,se){this._assertNotDisposed();const q=this.getFullModelRange(),ae=this.getValueLengthInRange(q),ce=this.getLineCount(),ge=this.getLineMaxColumn(ce);this._buffer=z,this._bufferDisposable.dispose(),this._bufferDisposable=se,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new J,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new I.ModelRawContentChangedEvent([new I.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,ce,ge),0,ae,this.getValue(),!1,!1,!0,!1))}setEOL(z){this._assertNotDisposed();const se=z===1?`\r `:` `;if(this._buffer.getEOL()===se)return;const q=this.getFullModelRange(),ae=this.getValueLengthInRange(q),ce=this.getLineCount(),ge=this.getLineMaxColumn(ce);this._onBeforeEOLChange(),this._buffer.setEOL(se),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new I.ModelRawContentChangedEvent([new I.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,ce,ge),0,ae,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const z=this.getVersionId(),se=this._decorationsTree.collectNodesPostOrder();for(let q=0,ae=se.length;q0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let z=0,se=0;const q=this._buffer.getLineCount();for(let ae=1;ae<=q;ae++){const ce=this._buffer.getLineLength(ae);ce>=R?se+=ce:z+=ce}return se>z}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(z){this._assertNotDisposed();const se=typeof z.tabSize<"u"?z.tabSize:this._options.tabSize,q=typeof z.indentSize<"u"?z.indentSize:this._options.originalIndentSize,ae=typeof z.insertSpaces<"u"?z.insertSpaces:this._options.insertSpaces,ce=typeof z.trimAutoWhitespace<"u"?z.trimAutoWhitespace:this._options.trimAutoWhitespace,ge=typeof z.bracketColorizationOptions<"u"?z.bracketColorizationOptions:this._options.bracketPairColorizationOptions,pe=new c.TextModelResolvedOptions({tabSize:se,indentSize:q,insertSpaces:ae,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:ce,bracketPairColorizationOptions:ge});if(this._options.equals(pe))return;const me=this._options.createChangeEvent(pe);this._options=pe,this._bracketPairs.handleDidChangeOptions(me),this._decorationProvider.handleDidChangeOptions(me),this._onDidChangeOptions.fire(me)}detectIndentation(z,se){this._assertNotDisposed();const q=(0,g.guessIndentation)(this._buffer,se,z);this.updateOptions({insertSpaces:q.insertSpaces,tabSize:q.tabSize,indentSize:q.tabSize})}normalizeIndentation(z){return this._assertNotDisposed(),(0,b.normalizeIndentation)(z,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(z=null){const se=this.findMatches(p.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(z,se.map(q=>({range:q.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(z){this._assertNotDisposed();const se=this._validatePosition(z.lineNumber,z.column,0);return this._buffer.getOffsetAt(se.lineNumber,se.column)}getPositionAt(z){this._assertNotDisposed();const se=Math.min(this._buffer.getLength(),Math.max(0,z));return this._buffer.getPositionAt(se)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(z){this._versionId=z}_overwriteAlternativeVersionId(z){this._alternativeVersionId=z}_overwriteInitialUndoRedoSnapshot(z){this._initialUndoRedoSnapshot=z}getValue(z,se=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new y.BugIndicatingError("Operation would exceed heap memory limits");const q=this.getFullModelRange(),ae=this.getValueInRange(q,z);return se?this._buffer.getBOM()+ae:ae}createSnapshot(z=!1){return new B(this._buffer.createSnapshot(z))}getValueLength(z,se=!1){this._assertNotDisposed();const q=this.getFullModelRange(),ae=this.getValueLengthInRange(q,z);return se?this._buffer.getBOM().length+ae:ae}getValueInRange(z,se=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(z),se)}getValueLengthInRange(z,se=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(z),se)}getCharacterCountInRange(z,se=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(z),se)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(z)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new y.BugIndicatingError("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(z){return this._assertNotDisposed(),1}getLineMaxColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const se=this._buffer.getLineCount(),q=z.startLineNumber,ae=z.startColumn;let ce=Math.floor(typeof q=="number"&&!isNaN(q)?q:1),ge=Math.floor(typeof ae=="number"&&!isNaN(ae)?ae:1);if(ce<1)ce=1,ge=1;else if(ce>se)ce=se,ge=this.getLineMaxColumn(ce);else if(ge<=1)ge=1;else{const Se=this.getLineMaxColumn(ce);ge>=Se&&(ge=Se)}const pe=z.endLineNumber,me=z.endColumn;let ve=Math.floor(typeof pe=="number"&&!isNaN(pe)?pe:1),Ce=Math.floor(typeof me=="number"&&!isNaN(me)?me:1);if(ve<1)ve=1,Ce=1;else if(ve>se)ve=se,Ce=this.getLineMaxColumn(ve);else if(Ce<=1)Ce=1;else{const Se=this.getLineMaxColumn(ve);Ce>=Se&&(Ce=Se)}return q===ce&&ae===ge&&pe===ve&&me===Ce&&z instanceof n.Range&&!(z instanceof t.Selection)?z:new n.Range(ce,ge,ve,Ce)}_isValidPosition(z,se,q){if(typeof z!="number"||typeof se!="number"||isNaN(z)||isNaN(se)||z<1||se<1||(z|0)!==z||(se|0)!==se)return!1;const ae=this._buffer.getLineCount();if(z>ae)return!1;if(se===1)return!0;const ce=this.getLineMaxColumn(z);if(se>ce)return!1;if(q===1){const ge=this._buffer.getLineCharCode(z,se-2);if(p.isHighSurrogate(ge))return!1}return!0}_validatePosition(z,se,q){const ae=Math.floor(typeof z=="number"&&!isNaN(z)?z:1),ce=Math.floor(typeof se=="number"&&!isNaN(se)?se:1),ge=this._buffer.getLineCount();if(ae<1)return new i.Position(1,1);if(ae>ge)return new i.Position(ge,this.getLineMaxColumn(ge));if(ce<=1)return new i.Position(ae,1);const pe=this.getLineMaxColumn(ae);if(ce>=pe)return new i.Position(ae,pe);if(q===1){const me=this._buffer.getLineCharCode(ae,ce-2);if(p.isHighSurrogate(me))return new i.Position(ae,ce-1)}return new i.Position(ae,ce)}validatePosition(z){return this._assertNotDisposed(),z instanceof i.Position&&this._isValidPosition(z.lineNumber,z.column,1)?z:this._validatePosition(z.lineNumber,z.column,1)}_isValidRange(z,se){const q=z.startLineNumber,ae=z.startColumn,ce=z.endLineNumber,ge=z.endColumn;if(!this._isValidPosition(q,ae,0)||!this._isValidPosition(ce,ge,0))return!1;if(se===1){const pe=ae>1?this._buffer.getLineCharCode(q,ae-2):0,me=ge>1&&ge<=this._buffer.getLineLength(ce)?this._buffer.getLineCharCode(ce,ge-2):0,ve=p.isHighSurrogate(pe),Ce=p.isHighSurrogate(me);return!ve&&!Ce}return!0}validateRange(z){if(this._assertNotDisposed(),z instanceof n.Range&&!(z instanceof t.Selection)&&this._isValidRange(z,1))return z;const q=this._validatePosition(z.startLineNumber,z.startColumn,0),ae=this._validatePosition(z.endLineNumber,z.endColumn,0),ce=q.lineNumber,ge=q.column,pe=ae.lineNumber,me=ae.column;{const ve=ge>1?this._buffer.getLineCharCode(ce,ge-2):0,Ce=me>1&&me<=this._buffer.getLineLength(pe)?this._buffer.getLineCharCode(pe,me-2):0,Se=p.isHighSurrogate(ve),_e=p.isHighSurrogate(Ce);return!Se&&!_e?new n.Range(ce,ge,pe,me):ce===pe&&ge===me?new n.Range(ce,ge-1,pe,me-1):Se&&_e?new n.Range(ce,ge-1,pe,me+1):Se?new n.Range(ce,ge-1,pe,me):new n.Range(ce,ge,pe,me+1)}return new n.Range(ce,ge,pe,me)}modifyPosition(z,se){this._assertNotDisposed();const q=this.getOffsetAt(z)+se;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,q)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new n.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,se,q,ae){return this._buffer.findMatchesLineByLine(z,se,q,ae)}findMatches(z,se,q,ae,ce,ge,pe=x){this._assertNotDisposed();let me=null;se!==null&&(Array.isArray(se)||(se=[se]),se.every(Se=>n.Range.isIRange(Se))&&(me=se.map(Se=>this.validateRange(Se)))),me===null&&(me=[this.getFullModelRange()]),me=me.sort((Se,_e)=>Se.startLineNumber-_e.startLineNumber||Se.startColumn-_e.startColumn);const ve=[];ve.push(me.reduce((Se,_e)=>n.Range.areIntersecting(Se,_e)?Se.plusRange(_e):(ve.push(Se),_e)));let Ce;if(!q&&z.indexOf(` `)<0){const _e=new w.SearchParams(z,q,ae,ce).parseSearchRequest();if(!_e)return[];Ce=Te=>this.findMatchesLineByLine(Te,_e,ge,pe)}else Ce=Se=>w.TextModelSearch.findMatches(this,new w.SearchParams(z,q,ae,ce),Se,ge,pe);return ve.map(Ce).reduce((Se,_e)=>Se.concat(_e),[])}findNextMatch(z,se,q,ae,ce,ge){this._assertNotDisposed();const pe=this.validatePosition(se);if(!q&&z.indexOf(` `)<0){const ve=new w.SearchParams(z,q,ae,ce).parseSearchRequest();if(!ve)return null;const Ce=this.getLineCount();let Se=new n.Range(pe.lineNumber,pe.column,Ce,this.getLineMaxColumn(Ce)),_e=this.findMatchesLineByLine(Se,ve,ge,1);return w.TextModelSearch.findNextMatch(this,new w.SearchParams(z,q,ae,ce),pe,ge),_e.length>0||(Se=new n.Range(1,1,pe.lineNumber,this.getLineMaxColumn(pe.lineNumber)),_e=this.findMatchesLineByLine(Se,ve,ge,1),_e.length>0)?_e[0]:null}return w.TextModelSearch.findNextMatch(this,new w.SearchParams(z,q,ae,ce),pe,ge)}findPreviousMatch(z,se,q,ae,ce,ge){this._assertNotDisposed();const pe=this.validatePosition(se);return w.TextModelSearch.findPreviousMatch(this,new w.SearchParams(z,q,ae,ce),pe,ge)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(z){if((this.getEOL()===` `?0:1)!==z)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(z){return z instanceof c.ValidAnnotatedEditOperation?z:new c.ValidAnnotatedEditOperation(z.identifier||null,this.validateRange(z.range),z.text,z.forceMoveMarkers||!1,z.isAutoWhitespaceEdit||!1,z._isTracked||!1)}_validateEditOperations(z){const se=[];for(let q=0,ae=z.length;q({range:this.validateRange(pe.range),text:pe.text}));let ge=!0;if(z)for(let pe=0,me=z.length;peve.endLineNumber,Pe=ve.startLineNumber>Te.endLineNumber;if(!Me&&!Pe){Ce=!0;break}}if(!Ce){ge=!1;break}}if(ge)for(let pe=0,me=this._trimAutoWhitespaceLines.length;peMe.endLineNumber)&&!(ve===Me.startLineNumber&&Me.startColumn===Ce&&Me.isEmpty()&&Pe&&Pe.length>0&&Pe.charAt(0)===` `)&&!(ve===Me.startLineNumber&&Me.startColumn===1&&Me.isEmpty()&&Pe&&Pe.length>0&&Pe.charAt(Pe.length-1)===` `)){Se=!1;break}}if(Se){const _e=new n.Range(ve,1,ve,Ce);se.push(new c.ValidAnnotatedEditOperation(null,_e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,se,q,ae)}_applyUndo(z,se,q,ae){const ce=z.map(ge=>{const pe=this.getPositionAt(ge.newPosition),me=this.getPositionAt(ge.newEnd);return{range:new n.Range(pe.lineNumber,pe.column,me.lineNumber,me.column),text:ge.oldText}});this._applyUndoRedoEdits(ce,se,!0,!1,q,ae)}_applyRedo(z,se,q,ae){const ce=z.map(ge=>{const pe=this.getPositionAt(ge.oldPosition),me=this.getPositionAt(ge.oldEnd);return{range:new n.Range(pe.lineNumber,pe.column,me.lineNumber,me.column),text:ge.newText}});this._applyUndoRedoEdits(ce,se,!1,!0,q,ae)}_applyUndoRedoEdits(z,se,q,ae,ce,ge){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=q,this._isRedoing=ae,this.applyEdits(z,!1),this.setEOL(se),this._overwriteAlternativeVersionId(ce)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(ge),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(z,se=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const q=this._validateEditOperations(z);return this._doApplyEdits(q,se)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,se){const q=this._buffer.getLineCount(),ae=this._buffer.applyEdits(z,this._options.trimAutoWhitespace,se),ce=this._buffer.getLineCount(),ge=ae.changes;if(this._trimAutoWhitespaceLines=ae.trimAutoWhitespaceLineNumbers,ge.length!==0){for(let ve=0,Ce=ge.length;ve=0;je--){const st=Te+je,ot=fe+je;Ke.takeFromEndWhile(rt=>rt.lineNumber>ot);const nt=Ke.takeFromEndWhile(rt=>rt.lineNumber===ot);pe.push(new I.ModelRawLineChanged(st,this.getLineContent(ot),nt))}if(Left.lineNumberft.lineNumber===gt)}pe.push(new I.ModelRawLinesInserted(st+1,Te+Be,Qe,rt))}me+=Ne}this._emitContentChangedEvent(new I.ModelRawContentChangedEvent(pe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:ge,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return ae.reverseEdits===null?void 0:ae.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(z){if(z===null||z.size===0)return;const q=Array.from(z).map(ae=>new I.ModelRawLineChanged(ae,this.getLineContent(ae),this._getInjectedTextInLine(ae)));this._onDidChangeInjectedText.fire(new I.ModelInjectedTextChangedEvent(q))}changeDecorations(z,se=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(se,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,se){const q={addDecoration:(ce,ge)=>this._deltaDecorationsImpl(z,[],[{range:ce,options:ge}])[0],changeDecoration:(ce,ge)=>{this._changeDecorationImpl(ce,ge)},changeDecorationOptions:(ce,ge)=>{this._changeDecorationOptionsImpl(ce,Z(ge))},removeDecoration:ce=>{this._deltaDecorationsImpl(z,[ce],[])},deltaDecorations:(ce,ge)=>ce.length===0&&ge.length===0?[]:this._deltaDecorationsImpl(z,ce,ge)};let ae=null;try{ae=se(q)}catch(ce){(0,y.onUnexpectedError)(ce)}return q.addDecoration=W,q.changeDecoration=W,q.changeDecorationOptions=W,q.removeDecoration=W,q.deltaDecorations=W,ae}deltaDecorations(z,se,q=0){if(this._assertNotDisposed(),z||(z=[]),z.length===0&&se.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,y.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(q,z,se)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,se,q){const ae=z?this._decorations[z]:null;if(!ae)return se?this._deltaDecorationsImpl(0,[],[{range:se,options:X[q]}],!0)[0]:null;if(!se)return this._decorationsTree.delete(ae),delete this._decorations[ae.id],null;const ce=this._validateRangeRelaxedNoAllocations(se),ge=this._buffer.getOffsetAt(ce.startLineNumber,ce.startColumn),pe=this._buffer.getOffsetAt(ce.endLineNumber,ce.endColumn);return this._decorationsTree.delete(ae),ae.reset(this.getVersionId(),ge,pe,ce),ae.setOptions(X[q]),this._decorationsTree.insert(ae),ae.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const se=this._decorationsTree.collectNodesFromOwner(z);for(let q=0,ae=se.length;qthis.getLineCount()?[]:this.getLinesDecorations(z,z,se,q)}getLinesDecorations(z,se,q=0,ae=!1,ce=!1){const ge=this.getLineCount(),pe=Math.min(ge,Math.max(1,z)),me=Math.min(ge,Math.max(1,se)),ve=this.getLineMaxColumn(me),Ce=new n.Range(pe,1,me,ve),Se=this._getDecorationsInRange(Ce,q,ae,ce);return(0,L.pushMany)(Se,this._decorationProvider.getDecorationsInRange(Ce,q,ae)),Se}getDecorationsInRange(z,se=0,q=!1,ae=!1,ce=!1){const ge=this.validateRange(z),pe=this._getDecorationsInRange(ge,se,q,ce);return(0,L.pushMany)(pe,this._decorationProvider.getDecorationsInRange(ge,se,q,ae)),pe}getOverviewRulerDecorations(z=0,se=!1){return this._decorationsTree.getAll(this,z,se,!0,!1)}getInjectedTextDecorations(z=0){return this._decorationsTree.getAllInjectedText(this,z)}_getInjectedTextInLine(z){const se=this._buffer.getOffsetAt(z,1),q=se+this._buffer.getLineLength(z),ae=this._decorationsTree.getInjectedTextInInterval(this,se,q,0);return I.LineInjectedText.fromDecorations(ae).filter(ce=>ce.lineNumber===z)}getAllDecorations(z=0,se=!1){let q=this._decorationsTree.getAll(this,z,se,!1,!1);return q=q.concat(this._decorationProvider.getAllDecorations(z,se)),q}getAllMarginDecorations(z=0){return this._decorationsTree.getAll(this,z,!1,!1,!0)}_getDecorationsInRange(z,se,q,ae){const ce=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),ge=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);return this._decorationsTree.getAllInInterval(this,ce,ge,se,q,ae)}getRangeAt(z,se){return this._buffer.getRangeAt(z,se-z)}_changeDecorationImpl(z,se){const q=this._decorations[z];if(!q)return;if(q.options.after){const pe=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(pe.endLineNumber)}if(q.options.before){const pe=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(pe.startLineNumber)}const ae=this._validateRangeRelaxedNoAllocations(se),ce=this._buffer.getOffsetAt(ae.startLineNumber,ae.startColumn),ge=this._buffer.getOffsetAt(ae.endLineNumber,ae.endColumn);this._decorationsTree.delete(q),q.reset(this.getVersionId(),ce,ge,ae),this._decorationsTree.insert(q),this._onDidChangeDecorations.checkAffectedAndFire(q.options),q.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.endLineNumber),q.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ae.startLineNumber)}_changeDecorationOptionsImpl(z,se){const q=this._decorations[z];if(!q)return;const ae=!!(q.options.overviewRuler&&q.options.overviewRuler.color),ce=!!(se.overviewRuler&&se.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(q.options),this._onDidChangeDecorations.checkAffectedAndFire(se),q.options.after||se.after){const ge=this._decorationsTree.getNodeRange(this,q);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ge.endLineNumber)}if(q.options.before||se.before){const ge=this._decorationsTree.getNodeRange(this,q);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ge.startLineNumber)}ae!==ce?(this._decorationsTree.delete(q),q.setOptions(se),this._decorationsTree.insert(q)):q.setOptions(se)}_deltaDecorationsImpl(z,se,q,ae=!1){const ce=this.getVersionId(),ge=se.length;let pe=0;const me=q.length;let ve=0;this._onDidChangeDecorations.beginDeferredEmit();try{const Ce=new Array(me);for(;pethis._setLanguage(z.languageId,se)),this._setLanguage(z.languageId,se))}_setLanguage(z,se){this.tokenization.setLanguageId(z,se),this._languageService.requestRichLanguageFeatures(z)}getLanguageIdAtPosition(z,se){return this.tokenization.getLanguageIdAtPosition(z,se)}getWordAtPosition(z){return this._tokenizationTextModelPart.getWordAtPosition(z)}getWordUntilPosition(z){return this._tokenizationTextModelPart.getWordUntilPosition(z)}normalizePosition(z,se){return z}getLineIndentColumn(z){return U(this.getLineContent(z))+1}};e.TextModel=V,V._MODEL_SYNC_LIMIT=50*1024*1024,V.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,V.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,V.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,V.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:a.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:a.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:a.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:a.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:a.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:a.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},e.TextModel=V=A=Ee([he(4,M.IUndoRedoService),he(5,u.ILanguageService),he(6,f.ILanguageConfigurationService)],V);function U(H){let z=0;for(const se of H)if(se===" "||se===" ")z++;else break;return z}function F(H){return!!(H.options.overviewRuler&&H.options.overviewRuler.color)}function j(H){return!!H.options.after||!!H.options.before}class J{constructor(){this._decorationsTree0=new h.IntervalTree,this._decorationsTree1=new h.IntervalTree,this._injectedTextDecorationsTree=new h.IntervalTree}ensureAllNodesHaveRanges(z){this.getAll(z,0,!1,!1,!1)}_ensureNodesHaveRanges(z,se){for(const q of se)q.range===null&&(q.range=z.getRangeAt(q.cachedAbsoluteStart,q.cachedAbsoluteEnd));return se}getAllInInterval(z,se,q,ae,ce,ge){const pe=z.getVersionId(),me=this._intervalSearch(se,q,ae,ce,pe,ge);return this._ensureNodesHaveRanges(z,me)}_intervalSearch(z,se,q,ae,ce,ge){const pe=this._decorationsTree0.intervalSearch(z,se,q,ae,ce,ge),me=this._decorationsTree1.intervalSearch(z,se,q,ae,ce,ge),ve=this._injectedTextDecorationsTree.intervalSearch(z,se,q,ae,ce,ge);return pe.concat(me).concat(ve)}getInjectedTextInInterval(z,se,q,ae){const ce=z.getVersionId(),ge=this._injectedTextDecorationsTree.intervalSearch(se,q,ae,!1,ce,!1);return this._ensureNodesHaveRanges(z,ge).filter(pe=>pe.options.showIfCollapsed||!pe.range.isEmpty())}getAllInjectedText(z,se){const q=z.getVersionId(),ae=this._injectedTextDecorationsTree.search(se,!1,q,!1);return this._ensureNodesHaveRanges(z,ae).filter(ce=>ce.options.showIfCollapsed||!ce.range.isEmpty())}getAll(z,se,q,ae,ce){const ge=z.getVersionId(),pe=this._search(se,q,ae,ge,ce);return this._ensureNodesHaveRanges(z,pe)}_search(z,se,q,ae,ce){if(q)return this._decorationsTree1.search(z,se,ae,ce);{const ge=this._decorationsTree0.search(z,se,ae,ce),pe=this._decorationsTree1.search(z,se,ae,ce),me=this._injectedTextDecorationsTree.search(z,se,ae,ce);return ge.concat(pe).concat(me)}}collectNodesFromOwner(z){const se=this._decorationsTree0.collectNodesFromOwner(z),q=this._decorationsTree1.collectNodesFromOwner(z),ae=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return se.concat(q).concat(ae)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),se=this._decorationsTree1.collectNodesPostOrder(),q=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(se).concat(q)}insert(z){j(z)?this._injectedTextDecorationsTree.insert(z):F(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){j(z)?this._injectedTextDecorationsTree.delete(z):F(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,se){const q=z.getVersionId();return se.cachedVersionId!==q&&this._resolveNode(se,q),se.range===null&&(se.range=z.getRangeAt(se.cachedAbsoluteStart,se.cachedAbsoluteEnd)),se.range}_resolveNode(z,se){j(z)?this._injectedTextDecorationsTree.resolveNode(z,se):F(z)?this._decorationsTree1.resolveNode(z,se):this._decorationsTree0.resolveNode(z,se)}acceptReplace(z,se,q,ae){this._decorationsTree0.acceptReplace(z,se,q,ae),this._decorationsTree1.acceptReplace(z,se,q,ae),this._injectedTextDecorationsTree.acceptReplace(z,se,q,ae)}}function le(H){return H.replace(/[^a-z0-9\-_]/gi," ")}class ee{constructor(z){this.color=z.color||"",this.darkColor=z.darkColor||""}}class $ extends ee{constructor(z){super(z),this._resolvedColor=null,this.position=typeof z.position=="number"?z.position:c.OverviewRulerLane.Center}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(z,se){if(typeof z=="string")return z;const q=z?se.getColor(z.id):null;return q?q.toString():""}}e.ModelDecorationOverviewRulerOptions=$;class te{constructor(z){var se;this.position=(se=z?.position)!==null&&se!==void 0?se:c.GlyphMarginLane.Left}}e.ModelDecorationGlyphMarginOptions=te;class G extends ee{constructor(z){super(z),this.position=z.position}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(z,se){return typeof z=="string"?k.Color.fromHex(z):se.getColor(z.id)}}e.ModelDecorationMinimapOptions=G;class de{static from(z){return z instanceof de?z:new de(z)}constructor(z){this.content=z.content||"",this.inlineClassName=z.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=z.attachedData||null,this.cursorStops=z.cursorStops||null}}e.ModelDecorationInjectedTextOptions=de;class ue{static register(z){return new ue(z)}static createDynamic(z){return new ue(z)}constructor(z){var se,q,ae,ce,ge,pe;this.description=z.description,this.blockClassName=z.blockClassName?le(z.blockClassName):null,this.blockDoesNotCollapse=(se=z.blockDoesNotCollapse)!==null&&se!==void 0?se:null,this.blockIsAfterEnd=(q=z.blockIsAfterEnd)!==null&&q!==void 0?q:null,this.blockPadding=(ae=z.blockPadding)!==null&&ae!==void 0?ae:null,this.stickiness=z.stickiness||0,this.zIndex=z.zIndex||0,this.className=z.className?le(z.className):null,this.shouldFillLineOnLineBreak=(ce=z.shouldFillLineOnLineBreak)!==null&&ce!==void 0?ce:null,this.hoverMessage=z.hoverMessage||null,this.glyphMarginHoverMessage=z.glyphMarginHoverMessage||null,this.isWholeLine=z.isWholeLine||!1,this.showIfCollapsed=z.showIfCollapsed||!1,this.collapseOnReplaceEdit=z.collapseOnReplaceEdit||!1,this.overviewRuler=z.overviewRuler?new $(z.overviewRuler):null,this.minimap=z.minimap?new G(z.minimap):null,this.glyphMargin=z.glyphMarginClassName?new te(z.glyphMargin):null,this.glyphMarginClassName=z.glyphMarginClassName?le(z.glyphMarginClassName):null,this.linesDecorationsClassName=z.linesDecorationsClassName?le(z.linesDecorationsClassName):null,this.firstLineDecorationClassName=z.firstLineDecorationClassName?le(z.firstLineDecorationClassName):null,this.marginClassName=z.marginClassName?le(z.marginClassName):null,this.inlineClassName=z.inlineClassName?le(z.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=z.beforeContentClassName?le(z.beforeContentClassName):null,this.afterContentClassName=z.afterContentClassName?le(z.afterContentClassName):null,this.after=z.after?de.from(z.after):null,this.before=z.before?de.from(z.before):null,this.hideInCommentTokens=(ge=z.hideInCommentTokens)!==null&&ge!==void 0?ge:!1,this.hideInStringTokens=(pe=z.hideInStringTokens)!==null&&pe!==void 0?pe:!1}}e.ModelDecorationOptions=ue,ue.EMPTY=ue.register({description:"empty"});const X=[ue.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ue.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ue.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ue.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Z(H){return H instanceof ue?H:ue.createDynamic(H)}class re extends _.Disposable{constructor(z){super(),this.handleBeforeFire=z,this._actual=this._register(new E.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var z;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(z=this._affectedInjectedTextLines)===null||z===void 0||z.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(z){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(z)}checkAffectedAndFire(z){this._affectsMinimap||(this._affectsMinimap=!!(z.minimap&&z.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(z.overviewRuler&&z.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!z.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const z={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(z)}}class oe extends _.Disposable{constructor(){super(),this._fastEmitter=this._register(new E.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new E.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(z=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=z;const se=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(se),this._slowEmitter.fire(se)}}fire(z){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(z):this._deferredEvent=z;return}this._fastEmitter.fire(z),this._slowEmitter.fire(z)}}class Y{constructor(){this._onDidChangeVisibleRanges=new E.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const z=new K(se=>{this._onDidChangeVisibleRanges.fire({view:z,state:se})});return this._views.add(z),z}detachView(z){this._views.delete(z),this._onDidChangeVisibleRanges.fire({view:z,state:void 0})}}e.AttachedViews=Y;class K{constructor(z){this.handleStateChange=z}setVisibleLines(z,se){const q=z.map(ae=>new o.LineRange(ae.startLineNumber,ae.endLineNumber+1));this.handleStateChange({visibleLineRanges:q,stabilized:se})}}}),define(ie[370],ne([1,0,26,27,39,618,81]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffDeleteDecorationEmpty=e.diffWholeLineDeleteDecoration=e.diffDeleteDecoration=e.diffAddDecorationEmpty=e.diffWholeLineAddDecoration=e.diffAddDecoration=e.diffLineDeleteDecorationBackground=e.diffLineAddDecorationBackground=e.diffLineDeleteDecorationBackgroundWithIndicator=e.diffLineAddDecorationBackgroundWithIndicator=e.diffRemoveIcon=e.diffInsertIcon=void 0,e.diffInsertIcon=(0,_.registerIcon)("diff-insert",L.Codicon.add,(0,E.localize)(0,null)),e.diffRemoveIcon=(0,_.registerIcon)("diff-remove",L.Codicon.remove,(0,E.localize)(1,null)),e.diffLineAddDecorationBackgroundWithIndicator=y.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+k.ThemeIcon.asClassName(e.diffInsertIcon),marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackgroundWithIndicator=y.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+k.ThemeIcon.asClassName(e.diffRemoveIcon),marginClassName:"gutter-delete"}),e.diffLineAddDecorationBackground=y.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackground=y.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),e.diffAddDecoration=y.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),e.diffWholeLineAddDecoration=y.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),e.diffAddDecorationEmpty=y.ModelDecorationOptions.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),e.diffDeleteDecoration=y.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),e.diffWholeLineDeleteDecoration=y.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),e.diffDeleteDecorationEmpty=y.ModelDecorationOptions.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"})}),define(ie[878],ne([1,0,7,115,26,2,35,370,331,90,62,5,43,620]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorDecorations=void 0;class t extends E.Disposable{constructor(c,d,r,l){super(),this._editors=c,this._diffModel=d,this._options=r,this._decorations=(0,_.derived)(this,s=>{var g;const h=(g=this._diffModel.read(s))===null||g===void 0?void 0:g.diff.read(s);if(!h)return null;const m=this._diffModel.read(s).movedTextToCompare.read(s),C=this._options.renderIndicators.read(s),w=this._options.showEmptyDecorations.read(s),D=[],I=[];if(!m)for(const A of h.mappings)if(A.lineRangeMapping.original.isEmpty||D.push({range:A.lineRangeMapping.original.toInclusiveRange(),options:C?p.diffLineDeleteDecorationBackgroundWithIndicator:p.diffLineDeleteDecorationBackground}),A.lineRangeMapping.modified.isEmpty||I.push({range:A.lineRangeMapping.modified.toInclusiveRange(),options:C?p.diffLineAddDecorationBackgroundWithIndicator:p.diffLineAddDecorationBackground}),A.lineRangeMapping.modified.isEmpty||A.lineRangeMapping.original.isEmpty)A.lineRangeMapping.original.isEmpty||D.push({range:A.lineRangeMapping.original.toInclusiveRange(),options:p.diffWholeLineDeleteDecoration}),A.lineRangeMapping.modified.isEmpty||I.push({range:A.lineRangeMapping.modified.toInclusiveRange(),options:p.diffWholeLineAddDecoration});else for(const O of A.lineRangeMapping.innerChanges||[])A.lineRangeMapping.original.contains(O.originalRange.startLineNumber)&&D.push({range:O.originalRange,options:O.originalRange.isEmpty()&&w?p.diffDeleteDecorationEmpty:p.diffDeleteDecoration}),A.lineRangeMapping.modified.contains(O.modifiedRange.startLineNumber)&&I.push({range:O.modifiedRange,options:O.modifiedRange.isEmpty()&&w?p.diffAddDecorationEmpty:p.diffAddDecoration});if(m)for(const A of m.changes){const O=A.original.toInclusiveRange();O&&D.push({range:O,options:C?p.diffLineDeleteDecorationBackgroundWithIndicator:p.diffLineDeleteDecorationBackground});const T=A.modified.toInclusiveRange();T&&I.push({range:T,options:C?p.diffLineAddDecorationBackgroundWithIndicator:p.diffLineAddDecorationBackground});for(const N of A.innerChanges||[])D.push({range:N.originalRange,options:p.diffDeleteDecoration}),I.push({range:N.modifiedRange,options:p.diffAddDecoration})}const M=this._diffModel.read(s).activeMovedText.read(s);for(const A of h.movedTexts)D.push({range:A.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(A===M?" currentMove":""),blockPadding:[S.MovedBlocksLinesPart.movedCodeBlockPadding,0,S.MovedBlocksLinesPart.movedCodeBlockPadding,S.MovedBlocksLinesPart.movedCodeBlockPadding]}}),I.push({range:A.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(A===M?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:D,modifiedDecorations:I}}),this._register(new a(c,d,r,l)),this._register((0,v.applyObservableDecorations)(this._editors.original,this._decorations.map(s=>s?.originalDecorations||[]))),this._register((0,v.applyObservableDecorations)(this._editors.modified,this._decorations.map(s=>s?.modifiedDecorations||[])))}}e.DiffEditorDecorations=t;class a extends E.Disposable{constructor(c,d,r,l){super(),this._editors=c,this._diffModel=d,this._options=r,this._widget=l;const s=[],g=(0,_.derived)(this,h=>{const m=this._diffModel.read(h),C=m?.diff.read(h);if(!C)return s;const w=this._editors.modifiedSelections.read(h);if(w.every(A=>A.isEmpty()))return s;const D=new b.LineRangeSet(w.map(A=>b.LineRange.fromRangeInclusive(A))),M=C.mappings.filter(A=>A.lineRangeMapping.innerChanges&&D.intersects(A.lineRangeMapping.modified)).map(A=>({mapping:A,rangeMappings:A.lineRangeMapping.innerChanges.filter(O=>w.some(T=>o.Range.areIntersecting(O.modifiedRange,T)))}));return M.length===0||M.every(A=>A.rangeMappings.length===0)?s:M});this._register((0,_.autorunWithStore)((h,m)=>{const C=this._diffModel.read(h),w=C?.diff.read(h);if(!C||!w||this._diffModel.read(h).movedTextToCompare.read(h)||!this._options.shouldRenderRevertArrows.read(h))return;const I=[],M=g.read(h),A=new Set(M.map(O=>O.mapping));if(M.length>0){const O=this._editors.modifiedSelections.read(h),T=new u(O[O.length-1].positionLineNumber,this._widget,M.flatMap(N=>N.rangeMappings),!0);this._editors.modified.addGlyphMarginWidget(T),I.push(T)}for(const O of w.mappings)if(!A.has(O)&&!O.lineRangeMapping.modified.isEmpty&&O.lineRangeMapping.innerChanges){const T=new u(O.lineRangeMapping.modified.startLineNumber,this._widget,O.lineRangeMapping.innerChanges,!1);this._editors.modified.addGlyphMarginWidget(T),I.push(T)}m.add((0,E.toDisposable)(()=>{for(const O of I)this._editors.modified.removeGlyphMarginWidget(O)}))}))}}class u{getId(){return this._id}constructor(c,d,r,l){this._lineNumber=c,this._widget=d,this._diffs=r,this._selection=l,this._id=`revertButton${u.counter++}`,this._domNode=(0,L.h)("div.revertButton",{title:this._selection?(0,n.localize)(0,null):(0,n.localize)(1,null)},[(0,k.renderIcon)(y.Codicon.arrowRight)]).root,this._domNode.onmousedown=s=>{s.button!==2&&(s.stopPropagation(),s.preventDefault())},this._domNode.onmouseup=s=>{s.stopPropagation(),s.preventDefault()},this._domNode.onclick=s=>{this._widget.revertRangeMappings(this._diffs),s.stopPropagation(),s.preventDefault()}}getDomNode(){return this._domNode}getPosition(){return{lane:i.GlyphMarginLane.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}u.counter=0}),define(ie[879],ne([1,0,7,13,14,26,2,35,27,20,72,370,356,624,641,90,62,11,85,103,59]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZoneManager=void 0;let l=class extends _.Disposable{constructor(m,C,w,D,I,M,A,O,T,N){super(),this._targetWindow=m,this._editors=C,this._diffModel=w,this._options=D,this._diffEditorWidget=I,this._canIgnoreViewZoneUpdateEvent=M,this._origViewZonesToIgnore=A,this._modViewZonesToIgnore=O,this._clipboardService=T,this._contextMenuService=N,this._originalTopPadding=(0,p.observableValue)(this,0),this._originalScrollOffset=(0,p.observableValue)(this,0),this._originalScrollOffsetAnimated=(0,a.animatedObservable)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,p.observableValue)(this,0),this._modifiedScrollOffset=(0,p.observableValue)(this,0),this._modifiedScrollOffsetAnimated=(0,a.animatedObservable)(this._targetWindow,this._modifiedScrollOffset,this._store);const P=(0,p.observableValue)("invalidateAlignmentsState",0),x=this._register(new y.RunOnceScheduler(()=>{P.set(P.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(j=>{this._canIgnoreViewZoneUpdateEvent()||x.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(j=>{this._canIgnoreViewZoneUpdateEvent()||x.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(j=>{(j.hasChanged(144)||j.hasChanged(66))&&x.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(j=>{(j.hasChanged(144)||j.hasChanged(66))&&x.schedule()}));const R=this._diffModel.map(j=>j?(0,p.observableFromEvent)(j.model.original.onDidChangeTokens,()=>j.model.original.tokenization.backgroundTokenizationState===2):void 0).map((j,J)=>j?.read(J)),B=(0,p.derived)(j=>{const J=this._diffModel.read(j),le=J?.diff.read(j);if(!J||!le)return null;P.read(j);const $=this._options.renderSideBySide.read(j);return s(this._editors.original,this._editors.modified,le.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,$)}),W=(0,p.derived)(j=>{var J;const le=(J=this._diffModel.read(j))===null||J===void 0?void 0:J.movedTextToCompare.read(j);if(!le)return null;P.read(j);const ee=le.changes.map($=>new i.DiffMapping($));return s(this._editors.original,this._editors.modified,ee,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function V(){const j=document.createElement("div");return j.className="diagonal-fill",j}const U=this._register(new _.DisposableStore);this.viewZones=(0,p.derivedWithStore)(this,(j,J)=>{var le,ee,$,te,G,de,ue,X;U.clear();const Z=B.read(j)||[],re=[],oe=[],Y=this._modifiedTopPadding.read(j);Y>0&&oe.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:Y,showInHiddenAreas:!0,suppressMouseDown:!0});const K=this._originalTopPadding.read(j);K>0&&re.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:K,showInHiddenAreas:!0,suppressMouseDown:!0});const H=this._options.renderSideBySide.read(j),z=H||(le=this._editors.modified._getViewModel())===null||le===void 0?void 0:le.createLineBreaksComputer();if(z){for(const ve of Z)if(ve.diff)for(let Ce=ve.originalRange.startLineNumber;Cethis._editors.original.getModel().tokenization.getLineTokens(Le)),ve.originalRange.mapToLineArray(Le=>se[q++]),ge,pe),Te=[];for(const Le of ve.diff.innerChanges||[])Te.push(new c.InlineDecoration(Le.originalRange.delta(-(ve.diff.original.startLineNumber-1)),o.diffDeleteDecoration.className,0));const Me=(0,t.renderLines)(_e,me,Te,Se),Pe=document.createElement("div");if(Pe.className="inline-deleted-margin-view-zone",(0,b.applyFontInfo)(Pe,me.fontInfo),this._options.renderIndicators.read(j))for(let Le=0;Le(0,v.assertIsDefined)(Be),Pe,this._editors.modified,ve.diff,this._diffEditorWidget,Me.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Le=0;Le1&&re.push({afterLineNumber:ve.originalRange.startLineNumber+Le,domNode:V(),heightInPx:(Ne-1)*ae,showInHiddenAreas:!0,suppressMouseDown:!0})}oe.push({afterLineNumber:ve.modifiedRange.startLineNumber-1,domNode:Se,heightInPx:Me.heightInLines*ae,minWidthInPx:Me.minWidthInPx,marginDomNode:Pe,setZoneId(Le){Be=Le},showInHiddenAreas:!0,suppressMouseDown:!0})}const Ce=document.createElement("div");Ce.className="gutter-delete",re.push({afterLineNumber:ve.originalRange.endLineNumberExclusive-1,domNode:V(),heightInPx:ve.modifiedHeightInPx,marginDomNode:Ce,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Ce=ve.modifiedHeightInPx-ve.originalHeightInPx;if(Ce>0){if(ce?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(ve.originalRange.endLineNumberExclusive-1))continue;re.push({afterLineNumber:ve.originalRange.endLineNumberExclusive-1,domNode:V(),heightInPx:Ce,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Se=function(){const Te=document.createElement("div");return Te.className="arrow-revert-change "+S.ThemeIcon.asClassName(E.Codicon.arrowRight),J.add((0,L.addDisposableListener)(Te,"mousedown",Me=>Me.stopPropagation())),J.add((0,L.addDisposableListener)(Te,"click",Me=>{Me.stopPropagation(),I.revert(ve.diff)})),(0,L.$)("div",{},Te)};if(ce?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(ve.modifiedRange.endLineNumberExclusive-1))continue;let _e;ve.diff&&ve.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(j)&&(_e=Se()),oe.push({afterLineNumber:ve.modifiedRange.endLineNumberExclusive-1,domNode:V(),heightInPx:-Ce,marginDomNode:_e,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const ve of(X=W.read(j))!==null&&X!==void 0?X:[]){if(!ce?.lineRangeMapping.original.intersect(ve.originalRange)||!ce?.lineRangeMapping.modified.intersect(ve.modifiedRange))continue;const Ce=ve.modifiedHeightInPx-ve.originalHeightInPx;Ce>0?re.push({afterLineNumber:ve.originalRange.endLineNumberExclusive-1,domNode:V(),heightInPx:Ce,showInHiddenAreas:!0,suppressMouseDown:!0}):oe.push({afterLineNumber:ve.modifiedRange.endLineNumberExclusive-1,domNode:V(),heightInPx:-Ce,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:re,mod:oe}});let F=!1;this._register(this._editors.original.onDidScrollChange(j=>{j.scrollLeftChanged&&!F&&(F=!0,this._editors.modified.setScrollLeft(j.scrollLeft),F=!1)})),this._register(this._editors.modified.onDidScrollChange(j=>{j.scrollLeftChanged&&!F&&(F=!0,this._editors.original.setScrollLeft(j.scrollLeft),F=!1)})),this._originalScrollTop=(0,p.observableFromEvent)(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,p.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register((0,p.autorun)(j=>{const J=this._originalScrollTop.read(j)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(j))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(j));J!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(J,1)})),this._register((0,p.autorun)(j=>{const J=this._modifiedScrollTop.read(j)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(j))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(j));J!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(J,1)})),this._register((0,p.autorun)(j=>{var J;const le=(J=this._diffModel.read(j))===null||J===void 0?void 0:J.movedTextToCompare.read(j);let ee=0;if(le){const $=this._editors.original.getTopForLineNumber(le.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();ee=this._editors.modified.getTopForLineNumber(le.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-$}ee>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(ee,void 0)):ee<0?(this._modifiedTopPadding.set(-ee,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-ee,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+ee,void 0,!0)}))}};e.ViewZoneManager=l,e.ViewZoneManager=l=Ee([he(8,d.IClipboardService),he(9,r.IContextMenuService)],l);function s(h,m,C,w,D,I){const M=new k.ArrayQueue(g(h,w)),A=new k.ArrayQueue(g(m,D)),O=h.getOption(66),T=m.getOption(66),N=[];let P=0,x=0;function R(B,W){for(;;){let V=M.peek(),U=A.peek();if(V&&V.lineNumber>=B&&(V=void 0),U&&U.lineNumber>=W&&(U=void 0),!V&&!U)break;const F=V?V.lineNumber-P:Number.MAX_VALUE,j=U?U.lineNumber-x:Number.MAX_VALUE;Fj?(A.dequeue(),V={lineNumber:U.lineNumber-x+P,heightInPx:0}):(M.dequeue(),A.dequeue()),N.push({originalRange:u.LineRange.ofLength(V.lineNumber,1),modifiedRange:u.LineRange.ofLength(U.lineNumber,1),originalHeightInPx:O+V.heightInPx,modifiedHeightInPx:T+U.heightInPx,diff:void 0})}}for(const B of C){let j=function(J,le){var ee,$,te,G;if(Jre.lineNumberre+oe.heightInPx,0))!==null&&$!==void 0?$:0,Z=(G=(te=A.takeWhile(re=>re.lineNumberre+oe.heightInPx,0))!==null&&G!==void 0?G:0;N.push({originalRange:de,modifiedRange:ue,originalHeightInPx:de.length*O+X,modifiedHeightInPx:ue.length*T+Z,diff:B.lineRangeMapping}),F=J,U=le};const W=B.lineRangeMapping;R(W.original.startLineNumber,W.modified.startLineNumber);let V=!0,U=W.modified.startLineNumber,F=W.original.startLineNumber;if(I)for(const J of W.innerChanges||[])J.originalRange.startColumn>1&&J.modifiedRange.startColumn>1&&j(J.originalRange.startLineNumber,J.modifiedRange.startLineNumber),J.originalRange.endColumn1&&w.push({lineNumber:O,heightInPx:M*(T-1)})}for(const O of h.getWhitespaces()){if(m.has(O.id))continue;const T=O.afterLineNumber===0?0:I.convertViewPositionToModelPosition(new f.Position(O.afterLineNumber,1)).lineNumber;C.push({lineNumber:T,heightInPx:O.height})}return(0,a.joinCombine)(C,w,O=>O.lineNumber,(O,T)=>({lineNumber:O.lineNumber,heightInPx:O.heightInPx+T.heightInPx}))}}),define(ie[880],ne([1,0,6,2,17,39,177,79,42,187,28,193,122,337,44,55,32]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultModelSHA1Computer=e.ModelService=void 0;function c(h){return h.toString()}class d{constructor(m,C,w){this.model=m,this._modelEventListeners=new k.DisposableStore,this.model=m,this._modelEventListeners.add(m.onWillDispose(()=>C(m))),this._modelEventListeners.add(m.onDidChangeLanguage(D=>w(m,D)))}dispose(){this._modelEventListeners.dispose()}}const r=y.isLinux||y.isMacintosh?1:2;class l{constructor(m,C,w,D,I,M,A,O){this.uri=m,this.initialUndoRedoSnapshot=C,this.time=w,this.sharesUndoRedoStack=D,this.heapSize=I,this.sha1=M,this.versionId=A,this.alternativeVersionId=O}}let s=f=class extends k.Disposable{constructor(m,C,w,D,I){super(),this._configurationService=m,this._resourcePropertiesService=C,this._undoRedoService=w,this._languageService=D,this._languageConfigurationService=I,this._onModelAdded=this._register(new L.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new L.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new L.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(M=>this._updateModelOptions(M))),this._updateModelOptions(void 0)}static _readModelOptions(m,C){var w;let D=_.EDITOR_MODEL_DEFAULTS.tabSize;if(m.editor&&typeof m.editor.tabSize<"u"){const R=parseInt(m.editor.tabSize,10);isNaN(R)||(D=R),D<1&&(D=1)}let I="tabSize";if(m.editor&&typeof m.editor.indentSize<"u"&&m.editor.indentSize!=="tabSize"){const R=parseInt(m.editor.indentSize,10);isNaN(R)||(I=Math.max(R,1))}let M=_.EDITOR_MODEL_DEFAULTS.insertSpaces;m.editor&&typeof m.editor.insertSpaces<"u"&&(M=m.editor.insertSpaces==="false"?!1:!!m.editor.insertSpaces);let A=r;const O=m.eol;O===`\r `?A=2:O===` `&&(A=1);let T=_.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;m.editor&&typeof m.editor.trimAutoWhitespace<"u"&&(T=m.editor.trimAutoWhitespace==="false"?!1:!!m.editor.trimAutoWhitespace);let N=_.EDITOR_MODEL_DEFAULTS.detectIndentation;m.editor&&typeof m.editor.detectIndentation<"u"&&(N=m.editor.detectIndentation==="false"?!1:!!m.editor.detectIndentation);let P=_.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;m.editor&&typeof m.editor.largeFileOptimizations<"u"&&(P=m.editor.largeFileOptimizations==="false"?!1:!!m.editor.largeFileOptimizations);let x=_.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return!((w=m.editor)===null||w===void 0)&&w.bracketPairColorization&&typeof m.editor.bracketPairColorization=="object"&&(x={enabled:!!m.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!m.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:C,tabSize:D,indentSize:I,insertSpaces:M,detectIndentation:N,defaultEOL:A,trimAutoWhitespace:T,largeFileOptimizations:P,bracketPairColorizationOptions:x}}_getEOL(m,C){if(m)return this._resourcePropertiesService.getEOL(m,C);const w=this._configurationService.getValue("files.eol",{overrideIdentifier:C});return w&&typeof w=="string"&&w!=="auto"?w:y.OS===3||y.OS===2?` `:`\r `}_shouldRestoreUndoStack(){const m=this._configurationService.getValue("files.restoreUndoStack");return typeof m=="boolean"?m:!0}getCreationOptions(m,C,w){const D=typeof m=="string"?m:m.languageId;let I=this._modelCreationOptionsByLanguageAndResource[D+C];if(!I){const M=this._configurationService.getValue("editor",{overrideIdentifier:D,resource:C}),A=this._getEOL(C,D);I=f._readModelOptions({editor:M,eol:A},w),this._modelCreationOptionsByLanguageAndResource[D+C]=I}return I}_updateModelOptions(m){const C=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const w=Object.keys(this._models);for(let D=0,I=w.length;Dm){const C=[];for(this._disposedModels.forEach(w=>{w.sharesUndoRedoStack||C.push(w)}),C.sort((w,D)=>w.time-D.time);C.length>0&&this._disposedModelsHeapSize>m;){const w=C.shift();this._removeDisposedModel(w.uri),w.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(w.initialUndoRedoSnapshot)}}}_createModelData(m,C,w,D){const I=this.getCreationOptions(C,w,D),M=new E.TextModel(m,C,I,w,this._undoRedoService,this._languageService,this._languageConfigurationService);if(w&&this._disposedModels.has(c(w))){const T=this._removeDisposedModel(w),N=this._undoRedoService.getElements(w),P=this._getSHA1Computer(),x=P.canComputeSHA1(M)?P.computeSHA1(M)===T.sha1:!1;if(x||T.sharesUndoRedoStack){for(const R of N.past)(0,n.isEditStackElement)(R)&&R.matchesResource(w)&&R.setModel(M);for(const R of N.future)(0,n.isEditStackElement)(R)&&R.matchesResource(w)&&R.setModel(M);this._undoRedoService.setElementsValidFlag(w,!0,R=>(0,n.isEditStackElement)(R)&&R.matchesResource(w)),x&&(M._overwriteVersionId(T.versionId),M._overwriteAlternativeVersionId(T.alternativeVersionId),M._overwriteInitialUndoRedoSnapshot(T.initialUndoRedoSnapshot))}else T.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(T.initialUndoRedoSnapshot)}const A=c(M.uri);if(this._models[A])throw new Error("ModelService: Cannot add model because it already exists!");const O=new d(M,T=>this._onWillDispose(T),(T,N)=>this._onDidChangeLanguage(T,N));return this._models[A]=O,O}createModel(m,C,w,D=!1){let I;return C?I=this._createModelData(m,C,w,D):I=this._createModelData(m,p.PLAINTEXT_LANGUAGE_ID,w,D),this._onModelAdded.fire(I.model),I.model}getModels(){const m=[],C=Object.keys(this._models);for(let w=0,D=C.length;w0||T.future.length>0){for(const N of T.past)(0,n.isEditStackElement)(N)&&N.matchesResource(m.uri)&&(I=!0,M+=N.heapSize(m.uri),N.setModel(m.uri));for(const N of T.future)(0,n.isEditStackElement)(N)&&N.matchesResource(m.uri)&&(I=!0,M+=N.heapSize(m.uri),N.setModel(m.uri))}}const A=f.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,O=this._getSHA1Computer();if(I)if(!D&&(M>A||!O.canComputeSHA1(m))){const T=w.model.getInitialUndoRedoSnapshot();T!==null&&this._undoRedoService.restoreSnapshot(T)}else this._ensureDisposedModelsHeapSize(A-M),this._undoRedoService.setElementsValidFlag(m.uri,!1,T=>(0,n.isEditStackElement)(T)&&T.matchesResource(m.uri)),this._insertDisposedModel(new l(m.uri,w.model.getInitialUndoRedoSnapshot(),Date.now(),D,M,O.computeSHA1(m),m.getVersionId(),m.getAlternativeVersionId()));else if(!D){const T=w.model.getInitialUndoRedoSnapshot();T!==null&&this._undoRedoService.restoreSnapshot(T)}delete this._models[C],w.dispose(),delete this._modelCreationOptionsByLanguageAndResource[m.getLanguageId()+m.uri],this._onModelRemoved.fire(m)}_onDidChangeLanguage(m,C){const w=C.oldLanguage,D=m.getLanguageId(),I=this.getCreationOptions(w,m.uri,m.isForSimpleWidget),M=this.getCreationOptions(D,m.uri,m.isForSimpleWidget);f._setModelOptionsForModel(m,M,I),this._onModelModeChanged.fire({model:m,oldLanguageId:w})}_getSHA1Computer(){return new g}};e.ModelService=s,s.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,e.ModelService=s=f=Ee([he(0,b.IConfigurationService),he(1,v.ITextResourcePropertiesService),he(2,o.IUndoRedoService),he(3,S.ILanguageService),he(4,u.ILanguageConfigurationService)],s);class g{canComputeSHA1(m){return m.getValueLength()<=g.MAX_MODEL_SIZE}computeSHA1(m){const C=new i.StringSHA1,w=m.createSnapshot();let D;for(;D=w.read();)C.update(D);return C.digest()}}e.DefaultModelSHA1Computer=g,g.MAX_MODEL_SIZE=10*1024*1024}),define(ie[881],ne([1,0,13,11,5,212,39,112,214,542,288,85]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class i{constructor(r,l,s,g,h,m,C,w,D,I){this._editorId=r,this.model=l,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=s,this._monospaceLineBreaksComputerFactory=g,this.fontInfo=h,this.tabSize=m,this.wrappingStrategy=C,this.wrappingColumn=w,this.wrappingIndent=D,this.wordBreak=I,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new u(this)}_constructLines(r,l){this.modelLineProjections=[],r&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const s=this.model.getLinesContent(),g=this.model.getInjectedTextDecorations(this._editorId),h=s.length,m=this.createLineBreaksComputer(),C=new L.ArrayQueue(p.LineInjectedText.fromDecorations(g));for(let N=0;Nx.lineNumber===N+1);m.addRequest(s[N],P,l?l[N]:null)}const w=m.finalize(),D=[],I=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(y.Range.compareRangesUsingStarts);let M=1,A=0,O=-1,T=O+1=M&&P<=A,R=(0,v.createModelLineProjection)(w[N],!x);D[N]=R.getViewLineCount(),this.modelLineProjections[N]=R}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new b.ConstantTimePrefixSumComputer(D)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(r=>this.model.getDecorationRange(r))}setHiddenAreas(r){const l=r.map(A=>this.model.validateRange(A)),s=n(l),g=this.hiddenAreasDecorationIds.map(A=>this.model.getDecorationRange(A)).sort(y.Range.compareRangesUsingStarts);if(s.length===g.length){let A=!1;for(let O=0;O({range:A,options:_.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,h);const m=s;let C=1,w=0,D=-1,I=D+1=C&&O<=w?this.modelLineProjections[A].isVisible()&&(this.modelLineProjections[A]=this.modelLineProjections[A].setVisible(!1),T=!0):(M=!0,this.modelLineProjections[A].isVisible()||(this.modelLineProjections[A]=this.modelLineProjections[A].setVisible(!0),T=!0)),T){const N=this.modelLineProjections[A].getViewLineCount();this.projectedModelLineLineCounts.setValue(A,N)}}return M||this.setHiddenAreas([]),!0}modelPositionIsVisible(r,l){return r<1||r>this.modelLineProjections.length?!1:this.modelLineProjections[r-1].isVisible()}getModelLineViewLineCount(r){return r<1||r>this.modelLineProjections.length?1:this.modelLineProjections[r-1].getViewLineCount()}setTabSize(r){return this.tabSize===r?!1:(this.tabSize=r,this._constructLines(!1,null),!0)}setWrappingSettings(r,l,s,g,h){const m=this.fontInfo.equals(r),C=this.wrappingStrategy===l,w=this.wrappingColumn===s,D=this.wrappingIndent===g,I=this.wordBreak===h;if(m&&C&&w&&D&&I)return!1;const M=m&&C&&!w&&D&&I;this.fontInfo=r,this.wrappingStrategy=l,this.wrappingColumn=s,this.wrappingIndent=g,this.wordBreak=h;let A=null;if(M){A=[];for(let O=0,T=this.modelLineProjections.length;O2&&!this.modelLineProjections[l-2].isVisible(),m=l===1?1:this.projectedModelLineLineCounts.getPrefixSum(l-1)+1;let C=0;const w=[],D=[];for(let I=0,M=g.length;Iw?(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,M=I+w-1,T=M+1,N=T+(h-w)-1,D=!0):hl?l:r|0}getActiveIndentGuide(r,l,s){r=this._toValidViewLineNumber(r),l=this._toValidViewLineNumber(l),s=this._toValidViewLineNumber(s);const g=this.convertViewPositionToModelPosition(r,this.getViewLineMinColumn(r)),h=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),m=this.convertViewPositionToModelPosition(s,this.getViewLineMinColumn(s)),C=this.model.guides.getActiveIndentGuide(g.lineNumber,h.lineNumber,m.lineNumber),w=this.convertModelPositionToViewPosition(C.startLineNumber,1),D=this.convertModelPositionToViewPosition(C.endLineNumber,this.model.getLineMaxColumn(C.endLineNumber));return{startLineNumber:w.lineNumber,endLineNumber:D.lineNumber,indent:C.indent}}getViewLineInfo(r){r=this._toValidViewLineNumber(r);const l=this.projectedModelLineLineCounts.getIndexOf(r-1),s=l.index,g=l.remainder;return new t(s+1,g)}getMinColumnOfViewLine(r){return this.modelLineProjections[r.modelLineNumber-1].getViewLineMinColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(r){return this.modelLineProjections[r.modelLineNumber-1].getViewLineMaxColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(r){const l=this.modelLineProjections[r.modelLineNumber-1],s=l.getViewLineMinColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx),g=l.getModelColumnOfViewPosition(r.modelLineWrappedLineIdx,s);return new k.Position(r.modelLineNumber,g)}getModelEndPositionOfViewLine(r){const l=this.modelLineProjections[r.modelLineNumber-1],s=l.getViewLineMaxColumn(this.model,r.modelLineNumber,r.modelLineWrappedLineIdx),g=l.getModelColumnOfViewPosition(r.modelLineWrappedLineIdx,s);return new k.Position(r.modelLineNumber,g)}getViewLineInfosGroupedByModelRanges(r,l){const s=this.getViewLineInfo(r),g=this.getViewLineInfo(l),h=new Array;let m=this.getModelStartPositionOfViewLine(s),C=new Array;for(let w=s.modelLineNumber;w<=g.modelLineNumber;w++){const D=this.modelLineProjections[w-1];if(D.isVisible()){const I=w===s.modelLineNumber?s.modelLineWrappedLineIdx:0,M=w===g.modelLineNumber?g.modelLineWrappedLineIdx+1:D.getViewLineCount();for(let A=I;A{if(O.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,O.forWrappedLinesAfterColumn).lineNumber>=I.modelLineWrappedLineIdx||O.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,O.forWrappedLinesBeforeOrAtColumn).lineNumberI.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(I.modelLineNumber,O.horizontalLine.endColumn),P=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,O.horizontalLine.endColumn);return P.lineNumber===I.modelLineWrappedLineIdx?new E.IndentGuide(O.visibleColumn,T,O.className,new E.IndentGuideHorizontalLine(O.horizontalLine.top,N.column),-1,-1):P.lineNumber!!O))}}return m}getViewLinesIndentGuides(r,l){r=this._toValidViewLineNumber(r),l=this._toValidViewLineNumber(l);const s=this.convertViewPositionToModelPosition(r,this.getViewLineMinColumn(r)),g=this.convertViewPositionToModelPosition(l,this.getViewLineMaxColumn(l));let h=[];const m=[],C=[],w=s.lineNumber-1,D=g.lineNumber-1;let I=null;for(let T=w;T<=D;T++){const N=this.modelLineProjections[T];if(N.isVisible()){const P=N.getViewLineNumberOfModelPosition(0,T===w?s.column:1),x=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(T+1)),R=x-P+1;let B=0;R>1&&N.getViewLineMinColumn(this.model,T+1,x)===1&&(B=P===0?1:2),m.push(R),C.push(B),I===null&&(I=new k.Position(T+1,0))}else I!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,T)),I=null)}I!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,g.lineNumber)),I=null);const M=l-r+1,A=new Array(M);let O=0;for(let T=0,N=h.length;Tl&&(T=!0,O=l-h+1),M.getViewLinesData(this.model,D+1,A,O,h-r,s,w),h+=O,T)break}return w}validateViewPosition(r,l,s){r=this._toValidViewLineNumber(r);const g=this.projectedModelLineLineCounts.getIndexOf(r-1),h=g.index,m=g.remainder,C=this.modelLineProjections[h],w=C.getViewLineMinColumn(this.model,h+1,m),D=C.getViewLineMaxColumn(this.model,h+1,m);lD&&(l=D);const I=C.getModelColumnOfViewPosition(m,l);return this.model.validatePosition(new k.Position(h+1,I)).equals(s)?new k.Position(r,l):this.convertModelPositionToViewPosition(s.lineNumber,s.column)}validateViewRange(r,l){const s=this.validateViewPosition(r.startLineNumber,r.startColumn,l.getStartPosition()),g=this.validateViewPosition(r.endLineNumber,r.endColumn,l.getEndPosition());return new y.Range(s.lineNumber,s.column,g.lineNumber,g.column)}convertViewPositionToModelPosition(r,l){const s=this.getViewLineInfo(r),g=this.modelLineProjections[s.modelLineNumber-1].getModelColumnOfViewPosition(s.modelLineWrappedLineIdx,l);return this.model.validatePosition(new k.Position(s.modelLineNumber,g))}convertViewRangeToModelRange(r){const l=this.convertViewPositionToModelPosition(r.startLineNumber,r.startColumn),s=this.convertViewPositionToModelPosition(r.endLineNumber,r.endColumn);return new y.Range(l.lineNumber,l.column,s.lineNumber,s.column)}convertModelPositionToViewPosition(r,l,s=2,g=!1,h=!1){const m=this.model.validatePosition(new k.Position(r,l)),C=m.lineNumber,w=m.column;let D=C-1,I=!1;if(h)for(;D0&&!this.modelLineProjections[D].isVisible();)D--,I=!0;if(D===0&&!this.modelLineProjections[D].isVisible())return new k.Position(g?0:1,1);const M=1+this.projectedModelLineLineCounts.getPrefixSum(D);let A;return I?h?A=this.modelLineProjections[D].getViewPositionOfModelPosition(M,1,s):A=this.modelLineProjections[D].getViewPositionOfModelPosition(M,this.model.getLineMaxColumn(D+1),s):A=this.modelLineProjections[C-1].getViewPositionOfModelPosition(M,w,s),A}convertModelRangeToViewRange(r,l=0){if(r.isEmpty()){const s=this.convertModelPositionToViewPosition(r.startLineNumber,r.startColumn,l);return y.Range.fromPositions(s)}else{const s=this.convertModelPositionToViewPosition(r.startLineNumber,r.startColumn,1),g=this.convertModelPositionToViewPosition(r.endLineNumber,r.endColumn,0);return new y.Range(s.lineNumber,s.column,g.lineNumber,g.column)}}getViewLineNumberOfModelPosition(r,l){let s=r-1;if(this.modelLineProjections[s].isVisible()){const h=1+this.projectedModelLineLineCounts.getPrefixSum(s);return this.modelLineProjections[s].getViewLineNumberOfModelPosition(h,l)}for(;s>0&&!this.modelLineProjections[s].isVisible();)s--;if(s===0&&!this.modelLineProjections[s].isVisible())return 1;const g=1+this.projectedModelLineLineCounts.getPrefixSum(s);return this.modelLineProjections[s].getViewLineNumberOfModelPosition(g,this.model.getLineMaxColumn(s+1))}getDecorationsInRange(r,l,s,g,h){const m=this.convertViewPositionToModelPosition(r.startLineNumber,r.startColumn),C=this.convertViewPositionToModelPosition(r.endLineNumber,r.endColumn);if(C.lineNumber-m.lineNumber<=r.endLineNumber-r.startLineNumber)return this.model.getDecorationsInRange(new y.Range(m.lineNumber,1,C.lineNumber,C.column),l,s,g,h);let w=[];const D=m.lineNumber-1,I=C.lineNumber-1;let M=null;for(let N=D;N<=I;N++)if(this.modelLineProjections[N].isVisible())M===null&&(M=new k.Position(N+1,N===D?m.column:1));else if(M!==null){const x=this.model.getLineMaxColumn(N);w=w.concat(this.model.getDecorationsInRange(new y.Range(M.lineNumber,M.column,N,x),l,s,g)),M=null}M!==null&&(w=w.concat(this.model.getDecorationsInRange(new y.Range(M.lineNumber,M.column,C.lineNumber,C.column),l,s,g)),M=null),w.sort((N,P)=>{const x=y.Range.compareRangesUsingStarts(N.range,P.range);return x===0?N.idP.id?1:0:x});const A=[];let O=0,T=null;for(const N of w){const P=N.id;T!==P&&(T=P,A[O++]=N)}return A}getInjectedTextAt(r){const l=this.getViewLineInfo(r.lineNumber);return this.modelLineProjections[l.modelLineNumber-1].getInjectedTextAt(l.modelLineWrappedLineIdx,r.column)}normalizePosition(r,l){const s=this.getViewLineInfo(r.lineNumber);return this.modelLineProjections[s.modelLineNumber-1].normalizePosition(s.modelLineWrappedLineIdx,r,l)}getLineIndentColumn(r){const l=this.getViewLineInfo(r);return l.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(l.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=i;function n(d){if(d.length===0)return[];const r=d.slice();r.sort(y.Range.compareRangesUsingStarts);const l=[];let s=r[0].startLineNumber,g=r[0].endLineNumber;for(let h=1,m=r.length;hg+1?(l.push(new y.Range(s,1,g,1)),s=C.startLineNumber,g=C.endLineNumber):C.endLineNumber>g&&(g=C.endLineNumber)}return l.push(new y.Range(s,1,g,1)),l}class t{constructor(r,l){this.modelLineNumber=r,this.modelLineWrappedLineIdx=l}}class a{constructor(r,l){this.modelRange=r,this.viewLines=l}}class u{constructor(r){this._lines=r}convertViewPositionToModelPosition(r){return this._lines.convertViewPositionToModelPosition(r.lineNumber,r.column)}convertViewRangeToModelRange(r){return this._lines.convertViewRangeToModelRange(r)}validateViewPosition(r,l){return this._lines.validateViewPosition(r.lineNumber,r.column,l)}validateViewRange(r,l){return this._lines.validateViewRange(r,l)}convertModelPositionToViewPosition(r,l,s,g){return this._lines.convertModelPositionToViewPosition(r.lineNumber,r.column,l,s,g)}convertModelRangeToViewRange(r,l){return this._lines.convertModelRangeToViewRange(r,l)}modelPositionIsVisible(r){return this._lines.modelPositionIsVisible(r.lineNumber,r.column)}getModelLineViewLineCount(r){return this._lines.getModelLineViewLineCount(r)}getViewLineNumberOfModelPosition(r,l){return this._lines.getViewLineNumberOfModelPosition(r,l)}}class f{constructor(r){this.model=r}dispose(){}createCoordinatesConverter(){return new c(this)}getHiddenAreas(){return[]}setHiddenAreas(r){return!1}setTabSize(r){return!1}setWrappingSettings(r,l,s,g){return!1}createLineBreaksComputer(){const r=[];return{addRequest:(l,s,g)=>{r.push(null)},finalize:()=>r}}onModelFlushed(){}onModelLinesDeleted(r,l,s){return new S.ViewLinesDeletedEvent(l,s)}onModelLinesInserted(r,l,s,g){return new S.ViewLinesInsertedEvent(l,s)}onModelLineChanged(r,l,s){return[!1,new S.ViewLinesChangedEvent(l,1),null,null]}acceptVersionId(r){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(r,l,s){return{startLineNumber:r,endLineNumber:r,indent:0}}getViewLinesBracketGuides(r,l,s){return new Array(l-r+1).fill([])}getViewLinesIndentGuides(r,l){const s=l-r+1,g=new Array(s);for(let h=0;hl)}getModelLineViewLineCount(r){return 1}getViewLineNumberOfModelPosition(r,l){return r}}}),define(ie[882],ne([1,0,13,14,38,2,17,12,36,784,75,11,5,112,31,79,334,214,546,336,85,333,215,881]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const h=!0;class m extends E.Disposable{constructor(T,N,P,x,R,B,W,V,U){if(super(),this.languageConfigurationService=W,this._themeService=V,this._attachedView=U,this.hiddenAreasModel=new D,this.previousHiddenAreas=[],this._editorId=T,this._configuration=N,this.model=P,this._eventDispatcher=new s.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new k.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=C.create(this.model),h&&this.model.isTooLargeForTokenization())this._lines=new g.ViewModelLinesFromModelAsIs(this.model);else{const F=this._configuration.options,j=F.get(50),J=F.get(137),le=F.get(144),ee=F.get(136),$=F.get(128);this._lines=new g.ViewModelLinesFromProjectedModel(this._editorId,this.model,x,R,j,this.model.getOptions().tabSize,J,le.wrappingColumn,ee,$)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new v.CursorsController(P,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new c.ViewLayout(this._configuration,this.getLineCount(),B)),this._register(this.viewLayout.onDidScroll(F=>{F.scrollTopChanged&&this._handleVisibleLinesChanged(),F.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new f.ViewScrollChangedEvent(F)),this._eventDispatcher.emitOutgoingEvent(new s.ScrollChangedEvent(F.oldScrollWidth,F.oldScrollLeft,F.oldScrollHeight,F.oldScrollTop,F.scrollWidth,F.scrollLeft,F.scrollHeight,F.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(F=>{this._eventDispatcher.emitOutgoingEvent(F)})),this._decorations=new l.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(F=>{try{const j=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(j,F)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(d.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new f.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(F=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new f.ViewThemeChangedEvent(F))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(T){this._eventDispatcher.addViewEventHandler(T)}removeViewEventHandler(T){this._eventDispatcher.removeViewEventHandler(T)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const T=this.viewLayout.getLinesViewportData(),N=new i.Range(T.startLineNumber,this.getLineMinColumn(T.startLineNumber),T.endLineNumber,this.getLineMaxColumn(T.endLineNumber));return this._toModelVisibleRanges(N)}visibleLinesStabilized(){const T=this.getModelVisibleRanges();this._attachedView.setVisibleLines(T,!0)}_handleVisibleLinesChanged(){const T=this.getModelVisibleRanges();this._attachedView.setVisibleLines(T,!1)}setHasFocus(T){this._hasFocus=T,this._cursor.setHasFocus(T),this._eventDispatcher.emitSingleViewEvent(new f.ViewFocusChangedEvent(T)),this._eventDispatcher.emitOutgoingEvent(new s.FocusChangedEvent(!T,T))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const T=new o.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),N=this.coordinatesConverter.convertViewPositionToModelPosition(T);return new A(N,this._viewportStart.startLineDelta)}return new A(null,0)}_onConfigurationChanged(T,N){const P=this._captureStableViewport(),x=this._configuration.options,R=x.get(50),B=x.get(137),W=x.get(144),V=x.get(136),U=x.get(128);this._lines.setWrappingSettings(R,B,W.wrappingColumn,V,U)&&(T.emitViewEvent(new f.ViewFlushedEvent),T.emitViewEvent(new f.ViewLineMappingChangedEvent),T.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(T),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),N.hasChanged(90)&&(this._decorations.reset(),T.emitViewEvent(new f.ViewDecorationsChangedEvent(null))),N.hasChanged(97)&&(this._decorations.reset(),T.emitViewEvent(new f.ViewDecorationsChangedEvent(null))),T.emitViewEvent(new f.ViewConfigurationChangedEvent(N)),this.viewLayout.onConfigurationChanged(N),P.recoverViewportStart(this.coordinatesConverter,this.viewLayout),b.CursorConfiguration.shouldRecreate(N)&&(this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(T=>{try{const P=this._eventDispatcher.beginEmitViewEvents();let x=!1,R=!1;const B=T instanceof n.InternalModelContentChangeEvent?T.rawContentChangedEvent.changes:T.changes,W=T instanceof n.InternalModelContentChangeEvent?T.rawContentChangedEvent.versionId:null,V=this._lines.createLineBreaksComputer();for(const j of B)switch(j.changeType){case 4:{for(let J=0;J!$.ownerId||$.ownerId===this._editorId)),V.addRequest(le,ee,null)}break}case 2:{let J=null;j.injectedText&&(J=j.injectedText.filter(le=>!le.ownerId||le.ownerId===this._editorId)),V.addRequest(j.detail,J,null);break}}const U=V.finalize(),F=new L.ArrayQueue(U);for(const j of B)switch(j.changeType){case 1:{this._lines.onModelFlushed(),P.emitViewEvent(new f.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),x=!0;break}case 3:{const J=this._lines.onModelLinesDeleted(W,j.fromLineNumber,j.toLineNumber);J!==null&&(P.emitViewEvent(J),this.viewLayout.onLinesDeleted(J.fromLineNumber,J.toLineNumber)),x=!0;break}case 4:{const J=F.takeCount(j.detail.length),le=this._lines.onModelLinesInserted(W,j.fromLineNumber,j.toLineNumber,J);le!==null&&(P.emitViewEvent(le),this.viewLayout.onLinesInserted(le.fromLineNumber,le.toLineNumber)),x=!0;break}case 2:{const J=F.dequeue(),[le,ee,$,te]=this._lines.onModelLineChanged(W,j.lineNumber,J);R=le,ee&&P.emitViewEvent(ee),$&&(P.emitViewEvent($),this.viewLayout.onLinesInserted($.fromLineNumber,$.toLineNumber)),te&&(P.emitViewEvent(te),this.viewLayout.onLinesDeleted(te.fromLineNumber,te.toLineNumber));break}case 5:break}W!==null&&this._lines.acceptVersionId(W),this.viewLayout.onHeightMaybeChanged(),!x&&R&&(P.emitViewEvent(new f.ViewLineMappingChangedEvent),P.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(P),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const N=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&N){const P=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(P){const x=this.coordinatesConverter.convertModelPositionToViewPosition(P.getStartPosition()),R=this.viewLayout.getVerticalOffsetForLineNumber(x.lineNumber);this.viewLayout.setScrollPosition({scrollTop:R+this._viewportStart.startLineDelta},1)}}try{const P=this._eventDispatcher.beginEmitViewEvents();T instanceof n.InternalModelContentChangeEvent&&P.emitOutgoingEvent(new s.ModelContentChangedEvent(T.contentChangedEvent)),this._cursor.onModelContentChanged(P,T)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(T=>{const N=[];for(let P=0,x=T.ranges.length;P{this._eventDispatcher.emitSingleViewEvent(new f.ViewLanguageConfigurationEvent),this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new s.ModelLanguageConfigurationChangedEvent(T))})),this._register(this.model.onDidChangeLanguage(T=>{this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new s.ModelLanguageChangedEvent(T))})),this._register(this.model.onDidChangeOptions(T=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const N=this._eventDispatcher.beginEmitViewEvents();N.emitViewEvent(new f.ViewFlushedEvent),N.emitViewEvent(new f.ViewLineMappingChangedEvent),N.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new s.ModelOptionsChangedEvent(T))})),this._register(this.model.onDidChangeDecorations(T=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new f.ViewDecorationsChangedEvent(T)),this._eventDispatcher.emitOutgoingEvent(new s.ModelDecorationsChangedEvent(T))}))}setHiddenAreas(T,N){var P;this.hiddenAreasModel.setHiddenAreas(N,T);const x=this.hiddenAreasModel.getMergedRanges();if(x===this.previousHiddenAreas)return;this.previousHiddenAreas=x;const R=this._captureStableViewport();let B=!1;try{const W=this._eventDispatcher.beginEmitViewEvents();B=this._lines.setHiddenAreas(x),B&&(W.emitViewEvent(new f.ViewFlushedEvent),W.emitViewEvent(new f.ViewLineMappingChangedEvent),W.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(W),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const V=(P=R.viewportStartModelPosition)===null||P===void 0?void 0:P.lineNumber;V&&x.some(F=>F.startLineNumber<=V&&V<=F.endLineNumber)||R.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),B&&this._eventDispatcher.emitOutgoingEvent(new s.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const T=this._configuration.options.get(143),N=this._configuration.options.get(66),P=Math.max(20,Math.round(T.height/N)),x=this.viewLayout.getLinesViewportData(),R=Math.max(1,x.completelyVisibleStartLineNumber-P),B=Math.min(this.getLineCount(),x.completelyVisibleEndLineNumber+P);return this._toModelVisibleRanges(new i.Range(R,this.getLineMinColumn(R),B,this.getLineMaxColumn(B)))}getVisibleRanges(){const T=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(T)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(T){const N=this.coordinatesConverter.convertViewRangeToModelRange(T),P=this._lines.getHiddenAreas();if(P.length===0)return[N];const x=[];let R=0,B=N.startLineNumber,W=N.startColumn;const V=N.endLineNumber,U=N.endColumn;for(let F=0,j=P.length;FV||(B"u")return this._reduceRestoreStateCompatibility(T);const N=this.model.validatePosition(T.firstPosition),P=this.coordinatesConverter.convertModelPositionToViewPosition(N),x=this.viewLayout.getVerticalOffsetForLineNumber(P.lineNumber)-T.firstPositionDeltaTop;return{scrollLeft:T.scrollLeft,scrollTop:x}}_reduceRestoreStateCompatibility(T){return{scrollLeft:T.scrollLeft,scrollTop:T.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(T,N,P){this._viewportStart.update(this,T)}getActiveIndentGuide(T,N,P){return this._lines.getActiveIndentGuide(T,N,P)}getLinesIndentGuides(T,N){return this._lines.getViewLinesIndentGuides(T,N)}getBracketGuidesInRangeByLine(T,N,P,x){return this._lines.getViewLinesBracketGuides(T,N,P,x)}getLineContent(T){return this._lines.getViewLineContent(T)}getLineLength(T){return this._lines.getViewLineLength(T)}getLineMinColumn(T){return this._lines.getViewLineMinColumn(T)}getLineMaxColumn(T){return this._lines.getViewLineMaxColumn(T)}getLineFirstNonWhitespaceColumn(T){const N=p.firstNonWhitespaceIndex(this.getLineContent(T));return N===-1?0:N+1}getLineLastNonWhitespaceColumn(T){const N=p.lastNonWhitespaceIndex(this.getLineContent(T));return N===-1?0:N+2}getMinimapDecorationsInRange(T){return this._decorations.getMinimapDecorationsInRange(T)}getDecorationsInViewport(T){return this._decorations.getDecorationsViewportData(T).decorations}getInjectedTextAt(T){return this._lines.getInjectedTextAt(T)}getViewportViewLineRenderingData(T,N){const x=this._decorations.getDecorationsViewportData(T).inlineDecorations[N-T.startLineNumber];return this._getViewLineRenderingData(N,x)}getViewLineRenderingData(T){const N=this._decorations.getInlineDecorationsOnLine(T);return this._getViewLineRenderingData(T,N)}_getViewLineRenderingData(T,N){const P=this.model.mightContainRTL(),x=this.model.mightContainNonBasicASCII(),R=this.getTabSize(),B=this._lines.getViewLineData(T);return B.inlineDecorations&&(N=[...N,...B.inlineDecorations.map(W=>W.toInlineDecoration(T))]),new r.ViewLineRenderingData(B.minColumn,B.maxColumn,B.content,B.continuesWithWrappedLine,P,x,B.tokens,N,R,B.startVisibleColumn)}getViewLineData(T){return this._lines.getViewLineData(T)}getMinimapLinesRenderingData(T,N,P){const x=this._lines.getViewLinesData(T,N,P);return new r.MinimapLinesRenderingData(this.getTabSize(),x)}getAllOverviewRulerDecorations(T){const N=this.model.getOverviewRulerDecorations(this._editorId,(0,S.filterValidationDecorations)(this._configuration.options)),P=new w;for(const x of N){const R=x.options,B=R.overviewRuler;if(!B)continue;const W=B.position;if(W===0)continue;const V=B.getColor(T.value),U=this.coordinatesConverter.getViewLineNumberOfModelPosition(x.range.startLineNumber,x.range.startColumn),F=this.coordinatesConverter.getViewLineNumberOfModelPosition(x.range.endLineNumber,x.range.endColumn);P.accept(V,R.zIndex,U,F,W)}return P.asArray}_invalidateDecorationsColorCache(){const T=this.model.getOverviewRulerDecorations();for(const N of T){const P=N.options.overviewRuler;P?.invalidateCachedColor();const x=N.options.minimap;x?.invalidateCachedColor()}}getValueInRange(T,N){const P=this.coordinatesConverter.convertViewRangeToModelRange(T);return this.model.getValueInRange(P,N)}getValueLengthInRange(T,N){const P=this.coordinatesConverter.convertViewRangeToModelRange(T);return this.model.getValueLengthInRange(P,N)}modifyPosition(T,N){const P=this.coordinatesConverter.convertViewPositionToModelPosition(T);return this.model.modifyPosition(P,N)}deduceModelPositionRelativeToViewPosition(T,N,P){const x=this.coordinatesConverter.convertViewPositionToModelPosition(T);this.model.getEOL().length===2&&(N<0?N-=P:N+=P);const B=this.model.getOffsetAt(x)+N;return this.model.getPositionAt(B)}getPlainTextToCopy(T,N,P){const x=P?`\r `:this.model.getEOL();T=T.slice(0),T.sort(i.Range.compareRangesUsingStarts);let R=!1,B=!1;for(const V of T)V.isEmpty()?R=!0:B=!0;if(!B){if(!N)return"";const V=T.map(F=>F.startLineNumber);let U="";for(let F=0;F0&&V[F-1]===V[F]||(U+=this.model.getLineContent(V[F])+x);return U}if(R&&N){const V=[];let U=0;for(const F of T){const j=F.startLineNumber;F.isEmpty()?j!==U&&V.push(this.model.getLineContent(j)):V.push(this.model.getValueInRange(F,P?2:0)),U=j}return V.length===1?V[0]:V}const W=[];for(const V of T)V.isEmpty()||W.push(this.model.getValueInRange(V,P?2:0));return W.length===1?W[0]:W}getRichTextToCopy(T,N){const P=this.model.getLanguageId();if(P===a.PLAINTEXT_LANGUAGE_ID||T.length!==1)return null;let x=T[0];if(x.isEmpty()){if(!N)return null;const F=x.startLineNumber;x=new i.Range(F,this.model.getLineMinColumn(F),F,this.model.getLineMaxColumn(F))}const R=this._configuration.options.get(50),B=this._getColorMap(),V=/[:;\\\/<>]/.test(R.fontFamily)||R.fontFamily===S.EDITOR_FONT_DEFAULTS.fontFamily;let U;return V?U=S.EDITOR_FONT_DEFAULTS.fontFamily:(U=R.fontFamily,U=U.replace(/"/g,"'"),/[,']/.test(U)||/[+ ]/.test(U)&&(U=`'${U}'`),U=`${U}, ${S.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:P,html:`
    `+this._getHTMLToCopy(x,B)+"
    "}}_getHTMLToCopy(T,N){const P=T.startLineNumber,x=T.startColumn,R=T.endLineNumber,B=T.endColumn,W=this.getTabSize();let V="";for(let U=P;U<=R;U++){const F=this.model.tokenization.getLineTokens(U),j=F.getLineContent(),J=U===P?x-1:0,le=U===R?B-1:j.length;j===""?V+="
    ":V+=(0,u.tokenizeLineToHTML)(j,F.inflate(),N,J,le,W,_.isWindows)}return V}_getColorMap(){const T=t.TokenizationRegistry.getColorMap(),N=["#000000"];if(T)for(let P=1,x=T.length;Pthis._cursor.setStates(x,T,N,P))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(T){this._cursor.setCursorColumnSelectData(T)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(T){this._cursor.setPrevEditOperationType(T)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(T,N,P=0){this._withViewEventsCollector(x=>this._cursor.setSelections(x,T,N,P))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(T){this._withViewEventsCollector(N=>this._cursor.restoreState(N,T))}_executeCursorEdit(T){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new s.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(T)}executeEdits(T,N,P){this._executeCursorEdit(x=>this._cursor.executeEdits(x,T,N,P))}startComposition(){this._executeCursorEdit(T=>this._cursor.startComposition(T))}endComposition(T){this._executeCursorEdit(N=>this._cursor.endComposition(N,T))}type(T,N){this._executeCursorEdit(P=>this._cursor.type(P,T,N))}compositionType(T,N,P,x,R){this._executeCursorEdit(B=>this._cursor.compositionType(B,T,N,P,x,R))}paste(T,N,P,x){this._executeCursorEdit(R=>this._cursor.paste(R,T,N,P,x))}cut(T){this._executeCursorEdit(N=>this._cursor.cut(N,T))}executeCommand(T,N){this._executeCursorEdit(P=>this._cursor.executeCommand(P,T,N))}executeCommands(T,N){this._executeCursorEdit(P=>this._cursor.executeCommands(P,T,N))}revealPrimaryCursor(T,N,P=!1){this._withViewEventsCollector(x=>this._cursor.revealPrimary(x,T,P,0,N,0))}revealTopMostCursor(T){const N=this._cursor.getTopMostViewPosition(),P=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(x=>x.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,P,null,0,!0,0)))}revealBottomMostCursor(T){const N=this._cursor.getBottomMostViewPosition(),P=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(x=>x.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,P,null,0,!0,0)))}revealRange(T,N,P,x,R){this._withViewEventsCollector(B=>B.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,P,null,x,N,R)))}changeWhitespace(T){this.viewLayout.changeWhitespace(T)&&(this._eventDispatcher.emitSingleViewEvent(new f.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new s.ViewZonesChangedEvent))}_withViewEventsCollector(T){try{const N=this._eventDispatcher.beginEmitViewEvents();return T(N)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(T,N){return this._lines.normalizePosition(T,N)}getLineIndentColumn(T){return this._lines.getLineIndentColumn(T)}}e.ViewModel=m;class C{static create(T){const N=T._setTrackedRange(null,new i.Range(1,1,1,1),1);return new C(T,1,!1,N,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(T,N,P,x,R){this._model=T,this._viewLineNumber=N,this._isValid=P,this._modelTrackedRange=x,this._startLineDelta=R}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(T,N){const P=T.coordinatesConverter.convertViewPositionToModelPosition(new o.Position(N,T.getLineMinColumn(N))),x=T.model._setTrackedRange(this._modelTrackedRange,new i.Range(P.lineNumber,P.column,P.lineNumber,P.column),1),R=T.viewLayout.getVerticalOffsetForLineNumber(N),B=T.viewLayout.getCurrentScrollTop();this._viewLineNumber=N,this._isValid=!0,this._modelTrackedRange=x,this._startLineDelta=B-R}invalidate(){this._isValid=!1}}class w{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(T,N,P,x,R){const B=this._asMap[T];if(B){const W=B.data,V=W[W.length-3],U=W[W.length-1];if(V===R&&U+1>=P){x>U&&(W[W.length-1]=x);return}W.push(R,P,x)}else{const W=new r.OverviewRulerDecorationsGroup(T,N,[R,P,x]);this._asMap[T]=W,this.asArray.push(W)}}}class D{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(T,N){const P=this.hiddenAreas.get(T);P&&M(P,N)||(this.hiddenAreas.set(T,N),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const T=Array.from(this.hiddenAreas.values()).reduce((N,P)=>I(N,P),[]);return M(this.ranges,T)?this.ranges:(this.ranges=T,this.ranges)}}function I(O,T){const N=[];let P=0,x=0;for(;P{this._onDidChangeConfiguration.fire(Pe);const Be=this._configuration.options;if(Pe.hasChanged(143)){const Le=Be.get(143);this._onDidLayoutChange.fire(Le)}})),this._contextKeyService=this._register(ce.createScoped(this._domElement)),this._notificationService=pe,this._codeEditorService=q,this._commandService=ae,this._themeService=ge,this._register(new ee(this,this._contextKeyService)),this._register(new $(this,this._contextKeyService,Ce)),this._instantiationService=se.createChild(new D.ServiceCollection([C.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new te(K),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let Te;Array.isArray(z.contributions)?Te=z.contributions:Te=v.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,Te,this._instantiationService);for(const Pe of v.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(Pe.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${Pe.id}`));continue}const Be=new c.InternalEditorAction(Pe.id,Pe.label,Pe.alias,Pe.metadata,(Se=Pe.precondition)!==null&&Se!==void 0?Se:void 0,()=>this._instantiationService.invokeFunction(Le=>Promise.resolve(Pe.runEditorCommand(Le,this,null))),this._contextKeyService);this._actions.set(Be.id,Be)}const Me=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new k.DragAndDropObserver(this._domElement,{onDragOver:Pe=>{if(!Me())return;const Be=this.getTargetAtClientPoint(Pe.clientX,Pe.clientY);Be?.position&&this.showDropIndicatorAt(Be.position)},onDrop:async Pe=>{if(!Me()||(this.removeDropIndicator(),!Pe.dataTransfer))return;const Be=this.getTargetAtClientPoint(Pe.clientX,Pe.clientY);Be?.position&&this._onDropIntoEditor.fire({position:Be.position,event:Pe})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(K){var H;(H=this._modelData)===null||H===void 0||H.view.writeScreenReaderContent(K)}_createConfiguration(K,H,z){return new S.EditorConfiguration(K,H,this._domElement,z)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return d.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(K){return this._instantiationService.invokeFunction(K)}updateOptions(K){this._configuration.updateOptions(K||{})}getOptions(){return this._configuration.options}getOption(K){return this._configuration.options.get(K)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(K){return this._modelData?N.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),K):null}getValue(K=null){if(!this._modelData)return"";const H=!!(K&&K.preserveBOM);let z=0;return K&&K.lineEnding&&K.lineEnding===` `?z=1:K&&K.lineEnding&&K.lineEnding===`\r `&&(z=2),this._modelData.model.getValue(z,H)}setValue(K){this._modelData&&this._modelData.model.setValue(K)}getModel(){return this._modelData?this._modelData.model:null}setModel(K=null){const H=K;if(this._modelData===null&&H===null||this._modelData&&this._modelData.model===H)return;const z=this.hasTextFocus(),se=this._detachModel();this._attachModel(H),z&&this.hasModel()&&this.focus();const q={oldModelUrl:se?se.uri:null,newModelUrl:H?H.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(q),this._postDetachModelCleanup(se),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const K in this._decorationTypeSubtypes){const H=this._decorationTypeSubtypes[K];for(const z in H)this._removeDecorationType(K+"-"+z)}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(K,H,z,se){const q=K.model.validatePosition({lineNumber:H,column:z}),ae=K.viewModel.coordinatesConverter.convertModelPositionToViewPosition(q);return K.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(ae.lineNumber,se)}getTopForLineNumber(K,H=!1){return this._modelData?V._getVerticalOffsetForPosition(this._modelData,K,1,H):-1}getTopForPosition(K,H){return this._modelData?V._getVerticalOffsetForPosition(this._modelData,K,H,!1):-1}static _getVerticalOffsetForPosition(K,H,z,se=!1){const q=K.model.validatePosition({lineNumber:H,column:z}),ae=K.viewModel.coordinatesConverter.convertModelPositionToViewPosition(q);return K.viewModel.viewLayout.getVerticalOffsetForLineNumber(ae.lineNumber,se)}getBottomForLineNumber(K,H=!1){return this._modelData?V._getVerticalOffsetAfterPosition(this._modelData,K,1,H):-1}setHiddenAreas(K,H){var z;(z=this._modelData)===null||z===void 0||z.viewModel.setHiddenAreas(K.map(se=>u.Range.lift(se)),H)}getVisibleColumnFromPosition(K){if(!this._modelData)return K.column;const H=this._modelData.model.validatePosition(K),z=this._modelData.model.getOptions().tabSize;return t.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(H.lineNumber),H.column,z)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(K,H="api"){if(this._modelData){if(!a.Position.isIPosition(K))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(H,[{selectionStartLineNumber:K.lineNumber,selectionStartColumn:K.column,positionLineNumber:K.lineNumber,positionColumn:K.column}])}}_sendRevealRange(K,H,z,se){if(!this._modelData)return;if(!u.Range.isIRange(K))throw new Error("Invalid arguments");const q=this._modelData.model.validateRange(K),ae=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(q);this._modelData.viewModel.revealRange("api",z,ae,H,se)}revealLine(K,H=0){this._revealLine(K,0,H)}revealLineInCenter(K,H=0){this._revealLine(K,1,H)}revealLineInCenterIfOutsideViewport(K,H=0){this._revealLine(K,2,H)}revealLineNearTop(K,H=0){this._revealLine(K,5,H)}_revealLine(K,H,z){if(typeof K!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(K,1,K,1),H,!1,z)}revealPosition(K,H=0){this._revealPosition(K,0,!0,H)}revealPositionInCenter(K,H=0){this._revealPosition(K,1,!0,H)}revealPositionInCenterIfOutsideViewport(K,H=0){this._revealPosition(K,2,!0,H)}revealPositionNearTop(K,H=0){this._revealPosition(K,5,!0,H)}_revealPosition(K,H,z,se){if(!a.Position.isIPosition(K))throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(K.lineNumber,K.column,K.lineNumber,K.column),H,z,se)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(K,H="api"){const z=f.Selection.isISelection(K),se=u.Range.isIRange(K);if(!z&&!se)throw new Error("Invalid arguments");if(z)this._setSelectionImpl(K,H);else if(se){const q={selectionStartLineNumber:K.startLineNumber,selectionStartColumn:K.startColumn,positionLineNumber:K.endLineNumber,positionColumn:K.endColumn};this._setSelectionImpl(q,H)}}_setSelectionImpl(K,H){if(!this._modelData)return;const z=new f.Selection(K.selectionStartLineNumber,K.selectionStartColumn,K.positionLineNumber,K.positionColumn);this._modelData.viewModel.setSelections(H,[z])}revealLines(K,H,z=0){this._revealLines(K,H,0,z)}revealLinesInCenter(K,H,z=0){this._revealLines(K,H,1,z)}revealLinesInCenterIfOutsideViewport(K,H,z=0){this._revealLines(K,H,2,z)}revealLinesNearTop(K,H,z=0){this._revealLines(K,H,5,z)}_revealLines(K,H,z,se){if(typeof K!="number"||typeof H!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(K,1,H,1),z,!1,se)}revealRange(K,H=0,z=!1,se=!0){this._revealRange(K,z?1:0,se,H)}revealRangeInCenter(K,H=0){this._revealRange(K,1,!0,H)}revealRangeInCenterIfOutsideViewport(K,H=0){this._revealRange(K,2,!0,H)}revealRangeNearTop(K,H=0){this._revealRange(K,5,!0,H)}revealRangeNearTopIfOutsideViewport(K,H=0){this._revealRange(K,6,!0,H)}revealRangeAtTop(K,H=0){this._revealRange(K,3,!0,H)}_revealRange(K,H,z,se){if(!u.Range.isIRange(K))throw new Error("Invalid arguments");this._sendRevealRange(u.Range.lift(K),H,z,se)}setSelections(K,H="api",z=0){if(this._modelData){if(!K||K.length===0)throw new Error("Invalid arguments");for(let se=0,q=K.length;se0&&this._modelData.viewModel.restoreCursorState(z):this._modelData.viewModel.restoreCursorState([z]),this._contributions.restoreViewState(H.contributionsState||{});const se=this._modelData.viewModel.reduceRestoreState(H.viewState);this._modelData.view.restoreState(se)}}handleInitialized(){var K;(K=this._getViewModel())===null||K===void 0||K.visibleLinesStabilized()}getContribution(K){return this._contributions.get(K)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let K=this.getActions();return K=K.filter(H=>H.isSupported()),K}getAction(K){return this._actions.get(K)||null}trigger(K,H,z){switch(z=z||{},H){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(K);return;case"type":{const q=z;this._type(K,q.text||"");return}case"replacePreviousChar":{const q=z;this._compositionType(K,q.text||"",q.replaceCharCnt||0,0,0);return}case"compositionType":{const q=z;this._compositionType(K,q.text||"",q.replacePrevCharCnt||0,q.replaceNextCharCnt||0,q.positionDelta||0);return}case"paste":{const q=z;this._paste(K,q.text||"",q.pasteOnNewLine||!1,q.multicursorText||null,q.mode||null);return}case"cut":this._cut(K);return}const se=this.getAction(H);if(se){Promise.resolve(se.run(z)).then(void 0,y.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(K,H,z)||this._triggerCommand(H,z))}_triggerCommand(K,H){this._commandService.executeCommand(K,H)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(K){this._modelData&&(this._modelData.viewModel.endComposition(K),this._onDidCompositionEnd.fire())}_type(K,H){!this._modelData||H.length===0||(K==="keyboard"&&this._onWillType.fire(H),this._modelData.viewModel.type(H,K),K==="keyboard"&&this._onDidType.fire(H))}_compositionType(K,H,z,se,q){this._modelData&&this._modelData.viewModel.compositionType(H,z,se,q,K)}_paste(K,H,z,se,q){if(!this._modelData||H.length===0)return;const ae=this._modelData.viewModel,ce=ae.getSelection().getStartPosition();ae.paste(H,z,se,K);const ge=ae.getSelection().getStartPosition();K==="keyboard"&&this._onDidPaste.fire({range:new u.Range(ce.lineNumber,ce.column,ge.lineNumber,ge.column),languageId:q})}_cut(K){this._modelData&&this._modelData.viewModel.cut(K)}_triggerEditorCommand(K,H,z){const se=v.EditorExtensionsRegistry.getEditorCommand(H);return se?(z=z||{},z.source=K,this._instantiationService.invokeFunction(q=>{Promise.resolve(se.runEditorCommand(q,this,z)).then(void 0,y.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(K,H,z){if(!this._modelData||this._configuration.options.get(90))return!1;let se;return z?Array.isArray(z)?se=()=>z:se=z:se=()=>null,this._modelData.viewModel.executeEdits(K,H,se),!0}executeCommand(K,H){this._modelData&&this._modelData.viewModel.executeCommand(H,K)}executeCommands(K,H){this._modelData&&this._modelData.viewModel.executeCommands(H,K)}createDecorationsCollection(K){return new G(this,K)}changeDecorations(K){return this._modelData?this._modelData.model.changeDecorations(K,this._id):null}getLineDecorations(K){return this._modelData?this._modelData.model.getLineDecorations(K,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(K){return this._modelData?this._modelData.model.getDecorationsInRange(K,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(K,H){return this._modelData?K.length===0&&H.length===0?K:this._modelData.model.deltaDecorations(K,H,this._id):[]}removeDecorations(K){!this._modelData||K.length===0||this._modelData.model.changeDecorations(H=>{H.deltaDecorations(K,[])})}removeDecorationsByType(K){const H=this._decorationTypeKeysToIds[K];H&&this.deltaDecorations(H,[]),this._decorationTypeKeysToIds.hasOwnProperty(K)&&delete this._decorationTypeKeysToIds[K],this._decorationTypeSubtypes.hasOwnProperty(K)&&delete this._decorationTypeSubtypes[K]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(K){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(K)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(K){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(K)}delegateScrollFromMouseWheelEvent(K){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(K)}layout(K,H=!1){this._configuration.observeContainer(K),H||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(K){const H={widget:K,position:K.getPosition()};this._contentWidgets.hasOwnProperty(K.getId())&&console.warn("Overwriting a content widget with the same id:"+K.getId()),this._contentWidgets[K.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(H)}layoutContentWidget(K){const H=K.getId();if(this._contentWidgets.hasOwnProperty(H)){const z=this._contentWidgets[H];z.position=K.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(z)}}removeContentWidget(K){const H=K.getId();if(this._contentWidgets.hasOwnProperty(H)){const z=this._contentWidgets[H];delete this._contentWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(z)}}addOverlayWidget(K){const H={widget:K,position:K.getPosition()};this._overlayWidgets.hasOwnProperty(K.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[K.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(H)}layoutOverlayWidget(K){const H=K.getId();if(this._overlayWidgets.hasOwnProperty(H)){const z=this._overlayWidgets[H];z.position=K.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(z)}}removeOverlayWidget(K){const H=K.getId();if(this._overlayWidgets.hasOwnProperty(H)){const z=this._overlayWidgets[H];delete this._overlayWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(z)}}addGlyphMarginWidget(K){const H={widget:K,position:K.getPosition()};this._glyphMarginWidgets.hasOwnProperty(K.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[K.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(H)}layoutGlyphMarginWidget(K){const H=K.getId();if(this._glyphMarginWidgets.hasOwnProperty(H)){const z=this._glyphMarginWidgets[H];z.position=K.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(z)}}removeGlyphMarginWidget(K){const H=K.getId();if(this._glyphMarginWidgets.hasOwnProperty(H)){const z=this._glyphMarginWidgets[H];delete this._glyphMarginWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(z)}}changeViewZones(K){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(K)}getTargetAtClientPoint(K,H){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(K,H)}getScrolledVisiblePosition(K){if(!this._modelData||!this._modelData.hasRealView)return null;const H=this._modelData.model.validatePosition(K),z=this._configuration.options,se=z.get(143),q=V._getVerticalOffsetForPosition(this._modelData,H.lineNumber,H.column)-this.getScrollTop(),ae=this._modelData.view.getOffsetForColumn(H.lineNumber,H.column)+se.glyphMarginWidth+se.lineNumbersWidth+se.decorationsWidth-this.getScrollLeft();return{top:q,left:ae,height:z.get(66)}}getOffsetForColumn(K,H){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(K,H)}render(K=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,K)}setAriaOptions(K){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(K)}applyFontInfo(K){(0,x.applyFontInfo)(K,this._configuration.options.get(50))}setBanner(K,H){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=K,this._configuration.setReservedHeight(K?H:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(K){if(!K){this._modelData=null;return}const H=[];this._domElement.setAttribute("data-mode-id",K.getLanguageId()),this._configuration.setIsDominatedByLongLines(K.isDominatedByLongLines()),this._configuration.setModelLineCount(K.getLineCount());const z=K.onBeforeAttached(),se=new h.ViewModel(this._id,this._configuration,K,T.DOMLineBreaksComputerFactory.create(k.getWindow(this._domElement)),O.MonospaceLineBreaksComputerFactory.create(this._configuration.options),ce=>k.scheduleAtNextAnimationFrame(k.getWindow(this._domElement),ce),this.languageConfigurationService,this._themeService,z);H.push(K.onWillDispose(()=>this.setModel(null))),H.push(se.onEvent(ce=>{switch(ce.kind){case 0:this._onDidContentSizeChange.fire(ce);break;case 1:this._editorTextFocus.setValue(ce.hasFocus);break;case 2:this._onDidScrollChange.fire(ce);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(ce.reachedMaxCursorCount){const ve=this.getOption(79),Ce=L.localize(0,null,ve);this._notificationService.prompt(I.Severity.Warning,Ce,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:L.localize(1,null),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const ge=[];for(let ve=0,Ce=ce.selections.length;ve{this._paste("keyboard",q,ae,ce,ge)},type:q=>{this._type("keyboard",q)},compositionType:(q,ae,ce,ge)=>{this._compositionType("keyboard",q,ae,ce,ge)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:H={paste:(q,ae,ce,ge)=>{const pe={text:q,pasteOnNewLine:ae,multicursorText:ce,mode:ge};this._commandService.executeCommand("paste",pe)},type:q=>{const ae={text:q};this._commandService.executeCommand("type",ae)},compositionType:(q,ae,ce,ge)=>{if(ce||ge){const pe={text:q,replacePrevCharCnt:ae,replaceNextCharCnt:ce,positionDelta:ge};this._commandService.executeCommand("compositionType",pe)}else{const pe={text:q,replaceCharCnt:ae};this._commandService.executeCommand("replacePreviousChar",pe)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const z=new i.ViewUserInputEvents(K.coordinatesConverter);return z.onKeyDown=q=>this._onKeyDown.fire(q),z.onKeyUp=q=>this._onKeyUp.fire(q),z.onContextMenu=q=>this._onContextMenu.fire(q),z.onMouseMove=q=>this._onMouseMove.fire(q),z.onMouseLeave=q=>this._onMouseLeave.fire(q),z.onMouseDown=q=>this._onMouseDown.fire(q),z.onMouseUp=q=>this._onMouseUp.fire(q),z.onMouseDrag=q=>this._onMouseDrag.fire(q),z.onMouseDrop=q=>this._onMouseDrop.fire(q),z.onMouseDropCanceled=q=>this._onMouseDropCanceled.fire(q),z.onMouseWheel=q=>this._onMouseWheel.fire(q),[new o.View(H,this._configuration,this._themeService.getColorTheme(),K,z,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(K){K?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const K=this._modelData.model,H=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),H&&this._domElement.contains(H)&&this._domElement.removeChild(H),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),K}_removeDecorationType(K){this._codeEditorService.removeDecorationType(K)}hasModel(){return this._modelData!==null}showDropIndicatorAt(K){const H=[{range:new u.Range(K.lineNumber,K.column,K.lineNumber,K.column),options:V.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(H),this.revealPosition(K,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(K,H){this._contextKeyService.createKey(K,H)}};e.CodeEditorWidget=j,j.dropIntoEditorDecorationOptions=l.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),e.CodeEditorWidget=j=V=Ee([he(3,w.IInstantiationService),he(4,b.ICodeEditorService),he(5,m.ICommandService),he(6,C.IContextKeyService),he(7,M.IThemeService),he(8,I.INotificationService),he(9,A.IAccessibilityService),he(10,P.ILanguageConfigurationService),he(11,R.ILanguageFeaturesService)],j);class J extends _.Disposable{constructor(K){super(),this._emitterOptions=K,this._onDidChangeToTrue=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new E.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(K){const H=K?2:1;this._value!==H&&(this._value=H,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=J;class le extends E.Emitter{constructor(K,H){super({deliveryQueue:H}),this._contributions=K}fire(K){this._contributions.onBeforeInteractionEvent(),super.fire(K)}}class ee extends _.Disposable{constructor(K,H){super(),this._editor=K,H.createKey("editorId",K.getId()),this._editorSimpleInput=r.EditorContextKeys.editorSimpleInput.bindTo(H),this._editorFocus=r.EditorContextKeys.focus.bindTo(H),this._textInputFocus=r.EditorContextKeys.textInputFocus.bindTo(H),this._editorTextFocus=r.EditorContextKeys.editorTextFocus.bindTo(H),this._tabMovesFocus=r.EditorContextKeys.tabMovesFocus.bindTo(H),this._editorReadonly=r.EditorContextKeys.readOnly.bindTo(H),this._inDiffEditor=r.EditorContextKeys.inDiffEditor.bindTo(H),this._editorColumnSelection=r.EditorContextKeys.columnSelection.bindTo(H),this._hasMultipleSelections=r.EditorContextKeys.hasMultipleSelections.bindTo(H),this._hasNonEmptySelection=r.EditorContextKeys.hasNonEmptySelection.bindTo(H),this._canUndo=r.EditorContextKeys.canUndo.bindTo(H),this._canRedo=r.EditorContextKeys.canRedo.bindTo(H),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(W.TabFocus.onDidChangeTabFocus(z=>this._tabMovesFocus.set(z))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const K=this._editor.getOptions();this._tabMovesFocus.set(W.TabFocus.getTabFocusMode()),this._editorReadonly.set(K.get(90)),this._inDiffEditor.set(K.get(61)),this._editorColumnSelection.set(K.get(22))}_updateFromSelection(){const K=this._editor.getSelections();K?(this._hasMultipleSelections.set(K.length>1),this._hasNonEmptySelection.set(K.some(H=>!H.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 K=this._editor.getModel();this._canUndo.set(!!(K&&K.canUndo())),this._canRedo.set(!!(K&&K.canRedo()))}}class $ extends _.Disposable{constructor(K,H,z){super(),this._editor=K,this._contextKeyService=H,this._languageFeaturesService=z,this._langId=r.EditorContextKeys.languageId.bindTo(H),this._hasCompletionItemProvider=r.EditorContextKeys.hasCompletionItemProvider.bindTo(H),this._hasCodeActionsProvider=r.EditorContextKeys.hasCodeActionsProvider.bindTo(H),this._hasCodeLensProvider=r.EditorContextKeys.hasCodeLensProvider.bindTo(H),this._hasDefinitionProvider=r.EditorContextKeys.hasDefinitionProvider.bindTo(H),this._hasDeclarationProvider=r.EditorContextKeys.hasDeclarationProvider.bindTo(H),this._hasImplementationProvider=r.EditorContextKeys.hasImplementationProvider.bindTo(H),this._hasTypeDefinitionProvider=r.EditorContextKeys.hasTypeDefinitionProvider.bindTo(H),this._hasHoverProvider=r.EditorContextKeys.hasHoverProvider.bindTo(H),this._hasDocumentHighlightProvider=r.EditorContextKeys.hasDocumentHighlightProvider.bindTo(H),this._hasDocumentSymbolProvider=r.EditorContextKeys.hasDocumentSymbolProvider.bindTo(H),this._hasReferenceProvider=r.EditorContextKeys.hasReferenceProvider.bindTo(H),this._hasRenameProvider=r.EditorContextKeys.hasRenameProvider.bindTo(H),this._hasSignatureHelpProvider=r.EditorContextKeys.hasSignatureHelpProvider.bindTo(H),this._hasInlayHintsProvider=r.EditorContextKeys.hasInlayHintsProvider.bindTo(H),this._hasDocumentFormattingProvider=r.EditorContextKeys.hasDocumentFormattingProvider.bindTo(H),this._hasDocumentSelectionFormattingProvider=r.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(H),this._hasMultipleDocumentFormattingProvider=r.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(H),this._hasMultipleDocumentSelectionFormattingProvider=r.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(H),this._isInWalkThrough=r.EditorContextKeys.isInWalkThroughSnippet.bindTo(H);const se=()=>this._update();this._register(K.onDidChangeModel(se)),this._register(K.onDidChangeModelLanguage(se)),this._register(z.completionProvider.onDidChange(se)),this._register(z.codeActionProvider.onDidChange(se)),this._register(z.codeLensProvider.onDidChange(se)),this._register(z.definitionProvider.onDidChange(se)),this._register(z.declarationProvider.onDidChange(se)),this._register(z.implementationProvider.onDidChange(se)),this._register(z.typeDefinitionProvider.onDidChange(se)),this._register(z.hoverProvider.onDidChange(se)),this._register(z.documentHighlightProvider.onDidChange(se)),this._register(z.documentSymbolProvider.onDidChange(se)),this._register(z.referenceProvider.onDidChange(se)),this._register(z.renameProvider.onDidChange(se)),this._register(z.documentFormattingEditProvider.onDidChange(se)),this._register(z.documentRangeFormattingEditProvider.onDidChange(se)),this._register(z.signatureHelpProvider.onDidChange(se)),this._register(z.inlayHintsProvider.onDidChange(se)),se()}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 K=this._editor.getModel();if(!K){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(K.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(K)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(K)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(K)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(K)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(K)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(K)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(K)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(K)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(K)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(K)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(K)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(K)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(K)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(K)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(K)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(K)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(K)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(K).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(K).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(K).length>1),this._isInWalkThrough.set(K.uri.scheme===p.Schemas.walkThroughSnippet)})}}e.EditorModeContext=$;class te extends _.Disposable{constructor(K){super(),this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(k.trackFocus(K)),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}}class G{get length(){return this._decorationIds.length}constructor(K,H){this._editor=K,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(H)&&H.length>0&&this.set(H)}onDidChange(K,H,z){return this._editor.onDidChangeModelDecorations(se=>{this._isChangingDecorations||K.call(H,se)},z)}getRange(K){return!this._editor.hasModel()||K>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[K])}getRanges(){if(!this._editor.hasModel())return[];const K=this._editor.getModel(),H=[];for(const z of this._decorationIds){const se=K.getDecorationRange(z);se&&H.push(se)}return H}has(K){return this._decorationIds.includes(K.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(K){try{this._isChangingDecorations=!0,this._editor.changeDecorations(H=>{this._decorationIds=H.deltaDecorations(this._decorationIds,K)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(K){let H=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(z=>{H=z.deltaDecorations([],K),this._decorationIds=this._decorationIds.concat(H)})}finally{this._isChangingDecorations=!1}return H}}const de=encodeURIComponent("");function X(Y){return de+encodeURIComponent(Y.toString())+ue}const Z=encodeURIComponent('');function oe(Y){return Z+encodeURIComponent(Y.toString())+re}(0,M.registerThemingParticipant)((Y,K)=>{const H=Y.getColor(g.editorErrorForeground);H&&K.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${X(H)}") repeat-x bottom left; }`);const z=Y.getColor(g.editorWarningForeground);z&&K.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${X(z)}") repeat-x bottom left; }`);const se=Y.getColor(g.editorInfoForeground);se&&K.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${X(se)}") repeat-x bottom left; }`);const q=Y.getColor(g.editorHintForeground);q&&K.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${oe(q)}") no-repeat bottom left; }`);const ae=Y.getColor(s.editorUnnecessaryCodeOpacity);ae&&K.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ae.rgba.a}; }`)})}),define(ie[256],ne([1,0,7,60,9,6,2,35,169,16,33,124,194,838,878,602,756,879,331,364,90,11,5,178,21,161,15,8,163,87,492,852,630,356,443,831]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A,O,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;let N=class extends M.DelegatingEditor{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(R,B,W,V,U,F,j,J){var le;super(),this._domElement=R,this._parentContextKeyService=V,this._parentInstantiationService=U,this._audioCueService=j,this._editorProgressService=J,this.elements=(0,L.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,L.h)("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[(0,L.$)("span",{},"No Changes")]),(0,L.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,L.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,L.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=(0,p.observableValue)(this,void 0),this._shouldDisposeDiffModel=!1,this.onDidChangeModel=E.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new D.ServiceCollection([C.IContextKeyService,this._contextKeyService])),this._boundarySashes=(0,p.observableValue)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,p.observableValue)(this,!1),this._accessibleDiffViewerVisible=(0,p.derived)(this,Y=>this._options.onlyShowAccessibleDiffViewer.read(Y)?!0:this._accessibleDiffViewerShouldBeVisible.read(Y)),this._movedBlocksLinesPart=(0,p.observableValue)(this,void 0),this._layoutInfo=(0,p.derived)(this,Y=>{var K,H,z,se,q;const ae=this._rootSizeObserver.width.read(Y),ce=this._rootSizeObserver.height.read(Y),ge=(K=this._sash.read(Y))===null||K===void 0?void 0:K.sashLeft.read(Y),pe=ge??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),me=ae-pe-((z=(H=this._overviewRulerPart.read(Y))===null||H===void 0?void 0:H.width)!==null&&z!==void 0?z:0),ve=(q=(se=this._movedBlocksLinesPart.read(Y))===null||se===void 0?void 0:se.width.read(Y))!==null&&q!==void 0?q:0,Ce=pe-ve;return this.elements.original.style.width=Ce+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=me+"px",this.elements.modified.style.left=pe+"px",this._editors.original.layout({width:Ce,height:ce},!0),this._editors.modified.layout({width:me,height:ce},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((Y,K)=>Y?.diff.read(K)),this.onDidUpdateDiff=E.Event.fromObservableLight(this._diffValue),F.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,_.toDisposable)(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new r.ObservableElementSizeObserver(this.elements.root,B.dimension)),this._rootSizeObserver.setAutomaticLayout((le=B.automaticLayout)!==null&&le!==void 0?le:!1),this._options=new O.DiffEditorOptions(B),this._register((0,p.autorun)(Y=>{this._options.setWidth(this._rootSizeObserver.width.read(Y))})),this._contextKeyService.createKey(h.EditorContextKeys.isEmbeddedDiffEditor.key,!1),this._register((0,r.bindContextKey)(h.EditorContextKeys.isEmbeddedDiffEditor,this._contextKeyService,Y=>this._options.isInEmbeddedEditor.read(Y))),this._register((0,r.bindContextKey)(h.EditorContextKeys.comparingMovedCode,this._contextKeyService,Y=>{var K;return!!(!((K=this._diffModel.read(Y))===null||K===void 0)&&K.movedTextToCompare.read(Y))})),this._register((0,r.bindContextKey)(h.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,Y=>this._options.couldShowInlineViewBecauseOfSize.read(Y))),this._register((0,r.bindContextKey)(h.EditorContextKeys.hasChanges,this._contextKeyService,Y=>{var K,H,z;return((z=(H=(K=this._diffModel.read(Y))===null||K===void 0?void 0:K.diff.read(Y))===null||H===void 0?void 0:H.mappings.length)!==null&&z!==void 0?z:0)>0})),this._editors=this._register(this._instantiationService.createInstance(A.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,W,(Y,K,H,z)=>this._createInnerEditor(Y,K,H,z))),this._overviewRulerPart=(0,S.derivedDisposable)(this,Y=>this._options.renderOverviewRuler.read(Y)?this._instantiationService.createInstance((0,r.readHotReloadableExport)(d.OverviewRulerPart,Y),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(K=>K.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=(0,S.derivedDisposable)(this,Y=>{const K=this._options.renderSideBySide.read(Y);return this.elements.root.classList.toggle("side-by-side",K),K?new a.DiffEditorSash(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((H,z)=>{var se,q;return H-((q=(se=this._overviewRulerPart.read(z))===null||se===void 0?void 0:se.width)!==null&&q!==void 0?q:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);const ee=(0,S.derivedDisposable)(this,Y=>this._instantiationService.createInstance((0,r.readHotReloadableExport)(u.HideUnchangedRegionsFeature,Y),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);(0,S.derivedDisposable)(this,Y=>this._instantiationService.createInstance((0,r.readHotReloadableExport)(t.DiffEditorDecorations,Y),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const $=new Set,te=new Set;let G=!1;const de=(0,S.derivedDisposable)(this,Y=>this._instantiationService.createInstance((0,r.readHotReloadableExport)(f.ViewZoneManager,Y),(0,L.getWindow)(this._domElement),this._editors,this._diffModel,this._options,this,()=>G||ee.get().isUpdatingHiddenAreas,$,te)).recomputeInitiallyAndOnChange(this._store),ue=(0,p.derived)(this,Y=>{const K=de.read(Y).viewZones.read(Y).orig,H=ee.read(Y).viewZones.read(Y).origViewZones;return K.concat(H)}),X=(0,p.derived)(this,Y=>{const K=de.read(Y).viewZones.read(Y).mod,H=ee.read(Y).viewZones.read(Y).modViewZones;return K.concat(H)});this._register((0,r.applyViewZones)(this._editors.original,ue,Y=>{G=Y},$));let Z;this._register((0,r.applyViewZones)(this._editors.modified,X,Y=>{G=Y,G?Z=o.StableEditorScrollState.capture(this._editors.modified):(Z?.restore(this._editors.modified),Z=void 0)},te)),this._accessibleDiffViewer=(0,S.derivedDisposable)(this,Y=>this._instantiationService.createInstance((0,r.readHotReloadableExport)(n.AccessibleDiffViewer,Y),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(K,H)=>this._accessibleDiffViewerShouldBeVisible.set(K,H),this._options.onlyShowAccessibleDiffViewer.map(K=>!K),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((K,H)=>{var z;return(z=K?.diff.read(H))===null||z===void 0?void 0:z.mappings.map(se=>se.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);const re=this._accessibleDiffViewerVisible.map(Y=>Y?"hidden":"visible");this._register((0,r.applyStyle)(this.elements.modified,{visibility:re})),this._register((0,r.applyStyle)(this.elements.original,{visibility:re})),this._createDiffEditorContributions(),F.addDiffEditor(this),this._register((0,p.recomputeInitiallyAndOnChange)(this._layoutInfo)),(0,S.derivedDisposable)(this,Y=>new((0,r.readHotReloadableExport)(c.MovedBlocksLinesPart,Y))(this.elements.root,this._diffModel,this._layoutInfo.map(K=>K.originalEditor),this._layoutInfo.map(K=>K.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,Y=>{this._movedBlocksLinesPart.set(Y,void 0)}),this._register((0,r.applyStyle)(this.elements.overlay,{width:this._layoutInfo.map((Y,K)=>Y.originalEditor.width+(this._options.renderSideBySide.read(K)?0:Y.modifiedEditor.width)),visibility:(0,p.derived)(Y=>{var K,H;return this._options.hideUnchangedRegions.read(Y)&&((H=(K=this._diffModel.read(Y))===null||K===void 0?void 0:K.diff.read(Y))===null||H===void 0?void 0:H.mappings.length)===0?"visible":"hidden"})})),this._register(E.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,Y=>{var K,H;if(Y?.reason===3){const z=(H=(K=this._diffModel.get())===null||K===void 0?void 0:K.diff.get())===null||H===void 0?void 0:H.mappings.find(se=>se.lineRangeMapping.modified.contains(Y.position.lineNumber));z?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):z?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):z&&this._audioCueService.playAudioCue(m.AudioCue.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const oe=this._diffModel.map(this,(Y,K)=>{if(Y)return Y.diff.read(K)===void 0&&!Y.isDiffUpToDate.read(K)});this._register((0,p.autorunWithStore)((Y,K)=>{if(oe.read(Y)===!0){const H=this._editorProgressService.show(!0,1e3);K.add((0,_.toDisposable)(()=>H.done()))}})),this._register((0,_.toDisposable)(()=>{var Y;this._shouldDisposeDiffModel&&((Y=this._diffModel.get())===null||Y===void 0||Y.dispose())}))}_createInnerEditor(R,B,W,V){return R.createInstance(i.CodeEditorWidget,B,W,V)}_createDiffEditorContributions(){const R=v.EditorExtensionsRegistry.getDiffEditorContributions();for(const B of R)try{this._register(this._instantiationService.createInstance(B.ctor,this))}catch(W){(0,y.onUnexpectedError)(W)}}get _targetEditor(){return this._editors.modified}getEditorType(){return g.EditorType.IDiffEditor}layout(R){this._rootSizeObserver.observe(R)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var R;const B=this._editors.original.saveViewState(),W=this._editors.modified.saveViewState();return{original:B,modified:W,modelState:(R=this._diffModel.get())===null||R===void 0?void 0:R.serializeState()}}restoreViewState(R){var B;if(R&&R.original&&R.modified){const W=R;this._editors.original.restoreViewState(W.original),this._editors.modified.restoreViewState(W.modified),W.modelState&&((B=this._diffModel.get())===null||B===void 0||B.restoreSerializedState(W.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(R){return this._instantiationService.createInstance(T.DiffEditorViewModel,R,this._options)}getModel(){var R,B;return(B=(R=this._diffModel.get())===null||R===void 0?void 0:R.model)!==null&&B!==void 0?B:null}setModel(R,B){!R&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const W=R?"model"in R?{model:R,shouldDispose:!1}:{model:this.createViewModel(R),shouldDispose:!0}:void 0;this._diffModel.get()!==W?.model&&(0,p.subtransaction)(B,V=>{var U;p.observableFromEvent.batchEventsGlobally(V,()=>{this._editors.original.setModel(W?W.model.model.original:null),this._editors.modified.setModel(W?W.model.model.modified:null)});const F=this._diffModel.get(),j=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(U=W?.shouldDispose)!==null&&U!==void 0?U:!1,this._diffModel.set(W?.model,V),j&&F?.dispose()})}updateOptions(R){this._options.updateOptions(R)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var R;const B=(R=this._diffModel.get())===null||R===void 0?void 0:R.diff.get();return B?P(B):null}revert(R){var B;if(R.innerChanges){this.revertRangeMappings(R.innerChanges);return}const W=(B=this._diffModel.get())===null||B===void 0?void 0:B.model;W&&this._editors.modified.executeEdits("diffEditor",[{range:R.modified.toExclusiveRange(),text:W.original.getValueInRange(R.original.toExclusiveRange())}])}revertRangeMappings(R){const B=this._diffModel.get();if(!B||!B.isDiffUpToDate.get())return;const W=R.map(V=>({range:V.modifiedRange,text:B.model.original.getValueInRange(V.originalRange)}));this._editors.modified.executeEdits("diffEditor",W)}_goTo(R){this._editors.modified.setPosition(new l.Position(R.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(R.lineRangeMapping.modified.toExclusiveRange())}goToDiff(R){var B,W,V,U;const F=(W=(B=this._diffModel.get())===null||B===void 0?void 0:B.diff.get())===null||W===void 0?void 0:W.mappings;if(!F||F.length===0)return;const j=this._editors.modified.getPosition().lineNumber;let J;R==="next"?J=(V=F.find(le=>le.lineRangeMapping.modified.startLineNumber>j))!==null&&V!==void 0?V:F[0]:J=(U=(0,k.findLast)(F,le=>le.lineRangeMapping.modified.startLineNumber{var B;const W=(B=R.diff.get())===null||B===void 0?void 0:B.mappings;!W||W.length===0||this._goTo(W[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const R=this._diffModel.get();R&&await R.waitForDiff()}mapToOtherSide(){var R,B;const W=this._editors.modified.hasWidgetFocus(),V=W?this._editors.modified:this._editors.original,U=W?this._editors.original:this._editors.modified;let F;const j=V.getSelection();if(j){const J=(B=(R=this._diffModel.get())===null||R===void 0?void 0:R.diff.get())===null||B===void 0?void 0:B.mappings.map(le=>W?le.lineRangeMapping.flip():le.lineRangeMapping);if(J){const le=(0,r.translatePosition)(j.getStartPosition(),J),ee=(0,r.translatePosition)(j.getEndPosition(),J);F=s.Range.plusRange(le,ee)}}return{destination:U,destinationSelection:F}}switchSide(){const{destination:R,destinationSelection:B}=this.mapToOtherSide();R.focus(),B&&R.setSelection(B)}exitCompareMove(){const R=this._diffModel.get();R&&R.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var R;const B=(R=this._diffModel.get())===null||R===void 0?void 0:R.unchangedRegions.get();B&&(0,p.transaction)(W=>{for(const V of B)V.collapseAll(W)})}showAllUnchangedRegions(){var R;const B=(R=this._diffModel.get())===null||R===void 0?void 0:R.unchangedRegions.get();B&&(0,p.transaction)(W=>{for(const V of B)V.showAll(W)})}};e.DiffEditorWidget=N,e.DiffEditorWidget=N=Ee([he(3,C.IContextKeyService),he(4,w.IInstantiationService),he(5,b.ICodeEditorService),he(6,m.IAudioCueService),he(7,I.IEditorProgressService)],N);function P(x){return x.mappings.map(R=>{const B=R.lineRangeMapping;let W,V,U,F,j=B.innerChanges;return B.original.isEmpty?(W=B.original.startLineNumber-1,V=0,j=void 0):(W=B.original.startLineNumber,V=B.original.endLineNumberExclusive-1),B.modified.isEmpty?(U=B.modified.startLineNumber-1,F=0,j=void 0):(U=B.modified.startLineNumber,F=B.modified.endLineNumberExclusive-1),{originalStartLineNumber:W,originalEndLineNumber:V,modifiedStartLineNumber:U,modifiedEndLineNumber:F,charChanges:j?.map(J=>({originalStartLineNumber:J.originalRange.startLineNumber,originalStartColumn:J.originalRange.startColumn,originalEndLineNumber:J.originalRange.endLineNumber,originalEndColumn:J.originalRange.endColumn,modifiedStartLineNumber:J.modifiedRange.startLineNumber,modifiedStartColumn:J.modifiedRange.startColumn,modifiedEndLineNumber:J.modifiedRange.endLineNumber,modifiedEndColumn:J.modifiedRange.endColumn}))}})}}),define(ie[883],ne([1,0,7,26,16,33,256,21,619,29,25,28,15]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFocusedDiffEditor=e.AccessibleDiffViewerPrev=e.AccessibleDiffViewerNext=e.ShowAllUnchangedRegions=e.CollapseAllUnchangedRegions=e.ExitCompareMove=e.SwitchSide=e.ToggleUseInlineViewWhenSpaceIsLimited=e.ToggleShowMovedCodeBlocks=e.ToggleCollapseUnchangedRegions=void 0;class n extends v.Action2{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:(0,S.localize)(0,null),original:"Toggle Collapse Unchanged Regions"},icon:k.Codicon.map,toggled:i.ContextKeyExpr.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:i.ContextKeyExpr.has("isInDiffEditor"),menu:{when:i.ContextKeyExpr.has("isInDiffEditor"),id:v.MenuId.EditorTitle,order:22,group:"navigation"}})}run(w,...D){const I=w.get(o.IConfigurationService),M=!I.getValue("diffEditor.hideUnchangedRegions.enabled");I.updateValue("diffEditor.hideUnchangedRegions.enabled",M)}}e.ToggleCollapseUnchangedRegions=n,(0,v.registerAction2)(n);class t extends v.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:(0,S.localize)(1,null),original:"Toggle Show Moved Code Blocks"},precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...D){const I=w.get(o.IConfigurationService),M=!I.getValue("diffEditor.experimental.showMoves");I.updateValue("diffEditor.experimental.showMoves",M)}}e.ToggleShowMovedCodeBlocks=t,(0,v.registerAction2)(t);class a extends v.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:(0,S.localize)(2,null),original:"Toggle Use Inline View When Space Is Limited"},precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...D){const I=w.get(o.IConfigurationService),M=!I.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");I.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",M)}}e.ToggleUseInlineViewWhenSpaceIsLimited=a,(0,v.registerAction2)(a),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new a().desc.id,title:(0,S.localize)(3,null),toggled:i.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:11,group:"1_diff",when:i.ContextKeyExpr.and(p.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,i.ContextKeyExpr.has("isInDiffEditor"))}),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new t().desc.id,title:(0,S.localize)(4,null),icon:k.Codicon.move,toggled:i.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"1_diff",when:i.ContextKeyExpr.has("isInDiffEditor")});const u={value:(0,S.localize)(5,null),original:"Diff Editor"};class f extends y.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:{value:(0,S.localize)(6,null),original:"Switch Side"},icon:k.Codicon.arrowSwap,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,I){const M=h(w);if(M instanceof _.DiffEditorWidget){if(I&&I.dryRun)return{destinationSelection:M.mapToOtherSide().destinationSelection};M.switchSide()}}}e.SwitchSide=f,(0,v.registerAction2)(f);class c extends y.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:(0,S.localize)(7,null),original:"Exit Compare Move"},icon:k.Codicon.close,precondition:p.EditorContextKeys.comparingMovedCode,f1:!1,category:u,keybinding:{weight:1e4,primary:9}})}runEditorCommand(w,D,...I){const M=h(w);M instanceof _.DiffEditorWidget&&M.exitCompareMove()}}e.ExitCompareMove=c,(0,v.registerAction2)(c);class d extends y.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:(0,S.localize)(8,null),original:"Collapse All Unchanged Regions"},icon:k.Codicon.fold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,...I){const M=h(w);M instanceof _.DiffEditorWidget&&M.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=d,(0,v.registerAction2)(d);class r extends y.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:(0,S.localize)(9,null),original:"Show All Unchanged Regions"},icon:k.Codicon.unfold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,...I){const M=h(w);M instanceof _.DiffEditorWidget&&M.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=r,(0,v.registerAction2)(r);const l={value:(0,S.localize)(10,null),original:"Accessible Diff Viewer"};class s extends v.Action2{constructor(){super({id:s.id,title:{value:(0,S.localize)(11,null),original:"Go to Next Difference"},category:l,precondition:i.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(w){const D=h(w);D?.accessibleDiffViewerNext()}}e.AccessibleDiffViewerNext=s,s.id="editor.action.accessibleDiffViewer.next",v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:s.id,title:(0,S.localize)(12,null),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"2_diff",when:i.ContextKeyExpr.and(p.EditorContextKeys.accessibleDiffViewerVisible.negate(),i.ContextKeyExpr.has("isInDiffEditor"))});class g extends v.Action2{constructor(){super({id:g.id,title:{value:(0,S.localize)(13,null),original:"Go to Previous Difference"},category:l,precondition:i.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(w){const D=h(w);D?.accessibleDiffViewerPrev()}}e.AccessibleDiffViewerPrev=g,g.id="editor.action.accessibleDiffViewer.prev";function h(C){var w;const D=C.get(E.ICodeEditorService),I=D.listDiffEditors(),M=(w=D.getFocusedCodeEditor())!==null&&w!==void 0?w:D.getActiveCodeEditor();if(!M)return null;for(let O=0,T=I.length;Othis._onParentConfigurationChanged(D)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(a){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(a){L.mixin(this._overwriteOptions,a,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=n,e.EmbeddedCodeEditorWidget=n=Ee([he(4,b.IInstantiationService),he(5,k.ICodeEditorService),he(6,S.ICommandService),he(7,v.IContextKeyService),he(8,i.IThemeService),he(9,o.INotificationService),he(10,p.IAccessibilityService),he(11,E.ILanguageConfigurationService),he(12,_.ILanguageFeaturesService)],n)}),define(ie[371],ne([1,0,7,229,26,2,35,109,256,369,29,8,573]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorItemTemplate=e.TemplateData=void 0;class n{constructor(f){this.viewModel=f}getId(){return this.viewModel}}e.TemplateData=n;let t=class extends E.Disposable{constructor(f,c,d,r){super(),this._container=f,this._overflowWidgetsDomNode=c,this._workbenchUIElementFactory=d,this._instantiationService=r,this._viewModel=(0,p.observableValue)(this,void 0),this._collapsed=(0,_.derived)(this,s=>{var g;return(g=this._viewModel.read(s))===null||g===void 0?void 0:g.collapsed.read(s)}),this._contentHeight=(0,p.observableValue)(this,500),this.height=(0,_.derived)(this,s=>(this._collapsed.read(s)?0:this._contentHeight.read(s))+this._outerEditorHeight),this._modifiedContentWidth=(0,p.observableValue)(this,0),this._modifiedWidth=(0,p.observableValue)(this,0),this._originalContentWidth=(0,p.observableValue)(this,0),this._originalWidth=(0,p.observableValue)(this,0),this.maxScroll=(0,_.derived)(this,s=>{const g=this._modifiedContentWidth.read(s)-this._modifiedWidth.read(s),h=this._originalContentWidth.read(s)-this._originalWidth.read(s);return g>h?{maxScroll:g,width:this._modifiedWidth.read(s)}:{maxScroll:h,width:this._originalWidth.read(s)}}),this._elements=(0,L.h)("div.multiDiffEntry",[(0,L.h)("div.content",{style:{display:"flex",flexDirection:"column",flex:"1",overflow:"hidden"}},[(0,L.h)("div.header@header",[(0,L.h)("div.collapse-button@collapseButton"),(0,L.h)("div.title.show-file-icons@title",[]),(0,L.h)("div.actions@actions")]),(0,L.h)("div.editorParent",{style:{flex:"1",display:"flex",flexDirection:"column"}},[(0,L.h)("div.editorContainer@editor",{style:{flex:"1"}})])])]),this.editor=this._register(this._instantiationService.createInstance(S.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=a(this.editor.getModifiedEditor()),this.isOriginalFocused=a(this.editor.getOriginalEditor()),this.isFocused=(0,_.derived)(this,s=>this.isModifedFocused.read(s)||this.isOriginalFocused.read(s)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.title)):void 0,this._dataStore=new E.DisposableStore,this._headerHeight=this._elements.header.clientHeight;const l=new k.Button(this._elements.collapseButton,{});this._register((0,_.autorun)(s=>{l.element.className="",l.icon=this._collapsed.read(s)?y.Codicon.chevronRight:y.Codicon.chevronDown})),this._register(l.onDidClick(()=>{var s;(s=this._viewModel.get())===null||s===void 0||s.collapsed.set(!this._collapsed.get(),void 0)})),this._register((0,_.autorun)(s=>{this._elements.editor.style.display=this._collapsed.read(s)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(s=>{const g=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(g,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(s=>{const g=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(g,void 0)}),this._register(this.editor.onDidContentSizeChange(s=>{(0,p.globalTransaction)(g=>{this._contentHeight.set(s.contentHeight,g),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),g),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),g)})})),this._register((0,_.autorun)(s=>{const g=this.isFocused.read(s);this._elements.root.classList.toggle("focused",g)})),this._container.appendChild(this._elements.root),this._outerEditorHeight=38,this._register(this._instantiationService.createInstance(v.MenuWorkbenchToolBar,this._elements.actions,b.MenuId.MultiDiffEditorFileToolbar,{actionRunner:this._register(new i.ActionRunnerWithContext(()=>{var s,g;return(g=(s=this._viewModel.get())===null||s===void 0?void 0:s.diffEditorViewModel)===null||g===void 0?void 0:g.model.modified.uri})),menuOptions:{shouldForwardArgs:!0}}))}setScrollLeft(f){this._modifiedContentWidth.get()-this._modifiedWidth.get()>this._originalContentWidth.get()-this._originalWidth.get()?this.editor.getModifiedEditor().setScrollLeft(f):this.editor.getOriginalEditor().setScrollLeft(f)}setData(f){function c(r){return{...r,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0}}const d=f.viewModel.entry.value;d.onOptionsDidChange&&this._dataStore.add(d.onOptionsDidChange(()=>{var r;this.editor.updateOptions(c((r=d.options)!==null&&r!==void 0?r:{}))})),(0,p.globalTransaction)(r=>{var l,s;(l=this._resourceLabel)===null||l===void 0||l.setUri(f.viewModel.diffEditorViewModel.model.modified.uri),this._dataStore.clear(),this._viewModel.set(f.viewModel,r),this.editor.setModel(f.viewModel.diffEditorViewModel,r),this.editor.updateOptions(c((s=d.options)!==null&&s!==void 0?s:{}))})}render(f,c,d,r){this._elements.root.style.visibility="visible",this._elements.root.style.top=`${f.start}px`,this._elements.root.style.height=`${f.length}px`,this._elements.root.style.width=`${c}px`,this._elements.root.style.position="absolute";const l=Math.max(0,Math.min(f.length-this._headerHeight,r.start-f.start));this._elements.header.style.transform=`translateY(${l}px)`,(0,p.globalTransaction)(s=>{this.editor.layout({width:c,height:f.length-this._outerEditorHeight})}),this.editor.getOriginalEditor().setScrollTop(d),this._elements.header.classList.toggle("shadow",l>0||d>0)}hide(){this._elements.root.style.top="-100000px",this._elements.root.style.visibility="hidden"}};e.DiffEditorItemTemplate=t,e.DiffEditorItemTemplate=t=Ee([he(3,o.IInstantiationService)],t);function a(u){return(0,_.observableFromEvent)(f=>{const c=new E.DisposableStore;return c.add(u.onDidFocusEditorWidget(()=>f(!0))),c.add(u.onDidBlurEditorWidget(()=>f(!1))),c},()=>u.hasWidgetFocus())}}),define(ie[884],ne([1,0,7,76,60,2,35,109,145,90,73,8,371,493,15,163,21,445]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidgetImpl=void 0;let f=class extends E.Disposable{constructor(r,l,s,g,h,m){super(),this._element=r,this._dimension=l,this._viewModel=s,this._workbenchUIElementFactory=g,this._parentContextKeyService=h,this._parentInstantiationService=m,this._elements=(0,L.h)("div",{style:{overflowY:"hidden"}},[(0,L.h)("div@content",{style:{overflow:"hidden"}}),(0,L.h)("div.monaco-editor@overflowWidgetsDomNode",{})]),this._sizeObserver=this._register(new v.ObservableElementSizeObserver(this._element,void 0)),this._objectPool=this._register(new n.ObjectPool(w=>{const D=this._instantiationService.createInstance(i.DiffEditorItemTemplate,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return D.setData(w),D})),this._scrollable=this._register(new S.Scrollable({forceIntegerValues:!1,scheduleAtNextAnimationFrame:w=>(0,L.scheduleAtNextAnimationFrame)((0,L.getWindow)(this._element),w),smoothScrollDuration:100})),this._scrollableElement=this._register(new k.SmoothScrollableElement(this._elements.root,{vertical:1,horizontal:1,className:"monaco-component",useShadows:!1},this._scrollable)),this.scrollTop=(0,_.observableFromEvent)(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=(0,_.observableFromEvent)(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=(0,_.derivedWithStore)(this,(w,D)=>{const I=this._viewModel.read(w);return I?I.items.read(w).map(A=>D.add(new c(A,this._objectPool,this.scrollLeft))):[]}),this._totalHeight=this._viewItems.map(this,(w,D)=>w.reduce((I,M)=>I+M.contentHeight.read(D),0)),this.activeDiffItem=(0,_.derived)(this,w=>this._viewItems.read(w).find(D=>{var I;return(I=D.template.read(w))===null||I===void 0?void 0:I.isFocused.read(w)})),this.lastActiveDiffItem=(0,_.derivedObservableWithCache)((w,D)=>{var I;return(I=this.activeDiffItem.read(w))!==null&&I!==void 0?I:D}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new a.ServiceCollection([t.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey(u.EditorContextKeys.inMultiDiffEditor.key,!0);const C=this._parentContextKeyService.createKey(u.EditorContextKeys.multiDiffEditorAllCollapsed.key,!1);this._register((0,_.autorun)(w=>{const D=this._viewModel.read(w);if(D){const I=D.items.read(w).every(M=>M.collapsed.read(w));C.set(I)}})),this._register((0,_.autorun)(w=>{const D=this.lastActiveDiffItem.read(w);(0,p.transaction)(I=>{var M;(M=this._viewModel.read(w))===null||M===void 0||M.activeDiffItem.set(D?.viewModel,I)})})),this._register((0,_.autorun)(w=>{const D=this._dimension.read(w);this._sizeObserver.observe(D)})),this._elements.content.style.position="relative",this._register((0,_.autorun)(w=>{const D=this._sizeObserver.height.read(w);this._elements.root.style.height=`${D}px`;const I=this._totalHeight.read(w);this._elements.content.style.height=`${I}px`;const M=this._sizeObserver.width.read(w);let A=M;const O=this._viewItems.read(w),T=(0,y.findFirstMaxBy)(O,N=>N.maxScroll.read(w).maxScroll);if(T){const N=T.maxScroll.read(w);A=M+N.maxScroll}this._scrollableElement.setScrollDimensions({width:M,height:D,scrollHeight:I,scrollWidth:A})})),r.replaceChildren(this._scrollableElement.getDomNode()),this._register((0,E.toDisposable)(()=>{r.replaceChildren()})),this._register(this._register((0,_.autorun)(w=>{(0,p.globalTransaction)(D=>{this.render(w)})})))}render(r){const l=this.scrollTop.read(r);let s=0,g=0,h=0;const m=this._sizeObserver.height.read(r),C=b.OffsetRange.ofStartAndLength(l,m),w=this._sizeObserver.width.read(r);for(const D of this._viewItems.read(r)){const I=D.contentHeight.read(r),M=Math.min(I,m),A=b.OffsetRange.ofStartAndLength(g,M),O=b.OffsetRange.ofStartAndLength(h,I);if(O.isBefore(C))s-=I-M,D.hide();else if(O.isAfter(C))D.hide();else{const T=Math.max(0,Math.min(C.start-O.start,I-M));s-=T;const N=b.OffsetRange.ofStartAndLength(l+s,m);D.render(A,T,w,N)}g+=M,h+=I}this._elements.content.style.transform=`translateY(${-(l+s)}px)`}};e.MultiDiffEditorWidgetImpl=f,e.MultiDiffEditorWidgetImpl=f=Ee([he(4,t.IContextKeyService),he(5,o.IInstantiationService)],f);class c extends E.Disposable{constructor(r,l,s){super(),this.viewModel=r,this._objectPool=l,this._scrollLeft=s,this._lastTemplateData=(0,_.observableValue)(this,{contentHeight:500,maxScroll:{maxScroll:0,width:0}}),this._templateRef=this._register((0,p.disposableObservableValue)(this,void 0)),this.contentHeight=(0,_.derived)(this,g=>{var h,m,C;return(C=(m=(h=this._templateRef.read(g))===null||h===void 0?void 0:h.object.height)===null||m===void 0?void 0:m.read(g))!==null&&C!==void 0?C:this._lastTemplateData.read(g).contentHeight}),this.maxScroll=(0,_.derived)(this,g=>{var h,m;return(m=(h=this._templateRef.read(g))===null||h===void 0?void 0:h.object.maxScroll.read(g))!==null&&m!==void 0?m:this._lastTemplateData.read(g).maxScroll}),this.template=(0,_.derived)(this,g=>{var h;return(h=this._templateRef.read(g))===null||h===void 0?void 0:h.object}),this._isHidden=(0,_.observableValue)(this,!1),this._register((0,_.autorun)(g=>{var h;const m=this._scrollLeft.read(g);(h=this._templateRef.read(g))===null||h===void 0||h.object.setScrollLeft(m)})),this._register((0,_.autorun)(g=>{const h=this._templateRef.read(g);!h||!this._isHidden.read(g)||h.object.isFocused.read(g)||(0,p.transaction)(w=>{this._lastTemplateData.set({contentHeight:h.object.height.get(),maxScroll:{maxScroll:0,width:0}},w),h.object.hide(),this._templateRef.set(void 0,w)})}))}dispose(){this.hide(),super.dispose()}toString(){return`VirtualViewItem(${this.viewModel.entry.value.title})`}hide(){this._isHidden.set(!0,void 0)}render(r,l,s,g){this._isHidden.set(!1,void 0);let h=this._templateRef.get();h||(h=this._objectPool.getUnusedObj(new i.TemplateData(this.viewModel)),this._templateRef.set(h,void 0)),h.object.render(r,s,l,g)}}}),define(ie[885],ne([1,0,2,35,90,884,8,371,832]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidget=void 0;let S=class extends L.Disposable{constructor(b,o,i){super(),this._element=b,this._workbenchUIElementFactory=o,this._instantiationService=i,this._dimension=(0,k.observableValue)(this,void 0),this._viewModel=(0,k.observableValue)(this,void 0),this._widgetImpl=(0,k.derivedWithStore)(this,(n,t)=>((0,y.readHotReloadableExport)(p.DiffEditorItemTemplate,n),t.add(this._instantiationService.createInstance((0,y.readHotReloadableExport)(E.MultiDiffEditorWidgetImpl,n),this._element,this._dimension,this._viewModel,this._workbenchUIElementFactory)))),this._register((0,k.recomputeInitiallyAndOnChange)(this._widgetImpl))}};e.MultiDiffEditorWidget=S,e.MultiDiffEditorWidget=S=Ee([he(2,_.IInstantiationService)],S)}),define(ie[886],ne([1,0,14,2,16,11,5,24,21,43,39,643,29,30,23,447]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const a=(0,n.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},o.localize(0,null));class u extends y.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:o.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(s,g){var h;(h=r.get(g))===null||h===void 0||h.jumpToBracket()}}class f extends y.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:o.localize(2,null),alias:"Select to Bracket",precondition:void 0,metadata:{description:o.localize2(5,"Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(s,g,h){var m;let C=!0;h&&h.selectBrackets===!1&&(C=!1),(m=r.get(g))===null||m===void 0||m.selectToBracket(C)}}class c extends y.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:o.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(s,g){var h;(h=r.get(g))===null||h===void 0||h.removeBrackets(this.id)}}class d{constructor(s,g,h){this.position=s,this.brackets=g,this.options=h}}class r extends k.Disposable{static get(s){return s.getContribution(r.ID)}constructor(s){super(),this._editor=s,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new L.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(s.onDidChangeCursorPosition(g=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(s.onDidChangeModelContent(g=>{this._updateBracketsSoon.schedule()})),this._register(s.onDidChangeModel(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(s.onDidChangeModelLanguageConfiguration(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(s.onDidChangeConfiguration(g=>{g.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(s.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(s.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const s=this._editor.getModel(),g=this._editor.getSelections().map(h=>{const m=h.getStartPosition(),C=s.bracketPairs.matchBracket(m);let w=null;if(C)C[0].containsPosition(m)&&!C[1].containsPosition(m)?w=C[1].getStartPosition():C[1].containsPosition(m)&&(w=C[0].getStartPosition());else{const D=s.bracketPairs.findEnclosingBrackets(m);if(D)w=D[1].getStartPosition();else{const I=s.bracketPairs.findNextBracket(m);I&&I.range&&(w=I.range.getStartPosition())}}return w?new p.Selection(w.lineNumber,w.column,w.lineNumber,w.column):new p.Selection(m.lineNumber,m.column,m.lineNumber,m.column)});this._editor.setSelections(g),this._editor.revealRange(g[0])}selectToBracket(s){if(!this._editor.hasModel())return;const g=this._editor.getModel(),h=[];this._editor.getSelections().forEach(m=>{const C=m.getStartPosition();let w=g.bracketPairs.matchBracket(C);if(!w&&(w=g.bracketPairs.findEnclosingBrackets(C),!w)){const M=g.bracketPairs.findNextBracket(C);M&&M.range&&(w=g.bracketPairs.matchBracket(M.range.getStartPosition()))}let D=null,I=null;if(w){w.sort(_.Range.compareRangesUsingStarts);const[M,A]=w;if(D=s?M.getStartPosition():M.getEndPosition(),I=s?A.getEndPosition():A.getStartPosition(),A.containsPosition(C)){const O=D;D=I,I=O}}D&&I&&h.push(new p.Selection(D.lineNumber,D.column,I.lineNumber,I.column))}),h.length>0&&(this._editor.setSelections(h),this._editor.revealRange(h[0]))}removeBrackets(s){if(!this._editor.hasModel())return;const g=this._editor.getModel();this._editor.getSelections().forEach(h=>{const m=h.getPosition();let C=g.bracketPairs.matchBracket(m);C||(C=g.bracketPairs.findEnclosingBrackets(m)),C&&(this._editor.pushUndoStop(),this._editor.executeEdits(s,[{range:C[0],text:""},{range:C[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const s=[];let g=0;for(const h of this._lastBracketsData){const m=h.brackets;m&&(s[g++]={range:m[0],options:h.options},s[g++]={range:m[1],options:h.options})}this._decorations.set(s)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const s=this._editor.getSelections();if(s.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const g=this._editor.getModel(),h=g.getVersionId();let m=[];this._lastVersionId===h&&(m=this._lastBracketsData);const C=[];let w=0;for(let O=0,T=s.length;O1&&C.sort(E.Position.compare);const D=[];let I=0,M=0;const A=m.length;for(let O=0,T=C.length;Othis.update(F))),this._lightBulbWidget=new E.Lazy(()=>{const F=this._editor.getContribution(n.LightBulbWidget.ID);return F&&this._register(F.onClick(j=>this.showCodeActionList(j.actions,j,{includeDisabledActions:!1,fromLightbulb:!0}))),F}),this._resolver=P.createInstance(o.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(O,T,N){return this.showCodeActionList(T,N,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(O,T,N,P){var x;if(!this._editor.hasModel())return;(x=t.MessageController.get(this._editor))===null||x===void 0||x.closeMessage();const R=this._editor.getPosition();this._trigger({type:1,triggerAction:T,filter:N,autoApply:P,context:{notAvailableMessage:O,position:R}})}_trigger(O){return this._model.trigger(O)}async _applyCodeAction(O,T,N){try{await this._instantiationService.invokeFunction(b.applyCodeAction,O,b.ApplyCodeActionReason.FromCodeActions,{preview:N,editor:this._editor})}finally{T&&this._trigger({type:2,triggerAction:C.CodeActionTriggerSource.QuickFix,filter:{}})}}async update(O){var T,N,P,x,R,B,W;if(O.type!==1){(T=this._lightBulbWidget.rawValue)===null||T===void 0||T.hide();return}let V;try{V=await O.actions}catch(U){(0,y.onUnexpectedError)(U);return}if(!this._disposed)if((N=this._lightBulbWidget.value)===null||N===void 0||N.update(V,O.trigger,O.position),O.trigger.type===1){if(!((P=O.trigger.filter)===null||P===void 0)&&P.include){const F=this.tryGetValidActionToApply(O.trigger,V);if(F){try{(x=this._lightBulbWidget.value)===null||x===void 0||x.hide(),await this._applyCodeAction(F,!1,!1)}finally{V.dispose()}return}if(O.trigger.context){const j=this.getInvalidActionThatWouldHaveBeenApplied(O.trigger,V);if(j&&j.action.disabled){(R=t.MessageController.get(this._editor))===null||R===void 0||R.showMessage(j.action.disabled,O.trigger.context.position),V.dispose();return}}}const U=!!(!((B=O.trigger.filter)===null||B===void 0)&&B.include);if(O.trigger.context&&(!V.allActions.length||!U&&!V.validActions.length)){(W=t.MessageController.get(this._editor))===null||W===void 0||W.showMessage(O.trigger.context.notAvailableMessage,O.trigger.context.position),this._activeCodeActions.value=V,V.dispose();return}this._activeCodeActions.value=V,this.showCodeActionList(V,this.toCoords(O.position),{includeDisabledActions:U,fromLightbulb:!1})}else this._actionWidgetService.isVisible?V.dispose():this._activeCodeActions.value=V}getInvalidActionThatWouldHaveBeenApplied(O,T){if(T.allActions.length&&(O.autoApply==="first"&&T.validActions.length===0||O.autoApply==="ifSingle"&&T.allActions.length===1))return T.allActions.find(({action:N})=>N.disabled)}tryGetValidActionToApply(O,T){if(T.validActions.length&&(O.autoApply==="first"&&T.validActions.length>0||O.autoApply==="ifSingle"&&T.validActions.length===1))return T.validActions[0]}async showCodeActionList(O,T,N){const P=this._editor.createDecorationsCollection(),x=this._editor.getDomNode();if(!x)return;const R=N.includeDisabledActions&&(this._showDisabled||O.validActions.length===0)?O.allActions:O.validActions;if(!R.length)return;const B=p.Position.isIPosition(T)?this.toCoords(T):T,W={onSelect:async(V,U)=>{this._applyCodeAction(V,!0,!!U),this._actionWidgetService.hide(),P.clear()},onHide:()=>{var V;(V=this._editor)===null||V===void 0||V.focus(),P.clear()},onHover:async(V,U)=>{var F;if(await V.resolve(U),!U.isCancellationRequested)return{canPreview:!!(!((F=V.action.edit)===null||F===void 0)&&F.edits.length)}},onFocus:V=>{var U,F;if(V&&V.highlightRange&&V.action.diagnostics){const j=[{range:V.action.diagnostics[0],options:D.DECORATION}];P.set(j);const J=V.action.diagnostics[0],le=(F=(U=this._editor.getModel())===null||U===void 0?void 0:U.getWordAtPosition({lineNumber:J.startLineNumber,column:J.startColumn}))===null||F===void 0?void 0:F.word;k.status((0,a.localize)(0,null,le,J.startLineNumber,J.startColumn))}else P.clear()}};this._actionWidgetService.show("codeActionWidget",!0,(0,i.toMenuItems)(R,this._shouldShowHeaders(),this._resolver.getResolver()),W,B,x,this._getActionBarActions(O,T,N))}toCoords(O){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(O,1),this._editor.render();const T=this._editor.getScrolledVisiblePosition(O),N=(0,L.getDomNodePagePosition)(this._editor.getDomNode()),P=N.left+T.left,x=N.top+T.top+T.height;return{x:P,y:x}}_shouldShowHeaders(){var O;const T=(O=this._editor)===null||O===void 0?void 0:O.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:T?.uri})}_getActionBarActions(O,T,N){if(N.fromLightbulb)return[];const P=O.documentation.map(x=>{var R;return{id:x.id,label:x.title,tooltip:(R=x.tooltip)!==null&&R!==void 0?R:"",class:void 0,enabled:!0,run:()=>{var B;return this._commandService.executeCommand(x.id,...(B=x.arguments)!==null&&B!==void 0?B:[])}}});return N.includeDisabledActions&&O.validActions.length>0&&O.allActions.length!==O.validActions.length&&P.push(this._showDisabled?{id:"hideMoreActions",label:(0,a.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(O,T,N))}:{id:"showMoreActions",label:(0,a.localize)(2,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(O,T,N))}),P}};e.CodeActionController=M,M.ID="editor.contrib.codeActionController",M.DECORATION=S.ModelDecorationOptions.register({description:"quickfix-highlight",className:I}),e.CodeActionController=M=D=Ee([he(1,l.IMarkerService),he(2,d.IContextKeyService),he(3,r.IInstantiationService),he(4,v.ILanguageFeaturesService),he(5,s.IEditorProgressService),he(6,f.ICommandService),he(7,c.IConfigurationService),he(8,u.IActionWidgetService),he(9,r.IInstantiationService)],M),(0,m.registerThemingParticipant)((A,O)=>{((P,x)=>{x&&O.addRule(`.monaco-editor ${P} { background-color: ${x}; }`)})(".quickfix-edit-highlight",A.getColor(g.editorFindMatchHighlight));const N=A.getColor(g.editorFindMatchHighlightBorder);N&&O.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,h.isHighContrast)(A.type)?"dotted":"solid"} ${N}; box-sizing: border-box; }`)})}),define(ie[887],ne([1,0,12,16,21,138,648,15,114,257,357]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function o(l){return p.ContextKeyExpr.regex(b.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,L.escapeRegExpCharacters)(l.value)+"\\b"))}const i={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:_.localize(0,null)},apply:{type:"string",description:_.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[_.localize(2,null),_.localize(3,null),_.localize(4,null)]},preferred:{type:"boolean",default:!1,description:_.localize(5,null)}}};function n(l,s,g,h,m=S.CodeActionTriggerSource.Default){if(l.hasModel()){const C=v.CodeActionController.get(l);C?.manualTriggerAtCurrentPosition(s,m,g,h)}}class t extends k.EditorAction{constructor(){super({id:E.quickFixCommandId,label:_.localize(6,null),alias:"Quick Fix...",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(s,g){return n(g,_.localize(7,null),void 0,void 0,S.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=t;class a extends k.EditorCommand{constructor(){super({id:E.codeActionCommandId,precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:i}]}})}runEditorCommand(s,g,h){const m=S.CodeActionCommandArgs.fromUser(h,{kind:S.CodeActionKind.Empty,apply:"ifSingle"});return n(g,typeof h?.kind=="string"?m.preferred?_.localize(8,null,h.kind):_.localize(9,null,h.kind):m.preferred?_.localize(10,null):_.localize(11,null),{include:m.kind,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply)}}e.CodeActionCommand=a;class u extends k.EditorAction{constructor(){super({id:E.refactorCommandId,label:_.localize(12,null),alias:"Refactor...",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:p.ContextKeyExpr.and(y.EditorContextKeys.writable,o(S.CodeActionKind.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:i}]}})}run(s,g,h){const m=S.CodeActionCommandArgs.fromUser(h,{kind:S.CodeActionKind.Refactor,apply:"never"});return n(g,typeof h?.kind=="string"?m.preferred?_.localize(13,null,h.kind):_.localize(14,null,h.kind):m.preferred?_.localize(15,null):_.localize(16,null),{include:S.CodeActionKind.Refactor.contains(m.kind)?m.kind:S.CodeActionKind.None,onlyIncludePreferredActions:m.preferred},m.apply,S.CodeActionTriggerSource.Refactor)}}e.RefactorAction=u;class f extends k.EditorAction{constructor(){super({id:E.sourceActionCommandId,label:_.localize(17,null),alias:"Source Action...",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:p.ContextKeyExpr.and(y.EditorContextKeys.writable,o(S.CodeActionKind.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:i}]}})}run(s,g,h){const m=S.CodeActionCommandArgs.fromUser(h,{kind:S.CodeActionKind.Source,apply:"never"});return n(g,typeof h?.kind=="string"?m.preferred?_.localize(18,null,h.kind):_.localize(19,null,h.kind):m.preferred?_.localize(20,null):_.localize(21,null),{include:S.CodeActionKind.Source.contains(m.kind)?m.kind:S.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply,S.CodeActionTriggerSource.SourceAction)}}e.SourceAction=f;class c extends k.EditorAction{constructor(){super({id:E.organizeImportsCommandId,label:_.localize(22,null),alias:"Organize Imports",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,o(S.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(s,g){return n(g,_.localize(23,null),{include:S.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",S.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=c;class d extends k.EditorAction{constructor(){super({id:E.fixAllCommandId,label:_.localize(24,null),alias:"Fix All",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,o(S.CodeActionKind.SourceFixAll))})}run(s,g){return n(g,_.localize(25,null),{include:S.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",S.CodeActionTriggerSource.FixAll)}}e.FixAllAction=d;class r extends k.EditorAction{constructor(){super({id:E.autoFixCommandId,label:_.localize(26,null),alias:"Auto Fix...",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,o(S.CodeActionKind.QuickFix)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(s,g){return n(g,_.localize(27,null),{include:S.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",S.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=r}),define(ie[888],ne([1,0,16,244,887,257,358,649,97,37]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(E.CodeActionController.ID,E.CodeActionController,3),(0,L.registerEditorContribution)(_.LightBulbWidget.ID,_.LightBulbWidget,4),(0,L.registerEditorAction)(y.QuickFixAction),(0,L.registerEditorAction)(y.RefactorAction),(0,L.registerEditorAction)(y.SourceAction),(0,L.registerEditorAction)(y.OrganizeImportsAction),(0,L.registerEditorAction)(y.AutoFixAction),(0,L.registerEditorAction)(y.FixAllAction),(0,L.registerEditorCommand)(new y.CodeActionCommand),v.Registry.as(S.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:p.localize(0,null),default:!0}}}),v.Registry.as(S.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:p.localize(1,null),default:!0}}})}),define(ie[889],ne([1,0,7,115,5,39,449]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class _{constructor(i,n,t){this.afterColumn=1073741824,this.afterLineNumber=i,this.heightInPx=n,this._onHeight=t,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(i){this._lastHeight===void 0?this._lastHeight=i:this._lastHeight!==i&&(this._lastHeight=i,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class p{constructor(i,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=i,this._id=`codelens.widget-${p._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(i,n){this._commands.clear();const t=[];let a=!1;for(let u=0;u{r.symbol.command&&d.push(r.symbol),t.addDecoration({range:r.symbol.range,options:v},s=>this._decorationIds[l]=s),c?c=y.Range.plusRange(c,r.symbol.range):c=y.Range.lift(r.symbol.range)}),this._viewZone=new _(c.startLineNumber-1,u,f),this._viewZoneId=a.addZone(this._viewZone),d.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(d,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new p(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(i,n){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],n?.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((i,n)=>{const t=this._editor.getModel().getDecorationRange(i),a=this._data[n].symbol;return!!(t&&y.Range.isEmpty(a.range)===t.isEmpty())})}updateCodeLensSymbols(i,n){this._decorationIds.forEach(n.removeDecoration,n),this._decorationIds=[],this._data=i,this._data.forEach((t,a)=>{n.addDecoration({range:t.symbol.range,options:v},u=>this._decorationIds[a]=u)})}updateHeight(i,n){this._viewZone.heightInPx=i,n.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(i){if(!this._viewZone.isVisible())return null;for(let n=0;nthis._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(C=>{(C.hasChanged(50)||C.hasChanged(19)||C.hasChanged(18))&&this._updateLensStyle(),C.hasChanged(17)&&this._onModelChange()})),this._disposables.add(l.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var r;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(r=this._currentCodeLensModel)===null||r===void 0||r.dispose()}_getLayoutInfo(){const r=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let l=this._editor.getOption(19);return(!l||l<5)&&(l=this._editor.getOption(52)*.9|0),{fontSize:l,codeLensHeight:l*r|0}}_updateLensStyle(){const{codeLensHeight:r,fontSize:l}=this._getLayoutInfo(),s=this._editor.getOption(18),g=this._editor.getOption(50),{style:h}=this._editor.getContainerDomNode();h.setProperty("--vscode-editorCodeLens-lineHeight",`${r}px`),h.setProperty("--vscode-editorCodeLens-fontSize",`${l}px`),h.setProperty("--vscode-editorCodeLens-fontFeatureSettings",g.fontFeatureSettings),s&&(h.setProperty("--vscode-editorCodeLens-fontFamily",s),h.setProperty("--vscode-editorCodeLens-fontFamilyDefault",p.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(m=>{for(const C of this._lenses)C.updateHeight(r,m)})}_localDispose(){var r,l,s;(r=this._getCodeLensModelPromise)===null||r===void 0||r.cancel(),this._getCodeLensModelPromise=void 0,(l=this._resolveCodeLensesPromise)===null||l===void 0||l.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(s=this._currentCodeLensModel)===null||s===void 0||s.dispose()}_onModelChange(){this._localDispose();const r=this._editor.getModel();if(!r||!this._editor.getOption(17)||r.isTooLargeForTokenization())return;const l=this._codeLensCache.get(r);if(l&&this._renderCodeLensSymbols(l),!this._languageFeaturesService.codeLensProvider.has(r)){l&&(0,L.disposableTimeout)(()=>{const g=this._codeLensCache.get(r);l===g&&(this._codeLensCache.delete(r),this._onModelChange())},30*1e3,this._localToDispose);return}for(const g of this._languageFeaturesService.codeLensProvider.all(r))if(typeof g.onDidChange=="function"){const h=g.onDidChange(()=>s.schedule());this._localToDispose.add(h)}const s=new L.RunOnceScheduler(()=>{var g;const h=Date.now();(g=this._getCodeLensModelPromise)===null||g===void 0||g.cancel(),this._getCodeLensModelPromise=(0,L.createCancelablePromise)(m=>(0,v.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,r,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(r,m);const C=this._provideCodeLensDebounce.update(r,Date.now()-h);s.delay=C,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(r));this._localToDispose.add(s),this._localToDispose.add((0,y.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var g;this._editor.changeDecorations(h=>{this._editor.changeViewZones(m=>{const C=[];let w=-1;this._lenses.forEach(I=>{!I.isValid()||w===I.getLineNumber()?C.push(I):(I.update(m),w=I.getLineNumber())});const D=new o.CodeLensHelper;C.forEach(I=>{I.dispose(D,m),this._lenses.splice(this._lenses.indexOf(I),1)}),D.commit(h)})}),s.schedule(),this._resolveCodeLensesScheduler.cancel(),(g=this._resolveCodeLensesPromise)===null||g===void 0||g.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{s.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{s.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(g=>{g.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,y.toDisposable)(()=>{if(this._editor.getModel()){const g=E.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(h=>{this._editor.changeViewZones(m=>{this._disposeAllLenses(h,m)})}),g.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(g=>{if(g.target.type!==9)return;let h=g.target.element;if(h?.tagName==="SPAN"&&(h=h.parentElement),h?.tagName==="A")for(const m of this._lenses){const C=m.getCommand(h);if(C){this._commandService.executeCommand(C.id,...C.arguments||[]).catch(w=>this._notificationService.error(w));break}}})),s.schedule()}_disposeAllLenses(r,l){const s=new o.CodeLensHelper;for(const g of this._lenses)g.dispose(s,l);r&&s.commit(r),this._lenses.length=0}_renderCodeLensSymbols(r){if(!this._editor.hasModel())return;const l=this._editor.getModel().getLineCount(),s=[];let g;for(const C of r.lenses){const w=C.symbol.range.startLineNumber;w<1||w>l||(g&&g[g.length-1].symbol.range.startLineNumber===w?g.push(C):(g=[C],s.push(g)))}if(!s.length&&!this._lenses.length)return;const h=E.StableEditorScrollState.capture(this._editor),m=this._getLayoutInfo();this._editor.changeDecorations(C=>{this._editor.changeViewZones(w=>{const D=new o.CodeLensHelper;let I=0,M=0;for(;Mthis._resolveCodeLensesInViewportSoon())),I++,M++)}for(;Ithis._resolveCodeLensesInViewportSoon())),M++;D.commit(C)})}),h.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var r;(r=this._resolveCodeLensesPromise)===null||r===void 0||r.cancel(),this._resolveCodeLensesPromise=void 0;const l=this._editor.getModel();if(!l)return;const s=[],g=[];if(this._lenses.forEach(C=>{const w=C.computeIfNecessary(l);w&&(s.push(w),g.push(C))}),s.length===0)return;const h=Date.now(),m=(0,L.createCancelablePromise)(C=>{const w=s.map((D,I)=>{const M=new Array(D.length),A=D.map((O,T)=>!O.symbol.command&&typeof O.provider.resolveCodeLens=="function"?Promise.resolve(O.provider.resolveCodeLens(l,O.symbol,C)).then(N=>{M[T]=N},k.onUnexpectedExternalError):(M[T]=O.symbol,Promise.resolve(void 0)));return Promise.all(A).then(()=>{!C.isCancellationRequested&&!g[I].isDisposed()&&g[I].updateCommands(M)})});return Promise.all(w)});this._resolveCodeLensesPromise=m,this._resolveCodeLensesPromise.then(()=>{const C=this._resolveCodeLensesDebounce.update(l,Date.now()-h);this._resolveCodeLensesScheduler.delay=C,this._currentCodeLensModel&&this._codeLensCache.put(l,this._currentCodeLensModel),this._oldCodeLensModels.clear(),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},C=>{(0,k.onUnexpectedError)(C),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var r;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((r=this._currentCodeLensModel)===null||r===void 0)&&r.isDisposed?void 0:this._currentCodeLensModel}};e.CodeLensContribution=c,c.ID="css.editor.codeLens",e.CodeLensContribution=c=Ee([he(1,f.ILanguageFeaturesService),he(2,u.ILanguageFeatureDebounceService),he(3,n.ICommandService),he(4,t.INotificationService),he(5,b.ICodeLensCache)],c),(0,_.registerEditorContribution)(c.ID,c,1),(0,_.registerEditorAction)(class extends _.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(r,l){if(!l.hasModel())return;const s=r.get(a.IQuickInputService),g=r.get(n.ICommandService),h=r.get(t.INotificationService),m=l.getSelection().positionLineNumber,C=l.getContribution(c.ID);if(!C)return;const w=await C.getModel();if(!w)return;const D=[];for(const A of w.lenses)A.symbol.command&&A.symbol.range.startLineNumber===m&&D.push({label:A.symbol.command.title,command:A.symbol.command});if(D.length===0)return;const I=await s.pick(D,{canPickMany:!1,placeHolder:(0,i.localize)(1,null)});if(!I)return;let M=I.command;if(w.isDisposed){const A=await C.getModel(),O=A?.lenses.find(T=>{var N;return T.symbol.range.startLineNumber===m&&((N=T.symbol.command)===null||N===void 0?void 0:N.title)===M.title});if(!O||!O.symbol.command)return;M=O.symbol.command}try{await g.executeCommand(M.id,...M.arguments||[])}catch(A){h.error(A)}}})}),define(ie[372],ne([1,0,14,38,9,6,2,61,12,165,16,5,39,78,18,351,28]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let c=f=class extends _.Disposable{constructor(l,s,g,h){super(),this._editor=l,this._configurationService=s,this._languageFeaturesService=g,this._localToDispose=this._register(new _.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new v.DynamicCssRules(this._editor),this._decoratorLimitReporter=new d,this._colorDecorationClassRefs=this._register(new _.DisposableStore),this._debounceInformation=h.for(g.colorProvider,"Document Colors",{min:f.RECOMPUTE_TIME}),this._register(l.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(l.onDidChangeModelLanguage(()=>this.updateColors())),this._register(g.colorProvider.onDidChange(()=>this.updateColors())),this._register(l.onDidChangeConfiguration(m=>{const C=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const w=C!==this._isColorDecoratorsEnabled||m.hasChanged(21),D=m.hasChanged(145);(w||D)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const l=this._editor.getModel();if(!l)return!1;const s=l.getLanguageId(),g=this._configurationService.getValue(s);if(g&&typeof g=="object"){const h=g.colorDecorators;if(h&&h.enable!==void 0&&!h.enable)return h.enable}return this._editor.getOption(20)}static get(l){return l.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const l=this._editor.getModel();!l||!this._languageFeaturesService.colorProvider.has(l)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new L.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(l)))})),this.beginCompute())}async beginCompute(){this._computePromise=(0,L.createCancelablePromise)(async l=>{const s=this._editor.getModel();if(!s)return[];const g=new p.StopWatch(!1),h=await(0,a.getColors)(this._languageFeaturesService.colorProvider,s,l,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(s,g.elapsed()),h});try{const l=await this._computePromise;this.updateDecorations(l),this.updateColorDecorators(l),this._computePromise=null}catch(l){(0,y.onUnexpectedError)(l)}}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(l){const s=l.map(g=>({range:{startLineNumber:g.colorInfo.range.startLineNumber,startColumn:g.colorInfo.range.startColumn,endLineNumber:g.colorInfo.range.endLineNumber,endColumn:g.colorInfo.range.endColumn},options:i.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(g=>{this._decorationsIds=g.deltaDecorations(this._decorationsIds,s),this._colorDatas=new Map,this._decorationsIds.forEach((h,m)=>this._colorDatas.set(h,l[m]))})}updateColorDecorators(l){this._colorDecorationClassRefs.clear();const s=[],g=this._editor.getOption(21);for(let m=0;mthis._colorDatas.has(h.id));return g.length===0?null:this._colorDatas.get(g[0].id)}isColorDecoration(l){return this._colorDecoratorIds.has(l)}};e.ColorDetector=c,c.ID="editor.contrib.colorDetector",c.RECOMPUTE_TIME=1e3,e.ColorDetector=c=f=Ee([he(1,u.IConfigurationService),he(2,t.ILanguageFeaturesService),he(3,n.ILanguageFeatureDebounceService)],c);class d{constructor(){this._onDidChange=new E.Emitter,this._computed=0,this._limited=!1}update(l,s){(l!==this._computed||s!==this._limited)&&(this._computed=l,this._limited=s,this._onDidChange.fire())}}e.DecoratorLimitReporter=d,(0,b.registerEditorContribution)(c.ID,c,1)}),define(ie[373],ne([1,0,14,19,38,2,5,351,372,548,839,23,7]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class n{constructor(s,g,h,m){this.owner=s,this.range=g,this.model=h,this.provider=m,this.forceShowAtRange=!0}isValidForHoverAnchor(s){return s.type===1&&this.range.startColumn<=s.range.startColumn&&this.range.endColumn>=s.range.endColumn}}e.ColorHover=n;let t=class{constructor(s,g){this._editor=s,this._themeService=g,this.hoverOrdinal=2}computeSync(s,g){return[]}computeAsync(s,g,h){return L.AsyncIterableObject.fromPromise(this._computeAsync(s,g,h))}async _computeAsync(s,g,h){if(!this._editor.hasModel())return[];const m=S.ColorDetector.get(this._editor);if(!m)return[];for(const C of g){if(!m.isColorDecoration(C))continue;const w=m.getColorData(C.range.getStartPosition());if(w)return[await f(this,this._editor.getModel(),w.colorInfo,w.provider)]}return[]}renderHoverParts(s,g){return c(this,this._editor,this._themeService,g,s)}};e.ColorHoverParticipant=t,e.ColorHoverParticipant=t=Ee([he(1,o.IThemeService)],t);class a{constructor(s,g,h,m){this.owner=s,this.range=g,this.model=h,this.provider=m}}e.StandaloneColorPickerHover=a;let u=class{constructor(s,g){this._editor=s,this._themeService=g,this._color=null}async createColorHover(s,g,h){if(!this._editor.hasModel()||!S.ColorDetector.get(this._editor))return null;const C=await(0,p.getColors)(h,this._editor.getModel(),k.CancellationToken.None);let w=null,D=null;for(const O of C){const T=O.colorInfo;_.Range.containsRange(T.range,s.range)&&(w=T,D=O.provider)}const I=w??s,M=D??g,A=!!w;return{colorHover:await f(this,this._editor.getModel(),I,M),foundInEditor:A}}async updateEditorModel(s){if(!this._editor.hasModel())return;const g=s.model;let h=new _.Range(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);this._color&&(await r(this._editor.getModel(),g,this._color,h,s),h=d(this._editor,h,g))}renderHoverParts(s,g){return c(this,this._editor,this._themeService,g,s)}set color(s){this._color=s}get color(){return this._color}};e.StandaloneColorPickerParticipant=u,e.StandaloneColorPickerParticipant=u=Ee([he(1,o.IThemeService)],u);async function f(l,s,g,h){const m=s.getValueInRange(g.range),{red:C,green:w,blue:D,alpha:I}=g.color,M=new y.RGBA(Math.round(C*255),Math.round(w*255),Math.round(D*255),I),A=new y.Color(M),O=await(0,p.getColorPresentations)(s,g,h,k.CancellationToken.None),T=new v.ColorPickerModel(A,[],0);return T.colorPresentations=O||[],T.guessColorPresentation(A,m),l instanceof t?new n(l,_.Range.lift(g.range),T,h):new a(l,_.Range.lift(g.range),T,h)}function c(l,s,g,h,m){if(h.length===0||!s.hasModel())return E.Disposable.None;if(m.setMinimumDimensions){const T=s.getOption(66)+8;m.setMinimumDimensions(new i.Dimension(302,T))}const C=new E.DisposableStore,w=h[0],D=s.getModel(),I=w.model,M=C.add(new b.ColorPickerWidget(m.fragment,I,s.getOption(141),g,l instanceof u));m.setColorPicker(M);let A=!1,O=new _.Range(w.range.startLineNumber,w.range.startColumn,w.range.endLineNumber,w.range.endColumn);if(l instanceof u){const T=h[0].model.color;l.color=T,r(D,I,T,O,w),C.add(I.onColorFlushed(N=>{l.color=N}))}else C.add(I.onColorFlushed(async T=>{await r(D,I,T,O,w),A=!0,O=d(s,O,I,m)}));return C.add(I.onDidChangeColor(T=>{r(D,I,T,O,w)})),C.add(s.onDidChangeModelContent(T=>{A?A=!1:(m.hide(),s.focus())})),C}function d(l,s,g,h){let m,C;if(g.presentation.textEdit){m=[g.presentation.textEdit],C=new _.Range(g.presentation.textEdit.range.startLineNumber,g.presentation.textEdit.range.startColumn,g.presentation.textEdit.range.endLineNumber,g.presentation.textEdit.range.endColumn);const w=l.getModel()._setTrackedRange(null,C,3);l.pushUndoStop(),l.executeEdits("colorpicker",m),C=l.getModel()._getTrackedRange(w)||C}else m=[{range:s,text:g.presentation.label,forceMoveMarkers:!1}],C=s.setEndPosition(s.endLineNumber,s.startColumn+g.presentation.label.length),l.pushUndoStop(),l.executeEdits("colorpicker",m);return g.presentation.additionalTextEdits&&(m=[...g.presentation.additionalTextEdits],l.executeEdits("colorpicker",m),h&&h.hide()),l.pushUndoStop(),C}async function r(l,s,g,h,m){const C=await(0,p.getColorPresentations)(l,{range:h,color:{red:g.rgba.r/255,green:g.rgba.g/255,blue:g.rgba.b/255,alpha:g.rgba.a}},m.provider,k.CancellationToken.None);s.colorPresentations=C||[]}}),define(ie[891],ne([1,0,2,17,16,11,5,24,39,550,450]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function b(i){return k.isMacintosh?i.altKey:i.ctrlKey}class o extends L.Disposable{constructor(n){super(),this._editor=n,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),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(n){!this._editor.getOption(35)||this._editor.getOption(22)||(b(n)&&(this._modifierPressed=!0),this._mouseDown&&b(n)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(n){!this._editor.getOption(35)||this._editor.getOption(22)||(b(n)&&(this._modifierPressed=!1),this._mouseDown&&n.keyCode===o.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(n){this._mouseDown=!0}_onEditorMouseUp(n){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(n){const t=n.target;if(this._dragSelection===null){const u=(this._editor.getSelections()||[]).filter(f=>t.position&&f.containsPosition(t.position));if(u.length===1)this._dragSelection=u[0];else return}b(n.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(n){if(n.target&&(this._hitContent(n.target)||this._hitMargin(n.target))&&n.target.position){const t=new E.Position(n.target.position.lineNumber,n.target.position.column);if(this._dragSelection===null){let a=null;if(n.event.shiftKey){const u=this._editor.getSelection();if(u){const{selectionStartLineNumber:f,selectionStartColumn:c}=u;a=[new p.Selection(f,c,t.lineNumber,t.column)]}}else a=(this._editor.getSelections()||[]).map(u=>u.containsPosition(t)?new p.Selection(t.lineNumber,t.column,t.lineNumber,t.column):u);this._editor.setSelections(a||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(b(n.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(o.ID,new v.DragAndDropCommand(this._dragSelection,t,b(n.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(n){this._dndDecorationIds.set([{range:new _.Range(n.lineNumber,n.column,n.lineNumber,n.column),options:o._DECORATION_OPTIONS}]),this._editor.revealPosition(n,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(n){return n.type===6||n.type===7}_hitMargin(n){return n.type===2||n.type===3||n.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=o,o.ID="editor.contrib.dragAndDrop",o.TRIGGER_KEY_VALUE=k.isMacintosh?6:5,o._DECORATION_OPTIONS=S.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,y.registerEditorContribution)(o.ID,o,2)}),define(ie[892],ne([1,0,5,43,39,30,23]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class p{constructor(v){this._editor=v,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 v=this._findScopeDecorationIds.map(b=>this._editor.getModel().getDecorationRange(b)).filter(b=>!!b);if(v.length)return v}return null}getStartPosition(){return this._startPosition}setStartPosition(v){this._startPosition=v,this.setCurrentFindMatch(null)}_getDecorationIndex(v){const b=this._decorations.indexOf(v);return b>=0?b+1:1}getDecorationRangeAt(v){const b=v{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,p._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),b!==null&&(this._highlightedDecorationId=b,i.changeDecorationOptions(this._highlightedDecorationId,p._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),b!==null){let n=this._editor.getModel().getDecorationRange(b);if(n.startLineNumber!==n.endLineNumber&&n.endColumn===1){const t=n.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(t);n=new L.Range(n.startLineNumber,n.startColumn,t,a)}this._rangeHighlightDecorationId=i.addDecoration(n,p._RANGE_HIGHLIGHT_DECORATION)}}),o}set(v,b){this._editor.changeDecorations(o=>{let i=p._FIND_MATCH_DECORATION;const n=[];if(v.length>1e3){i=p._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),f=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/f));let d=v[0].range.startLineNumber,r=v[0].range.endLineNumber;for(let l=1,s=v.length;l=g.startLineNumber?g.endLineNumber>r&&(r=g.endLineNumber):(n.push({range:new L.Range(d,1,r,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,r=g.endLineNumber)}n.push({range:new L.Range(d,1,r,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const t=new Array(v.length);for(let a=0,u=v.length;ao.removeDecoration(a)),this._findScopeDecorationIds=[]),b?.length&&(this._findScopeDecorationIds=b.map(a=>o.addDecoration(a,p._FIND_SCOPE_DECORATION)))})}matchBeforePosition(v){if(this._decorations.length===0)return null;for(let b=this._decorations.length-1;b>=0;b--){const o=this._decorations[b],i=this._editor.getModel().getDecorationRange(o);if(!(!i||i.endLineNumber>v.lineNumber)){if(i.endLineNumberv.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(v){if(this._decorations.length===0)return null;for(let b=0,o=this._decorations.length;bv.lineNumber)return n;if(!(n.startColumnthis.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,y.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(f){this._isDisposed||this._editor.hasModel()&&(f.searchString||f.isReplaceRevealed||f.isRegex||f.wholeWord||f.matchCase||f.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{f.searchScope?this.research(f.moveCursor,this._state.searchScope):this.research(f.moveCursor)},t)):f.searchScope?this.research(f.moveCursor,this._state.searchScope):this.research(f.moveCursor))}static _getSearchRange(f,c){return c||f.getFullModelRange()}research(f,c){let d=null;typeof c<"u"?c!==null&&(Array.isArray(c)?d=c:d=[c]):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 p.Range(g.startLineNumber,1,h,this._editor.getModel().getLineMaxColumn(h))}return g}));const r=this._findMatches(d,!1,e.MATCHES_LIMIT);this._decorations.set(r,d);const l=this._editor.getSelection();let s=this._decorations.getCurrentMatchesPosition(l);if(s===0&&r.length>0){const g=(0,L.findFirstIdxMonotonousOrArrLen)(r.map(h=>h.range),h=>p.Range.compareRangesUsingStarts(h,l)>=0);s=g>0?g-1+1:s}this._state.changeMatchInfo(s,this._decorations.getCount(),void 0),f&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const f=this._decorations.getFindScope();return f&&this._editor.revealRangeInCenterIfOutsideViewport(f,0),!0}return!1}_setCurrentFindMatch(f){const c=this._decorations.setCurrentFindMatch(f);this._state.changeMatchInfo(c,this._decorations.getCount(),f),this._editor.setSelection(f),this._editor.revealRangeInCenterIfOutsideViewport(f,0)}_prevSearchPosition(f){const c=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:d,column:r}=f;const l=this._editor.getModel();return c||r===1?(d===1?d=l.getLineCount():d--,r=l.getLineMaxColumn(d)):r--,new _.Position(d,r)}_moveToPrevMatch(f,c=!1){if(!this._state.canNavigateBack()){const C=this._decorations.matchAfterPosition(f);C&&this._setCurrentFindMatch(C);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:d,column:r}=f;const l=this._editor.getModel();return c||r===l.getLineMaxColumn(d)?(d===l.getLineCount()?d=1:d++,r=1):r++,new _.Position(d,r)}_moveToNextMatch(f){if(!this._state.canNavigateForward()){const d=this._decorations.matchBeforePosition(f);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()a._getSearchRange(this._editor.getModel(),l));return this._editor.getModel().findMatches(this._state.searchString,r,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,c,d)}replaceAll(){if(!this._hasMatches())return;const f=this._decorations.getFindScopes();f===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(f),this.research(!1)}_largeReplaceAll(){const c=new v.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!c)return;let d=c.regex;if(!d.multiline){let w="mu";d.ignoreCase&&(w+="i"),d.global&&(w+="g"),d=new RegExp(d.source,w)}const r=this._editor.getModel(),l=r.getValue(1),s=r.getFullModelRange(),g=this._getReplacePattern();let h;const m=this._state.preserveCase;g.hasReplacementPatterns||m?h=l.replace(d,function(){return g.buildReplaceString(arguments,m)}):h=l.replace(d,g.buildReplaceString(null,m));const C=new E.ReplaceCommandThatPreservesSelection(s,h,this._editor.getSelection());this._executeEditorCommand("replaceAll",C)}_regularReplaceAll(f){const c=this._getReplacePattern(),d=this._findMatches(f,c.hasReplacementPatterns||this._state.preserveCase,1073741824),r=[];for(let s=0,g=d.length;ss.range),r);this._executeEditorCommand("replaceAll",l)}selectAllMatches(){if(!this._hasMatches())return;const f=this._decorations.getFindScopes();let d=this._findMatches(f,!1,1073741824).map(l=>new S.Selection(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn));const r=this._editor.getSelection();for(let l=0,s=d.length;lthis._hide(),2e3)),this._isVisible=!1,this._editor=b,this._state=o,this._keybindingService=i,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 n={inputActiveOptionBorder:(0,p.asCssVariable)(p.inputActiveOptionBorder),inputActiveOptionForeground:(0,p.asCssVariable)(p.inputActiveOptionForeground),inputActiveOptionBackground:(0,p.asCssVariable)(p.inputActiveOptionBackground)};this.caseSensitive=this._register(new k.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(_.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,...n})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new k.WholeWordsToggle({appendTitle:this._keybindingLabelFor(_.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,...n})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new k.RegexToggle({appendTitle:this._keybindingLabelFor(_.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,...n})),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(t=>{let a=!1;t.isRegex&&(this.regex.checked=this._state.isRegex,a=!0),t.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,a=!0),t.matchCase&&(this.caseSensitive.checked=this._state.matchCase,a=!0),!this._state.isRevealed&&a&&this._revealTemporarily()})),this._register(L.addDisposableListener(this._domNode,L.EventType.MOUSE_LEAVE,t=>this._onMouseLeave())),this._register(L.addDisposableListener(this._domNode,"mouseover",t=>this._onMouseOver()))}_keybindingLabelFor(b){const o=this._keybindingService.lookupKeybinding(b);return o?` (${o.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return S.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")}}e.FindOptionsWidget=S,S.ID="editor.contrib.findOptionsWidget"}),define(ie[894],ne([1,0,6,2,5,195]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function _(S,v){return S===1?!0:S===2?!1:v}class p extends k.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return _(this._isRegexOverride,this._isRegex)}get wholeWord(){return _(this._wholeWordOverride,this._wholeWord)}get matchCase(){return _(this._matchCaseOverride,this._matchCase)}get preserveCase(){return _(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}constructor(){super(),this._onFindReplaceStateChange=this._register(new L.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(v,b,o){const i={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 n=!1;b===0&&(v=0),v>b&&(v=b),this._matchesPosition!==v&&(this._matchesPosition=v,i.matchesPosition=!0,n=!0),this._matchesCount!==b&&(this._matchesCount=b,i.matchesCount=!0,n=!0),typeof o<"u"&&(y.Range.equalsRange(this._currentMatch,o)||(this._currentMatch=o,i.currentMatch=!0,n=!0)),n&&this._onFindReplaceStateChange.fire(i)}change(v,b,o=!0){var i;const n={moveCursor:b,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1};let t=!1;const a=this.isRegex,u=this.wholeWord,f=this.matchCase,c=this.preserveCase;typeof v.searchString<"u"&&this._searchString!==v.searchString&&(this._searchString=v.searchString,n.searchString=!0,t=!0),typeof v.replaceString<"u"&&this._replaceString!==v.replaceString&&(this._replaceString=v.replaceString,n.replaceString=!0,t=!0),typeof v.isRevealed<"u"&&this._isRevealed!==v.isRevealed&&(this._isRevealed=v.isRevealed,n.isRevealed=!0,t=!0),typeof v.isReplaceRevealed<"u"&&this._isReplaceRevealed!==v.isReplaceRevealed&&(this._isReplaceRevealed=v.isReplaceRevealed,n.isReplaceRevealed=!0,t=!0),typeof v.isRegex<"u"&&(this._isRegex=v.isRegex),typeof v.wholeWord<"u"&&(this._wholeWord=v.wholeWord),typeof v.matchCase<"u"&&(this._matchCase=v.matchCase),typeof v.preserveCase<"u"&&(this._preserveCase=v.preserveCase),typeof v.searchScope<"u"&&(!((i=v.searchScope)===null||i===void 0)&&i.every(d=>{var r;return(r=this._searchScope)===null||r===void 0?void 0:r.some(l=>!y.Range.equalsRange(l,d))})||(this._searchScope=v.searchScope,n.searchScope=!0,t=!0)),typeof v.loop<"u"&&this._loop!==v.loop&&(this._loop=v.loop,n.loop=!0,t=!0),typeof v.isSearching<"u"&&this._isSearching!==v.isSearching&&(this._isSearching=v.isSearching,n.isSearching=!0,t=!0),typeof v.filters<"u"&&(this._filters?this._filters.update(v.filters):this._filters=v.filters,n.filters=!0,t=!0),this._isRegexOverride=typeof v.isRegexOverride<"u"?v.isRegexOverride:0,this._wholeWordOverride=typeof v.wholeWordOverride<"u"?v.wholeWordOverride:0,this._matchCaseOverride=typeof v.matchCaseOverride<"u"?v.matchCaseOverride:0,this._preserveCaseOverride=typeof v.preserveCaseOverride<"u"?v.preserveCaseOverride:0,a!==this.isRegex&&(t=!0,n.isRegex=!0),u!==this.wholeWord&&(t=!0,n.wholeWord=!0),f!==this.matchCase&&(t=!0,n.matchCase=!0),c!==this.preserveCase&&(t=!0,n.preserveCase=!0),t&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=E.MATCHES_LIMIT}}e.FindReplaceState=p}),define(ie[895],ne([1,0,7,51,158,157,86,14,26,9,2,17,12,5,195,666,354,754,30,81,23,27,88,20,105,453]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h){"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 m=(0,d.registerIcon)("find-selection",S.Codicon.selection,a.localize(0,null)),C=(0,d.registerIcon)("find-collapsed",S.Codicon.chevronRight,a.localize(1,null)),w=(0,d.registerIcon)("find-expanded",S.Codicon.chevronDown,a.localize(2,null));e.findReplaceIcon=(0,d.registerIcon)("find-replace",S.Codicon.replace,a.localize(3,null)),e.findReplaceAllIcon=(0,d.registerIcon)("find-replace-all",S.Codicon.replaceAll,a.localize(4,null)),e.findPreviousMatchIcon=(0,d.registerIcon)("find-previous-match",S.Codicon.arrowUp,a.localize(5,null)),e.findNextMatchIcon=(0,d.registerIcon)("find-next-match",S.Codicon.arrowDown,a.localize(6,null));const D=a.localize(7,null),I=a.localize(8,null),M=a.localize(9,null),A=a.localize(10,null),O=a.localize(11,null),T=a.localize(12,null),N=a.localize(13,null),P=a.localize(14,null),x=a.localize(15,null),R=a.localize(16,null),B=a.localize(17,null),W=a.localize(18,null),V=a.localize(19,null,t.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=a.localize(20,null),e.NLS_NO_RESULTS=a.localize(21,null);const U=419,j=275-54;let J=69;const le=33,ee="ctrlEnterReplaceAll.windows.donotask",$=o.isMacintosh?256:2048;class te{constructor(re){this.afterLineNumber=re,this.heightInPx=le,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=te;function G(Z,re,oe){const Y=!!re.match(/\n/);if(oe&&Y&&oe.selectionStart>0){Z.stopPropagation();return}}function de(Z,re,oe){const Y=!!re.match(/\n/);if(oe&&Y&&oe.selectionEndthis._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(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ce.hasChanged(143)&&this._tryUpdateWidgetWidth(),ce.hasChanged(2)&&this.updateAccessibilitySupport(),ce.hasChanged(41)){const ge=this._codeEditor.getOption(41).loop;this._state.change({loop:ge},!1);const pe=this._codeEditor.getOption(41).addExtraSpaceOnTop;pe&&!this._viewZone&&(this._viewZone=new te(0),this._showViewZone()),!pe&&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=t.CONTEXT_FIND_INPUT_FOCUSED.bindTo(z),this._findFocusTracker=this._register(L.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=t.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(z),this._replaceFocusTracker=this._register(L.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(41).addExtraSpaceOnTop&&(this._viewZone=new te(0)),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 ue.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(re){if(re.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(re.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),re.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),re.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(90)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=L.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(re.isRevealed||re.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),re.isRegex&&this._findInput.setRegex(this._state.isRegex),re.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),re.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),re.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),re.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),re.searchString||re.matchesCount||re.matchesPosition){const oe=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",oe),this._updateMatchesCount(),this._updateButtons()}(re.searchString||re.currentMatch)&&this._layoutViewZone(),re.updateHistory&&this._delayedUpdateHistory(),re.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,v.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=J+"px",this._state.matchesCount>=t.MATCHES_LIMIT?this._matchesCount.title=V:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let re;if(this._state.matchesCount>0){let oe=String(this._state.matchesCount);this._state.matchesCount>=t.MATCHES_LIMIT&&(oe+="+");let Y=String(this._state.matchesPosition);Y==="0"&&(Y="?"),re=i.format(e.NLS_MATCHES_LOCATION,Y,oe)}else re=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(re)),(0,k.alert)(this._getAriaLabel(re,this._state.currentMatch,this._state.searchString)),J=Math.max(J,this._matchesCount.clientWidth)}_getAriaLabel(re,oe,Y){if(re===e.NLS_NO_RESULTS)return Y===""?a.localize(22,null,re):a.localize(23,null,re,Y);if(oe){const K=a.localize(24,null,re,Y,oe.startLineNumber+":"+oe.startColumn),H=this._codeEditor.getModel();return H&&oe.startLineNumber<=H.getLineCount()&&oe.startLineNumber>=1?`${H.getLineContent(oe.startLineNumber)}, ${K}`:K}return a.localize(25,null,re,Y)}_updateToggleSelectionFindButton(){const re=this._codeEditor.getSelection(),oe=re?re.startLineNumber!==re.endLineNumber||re.startColumn!==re.endColumn:!1,Y=this._toggleSelectionFind.checked;this._isVisible&&(Y||oe)?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 re=this._state.searchString.length>0,oe=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&re&&oe&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&re&&oe&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&re),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&re),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const Y=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&Y)}_reveal(){if(this._revealTimeouts.forEach(re=>{clearTimeout(re)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const re=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const Y=!!re&&re.startLineNumber!==re.endLineNumber;this._toggleSelectionFind.checked=Y;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 oe=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&re){const Y=this._codeEditor.getDomNode();if(Y){const K=L.getDomNodePagePosition(Y),H=this._codeEditor.getScrolledVisiblePosition(re.getStartPosition()),z=K.left+(H?H.left:0),se=H?H.top:0;if(this._viewZone&&sere.startLineNumber&&(oe=!1);const q=L.getTopLeftOffset(this._domNode).left;z>q&&(oe=!1);const ae=this._codeEditor.getScrolledVisiblePosition(re.getEndPosition());K.left+(ae?ae.left:0)>q&&(oe=!1)}}}this._showViewZone(oe)}}_hide(re){this._revealTimeouts.forEach(oe=>{clearTimeout(oe)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),re&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(re){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const Y=this._viewZone;this._viewZoneId!==void 0||!Y||this._codeEditor.changeViewZones(K=>{Y.heightInPx=this._getHeight(),this._viewZoneId=K.addZone(Y),this._codeEditor.setScrollTop(re||this._codeEditor.getScrollTop()+Y.heightInPx)})}_showViewZone(re=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new te(0));const Y=this._viewZone;this._codeEditor.changeViewZones(K=>{if(this._viewZoneId!==void 0){const H=this._getHeight();if(H===Y.heightInPx)return;const z=H-Y.heightInPx;Y.heightInPx=H,K.layoutZone(this._viewZoneId),re&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+z);return}else{let H=this._getHeight();if(H-=this._codeEditor.getOption(83).top,H<=0)return;Y.heightInPx=H,this._viewZoneId=K.addZone(Y),re&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+H)}})}_removeViewZone(){this._codeEditor.changeViewZones(re=>{this._viewZoneId!==void 0&&(re.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!this._domNode.isConnected)return;const re=this._codeEditor.getLayoutInfo();if(re.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const Y=re.width,K=re.minimap.minimapWidth;let H=!1,z=!1,se=!1;if(this._resized&&L.getTotalWidth(this._domNode)>U){this._domNode.style.maxWidth=`${Y-28-K-15}px`,this._replaceInput.width=L.getTotalWidth(this._findInput.domNode);return}if(U+28+K>=Y&&(z=!0),U+28+K-J>=Y&&(se=!0),U+28+K-J>=Y+50&&(H=!0),this._domNode.classList.toggle("collapsed-find-widget",H),this._domNode.classList.toggle("narrow-find-widget",se),this._domNode.classList.toggle("reduced-find-widget",z),!se&&!H&&(this._domNode.style.maxWidth=`${Y-28-K-15}px`),this._findInput.layout({collapsedFindWidget:H,narrowFindWidget:se,reducedFindWidget:z}),this._resized){const q=this._findInput.inputBox.element.clientWidth;q>0&&(this._replaceInput.width=q)}else this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode))}_getHeight(){let re=0;return re+=4,re+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(re+=4,re+=this._replaceInput.inputBox.height+2),re+=4,re}_tryUpdateHeight(){const re=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===re?!1:(this._cachedHeight=re,this._domNode.style.height=`${re}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 re=this._codeEditor.getSelections();re.map(oe=>{oe.endColumn===1&&oe.endLineNumber>oe.startLineNumber&&(oe=oe.setEndPosition(oe.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(oe.endLineNumber-1)));const Y=this._state.currentMatch;return oe.startLineNumber!==oe.endLineNumber&&!n.Range.equalsRange(oe,Y)?oe:null}).filter(oe=>!!oe),re.length&&this._state.change({searchScope:re},!0)}}_onFindInputMouseDown(re){re.middleButton&&re.stopPropagation()}_onFindInputKeyDown(re){if(re.equals($|3))if(this._keybindingService.dispatchEvent(re,re.target)){re.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` `),re.preventDefault();return}if(re.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),re.preventDefault();return}if(re.equals(2066)){this._codeEditor.focus(),re.preventDefault();return}if(re.equals(16))return G(re,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(re.equals(18))return de(re,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(re){if(re.equals($|3))if(this._keybindingService.dispatchEvent(re,re.target)){re.preventDefault();return}else{o.isWindows&&o.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(a.localize(26,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ee,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` `),re.preventDefault();return}if(re.equals(2)){this._findInput.focusOnCaseSensitive(),re.preventDefault();return}if(re.equals(1026)){this._findInput.focus(),re.preventDefault();return}if(re.equals(2066)){this._codeEditor.focus(),re.preventDefault();return}if(re.equals(16))return G(re,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(re.equals(18))return de(re,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(re){return 0}_keybindingLabelFor(re){const oe=this._keybindingService.lookupKeybinding(re);return oe?` (${oe.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new u.ContextScopedFindInput(null,this._contextViewProvider,{width:j,label:I,placeholder:M,appendCaseSensitiveLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleRegexCommand),validation:q=>{if(q.length===0||!this._findInput.getRegex())return null;try{return new RegExp(q,"gu"),null}catch(ae){return{content:ae.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,f.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:h.defaultInputBoxStyles,toggleStyles:h.defaultToggleStyles},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(q=>this._onFindInputKeyDown(q))),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(q=>{q.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),q.preventDefault())})),this._register(this._findInput.onRegexKeyDown(q=>{q.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),q.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(q=>{this._tryUpdateHeight()&&this._showViewZone()})),o.isLinux&&this._register(this._findInput.onMouseDown(q=>this._onFindInputMouseDown(q))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new X({label:A+this._keybindingLabelFor(t.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(t.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,v.onUnexpectedError)}})),this._nextBtn=this._register(new X({label:O+this._keybindingLabelFor(t.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(t.FIND_IDS.NextMatchFindAction)).run().then(void 0,v.onUnexpectedError)}}));const Y=document.createElement("div");Y.className="find-part",Y.appendChild(this._findInput.domNode);const K=document.createElement("div");K.className="find-actions",Y.appendChild(K),K.appendChild(this._matchesCount),K.appendChild(this._prevBtn.domNode),K.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y.Toggle({icon:m,title:T+this._keybindingLabelFor(t.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:(0,c.asCssVariable)(c.inputActiveOptionBackground),inputActiveOptionBorder:(0,c.asCssVariable)(c.inputActiveOptionBorder),inputActiveOptionForeground:(0,c.asCssVariable)(c.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const q=this._codeEditor.getSelections();q.map(ae=>(ae.endColumn===1&&ae.endLineNumber>ae.startLineNumber&&(ae=ae.setEndPosition(ae.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ae.endLineNumber-1))),ae.isEmpty()?null:ae)).filter(ae=>!!ae),q.length&&this._state.change({searchScope:q},!0)}}else this._state.change({searchScope:null},!0)})),K.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new X({label:N+this._keybindingLabelFor(t.FIND_IDS.CloseFindWidgetCommand),icon:d.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:q=>{q.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),q.preventDefault())}})),this._replaceInput=this._register(new u.ContextScopedReplaceInput(null,void 0,{label:P,placeholder:x,appendPreserveCaseLabel:this._keybindingLabelFor(t.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,f.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:h.defaultInputBoxStyles,toggleStyles:h.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(q=>this._onReplaceInputKeyDown(q))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(q=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(q=>{q.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(),q.preventDefault())})),this._replaceBtn=this._register(new X({label:R+this._keybindingLabelFor(t.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:q=>{q.equals(1026)&&(this._closeBtn.focus(),q.preventDefault())}})),this._replaceAllBtn=this._register(new X({label:B+this._keybindingLabelFor(t.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const H=document.createElement("div");H.className="replace-part",H.appendChild(this._replaceInput.domNode);const z=document.createElement("div");z.className="replace-actions",H.appendChild(z),z.appendChild(this._replaceBtn.domNode),z.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new X({label:W,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=L.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.ariaLabel=D,this._domNode.role="dialog",this._domNode.style.width=`${U}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(Y),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(H),this._resizeSash=new E.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let se=U;this._register(this._resizeSash.onDidStart(()=>{se=L.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(q=>{this._resized=!0;const ae=se+q.startX-q.currentX;if(aece||(this._domNode.style.width=`${ae}px`,this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const q=L.getTotalWidth(this._domNode);if(q{this._opts.onTrigger(),Y.preventDefault()}),this.onkeydown(this._domNode,Y=>{var K,H;if(Y.equals(10)||Y.equals(3)){this._opts.onTrigger(),Y.preventDefault();return}(H=(K=this._opts).onKeyDown)===null||H===void 0||H.call(K,Y)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(re){this._domNode.classList.toggle("disabled",!re),this._domNode.setAttribute("aria-disabled",String(!re)),this._domNode.tabIndex=re?0:-1}setExpanded(re){this._domNode.setAttribute("aria-expanded",String(!!re)),re?(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(C)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(w))):(this._domNode.classList.remove(...l.ThemeIcon.asClassNameArray(w)),this._domNode.classList.add(...l.ThemeIcon.asClassNameArray(C)))}}e.SimpleButton=X,(0,r.registerThemingParticipant)((Z,re)=>{const oe=(Ce,Se)=>{Se&&re.addRule(`.monaco-editor ${Ce} { background-color: ${Se}; }`)};oe(".findMatch",Z.getColor(c.editorFindMatchHighlight)),oe(".currentFindMatch",Z.getColor(c.editorFindMatch)),oe(".findScope",Z.getColor(c.editorFindRangeHighlight));const Y=Z.getColor(c.editorWidgetBackground);oe(".find-widget",Y);const K=Z.getColor(c.widgetShadow);K&&re.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${K}; }`);const H=Z.getColor(c.widgetBorder);H&&re.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${H}; border-right: 1px solid ${H}; border-bottom: 1px solid ${H}; }`);const z=Z.getColor(c.editorFindMatchHighlightBorder);z&&re.addRule(`.monaco-editor .findMatch { border: 1px ${(0,s.isHighContrast)(Z.type)?"dotted":"solid"} ${z}; box-sizing: border-box; }`);const se=Z.getColor(c.editorFindMatchBorder);se&&re.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${se}; padding: 1px; box-sizing: border-box; }`);const q=Z.getColor(c.editorFindRangeHighlightBorder);q&&re.addRule(`.monaco-editor .findScope { border: 1px ${(0,s.isHighContrast)(Z.type)?"dashed":"solid"} ${q}; }`);const ae=Z.getColor(c.contrastBorder);ae&&re.addRule(`.monaco-editor .find-widget { border: 1px solid ${ae}; }`);const ce=Z.getColor(c.editorWidgetForeground);ce&&re.addRule(`.monaco-editor .find-widget { color: ${ce}; }`);const ge=Z.getColor(c.errorForeground);ge&&re.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ge}; }`);const pe=Z.getColor(c.editorWidgetResizeBorder);if(pe)re.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${pe}; }`);else{const Ce=Z.getColor(c.editorWidgetBorder);Ce&&re.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${Ce}; }`)}const me=Z.getColor(c.toolbarHoverBackground);me&&re.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${me} !important; } `);const ve=Z.getColor(c.focusBorder);ve&&re.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${ve}; }`)})}),define(ie[374],ne([1,0,14,2,12,16,82,21,43,195,893,894,895,665,29,103,15,59,34,47,70,91,23]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.MoveToMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const h=524288;function m(W,V="single",U=!1){if(!W.hasModel())return null;const F=W.getSelection();if(V==="single"&&F.startLineNumber===F.endLineNumber||V==="multiple"){if(F.isEmpty()){const j=W.getConfiguredWordAtPosition(F.getStartPosition());if(j&&U===!1)return j.word}else if(W.getModel().getValueLengthInRange(F)this._onStateChanged(le))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const le=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),le&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(V){this.saveQueryState(V),V.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),V.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(V){V.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),V.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),V.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),V.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}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!!v.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 V=this._editor.getSelections();V.map(U=>(U.endColumn===1&&U.endLineNumber>U.startLineNumber&&(U=U.setEndPosition(U.endLineNumber-1,this._editor.getModel().getLineMaxColumn(U.endLineNumber-1))),U.isEmpty()?null:U)).filter(U=>!!U),V.length&&this._state.change({searchScope:V},!0)}}setSearchString(V){this._state.isRegex&&(V=y.escapeRegExpCharacters(V)),this._state.change({searchString:V},!1)}highlightFindOptions(V=!1){}async _start(V,U){if(this.disposeModel(),!this._editor.hasModel())return;const F={...U,isRevealed:!0};if(V.seedSearchStringFromSelection==="single"){const j=m(this._editor,V.seedSearchStringFromSelection,V.seedSearchStringFromNonEmptySelection);j&&(this._state.isRegex?F.searchString=y.escapeRegExpCharacters(j):F.searchString=j)}else if(V.seedSearchStringFromSelection==="multiple"&&!V.updateSearchScope){const j=m(this._editor,V.seedSearchStringFromSelection);j&&(F.searchString=j)}if(!F.searchString&&V.seedSearchStringFromGlobalClipboard){const j=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;j&&(F.searchString=j)}if(V.forceRevealReplace||F.isReplaceRevealed?F.isReplaceRevealed=!0:this._findWidgetVisible.get()||(F.isReplaceRevealed=!1),V.updateSearchScope){const j=this._editor.getSelections();j.some(J=>!J.isEmpty())&&(F.searchScope=j)}F.loop=V.loop,this._state.change(F,!1),this._model||(this._model=new v.FindModelBoundToEditorModel(this._editor,this._state))}start(V,U){return this._start(V,U)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(V){return this._model?(this._model.moveToMatch(V),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var V;return this._model?!((V=this._editor.getModel())===null||V===void 0)&&V.isTooLargeForHeapOperation()?(this._notificationService.warn(n.localize(0,null)),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}async getGlobalBufferTerm(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(V){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(V)}};e.CommonFindController=C,C.ID="editor.contrib.findController",e.CommonFindController=C=g=Ee([he(1,u.IContextKeyService),he(2,l.IStorageService),he(3,a.IClipboardService),he(4,d.INotificationService)],C);let w=class extends C{constructor(V,U,F,j,J,le,ee,$){super(V,F,ee,$,le),this._contextViewService=U,this._keybindingService=j,this._themeService=J,this._widget=null,this._findOptionsWidget=null}async _start(V,U){this._widget||this._createFindWidget();const F=this._editor.getSelection();let j=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":j=!0;break;case"never":j=!1;break;case"multiline":{j=!!F&&F.startLineNumber!==F.endLineNumber;break}default:break}V.updateSearchScope=V.updateSearchScope||j,await super._start(V,U),this._widget&&(V.shouldFocus===2?this._widget.focusReplaceInput():V.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(V=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!V?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new i.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new b.FindOptionsWidget(this._editor,this._state,this._keybindingService))}};e.FindController=w,e.FindController=w=Ee([he(1,f.IContextViewService),he(2,u.IContextKeyService),he(3,c.IKeybindingService),he(4,s.IThemeService),he(5,d.INotificationService),he(6,l.IStorageService),he(7,a.IClipboardService)],w),e.StartFindAction=(0,E.registerMultiEditorAction)(new E.MultiEditorAction({id:v.FIND_IDS.StartFindAction,label:n.localize(1,null),alias:"Find",precondition:u.ContextKeyExpr.or(p.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:t.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(2,null),order:1}})),e.StartFindAction.addImplementation(0,(W,V,U)=>{const F=C.get(V);return F?F.start({forceRevealReplace:!1,seedSearchStringFromSelection:V.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:V.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:V.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:V.getOption(41).loop}):!1});const D={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:n.localize(3,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:n.localize(4,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:n.localize(5,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:n.localize(6,null)},findInSelection:{type:"boolean"}}}}]};class I extends E.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithArgs,label:n.localize(7,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:D})}async run(V,U,F){const j=C.get(U);if(j){const J=F?{searchString:F.searchString,replaceString:F.replaceString,isReplaceRevealed:F.replaceString!==void 0,isRegex:F.isRegex,wholeWord:F.matchWholeWord,matchCase:F.isCaseSensitive,preserveCase:F.preserveCase}:{};await j.start({forceRevealReplace:!1,seedSearchStringFromSelection:j.getState().searchString.length===0&&U.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:F?.findInSelection||!1,loop:U.getOption(41).loop},J),j.setGlobalBufferTerm(j.getState().searchString)}}}e.StartFindWithArgsAction=I;class M extends E.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithSelection,label:n.localize(8,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(V,U){const F=C.get(U);F&&(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(41).loop}),F.setGlobalBufferTerm(F.getState().searchString))}}e.StartFindWithSelectionAction=M;class A extends E.EditorAction{async run(V,U){const F=C.get(U);F&&!this._run(F)&&(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:F.getState().searchString.length===0&&U.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(41).loop}),this._run(F))}}e.MatchFindAction=A;class O extends A{constructor(){super({id:v.FIND_IDS.NextMatchFindAction,label:n.localize(9,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:p.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:u.ContextKeyExpr.and(p.EditorContextKeys.focus,v.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(V){return V.moveToNextMatch()?(V.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=O;class T extends A{constructor(){super({id:v.FIND_IDS.PreviousMatchFindAction,label:n.localize(10,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:p.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:u.ContextKeyExpr.and(p.EditorContextKeys.focus,v.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(V){return V.moveToPrevMatch()}}e.PreviousMatchFindAction=T;class N extends E.EditorAction{constructor(){super({id:v.FIND_IDS.GoToMatchFindAction,label:n.localize(11,null),alias:"Go to Match...",precondition:v.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(V,U,F){const j=C.get(U);if(!j)return;const J=j.getState().matchesCount;if(J<1){V.get(d.INotificationService).notify({severity:d.Severity.Warning,message:n.localize(12,null)});return}const ee=V.get(r.IQuickInputService).createInputBox();ee.placeholder=n.localize(13,null,J);const $=G=>{const de=parseInt(G);if(isNaN(de))return;const ue=j.getState().matchesCount;if(de>0&&de<=ue)return de-1;if(de<0&&de>=-ue)return ue+de},te=G=>{const de=$(G);if(typeof de=="number"){ee.validationMessage=void 0,j.goToMatch(de);const ue=j.getState().currentMatch;ue&&this.addDecorations(U,ue)}else ee.validationMessage=n.localize(14,null,j.getState().matchesCount),this.clearDecorations(U)};ee.onDidChangeValue(G=>{te(G)}),ee.onDidAccept(()=>{const G=$(ee.value);typeof G=="number"?(j.goToMatch(G),ee.hide()):ee.validationMessage=n.localize(15,null,j.getState().matchesCount)}),ee.onDidHide(()=>{this.clearDecorations(U),ee.dispose()}),ee.show()}clearDecorations(V){V.changeDecorations(U=>{this._highlightDecorations=U.deltaDecorations(this._highlightDecorations,[])})}addDecorations(V,U){V.changeDecorations(F=>{this._highlightDecorations=F.deltaDecorations(this._highlightDecorations,[{range:U,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:U,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,s.themeColorFromId)(_.overviewRulerRangeHighlight),position:S.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=N;class P extends E.EditorAction{async run(V,U){const F=C.get(U);if(!F)return;const j=m(U,"single",!1);j&&F.setSearchString(j),this._run(F)||(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(41).loop}),this._run(F))}}e.SelectionMatchFindAction=P;class x extends P{constructor(){super({id:v.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(16,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2109,weight:100}})}_run(V){return V.moveToNextMatch()}}e.NextSelectionMatchFindAction=x;class R extends P{constructor(){super({id:v.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(17,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3133,weight:100}})}_run(V){return V.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=R,e.StartFindReplaceAction=(0,E.registerMultiEditorAction)(new E.MultiEditorAction({id:v.FIND_IDS.StartFindReplaceAction,label:n.localize(18,null),alias:"Replace",precondition:u.ContextKeyExpr.or(p.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:t.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(19,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(W,V,U)=>{if(!V.hasModel()||V.getOption(90))return!1;const F=C.get(V);if(!F)return!1;const j=V.getSelection(),J=F.isFindInputFocused(),le=!j.isEmpty()&&j.startLineNumber===j.endLineNumber&&V.getOption(41).seedSearchStringFromSelection!=="never"&&!J,ee=J||le?2:1;return F.start({forceRevealReplace:!0,seedSearchStringFromSelection:le?"single":"none",seedSearchStringFromNonEmptySelection:V.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:V.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:ee,shouldAnimate:!0,updateSearchScope:!1,loop:V.getOption(41).loop})}),(0,E.registerEditorContribution)(C.ID,w,0),(0,E.registerEditorAction)(I),(0,E.registerEditorAction)(M),(0,E.registerEditorAction)(O),(0,E.registerEditorAction)(T),(0,E.registerEditorAction)(N),(0,E.registerEditorAction)(x),(0,E.registerEditorAction)(R);const B=E.EditorCommand.bindToContribution(C.get);(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.CloseFindWidgetCommand,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(p.EditorContextKeys.focus,u.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:W=>W.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:v.ToggleCaseSensitiveKeybinding.primary,mac:v.ToggleCaseSensitiveKeybinding.mac,win:v.ToggleCaseSensitiveKeybinding.win,linux:v.ToggleCaseSensitiveKeybinding.linux}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:W=>W.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:v.ToggleWholeWordKeybinding.primary,mac:v.ToggleWholeWordKeybinding.mac,win:v.ToggleWholeWordKeybinding.win,linux:v.ToggleWholeWordKeybinding.linux}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:W=>W.toggleRegex(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:v.ToggleRegexKeybinding.primary,mac:v.ToggleRegexKeybinding.mac,win:v.ToggleRegexKeybinding.win,linux:v.ToggleRegexKeybinding.linux}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:W=>W.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:v.ToggleSearchScopeKeybinding.primary,mac:v.ToggleSearchScopeKeybinding.mac,win:v.ToggleSearchScopeKeybinding.win,linux:v.ToggleSearchScopeKeybinding.linux}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:W=>W.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:v.TogglePreserveCaseKeybinding.primary,mac:v.TogglePreserveCaseKeybinding.mac,win:v.TogglePreserveCaseKeybinding.win,linux:v.TogglePreserveCaseKeybinding.linux}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ReplaceOneAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:3094}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ReplaceOneAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(p.EditorContextKeys.focus,v.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ReplaceAllAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:2563}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.ReplaceAllAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(p.EditorContextKeys.focus,v.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,E.registerEditorCommand)(new B({id:v.FIND_IDS.SelectAllMatchesAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:p.EditorContextKeys.focus,primary:515}}))}),define(ie[375],ne([1,0,26,43,39,668,30,81,23,27]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const b=(0,_.registerColor)("editor.foldBackground",{light:(0,_.transparent)(_.editorSelectionBackground,.3),dark:(0,_.transparent)(_.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,E.localize)(0,null),!0);(0,_.registerColor)("editorGutter.foldingControlForeground",{dark:_.iconForeground,light:_.iconForeground,hcDark:_.iconForeground,hcLight:_.iconForeground},(0,E.localize)(1,null)),e.foldingExpandedIcon=(0,p.registerIcon)("folding-expanded",L.Codicon.chevronDown,(0,E.localize)(2,null)),e.foldingCollapsedIcon=(0,p.registerIcon)("folding-collapsed",L.Codicon.chevronRight,(0,E.localize)(3,null)),e.foldingManualCollapsedIcon=(0,p.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,E.localize)(4,null)),e.foldingManualExpandedIcon=(0,p.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,E.localize)(5,null));const o={color:(0,S.themeColorFromId)(b),position:k.MinimapPosition.Inline};class i{constructor(t){this.editor=t,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(t,a,u){return a?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?t?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:t?u?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?u?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:u?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(t){return this.editor.changeDecorations(t)}removeDecorations(t){this.editor.removeDecorations(t)}}e.FoldingDecorationProvider=i,i.COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:o,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),i.MANUALLY_COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:o,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:o,isWholeLine:!0}),i.EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingExpandedIcon)}),i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingExpandedIcon)}),i.MANUALLY_EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),i.NO_CONTROLS_EXPANDED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),i.HIDDEN_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(ie[258],ne([1,0,14,19,9,65,2,12,20,124,16,21,31,32,299,553,300,667,15,375,183,301,47,78,61,18,6,25,22,52,28,454]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const O=new c.RawContextKey("foldingEnabled",!1);let T=A=class extends _.Disposable{static get(Y){return Y.getContribution(A.ID)}static getFoldingRangeProviders(Y,K){var H,z;const se=Y.foldingRangeProvider.ordered(K);return(z=(H=A._foldingRangeSelector)===null||H===void 0?void 0:H.call(A,se,K))!==null&&z!==void 0?z:se}constructor(Y,K,H,z,se,q){super(),this.contextKeyService=K,this.languageConfigurationService=H,this.languageFeaturesService=q,this.localToDispose=this._register(new _.DisposableStore),this.editor=Y,this._foldingLimitReporter=new N(Y);const ae=this.editor.getOptions();this._isEnabled=ae.get(43),this._useFoldingProviders=ae.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=ae.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=ae.get(46),this.updateDebounceInfo=se.for(q.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 d.FoldingDecorationProvider(Y),this.foldingDecorationProvider.showFoldingControls=ae.get(109),this.foldingDecorationProvider.showFoldingHighlights=ae.get(45),this.foldingEnabled=O.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(ce=>{if(ce.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),ce.hasChanged(47)&&this.onModelChanged(),ce.hasChanged(109)||ce.hasChanged(45)){const ge=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ge.get(109),this.foldingDecorationProvider.showFoldingHighlights=ge.get(45),this.triggerFoldingModelChanged()}ce.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),ce.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),ce.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const Y=this.editor.getModel();if(!Y||!this._isEnabled||Y.isTooLargeForTokenization())return{};if(this.foldingModel){const K=this.foldingModel.getMemento(),H=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:K,lineCount:Y.getLineCount(),provider:H,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(Y){const K=this.editor.getModel();if(!(!K||!this._isEnabled||K.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 t.FoldingModel(Y,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new a.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(K=>this.onHiddenRangesChanges(K))),this.updateScheduler=new L.Delayer(this.updateDebounceInfo.get(Y)),this.cursorChangedScheduler=new L.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(K=>this.onDidChangeModelContent(K))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(K=>this.onEditorMouseDown(K))),this.localToDispose.add(this.editor.onMouseUp(K=>this.onEditorMouseUp(K))),this.localToDispose.add({dispose:()=>{var K,H;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(K=this.updateScheduler)===null||K===void 0||K.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(H=this.rangeProvider)===null||H===void 0||H.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var Y;(Y=this.rangeProvider)===null||Y===void 0||Y.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(Y){if(this.rangeProvider)return this.rangeProvider;const K=new u.IndentRangeProvider(Y,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=K,this._useFoldingProviders&&this.foldingModel){const H=A.getFoldingRangeProviders(this.languageFeaturesService,Y);H.length>0&&(this.rangeProvider=new l.SyntaxRangeProvider(Y,H,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,K))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(Y){var K;(K=this.hiddenRangeModel)===null||K===void 0||K.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 K=new h.StopWatch,H=this.getRangeProvider(Y.textModel),z=this.foldingRegionPromise=(0,L.createCancelablePromise)(se=>H.compute(se));return z.then(se=>{if(se&&z===this.foldingRegionPromise){let q;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const pe=se.setCollapsedAllOfType(i.FoldingRangeKind.Imports.value,!0);pe&&(q=v.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=pe)}const ae=this.editor.getSelections(),ce=ae?ae.map(pe=>pe.startLineNumber):[];Y.update(se,ce),q?.restore(this.editor);const ge=this.updateDebounceInfo.update(Y.textModel,K.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ge)}return Y})}).then(void 0,Y=>((0,y.onUnexpectedError)(Y),null)))}onHiddenRangesChanges(Y){if(this.hiddenRangeModel&&Y.length&&!this._restoringViewState){const K=this.editor.getSelections();K&&this.hiddenRangeModel.adjustSelections(K)&&this.editor.setSelections(K)}this.editor.setHiddenAreas(Y,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const Y=this.getFoldingModel();Y&&Y.then(K=>{if(K){const H=this.editor.getSelections();if(H&&H.length>0){const z=[];for(const se of H){const q=se.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(q)&&z.push(...K.getAllRegionsAtLine(q,ae=>ae.isCollapsed&&q>ae.startLineNumber))}z.length&&(K.toggleCollapseState(z),this.reveal(H[0].getPosition()))}}}).then(void 0,y.onUnexpectedError)}onEditorMouseDown(Y){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!Y.target||!Y.target.range||!Y.event.leftButton&&!Y.event.middleButton)return;const K=Y.target.range;let H=!1;switch(Y.target.type){case 4:{const z=Y.target.detail,se=Y.target.element.offsetLeft;if(z.offsetX-se<4)return;H=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!Y.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const z=this.editor.getModel();if(z&&K.startColumn===z.getLineMaxColumn(K.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:K.startLineNumber,iconClicked:H}}onEditorMouseUp(Y){const K=this.foldingModel;if(!K||!this.mouseDownInfo||!Y.target)return;const H=this.mouseDownInfo.lineNumber,z=this.mouseDownInfo.iconClicked,se=Y.target.range;if(!se||se.startLineNumber!==H)return;if(z){if(Y.target.type!==4)return}else{const ae=this.editor.getModel();if(!ae||se.startColumn!==ae.getLineMaxColumn(H))return}const q=K.getRegionAtLine(H);if(q&&q.startLineNumber===H){const ae=q.isCollapsed;if(z||ae){const ce=Y.event.altKey;let ge=[];if(ce){const pe=ve=>!ve.containedBy(q)&&!q.containedBy(ve),me=K.getRegionsInside(null,pe);for(const ve of me)ve.isCollapsed&&ge.push(ve);ge.length===0&&(ge=me)}else{const pe=Y.event.middleButton||Y.event.shiftKey;if(pe)for(const me of K.getRegionsInside(q))me.isCollapsed===ae&&ge.push(me);(ae||!pe||ge.length===0)&&ge.push(q)}K.toggleCollapseState(ge),this.reveal({lineNumber:H,column:1})}}}reveal(Y){this.editor.revealPositionInCenterIfOutsideViewport(Y,0)}};e.FoldingController=T,T.ID="editor.contrib.folding",e.FoldingController=T=A=Ee([he(1,c.IContextKeyService),he(2,n.ILanguageConfigurationService),he(3,s.INotificationService),he(4,g.ILanguageFeatureDebounceService),he(5,m.ILanguageFeaturesService)],T);class N{constructor(Y){this.editor=Y,this._onDidChange=new C.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(Y,K){(Y!==this._computed||K!==this._limited)&&(this._computed=Y,this._limited=K,this._onDidChange.fire())}}e.RangesLimitReporter=N;class P extends b.EditorAction{runEditorCommand(Y,K,H){const z=Y.get(n.ILanguageConfigurationService),se=T.get(K);if(!se)return;const q=se.getFoldingModel();if(q)return this.reportTelemetry(Y,K),q.then(ae=>{if(ae){this.invoke(se,ae,K,H,z);const ce=K.getSelection();ce&&se.reveal(ce.getStartPosition())}})}getSelectedLines(Y){const K=Y.getSelections();return K?K.map(H=>H.startLineNumber):[]}getLineNumbers(Y,K){return Y&&Y.selectionLines?Y.selectionLines.map(H=>H+1):this.getSelectedLines(K)}run(Y,K){}}function x(oe){if(!S.isUndefined(oe)){if(!S.isObject(oe))return!1;const Y=oe;if(!S.isUndefined(Y.levels)&&!S.isNumber(Y.levels)||!S.isUndefined(Y.direction)&&!S.isString(Y.direction)||!S.isUndefined(Y.selectionLines)&&(!Array.isArray(Y.selectionLines)||!Y.selectionLines.every(S.isNumber)))return!1}return!0}class R extends P{constructor(){super({id:"editor.unfold",label:f.localize(0,null),alias:"Unfold",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},weight:100},metadata:{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:x,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,K,H,z){const se=z&&z.levels||1,q=this.getLineNumbers(z,H);z&&z.direction==="up"?(0,t.setCollapseStateLevelsUp)(K,!1,se,q):(0,t.setCollapseStateLevelsDown)(K,!1,se,q)}}class B extends P{constructor(){super({id:"editor.unfoldRecursively",label:f.localize(1,null),alias:"Unfold Recursively",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2142),weight:100}})}invoke(Y,K,H,z){(0,t.setCollapseStateLevelsDown)(K,!1,Number.MAX_VALUE,this.getSelectedLines(H))}}class W extends P{constructor(){super({id:"editor.fold",label:f.localize(2,null),alias:"Fold",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:3164,mac:{primary:2652},weight:100},metadata:{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:x,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Y,K,H,z){const se=this.getLineNumbers(z,H),q=z&&z.levels,ae=z&&z.direction;typeof q!="number"&&typeof ae!="string"?(0,t.setCollapseStateUp)(K,!0,se):ae==="up"?(0,t.setCollapseStateLevelsUp)(K,!0,q||1,se):(0,t.setCollapseStateLevelsDown)(K,!0,q||1,se)}}class V extends P{constructor(){super({id:"editor.toggleFold",label:f.localize(3,null),alias:"Toggle Fold",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2090),weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);(0,t.toggleCollapseState)(K,1,z)}}class U extends P{constructor(){super({id:"editor.foldRecursively",label:f.localize(4,null),alias:"Fold Recursively",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2140),weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);(0,t.setCollapseStateLevelsDown)(K,!0,Number.MAX_VALUE,z)}}class F extends P{constructor(){super({id:"editor.foldAllBlockComments",label:f.localize(5,null),alias:"Fold All Block Comments",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2138),weight:100}})}invoke(Y,K,H,z,se){if(K.regions.hasTypes())(0,t.setCollapseStateForType)(K,i.FoldingRangeKind.Comment.value,!0);else{const q=H.getModel();if(!q)return;const ae=se.getLanguageConfiguration(q.getLanguageId()).comments;if(ae&&ae.blockCommentStartToken){const ce=new RegExp("^\\s*"+(0,p.escapeRegExpCharacters)(ae.blockCommentStartToken));(0,t.setCollapseStateForMatchingLines)(K,ce,!0)}}}}class j extends P{constructor(){super({id:"editor.foldAllMarkerRegions",label:f.localize(6,null),alias:"Fold All Regions",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2077),weight:100}})}invoke(Y,K,H,z,se){if(K.regions.hasTypes())(0,t.setCollapseStateForType)(K,i.FoldingRangeKind.Region.value,!0);else{const q=H.getModel();if(!q)return;const ae=se.getLanguageConfiguration(q.getLanguageId()).foldingRules;if(ae&&ae.markers&&ae.markers.start){const ce=new RegExp(ae.markers.start);(0,t.setCollapseStateForMatchingLines)(K,ce,!0)}}}}class J extends P{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:f.localize(7,null),alias:"Unfold All Regions",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2078),weight:100}})}invoke(Y,K,H,z,se){if(K.regions.hasTypes())(0,t.setCollapseStateForType)(K,i.FoldingRangeKind.Region.value,!1);else{const q=H.getModel();if(!q)return;const ae=se.getLanguageConfiguration(q.getLanguageId()).foldingRules;if(ae&&ae.markers&&ae.markers.start){const ce=new RegExp(ae.markers.start);(0,t.setCollapseStateForMatchingLines)(K,ce,!1)}}}}class le extends P{constructor(){super({id:"editor.foldAllExcept",label:f.localize(8,null),alias:"Fold All Except Selected",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2136),weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);(0,t.setCollapseStateForRest)(K,!0,z)}}class ee extends P{constructor(){super({id:"editor.unfoldAllExcept",label:f.localize(9,null),alias:"Unfold All Except Selected",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2134),weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);(0,t.setCollapseStateForRest)(K,!1,z)}}class $ extends P{constructor(){super({id:"editor.foldAll",label:f.localize(10,null),alias:"Fold All",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2069),weight:100}})}invoke(Y,K,H){(0,t.setCollapseStateLevelsDown)(K,!0)}}class te extends P{constructor(){super({id:"editor.unfoldAll",label:f.localize(11,null),alias:"Unfold All",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2088),weight:100}})}invoke(Y,K,H){(0,t.setCollapseStateLevelsDown)(K,!1)}}class G extends P{getFoldingLevel(){return parseInt(this.id.substr(G.ID_PREFIX.length))}invoke(Y,K,H){(0,t.setCollapseStateAtLevel)(K,this.getFoldingLevel(),!0,this.getSelectedLines(H))}}G.ID_PREFIX="editor.foldLevel",G.ID=oe=>G.ID_PREFIX+oe;class de extends P{constructor(){super({id:"editor.gotoParentFold",label:f.localize(12,null),alias:"Go to Parent Fold",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);if(z.length>0){const se=(0,t.getParentFoldLine)(z[0],K);se!==null&&H.setSelection({startLineNumber:se,startColumn:1,endLineNumber:se,endColumn:1})}}}class ue extends P{constructor(){super({id:"editor.gotoPreviousFold",label:f.localize(13,null),alias:"Go to Previous Folding Range",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);if(z.length>0){const se=(0,t.getPreviousFoldLine)(z[0],K);se!==null&&H.setSelection({startLineNumber:se,startColumn:1,endLineNumber:se,endColumn:1})}}}class X extends P{constructor(){super({id:"editor.gotoNextFold",label:f.localize(14,null),alias:"Go to Next Folding Range",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,K,H){const z=this.getSelectedLines(H);if(z.length>0){const se=(0,t.getNextFoldLine)(z[0],K);se!==null&&H.setSelection({startLineNumber:se,startColumn:1,endLineNumber:se,endColumn:1})}}}class Z extends P{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:f.localize(15,null),alias:"Create Folding Range from Selection",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2135),weight:100}})}invoke(Y,K,H){var z;const se=[],q=H.getSelections();if(q){for(const ae of q){let ce=ae.endLineNumber;ae.endColumn===1&&--ce,ce>ae.startLineNumber&&(se.push({startLineNumber:ae.startLineNumber,endLineNumber:ce,type:void 0,isCollapsed:!0,source:1}),H.setSelection({startLineNumber:ae.startLineNumber,startColumn:1,endLineNumber:ae.startLineNumber,endColumn:1}))}if(se.length>0){se.sort((ce,ge)=>ce.startLineNumber-ge.startLineNumber);const ae=r.FoldingRegions.sanitizeAndMerge(K.regions,se,(z=H.getModel())===null||z===void 0?void 0:z.getLineCount());K.updatePost(r.FoldingRegions.fromFoldRanges(ae))}}}}class re extends P{constructor(){super({id:"editor.removeManualFoldingRanges",label:f.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2137),weight:100}})}invoke(Y,K,H){const z=H.getSelections();if(z){const se=[];for(const q of z){const{startLineNumber:ae,endLineNumber:ce}=q;se.push(ce>=ae?{startLineNumber:ae,endLineNumber:ce}:{endLineNumber:ce,startLineNumber:ae})}K.removeManualRanges(se),Y.triggerFoldingModelChanged()}}}(0,b.registerEditorContribution)(T.ID,T,0),(0,b.registerEditorAction)(R),(0,b.registerEditorAction)(B),(0,b.registerEditorAction)(W),(0,b.registerEditorAction)(U),(0,b.registerEditorAction)($),(0,b.registerEditorAction)(te),(0,b.registerEditorAction)(F),(0,b.registerEditorAction)(j),(0,b.registerEditorAction)(J),(0,b.registerEditorAction)(le),(0,b.registerEditorAction)(ee),(0,b.registerEditorAction)(V),(0,b.registerEditorAction)(de),(0,b.registerEditorAction)(ue),(0,b.registerEditorAction)(X),(0,b.registerEditorAction)(Z),(0,b.registerEditorAction)(re);for(let oe=1;oe<=7;oe++)(0,b.registerInstantiatedEditorAction)(new G({id:G.ID(oe),label:f.localize(17,null,oe),alias:`Fold Level ${oe}`,precondition:O,kbOpts:{kbExpr:o.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2048|21+oe),weight:100}}));w.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",async function(oe,...Y){const[K]=Y;if(!(K instanceof D.URI))throw(0,y.illegalArgument)();const H=oe.get(m.ILanguageFeaturesService),z=oe.get(I.IModelService).getModel(K);if(!z)throw(0,y.illegalArgument)();const se=oe.get(M.IConfigurationService);if(!se.getValue("editor.folding",{resource:K}))return[];const q=oe.get(n.ILanguageConfigurationService),ae=se.getValue("editor.foldingStrategy",{resource:K}),ce={get limit(){return se.getValue("editor.foldingMaximumRegions",{resource:K})},update:(Ce,Se)=>{}},ge=new u.IndentRangeProvider(z,q,ce);let pe=ge;if(ae!=="indentation"){const Ce=T.getFoldingRangeProviders(H,z);Ce.length&&(pe=new l.SyntaxRangeProvider(z,Ce,()=>{},ce,ge))}const me=await pe.compute(k.CancellationToken.None),ve=[];try{if(me)for(let Ce=0;CeB.hoverOrdinal-W.hoverOrdinal),this._computer=new O(this._editor,this._participants),this._hoverOperation=this._register(new b.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(B=>{if(!this._computer.anchor)return;const W=B.hasLoadingMessage?this._addLoadingMessage(B.value):B.value;this._withResult(new h(this._computer.anchor,W,B.isComplete))})),this._register(L.addStandardDisposableListener(this._widget.getDomNode(),"keydown",B=>{B.equals(9)&&this.hide()})),this._register(v.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(P){if(this._widget.isResizing)return!0;const x=[];for(const B of this._participants)if(B.suggestHoverAnchor){const W=B.suggestHoverAnchor(P);W&&x.push(W)}const R=P.target;if(R.type===6&&x.push(new o.HoverRangeAnchor(0,R.range,P.event.posx,P.event.posy)),R.type===7){const B=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!R.detail.isAfterLines&&typeof R.detail.horizontalDistanceToText=="number"&&R.detail.horizontalDistanceToTextW.priority-B.priority),this._startShowingOrUpdateHover(x[0],0,0,!1,P))}startShowingAtRange(P,x,R,B){this._startShowingOrUpdateHover(new o.HoverRangeAnchor(0,P,void 0,void 0),x,R,B,null)}_startShowingOrUpdateHover(P,x,R,B,W){return!this._widget.position||!this._currentResult?P?(this._startHoverOperationIfNecessary(P,x,R,B,!1),!0):!1:this._editor.getOption(60).sticky&&W&&this._widget.isMouseGettingCloser(W.event.posx,W.event.posy)?(P&&this._startHoverOperationIfNecessary(P,x,R,B,!0),!0):P?P&&this._currentResult.anchor.equals(P)?!0:P.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(P)),this._startHoverOperationIfNecessary(P,x,R,B,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(P,x,R,B,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(P,x,R,B,W){this._computer.anchor&&this._computer.anchor.equals(P)||(this._hoverOperation.cancel(),this._computer.anchor=P,this._computer.shouldFocus=B,this._computer.source=R,this._computer.insistOnKeepingHoverVisible=W,this._hoverOperation.start(x))}_setCurrentResult(P){this._currentResult!==P&&(P&&P.messages.length===0&&(P=null),this._currentResult=P,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(P){return P?this._widget.getDomNode().contains(P):!1}_addLoadingMessage(P){if(this._computer.anchor){for(const x of this._participants)if(x.createLoadingMessage){const R=x.createLoadingMessage(this._computer.anchor);if(R)return P.slice(0).concat([R])}}return P}_withResult(P){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!P.isComplete||this._computer.insistOnKeepingHoverVisible&&P.messages.length===0)||this._setCurrentResult(P)}_renderMessages(P,x){const{showAtPosition:R,showAtSecondaryPosition:B,highlightRange:W}=r.computeHoverRanges(this._editor,P.range,x),V=new E.DisposableStore,U=V.add(new A(this._keybindingService)),F=document.createDocumentFragment();let j=null;const J={fragment:F,statusBar:U,setColorPicker:ee=>j=ee,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:ee=>this._widget.setMinimumDimensions(ee),hide:()=>this.hide()};for(const ee of this._participants){const $=x.filter(te=>te.owner===ee);$.length>0&&V.add(ee.renderHoverParts(J,$))}const le=x.some(ee=>ee.isBeforeContent);if(U.hasContent&&F.appendChild(U.hoverElement),F.hasChildNodes()){if(W){const ee=this._editor.createDecorationsCollection();ee.set([{range:W,options:r._DECORATION_OPTIONS}]),V.add((0,E.toDisposable)(()=>{ee.clear()}))}this._widget.showAt(F,new C(j,R,B,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,le,P.initialMousePosX,P.initialMousePosY,V))}else V.dispose()}static computeHoverRanges(P,x,R){let B=1;if(P.hasModel()){const j=P._getViewModel(),J=j.coordinatesConverter,le=J.convertModelRangeToViewRange(x),ee=new _.Position(le.startLineNumber,j.getLineMinColumn(le.startLineNumber));B=J.convertViewPositionToModelPosition(ee).column}const W=x.startLineNumber;let V=x.startColumn,U=R[0].range,F=null;for(const j of R)U=p.Range.plusRange(U,j.range),j.range.startLineNumber===W&&j.range.endLineNumber===W&&(V=Math.max(Math.min(V,j.range.startColumn),B)),j.forceShowAtRange&&(F=j.range);return{showAtPosition:F?F.getStartPosition():new _.Position(W,x.startColumn),showAtSecondaryPosition:F?F.getStartPosition():new _.Position(W,V),highlightRange:U}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};e.ContentHoverController=g,g._DECORATION_OPTIONS=S.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),e.ContentHoverController=g=r=Ee([he(1,i.IInstantiationService),he(2,n.IKeybindingService)],g);class h{constructor(P,x,R){this.anchor=P,this.messages=x,this.isComplete=R}filter(P){const x=this.messages.filter(R=>R.isValidForHoverAnchor(P));return x.length===this.messages.length?this:new m(this,this.anchor,x,this.isComplete)}}class m extends h{constructor(P,x,R,B){super(x,R,B),this.original=P}filter(P){return this.original.filter(P)}}class C{constructor(P,x,R,B,W,V,U,F,j,J){this.colorPicker=P,this.showAtPosition=x,this.showAtSecondaryPosition=R,this.preferAbove=B,this.stoleFocus=W,this.source=V,this.isBeforeContent=U,this.initialMousePosX=F,this.initialMousePosY=j,this.disposables=J,this.closestMouseDistance=void 0}}const w=30,D=10,I=6;let M=l=class extends f.ResizableContentWidget{get isColorPickerVisible(){var P;return!!(!((P=this._visibleData)===null||P===void 0)&&P.colorPicker)}get isVisibleFromKeyboard(){var P;return((P=this._visibleData)===null||P===void 0?void 0:P.source)===1}get isVisible(){var P;return(P=this._hoverVisibleKey.get())!==null&&P!==void 0?P:!1}get isFocused(){var P;return(P=this._hoverFocusedKey.get())!==null&&P!==void 0?P:!1}constructor(P,x,R,B,W){const V=P.getOption(66)+8,U=150,F=new L.Dimension(U,V);super(P,F),this._configurationService=R,this._accessibilityService=B,this._keybindingService=W,this._hover=this._register(new k.HoverWidget),this._minimumSize=F,this._hoverVisibleKey=a.EditorContextKeys.hoverVisible.bindTo(x),this._hoverFocusedKey=a.EditorContextKeys.hoverFocused.bindTo(x),L.append(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(J=>{J.hasChanged(50)&&this._updateFont()}));const j=this._register(L.trackFocus(this._resizableNode.domNode));this._register(j.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(j.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var P;super.dispose(),(P=this._visibleData)===null||P===void 0||P.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return l.ID}static _applyDimensions(P,x,R){const B=typeof x=="number"?`${x}px`:x,W=typeof R=="number"?`${R}px`:R;P.style.width=B,P.style.height=W}_setContentsDomNodeDimensions(P,x){const R=this._hover.contentsDomNode;return l._applyDimensions(R,P,x)}_setContainerDomNodeDimensions(P,x){const R=this._hover.containerDomNode;return l._applyDimensions(R,P,x)}_setHoverWidgetDimensions(P,x){this._setContentsDomNodeDimensions(P,x),this._setContainerDomNodeDimensions(P,x),this._layoutContentWidget()}static _applyMaxDimensions(P,x,R){const B=typeof x=="number"?`${x}px`:x,W=typeof R=="number"?`${R}px`:R;P.style.maxWidth=B,P.style.maxHeight=W}_setHoverWidgetMaxDimensions(P,x){l._applyMaxDimensions(this._hover.contentsDomNode,P,x),l._applyMaxDimensions(this._hover.containerDomNode,P,x),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof P=="number"?`${P}px`:P),this._layoutContentWidget()}_hasHorizontalScrollbar(){const P=this._hover.scrollbar.getScrollDimensions();return P.scrollWidth>P.width}_adjustContentsBottomPadding(){const P=this._hover.contentsDomNode,x=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;P.style.paddingBottom!==x&&(P.style.paddingBottom=x)}_setAdjustedHoverWidgetDimensions(P){this._setHoverWidgetMaxDimensions("none","none");const x=P.width,R=P.height;this._setHoverWidgetDimensions(x,R),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(x,R-D))}_updateResizableNodeMaxDimensions(){var P,x;const R=(P=this._findMaximumRenderingWidth())!==null&&P!==void 0?P:1/0,B=(x=this._findMaximumRenderingHeight())!==null&&x!==void 0?x:1/0;this._resizableNode.maxSize=new L.Dimension(R,B),this._setHoverWidgetMaxDimensions(R,B)}_resize(P){var x,R;l._lastDimensions=new L.Dimension(P.width,P.height),this._setAdjustedHoverWidgetDimensions(P),this._resizableNode.layout(P.height,P.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(R=(x=this._visibleData)===null||x===void 0?void 0:x.colorPicker)===null||R===void 0||R.layout()}_findAvailableSpaceVertically(){var P;const x=(P=this._visibleData)===null||P===void 0?void 0:P.showAtPosition;if(x)return this._positionPreference===1?this._availableVerticalSpaceAbove(x):this._availableVerticalSpaceBelow(x)}_findMaximumRenderingHeight(){const P=this._findAvailableSpaceVertically();if(!P)return;let x=I;return Array.from(this._hover.contentsDomNode.children).forEach(R=>{x+=R.clientHeight}),this._hasHorizontalScrollbar()&&(x+=D),Math.min(P,x)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const P=Array.from(this._hover.contentsDomNode.children).some(x=>x.scrollWidth>x.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),P}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const P=this._isHoverTextOverflowing(),x=typeof this._contentWidth>"u"?0:this._contentWidth-2;return P||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=P,this._visibleData.initialMousePosY=x,!1;const R=L.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=T(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,R.left,R.top,R.width,R.height));const B=T(P,x,R.left,R.top,R.width,R.height);return B>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,B),!0)}_setHoverData(P){var x;(x=this._visibleData)===null||x===void 0||x.disposables.dispose(),this._visibleData=P,this._hoverVisibleKey.set(!!P),this._hover.containerDomNode.classList.toggle("hidden",!P)}_updateFont(){const{fontSize:P,lineHeight:x}=this._editor.getOption(50),R=this._hover.contentsDomNode;R.style.fontSize=`${P}px`,R.style.lineHeight=`${x/P}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(W=>this._editor.applyFontInfo(W))}_updateContent(P){const x=this._hover.contentsDomNode;x.style.paddingBottom="",x.textContent="",x.appendChild(P)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const P=Math.max(this._editor.getLayoutInfo().height/4,250,l._lastDimensions.height),x=Math.max(this._editor.getLayoutInfo().width*.66,500,l._lastDimensions.width);this._setHoverWidgetMaxDimensions(x,P)}_render(P,x){this._setHoverData(x),this._updateFont(),this._updateContent(P),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var P;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(P=this._positionPreference)!==null&&P!==void 0?P:1]}:null}showAt(P,x){var R,B,W,V;if(!this._editor||!this._editor.hasModel())return;this._render(P,x);const U=L.getTotalHeight(this._hover.containerDomNode),F=x.showAtPosition;this._positionPreference=(R=this._findPositionPreference(U,F))!==null&&R!==void 0?R:1,this.onContentsChanged(),x.stoleFocus&&this._hover.containerDomNode.focus(),(B=x.colorPicker)===null||B===void 0||B.layout();const J=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&(0,k.getHoverAccessibleViewHint)(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(V=(W=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||W===void 0?void 0:W.getAriaLabel())!==null&&V!==void 0?V:"");J&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+J)}hide(){if(!this._visibleData)return;const P=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new L.Dimension(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),P&&this._editor.focus()}_removeConstraintsRenderNormally(){const P=this._editor.getLayoutInfo();this._resizableNode.layout(P.height,P.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(P){var x;const R=this._hover.containerDomNode,B=this._hover.contentsDomNode,W=(x=this._findMaximumRenderingHeight())!==null&&x!==void 0?x:1/0;this._setContainerDomNodeDimensions(L.getTotalWidth(R),Math.min(W,P)),this._setContentsDomNodeDimensions(L.getTotalWidth(B),Math.min(W,P-D))}setMinimumDimensions(P){this._minimumSize=new L.Dimension(Math.max(this._minimumSize.width,P.width),Math.max(this._minimumSize.height,P.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const P=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new L.Dimension(P,this._minimumSize.height)}onContentsChanged(){var P;this._removeConstraintsRenderNormally();const x=this._hover.containerDomNode;let R=L.getTotalHeight(x),B=L.getTotalWidth(x);if(this._resizableNode.layout(R,B),this._setHoverWidgetDimensions(B,R),R=L.getTotalHeight(x),B=L.getTotalWidth(x),this._contentWidth=B,this._updateMinimumWidth(),this._resizableNode.layout(R,B),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(R)),!((P=this._visibleData)===null||P===void 0)&&P.showAtPosition){const W=L.getTotalHeight(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(W,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:P-x.lineHeight})}scrollDown(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:P+x.lineHeight})}scrollLeft(){const P=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:P-w})}scrollRight(){const P=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:P+w})}pageUp(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:P-x})}pageDown(){const P=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:P+x})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};e.ContentHoverWidget=M,M.ID="editor.contrib.resizableContentHoverWidget",M._lastDimensions=new L.Dimension(0,0),e.ContentHoverWidget=M=l=Ee([he(1,u.IContextKeyService),he(2,c.IConfigurationService),he(3,d.IAccessibilityService),he(4,n.IKeybindingService)],M);let A=class extends E.Disposable{get hasContent(){return this._hasContent}constructor(P){super(),this._keybindingService=P,this._hasContent=!1,this.hoverElement=s("div.hover-row.status-bar"),this.actionsElement=L.append(this.hoverElement,s("div.actions"))}addAction(P){const x=this._keybindingService.lookupKeybinding(P.commandId),R=x?x.getLabel():null;return this._hasContent=!0,this._register(k.HoverAction.render(this.actionsElement,P,R))}append(P){const x=L.append(this.actionsElement,P);return this._hasContent=!0,x}};e.EditorHoverStatusBar=A,e.EditorHoverStatusBar=A=Ee([he(0,n.IKeybindingService)],A);class O{get anchor(){return this._anchor}set anchor(P){this._anchor=P}get shouldFocus(){return this._shouldFocus}set shouldFocus(P){this._shouldFocus=P}get source(){return this._source}set source(P){this._source=P}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(P){this._insistOnKeepingHoverVisible=P}constructor(P,x){this._editor=P,this._participants=x,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(P,x){if(x.type!==1&&!x.supportsMarkerHover)return[];const R=P.getModel(),B=x.range.startLineNumber;if(B>R.getLineCount())return[];const W=R.getLineMaxColumn(B);return P.getLineDecorations(B).filter(V=>{if(V.options.isWholeLine)return!0;const U=V.range.startLineNumber===B?V.range.startColumn:1,F=V.range.endLineNumber===B?V.range.endColumn:W;if(V.options.showIfCollapsed){if(U>x.range.startColumn+1||x.range.endColumn-1>F)return!1}else if(U>x.range.startColumn||x.range.endColumn>F)return!1;return!0})}computeAsync(P){const x=this._anchor;if(!this._editor.hasModel()||!x)return t.AsyncIterableObject.EMPTY;const R=O._getLineDecorations(this._editor,x);return t.AsyncIterableObject.merge(this._participants.map(B=>B.computeAsync?B.computeAsync(x,R,P):t.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const P=O._getLineDecorations(this._editor,this._anchor);let x=[];for(const R of this._participants)x=x.concat(R.computeSync(this._anchor,P));return(0,y.coalesce)(x)}}function T(N,P,x,R,B,W){const V=x+B/2,U=R+W/2,F=Math.max(Math.abs(N-V)-B/2,0),j=Math.max(Math.abs(P-U)-W/2,0);return Math.sqrt(F*F+j*j)}}),define(ie[896],ne([1,0,2,373,8,376,34,6,18,16,21,15,52,32,350,7,201]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";var u,f;Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let c=u=class extends L.Disposable{constructor(h,m,C,w,D,I,M){super(),this._editor=h,this._modelService=C,this._keybindingService=w,this._instantiationService=D,this._languageFeatureService=I,this._languageConfigurationService=M,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=b.EditorContextKeys.standaloneColorPickerVisible.bindTo(m),this._standaloneColorPickerFocused=b.EditorContextKeys.standaloneColorPickerFocused.bindTo(m)}showOrFocus(){var h;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(h=this._standaloneColorPickerWidget)===null||h===void 0||h.focus():this._standaloneColorPickerWidget=new l(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var h;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(h=this._standaloneColorPickerWidget)===null||h===void 0||h.hide(),this._editor.focus()}insertColor(){var h;(h=this._standaloneColorPickerWidget)===null||h===void 0||h.updateEditor(),this.hide()}static get(h){return h.getContribution(u.ID)}};e.StandaloneColorPickerController=c,c.ID="editor.contrib.standaloneColorPickerController",e.StandaloneColorPickerController=c=u=Ee([he(1,o.IContextKeyService),he(2,i.IModelService),he(3,_.IKeybindingService),he(4,y.IInstantiationService),he(5,S.ILanguageFeaturesService),he(6,n.ILanguageConfigurationService)],c),(0,v.registerEditorContribution)(c.ID,c,1);const d=8,r=22;let l=f=class extends L.Disposable{constructor(h,m,C,w,D,I,M,A){var O;super(),this._editor=h,this._standaloneColorPickerVisible=m,this._standaloneColorPickerFocused=C,this._modelService=D,this._keybindingService=I,this._languageFeaturesService=M,this._languageConfigurationService=A,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new p.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=w.createInstance(k.StandaloneColorPickerParticipant,this._editor),this._position=(O=this._editor._getViewModel())===null||O===void 0?void 0:O.getPrimaryCursorState().modelState.position;const T=this._editor.getSelection(),N=T?{startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},P=this._register(a.trackFocus(this._body));this._register(P.onDidBlur(x=>{this.hide()})),this._register(P.onDidFocus(x=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(x=>{var R;const B=(R=x.target.element)===null||R===void 0?void 0:R.classList;B&&B.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(x=>{this._render(x.value,x.foundInEditor)})),this._start(N),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return f.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const h=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:h?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(h){const m=await this._computeAsync(h);m&&this._onResult.fire(new s(m.result,m.foundInEditor))}async _computeAsync(h){if(!this._editor.hasModel())return null;const m={range:h,color:{red:0,green:0,blue:0,alpha:1}},C=await this._standaloneColorPickerParticipant.createColorHover(m,new t.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return C?{result:C.colorHover,foundInEditor:C.foundInEditor}:null}_render(h,m){const C=document.createDocumentFragment(),w=this._register(new E.EditorHoverStatusBar(this._keybindingService));let D;const I={fragment:C,statusBar:w,setColorPicker:B=>D=B,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=h,this._register(this._standaloneColorPickerParticipant.renderHoverParts(I,[h])),D===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(C),D.layout();const M=D.body,A=M.saturationBox.domNode.clientWidth,O=M.domNode.clientWidth-A-r-d,T=D.body.enterButton;T?.onClicked(()=>{this.updateEditor(),this.hide()});const N=D.header,P=N.pickedColorNode;P.style.width=A+d+"px";const x=N.originalColorNode;x.style.width=O+"px";const R=D.header.closeButton;R?.onClicked(()=>{this.hide()}),m&&(T&&(T.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(h.range)),this._editor.layoutContentWidget(this)}};e.StandaloneColorPickerWidget=l,l.ID="editor.contrib.standaloneColorPickerWidget",e.StandaloneColorPickerWidget=l=f=Ee([he(3,y.IInstantiationService),he(4,i.IModelService),he(5,_.IKeybindingService),he(6,S.ILanguageFeaturesService),he(7,n.ILanguageConfigurationService)],l);class s{constructor(h,m){this.value=h,this.foundInEditor=m}}}),define(ie[897],ne([1,0,16,655,896,21,29,201]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class p extends L.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:(0,k.localize)(0,null),mnemonicTitle:(0,k.localize)(1,null),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:_.MenuId.CommandPalette}]})}runEditorCommand(o,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=p;class S extends L.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,k.localize)(2,null),alias:"Hide the Color Picker",precondition:E.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(o,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.hide()}}class v extends L.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,k.localize)(3,null),alias:"Insert Color with Standalone Color Picker",precondition:E.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(o,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.insertColor()}}(0,L.registerEditorAction)(S),(0,L.registerEditorAction)(v),(0,_.registerAction2)(p)}),define(ie[898],ne([1,0,14,9,104,16,5,24,21,39,118,683,554,459]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});let t=n=class{static get(c){return c.getContribution(n.ID)}constructor(c,d){this.editor=c,this.editorWorkerService=d,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(c,d){var r;(r=this.currentRequest)===null||r===void 0||r.cancel();const l=this.editor.getSelection(),s=this.editor.getModel();if(!s||!l)return;let g=l;if(g.startLineNumber!==g.endLineNumber)return;const h=new y.EditorState(this.editor,5),m=s.uri;return this.editorWorkerService.canNavigateValueSet(m)?(this.currentRequest=(0,L.createCancelablePromise)(C=>this.editorWorkerService.navigateValueSet(m,g,d)),this.currentRequest.then(C=>{var w;if(!C||!C.range||!C.value||!h.validate(this.editor))return;const D=_.Range.lift(C.range);let I=C.range;const M=C.value.length-(g.endColumn-g.startColumn);I={startLineNumber:I.startLineNumber,startColumn:I.startColumn,endLineNumber:I.endLineNumber,endColumn:I.startColumn+C.value.length},M>1&&(g=new p.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+M-1));const A=new i.InPlaceReplaceCommand(D,g,C.value);this.editor.pushUndoStop(),this.editor.executeCommand(c,A),this.editor.pushUndoStop(),this.decorations.set([{range:I,options:n.DECORATION}]),(w=this.decorationRemover)===null||w===void 0||w.cancel(),this.decorationRemover=(0,L.timeout)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(k.onUnexpectedError)}).catch(k.onUnexpectedError)):Promise.resolve(void 0)}};t.ID="editor.contrib.inPlaceReplaceController",t.DECORATION=v.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),t=n=Ee([he(1,b.IEditorWorkerService)],t);class a extends E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:o.localize(0,null),alias:"Replace with Previous Value",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(c,d){const r=t.get(d);return r?r.run(this.id,!1):Promise.resolve(void 0)}}class u extends E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:o.localize(1,null),alias:"Replace with Next Value",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(c,d){const r=t.get(d);return r?r.run(this.id,!0):Promise.resolve(void 0)}}(0,E.registerEditorContribution)(t.ID,t,4),(0,E.registerEditorAction)(a),(0,E.registerEditorAction)(u)}),define(ie[259],ne([1,0,7,14,26,2,12,27,5,39,8,462]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const o=v.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:_.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class i extends E.Disposable{constructor(a,u,f,c,d){super(),this.typeId=a,this.editor=u,this.range=f,this.delegate=d,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(c),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(a){this.domNode=L.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=a;const u=L.$("span.icon");this.domNode.append(u),u.classList.add(...p.ThemeIcon.asClassNameArray(y.Codicon.loading),"codicon-modifier-spin");const f=()=>{const c=this.editor.getOption(66);this.domNode.style.height=`${c}px`,this.domNode.style.width=`${Math.ceil(.8*c)}px`};f(),this._register(this.editor.onDidChangeConfiguration(c=>{(c.hasChanged(52)||c.hasChanged(66))&&f()})),this._register(L.addDisposableListener(this.domNode,L.EventType.CLICK,c=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}i.baseId="editor.widget.inlineProgressWidget";let n=class extends E.Disposable{constructor(a,u,f){super(),this.id=a,this._editor=u,this._instantiationService=f,this._showDelay=500,this._showPromise=this._register(new E.MutableDisposable),this._currentWidget=new E.MutableDisposable,this._operationIdPool=0,this._currentDecorations=u.createDecorationsCollection()}async showWhile(a,u,f){const c=this._operationIdPool++;this._currentOperation=c,this.clear(),this._showPromise.value=(0,k.disposableTimeout)(()=>{const d=S.Range.fromPositions(a);this._currentDecorations.set([{range:d,options:o}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(i,this.id,this._editor,d,u,f))},this._showDelay);try{return await f}finally{this._currentOperation===c&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};e.InlineProgressManager=n,e.InlineProgressManager=n=Ee([he(2,b.IInstantiationService)],n)}),define(ie[899],ne([1,0,7,13,14,174,2,108,17,173,188,349,133,5,18,339,104,259,660,103,15,8,87,70,343]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=e.pasteWidgetVisibleCtx=e.changePasteTypeCommandId=void 0,e.changePasteTypeCommandId="editor.changePasteType",e.pasteWidgetVisibleCtx=new r.RawContextKey("pasteWidgetVisible",!1,(0,c.localize)(0,null));const C="application/vnd.code.copyMetadata";let w=m=class extends _.Disposable{static get(M){return M.getContribution(m.ID)}constructor(M,A,O,T,N,P,x){super(),this._bulkEditService=O,this._clipboardService=T,this._languageFeaturesService=N,this._quickInputService=P,this._progressService=x,this._editor=M;const R=M.getContainerDomNode();this._register((0,L.addDisposableListener)(R,"copy",B=>this.handleCopy(B))),this._register((0,L.addDisposableListener)(R,"cut",B=>this.handleCopy(B))),this._register((0,L.addDisposableListener)(R,"paste",B=>this.handlePaste(B),!0)),this._pasteProgressManager=this._register(new f.InlineProgressManager("pasteIntoEditor",M,A)),this._postPasteWidgetManager=this._register(A.createInstance(h.PostEditWidgetManager,"pasteIntoEditor",M,e.pasteWidgetVisibleCtx,{id:e.changePasteTypeCommandId,label:(0,c.localize)(1,null)}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(M){this._editor.focus();try{this._pasteAsActionContext={preferredId:M},(0,L.getActiveDocument)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(M){var A,O;if(!this._editor.hasTextFocus()||(S.isWeb&&this._clipboardService.writeResources([]),!M.clipboardData||!this.isPasteAsEnabled()))return;const T=this._editor.getModel(),N=this._editor.getSelections();if(!T||!N?.length)return;const P=this._editor.getOption(37);let x=N;const R=N.length===1&&N[0].isEmpty();if(R){if(!P)return;x=[new n.Range(x[0].startLineNumber,1,x[0].startLineNumber,1+T.getLineLength(x[0].startLineNumber))]}const B=(A=this._editor._getViewModel())===null||A===void 0?void 0:A.getPlainTextToCopy(N,P,S.isWindows),V={multicursorText:Array.isArray(B)?B:null,pasteOnNewLine:R,mode:null},U=this._languageFeaturesService.documentPasteEditProvider.ordered(T).filter(ee=>!!ee.prepareDocumentPaste);if(!U.length){this.setCopyMetadata(M.clipboardData,{defaultPastePayload:V});return}const F=(0,o.toVSDataTransfer)(M.clipboardData),j=U.flatMap(ee=>{var $;return($=ee.copyMimeTypes)!==null&&$!==void 0?$:[]}),J=(0,v.generateUuid)();this.setCopyMetadata(M.clipboardData,{id:J,providerCopyMimeTypes:j,defaultPastePayload:V});const le=(0,y.createCancelablePromise)(async ee=>{const $=(0,k.coalesce)(await Promise.all(U.map(async te=>{try{return await te.prepareDocumentPaste(T,x,F,ee)}catch(G){console.error(G);return}})));$.reverse();for(const te of $)for(const[G,de]of te)F.replace(G,de);return F});(O=this._currentCopyOperation)===null||O===void 0||O.dataTransferPromise.cancel(),this._currentCopyOperation={handle:J,dataTransferPromise:le}}async handlePaste(M){var A,O;if(!M.clipboardData||!this._editor.hasTextFocus())return;(A=this._currentPasteOperation)===null||A===void 0||A.cancel(),this._currentPasteOperation=void 0;const T=this._editor.getModel(),N=this._editor.getSelections();if(!N?.length||!T||!this.isPasteAsEnabled())return;const P=this.fetchCopyMetadata(M),x=(0,o.toExternalVSDataTransfer)(M.clipboardData);x.delete(C);const R=[...M.clipboardData.types,...(O=P?.providerCopyMimeTypes)!==null&&O!==void 0?O:[],p.Mimes.uriList],B=this._languageFeaturesService.documentPasteEditProvider.ordered(T).filter(W=>{var V;return(V=W.pasteMimeTypes)===null||V===void 0?void 0:V.some(U=>(0,E.matchesMimeType)(U,R))});B.length&&(M.preventDefault(),M.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,B,N,x,P):this.doPasteInline(B,N,x,P))}doPasteInline(M,A,O,T){const N=(0,y.createCancelablePromise)(async P=>{const x=this._editor;if(!x.hasModel())return;const R=x.getModel(),B=new u.EditorStateCancellationTokenSource(x,3,void 0,P);try{if(await this.mergeInDataFromCopy(O,T,B.token),B.token.isCancellationRequested)return;const W=M.filter(U=>D(U,O));if(!W.length||W.length===1&&W[0].id==="text"){await this.applyDefaultPasteHandler(O,T,B.token);return}const V=await this.getPasteEdits(W,O,R,A,B.token);if(B.token.isCancellationRequested)return;if(V.length===1&&V[0].providerId==="text"){await this.applyDefaultPasteHandler(O,T,B.token);return}if(V.length){const U=x.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(A,{activeEditIndex:0,allEdits:V},U,B.token)}await this.applyDefaultPasteHandler(O,T,B.token)}finally{B.dispose(),this._currentPasteOperation===N&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(A[0].getEndPosition(),(0,c.localize)(2,null),N),this._currentPasteOperation=N}showPasteAsPick(M,A,O,T,N){const P=(0,y.createCancelablePromise)(async x=>{const R=this._editor;if(!R.hasModel())return;const B=R.getModel(),W=new u.EditorStateCancellationTokenSource(R,3,void 0,x);try{if(await this.mergeInDataFromCopy(T,N,W.token),W.token.isCancellationRequested)return;let V=A.filter(J=>D(J,T));M&&(V=V.filter(J=>J.id===M));const U=await this.getPasteEdits(V,T,B,O,W.token);if(W.token.isCancellationRequested||!U.length)return;let F;if(M)F=U.at(0);else{const J=await this._quickInputService.pick(U.map(le=>({label:le.label,description:le.providerId,detail:le.detail,edit:le})),{placeHolder:(0,c.localize)(3,null)});F=J?.edit}if(!F)return;const j=(0,a.createCombinedWorkspaceEdit)(B.uri,O,F);await this._bulkEditService.apply(j,{editor:this._editor})}finally{W.dispose(),this._currentPasteOperation===P&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:(0,c.localize)(4,null)},()=>P)}setCopyMetadata(M,A){M.setData(C,JSON.stringify(A))}fetchCopyMetadata(M){var A;if(!M.clipboardData)return;const O=M.clipboardData.getData(C);if(O)try{return JSON.parse(O)}catch{return}const[T,N]=b.ClipboardEventUtils.getTextData(M.clipboardData);if(N)return{defaultPastePayload:{mode:N.mode,multicursorText:(A=N.multicursorText)!==null&&A!==void 0?A:null,pasteOnNewLine:!!N.isFromEmptySelection}}}async mergeInDataFromCopy(M,A,O){var T;if(A?.id&&((T=this._currentCopyOperation)===null||T===void 0?void 0:T.handle)===A.id){const N=await this._currentCopyOperation.dataTransferPromise;if(O.isCancellationRequested)return;for(const[P,x]of N)M.replace(P,x)}if(!M.has(p.Mimes.uriList)){const N=await this._clipboardService.readResources();if(O.isCancellationRequested)return;N.length&&M.append(p.Mimes.uriList,(0,E.createStringDataTransferItem)(E.UriList.create(N)))}}async getPasteEdits(M,A,O,T,N){const P=await(0,y.raceCancellation)(Promise.all(M.map(async R=>{var B;try{const W=await((B=R.provideDocumentPasteEdits)===null||B===void 0?void 0:B.call(R,O,T,A,N));if(W)return{...W,providerId:R.id}}catch(W){console.error(W)}})),N),x=(0,k.coalesce)(P??[]);return(0,a.sortEditsByYieldTo)(x)}async applyDefaultPasteHandler(M,A,O){var T,N,P;const x=(T=M.get(p.Mimes.text))!==null&&T!==void 0?T:M.get("text");if(!x)return;const R=await x.asString();if(O.isCancellationRequested)return;const B={text:R,pasteOnNewLine:(N=A?.defaultPastePayload.pasteOnNewLine)!==null&&N!==void 0?N:!1,multicursorText:(P=A?.defaultPastePayload.multicursorText)!==null&&P!==void 0?P:null,mode:null};this._editor.trigger("keyboard","paste",B)}};e.CopyPasteController=w,w.ID="editor.contrib.copyPasteActionController",e.CopyPasteController=w=m=Ee([he(1,l.IInstantiationService),he(2,i.IBulkEditService),he(3,d.IClipboardService),he(4,t.ILanguageFeaturesService),he(5,g.IQuickInputService),he(6,s.IProgressService)],w);function D(I,M){var A;return!!(!((A=I.pasteMimeTypes)===null||A===void 0)&&A.some(O=>M.matches(O)))}}),define(ie[900],ne([1,0,13,14,174,2,349,5,18,292,758,104,259,663,28,15,348,8,339,343]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=e.dropWidgetVisibleCtx=e.changeDropTypeCommandId=e.defaultProviderConfig=void 0,e.defaultProviderConfig="editor.experimental.dropIntoEditor.defaultProvider",e.changeDropTypeCommandId="editor.changeDropType",e.dropWidgetVisibleCtx=new a.RawContextKey("dropWidgetVisible",!1,(0,n.localize)(0,null));let l=r=class extends E.Disposable{static get(g){return g.getContribution(r.ID)}constructor(g,h,m,C,w){super(),this._configService=m,this._languageFeaturesService=C,this._treeViewsDragAndDropService=w,this.treeItemsTransfer=u.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(h.createInstance(i.InlineProgressManager,"dropIntoEditor",g)),this._postDropWidgetManager=this._register(h.createInstance(d.PostEditWidgetManager,"dropIntoEditor",g,e.dropWidgetVisibleCtx,{id:e.changeDropTypeCommandId,label:(0,n.localize)(1,null)})),this._register(g.onDropIntoEditor(D=>this.onDropIntoEditor(g,D.position,D.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(g,h,m){var C;if(!m.dataTransfer||!g.hasModel())return;(C=this._currentOperation)===null||C===void 0||C.cancel(),g.focus(),g.setPosition(h);const w=(0,k.createCancelablePromise)(async D=>{const I=new o.EditorStateCancellationTokenSource(g,1,void 0,D);try{const M=await this.extractDataTransferData(m);if(M.size===0||I.token.isCancellationRequested)return;const A=g.getModel();if(!A)return;const O=this._languageFeaturesService.documentOnDropEditProvider.ordered(A).filter(N=>N.dropMimeTypes?N.dropMimeTypes.some(P=>M.matches(P)):!0),T=await this.getDropEdits(O,A,h,M,I);if(I.token.isCancellationRequested)return;if(T.length){const N=this.getInitialActiveEditIndex(A,T),P=g.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([p.Range.fromPositions(h)],{activeEditIndex:N,allEdits:T},P,D)}}finally{I.dispose(),this._currentOperation===w&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(h,(0,n.localize)(2,null),w),this._currentOperation=w}async getDropEdits(g,h,m,C,w){const D=await(0,k.raceCancellation)(Promise.all(g.map(async M=>{try{const A=await M.provideDocumentOnDropEdits(h,m,C,w.token);if(A)return{...A,providerId:M.id}}catch(A){console.error(A)}})),w.token),I=(0,L.coalesce)(D??[]);return(0,c.sortEditsByYieldTo)(I)}getInitialActiveEditIndex(g,h){const m=this._configService.getValue(e.defaultProviderConfig,{resource:g.uri});for(const[C,w]of Object.entries(m)){const D=h.findIndex(I=>w===I.providerId&&I.handledMimeType&&(0,y.matchesMimeType)(C,[I.handledMimeType]));if(D>=0)return D}return 0}async extractDataTransferData(g){if(!g.dataTransfer)return new y.VSDataTransfer;const h=(0,_.toExternalVSDataTransfer)(g.dataTransfer);if(this.treeItemsTransfer.hasData(v.DraggedTreeItemsIdentifier.prototype)){const m=this.treeItemsTransfer.getData(v.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(m))for(const C of m){const w=await this._treeViewsDragAndDropService.removeDragOperationTransfer(C.identifier);if(w)for(const[D,I]of w)h.replace(D,I)}}return h}};e.DropIntoEditorController=l,l.ID="editor.contrib.dropIntoEditorController",e.DropIntoEditorController=l=r=Ee([he(1,f.IInstantiationService),he(2,t.IConfigurationService),he(3,S.ILanguageFeaturesService),he(4,b.ITreeViewsDnDService)],l)}),define(ie[901],ne([1,0,13,14,19,38,9,6,2,12,22,16,33,11,5,21,39,32,693,15,18,30,78,61,463]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g){"use strict";var h;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 m="linked-editing-decoration";let C=h=class extends S.Disposable{static get(A){return A.getContribution(h.ID)}constructor(A,O,T,N,P){super(),this.languageConfigurationService=N,this._syncRangesToken=0,this._localToDispose=this._register(new S.DisposableStore),this._editor=A,this._providers=T.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(O),this._debounceInformation=P.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new S.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(x=>{(x.hasChanged(69)||x.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(A){const O=this._editor.getModel(),T=O!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(O);if(T===this._enabled&&!A||(this._enabled=T,this.clearRanges(),this._localToDispose.clear(),!T||O===null))return;this._localToDispose.add(p.Event.runAndSubscribe(O.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition()}));const N=new k.Delayer(this._debounceInformation.get(O)),P=()=>{var B;this._rangeUpdateTriggerPromise=N.trigger(()=>this.updateRanges(),(B=this._debounceDuration)!==null&&B!==void 0?B:this._debounceInformation.get(O))},x=new k.Delayer(0),R=B=>{this._rangeSyncTriggerPromise=x.trigger(()=>this._syncRanges(B))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{P()})),this._localToDispose.add(this._editor.onDidChangeModelContent(B=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const W=this._currentDecorations.getRange(0);if(W&&B.changes.every(V=>W.intersectRanges(V.range))){R(this._syncRangesToken);return}}P()})),this._localToDispose.add({dispose:()=>{N.dispose(),x.dispose()}}),this.updateRanges()}_syncRanges(A){if(!this._editor.hasModel()||A!==this._syncRangesToken||this._currentDecorations.length===0)return;const O=this._editor.getModel(),T=this._currentDecorations.getRange(0);if(!T||T.startLineNumber!==T.endLineNumber)return this.clearRanges();const N=O.getValueInRange(T);if(this._currentWordPattern){const x=N.match(this._currentWordPattern);if((x?x[0].length:0)!==N.length)return this.clearRanges()}const P=[];for(let x=1,R=this._currentDecorations.length;x1){this.clearRanges();return}const T=this._editor.getModel(),N=T.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===N){if(O.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const x=this._currentDecorations.getRange(0);if(x&&x.containsPosition(O))return}}this.clearRanges(),this._currentRequestPosition=O,this._currentRequestModelVersion=N;const P=(0,k.createCancelablePromise)(async x=>{try{const R=new g.StopWatch(!1),B=await I(this._providers,T,O,x);if(this._debounceInformation.update(T,R.elapsed()),P!==this._currentRequest||(this._currentRequest=null,N!==T.getVersionId()))return;let W=[];B?.ranges&&(W=B.ranges),this._currentWordPattern=B?.wordPattern||this._languageWordPattern;let V=!1;for(let F=0,j=W.length;F({range:F,options:h.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(U),this._syncRangesToken++}catch(R){(0,_.isCancellationError)(R)||(0,_.onUnexpectedError)(R),(this._currentRequest===P||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=P,P}};e.LinkedEditingContribution=C,C.ID="editor.contrib.linkedEditing",C.DECORATION=u.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:m}),e.LinkedEditingContribution=C=h=Ee([he(1,d.IContextKeyService),he(2,r.ILanguageFeaturesService),he(3,f.ILanguageConfigurationService),he(4,s.ILanguageFeatureDebounceService)],C);class w extends o.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:c.localize(0,null),alias:"Start Linked Editing",precondition:d.ContextKeyExpr.and(a.EditorContextKeys.writable,a.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(A,O){const T=A.get(i.ICodeEditorService),[N,P]=Array.isArray(O)&&O||[void 0,void 0];return b.URI.isUri(N)&&n.Position.isIPosition(P)?T.openCodeEditor({resource:N},T.getActiveCodeEditor()).then(x=>{x&&(x.setPosition(P),x.invokeWithinContext(R=>(this.reportTelemetry(R,x),this.run(R,x))))},_.onUnexpectedError):super.runCommand(A,O)}run(A,O){const T=C.get(O);return T?Promise.resolve(T.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=w;const D=o.EditorCommand.bindToContribution(C.get);(0,o.registerEditorCommand)(new D({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:M=>M.clearRanges(),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function I(M,A,O,T){const N=M.ordered(A);return(0,k.first)(N.map(P=>async()=>{try{return await P.provideLinkedEditingRanges(A,O,T)}catch(x){(0,_.onUnexpectedExternalError)(x);return}}),P=>!!P&&L.isNonEmptyArray(P?.ranges))}e.editorLinkedEditingBackground=(0,l.registerColor)("editor.linkedEditingBackground",{dark:E.Color.fromHex("#f00").transparent(.3),light:E.Color.fromHex("#f00").transparent(.3),hcDark:E.Color.fromHex("#f00").transparent(.3),hcLight:E.Color.white},c.localize(1,null)),(0,o.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(M,A,O)=>{const{linkedEditingRangeProvider:T}=M.get(r.ILanguageFeaturesService);return I(T,A,O,y.CancellationToken.None)}),(0,o.registerEditorContribution)(C.ID,C,1),(0,o.registerEditorAction)(w)}),define(ie[902],ne([1,0,14,19,9,58,2,44,17,45,61,22,16,39,78,18,186,760,694,47,57,464]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let s=l=class extends _.Disposable{static get(D){return D.getContribution(l.ID)}constructor(D,I,M,A,O){super(),this.editor=D,this.openerService=I,this.notificationService=M,this.languageFeaturesService=A,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=O.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new L.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const T=this._register(new u.ClickLinkGesture(D));this._register(T.onMouseMoveOrRelevantKeyDown(([N,P])=>{this._onEditorMouseMove(N,P)})),this._register(T.onExecute(N=>{this.onEditorMouseUp(N)})),this._register(T.onCancel(N=>{this.cleanUpActiveLinkDecoration()})),this._register(D.onDidChangeConfiguration(N=>{N.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(D.onDidChangeModelContent(N=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(D.onDidChangeModel(N=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(D.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(70))return;const D=this.editor.getModel();if(!D.isTooLargeForSyncing()&&this.providers.has(D)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,L.createCancelablePromise)(I=>(0,f.getLinks)(this.providers,D,I));try{const I=new b.StopWatch(!1);if(this.activeLinksList=await this.computePromise,this.debounceInformation.update(D,I.elapsed()),D.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(I){(0,y.onUnexpectedError)(I)}finally{this.computePromise=null}}}updateDecorations(D){const I=this.editor.getOption(77)==="altKey",M=[],A=Object.keys(this.currentOccurrences);for(const T of A){const N=this.currentOccurrences[T];M.push(N.decorationId)}const O=[];if(D)for(const T of D)O.push(h.decoration(T,I));this.editor.changeDecorations(T=>{const N=T.deltaDecorations(M,O);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let P=0,x=N.length;P{A.activate(O,M),this.activeLinkDecorationId=A.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const D=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const I=this.currentOccurrences[this.activeLinkDecorationId];I&&this.editor.changeDecorations(M=>{I.deactivate(M,D)}),this.activeLinkDecorationId=null}}onEditorMouseUp(D){if(!this.isEnabled(D))return;const I=this.getLinkOccurrence(D.target.position);I&&this.openLinkOccurrence(I,D.hasSideBySideModifier,!0)}openLinkOccurrence(D,I,M=!1){if(!this.openerService)return;const{link:A}=D;A.resolve(k.CancellationToken.None).then(O=>{if(typeof O=="string"&&this.editor.hasModel()){const T=this.editor.getModel().uri;if(T.scheme===p.Schemas.file&&O.startsWith(`${p.Schemas.file}:`)){const N=o.URI.parse(O);if(N.scheme===p.Schemas.file){const P=v.originalFSPath(N);let x=null;P.startsWith("/./")?x=`.${P.substr(1)}`:P.startsWith("//./")&&(x=`.${P.substr(2)}`),x&&(O=v.joinPath(T,x))}}}return this.openerService.open(O,{openToSide:I,fromUserGesture:M,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},O=>{const T=O instanceof Error?O.message:O;T==="invalid"?this.notificationService.warn(c.localize(0,null,A.url.toString())):T==="missing"?this.notificationService.warn(c.localize(1,null)):(0,y.onUnexpectedError)(O)})}getLinkOccurrence(D){if(!this.editor.hasModel()||!D)return null;const I=this.editor.getModel().getDecorationsInRange({startLineNumber:D.lineNumber,startColumn:D.column,endLineNumber:D.lineNumber,endColumn:D.column},0,!0);for(const M of I){const A=this.currentOccurrences[M.id];if(A)return A}return null}isEnabled(D,I){return!!(D.target.type===6&&(D.hasTriggerModifier||I&&I.keyCodeIsTriggerKey))}stop(){var D;this.computeLinks.cancel(),this.activeLinksList&&((D=this.activeLinksList)===null||D===void 0||D.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};e.LinkDetector=s,s.ID="editor.linkDetector",e.LinkDetector=s=l=Ee([he(1,r.IOpenerService),he(2,d.INotificationService),he(3,a.ILanguageFeaturesService),he(4,t.ILanguageFeatureDebounceService)],s);const g={general:n.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:n.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class h{static decoration(D,I){return{range:D.range,options:h._getOptions(D,I,!1)}}static _getOptions(D,I,M){const A={...M?g.active:g.general};return A.hoverMessage=m(D,I),A}constructor(D,I){this.link=D,this.decorationId=I}activate(D,I){D.changeDecorationOptions(this.decorationId,h._getOptions(this.link,I,!0))}deactivate(D,I){D.changeDecorationOptions(this.decorationId,h._getOptions(this.link,I,!1))}}function m(w,D){const I=w.url&&/^command:/i.test(w.url.toString()),M=w.tooltip?w.tooltip:I?c.localize(2,null):c.localize(3,null),A=D?S.isMacintosh?c.localize(4,null):c.localize(5,null):S.isMacintosh?c.localize(6,null):c.localize(7,null);if(w.url){let O="";if(/^command:/i.test(w.url.toString())){const N=w.url.toString().match(/^command:([^?#]+)/);if(N){const P=N[1];O=c.localize(8,null,P)}}return new E.MarkdownString("",!0).appendLink(w.url.toString(!0).replace(/ /g,"%20"),M,O).appendMarkdown(` (${A})`)}else return new E.MarkdownString().appendText(`${M} (${A})`)}class C extends i.EditorAction{constructor(){super({id:"editor.action.openLink",label:c.localize(9,null),alias:"Open Link",precondition:void 0})}run(D,I){const M=s.get(I);if(!M||!I.hasModel())return;const A=I.getSelections();for(const O of A){const T=M.getLinkOccurrence(O.getEndPosition());T&&M.openLinkOccurrence(T,!1)}}}(0,i.registerEditorContribution)(s.ID,s,1),(0,i.registerEditorAction)(C)}),define(ie[903],ne([1,0,2,18,189,14,258,301,300,32,9,307,49]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var n;(function(l){l.OUTLINE_MODEL="outlineModel",l.FOLDING_PROVIDER_MODEL="foldingProviderModel",l.INDENTATION_MODEL="indentationModel"})(n||(n={}));var t;(function(l){l[l.VALID=0]="VALID",l[l.INVALID=1]="INVALID",l[l.CANCELED=2]="CANCELED"})(t||(t={}));let a=class extends L.Disposable{constructor(s,g,h,m){super(),this._editor=s,this._languageConfigurationService=g,this._languageFeaturesService=h,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new E.Delayer(300)),this._updateOperation=this._register(new L.DisposableStore);const C=new f(h),w=new r(this._editor,h),D=new d(this._editor,g);switch(m){case n.OUTLINE_MODEL:this._modelProviders.push(C),this._modelProviders.push(w),this._modelProviders.push(D);break;case n.FOLDING_PROVIDER_MODEL:this._modelProviders.push(w),this._modelProviders.push(D);break;case n.INDENTATION_MODEL:this._modelProviders.push(D);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}async update(s,g,h){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),await this._updateScheduler.trigger(async()=>{for(const m of this._modelProviders){const{statusPromise:C,modelPromise:w}=m.computeStickyModel(s,g,h);this._modelPromise=w;const D=await C;if(this._modelPromise!==w)return null;switch(D){case t.CANCELED:return this._updateOperation.clear(),null;case t.VALID:return m.stickyModel}}return null}).catch(m=>((0,b.onUnexpectedError)(m),null))}};e.StickyModelProvider=a,e.StickyModelProvider=a=Ee([he(1,v.ILanguageConfigurationService),he(2,k.ILanguageFeaturesService)],a);class u{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,t.INVALID}computeStickyModel(s,g,h){if(h.isCancellationRequested||!this.isProviderValid(s))return{statusPromise:this._invalid(),modelPromise:null};const m=(0,E.createCancelablePromise)(C=>this.createModelFromProvider(s,g,C));return{statusPromise:m.then(C=>this.isModelValid(C)?h.isCancellationRequested?t.CANCELED:(this._stickyModel=this.createStickyModel(s,g,h,C),t.VALID):this._invalid()).then(void 0,C=>((0,b.onUnexpectedError)(C),t.CANCELED)),modelPromise:m}}isModelValid(s){return!0}isProviderValid(s){return!0}}let f=class extends u{constructor(s){super(),this._languageFeaturesService=s}createModelFromProvider(s,g,h){return y.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,s,h)}createStickyModel(s,g,h,m){var C;const{stickyOutlineElement:w,providerID:D}=this._stickyModelFromOutlineModel(m,(C=this._stickyModel)===null||C===void 0?void 0:C.outlineProviderId);return new o.StickyModel(s.uri,g,w,D)}isModelValid(s){return s&&s.children.size>0}_stickyModelFromOutlineModel(s,g){let h;if(i.Iterable.first(s.children.values())instanceof y.OutlineGroup){const D=i.Iterable.find(s.children.values(),I=>I.id===g);if(D)h=D.children;else{let I="",M=-1,A;for(const[O,T]of s.children.entries()){const N=this._findSumOfRangesOfGroup(T);N>M&&(A=T,M=N,I=T.id)}g=I,h=A.children}}else h=s.children;const m=[],C=Array.from(h.values()).sort((D,I)=>{const M=new o.StickyRange(D.symbol.range.startLineNumber,D.symbol.range.endLineNumber),A=new o.StickyRange(I.symbol.range.startLineNumber,I.symbol.range.endLineNumber);return this._comparator(M,A)});for(const D of C)m.push(this._stickyModelFromOutlineElement(D,D.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new o.StickyElement(void 0,m,void 0),providerID:g}}_stickyModelFromOutlineElement(s,g){const h=[];for(const C of s.children.values())if(C.symbol.selectionRange.startLineNumber!==C.symbol.range.endLineNumber)if(C.symbol.selectionRange.startLineNumber!==g)h.push(this._stickyModelFromOutlineElement(C,C.symbol.selectionRange.startLineNumber));else for(const w of C.children.values())h.push(this._stickyModelFromOutlineElement(w,C.symbol.selectionRange.startLineNumber));h.sort((C,w)=>this._comparator(C.range,w.range));const m=new o.StickyRange(s.symbol.selectionRange.startLineNumber,s.symbol.range.endLineNumber);return new o.StickyElement(m,h,void 0)}_comparator(s,g){return s.startLineNumber!==g.startLineNumber?s.startLineNumber-g.startLineNumber:g.endLineNumber-s.endLineNumber}_findSumOfRangesOfGroup(s){let g=0;for(const h of s.children.values())g+=this._findSumOfRangesOfGroup(h);return s instanceof y.OutlineElement?g+s.symbol.range.endLineNumber-s.symbol.selectionRange.startLineNumber:g}};f=Ee([he(0,k.ILanguageFeaturesService)],f);class c extends u{constructor(s){super(),this._foldingLimitReporter=new _.RangesLimitReporter(s)}createStickyModel(s,g,h,m){const C=this._fromFoldingRegions(m);return new o.StickyModel(s.uri,g,C,void 0)}isModelValid(s){return s!==null}_fromFoldingRegions(s){const g=s.length,h=[],m=new o.StickyElement(void 0,[],void 0);for(let C=0;C0}createModelFromProvider(s,g,h){const m=_.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,s);return new p.SyntaxRangeProvider(s,m,()=>this.createModelFromProvider(s,g,h),this._foldingLimitReporter,void 0).compute(h)}};r=Ee([he(1,k.ILanguageFeaturesService)],r)}),define(ie[904],ne([1,0,2,18,19,14,13,6,32,903]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class b{constructor(n,t,a){this.startLineNumber=n,this.endLineNumber=t,this.nestingDepth=a}}e.StickyLineCandidate=b;let o=class extends L.Disposable{constructor(n,t,a){super(),this._languageFeaturesService=t,this._languageConfigurationService=a,this._onDidChangeStickyScroll=this._register(new p.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=n,this._sessionStore=this._register(new L.DisposableStore),this._updateSoon=this._register(new E.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new v.StickyModelProvider(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),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(){var n;return(n=this._model)===null||n===void 0?void 0:n.version}async update(){var n;(n=this._cts)===null||n===void 0||n.dispose(!0),this._cts=new y.CancellationTokenSource,await this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateStickyModel(n){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),a=t.getVersionId(),u=await this._stickyModelProvider.update(t,a,n);n.isCancellationRequested||(this._model=u)}updateIndex(n){return n===-1?n=0:n<0&&(n=-n-2),n}getCandidateStickyLinesIntersectingFromStickyModel(n,t,a,u,f){if(t.children.length===0)return;let c=f;const d=[];for(let s=0;ss-g)),l=this.updateIndex((0,_.binarySearch)(d,n.startLineNumber+u,(s,g)=>s-g));for(let s=r;s<=l;s++){const g=t.children[s];if(!g)return;if(g.range){const h=g.range.startLineNumber,m=g.range.endLineNumber;n.startLineNumber<=m+1&&h-1<=n.endLineNumber&&h!==c&&(c=h,a.push(new b(h,m-1,u+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,a,u+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,a,u,f)}}getCandidateStickyLinesIntersecting(n){var t,a;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let u=[];this.getCandidateStickyLinesIntersectingFromStickyModel(n,this._model.element,u,0,-1);const f=(a=this._editor._getViewModel())===null||a===void 0?void 0:a.getHiddenAreas();if(f)for(const c of f)u=u.filter(d=>!(d.startLineNumber>=c.startLineNumber&&d.endLineNumber<=c.endLineNumber+1));return u}};e.StickyLineCandidateProvider=o,e.StickyLineCandidateProvider=o=Ee([he(1,k.ILanguageFeaturesService),he(2,S.ILanguageConfigurationService)],o)}),define(ie[905],ne([1,0,7,92,13,2,27,253,166,11,102,154,117,375,471]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class t{constructor(h,m,C,w=null){this.startLineNumbers=h,this.endLineNumbers=m,this.lastLineRelativePosition=C,this.showEndForLine=w}equals(h){return!!h&&this.lastLineRelativePosition===h.lastLineRelativePosition&&this.showEndForLine===h.showEndForLine&&(0,y.equals)(this.startLineNumbers,h.startLineNumbers)&&(0,y.equals)(this.endLineNumbers,h.endLineNumbers)}}e.StickyScrollWidgetState=t;const a=(0,k.createTrustedTypesPolicy)("stickyScrollViewLayer",{createHTML:g=>g}),u="data-sticky-line-index",f="data-sticky-is-line",c="data-sticky-is-line-number",d="data-sticky-is-folding-icon";class r extends E.Disposable{constructor(h){super(),this._editor=h,this._foldingIconStore=new E.DisposableStore,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",h instanceof S.EmbeddedCodeEditorWidget),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const m=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(C=>{C.hasChanged(114)&&m(),C.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(C=>{C.scrollLeftChanged&&m(),C.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{m(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),m(),this._register(this._editor.onDidLayoutChange(C=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(h){return this._stickyLines.find(m=>m.lineNumber===h)}getCurrentLines(){return this._lineNumbers}setState(h,m,C=1/0){if((!this._previousState&&!h||this._previousState&&this._previousState.equals(h))&&C===1/0)return;this._previousState=h;const w=this._stickyLines;if(this._clearStickyWidget(),!h||!this._editor._getViewModel())return;if(h.startLineNumbers.length*this._lineHeight+h.lastLineRelativePosition>0){this._lastLineRelativePosition=h.lastLineRelativePosition;const I=[...h.startLineNumbers];h.showEndForLine!==null&&(I[h.showEndForLine]=h.endLineNumbers[h.showEndForLine]),this._lineNumbers=I}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(w,m,C)}_updateWidgetWidth(){const h=this._editor.getLayoutInfo(),m=h.contentLeft;this._lineNumbersDomNode.style.width=`${m}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-h.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${h.width-h.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),L.clearNode(this._lineNumbersDomNode),L.clearNode(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(h){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${h?.5:0}s`)}_setFoldingIconsVisibility(h){for(const m of this._stickyLines){const C=m.foldingIcon;C&&C.setVisible(h?!0:C.isCollapsed)}}async _renderRootNode(h,m,C=1/0){const w=this._editor.getLayoutInfo();for(const[I,M]of this._lineNumbers.entries()){const A=h[I],O=M>=C||A?.lineNumber!==M?this._renderChildNode(I,M,m,w):this._updateTopAndZIndexOfStickyLine(A);O&&(this._linesDomNode.appendChild(O.lineDomNode),this._lineNumbersDomNode.appendChild(O.lineNumberDomNode),this._stickyLines.push(O))}m&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const D=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(D===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${D}px`,this._linesDomNodeScrollable.style.height=`${D}px`,this._rootDomNode.style.height=`${D}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(L.addDisposableListener(this._lineNumbersDomNode,L.EventType.MOUSE_ENTER,m=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(L.addDisposableListener(this._lineNumbersDomNode,L.EventType.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(h,m,C,w){const D=this._editor._getViewModel();if(!D)return;const I=D.coordinatesConverter.convertModelPositionToViewPosition(new v.Position(m,1)).lineNumber,M=D.getViewLineRenderingData(I),A=this._editor.getOption(67);let O;try{O=o.LineDecoration.filter(M.inlineDecorations,I,M.minColumn,M.maxColumn)}catch{O=[]}const T=new i.RenderLineInput(!0,!0,M.content,M.continuesWithWrappedLine,M.isBasicASCII,M.containsRTL,0,M.tokens,O,M.tabSize,M.startVisibleColumn,1,1,1,500,"none",!0,!0,null),N=new b.StringBuilder(2e3),P=(0,i.renderViewLine)(T,N);let x;a?x=a.createHTML(N.build()):x=N.build();const R=document.createElement("span");R.setAttribute(u,String(h)),R.setAttribute(f,""),R.setAttribute("role","listitem"),R.tabIndex=0,R.className="sticky-line-content",R.classList.add(`stickyLine${m}`),R.style.lineHeight=`${this._lineHeight}px`,R.innerHTML=x;const B=document.createElement("span");B.setAttribute(u,String(h)),B.setAttribute(c,""),B.className="sticky-line-number",B.style.lineHeight=`${this._lineHeight}px`;const W=w.contentLeft;B.style.width=`${W}px`;const V=document.createElement("span");A.renderType===1||A.renderType===3&&m%10===0?V.innerText=m.toString():A.renderType===2&&(V.innerText=Math.abs(m-this._editor.getPosition().lineNumber).toString()),V.className="sticky-line-number-inner",V.style.lineHeight=`${this._lineHeight}px`,V.style.width=`${w.lineNumbersWidth}px`,V.style.paddingLeft=`${w.lineNumbersLeft}px`,B.appendChild(V);const U=this._renderFoldingIconForLine(C,m);U&&B.appendChild(U.domNode),this._editor.applyFontInfo(R),this._editor.applyFontInfo(V),B.style.lineHeight=`${this._lineHeight}px`,R.style.lineHeight=`${this._lineHeight}px`,B.style.height=`${this._lineHeight}px`,R.style.height=`${this._lineHeight}px`;const F=new l(h,m,R,B,U,P.characterMapping);return this._updateTopAndZIndexOfStickyLine(F)}_updateTopAndZIndexOfStickyLine(h){var m;const C=h.index,w=h.lineDomNode,D=h.lineNumberDomNode,I=C===this._lineNumbers.length-1,M="0",A="1";w.style.zIndex=I?M:A,D.style.zIndex=I?M:A;const O=`${C*this._lineHeight+this._lastLineRelativePosition+(!((m=h.foldingIcon)===null||m===void 0)&&m.isCollapsed?1:0)}px`,T=`${C*this._lineHeight}px`;return w.style.top=I?O:T,D.style.top=I?O:T,h}_renderFoldingIconForLine(h,m){const C=this._editor.getOption(109);if(!h||C==="never")return;const w=h.regions,D=w.findRange(m),I=w.getStartLineNumber(D);if(!(m===I))return;const A=w.isCollapsed(D),O=new s(A,I,w.getEndLineNumber(D),this._lineHeight);return O.setVisible(this._isOnGlyphMargin?!0:A||C==="always"),O.domNode.setAttribute(d,""),O}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const h of this._stickyLines)h.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=h.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(h){0<=h&&h0)return null;const m=this._getRenderedStickyLineFromChildDomNode(h);if(!m)return null;const C=(0,p.getColumnOfNodeOffset)(m.characterMapping,h,0);return new v.Position(m.lineNumber,C)}getLineNumberFromChildDomNode(h){var m,C;return(C=(m=this._getRenderedStickyLineFromChildDomNode(h))===null||m===void 0?void 0:m.lineNumber)!==null&&C!==void 0?C:null}_getRenderedStickyLineFromChildDomNode(h){const m=this.getLineIndexFromChildDomNode(h);return m===null||m<0||m>=this._stickyLines.length?null:this._stickyLines[m]}getLineIndexFromChildDomNode(h){const m=this._getAttributeValue(h,u);return m?parseInt(m,10):null}isInStickyLine(h){return this._getAttributeValue(h,f)!==void 0}isInFoldingIconDomNode(h){return this._getAttributeValue(h,d)!==void 0}_getAttributeValue(h,m){for(;h&&h!==this._rootDomNode;){const C=h.getAttribute(m);if(C!==null)return C;h=h.parentElement}}}e.StickyScrollWidget=r;class l{constructor(h,m,C,w,D,I){this.index=h,this.lineNumber=m,this.lineDomNode=C,this.lineNumberDomNode=w,this.foldingIcon=D,this.characterMapping=I}}class s{constructor(h,m,C,w){this.isCollapsed=h,this.foldingStartLine=m,this.foldingEndLine=C,this.dimension=w,this.domNode=document.createElement("div"),this.domNode.style.width=`${w}px`,this.domNode.style.height=`${w}px`,this.domNode.className=_.ThemeIcon.asClassName(h?n.foldingCollapsedIcon:n.foldingExpandedIcon)}setVisible(h){this.domNode.style.cursor=h?"pointer":"default",this.domNode.style.opacity=h?"1":"0"}}}),define(ie[906],ne([1,0,7,116,14,9,6,2,143,12,166,874,711,15,8,91,30,88,23,226,136,352,869,105,51,175,472,252]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetSelectedBackground=void 0,(0,u.registerColor)("editorSuggestWidget.background",{dark:u.editorWidgetBackground,light:u.editorWidgetBackground,hcDark:u.editorWidgetBackground,hcLight:u.editorWidgetBackground},i.localize(0,null)),(0,u.registerColor)("editorSuggestWidget.border",{dark:u.editorWidgetBorder,light:u.editorWidgetBorder,hcDark:u.editorWidgetBorder,hcLight:u.editorWidgetBorder},i.localize(1,null));const C=(0,u.registerColor)("editorSuggestWidget.foreground",{dark:u.editorForeground,light:u.editorForeground,hcDark:u.editorForeground,hcLight:u.editorForeground},i.localize(2,null));(0,u.registerColor)("editorSuggestWidget.selectedForeground",{dark:u.quickInputListFocusForeground,light:u.quickInputListFocusForeground,hcDark:u.quickInputListFocusForeground,hcLight:u.quickInputListFocusForeground},i.localize(3,null)),(0,u.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:u.quickInputListFocusIconForeground,light:u.quickInputListFocusIconForeground,hcDark:u.quickInputListFocusIconForeground,hcLight:u.quickInputListFocusIconForeground},i.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,u.registerColor)("editorSuggestWidget.selectedBackground",{dark:u.quickInputListFocusBackground,light:u.quickInputListFocusBackground,hcDark:u.quickInputListFocusBackground,hcLight:u.quickInputListFocusBackground},i.localize(5,null)),(0,u.registerColor)("editorSuggestWidget.highlightForeground",{dark:u.listHighlightForeground,light:u.listHighlightForeground,hcDark:u.listHighlightForeground,hcLight:u.listHighlightForeground},i.localize(6,null)),(0,u.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:u.listFocusHighlightForeground,light:u.listFocusHighlightForeground,hcDark:u.listFocusHighlightForeground,hcLight:u.listFocusHighlightForeground},i.localize(7,null)),(0,u.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,u.transparent)(C,.5),light:(0,u.transparent)(C,.5),hcDark:(0,u.transparent)(C,.5),hcLight:(0,u.transparent)(C,.5)},i.localize(8,null));class w{constructor(A,O){this._service=A,this._key=`suggestWidget.size/${O.getEditorType()}/${O instanceof b.EmbeddedCodeEditorWidget}`}restore(){var A;const O=(A=this._service.get(this._key,0))!==null&&A!==void 0?A:"";try{const T=JSON.parse(O);if(L.Dimension.is(T))return L.Dimension.lift(T)}catch{}}store(A){this._service.store(this._key,JSON.stringify(A),0,1)}reset(){this._service.remove(this._key,0)}}let D=m=class{constructor(A,O,T,N,P){this.editor=A,this._storageService=O,this._state=0,this._isAuto=!1,this._pendingLayout=new p.MutableDisposable,this._pendingShowDetails=new p.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new y.TimeoutTimer,this._disposables=new p.DisposableStore,this._onDidSelect=new _.PauseableEmitter,this._onDidFocus=new _.PauseableEmitter,this._onDidHide=new _.Emitter,this._onDidShow=new _.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new _.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new d.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new I(this,A),this._persistedSize=new w(O,A);class x{constructor(j,J,le=!1,ee=!1){this.persistedSize=j,this.currentSize=J,this.persistHeight=le,this.persistWidth=ee}}let R;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),R=new x(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(F=>{var j,J,le,ee;if(this._resize(F.dimension.width,F.dimension.height),R&&(R.persistHeight=R.persistHeight||!!F.north||!!F.south,R.persistWidth=R.persistWidth||!!F.east||!!F.west),!!F.done){if(R){const{itemHeight:$,defaultSize:te}=this.getLayoutInfo(),G=Math.round($/2);let{width:de,height:ue}=this.element.size;(!R.persistHeight||Math.abs(R.currentSize.height-ue)<=G)&&(ue=(J=(j=R.persistedSize)===null||j===void 0?void 0:j.height)!==null&&J!==void 0?J:te.height),(!R.persistWidth||Math.abs(R.currentSize.width-de)<=G)&&(de=(ee=(le=R.persistedSize)===null||le===void 0?void 0:le.width)!==null&&ee!==void 0?ee:te.width),this._persistedSize.store(new L.Dimension(de,ue))}this._contentWidget.unlockPreference(),R=void 0}})),this._messageElement=L.append(this.element.domNode,L.$(".message")),this._listElement=L.append(this.element.domNode,L.$(".tree"));const B=this._disposables.add(P.createInstance(l.SuggestDetailsWidget,this.editor));B.onDidClose(this.toggleDetails,this,this._disposables),this._details=new l.SuggestDetailsOverlay(B,this.editor);const W=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);W();const V=P.createInstance(s.ItemRenderer,this.editor);this._disposables.add(V),this._disposables.add(V.onDidToggleDetails(()=>this.toggleDetails())),this._list=new k.List("SuggestWidget",this._listElement,{getHeight:F=>this.getLayoutInfo().itemHeight,getTemplateId:F=>"suggestion"},[V],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>i.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:F=>{let j=F.textLabel;if(typeof F.completion.label!="string"){const{detail:$,description:te}=F.completion.label;$&&te?j=i.localize(12,null,j,$,te):$?j=i.localize(13,null,j,$):te&&(j=i.localize(14,null,j,te))}if(!F.isResolved||!this._isDetailsVisible())return j;const{documentation:J,detail:le}=F.completion,ee=v.format("{0}{1}",le||"",J?typeof J=="string"?J:J.value:"");return i.localize(15,null,j,ee)}}}),this._list.style((0,g.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:u.activeContrastBorder})),this._status=P.createInstance(o.SuggestWidgetStatus,this.element.domNode,r.suggestWidgetStatusbarMenu);const U=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);U(),this._disposables.add(N.onDidColorThemeChange(F=>this._onThemeChange(F))),this._onThemeChange(N.getColorTheme()),this._disposables.add(this._list.onMouseDown(F=>this._onListMouseDownOrTap(F))),this._disposables.add(this._list.onTap(F=>this._onListMouseDownOrTap(F))),this._disposables.add(this._list.onDidChangeSelection(F=>this._onListSelection(F))),this._disposables.add(this._list.onDidChangeFocus(F=>this._onListFocus(F))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(F=>{F.hasChanged(117)&&(U(),W())})),this._ctxSuggestWidgetVisible=r.Context.Visible.bindTo(T),this._ctxSuggestWidgetDetailsVisible=r.Context.DetailsVisible.bindTo(T),this._ctxSuggestWidgetMultipleSuggestions=r.Context.MultipleSuggestions.bindTo(T),this._ctxSuggestWidgetHasFocusedSuggestion=r.Context.HasFocusedSuggestion.bindTo(T),this._disposables.add(L.addStandardDisposableListener(this._details.widget.domNode,"keydown",F=>{this._onDetailsKeydown.fire(F)})),this._disposables.add(this.editor.onMouseDown(F=>this._onEditorMouseDown(F)))}dispose(){var A;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(A=this._loadingTimeout)===null||A===void 0||A.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(A){this._details.widget.domNode.contains(A.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(A.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(A){typeof A.element>"u"||typeof A.index>"u"||(A.browserEvent.preventDefault(),A.browserEvent.stopPropagation(),this._select(A.element,A.index))}_onListSelection(A){A.elements.length&&this._select(A.elements[0],A.indexes[0])}_select(A,O){const T=this._completionModel;T&&(this._onDidSelect.fire({item:A,index:O,model:T}),this.editor.focus())}_onThemeChange(A){this._details.widget.borderWidth=(0,f.isHighContrast)(A.type)?2:1}_onListFocus(A){var O;if(this._ignoreFocusEvents)return;if(!A.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=A.elements[0],N=A.indexes[0];T!==this._focusedItem&&((O=this._currentSuggestionDetails)===null||O===void 0||O.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=T,this._list.reveal(N),this._currentSuggestionDetails=(0,y.createCancelablePromise)(async P=>{const x=(0,y.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),R=P.onCancellationRequested(()=>x.dispose());try{return await T.resolve(P)}finally{x.dispose(),R.dispose()}}),this._currentSuggestionDetails.then(()=>{N>=this._list.length||T!==this._list.element(N)||(this._ignoreFocusEvents=!0,this._list.splice(N,1,[T]),this._list.setFocus([N]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,s.getAriaId)(N)}))}).catch(E.onUnexpectedError)),this._onDidFocus.fire({item:T,index:N,model:this._completionModel})}_setState(A){if(this._state!==A)switch(this._state=A,this.element.domNode.classList.toggle("frozen",A===4),this.element.domNode.classList.remove("message"),A){case 0:L.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=m.LOADING_MESSAGE,L.hide(this._listElement,this._status.element),L.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,h.status)(m.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=m.NO_SUGGESTIONS_MESSAGE,L.hide(this._listElement,this._status.element),L.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,h.status)(m.NO_SUGGESTIONS_MESSAGE);break;case 3:L.hide(this._messageElement),L.show(this._listElement,this._status.element),this._show();break;case 4:L.hide(this._messageElement),L.show(this._listElement,this._status.element),this._show();break;case 5:L.hide(this._messageElement),L.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(A,O){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!A,this._isAuto||(this._loadingTimeout=(0,y.disposableTimeout)(()=>this._setState(1),O)))}showSuggestions(A,O,T,N,P){var x,R;if(this._contentWidget.setPosition(this.editor.getPosition()),(x=this._loadingTimeout)===null||x===void 0||x.dispose(),(R=this._currentSuggestionDetails)===null||R===void 0||R.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==A&&(this._completionModel=A),T&&this._state!==2&&this._state!==0){this._setState(4);return}const B=this._completionModel.items.length,W=B===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(B>1),W){this._setState(N?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(T?4:3),this._list.reveal(O,0),this._list.setFocus(P?[]:[O])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=L.runAtThisOrScheduleAtNextAnimationFrame(L.getWindow(this.element.domNode),()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}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&&this._list.getFocus().length>0)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,l.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(A){this._pendingShowDetails.value=L.runAtThisOrScheduleAtNextAnimationFrame(L.getWindow(this.element.domNode),()=>{this._pendingShowDetails.clear(),this._details.show(),A?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(){var A;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(A=this._loadingTimeout)===null||A===void 0||A.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const O=this._persistedSize.restore(),T=Math.ceil(this.getLayoutInfo().itemHeight*4.3);O&&O.heightW&&(B=W);const V=this._completionModel?this._completionModel.stats.pLabelLen*x.typicalHalfwidthCharacterWidth:B,U=x.statusBarHeight+this._list.contentHeight+x.borderHeight,F=x.itemHeight+x.statusBarHeight,j=L.getDomNodePagePosition(this.editor.getDomNode()),J=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),le=j.top+J.top+J.height,ee=Math.min(P.height-le-x.verticalPadding,U),$=j.top+J.top-x.verticalPadding,te=Math.min($,U);let G=Math.min(Math.max(te,ee)+x.borderHeight,U);R===((O=this._cappedHeight)===null||O===void 0?void 0:O.capped)&&(R=this._cappedHeight.wanted),RG&&(R=G);const de=150;R>ee||this._forceRenderingAbove&&$>de?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),G=te):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),G=ee),this.element.preferredSize=new L.Dimension(V,x.defaultSize.height),this.element.maxSize=new L.Dimension(W,G),this.element.minSize=new L.Dimension(220,F),this._cappedHeight=R===U?{wanted:(N=(T=this._cappedHeight)===null||T===void 0?void 0:T.wanted)!==null&&N!==void 0?N:A.height,capped:R}:void 0}this._resize(B,R)}_resize(A,O){const{width:T,height:N}=this.element.maxSize;A=Math.min(T,A),O=Math.min(N,O);const{statusBarHeight:P}=this.getLayoutInfo();this._list.layout(O-P,A),this._listElement.style.height=`${O-P}px`,this.element.layout(O,A),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var A;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((A=this._contentWidget.getPosition())===null||A===void 0?void 0:A.preference[0])===2)}getLayoutInfo(){const A=this.editor.getOption(50),O=(0,S.clamp)(this.editor.getOption(119)||A.lineHeight,8,1e3),T=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:O,N=this._details.widget.borderWidth,P=2*N;return{itemHeight:O,statusBarHeight:T,borderWidth:N,borderHeight:P,typicalHalfwidthCharacterWidth:A.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new L.Dimension(430,T+12*O+P)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(A){this._storageService.store("expandSuggestionDocs",A,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};e.SuggestWidget=D,D.LOADING_MESSAGE=i.localize(9,null),D.NO_SUGGESTIONS_MESSAGE=i.localize(10,null),e.SuggestWidget=D=m=Ee([he(1,a.IStorageService),he(2,n.IContextKeyService),he(3,c.IThemeService),he(4,t.IInstantiationService)],D);class I{constructor(A,O){this._widget=A,this._editor=O,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:A,width:O}=this._widget.element.size,{borderWidth:T,horizontalPadding:N}=this._widget.getLayoutInfo();return new L.Dimension(O+2*T+N,A+2*T)}afterRender(A){this._widget._afterRender(A)}setPreference(A){this._preferenceLocked||(this._preference=A)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(A){this._position=A}}e.SuggestContentWidget=I}),define(ie[377],ne([1,0,43,39,31,720,30,23,476]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const S=(0,_.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},E.localize(0,null),!0);(0,_.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},E.localize(1,null),!0),(0,_.registerColor)("editor.wordHighlightTextBackground",{light:S,dark:S,hcDark:S,hcLight:S},E.localize(2,null),!0);const v=(0,_.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:_.activeContrastBorder,hcLight:_.activeContrastBorder},E.localize(3,null));(0,_.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:_.activeContrastBorder,hcLight:_.activeContrastBorder},E.localize(4,null)),(0,_.registerColor)("editor.wordHighlightTextBorder",{light:v,dark:v,hcDark:v,hcLight:v},E.localize(5,null));const b=(0,_.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},E.localize(6,null),!0),o=(0,_.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},E.localize(7,null),!0),i=(0,_.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:_.overviewRulerSelectionHighlightForeground,light:_.overviewRulerSelectionHighlightForeground,hcDark:_.overviewRulerSelectionHighlightForeground,hcLight:_.overviewRulerSelectionHighlightForeground},E.localize(8,null),!0),n=k.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,p.themeColorFromId)(o),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(_.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),t=k.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,p.themeColorFromId)(i),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(_.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),a=k.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,p.themeColorFromId)(_.overviewRulerSelectionHighlightForeground),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(_.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),u=k.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),f=k.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,p.themeColorFromId)(b),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(_.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}});function c(r){return r===y.DocumentHighlightKind.Write?n:r===y.DocumentHighlightKind.Text?t:f}e.getHighlightDecorationOptions=c;function d(r){return r?u:a}e.getSelectionHighlightDecorationOptions=d,(0,p.registerThemingParticipant)((r,l)=>{const s=r.getColor(_.editorSelectionHighlight);s&&l.addRule(`.monaco-editor .selectionHighlight { background-color: ${s.transparent(.5)}; }`)})}),define(ie[907],ne([1,0,51,14,65,2,16,208,5,24,21,374,696,29,15,18,377,8]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f){"use strict";var c;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 d(U,F){const j=F.filter(J=>!U.find(le=>le.equals(J)));if(j.length>=1){const J=j.map(ee=>`line ${ee.viewState.position.lineNumber} column ${ee.viewState.position.column}`).join(", "),le=j.length===1?i.localize(0,null,J):i.localize(1,null,J);(0,L.status)(le)}}class r extends _.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:i.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(3,null),order:2}})}run(F,j,J){if(!j.hasModel())return;let le=!0;J&&J.logicalLine===!1&&(le=!1);const ee=j._getViewModel();if(ee.cursorConfig.readOnly)return;ee.model.pushStackElement();const $=ee.getCursorStates();ee.setCursorStates(J.source,3,p.CursorMoveCommands.addCursorUp(ee,$,le)),ee.revealTopMostCursor(J.source),d($,ee.getCursorStates())}}e.InsertCursorAbove=r;class l extends _.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:i.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(5,null),order:3}})}run(F,j,J){if(!j.hasModel())return;let le=!0;J&&J.logicalLine===!1&&(le=!1);const ee=j._getViewModel();if(ee.cursorConfig.readOnly)return;ee.model.pushStackElement();const $=ee.getCursorStates();ee.setCursorStates(J.source,3,p.CursorMoveCommands.addCursorDown(ee,$,le)),ee.revealBottomMostCursor(J.source),d($,ee.getCursorStates())}}e.InsertCursorBelow=l;class s extends _.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(7,null),order:4}})}getCursorsForSelection(F,j,J){if(!F.isEmpty()){for(let le=F.startLineNumber;le1&&J.push(new v.Selection(F.endLineNumber,F.endColumn,F.endLineNumber,F.endColumn))}}run(F,j){if(!j.hasModel())return;const J=j.getModel(),le=j.getSelections(),ee=j._getViewModel(),$=ee.getCursorStates(),te=[];le.forEach(G=>this.getCursorsForSelection(G,J,te)),te.length>0&&j.setSelections(te),d($,ee.getCursorStates())}}class g extends _.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(F,j){if(!j.hasModel())return;const J=j.getSelections(),le=j.getModel().getLineCount(),ee=[];for(let G=J[0].startLineNumber;G<=le;G++)ee.push(new v.Selection(G,J[0].startColumn,G,J[0].endColumn));const $=j._getViewModel(),te=$.getCursorStates();ee.length>0&&j.setSelections(ee),d(te,$.getCursorStates())}}class h extends _.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(F,j){if(!j.hasModel())return;const J=j.getSelections(),le=[];for(let te=J[0].startLineNumber;te>=1;te--)le.push(new v.Selection(te,J[0].startColumn,te,J[0].endColumn));const ee=j._getViewModel(),$=ee.getCursorStates();le.length>0&&j.setSelections(le),d($,ee.getCursorStates())}}class m{constructor(F,j,J){this.selections=F,this.revealRange=j,this.revealScrollType=J}}e.MultiCursorSessionResult=m;class C{static create(F,j){if(!F.hasModel())return null;const J=j.getState();if(!F.hasTextFocus()&&J.isRevealed&&J.searchString.length>0)return new C(F,j,!1,J.searchString,J.wholeWord,J.matchCase,null);let le=!1,ee,$;const te=F.getSelections();te.length===1&&te[0].isEmpty()?(le=!0,ee=!0,$=!0):(ee=J.wholeWord,$=J.matchCase);const G=F.getSelection();let de,ue=null;if(G.isEmpty()){const X=F.getConfiguredWordAtPosition(G.getStartPosition());if(!X)return null;de=X.word,ue=new v.Selection(G.startLineNumber,X.startColumn,G.startLineNumber,X.endColumn)}else de=F.getModel().getValueInRange(G).replace(/\r\n/g,` `);return new C(F,j,le,de,ee,$,ue)}constructor(F,j,J,le,ee,$,te){this._editor=F,this.findController=j,this.isDisconnectedFromFindController=J,this.searchText=le,this.wholeWord=ee,this.matchCase=$,this.currentMatch=te}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const F=this._getNextMatch();if(!F)return null;const j=this._editor.getSelections();return new m(j.concat(F),F,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const F=this._getNextMatch();if(!F)return null;const j=this._editor.getSelections();return new m(j.slice(0,j.length-1).concat(F),F,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const F=this._editor.getSelections(),j=F[F.length-1],J=this._editor.getModel().findNextMatch(this.searchText,j.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return J?new v.Selection(J.range.startLineNumber,J.range.startColumn,J.range.endLineNumber,J.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const F=this._getPreviousMatch();if(!F)return null;const j=this._editor.getSelections();return new m(j.concat(F),F,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const F=this._getPreviousMatch();if(!F)return null;const j=this._editor.getSelections();return new m(j.slice(0,j.length-1).concat(F),F,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const le=this.currentMatch;return this.currentMatch=null,le}this.findController.highlightFindOptions();const F=this._editor.getSelections(),j=F[F.length-1],J=this._editor.getModel().findPreviousMatch(this.searchText,j.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return J?new v.Selection(J.range.startLineNumber,J.range.startColumn,J.range.endLineNumber,J.range.endColumn):null}selectAll(F){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const j=this._editor.getModel();return F?j.findMatches(this.searchText,F,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):j.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}e.MultiCursorSession=C;class w extends E.Disposable{static get(F){return F.getContribution(w.ID)}constructor(F){super(),this._sessionDispose=this._register(new E.DisposableStore),this._editor=F,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(F){if(!this._session){const j=C.create(this._editor,F);if(!j)return;this._session=j;const J={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(J.wholeWordOverride=1,J.matchCaseOverride=1,J.isRegexOverride=2),F.getState().change(J,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(le=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(F.getState().onFindReplaceStateChange(le=>{(le.matchCase||le.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const F={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(F,!1)}this._session=null}_setSelections(F){this._ignoreSelectionChange=!0,this._editor.setSelections(F),this._ignoreSelectionChange=!1}_expandEmptyToWord(F,j){if(!j.isEmpty())return j;const J=this._editor.getConfiguredWordAtPosition(j.getStartPosition());return J?new v.Selection(j.startLineNumber,J.startColumn,j.startLineNumber,J.endColumn):j}_applySessionResult(F){F&&(this._setSelections(F.selections),F.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(F.revealRange,F.revealScrollType))}getSession(F){return this._session}addSelectionToNextFindMatch(F){if(this._editor.hasModel()){if(!this._session){const j=this._editor.getSelections();if(j.length>1){const le=F.getState().matchCase;if(!R(this._editor.getModel(),j,le)){const $=this._editor.getModel(),te=[];for(let G=0,de=j.length;G0&&J.isRegex){const le=this._editor.getModel();J.searchScope?j=le.findMatches(J.searchString,J.searchScope,J.isRegex,J.matchCase,J.wholeWord?this._editor.getOption(129):null,!1,1073741824):j=le.findMatches(J.searchString,!0,J.isRegex,J.matchCase,J.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(F),!this._session)return;j=this._session.selectAll(J.searchScope)}if(j.length>0){const le=this._editor.getSelection();for(let ee=0,$=j.length;ee<$;ee++){const te=j[ee];if(te.range.intersectRanges(le)){j[ee]=j[0],j[0]=te;break}}this._setSelections(j.map(ee=>new v.Selection(ee.range.startLineNumber,ee.range.startColumn,ee.range.endLineNumber,ee.range.endColumn)))}}}e.MultiCursorSelectionController=w,w.ID="editor.contrib.multiCursorController";class D extends _.EditorAction{run(F,j){const J=w.get(j);if(!J)return;const le=j._getViewModel();if(le){const ee=le.getCursorStates(),$=o.CommonFindController.get(j);if($)this._run(J,$);else{const te=F.get(f.IInstantiationService).createInstance(o.CommonFindController,j);this._run(J,te),te.dispose()}d(ee,le.getCursorStates())}}}e.MultiCursorSelectionControllerAction=D;class I extends D{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(11,null),order:5}})}_run(F,j){F.addSelectionToNextFindMatch(j)}}e.AddSelectionToNextFindMatchAction=I;class M extends D{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(13,null),order:6}})}_run(F,j){F.addSelectionToPreviousFindMatch(j)}}e.AddSelectionToPreviousFindMatchAction=M;class A extends D{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:(0,y.KeyChord)(2089,2082),weight:100}})}_run(F,j){F.moveSelectionToNextFindMatch(j)}}e.MoveSelectionToNextFindMatchAction=A;class O extends D{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(F,j){F.moveSelectionToPreviousFindMatch(j)}}e.MoveSelectionToPreviousFindMatchAction=O;class T extends D{constructor(){super({id:"editor.action.selectHighlights",label:i.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(17,null),order:7}})}_run(F,j){F.selectAll(j)}}e.SelectHighlightsAction=T;class N extends D{constructor(){super({id:"editor.action.changeAll",label:i.localize(18,null),alias:"Change All Occurrences",precondition:t.ContextKeyExpr.and(b.EditorContextKeys.writable,b.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(F,j){F.selectAll(j)}}e.CompatChangeAll=N;class P{constructor(F,j,J,le,ee){this._model=F,this._searchText=j,this._matchCase=J,this._wordSeparators=le,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,ee&&this._model===ee._model&&this._searchText===ee._searchText&&this._matchCase===ee._matchCase&&this._wordSeparators===ee._wordSeparators&&this._modelVersionId===ee._modelVersionId&&(this._cachedFindMatches=ee._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(F=>F.range),this._cachedFindMatches.sort(S.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let x=c=class extends E.Disposable{constructor(F,j){super(),this._languageFeaturesService=j,this.editor=F,this._isEnabled=F.getOption(107),this._decorations=F.createDecorationsCollection(),this.updateSoon=this._register(new k.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(F.onDidChangeConfiguration(le=>{this._isEnabled=F.getOption(107)})),this._register(F.onDidChangeCursorSelection(le=>{this._isEnabled&&(le.selection.isEmpty()?le.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(F.onDidChangeModel(le=>{this._setState(null)})),this._register(F.onDidChangeModelContent(le=>{this._isEnabled&&this.updateSoon.schedule()}));const J=o.CommonFindController.get(F);J&&this._register(J.getState().onFindReplaceStateChange(le=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(c._createState(this.state,this._isEnabled,this.editor))}static _createState(F,j,J){if(!j||!J.hasModel())return null;const le=J.getSelection();if(le.startLineNumber!==le.endLineNumber)return null;const ee=w.get(J);if(!ee)return null;const $=o.CommonFindController.get(J);if(!$)return null;let te=ee.getSession($);if(!te){const ue=J.getSelections();if(ue.length>1){const Z=$.getState().matchCase;if(!R(J.getModel(),ue,Z))return null}te=C.create(J,$)}if(!te||te.currentMatch||/^[ \t]+$/.test(te.searchText)||te.searchText.length>200)return null;const G=$.getState(),de=G.matchCase;if(G.isRevealed){let ue=G.searchString;de||(ue=ue.toLowerCase());let X=te.searchText;if(de||(X=X.toLowerCase()),ue===X&&te.matchCase===G.matchCase&&te.wholeWord===G.wholeWord&&!G.isRegex)return null}return new P(J.getModel(),te.searchText,te.matchCase,te.wholeWord?J.getOption(129):null,F)}_setState(F){if(this.state=F,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const j=this.editor.getModel();if(j.isTooLargeForTokenization())return;const J=this.state.findMatches(),le=this.editor.getSelections();le.sort(S.Range.compareRangesUsingStarts);const ee=[];for(let de=0,ue=0,X=J.length,Z=le.length;de=Z)ee.push(re),de++;else{const oe=S.Range.compareRangesUsingStarts(re,le[ue]);oe<0?((le[ue].isEmpty()||!S.Range.areIntersecting(re,le[ue]))&&ee.push(re),de++):(oe>0||de++,ue++)}}const $=this.editor.getOption(80)!=="off",te=this._languageFeaturesService.documentHighlightProvider.has(j)&&$,G=ee.map(de=>({range:de,options:(0,u.getSelectionHighlightDecorationOptions)(te)}));this._decorations.set(G)}dispose(){this._setState(null),super.dispose()}};e.SelectionHighlighter=x,x.ID="editor.contrib.selectionHighlighter",e.SelectionHighlighter=x=c=Ee([he(1,a.ILanguageFeaturesService)],x);function R(U,F,j){const J=B(U,F[0],!j);for(let le=1,ee=F.length;le()=>Promise.resolve(j.provideDocumentHighlights(W,V,U)).then(void 0,p.onUnexpectedExternalError)),k.isNonEmptyArray).then(j=>{if(j){const J=new d.ResourceMap;return J.set(W.uri,j),J}return new d.ResourceMap})}e.getOccurrencesAtPosition=h;function m(B,W,V,U,F,j){const J=B.ordered(W);return(0,E.first)(J.map(le=>()=>{const ee=j.filter($=>(0,r.score)(le.selector,$.uri,$.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(le.provideMultiDocumentHighlights(W,V,ee,F)).then(void 0,p.onUnexpectedExternalError)}),le=>le instanceof d.ResourceMap&&le.size>0)}e.getOccurrencesAcrossMultipleModels=m;class C{constructor(W,V,U){this._model=W,this._selection=V,this._wordSeparators=U,this._wordRange=this._getCurrentWordRange(W,V),this._result=null}get result(){return this._result||(this._result=(0,E.createCancelablePromise)(W=>this._compute(this._model,this._selection,this._wordSeparators,W))),this._result}_getCurrentWordRange(W,V){const U=W.getWordAtPosition(V.getPosition());return U?new i.Range(V.startLineNumber,U.startColumn,V.startLineNumber,U.endColumn):null}isValid(W,V,U){const F=V.startLineNumber,j=V.startColumn,J=V.endColumn,le=this._getCurrentWordRange(W,V);let ee=!!(this._wordRange&&this._wordRange.equalsRange(le));for(let $=0,te=U.length;!ee&&$=J&&(ee=!0)}return ee}cancel(){this.result.cancel()}}class w extends C{constructor(W,V,U,F){super(W,V,U),this._providers=F}_compute(W,V,U,F){return h(this._providers,W,V.getPosition(),F).then(j=>j||new d.ResourceMap)}}class D extends C{constructor(W,V,U,F,j){super(W,V,U),this._providers=F,this._otherModels=j}_compute(W,V,U,F){return m(this._providers,W,V.getPosition(),U,F,this._otherModels).then(j=>j||new d.ResourceMap)}}class I extends C{constructor(W,V,U,F,j){super(W,V,F),this._otherModels=j,this._selectionIsEmpty=V.isEmpty(),this._word=U}_compute(W,V,U,F){return(0,E.timeout)(250,F).then(()=>{const j=new d.ResourceMap;let J;if(this._word?J=this._word:J=W.getWordAtPosition(V.getPosition()),!J)return new d.ResourceMap;const le=[W,...this._otherModels];for(const ee of le){if(ee.isDisposed())continue;const te=ee.findMatches(J.word,!0,!1,!0,U,!1).map(G=>({range:G.range,kind:t.DocumentHighlightKind.Text}));te&&j.set(ee.uri,te)}return j})}isValid(W,V,U){const F=V.isEmpty();return this._selectionIsEmpty!==F?!1:super.isValid(W,V,U)}}function M(B,W,V,U,F){return B.has(W)?new w(W,V,F,B):new I(W,V,U,F,[])}function A(B,W,V,U,F,j){return B.has(W)?new D(W,V,F,B,j):new I(W,V,U,F,j)}(0,b.registerModelAndPositionCommand)("_executeDocumentHighlights",async(B,W,V)=>{const U=B.get(a.ILanguageFeaturesService),F=await h(U.documentHighlightProvider,W,V,_.CancellationToken.None);return F?.get(W.uri)});let O=l=class{constructor(W,V,U,F,j){this.toUnhook=new S.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new d.ResourceMap,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=W,this.providers=V,this.multiDocumentProviders=U,this.codeEditorService=j,this._hasWordHighlights=g.bindTo(F),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(W.onDidChangeCursorPosition(J=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(J)})),this.toUnhook.add(W.onDidChangeModelContent(J=>{this._stopAll()})),this.toUnhook.add(W.onDidChangeModel(J=>{!J.newModelUrl&&J.oldModelUrl?this._stopSingular():l.query&&this._run()})),this.toUnhook.add(W.onDidChangeConfiguration(J=>{const le=this.editor.getOption(80);this.occurrencesHighlight!==le&&(this.occurrencesHighlight=le,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,l.query&&this._run()}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight!=="off"&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(i.Range.compareRangesUsingStarts)}moveNext(){const W=this._getSortedHighlights(),U=(W.findIndex(j=>j.containsPosition(this.editor.getPosition()))+1)%W.length,F=W[U];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(F.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(F);const j=this._getWord();if(j){const J=this.editor.getModel().getLineContent(F.startLineNumber);(0,y.alert)(`${J}, ${U+1} of ${W.length} for '${j.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const W=this._getSortedHighlights(),U=(W.findIndex(j=>j.containsPosition(this.editor.getPosition()))-1+W.length)%W.length,F=W[U];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(F.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(F);const j=this._getWord();if(j){const J=this.editor.getModel().getLineContent(F.startLineNumber);(0,y.alert)(`${J}, ${U+1} of ${W.length} for '${j.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const W=l.storedDecorations.get(this.editor.getModel().uri);W&&(this.editor.removeDecorations(W),l.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const W=this.codeEditorService.listCodeEditors();for(const V of W){if(!V.hasModel())continue;const U=l.storedDecorations.get(V.getModel().uri);if(!U)continue;V.removeDecorations(U),l.storedDecorations.delete(V.getModel().uri);const F=T.get(V);F?.wordHighlighter&&F.wordHighlighter.decorations.length>0&&(F.wordHighlighter.decorations.clear(),F.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var W,V,U,F;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((W=this.editor.getModel())===null||W===void 0?void 0:W.uri.scheme)!==c.Schemas.vscodeNotebookCell&&((U=(V=l.query)===null||V===void 0?void 0:V.modelInfo)===null||U===void 0?void 0:U.model.uri.scheme)!==c.Schemas.vscodeNotebookCell?(l.query=null,this._run()):!((F=l.query)===null||F===void 0)&&F.modelInfo&&(l.query.modelInfo=null)),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)}_stopAll(){this._removeAllDecorations(),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(W){var V;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(W.reason!==3&&((V=this.editor.getModel())===null||V===void 0?void 0:V.uri.scheme)!==c.Schemas.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const W=this.editor.getSelection(),V=W.startLineNumber,U=W.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:V,column:U})}getOtherModelsToHighlight(W){if(!W)return[];if(W.uri.scheme===c.Schemas.vscodeNotebookCell){const j=[],J=this.codeEditorService.listCodeEditors();for(const le of J){const ee=le.getModel();ee&&ee!==W&&ee.uri.scheme===c.Schemas.vscodeNotebookCell&&j.push(ee)}return j}const U=[],F=this.codeEditorService.listCodeEditors();for(const j of F){if(!(0,v.isDiffEditor)(j))continue;const J=j.getModel();J&&W===J.modified&&U.push(J.modified)}if(U.length)return U;if(this.occurrencesHighlight==="singleFile")return[];for(const j of F){const J=j.getModel();J&&J!==W&&U.push(J)}return U}_run(){var W,V;let U;if(this.editor.hasWidgetFocus()){const F=this.editor.getSelection();if(!F||F.startLineNumber!==F.endLineNumber){this._stopAll();return}const j=F.startColumn,J=F.endColumn,le=this._getWord();if(!le||le.startColumn>j||le.endColumn{F===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=le||[],this._beginRenderDecorations())},p.onUnexpectedError)}}computeWithModel(W,V,U,F){return F.length?A(this.multiDocumentProviders,W,V,U,this.editor.getOption(129),F):M(this.providers,W,V,U,this.editor.getOption(129))}_beginRenderDecorations(){const W=new Date().getTime(),V=this.lastCursorPositionChangeTime+250;W>=V?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},V-W)}renderDecorations(){var W,V,U;this.renderDecorationsTimer=-1;const F=this.codeEditorService.listCodeEditors();for(const j of F){const J=T.get(j);if(!J)continue;const le=[],ee=(W=j.getModel())===null||W===void 0?void 0:W.uri;if(ee&&this.workerRequestValue.has(ee)){const $=l.storedDecorations.get(ee),te=this.workerRequestValue.get(ee);if(te)for(const de of te)le.push({range:de.range,options:(0,u.getHighlightDecorationOptions)(de.kind)});let G=[];j.changeDecorations(de=>{G=de.deltaDecorations($??[],le)}),l.storedDecorations=l.storedDecorations.set(ee,G),le.length>0&&((V=J.wordHighlighter)===null||V===void 0||V.decorations.set(le),(U=J.wordHighlighter)===null||U===void 0||U._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};O.storedDecorations=new d.ResourceMap,O.query=null,O=l=Ee([he(4,o.ICodeEditorService)],O);let T=s=class extends S.Disposable{static get(W){return W.getContribution(s.ID)}constructor(W,V,U,F){super(),this._wordHighlighter=null;const j=()=>{W.hasModel()&&!W.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new O(W,U.documentHighlightProvider,U.multiDocumentHighlightProvider,V,F))};this._register(W.onDidChangeModel(J=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),j()})),j()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var W;(W=this._wordHighlighter)===null||W===void 0||W.moveNext()}moveBack(){var W;(W=this._wordHighlighter)===null||W===void 0||W.moveBack()}restoreViewState(W){this._wordHighlighter&&W&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};e.WordHighlighterContribution=T,T.ID="editor.contrib.wordHighlighter",e.WordHighlighterContribution=T=s=Ee([he(1,f.IContextKeyService),he(2,a.ILanguageFeaturesService),he(3,o.ICodeEditorService)],T);class N extends b.EditorAction{constructor(W,V){super(V),this._isNext=W}run(W,V){const U=T.get(V);U&&(this._isNext?U.moveNext():U.moveBack())}}class P extends N{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:L.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:g,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class x extends N{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:L.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:g,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class R extends b.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:L.localize(2,null),alias:"Trigger Symbol Highlight",precondition:g.toNegated(),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(W,V,U){const F=T.get(V);F&&F.restoreViewState(!0)}}(0,b.registerEditorContribution)(T.ID,T,0),(0,b.registerEditorAction)(P),(0,b.registerEditorAction)(x),(0,b.registerEditorAction)(R)}),define(ie[909],ne([1,0,7,157,38,168,2,55,5,39,477]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=void 0;const b=new y.Color(new y.RGBA(0,122,204)),o={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1},i="vs.editor.contrib.zoneWidget";class n{constructor(c,d,r,l,s,g,h,m){this.id="",this.domNode=c,this.afterLineNumber=d,this.afterColumn=r,this.heightInLines=l,this.showInHiddenAreas=h,this.ordinal=m,this._onDomNodeTop=s,this._onComputedHeight=g}onDomNodeTop(c){this._onDomNodeTop(c)}onComputedHeight(c){this._onComputedHeight(c)}}class t{constructor(c,d){this._id=c,this._domNode=d}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=t;class a{constructor(c){this._editor=c,this._ruleName=a._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),L.removeCSSRulesContainingSelector(this._ruleName)}set color(c){this._color!==c&&(this._color=c,this._updateStyle())}set height(c){this._height!==c&&(this._height=c,this._updateStyle())}_updateStyle(){L.removeCSSRulesContainingSelector(this._ruleName),L.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(c){c.column===1&&(c={lineNumber:c.lineNumber,column:2}),this._decorations.set([{range:S.Range.fromPositions(c),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}a._IdGenerator=new E.IdGenerator(".arrow-decoration-");class u{constructor(c,d={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new _.DisposableStore,this.container=null,this._isShowing=!1,this.editor=c,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=p.deepClone(d),p.mixin(this.options,o,!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(r=>{const l=this._getWidth(r);this.domNode.style.width=l+"px",this.domNode.style.left=this._getLeft(r)+"px",this._onWidth(l)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(c=>{this._viewZone&&c.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 a(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(c){c.frameColor&&(this.options.frameColor=c.frameColor),c.arrowColor&&(this.options.arrowColor=c.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const c=this.options.frameColor.toString();this.container.style.borderTopColor=c,this.container.style.borderBottomColor=c}if(this._arrow&&this.options.arrowColor){const c=this.options.arrowColor.toString();this._arrow.color=c}}_getWidth(c){return c.width-c.minimap.minimapWidth-c.verticalScrollbarWidth}_getLeft(c){return c.minimap.minimapWidth>0&&c.minimap.minimapLeft===0?c.minimap.minimapWidth:0}_onViewZoneTop(c){this.domNode.style.top=c+"px"}_onViewZoneHeight(c){var d;if(this.domNode.style.height=`${c}px`,this.container){const r=c-this._decoratingElementsHeight();this.container.style.height=`${r}px`;const l=this.editor.getLayoutInfo();this._doLayout(r,this._getWidth(l))}(d=this._resizeSash)===null||d===void 0||d.layout()}get position(){const c=this._positionMarkerId.getRange(0);if(c)return c.getStartPosition()}show(c,d){const r=S.Range.isIRange(c)?S.Range.lift(c):S.Range.fromPositions(c);this._isShowing=!0,this._showImpl(r,d),this._isShowing=!1,this._positionMarkerId.set([{range:r,options:v.ModelDecorationOptions.EMPTY}])}hide(){var c;this._viewZone&&(this.editor.changeViewZones(d=>{this._viewZone&&d.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(c=this._arrow)===null||c===void 0||c.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const c=this.editor.getOption(66);let d=0;if(this.options.showArrow){const r=Math.round(c/3);d+=2*r}if(this.options.showFrame){const r=Math.round(c/9);d+=2*r}return d}_showImpl(c,d){const r=c.getStartPosition(),l=this.editor.getLayoutInfo(),s=this._getWidth(l);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(l)+"px";const g=document.createElement("div");g.style.overflow="hidden";const h=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const I=Math.max(12,this.editor.getLayoutInfo().height/h*.8);d=Math.min(d,I)}let m=0,C=0;if(this._arrow&&this.options.showArrow&&(m=Math.round(h/3),this._arrow.height=m,this._arrow.show(r)),this.options.showFrame&&(C=Math.round(h/9)),this.editor.changeViewZones(I=>{this._viewZone&&I.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new n(g,r.lineNumber,r.column,d,M=>this._onViewZoneTop(M),M=>this._onViewZoneHeight(M),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=I.addZone(this._viewZone),this._overlayWidget=new t(i+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const I=this.options.frameWidth?this.options.frameWidth:C;this.container.style.borderTopWidth=I+"px",this.container.style.borderBottomWidth=I+"px"}const w=d*h-this._decoratingElementsHeight();this.container&&(this.container.style.top=m+"px",this.container.style.height=w+"px",this.container.style.overflow="hidden"),this._doLayout(w,s),this.options.keepEditorSelection||this.editor.setSelection(c);const D=this.editor.getModel();if(D){const I=D.validateRange(new S.Range(c.startLineNumber,1,c.endLineNumber+1,1));this.revealRange(I,I.startLineNumber===D.getLineCount())}}revealRange(c,d){d?this.editor.revealLineNearTop(c.endLineNumber,0):this.editor.revealRange(c,0)}setCssClass(c,d){this.container&&(d&&this.container.classList.remove(d),this.container.classList.add(c))}_onWidth(c){}_doLayout(c,d){}_relayout(c){this._viewZone&&this._viewZone.heightInLines!==c&&this.editor.changeViewZones(d=>{this._viewZone&&(this._viewZone.heightInLines=c,d.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new k.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let c;this._disposables.add(this._resizeSash.onDidStart(d=>{this._viewZone&&(c={startY:d.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{c=void 0})),this._disposables.add(this._resizeSash.onDidChange(d=>{if(c){const r=(d.currentY-c.startY)/this.editor.getOption(66),l=r<0?Math.ceil(r):Math.floor(r),s=c.heightInLines+l;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const c=this.editor.getLayoutInfo();return c.width-c.minimap.minimapWidth}}e.ZoneWidget=u}),define(ie[140],ne([1,0,7,77,41,26,27,38,6,55,16,33,166,909,699,139,15,46,8,30,468]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorStickyScrollBackground=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,c.createDecorator)("IPeekViewService"),(0,f.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(m,C){const w=this._widgets.get(m);w&&(w.listener.dispose(),w.widget.dispose());const D=()=>{const I=this._widgets.get(m);I&&I.widget===C&&(I.listener.dispose(),this._widgets.delete(m))};this._widgets.set(m,{widget:C,listener:C.onDidClose(D)})}},1);var r;(function(m){m.inPeekEditor=new u.RawContextKey("inReferenceSearchEditor",!0,t.localize(0,null)),m.notInPeekEditor=m.inPeekEditor.toNegated()})(r||(e.PeekContext=r={}));let l=class{constructor(C,w){C instanceof i.EmbeddedCodeEditorWidget&&r.inPeekEditor.bindTo(w)}dispose(){}};l.ID="editor.contrib.referenceController",l=Ee([he(1,u.IContextKeyService)],l),(0,b.registerEditorContribution)(l.ID,l,0);function s(m){const C=m.get(o.ICodeEditorService).getFocusedCodeEditor();return C instanceof i.EmbeddedCodeEditorWidget?C.getParentEditor():C}e.getOuterEditor=s;const g={headerBackgroundColor:p.Color.white,primaryHeadingColor:p.Color.fromHex("#333333"),secondaryHeadingColor:p.Color.fromHex("#6c6c6cb3")};let h=class extends n.ZoneWidget{constructor(C,w,D){super(C,w),this.instantiationService=D,this._onDidClose=new S.Emitter,this.onDidClose=this._onDidClose.event,v.mixin(this.options,g,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(C){const w=this.options;C.headerBackgroundColor&&(w.headerBackgroundColor=C.headerBackgroundColor),C.primaryHeadingColor&&(w.primaryHeadingColor=C.primaryHeadingColor),C.secondaryHeadingColor&&(w.secondaryHeadingColor=C.secondaryHeadingColor),super.style(C)}_applyStyles(){super._applyStyles();const C=this.options;this._headElement&&C.headerBackgroundColor&&(this._headElement.style.backgroundColor=C.headerBackgroundColor.toString()),this._primaryHeading&&C.primaryHeadingColor&&(this._primaryHeading.style.color=C.primaryHeadingColor.toString()),this._secondaryHeading&&C.secondaryHeadingColor&&(this._secondaryHeading.style.color=C.secondaryHeadingColor.toString()),this._bodyElement&&C.frameColor&&(this._bodyElement.style.borderColor=C.frameColor.toString())}_fillContainer(C){this.setCssClass("peekview-widget"),this._headElement=L.$(".head"),this._bodyElement=L.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),C.appendChild(this._headElement),C.appendChild(this._bodyElement)}_fillHead(C,w){this._titleElement=L.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),L.addStandardDisposableListener(this._titleElement,"click",M=>this._onTitleClick(M))),L.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=L.$("span.filename"),this._secondaryHeading=L.$("span.dirname"),this._metaHeading=L.$("span.meta"),L.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const D=L.$(".peekview-actions");L.append(this._headElement,D);const I=this._getActionBarOptions();this._actionbarWidget=new k.ActionBar(D,I),this._disposables.add(this._actionbarWidget),w||this._actionbarWidget.push(new y.Action("peekview.close",t.localize(1,null),_.ThemeIcon.asClassName(E.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(C){}_getActionBarOptions(){return{actionViewItemProvider:a.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(C){}setTitle(C,w){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=C,this._primaryHeading.setAttribute("title",C),w?this._secondaryHeading.innerText=w:L.clearNode(this._secondaryHeading))}setMetaTitle(C){this._metaHeading&&(C?(this._metaHeading.innerText=C,L.show(this._metaHeading)):L.hide(this._metaHeading))}_doLayout(C,w){if(!this._isShowing&&C<0){this.dispose();return}const D=Math.ceil(this.editor.getOption(66)*1.2),I=Math.round(C-(D+2));this._doLayoutHead(D,w),this._doLayoutBody(I,w)}_doLayoutHead(C,w){this._headElement&&(this._headElement.style.height=`${C}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(C,w){this._bodyElement&&(this._bodyElement.style.height=`${C}px`)}};e.PeekViewWidget=h,e.PeekViewWidget=h=Ee([he(2,c.IInstantiationService)],h),e.peekViewTitleBackground=(0,d.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:p.Color.black,hcLight:p.Color.white},t.localize(2,null)),e.peekViewTitleForeground=(0,d.registerColor)("peekViewTitleLabel.foreground",{dark:p.Color.white,light:p.Color.black,hcDark:p.Color.white,hcLight:d.editorForeground},t.localize(3,null)),e.peekViewTitleInfoForeground=(0,d.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},t.localize(4,null)),e.peekViewBorder=(0,d.registerColor)("peekView.border",{dark:d.editorInfoForeground,light:d.editorInfoForeground,hcDark:d.contrastBorder,hcLight:d.contrastBorder},t.localize(5,null)),e.peekViewResultsBackground=(0,d.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:p.Color.black,hcLight:p.Color.white},t.localize(6,null)),e.peekViewResultsMatchForeground=(0,d.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:p.Color.white,hcLight:d.editorForeground},t.localize(7,null)),e.peekViewResultsFileForeground=(0,d.registerColor)("peekViewResult.fileForeground",{dark:p.Color.white,light:"#1E1E1E",hcDark:p.Color.white,hcLight:d.editorForeground},t.localize(8,null)),e.peekViewResultsSelectionBackground=(0,d.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},t.localize(9,null)),e.peekViewResultsSelectionForeground=(0,d.registerColor)("peekViewResult.selectionForeground",{dark:p.Color.white,light:"#6C6C6C",hcDark:p.Color.white,hcLight:d.editorForeground},t.localize(10,null)),e.peekViewEditorBackground=(0,d.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:p.Color.black,hcLight:p.Color.white},t.localize(11,null)),e.peekViewEditorGutterBackground=(0,d.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},t.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,d.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},t.localize(13,null)),e.peekViewResultsMatchHighlight=(0,d.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},t.localize(14,null)),e.peekViewEditorMatchHighlight=(0,d.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},t.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,d.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:d.activeContrastBorder,hcLight:d.activeContrastBorder},t.localize(16,null))}),define(ie[910],ne([1,0,7,76,13,38,6,2,45,12,5,140,672,139,29,15,8,164,96,57,797,30,23,455]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class h{constructor(R,B,W,V,U){this._openerService=V,this._labelService=U,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new p.DisposableStore,this._editor=B;const F=document.createElement("div");F.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),F.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),F.appendChild(this._relatedBlock),this._disposables.add(L.addStandardDisposableListener(this._relatedBlock,"click",j=>{j.preventDefault();const J=this._relatedDiagnostics.get(j.target);J&&W(J)})),this._scrollable=new k.ScrollableElement(F,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),R.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(j=>{F.style.left=`-${j.scrollLeft}px`,F.style.top=`-${j.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,p.dispose)(this._disposables)}update(R){const{source:B,message:W,relatedInformation:V,code:U}=R;let F=(B?.length||0)+2;U&&(typeof U=="string"?F+=U.length:F+=U.value.length);const j=(0,v.splitLines)(W);this._lines=j.length,this._longestLineLength=0;for(const te of j)this._longestLineLength=Math.max(te.length+F,this._longestLineLength);L.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(R)),this._editor.applyFontInfo(this._messageBlock);let J=this._messageBlock;for(const te of j)J=document.createElement("div"),J.innerText=te,te===""&&(J.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(J);if(B||U){const te=document.createElement("span");if(te.classList.add("details"),J.appendChild(te),B){const G=document.createElement("span");G.innerText=B,G.classList.add("source"),te.appendChild(G)}if(U)if(typeof U=="string"){const G=document.createElement("span");G.innerText=`(${U})`,G.classList.add("code"),te.appendChild(G)}else{this._codeLink=L.$("a.code-link"),this._codeLink.setAttribute("href",`${U.target.toString()}`),this._codeLink.onclick=de=>{this._openerService.open(U.target,{allowCommands:!0}),de.preventDefault(),de.stopPropagation()};const G=L.append(this._codeLink,L.$("span"));G.innerText=U.value,te.appendChild(this._codeLink)}}if(L.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,y.isNonEmptyArray)(V)){const te=this._relatedBlock.appendChild(document.createElement("div"));te.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const G of V){const de=document.createElement("div"),ue=document.createElement("a");ue.classList.add("filename"),ue.innerText=`${this._labelService.getUriBasenameLabel(G.resource)}(${G.startLineNumber}, ${G.startColumn}): `,ue.title=this._labelService.getUriLabel(G.resource),this._relatedDiagnostics.set(ue,G);const X=document.createElement("span");X.innerText=G.message,de.appendChild(ue),de.appendChild(X),this._lines+=1,te.appendChild(de)}}const le=this._editor.getOption(50),ee=Math.ceil(le.typicalFullwidthCharacterWidth*this._longestLineLength*.75),$=le.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:ee,scrollHeight:$})}layout(R,B){this._scrollable.getDomNode().style.height=`${R}px`,this._scrollable.getDomNode().style.width=`${B}px`,this._scrollable.setScrollDimensions({width:B,height:R})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(R){let B="";switch(R.severity){case c.MarkerSeverity.Error:B=i.localize(0,null);break;case c.MarkerSeverity.Warning:B=i.localize(1,null);break;case c.MarkerSeverity.Info:B=i.localize(2,null);break;case c.MarkerSeverity.Hint:B=i.localize(3,null);break}let W=i.localize(4,null,B,R.startLineNumber+":"+R.startColumn);const V=this._editor.getModel();return V&&R.startLineNumber<=V.getLineCount()&&R.startLineNumber>=1&&(W=`${V.getLineContent(R.startLineNumber)}, ${W}`),W}}let m=g=class extends o.PeekViewWidget{constructor(R,B,W,V,U,F,j){super(R,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},U),this._themeService=B,this._openerService=W,this._menuService=V,this._contextKeyService=F,this._labelService=j,this._callOnDispose=new p.DisposableStore,this._onDidSelectRelatedInformation=new _.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=c.MarkerSeverity.Warning,this._backgroundColor=E.Color.white,this._applyTheme(B.getColorTheme()),this._callOnDispose.add(B.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(R){this._backgroundColor=R.getColor(P);let B=I,W=M;this._severity===c.MarkerSeverity.Warning?(B=A,W=O):this._severity===c.MarkerSeverity.Info&&(B=T,W=N);const V=R.getColor(B),U=R.getColor(W);this.style({arrowColor:V,frameColor:V,headerBackgroundColor:U,primaryHeadingColor:R.getColor(o.peekViewTitleForeground),secondaryHeadingColor:R.getColor(o.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(R){super._fillHead(R),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(V=>this.editor.focus()));const B=[],W=this._menuService.createMenu(g.TitleMenu,this._contextKeyService);(0,n.createAndFillInActionBarActions)(W,void 0,B),this._actionbarWidget.push(B,{label:!1,icon:!0,index:0}),W.dispose()}_fillTitleIcon(R){this._icon=L.append(R,L.$(""))}_fillBody(R){this._parentContainer=R,R.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),R.appendChild(this._container),this._message=new h(this._container,this.editor,B=>this._onDidSelectRelatedInformation.fire(B),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(R,B,W){this._container.classList.remove("stale"),this._message.update(R),this._severity=R.severity,this._applyTheme(this._themeService.getColorTheme());const V=b.Range.lift(R),U=this.editor.getPosition(),F=U&&V.containsPosition(U)?U:V.getStartPosition();super.show(F,this.computeRequiredHeight());const j=this.editor.getModel();if(j){const J=W>1?i.localize(5,null,B,W):i.localize(6,null,B,W);this.setTitle((0,S.basename)(j.uri),J)}this._icon.className=`codicon ${r.SeverityIcon.className(c.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(F,0),this.editor.focus()}updateMarker(R){this._container.classList.remove("stale"),this._message.update(R)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(R,B){super._doLayoutBody(R,B),this._heightInPixel=R,this._message.layout(R,B),this._container.style.height=`${R}px`}_onWidth(R){this._message.layout(this._heightInPixel,R)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};e.MarkerNavigationWidget=m,m.TitleMenu=new t.MenuId("gotoErrorTitleMenu"),e.MarkerNavigationWidget=m=g=Ee([he(1,s.IThemeService),he(2,d.IOpenerService),he(3,t.IMenuService),he(4,u.IInstantiationService),he(5,a.IContextKeyService),he(6,f.ILabelService)],m);const C=(0,l.oneOf)(l.editorErrorForeground,l.editorErrorBorder),w=(0,l.oneOf)(l.editorWarningForeground,l.editorWarningBorder),D=(0,l.oneOf)(l.editorInfoForeground,l.editorInfoBorder),I=(0,l.registerColor)("editorMarkerNavigationError.background",{dark:C,light:C,hcDark:l.contrastBorder,hcLight:l.contrastBorder},i.localize(7,null)),M=(0,l.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,l.transparent)(I,.1),light:(0,l.transparent)(I,.1),hcDark:null,hcLight:null},i.localize(8,null)),A=(0,l.registerColor)("editorMarkerNavigationWarning.background",{dark:w,light:w,hcDark:l.contrastBorder,hcLight:l.contrastBorder},i.localize(9,null)),O=(0,l.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,l.transparent)(A,.1),light:(0,l.transparent)(A,.1),hcDark:"#0C141F",hcLight:(0,l.transparent)(A,.2)},i.localize(10,null)),T=(0,l.registerColor)("editorMarkerNavigationInfo.background",{dark:D,light:D,hcDark:l.contrastBorder,hcLight:l.contrastBorder},i.localize(11,null)),N=(0,l.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,l.transparent)(T,.1),light:(0,l.transparent)(T,.1),hcDark:null,hcLight:null},i.localize(12,null)),P=(0,l.registerColor)("editorMarkerNavigation.background",{dark:l.editorBackground,light:l.editorBackground,hcDark:l.editorBackground,hcLight:l.editorBackground},i.localize(13,null))}),define(ie[378],ne([1,0,26,2,16,33,11,5,21,776,671,29,15,8,81,910]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let f=u=class{static get(C){return C.getContribution(u.ID)}constructor(C,w,D,I,M){this._markerNavigationService=w,this._contextKeyService=D,this._editorService=I,this._instantiationService=M,this._sessionDispoables=new k.DisposableStore,this._editor=C,this._widgetVisible=g.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(C){if(this._model&&this._model.matches(C))return this._model;let w=!1;return this._model&&(w=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(C),w&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(a.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(D=>{var I,M,A;(!(!((I=this._model)===null||I===void 0)&&I.selected)||!p.Range.containsPosition((M=this._model)===null||M===void 0?void 0:M.selected.marker,D.position))&&((A=this._model)===null||A===void 0||A.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const D=this._model.find(this._editor.getModel().uri,this._widget.position);D?this._widget.updateMarker(D.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(D=>{this._editorService.openCodeEditor({resource:D.resource,options:{pinned:!0,revealIfOpened:!0,selection:p.Range.lift(D).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(C=!0){this._cleanUp(),C&&this._editor.focus()}showAtMarker(C){if(this._editor.hasModel()){const w=this._getOrCreateModel(this._editor.getModel().uri);w.resetIndex(),w.move(!0,this._editor.getModel(),new _.Position(C.startLineNumber,C.startColumn)),w.selected&&this._widget.showAtMarker(w.selected.marker,w.selected.index,w.selected.total)}}async nagivate(C,w){var D,I;if(this._editor.hasModel()){const M=this._getOrCreateModel(w?void 0:this._editor.getModel().uri);if(M.move(C,this._editor.getModel(),this._editor.getPosition()),!M.selected)return;if(M.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const A=await this._editorService.openCodeEditor({resource:M.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:M.selected.marker}},this._editor);A&&((D=u.get(A))===null||D===void 0||D.close(),(I=u.get(A))===null||I===void 0||I.nagivate(C,w))}else this._widget.showAtMarker(M.selected.marker,M.selected.index,M.selected.total)}}};e.MarkerController=f,f.ID="editor.contrib.markerController",e.MarkerController=f=u=Ee([he(1,v.IMarkerNavigationService),he(2,i.IContextKeyService),he(3,E.ICodeEditorService),he(4,n.IInstantiationService)],f);class c extends y.EditorAction{constructor(C,w,D){super(D),this._next=C,this._multiFile=w}async run(C,w){var D;w.hasModel()&&((D=f.get(w))===null||D===void 0||D.nagivate(this._next,this._multiFile))}}class d extends c{constructor(){super(!0,!1,{id:d.ID,label:d.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:a.MarkerNavigationWidget.TitleMenu,title:d.LABEL,icon:(0,t.registerIcon)("marker-navigation-next",L.Codicon.arrowDown,b.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=d,d.ID="editor.action.marker.next",d.LABEL=b.localize(0,null);class r extends c{constructor(){super(!1,!1,{id:r.ID,label:r.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:a.MarkerNavigationWidget.TitleMenu,title:r.LABEL,icon:(0,t.registerIcon)("marker-navigation-previous",L.Codicon.arrowUp,b.localize(3,null)),group:"navigation",order:2}})}}r.ID="editor.action.marker.prev",r.LABEL=b.localize(2,null);class l extends c{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:b.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:o.MenuId.MenubarGoMenu,title:b.localize(5,null),group:"6_problem_nav",order:1}})}}class s extends c{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:b.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:o.MenuId.MenubarGoMenu,title:b.localize(7,null),group:"6_problem_nav",order:2}})}}(0,y.registerEditorContribution)(f.ID,f,4),(0,y.registerEditorAction)(d),(0,y.registerEditorAction)(r),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(s);const g=new i.RawContextKey("markersNavigationVisible",!1),h=y.EditorCommand.bindToContribution(f.get);(0,y.registerEditorCommand)(new h({id:"closeMarkersNavigation",precondition:g,handler:m=>m.close(),kbOpts:{weight:100+50,kbExpr:S.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(ie[911],ne([1,0,7,319,38,6,2,44,45,166,5,39,32,79,42,68,834,140,677,8,34,164,192,23,193,160,457]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class C{constructor(A,O){this._editor=A,this._model=O,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new _.DisposableStore,this._callOnModelChange=new _.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 A=this._editor.getModel();if(A){for(const O of this._model.references)if(O.uri.toString()===A.uri.toString()){this._addDecorations(O.parent);return}}}_addDecorations(A){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const O=[],T=[];for(let N=0,P=A.children.length;N{const P=N.deltaDecorations([],O);for(let x=0;x{P.equals(9)&&(this._keybindingService.dispatchEvent(P,P.target),P.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(D,"ReferencesWidget",this._treeContainer,new u.Delegate,[this._instantiationService.createInstance(u.FileReferencesRenderer),this._instantiationService.createInstance(u.OneReferenceRenderer)],this._instantiationService.createInstance(u.DataSource),T),this._splitView.addView({onDidChange:E.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:P=>{this._preview.layout({height:this._dim.height,width:P})}},k.Sizing.Distribute),this._splitView.addView({onDidChange:E.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:P=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${P}px`,this._tree.layout(this._dim.height,P)}},k.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const N=(P,x)=>{P instanceof m.OneReference&&(x==="show"&&this._revealReference(P,!1),this._onDidSelectReference.fire({element:P,kind:x,source:"tree"}))};this._tree.onDidOpen(P=>{P.sideBySide?N(P.element,"side"):P.editorOptions.pinned?N(P.element,"goto"):N(P.element,"show")}),L.hide(this._treeContainer)}_onWidth(A){this._dim&&this._doLayoutBody(this._dim.height,A)}_doLayoutBody(A,O){super._doLayoutBody(A,O),this._dim=new L.Dimension(O,A),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(O),this._splitView.resizeView(0,O*this.layoutData.ratio)}setSelection(A){return this._revealReference(A,!0).then(()=>{this._model&&(this._tree.setSelection([A]),this._tree.setFocus([A]))})}setModel(A){return this._disposeOnNewModel.clear(),this._model=A,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=c.localize(1,null),L.show(this._messageContainer),Promise.resolve(void 0)):(L.hide(this._messageContainer),this._decorationsManager=new C(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(A=>this._tree.rerender(A))),this._disposeOnNewModel.add(this._preview.onMouseDown(A=>{const{event:O,target:T}=A;if(O.detail!==2)return;const N=this._getFocusedReference();N&&this._onDidSelectReference.fire({element:{uri:N.uri,range:T.range},kind:O.ctrlKey||O.metaKey||O.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),L.show(this._treeContainer),L.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[A]=this._tree.getFocus();if(A instanceof m.OneReference)return A;if(A instanceof m.FileReferences&&A.children.length>0)return A.children[0]}async revealReference(A){await this._revealReference(A,!1),this._onDidSelectReference.fire({element:A,kind:"goto",source:"tree"})}async _revealReference(A,O){if(this._revealedReference===A)return;this._revealedReference=A,A.uri.scheme!==p.Schemas.inMemory?this.setTitle((0,S.basenameOrAuthority)(A.uri),this._uriLabel.getUriLabel((0,S.dirname)(A.uri))):this.setTitle(c.localize(2,null));const T=this._textModelResolverService.createModelReference(A.uri);this._tree.getInput()===A.parent?this._tree.reveal(A):(O&&this._tree.reveal(A.parent),await this._tree.expand(A.parent),this._tree.reveal(A));const N=await T;if(!this._model){N.dispose();return}(0,_.dispose)(this._previewModelReference);const P=N.object;if(P){const x=this._preview.getModel()===P.textEditorModel?0:1,R=b.Range.lift(A.range).collapseToStart();this._previewModelReference=N,this._preview.setModel(P.textEditorModel),this._preview.setSelection(R),this._preview.revealRangeInCenter(R,x)}else this._preview.setModel(this._previewNotAvailableMessage),N.dispose()}};e.ReferenceWidget=I,e.ReferenceWidget=I=Ee([he(3,g.IThemeService),he(4,a.ITextModelService),he(5,d.IInstantiationService),he(6,f.IPeekViewService),he(7,l.ILabelService),he(8,h.IUndoRedoService),he(9,r.IKeybindingService),he(10,t.ILanguageService),he(11,i.ILanguageConfigurationService)],I)}),define(ie[379],ne([1,0,14,9,65,2,33,11,5,140,675,25,28,15,8,120,192,47,91,160,911]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new n.RawContextKey("referenceSearchVisible",!1,b.localize(0,null));let s=l=class{static get(m){return m.getContribution(l.ID)}constructor(m,C,w,D,I,M,A,O){this._defaultTreeKeyboardSupport=m,this._editor=C,this._editorService=D,this._notificationService=I,this._instantiationService=M,this._storageService=A,this._configurationService=O,this._disposables=new E.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(w)}dispose(){var m,C;this._referenceSearchVisible.reset(),this._disposables.dispose(),(m=this._widget)===null||m===void 0||m.dispose(),(C=this._model)===null||C===void 0||C.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(m,C,w){let D;if(this._widget&&(D=this._widget.position),this.closeWidget(),D&&m.containsPosition(D))return;this._peekMode=w,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const I="peekViewLayout",M=r.LayoutData.fromJSON(this._storageService.get(I,0,"{}"));this._widget=this._instantiationService.createInstance(r.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,M),this._widget.setTitle(b.localize(1,null)),this._widget.show(m),this._disposables.add(this._widget.onDidClose(()=>{C.cancel(),this._widget&&(this._storageService.store(I,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(O=>{const{element:T,kind:N}=O;if(T)switch(N){case"open":(O.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(T,!1,!1);break;case"side":this.openReference(T,!0,!1);break;case"goto":w?this._gotoReference(T,!0):this.openReference(T,!1,!0);break}}));const A=++this._requestIdPool;C.then(O=>{var T;if(A!==this._requestIdPool||!this._widget){O.dispose();return}return(T=this._model)===null||T===void 0||T.dispose(),this._model=O,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(b.localize(2,null,this._model.title,this._model.references.length));const N=this._editor.getModel().uri,P=new p.Position(m.startLineNumber,m.startColumn),x=this._model.nearestReference(N,P);if(x)return this._widget.setSelection(x).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},O=>{this._notificationService.error(O)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(m){if(!this._editor.hasModel()||!this._model||!this._widget)return;const C=this._widget.position;if(!C)return;const w=this._model.nearestReference(this._editor.getModel().uri,C);if(!w)return;const D=this._model.nextOrPreviousReference(w,m),I=this._editor.hasTextFocus(),M=this._widget.isPreviewEditorFocused();await this._widget.setSelection(D),await this._gotoReference(D,!1),I?this._editor.focus():this._widget&&M&&this._widget.focusOnPreviewEditor()}async revealReference(m){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(m)}closeWidget(m=!0){var C,w;(C=this._widget)===null||C===void 0||C.dispose(),(w=this._model)===null||w===void 0||w.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,m&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(m,C){var w;(w=this._widget)===null||w===void 0||w.hide(),this._ignoreModelChangeEvent=!0;const D=S.Range.lift(m.range).collapseToStart();return this._editorService.openCodeEditor({resource:m.uri,options:{selection:D,selectionSource:"code.jump",pinned:C}},this._editor).then(I=>{var M;if(this._ignoreModelChangeEvent=!1,!I||!this._widget){this.closeWidget();return}if(this._editor===I)this._widget.show(D),this._widget.focusOnReferenceTree();else{const A=l.get(I),O=this._model.clone();this.closeWidget(),I.focus(),A?.toggleWidget(D,(0,L.createCancelablePromise)(T=>Promise.resolve(O)),(M=this._peekMode)!==null&&M!==void 0?M:!1)}},I=>{this._ignoreModelChangeEvent=!1,(0,k.onUnexpectedError)(I)})}openReference(m,C,w){C||this.closeWidget();const{uri:D,range:I}=m;this._editorService.openCodeEditor({resource:D,options:{selection:I,selectionSource:"code.jump",pinned:w}},this._editor,C)}};e.ReferencesController=s,s.ID="editor.contrib.referencesController",e.ReferencesController=s=l=Ee([he(2,n.IContextKeyService),he(3,_.ICodeEditorService),he(4,f.INotificationService),he(5,t.IInstantiationService),he(6,c.IStorageService),he(7,i.IConfigurationService)],s);function g(h,m){const C=(0,v.getOuterEditor)(h);if(!C)return;const w=s.get(C);w&&m(w)}a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,y.KeyChord)(2089,60),when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,m=>{m.changeFocusBetweenPreviewAndReferences()})}}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,m=>{m.goToNextOrPreviousReference(!0)})}}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,m=>{m.goToNextOrPreviousReference(!1)})}}),o.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),o.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),o.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),o.CommandsRegistry.registerCommand("closeReferenceSearch",h=>g(h,m=>m.closeWidget())),a.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(v.PeekContext.inPeekEditor,n.ContextKeyExpr.not("config.editor.stablePeek"))}),a.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,n.ContextKeyExpr.not("config.editor.stablePeek"))}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,u.WorkbenchListFocusContextKey,u.WorkbenchTreeElementCanCollapse.negate(),u.WorkbenchTreeElementCanExpand.negate()),handler(h){var m;const w=(m=h.get(u.IListService).lastFocusedList)===null||m===void 0?void 0:m.getFocus();Array.isArray(w)&&w[0]instanceof d.OneReference&&g(h,D=>D.revealReference(w[0]))}}),a.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,u.WorkbenchListFocusContextKey,u.WorkbenchTreeElementCanCollapse.negate(),u.WorkbenchTreeElementCanExpand.negate()),handler(h){var m;const w=(m=h.get(u.IListService).lastFocusedList)===null||m===void 0?void 0:m.getFocus();Array.isArray(w)&&w[0]instanceof d.OneReference&&g(h,D=>D.openReference(w[0],!0,!0))}}),o.CommandsRegistry.registerCommand("openReference",h=>{var m;const w=(m=h.get(u.IListService).lastFocusedList)===null||m===void 0?void 0:m.getFocus();Array.isArray(w)&&w[0]instanceof d.OneReference&&g(h,D=>D.openReference(w[0],!1,!0))})}),define(ie[260],ne([1,0,51,14,65,20,22,104,151,16,33,166,11,5,21,31,379,160,814,191,140,673,29,25,15,8,47,87,250,18,49,241]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A){"use strict";var O,T,N,P,x,R,B,W;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,s.MenuRegistry.appendMenuItem(s.MenuId.EditorContext,{submenu:s.MenuId.EditorContextPeek,title:l.localize(0,null),group:"navigation",order:100});class V{static is(G){return!G||typeof G!="object"?!1:!!(G instanceof V||i.Position.isIPosition(G.position)&&G.model)}constructor(G,de){this.model=G,this.position=de}}e.SymbolNavigationAnchor=V;class U extends v.EditorAction2{static all(){return U._allSymbolNavigationCommands.values()}static _patchConfig(G){const de={...G,f1:!0};if(de.menu)for(const ue of M.Iterable.wrap(de.menu))(ue.id===s.MenuId.EditorContext||ue.id===s.MenuId.EditorContextPeek)&&(ue.when=h.ContextKeyExpr.and(G.precondition,ue.when));return de}constructor(G,de){super(U._patchConfig(de)),this.configuration=G,U._allSymbolNavigationCommands.set(de.id,this)}runEditorCommand(G,de,ue,X){if(!de.hasModel())return Promise.resolve(void 0);const Z=G.get(C.INotificationService),re=G.get(b.ICodeEditorService),oe=G.get(w.IEditorProgressService),Y=G.get(c.ISymbolNavigationService),K=G.get(I.ILanguageFeaturesService),H=G.get(m.IInstantiationService),z=de.getModel(),se=de.getPosition(),q=V.is(ue)?ue:new V(z,se),ae=new p.EditorStateCancellationTokenSource(de,5),ce=(0,k.raceCancellation)(this._getLocationModel(K,q.model,q.position,ae.token),ae.token).then(async ge=>{var pe;if(!ge||ae.token.isCancellationRequested)return;(0,L.alert)(ge.ariaMessage);let me;if(ge.referenceAt(z.uri,se)){const Ce=this._getAlternativeCommand(de);!U._activeAlternativeCommands.has(Ce)&&U._allSymbolNavigationCommands.has(Ce)&&(me=U._allSymbolNavigationCommands.get(Ce))}const ve=ge.references.length;if(ve===0){if(!this.configuration.muteMessage){const Ce=z.getWordAtPosition(se);(pe=d.MessageController.get(de))===null||pe===void 0||pe.showMessage(this._getNoResultFoundMessage(Ce),se)}}else if(ve===1&&me)U._activeAlternativeCommands.add(this.desc.id),H.invokeFunction(Ce=>me.runEditorCommand(Ce,de,ue,X).finally(()=>{U._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(re,Y,de,ge,X)},ge=>{Z.error(ge)}).finally(()=>{ae.dispose()});return oe.showWhile(ce,250),ce}async _onResult(G,de,ue,X,Z){const re=this._getGoToPreference(ue);if(!(ue instanceof o.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||re==="peek"&&X.references.length>1))this._openInPeek(ue,X,Z);else{const oe=X.firstReference(),Y=X.references.length>1&&re==="gotoAndPeek",K=await this._openReference(ue,G,oe,this.configuration.openToSide,!Y);Y&&K?this._openInPeek(K,X,Z):X.dispose(),re==="goto"&&de.put(oe)}}async _openReference(G,de,ue,X,Z){let re;if((0,a.isLocationLink)(ue)&&(re=ue.targetSelectionRange),re||(re=ue.range),!re)return;const oe=await de.openCodeEditor({resource:ue.uri,options:{selection:n.Range.collapseToStart(re),selectionRevealType:3,selectionSource:"code.jump"}},G,X);if(oe){if(Z){const Y=oe.getModel(),K=oe.createDecorationsCollection([{range:re,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{oe.getModel()===Y&&K.clear()},350)}return oe}}_openInPeek(G,de,ue){const X=u.ReferencesController.get(G);X&&G.hasModel()?X.toggleWidget(ue??G.getSelection(),(0,k.createCancelablePromise)(Z=>Promise.resolve(de)),this.configuration.openInPeek):de.dispose()}}e.SymbolNavigationAction=U,U._allSymbolNavigationCommands=new Map,U._activeAlternativeCommands=new Set;class F extends U{async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getDefinitionsAtPosition)(G.definitionProvider,de,ue,X),l.localize(1,null))}_getNoResultFoundMessage(G){return G&&G.word?l.localize(2,null,G.word):l.localize(3,null)}_getAlternativeCommand(G){return G.getOption(58).alternativeDefinitionCommand}_getGoToPreference(G){return G.getOption(58).multipleDefinitions}}e.DefinitionAction=F,(0,s.registerAction2)((O=class extends F{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:O.id,title:{value:l.localize(4,null),original:"Go to Definition",mnemonicTitle:l.localize(5,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:t.EditorContextKeys.editorTextFocus,primary:70,weight:100},{when:h.ContextKeyExpr.and(t.EditorContextKeys.editorTextFocus,A.IsWebContext),primary:2118,weight:100}],menu:[{id:s.MenuId.EditorContext,group:"navigation",order:1.1},{id:s.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),g.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",O.id)}},O.id="editor.action.revealDefinition",O)),(0,s.registerAction2)((T=class extends F{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:T.id,title:{value:l.localize(6,null),original:"Open Definition to the Side"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:t.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,70),weight:100},{when:h.ContextKeyExpr.and(t.EditorContextKeys.editorTextFocus,A.IsWebContext),primary:(0,y.KeyChord)(2089,2118),weight:100}]}),g.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",T.id)}},T.id="editor.action.revealDefinitionAside",T)),(0,s.registerAction2)((N=class extends F{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:N.id,title:{value:l.localize(7,null),original:"Peek Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:s.MenuId.EditorContextPeek,group:"peek",order:2}}),g.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",N.id)}},N.id="editor.action.peekDefinition",N));class j extends U{async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getDeclarationsAtPosition)(G.declarationProvider,de,ue,X),l.localize(8,null))}_getNoResultFoundMessage(G){return G&&G.word?l.localize(9,null,G.word):l.localize(10,null)}_getAlternativeCommand(G){return G.getOption(58).alternativeDeclarationCommand}_getGoToPreference(G){return G.getOption(58).multipleDeclarations}}(0,s.registerAction2)((P=class extends j{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:P.id,title:{value:l.localize(11,null),original:"Go to Declaration",mnemonicTitle:l.localize(12,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDeclarationProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:[{id:s.MenuId.EditorContext,group:"navigation",order:1.3},{id:s.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(G){return G&&G.word?l.localize(13,null,G.word):l.localize(14,null)}},P.id="editor.action.revealDeclaration",P)),(0,s.registerAction2)(class extends j{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:l.localize(15,null),original:"Peek Declaration"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDeclarationProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:s.MenuId.EditorContextPeek,group:"peek",order:3}})}});class J extends U{async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getTypeDefinitionsAtPosition)(G.typeDefinitionProvider,de,ue,X),l.localize(16,null))}_getNoResultFoundMessage(G){return G&&G.word?l.localize(17,null,G.word):l.localize(18,null)}_getAlternativeCommand(G){return G.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(G){return G.getOption(58).multipleTypeDefinitions}}(0,s.registerAction2)((x=class extends J{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:x.ID,title:{value:l.localize(19,null),original:"Go to Type Definition",mnemonicTitle:l.localize(20,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasTypeDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:s.MenuId.EditorContext,group:"navigation",order:1.4},{id:s.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},x.ID="editor.action.goToTypeDefinition",x)),(0,s.registerAction2)((R=class extends J{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:R.ID,title:{value:l.localize(21,null),original:"Peek Type Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasTypeDefinitionProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:s.MenuId.EditorContextPeek,group:"peek",order:4}})}},R.ID="editor.action.peekTypeDefinition",R));class le extends U{async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getImplementationsAtPosition)(G.implementationProvider,de,ue,X),l.localize(22,null))}_getNoResultFoundMessage(G){return G&&G.word?l.localize(23,null,G.word):l.localize(24,null)}_getAlternativeCommand(G){return G.getOption(58).alternativeImplementationCommand}_getGoToPreference(G){return G.getOption(58).multipleImplementations}}(0,s.registerAction2)((B=class extends le{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:B.ID,title:{value:l.localize(25,null),original:"Go to Implementations",mnemonicTitle:l.localize(26,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasImplementationProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:s.MenuId.EditorContext,group:"navigation",order:1.45},{id:s.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},B.ID="editor.action.goToImplementation",B)),(0,s.registerAction2)((W=class extends le{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:W.ID,title:{value:l.localize(27,null),original:"Peek Implementations"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasImplementationProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:s.MenuId.EditorContextPeek,group:"peek",order:5}})}},W.ID="editor.action.peekImplementation",W));class ee extends U{_getNoResultFoundMessage(G){return G?l.localize(28,null,G.word):l.localize(29,null)}_getAlternativeCommand(G){return G.getOption(58).alternativeReferenceCommand}_getGoToPreference(G){return G.getOption(58).multipleReferences}}(0,s.registerAction2)(class extends ee{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:l.localize(30,null),original:"Go to References",mnemonicTitle:l.localize(31,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasReferenceProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:s.MenuId.EditorContext,group:"navigation",order:1.45},{id:s.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getReferencesAtPosition)(G.referenceProvider,de,ue,!0,X),l.localize(32,null))}}),(0,s.registerAction2)(class extends ee{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:l.localize(33,null),original:"Peek References"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasReferenceProvider,r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:s.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(await(0,D.getReferencesAtPosition)(G.referenceProvider,de,ue,!1,X),l.localize(34,null))}});class $ extends U{constructor(G,de,ue){super(G,{id:"editor.action.goToLocation",title:{value:l.localize(35,null),original:"Go to Any Symbol"},precondition:h.ContextKeyExpr.and(r.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=de,this._gotoMultipleBehaviour=ue}async _getLocationModel(G,de,ue,X){return new f.ReferencesModel(this._references,l.localize(36,null))}_getNoResultFoundMessage(G){return G&&l.localize(37,null,G.word)||""}_getGoToPreference(G){var de;return(de=this._gotoMultipleBehaviour)!==null&&de!==void 0?de:G.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}g.CommandsRegistry.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_.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(te,G,de,ue,X,Z,re)=>{(0,E.assertType)(_.URI.isUri(G)),(0,E.assertType)(i.Position.isIPosition(de)),(0,E.assertType)(Array.isArray(ue)),(0,E.assertType)(typeof X>"u"||typeof X=="string"),(0,E.assertType)(typeof re>"u"||typeof re=="boolean");const oe=te.get(b.ICodeEditorService),Y=await oe.openCodeEditor({resource:G},oe.getFocusedCodeEditor());if((0,S.isCodeEditor)(Y))return Y.setPosition(de),Y.revealPositionInCenterIfOutsideViewport(de,0),Y.invokeWithinContext(K=>{const H=new class extends ${_getNoResultFoundMessage(z){return Z||super._getNoResultFoundMessage(z)}}({muteMessage:!Z,openInPeek:!!re,openToSide:!1},ue,X);K.get(m.IInstantiationService).invokeFunction(H.run.bind(H),Y)})}}),g.CommandsRegistry.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:_.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(te,G,de,ue,X)=>{te.get(g.ICommandService).executeCommand("editor.action.goToLocations",G,de,ue,X,void 0,!0)}}),g.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(te,G,de)=>{(0,E.assertType)(_.URI.isUri(G)),(0,E.assertType)(i.Position.isIPosition(de));const ue=te.get(I.ILanguageFeaturesService),X=te.get(b.ICodeEditorService);return X.openCodeEditor({resource:G},X.getFocusedCodeEditor()).then(Z=>{if(!(0,S.isCodeEditor)(Z)||!Z.hasModel())return;const re=u.ReferencesController.get(Z);if(!re)return;const oe=(0,k.createCancelablePromise)(K=>(0,D.getReferencesAtPosition)(ue.referenceProvider,Z.getModel(),i.Position.lift(de),!1,K).then(H=>new f.ReferencesModel(H,l.localize(38,null)))),Y=new n.Range(de.lineNumber,de.column,de.lineNumber,de.column);return Promise.resolve(re.toggleWidget(Y,oe,!1))})}}),g.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(ie[380],ne([1,0,14,9,58,2,104,16,5,42,68,186,140,674,15,260,250,18,39,456]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let r=d=class{constructor(s,g,h,m){this.textModelResolverService=g,this.languageService=h,this.languageFeaturesService=m,this.toUnhook=new E.DisposableStore,this.toUnhookForKeyboard=new E.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=s,this.linkDecorations=this.editor.createDecorationsCollection();const C=new o.ClickLinkGesture(s);this.toUnhook.add(C),this.toUnhook.add(C.onMouseMoveOrRelevantKeyDown(([w,D])=>{this.startFindDefinitionFromMouse(w,D??void 0)})),this.toUnhook.add(C.onExecute(w=>{this.isEnabled(w)&&this.gotoDefinition(w.target.position,w.hasSideBySideModifier).catch(D=>{(0,k.onUnexpectedError)(D)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(C.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(s){return s.getContribution(d.ID)}async startFindDefinitionFromCursor(s){await this.startFindDefinition(s),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(g=>{g&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(s,g){if(s.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(s,g)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const h=s.target.position;this.startFindDefinition(h)}async startFindDefinition(s){var g;this.toUnhookForKeyboard.clear();const h=s?(g=this.editor.getModel())===null||g===void 0?void 0:g.getWordAtPosition(s):null;if(!h){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===h.startColumn&&this.currentWordAtPosition.endColumn===h.endColumn&&this.currentWordAtPosition.word===h.word)return;this.currentWordAtPosition=h;const m=new _.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,L.createCancelablePromise)(D=>this.findDefinition(s,D));let C;try{C=await this.previousPromise}catch(D){(0,k.onUnexpectedError)(D);return}if(!C||!C.length||!m.validate(this.editor)){this.removeLinkDecorations();return}const w=C[0].originSelectionRange?S.Range.lift(C[0].originSelectionRange):new S.Range(s.lineNumber,h.startColumn,s.lineNumber,h.endColumn);if(C.length>1){let D=w;for(const{originSelectionRange:I}of C)I&&(D=S.Range.plusRange(D,I));this.addDecoration(D,new y.MarkdownString().appendText(n.localize(0,null,C.length)))}else{const D=C[0];if(!D.uri)return;this.textModelResolverService.createModelReference(D.uri).then(I=>{if(!I.object||!I.object.textEditorModel){I.dispose();return}const{object:{textEditorModel:M}}=I,{startLineNumber:A}=D.range;if(A<1||A>M.getLineCount()){I.dispose();return}const O=this.getPreviewValue(M,A,D),T=this.languageService.guessLanguageIdByFilepathOrFirstLine(M.uri);this.addDecoration(w,O?new y.MarkdownString().appendCodeblock(T||"",O):void 0),I.dispose()})}}getPreviewValue(s,g,h){let m=h.range;return m.endLineNumber-m.startLineNumber>=d.MAX_SOURCE_PREVIEW_LINES&&(m=this.getPreviewRangeBasedOnIndentation(s,g)),this.stripIndentationFromPreviewRange(s,g,m)}stripIndentationFromPreviewRange(s,g,h){let C=s.getLineFirstNonWhitespaceColumn(g);for(let D=g+1;D{const m=!g&&this.editor.getOption(87)&&!this.isInPeekEditor(h);return new a.DefinitionAction({openToSide:g,openInPeek:m,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h)})}isInPeekEditor(s){const g=s.get(t.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(g)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};e.GotoDefinitionAtPositionEditorContribution=r,r.ID="editor.contrib.gotodefinitionatposition",r.MAX_SOURCE_PREVIEW_LINES=8,e.GotoDefinitionAtPositionEditorContribution=r=d=Ee([he(1,b.ITextModelService),he(2,v.ILanguageService),he(3,f.ILanguageFeaturesService)],r),(0,p.registerEditorContribution)(r.ID,r,2)}),define(ie[912],ne([1,0,7,13,14,9,2,45,5,18,237,138,257,114,378,682,96,57,87]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const d=L.$;class r{constructor(h,m,C){this.owner=h,this.range=m,this.marker=C}isValidForHoverAnchor(h){return h.type===1&&this.range.startColumn<=h.range.startColumn&&this.range.endColumn>=h.range.endColumn}}e.MarkerHover=r;const l={type:1,filter:{include:n.CodeActionKind.QuickFix},triggerAction:n.CodeActionTriggerSource.QuickFixHover};let s=class{constructor(h,m,C,w){this._editor=h,this._markerDecorationsService=m,this._openerService=C,this._languageFeaturesService=w,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(h,m){if(!this._editor.hasModel()||h.type!==1&&!h.supportsMarkerHover)return[];const C=this._editor.getModel(),w=h.range.startLineNumber,D=C.getLineMaxColumn(w),I=[];for(const M of m){const A=M.range.startLineNumber===w?M.range.startColumn:1,O=M.range.endLineNumber===w?M.range.endColumn:D,T=this._markerDecorationsService.getMarker(C.uri,M);if(!T)continue;const N=new S.Range(h.range.startLineNumber,A,h.range.startLineNumber,O);I.push(new r(this,N,T))}return I}renderHoverParts(h,m){if(!m.length)return _.Disposable.None;const C=new _.DisposableStore;m.forEach(D=>h.fragment.appendChild(this.renderMarkerHover(D,C)));const w=m.length===1?m[0]:m.sort((D,I)=>u.MarkerSeverity.compare(D.marker.severity,I.marker.severity))[0];return this.renderMarkerStatusbar(h,w,C),C}renderMarkerHover(h,m){const C=d("div.hover-row"),w=L.append(C,d("div.marker.hover-contents")),{source:D,message:I,code:M,relatedInformation:A}=h.marker;this._editor.applyFontInfo(w);const O=L.append(w,d("span"));if(O.style.whiteSpace="pre-wrap",O.innerText=I,D||M)if(M&&typeof M!="string"){const T=d("span");if(D){const R=L.append(T,d("span"));R.innerText=D}const N=L.append(T,d("a.code-link"));N.setAttribute("href",M.target.toString()),m.add(L.addDisposableListener(N,"click",R=>{this._openerService.open(M.target,{allowCommands:!0}),R.preventDefault(),R.stopPropagation()}));const P=L.append(N,d("span"));P.innerText=M.value;const x=L.append(w,T);x.style.opacity="0.6",x.style.paddingLeft="6px"}else{const T=L.append(w,d("span"));T.style.opacity="0.6",T.style.paddingLeft="6px",T.innerText=D&&M?`${D}(${M})`:D||`(${M})`}if((0,k.isNonEmptyArray)(A))for(const{message:T,resource:N,startLineNumber:P,startColumn:x}of A){const R=L.append(w,d("div"));R.style.marginTop="8px";const B=L.append(R,d("a"));B.innerText=`${(0,p.basename)(N)}(${P}, ${x}): `,B.style.cursor="pointer",m.add(L.addDisposableListener(B,"click",V=>{V.stopPropagation(),V.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:P,startColumn:x}}}).catch(E.onUnexpectedError)}));const W=L.append(R,d("span"));W.innerText=T,this._editor.applyFontInfo(W)}return C}renderMarkerStatusbar(h,m,C){if((m.marker.severity===u.MarkerSeverity.Error||m.marker.severity===u.MarkerSeverity.Warning||m.marker.severity===u.MarkerSeverity.Info)&&h.statusBar.addAction({label:a.localize(0,null),commandId:t.NextMarkerAction.ID,run:()=>{var w;h.hide(),(w=t.MarkerController.get(this._editor))===null||w===void 0||w.showAtMarker(m.marker),this._editor.focus()}}),!this._editor.getOption(90)){const w=h.statusBar.append(d("div"));this.recentMarkerCodeActionsInfo&&(u.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===u.IMarkerData.makeKey(m.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(w.textContent=a.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const D=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?_.Disposable.None:C.add((0,y.disposableTimeout)(()=>w.textContent=a.localize(2,null),200));w.textContent||(w.textContent=String.fromCharCode(160));const I=this.getCodeActions(m.marker);C.add((0,_.toDisposable)(()=>I.cancel())),I.then(M=>{if(D.dispose(),this.recentMarkerCodeActionsInfo={marker:m.marker,hasCodeActions:M.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){M.dispose(),w.textContent=a.localize(3,null);return}w.style.display="none";let A=!1;C.add((0,_.toDisposable)(()=>{A||M.dispose()})),h.statusBar.addAction({label:a.localize(4,null),commandId:o.quickFixCommandId,run:O=>{A=!0;const T=i.CodeActionController.get(this._editor),N=L.getDomNodePagePosition(O);h.hide(),T?.showCodeActions(l,M,{x:N.left,y:N.top,width:N.width,height:N.height})}})},E.onUnexpectedError)}}getCodeActions(h){return(0,y.createCancelablePromise)(m=>(0,o.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new S.Range(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn),l,c.Progress.None,m))}};e.MarkerHoverParticipant=s,e.MarkerHoverParticipant=s=Ee([he(1,b.IMarkerDecorationsService),he(2,f.IOpenerService),he(3,v.ILanguageFeaturesService)],s)}),define(ie[381],ne([1,0,65,2,16,5,21,42,380,376,791,8,57,30,23,101,251,912,255,34,680,14,458]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;const g=!1;let h=s=class extends k.Disposable{static get(R){return R.getContribution(s.ID)}constructor(R,B,W,V,U){super(),this._editor=R,this._instantiationService=B,this._openerService=W,this._languageService=V,this._keybindingService=U,this._toUnhook=new k.DisposableStore,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new l.RunOnceScheduler(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(F=>{F.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())}))}_hookEvents(){const R=this._editor.getOption(60);this._isHoverEnabled=R.enabled,this._isHoverSticky=R.sticky,this._hidingDelay=R.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(B=>this._onEditorMouseDown(B))),this._toUnhook.add(this._editor.onMouseUp(B=>this._onEditorMouseUp(B))),this._toUnhook.add(this._editor.onMouseMove(B=>this._onEditorMouseMove(B))),this._toUnhook.add(this._editor.onKeyDown(B=>this._onKeyDown(B)))):(this._toUnhook.add(this._editor.onMouseMove(B=>this._onEditorMouseMove(B))),this._toUnhook.add(this._editor.onKeyDown(B=>this._onKeyDown(B)))),this._toUnhook.add(this._editor.onMouseLeave(B=>this._onEditorMouseLeave(B))),this._toUnhook.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._toUnhook.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._toUnhook.add(this._editor.onDidScrollChange(B=>this._onEditorScrollChanged(B)))}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(R){(R.scrollTopChanged||R.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(R){var B;this._isMouseDown=!0;const W=R.target;if(W.type===9&&W.detail===v.ContentHoverWidget.ID){this._hoverClicked=!0;return}W.type===12&&W.detail===b.MarginHoverWidget.ID||(W.type!==12&&(this._hoverClicked=!1),!((B=this._contentWidget)===null||B===void 0)&&B.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(R){this._isMouseDown=!1}_onEditorMouseLeave(R){var B,W;this._cancelScheduler();const V=R.event.browserEvent.relatedTarget;!((B=this._contentWidget)===null||B===void 0)&&B.widget.isResizing||!((W=this._contentWidget)===null||W===void 0)&&W.containsNode(V)||g||this._hideWidgets()}_isMouseOverWidget(R){var B,W,V,U,F;const j=R.target;return!!(this._isHoverSticky&&j.type===9&&j.detail===v.ContentHoverWidget.ID||this._isHoverSticky&&(!((B=this._contentWidget)===null||B===void 0)&&B.containsNode((W=R.event.browserEvent.view)===null||W===void 0?void 0:W.document.activeElement))&&!(!((U=(V=R.event.browserEvent.view)===null||V===void 0?void 0:V.getSelection())===null||U===void 0)&&U.isCollapsed)||!this._isHoverSticky&&j.type===9&&j.detail===v.ContentHoverWidget.ID&&(!((F=this._contentWidget)===null||F===void 0)&&F.isColorPickerVisible)||this._isHoverSticky&&j.type===12&&j.detail===b.MarginHoverWidget.ID)}_onEditorMouseMove(R){var B,W,V,U;if(this._mouseMoveEvent=R,!((B=this._contentWidget)===null||B===void 0)&&B.isFocused||!((W=this._contentWidget)===null||W===void 0)&&W.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((V=this._contentWidget)===null||V===void 0)&&V.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(R)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((U=this._contentWidget)===null||U===void 0)&&U.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(R)}_reactToEditorMouseMove(R){var B,W,V;if(!R)return;const U=R.target,F=(B=U.element)===null||B===void 0?void 0:B.classList.contains("colorpicker-color-decoration"),j=this._editor.getOption(146);if(F&&(j==="click"&&!this._hoverActivatedByColorDecoratorClick||j==="hover"&&!this._isHoverEnabled&&!g||j==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!F&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(R)){(W=this._glyphWidget)===null||W===void 0||W.hide();return}if(U.type===2&&U.position){(V=this._contentWidget)===null||V===void 0||V.hide(),this._glyphWidget||(this._glyphWidget=new b.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(U.position.lineNumber);return}g||this._hideWidgets()}_onKeyDown(R){var B;if(!this._editor.hasModel())return;const W=this._keybindingService.softDispatch(R,this._editor.getDomNode()),V=W.kind===1||W.kind===2&&W.commandId==="editor.action.showHover"&&((B=this._contentWidget)===null||B===void 0?void 0:B.isVisible);R.keyCode!==5&&R.keyCode!==6&&R.keyCode!==57&&R.keyCode!==4&&!V&&this._hideWidgets()}_hideWidgets(){var R,B,W;g||this._isMouseDown&&this._hoverClicked&&(!((R=this._contentWidget)===null||R===void 0)&&R.isColorPickerVisible)||c.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(B=this._glyphWidget)===null||B===void 0||B.hide(),(W=this._contentWidget)===null||W===void 0||W.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(v.ContentHoverController,this._editor)),this._contentWidget}showContentHover(R,B,W,V,U=!1){this._hoverActivatedByColorDecoratorClick=U,this._getOrCreateContentWidget().startShowingAtRange(R,B,W,V)}focus(){var R;(R=this._contentWidget)===null||R===void 0||R.focus()}scrollUp(){var R;(R=this._contentWidget)===null||R===void 0||R.scrollUp()}scrollDown(){var R;(R=this._contentWidget)===null||R===void 0||R.scrollDown()}scrollLeft(){var R;(R=this._contentWidget)===null||R===void 0||R.scrollLeft()}scrollRight(){var R;(R=this._contentWidget)===null||R===void 0||R.scrollRight()}pageUp(){var R;(R=this._contentWidget)===null||R===void 0||R.pageUp()}pageDown(){var R;(R=this._contentWidget)===null||R===void 0||R.pageDown()}goToTop(){var R;(R=this._contentWidget)===null||R===void 0||R.goToTop()}goToBottom(){var R;(R=this._contentWidget)===null||R===void 0||R.goToBottom()}get isColorPickerVisible(){var R;return(R=this._contentWidget)===null||R===void 0?void 0:R.isColorPickerVisible}get isHoverVisible(){var R;return(R=this._contentWidget)===null||R===void 0?void 0:R.isVisible}dispose(){var R,B;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(R=this._glyphWidget)===null||R===void 0||R.dispose(),(B=this._contentWidget)===null||B===void 0||B.dispose()}};e.ModesHoverController=h,h.ID="editor.contrib.hover",e.ModesHoverController=h=s=Ee([he(1,o.IInstantiationService),he(2,i.IOpenerService),he(3,p.ILanguageService),he(4,d.IKeybindingService)],h);var m;(function(x){x.NoAutoFocus="noAutoFocus",x.FocusIfVisible="focusIfVisible",x.AutoFocusImmediately="autoFocusImmediately"})(m||(m={}));class C extends y.EditorAction{constructor(){super({id:"editor.action.showHover",label:r.localize(0,null),metadata:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if and when the hover should take focus upon being triggered by this action.",enum:[m.NoAutoFocus,m.FocusIfVisible,m.AutoFocusImmediately],enumDescriptions:[r.localize(1,null),r.localize(2,null),r.localize(3,null)],default:m.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2087),weight:100}})}run(R,B,W){if(!B.hasModel())return;const V=h.get(B);if(!V)return;const U=W?.focus;let F=m.FocusIfVisible;U in m?F=U:typeof U=="boolean"&&U&&(F=m.AutoFocusImmediately);const j=le=>{const ee=B.getPosition(),$=new E.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column);V.showContentHover($,1,1,le)},J=B.getOption(2)===2;V.isHoverVisible?F!==m.NoAutoFocus?V.focus():j(J):j(J||F===m.AutoFocusImmediately)}}class w extends y.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:r.localize(4,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(R,B){const W=h.get(B);if(!W)return;const V=B.getPosition();if(!V)return;const U=new E.Range(V.lineNumber,V.column,V.lineNumber,V.column),F=S.GotoDefinitionAtPositionEditorContribution.get(B);if(!F)return;F.startFindDefinitionFromCursor(V).then(()=>{W.showContentHover(U,1,1,!0)})}}class D extends y.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:r.localize(5,null),alias:"Scroll Up Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(R,B){const W=h.get(B);W&&W.scrollUp()}}class I extends y.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:r.localize(6,null),alias:"Scroll Down Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(R,B){const W=h.get(B);W&&W.scrollDown()}}class M extends y.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:r.localize(7,null),alias:"Scroll Left Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(R,B){const W=h.get(B);W&&W.scrollLeft()}}class A extends y.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:r.localize(8,null),alias:"Scroll Right Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(R,B){const W=h.get(B);W&&W.scrollRight()}}class O extends y.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:r.localize(9,null),alias:"Page Up Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(R,B){const W=h.get(B);W&&W.pageUp()}}class T extends y.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:r.localize(10,null),alias:"Page Down Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(R,B){const W=h.get(B);W&&W.pageDown()}}class N extends y.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:r.localize(11,null),alias:"Go To Bottom Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(R,B){const W=h.get(B);W&&W.goToTop()}}class P extends y.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:r.localize(12,null),alias:"Go To Bottom Hover",precondition:_.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:_.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(R,B){const W=h.get(B);W&&W.goToBottom()}}(0,y.registerEditorContribution)(h.ID,h,2),(0,y.registerEditorAction)(C),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(D),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(P),a.HoverParticipantRegistry.register(u.MarkdownHoverParticipant),a.HoverParticipantRegistry.register(f.MarkerHoverParticipant),(0,t.registerThemingParticipant)((x,R)=>{const B=x.getColor(n.editorHoverBorder);B&&(R.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${B.transparent(.5)}; }`),R.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${B.transparent(.5)}; }`),R.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${B.transparent(.5)}; }`))})}),define(ie[913],ne([1,0,2,16,5,372,373,381,101]),function(Q,e,L,k,y,E,_,p,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class v extends L.Disposable{constructor(o){super(),this._editor=o,this._register(o.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(o){const i=this._editor.getOption(146);if(i!=="click"&&i!=="clickAndHover")return;const n=o.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==E.ColorDecorationInjectedTextMarker||!n.range)return;const t=this._editor.getContribution(p.ModesHoverController.ID);if(t&&!t.isColorPickerVisible){const a=new y.Range(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);t.showContentHover(a,1,0,!1,!0)}}}e.ColorContribution=v,v.ID="editor.contrib.colorContribution",(0,k.registerEditorContribution)(v.ID,v,2),S.HoverParticipantRegistry.register(_.ColorHoverParticipant)}),define(ie[382],ne([1,0,7,41,19,173,5,68,260,140,29,25,15,59,8,47]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;async function u(c,d,r,l){var s;const g=c.get(p.ITextModelService),h=c.get(n.IContextMenuService),m=c.get(o.ICommandService),C=c.get(t.IInstantiationService),w=c.get(a.INotificationService);if(await l.item.resolve(y.CancellationToken.None),!l.part.location)return;const D=l.part.location,I=[],M=new Set(b.MenuRegistry.getMenuItems(b.MenuId.EditorContext).map(O=>(0,b.isIMenuItem)(O)?O.command.id:(0,E.generateUuid)()));for(const O of S.SymbolNavigationAction.all())M.has(O.desc.id)&&I.push(new k.Action(O.desc.id,b.MenuItemAction.label(O.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const T=await g.createModelReference(D.uri);try{const N=new S.SymbolNavigationAnchor(T.object.textEditorModel,_.Range.getStartPosition(D.range)),P=l.item.anchor.range;await C.invokeFunction(O.runEditorCommand.bind(O),d,N,P)}finally{T.dispose()}}));if(l.part.command){const{command:O}=l.part;I.push(new k.Separator),I.push(new k.Action(O.id,O.title,void 0,!0,async()=>{var T;try{await m.executeCommand(O.id,...(T=O.arguments)!==null&&T!==void 0?T:[])}catch(N){w.notify({severity:a.Severity.Error,source:l.item.provider.displayName,message:N})}}))}const A=d.getOption(126);h.showContextMenu({domForShadowRoot:A&&(s=d.getDomNode())!==null&&s!==void 0?s:void 0,getAnchor:()=>{const O=L.getDomNodePagePosition(r);return{x:O.left,y:O.top+O.height+8}},getActions:()=>I,onHide:()=>{d.focus()},autoSelectFirstItem:!0})}e.showGoToContextMenu=u;async function f(c,d,r,l){const g=await c.get(p.ITextModelService).createModelReference(l.uri);await r.invokeWithinContext(async h=>{const m=d.hasSideBySideModifier,C=h.get(i.IContextKeyService),w=v.PeekContext.inPeekEditor.getValue(C),D=!m&&r.getOption(87)&&!w;return new S.DefinitionAction({openToSide:m,openInPeek:D,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h,new S.SymbolNavigationAnchor(g.object.textEditorModel,_.Range.getStartPosition(l.range)),_.Range.lift(l.range))}),g.dispose()}e.goToDefinitionWithLocation=f}),define(ie[383],ne([1,0,7,13,14,19,9,2,53,20,22,165,124,36,74,5,31,43,39,78,18,68,186,330,382,25,46,8,47,30,23]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class O{constructor(){this._entries=new S.LRUCache(50)}get(W){const V=O._key(W);return this._entries.get(V)}set(W,V){const U=O._key(W);this._entries.set(U,V)}static _key(W){return`${W.uri.toString()}/${W.getVersionId()}`}}const T=(0,w.createDecorator)("IInlayHintsCache");(0,C.registerSingleton)(T,O,1);class N{constructor(W,V){this.item=W,this.index=V}get part(){const W=this.item.hint.label;return typeof W=="string"?{label:W}:W[this.index]}}e.RenderedInlayHintLabelPart=N;class P{constructor(W,V){this.part=W,this.hasTriggerModifier=V}}let x=A=class{static get(W){var V;return(V=W.getContribution(A.ID))!==null&&V!==void 0?V:void 0}constructor(W,V,U,F,j,J,le){this._editor=W,this._languageFeaturesService=V,this._inlayHintsCache=F,this._commandService=j,this._notificationService=J,this._instaService=le,this._disposables=new p.DisposableStore,this._sessionDisposables=new p.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new o.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=U.for(V.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(V.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(W.onDidChangeModel(()=>this._update())),this._disposables.add(W.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(W.onDidChangeConfiguration(ee=>{ee.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const W=this._editor.getOption(139);if(W.enabled==="off")return;const V=this._editor.getModel();if(!V||!this._languageFeaturesService.inlayHintsProvider.has(V))return;const U=this._inlayHintsCache.get(V);U&&this._updateHintsDecorators([V.getFullModelRange()],U),this._sessionDisposables.add((0,p.toDisposable)(()=>{V.isDisposed()||this._cacheHintsForFastRestore(V)}));let F;const j=new Set,J=new y.RunOnceScheduler(async()=>{const le=Date.now();F?.dispose(!0),F=new E.CancellationTokenSource;const ee=V.onWillDispose(()=>F?.cancel());try{const $=F.token,te=await g.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,V,this._getHintsRanges(),$);if(J.delay=this._debounceInfo.update(V,Date.now()-le),$.isCancellationRequested){te.dispose();return}for(const G of te.provider)typeof G.onDidChangeInlayHints=="function"&&!j.has(G)&&(j.add(G),this._sessionDisposables.add(G.onDidChangeInlayHints(()=>{J.isScheduled()||J.schedule()})));this._sessionDisposables.add(te),this._updateHintsDecorators(te.ranges,te.items),this._cacheHintsForFastRestore(V)}catch($){(0,_.onUnexpectedError)($)}finally{F.dispose(),ee.dispose()}},this._debounceInfo.get(V));if(this._sessionDisposables.add(J),this._sessionDisposables.add((0,p.toDisposable)(()=>F?.dispose(!0))),J.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(le=>{(le.scrollTopChanged||!J.isScheduled())&&J.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(le=>{const ee=Math.max(J.delay,1250);J.schedule(ee)})),W.enabled==="on")this._activeRenderMode=0;else{let le,ee;W.enabled==="onUnlessPressed"?(le=0,ee=1):(le=1,ee=0),this._activeRenderMode=le,this._sessionDisposables.add(L.ModifierKeyEmitter.getInstance().event($=>{if(!this._editor.hasModel())return;const te=$.altKey&&$.ctrlKey&&!($.shiftKey||$.metaKey)?ee:le;if(te!==this._activeRenderMode){this._activeRenderMode=te;const G=this._editor.getModel(),de=this._copyInlayHintsWithCurrentAnchor(G);this._updateHintsDecorators([G.getFullModelRange()],de),J.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>J.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const W=new p.DisposableStore,V=W.add(new s.ClickLinkGesture(this._editor)),U=new p.DisposableStore;return W.add(U),W.add(V.onMouseMoveOrRelevantKeyDown(F=>{const[j]=F,J=this._getInlayHintLabelPart(j),le=this._editor.getModel();if(!J||!le){U.clear();return}const ee=new E.CancellationTokenSource;U.add((0,p.toDisposable)(()=>ee.dispose(!0))),J.item.resolve(ee.token),this._activeInlayHintPart=J.part.command||J.part.location?new P(J,j.hasTriggerModifier):void 0;const $=le.validatePosition(J.item.hint.position).lineNumber,te=new a.Range($,1,$,le.getLineMaxColumn($)),G=this._getInlineHintsForRange(te);this._updateHintsDecorators([te],G),U.add((0,p.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([te],G)}))})),W.add(V.onCancel(()=>U.clear())),W.add(V.onExecute(async F=>{const j=this._getInlayHintLabelPart(F);if(j){const J=j.part;J.location?this._instaService.invokeFunction(h.goToDefinitionWithLocation,F,this._editor,J.location):u.Command.is(J.command)&&await this._invokeCommand(J.command,j.item)}})),W}_getInlineHintsForRange(W){const V=new Set;for(const U of this._decorationsMetadata.values())W.containsRange(U.item.anchor.range)&&V.add(U.item);return Array.from(V)}_installDblClickGesture(W){return this._editor.onMouseUp(async V=>{if(V.event.detail!==2)return;const U=this._getInlayHintLabelPart(V);if(U&&(V.event.preventDefault(),await U.item.resolve(E.CancellationToken.None),(0,k.isNonEmptyArray)(U.item.hint.textEdits))){const F=U.item.hint.textEdits.map(j=>t.EditOperation.replace(a.Range.lift(j.range),j.text));this._editor.executeEdits("inlayHint.default",F),W()}})}_installContextMenu(){return this._editor.onContextMenu(async W=>{if(!(W.event.target instanceof HTMLElement))return;const V=this._getInlayHintLabelPart(W);V&&await this._instaService.invokeFunction(h.showGoToContextMenu,this._editor,W.event.target,V)})}_getInlayHintLabelPart(W){var V;if(W.target.type!==6)return;const U=(V=W.target.detail.injectedText)===null||V===void 0?void 0:V.options;if(U instanceof c.ModelDecorationInjectedTextOptions&&U?.attachedData instanceof N)return U.attachedData}async _invokeCommand(W,V){var U;try{await this._commandService.executeCommand(W.id,...(U=W.arguments)!==null&&U!==void 0?U:[])}catch(F){this._notificationService.notify({severity:D.Severity.Error,source:V.provider.displayName,message:F})}}_cacheHintsForFastRestore(W){const V=this._copyInlayHintsWithCurrentAnchor(W);this._inlayHintsCache.set(W,V)}_copyInlayHintsWithCurrentAnchor(W){const V=new Map;for(const[U,F]of this._decorationsMetadata){if(V.has(F.item))continue;const j=W.getDecorationRange(U);if(j){const J=new g.InlayHintAnchor(j,F.item.anchor.direction),le=F.item.with({anchor:J});V.set(F.item,le)}}return Array.from(V.values())}_getHintsRanges(){const V=this._editor.getModel(),U=this._editor.getVisibleRangesPlusViewportAboveBelow(),F=[];for(const j of U.sort(a.Range.compareRangesUsingStarts)){const J=V.validateRange(new a.Range(j.startLineNumber-30,j.startColumn,j.endLineNumber+30,j.endColumn));F.length===0||!a.Range.areIntersectingOrTouching(F[F.length-1],J)?F.push(J):F[F.length-1]=a.Range.plusRange(F[F.length-1],J)}return F}_updateHintsDecorators(W,V){var U,F;const j=[],J=(Z,re,oe,Y,K)=>{const H={content:oe,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:re.className,cursorStops:Y,attachedData:K};j.push({item:Z,classNameRef:re,decoration:{range:Z.anchor.range,options:{description:"InlayHint",showIfCollapsed:Z.anchor.range.isEmpty(),collapseOnReplaceEdit:!Z.anchor.range.isEmpty(),stickiness:0,[Z.anchor.direction]:this._activeRenderMode===0?H:void 0}}})},le=(Z,re)=>{const oe=this._ruleFactory.createClassNameRef({width:`${ee/3|0}px`,display:"inline-block"});J(Z,oe,"\u200A",re?f.InjectedTextCursorStops.Right:f.InjectedTextCursorStops.None)},{fontSize:ee,fontFamily:$,padding:te,isUniform:G}=this._getLayoutInfo(),de="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(de,$);for(const Z of V){Z.hint.paddingLeft&&le(Z,!1);const re=typeof Z.hint.label=="string"?[{label:Z.hint.label}]:Z.hint.label;for(let oe=0;oeA._MAX_DECORATORS)break}const ue=[];for(const Z of W)for(const{id:re}of(F=this._editor.getDecorationsInRange(Z))!==null&&F!==void 0?F:[]){const oe=this._decorationsMetadata.get(re);oe&&(ue.push(re),oe.classNameRef.dispose(),this._decorationsMetadata.delete(re))}const X=i.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(Z=>{const re=Z.deltaDecorations(ue,j.map(oe=>oe.decoration));for(let oe=0;oeU)&&(j=U);const J=W.fontFamily||F;return{fontSize:j,fontFamily:J,padding:V,isUniform:!V&&J===F&&j===U}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const W of this._decorationsMetadata.values())W.classNameRef.dispose();this._decorationsMetadata.clear()}};e.InlayHintsController=x,x.ID="editor.contrib.InlayHints",x._MAX_DECORATORS=1500,e.InlayHintsController=x=A=Ee([he(1,r.ILanguageFeaturesService),he(2,d.ILanguageFeatureDebounceService),he(3,T),he(4,m.ICommandService),he(5,D.INotificationService),he(6,w.IInstantiationService)],x);function R(B){const W="\xA0";return B.replace(/[ \t]/g,W)}m.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(B,...W)=>{const[V,U]=W;(0,v.assertType)(b.URI.isUri(V)),(0,v.assertType)(a.Range.isIRange(U));const{inlayHintsProvider:F}=B.get(r.ILanguageFeaturesService),j=await B.get(l.ITextModelService).createModelReference(V);try{const J=await g.InlayHintsFragments.create(F,j.object.textEditorModel,[a.Range.lift(U)],E.CancellationToken.None),le=J.items.map(ee=>ee.hint);return setTimeout(()=>J.dispose(),0),le}finally{j.dispose()}})}),define(ie[914],ne([1,0,14,58,11,39,101,42,68,360,251,383,28,57,18,685,17,330,13]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class d extends _.HoverForeignElementAnchor{constructor(s,g,h,m){super(10,g,s.item.anchor.range,h,m,!0),this.part=s}}let r=class extends b.MarkdownHoverParticipant{constructor(s,g,h,m,C,w){super(s,g,h,m,w),this._resolverService=C,this.hoverOrdinal=6}suggestHoverAnchor(s){var g;if(!o.InlayHintsController.get(this._editor)||s.target.type!==6)return null;const m=(g=s.target.detail.injectedText)===null||g===void 0?void 0:g.options;return m instanceof E.ModelDecorationInjectedTextOptions&&m.attachedData instanceof o.RenderedInlayHintLabelPart?new d(m.attachedData,this,s.event.posx,s.event.posy):null}computeSync(){return[]}computeAsync(s,g,h){return s instanceof d?new L.AsyncIterableObject(async m=>{const{part:C}=s;if(await C.item.resolve(h),h.isCancellationRequested)return;let w;typeof C.item.hint.tooltip=="string"?w=new k.MarkdownString().appendText(C.item.hint.tooltip):C.item.hint.tooltip&&(w=C.item.hint.tooltip),w&&m.emitOne(new b.MarkdownHover(this,s.range,[w],!1,0)),(0,c.isNonEmptyArray)(C.item.hint.textEdits)&&m.emitOne(new b.MarkdownHover(this,s.range,[new k.MarkdownString().appendText((0,a.localize)(0,null))],!1,10001));let D;if(typeof C.part.tooltip=="string"?D=new k.MarkdownString().appendText(C.part.tooltip):C.part.tooltip&&(D=C.part.tooltip),D&&m.emitOne(new b.MarkdownHover(this,s.range,[D],!1,1)),C.part.location||C.part.command){let M;const O=this._editor.getOption(77)==="altKey"?u.isMacintosh?(0,a.localize)(1,null):(0,a.localize)(2,null):u.isMacintosh?(0,a.localize)(3,null):(0,a.localize)(4,null);C.part.location&&C.part.command?M=new k.MarkdownString().appendText((0,a.localize)(5,null,O)):C.part.location?M=new k.MarkdownString().appendText((0,a.localize)(6,null,O)):C.part.command&&(M=new k.MarkdownString(`[${(0,a.localize)(7,null)}](${(0,f.asCommandLink)(C.part.command)} "${C.part.command.title}") (${O})`,{isTrusted:!0})),M&&m.emitOne(new b.MarkdownHover(this,s.range,[M],!1,1e4))}const I=await this._resolveInlayHintLabelPartHover(C,h);for await(const M of I)m.emitOne(M)}):L.AsyncIterableObject.EMPTY}async _resolveInlayHintLabelPartHover(s,g){if(!s.part.location)return L.AsyncIterableObject.EMPTY;const{uri:h,range:m}=s.part.location,C=await this._resolverService.createModelReference(h);try{const w=C.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(w)?(0,v.getHover)(this._languageFeaturesService.hoverProvider,w,new y.Position(m.startLineNumber,m.startColumn),g).filter(D=>!(0,k.isEmptyMarkdownString)(D.hover.contents)).map(D=>new b.MarkdownHover(this,s.item.anchor.range,D.hover.contents,!1,2+D.ordinal)):L.AsyncIterableObject.EMPTY}finally{C.dispose()}}};e.InlayHintsHover=r,e.InlayHintsHover=r=Ee([he(1,p.ILanguageService),he(2,n.IOpenerService),he(3,i.IConfigurationService),he(4,S.ITextModelService),he(5,t.ILanguageFeaturesService)],r)}),define(ie[915],ne([1,0,16,101,383,914]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.InlayHintsController.ID,y.InlayHintsController,1),k.HoverParticipantRegistry.register(E.InlayHintsHover)}),define(ie[384],ne([1,0,2,18,905,904,8,59,29,15,21,186,5,250,382,11,19,32,78,7,307,67,258,299]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let m=h=class extends L.Disposable{constructor(w,D,I,M,A,O,T){super(),this._editor=w,this._contextMenuService=D,this._languageFeaturesService=I,this._instaService=M,this._contextKeyService=T,this._sessionStore=new L.DisposableStore,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new y.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new E.StickyLineCandidateProvider(this._editor,I,A),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new y.StickyScrollWidgetState([],[],0),this._readConfiguration();const N=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(x=>{(x.hasChanged(114)||x.hasChanged(72)||x.hasChanged(66)||x.hasChanged(109))&&this._readConfiguration()})),this._register(d.addDisposableListener(N,d.EventType.CONTEXT_MENU,async x=>{this._onContextMenu(d.getWindow(N),x)})),this._stickyScrollFocusedContextKey=b.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=b.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const P=this._register(d.trackFocus(N));this._register(P.onDidBlur(x=>{this._positionRevealed===!1&&N.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(P.onDidFocus(x=>{this.focus()})),this._registerMouseListeners(),this._register(d.addDisposableListener(N,d.EventType.MOUSE_DOWN,x=>{this._onMouseDown=!0}))}static get(w){return w.getContribution(h.ID)}_disposeFocusStickyScrollStore(){var w;this._stickyScrollFocusedContextKey.set(!1),(w=this._focusDisposableStore)===null||w===void 0||w.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new L.DisposableStore,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(w){this._focusedStickyElementIndex=w?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const w=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:w[this._focusedStickyElementIndex],column:1})}_revealPosition(w){this._reveaInEditor(w,()=>this._editor.revealPosition(w))}_revealLineInCenterIfOutsideViewport(w){this._reveaInEditor(w,()=>this._editor.revealLineInCenterIfOutsideViewport(w.lineNumber,0))}_reveaInEditor(w,D){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,D(),this._editor.setSelection(i.Range.fromPositions(w)),this._editor.focus()}_registerMouseListeners(){const w=this._register(new L.DisposableStore),D=this._register(new o.ClickLinkGesture(this._editor,{extractLineNumberFromMouseEvent:A=>{const O=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);return O?O.lineNumber:0}})),I=A=>{if(!this._editor.hasModel()||A.target.type!==12||A.target.detail!==this._stickyScrollWidget.getId())return null;const O=A.target.element;if(!O||O.innerText!==O.innerHTML)return null;const T=this._stickyScrollWidget.getEditorPositionFromNode(O);return T?{range:new i.Range(T.lineNumber,T.column,T.lineNumber,T.column+O.innerText.length),textElement:O}:null},M=this._stickyScrollWidget.getDomNode();this._register(d.addStandardDisposableListener(M,d.EventType.CLICK,A=>{if(A.ctrlKey||A.altKey||A.metaKey||!A.leftButton)return;if(A.shiftKey){const P=this._stickyScrollWidget.getLineIndexFromChildDomNode(A.target);if(P===null)return;const x=new a.Position(this._endLineNumbers[P],1);this._revealLineInCenterIfOutsideViewport(x);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(A.target)){const P=this._stickyScrollWidget.getLineNumberFromChildDomNode(A.target);this._toggleFoldingRegionForLine(P);return}if(!this._stickyScrollWidget.isInStickyLine(A.target))return;let N=this._stickyScrollWidget.getEditorPositionFromNode(A.target);if(!N){const P=this._stickyScrollWidget.getLineNumberFromChildDomNode(A.target);if(P===null)return;N=new a.Position(P,1)}this._revealPosition(N)})),this._register(d.addStandardDisposableListener(M,d.EventType.MOUSE_MOVE,A=>{if(A.shiftKey){const O=this._stickyScrollWidget.getLineIndexFromChildDomNode(A.target);if(O===null||this._showEndForLine!==null&&this._showEndForLine===O)return;this._showEndForLine=O,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(d.addDisposableListener(M,d.EventType.MOUSE_LEAVE,A=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(D.onMouseMoveOrRelevantKeyDown(([A,O])=>{const T=I(A);if(!T||!A.hasTriggerModifier||!this._editor.hasModel()){w.clear();return}const{range:N,textElement:P}=T;if(!N.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=N,w.clear();else if(P.style.textDecoration==="underline")return;const x=new u.CancellationTokenSource;w.add((0,L.toDisposable)(()=>x.dispose(!0)));let R;(0,n.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new a.Position(N.startLineNumber,N.startColumn+1),x.token).then(B=>{if(!x.token.isCancellationRequested)if(B.length!==0){this._candidateDefinitionsLength=B.length;const W=P;R!==W?(w.clear(),R=W,R.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{R.style.textDecoration="none"}))):R||(R=W,R.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{R.style.textDecoration="none"})))}else w.clear()})})),this._register(D.onCancel(()=>{w.clear()})),this._register(D.onExecute(async A=>{if(A.target.type!==12||A.target.detail!==this._stickyScrollWidget.getId())return;const O=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);O&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:O.lineNumber,column:1})),this._instaService.invokeFunction(t.goToDefinitionWithLocation,A,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))}))}_onContextMenu(w,D){const I=new l.StandardMouseEvent(w,D);this._contextMenuService.showContextMenu({menuId:S.MenuId.StickyScrollContext,getAnchor:()=>I})}_toggleFoldingRegionForLine(w){if(!this._foldingModel||w===null)return;const D=this._stickyScrollWidget.getStickyLineForLine(w),I=D?.foldingIcon;if(!I)return;(0,g.toggleCollapseState)(this._foldingModel,Number.MAX_VALUE,[w]),I.isCollapsed=!I.isCollapsed;const M=(I.isCollapsed?this._editor.getTopForLineNumber(I.foldingEndLine):this._editor.getTopForLineNumber(I.foldingStartLine))-this._editor.getOption(66)*D.index+1;this._editor.setScrollTop(M),this._renderStickyScroll(w)}_readConfiguration(){const w=this._editor.getOption(114);if(w.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else w.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(I=>{I.scrollTopChanged&&(this._showEndForLine=null,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._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll(-1)}))}_needsUpdate(w){const D=this._stickyScrollWidget.getCurrentLines();for(const I of D)for(const M of w.ranges)if(I>=M.fromLineNumber&&I<=M.toLineNumber)return!0;return!1}_onTokensChange(w){this._needsUpdate(w)&&this._renderStickyScroll(-1)}_onDidResize(){const D=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(D*.25)}async _renderStickyScroll(w=1/0){var D,I;const M=this._editor.getModel();if(!M||M.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,w);return}const A=this._stickyLineCandidateProvider.getVersionId();if(A===void 0||A===M.getVersionId())if(this._foldingModel=(I=await((D=s.FoldingController.get(this._editor))===null||D===void 0?void 0:D.getFoldingModel()))!==null&&I!==void 0?I:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const O=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(O)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}}findScrollWidgetState(){const w=this._editor.getOption(66),D=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),I=this._editor.getScrollTop();let M=0;const A=[],O=[],T=this._editor.getVisibleRanges();if(T.length!==0){const N=new r.StickyRange(T[0].startLineNumber,T[T.length-1].endLineNumber),P=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(N);for(const x of P){const R=x.startLineNumber,B=x.endLineNumber,W=x.nestingDepth;if(B-R>0){const V=(W-1)*w,U=W*w,F=this._editor.getBottomForLineNumber(R)-I,j=this._editor.getTopForLineNumber(B)-I,J=this._editor.getBottomForLineNumber(B)-I;if(V>j&&V<=J){A.push(R),O.push(B+1),M=J-U;break}else U>F&&U<=J&&(A.push(R),O.push(B+1));if(A.length===D)break}}}return this._endLineNumbers=O,new y.StickyScrollWidgetState(A,O,M,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};e.StickyScrollController=m,m.ID="store.contrib.stickyScrollController",e.StickyScrollController=m=h=Ee([he(1,p.IContextMenuService),he(2,k.ILanguageFeaturesService),he(3,_.IInstantiationService),he(4,f.ILanguageConfigurationService),he(5,c.ILanguageFeatureDebounceService),he(6,v.IContextKeyService)],m)}),define(ie[916],ne([1,0,16,708,750,29,28,15,21,384]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=e.GoToStickyScrollLine=e.SelectPreviousStickyScrollLine=e.SelectNextStickyScrollLine=e.FocusStickyScroll=e.ToggleStickyScroll=void 0;class b extends E.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,k.localize)(0,null),mnemonicTitle:(0,k.localize)(1,null),original:"Toggle Sticky Scroll"},category:y.Categories.View,toggled:{condition:p.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,k.localize)(2,null),mnemonicTitle:(0,k.localize)(3,null)},menu:[{id:E.MenuId.CommandPalette},{id:E.MenuId.MenubarAppearanceMenu,group:"4_editor",order:3},{id:E.MenuId.StickyScrollContext}]})}async run(c){const d=c.get(_.IConfigurationService),r=!d.getValue("editor.stickyScroll.enabled");return d.updateValue("editor.stickyScroll.enabled",r)}}e.ToggleStickyScroll=b;const o=100;class i extends L.EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:(0,k.localize)(4,null),mnemonicTitle:(0,k.localize)(5,null),original:"Focus Sticky Scroll"},precondition:p.ContextKeyExpr.and(p.ContextKeyExpr.has("config.editor.stickyScroll.enabled"),S.EditorContextKeys.stickyScrollVisible),menu:[{id:E.MenuId.CommandPalette}]})}runEditorCommand(c,d){var r;(r=v.StickyScrollController.get(d))===null||r===void 0||r.focus()}}e.FocusStickyScroll=i;class n extends L.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,k.localize)(6,null),original:"Select next sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:o,primary:18}})}runEditorCommand(c,d){var r;(r=v.StickyScrollController.get(d))===null||r===void 0||r.focusNext()}}e.SelectNextStickyScrollLine=n;class t extends L.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,k.localize)(7,null),original:"Select previous sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:o,primary:16}})}runEditorCommand(c,d){var r;(r=v.StickyScrollController.get(d))===null||r===void 0||r.focusPrevious()}}e.SelectPreviousStickyScrollLine=t;class a extends L.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,k.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:o,primary:3}})}runEditorCommand(c,d){var r;(r=v.StickyScrollController.get(d))===null||r===void 0||r.goToFocused()}}e.GoToStickyScrollLine=a;class u extends L.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,k.localize)(9,null),original:"Select Editor"},precondition:S.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:o,primary:9}})}runEditorCommand(c,d){var r;(r=v.StickyScrollController.get(d))===null||r===void 0||r.selectEditor()}}e.SelectEditor=u}),define(ie[917],ne([1,0,16,916,384,29]),function(Q,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.StickyScrollController.ID,y.StickyScrollController,1),(0,E.registerAction2)(k.ToggleStickyScroll),(0,E.registerAction2)(k.FocusStickyScroll),(0,E.registerAction2)(k.SelectPreviousStickyScrollLine),(0,E.registerAction2)(k.SelectNextStickyScrollLine),(0,E.registerAction2)(k.GoToStickyScrollLine),(0,E.registerAction2)(k.SelectEditor)}),define(ie[918],ne([1,0,16,33,379,28,15,8,47,91]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let b=class extends y.ReferencesController{constructor(i,n,t,a,u,f,c){super(!0,i,n,t,a,u,f,c)}};e.StandaloneReferencesController=b,e.StandaloneReferencesController=b=Ee([he(1,_.IContextKeyService),he(2,k.ICodeEditorService),he(3,S.INotificationService),he(4,p.IInstantiationService),he(5,v.IStorageService),he(6,E.IConfigurationService)],b),(0,L.registerEditorContribution)(y.ReferencesController.ID,b,4)}),define(ie[919],ne([1,0,9,2,44,100,747,162,46,47,193]),function(Q,e,L,k,y,E,_,p,S,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const o=!1;function i(g){return g.scheme===y.Schemas.file?g.fsPath:g.path}let n=0;class t{constructor(h,m,C,w,D,I,M){this.id=++n,this.type=0,this.actual=h,this.label=h.label,this.confirmBeforeUndo=h.confirmBeforeUndo||!1,this.resourceLabel=m,this.strResource=C,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=w,this.groupOrder=D,this.sourceId=I,this.sourceOrder=M,this.isValid=!0}setValid(h){this.isValid=h}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class a{constructor(h,m){this.resourceLabel=h,this.reason=m}}class u{constructor(){this.elements=new Map}createMessage(){const h=[],m=[];for(const[,w]of this.elements)(w.reason===0?h:m).push(w.resourceLabel);const C=[];return h.length>0&&C.push(_.localize(0,null,h.join(", "))),m.length>0&&C.push(_.localize(1,null,m.join(", "))),C.join(` `)}get size(){return this.elements.size}has(h){return this.elements.has(h)}set(h,m){this.elements.set(h,m)}delete(h){return this.elements.delete(h)}}class f{constructor(h,m,C,w,D,I,M){this.id=++n,this.type=1,this.actual=h,this.label=h.label,this.confirmBeforeUndo=h.confirmBeforeUndo||!1,this.resourceLabels=m,this.strResources=C,this.groupId=w,this.groupOrder=D,this.sourceId=I,this.sourceOrder=M,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(h,m,C){this.removedResources||(this.removedResources=new u),this.removedResources.has(m)||this.removedResources.set(m,new a(h,C))}setValid(h,m,C){C?this.invalidatedResources&&(this.invalidatedResources.delete(m),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new u),this.invalidatedResources.has(m)||this.invalidatedResources.set(m,new a(h,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class c{constructor(h,m){this.resourceLabel=h,this.strResource=m,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const h of this._past)h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0);for(const h of this._future)h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const h=[];h.push(`* ${this.strResource}:`);for(let m=0;m=0;m--)h.push(` * [REDO] ${this._future[m]}`);return h.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(h,m){h.type===1?h.setValid(this.resourceLabel,this.strResource,m):h.setValid(m)}setElementsValidFlag(h,m){for(const C of this._past)m(C.actual)&&this._setElementValidFlag(C,h);for(const C of this._future)m(C.actual)&&this._setElementValidFlag(C,h)}pushElement(h){for(const m of this._future)m.type===1&&m.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(h),this.versionId++}createSnapshot(h){const m=[];for(let C=0,w=this._past.length;C=0;C--)m.push(this._future[C].id);return new b.ResourceEditStackSnapshot(h,m)}restoreSnapshot(h){const m=h.elements.length;let C=!0,w=0,D=-1;for(let M=0,A=this._past.length;M=m||O.id!==h.elements[w])&&(C=!1,D=0),!C&&O.type===1&&O.removeResource(this.resourceLabel,this.strResource,0)}let I=-1;for(let M=this._future.length-1;M>=0;M--,w++){const A=this._future[M];C&&(w>=m||A.id!==h.elements[w])&&(C=!1,I=M),!C&&A.type===1&&A.removeResource(this.resourceLabel,this.strResource,0)}D!==-1&&(this._past=this._past.slice(0,D)),I!==-1&&(this._future=this._future.slice(I+1)),this.versionId++}getElements(){const h=[],m=[];for(const C of this._past)h.push(C.actual);for(const C of this._future)m.push(C.actual);return{past:h,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(h,m){for(let C=this._past.length-1;C>=0;C--)if(this._past[C]===h){m.has(this.strResource)?this._past[C]=m.get(this.strResource):this._past.splice(C,1);break}this.versionId++}splitFutureWorkspaceElement(h,m){for(let C=this._future.length-1;C>=0;C--)if(this._future[C]===h){m.has(this.strResource)?this._future[C]=m.get(this.strResource):this._future.splice(C,1);break}this.versionId++}moveBackward(h){this._past.pop(),this._future.push(h),this.versionId++}moveForward(h){this._future.pop(),this._past.push(h),this.versionId++}}class d{constructor(h){this.editStacks=h,this._versionIds=[];for(let m=0,C=this.editStacks.length;mm.sourceOrder)&&(m=I,C=w)}return[m,C]}canUndo(h){if(h instanceof b.UndoRedoSource){const[,C]=this._findClosestUndoElementWithSource(h.id);return!!C}const m=this.getUriComparisonKey(h);return this._editStacks.has(m)?this._editStacks.get(m).hasPastElements():!1}_onError(h,m){(0,L.onUnexpectedError)(h);for(const C of m.strResources)this.removeElements(C);this._notificationService.error(h)}_acquireLocks(h){for(const m of h.editStacks)if(m.locked)throw new Error("Cannot acquire edit stack lock");for(const m of h.editStacks)m.locked=!0;return()=>{for(const m of h.editStacks)m.locked=!1}}_safeInvokeWithLocks(h,m,C,w,D){const I=this._acquireLocks(C);let M;try{M=m()}catch(A){return I(),w.dispose(),this._onError(A,h)}return M?M.then(()=>(I(),w.dispose(),D()),A=>(I(),w.dispose(),this._onError(A,h))):(I(),w.dispose(),D())}async _invokeWorkspacePrepare(h){if(typeof h.actual.prepareUndoRedo>"u")return k.Disposable.None;const m=h.actual.prepareUndoRedo();return typeof m>"u"?k.Disposable.None:m}_invokeResourcePrepare(h,m){if(h.actual.type!==1||typeof h.actual.prepareUndoRedo>"u")return m(k.Disposable.None);const C=h.actual.prepareUndoRedo();return C?(0,k.isDisposable)(C)?m(C):C.then(w=>m(w)):m(k.Disposable.None)}_getAffectedEditStacks(h){const m=[];for(const C of h.strResources)m.push(this._editStacks.get(C)||r);return new d(m)}_tryToSplitAndUndo(h,m,C,w){if(m.canSplit())return this._splitPastWorkspaceElement(m,C),this._notificationService.warn(w),new s(this._undo(h,0,!0));for(const D of m.strResources)this.removeElements(D);return this._notificationService.warn(w),new s}_checkWorkspaceUndo(h,m,C,w){if(m.removedResources)return this._tryToSplitAndUndo(h,m,m.removedResources,_.localize(2,null,m.label,m.removedResources.createMessage()));if(w&&m.invalidatedResources)return this._tryToSplitAndUndo(h,m,m.invalidatedResources,_.localize(3,null,m.label,m.invalidatedResources.createMessage()));const D=[];for(const M of C.editStacks)M.getClosestPastElement()!==m&&D.push(M.resourceLabel);if(D.length>0)return this._tryToSplitAndUndo(h,m,null,_.localize(4,null,m.label,D.join(", ")));const I=[];for(const M of C.editStacks)M.locked&&I.push(M.resourceLabel);return I.length>0?this._tryToSplitAndUndo(h,m,null,_.localize(5,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndUndo(h,m,null,_.localize(6,null,m.label))}_workspaceUndo(h,m,C){const w=this._getAffectedEditStacks(m),D=this._checkWorkspaceUndo(h,m,w,!1);return D?D.returnValue:this._confirmAndExecuteWorkspaceUndo(h,m,w,C)}_isPartOfUndoGroup(h){if(!h.groupId)return!1;for(const[,m]of this._editStacks){const C=m.getClosestPastElement();if(C){if(C===h){const w=m.getSecondClosestPastElement();if(w&&w.groupId===h.groupId)return!0}if(C.groupId===h.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(h,m,C,w){if(m.canSplit()&&!this._isPartOfUndoGroup(m)){let M;(function(T){T[T.All=0]="All",T[T.This=1]="This",T[T.Cancel=2]="Cancel"})(M||(M={}));const{result:A}=await this._dialogService.prompt({type:E.default.Info,message:_.localize(7,null,m.label),buttons:[{label:_.localize(8,null,C.editStacks.length),run:()=>M.All},{label:_.localize(9,null),run:()=>M.This}],cancelButton:{run:()=>M.Cancel}});if(A===M.Cancel)return;if(A===M.This)return this._splitPastWorkspaceElement(m,null),this._undo(h,0,!0);const O=this._checkWorkspaceUndo(h,m,C,!1);if(O)return O.returnValue;w=!0}let D;try{D=await this._invokeWorkspacePrepare(m)}catch(M){return this._onError(M,m)}const I=this._checkWorkspaceUndo(h,m,C,!0);if(I)return D.dispose(),I.returnValue;for(const M of C.editStacks)M.moveBackward(m);return this._safeInvokeWithLocks(m,()=>m.actual.undo(),C,D,()=>this._continueUndoInGroup(m.groupId,w))}_resourceUndo(h,m,C){if(!m.isValid){h.flushAllElements();return}if(h.locked){const w=_.localize(10,null,m.label);this._notificationService.warn(w);return}return this._invokeResourcePrepare(m,w=>(h.moveBackward(m),this._safeInvokeWithLocks(m,()=>m.actual.undo(),new d([h]),w,()=>this._continueUndoInGroup(m.groupId,C))))}_findClosestUndoElementInGroup(h){if(!h)return[null,null];let m=null,C=null;for(const[w,D]of this._editStacks){const I=D.getClosestPastElement();I&&I.groupId===h&&(!m||I.groupOrder>m.groupOrder)&&(m=I,C=w)}return[m,C]}_continueUndoInGroup(h,m){if(!h)return;const[,C]=this._findClosestUndoElementInGroup(h);if(C)return this._undo(C,0,m)}undo(h){if(h instanceof b.UndoRedoSource){const[,m]=this._findClosestUndoElementWithSource(h.id);return m?this._undo(m,h.id,!1):void 0}return typeof h=="string"?this._undo(h,0,!1):this._undo(this.getUriComparisonKey(h),0,!1)}_undo(h,m=0,C){if(!this._editStacks.has(h))return;const w=this._editStacks.get(h),D=w.getClosestPastElement();if(!D)return;if(D.groupId){const[M,A]=this._findClosestUndoElementInGroup(D.groupId);if(D!==M&&A)return this._undo(A,m,C)}if((D.sourceId!==m||D.confirmBeforeUndo)&&!C)return this._confirmAndContinueUndo(h,m,D);try{return D.type===1?this._workspaceUndo(h,D,C):this._resourceUndo(w,D,C)}finally{o&&this._print("undo")}}async _confirmAndContinueUndo(h,m,C){if((await this._dialogService.confirm({message:_.localize(11,null,C.label),primaryButton:_.localize(12,null),cancelButton:_.localize(13,null)})).confirmed)return this._undo(h,m,!0)}_findClosestRedoElementWithSource(h){if(!h)return[null,null];let m=null,C=null;for(const[w,D]of this._editStacks){const I=D.getClosestFutureElement();I&&I.sourceId===h&&(!m||I.sourceOrder0)return this._tryToSplitAndRedo(h,m,null,_.localize(16,null,m.label,D.join(", ")));const I=[];for(const M of C.editStacks)M.locked&&I.push(M.resourceLabel);return I.length>0?this._tryToSplitAndRedo(h,m,null,_.localize(17,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndRedo(h,m,null,_.localize(18,null,m.label))}_workspaceRedo(h,m){const C=this._getAffectedEditStacks(m),w=this._checkWorkspaceRedo(h,m,C,!1);return w?w.returnValue:this._executeWorkspaceRedo(h,m,C)}async _executeWorkspaceRedo(h,m,C){let w;try{w=await this._invokeWorkspacePrepare(m)}catch(I){return this._onError(I,m)}const D=this._checkWorkspaceRedo(h,m,C,!0);if(D)return w.dispose(),D.returnValue;for(const I of C.editStacks)I.moveForward(m);return this._safeInvokeWithLocks(m,()=>m.actual.redo(),C,w,()=>this._continueRedoInGroup(m.groupId))}_resourceRedo(h,m){if(!m.isValid){h.flushAllElements();return}if(h.locked){const C=_.localize(19,null,m.label);this._notificationService.warn(C);return}return this._invokeResourcePrepare(m,C=>(h.moveForward(m),this._safeInvokeWithLocks(m,()=>m.actual.redo(),new d([h]),C,()=>this._continueRedoInGroup(m.groupId))))}_findClosestRedoElementInGroup(h){if(!h)return[null,null];let m=null,C=null;for(const[w,D]of this._editStacks){const I=D.getClosestFutureElement();I&&I.groupId===h&&(!m||I.groupOrder"u")return typeof t=="string"?{id:(0,k.basename)(t)}:a?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const u=t;return u.configuration?{id:u.id,configPath:u.configuration}:u.folders.length===1?{id:u.id,uri:u.folders[0].uri}:{id:u.id}}e.toWorkspaceIdentifier=v;function b(t){const a=t;return typeof a?.id=="string"&&E.URI.isUri(a.configPath)}e.isWorkspaceIdentifier=b;class o{constructor(a,u,f,c,d){this._id=a,this._transient=f,this._configuration=c,this._ignorePathCasing=d,this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=u}get folders(){return this._folders}set folders(a){this._folders=a,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(a){this._configuration=a}getFolder(a){return a&&this._foldersMap.findSubstr(a)||null}updateFoldersMap(){this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const a of this.folders)this._foldersMap.set(a.uri,a)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=o;class i{constructor(a,u){this.raw=u,this.uri=a.uri,this.index=a.index,this.name=a.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=i,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_FILTER=[{name:(0,L.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function n(t){return t.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=n}),define(ie[920],ne([1,0,7,132,41,2,17,16,21,657,29,15,59,34,28,167]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let f=u=class{static get(r){return r.getContribution(u.ID)}constructor(r,l,s,g,h,m,C,w){this._contextMenuService=l,this._contextViewService=s,this._contextKeyService=g,this._keybindingService=h,this._menuService=m,this._configurationService=C,this._workspaceContextService=w,this._toDispose=new E.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=r,this._toDispose.add(this._editor.onContextMenu(D=>this._onContextMenu(D))),this._toDispose.add(this._editor.onMouseWheel(D=>{if(this._contextMenuIsBeingShownCount>0){const I=this._contextViewService.getContextViewElement(),M=D.srcElement;M.shadowRoot&&L.getShadowRoot(I)===M.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(D=>{this._editor.getOption(24)&&D.keyCode===58&&(D.preventDefault(),D.stopPropagation(),this.showContextMenu())}))}_onContextMenu(r){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),r.target.position&&!this._editor.getSelection().containsPosition(r.target.position)&&this._editor.setPosition(r.target.position);return}if(r.target.type===12||r.target.type===6&&r.target.detail.injectedText)return;if(r.event.preventDefault(),r.event.stopPropagation(),r.target.type===11)return this._showScrollbarContextMenu(r.event);if(r.target.type!==6&&r.target.type!==7&&r.target.type!==1)return;if(this._editor.focus(),r.target.position){let s=!1;for(const g of this._editor.getSelections())if(g.containsPosition(r.target.position)){s=!0;break}s||this._editor.setPosition(r.target.position)}let l=null;r.target.type!==1&&(l=r.event),this.showContextMenu(l)}showContextMenu(r){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const l=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?b.MenuId.SimpleEditorContext:b.MenuId.EditorContext);l.length>0&&this._doShowContextMenu(l,r)}_getMenuActions(r,l){const s=[],g=this._menuService.createMenu(l,this._contextKeyService),h=g.getActions({arg:r.uri});g.dispose();for(const m of h){const[,C]=m;let w=0;for(const D of C)if(D instanceof b.SubmenuItemAction){const I=this._getMenuActions(r,D.item.submenu);I.length>0&&(s.push(new y.SubmenuAction(D.id,D.label,I)),w++)}else s.push(D),w++;w&&s.push(new y.Separator)}return s.length&&s.pop(),s}_doShowContextMenu(r,l=null){if(!this._editor.hasModel())return;const s=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let g=l;if(!g){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const m=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),C=L.getDomNodePagePosition(this._editor.getDomNode()),w=C.left+m.left,D=C.top+m.top+m.height;g={x:w,y:D}}const h=this._editor.getOption(126)&&!_.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:h?this._editor.getDomNode():void 0,getAnchor:()=>g,getActions:()=>r,getActionViewItem:m=>{const C=this._keybindingFor(m);if(C)return new k.ActionViewItem(m,m,{label:!0,keybinding:C.getLabel(),isMenu:!0});const w=m;return typeof w.getActionViewItem=="function"?w.getActionViewItem():new k.ActionViewItem(m,m,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:m=>this._keybindingFor(m),onHide:m=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:s})}})}_showScrollbarContextMenu(r){if(!this._editor.hasModel()||(0,a.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const l=this._editor.getOption(72);let s=0;const g=D=>({id:`menu-action-${++s}`,label:D.label,tooltip:"",class:void 0,enabled:typeof D.enabled>"u"?!0:D.enabled,checked:D.checked,run:D.run}),h=(D,I)=>new y.SubmenuAction(`menu-action-${++s}`,D,I,void 0),m=(D,I,M,A,O)=>{if(!I)return g({label:D,enabled:I,run:()=>{}});const T=P=>()=>{this._configurationService.updateValue(M,P)},N=[];for(const P of O)N.push(g({label:P.label,checked:A===P.value,run:T(P.value)}));return h(D,N)},C=[];C.push(g({label:v.localize(0,null),checked:l.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!l.enabled)}})),C.push(new y.Separator),C.push(g({label:v.localize(1,null),enabled:l.enabled,checked:l.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!l.renderCharacters)}})),C.push(m(v.localize(2,null),l.enabled,"editor.minimap.size",l.size,[{label:v.localize(3,null),value:"proportional"},{label:v.localize(4,null),value:"fill"},{label:v.localize(5,null),value:"fit"}])),C.push(m(v.localize(6,null),l.enabled,"editor.minimap.showSlider",l.showSlider,[{label:v.localize(7,null),value:"mouseover"},{label:v.localize(8,null),value:"always"}]));const w=this._editor.getOption(126)&&!_.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:w?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>C,onHide:D=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(r){return this._keybindingService.lookupKeybinding(r.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};e.ContextMenuController=f,f.ID="editor.contrib.contextmenu",e.ContextMenuController=f=u=Ee([he(1,i.IContextMenuService),he(2,i.IContextViewService),he(3,o.IContextKeyService),he(4,n.IKeybindingService),he(5,b.IMenuService),he(6,t.IConfigurationService),he(7,a.IWorkspaceContextService)],f);class c extends p.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:v.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(r,l){var s;(s=f.get(l))===null||s===void 0||s.showContextMenu()}}(0,p.registerEditorContribution)(f.ID,f,2),(0,p.registerEditorAction)(c)}),define(ie[385],ne([1,0,13,174,2,108,44,45,22,18,661,167]),function(Q,e,L,k,y,E,_,p,S,v,b,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultPasteProvidersFeature=e.DefaultDropProvidersFeature=void 0;const i=(0,b.localize)(0,null);class n{async provideDocumentPasteEdits(l,s,g,h){const m=await this.getEdit(g,h);return m?{insertText:m.insertText,label:m.label,detail:m.detail,handledMimeType:m.handledMimeType,yieldTo:m.yieldTo}:void 0}async provideDocumentOnDropEdits(l,s,g,h){const m=await this.getEdit(g,h);return m?{insertText:m.insertText,label:m.label,handledMimeType:m.handledMimeType,yieldTo:m.yieldTo}:void 0}}class t extends n{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[E.Mimes.text],this.pasteMimeTypes=[E.Mimes.text]}async getEdit(l,s){const g=l.get(E.Mimes.text);if(!g||l.has(E.Mimes.uriList))return;const h=await g.asString();return{handledMimeType:E.Mimes.text,label:(0,b.localize)(1,null),detail:i,insertText:h}}}class a extends n{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[E.Mimes.uriList],this.pasteMimeTypes=[E.Mimes.uriList]}async getEdit(l,s){const g=await f(l);if(!g.length||s.isCancellationRequested)return;let h=0;const m=g.map(({uri:w,originalText:D})=>w.scheme===_.Schemas.file?w.fsPath:(h++,D)).join(" ");let C;return h>0?C=g.length>1?(0,b.localize)(2,null):(0,b.localize)(3,null):C=g.length>1?(0,b.localize)(4,null):(0,b.localize)(5,null),{handledMimeType:E.Mimes.uriList,insertText:m,label:C,detail:i}}}let u=class extends n{constructor(l){super(),this._workspaceContextService=l,this.id="relativePath",this.dropMimeTypes=[E.Mimes.uriList],this.pasteMimeTypes=[E.Mimes.uriList]}async getEdit(l,s){const g=await f(l);if(!g.length||s.isCancellationRequested)return;const h=(0,L.coalesce)(g.map(({uri:m})=>{const C=this._workspaceContextService.getWorkspaceFolder(m);return C?(0,p.relativePath)(C.uri,m):void 0}));if(h.length)return{handledMimeType:E.Mimes.uriList,insertText:h.join(" "),label:g.length>1?(0,b.localize)(6,null):(0,b.localize)(7,null),detail:i}}};u=Ee([he(0,o.IWorkspaceContextService)],u);async function f(r){const l=r.get(E.Mimes.uriList);if(!l)return[];const s=await l.asString(),g=[];for(const h of k.UriList.parse(s))try{g.push({uri:S.URI.parse(h),originalText:h})}catch{}return g}let c=class extends y.Disposable{constructor(l,s){super(),this._register(l.documentOnDropEditProvider.register("*",new t)),this._register(l.documentOnDropEditProvider.register("*",new a)),this._register(l.documentOnDropEditProvider.register("*",new u(s)))}};e.DefaultDropProvidersFeature=c,e.DefaultDropProvidersFeature=c=Ee([he(0,v.ILanguageFeaturesService),he(1,o.IWorkspaceContextService)],c);let d=class extends y.Disposable{constructor(l,s){super(),this._register(l.documentPasteEditProvider.register("*",new t)),this._register(l.documentPasteEditProvider.register("*",new a)),this._register(l.documentPasteEditProvider.register("*",new u(s)))}};e.DefaultPasteProvidersFeature=d,e.DefaultPasteProvidersFeature=d=Ee([he(0,v.ILanguageFeaturesService),he(1,o.IWorkspaceContextService)],d)}),define(ie[921],ne([1,0,16,152,899,385,659]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.CopyPasteController.ID,y.CopyPasteController,0),(0,k.registerEditorFeature)(E.DefaultPasteProvidersFeature),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:y.changePasteTypeCommandId,precondition:y.pasteWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(p,S,v){var b;return(b=y.CopyPasteController.get(S))===null||b===void 0?void 0:b.changePasteType()}}),(0,L.registerEditorAction)(class extends L.EditorAction{constructor(){super({id:"editor.action.pasteAs",label:_.localize(0,null),alias:"Paste As...",precondition:void 0,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:_.localize(1,null)}}}}]}})}run(p,S,v){var b;const o=typeof v?.id=="string"?v.id:void 0;return(b=y.CopyPasteController.get(S))===null||b===void 0?void 0:b.pasteAs(o)}})}),define(ie[922],ne([1,0,16,244,152,385,662,97,37,900]),function(Q,e,L,k,y,E,_,p,S,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(v.DropIntoEditorController.ID,v.DropIntoEditorController,2),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:v.changeDropTypeCommandId,precondition:v.dropWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(b,o,i){var n;(n=v.DropIntoEditorController.get(o))===null||n===void 0||n.changeDropType()}}),(0,y.registerEditorFeature)(E.DefaultDropProvidersFeature),S.Registry.as(p.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{[v.defaultProviderConfig]:{type:"object",scope:5,description:_.localize(0,null),default:{},additionalProperties:{type:"string"}}}})}),define(ie[923],ne([1,0,582,94,45,12,173,32,131,707,167]),function(Q,e,L,k,y,E,_,p,S,v,b){"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,CURRENT_TIMEZONE_OFFSET:!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 o{constructor(r){this._delegates=r}resolve(r){for(const l of this._delegates){const s=l.resolve(r);if(s!==void 0)return s}}}e.CompositeSnippetVariableResolver=o;class i{constructor(r,l,s,g){this._model=r,this._selection=l,this._selectionIdx=s,this._overtypingCapturer=g}resolve(r){const{name:l}=r;if(l==="SELECTION"||l==="TM_SELECTED_TEXT"){let s=this._model.getValueInRange(this._selection)||void 0,g=this._selection.startLineNumber!==this._selection.endLineNumber;if(!s&&this._overtypingCapturer){const h=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);h&&(s=h.value,g=h.multiline)}if(s&&g&&r.snippet){const h=this._model.getLineContent(this._selection.startLineNumber),m=(0,E.getLeadingWhitespace)(h,0,this._selection.startColumn-1);let C=m;r.snippet.walk(D=>D===r?!1:(D instanceof S.Text&&(C=(0,E.getLeadingWhitespace)((0,E.splitLines)(D.value).pop())),!0));const w=(0,E.commonPrefixLength)(C,m);s=s.replace(/(\r\n|\r|\n)(.*)/g,(D,I,M)=>`${I}${C.substr(w)}${M}`)}return s}else{if(l==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(l==="TM_CURRENT_WORD"){const s=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return s&&s.word||void 0}else{if(l==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(l==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(l==="CURSOR_INDEX")return String(this._selectionIdx);if(l==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=i;class n{constructor(r,l){this._labelService=r,this._model=l}resolve(r){const{name:l}=r;if(l==="TM_FILENAME")return k.basename(this._model.uri.fsPath);if(l==="TM_FILENAME_BASE"){const s=k.basename(this._model.uri.fsPath),g=s.lastIndexOf(".");return g<=0?s:s.slice(0,g)}else{if(l==="TM_DIRECTORY")return k.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,y.dirname)(this._model.uri));if(l==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(l==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=n;class t{constructor(r,l,s,g){this._readClipboardText=r,this._selectionIdx=l,this._selectionCount=s,this._spread=g}resolve(r){if(r.name!=="CLIPBOARD")return;const l=this._readClipboardText();if(l){if(this._spread){const s=l.split(/\r\n|\n|\r/).filter(g=>!(0,E.isFalsyOrWhitespace)(g));if(s.length===this._selectionCount)return s[this._selectionIdx]}return l}}}e.ClipboardBasedVariableResolver=t;let a=class{constructor(r,l,s){this._model=r,this._selection=l,this._languageConfigurationService=s}resolve(r){const{name:l}=r,s=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),g=this._languageConfigurationService.getLanguageConfiguration(s).comments;if(g){if(l==="LINE_COMMENT")return g.lineCommentToken||void 0;if(l==="BLOCK_COMMENT_START")return g.blockCommentStartToken||void 0;if(l==="BLOCK_COMMENT_END")return g.blockCommentEndToken||void 0}}};e.CommentBasedVariableResolver=a,e.CommentBasedVariableResolver=a=Ee([he(2,p.ILanguageConfigurationService)],a);class u{constructor(){this._date=new Date}resolve(r){const{name:l}=r;if(l==="CURRENT_YEAR")return String(this._date.getFullYear());if(l==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(l==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(l==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(l==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(l==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(l==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(l==="CURRENT_DAY_NAME")return u.dayNames[this._date.getDay()];if(l==="CURRENT_DAY_NAME_SHORT")return u.dayNamesShort[this._date.getDay()];if(l==="CURRENT_MONTH_NAME")return u.monthNames[this._date.getMonth()];if(l==="CURRENT_MONTH_NAME_SHORT")return u.monthNamesShort[this._date.getMonth()];if(l==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(l==="CURRENT_TIMEZONE_OFFSET"){const s=this._date.getTimezoneOffset(),g=s>0?"-":"+",h=Math.trunc(Math.abs(s/60)),m=h<10?"0"+h:h,C=Math.abs(s)-h*60,w=C<10?"0"+C:C;return g+m+":"+w}}}e.TimeBasedVariableResolver=u,u.dayNames=[v.localize(0,null),v.localize(1,null),v.localize(2,null),v.localize(3,null),v.localize(4,null),v.localize(5,null),v.localize(6,null)],u.dayNamesShort=[v.localize(7,null),v.localize(8,null),v.localize(9,null),v.localize(10,null),v.localize(11,null),v.localize(12,null),v.localize(13,null)],u.monthNames=[v.localize(14,null),v.localize(15,null),v.localize(16,null),v.localize(17,null),v.localize(18,null),v.localize(19,null),v.localize(20,null),v.localize(21,null),v.localize(22,null),v.localize(23,null),v.localize(24,null),v.localize(25,null)],u.monthNamesShort=[v.localize(26,null),v.localize(27,null),v.localize(28,null),v.localize(29,null),v.localize(30,null),v.localize(31,null),v.localize(32,null),v.localize(33,null),v.localize(34,null),v.localize(35,null),v.localize(36,null),v.localize(37,null)];class f{constructor(r){this._workspaceService=r}resolve(r){if(!this._workspaceService)return;const l=(0,b.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,b.isEmptyWorkspaceIdentifier)(l)){if(r.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(l);if(r.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(l)}}_resolveWorkspaceName(r){if((0,b.isSingleFolderWorkspaceIdentifier)(r))return k.basename(r.uri.path);let l=k.basename(r.configPath.path);return l.endsWith(b.WORKSPACE_EXTENSION)&&(l=l.substr(0,l.length-b.WORKSPACE_EXTENSION.length-1)),l}_resoveWorkspacePath(r){if((0,b.isSingleFolderWorkspaceIdentifier)(r))return(0,L.normalizeDriveLetter)(r.uri.fsPath);const l=k.basename(r.configPath.path);let s=r.configPath.fsPath;return s.endsWith(l)&&(s=s.substr(0,s.length-l.length-1)),s?(0,L.normalizeDriveLetter)(s):"/"}}e.WorkspaceBasedVariableResolver=f;class c{resolve(r){const{name:l}=r;if(l==="RANDOM")return Math.random().toString().slice(-6);if(l==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(l==="UUID")return(0,_.generateUuid)()}}e.RandomBasedVariableResolver=c}),define(ie[386],ne([1,0,13,2,12,74,5,24,32,39,164,167,131,923,470]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class a{constructor(d,r,l){this._editor=d,this._snippet=r,this._snippetLineLeadingWhitespace=l,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,L.groupBy)(r.placeholders,i.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(r=>{for(const l of this._snippet.placeholders){const s=this._snippet.offset(l),g=this._snippet.fullLen(l),h=_.Range.fromPositions(d.getPositionAt(this._offset+s),d.getPositionAt(this._offset+s+g)),m=l.isFinalTabstop?a._decor.inactiveFinal:a._decor.inactive,C=r.addDecoration(h,m);this._placeholderDecorations.set(l,C)}})}move(d){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const s=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx])if(g.transform){const h=this._placeholderDecorations.get(g),m=this._editor.getModel().getDecorationRange(h),C=this._editor.getModel().getValueInRange(m),w=g.transform.resolve(C).split(/\r\n|\r|\n/);for(let D=1;D0&&this._editor.executeEdits("snippet.placeholderTransform",s)}let r=!1;d===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,r=!0);const l=this._editor.getModel().changeDecorations(s=>{const g=new Set,h=[];for(const m of this._placeholderGroups[this._placeholderGroupsIdx]){const C=this._placeholderDecorations.get(m),w=this._editor.getModel().getDecorationRange(C);h.push(new p.Selection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn)),r=r&&this._hasPlaceholderBeenCollapsed(m),s.changeDecorationOptions(C,m.isFinalTabstop?a._decor.activeFinal:a._decor.active),g.add(m);for(const D of this._snippet.enclosingPlaceholders(m)){const I=this._placeholderDecorations.get(D);s.changeDecorationOptions(I,D.isFinalTabstop?a._decor.activeFinal:a._decor.active),g.add(D)}}for(const[m,C]of this._placeholderDecorations)g.has(m)||s.changeDecorationOptions(C,m.isFinalTabstop?a._decor.inactiveFinal:a._decor.inactive);return h});return r?this.move(d):l??[]}_hasPlaceholderBeenCollapsed(d){let r=d;for(;r;){if(r instanceof i.Placeholder){const l=this._placeholderDecorations.get(r);if(this._editor.getModel().getDecorationRange(l).isEmpty()&&r.toString().length>0)return!0}r=r.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(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[d]=this._snippet.placeholders;if(d.isFinalTabstop&&this._snippet.rightMostDescendant===d)return!0}return!1}computePossibleSelections(){const d=new Map;for(const r of this._placeholderGroups){let l;for(const s of r){if(s.isFinalTabstop)break;l||(l=[],d.set(s.index,l));const g=this._placeholderDecorations.get(s),h=this._editor.getModel().getDecorationRange(g);if(!h){d.delete(s.index);break}l.push(h)}}return d}get activeChoice(){if(!this._placeholderDecorations)return;const d=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!d?.choice)return;const r=this._placeholderDecorations.get(d);if(!r)return;const l=this._editor.getModel().getDecorationRange(r);if(l)return{range:l,choice:d.choice}}get hasChoice(){let d=!1;return this._snippet.walk(r=>(d=r instanceof i.Choice,!d)),d}merge(d){const r=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(l=>{for(const s 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 C of g._snippet.placeholderInfo.all)C.isFinalTabstop?C.index=s.index+(h+1)/this._nestingLevel:C.index=s.index+C.index/this._nestingLevel;this._snippet.replace(s,g._snippet.children);const m=this._placeholderDecorations.get(s);l.removeDecoration(m),this._placeholderDecorations.delete(s);for(const C of g._snippet.placeholders){const w=g._snippet.offset(C),D=g._snippet.fullLen(C),I=_.Range.fromPositions(r.getPositionAt(g._offset+w),r.getPositionAt(g._offset+w+D)),M=l.addDecoration(I,a._decor.inactive);this._placeholderDecorations.set(C,M)}}this._placeholderGroups=(0,L.groupBy)(this._snippet.placeholders,i.Placeholder.compareByIndex)})}}e.OneSnippet=a,a._decor={active:v.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:v.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:v.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:v.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const u={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let f=t=class{static adjustWhitespace(d,r,l,s,g){const h=d.getLineContent(r.lineNumber),m=(0,y.getLeadingWhitespace)(h,0,r.column-1);let C;return s.walk(w=>{if(!(w instanceof i.Text)||w.parent instanceof i.Choice||g&&!g.has(w))return!0;const D=w.value.split(/\r\n|\r|\n/);if(l){const M=s.offset(w);if(M===0)D[0]=d.normalizeIndentation(D[0]);else{C=C??s.toString();const A=C.charCodeAt(M-1);(A===10||A===13)&&(D[0]=d.normalizeIndentation(m+D[0]))}for(let A=1;AB.get(o.IWorkspaceContextService)),O=d.invokeWithinContext(B=>new n.ModelBasedVariableResolver(B.get(b.ILabelService),M)),T=()=>m,N=M.getValueInRange(t.adjustSelection(M,d.getSelection(),l,0)),P=M.getValueInRange(t.adjustSelection(M,d.getSelection(),0,s)),x=M.getLineFirstNonWhitespaceColumn(d.getSelection().positionLineNumber),R=d.getSelections().map((B,W)=>({selection:B,idx:W})).sort((B,W)=>_.Range.compareRangesUsingStarts(B.selection,W.selection));for(const{selection:B,idx:W}of R){let V=t.adjustSelection(M,B,l,0),U=t.adjustSelection(M,B,0,s);N!==M.getValueInRange(V)&&(V=B),P!==M.getValueInRange(U)&&(U=B);const F=B.setStartPosition(V.startLineNumber,V.startColumn).setEndPosition(U.endLineNumber,U.endColumn),j=new i.SnippetParser().parse(r,!0,g),J=F.getStartPosition(),le=t.adjustWhitespace(M,J,h||W>0&&x!==M.getLineFirstNonWhitespaceColumn(B.positionLineNumber),j);j.resolveVariables(new n.CompositeSnippetVariableResolver([O,new n.ClipboardBasedVariableResolver(T,W,R.length,d.getOption(78)==="spread"),new n.SelectionBasedVariableResolver(M,B,W,C),new n.CommentBasedVariableResolver(M,B,w),new n.TimeBasedVariableResolver,new n.WorkspaceBasedVariableResolver(A),new n.RandomBasedVariableResolver])),D[W]=E.EditOperation.replace(F,j.toString()),D[W].identifier={major:W,minor:0},D[W]._isTracked=!0,I[W]=new a(d,j,le)}return{edits:D,snippets:I}}static createEditsAndSnippetsFromEdits(d,r,l,s,g,h,m){if(!d.hasModel()||r.length===0)return{edits:[],snippets:[]};const C=[],w=d.getModel(),D=new i.SnippetParser,I=new i.TextmateSnippet,M=new n.CompositeSnippetVariableResolver([d.invokeWithinContext(O=>new n.ModelBasedVariableResolver(O.get(b.ILabelService),w)),new n.ClipboardBasedVariableResolver(()=>g,0,d.getSelections().length,d.getOption(78)==="spread"),new n.SelectionBasedVariableResolver(w,d.getSelection(),0,h),new n.CommentBasedVariableResolver(w,d.getSelection(),m),new n.TimeBasedVariableResolver,new n.WorkspaceBasedVariableResolver(d.invokeWithinContext(O=>O.get(o.IWorkspaceContextService))),new n.RandomBasedVariableResolver]);r=r.sort((O,T)=>_.Range.compareRangesUsingStarts(O.range,T.range));let A=0;for(let O=0;O0){const W=r[O-1].range,V=_.Range.fromPositions(W.getEndPosition(),T.getStartPosition()),U=new i.Text(w.getValueInRange(V));I.appendChild(U),A+=U.value.length}const P=D.parseFragment(N,I);t.adjustWhitespace(w,T.getStartPosition(),!0,I,new Set(P)),I.resolveVariables(M);const x=I.toString(),R=x.slice(A);A=x.length;const B=E.EditOperation.replace(T,R);B.identifier={major:O,minor:0},B._isTracked=!0,C.push(B)}return D.ensureFinalTabstop(I,l,!0),{edits:C,snippets:[new a(d,I,"")]}}constructor(d,r,l=u,s){this._editor=d,this._template=r,this._options=l,this._languageConfigurationService=s,this._templateMerges=[],this._snippets=[]}dispose(){(0,k.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:d,snippets:r}=typeof this._template=="string"?t.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):t.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=r,this._editor.executeEdits("snippet",d,l=>{const s=l.filter(g=>!!g.identifier);for(let g=0;gp.Selection.fromPositions(g.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(d,r=u){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,d]);const{edits:l,snippets:s}=t.createEditsAndSnippetsFromSelections(this._editor,d,r.overwriteBefore,r.overwriteAfter,!0,r.adjustWhitespace,r.clipboardText,r.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",l,g=>{const h=g.filter(C=>!!C.identifier);for(let C=0;Cp.Selection.fromPositions(C.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 r=[];for(const l of this._snippets){const s=l.move(d);r.push(...s)}return r}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{g.push(...s.get(h))})}d.sort(_.Range.compareRangesUsingStarts);for(const[l,s]of r){if(s.length!==d.length){r.delete(l);continue}s.sort(_.Range.compareRangesUsingStarts);for(let g=0;g0}};e.SnippetSession=f,e.SnippetSession=f=t=Ee([he(3,S.ILanguageConfigurationService)],f)}),define(ie[196],ne([1,0,2,20,16,11,21,32,18,136,706,15,64,386]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const a={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let u=t=class{static get(d){return d.getContribution(t.ID)}constructor(d,r,l,s,g){this._editor=d,this._logService=r,this._languageFeaturesService=l,this._languageConfigurationService=g,this._snippetListener=new L.DisposableStore,this._modelVersionId=-1,this._inSnippet=t.InSnippetMode.bindTo(s),this._hasNextTabstop=t.HasNextTabstop.bindTo(s),this._hasPrevTabstop=t.HasPrevTabstop.bindTo(s)}dispose(){var d;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(d=this._session)===null||d===void 0||d.dispose(),this._snippetListener.dispose()}insert(d,r){try{this._doInsert(d,typeof r>"u"?a:{...a,...r})}catch(l){this.cancel(),this._logService.error(l),this._logService.error("snippet_error"),this._logService.error("insert_template=",d),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(d,r){var l;if(this._editor.hasModel()){if(this._snippetListener.clear(),r.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof d!="string"&&this.cancel(),this._session?((0,k.assertType)(typeof d=="string"),this._session.merge(d,r)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new n.SnippetSession(this._editor,d,r,this._languageConfigurationService),this._session.insert()),r.undoStopAfter&&this._editor.getModel().pushStackElement(),!((l=this._session)===null||l===void 0)&&l.hasChoice){const s={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(D,I)=>{if(!this._session||D!==this._editor.getModel()||!E.Position.equals(this._editor.getPosition(),I))return;const{activeChoice:M}=this._session;if(!M||M.choice.options.length===0)return;const A=D.getValueInRange(M.range),O=!!M.choice.options.find(N=>N.value===A),T=[];for(let N=0;N{h?.dispose(),m=!1},w=()=>{m||(h=this._languageFeaturesService.completionProvider.register({language:g.getLanguageId(),pattern:g.uri.fsPath,scheme:g.uri.scheme,exclusive:!0},s),this._snippetListener.add(h),m=!0)};this._choiceCompletions={provider:s,enable:w,disable:C}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(s=>s.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(){var d;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:r}=this._session;if(!r||!this._choiceCompletions){(d=this._choiceCompletions)===null||d===void 0||d.disable(),this._currentChoice=void 0;return}this._currentChoice!==r.choice&&(this._currentChoice=r.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{(0,v.showSimpleSuggestions)(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(d=!1){var r;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(r=this._session)===null||r===void 0||r.dispose(),this._session=void 0,this._modelVersionId=-1,d&&this._editor.setSelections([this._editor.getSelection()])}prev(){var d;(d=this._session)===null||d===void 0||d.prev(),this._updateState()}next(){var d;(d=this._session)===null||d===void 0||d.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};e.SnippetController2=u,u.ID="snippetController2",u.InSnippetMode=new o.RawContextKey("inSnippetMode",!1,(0,b.localize)(0,null)),u.HasNextTabstop=new o.RawContextKey("hasNextTabstop",!1,(0,b.localize)(1,null)),u.HasPrevTabstop=new o.RawContextKey("hasPrevTabstop",!1,(0,b.localize)(2,null)),e.SnippetController2=u=t=Ee([he(1,i.ILogService),he(2,S.ILanguageFeaturesService),he(3,o.IContextKeyService),he(4,p.ILanguageConfigurationService)],u),(0,y.registerEditorContribution)(u.ID,u,4);const f=y.EditorCommand.bindToContribution(u.get);(0,y.registerEditorCommand)(new f({id:"jumpToNextSnippetPlaceholder",precondition:o.ContextKeyExpr.and(u.InSnippetMode,u.HasNextTabstop),handler:c=>c.next(),kbOpts:{weight:100+30,kbExpr:_.EditorContextKeys.editorTextFocus,primary:2}})),(0,y.registerEditorCommand)(new f({id:"jumpToPrevSnippetPlaceholder",precondition:o.ContextKeyExpr.and(u.InSnippetMode,u.HasPrevTabstop),handler:c=>c.prev(),kbOpts:{weight:100+30,kbExpr:_.EditorContextKeys.editorTextFocus,primary:1026}})),(0,y.registerEditorCommand)(new f({id:"leaveSnippet",precondition:u.InSnippetMode,handler:c=>c.cancel(!0),kbOpts:{weight:100+30,kbExpr:_.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new f({id:"acceptSnippet",precondition:u.InSnippetMode,handler:c=>c.finish()}))}),define(ie[924],ne([1,0,60,9,2,35,20,74,11,5,31,32,217,789,155,196,25,8]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var c;(function(r){r[r.Undo=0]="Undo",r[r.Redo=1]="Redo",r[r.AcceptWord=2]="AcceptWord",r[r.Other=3]="Other"})(c||(e.VersionIdChangeReason=c={}));let d=class extends y.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(l,s,g,h,m,C,w,D,I,M,A,O){super(),this.textModel=l,this.selectedSuggestItem=s,this.cursorPosition=g,this.textModelVersionId=h,this._debounceValue=m,this._suggestPreviewEnabled=C,this._suggestPreviewMode=w,this._inlineSuggestMode=D,this._enabled=I,this._instantiationService=M,this._commandService=A,this._languageConfigurationService=O,this._source=this._register(this._instantiationService.createInstance(n.InlineCompletionsSource,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,E.observableValue)(this,!1),this._forceUpdateSignal=(0,E.observableSignal)("forceUpdate"),this._selectedInlineCompletionId=(0,E.observableValue)(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([c.Redo,c.Undo,c.AcceptWord]),this._fetchInlineCompletions=(0,E.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:b.InlineCompletionTriggerKind.Automatic}),handleChange:(N,P)=>(N.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(N.change)?P.preserveCurrentCompletion=!0:N.didChange(this._forceUpdateSignal)&&(P.inlineCompletionTriggerKind=N.change),!0)},(N,P)=>{if(this._forceUpdateSignal.read(N),!(this._enabled.read(N)&&this.selectedSuggestItem.read(N)||this._isActive.read(N))){this._source.cancelUpdate();return}this.textModelVersionId.read(N);const R=this.selectedInlineCompletion.get(),B=P.preserveCurrentCompletion||R?.forwardStable?R:void 0,W=this._source.suggestWidgetInlineCompletions.get(),V=this.selectedSuggestItem.read(N);if(W&&!V){const j=this._source.inlineCompletions.get();(0,E.transaction)(J=>{(!j||W.request.versionId>j.request.versionId)&&this._source.inlineCompletions.set(W.clone(),J),this._source.clearSuggestWidgetInlineCompletions(J)})}const U=this.cursorPosition.read(N),F={triggerKind:P.inlineCompletionTriggerKind,selectedSuggestionInfo:V?.toSelectedSuggestionInfo()};return this._source.fetch(U,F,B)}),this._filteredInlineCompletionItems=(0,E.derived)(this,N=>{const P=this._source.inlineCompletions.read(N);if(!P)return[];const x=this.cursorPosition.read(N);return P.inlineCompletions.filter(B=>B.isVisible(this.textModel,x,N))}),this.selectedInlineCompletionIndex=(0,E.derived)(this,N=>{const P=this._selectedInlineCompletionId.read(N),x=this._filteredInlineCompletionItems.read(N),R=this._selectedInlineCompletionId===void 0?-1:x.findIndex(B=>B.semanticId===P);return R===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):R}),this.selectedInlineCompletion=(0,E.derived)(this,N=>{const P=this._filteredInlineCompletionItems.read(N),x=this.selectedInlineCompletionIndex.read(N);return P[x]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,N=>N?.request.context.triggerKind),this.inlineCompletionsCount=(0,E.derived)(this,N=>{if(this.lastTriggerKind.read(N)===b.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(N).length}),this.state=(0,E.derivedOpts)({owner:this,equalityComparer:(N,P)=>!N||!P?N===P:(0,i.ghostTextOrReplacementEquals)(N.ghostText,P.ghostText)&&N.inlineCompletion===P.inlineCompletion&&N.suggestItem===P.suggestItem},N=>{var P;const x=this.textModel,R=this.selectedSuggestItem.read(N);if(R){const B=R.toSingleTextEdit().removeCommonPrefix(x),W=this._computeAugmentedCompletion(B,N);if(!this._suggestPreviewEnabled.read(N)&&!W)return;const U=(P=W?.edit)!==null&&P!==void 0?P:B,F=W?W.edit.text.length-B.text.length:0,j=this._suggestPreviewMode.read(N),J=this.cursorPosition.read(N),le=U.computeGhostText(x,j,J,F);return{ghostText:le??new i.GhostText(U.range.endLineNumber,[]),inlineCompletion:W?.completion,suggestItem:R}}else{if(!this._isActive.read(N))return;const B=this.selectedInlineCompletion.read(N);if(!B)return;const W=B.toSingleTextEdit(N),V=this._inlineSuggestMode.read(N),U=this.cursorPosition.read(N),F=W.computeGhostText(x,V,U);return F?{ghostText:F,inlineCompletion:B,suggestItem:void 0}:void 0}}),this.ghostText=(0,E.derivedOpts)({owner:this,equalityComparer:i.ghostTextOrReplacementEquals},N=>{const P=this.state.read(N);if(P)return P.ghostText}),this._register((0,E.recomputeInitiallyAndOnChange)(this._fetchInlineCompletions));let T;this._register((0,E.autorun)(N=>{var P,x;const R=this.state.read(N),B=R?.inlineCompletion;if(B?.semanticId!==T?.semanticId&&(T=B,B)){const W=B.inlineCompletion,V=W.source;(x=(P=V.provider).handleItemDidShow)===null||x===void 0||x.call(P,V.inlineCompletions,W.sourceInlineCompletion,W.insertText)}}))}async trigger(l){this._isActive.set(!0,l),await this._fetchInlineCompletions.get()}async triggerExplicitly(l){(0,E.subtransaction)(l,s=>{this._isActive.set(!0,s),this._forceUpdateSignal.trigger(s,b.InlineCompletionTriggerKind.Explicit)}),await this._fetchInlineCompletions.get()}stop(l){(0,E.subtransaction)(l,s=>{this._isActive.set(!1,s),this._source.clear(s)})}_computeAugmentedCompletion(l,s){const g=this.textModel,h=this._source.suggestWidgetInlineCompletions.read(s),m=h?h.inlineCompletions:[this.selectedInlineCompletion.read(s)].filter(_.isDefined);return(0,L.mapFindFirst)(m,w=>{let D=w.toSingleTextEdit(s);return D=D.removeCommonPrefix(g,v.Range.fromPositions(D.range.getStartPosition(),l.range.getEndPosition())),D.augments(l)?{edit:D,completion:w}:void 0})}async _deltaSelectedInlineCompletionIndex(l){await this.triggerExplicitly();const s=this._filteredInlineCompletionItems.get()||[];if(s.length>0){const g=(this.selectedInlineCompletionIndex.get()+l+s.length)%s.length;this._selectedInlineCompletionId.set(s[g].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)}async next(){await this._deltaSelectedInlineCompletionIndex(1)}async previous(){await this._deltaSelectedInlineCompletionIndex(-1)}async accept(l){var s;if(l.getModel()!==this.textModel)throw new k.BugIndicatingError;const g=this.state.get();if(!g||g.ghostText.isEmpty()||!g.inlineCompletion)return;const h=g.inlineCompletion.toInlineCompletion(void 0);l.pushUndoStop(),h.snippetInfo?(l.executeEdits("inlineSuggestion.accept",[p.EditOperation.replaceMove(h.range,""),...h.additionalTextEdits]),l.setPosition(h.snippetInfo.range.getStartPosition()),(s=a.SnippetController2.get(l))===null||s===void 0||s.insert(h.snippetInfo.snippet,{undoStopBefore:!1})):l.executeEdits("inlineSuggestion.accept",[p.EditOperation.replaceMove(h.range,h.insertText),...h.additionalTextEdits]),h.command&&h.source.addRef(),(0,E.transaction)(m=>{this._source.clear(m),this._isActive.set(!1,m)}),h.command&&(await this._commandService.executeCommand(h.command.id,...h.command.arguments||[]).then(void 0,k.onUnexpectedExternalError),h.source.removeRef())}async acceptNextWord(l){await this._acceptNext(l,(s,g)=>{const h=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column),m=this._languageConfigurationService.getLanguageConfiguration(h),C=new RegExp(m.wordDefinition.source,m.wordDefinition.flags.replace("g","")),w=g.match(C);let D=0;w&&w.index!==void 0?w.index===0?D=w[0].length:D=w.index:D=g.length;const M=/\s+/g.exec(g);return M&&M.index!==void 0&&M.index+M[0].length{const h=g.match(/\n/);return h&&h.index!==void 0?h.index+1:g.length})}async _acceptNext(l,s){if(l.getModel()!==this.textModel)throw new k.BugIndicatingError;const g=this.state.get();if(!g||g.ghostText.isEmpty()||!g.inlineCompletion)return;const h=g.ghostText,m=g.inlineCompletion.toInlineCompletion(void 0);if(m.snippetInfo||m.filterText!==m.insertText){await this.accept(l);return}const C=h.parts[0],w=new S.Position(h.lineNumber,C.column),D=C.lines.join(` `),I=s(w,D);if(I===D.length&&h.parts.length===1){this.accept(l);return}const M=D.substring(0,I);m.source.addRef();try{this._isAcceptingPartially=!0;try{l.pushUndoStop(),l.executeEdits("inlineSuggestion.accept",[p.EditOperation.replace(v.Range.fromPositions(w),M)]);const A=(0,t.lengthOfText)(M);l.setPosition((0,t.addPositions)(w,A))}finally{this._isAcceptingPartially=!1}if(m.source.provider.handlePartialAccept){const A=v.Range.fromPositions(m.range.getStartPosition(),(0,t.addPositions)(w,(0,t.lengthOfText)(M))),O=l.getModel().getValueInRange(A,1);m.source.provider.handlePartialAccept(m.source.inlineCompletions,m.sourceInlineCompletion,O.length)}}finally{m.source.removeRef()}}handleSuggestAccepted(l){var s,g;const h=l.toSingleTextEdit().removeCommonPrefix(this.textModel),m=this._computeAugmentedCompletion(h,void 0);if(!m)return;const C=m.completion.inlineCompletion;(g=(s=C.source.provider).handlePartialAccept)===null||g===void 0||g.call(s,C.source.inlineCompletions,C.sourceInlineCompletion,h.text.length)}};e.InlineCompletionsModel=d,e.InlineCompletionsModel=d=Ee([he(9,f.IInstantiationService),he(10,u.ICommandService),he(11,o.ILanguageConfigurationService)],d)}),define(ie[925],ne([1,0,14,19,9,6,2,12,24,118,309,103,28,15,64,80,308,136,18,71,20,239,196,242]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class m{static shouldAutoTrigger(M){if(!M.hasModel())return!1;const A=M.getModel(),O=M.getPosition();A.tokenization.tokenizeIfCheap(O.lineNumber);const T=A.getWordAtPosition(O);return!(!T||T.endColumn!==O.column&&T.startColumn+1!==O.column||!isNaN(Number(T.word)))}constructor(M,A,O){this.leadingLineContent=M.getLineContent(A.lineNumber).substr(0,A.column-1),this.leadingWord=M.getWordUntilPosition(A),this.lineNumber=A.lineNumber,this.column=A.column,this.triggerOptions=O}}e.LineContext=m;function C(I,M,A){if(!M.getContextKeyValue(l.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const O=M.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return O!==void 0?!O:!I.getOption(62).suppressSuggestions}function w(I,M,A){if(!M.getContextKeyValue("inlineSuggestionVisible"))return!0;const O=M.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return O!==void 0?!O:!I.getOption(62).suppressSuggestions}let D=h=class{constructor(M,A,O,T,N,P,x,R,B){this._editor=M,this._editorWorkerService=A,this._clipboardService=O,this._telemetryService=T,this._logService=N,this._contextKeyService=P,this._configurationService=x,this._languageFeaturesService=R,this._envService=B,this._toDispose=new _.DisposableStore,this._triggerCharacterListener=new _.DisposableStore,this._triggerQuickSuggest=new L.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new _.DisposableStore,this._onDidCancel=new E.Emitter,this._onDidTrigger=new E.Emitter,this._onDidSuggest=new E.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 S.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 W=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{W=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{W=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(V=>{W||this._onCursorChange(V)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!W&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,_.dispose)(this._triggerCharacterListener),(0,_.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(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const M=new Map;for(const O of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const T of O.triggerCharacters||[]){let N=M.get(T);N||(N=new Set,N.add((0,f.getSnippetSuggestSupport)()),M.set(T,N)),N.add(O)}const A=O=>{var T;if(!w(this._editor,this._contextKeyService,this._configurationService)||m.shouldAutoTrigger(this._editor))return;if(!O){const x=this._editor.getPosition();O=this._editor.getModel().getLineContent(x.lineNumber).substr(0,x.column-1)}let N="";(0,p.isLowSurrogate)(O.charCodeAt(O.length-1))?(0,p.isHighSurrogate)(O.charCodeAt(O.length-2))&&(N=O.substr(O.length-2)):N=O.charAt(O.length-1);const P=M.get(N);if(P){const x=new Map;if(this._completionModel)for(const[R,B]of this._completionModel.getItemsByProvider())P.has(R)||x.set(R,B);this.trigger({auto:!0,triggerKind:1,triggerCharacter:N,retrigger:!!this._completionModel,clipboardText:(T=this._completionModel)===null||T===void 0?void 0:T.clipboardText,completionOptions:{providerFilter:P,providerItemsToReuse:x}})}};this._triggerCharacterListener.add(this._editor.onDidType(A)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>A()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(M=!1){var A;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(A=this._requestToken)===null||A===void 0||A.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:M}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(M){if(!this._editor.hasModel())return;const A=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!M.selection.isEmpty()||M.reason!==0&&M.reason!==3||M.source!=="keyboard"&&M.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&M.reason===0?(A.containsRange(this._currentSelection)||A.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&M.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var M;f.QuickSuggestionsOptions.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((M=s.SnippetController2.get(this._editor))===null||M===void 0)&&M.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!m.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const A=this._editor.getModel(),O=this._editor.getPosition(),T=this._editor.getOption(88);if(!f.QuickSuggestionsOptions.isAllOff(T)){if(!f.QuickSuggestionsOptions.isAllOn(T)){A.tokenization.tokenizeIfCheap(O.lineNumber);const N=A.tokenization.getLineTokens(O.lineNumber),P=N.getStandardTokenType(N.findTokenIndexAtOffset(Math.max(O.column-1-1,0)));if(f.QuickSuggestionsOptions.valueFor(T,P)!=="on")return}C(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(A)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){(0,r.assertType)(this._editor.hasModel()),(0,r.assertType)(this._triggerState!==void 0);const M=this._editor.getModel(),A=this._editor.getPosition(),O=new m(M,A,{...this._triggerState,refilter:!0});this._onNewContext(O)}trigger(M){var A,O,T,N,P,x;if(!this._editor.hasModel())return;const R=this._editor.getModel(),B=new m(R,this._editor.getPosition(),M);this.cancel(M.retrigger),this._triggerState=M,this._onDidTrigger.fire({auto:M.auto,shy:(A=M.shy)!==null&&A!==void 0?A:!1,position:this._editor.getPosition()}),this._context=B;let W={triggerKind:(O=M.triggerKind)!==null&&O!==void 0?O:0};M.triggerCharacter&&(W={triggerKind:1,triggerCharacter:M.triggerCharacter}),this._requestToken=new k.CancellationTokenSource;const V=this._editor.getOption(111);let U=1;switch(V){case"top":U=0;break;case"bottom":U=2;break}const{itemKind:F,showDeprecated:j}=h._createSuggestFilter(this._editor),J=new f.CompletionOptions(U,(N=(T=M.completionOptions)===null||T===void 0?void 0:T.kindFilter)!==null&&N!==void 0?N:F,(P=M.completionOptions)===null||P===void 0?void 0:P.providerFilter,(x=M.completionOptions)===null||x===void 0?void 0:x.providerItemsToReuse,j),le=b.WordDistance.create(this._editorWorkerService,this._editor),ee=(0,f.provideSuggestionItems)(this._languageFeaturesService.completionProvider,R,this._editor.getPosition(),J,W,this._requestToken.token);Promise.all([ee,le]).then(async([$,te])=>{var G;if((G=this._requestToken)===null||G===void 0||G.dispose(),!this._editor.hasModel())return;let de=M?.clipboardText;if(!de&&$.needsClipboard&&(de=await this._clipboardService.readText()),this._triggerState===void 0)return;const ue=this._editor.getModel(),X=new m(ue,this._editor.getPosition(),M),Z={...d.FuzzyScoreOptions.default,firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly};if(this._completionModel=new u.CompletionModel($.items,this._context.column,{leadingLineContent:X.leadingLineContent,characterCountDelta:X.column-this._context.column},te,this._editor.getOption(117),this._editor.getOption(111),Z,de),this._completionDisposables.add($.disposable),this._onNewContext(X),this._reportDurationsTelemetry($.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const re of $.items)re.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${re.provider._debugDisplayName}`,re.completion)}).catch(y.onUnexpectedError)}_reportDurationsTelemetry(M){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(M)}),this._logService.debug("suggest.durations.json",M)})}static _createSuggestFilter(M){const A=new Set;M.getOption(111)==="none"&&A.add(27);const T=M.getOption(117);return T.showMethods||A.add(0),T.showFunctions||A.add(1),T.showConstructors||A.add(2),T.showFields||A.add(3),T.showVariables||A.add(4),T.showClasses||A.add(5),T.showStructs||A.add(6),T.showInterfaces||A.add(7),T.showModules||A.add(8),T.showProperties||A.add(9),T.showEvents||A.add(10),T.showOperators||A.add(11),T.showUnits||A.add(12),T.showValues||A.add(13),T.showConstants||A.add(14),T.showEnums||A.add(15),T.showEnumMembers||A.add(16),T.showKeywords||A.add(17),T.showWords||A.add(18),T.showColors||A.add(19),T.showFiles||A.add(20),T.showReferences||A.add(21),T.showColors||A.add(22),T.showFolders||A.add(23),T.showTypeParameters||A.add(24),T.showSnippets||A.add(27),T.showUsers||A.add(25),T.showIssues||A.add(26),{itemKind:A,showDeprecated:T.showDeprecated}}_onNewContext(M){if(this._context){if(M.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,p.getLeadingWhitespace)(M.leadingLineContent)!==(0,p.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(M.columnthis._context.leadingWord.startColumn){if(m.shouldAutoTrigger(this._editor)&&this._context){const O=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:O}})}return}if(M.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&M.leadingWord.word.length!==0){const A=new Map,O=new Set;for(const[T,N]of this._completionModel.getItemsByProvider())N.length>0&&N[0].container.incomplete?O.add(T):A.set(T,N);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:O,providerItemsToReuse:A}})}else{const A=this._completionModel.lineContext;let O=!1;if(this._completionModel.lineContext={leadingLineContent:M.leadingLineContent,characterCountDelta:M.column-this._context.column},this._completionModel.items.length===0){const T=m.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(T&&this._context.leadingWord.endColumn0,O&&M.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:M.triggerOptions,isFrozen:O})}}}}};e.SuggestModel=D,e.SuggestModel=D=h=Ee([he(1,v.IEditorWorkerService),he(2,o.IClipboardService),he(3,a.ITelemetryService),he(4,t.ILogService),he(5,n.IContextKeyService),he(6,i.IConfigurationService),he(7,c.ILanguageFeaturesService),he(8,g.IEnvironmentService)],D)}),define(ie[387],ne([1,0,51,13,19,9,6,121,2,17,61,20,124,16,74,11,5,21,196,131,355,764,710,25,15,8,64,136,763,558,925,559,906,80,45,122,7]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A,O,T,N,P,x){"use strict";var R;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const B=!1;class W{constructor(ee,$){if(this._model=ee,this._position=$,ee.getLineMaxColumn($.lineNumber)!==$.column){const G=ee.getOffsetAt($),de=ee.getPositionAt(G+1);this._marker=ee.deltaDecorations([],[{range:u.Range.fromPositions($,de),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(ee){if(this._model.isDisposed()||this._position.lineNumber!==ee.lineNumber)return 0;if(this._marker){const $=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt($.getStartPosition())-this._model.getOffsetAt(ee)}else return this._model.getLineMaxColumn(ee.lineNumber)-ee.column}}let V=R=class{static get(ee){return ee.getContribution(R.ID)}constructor(ee,$,te,G,de,ue,X){this._memoryService=$,this._commandService=te,this._contextKeyService=G,this._instantiationService=de,this._logService=ue,this._telemetryService=X,this._lineSuffix=new S.MutableDisposable,this._toDispose=new S.DisposableStore,this._selectors=new U(Y=>Y.priority),this._onWillInsertSuggestItem=new _.Emitter,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=ee,this.model=de.createInstance(M.SuggestModel,this.editor),this._selectors.register({priority:0,select:(Y,K,H)=>this._memoryService.select(Y,K,H)});const Z=w.Context.InsertMode.bindTo(G);Z.set(ee.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>Z.set(ee.getOption(117).insertMode))),this.widget=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)(ee.getDomNode()),()=>{const Y=this._instantiationService.createInstance(O.SuggestWidget,this.editor);this._toDispose.add(Y),this._toDispose.add(Y.onDidSelect(q=>this._insertSuggestion(q,0),this));const K=new I.CommitCharacterController(this.editor,Y,this.model,q=>this._insertSuggestion(q,2));this._toDispose.add(K);const H=w.Context.MakesTextEdit.bindTo(this._contextKeyService),z=w.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),se=w.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,S.toDisposable)(()=>{H.reset(),z.reset(),se.reset()})),this._toDispose.add(Y.onDidFocus(({item:q})=>{const ae=this.editor.getPosition(),ce=q.editStart.column,ge=ae.column;let pe=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!q.completion.additionalTextEdits&&!(q.completion.insertTextRules&4)&&ge-ce===q.completion.insertText.length&&(pe=this.editor.getModel().getValueInRange({startLineNumber:ae.lineNumber,startColumn:ce,endLineNumber:ae.lineNumber,endColumn:ge})!==q.completion.insertText),H.set(pe),z.set(!a.Position.equals(q.editInsertEnd,q.editReplaceEnd)),se.set(!!q.provider.resolveCompletionItem||!!q.completion.documentation||q.completion.detail!==q.completion.label)})),this._toDispose.add(Y.onDetailsKeyDown(q=>{if(q.toKeyCodeChord().equals(new p.KeyCodeChord(!0,!1,!1,!1,33))||v.isMacintosh&&q.toKeyCodeChord().equals(new p.KeyCodeChord(!1,!1,!1,!0,33))){q.stopPropagation();return}q.toKeyCodeChord().isModifierKey()||this.editor.focus()})),Y})),this._overtypingCapturer=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)(ee.getDomNode()),()=>this._toDispose.add(new A.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)(ee.getDomNode()),()=>this._toDispose.add(new D.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(de.createInstance(l.WordContextKey,ee)),this._toDispose.add(this.model.onDidTrigger(Y=>{this.widget.value.showTriggered(Y.auto,Y.shy?250:50),this._lineSuffix.value=new W(this.editor.getModel(),Y.position)})),this._toDispose.add(this.model.onDidSuggest(Y=>{if(Y.triggerOptions.shy)return;let K=-1;for(const z of this._selectors.itemsOrderedByPriorityDesc)if(K=z.select(this.editor.getModel(),this.editor.getPosition(),Y.completionModel.items),K!==-1)break;K===-1&&(K=0);let H=!1;if(Y.triggerOptions.auto){const z=this.editor.getOption(117);z.selectionMode==="never"||z.selectionMode==="always"?H=z.selectionMode==="never":z.selectionMode==="whenTriggerCharacter"?H=Y.triggerOptions.triggerKind!==1:z.selectionMode==="whenQuickSuggestion"&&(H=Y.triggerOptions.triggerKind===1&&!Y.triggerOptions.refilter)}this.widget.value.showSuggestions(Y.completionModel,K,Y.isFrozen,Y.triggerOptions.auto,H)})),this._toDispose.add(this.model.onDidCancel(Y=>{Y.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{B||(this.model.cancel(),this.model.clear())}));const re=w.Context.AcceptSuggestionsOnEnter.bindTo(G),oe=()=>{const Y=this.editor.getOption(1);re.set(Y==="on"||Y==="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(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(ee,$){if(!ee||!ee.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const te=c.SnippetController2.get(this.editor);if(!te)return;this._onWillInsertSuggestItem.fire({item:ee.item});const G=this.editor.getModel(),de=G.getAlternativeVersionId(),{item:ue}=ee,X=[],Z=new y.CancellationTokenSource;$&1||this.editor.pushUndoStop();const re=this.getOverwriteInfo(ue,!!($&8));this._memoryService.memorize(G,this.editor.getPosition(),ue);const oe=ue.isResolved;let Y=-1,K=-1;if(Array.isArray(ue.completion.additionalTextEdits)){this.model.cancel();const z=i.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",ue.completion.additionalTextEdits.map(se=>t.EditOperation.replaceMove(u.Range.lift(se.range),se.text))),z.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!oe){const z=new b.StopWatch;let se;const q=G.onDidChangeContent(pe=>{if(pe.isFlush){Z.cancel(),q.dispose();return}for(const me of pe.changes){const ve=u.Range.getEndPosition(me.range);(!se||a.Position.isBefore(ve,se))&&(se=ve)}}),ae=$;$|=2;let ce=!1;const ge=this.editor.onWillType(()=>{ge.dispose(),ce=!0,ae&2||this.editor.pushUndoStop()});X.push(ue.resolve(Z.token).then(()=>{if(!ue.completion.additionalTextEdits||Z.token.isCancellationRequested)return;if(se&&ue.completion.additionalTextEdits.some(me=>a.Position.isBefore(se,u.Range.getStartPosition(me.range))))return!1;ce&&this.editor.pushUndoStop();const pe=i.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",ue.completion.additionalTextEdits.map(me=>t.EditOperation.replaceMove(u.Range.lift(me.range),me.text))),pe.restoreRelativeVerticalPositionOfCursor(this.editor),(ce||!(ae&2))&&this.editor.pushUndoStop(),!0}).then(pe=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",z.elapsed(),pe),K=pe===!0?1:pe===!1?0:-2}).finally(()=>{q.dispose(),ge.dispose()}))}let{insertText:H}=ue.completion;if(ue.completion.insertTextRules&4||(H=d.SnippetParser.escape(H)),this.model.cancel(),te.insert(H,{overwriteBefore:re.overwriteBefore,overwriteAfter:re.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(ue.completion.insertTextRules&1),clipboardText:ee.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),$&2||this.editor.pushUndoStop(),ue.completion.command)if(ue.completion.command.id===F.id)this.model.trigger({auto:!0,retrigger:!0});else{const z=new b.StopWatch;X.push(this._commandService.executeCommand(ue.completion.command.id,...ue.completion.command.arguments?[...ue.completion.command.arguments]:[]).catch(se=>{ue.completion.extensionId?(0,E.onUnexpectedExternalError)(se):(0,E.onUnexpectedError)(se)}).finally(()=>{Y=z.elapsed()}))}$&4&&this._alternatives.value.set(ee,z=>{for(Z.cancel();G.canUndo();){de!==G.getAlternativeVersionId()&&G.undo(),this._insertSuggestion(z,3|($&8?8:0));break}}),this._alertCompletionItem(ue),Promise.all(X).finally(()=>{this._reportSuggestionAcceptedTelemetry(ue,G,oe,Y,K),this.model.clear(),Z.dispose()})}_reportSuggestionAcceptedTelemetry(ee,$,te,G,de){var ue,X,Z;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(X=(ue=ee.extensionId)===null||ue===void 0?void 0:ue.value)!==null&&X!==void 0?X:"unknown",providerId:(Z=ee.provider._debugDisplayName)!==null&&Z!==void 0?Z:"unknown",kind:ee.completion.kind,basenameHash:(0,P.hash)((0,N.basename)($.uri)).toString(16),languageId:$.getLanguageId(),fileExtension:(0,N.extname)($.uri),resolveInfo:ee.provider.resolveCompletionItem?te?1:0:-1,resolveDuration:ee.resolveDuration,commandDuration:G,additionalEditsAsync:de})}getOverwriteInfo(ee,$){(0,o.assertType)(this.editor.hasModel());let te=this.editor.getOption(117).insertMode==="replace";$&&(te=!te);const G=ee.position.column-ee.editStart.column,de=(te?ee.editReplaceEnd.column:ee.editInsertEnd.column)-ee.position.column,ue=this.editor.getPosition().column-ee.position.column,X=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:G+ue,overwriteAfter:de+X}}_alertCompletionItem(ee){if((0,k.isNonEmptyArray)(ee.completion.additionalTextEdits)){const $=s.localize(0,null,ee.textLabel,ee.completion.additionalTextEdits.length);(0,L.alert)($)}}triggerSuggest(ee,$,te){this.editor.hasModel()&&(this.model.trigger({auto:$??!1,completionOptions:{providerFilter:ee,kindFilter:te?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(ee){if(!this.editor.hasModel())return;const $=this.editor.getPosition(),te=()=>{$.equals(this.editor.getPosition())&&this._commandService.executeCommand(ee.fallback)},G=de=>{if(de.completion.insertTextRules&4||de.completion.additionalTextEdits)return!0;const ue=this.editor.getPosition(),X=de.editStart.column,Z=ue.column;return Z-X!==de.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:ue.lineNumber,startColumn:X,endLineNumber:ue.lineNumber,endColumn:Z})!==de.completion.insertText};_.Event.once(this.model.onDidTrigger)(de=>{const ue=[];_.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,S.dispose)(ue),te()},void 0,ue),this.model.onDidSuggest(({completionModel:X})=>{if((0,S.dispose)(ue),X.items.length===0){te();return}const Z=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),X.items),re=X.items[Z];if(!G(re)){te();return}this.editor.pushUndoStop(),this._insertSuggestion({index:Z,item:re,model:X},7)},void 0,ue)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition($,0),this.editor.focus()}acceptSelectedSuggestion(ee,$){const te=this.widget.value.getFocusedItem();let G=0;ee&&(G|=4),$&&(G|=8),this._insertSuggestion(te,G)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}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(ee){return this._selectors.register(ee)}};e.SuggestController=V,V.ID="editor.contrib.suggestController",e.SuggestController=V=R=Ee([he(1,r.ISuggestMemoryService),he(2,g.ICommandService),he(3,h.IContextKeyService),he(4,m.IInstantiationService),he(5,C.ILogService),he(6,T.ITelemetryService)],V);class U{constructor(ee){this.prioritySelector=ee,this._items=new Array}register(ee){if(this._items.indexOf(ee)!==-1)throw new Error("Value is already registered");return this._items.push(ee),this._items.sort(($,te)=>this.prioritySelector(te)-this.prioritySelector($)),{dispose:()=>{const $=this._items.indexOf(ee);$>=0&&this._items.splice($,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class F extends n.EditorAction{constructor(){super({id:F.id,label:s.localize(1,null),alias:"Trigger Suggest",precondition:h.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasCompletionItemProvider,w.Context.Visible.toNegated()),kbOpts:{kbExpr:f.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(ee,$,te){const G=V.get($);if(!G)return;let de;te&&typeof te=="object"&&te.auto===!0&&(de=!0),G.triggerSuggest(void 0,de,void 0)}}e.TriggerSuggestAction=F,F.id="editor.action.triggerSuggest",(0,n.registerEditorContribution)(V.ID,V,2),(0,n.registerEditorAction)(F);const j=100+90,J=n.EditorCommand.bindToContribution(V.get);(0,n.registerEditorCommand)(new J({id:"acceptSelectedSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion),handler(le){le.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus),weight:j},{primary:3,kbExpr:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus,w.Context.AcceptSuggestionsOnEnter,w.Context.MakesTextEdit),weight:j}],menuOpts:[{menuId:w.suggestWidgetStatusbarMenu,title:s.localize(2,null),group:"left",order:1,when:w.Context.HasInsertAndReplaceRange.toNegated()},{menuId:w.suggestWidgetStatusbarMenu,title:s.localize(3,null),group:"left",order:1,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("insert"))},{menuId:w.suggestWidgetStatusbarMenu,title:s.localize(4,null),group:"left",order:1,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("replace"))}]})),(0,n.registerEditorCommand)(new J({id:"acceptAlternativeSelectedSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus,w.Context.HasFocusedSuggestion),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(le){le.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:w.suggestWidgetStatusbarMenu,group:"left",order:2,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("insert")),title:s.localize(5,null)},{menuId:w.suggestWidgetStatusbarMenu,group:"left",order:2,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("replace")),title:s.localize(6,null)}]})),g.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,n.registerEditorCommand)(new J({id:"hideSuggestWidget",precondition:w.Context.Visible,handler:le=>le.cancelSuggestWidget(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,n.registerEditorCommand)(new J({id:"selectNextSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,n.registerEditorCommand)(new J({id:"selectNextPageSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectNextPageSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,n.registerEditorCommand)(new J({id:"selectLastSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectLastSuggestion()})),(0,n.registerEditorCommand)(new J({id:"selectPrevSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,n.registerEditorCommand)(new J({id:"selectPrevPageSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectPrevPageSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,n.registerEditorCommand)(new J({id:"selectFirstSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:le=>le.selectFirstSuggestion()})),(0,n.registerEditorCommand)(new J({id:"focusSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion.negate()),handler:le=>le.focusSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,n.registerEditorCommand)(new J({id:"focusAndAcceptSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion.negate()),handler:le=>{le.focusSuggestion(),le.acceptSelectedSuggestion(!0,!1)}})),(0,n.registerEditorCommand)(new J({id:"toggleSuggestionDetails",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion),handler:le=>le.toggleSuggestionDetails(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:w.suggestWidgetStatusbarMenu,group:"right",order:1,when:h.ContextKeyExpr.and(w.Context.DetailsVisible,w.Context.CanResolve),title:s.localize(7,null)},{menuId:w.suggestWidgetStatusbarMenu,group:"right",order:1,when:h.ContextKeyExpr.and(w.Context.DetailsVisible.toNegated(),w.Context.CanResolve),title:s.localize(8,null)}]})),(0,n.registerEditorCommand)(new J({id:"toggleExplainMode",precondition:w.Context.Visible,handler:le=>le.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,n.registerEditorCommand)(new J({id:"toggleSuggestionFocus",precondition:w.Context.Visible,handler:le=>le.toggleSuggestionFocus(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,n.registerEditorCommand)(new J({id:"insertBestCompletion",precondition:h.ContextKeyExpr.and(f.EditorContextKeys.textInputFocus,h.ContextKeyExpr.equals("config.editor.tabCompletion","on"),l.WordContextKey.AtEnd,w.Context.Visible.toNegated(),D.SuggestAlternatives.OtherSuggestions.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:(le,ee)=>{le.triggerSuggestAndAcceptBest((0,o.isObject)(ee)?{fallback:"tab",...ee}:{fallback:"tab"})},kbOpts:{weight:j,primary:2}})),(0,n.registerEditorCommand)(new J({id:"insertNextSuggestion",precondition:h.ContextKeyExpr.and(f.EditorContextKeys.textInputFocus,h.ContextKeyExpr.equals("config.editor.tabCompletion","on"),D.SuggestAlternatives.OtherSuggestions,w.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptNextSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:2}})),(0,n.registerEditorCommand)(new J({id:"insertPrevSuggestion",precondition:h.ContextKeyExpr.and(f.EditorContextKeys.textInputFocus,h.ContextKeyExpr.equals("config.editor.tabCompletion","on"),D.SuggestAlternatives.OtherSuggestions,w.Context.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:le=>le.acceptPrevSuggestion(),kbOpts:{weight:j,kbExpr:f.EditorContextKeys.textInputFocus,primary:1026}})),(0,n.registerEditorAction)(class extends n.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:s.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(le,ee){var $;($=V.get(ee))===null||$===void 0||$.resetWidgetSize()}})}),define(ie[926],ne([1,0,6,2,11,5,31,131,386,387,35,304,13,60]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestItemInfo=e.SuggestWidgetAdaptor=void 0;class t extends k.Disposable{get selectedItem(){return this._selectedItem}constructor(c,d,r,l){super(),this.editor=c,this.suggestControllerPreselector=d,this.checkModelVersion=r,this.onWillAccept=l,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,b.observableValue)(this,void 0),this._register(c.onKeyDown(g=>{g.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(c.onKeyUp(g=>{g.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const s=v.SuggestController.get(this.editor);if(s){this._register(s.registerSelector({priority:100,select:(m,C,w)=>{var D;(0,b.transaction)(N=>this.checkModelVersion(N));const I=this.editor.getModel();if(!I)return-1;const M=(D=this.suggestControllerPreselector())===null||D===void 0?void 0:D.removeCommonPrefix(I);if(!M)return-1;const A=y.Position.lift(C),O=w.map((N,P)=>{const R=a.fromSuggestion(s,I,A,N,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(I),B=M.augments(R);return{index:P,valid:B,prefixLength:R.text.length,suggestItem:N}}).filter(N=>N&&N.valid&&N.prefixLength>0),T=(0,n.findFirstMaxBy)(O,(0,i.compareBy)(N=>N.prefixLength,i.numberComparator));return T?T.index:-1}}));let g=!1;const h=()=>{g||(g=!0,this._register(s.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(s.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(s.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(L.Event.once(s.model.onDidTrigger)(m=>{h()})),this._register(s.onWillInsertSuggestItem(m=>{const C=this.editor.getPosition(),w=this.editor.getModel();if(!C||!w)return;const D=a.fromSuggestion(s,w,C,m.item,this.isShiftKeyPressed);this.onWillAccept(D)}))}this.update(this._isActive)}update(c){const d=this.getSuggestItemInfo();(this._isActive!==c||!u(this._currentSuggestItemInfo,d))&&(this._isActive=c,this._currentSuggestItemInfo=d,(0,b.transaction)(r=>{this.checkModelVersion(r),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,r)}))}getSuggestItemInfo(){const c=v.SuggestController.get(this.editor);if(!c||!this.isSuggestWidgetVisible)return;const d=c.widget.value.getFocusedItem(),r=this.editor.getPosition(),l=this.editor.getModel();if(!(!d||!r||!l))return a.fromSuggestion(c,l,r,d.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const c=v.SuggestController.get(this.editor);c?.stopForceRenderingAbove()}forceRenderingAbove(){const c=v.SuggestController.get(this.editor);c?.forceRenderingAbove()}}e.SuggestWidgetAdaptor=t;class a{static fromSuggestion(c,d,r,l,s){let{insertText:g}=l.completion,h=!1;if(l.completion.insertTextRules&4){const C=new p.SnippetParser().parse(g);C.children.length<100&&S.SnippetSession.adjustWhitespace(d,r,!0,C),g=C.toString(),h=!0}const m=c.getOverwriteInfo(l,s);return new a(E.Range.fromPositions(r.delta(0,-m.overwriteBefore),r.delta(0,Math.max(m.overwriteAfter,0))),g,l.completion.kind,h)}constructor(c,d,r,l){this.range=c,this.insertText=d,this.completionItemKind=r,this.isSnippetText=l}equals(c){return this.range.equalsRange(c.range)&&this.insertText===c.insertText&&this.completionItemKind===c.completionItemKind&&this.isSnippetText===c.isSnippetText}toSelectedSuggestionInfo(){return new _.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new o.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=a;function u(f,c){return f===c?!0:!f||!c?!1:f.equals(c)}}),define(ie[261],ne([1,0,51,2,35,190,11,78,18,216,759,239,255,924,926,689,161,25,28,15,8,34]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let g=s=class extends k.Disposable{static get(m){return m.getContribution(s.ID)}constructor(m,C,w,D,I,M,A,O,T){super(),this.editor=m,this._instantiationService=C,this._contextKeyService=w,this._configurationService=D,this._commandService=I,this._debounceService=M,this._languageFeaturesService=A,this._audioCueService=O,this._keybindingService=T,this.model=(0,y.disposableObservableValue)("inlineCompletionModel",void 0),this._textModelVersionId=(0,y.observableValue)(this,-1),this._cursorPosition=(0,y.observableValue)(this,new _.Position(1,1)),this._suggestWidgetAdaptor=this._register(new t.SuggestWidgetAdaptor(this.editor,()=>{var x,R;return(R=(x=this.model.get())===null||x===void 0?void 0:x.selectedInlineCompletion.get())===null||R===void 0?void 0:R.toSingleTextEdit(void 0)},x=>this.updateObservables(x,n.VersionIdChangeReason.Other),x=>{(0,y.transaction)(R=>{var B;this.updateObservables(R,n.VersionIdChangeReason.Other),(B=this.model.get())===null||B===void 0||B.handleSuggestAccepted(x)})})),this._enabled=(0,y.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._ghostTextWidget=this._register(this._instantiationService.createInstance(b.GhostTextWidget,this.editor,{ghostText:this.model.map((x,R)=>x?.ghostText.read(R)),minReservedLineCount:(0,y.constObservable)(0),targetTextModel:this.model.map(x=>x?.textModel)})),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAudioCueSignal=(0,y.observableSignal)(this),this._isReadonly=(0,y.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(90)),this._textModel=(0,y.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this._textModelIfWritable=(0,y.derived)(x=>this._isReadonly.read(x)?void 0:this._textModel.read(x)),this._register(new o.InlineCompletionContextKeys(this._contextKeyService,this.model)),this._register((0,y.autorun)(x=>{const R=this._textModelIfWritable.read(x);(0,y.transaction)(B=>{if(this.model.set(void 0,B),this.updateObservables(B,n.VersionIdChangeReason.Other),R){const W=C.createInstance(n.InlineCompletionsModel,R,this._suggestWidgetAdaptor.selectedItem,this._cursorPosition,this._textModelVersionId,this._debounceValue,(0,y.observableFromEvent)(m.onDidChangeConfiguration,()=>m.getOption(117).preview),(0,y.observableFromEvent)(m.onDidChangeConfiguration,()=>m.getOption(117).previewMode),(0,y.observableFromEvent)(m.onDidChangeConfiguration,()=>m.getOption(62).mode),this._enabled);this.model.set(W,B)}})}));const N=x=>{var R;return x.isUndoing?n.VersionIdChangeReason.Undo:x.isRedoing?n.VersionIdChangeReason.Redo:!((R=this.model.get())===null||R===void 0)&&R.isAcceptingPartially?n.VersionIdChangeReason.AcceptWord:n.VersionIdChangeReason.Other};this._register(m.onDidChangeModelContent(x=>(0,y.transaction)(R=>this.updateObservables(R,N(x))))),this._register(m.onDidChangeCursorPosition(x=>(0,y.transaction)(R=>{var B;this.updateObservables(R,n.VersionIdChangeReason.Other),(x.reason===3||x.source==="api")&&((B=this.model.get())===null||B===void 0||B.stop(R))}))),this._register(m.onDidType(()=>(0,y.transaction)(x=>{var R;this.updateObservables(x,n.VersionIdChangeReason.Other),this._enabled.get()&&((R=this.model.get())===null||R===void 0||R.trigger(x))}))),this._register(this._commandService.onDidExecuteCommand(x=>{new Set([E.CoreEditingCommands.Tab.id,E.CoreEditingCommands.DeleteLeft.id,E.CoreEditingCommands.DeleteRight.id,v.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(x.commandId)&&m.hasTextFocus()&&this._enabled.get()&&(0,y.transaction)(B=>{var W;(W=this.model.get())===null||W===void 0||W.trigger(B)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||m.getOption(62).keepOnBlur||i.InlineSuggestionHintsContentWidget.dropDownVisible||(0,y.transaction)(x=>{var R;(R=this.model.get())===null||R===void 0||R.stop(x)})})),this._register((0,y.autorun)(x=>{var R;const B=(R=this.model.read(x))===null||R===void 0?void 0:R.state.read(x);B?.suggestItem?B.ghostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,k.toDisposable)(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let P;this._register((0,y.autorunHandleChanges)({handleChange:(x,R)=>(x.didChange(this._playAudioCueSignal)&&(P=void 0),!0)},async x=>{this._playAudioCueSignal.read(x);const R=this.model.read(x),B=R?.state.read(x);if(!R||!B||!B.inlineCompletion){P=void 0;return}if(B.inlineCompletion.semanticId!==P){P=B.inlineCompletion.semanticId;const W=R.textModel.getLineContent(B.ghostText.lineNumber);this._audioCueService.playAudioCue(u.AudioCue.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(B.ghostText.renderForScreenReader(W))})}})),this._register(new i.InlineCompletionsHintsWidget(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration(x=>{x.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.inlineCompletions")})}playAudioCue(m){this._playAudioCueSignal.trigger(m)}provideScreenReaderUpdate(m){const C=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),w=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let D;!C&&w&&this.editor.getOption(147)&&(D=(0,a.localize)(0,null,w.getAriaLabel())),D?(0,L.alert)(m+", "+D):(0,L.alert)(m)}updateObservables(m,C){var w,D;const I=this.editor.getModel();this._textModelVersionId.set((w=I?.getVersionId())!==null&&w!==void 0?w:-1,m,C),this._cursorPosition.set((D=this.editor.getPosition())!==null&&D!==void 0?D:new _.Position(1,1),m)}shouldShowHoverAt(m){var C;const w=(C=this.model.get())===null||C===void 0?void 0:C.ghostText.get();return w?w.parts.some(D=>m.containsPosition(new _.Position(w.lineNumber,D.column))):!1}shouldShowHoverAtViewZone(m){return this._ghostTextWidget.ownsViewZone(m)}};e.InlineCompletionsController=g,g.ID="editor.contrib.inlineCompletionsController",e.InlineCompletionsController=g=s=Ee([he(1,r.IInstantiationService),he(2,d.IContextKeyService),he(3,c.IConfigurationService),he(4,f.ICommandService),he(5,p.ILanguageFeatureDebounceService),he(6,S.ILanguageFeaturesService),he(7,u.IAudioCueService),he(8,l.IKeybindingService)],g)}),define(ie[927],ne([1,0,35,109,16,21,216,239,261,136,686,29,28,15]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAlwaysShowInlineSuggestionToolbar=e.HideInlineCompletion=e.AcceptInlineCompletion=e.AcceptNextLineOfInlineCompletion=e.AcceptNextWordOfInlineCompletion=e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=void 0;class t extends y.EditorAction{constructor(){super({id:t.ID,label:b.localize(0,null),alias:"Show Next Inline Suggestion",precondition:n.ContextKeyExpr.and(E.EditorContextKeys.writable,p.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}async run(g,h){var m;const C=S.InlineCompletionsController.get(h);(m=C?.model.get())===null||m===void 0||m.next()}}e.ShowNextInlineSuggestionAction=t,t.ID=_.showNextInlineSuggestionActionId;class a extends y.EditorAction{constructor(){super({id:a.ID,label:b.localize(1,null),alias:"Show Previous Inline Suggestion",precondition:n.ContextKeyExpr.and(E.EditorContextKeys.writable,p.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}async run(g,h){var m;const C=S.InlineCompletionsController.get(h);(m=C?.model.get())===null||m===void 0||m.previous()}}e.ShowPreviousInlineSuggestionAction=a,a.ID=_.showPreviousInlineSuggestionActionId;class u extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:b.localize(2,null),alias:"Trigger Inline Suggestion",precondition:E.EditorContextKeys.writable})}async run(g,h){const m=S.InlineCompletionsController.get(h);await(0,k.asyncTransaction)(async C=>{var w;await((w=m?.model.get())===null||w===void 0?void 0:w.triggerExplicitly(C)),m?.playAudioCue(C)})}}e.TriggerInlineSuggestionAction=u;class f extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:b.localize(3,null),alias:"Accept Next Word Of Inline Suggestion",precondition:n.ContextKeyExpr.and(E.EditorContextKeys.writable,p.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:n.ContextKeyExpr.and(E.EditorContextKeys.writable,p.InlineCompletionContextKeys.inlineSuggestionVisible)},menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:b.localize(4,null),group:"primary",order:2}]})}async run(g,h){var m;const C=S.InlineCompletionsController.get(h);await((m=C?.model.get())===null||m===void 0?void 0:m.acceptNextWord(C.editor))}}e.AcceptNextWordOfInlineCompletion=f;class c extends y.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:b.localize(5,null),alias:"Accept Next Line Of Inline Suggestion",precondition:n.ContextKeyExpr.and(E.EditorContextKeys.writable,p.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:b.localize(6,null),group:"secondary",order:2}]})}async run(g,h){var m;const C=S.InlineCompletionsController.get(h);await((m=C?.model.get())===null||m===void 0?void 0:m.acceptNextLine(C.editor))}}e.AcceptNextLineOfInlineCompletion=c;class d extends y.EditorAction{constructor(){super({id:_.inlineSuggestCommitId,label:b.localize(7,null),alias:"Accept Inline Suggestion",precondition:p.InlineCompletionContextKeys.inlineSuggestionVisible,menuOpts:[{menuId:o.MenuId.InlineSuggestionToolbar,title:b.localize(8,null),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:n.ContextKeyExpr.and(p.InlineCompletionContextKeys.inlineSuggestionVisible,E.EditorContextKeys.tabMovesFocus.toNegated(),p.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,v.Context.Visible.toNegated(),E.EditorContextKeys.hoverFocused.toNegated())}})}async run(g,h){var m;const C=S.InlineCompletionsController.get(h);C&&((m=C.model.get())===null||m===void 0||m.accept(C.editor),C.editor.focus())}}e.AcceptInlineCompletion=d;class r extends y.EditorAction{constructor(){super({id:r.ID,label:b.localize(9,null),alias:"Hide Inline Suggestion",precondition:p.InlineCompletionContextKeys.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}async run(g,h){const m=S.InlineCompletionsController.get(h);(0,L.transaction)(C=>{var w;(w=m?.model.get())===null||w===void 0||w.stop(C)})}}e.HideInlineCompletion=r,r.ID="editor.action.inlineSuggest.hide";class l extends o.Action2{constructor(){super({id:l.ID,title:b.localize(10,null),f1:!1,precondition:void 0,menu:[{id:o.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:n.ContextKeyExpr.equals("config.editor.inlineSuggest.showToolbar","always")})}async run(g,h){const m=g.get(i.IConfigurationService),w=m.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";m.updateValue("editor.inlineSuggest.showToolbar",w)}}e.ToggleAlwaysShowInlineSuggestionToolbar=l,l.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}),define(ie[928],ne([1,0,7,58,2,35,5,42,101,261,255,119,687,69,8,57,80]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class f{constructor(r,l,s){this.owner=r,this.range=l,this.controller=s}isValidForHoverAnchor(r){return r.type===1&&this.range.startColumn<=r.range.startColumn&&this.range.endColumn>=r.range.endColumn}}e.InlineCompletionsHover=f;let c=class{constructor(r,l,s,g,h,m){this._editor=r,this._languageService=l,this._openerService=s,this.accessibilityService=g,this._instantiationService=h,this._telemetryService=m,this.hoverOrdinal=4}suggestHoverAnchor(r){const l=v.InlineCompletionsController.get(this._editor);if(!l)return null;const s=r.target;if(s.type===8){const g=s.detail;if(l.shouldShowHoverAtViewZone(g.viewZoneId))return new S.HoverForeignElementAnchor(1e3,this,_.Range.fromPositions(this._editor.getModel().validatePosition(g.positionBefore||g.position)),r.event.posx,r.event.posy,!1)}return s.type===7&&l.shouldShowHoverAt(s.range)?new S.HoverForeignElementAnchor(1e3,this,s.range,r.event.posx,r.event.posy,!1):s.type===6&&s.detail.mightBeForeignElement&&l.shouldShowHoverAt(s.range)?new S.HoverForeignElementAnchor(1e3,this,s.range,r.event.posx,r.event.posy,!1):null}computeSync(r,l){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const s=v.InlineCompletionsController.get(this._editor);return s&&s.shouldShowHoverAt(r.range)?[new f(this,r.range,s)]:[]}renderHoverParts(r,l){const s=new y.DisposableStore,g=l[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(r,g,s);const h=g.controller.model.get(),m=this._instantiationService.createInstance(b.InlineSuggestionHintsContentWidget,this._editor,!1,(0,E.constObservable)(null),h.selectedInlineCompletionIndex,h.inlineCompletionsCount,h.selectedInlineCompletion.map(C=>{var w;return(w=C?.inlineCompletion.source.inlineCompletions.commands)!==null&&w!==void 0?w:[]}));return r.fragment.appendChild(m.getDomNode()),h.triggerExplicitly(),s.add(m),s}renderScreenReaderText(r,l,s){const g=L.$,h=g("div.hover-row.markdown-hover"),m=L.append(h,g("div.hover-contents",{["aria-live"]:"assertive"})),C=s.add(new o.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),w=D=>{s.add(C.onDidRenderAsync(()=>{m.className="hover-contents code-hover-contents",r.onContentsChanged()}));const I=i.localize(0,null),M=s.add(C.render(new k.MarkdownString().appendText(I).appendCodeblock("text",D)));m.replaceChildren(M.element)};s.add((0,E.autorun)(D=>{var I;const M=(I=l.controller.model.read(D))===null||I===void 0?void 0:I.ghostText.read(D);if(M){const A=this._editor.getModel().getLineContent(M.lineNumber);w(M.renderForScreenReader(A))}else L.reset(m)})),r.fragment.appendChild(h)}};e.InlineCompletionsHoverParticipant=c,e.InlineCompletionsHoverParticipant=c=Ee([he(1,p.ILanguageService),he(2,a.IOpenerService),he(3,n.IAccessibilityService),he(4,t.IInstantiationService),he(5,u.ITelemetryService)],c)}),define(ie[929],ne([1,0,16,101,927,928,261,29]),function(Q,e,L,k,y,E,_,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(_.InlineCompletionsController.ID,_.InlineCompletionsController,3),(0,L.registerEditorAction)(y.TriggerInlineSuggestionAction),(0,L.registerEditorAction)(y.ShowNextInlineSuggestionAction),(0,L.registerEditorAction)(y.ShowPreviousInlineSuggestionAction),(0,L.registerEditorAction)(y.AcceptNextWordOfInlineCompletion),(0,L.registerEditorAction)(y.AcceptNextLineOfInlineCompletion),(0,L.registerEditorAction)(y.AcceptInlineCompletion),(0,L.registerEditorAction)(y.HideInlineCompletion),(0,p.registerAction2)(y.ToggleAlwaysShowInlineSuggestionToolbar),k.HoverParticipantRegistry.register(E.InlineCompletionsHoverParticipant)}),define(ie[388],ne([1,0,8]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,L.createDecorator)("workspaceTrustManagementService")}),define(ie[930],ne([1,0,14,26,58,2,17,12,16,36,39,293,118,42,333,101,251,842,718,28,8,57,70,81,388,475]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,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.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,g.registerIcon)("extensions-warning-message",k.Codicon.warning,c.localize(0,null));let m=class extends E.Disposable{constructor(le,ee,$,te){super(),this._editor=le,this._editorWorkerService=ee,this._workspaceTrustService=$,this._highlighter=null,this._bannerClosed=!1,this._updateState=G=>{if(G&&G.hasMore){if(this._bannerClosed)return;const de=Math.max(G.ambiguousCharacterCount,G.nonBasicAsciiCharacterCount,G.invisibleCharacterCount);let ue;if(G.nonBasicAsciiCharacterCount>=de)ue={message:c.localize(1,null),command:new W};else if(G.ambiguousCharacterCount>=de)ue={message:c.localize(2,null),command:new R};else if(G.invisibleCharacterCount>=de)ue={message:c.localize(3,null),command:new B};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:ue.message,icon:e.warningIcon,actions:[{label:ue.command.shortLabel,href:`command:${ue.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(te.createInstance(f.BannerController,le)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=le.getOption(124),this._register($.onDidChangeTrust(G=>{this._updateHighlighter()})),this._register(le.onDidChangeConfiguration(G=>{G.hasChanged(124)&&(this._options=le.getOption(124),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 le=C(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([le.nonBasicASCII,le.ambiguousCharacters,le.invisibleCharacters].every($=>$===!1))return;const ee={nonBasicASCII:le.nonBasicASCII,ambiguousCharacters:le.ambiguousCharacters,invisibleCharacters:le.invisibleCharacters,includeComments:le.includeComments,includeStrings:le.includeStrings,allowedCodePoints:Object.keys(le.allowedCharacters).map($=>$.codePointAt(0)),allowedLocales:Object.keys(le.allowedLocales).map($=>$==="_os"?new Intl.NumberFormat().resolvedOptions().locale:$==="_vscode"?_.language:$)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new w(this._editor,ee,this._updateState,this._editorWorkerService):this._highlighter=new D(this._editor,ee,this._updateState)}getDecorationInfo(le){return this._highlighter?this._highlighter.getDecorationInfo(le):null}};e.UnicodeHighlighter=m,m.ID="editor.contrib.unicodeHighlighter",e.UnicodeHighlighter=m=Ee([he(1,i.IEditorWorkerService),he(2,h.IWorkspaceTrustManagementService),he(3,r.IInstantiationService)],m);function C(J,le){return{nonBasicASCII:le.nonBasicASCII===v.inUntrustedWorkspace?!J:le.nonBasicASCII,ambiguousCharacters:le.ambiguousCharacters,invisibleCharacters:le.invisibleCharacters,includeComments:le.includeComments===v.inUntrustedWorkspace?!J:le.includeComments,includeStrings:le.includeStrings===v.inUntrustedWorkspace?!J:le.includeStrings,allowedCharacters:le.allowedCharacters,allowedLocales:le.allowedLocales}}let w=class extends E.Disposable{constructor(le,ee,$,te){super(),this._editor=le,this._options=ee,this._updateState=$,this._editorWorkerService=te,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new L.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 le=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(ee=>{if(this._model.isDisposed()||this._model.getVersionId()!==le)return;this._updateState(ee);const $=[];if(!ee.hasMore)for(const te of ee.ranges)$.push({range:te,options:N.instance.getDecorationFromOptions(this._options)});this._decorations.set($)})}getDecorationInfo(le){if(!this._decorations.has(le))return null;const ee=this._editor.getModel();if(!(0,t.isModelDecorationVisible)(ee,le))return null;const $=ee.getValueInRange(le.range);return{reason:T($,this._options),inComment:(0,t.isModelDecorationInComment)(ee,le),inString:(0,t.isModelDecorationInString)(ee,le)}}};w=Ee([he(3,i.IEditorWorkerService)],w);class D extends E.Disposable{constructor(le,ee,$){super(),this._editor=le,this._options=ee,this._updateState=$,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new L.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 le=this._editor.getVisibleRanges(),ee=[],$={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const te of le){const G=o.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,te);for(const de of G.ranges)$.ranges.push(de);$.ambiguousCharacterCount+=$.ambiguousCharacterCount,$.invisibleCharacterCount+=$.invisibleCharacterCount,$.nonBasicAsciiCharacterCount+=$.nonBasicAsciiCharacterCount,$.hasMore=$.hasMore||G.hasMore}if(!$.hasMore)for(const te of $.ranges)ee.push({range:te,options:N.instance.getDecorationFromOptions(this._options)});this._updateState($),this._decorations.set(ee)}getDecorationInfo(le){if(!this._decorations.has(le))return null;const ee=this._editor.getModel(),$=ee.getValueInRange(le.range);return(0,t.isModelDecorationVisible)(ee,le)?{reason:T($,this._options),inComment:(0,t.isModelDecorationInComment)(ee,le),inString:(0,t.isModelDecorationInString)(ee,le)}:null}}let I=class{constructor(le,ee,$){this._editor=le,this._languageService=ee,this._openerService=$,this.hoverOrdinal=5}computeSync(le,ee){if(!this._editor.hasModel()||le.type!==1)return[];const $=this._editor.getModel(),te=this._editor.getContribution(m.ID);if(!te)return[];const G=[],de=new Set;let ue=300;for(const X of ee){const Z=te.getDecorationInfo(X);if(!Z)continue;const oe=$.getValueInRange(X.range).codePointAt(0),Y=A(oe);let K;switch(Z.reason.kind){case 0:{(0,p.isBasicASCII)(Z.reason.confusableWith)?K=c.localize(4,null,Y,A(Z.reason.confusableWith.codePointAt(0))):K=c.localize(5,null,Y,A(Z.reason.confusableWith.codePointAt(0)));break}case 1:K=c.localize(6,null,Y);break;case 2:K=c.localize(7,null,Y);break}if(de.has(K))continue;de.add(K);const H={codePoint:oe,reason:Z.reason,inComment:Z.inComment,inString:Z.inString},z=c.localize(8,null),se=`command:${V.ID}?${encodeURIComponent(JSON.stringify(H))}`,q=new y.MarkdownString("",!0).appendMarkdown(K).appendText(" ").appendLink(se,z);G.push(new u.MarkdownHover(this,X.range,[q],!1,ue++))}return G}renderHoverParts(le,ee){return(0,u.renderMarkdownHovers)(le,ee,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=I,e.UnicodeHighlighterHoverParticipant=I=Ee([he(1,n.ILanguageService),he(2,l.IOpenerService)],I);function M(J){return`U+${J.toString(16).padStart(4,"0")}`}function A(J){let le=`\`${M(J)}\``;return p.InvisibleCharacters.isInvisibleCharacter(J)||(le+=` "${`${O(J)}`}"`),le}function O(J){return J===96?"`` ` ``":"`"+String.fromCodePoint(J)+"`"}function T(J,le){return o.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(J,le)}class N{constructor(){this.map=new Map}getDecorationFromOptions(le){return this.getDecoration(!le.includeComments,!le.includeStrings)}getDecoration(le,ee){const $=`${le}${ee}`;let te=this.map.get($);return te||(te=b.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:le,hideInStringTokens:ee}),this.map.set($,te)),te}}N.instance=new N;class P extends S.EditorAction{constructor(){super({id:R.ID,label:c.localize(10,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=c.localize(9,null)}async run(le,ee,$){const te=le?.get(d.IConfigurationService);te&&this.runAction(te)}async runAction(le){await le.updateValue(v.unicodeHighlightConfigKeys.includeComments,!1,2)}}e.DisableHighlightingInCommentsAction=P;class x extends S.EditorAction{constructor(){super({id:R.ID,label:c.localize(12,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=c.localize(11,null)}async run(le,ee,$){const te=le?.get(d.IConfigurationService);te&&this.runAction(te)}async runAction(le){await le.updateValue(v.unicodeHighlightConfigKeys.includeStrings,!1,2)}}e.DisableHighlightingInStringsAction=x;class R extends S.EditorAction{constructor(){super({id:R.ID,label:c.localize(14,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=c.localize(13,null)}async run(le,ee,$){const te=le?.get(d.IConfigurationService);te&&this.runAction(te)}async runAction(le){await le.updateValue(v.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)}}e.DisableHighlightingOfAmbiguousCharactersAction=R,R.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class B extends S.EditorAction{constructor(){super({id:B.ID,label:c.localize(16,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=c.localize(15,null)}async run(le,ee,$){const te=le?.get(d.IConfigurationService);te&&this.runAction(te)}async runAction(le){await le.updateValue(v.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)}}e.DisableHighlightingOfInvisibleCharactersAction=B,B.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class W extends S.EditorAction{constructor(){super({id:W.ID,label:c.localize(18,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=c.localize(17,null)}async run(le,ee,$){const te=le?.get(d.IConfigurationService);te&&this.runAction(te)}async runAction(le){await le.updateValue(v.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=W,W.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class V extends S.EditorAction{constructor(){super({id:V.ID,label:c.localize(19,null),alias:"Show Exclude Options",precondition:void 0})}async run(le,ee,$){const{codePoint:te,reason:G,inString:de,inComment:ue}=$,X=String.fromCodePoint(te),Z=le.get(s.IQuickInputService),re=le.get(d.IConfigurationService);function oe(H){return p.InvisibleCharacters.isInvisibleCharacter(H)?c.localize(20,null,M(H)):c.localize(21,null,`${M(H)} "${X}"`)}const Y=[];if(G.kind===0)for(const H of G.notAmbiguousInLocales)Y.push({label:c.localize(22,null,H),run:async()=>{F(re,[H])}});if(Y.push({label:oe(te),run:()=>U(re,[te])}),ue){const H=new P;Y.push({label:H.label,run:async()=>H.runAction(re)})}else if(de){const H=new x;Y.push({label:H.label,run:async()=>H.runAction(re)})}if(G.kind===0){const H=new R;Y.push({label:H.label,run:async()=>H.runAction(re)})}else if(G.kind===1){const H=new B;Y.push({label:H.label,run:async()=>H.runAction(re)})}else if(G.kind===2){const H=new W;Y.push({label:H.label,run:async()=>H.runAction(re)})}else j(G);const K=await Z.pick(Y,{title:c.localize(23,null)});K&&await K.run()}}e.ShowExcludeOptions=V,V.ID="editor.action.unicodeHighlight.showExcludeOptions";async function U(J,le){const ee=J.getValue(v.unicodeHighlightConfigKeys.allowedCharacters);let $;typeof ee=="object"&&ee?$=ee:$={};for(const te of le)$[String.fromCodePoint(te)]=!0;await J.updateValue(v.unicodeHighlightConfigKeys.allowedCharacters,$,2)}async function F(J,le){var ee;const $=(ee=J.inspect(v.unicodeHighlightConfigKeys.allowedLocales).user)===null||ee===void 0?void 0:ee.value;let te;typeof $=="object"&&$?te=Object.assign({},$):te={};for(const G of le)te[G]=!0;await J.updateValue(v.unicodeHighlightConfigKeys.allowedLocales,te,2)}function j(J){throw new Error(`Unexpected value: ${J}`)}(0,S.registerEditorAction)(R),(0,S.registerEditorAction)(B),(0,S.registerEditorAction)(W),(0,S.registerEditorAction)(V),(0,S.registerEditorContribution)(m.ID,m,1),a.HoverParticipantRegistry.register(I)}),define(ie[931],ne([1,0,190,194,883,804,886,805,806,807,888,890,913,897,808,920,809,891,921,922,374,258,812,813,773,929,259,260,380,378,381,815,915,898,816,817,901,902,818,907,841,866,867,868,820,196,917,387,821,822,793,930,823,908,361,824,819,95,175]),function(Q,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ie[262],ne([1,0,12,7,50,6,121,2,17,100,22,133,244,74,11,5,52,68,187,25,28,353,15,162,8,769,34,344,120,345,770,164,47,87,80,167,135,95,45,33,64,388,59,772,788,875,46,778,118,245,42,861,237,880,877,368,134,771,69,29,799,774,103,766,236,767,163,192,96,777,57,70,91,792,161,775,152,9,242,48,32,367,346,919,78,862,757]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A,O,T,N,P,x,R,B,W,V,U,F,j,J,le,ee,$,te,G,de,ue,X,Z,re,oe,Y,K,H,z,se,q,ae,ce,ge,pe,me,ve,Ce,Se,_e,Te,Me,Pe,Be,Le,Ne,fe,be,ke){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class Re{constructor(Oe){this.disposed=!1,this.model=Oe,this._onWillDispose=new E.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Ve=class{constructor(Oe){this.modelService=Oe}createModelReference(Oe){const He=this.modelService.getModel(Oe);return He?Promise.resolve(new p.ImmortalReference(new Re(He))):Promise.reject(new Error("Model not found"))}};Ve=Ee([he(0,u.IModelService)],Ve);class Ke{show(){return Ke.NULL_PROGRESS_RUNNER}async showWhile(Oe,He){await Oe}}Ke.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class je{withProgress(Oe,He,Ue){return He({report:()=>{}})}}class st{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class ot{async confirm(Oe){return{confirmed:this.doConfirm(Oe.message,Oe.detail),checkboxChecked:!1}}doConfirm(Oe,He){let Ue=Oe;return He&&(Ue=Ue+` `+He),ke.mainWindow.confirm(Ue)}async prompt(Oe){var He,Ue;let $e;if(this.doConfirm(Oe.message,Oe.detail)){const tt=[...(He=Oe.buttons)!==null&&He!==void 0?He:[]];Oe.cancelButton&&typeof Oe.cancelButton!="string"&&typeof Oe.cancelButton!="boolean"&&tt.push(Oe.cancelButton),$e=await((Ue=tt[0])===null||Ue===void 0?void 0:Ue.run({checkboxChecked:!1}))}return{result:$e}}async error(Oe,He){await this.prompt({type:v.default.Error,message:Oe,detail:He})}}class nt{info(Oe){return this.notify({severity:v.default.Info,message:Oe})}warn(Oe){return this.notify({severity:v.default.Warning,message:Oe})}error(Oe){return this.notify({severity:v.default.Error,message:Oe})}notify(Oe){switch(Oe.severity){case v.default.Error:console.error(Oe.message);break;case v.default.Warning:console.warn(Oe.message);break;default:console.log(Oe.message);break}return nt.NO_OP}prompt(Oe,He,Ue,$e){return nt.NO_OP}status(Oe,He){return p.Disposable.None}}e.StandaloneNotificationService=nt,nt.NO_OP=new O.NoOpNotification;let rt=class{constructor(Oe){this._onWillExecuteCommand=new E.Emitter,this._onDidExecuteCommand=new E.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Oe}executeCommand(Oe,...He){const Ue=d.CommandsRegistry.getCommand(Oe);if(!Ue)return Promise.reject(new Error(`command '${Oe}' not found`));try{this._onWillExecuteCommand.fire({commandId:Oe,args:He});const $e=this._instantiationService.invokeFunction.apply(this._instantiationService,[Ue.handler,...He]);return this._onDidExecuteCommand.fire({commandId:Oe,args:He}),Promise.resolve($e)}catch($e){return Promise.reject($e)}}};e.StandaloneCommandService=rt,e.StandaloneCommandService=rt=Ee([he(0,h.IInstantiationService)],rt);let Qe=class extends m.AbstractKeybindingService{constructor(Oe,He,Ue,$e,et,tt){super(Oe,He,Ue,$e,et),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const at=pt=>{const wt=new p.DisposableStore;wt.add(k.addDisposableListener(pt,k.EventType.KEY_DOWN,Dt=>{const yt=new y.StandardKeyboardEvent(Dt);this._dispatch(yt,yt.target)&&(yt.preventDefault(),yt.stopPropagation())})),wt.add(k.addDisposableListener(pt,k.EventType.KEY_UP,Dt=>{const yt=new y.StandardKeyboardEvent(Dt);this._singleModifierDispatch(yt,yt.target)&&yt.preventDefault()})),this._domNodeListeners.push(new ht(pt,wt))},it=pt=>{for(let wt=0;wt{pt.getOption(61)||at(pt.getContainerDomNode())},ct=pt=>{pt.getOption(61)||it(pt.getContainerDomNode())};this._register(tt.onCodeEditorAdd(Je)),this._register(tt.onCodeEditorRemove(ct)),tt.listCodeEditors().forEach(Je);const mt=pt=>{at(pt.getContainerDomNode())},kt=pt=>{it(pt.getContainerDomNode())};this._register(tt.onDiffEditorAdd(mt)),this._register(tt.onDiffEditorRemove(kt)),tt.listDiffEditors().forEach(mt)}addDynamicKeybinding(Oe,He,Ue,$e){return(0,p.combinedDisposable)(d.CommandsRegistry.registerCommand(Oe,Ue),this.addDynamicKeybindings([{keybinding:He,command:Oe,when:$e}]))}addDynamicKeybindings(Oe){const He=Oe.map(Ue=>{var $e;return{keybinding:(0,_.decodeKeybinding)(Ue.keybinding,S.OS),command:($e=Ue.command)!==null&&$e!==void 0?$e:null,commandArgs:Ue.commandArgs,when:Ue.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(He),this.updateResolver(),(0,p.toDisposable)(()=>{for(let Ue=0;Uethis._log(Ue))}return this._cachedResolver}_documentHasFocus(){return ke.mainWindow.document.hasFocus()}_toNormalizedKeybindingItems(Oe,He){const Ue=[];let $e=0;for(const et of Oe){const tt=et.when||void 0,at=et.keybinding;if(!at)Ue[$e++]=new I.ResolvedKeybindingItem(void 0,et.command,et.commandArgs,tt,He,null,!1);else{const it=M.USLayoutResolvedKeybinding.resolveKeybinding(at,S.OS);for(const Je of it)Ue[$e++]=new I.ResolvedKeybindingItem(Je,et.command,et.commandArgs,tt,He,null,!1)}}return Ue}resolveKeyboardEvent(Oe){const He=new _.KeyCodeChord(Oe.ctrlKey,Oe.shiftKey,Oe.altKey,Oe.metaKey,Oe.keyCode);return new M.USLayoutResolvedKeybinding([He],S.OS)}};e.StandaloneKeybindingService=Qe,e.StandaloneKeybindingService=Qe=Ee([he(0,s.IContextKeyService),he(1,d.ICommandService),he(2,N.ITelemetryService),he(3,O.INotificationService),he(4,V.ILogService),he(5,W.ICodeEditorService)],Qe);class ht extends p.Disposable{constructor(Oe,He){super(),this.domNode=Oe,this._register(He)}}function gt(Ge){return Ge&&typeof Ge=="object"&&(!Ge.overrideIdentifier||typeof Ge.overrideIdentifier=="string")&&(!Ge.resource||Ge.resource instanceof b.URI)}class ft{constructor(){this._onDidChangeConfiguration=new E.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Oe=new Pe.DefaultConfiguration;this._configuration=new l.Configuration(Oe.reload(),new l.ConfigurationModel,new l.ConfigurationModel,new l.ConfigurationModel),Oe.dispose()}getValue(Oe,He){const Ue=typeof Oe=="string"?Oe:void 0,$e=gt(Oe)?Oe:gt(He)?He:{};return this._configuration.getValue(Ue,$e,void 0)}updateValues(Oe){const He={data:this._configuration.toData()},Ue=[];for(const $e of Oe){const[et,tt]=$e;this.getValue(et)!==tt&&(this._configuration.updateValue(et,tt),Ue.push(et))}if(Ue.length>0){const $e=new l.ConfigurationChangeEvent({keys:Ue,overrides:[]},He,this._configuration);$e.source=8,$e.sourceConfig=null,this._onDidChangeConfiguration.fire($e)}return Promise.resolve()}updateValue(Oe,He,Ue,$e){return this.updateValues([[Oe,He]])}inspect(Oe,He={}){return this._configuration.inspect(Oe,He,void 0)}}e.StandaloneConfigurationService=ft;let dt=class{constructor(Oe,He,Ue){this.configurationService=Oe,this.modelService=He,this.languageService=Ue,this._onDidChangeConfiguration=new E.Emitter,this.configurationService.onDidChangeConfiguration($e=>{this._onDidChangeConfiguration.fire({affectedKeys:$e.affectedKeys,affectsConfiguration:(et,tt)=>$e.affectsConfiguration(tt)})})}getValue(Oe,He,Ue){const $e=t.Position.isIPosition(He)?He:null,et=$e?typeof Ue=="string"?Ue:void 0:typeof He=="string"?He:void 0,tt=Oe?this.getLanguage(Oe,$e):void 0;return typeof et>"u"?this.configurationService.getValue({resource:Oe,overrideIdentifier:tt}):this.configurationService.getValue(et,{resource:Oe,overrideIdentifier:tt})}getLanguage(Oe,He){const Ue=this.modelService.getModel(Oe);return Ue?He?Ue.getLanguageIdAtPosition(He.lineNumber,He.column):Ue.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Oe)}};dt=Ee([he(0,r.IConfigurationService),he(1,u.IModelService),he(2,de.ILanguageService)],dt);let we=class{constructor(Oe){this.configurationService=Oe}getEOL(Oe,He){const Ue=this.configurationService.getValue("files.eol",{overrideIdentifier:He,resource:Oe});return Ue&&typeof Ue=="string"&&Ue!=="auto"?Ue:S.isLinux||S.isMacintosh?` `:`\r `}};we=Ee([he(0,r.IConfigurationService)],we);class ye{publicLog2(){}}class Ie{constructor(){const Oe=b.URI.from({scheme:Ie.SCHEME,authority:"model",path:"/"});this.workspace={id:P.STANDALONE_EDITOR_WORKSPACE_ID,folders:[new P.WorkspaceFolder({uri:Oe,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(Oe){return Oe&&Oe.scheme===Ie.SCHEME?this.workspace.folders[0]:null}}Ie.SCHEME="inmemory";function Ae(Ge,Oe,He){if(!Oe||!(Ge instanceof ft))return;const Ue=[];Object.keys(Oe).forEach($e=>{(0,i.isEditorConfigurationKey)($e)&&Ue.push([`editor.${$e}`,Oe[$e]]),He&&(0,i.isDiffEditorConfigurationKey)($e)&&Ue.push([`diffEditor.${$e}`,Oe[$e]])}),Ue.length>0&&Ge.updateValues(Ue)}e.updateConfigurationService=Ae;let ze=class{constructor(Oe){this._modelService=Oe}hasPreviewHandler(){return!1}async apply(Oe,He){const Ue=Array.isArray(Oe)?Oe:o.ResourceEdit.convert(Oe),$e=new Map;for(const at of Ue){if(!(at instanceof o.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const it=this._modelService.getModel(at.resource);if(!it)throw new Error("bad edit - model not found");if(typeof at.versionId=="number"&&it.getVersionId()!==at.versionId)throw new Error("bad state - model changed in the meantime");let Je=$e.get(it);Je||(Je=[],$e.set(it,Je)),Je.push(n.EditOperation.replaceMove(a.Range.lift(at.textEdit.range),at.textEdit.text))}let et=0,tt=0;for(const[at,it]of $e)at.pushStackElement(),at.pushEditOperations([],it,()=>[]),at.pushStackElement(),tt+=1,et+=it.length;return{ariaSummary:L.format(R.StandaloneServicesNLS.bulkEditServiceSummary,et,tt),isApplied:et>0}}};ze=Ee([he(0,u.IModelService)],ze);class xe{getUriLabel(Oe,He){return Oe.scheme==="file"?Oe.fsPath:Oe.path}getUriBasenameLabel(Oe){return(0,B.basename)(Oe)}}let De=class extends j.ContextViewService{constructor(Oe,He){super(Oe),this._codeEditorService=He}showContextView(Oe,He,Ue){if(!He){const $e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();$e&&(He=$e.getContainerDomNode())}return super.showContextView(Oe,He,Ue)}};De=Ee([he(0,x.ILayoutService),he(1,W.ICodeEditorService)],De);class Fe{constructor(){this._neverEmitter=new E.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class We extends J.LanguageService{constructor(){super()}}class qe extends Le.LogService{constructor(){super(new V.ConsoleLogger)}}let Ze=class extends le.ContextMenuService{constructor(Oe,He,Ue,$e,et,tt){super(Oe,He,Ue,$e,et,tt),this.configure({blockMouse:!1})}};Ze=Ee([he(0,N.ITelemetryService),he(1,O.INotificationService),he(2,F.IContextViewService),he(3,C.IKeybindingService),he(4,z.IMenuService),he(5,s.IContextKeyService)],Ze);class ut{async playAudioCue(Oe,He){}}class Xe{notify(Oe,He){}}(0,ee.registerSingleton)(r.IConfigurationService,ft,0),(0,ee.registerSingleton)(c.ITextResourceConfigurationService,dt,0),(0,ee.registerSingleton)(c.ITextResourcePropertiesService,we,0),(0,ee.registerSingleton)(P.IWorkspaceContextService,Ie,0),(0,ee.registerSingleton)(A.ILabelService,xe,0),(0,ee.registerSingleton)(N.ITelemetryService,ye,0),(0,ee.registerSingleton)(g.IDialogService,ot,0),(0,ee.registerSingleton)(be.IEnvironmentService,st,0),(0,ee.registerSingleton)(O.INotificationService,nt,0),(0,ee.registerSingleton)(Ce.IMarkerService,Se.MarkerService,0),(0,ee.registerSingleton)(de.ILanguageService,We,0),(0,ee.registerSingleton)(Y.IStandaloneThemeService,oe.StandaloneThemeService,0),(0,ee.registerSingleton)(V.ILogService,qe,0),(0,ee.registerSingleton)(u.IModelService,Z.ModelService,0),(0,ee.registerSingleton)(X.IMarkerDecorationsService,ue.MarkerDecorationsService,0),(0,ee.registerSingleton)(s.IContextKeyService,ce.ContextKeyService,0),(0,ee.registerSingleton)(T.IProgressService,je,0),(0,ee.registerSingleton)(T.IEditorProgressService,Ke,0),(0,ee.registerSingleton)(Me.IStorageService,Me.InMemoryStorageService,0),(0,ee.registerSingleton)(te.IEditorWorkerService,G.EditorWorkerService,0),(0,ee.registerSingleton)(o.IBulkEditService,ze,0),(0,ee.registerSingleton)(U.IWorkspaceTrustManagementService,Fe,0),(0,ee.registerSingleton)(f.ITextModelService,Ve,0),(0,ee.registerSingleton)(H.IAccessibilityService,K.AccessibilityService,0),(0,ee.registerSingleton)(ve.IListService,ve.ListService,0),(0,ee.registerSingleton)(d.ICommandService,rt,0),(0,ee.registerSingleton)(C.IKeybindingService,Qe,0),(0,ee.registerSingleton)(Te.IQuickInputService,re.StandaloneQuickInputService,0),(0,ee.registerSingleton)(F.IContextViewService,De,0),(0,ee.registerSingleton)(_e.IOpenerService,$.OpenerService,0),(0,ee.registerSingleton)(ae.IClipboardService,q.BrowserClipboardService,0),(0,ee.registerSingleton)(F.IContextMenuService,Ze,0),(0,ee.registerSingleton)(z.IMenuService,se.MenuService,0),(0,ee.registerSingleton)(Be.IAudioCueService,ut,0),(0,ee.registerSingleton)(H.IAccessibleNotificationService,Xe,0);var lt;(function(Ge){const Oe=new me.ServiceCollection;for(const[it,Je]of(0,ee.getSingletonServiceDescriptors)())Oe.set(it,Je);const He=new pe.InstantiationService(Oe,!0);Oe.set(h.IInstantiationService,He);function Ue(it){$e||tt({});const Je=Oe.get(it);if(!Je)throw new Error("Missing service "+it);return Je instanceof ge.SyncDescriptor?He.invokeFunction(ct=>ct.get(it)):Je}Ge.get=Ue;let $e=!1;const et=new E.Emitter;function tt(it){if($e)return He;$e=!0;for(const[ct,mt]of(0,ee.getSingletonServiceDescriptors)())Oe.get(ct)||Oe.set(ct,mt);for(const ct in it)if(it.hasOwnProperty(ct)){const mt=(0,h.createDecorator)(ct);Oe.get(mt)instanceof ge.SyncDescriptor&&Oe.set(mt,it[ct])}const Je=(0,Ne.getEditorFeatures)();for(const ct of Je)try{He.createInstance(ct)}catch(mt){(0,fe.onUnexpectedError)(mt)}return et.fire(),He}Ge.initialize=tt;function at(it){if($e)return it();const Je=new p.DisposableStore,ct=Je.add(et.event(()=>{ct.dispose(),Je.add(it())}));return Je}Ge.withServices=at})(lt||(e.StandaloneServices=lt={}))}),define(ie[932],ne([1,0,51,2,33,194,284,262,134,29,25,28,15,59,8,34,47,23,69,95,103,87,52,42,367,79,32,18,256,161,48]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor2=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let A=0,O=!1;function T(W){if(!W){if(O)return;O=!0}L.setARIAContainer(W||M.mainWindow.document.body)}let N=class extends E.CodeEditorWidget{constructor(V,U,F,j,J,le,ee,$,te,G,de,ue){const X={...U};X.ariaLabel=X.ariaLabel||d.StandaloneCodeEditorNLS.editorViewAccessibleLabel,X.ariaLabel=X.ariaLabel+";"+d.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(V,X,{},F,j,J,le,$,te,G,de,ue),ee instanceof p.StandaloneKeybindingService?this._standaloneKeybindingService=ee:this._standaloneKeybindingService=null,T(X.ariaContainerElement)}addCommand(V,U,F){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const j="DYNAMIC_"+ ++A,J=i.ContextKeyExpr.deserialize(F);return this._standaloneKeybindingService.addDynamicKeybinding(j,V,U,J),j}createContextKey(V,U){return this._contextKeyService.createKey(V,U)}addAction(V){if(typeof V.id!="string"||typeof V.label!="string"||typeof V.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),k.Disposable.None;const U=V.id,F=V.label,j=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(V.precondition)),J=V.keybindings,le=i.ContextKeyExpr.and(j,i.ContextKeyExpr.deserialize(V.keybindingContext)),ee=V.contextMenuGroupId||null,$=V.contextMenuOrder||0,te=(X,...Z)=>Promise.resolve(V.run(this,...Z)),G=new k.DisposableStore,de=this.getId()+":"+U;if(G.add(b.CommandsRegistry.registerCommand(de,te)),ee){const X={command:{id:de,title:F},when:j,group:ee,order:$};G.add(v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,X))}if(Array.isArray(J))for(const X of J)G.add(this._standaloneKeybindingService.addDynamicKeybinding(de,X,te,le));const ue=new _.InternalEditorAction(de,F,F,void 0,j,(...X)=>Promise.resolve(V.run(this,...X)),this._contextKeyService);return this._actions.set(U,ue),G.add((0,k.toDisposable)(()=>{this._actions.delete(U)})),G}_triggerCommand(V,U){if(this._codeEditorService instanceof h.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(V,U)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(V,U)}};e.StandaloneCodeEditor=N,e.StandaloneCodeEditor=N=Ee([he(2,t.IInstantiationService),he(3,y.ICodeEditorService),he(4,b.ICommandService),he(5,i.IContextKeyService),he(6,a.IKeybindingService),he(7,f.IThemeService),he(8,u.INotificationService),he(9,c.IAccessibilityService),he(10,C.ILanguageConfigurationService),he(11,w.ILanguageFeaturesService)],N);let P=class extends N{constructor(V,U,F,j,J,le,ee,$,te,G,de,ue,X,Z,re){const oe={...U};(0,p.updateConfigurationService)(G,oe,!1);const Y=$.registerEditorContainer(V);typeof oe.theme=="string"&&$.setTheme(oe.theme),typeof oe.autoDetectHighContrast<"u"&&$.setAutoDetectHighContrast(!!oe.autoDetectHighContrast);const K=oe.model;delete oe.model,super(V,oe,F,j,J,le,ee,$,te,de,Z,re),this._configurationService=G,this._standaloneThemeService=$,this._register(Y);let H;if(typeof K>"u"){const z=X.getLanguageIdByMimeType(oe.language)||oe.language||m.PLAINTEXT_LANGUAGE_ID;H=R(ue,X,oe.value||"",z,void 0),this._ownsModel=!0}else H=K,this._ownsModel=!1;if(this._attachModel(H),H){const z={oldModelUrl:null,newModelUrl:H.uri};this._onDidChangeModel.fire(z)}}dispose(){super.dispose()}updateOptions(V){(0,p.updateConfigurationService)(this._configurationService,V,!1),typeof V.theme=="string"&&this._standaloneThemeService.setTheme(V.theme),typeof V.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!V.autoDetectHighContrast),super.updateOptions(V)}_postDetachModelCleanup(V){super._postDetachModelCleanup(V),V&&this._ownsModel&&(V.dispose(),this._ownsModel=!1)}};e.StandaloneEditor=P,e.StandaloneEditor=P=Ee([he(2,t.IInstantiationService),he(3,y.ICodeEditorService),he(4,b.ICommandService),he(5,i.IContextKeyService),he(6,a.IKeybindingService),he(7,S.IStandaloneThemeService),he(8,u.INotificationService),he(9,o.IConfigurationService),he(10,c.IAccessibilityService),he(11,s.IModelService),he(12,g.ILanguageService),he(13,C.ILanguageConfigurationService),he(14,w.ILanguageFeaturesService)],P);let x=class extends D.DiffEditorWidget{constructor(V,U,F,j,J,le,ee,$,te,G,de,ue){const X={...U};(0,p.updateConfigurationService)($,X,!0);const Z=le.registerEditorContainer(V);typeof X.theme=="string"&&le.setTheme(X.theme),typeof X.autoDetectHighContrast<"u"&&le.setAutoDetectHighContrast(!!X.autoDetectHighContrast),super(V,X,{},j,F,J,ue,G),this._configurationService=$,this._standaloneThemeService=le,this._register(Z)}dispose(){super.dispose()}updateOptions(V){(0,p.updateConfigurationService)(this._configurationService,V,!0),typeof V.theme=="string"&&this._standaloneThemeService.setTheme(V.theme),typeof V.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!V.autoDetectHighContrast),super.updateOptions(V)}_createInnerEditor(V,U,F){return V.createInstance(N,U,F)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(V,U,F){return this.getModifiedEditor().addCommand(V,U,F)}createContextKey(V,U){return this.getModifiedEditor().createContextKey(V,U)}addAction(V){return this.getModifiedEditor().addAction(V)}};e.StandaloneDiffEditor2=x,e.StandaloneDiffEditor2=x=Ee([he(2,t.IInstantiationService),he(3,i.IContextKeyService),he(4,y.ICodeEditorService),he(5,S.IStandaloneThemeService),he(6,u.INotificationService),he(7,o.IConfigurationService),he(8,n.IContextMenuService),he(9,l.IEditorProgressService),he(10,r.IClipboardService),he(11,I.IAudioCueService)],x);function R(W,V,U,F,j){if(U=U||"",!F){const J=U.indexOf(` `);let le=U;return J!==-1&&(le=U.substring(0,J)),B(W,U,V.createByFilepathOrFirstLine(j||null,le),j)}return B(W,U,V.createById(F),j)}e.createTextModel=R;function B(W,V,U,F){return W.createModel(V,U,F)}}),define(ie[933],ne([1,0,48,2,12,22,332,16,33,783,36,147,235,178,31,42,32,79,159,43,52,211,761,932,262,134,29,25,15,34,96,57,885,481]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a,u,f,c,d,r,l,s,g,h,m,C,w,D,I,M,A,O){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerEditorOpener=e.registerLinkOpener=e.registerCommand=e.remeasureFonts=e.setTheme=e.defineTheme=e.tokenize=e.colorizeModelLine=e.colorize=e.colorizeElement=e.createWebWorker=e.onDidChangeModelLanguage=e.onWillDisposeModel=e.onDidCreateModel=e.getModels=e.getModel=e.onDidChangeMarkers=e.getModelMarkers=e.removeAllMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.addKeybindingRules=e.addKeybindingRule=e.addEditorAction=e.addCommand=e.createMultiFileDiffEditor=e.createDiffEditor=e.getDiffEditors=e.getEditors=e.onDidCreateDiffEditor=e.onDidCreateEditor=e.create=void 0;function T(Ce,Se,_e){return h.StandaloneServices.initialize(_e||{}).createInstance(g.StandaloneEditor,Ce,Se)}e.create=T;function N(Ce){return h.StandaloneServices.get(S.ICodeEditorService).onCodeEditorAdd(_e=>{Ce(_e)})}e.onDidCreateEditor=N;function P(Ce){return h.StandaloneServices.get(S.ICodeEditorService).onDiffEditorAdd(_e=>{Ce(_e)})}e.onDidCreateDiffEditor=P;function x(){return h.StandaloneServices.get(S.ICodeEditorService).listCodeEditors()}e.getEditors=x;function R(){return h.StandaloneServices.get(S.ICodeEditorService).listDiffEditors()}e.getDiffEditors=R;function B(Ce,Se,_e){return h.StandaloneServices.initialize(_e||{}).createInstance(g.StandaloneDiffEditor2,Ce,Se)}e.createDiffEditor=B;function W(Ce,Se){const _e=h.StandaloneServices.initialize(Se||{});return new O.MultiDiffEditorWidget(Ce,{},_e)}e.createMultiFileDiffEditor=W;function V(Ce){if(typeof Ce.id!="string"||typeof Ce.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return w.CommandsRegistry.registerCommand(Ce.id,Ce.run)}e.addCommand=V;function U(Ce){if(typeof Ce.id!="string"||typeof Ce.label!="string"||typeof Ce.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const Se=D.ContextKeyExpr.deserialize(Ce.precondition),_e=(Me,...Pe)=>p.EditorCommand.runEditorCommand(Me,Pe,Se,(Be,Le,Ne)=>Promise.resolve(Ce.run(Le,...Ne))),Te=new k.DisposableStore;if(Te.add(w.CommandsRegistry.registerCommand(Ce.id,_e)),Ce.contextMenuGroupId){const Me={command:{id:Ce.id,title:Ce.label},when:Se,group:Ce.contextMenuGroupId,order:Ce.contextMenuOrder||0};Te.add(C.MenuRegistry.appendMenuItem(C.MenuId.EditorContext,Me))}if(Array.isArray(Ce.keybindings)){const Me=h.StandaloneServices.get(I.IKeybindingService);if(!(Me instanceof h.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const Pe=D.ContextKeyExpr.and(Se,D.ContextKeyExpr.deserialize(Ce.keybindingContext));Te.add(Me.addDynamicKeybindings(Ce.keybindings.map(Be=>({keybinding:Be,command:Ce.id,when:Pe}))))}}return Te}e.addEditorAction=U;function F(Ce){return j([Ce])}e.addKeybindingRule=F;function j(Ce){const Se=h.StandaloneServices.get(I.IKeybindingService);return Se instanceof h.StandaloneKeybindingService?Se.addDynamicKeybindings(Ce.map(_e=>({keybinding:_e.keybinding,command:_e.command,commandArgs:_e.commandArgs,when:D.ContextKeyExpr.deserialize(_e.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),k.Disposable.None)}e.addKeybindingRules=j;function J(Ce,Se,_e){const Te=h.StandaloneServices.get(a.ILanguageService),Me=Te.getLanguageIdByMimeType(Se)||Se;return(0,g.createTextModel)(h.StandaloneServices.get(r.IModelService),Te,Ce,Me,_e)}e.createModel=J;function le(Ce,Se){const _e=h.StandaloneServices.get(a.ILanguageService),Te=_e.getLanguageIdByMimeType(Se)||Se||f.PLAINTEXT_LANGUAGE_ID;Ce.setLanguage(_e.createById(Te))}e.setModelLanguage=le;function ee(Ce,Se,_e){Ce&&h.StandaloneServices.get(M.IMarkerService).changeOne(Se,Ce.uri,_e)}e.setModelMarkers=ee;function $(Ce){h.StandaloneServices.get(M.IMarkerService).changeAll(Ce,[])}e.removeAllMarkers=$;function te(Ce){return h.StandaloneServices.get(M.IMarkerService).read(Ce)}e.getModelMarkers=te;function G(Ce){return h.StandaloneServices.get(M.IMarkerService).onMarkerChanged(Ce)}e.onDidChangeMarkers=G;function de(Ce){return h.StandaloneServices.get(r.IModelService).getModel(Ce)}e.getModel=de;function ue(){return h.StandaloneServices.get(r.IModelService).getModels()}e.getModels=ue;function X(Ce){return h.StandaloneServices.get(r.IModelService).onModelAdded(Ce)}e.onDidCreateModel=X;function Z(Ce){return h.StandaloneServices.get(r.IModelService).onModelRemoved(Ce)}e.onWillDisposeModel=Z;function re(Ce){return h.StandaloneServices.get(r.IModelService).onModelLanguageChanged(_e=>{Ce({model:_e.model,oldLanguage:_e.oldLanguageId})})}e.onDidChangeModelLanguage=re;function oe(Ce){return(0,v.createWebWorker)(h.StandaloneServices.get(r.IModelService),h.StandaloneServices.get(u.ILanguageConfigurationService),Ce)}e.createWebWorker=oe;function Y(Ce,Se){const _e=h.StandaloneServices.get(a.ILanguageService),Te=h.StandaloneServices.get(m.IStandaloneThemeService);return s.Colorizer.colorizeElement(Te,_e,Ce,Se).then(()=>{Te.registerEditorContainer(Ce)})}e.colorizeElement=Y;function K(Ce,Se,_e){const Te=h.StandaloneServices.get(a.ILanguageService);return h.StandaloneServices.get(m.IStandaloneThemeService).registerEditorContainer(L.mainWindow.document.body),s.Colorizer.colorize(Te,Ce,Se,_e)}e.colorize=K;function H(Ce,Se,_e=4){return h.StandaloneServices.get(m.IStandaloneThemeService).registerEditorContainer(L.mainWindow.document.body),s.Colorizer.colorizeModelLine(Ce,Se,_e)}e.colorizeModelLine=H;function z(Ce){const Se=t.TokenizationRegistry.get(Ce);return Se||{getInitialState:()=>c.NullState,tokenize:(_e,Te,Me)=>(0,c.nullTokenize)(Ce,Me)}}function se(Ce,Se){t.TokenizationRegistry.getOrCreate(Se);const _e=z(Se),Te=(0,y.splitLines)(Ce),Me=[];let Pe=_e.getInitialState();for(let Be=0,Le=Te.length;Be{var Pe;if(!Te)return null;const Be=(Pe=_e.options)===null||Pe===void 0?void 0:Pe.selection;let Le;return Be&&typeof Be.endLineNumber=="number"&&typeof Be.endColumn=="number"?Le=Be:Be&&(Le={lineNumber:Be.startLineNumber,column:Be.startColumn}),await Ce.openCodeEditor(Te,_e.resource,Le)?Te:null})}e.registerEditorOpener=me;function ve(){return{create:T,getEditors:x,getDiffEditors:R,onDidCreateEditor:N,onDidCreateDiffEditor:P,createDiffEditor:B,addCommand:V,addEditorAction:U,addKeybindingRule:F,addKeybindingRules:j,createModel:J,setModelLanguage:le,setModelMarkers:ee,getModelMarkers:te,removeAllMarkers:$,onDidChangeMarkers:G,getModels:ue,getModel:de,onDidCreateModel:X,onWillDisposeModel:Z,onDidChangeModelLanguage:re,createWebWorker:oe,colorizeElement:Y,colorize:K,colorizeModelLine:H,tokenize:se,defineTheme:q,setTheme:ae,remeasureFonts:ce,registerCommand:ge,registerLinkOpener:pe,registerEditorOpener:me,AccessibilitySupport:l.AccessibilitySupport,ContentWidgetPositionPreference:l.ContentWidgetPositionPreference,CursorChangeReason:l.CursorChangeReason,DefaultEndOfLine:l.DefaultEndOfLine,EditorAutoIndentStrategy:l.EditorAutoIndentStrategy,EditorOption:l.EditorOption,EndOfLinePreference:l.EndOfLinePreference,EndOfLineSequence:l.EndOfLineSequence,MinimapPosition:l.MinimapPosition,MouseTargetType:l.MouseTargetType,OverlayWidgetPositionPreference:l.OverlayWidgetPositionPreference,OverviewRulerLane:l.OverviewRulerLane,GlyphMarginLane:l.GlyphMarginLane,RenderLineNumbersType:l.RenderLineNumbersType,RenderMinimap:l.RenderMinimap,ScrollbarVisibility:l.ScrollbarVisibility,ScrollType:l.ScrollType,TextEditorCursorBlinkingStyle:l.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:l.TextEditorCursorStyle,TrackedRangeStickiness:l.TrackedRangeStickiness,WrappingIndent:l.WrappingIndent,InjectedTextCursorStops:l.InjectedTextCursorStops,PositionAffinity:l.PositionAffinity,ShowAiIconMode:l.ShowAiIconMode,ConfigurationChangedEvent:b.ConfigurationChangedEvent,BareFontInfo:i.BareFontInfo,FontInfo:i.FontInfo,TextModelResolvedOptions:d.TextModelResolvedOptions,FindMatch:d.FindMatch,ApplyUpdateResult:b.ApplyUpdateResult,EditorZoom:o.EditorZoom,createMultiFileDiffEditor:W,EditorType:n.EditorType,EditorOptions:b.EditorOptions}}e.createMonacoEditorAPI=ve}),define(ie[934],ne([1,0,38,5,31,32,79,42,211,262,560,342,134,96,18,28]),function(Q,e,L,k,y,E,_,p,S,v,b,o,i,n,t,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.registerTokensProviderFactory=e.setColorMap=e.TokenizationSupportAdapter=e.EncodedTokenizationSupportAdapter=e.setLanguageConfiguration=e.onLanguageEncountered=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function u(H){_.ModesRegistry.registerLanguage(H)}e.register=u;function f(){let H=[];return H=H.concat(_.ModesRegistry.getLanguages()),H}e.getLanguages=f;function c(H){return v.StandaloneServices.get(p.ILanguageService).languageIdCodec.encodeLanguageId(H)}e.getEncodedLanguageId=c;function d(H,z){return v.StandaloneServices.withServices(()=>{const q=v.StandaloneServices.get(p.ILanguageService).onDidRequestRichLanguageFeatures(ae=>{ae===H&&(q.dispose(),z())});return q})}e.onLanguage=d;function r(H,z){return v.StandaloneServices.withServices(()=>{const q=v.StandaloneServices.get(p.ILanguageService).onDidRequestBasicLanguageFeatures(ae=>{ae===H&&(q.dispose(),z())});return q})}e.onLanguageEncountered=r;function l(H,z){if(!v.StandaloneServices.get(p.ILanguageService).isRegisteredLanguageId(H))throw new Error(`Cannot set configuration for unknown language ${H}`);return v.StandaloneServices.get(E.ILanguageConfigurationService).register(H,z,100)}e.setLanguageConfiguration=l;class s{constructor(z,se){this._languageId=z,this._actual=se}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(z,se,q){if(typeof this._actual.tokenize=="function")return g.adaptTokenize(this._languageId,this._actual,z,q);throw new Error("Not supported!")}tokenizeEncoded(z,se,q){const ae=this._actual.tokenizeEncoded(z,q);return new y.EncodedTokenizationResult(ae.tokens,ae.endState)}}e.EncodedTokenizationSupportAdapter=s;class g{constructor(z,se,q,ae){this._languageId=z,this._actual=se,this._languageService=q,this._standaloneThemeService=ae}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(z,se){const q=[];let ae=0;for(let ce=0,ge=z.length;ce0&&ce[ge-1]===_e)continue;let Te=Se.startIndex;ve===0?Te=0:Te{const q=await Promise.resolve(z.create());return q?h(q)?D(H,q):new o.MonarchTokenizer(v.StandaloneServices.get(p.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),H,(0,b.compile)(H,q),v.StandaloneServices.get(a.IConfigurationService)):null});return y.TokenizationRegistry.registerFactory(H,se)}e.registerTokensProviderFactory=I;function M(H,z){if(!v.StandaloneServices.get(p.ILanguageService).isRegisteredLanguageId(H))throw new Error(`Cannot set tokens provider for unknown language ${H}`);return C(z)?I(H,{create:()=>z}):y.TokenizationRegistry.register(H,D(H,z))}e.setTokensProvider=M;function A(H,z){const se=q=>new o.MonarchTokenizer(v.StandaloneServices.get(p.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),H,(0,b.compile)(H,q),v.StandaloneServices.get(a.IConfigurationService));return C(z)?I(H,{create:()=>z}):y.TokenizationRegistry.register(H,se(z))}e.setMonarchTokensProvider=A;function O(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).referenceProvider.register(H,z)}e.registerReferenceProvider=O;function T(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).renameProvider.register(H,z)}e.registerRenameProvider=T;function N(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).signatureHelpProvider.register(H,z)}e.registerSignatureHelpProvider=N;function P(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).hoverProvider.register(H,{provideHover:(q,ae,ce)=>{const ge=q.getWordAtPosition(ae);return Promise.resolve(z.provideHover(q,ae,ce)).then(pe=>{if(pe)return!pe.range&&ge&&(pe.range=new k.Range(ae.lineNumber,ge.startColumn,ae.lineNumber,ge.endColumn)),pe.range||(pe.range=new k.Range(ae.lineNumber,ae.column,ae.lineNumber,ae.column)),pe})}})}e.registerHoverProvider=P;function x(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSymbolProvider.register(H,z)}e.registerDocumentSymbolProvider=x;function R(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentHighlightProvider.register(H,z)}e.registerDocumentHighlightProvider=R;function B(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkedEditingRangeProvider.register(H,z)}e.registerLinkedEditingRangeProvider=B;function W(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).definitionProvider.register(H,z)}e.registerDefinitionProvider=W;function V(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).implementationProvider.register(H,z)}e.registerImplementationProvider=V;function U(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).typeDefinitionProvider.register(H,z)}e.registerTypeDefinitionProvider=U;function F(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeLensProvider.register(H,z)}e.registerCodeLensProvider=F;function j(H,z,se){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeActionProvider.register(H,{providedCodeActionKinds:se?.providedCodeActionKinds,documentation:se?.documentation,provideCodeActions:(ae,ce,ge,pe)=>{const ve=v.StandaloneServices.get(n.IMarkerService).read({resource:ae.uri}).filter(Ce=>k.Range.areIntersectingOrTouching(Ce,ce));return z.provideCodeActions(ae,ce,{markers:ve,only:ge.only,trigger:ge.trigger},pe)},resolveCodeAction:z.resolveCodeAction})}e.registerCodeActionProvider=j;function J(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentFormattingEditProvider.register(H,z)}e.registerDocumentFormattingEditProvider=J;function le(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(H,z)}e.registerDocumentRangeFormattingEditProvider=le;function ee(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).onTypeFormattingEditProvider.register(H,z)}e.registerOnTypeFormattingEditProvider=ee;function $(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkProvider.register(H,z)}e.registerLinkProvider=$;function te(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).completionProvider.register(H,z)}e.registerCompletionItemProvider=te;function G(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).colorProvider.register(H,z)}e.registerColorProvider=G;function de(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).foldingRangeProvider.register(H,z)}e.registerFoldingRangeProvider=de;function ue(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).declarationProvider.register(H,z)}e.registerDeclarationProvider=ue;function X(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).selectionRangeProvider.register(H,z)}e.registerSelectionRangeProvider=X;function Z(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSemanticTokensProvider.register(H,z)}e.registerDocumentSemanticTokensProvider=Z;function re(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(H,z)}e.registerDocumentRangeSemanticTokensProvider=re;function oe(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlineCompletionsProvider.register(H,z)}e.registerInlineCompletionsProvider=oe;function Y(H,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlayHintsProvider.register(H,z)}e.registerInlayHintsProvider=Y;function K(){return{register:u,getLanguages:f,onLanguage:d,onLanguageEncountered:r,getEncodedLanguageId:c,setLanguageConfiguration:l,setColorMap:w,registerTokensProviderFactory:I,setTokensProvider:M,setMonarchTokensProvider:A,registerReferenceProvider:O,registerRenameProvider:T,registerCompletionItemProvider:te,registerSignatureHelpProvider:N,registerHoverProvider:P,registerDocumentSymbolProvider:x,registerDocumentHighlightProvider:R,registerLinkedEditingRangeProvider:B,registerDefinitionProvider:W,registerImplementationProvider:V,registerTypeDefinitionProvider:U,registerCodeLensProvider:F,registerCodeActionProvider:j,registerDocumentFormattingEditProvider:J,registerDocumentRangeFormattingEditProvider:le,registerOnTypeFormattingEditProvider:ee,registerLinkProvider:$,registerColorProvider:G,registerFoldingRangeProvider:de,registerDeclarationProvider:ue,registerSelectionRangeProvider:X,registerDocumentSemanticTokensProvider:Z,registerDocumentRangeSemanticTokensProvider:re,registerInlineCompletionsProvider:oe,registerInlayHintsProvider:Y,DocumentHighlightKind:S.DocumentHighlightKind,CompletionItemKind:S.CompletionItemKind,CompletionItemTag:S.CompletionItemTag,CompletionItemInsertTextRule:S.CompletionItemInsertTextRule,SymbolKind:S.SymbolKind,SymbolTag:S.SymbolTag,IndentAction:S.IndentAction,CompletionTriggerKind:S.CompletionTriggerKind,SignatureHelpTriggerKind:S.SignatureHelpTriggerKind,InlayHintKind:S.InlayHintKind,InlineCompletionTriggerKind:S.InlineCompletionTriggerKind,CodeActionTriggerType:S.CodeActionTriggerType,FoldingRangeKind:y.FoldingRangeKind,SelectedSuggestionInfo:y.SelectedSuggestionInfo}}e.createMonacoLanguagesAPI=K}),define(ie[935],ne([1,0,36,335,933,934,359]),function(Q,e,L,k,y,E,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=e.Token=e.Uri=e.MarkerTag=e.MarkerSeverity=e.SelectionDirection=e.Selection=e.Range=e.Position=e.KeyMod=e.KeyCode=e.Emitter=e.CancellationTokenSource=void 0,L.EditorOptions.wrappingIndent.defaultValue=0,L.EditorOptions.glyphMargin.defaultValue=!1,L.EditorOptions.autoIndent.defaultValue=3,L.EditorOptions.overviewRulerLanes.defaultValue=2,_.FormattingConflicts.setFormatterSelector((v,b,o)=>Promise.resolve(v[0]));const p=(0,k.createMonacoBaseAPI)();p.editor=(0,y.createMonacoEditorAPI)(),p.languages=(0,E.createMonacoLanguagesAPI)(),e.CancellationTokenSource=p.CancellationTokenSource,e.Emitter=p.Emitter,e.KeyCode=p.KeyCode,e.KeyMod=p.KeyMod,e.Position=p.Position,e.Range=p.Range,e.Selection=p.Selection,e.SelectionDirection=p.SelectionDirection,e.MarkerSeverity=p.MarkerSeverity,e.MarkerTag=p.MarkerTag,e.Uri=p.Uri,e.Token=p.Token,e.editor=p.editor,e.languages=p.languages;const S=globalThis.MonacoEnvironment;(S?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=p),typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})});var vi=this&&this.__createBinding||(Object.create?function(Q,e,L,k){k===void 0&&(k=L);var y=Object.getOwnPropertyDescriptor(e,L);(!y||("get"in y?!e.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return e[L]}}),Object.defineProperty(Q,k,y)}:function(Q,e,L,k){k===void 0&&(k=L),Q[k]=e[L]}),Ci=this&&this.__exportStar||function(Q,e){for(var L in Q)L!=="default"&&!Object.prototype.hasOwnProperty.call(e,L)&&vi(e,Q,L)};define(ie[937],ne([1,0,935,931,825,826,795,870,871,829,918,873]),function(Q,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Ci(L,e)})}).call(this); "use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/basic-languages/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ var moduleExports=(()=>{var y=Object.create;var g=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var a=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,s)=>(typeof require!="undefined"?require:r)[s]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var D=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var m=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of q(r))!M.call(e,o)&&o!==s&&g(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e},p=(e,r,s)=>(m(e,r,"default"),s&&m(s,r,"default")),c=(e,r,s)=>(s=e!=null?y(A(e)):{},m(r||!e||!e.__esModule?g(s,"default",{value:e,enumerable:!0}):s,e));var v=D((w,d)=>{var b=c(a("vs/editor/editor.api"));d.exports=b});var t={};p(t,c(v()));var f={},u={},l=class{static getOrCreate(r){return u[r]||(u[r]=new l(r)),u[r]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(r){this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((s,n)=>{this._lazyLoadPromiseResolve=s,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,f[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function i(e){let r=e.id;f[r]=e,t.languages.register(e);let s=l.getOrCreate(r);t.languages.registerTokensProviderFactory(r,{create:async()=>(await s.load()).language}),t.languages.onLanguageEncountered(r,async()=>{let n=await s.load();t.languages.setLanguageConfiguration(r,n.conf)})}i({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/abap/abap"],e,r)})});i({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/apex/apex"],e,r)})});i({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/azcli/azcli"],e,r)})});i({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bat/bat"],e,r)})});i({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bicep/bicep"],e,r)})});i({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cameligo/cameligo"],e,r)})});i({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/clojure/clojure"],e,r)})});i({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/coffee/coffee"],e,r)})});i({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csharp/csharp"],e,r)})});i({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csp/csp"],e,r)})});i({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/css/css"],e,r)})});i({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cypher/cypher"],e,r)})});i({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dart/dart"],e,r)})});i({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dockerfile/dockerfile"],e,r)})});i({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ecl/ecl"],e,r)})});i({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/elixir/elixir"],e,r)})});i({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/flow9/flow9"],e,r)})});i({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/fsharp/fsharp"],e,r)})});i({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationBracket)});i({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationBracket)});i({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationDollar)});i({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationBracket)});i({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/go/go"],e,r)})});i({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/graphql/graphql"],e,r)})});i({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/handlebars/handlebars"],e,r)})});i({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/hcl/hcl"],e,r)})});i({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/html/html"],e,r)})});i({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ini/ini"],e,r)})});i({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/java/java"],e,r)})});i({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/javascript/javascript"],e,r)})});i({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/julia/julia"],e,r)})});i({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/kotlin/kotlin"],e,r)})});i({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/less/less"],e,r)})});i({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lexon/lexon"],e,r)})});i({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lua/lua"],e,r)})});i({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/liquid/liquid"],e,r)})});i({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/m3/m3"],e,r)})});i({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/markdown/markdown"],e,r)})});i({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mdx/mdx"],e,r)})});i({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mips/mips"],e,r)})});i({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/msdax/msdax"],e,r)})});i({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mysql/mysql"],e,r)})});i({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/objective-c/objective-c"],e,r)})});i({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascal/pascal"],e,r)})});i({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascaligo/pascaligo"],e,r)})});i({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/perl/perl"],e,r)})});i({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pgsql/pgsql"],e,r)})});i({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/php/php"],e,r)})});i({id:"pla",extensions:[".pla"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pla/pla"],e,r)})});i({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/postiats/postiats"],e,r)})});i({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powerquery/powerquery"],e,r)})});i({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powershell/powershell"],e,r)})});i({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/protobuf/protobuf"],e,r)})});i({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pug/pug"],e,r)})});i({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/python/python"],e,r)})});i({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/qsharp/qsharp"],e,r)})});i({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/r/r"],e,r)})});i({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/razor/razor"],e,r)})});i({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redis/redis"],e,r)})});i({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redshift/redshift"],e,r)})});i({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/restructuredtext/restructuredtext"],e,r)})});i({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ruby/ruby"],e,r)})});i({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/rust/rust"],e,r)})});i({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sb/sb"],e,r)})});i({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scala/scala"],e,r)})});i({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scheme/scheme"],e,r)})});i({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scss/scss"],e,r)})});i({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/shell/shell"],e,r)})});i({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/solidity/solidity"],e,r)})});i({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sophia/sophia"],e,r)})});i({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sparql/sparql"],e,r)})});i({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sql/sql"],e,r)})});i({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/st/st"],e,r)})});i({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/swift/swift"],e,r)})});i({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/tcl/tcl"],e,r)})});i({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/twig/twig"],e,r)})});i({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/typescript/typescript"],e,r)})});i({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/vb/vb"],e,r)})});i({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/wgsl/wgsl"],e,r)})});i({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\new Promise((e,r)=>{a(["vs/basic-languages/xml/xml"],e,r)})});i({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/yaml/yaml"],e,r)})});})(); return moduleExports; }); "use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/css/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ var moduleExports=(()=>{var C=Object.create;var g=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var l=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,r)=>(typeof require!="undefined"?require:n)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),M=(e,n)=>{for(var r in n)g(e,r,{get:n[r],enumerable:!0})},s=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of b(n))!h.call(e,t)&&t!==r&&g(e,t,{get:()=>n[t],enumerable:!(a=S(n,t))||a.enumerable});return e},y=(e,n,r)=>(s(e,n,"default"),r&&s(r,n,"default")),w=(e,n,r)=>(r=e!=null?C(x(e)):{},s(n||!e||!e.__esModule?g(r,"default",{value:e,enumerable:!0}):r,e)),P=e=>s(g({},"__esModule",{value:!0}),e);var v=I((k,D)=>{var O=w(l("vs/editor/editor.api"));D.exports=O});var R={};M(R,{cssDefaults:()=>p,lessDefaults:()=>f,scssDefaults:()=>c});var o={};y(o,w(v()));var i=class{_onDidChange=new o.Emitter;_options;_modeConfiguration;_languageId;constructor(n,r,a){this._languageId=n,this.setOptions(r),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},d={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},p=new i("css",d,u),c=new i("scss",d,u),f=new i("less",d,u);o.languages.css={cssDefaults:p,lessDefaults:f,scssDefaults:c};function m(){return new Promise((e,n)=>{l(["vs/language/css/cssMode"],e,n)})}o.languages.onLanguage("less",()=>{m().then(e=>e.setupMode(f))});o.languages.onLanguage("scss",()=>{m().then(e=>e.setupMode(c))});o.languages.onLanguage("css",()=>{m().then(e=>e.setupMode(p))});return P(R);})(); return moduleExports; }); "use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/html/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ var moduleExports=(()=>{var w=Object.create;var l=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,t)=>(typeof require!="undefined"?require:n)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var k=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),T=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of H(n))!_.call(e,o)&&o!==t&&l(e,o,{get:()=>n[o],enumerable:!(r=R(n,o))||r.enumerable});return e},b=(e,n,t)=>(d(e,n,"default"),t&&d(t,n,"default")),v=(e,n,t)=>(t=e!=null?w(O(e)):{},d(n||!e||!e.__esModule?l(t,"default",{value:e,enumerable:!0}):t,e)),A=e=>d(l({},"__esModule",{value:!0}),e);var C=k((z,h)=>{var E=v(f("vs/editor/editor.api"));h.exports=E});var V={};T(V,{handlebarDefaults:()=>M,handlebarLanguageService:()=>m,htmlDefaults:()=>x,htmlLanguageService:()=>c,razorDefaults:()=>I,razorLanguageService:()=>y,registerHTMLLanguageService:()=>s});var a={};b(a,v(C()));var p=class{_onDidChange=new a.Emitter;_options;_modeConfiguration;_languageId;constructor(n,t,r){this._languageId=n,this.setOptions(t),this.setModeConfiguration(r)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},F={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:F,suggest:{},data:{useDefaultDataProvider:!0}};function g(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===i,documentFormattingEdits:e===i,documentRangeFormattingEdits:e===i}}var i="html",D="handlebars",L="razor",c=s(i,u,g(i)),x=c.defaults,m=s(D,u,g(D)),M=m.defaults,y=s(L,u,g(L)),I=y.defaults;a.languages.html={htmlDefaults:x,razorDefaults:I,handlebarDefaults:M,htmlLanguageService:c,handlebarLanguageService:m,razorLanguageService:y,registerHTMLLanguageService:s};function P(){return new Promise((e,n)=>{f(["vs/language/html/htmlMode"],e,n)})}function s(e,n=u,t=g(e)){let r=new p(e,n,t),o,S=a.languages.onLanguage(e,async()=>{o=(await P()).setupMode(r)});return{defaults:r,dispose(){S.dispose(),o?.dispose(),o=void 0}}}return A(V);})(); return moduleExports; }); "use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/json/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ var moduleExports=(()=>{var p=Object.create;var r=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var g=(o=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(o,{get:(e,n)=>(typeof require!="undefined"?require:e)[n]}):o)(function(o){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});var D=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),b=(o,e)=>{for(var n in e)r(o,n,{get:e[n],enumerable:!0})},s=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h(e))!C.call(o,i)&&i!==n&&r(o,i,{get:()=>e[i],enumerable:!(a=y(e,i))||a.enumerable});return o},u=(o,e,n)=>(s(o,e,"default"),n&&s(n,e,"default")),c=(o,e,n)=>(n=o!=null?p(v(o)):{},s(e||!o||!o.__esModule?r(n,"default",{value:o,enumerable:!0}):n,o)),O=o=>s(r({},"__esModule",{value:!0}),o);var f=D((w,m)=>{var M=c(g("vs/editor/editor.api"));m.exports=M});var R={};b(R,{jsonDefaults:()=>d});var t={};u(t,c(f()));var l=class{_onDidChange=new t.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,n,a){this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},j={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},S={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},d=new l("json",j,S);t.languages.json={jsonDefaults:d};function _(){return new Promise((o,e)=>{g(["vs/language/json/jsonMode"],o,e)})}t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});t.languages.onLanguage("json",()=>{_().then(o=>o.setupMode(d))});return O(R);})(); return moduleExports; }); "use strict";/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ define("vs/language/typescript/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ var moduleExports=(()=>{var N=Object.create;var d=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var c=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')});var w=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A=(n,e)=>{for(var t in e)d(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M(e))!F.call(n,r)&&r!==t&&d(n,r,{get:()=>e[r],enumerable:!(i=H(e,r))||i.enumerable});return n},D=(n,e,t)=>(g(n,e,"default"),t&&g(t,e,"default")),C=(n,e,t)=>(t=n!=null?N(R(n)):{},g(e||!n||!n.__esModule?d(t,"default",{value:n,enumerable:!0}):t,n)),W=n=>g(d({},"__esModule",{value:!0}),n);var _=w((B,E)=>{var V=C(c("vs/editor/editor.api"));E.exports=V});var T={};A(T,{JsxEmit:()=>f,ModuleKind:()=>b,ModuleResolutionKind:()=>O,NewLineKind:()=>y,ScriptTarget:()=>h,getJavaScriptWorker:()=>k,getTypeScriptWorker:()=>P,javascriptDefaults:()=>v,typescriptDefaults:()=>x,typescriptVersion:()=>I});var L="5.0.2";var l={};D(l,C(_()));var b=(s=>(s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext",s))(b||{}),f=(a=>(a[a.None=0]="None",a[a.Preserve=1]="Preserve",a[a.React=2]="React",a[a.ReactNative=3]="ReactNative",a[a.ReactJSX=4]="ReactJSX",a[a.ReactJSXDev=5]="ReactJSXDev",a))(f||{}),y=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(y||{}),h=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(h||{}),O=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(O||{}),m=class{_onDidChange=new l.Emitter;_onDidExtraLibsChange=new l.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(e,t,i,r,p){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this.setModeConfiguration(p),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let p=this._extraLibs[i];!p||p.version===r&&(delete this._extraLibs[i],this._removedExtraLibs[i]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,r=t.content,p=1;this._removedExtraLibs[i]&&(p=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:r,version:p}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},I=L,S={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},x=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),v=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),P=()=>u().then(n=>n.getTypeScriptWorker()),k=()=>u().then(n=>n.getJavaScriptWorker());l.languages.typescript={ModuleKind:b,JsxEmit:f,NewLineKind:y,ScriptTarget:h,ModuleResolutionKind:O,typescriptVersion:I,typescriptDefaults:x,javascriptDefaults:v,getTypeScriptWorker:P,getJavaScriptWorker:k};function u(){return new Promise((n,e)=>{c(["vs/language/typescript/tsMode"],n,e)})}l.languages.onLanguage("typescript",()=>u().then(n=>n.setupTypeScript(x)));l.languages.onLanguage("javascript",()=>u().then(n=>n.setupJavaScript(v)));return W(T);})(); return moduleExports; }); define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"], function(api) { return api; }); //# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy