mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
7753ba2d37
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: jyong <718720800@qq.com>
762 lines
3.4 MiB
762 lines
3.4 MiB
/*!-----------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* Released under the MIT license
|
||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||
*-----------------------------------------------------------*/(function(){var se=["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/css!vs/editor/editor.main","vs/editor/common/core/position","vs/base/common/strings","vs/base/common/errors","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/platform/configuration/common/configuration","vs/base/common/themables","vs/platform/theme/common/colorRegistry","vs/platform/actions/common/actions","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/editor/common/model/textModel","vs/base/common/color","vs/base/browser/fastDomNode","vs/editor/common/model","vs/base/common/actions","vs/editor/common/languages/language","vs/base/browser/window","vs/platform/instantiation/common/extensions","vs/base/browser/keyboardEvent","vs/base/common/network","vs/base/browser/ui/aria/aria","vs/base/common/resources","vs/platform/notification/common/notification","vs/editor/common/services/model","vs/base/common/iterator","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/widget","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/editor/browser/widget/diffEditor/utils","vs/platform/progress/common/progress","vs/platform/theme/common/theme","vs/base/common/assert","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","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/lazy","vs/base/common/severity","vs/editor/contrib/hover/browser/hoverTypes","vs/editor/common/core/stringBuilder","vs/platform/clipboard/common/clipboardService","vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer","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/base/common/hash","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/editor/contrib/snippet/browser/snippetParser","vs/base/browser/ui/iconLabel/iconLabels","vs/base/browser/ui/list/listWidget","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/common/services/editorWorker","vs/platform/audioCues/browser/audioCueService","vs/platform/layout/browser/layoutService","vs/platform/keybinding/common/keybindingsRegistry","vs/base/common/keybindings","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/editorFeatures","vs/editor/common/encodedTokenAttributes","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/browser/services/bulkEditService","vs/editor/standalone/common/standaloneTheme","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/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/dialogs/common/dialogs","vs/platform/instantiation/common/serviceCollection","vs/platform/label/common/label","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/contrib/message/browser/messageController","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/browser/coreCommands","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/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/hover/hoverWidget","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/dropOrPasteInto/browser/edit","vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/contextkey/common/contextkeys","vs/platform/environment/common/environment","vs/platform/hover/browser/hover","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/registrations.contribution","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/process","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/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/features/movedBlocksLinesFeature","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/browser/widget/diffEditor/features/hideUnchangedRegionsFeature","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/platform/quickinput/browser/quickInput","vs/editor/browser/widget/diffEditor/features/overviewRulerFeature","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/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/dropOrPasteInto/browser/copyPasteController","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/suggestModel","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/components/accessibleDiffViewer","vs/css!vs/editor/browser/widget/diffEditor/style","vs/css!vs/editor/browser/widget/hoverWidget/hover","vs/css!vs/editor/browser/widget/markdownRenderer/browser/renderedMarkdown","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/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/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/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/glyphLanesModel","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/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/widget/codeEditorContributions","vs/editor/browser/widget/diffEditor/components/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/components/accessibleDiffViewer","vs/nls!vs/editor/browser/widget/diffEditor/components/diffEditorEditors","vs/nls!vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin","vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin","vs/nls!vs/editor/browser/widget/diffEditor/diffEditor.contribution","vs/nls!vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature","vs/nls!vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature","vs/nls!vs/editor/browser/widget/diffEditor/features/revertButtonsFeature","vs/editor/browser/widget/diffEditor/features/revertButtonsFeature","vs/nls!vs/editor/browser/widget/diffEditor/registrations.contribution","vs/nls!vs/editor/browser/widget/hoverWidget/hoverWidget","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/components/diffEditorViewZones/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/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/diffEditorBreadcrumbs/browser/contribution","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/quickinput/browser/pickerQuickAccess","vs/platform/quickinput/browser/quickInputBox","vs/editor/browser/widget/hoverWidget/hoverWidget","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/hover/browser/marginHover","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource","vs/editor/contrib/linesOperations/browser/moveLinesCommand","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/diffProviderFactoryService","vs/editor/contrib/anchorSelect/browser/anchorSelect","vs/editor/contrib/caretOperations/browser/caretOperations","vs/editor/contrib/caretOperations/browser/transpose","vs/editor/contrib/comment/browser/comment","vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/editor/contrib/editorState/browser/keybindingCancellation","vs/editor/contrib/codeAction/browser/codeActionKeybindingResolver","vs/editor/contrib/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/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/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/components/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/quickInputController","vs/editor/browser/services/abstractCodeEditorService","vs/editor/browser/services/hoverService","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/widget/diffEditor/components/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/components/diffEditorDecorations","vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones","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/clipboard/browser/clipboard","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/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/suggest/browser/suggestInlineCompletions","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"],oe=function(te){for(var e=[],L=0,k=te.length;L<k;L++)e[L]=se[te[L]];return e};define(se[939],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.load=void 0;function L(p,_,v,b){if(b=b||{},(b["vs/css"]||{}).disabled){v({});return}const i=_.toUrl(p+".css");k(p,i,()=>{v({})},n=>{typeof v.error=="function"&&v.error("Could not find "+i+".")})}e.load=L;function k(p,_,v,b){if(y(p,_)){v();return}E(p,_,v,b)}function y(p,_){const v=window.document.getElementsByTagName("link");for(let b=0,a=v.length;b<a;b++){const i=v[b].getAttribute("data-name"),n=v[b].getAttribute("href");if(i===p||n===_)return!0}return!1}function E(p,_,v,b){const a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("data-name",p),S(p,a,v,b),a.setAttribute("href",_),(window.document.head||window.document.getElementsByTagName("head")[0]).appendChild(a)}function S(p,_,v,b){const a=()=>{_.removeEventListener("load",i),_.removeEventListener("error",n)},i=t=>{a(),v()},n=t=>{a(),b(t)};_.addEventListener("load",i),_.addEventListener("error",n)}}),define(se[3],oe([1,0]),function(te,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,s)=>{const l=s[0],o=f[l];let g=d;return typeof o=="string"?g=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(g=String(o)),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 S(u){return u.charAt(u.length-1)==="/"?u:u+"/"}async function p(u,f,c){const d=S(u)+S(f)+"vscode/"+S(c),s=await fetch(d);if(s.ok)return await s.json();throw new Error(`${s.status} - ${s.statusText}`)}function _(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 a(u,f,...c){const d=y(f,c);return{value:d,original:d}}e.localize2=a;function i(u){}e.getConfiguredDefaultLocale=i;function n(u){L=u}e.setPseudoTranslation=n;function t(u,f){var c;return{localize:_(f[u]),localize2:v(f[u]),getConfiguredDefaultLocale:(c=f.getConfiguredDefaultLocale)!==null&&c!==void 0?c:d=>{}}}e.create=t;function r(u,f,c,d){var s;const l=(s=d["vs/nls"])!==null&&s!==void 0?s:{};if(!u||u.length===0)return c({localize:b,localize2:a,getConfiguredDefaultLocale:()=>{var C;return(C=l.availableLanguages)===null||C===void 0?void 0:C["*"]}});const o=l.availableLanguages?E(l.availableLanguages,u):null,g=o===null||o===k;let h=".nls";g||(h=h+"."+o);const m=C=>{Array.isArray(C)?(C.localize=_(C),C.localize2=v(C)):(C.localize=_(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,o,(C,w)=>{C?f([u+".nls"],m):m(w)}):l.translationServiceUrl&&!g?(async()=>{var C;try{const w=await p(l.translationServiceUrl,o,u);return m(w)}catch(w){if(!o.includes("-"))return console.error(w),f([u+".nls"],m);try{const D=o.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 ${o}. Falling back to the default language:`,C),f([u+".nls"],m)})}e.load=r});/*! @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:Bt,setPrototypeOf:Wt,isFrozen:Zt,getPrototypeOf:Yt,getOwnPropertyDescriptor:Qt}=Object;let{freeze:gt,seal:bt,create:Xt}=Object,{apply:Nt,construct:At}=typeof Reflect<"u"&&Reflect;Nt||(Nt=function(e,L,k){return e.apply(L,k)}),gt||(gt=function(e){return e}),bt||(bt=function(e){return e}),At||(At=function(e,L){return new e(...L)});const Jt=Ct(Array.prototype.forEach),Vt=Ct(Array.prototype.pop),Et=Ct(Array.prototype.push),kt=Ct(String.prototype.toLowerCase),Rt=Ct(String.prototype.toString),ei=Ct(String.prototype.match),_t=Ct(String.prototype.replace),ti=Ct(String.prototype.indexOf),ii=Ct(String.prototype.trim),vt=Ct(RegExp.prototype.test),It=ni(TypeError);function Ct(te){return function(e){for(var L=arguments.length,k=new Array(L>1?L-1:0),y=1;y<L;y++)k[y-1]=arguments[y];return Nt(te,e,k)}}function ni(te){return function(){for(var e=arguments.length,L=new Array(e),k=0;k<e;k++)L[k]=arguments[k];return At(te,L)}}function Ye(te,e,L){var k;L=(k=L)!==null&&k!==void 0?k:kt,Wt&&Wt(te,null);let y=e.length;for(;y--;){let E=e[y];if(typeof E=="string"){const S=L(E);S!==E&&(Zt(e)||(e[y]=S),E=S)}te[E]=!0}return te}function Lt(te){const e=Xt(null);for(const[L,k]of Bt(te))e[L]=k;return e}function Tt(te,e){for(;te!==null;){const k=Qt(te,e);if(k){if(k.get)return Ct(k.get);if(typeof k.value=="function")return Ct(k.value)}te=Yt(te)}function L(k){return console.warn("fallback value for",k),null}return L}const zt=gt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pt=gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ot=gt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),si=gt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ft=gt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),oi=gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ht=gt(["#text"]),Ut=gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),xt=gt(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Kt=gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mt=gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ri=bt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ai=bt(/<%[\w\W]*|[\w\W]*%>/gm),li=bt(/\${[\w\W]*}/gm),di=bt(/^data-[\-\w.\u00B7-\uFFFF]/),ci=bt(/^aria-[\-\w]+$/),qt=bt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ui=bt(/^(?:\w+script|data):/i),hi=bt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jt=bt(/^html$/i);var $t=Object.freeze({__proto__:null,MUSTACHE_EXPR:ri,ERB_EXPR:ai,TMPLIT_EXPR:li,DATA_ATTR:di,ARIA_ATTR:ci,IS_ALLOWED_URI:qt,IS_SCRIPT_OR_DATA:ui,ATTR_WHITESPACE:hi,DOCTYPE_NAME:jt});const gi=()=>typeof window>"u"?null:window,fi=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(S){return S},createScriptURL(S){return S}})}catch{return console.warn("TrustedTypes policy "+E+" could not be created."),null}};function Gt(){let te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gi();const e=Te=>Gt(Te);if(e.version="3.0.5",e.removed=[],!te||!te.document||te.document.nodeType!==9)return e.isSupported=!1,e;const L=te.document,k=L.currentScript;let{document:y}=te;const{DocumentFragment:E,HTMLTemplateElement:S,Node:p,Element:_,NodeFilter:v,NamedNodeMap:b=te.NamedNodeMap||te.MozNamedAttrMap,HTMLFormElement:a,DOMParser:i,trustedTypes:n}=te,t=_.prototype,r=Tt(t,"cloneNode"),u=Tt(t,"nextSibling"),f=Tt(t,"childNodes"),c=Tt(t,"parentNode");if(typeof S=="function"){const Te=y.createElement("template");Te.content&&Te.content.ownerDocument&&(y=Te.content.ownerDocument)}let d,s="";const{implementation:l,createNodeIterator:o,createDocumentFragment:g,getElementsByTagName:h}=y,{importNode:m}=L;let C={};e.isSupported=typeof Bt=="function"&&typeof c=="function"&&l&&l.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:w,ERB_EXPR:D,TMPLIT_EXPR:I,DATA_ATTR:T,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:N}=$t;let{IS_ALLOWED_URI:M}=$t,R=null;const x=Ye({},[...zt,...Pt,...Ot,...Ft,...Ht]);let O=null;const B=Ye({},[...Ut,...xt,...Kt,...Mt]);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,K=null,F=!0,q=!0,ie=!1,ae=!0,ne=!1,$=!1,J=!1,Q=!1,re=!1,de=!1,he=!1,me=!0,X=!1;const U="user-content-";let G=!0,z=!1,H={},Y=null;const j=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 Z=null;const ee=Ye({},["audio","video","img","source","image","track"]);let le=null;const ue=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ce="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let Ce=ve,Se=!1,_e=null;const Ee=Ye({},[ce,pe,ve],Rt);let Ae;const xe=["application/xhtml+xml","text/html"],Be="text/html";let De,Ie=null;const fe=y.createElement("form"),be=function(we){return we instanceof RegExp||we instanceof Function},Ne=function(we){if(!(Ie&&Ie===we)){if((!we||typeof we!="object")&&(we={}),we=Lt(we),Ae=xe.indexOf(we.PARSER_MEDIA_TYPE)===-1?Ae=Be:Ae=we.PARSER_MEDIA_TYPE,De=Ae==="application/xhtml+xml"?Rt:kt,R="ALLOWED_TAGS"in we?Ye({},we.ALLOWED_TAGS,De):x,O="ALLOWED_ATTR"in we?Ye({},we.ALLOWED_ATTR,De):B,_e="ALLOWED_NAMESPACES"in we?Ye({},we.ALLOWED_NAMESPACES,Rt):Ee,le="ADD_URI_SAFE_ATTR"in we?Ye(Lt(ue),we.ADD_URI_SAFE_ATTR,De):ue,Z="ADD_DATA_URI_TAGS"in we?Ye(Lt(ee),we.ADD_DATA_URI_TAGS,De):ee,Y="FORBID_CONTENTS"in we?Ye({},we.FORBID_CONTENTS,De):j,V="FORBID_TAGS"in we?Ye({},we.FORBID_TAGS,De):{},K="FORBID_ATTR"in we?Ye({},we.FORBID_ATTR,De):{},H="USE_PROFILES"in we?we.USE_PROFILES:!1,F=we.ALLOW_ARIA_ATTR!==!1,q=we.ALLOW_DATA_ATTR!==!1,ie=we.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=we.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ne=we.SAFE_FOR_TEMPLATES||!1,$=we.WHOLE_DOCUMENT||!1,re=we.RETURN_DOM||!1,de=we.RETURN_DOM_FRAGMENT||!1,he=we.RETURN_TRUSTED_TYPE||!1,Q=we.FORCE_BODY||!1,me=we.SANITIZE_DOM!==!1,X=we.SANITIZE_NAMED_PROPS||!1,G=we.KEEP_CONTENT!==!1,z=we.IN_PLACE||!1,M=we.ALLOWED_URI_REGEXP||qt,Ce=we.NAMESPACE||ve,W=we.CUSTOM_ELEMENT_HANDLING||{},we.CUSTOM_ELEMENT_HANDLING&&be(we.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=we.CUSTOM_ELEMENT_HANDLING.tagNameCheck),we.CUSTOM_ELEMENT_HANDLING&&be(we.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=we.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),we.CUSTOM_ELEMENT_HANDLING&&typeof we.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=we.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ne&&(q=!1),de&&(re=!0),H&&(R=Ye({},[...Ht]),O=[],H.html===!0&&(Ye(R,zt),Ye(O,Ut)),H.svg===!0&&(Ye(R,Pt),Ye(O,xt),Ye(O,Mt)),H.svgFilters===!0&&(Ye(R,Ot),Ye(O,xt),Ye(O,Mt)),H.mathMl===!0&&(Ye(R,Ft),Ye(O,Kt),Ye(O,Mt))),we.ADD_TAGS&&(R===x&&(R=Lt(R)),Ye(R,we.ADD_TAGS,De)),we.ADD_ATTR&&(O===B&&(O=Lt(O)),Ye(O,we.ADD_ATTR,De)),we.ADD_URI_SAFE_ATTR&&Ye(le,we.ADD_URI_SAFE_ATTR,De),we.FORBID_CONTENTS&&(Y===j&&(Y=Lt(Y)),Ye(Y,we.FORBID_CONTENTS,De)),G&&(R["#text"]=!0),$&&Ye(R,["html","head","body"]),R.table&&(Ye(R,["tbody"]),delete V.tbody),we.TRUSTED_TYPES_POLICY){if(typeof we.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof we.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');d=we.TRUSTED_TYPES_POLICY,s=d.createHTML("")}else d===void 0&&(d=fi(n,k)),d!==null&&typeof s=="string"&&(s=d.createHTML(""));gt&>(we),Ie=we}},Pe=Ye({},["mi","mo","mn","ms","mtext"]),ze=Ye({},["foreignobject","desc","title","annotation-xml"]),Ke=Ye({},["title","style","font","a","script"]),je=Ye({},Pt);Ye(je,Ot),Ye(je,si);const Je=Ye({},Ft);Ye(Je,oi);const rt=function(we){let Re=c(we);(!Re||!Re.tagName)&&(Re={namespaceURI:Ce,tagName:"template"});const Oe=kt(we.tagName),Ve=kt(Re.tagName);return _e[we.namespaceURI]?we.namespaceURI===pe?Re.namespaceURI===ve?Oe==="svg":Re.namespaceURI===ce?Oe==="svg"&&(Ve==="annotation-xml"||Pe[Ve]):!!je[Oe]:we.namespaceURI===ce?Re.namespaceURI===ve?Oe==="math":Re.namespaceURI===pe?Oe==="math"&&ze[Ve]:!!Je[Oe]:we.namespaceURI===ve?Re.namespaceURI===pe&&!ze[Ve]||Re.namespaceURI===ce&&!Pe[Ve]?!1:!Je[Oe]&&(Ke[Oe]||!je[Oe]):!!(Ae==="application/xhtml+xml"&&_e[we.namespaceURI]):!1},et=function(we){Et(e.removed,{element:we});try{we.parentNode.removeChild(we)}catch{we.remove()}},st=function(we,Re){try{Et(e.removed,{attribute:Re.getAttributeNode(we),from:Re})}catch{Et(e.removed,{attribute:null,from:Re})}if(Re.removeAttribute(we),we==="is"&&!O[we])if(re||de)try{et(Re)}catch{}else try{Re.setAttribute(we,"")}catch{}},Qe=function(we){let Re,Oe;if(Q)we="<remove></remove>"+we;else{const Ze=ei(we,/^[\r\n\t ]+/);Oe=Ze&&Ze[0]}Ae==="application/xhtml+xml"&&Ce===ve&&(we='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+we+"</body></html>");const Ve=d?d.createHTML(we):we;if(Ce===ve)try{Re=new i().parseFromString(Ve,Ae)}catch{}if(!Re||!Re.documentElement){Re=l.createDocument(Ce,"template",null);try{Re.documentElement.innerHTML=Se?s:Ve}catch{}}const $e=Re.body||Re.documentElement;return we&&Oe&&$e.insertBefore(y.createTextNode(Oe),$e.childNodes[0]||null),Ce===ve?h.call(Re,$?"html":"body")[0]:$?Re.documentElement:$e},ft=function(we){return o.call(we.ownerDocument||we,we,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT,null,!1)},at=function(we){return we instanceof a&&(typeof we.nodeName!="string"||typeof we.textContent!="string"||typeof we.removeChild!="function"||!(we.attributes instanceof b)||typeof we.removeAttribute!="function"||typeof we.setAttribute!="function"||typeof we.namespaceURI!="string"||typeof we.insertBefore!="function"||typeof we.hasChildNodes!="function")},ct=function(we){return typeof p=="object"?we instanceof p:we&&typeof we=="object"&&typeof we.nodeType=="number"&&typeof we.nodeName=="string"},lt=function(we,Re,Oe){C[we]&&Jt(C[we],Ve=>{Ve.call(e,Re,Oe,Ie)})},mt=function(we){let Re;if(lt("beforeSanitizeElements",we,null),at(we))return et(we),!0;const Oe=De(we.nodeName);if(lt("uponSanitizeElement",we,{tagName:Oe,allowedTags:R}),we.hasChildNodes()&&!ct(we.firstElementChild)&&(!ct(we.content)||!ct(we.content.firstElementChild))&&vt(/<[/\w]/g,we.innerHTML)&&vt(/<[/\w]/g,we.textContent))return et(we),!0;if(!R[Oe]||V[Oe]){if(!V[Oe]&&Le(Oe)&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,Oe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Oe)))return!1;if(G&&!Y[Oe]){const Ve=c(we)||we.parentNode,$e=f(we)||we.childNodes;if($e&&Ve){const Ze=$e.length;for(let Ge=Ze-1;Ge>=0;--Ge)Ve.insertBefore(r($e[Ge],!0),u(we))}}return et(we),!0}return we instanceof _&&!rt(we)||(Oe==="noscript"||Oe==="noembed"||Oe==="noframes")&&vt(/<\/no(script|embed|frames)/i,we.innerHTML)?(et(we),!0):(ne&&we.nodeType===3&&(Re=we.textContent,Re=_t(Re,w," "),Re=_t(Re,D," "),Re=_t(Re,I," "),we.textContent!==Re&&(Et(e.removed,{element:we.cloneNode()}),we.textContent=Re)),lt("afterSanitizeElements",we,null),!1)},pt=function(we,Re,Oe){if(me&&(Re==="id"||Re==="name")&&(Oe in y||Oe in fe))return!1;if(!(q&&!K[Re]&&vt(T,Re))){if(!(F&&vt(A,Re))){if(!O[Re]||K[Re]){if(!(Le(we)&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,we)||W.tagNameCheck instanceof Function&&W.tagNameCheck(we))&&(W.attributeNameCheck instanceof RegExp&&vt(W.attributeNameCheck,Re)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(Re))||Re==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,Oe)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Oe))))return!1}else if(!le[Re]){if(!vt(M,_t(Oe,N,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&we!=="script"&&ti(Oe,"data:")===0&&Z[we])){if(!(ie&&!vt(P,_t(Oe,N,"")))){if(Oe)return!1}}}}}}return!0},Le=function(we){return we.indexOf("-")>0},ye=function(we){let Re,Oe,Ve,$e;lt("beforeSanitizeAttributes",we,null);const{attributes:Ze}=we;if(!Ze)return;const Ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O};for($e=Ze.length;$e--;){Re=Ze[$e];const{name:qe,namespaceURI:Fe}=Re;if(Oe=qe==="value"?Re.value:ii(Re.value),Ve=De(qe),Ge.attrName=Ve,Ge.attrValue=Oe,Ge.keepAttr=!0,Ge.forceKeepAttr=void 0,lt("uponSanitizeAttribute",we,Ge),Oe=Ge.attrValue,Ge.forceKeepAttr||(st(qe,we),!Ge.keepAttr))continue;if(!ae&&vt(/\/>/i,Oe)){st(qe,we);continue}ne&&(Oe=_t(Oe,w," "),Oe=_t(Oe,D," "),Oe=_t(Oe,I," "));const We=De(we.nodeName);if(pt(We,Ve,Oe)){if(X&&(Ve==="id"||Ve==="name")&&(st(qe,we),Oe=U+Oe),d&&typeof n=="object"&&typeof n.getAttributeType=="function"&&!Fe)switch(n.getAttributeType(We,Ve)){case"TrustedHTML":{Oe=d.createHTML(Oe);break}case"TrustedScriptURL":{Oe=d.createScriptURL(Oe);break}}try{Fe?we.setAttributeNS(Fe,qe,Oe):we.setAttribute(qe,Oe),Vt(e.removed)}catch{}}}lt("afterSanitizeAttributes",we,null)},Me=function Te(we){let Re;const Oe=ft(we);for(lt("beforeSanitizeShadowDOM",we,null);Re=Oe.nextNode();)lt("uponSanitizeShadowNode",Re,null),!mt(Re)&&(Re.content instanceof E&&Te(Re.content),ye(Re));lt("afterSanitizeShadowDOM",we,null)};return e.sanitize=function(Te){let we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re,Oe,Ve,$e;if(Se=!Te,Se&&(Te="<!-->"),typeof Te!="string"&&!ct(Te))if(typeof Te.toString=="function"){if(Te=Te.toString(),typeof Te!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return Te;if(J||Ne(we),e.removed=[],typeof Te=="string"&&(z=!1),z){if(Te.nodeName){const qe=De(Te.nodeName);if(!R[qe]||V[qe])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(Te instanceof p)Re=Qe("<!---->"),Oe=Re.ownerDocument.importNode(Te,!0),Oe.nodeType===1&&Oe.nodeName==="BODY"||Oe.nodeName==="HTML"?Re=Oe:Re.appendChild(Oe);else{if(!re&&!ne&&!$&&Te.indexOf("<")===-1)return d&&he?d.createHTML(Te):Te;if(Re=Qe(Te),!Re)return re?null:he?s:""}Re&&Q&&et(Re.firstChild);const Ze=ft(z?Te:Re);for(;Ve=Ze.nextNode();)mt(Ve)||(Ve.content instanceof E&&Me(Ve.content),ye(Ve));if(z)return Te;if(re){if(de)for($e=g.call(Re.ownerDocument);Re.firstChild;)$e.appendChild(Re.firstChild);else $e=Re;return(O.shadowroot||O.shadowrootmode)&&($e=m.call(L,$e,!0)),$e}let Ge=$?Re.outerHTML:Re.innerHTML;return $&&R["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&vt(jt,Re.ownerDocument.doctype.name)&&(Ge="<!DOCTYPE "+Re.ownerDocument.doctype.name+`>
|
||
`+Ge),ne&&(Ge=_t(Ge,w," "),Ge=_t(Ge,D," "),Ge=_t(Ge,I," ")),d&&he?d.createHTML(Ge):Ge},e.setConfig=function(Te){Ne(Te),J=!0},e.clearConfig=function(){Ie=null,J=!1},e.isValidAttribute=function(Te,we,Re){Ie||Ne({});const Oe=De(Te),Ve=De(we);return pt(Oe,Ve,Re)},e.addHook=function(Te,we){typeof we=="function"&&(C[Te]=C[Te]||[],Et(C[Te],we))},e.removeHook=function(Te){if(C[Te])return Vt(C[Te])},e.removeHooks=function(Te){C[Te]&&(C[Te]=[])},e.removeAllHooks=function(){C={}},e}var mi=Gt();define("vs/base/browser/dompurify/dompurify",function(){return mi}),define(se[40],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class L{constructor(S){this.domNode=S,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(S){const p=k(S);this._maxWidth!==p&&(this._maxWidth=p,this.domNode.style.maxWidth=this._maxWidth)}setWidth(S){const p=k(S);this._width!==p&&(this._width=p,this.domNode.style.width=this._width)}setHeight(S){const p=k(S);this._height!==p&&(this._height=p,this.domNode.style.height=this._height)}setTop(S){const p=k(S);this._top!==p&&(this._top=p,this.domNode.style.top=this._top)}setLeft(S){const p=k(S);this._left!==p&&(this._left=p,this.domNode.style.left=this._left)}setBottom(S){const p=k(S);this._bottom!==p&&(this._bottom=p,this.domNode.style.bottom=this._bottom)}setRight(S){const p=k(S);this._right!==p&&(this._right=p,this.domNode.style.right=this._right)}setPaddingLeft(S){const p=k(S);this._paddingLeft!==p&&(this._paddingLeft=p,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(S){this._fontFamily!==S&&(this._fontFamily=S,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(S){this._fontWeight!==S&&(this._fontWeight=S,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(S){const p=k(S);this._fontSize!==p&&(this._fontSize=p,this.domNode.style.fontSize=this._fontSize)}setFontStyle(S){this._fontStyle!==S&&(this._fontStyle=S,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(S){this._fontFeatureSettings!==S&&(this._fontFeatureSettings=S,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(S){this._fontVariationSettings!==S&&(this._fontVariationSettings=S,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(S){this._textDecoration!==S&&(this._textDecoration=S,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(S){const p=k(S);this._lineHeight!==p&&(this._lineHeight=p,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(S){const p=k(S);this._letterSpacing!==p&&(this._letterSpacing=p,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(S){this._className!==S&&(this._className=S,this.domNode.className=this._className)}toggleClassName(S,p){this.domNode.classList.toggle(S,p),this._className=this.domNode.className}setDisplay(S){this._display!==S&&(this._display=S,this.domNode.style.display=this._display)}setPosition(S){this._position!==S&&(this._position=S,this.domNode.style.position=this._position)}setVisibility(S){this._visibility!==S&&(this._visibility=S,this.domNode.style.visibility=this._visibility)}setColor(S){this._color!==S&&(this._color=S,this.domNode.style.color=this._color)}setBackgroundColor(S){this._backgroundColor!==S&&(this._backgroundColor=S,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(S){this._layerHint!==S&&(this._layerHint=S,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(S){this._boxShadow!==S&&(this._boxShadow=S,this.domNode.style.boxShadow=S)}setContain(S){this._contain!==S&&(this._contain=S,this.domNode.style.contain=this._contain)}setAttribute(S,p){this.domNode.setAttribute(S,p)}removeAttribute(S){this.domNode.removeAttribute(S)}appendChild(S){this.domNode.appendChild(S.domNode)}removeChild(S){this.domNode.removeChild(S.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(se[394],oe([1,0]),function(te,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 S=E.location,p=E.parent.location;if(S.origin!=="null"&&p.origin!=="null"&&S.origin!==p.origin)return null}catch{return null}return E.parent}class y{static getSameOriginWindowChain(S){let p=L.get(S);if(!p){p=[],L.set(S,p);let _=S,v;do v=k(_),v?p.push({window:new WeakRef(_),iframeElement:_.frameElement||null}):p.push({window:new WeakRef(_),iframeElement:null}),_=v;while(_)}return p.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(S,p){var _,v;if(!p||S===p)return{top:0,left:0};let b=0,a=0;const i=this.getSameOriginWindowChain(S);for(const n of i){const t=n.window.deref();if(b+=(_=t?.scrollY)!==null&&_!==void 0?_:0,a+=(v=t?.scrollX)!==null&&v!==void 0?v:0,t===p||!n.iframeElement)break;const r=n.iframeElement.getBoundingClientRect();b+=r.top,a+=r.left}return{top:b,left:a}}}e.IframeUtils=y}),define(se[266],oe([1,0]),function(te,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},S={...y},p={...y};let _=0;const v={keydown:0,input:0,render:0};function b(){s(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),v.keydown=1,queueMicrotask(a)}k.onKeyDown=b;function a(){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 r(){s()}k.onKeyUp=r;function u(){s()}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(s)}function s(){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",S),l("inputlatency",p),_++,o())}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 o(){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(_===0)return;const C={keydown:h(y),input:h(E),render:h(S),total:h(p),sampleCount:_};return m(y),m(E),m(S),m(p),_=0,C}k.getAndClearMeasurements=g;function h(C){return{average:C.total/_,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(se[395],oe([1,0]),function(te,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(se[396],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class L{constructor(y){this.spliceables=y}splice(y,E,S){this.spliceables.forEach(p=>p.splice(y,E,S))}}e.CombinedSpliceable=L}),define(se[197],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const L=20;class k{constructor(E,S,p,_,v,b){this._scrollbarSize=Math.round(S),this._oppositeScrollbarSize=Math.round(p),this._arrowSize=Math.round(E),this._visibleSize=_,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 S=Math.round(E);return this._visibleSize!==S?(this._visibleSize=S,this._refreshComputedValues(),!0):!1}setScrollSize(E){const S=Math.round(E);return this._scrollSize!==S?(this._scrollSize=S,this._refreshComputedValues(),!0):!1}setScrollPosition(E){const S=Math.round(E);return this._scrollPosition!==S?(this._scrollPosition=S,this._refreshComputedValues(),!0):!1}setScrollbarSize(E){this._scrollbarSize=Math.round(E)}setOppositeScrollbarSize(E){this._oppositeScrollbarSize=Math.round(E)}static _computeValues(E,S,p,_,v){const b=Math.max(0,p-E),a=Math.max(0,b-2*S),i=_>0&&_>p;if(!i)return{computedAvailableSize:Math.round(b),computedIsNeeded:i,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const n=Math.round(Math.max(L,Math.floor(p*a/_))),t=(a-n)/(_-p),r=v*t;return{computedAvailableSize:Math.round(b),computedIsNeeded:i,computedSliderSize:Math.round(n),computedSliderRatio:t,computedSliderPosition:Math.round(r)}}_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 S=E-this._arrowSize-this._computedSliderSize/2;return Math.round(S/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(E){if(!this._computedIsNeeded)return 0;const S=E-this._arrowSize;let p=this._scrollPosition;return S<this._computedSliderPosition?p-=this._visibleSize:p+=this._visibleSize,p}getDesiredScrollPositionFromDelta(E){if(!this._computedIsNeeded)return 0;const S=this._computedSliderPosition+E;return Math.round(S/this._computedSliderRatio)}}e.ScrollbarState=k}),define(se[143],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WeakMapper=e.TreeError=e.TreeMouseEventTarget=e.ObjectTreeElementCollapseState=void 0;var L;(function(S){S[S.Expanded=0]="Expanded",S[S.Collapsed=1]="Collapsed",S[S.PreserveOrExpanded=2]="PreserveOrExpanded",S[S.PreserveOrCollapsed=3]="PreserveOrCollapsed"})(L||(e.ObjectTreeElementCollapseState=L={}));var k;(function(S){S[S.Unknown=0]="Unknown",S[S.Twistie=1]="Twistie",S[S.Element=2]="Element",S[S.Filter=3]="Filter"})(k||(e.TreeMouseEventTarget=k={}));class y extends Error{constructor(p,_){super(`TreeError [${p}] ${_}`)}}e.TreeError=y;class E{constructor(p){this.fn=p,this._map=new WeakMap}map(p){let _=this._map.get(p);return _||(_=this.fn(p),this._map.set(p,_)),_}}e.WeakMapper=E}),define(se[44],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.$window=e.mainWindow=e.ensureCodeWindow=void 0;function L(k,y){const E=k;typeof E.vscodeWindowId!="number"&&Object.defineProperty(E,"vscodeWindowId",{get:()=>y})}e.ensureCodeWindow=L,e.mainWindow=window,e.$window=e.mainWindow}),define(se[13],oe([1,0]),function(te,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,O=0){return x[x.length-(1+O)]}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,O,B=(W,V)=>W===V){if(x===O)return!0;if(!x||!O||x.length!==O.length)return!1;for(let W=0,V=x.length;W<V;W++)if(!B(x[W],O[W]))return!1;return!0}e.equals=y;function E(x,O){const B=x.length-1;O<B&&(x[O]=x[B]),x.pop()}e.removeFastWithoutKeepingOrder=E;function S(x,O,B){return p(x.length,W=>B(x[W],O))}e.binarySearch=S;function p(x,O){let B=0,W=x-1;for(;B<=W;){const V=(B+W)/2|0,K=O(V);if(K<0)B=V+1;else if(K>0)W=V-1;else return V}return-(B+1)}e.binarySearch2=p;function _(x,O,B){if(x=x|0,x>=O.length)throw new TypeError("invalid index");const W=O[Math.floor(O.length*Math.random())],V=[],K=[],F=[];for(const q of O){const ie=B(q,W);ie<0?V.push(q):ie>0?K.push(q):F.push(q)}return x<V.length?_(x,V,B):x<V.length+F.length?F[0]:_(x-(V.length+F.length),K,B)}e.quickSelect=_;function v(x,O){const B=[];let W;for(const V of x.slice(0).sort(O))!W||O(W[0],V)!==0?(W=[V],B.push(W)):W.push(V);return B}e.groupBy=v;function*b(x,O){let B,W;for(const V of x)W!==void 0&&O(W,V)?B.push(V):(B&&(yield B),B=[V]),W=V;B&&(yield B)}e.groupAdjacentBy=b;function a(x,O){for(let B=0;B<=x.length;B++)O(B===0?void 0:x[B-1],B===x.length?void 0:x[B])}e.forEachAdjacent=a;function i(x,O){for(let B=0;B<x.length;B++)O(B===0?void 0:x[B-1],x[B],B+1===x.length?void 0:x[B+1])}e.forEachWithNeighbors=i;function n(x){return x.filter(O=>!!O)}e.coalesce=n;function t(x){let O=0;for(let B=0;B<x.length;B++)x[B]&&(x[O]=x[B],O+=1);x.length=O}e.coalesceInPlace=t;function r(x){return!Array.isArray(x)||x.length===0}e.isFalsyOrEmpty=r;function u(x){return Array.isArray(x)&&x.length>0}e.isNonEmptyArray=u;function f(x,O=B=>B){const B=new Set;return x.filter(W=>{const V=O(W);return B.has(V)?!1:(B.add(V),!0)})}e.distinct=f;function c(x,O){return x.length>0?x[0]:O}e.firstOrDefault=c;function d(x,O){let B=typeof O=="number"?x:0;typeof O=="number"?B=x:(B=0,O=x);const W=[];if(B<=O)for(let V=B;V<O;V++)W.push(V);else for(let V=B;V>O;V--)W.push(V);return W}e.range=d;function s(x,O,B){const W=x.slice(0,O),V=x.slice(O);return W.concat(B,V)}e.arrayInsert=s;function l(x,O){const B=x.indexOf(O);B>-1&&(x.splice(B,1),x.unshift(O))}e.pushToStart=l;function o(x,O){const B=x.indexOf(O);B>-1&&(x.splice(B,1),x.push(O))}e.pushToEnd=o;function g(x,O){for(const B of O)x.push(B)}e.pushMany=g;function h(x){return Array.isArray(x)?x:[x]}e.asArray=h;function m(x,O,B){const W=w(x,O),V=x.length,K=B.length;x.length=V+K;for(let F=V-1;F>=W;F--)x[F+K]=x[F];for(let F=0;F<K;F++)x[F+W]=B[F]}e.insertInto=m;function C(x,O,B,W){const V=w(x,O);let K=x.splice(V,B);return K===void 0&&(K=[]),m(x,V,W),K}e.splice=C;function w(x,O){return O<0?Math.max(O+x.length,0):Math.min(O,x.length)}var D;(function(x){function O(K){return K<0}x.isLessThan=O;function B(K){return K<=0}x.isLessThanOrEqual=B;function W(K){return K>0}x.isGreaterThan=W;function V(K){return K===0}x.isNeitherLessOrGreaterThan=V,x.greaterThan=1,x.lessThan=-1,x.neitherLessOrGreaterThan=0})(D||(e.CompareResult=D={}));function I(x,O){return(B,W)=>O(x(B),x(W))}e.compareBy=I;function T(...x){return(O,B)=>{for(const W of x){const V=W(O,B);if(!D.isNeitherLessOrGreaterThan(V))return V}return D.neitherLessOrGreaterThan}}e.tieBreakComparators=T;const A=(x,O)=>x-O;e.numberComparator=A;const P=(x,O)=>(0,e.numberComparator)(x?1:0,O?1:0);e.booleanComparator=P;function N(x){return(O,B)=>-x(O,B)}e.reverseOrder=N;class M{constructor(O){this.items=O,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(O){let B=this.firstIdx;for(;B<this.items.length&&O(this.items[B]);)B++;const W=B===this.firstIdx?null:this.items.slice(this.firstIdx,B);return this.firstIdx=B,W}takeFromEndWhile(O){let B=this.lastIdx;for(;B>=0&&O(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 O=this.items[this.firstIdx];return this.firstIdx++,O}takeCount(O){const B=this.items.slice(this.firstIdx,this.firstIdx+O);return this.firstIdx+=O,B}}e.ArrayQueue=M;class R{constructor(O){this.iterate=O}toArray(){const O=[];return this.iterate(B=>(O.push(B),!0)),O}filter(O){return new R(B=>this.iterate(W=>O(W)?B(W):!0))}map(O){return new R(B=>this.iterate(W=>B(O(W))))}findLast(O){let B;return this.iterate(W=>(O(W)&&(B=W),!0)),B}findLastMaxBy(O){let B,W=!0;return this.iterate(V=>((W||D.isGreaterThan(O(V,B)))&&(W=!1,B=V),!0)),B}}e.CallbackIterable=R,R.empty=new R(x=>{})}),define(se[60],oe([1,0]),function(te,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,r,u){const f=k(t,r);if(f!==-1)return t[f]}e.findLast=L;function k(t,r,u=t.length-1){for(let f=u;f>=0;f--){const c=t[f];if(r(c))return f}return-1}e.findLastIdx=k;function y(t,r){const u=E(t,r);return u===-1?void 0:t[u]}e.findLastMonotonous=y;function E(t,r,u=0,f=t.length){let c=u,d=f;for(;c<d;){const s=Math.floor((c+d)/2);r(t[s])?c=s+1:d=s}return c-1}e.findLastIdxMonotonous=E;function S(t,r){const u=p(t,r);return u===t.length?void 0:t[u]}e.findFirstMonotonous=S;function p(t,r,u=0,f=t.length){let c=u,d=f;for(;c<d;){const s=Math.floor((c+d)/2);r(t[s])?d=s:c=s+1}return c}e.findFirstIdxMonotonousOrArrLen=p;class _{constructor(r){this._array=r,this._findLastMonotonousLastIdx=0}findLastMonotonous(r){if(_.assertInvariants){if(this._prevFindLastPredicate){for(const f of this._array)if(this._prevFindLastPredicate(f)&&!r(f))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=r}const u=E(this._array,r,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=u+1,u===-1?void 0:this._array[u]}}e.MonotonousArray=_,_.assertInvariants=!1;function v(t,r){if(t.length===0)return;let u=t[0];for(let f=1;f<t.length;f++){const c=t[f];r(c,u)>0&&(u=c)}return u}e.findFirstMaxBy=v;function b(t,r){if(t.length===0)return;let u=t[0];for(let f=1;f<t.length;f++){const c=t[f];r(c,u)>=0&&(u=c)}return u}e.findLastMaxBy=b;function a(t,r){return v(t,(u,f)=>-r(u,f))}e.findFirstMinBy=a;function i(t,r){if(t.length===0)return-1;let u=0;for(let f=1;f<t.length;f++){const c=t[f];r(c,t[u])>0&&(u=f)}return u}e.findMaxIdxBy=i;function n(t,r){for(const u of t){const f=r(u);if(f!==void 0)return f}}e.mapFindFirst=n}),define(se[267],oe([1,0]),function(te,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 S=JSON.stringify(E);return this.lastArgKey!==S&&(this.lastArgKey=S,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 S=this.fn(E);return this._map.set(E,S),S}}e.CachedFunction=k}),define(se[268],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intersection=e.diffSets=void 0;function L(y,E){const S=[],p=[];for(const _ of y)E.has(_)||S.push(_);for(const _ of E)y.has(_)||p.push(_);return{removed:S,added:p}}e.diffSets=L;function k(y,E){const S=new Set;for(const p of E)y.has(p)&&S.add(p);return S}e.intersection=k}),define(se[39],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function L(p,_){const v=Math.pow(10,_);return Math.round(p*v)/v}class k{constructor(_,v,b,a=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,_))|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,a),0),3)}static equals(_,v){return _.r===v.r&&_.g===v.g&&_.b===v.b&&_.a===v.a}}e.RGBA=k;class y{constructor(_,v,b,a){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,_),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,a),0),3)}static equals(_,v){return _.h===v.h&&_.s===v.s&&_.l===v.l&&_.a===v.a}static fromRGBA(_){const v=_.r/255,b=_.g/255,a=_.b/255,i=_.a,n=Math.max(v,b,a),t=Math.min(v,b,a);let r=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:r=(b-a)/c+(b<a?6:0);break;case b:r=(a-v)/c+2;break;case a:r=(v-b)/c+4;break}r*=60,r=Math.round(r)}return new y(r,u,f,i)}static _hue2rgb(_,v,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?_+(v-_)*6*b:b<1/2?v:b<2/3?_+(v-_)*(2/3-b)*6:_}static toRGBA(_){const v=_.h/360,{s:b,l:a,a:i}=_;let n,t,r;if(b===0)n=t=r=a;else{const u=a<.5?a*(1+b):a+b-a*b,f=2*a-u;n=y._hue2rgb(f,u,v+1/3),t=y._hue2rgb(f,u,v),r=y._hue2rgb(f,u,v-1/3)}return new k(Math.round(n*255),Math.round(t*255),Math.round(r*255),i)}}e.HSLA=y;class E{constructor(_,v,b,a){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,_),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,a),0),3)}static equals(_,v){return _.h===v.h&&_.s===v.s&&_.v===v.v&&_.a===v.a}static fromRGBA(_){const v=_.r/255,b=_.g/255,a=_.b/255,i=Math.max(v,b,a),n=Math.min(v,b,a),t=i-n,r=i===0?0:t/i;let u;return t===0?u=0:i===v?u=((b-a)/t%6+6)%6:i===b?u=(a-v)/t+2:u=(v-b)/t+4,new E(Math.round(u*60),r,i,_.a)}static toRGBA(_){const{h:v,s:b,v:a,a:i}=_,n=a*b,t=n*(1-Math.abs(v/60%2-1)),r=a-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+r)*255),f=Math.round((f+r)*255),c=Math.round((c+r)*255),new k(u,f,c,i)}}e.HSVA=E;class S{static fromHex(_){return S.Format.CSS.parseHex(_)||S.red}static equals(_,v){return!_&&!v?!0:!_||!v?!1:_.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(_){if(_)if(_ instanceof k)this.rgba=_;else if(_ instanceof y)this._hsla=_,this.rgba=y.toRGBA(_);else if(_ instanceof E)this._hsva=_,this.rgba=E.toRGBA(_);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(_){return!!_&&k.equals(this.rgba,_.rgba)&&y.equals(this.hsla,_.hsla)&&E.equals(this.hsva,_.hsva)}getRelativeLuminance(){const _=S._relativeLuminanceForComponent(this.rgba.r),v=S._relativeLuminanceForComponent(this.rgba.g),b=S._relativeLuminanceForComponent(this.rgba.b),a=.2126*_+.7152*v+.0722*b;return L(a,4)}static _relativeLuminanceForComponent(_){const v=_/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(_){const v=this.getRelativeLuminance(),b=_.getRelativeLuminance();return v>b}isDarkerThan(_){const v=this.getRelativeLuminance(),b=_.getRelativeLuminance();return v<b}lighten(_){return new S(new y(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*_,this.hsla.a))}darken(_){return new S(new y(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*_,this.hsla.a))}transparent(_){const{r:v,g:b,b:a,a:i}=this.rgba;return new S(new k(v,b,a,i*_))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new S(new k(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}makeOpaque(_){if(this.isOpaque()||_.rgba.a!==1)return this;const{r:v,g:b,b:a,a:i}=this.rgba;return new S(new k(_.rgba.r-i*(_.rgba.r-v),_.rgba.g-i*(_.rgba.g-b),_.rgba.b-i*(_.rgba.b-a),1))}toString(){return this._toString||(this._toString=S.Format.CSS.format(this)),this._toString}static getLighterColor(_,v,b){if(_.isLighterThan(v))return _;b=b||.5;const a=_.getRelativeLuminance(),i=v.getRelativeLuminance();return b=b*(i-a)/i,_.lighten(b)}static getDarkerColor(_,v,b){if(_.isDarkerThan(v))return _;b=b||.5;const a=_.getRelativeLuminance(),i=v.getRelativeLuminance();return b=b*(a-i)/a,_.darken(b)}}e.Color=S,S.white=new S(new k(255,255,255,1)),S.black=new S(new k(0,0,0,1)),S.red=new S(new k(255,0,0,1)),S.blue=new S(new k(0,0,255,1)),S.green=new S(new k(0,255,0,1)),S.cyan=new S(new k(0,255,255,1)),S.lightgrey=new S(new k(211,211,211,1)),S.transparent=new S(new k(0,0,0,0)),function(p){let _;(function(v){let b;(function(a){function i(o){return o.rgba.a===1?`rgb(${o.rgba.r}, ${o.rgba.g}, ${o.rgba.b})`:p.Format.CSS.formatRGBA(o)}a.formatRGB=i;function n(o){return`rgba(${o.rgba.r}, ${o.rgba.g}, ${o.rgba.b}, ${+o.rgba.a.toFixed(2)})`}a.formatRGBA=n;function t(o){return o.hsla.a===1?`hsl(${o.hsla.h}, ${(o.hsla.s*100).toFixed(2)}%, ${(o.hsla.l*100).toFixed(2)}%)`:p.Format.CSS.formatHSLA(o)}a.formatHSL=t;function r(o){return`hsla(${o.hsla.h}, ${(o.hsla.s*100).toFixed(2)}%, ${(o.hsla.l*100).toFixed(2)}%, ${o.hsla.a.toFixed(2)})`}a.formatHSLA=r;function u(o){const g=o.toString(16);return g.length!==2?"0"+g:g}function f(o){return`#${u(o.rgba.r)}${u(o.rgba.g)}${u(o.rgba.b)}`}a.formatHex=f;function c(o,g=!1){return g&&o.rgba.a===1?p.Format.CSS.formatHex(o):`#${u(o.rgba.r)}${u(o.rgba.g)}${u(o.rgba.b)}${u(Math.round(o.rgba.a*255))}`}a.formatHexA=c;function d(o){return o.isOpaque()?p.Format.CSS.formatHex(o):p.Format.CSS.formatRGBA(o)}a.format=d;function s(o){const g=o.length;if(g===0||o.charCodeAt(0)!==35)return null;if(g===7){const h=16*l(o.charCodeAt(1))+l(o.charCodeAt(2)),m=16*l(o.charCodeAt(3))+l(o.charCodeAt(4)),C=16*l(o.charCodeAt(5))+l(o.charCodeAt(6));return new p(new k(h,m,C,1))}if(g===9){const h=16*l(o.charCodeAt(1))+l(o.charCodeAt(2)),m=16*l(o.charCodeAt(3))+l(o.charCodeAt(4)),C=16*l(o.charCodeAt(5))+l(o.charCodeAt(6)),w=16*l(o.charCodeAt(7))+l(o.charCodeAt(8));return new p(new k(h,m,C,w/255))}if(g===4){const h=l(o.charCodeAt(1)),m=l(o.charCodeAt(2)),C=l(o.charCodeAt(3));return new p(new k(16*h+h,16*m+m,16*C+C))}if(g===5){const h=l(o.charCodeAt(1)),m=l(o.charCodeAt(2)),C=l(o.charCodeAt(3)),w=l(o.charCodeAt(4));return new p(new k(16*h+h,16*m+m,16*C+C,(16*w+w)/255))}return null}a.parseHex=s;function l(o){switch(o){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(b=v.CSS||(v.CSS={}))})(_=p.Format||(p.Format={}))}(S||(e.Color=S={}))}),define(se[107],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.memoize=void 0;function L(k,y,E){let S=null,p=null;if(typeof E.value=="function"?(S="value",p=E.value,p.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof E.get=="function"&&(S="get",p=E.get),!p)throw new Error("not supported");const _=`$memoize$${y}`;E[S]=function(...v){return this.hasOwnProperty(_)||Object.defineProperty(this,_,{configurable:!1,enumerable:!1,writable:!1,value:p.apply(this,v)}),this[_]}}e.memoize=L}),define(se[397],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class L{constructor(y,E,S,p){this.originalStart=y,this.originalLength=E,this.modifiedStart=S,this.modifiedLength=p}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=L}),define(se[12],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=e.ErrorNoTelemetry=e.NotSupportedError=e.illegalState=e.illegalArgument=e.canceled=e.CancellationError=e.isCancellationError=e.transformErrorForSerialization=e.onUnexpectedExternalError=e.onUnexpectedError=e.errorHandler=e.ErrorHandler=void 0;class L{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(u){setTimeout(()=>{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(r){p(r)||e.errorHandler.onUnexpectedError(r)}e.onUnexpectedError=k;function y(r){p(r)||e.errorHandler.onUnexpectedExternalError(r)}e.onUnexpectedExternalError=y;function E(r){if(r instanceof Error){const{name:u,message:f}=r,c=r.stacktrace||r.stack;return{$isError:!0,name:u,message:f,stack:c,noTelemetry:n.isErrorNoTelemetry(r)}}return r}e.transformErrorForSerialization=E;const S="Canceled";function p(r){return r instanceof _?!0:r instanceof Error&&r.name===S&&r.message===S}e.isCancellationError=p;class _ extends Error{constructor(){super(S),this.name=this.message}}e.CancellationError=_;function v(){const r=new Error(S);return r.name=r.message,r}e.canceled=v;function b(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}e.illegalArgument=b;function a(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}e.illegalState=a;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(se[93],oe([1,0,44,12]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrustedTypesPolicy=void 0;function y(E,S){var p;const _=globalThis.MonacoEnvironment;if(_?.createTrustedTypesPolicy)try{return _.createTrustedTypesPolicy(E,S)}catch(v){(0,k.onUnexpectedError)(v);return}try{return(p=L.mainWindow.trustedTypes)===null||p===void 0?void 0:p.createPolicy(E,S)}catch(v){(0,k.onUnexpectedError)(v);return}}e.createTrustedTypesPolicy=y}),define(se[90],oe([1,0,12]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.softAssert=e.assertNever=e.ok=void 0;function k(_,v){if(!_)throw new Error(v?`Assertion failed (${v})`:"Assertion Failed")}e.ok=k;function y(_,v="Unreachable"){throw new Error(v)}e.assertNever=y;function E(_){_||(0,L.onUnexpectedError)(new L.BugIndicatingError("Assertion Failed"))}e.softAssert=E;function S(_){if(!_()){debugger;_(),(0,L.onUnexpectedError)(new L.BugIndicatingError("Assertion Failed"))}}e.assertFn=S;function p(_,v){let b=0;for(;b<_.length-1;){const a=_[b],i=_[b+1];if(!v(a,i))return!1;b++}return!0}e.checkAdjacentItems=p}),define(se[108],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSingleCallFunction=void 0;function L(k,y){const E=this;let S=!1,p;return function(){if(S)return p;if(S=!0,y)try{p=k.apply(E,arguments)}finally{y()}else p=k.apply(E,arguments);return p}}e.createSingleCallFunction=L}),define(se[170],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class L{constructor(y){this._prefix=y,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=L,e.defaultGenerator=new L("id#")}),define(se[52],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var L;(function(k){function y(o){return o&&typeof o=="object"&&typeof o[Symbol.iterator]=="function"}k.is=y;const E=Object.freeze([]);function S(){return E}k.empty=S;function*p(o){yield o}k.single=p;function _(o){return y(o)?o:p(o)}k.wrap=_;function v(o){return o||E}k.from=v;function*b(o){for(let g=o.length-1;g>=0;g--)yield o[g]}k.reverse=b;function a(o){return!o||o[Symbol.iterator]().next().done===!0}k.isEmpty=a;function i(o){return o[Symbol.iterator]().next().value}k.first=i;function n(o,g){for(const h of o)if(g(h))return!0;return!1}k.some=n;function t(o,g){for(const h of o)if(g(h))return h}k.find=t;function*r(o,g){for(const h of o)g(h)&&(yield h)}k.filter=r;function*u(o,g){let h=0;for(const m of o)yield g(m,h++)}k.map=u;function*f(...o){for(const g of o)yield*g}k.concat=f;function c(o,g,h){let m=h;for(const C of o)m=g(m,C);return m}k.reduce=c;function*d(o,g,h=o.length){for(g<0&&(g+=o.length),h<0?h+=o.length:h>o.length&&(h=o.length);g<h;g++)yield o[g]}k.slice=d;function s(o,g=Number.POSITIVE_INFINITY){const h=[];if(g===0)return[h,o];const m=o[Symbol.iterator]();for(let C=0;C<g;C++){const w=m.next();if(w.done)return[h,k.empty()];h.push(w.value)}return[h,{[Symbol.iterator](){return m}}]}k.consume=s;async function l(o){const g=[];for await(const h of o)g.push(h);return Promise.resolve(g)}k.asyncToArray=l})(L||(e.Iterable=L={}))}),define(se[65],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyChord=e.KeyCodeUtils=e.IMMUTABLE_KEY_CODE_TO_CODE=e.IMMUTABLE_CODE_TO_KEY_CODE=e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE=e.EVENT_KEY_CODE_MAP=void 0;class L{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(i,n){this._keyCodeToStr[i]=n,this._strToKeyCode[n.toLowerCase()]=i}keyCodeToStr(i){return this._keyCodeToStr[i]}strToKeyCode(i){return this._strToKeyCode[i.toLowerCase()]||0}}const k=new L,y=new L,E=new L;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const S=[],p=Object.create(null),_=Object.create(null);e.IMMUTABLE_CODE_TO_KEY_CODE=[],e.IMMUTABLE_KEY_CODE_TO_CODE=[];for(let a=0;a<=193;a++)e.IMMUTABLE_CODE_TO_KEY_CODE[a]=-1;for(let a=0;a<=132;a++)e.IMMUTABLE_KEY_CODE_TO_CODE[a]=-1;(function(){const a="",i=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",a,a],[1,1,"Hyper",0,a,0,a,a,a],[1,2,"Super",0,a,0,a,a,a],[1,3,"Fn",0,a,0,a,a,a],[1,4,"FnLock",0,a,0,a,a,a],[1,5,"Suspend",0,a,0,a,a,a],[1,6,"Resume",0,a,0,a,a,a],[1,7,"Turbo",0,a,0,a,a,a],[1,8,"Sleep",0,a,0,"VK_SLEEP",a,a],[1,9,"WakeUp",0,a,0,a,a,a],[0,10,"KeyA",31,"A",65,"VK_A",a,a],[0,11,"KeyB",32,"B",66,"VK_B",a,a],[0,12,"KeyC",33,"C",67,"VK_C",a,a],[0,13,"KeyD",34,"D",68,"VK_D",a,a],[0,14,"KeyE",35,"E",69,"VK_E",a,a],[0,15,"KeyF",36,"F",70,"VK_F",a,a],[0,16,"KeyG",37,"G",71,"VK_G",a,a],[0,17,"KeyH",38,"H",72,"VK_H",a,a],[0,18,"KeyI",39,"I",73,"VK_I",a,a],[0,19,"KeyJ",40,"J",74,"VK_J",a,a],[0,20,"KeyK",41,"K",75,"VK_K",a,a],[0,21,"KeyL",42,"L",76,"VK_L",a,a],[0,22,"KeyM",43,"M",77,"VK_M",a,a],[0,23,"KeyN",44,"N",78,"VK_N",a,a],[0,24,"KeyO",45,"O",79,"VK_O",a,a],[0,25,"KeyP",46,"P",80,"VK_P",a,a],[0,26,"KeyQ",47,"Q",81,"VK_Q",a,a],[0,27,"KeyR",48,"R",82,"VK_R",a,a],[0,28,"KeyS",49,"S",83,"VK_S",a,a],[0,29,"KeyT",50,"T",84,"VK_T",a,a],[0,30,"KeyU",51,"U",85,"VK_U",a,a],[0,31,"KeyV",52,"V",86,"VK_V",a,a],[0,32,"KeyW",53,"W",87,"VK_W",a,a],[0,33,"KeyX",54,"X",88,"VK_X",a,a],[0,34,"KeyY",55,"Y",89,"VK_Y",a,a],[0,35,"KeyZ",56,"Z",90,"VK_Z",a,a],[0,36,"Digit1",22,"1",49,"VK_1",a,a],[0,37,"Digit2",23,"2",50,"VK_2",a,a],[0,38,"Digit3",24,"3",51,"VK_3",a,a],[0,39,"Digit4",25,"4",52,"VK_4",a,a],[0,40,"Digit5",26,"5",53,"VK_5",a,a],[0,41,"Digit6",27,"6",54,"VK_6",a,a],[0,42,"Digit7",28,"7",55,"VK_7",a,a],[0,43,"Digit8",29,"8",56,"VK_8",a,a],[0,44,"Digit9",30,"9",57,"VK_9",a,a],[0,45,"Digit0",21,"0",48,"VK_0",a,a],[1,46,"Enter",3,"Enter",13,"VK_RETURN",a,a],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",a,a],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",a,a],[1,49,"Tab",2,"Tab",9,"VK_TAB",a,a],[1,50,"Space",10,"Space",32,"VK_SPACE",a,a],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,a,0,a,a,a],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",a,a],[1,64,"F1",59,"F1",112,"VK_F1",a,a],[1,65,"F2",60,"F2",113,"VK_F2",a,a],[1,66,"F3",61,"F3",114,"VK_F3",a,a],[1,67,"F4",62,"F4",115,"VK_F4",a,a],[1,68,"F5",63,"F5",116,"VK_F5",a,a],[1,69,"F6",64,"F6",117,"VK_F6",a,a],[1,70,"F7",65,"F7",118,"VK_F7",a,a],[1,71,"F8",66,"F8",119,"VK_F8",a,a],[1,72,"F9",67,"F9",120,"VK_F9",a,a],[1,73,"F10",68,"F10",121,"VK_F10",a,a],[1,74,"F11",69,"F11",122,"VK_F11",a,a],[1,75,"F12",70,"F12",123,"VK_F12",a,a],[1,76,"PrintScreen",0,a,0,a,a,a],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",a,a],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",a,a],[1,79,"Insert",19,"Insert",45,"VK_INSERT",a,a],[1,80,"Home",14,"Home",36,"VK_HOME",a,a],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",a,a],[1,82,"Delete",20,"Delete",46,"VK_DELETE",a,a],[1,83,"End",13,"End",35,"VK_END",a,a],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",a,a],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",a],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",a],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",a],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",a],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",a,a],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",a,a],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",a,a],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",a,a],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",a,a],[1,94,"NumpadEnter",3,a,0,a,a,a],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",a,a],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",a,a],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",a,a],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",a,a],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",a,a],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",a,a],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",a,a],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",a,a],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",a,a],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",a,a],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",a,a],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",a,a],[1,107,"ContextMenu",58,"ContextMenu",93,a,a,a],[1,108,"Power",0,a,0,a,a,a],[1,109,"NumpadEqual",0,a,0,a,a,a],[1,110,"F13",71,"F13",124,"VK_F13",a,a],[1,111,"F14",72,"F14",125,"VK_F14",a,a],[1,112,"F15",73,"F15",126,"VK_F15",a,a],[1,113,"F16",74,"F16",127,"VK_F16",a,a],[1,114,"F17",75,"F17",128,"VK_F17",a,a],[1,115,"F18",76,"F18",129,"VK_F18",a,a],[1,116,"F19",77,"F19",130,"VK_F19",a,a],[1,117,"F20",78,"F20",131,"VK_F20",a,a],[1,118,"F21",79,"F21",132,"VK_F21",a,a],[1,119,"F22",80,"F22",133,"VK_F22",a,a],[1,120,"F23",81,"F23",134,"VK_F23",a,a],[1,121,"F24",82,"F24",135,"VK_F24",a,a],[1,122,"Open",0,a,0,a,a,a],[1,123,"Help",0,a,0,a,a,a],[1,124,"Select",0,a,0,a,a,a],[1,125,"Again",0,a,0,a,a,a],[1,126,"Undo",0,a,0,a,a,a],[1,127,"Cut",0,a,0,a,a,a],[1,128,"Copy",0,a,0,a,a,a],[1,129,"Paste",0,a,0,a,a,a],[1,130,"Find",0,a,0,a,a,a],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",a,a],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",a,a],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",a,a],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",a,a],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",a,a],[1,136,"KanaMode",0,a,0,a,a,a],[0,137,"IntlYen",0,a,0,a,a,a],[1,138,"Convert",0,a,0,a,a,a],[1,139,"NonConvert",0,a,0,a,a,a],[1,140,"Lang1",0,a,0,a,a,a],[1,141,"Lang2",0,a,0,a,a,a],[1,142,"Lang3",0,a,0,a,a,a],[1,143,"Lang4",0,a,0,a,a,a],[1,144,"Lang5",0,a,0,a,a,a],[1,145,"Abort",0,a,0,a,a,a],[1,146,"Props",0,a,0,a,a,a],[1,147,"NumpadParenLeft",0,a,0,a,a,a],[1,148,"NumpadParenRight",0,a,0,a,a,a],[1,149,"NumpadBackspace",0,a,0,a,a,a],[1,150,"NumpadMemoryStore",0,a,0,a,a,a],[1,151,"NumpadMemoryRecall",0,a,0,a,a,a],[1,152,"NumpadMemoryClear",0,a,0,a,a,a],[1,153,"NumpadMemoryAdd",0,a,0,a,a,a],[1,154,"NumpadMemorySubtract",0,a,0,a,a,a],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",a,a],[1,156,"NumpadClearEntry",0,a,0,a,a,a],[1,0,a,5,"Ctrl",17,"VK_CONTROL",a,a],[1,0,a,4,"Shift",16,"VK_SHIFT",a,a],[1,0,a,6,"Alt",18,"VK_MENU",a,a],[1,0,a,57,"Meta",91,"VK_COMMAND",a,a],[1,157,"ControlLeft",5,a,0,"VK_LCONTROL",a,a],[1,158,"ShiftLeft",4,a,0,"VK_LSHIFT",a,a],[1,159,"AltLeft",6,a,0,"VK_LMENU",a,a],[1,160,"MetaLeft",57,a,0,"VK_LWIN",a,a],[1,161,"ControlRight",5,a,0,"VK_RCONTROL",a,a],[1,162,"ShiftRight",4,a,0,"VK_RSHIFT",a,a],[1,163,"AltRight",6,a,0,"VK_RMENU",a,a],[1,164,"MetaRight",57,a,0,"VK_RWIN",a,a],[1,165,"BrightnessUp",0,a,0,a,a,a],[1,166,"BrightnessDown",0,a,0,a,a,a],[1,167,"MediaPlay",0,a,0,a,a,a],[1,168,"MediaRecord",0,a,0,a,a,a],[1,169,"MediaFastForward",0,a,0,a,a,a],[1,170,"MediaRewind",0,a,0,a,a,a],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",a,a],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",a,a],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",a,a],[1,174,"Eject",0,a,0,a,a,a],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",a,a],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",a,a],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",a,a],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",a,a],[1,179,"LaunchApp1",0,a,0,"VK_MEDIA_LAUNCH_APP1",a,a],[1,180,"SelectTask",0,a,0,a,a,a],[1,181,"LaunchScreenSaver",0,a,0,a,a,a],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",a,a],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",a,a],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",a,a],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",a,a],[1,186,"BrowserStop",0,a,0,"VK_BROWSER_STOP",a,a],[1,187,"BrowserRefresh",0,a,0,"VK_BROWSER_REFRESH",a,a],[1,188,"BrowserFavorites",0,a,0,"VK_BROWSER_FAVORITES",a,a],[1,189,"ZoomToggle",0,a,0,a,a,a],[1,190,"MailReply",0,a,0,a,a,a],[1,191,"MailForward",0,a,0,a,a,a],[1,192,"MailSend",0,a,0,a,a,a],[1,0,a,114,"KeyInComposition",229,a,a,a],[1,0,a,116,"ABNT_C2",194,"VK_ABNT_C2",a,a],[1,0,a,96,"OEM_8",223,"VK_OEM_8",a,a],[1,0,a,0,a,0,"VK_KANA",a,a],[1,0,a,0,a,0,"VK_HANGUL",a,a],[1,0,a,0,a,0,"VK_JUNJA",a,a],[1,0,a,0,a,0,"VK_FINAL",a,a],[1,0,a,0,a,0,"VK_HANJA",a,a],[1,0,a,0,a,0,"VK_KANJI",a,a],[1,0,a,0,a,0,"VK_CONVERT",a,a],[1,0,a,0,a,0,"VK_NONCONVERT",a,a],[1,0,a,0,a,0,"VK_ACCEPT",a,a],[1,0,a,0,a,0,"VK_MODECHANGE",a,a],[1,0,a,0,a,0,"VK_SELECT",a,a],[1,0,a,0,a,0,"VK_PRINT",a,a],[1,0,a,0,a,0,"VK_EXECUTE",a,a],[1,0,a,0,a,0,"VK_SNAPSHOT",a,a],[1,0,a,0,a,0,"VK_HELP",a,a],[1,0,a,0,a,0,"VK_APPS",a,a],[1,0,a,0,a,0,"VK_PROCESSKEY",a,a],[1,0,a,0,a,0,"VK_PACKET",a,a],[1,0,a,0,a,0,"VK_DBE_SBCSCHAR",a,a],[1,0,a,0,a,0,"VK_DBE_DBCSCHAR",a,a],[1,0,a,0,a,0,"VK_ATTN",a,a],[1,0,a,0,a,0,"VK_CRSEL",a,a],[1,0,a,0,a,0,"VK_EXSEL",a,a],[1,0,a,0,a,0,"VK_EREOF",a,a],[1,0,a,0,a,0,"VK_PLAY",a,a],[1,0,a,0,a,0,"VK_ZOOM",a,a],[1,0,a,0,a,0,"VK_NONAME",a,a],[1,0,a,0,a,0,"VK_PA1",a,a],[1,0,a,0,a,0,"VK_OEM_CLEAR",a,a]],n=[],t=[];for(const r of i){const[u,f,c,d,s,l,o,g,h]=r;if(t[f]||(t[f]=!0,S[f]=c,p[c]=f,_[c.toLowerCase()]=f,u&&(e.IMMUTABLE_CODE_TO_KEY_CODE[f]=d,d!==0&&d!==3&&d!==5&&d!==4&&d!==6&&d!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[d]=f))),!n[d]){if(n[d]=!0,!s)throw new Error(`String representation missing for key code ${d} around scan code ${c}`);k.define(d,s),y.define(d,g||s),E.define(d,h||g||s)}l&&(e.EVENT_KEY_CODE_MAP[l]=d),o&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[o]=d)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var v;(function(a){function i(c){return k.keyCodeToStr(c)}a.toString=i;function n(c){return k.strToKeyCode(c)}a.fromString=n;function t(c){return y.keyCodeToStr(c)}a.toUserSettingsUS=t;function r(c){return E.keyCodeToStr(c)}a.toUserSettingsGeneral=r;function u(c){return y.strToKeyCode(c)||E.strToKeyCode(c)}a.fromUserSettings=u;function f(c){if(c>=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)}a.toElectronAccelerator=f})(v||(e.KeyCodeUtils=v={}));function b(a,i){const n=(i&65535)<<16>>>0;return(a|n)>>>0}e.KeyChord=b}),define(se[125],oe([1,0,12]),function(te,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,a){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,a),y(n,a)]):new p([y(i,a)])}else{const i=[];for(let n=0;n<b.length;n++)i.push(y(b[n],a));return new p(i)}}e.decodeKeybinding=k;function y(b,a){const i=!!(b&2048),n=!!(b&256),t=a===2?n:i,r=!!(b&1024),u=!!(b&512),f=a===2?i:n,c=b&255;return new E(t,r,u,f,c)}e.createSimpleKeybinding=y;class E{constructor(a,i,n,t,r){this.ctrlKey=a,this.shiftKey=i,this.altKey=n,this.metaKey=t,this.keyCode=r}equals(a){return a instanceof E&&this.ctrlKey===a.ctrlKey&&this.shiftKey===a.shiftKey&&this.altKey===a.altKey&&this.metaKey===a.metaKey&&this.keyCode===a.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}e.KeyCodeChord=E;class S{constructor(a,i,n,t,r){this.ctrlKey=a,this.shiftKey=i,this.altKey=n,this.metaKey=t,this.scanCode=r}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}e.ScanCodeChord=S;class p{constructor(a){if(a.length===0)throw(0,L.illegalArgument)("chords");this.chords=a}}e.Keybinding=p;class _{constructor(a,i,n,t,r,u){this.ctrlKey=a,this.shiftKey=i,this.altKey=n,this.metaKey=t,this.keyLabel=r,this.keyAriaLabel=u}}e.ResolvedChord=_;class v{}e.ResolvedKeybinding=v}),define(se[99],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class L{constructor(y){this.executor=y,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(y){this._error=y}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}e.Lazy=L}),define(se[144],oe([1,0,99]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.writeUInt8=e.readUInt8=e.writeUInt32BE=e.readUInt32BE=e.writeUInt16LE=e.readUInt16LE=e.VSBuffer=void 0;const k=typeof Buffer<"u",y=new L.Lazy(()=>new Uint8Array(256));let E;class S{static wrap(t){return k&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new S(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=S;function p(n,t){return n[t+0]<<0>>>0|n[t+1]<<8>>>0}e.readUInt16LE=p;function _(n,t,r){n[r+0]=t&255,t=t>>>8,n[r+1]=t&255}e.writeUInt16LE=_;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,r){n[r+3]=t,t=t>>>8,n[r+2]=t,t=t>>>8,n[r+1]=t,t=t>>>8,n[r]=t}e.writeUInt32BE=b;function a(n,t){return n[t]}e.readUInt8=a;function i(n,t,r){n[r]=t}e.writeUInt8=i}),define(se[398],oe([1,0,99]),function(te,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 S(v,b,a=!1){const i=v||"",n=b||"",t=k.value.collator.compare(i,n);return k.value.collatorIsNumeric&&t===0&&i!==n?i<n?-1:1:t}e.compareFileNames=S;function p(v,b,a){const i=v.toLowerCase(),n=b.toLowerCase(),t=_(v,b,a);if(t)return t;const r=i.endsWith(a),u=n.endsWith(a);if(r!==u)return r?-1:1;const f=S(i,n);return f!==0?f:i.localeCompare(n)}e.compareAnything=p;function _(v,b,a){const i=v.toLowerCase(),n=b.toLowerCase(),t=i.startsWith(a),r=n.startsWith(a);if(t!==r)return t?-1:1;if(t&&r){if(i.length<n.length)return-1;if(i.length>n.length)return 1}return 0}e.compareByPrefix=_}),define(se[2],oe([1,0,108,52]),function(te,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(o){E=o}if(e.setDisposableTracker=S,y){const o="__is_disposable_tracked__";S(new class{trackDisposable(g){const h=new Error("Potentially leaked disposable").stack;setTimeout(()=>{g[o]||console.log(h)},3e3)}setParent(g,h){if(g&&g!==f.None)try{g[o]=!0}catch{}}markAsDisposed(g){if(g&&g!==f.None)try{g[o]=!0}catch{}}markAsSingleton(g){}})}function p(o){return E?.trackDisposable(o),o}e.trackDisposable=p;function _(o){E?.markAsDisposed(o)}e.markAsDisposed=_;function v(o,g){E?.setParent(o,g)}function b(o,g){if(E)for(const h of o)E.setParent(h,g)}function a(o){return E?.markAsSingleton(o),o}e.markAsSingleton=a;function i(o){return typeof o.dispose=="function"&&o.dispose.length===0}e.isDisposable=i;function n(o){if(k.Iterable.is(o)){const g=[];for(const h of o)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(o)?[]:o}else if(o)return o.dispose(),o}e.dispose=n;function t(...o){const g=r(()=>n(o));return b(o,g),g}e.combinedDisposable=t;function r(o){const g=p({dispose:(0,L.createSingleCallFunction)(()=>{_(g),o()})});return g}e.toDisposable=r;class u{constructor(){this._toDispose=new Set,this._isDisposed=!1,p(this)}dispose(){this._isDisposed||(_(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(){_(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,_(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 s{constructor(g){this.object=g}dispose(){}}e.ImmortalReference=s;class l{constructor(){this._store=new Map,this._isDisposed=!1,p(this)}dispose(){_(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(se[66],oe([1,0]),function(te,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 S=E.next;E.prev=L.Undefined,E.next=L.Undefined,E=S}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,S){const p=new L(E);if(this._first===L.Undefined)this._first=p,this._last=p;else if(S){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 _=!1;return()=>{_||(_=!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 S=E.prev;S.next=E.next,E.next.prev=S}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 ke=this&&this.__decorate||function(te,e,L,k){var y=arguments.length,E=y<3?e:k===null?k=Object.getOwnPropertyDescriptor(e,L):k,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(te,e,L,k);else for(var p=te.length-1;p>=0;p--)(S=te[p])&&(E=(y<3?S(E):y>3?S(e,L,E):S(e,L))||E);return y>3&&E&&Object.defineProperty(e,L,E),E};define(se[399],oe([1,0,107]),function(te,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,ke([L.memoize],k.prototype,"toString",null);const y=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function E(S){const p=[];let _=0,v;for(;v=y.exec(S);){v.index-_>0&&p.push(S.substring(_,v.index));const[,b,a,,i]=v;i?p.push({label:b,href:a,title:i}):p.push({label:b,href:a}),_=v.index+v[0].length}return _<S.length&&p.push(S.substring(_)),new k(p)}e.parseLinkedText=E}),define(se[53],oe([1,0]),function(te,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(a){return Array.isArray(a)}class S{constructor(i,n){if(this[L]="ResourceMap",i instanceof S)this.map=new Map(i.map),this.toKey=n??S.defaultToKey;else if(E(i)){this.map=new Map,this.toKey=n??S.defaultToKey;for(const[t,r]of i)this.set(t,r)}else this.map=new Map,this.toKey=i??S.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,r]of this.map)i(r.value,r.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=S,S.defaultToKey=a=>a.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 r=this._map.get(i);if(r)r.value=n,t!==0&&this.touch(r,t);else{switch(r={key:i,value:n,next:void 0,previous:void 0},t){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(i,r),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 r=this._head;for(;r;){if(n?i.bind(n)(r.value,r.key,this):i(r.value,r.key,this),this._state!==t)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},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 r}values(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},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 r}entries(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},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 r}[(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,r=i.previous;i===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.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,r=i.previous;i===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.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 _ 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=_;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(te,e){typeof define=="function"&&define.amd?define(se[400],oe([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):(te=typeof globalThis<"u"?globalThis:te||self,e(te.marked={}))}(this,function(te){"use strict";function e(U,G){for(var z=0;z<G.length;z++){var H=G[z];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(U,H.key,H)}}function L(U,G,z){return G&&e(U.prototype,G),z&&e(U,z),Object.defineProperty(U,"prototype",{writable:!1}),U}function k(U,G){if(U){if(typeof U=="string")return y(U,G);var z=Object.prototype.toString.call(U).slice(8,-1);if(z==="Object"&&U.constructor&&(z=U.constructor.name),z==="Map"||z==="Set")return Array.from(U);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return y(U,G)}}function y(U,G){(G==null||G>U.length)&&(G=U.length);for(var z=0,H=new Array(G);z<G;z++)H[z]=U[z];return H}function E(U,G){var z=typeof Symbol<"u"&&U[Symbol.iterator]||U["@@iterator"];if(z)return(z=z.call(U)).next.bind(z);if(Array.isArray(U)||(z=k(U))||G&&U&&typeof U.length=="number"){z&&(U=z);var H=0;return function(){return H>=U.length?{done:!0}:{done:!1,value:U[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 S(){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}}te.defaults=S();function p(U){te.defaults=U}var _=/[&<>"']/,v=/[&<>"']/g,b=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},n=function(G){return i[G]};function t(U,G){if(G){if(_.test(U))return U.replace(v,n)}else if(b.test(U))return U.replace(a,n);return U}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(U){return U.replace(r,function(G,z){return z=z.toLowerCase(),z==="colon"?":":z.charAt(0)==="#"?z.charAt(1)==="x"?String.fromCharCode(parseInt(z.substring(2),16)):String.fromCharCode(+z.substring(1)):""})}var f=/(^|[^\[])\^/g;function c(U,G){U=typeof U=="string"?U:U.source,G=G||"";var z={replace:function(Y,j){return j=j.source||j,j=j.replace(f,"$1"),U=U.replace(Y,j),z},getRegex:function(){return new RegExp(U,G)}};return z}var d=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(U,G,z){if(U){var H;try{H=decodeURIComponent(u(z)).replace(d,"").toLowerCase()}catch{return null}if(H.indexOf("javascript:")===0||H.indexOf("vbscript:")===0||H.indexOf("data:")===0)return null}G&&!s.test(z)&&(z=C(G,z));try{z=encodeURI(z).replace(/%25/g,"%")}catch{return null}return z}var o={},g=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(U,G){o[" "+U]||(g.test(U)?o[" "+U]=U+"/":o[" "+U]=T(U,"/",!0)),U=o[" "+U];var z=U.indexOf(":")===-1;return G.substring(0,2)==="//"?z?G:U.replace(h,"$1")+G:G.charAt(0)==="/"?z?G:U.replace(m,"$1")+G:U+G}var w={exec:function(){}};function D(U){for(var G=1,z,H;G<arguments.length;G++){z=arguments[G];for(H in z)Object.prototype.hasOwnProperty.call(z,H)&&(U[H]=z[H])}return U}function I(U,G){var z=U.replace(/\|/g,function(j,Z,ee){for(var le=!1,ue=Z;--ue>=0&&ee[ue]==="\\";)le=!le;return le?"|":" |"}),H=z.split(/ \|/),Y=0;if(H[0].trim()||H.shift(),H.length>0&&!H[H.length-1].trim()&&H.pop(),H.length>G)H.splice(G);else for(;H.length<G;)H.push("");for(;Y<H.length;Y++)H[Y]=H[Y].trim().replace(/\\\|/g,"|");return H}function T(U,G,z){var H=U.length;if(H===0)return"";for(var Y=0;Y<H;){var j=U.charAt(H-Y-1);if(j===G&&!z)Y++;else if(j!==G&&z)Y++;else break}return U.slice(0,H-Y)}function A(U,G){if(U.indexOf(G[1])===-1)return-1;for(var z=U.length,H=0,Y=0;Y<z;Y++)if(U[Y]==="\\")Y++;else if(U[Y]===G[0])H++;else if(U[Y]===G[1]&&(H--,H<0))return Y;return-1}function P(U){U&&U.sanitize&&!U.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function N(U,G){if(G<1)return"";for(var z="";G>1;)G&1&&(z+=U),G>>=1,U+=U;return z+U}function M(U,G,z,H){var Y=G.href,j=G.title?t(G.title):null,Z=U[1].replace(/\\([\[\]])/g,"$1");if(U[0].charAt(0)!=="!"){H.state.inLink=!0;var ee={type:"link",raw:z,href:Y,title:j,text:Z,tokens:H.inlineTokens(Z)};return H.state.inLink=!1,ee}return{type:"image",raw:z,href:Y,title:j,text:t(Z)}}function R(U,G){var z=U.match(/^(\s+)(?:```)/);if(z===null)return G;var H=z[1];return G.split(`
|
||
`).map(function(Y){var j=Y.match(/^\s+/);if(j===null)return Y;var Z=j[0];return Z.length>=H.length?Y.slice(H.length):Y}).join(`
|
||
`)}var x=function(){function U(z){this.options=z||te.defaults}var G=U.prototype;return G.space=function(H){var Y=this.rules.block.newline.exec(H);if(Y&&Y[0].length>0)return{type:"space",raw:Y[0]}},G.code=function(H){var Y=this.rules.block.code.exec(H);if(Y){var j=Y[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:Y[0],codeBlockStyle:"indented",text:this.options.pedantic?j:T(j,`
|
||
`)}}},G.fences=function(H){var Y=this.rules.block.fences.exec(H);if(Y){var j=Y[0],Z=R(j,Y[3]||"");return{type:"code",raw:j,lang:Y[2]?Y[2].trim():Y[2],text:Z}}},G.heading=function(H){var Y=this.rules.block.heading.exec(H);if(Y){var j=Y[2].trim();if(/#$/.test(j)){var Z=T(j,"#");(this.options.pedantic||!Z||/ $/.test(Z))&&(j=Z.trim())}return{type:"heading",raw:Y[0],depth:Y[1].length,text:j,tokens:this.lexer.inline(j)}}},G.hr=function(H){var Y=this.rules.block.hr.exec(H);if(Y)return{type:"hr",raw:Y[0]}},G.blockquote=function(H){var Y=this.rules.block.blockquote.exec(H);if(Y){var j=Y[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:Y[0],tokens:this.lexer.blockTokens(j,[]),text:j}}},G.list=function(H){var Y=this.rules.block.list.exec(H);if(Y){var j,Z,ee,le,ue,ce,pe,ve,Ce,Se,_e,Ee,Ae=Y[1].trim(),xe=Ae.length>1,Be={type:"list",raw:"",ordered:xe,start:xe?+Ae.slice(0,-1):"",loose:!1,items:[]};Ae=xe?"\\d{1,9}\\"+Ae.slice(-1):"\\"+Ae,this.options.pedantic&&(Ae=xe?Ae:"[*+-]");for(var De=new RegExp("^( {0,3}"+Ae+")((?:[ ][^\\n]*)?(?:\\n|$))");H&&(Ee=!1,!(!(Y=De.exec(H))||this.rules.block.hr.test(H)));){if(j=Y[0],H=H.substring(j.length),ve=Y[2].split(`
|
||
`,1)[0],Ce=H.split(`
|
||
`,1)[0],this.options.pedantic?(le=2,_e=ve.trimLeft()):(le=Y[2].search(/[^ ]/),le=le>4?1:le,_e=ve.slice(le),le+=Y[1].length),ce=!1,!ve&&/^ *$/.test(Ce)&&(j+=Ce+`
|
||
`,H=H.substring(Ce.length+1),Ee=!0),!Ee)for(var Ie=new RegExp("^ {0,"+Math.min(3,le-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),fe=new RegExp("^ {0,"+Math.min(3,le-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),be=new RegExp("^ {0,"+Math.min(3,le-1)+"}(?:```|~~~)"),Ne=new RegExp("^ {0,"+Math.min(3,le-1)+"}#");H&&(Se=H.split(`
|
||
`,1)[0],ve=Se,this.options.pedantic&&(ve=ve.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(be.test(ve)||Ne.test(ve)||Ie.test(ve)||fe.test(H)));){if(ve.search(/[^ ]/)>=le||!ve.trim())_e+=`
|
||
`+ve.slice(le);else if(!ce)_e+=`
|
||
`+ve;else break;!ce&&!ve.trim()&&(ce=!0),j+=Se+`
|
||
`,H=H.substring(Se.length+1)}Be.loose||(pe?Be.loose=!0:/\n *\n *$/.test(j)&&(pe=!0)),this.options.gfm&&(Z=/^\[[ xX]\] /.exec(_e),Z&&(ee=Z[0]!=="[ ] ",_e=_e.replace(/^\[[ xX]\] +/,""))),Be.items.push({type:"list_item",raw:j,task:!!Z,checked:ee,loose:!1,text:_e}),Be.raw+=j}Be.items[Be.items.length-1].raw=j.trimRight(),Be.items[Be.items.length-1].text=_e.trimRight(),Be.raw=Be.raw.trimRight();var Pe=Be.items.length;for(ue=0;ue<Pe;ue++){this.lexer.state.top=!1,Be.items[ue].tokens=this.lexer.blockTokens(Be.items[ue].text,[]);var ze=Be.items[ue].tokens.filter(function(je){return je.type==="space"}),Ke=ze.every(function(je){for(var Je=je.raw.split(""),rt=0,et=E(Je),st;!(st=et()).done;){var Qe=st.value;if(Qe===`
|
||
`&&(rt+=1),rt>1)return!0}return!1});!Be.loose&&ze.length&&Ke&&(Be.loose=!0,Be.items[ue].loose=!0)}return Be}},G.html=function(H){var Y=this.rules.block.html.exec(H);if(Y){var j={type:"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:Y[0]};if(this.options.sanitize){var Z=this.options.sanitizer?this.options.sanitizer(Y[0]):t(Y[0]);j.type="paragraph",j.text=Z,j.tokens=this.lexer.inline(Z)}return j}},G.def=function(H){var Y=this.rules.block.def.exec(H);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var j=Y[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:j,raw:Y[0],href:Y[2],title:Y[3]}}},G.table=function(H){var Y=this.rules.block.table.exec(H);if(Y){var j={type:"table",header:I(Y[1]).map(function(pe){return{text:pe}}),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:Y[3]&&Y[3].trim()?Y[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(j.header.length===j.align.length){j.raw=Y[0];var Z=j.align.length,ee,le,ue,ce;for(ee=0;ee<Z;ee++)/^ *-+: *$/.test(j.align[ee])?j.align[ee]="right":/^ *:-+: *$/.test(j.align[ee])?j.align[ee]="center":/^ *:-+ *$/.test(j.align[ee])?j.align[ee]="left":j.align[ee]=null;for(Z=j.rows.length,ee=0;ee<Z;ee++)j.rows[ee]=I(j.rows[ee],j.header.length).map(function(pe){return{text:pe}});for(Z=j.header.length,le=0;le<Z;le++)j.header[le].tokens=this.lexer.inline(j.header[le].text);for(Z=j.rows.length,le=0;le<Z;le++)for(ce=j.rows[le],ue=0;ue<ce.length;ue++)ce[ue].tokens=this.lexer.inline(ce[ue].text);return j}}},G.lheading=function(H){var Y=this.rules.block.lheading.exec(H);if(Y)return{type:"heading",raw:Y[0],depth:Y[2].charAt(0)==="="?1:2,text:Y[1],tokens:this.lexer.inline(Y[1])}},G.paragraph=function(H){var Y=this.rules.block.paragraph.exec(H);if(Y){var j=Y[1].charAt(Y[1].length-1)===`
|
||
`?Y[1].slice(0,-1):Y[1];return{type:"paragraph",raw:Y[0],text:j,tokens:this.lexer.inline(j)}}},G.text=function(H){var Y=this.rules.block.text.exec(H);if(Y)return{type:"text",raw:Y[0],text:Y[0],tokens:this.lexer.inline(Y[0])}},G.escape=function(H){var Y=this.rules.inline.escape.exec(H);if(Y)return{type:"escape",raw:Y[0],text:t(Y[1])}},G.tag=function(H){var Y=this.rules.inline.tag.exec(H);if(Y)return!this.lexer.state.inLink&&/^<a /i.test(Y[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(Y[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(Y[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Y[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:Y[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):t(Y[0]):Y[0]}},G.link=function(H){var Y=this.rules.inline.link.exec(H);if(Y){var j=Y[2].trim();if(!this.options.pedantic&&/^</.test(j)){if(!/>$/.test(j))return;var Z=T(j.slice(0,-1),"\\");if((j.length-Z.length)%2===0)return}else{var ee=A(Y[2],"()");if(ee>-1){var le=Y[0].indexOf("!")===0?5:4,ue=le+Y[1].length+ee;Y[2]=Y[2].substring(0,ee),Y[0]=Y[0].substring(0,ue).trim(),Y[3]=""}}var ce=Y[2],pe="";if(this.options.pedantic){var ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ce);ve&&(ce=ve[1],pe=ve[3])}else pe=Y[3]?Y[3].slice(1,-1):"";return ce=ce.trim(),/^</.test(ce)&&(this.options.pedantic&&!/>$/.test(j)?ce=ce.slice(1):ce=ce.slice(1,-1)),M(Y,{href:ce&&ce.replace(this.rules.inline._escapes,"$1"),title:pe&&pe.replace(this.rules.inline._escapes,"$1")},Y[0],this.lexer)}},G.reflink=function(H,Y){var j;if((j=this.rules.inline.reflink.exec(H))||(j=this.rules.inline.nolink.exec(H))){var Z=(j[2]||j[1]).replace(/\s+/g," ");if(Z=Y[Z.toLowerCase()],!Z||!Z.href){var ee=j[0].charAt(0);return{type:"text",raw:ee,text:ee}}return M(j,Z,j[0],this.lexer)}},G.emStrong=function(H,Y,j){j===void 0&&(j="");var Z=this.rules.inline.emStrong.lDelim.exec(H);if(Z&&!(Z[3]&&j.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 ee=Z[1]||Z[2]||"";if(!ee||ee&&(j===""||this.rules.inline.punctuation.exec(j))){var le=Z[0].length-1,ue,ce,pe=le,ve=0,Ce=Z[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ce.lastIndex=0,Y=Y.slice(-1*H.length+le);(Z=Ce.exec(Y))!=null;)if(ue=Z[1]||Z[2]||Z[3]||Z[4]||Z[5]||Z[6],!!ue){if(ce=ue.length,Z[3]||Z[4]){pe+=ce;continue}else if((Z[5]||Z[6])&&le%3&&!((le+ce)%3)){ve+=ce;continue}if(pe-=ce,!(pe>0)){if(ce=Math.min(ce,ce+pe+ve),Math.min(le,ce)%2){var Se=H.slice(1,le+Z.index+ce);return{type:"em",raw:H.slice(0,le+Z.index+ce+1),text:Se,tokens:this.lexer.inlineTokens(Se)}}var _e=H.slice(2,le+Z.index+ce-1);return{type:"strong",raw:H.slice(0,le+Z.index+ce+1),text:_e,tokens:this.lexer.inlineTokens(_e)}}}}}},G.codespan=function(H){var Y=this.rules.inline.code.exec(H);if(Y){var j=Y[2].replace(/\n/g," "),Z=/[^ ]/.test(j),ee=/^ /.test(j)&&/ $/.test(j);return Z&&ee&&(j=j.substring(1,j.length-1)),j=t(j,!0),{type:"codespan",raw:Y[0],text:j}}},G.br=function(H){var Y=this.rules.inline.br.exec(H);if(Y)return{type:"br",raw:Y[0]}},G.del=function(H){var Y=this.rules.inline.del.exec(H);if(Y)return{type:"del",raw:Y[0],text:Y[2],tokens:this.lexer.inlineTokens(Y[2])}},G.autolink=function(H,Y){var j=this.rules.inline.autolink.exec(H);if(j){var Z,ee;return j[2]==="@"?(Z=t(this.options.mangle?Y(j[1]):j[1]),ee="mailto:"+Z):(Z=t(j[1]),ee=Z),{type:"link",raw:j[0],text:Z,href:ee,tokens:[{type:"text",raw:Z,text:Z}]}}},G.url=function(H,Y){var j;if(j=this.rules.inline.url.exec(H)){var Z,ee;if(j[2]==="@")Z=t(this.options.mangle?Y(j[0]):j[0]),ee="mailto:"+Z;else{var le;do le=j[0],j[0]=this.rules.inline._backpedal.exec(j[0])[0];while(le!==j[0]);Z=t(j[0]),j[1]==="www."?ee="http://"+Z:ee=Z}return{type:"link",raw:j[0],text:Z,href:ee,tokens:[{type:"text",raw:Z,text:Z}]}}},G.inlineText=function(H,Y){var j=this.rules.inline.text.exec(H);if(j){var Z;return this.lexer.state.inRawBlock?Z=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(j[0]):t(j[0]):j[0]:Z=t(this.options.smartypants?Y(j[0]):j[0]),{type:"text",raw:j[0],text:Z}}},U}(),O={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:w,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};O._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,O._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,O.def=c(O.def).replace("label",O._label).replace("title",O._title).getRegex(),O.bullet=/(?:[*+-]|\d{1,9}[.)])/,O.listItemStart=c(/^( *)(bull) */).replace("bull",O.bullet).getRegex(),O.list=c(O.list).replace(/bull/g,O.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+O.def.source+")").getRegex(),O._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",O._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,O.html=c(O.html,"i").replace("comment",O._comment).replace("tag",O._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O.paragraph=c(O._paragraph).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O._tag).getRegex(),O.blockquote=c(O.blockquote).replace("paragraph",O.paragraph).getRegex(),O.normal=D({},O),O.gfm=D({},O.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),O.gfm.table=c(O.gfm.table).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O._tag).getRegex(),O.gfm.paragraph=c(O._paragraph).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",O.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O._tag).getRegex(),O.pedantic=D({},O.normal,{html:c(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",O._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,paragraph:c(O.normal._paragraph).replace("hr",O.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",O.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:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:w,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=c(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\*|\\_/g,B._comment=c(O._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",O._label).getRegex(),B.nolink=c(B.nolink).replace("ref",O._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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),B.gfm.url=c(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=D({},B.gfm,{br:c(B.br).replace("{2,}","*").getRegex(),text:c(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function W(U){return U.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function V(U){var G="",z,H,Y=U.length;for(z=0;z<Y;z++)H=U.charCodeAt(z),Math.random()>.5&&(H="x"+H.toString(16)),G+="&#"+H+";";return G}var K=function(){function U(z){this.tokens=[],this.tokens.links=Object.create(null),this.options=z||te.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:O.normal,inline:B.normal};this.options.pedantic?(H.block=O.pedantic,H.inline=B.pedantic):this.options.gfm&&(H.block=O.gfm,this.options.breaks?H.inline=B.breaks:H.inline=B.gfm),this.tokenizer.rules=H}U.lex=function(H,Y){var j=new U(Y);return j.lex(H)},U.lexInline=function(H,Y){var j=new U(Y);return j.inlineTokens(H)};var G=U.prototype;return G.lex=function(H){H=H.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(H,this.tokens);for(var Y;Y=this.inlineQueue.shift();)this.inlineTokens(Y.src,Y.tokens);return this.tokens},G.blockTokens=function(H,Y){var j=this;Y===void 0&&(Y=[]),this.options.pedantic?H=H.replace(/\t/g," ").replace(/^ +$/gm,""):H=H.replace(/^( *)(\t+)/gm,function(pe,ve,Ce){return ve+" ".repeat(Ce.length)});for(var Z,ee,le,ue;H;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(pe){return(Z=pe.call({lexer:j},H,Y))?(H=H.substring(Z.raw.length),Y.push(Z),!0):!1}))){if(Z=this.tokenizer.space(H)){H=H.substring(Z.raw.length),Z.raw.length===1&&Y.length>0?Y[Y.length-1].raw+=`
|
||
`:Y.push(Z);continue}if(Z=this.tokenizer.code(H)){H=H.substring(Z.raw.length),ee=Y[Y.length-1],ee&&(ee.type==="paragraph"||ee.type==="text")?(ee.raw+=`
|
||
`+Z.raw,ee.text+=`
|
||
`+Z.text,this.inlineQueue[this.inlineQueue.length-1].src=ee.text):Y.push(Z);continue}if(Z=this.tokenizer.fences(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.heading(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.hr(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.blockquote(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.list(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.html(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.def(H)){H=H.substring(Z.raw.length),ee=Y[Y.length-1],ee&&(ee.type==="paragraph"||ee.type==="text")?(ee.raw+=`
|
||
`+Z.raw,ee.text+=`
|
||
`+Z.raw,this.inlineQueue[this.inlineQueue.length-1].src=ee.text):this.tokens.links[Z.tag]||(this.tokens.links[Z.tag]={href:Z.href,title:Z.title});continue}if(Z=this.tokenizer.table(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.lheading(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(le=H,this.options.extensions&&this.options.extensions.startBlock&&function(){var pe=1/0,ve=H.slice(1),Ce=void 0;j.options.extensions.startBlock.forEach(function(Se){Ce=Se.call({lexer:this},ve),typeof Ce=="number"&&Ce>=0&&(pe=Math.min(pe,Ce))}),pe<1/0&&pe>=0&&(le=H.substring(0,pe+1))}(),this.state.top&&(Z=this.tokenizer.paragraph(le))){ee=Y[Y.length-1],ue&&ee.type==="paragraph"?(ee.raw+=`
|
||
`+Z.raw,ee.text+=`
|
||
`+Z.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ee.text):Y.push(Z),ue=le.length!==H.length,H=H.substring(Z.raw.length);continue}if(Z=this.tokenizer.text(H)){H=H.substring(Z.raw.length),ee=Y[Y.length-1],ee&&ee.type==="text"?(ee.raw+=`
|
||
`+Z.raw,ee.text+=`
|
||
`+Z.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ee.text):Y.push(Z);continue}if(H){var ce="Infinite loop on byte: "+H.charCodeAt(0);if(this.options.silent){console.error(ce);break}else throw new Error(ce)}}return this.state.top=!0,Y},G.inline=function(H,Y){return Y===void 0&&(Y=[]),this.inlineQueue.push({src:H,tokens:Y}),Y},G.inlineTokens=function(H,Y){var j=this;Y===void 0&&(Y=[]);var Z,ee,le,ue=H,ce,pe,ve;if(this.tokens.links){var Ce=Object.keys(this.tokens.links);if(Ce.length>0)for(;(ce=this.tokenizer.rules.inline.reflinkSearch.exec(ue))!=null;)Ce.includes(ce[0].slice(ce[0].lastIndexOf("[")+1,-1))&&(ue=ue.slice(0,ce.index)+"["+N("a",ce[0].length-2)+"]"+ue.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ce=this.tokenizer.rules.inline.blockSkip.exec(ue))!=null;)ue=ue.slice(0,ce.index)+"["+N("a",ce[0].length-2)+"]"+ue.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ce=this.tokenizer.rules.inline.escapedEmSt.exec(ue))!=null;)ue=ue.slice(0,ce.index)+"++"+ue.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;H;)if(pe||(ve=""),pe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(_e){return(Z=_e.call({lexer:j},H,Y))?(H=H.substring(Z.raw.length),Y.push(Z),!0):!1}))){if(Z=this.tokenizer.escape(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.tag(H)){H=H.substring(Z.raw.length),ee=Y[Y.length-1],ee&&Z.type==="text"&&ee.type==="text"?(ee.raw+=Z.raw,ee.text+=Z.text):Y.push(Z);continue}if(Z=this.tokenizer.link(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.reflink(H,this.tokens.links)){H=H.substring(Z.raw.length),ee=Y[Y.length-1],ee&&Z.type==="text"&&ee.type==="text"?(ee.raw+=Z.raw,ee.text+=Z.text):Y.push(Z);continue}if(Z=this.tokenizer.emStrong(H,ue,ve)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.codespan(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.br(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.del(H)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.autolink(H,V)){H=H.substring(Z.raw.length),Y.push(Z);continue}if(!this.state.inLink&&(Z=this.tokenizer.url(H,V))){H=H.substring(Z.raw.length),Y.push(Z);continue}if(le=H,this.options.extensions&&this.options.extensions.startInline&&function(){var _e=1/0,Ee=H.slice(1),Ae=void 0;j.options.extensions.startInline.forEach(function(xe){Ae=xe.call({lexer:this},Ee),typeof Ae=="number"&&Ae>=0&&(_e=Math.min(_e,Ae))}),_e<1/0&&_e>=0&&(le=H.substring(0,_e+1))}(),Z=this.tokenizer.inlineText(le,W)){H=H.substring(Z.raw.length),Z.raw.slice(-1)!=="_"&&(ve=Z.raw.slice(-1)),pe=!0,ee=Y[Y.length-1],ee&&ee.type==="text"?(ee.raw+=Z.raw,ee.text+=Z.text):Y.push(Z);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 Y},L(U,null,[{key:"rules",get:function(){return{block:O,inline:B}}}]),U}(),F=function(){function U(z){this.options=z||te.defaults}var G=U.prototype;return G.code=function(H,Y,j){var Z=(Y||"").match(/\S*/)[0];if(this.options.highlight){var ee=this.options.highlight(H,Z);ee!=null&&ee!==H&&(j=!0,H=ee)}return H=H.replace(/\n$/,"")+`
|
||
`,Z?'<pre><code class="'+this.options.langPrefix+t(Z,!0)+'">'+(j?H:t(H,!0))+`</code></pre>
|
||
`:"<pre><code>"+(j?H:t(H,!0))+`</code></pre>
|
||
`},G.blockquote=function(H){return`<blockquote>
|
||
`+H+`</blockquote>
|
||
`},G.html=function(H){return H},G.heading=function(H,Y,j,Z){if(this.options.headerIds){var ee=this.options.headerPrefix+Z.slug(j);return"<h"+Y+' id="'+ee+'">'+H+"</h"+Y+`>
|
||
`}return"<h"+Y+">"+H+"</h"+Y+`>
|
||
`},G.hr=function(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`},G.list=function(H,Y,j){var Z=Y?"ol":"ul",ee=Y&&j!==1?' start="'+j+'"':"";return"<"+Z+ee+`>
|
||
`+H+"</"+Z+`>
|
||
`},G.listitem=function(H){return"<li>"+H+`</li>
|
||
`},G.checkbox=function(H){return"<input "+(H?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},G.paragraph=function(H){return"<p>"+H+`</p>
|
||
`},G.table=function(H,Y){return Y&&(Y="<tbody>"+Y+"</tbody>"),`<table>
|
||
<thead>
|
||
`+H+`</thead>
|
||
`+Y+`</table>
|
||
`},G.tablerow=function(H){return`<tr>
|
||
`+H+`</tr>
|
||
`},G.tablecell=function(H,Y){var j=Y.header?"th":"td",Z=Y.align?"<"+j+' align="'+Y.align+'">':"<"+j+">";return Z+H+("</"+j+`>
|
||
`)},G.strong=function(H){return"<strong>"+H+"</strong>"},G.em=function(H){return"<em>"+H+"</em>"},G.codespan=function(H){return"<code>"+H+"</code>"},G.br=function(){return this.options.xhtml?"<br/>":"<br>"},G.del=function(H){return"<del>"+H+"</del>"},G.link=function(H,Y,j){if(H=l(this.options.sanitize,this.options.baseUrl,H),H===null)return j;var Z='<a href="'+t(H)+'"';return Y&&(Z+=' title="'+Y+'"'),Z+=">"+j+"</a>",Z},G.image=function(H,Y,j){if(H=l(this.options.sanitize,this.options.baseUrl,H),H===null)return j;var Z='<img src="'+H+'" alt="'+j+'"';return Y&&(Z+=' title="'+Y+'"'),Z+=this.options.xhtml?"/>":">",Z},G.text=function(H){return H},U}(),q=function(){function U(){}var G=U.prototype;return G.strong=function(H){return H},G.em=function(H){return H},G.codespan=function(H){return H},G.del=function(H){return H},G.html=function(H){return H},G.text=function(H){return H},G.link=function(H,Y,j){return""+j},G.image=function(H,Y,j){return""+j},G.br=function(){return""},U}(),ie=function(){function U(){this.seen={}}var G=U.prototype;return G.serialize=function(H){return H.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},G.getNextSafeSlug=function(H,Y){var j=H,Z=0;if(this.seen.hasOwnProperty(j)){Z=this.seen[H];do Z++,j=H+"-"+Z;while(this.seen.hasOwnProperty(j))}return Y||(this.seen[H]=Z,this.seen[j]=0),j},G.slug=function(H,Y){Y===void 0&&(Y={});var j=this.serialize(H);return this.getNextSafeSlug(j,Y.dryrun)},U}(),ae=function(){function U(z){this.options=z||te.defaults,this.options.renderer=this.options.renderer||new F,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new q,this.slugger=new ie}U.parse=function(H,Y){var j=new U(Y);return j.parse(H)},U.parseInline=function(H,Y){var j=new U(Y);return j.parseInline(H)};var G=U.prototype;return G.parse=function(H,Y){Y===void 0&&(Y=!0);var j="",Z,ee,le,ue,ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be,De,Ie,fe,be,Ne,Pe=H.length;for(Z=0;Z<Pe;Z++){if(_e=H[Z],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[_e.type]&&(Ne=this.options.extensions.renderers[_e.type].call({parser:this},_e),Ne!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(_e.type))){j+=Ne||"";continue}switch(_e.type){case"space":continue;case"hr":{j+=this.renderer.hr();continue}case"heading":{j+=this.renderer.heading(this.parseInline(_e.tokens),_e.depth,u(this.parseInline(_e.tokens,this.textRenderer)),this.slugger);continue}case"code":{j+=this.renderer.code(_e.text,_e.lang,_e.escaped);continue}case"table":{for(Ce="",ve="",ue=_e.header.length,ee=0;ee<ue;ee++)ve+=this.renderer.tablecell(this.parseInline(_e.header[ee].tokens),{header:!0,align:_e.align[ee]});for(Ce+=this.renderer.tablerow(ve),Se="",ue=_e.rows.length,ee=0;ee<ue;ee++){for(pe=_e.rows[ee],ve="",ce=pe.length,le=0;le<ce;le++)ve+=this.renderer.tablecell(this.parseInline(pe[le].tokens),{header:!1,align:_e.align[le]});Se+=this.renderer.tablerow(ve)}j+=this.renderer.table(Ce,Se);continue}case"blockquote":{Se=this.parse(_e.tokens),j+=this.renderer.blockquote(Se);continue}case"list":{for(Ee=_e.ordered,Ae=_e.start,xe=_e.loose,ue=_e.items.length,Se="",ee=0;ee<ue;ee++)De=_e.items[ee],Ie=De.checked,fe=De.task,Be="",De.task&&(be=this.renderer.checkbox(Ie),xe?De.tokens.length>0&&De.tokens[0].type==="paragraph"?(De.tokens[0].text=be+" "+De.tokens[0].text,De.tokens[0].tokens&&De.tokens[0].tokens.length>0&&De.tokens[0].tokens[0].type==="text"&&(De.tokens[0].tokens[0].text=be+" "+De.tokens[0].tokens[0].text)):De.tokens.unshift({type:"text",text:be}):Be+=be),Be+=this.parse(De.tokens,xe),Se+=this.renderer.listitem(Be,fe,Ie);j+=this.renderer.list(Se,Ee,Ae);continue}case"html":{j+=this.renderer.html(_e.text);continue}case"paragraph":{j+=this.renderer.paragraph(this.parseInline(_e.tokens));continue}case"text":{for(Se=_e.tokens?this.parseInline(_e.tokens):_e.text;Z+1<Pe&&H[Z+1].type==="text";)_e=H[++Z],Se+=`
|
||
`+(_e.tokens?this.parseInline(_e.tokens):_e.text);j+=Y?this.renderer.paragraph(Se):Se;continue}default:{var ze='Token with "'+_e.type+'" type was not found.';if(this.options.silent){console.error(ze);return}else throw new Error(ze)}}}return j},G.parseInline=function(H,Y){Y=Y||this.renderer;var j="",Z,ee,le,ue=H.length;for(Z=0;Z<ue;Z++){if(ee=H[Z],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ee.type]&&(le=this.options.extensions.renderers[ee.type].call({parser:this},ee),le!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ee.type))){j+=le||"";continue}switch(ee.type){case"escape":{j+=Y.text(ee.text);break}case"html":{j+=Y.html(ee.text);break}case"link":{j+=Y.link(ee.href,ee.title,this.parseInline(ee.tokens,Y));break}case"image":{j+=Y.image(ee.href,ee.title,ee.text);break}case"strong":{j+=Y.strong(this.parseInline(ee.tokens,Y));break}case"em":{j+=Y.em(this.parseInline(ee.tokens,Y));break}case"codespan":{j+=Y.codespan(ee.text);break}case"br":{j+=Y.br();break}case"del":{j+=Y.del(this.parseInline(ee.tokens,Y));break}case"text":{j+=Y.text(ee.text);break}default:{var ce='Token with "'+ee.type+'" type was not found.';if(this.options.silent){console.error(ce);return}else throw new Error(ce)}}}return j},U}();function ne(U,G,z){if(typeof U>"u"||U===null)throw new Error("marked(): input parameter is undefined or null");if(typeof U!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(U)+", string expected");if(typeof G=="function"&&(z=G,G=null),G=D({},ne.defaults,G||{}),P(G),z){var H=G.highlight,Y;try{Y=K.lex(U,G)}catch(ue){return z(ue)}var j=function(ce){var pe;if(!ce)try{G.walkTokens&&ne.walkTokens(Y,G.walkTokens),pe=ae.parse(Y,G)}catch(ve){ce=ve}return G.highlight=H,ce?z(ce):z(null,pe)};if(!H||H.length<3||(delete G.highlight,!Y.length))return j();var Z=0;ne.walkTokens(Y,function(ue){ue.type==="code"&&(Z++,setTimeout(function(){H(ue.text,ue.lang,function(ce,pe){if(ce)return j(ce);pe!=null&&pe!==ue.text&&(ue.text=pe,ue.escaped=!0),Z--,Z===0&&j()})},0))}),Z===0&&j();return}function ee(ue){if(ue.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,G.silent)return"<p>An error occurred:</p><pre>"+t(ue.message+"",!0)+"</pre>";throw ue}try{var le=K.lex(U,G);if(G.walkTokens){if(G.async)return Promise.all(ne.walkTokens(le,G.walkTokens)).then(function(){return ae.parse(le,G)}).catch(ee);ne.walkTokens(le,G.walkTokens)}return ae.parse(le,G)}catch(ue){ee(ue)}}ne.options=ne.setOptions=function(U){return D(ne.defaults,U),p(ne.defaults),ne},ne.getDefaults=S,ne.defaults=te.defaults,ne.use=function(){for(var U=arguments.length,G=new Array(U),z=0;z<U;z++)G[z]=arguments[z];var H=D.apply(void 0,[{}].concat(G)),Y=ne.defaults.extensions||{renderers:{},childTokens:{}},j;G.forEach(function(Z){if(Z.extensions&&(j=!0,Z.extensions.forEach(function(le){if(!le.name)throw new Error("extension name required");if(le.renderer){var ue=Y.renderers?Y.renderers[le.name]:null;ue?Y.renderers[le.name]=function(){for(var ce=arguments.length,pe=new Array(ce),ve=0;ve<ce;ve++)pe[ve]=arguments[ve];var Ce=le.renderer.apply(this,pe);return Ce===!1&&(Ce=ue.apply(this,pe)),Ce}:Y.renderers[le.name]=le.renderer}if(le.tokenizer){if(!le.level||le.level!=="block"&&le.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");Y[le.level]?Y[le.level].unshift(le.tokenizer):Y[le.level]=[le.tokenizer],le.start&&(le.level==="block"?Y.startBlock?Y.startBlock.push(le.start):Y.startBlock=[le.start]:le.level==="inline"&&(Y.startInline?Y.startInline.push(le.start):Y.startInline=[le.start]))}le.childTokens&&(Y.childTokens[le.name]=le.childTokens)})),Z.renderer&&function(){var le=ne.defaults.renderer||new F,ue=function(ve){var Ce=le[ve];le[ve]=function(){for(var Se=arguments.length,_e=new Array(Se),Ee=0;Ee<Se;Ee++)_e[Ee]=arguments[Ee];var Ae=Z.renderer[ve].apply(le,_e);return Ae===!1&&(Ae=Ce.apply(le,_e)),Ae}};for(var ce in Z.renderer)ue(ce);H.renderer=le}(),Z.tokenizer&&function(){var le=ne.defaults.tokenizer||new x,ue=function(ve){var Ce=le[ve];le[ve]=function(){for(var Se=arguments.length,_e=new Array(Se),Ee=0;Ee<Se;Ee++)_e[Ee]=arguments[Ee];var Ae=Z.tokenizer[ve].apply(le,_e);return Ae===!1&&(Ae=Ce.apply(le,_e)),Ae}};for(var ce in Z.tokenizer)ue(ce);H.tokenizer=le}(),Z.walkTokens){var ee=ne.defaults.walkTokens;H.walkTokens=function(le){var ue=[];return ue.push(Z.walkTokens.call(this,le)),ee&&(ue=ue.concat(ee.call(this,le))),ue}}j&&(H.extensions=Y),ne.setOptions(H)})},ne.walkTokens=function(U,G){for(var z=[],H=function(){var ee=j.value;switch(z=z.concat(G.call(ne,ee)),ee.type){case"table":{for(var le=E(ee.header),ue;!(ue=le()).done;){var ce=ue.value;z=z.concat(ne.walkTokens(ce.tokens,G))}for(var pe=E(ee.rows),ve;!(ve=pe()).done;)for(var Ce=ve.value,Se=E(Ce),_e;!(_e=Se()).done;){var Ee=_e.value;z=z.concat(ne.walkTokens(Ee.tokens,G))}break}case"list":{z=z.concat(ne.walkTokens(ee.items,G));break}default:ne.defaults.extensions&&ne.defaults.extensions.childTokens&&ne.defaults.extensions.childTokens[ee.type]?ne.defaults.extensions.childTokens[ee.type].forEach(function(Ae){z=z.concat(ne.walkTokens(ee[Ae],G))}):ee.tokens&&(z=z.concat(ne.walkTokens(ee.tokens,G)))}},Y=E(U),j;!(j=Y()).done;)H();return z},ne.parseInline=function(U,G){if(typeof U>"u"||U===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof U!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(U)+", string expected");G=D({},ne.defaults,G||{}),P(G);try{var z=K.lexInline(U,G);return G.walkTokens&&ne.walkTokens(z,G.walkTokens),ae.parseInline(z,G)}catch(H){if(H.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,G.silent)return"<p>An error occurred:</p><pre>"+t(H.message+"",!0)+"</pre>";throw H}},ne.Parser=ae,ne.parser=ae.parse,ne.Renderer=F,ne.TextRenderer=q,ne.Lexer=K,ne.lexer=K.lex,ne.Tokenizer=x,ne.Slugger=ie,ne.parse=ne;var $=ne.options,J=ne.setOptions,Q=ne.use,re=ne.walkTokens,de=ne.parseInline,he=ne,me=ae.parse,X=K.lex;te.Lexer=K,te.Parser=ae,te.Renderer=F,te.Slugger=ie,te.TextRenderer=q,te.Tokenizer=x,te.getDefaults=S,te.lexer=X,te.marked=ne,te.options=$,te.parse=he,te.parseInline=de,te.parser=me,te.setOptions=J,te.use=Q,te.walkTokens=re,Object.defineProperty(te,"__esModule",{value:!0})}),define(se[109],oe([1,0]),function(te,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(se[198],oe([1,0,109]),function(te,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(se[401],oe([1,0]),function(te,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,S(i,_,4352),k>0||(S(i,v,4449),k>0)||(S(i,b,4520),k>0)||(S(i,a,12593),k))return y.subarray(0,k);if(i>=44032&&i<=55203){const n=i-44032,t=n%588,r=Math.floor(n/588),u=Math.floor(t/28),f=t%28-1;if(r<_.length?S(r,_,0):4352+r-12593<a.length&&S(4352+r,a,12593),u<v.length?S(u,v,0):4449+u-12593<a.length&&S(4449+u-12593,a,12593),f>=0&&(f<b.length?S(f,b,0):4520+f-12593<a.length&&S(4520+f-12593,a,12593)),k>0)return y.subarray(0,k)}}function S(i,n,t){i>=t&&i<t+n.length&&p(n[i-t])}function p(i){i!==0&&(y[k++]=i&255,i>>8&&(y[k++]=i>>8&255),i>>16&&(y[k++]=i>>16&255))}const _=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]),a=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(se[402],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class L{constructor(y,E=0,S=y.length,p=E-1){this.items=y,this.start=E,this.end=S,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(se[403],oe([1,0,402]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class k{constructor(E=[],S=10){this._initialize(E),this._limit=S,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 S of E)this._history.add(S)}get _elements(){const E=[];return this._history.forEach(S=>E.push(S)),E}}e.HistoryNavigator=k}),define(se[145],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function L(E,S,p){return Math.min(Math.max(E,S),p)}e.clamp=L;class k{constructor(){this._n=1,this._val=0}update(S){return this._val=this._val+(S-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=k;class y{constructor(S){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(S),this._values.fill(0,0,S)}update(S){const p=this._values[this._index];return this._values[this._index]=S,this._index=(this._index+1)%this._values.length,this._sum-=p,this._sum+=S,this._n<this._values.length&&(this._n+=1),this._val=this._sum/this._n,this._val}get value(){return this._val}}e.SlidingWindowAverage=y}),define(se[146],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleObservableLogger=e.getLogger=e.setLogger=void 0;let L;function k(r){L=r}e.setLogger=k;function y(){return L}e.getLogger=y;class E{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(u){return S([p(n("| ",this.indentation)),u])}formatInfo(u){return u.hadValue?u.didChange?[p(" "),v(b(u.oldValue,70),{color:"red",strikeThrough:!0}),p(" "),v(b(u.newValue,60),{color:"green"})]:[p(" (unchanged)")]:[p(" "),v(b(u.newValue,60),{color:"green"}),p(" (initial)")]}handleObservableChanged(u,f){console.log(...this.textToConsoleArgs([_("observable value changed"),v(u.debugName,{color:"BlueViolet"}),...this.formatInfo(f)]))}formatChanges(u){if(u.size!==0)return v(" (changed deps: "+[...u].map(f=>f.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([_("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([_("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([_("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([_("transaction"),v(f,{color:"BlueViolet"}),{data:[{fn:u._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=E;function S(r){const u=new Array,f=[];let c="";function d(l){if("length"in l)for(const o of l)o&&d(o);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(r);const s=[c,...u];return s.push(...f),s}function p(r){return v(r,{color:"black"})}function _(r){return v(t(`${r}: `,10),{color:"black",bold:!0})}function v(r,u={color:"black"}){function f(d){return Object.entries(d).reduce((s,[l,o])=>`${s}${l}:${o};`,"")}const c={color:u.color};return u.strikeThrough&&(c["text-decoration"]="line-through"),u.bold&&(c["font-weight"]="bold"),{text:r,style:f(c)}}function b(r,u){switch(typeof r){case"number":return""+r;case"string":return r.length+2<=u?`"${r}"`:`"${r.substr(0,u-7)}"+...`;case"boolean":return r?"true":"false";case"undefined":return"undefined";case"object":return r===null?"null":Array.isArray(r)?a(r,u):i(r,u);case"symbol":return r.toString();case"function":return`[[Function${r.name?" "+r.name:""}]]`;default:return""+r}}function a(r,u){let f="[ ",c=!0;for(const d of r){if(c||(f+=", "),f.length-5>u){f+="...";break}c=!1,f+=`${b(d,u-f.length)}`}return f+=" ]",f}function i(r,u){let f="{ ",c=!0;for(const[d,s]of Object.entries(r)){if(c||(f+=", "),f.length-5>u){f+="...";break}c=!1,f+=`${d}: ${b(s,u-f.length)}`}return f+=" }",f}function n(r,u){let f="";for(let c=1;c<=u;c++)f+=r;return f}function t(r,u){for(;r.length<u;)r+=" ";return r}}),define(se[110],oe([1,0,146]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableObservableValue=e.disposableObservableValue=e.ObservableValue=e.observableValue=e.getFunctionName=e.getDebugName=e.TransactionImpl=e.subtransaction=e.asyncTransaction=e.globalTransaction=e.transaction=e.BaseObservable=e.ConvenientObservable=e._setDerivedOpts=e._setKeepObserved=e._setRecomputeInitiallyAndOnChange=void 0;let k;function y(T){k=T}e._setRecomputeInitiallyAndOnChange=y;let E;function S(T){E=T}e._setKeepObserved=S;let p;function _(T){p=T}e._setDerivedOpts=_;class v{get TChange(){return null}reportChanges(){this.get()}read(A){return A?A.readObservable(this):this.get()}map(A,P){const N=P===void 0?void 0:A,M=P===void 0?A:P;return p({owner:N,debugName:()=>{const R=m(M);if(R!==void 0)return R;const O=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(M.toString());if(O)return`${this.debugName}.${O[2]}`;if(!N)return`${this.debugName} (mapped)`}},R=>M(this.read(R),R))}recomputeInitiallyAndOnChange(A,P){return A.add(k(this,P)),this}}e.ConvenientObservable=v;class b extends v{constructor(){super(...arguments),this.observers=new Set}addObserver(A){const P=this.observers.size;this.observers.add(A),P===0&&this.onFirstObserverAdded()}removeObserver(A){this.observers.delete(A)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=b;function a(T,A){const P=new u(T,A);try{T(P)}finally{P.finish()}}e.transaction=a;let i;function n(T){if(i)T(i);else{const A=new u(T,void 0);i=A;try{T(A)}finally{A.finish(),i=void 0}}}e.globalTransaction=n;async function t(T,A){const P=new u(T,A);try{await T(P)}finally{P.finish()}}e.asyncTransaction=t;function r(T,A,P){T?A(T):a(A,P)}e.subtransaction=r;class u{constructor(A,P){var N;this._fn=A,this._getDebugName=P,this.updatingObservers=[],(N=(0,L.getLogger)())===null||N===void 0||N.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():m(this._fn)}updateObserver(A,P){this.updatingObservers.push({observer:A,observable:P}),A.beginUpdate(P)}finish(){var A;const P=this.updatingObservers;for(let N=0;N<P.length;N++){const{observer:M,observable:R}=P[N];M.endUpdate(R)}this.updatingObservers=null,(A=(0,L.getLogger)())===null||A===void 0||A.handleEndTransaction()}}e.TransactionImpl=u;const f=new Map,c=new WeakMap;function d(T,A,P,N){var M;const R=c.get(T);if(R)return R;const x=s(T,A,P,N);if(x){let O=(M=f.get(x))!==null&&M!==void 0?M:0;O++,f.set(x,O);const B=O===1?x:`${x}#${O}`;return c.set(T,B),B}}e.getDebugName=d;function s(T,A,P,N){const M=c.get(T);if(M)return M;const R=N?g(N)+".":"";let x;if(A!==void 0)if(typeof A=="function"){if(x=A(),x!==void 0)return R+x}else return R+A;if(P!==void 0&&(x=m(P),x!==void 0))return R+x;if(N!==void 0){for(const O in N)if(N[O]===T)return R+O}}const l=new Map,o=new WeakMap;function g(T){var A;const P=o.get(T);if(P)return P;const N=h(T);let M=(A=l.get(N))!==null&&A!==void 0?A:0;M++,l.set(N,M);const R=M===1?N:`${N}#${M}`;return o.set(T,R),R}function h(T){const A=T.constructor;return A?A.name:"Object"}function m(T){const A=T.toString(),N=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(A),M=N?N[1]:void 0;return M?.trim()}e.getFunctionName=m;function C(T,A){return typeof T=="string"?new w(void 0,T,A):new w(T,void 0,A)}e.observableValue=C;class w extends b{get debugName(){var A;return(A=d(this,this._debugName,void 0,this._owner))!==null&&A!==void 0?A:"ObservableValue"}constructor(A,P,N){super(),this._owner=A,this._debugName=P,this._value=N}get(){return this._value}set(A,P,N){var M;if(this._value===A)return;let R;P||(P=R=new u(()=>{},()=>`Setting ${this.debugName}`));try{const x=this._value;this._setValue(A),(M=(0,L.getLogger)())===null||M===void 0||M.handleObservableChanged(this,{oldValue:x,newValue:A,change:N,didChange:!0,hadValue:!0});for(const O of this.observers)P.updateObserver(O,this),O.handleChange(this,N)}finally{R&&R.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(A){this._value=A}}e.ObservableValue=w;function D(T,A){return typeof T=="string"?new I(void 0,T,A):new I(T,void 0,A)}e.disposableObservableValue=D;class I extends w{_setValue(A){this._value!==A&&(this._value&&this._value.dispose(),this._value=A)}dispose(){var A;(A=this._value)===null||A===void 0||A.dispose()}}e.DisposableObservableValue=I}),define(se[269],oe([1,0,90,2,110,146]),function(te,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 S(a){return new b(void 0,a,void 0,void 0)}e.autorun=S;function p(a,i){return new b(a.debugName,i,void 0,void 0)}e.autorunOpts=p;function _(a,i){return new b(a.debugName,i,a.createEmptyChangeSummary,a.handleChange)}e.autorunHandleChanges=_;function v(a){const i=new k.DisposableStore,n=p({debugName:()=>(0,y.getFunctionName)(a)||"(anonymous)"},t=>{i.clear(),a(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,r){var u,f;this._debugName=i,this._runFn=n,this.createChangeSummary=t,this._handleChange=r,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 r=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=r,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:r=>r===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(a){a.Observer=b}(S||(e.autorun=S={}))}),define(se[171],oe([1,0,90,2,110,146]),function(te,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 S=(n,t)=>n===t;function p(n,t){return t!==void 0?new i(n,void 0,t,void 0,void 0,void 0,S):new i(void 0,void 0,n,void 0,void 0,void 0,S)}e.derived=p;function _(n,t){var r;return new i(n.owner,n.debugName,t,void 0,void 0,n.onLastObserverRemoved,(r=n.equalityComparer)!==null&&r!==void 0?r:S)}e.derivedOpts=_;function v(n,t){var r;return new i(n.owner,n.debugName,t,n.createEmptyChangeSummary,n.handleChange,void 0,(r=n.equalityComparer)!==null&&r!==void 0?r:S)}e.derivedHandleChanges=v;function b(n,t){let r,u;t===void 0?(r=n,u=void 0):(u=n,r=t);const f=new k.DisposableStore;return new i(u,()=>{var c;return(c=(0,y.getFunctionName)(r))!==null&&c!==void 0?c:"(anonymous)"},c=>(f.clear(),r(c,f)),void 0,void 0,()=>f.dispose(),S)}e.derivedWithStore=b;function a(n,t){let r,u;t===void 0?(r=n,u=void 0):(u=n,r=t);const f=new k.DisposableStore;return new i(u,()=>{var c;return(c=(0,y.getFunctionName)(r))!==null&&c!==void 0?c:"(anonymous)"},c=>{f.clear();const d=r(c);return d&&f.add(d),d},void 0,void 0,()=>f.dispose(),S)}e.derivedDisposable=a,(0,y._setDerivedOpts)(_);class i extends y.BaseObservable{get debugName(){var t;return(t=(0,y.getDebugName)(this,this._debugName,this._computeFn,this._owner))!==null&&t!==void 0?t:"(anonymous)"}constructor(t,r,u,f,c,d=void 0,s){var l,o;super(),this._owner=t,this._debugName=r,this._computeFn=u,this.createChangeSummary=f,this._handleChange=c,this._handleLastObserverRemoved=d,this._equalityComparator=s,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),(o=(0,E.getLogger)())===null||o===void 0||o.handleDerivedCreated(this)}onLastObserverRemoved(){var t;this.state=0,this.value=void 0;for(const r of this.dependencies)r.removeObserver(this);this.dependencies.clear(),(t=this._handleLastObserverRemoved)===null||t===void 0||t.call(this)}get(){var t;if(this.observers.size===0){const r=this._computeFn(this,(t=this.createChangeSummary)===null||t===void 0?void 0:t.call(this));return this.onLastObserverRemoved(),r}else{do{if(this.state===1){for(const r of this.dependencies)if(r.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var t,r;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 s=f&&!this._equalityComparator(c,this.value);if((r=(0,E.getLogger)())===null||r===void 0||r.handleDerivedRecomputed(this,{oldValue:c,newValue:this.value,change:void 0,didChange:s,hadValue:f}),s)for(const l of this.observers)l.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(t){this.updateCount++;const r=this.updateCount===1;if(this.state===3&&(this.state=1,!r))for(const u of this.observers)u.handlePossibleChange(this);if(r)for(const u of this.observers)u.beginUpdate(this)}endUpdate(t){if(this.updateCount--,this.updateCount===0){const r=[...this.observers];for(const u of r)u.endUpdate(this)}(0,L.assertFn)(()=>this.updateCount>=0)}handlePossibleChange(t){if(this.state===3&&this.dependencies.has(t)&&!this.dependenciesToBeRemoved.has(t)){this.state=1;for(const r of this.observers)r.handlePossibleChange(this)}}handleChange(t,r){if(this.dependencies.has(t)&&!this.dependenciesToBeRemoved.has(t)){const u=this._handleChange?this._handleChange({changedObservable:t,change:r,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 r=t.get();return this.dependencies.add(t),this.dependenciesToBeRemoved.delete(t),r}addObserver(t){const r=!this.observers.has(t)&&this.updateCount>0;super.addObserver(t),r&&t.beginUpdate(this)}removeObserver(t){const r=this.observers.has(t)&&this.updateCount>0;super.removeObserver(t),r&&t.endUpdate(this)}}e.Derived=i}),define(se[404],oe([1,0,2,269,110,171,146]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapObservableArrayCached=e.derivedObservableWithCache=e.recomputeInitiallyAndOnChange=e.keepObserved=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.waitForState=e.constObservable=void 0;function p(o){return new _(o)}e.constObservable=p;class _ extends y.ConvenientObservable{constructor(g){super(),this.value=g}get debugName(){return this.toString()}get(){return this.value}addObserver(g){}removeObserver(g){}toString(){return`Const: ${this.value}`}}function v(o,g){return new Promise(h=>{let m=!1,C=!1;const w=o.map(I=>({isFinished:g(I),state:I})),D=(0,k.autorun)(I=>{const{isFinished:T,state:A}=w.read(I);T&&(m?D.dispose():C=!0,h(A))});m=!0,C&&D.dispose()})}e.waitForState=v;function b(o,g){return new a(o,g)}e.observableFromEvent=b;class a extends y.BaseObservable{constructor(g,h){super(),this.event=g,this._getValue=h,this.hasValue=!1,this.handleEvent=m=>{var C;const w=this._getValue(m),D=this.value,I=!this.hasValue||D!==w;let T=!1;I&&(this.value=w,this.hasValue&&(T=!0,(0,y.subtransaction)(a.globalTransaction,A=>{var P;(P=(0,S.getLogger)())===null||P===void 0||P.handleFromEventObservableTriggered(this,{oldValue:D,newValue:w,change:void 0,didChange:I,hadValue:this.hasValue});for(const N of this.observers)A.updateObserver(N,this),N.handleChange(this,void 0)},()=>{const A=this.getDebugName();return"Event fired"+(A?`: ${A}`:"")})),this.hasValue=!0),T||(C=(0,S.getLogger)())===null||C===void 0||C.handleFromEventObservableTriggered(this,{oldValue:D,newValue:w,change:void 0,didChange:I,hadValue:this.hasValue})}}getDebugName(){return(0,y.getFunctionName)(this._getValue)}get debugName(){const g=this.getDebugName();return"From Event"+(g?`: ${g}`:"")}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=a,function(o){o.Observer=a;function g(h,m){let C=!1;a.globalTransaction===void 0&&(a.globalTransaction=h,C=!0);try{m()}finally{C&&(a.globalTransaction=void 0)}}o.batchEventsGlobally=g}(b||(e.observableFromEvent=b={}));function i(o,g){return new n(o,g)}e.observableSignalFromEvent=i;class n extends y.BaseObservable{constructor(g,h){super(),this.debugName=g,this.event=h,this.handleEvent=()=>{(0,y.transaction)(m=>{for(const C of this.observers)m.updateObserver(C,this),C.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function t(o){return typeof o=="string"?new r(o):new r(void 0,o)}e.observableSignal=t;class r extends y.BaseObservable{get debugName(){var g;return(g=(0,y.getDebugName)(this,this._debugName,void 0,this._owner))!==null&&g!==void 0?g:"Observable Signal"}constructor(g,h){super(),this._debugName=g,this._owner=h}trigger(g,h){if(!g){(0,y.transaction)(m=>{this.trigger(m,h)},()=>`Trigger signal ${this.debugName}`);return}for(const m of this.observers)g.updateObserver(m,this),m.handleChange(this,h)}get(){}}function u(o){const g=new c(!1,void 0);return o.addObserver(g),(0,L.toDisposable)(()=>{o.removeObserver(g)})}e.keepObserved=u,(0,y._setKeepObserved)(u);function f(o,g){const h=new c(!0,g);return o.addObserver(h),g?g(o.get()):o.reportChanges(),(0,L.toDisposable)(()=>{o.removeObserver(h)})}e.recomputeInitiallyAndOnChange=f,(0,y._setRecomputeInitiallyAndOnChange)(f);class c{constructor(g,h){this._forceRecompute=g,this._handleValue=h,this._counter=0}beginUpdate(g){this._counter++}endUpdate(g){this._counter--,this._counter===0&&this._forceRecompute&&(this._handleValue?this._handleValue(g.get()):g.reportChanges())}handlePossibleChange(g){}handleChange(g,h){}}function d(o){let g;return(0,E.derived)(m=>(g=o(m,g),g))}e.derivedObservableWithCache=d;function s(o,g,h,m){let C=new l(h,m);return(0,E.derivedOpts)({debugName:()=>(0,y.getDebugName)(C,void 0,h,o),owner:o,onLastObserverRemoved:()=>{C.dispose(),C=new l(h)}},D=>(C.setItems(g.read(D)),C.getItems()))}e.mapObservableArrayCached=s;class l{constructor(g,h){this._map=g,this._keySelector=h,this._cache=new Map,this._items=[]}dispose(){this._cache.forEach(g=>g.store.dispose()),this._cache.clear()}setItems(g){const h=[],m=new Set(this._cache.keys());for(const C of g){const w=this._keySelector?this._keySelector(C):C;let D=this._cache.get(w);if(D)m.delete(w);else{const I=new L.DisposableStore;D={out:this._map(C,I),store:I},this._cache.set(w,D)}h.push(D.out)}for(const C of m)this._cache.get(C).store.dispose(),this._cache.delete(C);this._items=h}getItems(){return this._items}}}),define(se[35],oe([1,0,110,171,269,404,146]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.waitForState=e.observableSignalFromEvent=e.observableSignal=e.observableFromEvent=e.recomputeInitiallyAndOnChange=e.keepObserved=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,"keepObserved",{enumerable:!0,get:function(){return E.keepObserved}}),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,S.setLogger)(new S.ConsoleObservableLogger)}),define(se[172],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var L;(function(k){function y(_,v){if(_.start>=v.end||v.start>=_.end)return{start:0,end:0};const b=Math.max(_.start,v.start),a=Math.min(_.end,v.end);return a-b<=0?{start:0,end:0}:{start:b,end:a}}k.intersect=y;function E(_){return _.end-_.start<=0}k.isEmpty=E;function S(_,v){return!E(y(_,v))}k.intersects=S;function p(_,v){const b=[],a={start:_.start,end:Math.min(v.start,_.end)},i={start:Math.max(v.end,_.start),end:_.end};return E(a)||b.push(a),E(i)||b.push(i),b}k.relativeComplement=p})(L||(e.Range=L={}))}),define(se[405],oe([1,0,172]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function k(_,v){const b=[];for(const a of v){if(_.start>=a.range.end)continue;if(_.end<a.range.start)break;const i=L.Range.intersect(_,a.range);L.Range.isEmpty(i)||b.push({range:i,size:a.size})}return b}e.groupIntersect=k;function y({start:_,end:v},b){return{start:_+b,end:v+b}}e.shift=y;function E(_){const v=[];let b=null;for(const a of _){const i=a.range.start,n=a.range.end,t=a.size;if(b&&t===b.size){b.range.end=n;continue}b={range:{start:i,end:n},size:t},v.push(b)}return v}e.consolidate=E;function S(..._){return E(_.reduce((v,b)=>v.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,a=[]){const i=a.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})),r=a.map((u,f)=>({range:{start:v+f,end:v+f+1},size:u.size}));this.groups=S(n,r,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(v<this._paddingTop)return 0;let b=0,a=this._paddingTop;for(const i of this.groups){const n=i.range.end-i.range.start,t=a+n*i.size;if(v<t)return b+Math.floor((v-a)/i.size);b+=n,a=t}return b}indexAfter(v){return Math.min(this.indexAt(v)+1,this.count)}positionAt(v){if(v<0)return-1;let b=0,a=0;for(const i of this.groups){const n=i.range.end-i.range.start,t=a+n;if(v<t)return this._paddingTop+b+(v-a)*i.size;b+=n*i.size,a=t}return-1}}e.RangeMap=p}),define(se[61],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const L=globalThis.performance&&typeof globalThis.performance.now=="function";class k{static create(E){return new k(E)}constructor(E){this._now=L&&E===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}e.StopWatch=k}),define(se[6],oe([1,0,12,108,2,66,61]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Relay=e.EventBufferer=e.EventMultiplexer=e.MicrotaskEmitter=e.DebounceEmitter=e.PauseableEmitter=e.createEventDeliveryQueue=e.Emitter=e.EventProfiling=e.Event=void 0;const p=!1,_=!1;var v;(function(C){C.None=()=>y.Disposable.None;function w(X){if(_){const{onDidAddListener:U}=X,G=n.create();let z=0;X.onDidAddListener=()=>{++z===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),G.print()),U?.()}}}function D(X,U){return B(X,()=>{},0,void 0,!0,void 0,U)}C.defer=D;function I(X){return(U,G=null,z)=>{let H=!1,Y;return Y=X(j=>{if(!H)return Y?Y.dispose():H=!0,U.call(G,j)},null,z),H&&Y.dispose(),Y}}C.once=I;function T(X,U,G){return x((z,H=null,Y)=>X(j=>z.call(H,U(j)),null,Y),G)}C.map=T;function A(X,U,G){return x((z,H=null,Y)=>X(j=>{U(j),z.call(H,j)},null,Y),G)}C.forEach=A;function P(X,U,G){return x((z,H=null,Y)=>X(j=>U(j)&&z.call(H,j),null,Y),G)}C.filter=P;function N(X){return X}C.signal=N;function M(...X){return(U,G=null,z)=>{const H=(0,y.combinedDisposable)(...X.map(Y=>Y(j=>U.call(G,j))));return O(H,z)}}C.any=M;function R(X,U,G,z){let H=G;return T(X,Y=>(H=U(H,Y),H),z)}C.reduce=R;function x(X,U){let G;const z={onWillAddFirstListener(){G=X(H.fire,H)},onDidRemoveLastListener(){G?.dispose()}};U||w(z);const H=new f(z);return U?.add(H),H.event}function O(X,U){return U instanceof Array?U.push(X):U&&U.add(X),X}function B(X,U,G=100,z=!1,H=!1,Y,j){let Z,ee,le,ue=0,ce;const pe={leakWarningThreshold:Y,onWillAddFirstListener(){Z=X(Ce=>{ue++,ee=U(ee,Ce),z&&!le&&(ve.fire(ee),ee=void 0),ce=()=>{const Se=ee;ee=void 0,le=void 0,(!z||ue>1)&&ve.fire(Se),ue=0},typeof G=="number"?(clearTimeout(le),le=setTimeout(ce,G)):le===void 0&&(le=0,queueMicrotask(ce))})},onWillRemoveListener(){H&&ue>0&&ce?.()},onDidRemoveLastListener(){ce=void 0,Z.dispose()}};j||w(pe);const ve=new f(pe);return j?.add(ve),ve.event}C.debounce=B;function W(X,U=0,G){return C.debounce(X,(z,H)=>z?(z.push(H),z):[H],U,void 0,!0,void 0,G)}C.accumulate=W;function V(X,U=(z,H)=>z===H,G){let z=!0,H;return P(X,Y=>{const j=z||!U(Y,H);return z=!1,H=Y,j},G)}C.latch=V;function K(X,U,G){return[C.filter(X,U,G),C.filter(X,z=>!U(z),G)]}C.split=K;function F(X,U=!1,G=[],z){let H=G.slice(),Y=X(ee=>{H?H.push(ee):Z.fire(ee)});z&&z.add(Y);const j=()=>{H?.forEach(ee=>Z.fire(ee)),H=null},Z=new f({onWillAddFirstListener(){Y||(Y=X(ee=>Z.fire(ee)),z&&z.add(Y))},onDidAddFirstListener(){H&&(U?setTimeout(j):j())},onDidRemoveLastListener(){Y&&Y.dispose(),Y=null}});return z&&z.add(Z),Z.event}C.buffer=F;function q(X,U){return(z,H,Y)=>{const j=U(new ae);return X(function(Z){const ee=j.evaluate(Z);ee!==ie&&z.call(H,ee)},void 0,Y)}}C.chain=q;const ie=Symbol("HaltChainable");class ae{constructor(){this.steps=[]}map(U){return this.steps.push(U),this}forEach(U){return this.steps.push(G=>(U(G),G)),this}filter(U){return this.steps.push(G=>U(G)?G:ie),this}reduce(U,G){let z=G;return this.steps.push(H=>(z=U(z,H),z)),this}latch(U=(G,z)=>G===z){let G=!0,z;return this.steps.push(H=>{const Y=G||!U(H,z);return G=!1,z=H,Y?H:ie}),this}evaluate(U){for(const G of this.steps)if(U=G(U),U===ie)break;return U}}function ne(X,U,G=z=>z){const z=(...Z)=>j.fire(G(...Z)),H=()=>X.on(U,z),Y=()=>X.removeListener(U,z),j=new f({onWillAddFirstListener:H,onDidRemoveLastListener:Y});return j.event}C.fromNodeEventEmitter=ne;function $(X,U,G=z=>z){const z=(...Z)=>j.fire(G(...Z)),H=()=>X.addEventListener(U,z),Y=()=>X.removeEventListener(U,z),j=new f({onWillAddFirstListener:H,onDidRemoveLastListener:Y});return j.event}C.fromDOMEventEmitter=$;function J(X){return new Promise(U=>I(X)(U))}C.toPromise=J;function Q(X){const U=new f;return X.then(G=>{U.fire(G)},()=>{U.fire(void 0)}).finally(()=>{U.dispose()}),U.event}C.fromPromise=Q;function re(X,U,G){return U(G),X(z=>U(z))}C.runAndSubscribe=re;class de{constructor(U,G){this._observable=U,this._counter=0,this._hasChanged=!1;const z={onWillAddFirstListener:()=>{U.addObserver(this)},onDidRemoveLastListener:()=>{U.removeObserver(this)}};G||w(z),this.emitter=new f(z),G&&G.add(this.emitter)}beginUpdate(U){this._counter++}handlePossibleChange(U){}handleChange(U,G){this._hasChanged=!0}endUpdate(U){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function he(X,U){return new de(X,U).emitter.event}C.fromObservable=he;function me(X){return(U,G,z)=>{let H=0,Y=!1;const j={beginUpdate(){H++},endUpdate(){H--,H===0&&(X.reportChanges(),Y&&(Y=!1,U.call(G)))},handlePossibleChange(){},handleChange(){Y=!0}};X.addObserver(j),X.reportChanges();const Z={dispose(){X.removeObserver(j)}};return z instanceof y.DisposableStore?z.add(Z):Array.isArray(z)&&z.push(Z),Z}}C.fromObservableLight=me})(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 S.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 a=-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<I)return;this._stacks||(this._stacks=new Map);const T=this._stacks.get(w.value)||0;if(this._stacks.set(w.value,T+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=I*.5;let A,P=0;for(const[N,M]of this._stacks)(!A||P<M)&&(A=N,P=M);console.warn(`[${this.name}] potential listener LEAK detected, having ${D} listeners already. MOST frequent listener (${P}):`),console.warn(A)}return()=>{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 r=2,u=(C,w)=>{if(C instanceof t)w(C);else for(let D=0;D<C.length;D++){const I=C[D];I&&w(I)}};class f{constructor(w){var D,I,T,A,P;this._size=0,this._options=w,this._leakageMon=a>0||!((D=this._options)===null||D===void 0)&&D.leakWarningThreshold?new i((T=(I=this._options)===null||I===void 0?void 0:I.leakWarningThreshold)!==null&&T!==void 0?T:a):void 0,this._perfMon=!((A=this._options)===null||A===void 0)&&A._profName?new b(this._options._profName):void 0,this._deliveryQueue=(P=this._options)===null||P===void 0?void 0:P.deliveryQueue}dispose(){var w,D,I,T;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,P=>{var N;return(N=P.stack)===null||N===void 0?void 0:N.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),(T=this._leakageMon)===null||T===void 0||T.dispose()}}get event(){var w;return(w=this._event)!==null&&w!==void 0||(this._event=(D,I,T)=>{var A,P,N,M,R;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 O,B;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(x.stack=n.create(),O=this._leakageMon.check(x.stack,this._size+1)),p&&(x.stack=B??n.create()),this._listeners?this._listeners instanceof t?((R=this._deliveryQueue)!==null&&R!==void 0||(this._deliveryQueue=new d),this._listeners=[this._listeners,x]):this._listeners.push(x):((P=(A=this._options)===null||A===void 0?void 0:A.onWillAddFirstListener)===null||P===void 0||P.call(A,this),this._listeners=x,(M=(N=this._options)===null||N===void 0?void 0:N.onDidAddFirstListener)===null||M===void 0||M.call(N,this)),this._size++;const W=(0,y.toDisposable)(()=>{O?.(),this._removeListener(x)});return T instanceof y.DisposableStore?T.add(W):Array.isArray(T)&&T.push(W),W}),this._event}_removeListener(w){var D,I,T,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=(T=this._options)===null||T===void 0?void 0:T.onDidRemoveLastListener)===null||A===void 0||A.call(T,this),this._size=0;return}const P=this._listeners,N=P.indexOf(w);if(N===-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--,P[N]=void 0;const M=this._deliveryQueue.current===this;if(this._size*r<=P.length){let R=0;for(let x=0;x<P.length;x++)P[x]?P[R++]=P[x]:M&&(this._deliveryQueue.end--,R<this._deliveryQueue.i&&this._deliveryQueue.i--);P.length=R}}_deliver(w,D){var I;if(!w)return;const T=((I=this._options)===null||I===void 0?void 0:I.onListenerError)||L.onUnexpectedError;if(!T){w.value(D);return}try{w.value(D)}catch(A){T(A)}}_deliverQueue(w){const D=w.current._listeners;for(;w.i<w.end;)this._deliver(D[w.i++],w.value);w.reset()}fire(w){var D,I,T,A;if(!((D=this._deliveryQueue)===null||D===void 0)&&D.current&&(this._deliverQueue(this._deliveryQueue),(I=this._perfMon)===null||I===void 0||I.stop()),(T=this._perfMon)===null||T===void 0||T.start(this._size),this._listeners)if(this._listeners instanceof t)this._deliver(this._listeners,w);else{const P=this._deliveryQueue;P.enqueue(this,w,this._listeners.length),this._deliverQueue(P)}(A=this._perfMon)===null||A===void 0||A.stop()}hasListeners(){return this._size>0}}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 s 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=s;class l extends s{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 o 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=o;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 T=this.events.indexOf(D);this.events.splice(T,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,T)=>w(A=>{const P=this.buffers[this.buffers.length-1];P?P.push(()=>D.call(I,A)):D.call(I,A)},void 0,T)}bufferEvents(w){const D=[];this.buffers.push(D);const I=w();return this.buffers.pop(),D.forEach(T=>T()),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(se[54],oe([1,0,44,6,2]),function(te,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.mapWindowIdToZoomFactor=new Map}getZoomFactor(r){var u;return(u=this.mapWindowIdToZoomFactor.get(this.getWindowId(r)))!==null&&u!==void 0?u:1}getWindowId(r){return r.vscodeWindowId}}E.INSTANCE=new E;class S 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(r){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),r&&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 r=this._register(new S);this._register(r.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const r=document.createElement("canvas").getContext("2d"),u=L.$window.devicePixelRatio||1,f=r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return u/f}}class _{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,r,u){typeof r=="string"&&(r=t.matchMedia(r)),r.addEventListener("change",u)}e.addMatchMediaChangeListener=v,e.PixelRatio=new _;function b(t){return E.INSTANCE.getZoomFactor(t)}e.getZoomFactor=b;const a=navigator.userAgent;e.isFirefox=a.indexOf("Firefox")>=0,e.isWebKit=a.indexOf("AppleWebKit")>=0,e.isChrome=a.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&a.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=a.indexOf("Electron/")>=0,e.isAndroid=a.indexOf("Android")>=0;let i=!1;if(typeof L.mainWindow.matchMedia=="function"){const t=L.mainWindow.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),r=L.mainWindow.matchMedia("(display-mode: fullscreen)");i=t.matches,v(L.mainWindow,t,({matches:u})=>{i&&r.matches||(i=u)})}function n(){return i}e.isStandalone=n}),define(se[84],oe([1,0,6]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class k{get event(){return this.emitter.event}constructor(E,S,p){const _=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(se[19],oe([1,0,6]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const k=Object.freeze(function(p,_){const v=setTimeout(p.bind(_),0);return{dispose(){clearTimeout(v)}}});var y;(function(p){function _(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=_,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 S{constructor(_){this._token=void 0,this._parentListener=void 0,this._parentListener=_&&_.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(_=!1){var v;_&&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=S}),define(se[270],oe([1,0,6]),function(te,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(se[147],oe([1,0,6,2]),function(te,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,r,u,f,c,d){this._forceIntegerValues=n,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,r=r|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>r&&(u=r-t),u<0&&(u=0),f<0&&(f=0),d+f>c&&(d=c-f),d<0&&(d=0),this.width=t,this.scrollWidth=r,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 r=this.width!==n.width,u=this.scrollWidth!==n.scrollWidth,f=this.scrollLeft!==n.scrollLeft,c=this.height!==n.height,d=this.scrollHeight!==n.scrollHeight,s=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:r,scrollWidthChanged:u,scrollLeftChanged:f,heightChanged:c,scrollHeightChanged:d,scrollTopChanged:s}}}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 r;const u=this._state.withScrollDimensions(n,t);this._setState(u,!!this._smoothScrolling),(r=this._smoothScrolling)===null||r===void 0||r.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 r=this._state.withScrollPosition(n);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let u;t?u=new v(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):u=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=u}else{const r=this._state.withScrollPosition(n);this._smoothScrolling=v.start(this._state,r,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 r=this._state;r.equals(n)||(this._state=n,this._onScroll.fire(this._state.createScrollEvent(r,t)))}}e.Scrollable=E;class S{constructor(n,t,r){this.scrollLeft=n,this.scrollTop=t,this.isDone=r}}e.SmoothScrollingUpdate=S;function p(i,n){const t=n-i;return function(r){return i+t*a(r)}}function _(i,n,t){return function(r){return r<t?i(r/t):n((r-t)/(1-t))}}class v{constructor(n,t,r,u){this.from=n,this.to=t,this.duration=u,this.startTime=r,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(n,t,r){if(Math.abs(n-t)>2.5*r){let f,c;return n<t?(f=n+.75*r,c=t-.75*r):(f=n-.75*r,c=t+.75*r),_(p(n,f),p(c,t),.33)}return p(n,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(n){this.to=n.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(n){const t=(n-this.startTime)/this.duration;if(t<1){const r=this.scrollLeft(t),u=this.scrollTop(t);return new S(r,u,!1)}return new S(this.to.scrollLeft,this.to.scrollTop,!0)}combine(n,t,r){return v.start(n,t,r)}static start(n,t,r){r=r+10;const u=Date.now()-10;return new v(n,t,u,r)}}e.SmoothScrollingOperation=v;function b(i){return Math.pow(i,3)}function a(i){return 1-b(1-i)}}),define(se[11],oe([1,0,267,99]),function(te,e,L,k){"use strict";var y;Object.defineProperty(e,"__esModule",{value:!0}),e.InvisibleCharacters=e.AmbiguousCharacters=e.noBreakWhitespace=e.getLeftDeleteOffset=e.singleLetterHash=e.containsUppercaseCharacter=e.startsWithUTF8BOM=e.UTF8_BOM_CHARACTER=e.isEmojiImprecise=e.isFullWidthCharacter=e.containsUnusualLineTerminators=e.UNUSUAL_LINE_TERMINATORS=e.isBasicASCII=e.containsRTL=e.getCharContainingOffset=e.prevCharLength=e.nextCharLength=e.GraphemeIterator=e.CodePointIterator=e.getNextCodePoint=e.computeCodePoint=e.isLowSurrogate=e.isHighSurrogate=e.commonSuffixLength=e.commonPrefixLength=e.startsWithIgnoreCase=e.equalsIgnoreCase=e.isUpperAsciiLetter=e.isLowerAsciiLetter=e.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.lastNonWhitespaceIndex=e.getLeadingWhitespace=e.firstNonWhitespaceIndex=e.splitLines=e.regExpLeadsToEndlessLoop=e.createRegExp=e.stripWildcards=e.convertSimple2RegExpPattern=e.rtrim=e.ltrim=e.trim=e.escapeRegExpCharacters=e.escape=e.htmlAttributeEncodeValue=e.format=e.isFalsyOrWhitespace=void 0;function E(ee){return!ee||typeof ee!="string"?!0:ee.trim().length===0}e.isFalsyOrWhitespace=E;const S=/{(\d+)}/g;function p(ee,...le){return le.length===0?ee:ee.replace(S,function(ue,ce){const pe=parseInt(ce,10);return isNaN(pe)||pe<0||pe>=le.length?ue:le[pe]})}e.format=p;function _(ee){return ee.replace(/[<>"'&]/g,le=>{switch(le){case"<":return"<";case">":return">";case'"':return""";case"'":return"'";case"&":return"&"}return le})}e.htmlAttributeEncodeValue=_;function v(ee){return ee.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}e.escape=v;function b(ee){return ee.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=b;function a(ee,le=" "){const ue=i(ee,le);return n(ue,le)}e.trim=a;function i(ee,le){if(!ee||!le)return ee;const ue=le.length;if(ue===0||ee.length===0)return ee;let ce=0;for(;ee.indexOf(le,ce)===ce;)ce=ce+ue;return ee.substring(ce)}e.ltrim=i;function n(ee,le){if(!ee||!le)return ee;const ue=le.length,ce=ee.length;if(ue===0||ce===0)return ee;let pe=ce,ve=-1;for(;ve=ee.lastIndexOf(le,pe-1),!(ve===-1||ve+ue!==pe);){if(ve===0)return"";pe=ve}return ee.substring(0,pe)}e.rtrim=n;function t(ee){return ee.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=t;function r(ee){return ee.replace(/\*/g,"")}e.stripWildcards=r;function u(ee,le,ue={}){if(!ee)throw new Error("Cannot create regex from empty string");le||(ee=b(ee)),ue.wholeWord&&(/\B/.test(ee.charAt(0))||(ee="\\b"+ee),/\B/.test(ee.charAt(ee.length-1))||(ee=ee+"\\b"));let ce="";return ue.global&&(ce+="g"),ue.matchCase||(ce+="i"),ue.multiline&&(ce+="m"),ue.unicode&&(ce+="u"),new RegExp(ee,ce)}e.createRegExp=u;function f(ee){return ee.source==="^"||ee.source==="^$"||ee.source==="$"||ee.source==="^\\s*$"?!1:!!(ee.exec("")&&ee.lastIndex===0)}e.regExpLeadsToEndlessLoop=f;function c(ee){return ee.split(/\r\n|\r|\n/)}e.splitLines=c;function d(ee){for(let le=0,ue=ee.length;le<ue;le++){const ce=ee.charCodeAt(le);if(ce!==32&&ce!==9)return le}return-1}e.firstNonWhitespaceIndex=d;function s(ee,le=0,ue=ee.length){for(let ce=le;ce<ue;ce++){const pe=ee.charCodeAt(ce);if(pe!==32&&pe!==9)return ee.substring(le,ce)}return ee.substring(le,ue)}e.getLeadingWhitespace=s;function l(ee,le=ee.length-1){for(let ue=le;ue>=0;ue--){const ce=ee.charCodeAt(ue);if(ce!==32&&ce!==9)return ue}return-1}e.lastNonWhitespaceIndex=l;function o(ee,le){return ee<le?-1:ee>le?1:0}e.compare=o;function g(ee,le,ue=0,ce=ee.length,pe=0,ve=le.length){for(;ue<ce&&pe<ve;ue++,pe++){const _e=ee.charCodeAt(ue),Ee=le.charCodeAt(pe);if(_e<Ee)return-1;if(_e>Ee)return 1}const Ce=ce-ue,Se=ve-pe;return Ce<Se?-1:Ce>Se?1:0}e.compareSubstring=g;function h(ee,le){return m(ee,le,0,ee.length,0,le.length)}e.compareIgnoreCase=h;function m(ee,le,ue=0,ce=ee.length,pe=0,ve=le.length){for(;ue<ce&&pe<ve;ue++,pe++){let _e=ee.charCodeAt(ue),Ee=le.charCodeAt(pe);if(_e===Ee)continue;if(_e>=128||Ee>=128)return g(ee.toLowerCase(),le.toLowerCase(),ue,ce,pe,ve);w(_e)&&(_e-=32),w(Ee)&&(Ee-=32);const Ae=_e-Ee;if(Ae!==0)return Ae}const Ce=ce-ue,Se=ve-pe;return Ce<Se?-1:Ce>Se?1:0}e.compareSubstringIgnoreCase=m;function C(ee){return ee>=48&&ee<=57}e.isAsciiDigit=C;function w(ee){return ee>=97&&ee<=122}e.isLowerAsciiLetter=w;function D(ee){return ee>=65&&ee<=90}e.isUpperAsciiLetter=D;function I(ee,le){return ee.length===le.length&&m(ee,le)===0}e.equalsIgnoreCase=I;function T(ee,le){const ue=le.length;return le.length>ee.length?!1:m(ee,le,0,ue)===0}e.startsWithIgnoreCase=T;function A(ee,le){const ue=Math.min(ee.length,le.length);let ce;for(ce=0;ce<ue;ce++)if(ee.charCodeAt(ce)!==le.charCodeAt(ce))return ce;return ue}e.commonPrefixLength=A;function P(ee,le){const ue=Math.min(ee.length,le.length);let ce;const pe=ee.length-1,ve=le.length-1;for(ce=0;ce<ue;ce++)if(ee.charCodeAt(pe-ce)!==le.charCodeAt(ve-ce))return ce;return ue}e.commonSuffixLength=P;function N(ee){return 55296<=ee&&ee<=56319}e.isHighSurrogate=N;function M(ee){return 56320<=ee&&ee<=57343}e.isLowSurrogate=M;function R(ee,le){return(ee-55296<<10)+(le-56320)+65536}e.computeCodePoint=R;function x(ee,le,ue){const ce=ee.charCodeAt(ue);if(N(ce)&&ue+1<le){const pe=ee.charCodeAt(ue+1);if(M(pe))return R(ce,pe)}return ce}e.getNextCodePoint=x;function O(ee,le){const ue=ee.charCodeAt(le-1);if(M(ue)&&le>1){const ce=ee.charCodeAt(le-2);if(N(ce))return R(ce,ue)}return ue}class B{get offset(){return this._offset}constructor(le,ue=0){this._str=le,this._len=le.length,this._offset=ue}setOffset(le){this._offset=le}prevCodePoint(){const le=O(this._str,this._offset);return this._offset-=le>=65536?2:1,le}nextCodePoint(){const le=x(this._str,this._len,this._offset);return this._offset+=le>=65536?2:1,le}eol(){return this._offset>=this._len}}e.CodePointIterator=B;class W{get offset(){return this._iterator.offset}constructor(le,ue=0){this._iterator=new B(le,ue)}nextGraphemeLength(){const le=U.getInstance(),ue=this._iterator,ce=ue.offset;let pe=le.getGraphemeBreakType(ue.nextCodePoint());for(;!ue.eol();){const ve=ue.offset,Ce=le.getGraphemeBreakType(ue.nextCodePoint());if(X(pe,Ce)){ue.setOffset(ve);break}pe=Ce}return ue.offset-ce}prevGraphemeLength(){const le=U.getInstance(),ue=this._iterator,ce=ue.offset;let pe=le.getGraphemeBreakType(ue.prevCodePoint());for(;ue.offset>0;){const ve=ue.offset,Ce=le.getGraphemeBreakType(ue.prevCodePoint());if(X(Ce,pe)){ue.setOffset(ve);break}pe=Ce}return ce-ue.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=W;function V(ee,le){return new W(ee,le).nextGraphemeLength()}e.nextCharLength=V;function K(ee,le){return new W(ee,le).prevGraphemeLength()}e.prevCharLength=K;function F(ee,le){le>0&&M(ee.charCodeAt(le))&&le--;const ue=le+V(ee,le);return[ue-K(ee,ue),ue]}e.getCharContainingOffset=F;let q;function ie(){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 ae(ee){return q||(q=ie()),q.test(ee)}e.containsRTL=ae;const ne=/^[\t\n\r\x20-\x7E]*$/;function $(ee){return ne.test(ee)}e.isBasicASCII=$,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function J(ee){return e.UNUSUAL_LINE_TERMINATORS.test(ee)}e.containsUnusualLineTerminators=J;function Q(ee){return ee>=11904&&ee<=55215||ee>=63744&&ee<=64255||ee>=65281&&ee<=65374}e.isFullWidthCharacter=Q;function re(ee){return ee>=127462&&ee<=127487||ee===8986||ee===8987||ee===9200||ee===9203||ee>=9728&&ee<=10175||ee===11088||ee===11093||ee>=127744&&ee<=128591||ee>=128640&&ee<=128764||ee>=128992&&ee<=129008||ee>=129280&&ee<=129535||ee>=129648&&ee<=129782}e.isEmojiImprecise=re,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function de(ee){return!!(ee&&ee.length>0&&ee.charCodeAt(0)===65279)}e.startsWithUTF8BOM=de;function he(ee,le=!1){return ee?(le&&(ee=ee.replace(/\\./g,"")),ee.toLowerCase()!==ee):!1}e.containsUppercaseCharacter=he;function me(ee){return ee=ee%(2*26),ee<26?String.fromCharCode(97+ee):String.fromCharCode(65+ee-26)}e.singleLetterHash=me;function X(ee,le){return ee===0?le!==5&&le!==7:ee===2&&le===3?!1:ee===4||ee===2||ee===3||le===4||le===2||le===3?!0:!(ee===8&&(le===8||le===9||le===11||le===12)||(ee===11||ee===9)&&(le===9||le===10)||(ee===12||ee===10)&&le===10||le===5||le===13||le===7||ee===1||ee===13&&le===14||ee===6&&le===6)}class U{static getInstance(){return U._INSTANCE||(U._INSTANCE=new U),U._INSTANCE}constructor(){this._data=G()}getGraphemeBreakType(le){if(le<32)return le===10?3:le===13?2:4;if(le<127)return 0;const ue=this._data,ce=ue.length/3;let pe=1;for(;pe<=ce;)if(le<ue[3*pe])pe=2*pe;else if(le>ue[3*pe+1])pe=2*pe+1;else return ue[3*pe+2];return 0}}U._INSTANCE=null;function G(){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 z(ee,le){if(ee===0)return 0;const ue=H(ee,le);if(ue!==void 0)return ue;const ce=new B(le,ee);return ce.prevCodePoint(),ce.offset}e.getLeftDeleteOffset=z;function H(ee,le){const ue=new B(le,ee);let ce=ue.prevCodePoint();for(;Y(ce)||ce===65039||ce===8419;){if(ue.offset===0)return;ce=ue.prevCodePoint()}if(!re(ce))return;let pe=ue.offset;return pe>0&&ue.prevCodePoint()===8205&&(pe=ue.offset),pe}function Y(ee){return 127995<=ee&&ee<=127999}e.noBreakWhitespace="\xA0";class j{static getInstance(le){return y.cache.get(Array.from(le))}static getLocales(){return y._locales.value}constructor(le){this.confusableDictionary=le}isAmbiguous(le){return this.confusableDictionary.has(le)}getPrimaryConfusable(le){return this.confusableDictionary.get(le)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=j,y=j,j.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]}')),j.cache=new L.LRUCachedFunction(ee=>{function le(Ee){const Ae=new Map;for(let xe=0;xe<Ee.length;xe+=2)Ae.set(Ee[xe],Ee[xe+1]);return Ae}function ue(Ee,Ae){const xe=new Map(Ee);for(const[Be,De]of Ae)xe.set(Be,De);return xe}function ce(Ee,Ae){if(!Ee)return Ae;const xe=new Map;for(const[Be,De]of Ee)Ae.has(Be)&&xe.set(Be,De);return xe}const pe=y.ambiguousCharacterData.value;let ve=ee.filter(Ee=>!Ee.startsWith("_")&&Ee in pe);ve.length===0&&(ve=["_default"]);let Ce;for(const Ee of ve){const Ae=le(pe[Ee]);Ce=ce(Ce,Ae)}const Se=le(pe._common),_e=ue(Se,Ce);return new y(_e)}),j._locales=new k.Lazy(()=>Object.keys(y.ambiguousCharacterData.value).filter(ee=>!ee.startsWith("_")));class Z{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(Z.getRawData())),this._data}static isInvisibleCharacter(le){return Z.getData().has(le)}static get codePoints(){return Z.getData()}}e.InvisibleCharacters=Z,Z._data=void 0}),define(se[71],oe([1,0,53,401,11]),function(te,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(...Z){return function(ee,le){for(let ue=0,ce=Z.length;ue<ce;ue++){const pe=Z[ue](ee,le);if(pe)return pe}return null}}e.or=E,e.matchesStrictPrefix=S.bind(void 0,!1),e.matchesPrefix=S.bind(void 0,!0);function S(Z,ee,le){if(!le||le.length<ee.length)return null;let ue;return Z?ue=y.startsWithIgnoreCase(le,ee):ue=le.indexOf(ee)===0,ue?ee.length>0?[{start:0,end:ee.length}]:[]:null}function p(Z,ee){const le=ee.toLowerCase().indexOf(Z.toLowerCase());return le===-1?null:[{start:le,end:le+Z.length}]}e.matchesContiguousSubString=p;function _(Z,ee){return v(Z.toLowerCase(),ee.toLowerCase(),0,0)}e.matchesSubString=_;function v(Z,ee,le,ue){if(le===Z.length)return[];if(ue===ee.length)return null;if(Z[le]===ee[ue]){let ce=null;return(ce=v(Z,ee,le+1,ue+1))?s({start:ue,end:ue+1},ce):null}return v(Z,ee,le,ue+1)}function b(Z){return 97<=Z&&Z<=122}function a(Z){return 65<=Z&&Z<=90}e.isUpper=a;function i(Z){return 48<=Z&&Z<=57}function n(Z){return Z===32||Z===9||Z===10||Z===13}const t=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(Z=>t.add(Z.charCodeAt(0)));function r(Z){return n(Z)||t.has(Z)}function u(Z,ee){return Z===ee||r(Z)&&r(ee)}const f=new Map;function c(Z){if(f.has(Z))return f.get(Z);let ee;const le=(0,k.getKoreanAltChars)(Z);return le&&(ee=le),f.set(Z,ee),ee}function d(Z){return b(Z)||a(Z)||i(Z)}function s(Z,ee){return ee.length===0?ee=[Z]:Z.end===ee[0].start?ee[0].start=Z.start:ee.unshift(Z),ee}function l(Z,ee){for(let le=ee;le<Z.length;le++){const ue=Z.charCodeAt(le);if(a(ue)||i(ue)||le>0&&!d(Z.charCodeAt(le-1)))return le}return Z.length}function o(Z,ee,le,ue){if(le===Z.length)return[];if(ue===ee.length)return null;if(Z[le]!==ee[ue].toLowerCase())return null;{let ce=null,pe=ue+1;for(ce=o(Z,ee,le+1,ue+1);!ce&&(pe=l(ee,pe))<ee.length;)ce=o(Z,ee,le+1,pe),pe++;return ce===null?null:s({start:ue,end:ue+1},ce)}}function g(Z){let ee=0,le=0,ue=0,ce=0,pe=0;for(let Ee=0;Ee<Z.length;Ee++)pe=Z.charCodeAt(Ee),a(pe)&&ee++,b(pe)&&le++,d(pe)&&ue++,i(pe)&&ce++;const ve=ee/Z.length,Ce=le/Z.length,Se=ue/Z.length,_e=ce/Z.length;return{upperPercent:ve,lowerPercent:Ce,alphaPercent:Se,numericPercent:_e}}function h(Z){const{upperPercent:ee,lowerPercent:le}=Z;return le===0&&ee>.6}function m(Z){const{upperPercent:ee,lowerPercent:le,alphaPercent:ue,numericPercent:ce}=Z;return le>.2&&ee<.8&&ue>.6&&ce<.2}function C(Z){let ee=0,le=0,ue=0,ce=0;for(let pe=0;pe<Z.length;pe++)ue=Z.charCodeAt(pe),a(ue)&&ee++,b(ue)&&le++,n(ue)&&ce++;return(ee===0||le===0)&&ce===0?Z.length<=30:ee<=5}function w(Z,ee){if(!ee||(ee=ee.trim(),ee.length===0)||!C(Z)||ee.length>60)return null;const le=g(ee);if(!m(le)){if(!h(le))return null;ee=ee.toLowerCase()}let ue=null,ce=0;for(Z=Z.toLowerCase();ce<ee.length&&(ue=o(Z,ee,0,ce))===null;)ce=l(ee,ce+1);return ue}e.matchesCamelCase=w;function D(Z,ee,le=!1){if(!ee||ee.length===0)return null;let ue=null,ce=0;for(Z=Z.toLowerCase(),ee=ee.toLowerCase();ce<ee.length&&(ue=I(Z,ee,0,ce,le),ue===null);)ce=T(ee,ce+1);return ue}e.matchesWords=D;function I(Z,ee,le,ue,ce){let pe=0;if(le===Z.length)return[];if(ue===ee.length)return null;if(!u(Z.charCodeAt(le),ee.charCodeAt(ue))){const Se=c(Z.charCodeAt(le));if(!Se)return null;for(let _e=0;_e<Se.length;_e++)if(!u(Se[_e],ee.charCodeAt(ue+_e)))return null;pe+=Se.length-1}let ve=null,Ce=ue+pe+1;if(ve=I(Z,ee,le+1,Ce,ce),!ce)for(;!ve&&(Ce=T(ee,Ce))<ee.length;)ve=I(Z,ee,le+1,Ce,ce),Ce++;if(!ve)return null;if(Z.charCodeAt(le)!==ee.charCodeAt(ue)){const Se=c(Z.charCodeAt(le));if(!Se)return ve;for(let _e=0;_e<Se.length;_e++)if(Se[_e]!==ee.charCodeAt(ue+_e))return ve}return s({start:ue,end:ue+pe+1},ve)}function T(Z,ee){for(let le=ee;le<Z.length;le++)if(r(Z.charCodeAt(le))||le>0&&r(Z.charCodeAt(le-1)))return le;return Z.length}const A=E(e.matchesPrefix,w,p),P=E(e.matchesPrefix,w,_),N=new L.LRUCache(1e4);function M(Z,ee,le=!1){if(typeof Z!="string"||typeof ee!="string")return null;let ue=N.get(Z);ue||(ue=new RegExp(y.convertSimple2RegExpPattern(Z),"i"),N.set(Z,ue));const ce=ue.exec(ee);return ce?[{start:ce.index,end:ce.index+ce[0].length}]:le?P(Z,ee):A(Z,ee)}e.matchesFuzzy=M;function R(Z,ee){const le=U(Z,Z.toLowerCase(),0,ee,ee.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return le?O(le):null}e.matchesFuzzy2=R;function x(Z,ee,le,ue,ce,pe){const ve=Math.min(13,Z.length);for(;le<ve;le++){const Ce=U(Z,ee,le,ue,ce,pe,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(Ce)return Ce}return[0,pe]}e.anyScore=x;function O(Z){if(typeof Z>"u")return[];const ee=[],le=Z[1];for(let ue=Z.length-1;ue>1;ue--){const ce=Z[ue]+le,pe=ee[ee.length-1];pe&&pe.end===ce?pe.end=ce+1:ee.push({start:ce,end:ce+1})}return ee}e.createMatches=O;const B=128;function W(){const Z=[],ee=[];for(let le=0;le<=B;le++)ee[le]=0;for(let le=0;le<=B;le++)Z.push(ee.slice(0));return Z}function V(Z){const ee=[];for(let le=0;le<=Z;le++)ee[le]=0;return ee}const K=V(2*B),F=V(2*B),q=W(),ie=W(),ae=W(),ne=!1;function $(Z,ee,le,ue,ce){function pe(Ce,Se,_e=" "){for(;Ce.length<Se;)Ce=_e+Ce;return Ce}let ve=` | |${ue.split("").map(Ce=>pe(Ce,3)).join("|")}
|
||
`;for(let Ce=0;Ce<=le;Ce++)Ce===0?ve+=" |":ve+=`${ee[Ce-1]}|`,ve+=Z[Ce].slice(0,ce+1).map(Se=>pe(Se.toString(),3)).join("|")+`
|
||
`;return ve}function J(Z,ee,le,ue){Z=Z.substr(ee),le=le.substr(ue),console.log($(ie,Z,Z.length,le,le.length)),console.log($(ae,Z,Z.length,le,le.length)),console.log($(q,Z,Z.length,le,le.length))}function Q(Z,ee){if(ee<0||ee>=Z.length)return!1;const le=Z.codePointAt(ee);switch(le){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(le)}}function re(Z,ee){if(ee<0||ee>=Z.length)return!1;switch(Z.charCodeAt(ee)){case 32:case 9:return!0;default:return!1}}function de(Z,ee,le){return ee[Z]!==le[Z]}function he(Z,ee,le,ue,ce,pe,ve=!1){for(;ee<le&&ce<pe;)Z[ee]===ue[ce]&&(ve&&(K[ee]=ce),ee+=1),ce+=1;return ee===le}e.isPatternInWord=he;var me;(function(Z){Z.Default=[-100,0];function ee(le){return!le||le.length===2&&le[0]===-100&&le[1]===0}Z.isDefault=ee})(me||(e.FuzzyScore=me={}));class X{constructor(ee,le){this.firstMatchCanBeWeak=ee,this.boostFullMatch=le}}e.FuzzyScoreOptions=X,X.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};function U(Z,ee,le,ue,ce,pe,ve=X.default){const Ce=Z.length>B?B:Z.length,Se=ue.length>B?B:ue.length;if(le>=Ce||pe>=Se||Ce-le>Se-pe||!he(ee,le,Ce,ce,pe,Se,!0))return;G(Ce,Se,le,pe,ee,ce);let _e=1,Ee=1,Ae=le,xe=pe;const Be=[!1];for(_e=1,Ae=le;Ae<Ce;_e++,Ae++){const Ne=K[Ae],Pe=F[Ae],ze=Ae+1<Ce?F[Ae+1]:Se;for(Ee=Ne-pe+1,xe=Ne;xe<ze;Ee++,xe++){let Ke=Number.MIN_SAFE_INTEGER,je=!1;xe<=Pe&&(Ke=z(Z,ee,Ae,le,ue,ce,xe,Se,pe,q[_e-1][Ee-1]===0,Be));let Je=0;Ke!==Number.MAX_SAFE_INTEGER&&(je=!0,Je=Ke+ie[_e-1][Ee-1]);const rt=xe>Ne,et=rt?ie[_e][Ee-1]+(q[_e][Ee-1]>0?-5:0):0,st=xe>Ne+1&&q[_e][Ee-1]>0,Qe=st?ie[_e][Ee-2]+(q[_e][Ee-2]>0?-5:0):0;if(st&&(!rt||Qe>=et)&&(!je||Qe>=Je))ie[_e][Ee]=Qe,ae[_e][Ee]=3,q[_e][Ee]=0;else if(rt&&(!je||et>=Je))ie[_e][Ee]=et,ae[_e][Ee]=2,q[_e][Ee]=0;else if(je)ie[_e][Ee]=Je,ae[_e][Ee]=1,q[_e][Ee]=q[_e-1][Ee-1]+1;else throw new Error("not possible")}}if(ne&&J(Z,le,ue,pe),!Be[0]&&!ve.firstMatchCanBeWeak)return;_e--,Ee--;const De=[ie[_e][Ee],pe];let Ie=0,fe=0;for(;_e>=1;){let Ne=Ee;do{const Pe=ae[_e][Ne];if(Pe===3)Ne=Ne-2;else if(Pe===2)Ne=Ne-1;else break}while(Ne>=1);Ie>1&&ee[le+_e-1]===ce[pe+Ee-1]&&!de(Ne+pe-1,ue,ce)&&Ie+1>q[_e][Ne]&&(Ne=Ee),Ne===Ee?Ie++:Ie=1,fe||(fe=Ne),_e--,Ee=Ne-1,De.push(Ee)}Se===Ce&&ve.boostFullMatch&&(De[0]+=2);const be=fe-Ce;return De[0]-=be,De}e.fuzzyScore=U;function G(Z,ee,le,ue,ce,pe){let ve=Z-1,Ce=ee-1;for(;ve>=le&&Ce>=ue;)ce[ve]===pe[Ce]&&(F[ve]=Ce,ve--),Ce--}function z(Z,ee,le,ue,ce,pe,ve,Ce,Se,_e,Ee){if(ee[le]!==pe[ve])return Number.MIN_SAFE_INTEGER;let Ae=1,xe=!1;return ve===le-ue?Ae=Z[le]===ce[ve]?7:5:de(ve,ce,pe)&&(ve===0||!de(ve-1,ce,pe))?(Ae=Z[le]===ce[ve]?7:5,xe=!0):Q(pe,ve)&&(ve===0||!Q(pe,ve-1))?Ae=5:(Q(pe,ve-1)||re(pe,ve-1))&&(Ae=5,xe=!0),Ae>1&&le===ue&&(Ee[0]=!0),xe||(xe=de(ve,ce,pe)||Q(pe,ve-1)||re(pe,ve-1)),le===ue?ve>Se&&(Ae-=xe?3:5):_e?Ae+=xe?2:0:Ae+=xe?0:1,ve+1===Ce&&(Ae-=xe?3:5),Ae}function H(Z,ee,le,ue,ce,pe,ve){return Y(Z,ee,le,ue,ce,pe,!0,ve)}e.fuzzyScoreGracefulAggressive=H;function Y(Z,ee,le,ue,ce,pe,ve,Ce){let Se=U(Z,ee,le,ue,ce,pe,Ce);if(Se&&!ve)return Se;if(Z.length>=3){const _e=Math.min(7,Z.length-1);for(let Ee=le+1;Ee<_e;Ee++){const Ae=j(Z,Ee);if(Ae){const xe=U(Ae,Ae.toLowerCase(),le,ue,ce,pe,Ce);xe&&(xe[0]-=3,(!Se||xe[0]>Se[0])&&(Se=xe))}}}return Se}function j(Z,ee){if(ee+1>=Z.length)return;const le=Z[ee],ue=Z[ee+1];if(le!==ue)return Z.slice(0,ee)+ue+le+Z.slice(ee+2)}}),define(se[111],oe([1,0,11]),function(te,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(r){return y(r,0)}e.hash=k;function y(r,u){switch(typeof r){case"object":return r===null?E(349,u):Array.isArray(r)?_(r,u):v(r,u);case"string":return p(r,u);case"boolean":return S(r,u);case"number":return E(r,u);case"undefined":return E(937,u);default:return E(617,u)}}e.doHash=y;function E(r,u){return(u<<5)-u+r|0}e.numberHash=E;function S(r,u){return E(r?433:863,u)}function p(r,u){u=E(149417,u);for(let f=0,c=r.length;f<c;f++)u=E(r.charCodeAt(f),u);return u}e.stringHash=p;function _(r,u){return u=E(104579,u),r.reduce((f,c)=>y(c,f),u)}function v(r,u){return u=E(181387,u),Object.keys(r).sort().reduce((f,c)=>(f=p(c,f),y(r[c],f)),u)}function b(r,u,f=32){const c=f-u,d=~((1<<c)-1);return(r<<u|(d&r)>>>c)>>>0}function a(r,u=0,f=r.byteLength,c=0){for(let d=0;d<f;d++)r[u+d]=c}function i(r,u,f="0"){for(;r.length<u;)r=f+r;return r}function n(r,u=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(f=>f.toString(16).padStart(2,"0")).join(""):i((r>>>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,s=this._leftoverHighSurrogate,l,o;for(s!==0?(l=s,o=-1,s=0):(l=u.charCodeAt(0),o=0);;){let g=l;if(L.isHighSurrogate(l))if(o+1<f){const h=u.charCodeAt(o+1);L.isLowSurrogate(h)?(o++,g=L.computeCodePoint(l,h)):g=65533}else{s=l;break}else L.isLowSurrogate(l)&&(g=65533);if(d=this._push(c,d,g),o++,o<f)l=u.charCodeAt(o);else break}this._buffLen=d,this._leftoverHighSurrogate=s}_push(u,f,c){return c<128?u[f++]=c:c<2048?(u[f++]=192|(c&1984)>>>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,a(this._buff,this._buffLen),this._buffLen>56&&(this._step(),a(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,s=this._h2,l=this._h3,o=this._h4,g,h,m;for(let C=0;C<80;C++)C<20?(g=d&s|~d&l,h=1518500249):C<40?(g=d^s^l,h=1859775393):C<60?(g=d&s|d&l|s&l,h=2400959708):(g=d^s^l,h=3395469782),m=b(c,5)+g+o+h+u.getUint32(C*4,!1)&4294967295,o=l,l=s,s=b(d,30),d=c,c=m;this._h0=this._h0+c&4294967295,this._h1=this._h1+d&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+o&4294967295}}e.StringSHA1=t,t._bigBlock32=new DataView(new ArrayBuffer(320))}),define(se[173],oe([1,0,397,111]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class y{constructor(a){this.source=a}getElements(){const a=this.source,i=new Int32Array(a.length);for(let n=0,t=a.length;n<t;n++)i[n]=a.charCodeAt(n);return i}}e.StringDiffSequence=y;function E(b,a,i){return new v(new y(b),new y(a)).ComputeDiff(i).changes}e.stringDiff=E;class S{static Assert(a,i){if(!a)throw new Error(i)}}class p{static Copy(a,i,n,t,r){for(let u=0;u<r;u++)n[t+u]=a[i+u]}static Copy2(a,i,n,t,r){for(let u=0;u<r;u++)n[t+u]=a[i+u]}}class _{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new 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(a,i){this.m_originalStart=Math.min(this.m_originalStart,a),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(a,i){this.m_originalStart=Math.min(this.m_originalStart,a),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(a,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=a,this._modifiedSequence=i;const[t,r,u]=v._getElements(a),[f,c,d]=v._getElements(i);this._hasStrings=u&&d,this._originalStringElements=t,this._originalElementsOrHash=r,this._modifiedStringElements=f,this._modifiedElementsOrHash=c,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(a){return a.length>0&&typeof a[0]=="string"}static _getElements(a){const i=a.getElements();if(v._isStringArray(i)){const n=new Int32Array(i.length);for(let t=0,r=i.length;t<r;t++)n[t]=(0,k.stringHash)(i[t],0);return[i,n,!0]}return i instanceof Int32Array?[[],i,!1]:[[],new Int32Array(i),!1]}ElementsAreEqual(a,i){return this._originalElementsOrHash[a]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[a]===this._modifiedStringElements[i]:!0}ElementsAreStrictEqual(a,i){if(!this.ElementsAreEqual(a,i))return!1;const n=v._getStrictElement(this._originalSequence,a),t=v._getStrictElement(this._modifiedSequence,i);return n===t}static _getStrictElement(a,i){return typeof a.getStrictElement=="function"?a.getStrictElement(i):null}OriginalElementsAreEqual(a,i){return this._originalElementsOrHash[a]!==this._originalElementsOrHash[i]?!1:this._hasStrings?this._originalStringElements[a]===this._originalStringElements[i]:!0}ModifiedElementsAreEqual(a,i){return this._modifiedElementsOrHash[a]!==this._modifiedElementsOrHash[i]?!1:this._hasStrings?this._modifiedStringElements[a]===this._modifiedStringElements[i]:!0}ComputeDiff(a){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,a)}_ComputeDiff(a,i,n,t,r){const u=[!1];let f=this.ComputeDiffRecursive(a,i,n,t,u);return r&&(f=this.PrettifyChanges(f)),{quitEarly:u[0],changes:f}}ComputeDiffRecursive(a,i,n,t,r){for(r[0]=!1;a<=i&&n<=t&&this.ElementsAreEqual(a,n);)a++,n++;for(;i>=a&&t>=n&&this.ElementsAreEqual(i,t);)i--,t--;if(a>i||n>t){let l;return n<=t?(S.Assert(a===i+1,"originalStart should only be one more than originalEnd"),l=[new L.DiffChange(a,0,n,t-n+1)]):a<=i?(S.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),l=[new L.DiffChange(a,i-a+1,n,0)]):(S.Assert(a===i+1,"originalStart should only be one more than originalEnd"),S.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),l=[]),l}const u=[0],f=[0],c=this.ComputeRecursionPoint(a,i,n,t,u,f,r),d=u[0],s=f[0];if(c!==null)return c;if(!r[0]){const l=this.ComputeDiffRecursive(a,d,n,s,r);let o=[];return r[0]?o=[new L.DiffChange(d+1,i-(d+1)+1,s+1,t-(s+1)+1)]:o=this.ComputeDiffRecursive(d+1,i,s+1,t,r),this.ConcatenateChanges(l,o)}return[new L.DiffChange(a,i-a+1,n,t-n+1)]}WALKTRACE(a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D){let I=null,T=null,A=new _,P=i,N=n,M=g[0]-C[0]-t,R=-1073741824,x=this.m_forwardHistory.length-1;do{const O=M+a;O===P||O<N&&d[O-1]<d[O+1]?(l=d[O+1],h=l-M-t,l<R&&A.MarkNextChange(),R=l,A.AddModifiedElement(l+1,h),M=O+1-a):(l=d[O-1]+1,h=l-M-t,l<R&&A.MarkNextChange(),R=l-1,A.AddOriginalElement(l,h+1),M=O-1-a),x>=0&&(d=this.m_forwardHistory[x],a=d[0],P=1,N=d.length-1)}while(--x>=-1);if(I=A.getReverseChanges(),D[0]){let O=g[0]+1,B=C[0]+1;if(I!==null&&I.length>0){const W=I[I.length-1];O=Math.max(O,W.getOriginalEnd()),B=Math.max(B,W.getModifiedEnd())}T=[new L.DiffChange(O,o-O+1,B,m-B+1)]}else{A=new _,P=u,N=f,M=g[0]-C[0]-c,R=1073741824,x=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const O=M+r;O===P||O<N&&s[O-1]>=s[O+1]?(l=s[O+1]-1,h=l-M-c,l>R&&A.MarkNextChange(),R=l+1,A.AddOriginalElement(l+1,h+1),M=O+1-r):(l=s[O-1],h=l-M-c,l>R&&A.MarkNextChange(),R=l,A.AddModifiedElement(l+1,h+1),M=O-1-r),x>=0&&(s=this.m_reverseHistory[x],r=s[0],P=1,N=s.length-1)}while(--x>=-1);T=A.getChanges()}return this.ConcatenateChanges(I,T)}ComputeRecursionPoint(a,i,n,t,r,u,f){let c=0,d=0,s=0,l=0,o=0,g=0;a--,n--,r[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const h=i-a+(t-n),m=h+1,C=new Int32Array(m),w=new Int32Array(m),D=t-n,I=i-a,T=a-n,A=i-t,N=(I-D)%2===0;C[D]=a,w[I]=i,f[0]=!1;for(let M=1;M<=h/2+1;M++){let R=0,x=0;s=this.ClipDiagonalBound(D-M,M,D,m),l=this.ClipDiagonalBound(D+M,M,D,m);for(let B=s;B<=l;B+=2){B===s||B<l&&C[B-1]<C[B+1]?c=C[B+1]:c=C[B-1]+1,d=c-(B-D)-T;const W=c;for(;c<i&&d<t&&this.ElementsAreEqual(c+1,d+1);)c++,d++;if(C[B]=c,c+d>R+x&&(R=c,x=d),!N&&Math.abs(B-I)<=M-1&&c>=w[B])return r[0]=c,u[0]=d,W<=w[B]&&1447>0&&M<=1447+1?this.WALKTRACE(D,s,l,T,I,o,g,A,C,w,c,i,r,d,t,u,N,f):null}const O=(R-a+(x-n)-M)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(R,O))return f[0]=!0,r[0]=R,u[0]=x,O>0&&1447>0&&M<=1447+1?this.WALKTRACE(D,s,l,T,I,o,g,A,C,w,c,i,r,d,t,u,N,f):(a++,n++,[new L.DiffChange(a,i-a+1,n,t-n+1)]);o=this.ClipDiagonalBound(I-M,M,I,m),g=this.ClipDiagonalBound(I+M,M,I,m);for(let B=o;B<=g;B+=2){B===o||B<g&&w[B-1]>=w[B+1]?c=w[B+1]-1:c=w[B-1],d=c-(B-I)-A;const W=c;for(;c>a&&d>n&&this.ElementsAreEqual(c,d);)c--,d--;if(w[B]=c,N&&Math.abs(B-D)<=M&&c<=C[B])return r[0]=c,u[0]=d,W>=C[B]&&1447>0&&M<=1447+1?this.WALKTRACE(D,s,l,T,I,o,g,A,C,w,c,i,r,d,t,u,N,f):null}if(M<=1447){let B=new Int32Array(l-s+2);B[0]=D-s+1,p.Copy2(C,s,B,1,l-s+1),this.m_forwardHistory.push(B),B=new Int32Array(g-o+2),B[0]=I-o+1,p.Copy2(w,o,B,1,g-o+1),this.m_reverseHistory.push(B)}}return this.WALKTRACE(D,s,l,T,I,o,g,A,C,w,c,i,r,d,t,u,N,f)}PrettifyChanges(a){for(let i=0;i<a.length;i++){const n=a[i],t=i<a.length-1?a[i+1].originalStart:this._originalElementsOrHash.length,r=i<a.length-1?a[i+1].modifiedStart:this._modifiedElementsOrHash.length,u=n.originalLength>0,f=n.modifiedLength>0;for(;n.originalStart+n.originalLength<t&&n.modifiedStart+n.modifiedLength<r&&(!u||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!f||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const d=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!d)break;n.originalStart++,n.modifiedStart++}const c=[null];if(i<a.length-1&&this.ChangesOverlap(a[i],a[i+1],c)){a[i]=c[0],a.splice(i+1,1),i--;continue}}for(let i=a.length-1;i>=0;i--){const n=a[i];let t=0,r=0;if(i>0){const l=a[i-1];t=l.originalStart+l.originalLength,r=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 o=n.originalStart-l,g=n.modifiedStart-l;if(o<t||g<r||u&&!this.OriginalElementsAreEqual(o,o+n.originalLength)||f&&!this.ModifiedElementsAreEqual(g,g+n.modifiedLength))break;const m=(o===t&&g===r?5:0)+this._boundaryScore(o,n.originalLength,g,n.modifiedLength);m>d&&(d=m,c=l)}n.originalStart-=c,n.modifiedStart-=c;const s=[null];if(i>0&&this.ChangesOverlap(a[i-1],a[i],s)){a[i-1]=s[0],a.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=a.length;i<n;i++){const t=a[i-1],r=a[i],u=r.originalStart-t.originalStart-t.originalLength,f=t.originalStart,c=r.originalStart+r.originalLength,d=c-f,s=t.modifiedStart,l=r.modifiedStart+r.modifiedLength,o=l-s;if(u<5&&d<20&&o<20){const g=this._findBetterContiguousSequence(f,d,s,o,u);if(g){const[h,m]=g;(h!==t.originalStart+t.originalLength||m!==t.modifiedStart+t.modifiedLength)&&(t.originalLength=h-t.originalStart,t.modifiedLength=m-t.modifiedStart,r.originalStart=h+u,r.modifiedStart=m+u,r.originalLength=c-r.originalStart,r.modifiedLength=l-r.modifiedStart)}}}return a}_findBetterContiguousSequence(a,i,n,t,r){if(i<r||t<r)return null;const u=a+i-r+1,f=n+t-r+1;let c=0,d=0,s=0;for(let l=a;l<u;l++)for(let o=n;o<f;o++){const g=this._contiguousSequenceScore(l,o,r);g>0&&g>c&&(c=g,d=l,s=o)}return c>0?[d,s]:null}_contiguousSequenceScore(a,i,n){let t=0;for(let r=0;r<n;r++){if(!this.ElementsAreEqual(a+r,i+r))return 0;t+=this._originalStringElements[a+r].length}return t}_OriginalIsBoundary(a){return a<=0||a>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[a])}_OriginalRegionIsBoundary(a,i){if(this._OriginalIsBoundary(a)||this._OriginalIsBoundary(a-1))return!0;if(i>0){const n=a+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(a){return a<=0||a>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[a])}_ModifiedRegionIsBoundary(a,i){if(this._ModifiedIsBoundary(a)||this._ModifiedIsBoundary(a-1))return!0;if(i>0){const n=a+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(a,i,n,t){const r=this._OriginalRegionIsBoundary(a,i)?1:0,u=this._ModifiedRegionIsBoundary(n,t)?1:0;return r+u}ConcatenateChanges(a,i){const n=[];if(a.length===0||i.length===0)return i.length>0?i:a;if(this.ChangesOverlap(a[a.length-1],i[0],n)){const t=new Array(a.length+i.length-1);return p.Copy(a,0,t,0,a.length-1),t[a.length-1]=n[0],p.Copy(i,1,t,a.length,i.length-1),t}else{const t=new Array(a.length+i.length);return p.Copy(a,0,t,0,a.length),p.Copy(i,0,t,a.length,i.length),t}}ChangesOverlap(a,i,n){if(S.Assert(a.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),S.Assert(a.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),a.originalStart+a.originalLength>=i.originalStart||a.modifiedStart+a.modifiedLength>=i.modifiedStart){const t=a.originalStart;let r=a.originalLength;const u=a.modifiedStart;let f=a.modifiedLength;return a.originalStart+a.originalLength>=i.originalStart&&(r=i.originalStart+i.originalLength-a.originalStart),a.modifiedStart+a.modifiedLength>=i.modifiedStart&&(f=i.modifiedStart+i.modifiedLength-a.modifiedStart),n[0]=new L.DiffChange(t,r,u,f),!0}else return n[0]=null,!1}ClipDiagonalBound(a,i,n,t){if(a>=0&&a<t)return a;const r=n,u=t-n-1,f=i%2===0;if(a<0){const c=r%2===0;return f===c?0:1}else{const c=u%2===0;return f===c?t-1:t-2}}}e.LcsDiff=v}),define(se[406],oe([1,0,11]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function k(S,p){if(S&&S[0]!==""){const _=y(S,p,"-"),v=y(S,p,"_");return _&&!v?E(S,p,"-"):!_&&v?E(S,p,"_"):S[0].toUpperCase()===S[0]?p.toUpperCase():S[0].toLowerCase()===S[0]?p.toLowerCase():L.containsUppercaseCharacter(S[0][0])&&p.length>0?p[0].toUpperCase()+p.substr(1):S[0][0].toUpperCase()!==S[0][0]&&p.length>0?p[0].toLowerCase()+p.substr(1):p}else return p}e.buildReplaceStringWithCasePreserved=k;function y(S,p,_){return S[0].indexOf(_)!==-1&&p.indexOf(_)!==-1&&S[0].split(_).length===p.split(_).length}function E(S,p,_){const v=p.split(_),b=S[0].split(_);let a="";return v.forEach((i,n)=>{a+=k([b[n]],i)+_}),a.slice(0,-1)}}),define(se[100],oe([1,0,11]),function(te,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",S="warning",p="warn",_="info",v="ignore";function b(i){return i?L.equalsIgnoreCase(E,i)?y.Error:L.equalsIgnoreCase(S,i)||L.equalsIgnoreCase(p,i)?y.Warning:L.equalsIgnoreCase(_,i)?y.Info:y.Ignore:y.Ignore}y.fromValue=b;function a(i){switch(i){case y.Error:return E;case y.Warning:return S;case y.Info:return _;default:return v}}y.toString=a}(k||(k={})),e.default=k}),define(se[271],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(se[199],oe([1,0,11]),function(te,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<this._value.length-1}cmp(b){const a=b.charCodeAt(0),i=this._value.charCodeAt(this._pos);return a-i}value(){return this._value[this._pos]}}e.StringIterator=k;class y{constructor(b=!0){this._caseSensitive=b}reset(b){return this._value=b,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let b=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(b)this._from++;else break;else b=!1;return this}cmp(b){return this._caseSensitive?(0,L.compareSubstring)(b,this._value,0,b.length,this._from,this._to):(0,L.compareSubstringIgnoreCase)(b,this._value,0,b.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=y;class E{constructor(b=!0,a=!0){this._splitOnBackslash=b,this._caseSensitive=a}reset(b){this._from=0,this._to=0,this._value=b,this._valueLen=b.length;for(let a=b.length-1;a>=0;a--,this._valueLen--){const i=this._value.charCodeAt(a);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let b=!0;for(;this._to<this._valueLen;this._to++){const a=this._value.charCodeAt(this._to);if(a===47||this._splitOnBackslash&&a===92)if(b)this._from++;else break;else b=!1}return this}cmp(b){return this._caseSensitive?(0,L.compareSubstring)(b,this._value,0,b.length,this._from,this._to):(0,L.compareSubstringIgnoreCase)(b,this._value,0,b.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=E;class S{constructor(b,a){this._ignorePathCasing=b,this._ignoreQueryAndFragment=a,this._states=[],this._stateIdx=0}reset(b){return this._value=b,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new E(!1,!this._ignorePathCasing(b)),this._pathIterator.reset(b.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(b)||(this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5)),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(b){if(this._states[this._stateIdx]===1)return(0,L.compareIgnoreCase)(b,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,L.compareIgnoreCase)(b,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(b);if(this._states[this._stateIdx]===4)return(0,L.compare)(b,this._value.query);if(this._states[this._stateIdx]===5)return(0,L.compare)(b,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}e.UriIterator=S;class p{constructor(){this.height=1}rotateLeft(){const b=this.right;return this.right=b.left,b.left=this,this.updateHeight(),b.updateHeight(),b}rotateRight(){const b=this.left;return this.left=b.right,b.right=this,this.updateHeight(),b.updateHeight(),b}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var b,a;return(a=(b=this.left)===null||b===void 0?void 0:b.height)!==null&&a!==void 0?a:0}get heightRight(){var b,a;return(a=(b=this.right)===null||b===void 0?void 0:b.height)!==null&&a!==void 0?a:0}}class _{static forUris(b=()=>!1,a=()=>!1){return new _(new S(b,a))}static forStrings(){return new _(new k)}static forConfigKeys(){return new _(new y)}constructor(b){this._iter=b}clear(){this._root=void 0}set(b,a){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 r=n.value;n.value=a,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],s=t[u+1][0];if(d===1&&s===1)t[u][1]=f.rotateLeft();else if(d===-1&&s===-1)t[u][1]=f.rotateRight();else if(d===1&&s===-1)f.right=t[u+1][1]=t[u+1][1].rotateRight(),t[u][1]=f.rotateLeft();else if(d===-1&&s===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 r}get(b){var a;return(a=this._getNode(b))===null||a===void 0?void 0:a.value}_getNode(b){const a=this._iter.reset(b);let i=this._root;for(;i;){const n=a.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(a.hasNext())a.next(),i=i.mid;else break}return i}has(b){const a=this._getNode(b);return!(a?.value===void 0&&a?.mid===void 0)}delete(b){return this._delete(b,!1)}deleteSuperstr(b){return this._delete(b,!0)}_delete(b,a){var i;const n=this._iter.reset(b),t=[];let r=this._root;for(;r;){const u=n.cmp(r.segment);if(u>0)t.push([-1,r]),r=r.left;else if(u<0)t.push([1,r]),r=r.right;else if(n.hasNext())n.next(),t.push([0,r]),r=r.mid;else break}if(r){if(a?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const u=this._min(r.right);if(u.key){const{key:f,value:c,segment:d}=u;this._delete(u.key,!1),r.key=f,r.value=c,r.segment=d}}else{const u=(i=r.left)!==null&&i!==void 0?i:r.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 a=this._iter.reset(b);let i=this._root,n;for(;i;){const t=a.cmp(i.segment);if(t>0)i=i.left;else if(t<0)i=i.right;else if(a.hasNext())a.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(b){return this._findSuperstrOrElement(b,!1)}_findSuperstrOrElement(b,a){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):a?n.value:void 0}}forEach(b){for(const[a,i]of this)b(i,a)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(b){const a=[];return this._dfsEntries(b,a),a[Symbol.iterator]()}_dfsEntries(b,a){b&&(b.left&&this._dfsEntries(b.left,a),b.value&&a.push([b.key,b.value]),b.mid&&this._dfsEntries(b.mid,a),b.right&&this._dfsEntries(b.right,a))}}e.TernarySearchTree=_}),define(se[407],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeTfIdfScores=e.TfIdfCalculator=void 0;function L(E){var S;const p=new Map;for(const _ of E)p.set(_,((S=p.get(_))!==null&&S!==void 0?S:0)+1);return p}class k{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(S,p){const _=this.computeEmbedding(S),v=new Map,b=[];for(const[a,i]of this.documents){if(p.isCancellationRequested)return[];for(const n of i.chunks){const t=this.computeSimilarityScore(n,_,v);t>0&&b.push({key:a,score:t})}}return b}static termFrequencies(S){return L(k.splitTerms(S))}static*splitTerms(S){const p=_=>_.toLowerCase();for(const[_]of S.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield p(_);const v=_.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(S){var p;for(const{key:_}of S)this.deleteDocument(_);for(const _ of S){const v=[];for(const b of _.textChunks){const a=k.termFrequencies(b);for(const i of a.keys())this.chunkOccurrences.set(i,((p=this.chunkOccurrences.get(i))!==null&&p!==void 0?p:0)+1);v.push({text:b,tf:a})}this.chunkCount+=v.length,this.documents.set(_.key,{chunks:v})}return this}deleteDocument(S){const p=this.documents.get(S);if(p){this.documents.delete(S),this.chunkCount-=p.chunks.length;for(const _ of p.chunks)for(const v of _.tf.keys()){const b=this.chunkOccurrences.get(v);if(typeof b=="number"){const a=b-1;a<=0?this.chunkOccurrences.delete(v):this.chunkOccurrences.set(v,a)}}}}computeSimilarityScore(S,p,_){let v=0;for(const[b,a]of Object.entries(p)){const i=S.tf.get(b);if(!i)continue;let n=_.get(b);typeof n!="number"&&(n=this.computeIdf(b),_.set(b,n));const t=i*n;v+=t*a}return v}computeEmbedding(S){const p=k.termFrequencies(S);return this.computeTfidf(p)}computeIdf(S){var p;const _=(p=this.chunkOccurrences.get(S))!==null&&p!==void 0?p:0;return _>0?Math.log((this.chunkCount+1)/_):0}computeTfidf(S){const p=Object.create(null);for(const[_,v]of S){const b=this.computeIdf(_);b>0&&(p[_]=v*b)}return p}}e.TfIdfCalculator=k;function y(E){var S,p;const _=E.slice(0);_.sort((b,a)=>a.score-b.score);const v=(p=(S=_[0])===null||S===void 0?void 0:S.score)!==null&&p!==void 0?p:0;if(v>0)for(const b of _)b.score/=v;return _}e.normalizeTfIdfScores=y}),define(se[20],oe([1,0]),function(te,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 S(u){return!!u&&typeof u[Symbol.iterator]=="function"}e.isIterable=S;function p(u){return u===!0||u===!1}e.isBoolean=p;function _(u){return typeof u>"u"}e.isUndefined=_;function v(u){return!b(u)}e.isDefined=v;function b(u){return _(u)||u===null}e.isUndefinedOrNull=b;function a(u,f){if(!u)throw new Error(f?`Unexpected type, expected '${f}'`:"Unexpected type")}e.assertType=a;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<c;d++)r(u[d],f[d])}e.validateConstraints=t;function r(u,f){if(L(f)){if(typeof u!==f)throw new Error(`argument does not match constraint: typeof ${f}`)}else if(n(f)){try{if(u instanceof f)return}catch{}if(!b(u)&&u.constructor===f||f.length===1&&f.call(void 0,u)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}e.validateConstraint=r}),define(se[26],oe([1,0,20]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Codicon=e.getCodiconFontCharacters=void 0;const k=Object.create(null);function y(S,p){if((0,L.isString)(p)){const _=k[p];if(_===void 0)throw new Error(`${S} references an unknown codicon: ${p}`);p=_}return k[S]=p,{id:S}}function E(){return k}e.getCodiconFontCharacters=E,e.Codicon={add:y("add",6e4),plus:y("plus",6e4),gistNew:y("gist-new",6e4),repoCreate:y("repo-create",6e4),lightbulb:y("lightbulb",60001),lightBulb:y("light-bulb",60001),repo:y("repo",60002),repoDelete:y("repo-delete",60002),gistFork:y("gist-fork",60003),repoForked:y("repo-forked",60003),gitPullRequest:y("git-pull-request",60004),gitPullRequestAbandoned:y("git-pull-request-abandoned",60004),recordKeys:y("record-keys",60005),keyboard:y("keyboard",60005),tag:y("tag",60006),tagAdd:y("tag-add",60006),tagRemove:y("tag-remove",60006),gitPullRequestLabel:y("git-pull-request-label",60006),person:y("person",60007),personFollow:y("person-follow",60007),personOutline:y("person-outline",60007),personFilled:y("person-filled",60007),gitBranch:y("git-branch",60008),gitBranchCreate:y("git-branch-create",60008),gitBranchDelete:y("git-branch-delete",60008),sourceControl:y("source-control",60008),mirror:y("mirror",60009),mirrorPublic:y("mirror-public",60009),star:y("star",60010),starAdd:y("star-add",60010),starDelete:y("star-delete",60010),starEmpty:y("star-empty",60010),comment:y("comment",60011),commentAdd:y("comment-add",60011),alert:y("alert",60012),warning:y("warning",60012),search:y("search",60013),searchSave:y("search-save",60013),logOut:y("log-out",60014),signOut:y("sign-out",60014),logIn:y("log-in",60015),signIn:y("sign-in",60015),eye:y("eye",60016),eyeUnwatch:y("eye-unwatch",60016),eyeWatch:y("eye-watch",60016),circleFilled:y("circle-filled",60017),primitiveDot:y("primitive-dot",60017),closeDirty:y("close-dirty",60017),debugBreakpoint:y("debug-breakpoint",60017),debugBreakpointDisabled:y("debug-breakpoint-disabled",60017),debugBreakpointPending:y("debug-breakpoint-pending",60377),debugHint:y("debug-hint",60017),primitiveSquare:y("primitive-square",60018),edit:y("edit",60019),pencil:y("pencil",60019),info:y("info",60020),issueOpened:y("issue-opened",60020),gistPrivate:y("gist-private",60021),gitForkPrivate:y("git-fork-private",60021),lock:y("lock",60021),mirrorPrivate:y("mirror-private",60021),close:y("close",60022),removeClose:y("remove-close",60022),x:y("x",60022),repoSync:y("repo-sync",60023),sync:y("sync",60023),clone:y("clone",60024),desktopDownload:y("desktop-download",60024),beaker:y("beaker",60025),microscope:y("microscope",60025),vm:y("vm",60026),deviceDesktop:y("device-desktop",60026),file:y("file",60027),fileText:y("file-text",60027),more:y("more",60028),ellipsis:y("ellipsis",60028),kebabHorizontal:y("kebab-horizontal",60028),mailReply:y("mail-reply",60029),reply:y("reply",60029),organization:y("organization",60030),organizationFilled:y("organization-filled",60030),organizationOutline:y("organization-outline",60030),newFile:y("new-file",60031),fileAdd:y("file-add",60031),newFolder:y("new-folder",60032),fileDirectoryCreate:y("file-directory-create",60032),trash:y("trash",60033),trashcan:y("trashcan",60033),history:y("history",60034),clock:y("clock",60034),folder:y("folder",60035),fileDirectory:y("file-directory",60035),symbolFolder:y("symbol-folder",60035),logoGithub:y("logo-github",60036),markGithub:y("mark-github",60036),github:y("github",60036),terminal:y("terminal",60037),console:y("console",60037),repl:y("repl",60037),zap:y("zap",60038),symbolEvent:y("symbol-event",60038),error:y("error",60039),stop:y("stop",60039),variable:y("variable",60040),symbolVariable:y("symbol-variable",60040),array:y("array",60042),symbolArray:y("symbol-array",60042),symbolModule:y("symbol-module",60043),symbolPackage:y("symbol-package",60043),symbolNamespace:y("symbol-namespace",60043),symbolObject:y("symbol-object",60043),symbolMethod:y("symbol-method",60044),symbolFunction:y("symbol-function",60044),symbolConstructor:y("symbol-constructor",60044),symbolBoolean:y("symbol-boolean",60047),symbolNull:y("symbol-null",60047),symbolNumeric:y("symbol-numeric",60048),symbolNumber:y("symbol-number",60048),symbolStructure:y("symbol-structure",60049),symbolStruct:y("symbol-struct",60049),symbolParameter:y("symbol-parameter",60050),symbolTypeParameter:y("symbol-type-parameter",60050),symbolKey:y("symbol-key",60051),symbolText:y("symbol-text",60051),symbolReference:y("symbol-reference",60052),goToFile:y("go-to-file",60052),symbolEnum:y("symbol-enum",60053),symbolValue:y("symbol-value",60053),symbolRuler:y("symbol-ruler",60054),symbolUnit:y("symbol-unit",60054),activateBreakpoints:y("activate-breakpoints",60055),archive:y("archive",60056),arrowBoth:y("arrow-both",60057),arrowDown:y("arrow-down",60058),arrowLeft:y("arrow-left",60059),arrowRight:y("arrow-right",60060),arrowSmallDown:y("arrow-small-down",60061),arrowSmallLeft:y("arrow-small-left",60062),arrowSmallRight:y("arrow-small-right",60063),arrowSmallUp:y("arrow-small-up",60064),arrowUp:y("arrow-up",60065),bell:y("bell",60066),bold:y("bold",60067),book:y("book",60068),bookmark:y("bookmark",60069),debugBreakpointConditionalUnverified:y("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:y("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:y("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:y("debug-breakpoint-data-unverified",60072),debugBreakpointData:y("debug-breakpoint-data",60073),debugBreakpointDataDisabled:y("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:y("debug-breakpoint-log-unverified",60074),debugBreakpointLog:y("debug-breakpoint-log",60075),debugBreakpointLogDisabled:y("debug-breakpoint-log-disabled",60075),briefcase:y("briefcase",60076),broadcast:y("broadcast",60077),browser:y("browser",60078),bug:y("bug",60079),calendar:y("calendar",60080),caseSensitive:y("case-sensitive",60081),check:y("check",60082),checklist:y("checklist",60083),chevronDown:y("chevron-down",60084),dropDownButton:y("drop-down-button",60084),chevronLeft:y("chevron-left",60085),chevronRight:y("chevron-right",60086),chevronUp:y("chevron-up",60087),chromeClose:y("chrome-close",60088),chromeMaximize:y("chrome-maximize",60089),chromeMinimize:y("chrome-minimize",60090),chromeRestore:y("chrome-restore",60091),circle:y("circle",60092),circleOutline:y("circle-outline",60092),debugBreakpointUnverified:y("debug-breakpoint-unverified",60092),circleSlash:y("circle-slash",60093),circuitBoard:y("circuit-board",60094),clearAll:y("clear-all",60095),clippy:y("clippy",60096),closeAll:y("close-all",60097),cloudDownload:y("cloud-download",60098),cloudUpload:y("cloud-upload",60099),code:y("code",60100),collapseAll:y("collapse-all",60101),colorMode:y("color-mode",60102),commentDiscussion:y("comment-discussion",60103),compareChanges:y("compare-changes",60157),creditCard:y("credit-card",60105),dash:y("dash",60108),dashboard:y("dashboard",60109),database:y("database",60110),debugContinue:y("debug-continue",60111),debugDisconnect:y("debug-disconnect",60112),debugPause:y("debug-pause",60113),debugRestart:y("debug-restart",60114),debugStart:y("debug-start",60115),debugStepInto:y("debug-step-into",60116),debugStepOut:y("debug-step-out",60117),debugStepOver:y("debug-step-over",60118),debugStop:y("debug-stop",60119),debug:y("debug",60120),deviceCameraVideo:y("device-camera-video",60121),deviceCamera:y("device-camera",60122),deviceMobile:y("device-mobile",60123),diffAdded:y("diff-added",60124),diffIgnored:y("diff-ignored",60125),diffModified:y("diff-modified",60126),diffRemoved:y("diff-removed",60127),diffRenamed:y("diff-renamed",60128),diff:y("diff",60129),discard:y("discard",60130),editorLayout:y("editor-layout",60131),emptyWindow:y("empty-window",60132),exclude:y("exclude",60133),extensions:y("extensions",60134),eyeClosed:y("eye-closed",60135),fileBinary:y("file-binary",60136),fileCode:y("file-code",60137),fileMedia:y("file-media",60138),filePdf:y("file-pdf",60139),fileSubmodule:y("file-submodule",60140),fileSymlinkDirectory:y("file-symlink-directory",60141),fileSymlinkFile:y("file-symlink-file",60142),fileZip:y("file-zip",60143),files:y("files",60144),filter:y("filter",60145),flame:y("flame",60146),foldDown:y("fold-down",60147),foldUp:y("fold-up",60148),fold:y("fold",60149),folderActive:y("folder-active",60150),folderOpened:y("folder-opened",60151),gear:y("gear",60152),gift:y("gift",60153),gistSecret:y("gist-secret",60154),gist:y("gist",60155),gitCommit:y("git-commit",60156),gitCompare:y("git-compare",60157),gitMerge:y("git-merge",60158),githubAction:y("github-action",60159),githubAlt:y("github-alt",60160),globe:y("globe",60161),grabber:y("grabber",60162),graph:y("graph",60163),gripper:y("gripper",60164),heart:y("heart",60165),home:y("home",60166),horizontalRule:y("horizontal-rule",60167),hubot:y("hubot",60168),inbox:y("inbox",60169),issueClosed:y("issue-closed",60324),issueReopened:y("issue-reopened",60171),issues:y("issues",60172),italic:y("italic",60173),jersey:y("jersey",60174),json:y("json",60175),bracket:y("bracket",60175),kebabVertical:y("kebab-vertical",60176),key:y("key",60177),law:y("law",60178),lightbulbAutofix:y("lightbulb-autofix",60179),linkExternal:y("link-external",60180),link:y("link",60181),listOrdered:y("list-ordered",60182),listUnordered:y("list-unordered",60183),liveShare:y("live-share",60184),loading:y("loading",60185),location:y("location",60186),mailRead:y("mail-read",60187),mail:y("mail",60188),markdown:y("markdown",60189),megaphone:y("megaphone",60190),mention:y("mention",60191),milestone:y("milestone",60192),gitPullRequestMilestone:y("git-pull-request-milestone",60192),mortarBoard:y("mortar-board",60193),move:y("move",60194),multipleWindows:y("multiple-windows",60195),mute:y("mute",60196),noNewline:y("no-newline",60197),note:y("note",60198),octoface:y("octoface",60199),openPreview:y("open-preview",60200),package:y("package",60201),paintcan:y("paintcan",60202),pin:y("pin",60203),play:y("play",60204),run:y("run",60204),plug:y("plug",60205),preserveCase:y("preserve-case",60206),preview:y("preview",60207),project:y("project",60208),pulse:y("pulse",60209),question:y("question",60210),quote:y("quote",60211),radioTower:y("radio-tower",60212),reactions:y("reactions",60213),references:y("references",60214),refresh:y("refresh",60215),regex:y("regex",60216),remoteExplorer:y("remote-explorer",60217),remote:y("remote",60218),remove:y("remove",60219),replaceAll:y("replace-all",60220),replace:y("replace",60221),repoClone:y("repo-clone",60222),repoForcePush:y("repo-force-push",60223),repoPull:y("repo-pull",60224),repoPush:y("repo-push",60225),report:y("report",60226),requestChanges:y("request-changes",60227),rocket:y("rocket",60228),rootFolderOpened:y("root-folder-opened",60229),rootFolder:y("root-folder",60230),rss:y("rss",60231),ruby:y("ruby",60232),saveAll:y("save-all",60233),saveAs:y("save-as",60234),save:y("save",60235),screenFull:y("screen-full",60236),screenNormal:y("screen-normal",60237),searchStop:y("search-stop",60238),server:y("server",60240),settingsGear:y("settings-gear",60241),settings:y("settings",60242),shield:y("shield",60243),smiley:y("smiley",60244),sortPrecedence:y("sort-precedence",60245),splitHorizontal:y("split-horizontal",60246),splitVertical:y("split-vertical",60247),squirrel:y("squirrel",60248),starFull:y("star-full",60249),starHalf:y("star-half",60250),symbolClass:y("symbol-class",60251),symbolColor:y("symbol-color",60252),symbolCustomColor:y("symbol-customcolor",60252),symbolConstant:y("symbol-constant",60253),symbolEnumMember:y("symbol-enum-member",60254),symbolField:y("symbol-field",60255),symbolFile:y("symbol-file",60256),symbolInterface:y("symbol-interface",60257),symbolKeyword:y("symbol-keyword",60258),symbolMisc:y("symbol-misc",60259),symbolOperator:y("symbol-operator",60260),symbolProperty:y("symbol-property",60261),wrench:y("wrench",60261),wrenchSubaction:y("wrench-subaction",60261),symbolSnippet:y("symbol-snippet",60262),tasklist:y("tasklist",60263),telescope:y("telescope",60264),textSize:y("text-size",60265),threeBars:y("three-bars",60266),thumbsdown:y("thumbsdown",60267),thumbsup:y("thumbsup",60268),tools:y("tools",60269),triangleDown:y("triangle-down",60270),triangleLeft:y("triangle-left",60271),triangleRight:y("triangle-right",60272),triangleUp:y("triangle-up",60273),twitter:y("twitter",60274),unfold:y("unfold",60275),unlock:y("unlock",60276),unmute:y("unmute",60277),unverified:y("unverified",60278),verified:y("verified",60279),versions:y("versions",60280),vmActive:y("vm-active",60281),vmOutline:y("vm-outline",60282),vmRunning:y("vm-running",60283),watch:y("watch",60284),whitespace:y("whitespace",60285),wholeWord:y("whole-word",60286),window:y("window",60287),wordWrap:y("word-wrap",60288),zoomIn:y("zoom-in",60289),zoomOut:y("zoom-out",60290),listFilter:y("list-filter",60291),listFlat:y("list-flat",60292),listSelection:y("list-selection",60293),selection:y("selection",60293),listTree:y("list-tree",60294),debugBreakpointFunctionUnverified:y("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:y("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:y("debug-breakpoint-function-disabled",60296),debugStackframeActive:y("debug-stackframe-active",60297),circleSmallFilled:y("circle-small-filled",60298),debugStackframeDot:y("debug-stackframe-dot",60298),debugStackframe:y("debug-stackframe",60299),debugStackframeFocused:y("debug-stackframe-focused",60299),debugBreakpointUnsupported:y("debug-breakpoint-unsupported",60300),symbolString:y("symbol-string",60301),debugReverseContinue:y("debug-reverse-continue",60302),debugStepBack:y("debug-step-back",60303),debugRestartFrame:y("debug-restart-frame",60304),callIncoming:y("call-incoming",60306),callOutgoing:y("call-outgoing",60307),menu:y("menu",60308),expandAll:y("expand-all",60309),feedback:y("feedback",60310),gitPullRequestReviewer:y("git-pull-request-reviewer",60310),groupByRefType:y("group-by-ref-type",60311),ungroupByRefType:y("ungroup-by-ref-type",60312),account:y("account",60313),gitPullRequestAssignee:y("git-pull-request-assignee",60313),bellDot:y("bell-dot",60314),debugConsole:y("debug-console",60315),library:y("library",60316),output:y("output",60317),runAll:y("run-all",60318),syncIgnored:y("sync-ignored",60319),pinned:y("pinned",60320),githubInverted:y("github-inverted",60321),debugAlt:y("debug-alt",60305),serverProcess:y("server-process",60322),serverEnvironment:y("server-environment",60323),pass:y("pass",60324),stopCircle:y("stop-circle",60325),playCircle:y("play-circle",60326),record:y("record",60327),debugAltSmall:y("debug-alt-small",60328),vmConnect:y("vm-connect",60329),cloud:y("cloud",60330),merge:y("merge",60331),exportIcon:y("export",60332),graphLeft:y("graph-left",60333),magnet:y("magnet",60334),notebook:y("notebook",60335),redo:y("redo",60336),checkAll:y("check-all",60337),pinnedDirty:y("pinned-dirty",60338),passFilled:y("pass-filled",60339),circleLargeFilled:y("circle-large-filled",60340),circleLarge:y("circle-large",60341),circleLargeOutline:y("circle-large-outline",60341),combine:y("combine",60342),gather:y("gather",60342),table:y("table",60343),variableGroup:y("variable-group",60344),typeHierarchy:y("type-hierarchy",60345),typeHierarchySub:y("type-hierarchy-sub",60346),typeHierarchySuper:y("type-hierarchy-super",60347),gitPullRequestCreate:y("git-pull-request-create",60348),runAbove:y("run-above",60349),runBelow:y("run-below",60350),notebookTemplate:y("notebook-template",60351),debugRerun:y("debug-rerun",60352),workspaceTrusted:y("workspace-trusted",60353),workspaceUntrusted:y("workspace-untrusted",60354),workspaceUnspecified:y("workspace-unspecified",60355),terminalCmd:y("terminal-cmd",60356),terminalDebian:y("terminal-debian",60357),terminalLinux:y("terminal-linux",60358),terminalPowershell:y("terminal-powershell",60359),terminalTmux:y("terminal-tmux",60360),terminalUbuntu:y("terminal-ubuntu",60361),terminalBash:y("terminal-bash",60362),arrowSwap:y("arrow-swap",60363),copy:y("copy",60364),personAdd:y("person-add",60365),filterFilled:y("filter-filled",60366),wand:y("wand",60367),debugLineByLine:y("debug-line-by-line",60368),inspect:y("inspect",60369),layers:y("layers",60370),layersDot:y("layers-dot",60371),layersActive:y("layers-active",60372),compass:y("compass",60373),compassDot:y("compass-dot",60374),compassActive:y("compass-active",60375),azure:y("azure",60376),issueDraft:y("issue-draft",60377),gitPullRequestClosed:y("git-pull-request-closed",60378),gitPullRequestDraft:y("git-pull-request-draft",60379),debugAll:y("debug-all",60380),debugCoverage:y("debug-coverage",60381),runErrors:y("run-errors",60382),folderLibrary:y("folder-library",60383),debugContinueSmall:y("debug-continue-small",60384),beakerStop:y("beaker-stop",60385),graphLine:y("graph-line",60386),graphScatter:y("graph-scatter",60387),pieChart:y("pie-chart",60388),bracketDot:y("bracket-dot",60389),bracketError:y("bracket-error",60390),lockSmall:y("lock-small",60391),azureDevops:y("azure-devops",60392),verifiedFilled:y("verified-filled",60393),newLine:y("newline",60394),layout:y("layout",60395),layoutActivitybarLeft:y("layout-activitybar-left",60396),layoutActivitybarRight:y("layout-activitybar-right",60397),layoutPanelLeft:y("layout-panel-left",60398),layoutPanelCenter:y("layout-panel-center",60399),layoutPanelJustify:y("layout-panel-justify",60400),layoutPanelRight:y("layout-panel-right",60401),layoutPanel:y("layout-panel",60402),layoutSidebarLeft:y("layout-sidebar-left",60403),layoutSidebarRight:y("layout-sidebar-right",60404),layoutStatusbar:y("layout-statusbar",60405),layoutMenubar:y("layout-menubar",60406),layoutCentered:y("layout-centered",60407),layoutSidebarRightOff:y("layout-sidebar-right-off",60416),layoutPanelOff:y("layout-panel-off",60417),layoutSidebarLeftOff:y("layout-sidebar-left-off",60418),target:y("target",60408),indent:y("indent",60409),recordSmall:y("record-small",60410),errorSmall:y("error-small",60411),arrowCircleDown:y("arrow-circle-down",60412),arrowCircleLeft:y("arrow-circle-left",60413),arrowCircleRight:y("arrow-circle-right",60414),arrowCircleUp:y("arrow-circle-up",60415),heartFilled:y("heart-filled",60420),map:y("map",60421),mapFilled:y("map-filled",60422),circleSmall:y("circle-small",60423),bellSlash:y("bell-slash",60424),bellSlashDot:y("bell-slash-dot",60425),commentUnresolved:y("comment-unresolved",60426),gitPullRequestGoToChanges:y("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:y("git-pull-request-new-changes",60428),searchFuzzy:y("search-fuzzy",60429),commentDraft:y("comment-draft",60430),send:y("send",60431),sparkle:y("sparkle",60432),insert:y("insert",60433),mic:y("mic",60434),thumbsDownFilled:y("thumbsdown-filled",60435),thumbsUpFilled:y("thumbsup-filled",60436),coffee:y("coffee",60437),snake:y("snake",60438),game:y("game",60439),vr:y("vr",60440),chip:y("chip",60441),piano:y("piano",60442),music:y("music",60443),micFilled:y("mic-filled",60444),gitFetch:y("git-fetch",60445),copilot:y("copilot",60446),lightbulbSparkle:y("lightbulb-sparkle",60447),lightbulbSparkleAutofix:y("lightbulb-sparkle-autofix",60447),robot:y("robot",60448),sparkleFilled:y("sparkle-filled",60449),diffSingle:y("diff-single",60450),diffMultiple:y("diff-multiple",60451),surroundWith:y("surround-with",60452),gitStash:y("git-stash",60454),gitStashApply:y("git-stash-apply",60455),gitStashPop:y("git-stash-pop",60456),dialogError:y("dialog-error","error"),dialogWarning:y("dialog-warning","warning"),dialogInfo:y("dialog-info","info"),dialogClose:y("dialog-close","close"),treeItemExpanded:y("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:y("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:y("tree-filter-on-type-off","list-selection"),treeFilterClear:y("tree-filter-clear","close"),treeItemLoading:y("tree-item-loading","loading"),menuSelection:y("menu-selection","check"),menuSubmenu:y("menu-submenu","chevron-right"),menuBarMore:y("menubar-more","more"),scrollbarButtonLeft:y("scrollbar-button-left","triangle-left"),scrollbarButtonRight:y("scrollbar-button-right","triangle-right"),scrollbarButtonUp:y("scrollbar-button-up","triangle-up"),scrollbarButtonDown:y("scrollbar-button-down","triangle-down"),toolBarMore:y("toolbar-more","more"),quickInputBack:y("quick-input-back","arrow-left")}}),define(se[55],oe([1,0,20]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function k(n){if(!n||typeof n!="object"||n instanceof RegExp)return n;const t=Array.isArray(n)?[]:{};return Object.entries(n).forEach(([r,u])=>{t[r]=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 r=t.shift();Object.freeze(r);for(const u in r)if(E.call(r,u)){const f=r[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 S(n,t){return p(n,t,new Set)}e.cloneAndChange=S;function p(n,t,r){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,r));return f}if((0,L.isObject)(n)){if(r.has(n))throw new Error("Cannot clone recursive data-structure");r.add(n);const f={};for(const c in n)E.call(n,c)&&(f[c]=p(n[c],t,r));return r.delete(n),f}return n}function _(n,t,r=!0){return(0,L.isObject)(n)?((0,L.isObject)(t)&&Object.keys(t).forEach(u=>{u in n?r&&((0,L.isObject)(n[u])&&(0,L.isObject)(t[u])?_(n[u],t[u],r):n[u]=t[u]):n[u]=t[u]}),n):t}e.mixin=_;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 r,u;if(Array.isArray(n)){if(n.length!==t.length)return!1;for(r=0;r<n.length;r++)if(!v(n[r],t[r]))return!1}else{const f=[];for(u in n)f.push(u);f.sort();const c=[];for(u in t)c.push(u);if(c.sort(),!v(f,c))return!1;for(r=0;r<f.length;r++)if(!v(n[f[r]],t[f[r]]))return!1}return!0}e.equals=v;function b(n){let t=[];for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}e.getAllPropertyNames=b;function a(n){const t=[];for(const r of b(n))typeof n[r]=="function"&&t.push(r);return t}e.getAllMethodNames=a;function i(n,t){const r=f=>function(){const c=Array.prototype.slice.call(arguments,0);return t(f,c)},u={};for(const f of n)u[f]=r(f);return u}e.createProxyObject=i}),define(se[28],oe([1,0,26]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.ThemeColor=void 0;var k;(function(E){function S(p){return p&&typeof p=="object"&&typeof p.id=="string"}E.isThemeColor=S})(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 S=new RegExp(`^(${E.iconNameExpression})(${E.iconModifierExpression})?$`);function p(f){const c=S.exec(f.id);if(!c)return p(L.Codicon.error);const[,d,s]=c,l=["codicon","codicon-"+d];return s&&l.push("codicon-modifier-"+s.substring(1)),l}E.asClassNameArray=p;function _(f){return p(f).join(" ")}E.asClassName=_;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 a=new RegExp(`^\\$\\((${E.iconNameExpression}(?:${E.iconModifierExpression})?)\\)$`);function i(f){const c=a.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 s=d.lastIndexOf("~");return s!==-1&&(d=d.substring(0,s)),c&&(d=`${d}~${c}`),{id:d}}E.modify=t;function r(f){const c=f.id.lastIndexOf("~");if(c!==-1)return f.id.substring(c+1)}E.getModifier=r;function u(f,c){var d,s;return f.id===c.id&&((d=f.color)===null||d===void 0?void 0:d.id)===((s=c.color)===null||s===void 0?void 0:s.id)}E.isEqual=u})(y||(e.ThemeIcon=y={}))}),define(se[126],oe([1,0,71,11,28]),function(te,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="$(",S=new RegExp(`\\$\\(${y.ThemeIcon.iconNameExpression}(?:${y.ThemeIcon.iconModifierExpression})?\\)`,"g"),p=new RegExp(`(\\\\)?${S.source}`,"g");function _(f){return f.replace(p,(c,d)=>d?c:`\\${c}`)}e.escapeIcons=_;const v=new RegExp(`\\\\${S.source}`,"g");function b(f){return f.replace(v,c=>`\\${c}`)}e.markdownEscapeEscapedIcons=b;const a=new RegExp(`(\\s)?(\\\\)?${S.source}(\\s)?`,"g");function i(f){return f.indexOf(E)===-1?f:f.replace(a,(c,d,s,l)=>s?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 r(f){t.lastIndex=0;let c="";const d=[];let s=0;for(;;){const l=t.lastIndex,o=t.exec(f),g=f.substring(l,o?.index);if(g.length>0){c+=g;for(let h=0;h<g.length;h++)d.push(s)}if(!o)break;s+=o[0].length}return{text:c,iconOffsets:d}}e.parseLabelWithIcons=r;function u(f,c,d=!1){const{text:s,iconOffsets:l}=c;if(!l||l.length===0)return(0,L.matchesFuzzy)(f,s,d);const o=(0,k.ltrim)(s," "),g=s.length-o.length,h=(0,L.matchesFuzzy)(f,o,d);if(h)for(const m of h){const C=l[m.start+g]+g;m.start+=C,m.end+=C}return h}e.matchesFuzzyIconAware=u}),define(se[174],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32=e.toUint8=void 0;function L(y){return y<0?0:y>255?255:y|0}e.toUint8=L;function k(y){return y<0?0:y>4294967295?4294967295:y|0}e.toUint32=k}),define(se[175],oe([1,0]),function(te,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 S=0;S<E.length;S++)E[S]=Math.floor(Math.random()*256);return E};const k=new Uint8Array(16),y=[];for(let E=0;E<256;E++)y.push(E.toString(16).padStart(2,"0"));return function(){L(k),k[6]=k[6]&15|64,k[8]=k[8]&63|128;let S=0,p="";return p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p+="-",p+=y[k[S++]],p+=y[k[S++]],p+="-",p+=y[k[S++]],p+=y[k[S++]],p+="-",p+=y[k[S++]],p+=y[k[S++]],p+="-",p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p+=y[k[S++]],p}}()}),define(se[176],oe([1,0,13,52,175]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.matchesMimeType=e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function E(a){return{asString:async()=>a,asFile:()=>{},value:typeof a=="string"?a:void 0}}e.createStringDataTransferItem=E;function S(a,i,n){const t={id:(0,y.generateUuid)(),name:a,uri:i,data:n};return{asString:async()=>"",asFile:()=>t,value:void 0}}e.createFileDataTransferItem=S;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,r])=>r.asFile())&&n.push("files"),b(_(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 _(i)}}e.VSDataTransfer=p;function _(a){return a.toLowerCase()}function v(a,i){return b(_(a),i.map(_))}e.matchesMimeType=v;function b(a,i){if(a==="*/*")return i.length>0;if(i.includes(a))return!0;const n=a.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!n)return!1;const[t,r,u]=n;return u==="*"?i.some(f=>f.startsWith(r+"/")):!1}e.UriList=Object.freeze({create:a=>(0,L.distinct)(a.map(i=>i.toString())).join(`\r
|
||
`),split:a=>a.split(`\r
|
||
`),parse:a=>e.UriList.split(a).filter(i=>!i.startsWith("#"))})}),define(se[272],oe([9]),{}),define(se[408],oe([9]),{}),define(se[409],oe([9]),{}),define(se[410],oe([9]),{}),define(se[411],oe([9]),{}),define(se[177],oe([1,0,410,411]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(se[412],oe([9]),{}),define(se[413],oe([9]),{}),define(se[273],oe([9]),{}),define(se[274],oe([9]),{}),define(se[414],oe([9]),{}),define(se[415],oe([9]),{}),define(se[416],oe([9]),{}),define(se[417],oe([9]),{}),define(se[275],oe([9]),{}),define(se[418],oe([9]),{}),define(se[200],oe([1,0,418]),function(te,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(se[419],oe([9]),{}),define(se[420],oe([9]),{}),define(se[421],oe([9]),{}),define(se[422],oe([9]),{}),define(se[423],oe([9]),{}),define(se[424],oe([9]),{}),define(se[425],oe([9]),{}),define(se[426],oe([9]),{}),define(se[427],oe([9]),{}),define(se[428],oe([9]),{}),define(se[429],oe([9]),{}),define(se[430],oe([9]),{}),define(se[431],oe([9]),{}),define(se[432],oe([9]),{}),define(se[433],oe([9]),{}),define(se[434],oe([9]),{}),define(se[435],oe([9]),{}),define(se[436],oe([9]),{}),define(se[437],oe([9]),{}),define(se[438],oe([9]),{}),define(se[439],oe([9]),{}),define(se[440],oe([9]),{}),define(se[441],oe([9]),{}),define(se[442],oe([9]),{}),define(se[443],oe([9]),{}),define(se[444],oe([9]),{}),define(se[445],oe([9]),{}),define(se[446],oe([9]),{}),define(se[447],oe([9]),{}),define(se[448],oe([9]),{}),define(se[449],oe([9]),{}),define(se[450],oe([9]),{}),define(se[451],oe([9]),{}),define(se[452],oe([9]),{}),define(se[453],oe([9]),{}),define(se[454],oe([9]),{}),define(se[455],oe([9]),{}),define(se[456],oe([9]),{}),define(se[201],oe([9]),{}),define(se[457],oe([9]),{}),define(se[458],oe([9]),{}),define(se[459],oe([9]),{}),define(se[460],oe([9]),{}),define(se[461],oe([9]),{}),define(se[462],oe([9]),{}),define(se[463],oe([9]),{}),define(se[464],oe([9]),{}),define(se[465],oe([9]),{}),define(se[466],oe([9]),{}),define(se[467],oe([9]),{}),define(se[468],oe([9]),{}),define(se[469],oe([9]),{}),define(se[470],oe([9]),{}),define(se[471],oe([9]),{}),define(se[472],oe([9]),{}),define(se[473],oe([9]),{}),define(se[474],oe([9]),{}),define(se[475],oe([9]),{}),define(se[476],oe([9]),{}),define(se[477],oe([9]),{}),define(se[478],oe([9]),{}),define(se[479],oe([9]),{}),define(se[480],oe([9]),{}),define(se[481],oe([9]),{}),define(se[482],oe([9]),{}),define(se[483],oe([9]),{}),define(se[484],oe([9]),{}),define(se[485],oe([9]),{}),define(se[486],oe([9]),{}),define(se[487],oe([9]),{}),define(se[276],oe([9]),{}),define(se[488],oe([9]),{}),define(se[489],oe([9]),{}),define(se[178],oe([9]),{}),define(se[490],oe([9]),{}),define(se[72],oe([1,0,40]),function(te,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(se[491],oe([1,0,44,72]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class y{constructor(_,v){this.chr=_,this.type=v,this.width=0}fulfill(_){this.width=_}}e.CharWidthRequest=y;class E{constructor(_,v){this._bareFontInfo=_,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 _=document.createElement("div");_.style.position="absolute",_.style.top="-50000px",_.style.width="50000px";const v=document.createElement("div");(0,k.applyFontInfo)(v,this._bareFontInfo),_.appendChild(v);const b=document.createElement("div");(0,k.applyFontInfo)(b,this._bareFontInfo),b.style.fontWeight="bold",_.appendChild(b);const a=document.createElement("div");(0,k.applyFontInfo)(a,this._bareFontInfo),a.style.fontStyle="italic",_.appendChild(a);const i=[];for(const n of this._requests){let t;n.type===0&&(t=v),n.type===2&&(t=b),n.type===1&&(t=a),t.appendChild(document.createElement("br"));const r=document.createElement("span");E._render(r,n),t.appendChild(r),i.push(r)}this._container=_,this._testElements=i}static _render(_,v){if(v.chr===" "){let b="\xA0";for(let a=0;a<8;a++)b+=b;_.innerText=b}else{let b=v.chr;for(let a=0;a<8;a++)b+=b;_.textContent=b}}_readFromDomElements(){for(let _=0,v=this._requests.length;_<v;_++){const b=this._requests[_],a=this._testElements[_];b.fulfill(a.offsetWidth/256)}}}function S(p,_){new E(p,_).read()}e.readCharWidths=S}),define(se[492],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class L{constructor(_,v){this.key=_,this.migrate=v}apply(_){const v=L._read(_,this.key),b=i=>L._read(_,i),a=(i,n)=>L._write(_,i,n);this.migrate(v,b,a)}static _read(_,v){if(typeof _>"u")return;const b=v.indexOf(".");if(b>=0){const a=v.substring(0,b);return this._read(_[a],v.substring(b+1))}return _[v]}static _write(_,v,b){const a=v.indexOf(".");if(a>=0){const i=v.substring(0,a);_[i]=_[i]||{},this._write(_[i],v.substring(a+1),b);return}_[v]=b}}e.EditorSettingMigration=L,L.items=[];function k(p,_){L.items.push(new L(p,_))}function y(p,_){k(p,(v,b,a)=>{if(typeof v<"u"){for(const[i,n]of _)if(v===i){a(p,n);return}}})}function E(p){L.items.forEach(_=>_.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,_,v)=>{p===!1&&(v("autoClosingBrackets","never"),typeof _("autoClosingQuotes")>"u"&&v("autoClosingQuotes","never"),typeof _("autoSurround")>"u"&&v("autoSurround","never"))}),k("renderIndentGuides",(p,_,v)=>{typeof p<"u"&&(v("renderIndentGuides",void 0),typeof _("guides.indentation")>"u"&&v("guides.indentation",!!p))}),k("highlightActiveIndentGuide",(p,_,v)=>{typeof p<"u"&&(v("highlightActiveIndentGuide",void 0),typeof _("guides.highlightActiveIndentation")>"u"&&v("guides.highlightActiveIndentation",!!p))});const S={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,_,v)=>{if(p&&typeof p=="object"){for(const b of Object.entries(S))p[b[0]]===!1&&typeof _(`suggest.${b[1]}`)>"u"&&v(`suggest.${b[1]}`,!1);v("suggest.filteredTypes",void 0)}}),k("quickSuggestions",(p,_,v)=>{if(typeof p=="boolean"){const b=p?"on":"off";v("quickSuggestions",{comments:b,strings:b,other:b})}}),k("experimental.stickyScroll.enabled",(p,_,v)=>{typeof p=="boolean"&&(v("experimental.stickyScroll.enabled",void 0),typeof _("stickyScroll.enabled")>"u"&&v("stickyScroll.enabled",p))}),k("experimental.stickyScroll.maxLineCount",(p,_,v)=>{typeof p=="number"&&(v("experimental.stickyScroll.maxLineCount",void 0),typeof _("stickyScroll.maxLineCount")>"u"&&v("stickyScroll.maxLineCount",p))}),k("codeActionsOnSave",(p,_,v)=>{if(p&&typeof p=="object"){let b=!1;const a={};for(const i of Object.entries(p))typeof i[1]=="boolean"?(b=!0,a[i[0]]=i[1]?"explicit":"never"):a[i[0]]=i[1];b&&v("codeActionsOnSave",a)}}),k("codeActionWidget.includeNearbyQuickfixes",(p,_,v)=>{typeof p=="boolean"&&(v("codeActionWidget.includeNearbyQuickfixes",void 0),typeof _("codeActionWidget.includeNearbyQuickFixes")>"u"&&v("codeActionWidget.includeNearbyQuickFixes",p))}),k("lightbulb.enabled",(p,_,v)=>{typeof p=="boolean"&&v("lightbulb.enabled",p?void 0:"off")})}),define(se[202],oe([1,0,6]),function(te,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(se[127],oe([1,0]),function(te,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,S=0;const p=y.getVisibleRanges();if(p.length>0){E=p[0].getStartPosition();const _=y.getTopForPosition(E.lineNumber,E.column);S=y.getScrollTop()-_}return new L(y.getScrollTop(),y.getContentHeight(),E,S,y.getPosition())}constructor(y,E,S,p,_){this._initialScrollTop=y,this._initialContentHeight=E,this._visiblePosition=S,this._visiblePositionScrollDelta=p,this._cursorPosition=_}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 S=y.getTopForLineNumber(E.lineNumber)-y.getTopForLineNumber(this._cursorPosition.lineNumber);y.setScrollTop(y.getScrollTop()+S)}}e.StableEditorScrollState=L}),define(se[148],oe([1,0]),function(te,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,a){this._restrictedRenderingContextBrand=void 0,this._viewLayout=b,this.viewportData=a,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,a){return this._viewLayout.getVerticalOffsetForLineNumber(b,a)}getVerticalOffsetAfterLineNumber(b,a){return this._viewLayout.getVerticalOffsetAfterLineNumber(b,a)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=L;class k extends L{constructor(b,a,i){super(b,a),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(b,a){return this._viewLines.linesVisibleRangesForRange(b,a)}visibleRangeForPosition(b){return this._viewLines.visibleRangeForPosition(b)}}e.RenderingContext=k;class y{constructor(b,a,i,n){this.outsideRenderedLine=b,this.lineNumber=a,this.ranges=i,this.continuesOnNextLine=n}}e.LineVisibleRanges=y;class E{static from(b){const a=new Array(b.length);for(let i=0,n=b.length;i<n;i++){const t=b[i];a[i]=new E(t.left,t.width)}return a}constructor(b,a){this._horizontalRangeBrand=void 0,this.left=Math.round(b),this.width=Math.round(a)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=E;class S{constructor(b,a){this._floatHorizontalRangeBrand=void 0,this.left=b,this.width=a}toString(){return`[${this.left},${this.width}]`}static compare(b,a){return b.left-a.left}}e.FloatHorizontalRange=S;class p{constructor(b,a){this.outsideRenderedLine=b,this.originalLeft=a,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=p;class _{constructor(b,a){this.outsideRenderedLine=b,this.ranges=a}}e.VisibleRanges=_}),define(se[493],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomReadingContext=void 0;class L{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const y=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=y.left,this._clientRectScale=y.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(y,E){this._domNode=y,this.endNode=E,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}e.DomReadingContext=L}),define(se[494],oe([1,0,148]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class k{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(E,S){E.selectNodeContents(S)}static _readClientRects(E,S,p,_,v){const b=this._createRange();try{return b.setStart(E,S),b.setEnd(p,_),b.getClientRects()}catch{return null}finally{this._detachRange(b,v)}}static _mergeAdjacentRanges(E){if(E.length===1)return E;E.sort(L.FloatHorizontalRange.compare);const S=[];let p=0,_=E[0];for(let v=1,b=E.length;v<b;v++){const a=E[v];_.left+_.width+.9>=a.left?_.width=Math.max(_.width,a.left+a.width-_.left):(S[p++]=_,_=a)}return S[p++]=_,S}static _createHorizontalRangesFromClientRects(E,S,p){if(!E||E.length===0)return null;const _=[];for(let v=0,b=E.length;v<b;v++){const a=E[v];_[v]=new L.FloatHorizontalRange(Math.max(0,(a.left-S)/p),a.width/p)}return this._mergeAdjacentRanges(_)}static readHorizontalRanges(E,S,p,_,v,b){const i=E.children.length-1;if(0>i)return null;if(S=Math.min(i,Math.max(0,S)),_=Math.min(i,Math.max(0,_)),S===_&&p===v&&p===0&&!E.children[S].firstChild){const u=E.children[S].getClientRects();return b.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,b.clientRectDeltaLeft,b.clientRectScale)}S!==_&&_>0&&v===0&&(_--,v=1073741824);let n=E.children[S].firstChild,t=E.children[_].firstChild;if((!n||!t)&&(!n&&p===0&&S>0&&(n=E.children[S-1].firstChild,p=1073741824),!t&&v===0&&_>0&&(t=E.children[_-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 r=this._readClientRects(n,p,t,v,b.endNode);return b.markDidDomLayout(),this._createHorizontalRangesFromClientRects(r,b.clientRectDeltaLeft,b.clientRectScale)}}e.RangeUtil=k}),define(se[277],oe([1,0]),function(te,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(se[495],oe([1,0,277,174]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class y{constructor(S,p){this.scale=p,this._minimapCharRendererBrand=void 0,this.charDataNormal=y.soften(S,12/15),this.charDataLight=y.soften(S,50/60)}static soften(S,p){const _=new Uint8ClampedArray(S.length);for(let v=0,b=S.length;v<b;v++)_[v]=(0,k.toUint8)(S[v]*p);return _}renderChar(S,p,_,v,b,a,i,n,t,r,u){const f=1*this.scale,c=2*this.scale,d=u?1:c;if(p+f>S.width||_+d>S.height){console.warn("bad render request outside image data");return}const s=r?this.charDataLight:this.charDataNormal,l=(0,L.getCharIndex)(v,t),o=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(a,n),T=S.data;let A=l*f*c,P=_*o+p*4;for(let N=0;N<d;N++){let M=P;for(let R=0;R<f;R++){const x=s[A++]/255*(a/255);T[M++]=g+C*x,T[M++]=h+w*x,T[M++]=m+D*x,T[M++]=I}P+=o}}blockRenderChar(S,p,_,v,b,a,i,n){const t=1*this.scale,r=2*this.scale,u=n?1:r;if(p+t>S.width||_+u>S.height){console.warn("bad render request outside image data");return}const f=S.width*4,c=.5*(b/255),d=a.r,s=a.g,l=a.b,o=v.r-d,g=v.g-s,h=v.b-l,m=d+o*c,C=s+g*c,w=l+h*c,D=Math.max(b,i),I=S.data;let T=_*f+p*4;for(let A=0;A<u;A++){let P=T;for(let N=0;N<t;N++)I[P++]=m,I[P++]=C,I[P++]=w,I[P++]=D;T+=f}}}e.MinimapCharRenderer=y}),define(se[496],oe([1,0,108]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const k={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},y=E=>{const S=new Uint8ClampedArray(E.length/2);for(let p=0;p<E.length;p+=2)S[p>>1]=k[E[p]]<<4|k[E[p+1]]&15;return S};e.prebakedMiniMaps={1:(0,L.createSingleCallFunction)(()=>y("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,L.createSingleCallFunction)(()=>y("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(se[497],oe([1,0,495,277,496,174]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class S{static create(_,v){if(this.lastCreated&&_===this.lastCreated.scale&&v===this.lastFontFamily)return this.lastCreated;let b;return y.prebakedMiniMaps[_]?b=new L.MinimapCharRenderer(y.prebakedMiniMaps[_](),_):b=S.createFromSampleData(S.createSampleData(v).data,_),this.lastFontFamily=v,this.lastCreated=b,b}static createSampleData(_){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 ${_}`,b.textBaseline="middle";let a=0;for(const i of k.allCharCodes)b.fillText(String.fromCharCode(i),a,16/2),a+=10;return b.getImageData(0,0,96*10,16)}static createFromSampleData(_,v){if(_.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const a=S._downsample(_,v);return new L.MinimapCharRenderer(a,v)}static _downsampleChar(_,v,b,a,i){const n=1*i,t=2*i;let r=a,u=0;for(let f=0;f<t;f++){const c=f/t*16,d=(f+1)/t*16;for(let s=0;s<n;s++){const l=s/n*10,o=(s+1)/n*10;let g=0,h=0;for(let C=c;C<d;C++){const w=v+Math.floor(C)*3840,D=1-(C-Math.floor(C));for(let I=l;I<o;I++){const T=1-(I-Math.floor(I)),A=w+Math.floor(I)*4,P=T*D;h+=P,g+=_[A]*_[A+3]/255*P}}const m=g/h;u=Math.max(u,m),b[r++]=(0,E.toUint8)(m)}}return u}static _downsample(_,v){const b=2*v*1*v,a=b*96,i=new Uint8ClampedArray(a);let n=0,t=0,r=0;for(let u=0;u<96;u++)r=Math.max(r,this._downsampleChar(_,t,i,n,v)),n+=b,t+=10*4;if(r>0){const u=255/r;for(let f=0;f<a;f++)i[f]*=u}return i}}e.MinimapCharRendererFactory=S}),define(se[498],oe([1,0,6,2]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DelegatingEditor=void 0;class y extends k.Disposable{constructor(){super(...arguments),this._id=++y.idCounter,this._onDidDispose=this._register(new L.Emitter),this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(S){return this._targetEditor.getVisibleColumnFromPosition(S)}getPosition(){return this._targetEditor.getPosition()}setPosition(S,p="api"){this._targetEditor.setPosition(S,p)}revealLine(S,p=0){this._targetEditor.revealLine(S,p)}revealLineInCenter(S,p=0){this._targetEditor.revealLineInCenter(S,p)}revealLineInCenterIfOutsideViewport(S,p=0){this._targetEditor.revealLineInCenterIfOutsideViewport(S,p)}revealLineNearTop(S,p=0){this._targetEditor.revealLineNearTop(S,p)}revealPosition(S,p=0){this._targetEditor.revealPosition(S,p)}revealPositionInCenter(S,p=0){this._targetEditor.revealPositionInCenter(S,p)}revealPositionInCenterIfOutsideViewport(S,p=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(S,p)}revealPositionNearTop(S,p=0){this._targetEditor.revealPositionNearTop(S,p)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(S,p="api"){this._targetEditor.setSelection(S,p)}setSelections(S,p="api"){this._targetEditor.setSelections(S,p)}revealLines(S,p,_=0){this._targetEditor.revealLines(S,p,_)}revealLinesInCenter(S,p,_=0){this._targetEditor.revealLinesInCenter(S,p,_)}revealLinesInCenterIfOutsideViewport(S,p,_=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(S,p,_)}revealLinesNearTop(S,p,_=0){this._targetEditor.revealLinesNearTop(S,p,_)}revealRange(S,p=0,_=!1,v=!0){this._targetEditor.revealRange(S,p,_,v)}revealRangeInCenter(S,p=0){this._targetEditor.revealRangeInCenter(S,p)}revealRangeInCenterIfOutsideViewport(S,p=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(S,p)}revealRangeNearTop(S,p=0){this._targetEditor.revealRangeNearTop(S,p)}revealRangeNearTopIfOutsideViewport(S,p=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(S,p)}revealRangeAtTop(S,p=0){this._targetEditor.revealRangeAtTop(S,p)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(S,p,_){this._targetEditor.trigger(S,p,_)}createDecorationsCollection(S){return this._targetEditor.createDecorationsCollection(S)}changeDecorations(S){return this._targetEditor.changeDecorations(S)}}e.DelegatingEditor=y,y.idCounter=0}),define(se[499],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectPool=void 0;class L{constructor(y){this._create=y,this._unused=new Set,this._used=new Set,this._itemData=new Map}getUnusedObj(y){var E;let S;if(this._unused.size===0)S=this._create(y),this._itemData.set(S,y);else{const p=[...this._unused.values()];S=(E=p.find(_=>this._itemData.get(_).getId()===y.getId()))!==null&&E!==void 0?E:p[0],this._unused.delete(S),this._itemData.set(S,y),S.setData(y)}return this._used.add(S),{object:S,dispose:()=>{this._used.delete(S),this._unused.size>5?S.dispose():this._unused.add(S)}}}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(se[278],oe([1,0]),function(te,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(se[149],oe([1,0,6]),function(te,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(se[128],oe([1,0,174]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class k{constructor(S){const p=(0,L.toUint8)(S);this._defaultValue=p,this._asciiMap=k._createAsciiMap(p),this._map=new Map}static _createAsciiMap(S){const p=new Uint8Array(256);return p.fill(S),p}set(S,p){const _=(0,L.toUint8)(p);S>=0&&S<256?this._asciiMap[S]=_:this._map.set(S,_)}get(S){return S>=0&&S<256?this._asciiMap[S]:this._map.get(S)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=k;class y{constructor(){this._actual=new k(0)}add(S){this._actual.set(S,1)}has(S){return this._actual.get(S)===1}clear(){return this._actual.clear()}}e.CharacterSet=y}),define(se[85],oe([1,0,11]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class k{static _nextVisibleColumn(E,S,p){return E===9?k.nextRenderTabStop(S,p):L.isFullWidthCharacter(E)||L.isEmojiImprecise(E)?S+2:S+1}static visibleColumnFromColumn(E,S,p){const _=Math.min(S-1,E.length),v=E.substring(0,_),b=new L.GraphemeIterator(v);let a=0;for(;!b.eol();){const i=L.getNextCodePoint(v,_,b.offset);b.nextGraphemeLength(),a=this._nextVisibleColumn(i,a,p)}return a}static columnFromVisibleColumn(E,S,p){if(S<=0)return 1;const _=E.length,v=new L.GraphemeIterator(E);let b=0,a=1;for(;!v.eol();){const i=L.getNextCodePoint(E,_,v.offset);v.nextGraphemeLength();const n=this._nextVisibleColumn(i,b,p),t=v.offset+1;if(n>=S){const r=S-b;return n-S<r?t:a}b=n,a=t}return _+1}static nextRenderTabStop(E,S){return E+S-E%S}static nextIndentTabStop(E,S){return E+S-E%S}static prevRenderTabStop(E,S){return Math.max(0,E-1-(E-1)%S)}static prevIndentTabStop(E,S){return Math.max(0,E-1-(E-1)%S)}}e.CursorColumns=k}),define(se[129],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=void 0;function L(k){let y=0,E=0,S=0,p=0;for(let _=0,v=k.length;_<v;_++){const b=k.charCodeAt(_);b===13?(y===0&&(E=_),y++,_+1<v&&k.charCodeAt(_+1)===10?(p|=2,_++):p|=3,S=_+1):b===10&&(p|=1,y===0&&(E=_),y++,S=_+1)}return y===0&&(E=k.length),[y,E,k.length-S,p]}e.countEOL=L}),define(se[203],oe([1,0,11,85]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function y(S,p,_){let v=0;for(let a=0;a<S.length;a++)S.charAt(a)===" "?v=k.CursorColumns.nextIndentTabStop(v,p):v++;let b="";if(!_){const a=Math.floor(v/p);v=v%p;for(let i=0;i<a;i++)b+=" "}for(let a=0;a<v;a++)b+=" ";return b}function E(S,p,_){let v=L.firstNonWhitespaceIndex(S);return v===-1&&(v=S.length),y(S.substring(0,v),p,_)+S.substring(v)}e.normalizeIndentation=E}),define(se[73],oe([1,0,12]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OffsetRangeSet=e.OffsetRange=void 0;class k{static addRange(S,p){let _=0;for(;_<p.length&&p[_].endExclusive<S.start;)_++;let v=_;for(;v<p.length&&p[v].start<=S.endExclusive;)v++;if(_===v)p.splice(_,0,S);else{const b=Math.min(S.start,p[_].start),a=Math.max(S.endExclusive,p[v-1].endExclusive);p.splice(_,v-_,new k(b,a))}}static ofLength(S){return new k(0,S)}static ofStartAndLength(S,p){return new k(S,S+p)}constructor(S,p){if(this.start=S,this.endExclusive=p,S>p)throw new L.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(S){return new k(this.start+S,this.endExclusive+S)}deltaStart(S){return new k(this.start+S,this.endExclusive)}deltaEnd(S){return new k(this.start,this.endExclusive+S)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(S){return this.start<=S&&S<this.endExclusive}join(S){return new k(Math.min(this.start,S.start),Math.max(this.endExclusive,S.endExclusive))}intersect(S){const p=Math.max(this.start,S.start),_=Math.min(this.endExclusive,S.endExclusive);if(p<=_)return new k(p,_)}intersects(S){const p=Math.max(this.start,S.start),_=Math.min(this.endExclusive,S.endExclusive);return p<_}isBefore(S){return this.endExclusive<=S.start}isAfter(S){return this.start>=S.endExclusive}slice(S){return S.slice(this.start,this.endExclusive)}clip(S){if(this.isEmpty)throw new L.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,S))}clipCyclic(S){if(this.isEmpty)throw new L.BugIndicatingError(`Invalid clipping range: ${this.toString()}`);return S<this.start?this.endExclusive-(this.start-S)%this.length:S>=this.endExclusive?this.start+(S-this.start)%this.length:S}forEach(S){for(let p=this.start;p<this.endExclusive;p++)S(p)}}e.OffsetRange=k;class y{constructor(){this._sortedRanges=[]}addRange(S){let p=0;for(;p<this._sortedRanges.length&&this._sortedRanges[p].endExclusive<S.start;)p++;let _=p;for(;_<this._sortedRanges.length&&this._sortedRanges[_].start<=S.endExclusive;)_++;if(p===_)this._sortedRanges.splice(p,0,S);else{const v=Math.min(S.start,this._sortedRanges[p].start),b=Math.max(S.endExclusive,this._sortedRanges[_-1].endExclusive);this._sortedRanges.splice(p,_-p,new k(v,b))}}toString(){return this._sortedRanges.map(S=>S.toString()).join(", ")}intersectsStrict(S){let p=0;for(;p<this._sortedRanges.length&&this._sortedRanges[p].endExclusive<=S.start;)p++;return p<this._sortedRanges.length&&this._sortedRanges[p].start<S.endExclusive}intersectWithRange(S){const p=new y;for(const _ of this._sortedRanges){const v=_.intersect(S);v&&p.addRange(v)}return p}intersectWithRangeLength(S){return this.intersectWithRange(S).length}get length(){return this._sortedRanges.reduce((S,p)=>S+p.length,0)}}e.OffsetRangeSet=y}),define(se[10],oe([1,0]),function(te,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.lineNumber<E.lineNumber?!0:E.lineNumber<y.lineNumber?!1:y.column<E.column}isBeforeOrEqual(y){return L.isBeforeOrEqual(this,y)}static isBeforeOrEqual(y,E){return y.lineNumber<E.lineNumber?!0:E.lineNumber<y.lineNumber?!1:y.column<=E.column}static compare(y,E){const S=y.lineNumber|0,p=E.lineNumber|0;if(S===p){const _=y.column|0,v=E.column|0;return _-v}return S-p}clone(){return new L(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(y){return new L(y.lineNumber,y.column)}static isIPosition(y){return y&&typeof y.lineNumber=="number"&&typeof y.column=="number"}toJSON(){return{lineNumber:this.lineNumber,column:this.column}}}e.Position=L}),define(se[279],oe([1,0,10]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class k{constructor(E){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=E}emitKeyDown(E){var S;(S=this.onKeyDown)===null||S===void 0||S.call(this,E)}emitKeyUp(E){var S;(S=this.onKeyUp)===null||S===void 0||S.call(this,E)}emitContextMenu(E){var S;(S=this.onContextMenu)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseMove(E){var S;(S=this.onMouseMove)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseLeave(E){var S;(S=this.onMouseLeave)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDown(E){var S;(S=this.onMouseDown)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseUp(E){var S;(S=this.onMouseUp)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDrag(E){var S;(S=this.onMouseDrag)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDrop(E){var S;(S=this.onMouseDrop)===null||S===void 0||S.call(this,this._convertViewToModelMouseEvent(E))}emitMouseDropCanceled(){var E;(E=this.onMouseDropCanceled)===null||E===void 0||E.call(this)}emitMouseWheel(E){var S;(S=this.onMouseWheel)===null||S===void 0||S.call(this,E)}_convertViewToModelMouseEvent(E){return E.target?{event:E.event,target:this._convertViewToModelMouseTarget(E.target)}:E}_convertViewToModelMouseTarget(E){return k.convertViewToModelMouseTarget(E,this._coordinatesConverter)}static convertViewToModelMouseTarget(E,S){const p={...E};return p.position&&(p.position=S.convertViewPositionToModelPosition(p.position)),p.range&&(p.range=S.convertViewRangeToModelRange(p.range)),(p.type===5||p.type===8)&&(p.detail=this.convertViewToModelViewZoneData(p.detail,S)),p}static convertViewToModelViewZoneData(E,S){return{viewZoneId:E.viewZoneId,positionBefore:E.positionBefore?S.convertViewPositionToModelPosition(E.positionBefore):E.positionBefore,positionAfter:E.positionAfter?S.convertViewPositionToModelPosition(E.positionAfter):E.positionAfter,position:S.convertViewPositionToModelPosition(E.position),afterLineNumber:S.convertViewPositionToModelPosition(new L.Position(E.afterLineNumber,1)).lineNumber}}}e.ViewUserInputEvents=k}),define(se[5],oe([1,0,10]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class k{constructor(E,S,p,_){E>p||E===p&&S>_?(this.startLineNumber=p,this.startColumn=_,this.endLineNumber=E,this.endColumn=S):(this.startLineNumber=E,this.startColumn=S,this.endLineNumber=p,this.endColumn=_)}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,S){return!(S.lineNumber<E.startLineNumber||S.lineNumber>E.endLineNumber||S.lineNumber===E.startLineNumber&&S.column<E.startColumn||S.lineNumber===E.endLineNumber&&S.column>E.endColumn)}static strictContainsPosition(E,S){return!(S.lineNumber<E.startLineNumber||S.lineNumber>E.endLineNumber||S.lineNumber===E.startLineNumber&&S.column<=E.startColumn||S.lineNumber===E.endLineNumber&&S.column>=E.endColumn)}containsRange(E){return k.containsRange(this,E)}static containsRange(E,S){return!(S.startLineNumber<E.startLineNumber||S.endLineNumber<E.startLineNumber||S.startLineNumber>E.endLineNumber||S.endLineNumber>E.endLineNumber||S.startLineNumber===E.startLineNumber&&S.startColumn<E.startColumn||S.endLineNumber===E.endLineNumber&&S.endColumn>E.endColumn)}strictContainsRange(E){return k.strictContainsRange(this,E)}static strictContainsRange(E,S){return!(S.startLineNumber<E.startLineNumber||S.endLineNumber<E.startLineNumber||S.startLineNumber>E.endLineNumber||S.endLineNumber>E.endLineNumber||S.startLineNumber===E.startLineNumber&&S.startColumn<=E.startColumn||S.endLineNumber===E.endLineNumber&&S.endColumn>=E.endColumn)}plusRange(E){return k.plusRange(this,E)}static plusRange(E,S){let p,_,v,b;return S.startLineNumber<E.startLineNumber?(p=S.startLineNumber,_=S.startColumn):S.startLineNumber===E.startLineNumber?(p=S.startLineNumber,_=Math.min(S.startColumn,E.startColumn)):(p=E.startLineNumber,_=E.startColumn),S.endLineNumber>E.endLineNumber?(v=S.endLineNumber,b=S.endColumn):S.endLineNumber===E.endLineNumber?(v=S.endLineNumber,b=Math.max(S.endColumn,E.endColumn)):(v=E.endLineNumber,b=E.endColumn),new k(p,_,v,b)}intersectRanges(E){return k.intersectRanges(this,E)}static intersectRanges(E,S){let p=E.startLineNumber,_=E.startColumn,v=E.endLineNumber,b=E.endColumn;const a=S.startLineNumber,i=S.startColumn,n=S.endLineNumber,t=S.endColumn;return p<a?(p=a,_=i):p===a&&(_=Math.max(_,i)),v>n?(v=n,b=t):v===n&&(b=Math.min(b,t)),p>v||p===v&&_>b?null:new k(p,_,v,b)}equalsRange(E){return k.equalsRange(this,E)}static equalsRange(E,S){return!E&&!S?!0:!!E&&!!S&&E.startLineNumber===S.startLineNumber&&E.startColumn===S.startColumn&&E.endLineNumber===S.endLineNumber&&E.endColumn===S.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,S){return new k(this.startLineNumber,this.startColumn,E,S)}setStartPosition(E,S){return new k(E,S,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,S=E){return new k(E.lineNumber,E.column,S.lineNumber,S.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,S){return!(E.endLineNumber<S.startLineNumber||E.endLineNumber===S.startLineNumber&&E.endColumn<S.startColumn||S.endLineNumber<E.startLineNumber||S.endLineNumber===E.startLineNumber&&S.endColumn<E.startColumn)}static areIntersecting(E,S){return!(E.endLineNumber<S.startLineNumber||E.endLineNumber===S.startLineNumber&&E.endColumn<=S.startColumn||S.endLineNumber<E.startLineNumber||S.endLineNumber===E.startLineNumber&&S.endColumn<=E.startColumn)}static compareRangesUsingStarts(E,S){if(E&&S){const v=E.startLineNumber|0,b=S.startLineNumber|0;if(v===b){const a=E.startColumn|0,i=S.startColumn|0;if(a===i){const n=E.endLineNumber|0,t=S.endLineNumber|0;if(n===t){const r=E.endColumn|0,u=S.endColumn|0;return r-u}return n-t}return a-i}return v-b}return(E?1:0)-(S?1:0)}static compareRangesUsingEnds(E,S){return E.endLineNumber===S.endLineNumber?E.endColumn===S.endColumn?E.startLineNumber===S.startLineNumber?E.startColumn-S.startColumn:E.startLineNumber-S.startLineNumber:E.endColumn-S.endColumn:E.endLineNumber-S.endLineNumber}static spansMultipleLines(E){return E.endLineNumber>E.startLineNumber}toJSON(){return this}}e.Range=k}),define(se[280],oe([1,0,11,5]),function(te,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,_,v,b,a){this.value=p,this.selectionStart=_,this.selectionEnd=v,this.selection=b,this.newlineCountBeforeSelection=a}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(p,_){const v=p.getValue(),b=p.getSelectionStart(),a=p.getSelectionEnd();let i;if(_){const n=v.substring(0,b),t=_.value.substring(0,_.selectionStart);n===t&&(i=_.newlineCountBeforeSelection)}return new y(v,b,a,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,_,v){e._debugComposition&&console.log(`writeToTextArea ${p}: ${this.toString()}`),_.setValue(p,this.value),v&&_.setSelectionRange(p,this.selectionStart,this.selectionEnd)}deduceEditorPosition(p){var _,v,b,a,i,n,t,r;if(p<=this.selectionStart){const c=this.value.substring(p,this.selectionStart);return this._finishDeduceEditorPosition((v=(_=this.selection)===null||_===void 0?void 0:_.getStartPosition())!==null&&v!==void 0?v:null,c,-1)}if(p>=this.selectionEnd){const c=this.value.substring(this.selectionEnd,p);return this._finishDeduceEditorPosition((a=(b=this.selection)===null||b===void 0?void 0:b.getEndPosition())!==null&&a!==void 0?a: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((r=(t=this.selection)===null||t===void 0?void 0:t.getEndPosition())!==null&&r!==void 0?r:null,f,-1)}_finishDeduceEditorPosition(p,_,v){let b=0,a=-1;for(;(a=_.indexOf(`
|
||
`,a+1))!==-1;)b++;return[p,v*_.length,b]}static deduceInput(p,_,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: ${_.toString()}`));const b=Math.min(L.commonPrefixLength(p.value,_.value),p.selectionStart,_.selectionStart),a=Math.min(L.commonSuffixLength(p.value,_.value),p.value.length-p.selectionEnd,_.value.length-_.selectionEnd),i=p.value.substring(b,p.value.length-a),n=_.value.substring(b,_.value.length-a),t=p.selectionStart-b,r=p.selectionEnd-b,u=_.selectionStart-b,f=_.selectionEnd-b;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${i}>, selectionStart: ${t}, selectionEnd: ${r}`),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=r-t;return{text:n,replacePrevCharCnt:c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(p,_){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: ${_.toString()}`)),p.value===_.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:_.selectionEnd-p.selectionEnd};const v=Math.min(L.commonPrefixLength(p.value,_.value),p.selectionEnd),b=Math.min(L.commonSuffixLength(p.value,_.value),p.value.length-p.selectionEnd),a=p.value.substring(v,p.value.length-b),i=_.value.substring(v,_.value.length-b),n=p.selectionStart-v,t=p.selectionEnd-v,r=_.selectionStart-v,u=_.selectionEnd-v;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${n}, selectionEnd: ${t}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${r}, selectionEnd: ${u}`)),{text:i,replacePrevCharCnt:t,replaceNextCharCnt:a.length-t,positionDelta:u-i.length}}}e.TextAreaState=y,y.EMPTY=new y("",0,0,null,void 0);class E{static _getPageOfLine(p,_){return Math.floor((p-1)/_)}static _getRangeForPage(p,_){const v=p*_,b=v+1,a=v+_;return new k.Range(b,1,a+1,1)}static fromEditorSelection(p,_,v,b){const i=E._getPageOfLine(_.startLineNumber,v),n=E._getRangeForPage(i,v),t=E._getPageOfLine(_.endLineNumber,v),r=E._getRangeForPage(t,v);let u=n.intersectRanges(new k.Range(1,1,_.startLineNumber,_.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 s=r.intersectRanges(new k.Range(_.endLineNumber,_.endColumn,c,d));if(b&&p.getValueLengthInRange(s,1)>500){const g=p.modifyPosition(s.getStartPosition(),500);s=k.Range.fromPositions(s.getStartPosition(),g)}const l=p.getValueInRange(s,1);let o;if(i===t||i+1===t)o=p.getValueInRange(_,1);else{const g=n.intersectRanges(_),h=r.intersectRanges(_);o=p.getValueInRange(g,1)+String.fromCharCode(8230)+p.getValueInRange(h,1)}return b&&o.length>2*500&&(o=o.substring(0,500)+String.fromCharCode(8230)+o.substring(o.length-500,o.length)),new y(f+o+l,f.length,f.length+o.length,_,u.endLineNumber-u.startLineNumber)}}e.PagedScreenReaderStrategy=E}),define(se[74],oe([1,0,5]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class k{static insert(E,S){return{range:new L.Range(E.lineNumber,E.column,E.lineNumber,E.column),text:S,forceMoveMarkers:!0}}static delete(E){return{range:E,text:null}}static replace(E,S){return{range:E,text:S}}static replaceMove(E,S){return{range:E,text:S,forceMoveMarkers:!0}}}e.EditOperation=k}),define(se[500],oe([1,0,11,74,5]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class E{constructor(_,v){this._selection=_,this._cursors=v,this._selectionId=null}getEditOperations(_,v){const b=S(_,this._cursors);for(let a=0,i=b.length;a<i;a++){const n=b[a];v.addEditOperation(n.range,n.text)}this._selectionId=v.trackSelection(this._selection)}computeCursorState(_,v){return v.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=E;function S(p,_){_.sort((n,t)=>n.lineNumber===t.lineNumber?n.column-t.column:n.lineNumber-t.lineNumber);for(let n=_.length-2;n>=0;n--)_[n].lineNumber===_[n+1].lineNumber&&_.splice(n,1);const v=[];let b=0,a=0;const i=_.length;for(let n=1,t=p.getLineCount();n<=t;n++){const r=p.getLineContent(n),u=r.length+1;let f=0;if(a<i&&_[a].lineNumber===n&&(f=_[a].column,a++,f===u)||r.length===0)continue;const c=L.lastNonWhitespaceIndex(r);let d=0;if(c===-1)d=1;else if(c!==r.length-1)d=c+2;else continue;d=Math.max(f,d),v[b++]=k.EditOperation.delete(new y.Range(n,d,n,u))}return v}e.trimTrailingWhitespace=S}),define(se[62],oe([1,0,12,73,5,60]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRangeSet=e.LineRange=void 0;class S{static fromRangeInclusive(v){return new S(v.startLineNumber,v.endLineNumber+1)}static joinMany(v){if(v.length===0)return[];let b=new p(v[0].slice());for(let a=1;a<v.length;a++)b=b.getUnion(new p(v[a].slice()));return b.ranges}static ofLength(v,b){return new S(v,v+b)}static deserialize(v){return new S(v[0],v[1])}constructor(v,b){if(v>b)throw new L.BugIndicatingError(`startLineNumber ${v} cannot be after endLineNumberExclusive ${b}`);this.startLineNumber=v,this.endLineNumberExclusive=b}contains(v){return this.startLineNumber<=v&&v<this.endLineNumberExclusive}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(v){return new S(this.startLineNumber+v,this.endLineNumberExclusive+v)}deltaLength(v){return new S(this.startLineNumber,this.endLineNumberExclusive+v)}get length(){return this.endLineNumberExclusive-this.startLineNumber}join(v){return new S(Math.min(this.startLineNumber,v.startLineNumber),Math.max(this.endLineNumberExclusive,v.endLineNumberExclusive))}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}intersect(v){const b=Math.max(this.startLineNumber,v.startLineNumber),a=Math.min(this.endLineNumberExclusive,v.endLineNumberExclusive);if(b<=a)return new S(b,a)}intersectsStrict(v){return this.startLineNumber<v.endLineNumberExclusive&&v.startLineNumber<this.endLineNumberExclusive}overlapOrTouch(v){return this.startLineNumber<=v.endLineNumberExclusive&&v.startLineNumber<=this.endLineNumberExclusive}equals(v){return this.startLineNumber===v.startLineNumber&&this.endLineNumberExclusive===v.endLineNumberExclusive}toInclusiveRange(){return this.isEmpty?null:new y.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER)}toExclusiveRange(){return new y.Range(this.startLineNumber,1,this.endLineNumberExclusive,1)}mapToLineArray(v){const b=[];for(let a=this.startLineNumber;a<this.endLineNumberExclusive;a++)b.push(v(a));return b}forEach(v){for(let b=this.startLineNumber;b<this.endLineNumberExclusive;b++)v(b)}serialize(){return[this.startLineNumber,this.endLineNumberExclusive]}includes(v){return this.startLineNumber<=v&&v<this.endLineNumberExclusive}toOffsetRange(){return new k.OffsetRange(this.startLineNumber-1,this.endLineNumberExclusive-1)}}e.LineRange=S;class p{constructor(v=[]){this._normalizedRanges=v}get ranges(){return this._normalizedRanges}addRange(v){if(v.length===0)return;const b=(0,E.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,i=>i.endLineNumberExclusive>=v.startLineNumber),a=(0,E.findLastIdxMonotonous)(this._normalizedRanges,i=>i.startLineNumber<=v.endLineNumberExclusive)+1;if(b===a)this._normalizedRanges.splice(b,0,v);else if(b===a-1){const i=this._normalizedRanges[b];this._normalizedRanges[b]=i.join(v)}else{const i=this._normalizedRanges[b].join(this._normalizedRanges[a-1]).join(v);this._normalizedRanges.splice(b,a-b,i)}}contains(v){const b=(0,E.findLastMonotonous)(this._normalizedRanges,a=>a.startLineNumber<=v);return!!b&&b.endLineNumberExclusive>v}intersects(v){const b=(0,E.findLastMonotonous)(this._normalizedRanges,a=>a.startLineNumber<v.endLineNumberExclusive);return!!b&&b.endLineNumberExclusive>v.startLineNumber}getUnion(v){if(this._normalizedRanges.length===0)return v;if(v._normalizedRanges.length===0)return this;const b=[];let a=0,i=0,n=null;for(;a<this._normalizedRanges.length||i<v._normalizedRanges.length;){let t=null;if(a<this._normalizedRanges.length&&i<v._normalizedRanges.length){const r=this._normalizedRanges[a],u=v._normalizedRanges[i];r.startLineNumber<u.startLineNumber?(t=r,a++):(t=u,i++)}else a<this._normalizedRanges.length?(t=this._normalizedRanges[a],a++):(t=v._normalizedRanges[i],i++);n===null?n=t:n.endLineNumberExclusive>=t.startLineNumber?n=new S(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),a=(0,E.findLastIdxMonotonous)(this._normalizedRanges,t=>t.startLineNumber<=v.endLineNumberExclusive)+1;if(b===a)return new p([v]);const i=[];let n=v.startLineNumber;for(let t=b;t<a;t++){const r=this._normalizedRanges[t];r.startLineNumber>n&&i.push(new S(n,r.startLineNumber)),n=r.endLineNumberExclusive}return n<v.endLineNumberExclusive&&i.push(new S(n,v.endLineNumberExclusive)),new p(i)}toString(){return this._normalizedRanges.map(v=>v.toString()).join(", ")}getIntersection(v){const b=[];let a=0,i=0;for(;a<this._normalizedRanges.length&&i<v._normalizedRanges.length;){const n=this._normalizedRanges[a],t=v._normalizedRanges[i],r=n.intersect(t);r&&!r.isEmpty&&b.push(r),n.endLineNumberExclusive<t.endLineNumberExclusive?a++:i++}return new p(b)}getWithDelta(v){return new p(this._normalizedRanges.map(b=>b.delta(v)))}}e.LineRangeSet=p}),define(se[281],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class L{constructor(y,E,S,p){this._rgba8Brand=void 0,this.r=L._clamp(y),this.g=L._clamp(E),this.b=L._clamp(S),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(se[24],oe([1,0,10,5]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class y extends k.Range{constructor(S,p,_,v){super(S,p,_,v),this.selectionStartLineNumber=S,this.selectionStartColumn=p,this.positionLineNumber=_,this.positionColumn=v}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(S){return y.selectionsEqual(this,S)}static selectionsEqual(S,p){return S.selectionStartLineNumber===p.selectionStartLineNumber&&S.selectionStartColumn===p.selectionStartColumn&&S.positionLineNumber===p.positionLineNumber&&S.positionColumn===p.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(S,p){return this.getDirection()===0?new y(this.startLineNumber,this.startColumn,S,p):new y(S,p,this.startLineNumber,this.startColumn)}getPosition(){return new L.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new L.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(S,p){return this.getDirection()===0?new y(S,p,this.endLineNumber,this.endColumn):new y(this.endLineNumber,this.endColumn,S,p)}static fromPositions(S,p=S){return new y(S.lineNumber,S.column,p.lineNumber,p.column)}static fromRange(S,p){return p===0?new y(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn):new y(S.endLineNumber,S.endColumn,S.startLineNumber,S.startColumn)}static liftSelection(S){return new y(S.selectionStartLineNumber,S.selectionStartColumn,S.positionLineNumber,S.positionColumn)}static selectionsArrEqual(S,p){if(S&&!p||!S&&p)return!1;if(!S&&!p)return!0;if(S.length!==p.length)return!1;for(let _=0,v=S.length;_<v;_++)if(!this.selectionsEqual(S[_],p[_]))return!1;return!0}static isISelection(S){return S&&typeof S.selectionStartLineNumber=="number"&&typeof S.selectionStartColumn=="number"&&typeof S.positionLineNumber=="number"&&typeof S.positionColumn=="number"}static createWithDirection(S,p,_,v,b){return b===0?new y(S,p,_,v):new y(_,v,S,p)}}e.Selection=y}),define(se[130],oe([1,0,24]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class k{constructor(v,b,a=!1){this._range=v,this._text=b,this.insertsAutoWhitespace=a}getEditOperations(v,b){b.addTrackedEditOperation(this._range,this._text)}computeCursorState(v,b){const i=b.getInverseEditOperations()[0].range;return L.Selection.fromPositions(i.getEndPosition())}}e.ReplaceCommand=k;class y{constructor(v,b){this._range=v,this._text=b}getEditOperations(v,b){b.addTrackedEditOperation(this._range,this._text)}computeCursorState(v,b){const i=b.getInverseEditOperations()[0].range;return L.Selection.fromRange(i,0)}}e.ReplaceCommandThatSelectsText=y;class E{constructor(v,b,a=!1){this._range=v,this._text=b,this.insertsAutoWhitespace=a}getEditOperations(v,b){b.addTrackedEditOperation(this._range,this._text)}computeCursorState(v,b){const i=b.getInverseEditOperations()[0].range;return L.Selection.fromPositions(i.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=E;class S{constructor(v,b,a,i,n=!1){this._range=v,this._text=b,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=a,this.insertsAutoWhitespace=n}getEditOperations(v,b){b.addTrackedEditOperation(this._range,this._text)}computeCursorState(v,b){const i=b.getInverseEditOperations()[0].range;return L.Selection.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=S;class p{constructor(v,b,a,i=!1){this._range=v,this._text=b,this._initialSelection=a,this._forceMoveMarkers=i,this._selectionId=null}getEditOperations(v,b){b.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=b.trackSelection(this._initialSelection)}computeCursorState(v,b){return b.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=p}),define(se[501],oe([1,0,5,24]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class y{constructor(p,_,v){this._range=p,this._charBeforeSelection=_,this._charAfterSelection=v}getEditOperations(p,_){_.addTrackedEditOperation(new L.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),_.addTrackedEditOperation(new L.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(p,_){const v=_.getInverseEditOperations(),b=v[0].range,a=v[1].range;return new k.Selection(b.endLineNumber,b.endColumn,a.endLineNumber,a.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=y;class E{constructor(p,_,v){this._position=p,this._text=_,this._charAfter=v}getEditOperations(p,_){_.addTrackedEditOperation(new L.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(p,_){const b=_.getInverseEditOperations()[0].range;return new k.Selection(b.endLineNumber,b.startColumn,b.endLineNumber,b.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=E}),define(se[179],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDITOR_MODEL_DEFAULTS=void 0,e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}}}),define(se[150],oe([1,0,128]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=void 0;class k extends L.CharacterClassifier{constructor(S){super(0);for(let p=0,_=S.length;p<_;p++)this.set(S.charCodeAt(p),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=k;function y(E){const S={};return p=>(S.hasOwnProperty(p)||(S[p]=E(p)),S[p])}e.getMapForWordSeparators=y(E=>new k(E))}),define(se[151],oe([1,0,52,66]),function(te,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 a of e.USUAL_WORD_SEPARATORS)v.indexOf(a)>=0||(b+="\\"+a);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 a="g";v.ignoreCase&&(a+="i"),v.multiline&&(a+="m"),v.unicode&&(a+="u"),b=new RegExp(v.source,a)}return b.lastIndex=0,b}e.ensureValidWordDefinition=E;const S=new k.LinkedList;S.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function p(v,b,a,i,n){if(b=E(b),n||(n=L.Iterable.first(S)),a.length>n.maxLen){let c=v-n.maxLen/2;return c<0?c=0:i+=c,a=a.substring(c,v+n.maxLen/2),p(v,b,a,i,n)}const t=Date.now(),r=v-1-i;let u=-1,f=null;for(let c=1;!(Date.now()-t>=n.timeBudget);c++){const d=r-n.windowSize*c;b.lastIndex=Math.max(0,d);const s=_(b,a,r,u);if(!s&&f||(f=s,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 _(v,b,a,i){let n;for(;n=v.exec(b);){const t=n.index||0;if(t<=a&&v.lastIndex>=a)return n;if(i>0&&t>i)return null}return null}}),define(se[282],oe([1,0,85]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class k{static whitespaceVisibleColumn(E,S,p){const _=E.length;let v=0,b=-1,a=-1;for(let i=0;i<_;i++){if(i===S)return[b,a,v];switch(v%p===0&&(b=i,a=v),E.charCodeAt(i)){case 32:v+=1;break;case 9:v=L.CursorColumns.nextRenderTabStop(v,p);break;default:return[-1,-1,-1]}}return S===_?[b,a,v]:[-1,-1,-1]}static atomicPosition(E,S,p,_){const v=E.length,[b,a,i]=k.whitespaceVisibleColumn(E,S,p);if(i===-1)return-1;let n;switch(_){case 0:n=!0;break;case 1:n=!1;break;case 2:if(i%p===0)return S;n=i%p<=p/2;break}if(n){if(b===-1)return-1;let u=a;for(let f=b;f<v;++f){if(u===a+p)return b;switch(E.charCodeAt(f)){case 32:u+=1;break;case 9:u=L.CursorColumns.nextRenderTabStop(u,p);break;default:return-1}}return u===a+p?b:-1}const t=L.CursorColumns.nextRenderTabStop(i,p);let r=i;for(let u=S;u<v;u++){if(r===t)return u;switch(E.charCodeAt(u)){case 32:r+=1;break;case 9:r=L.CursorColumns.nextRenderTabStop(r,p);break;default:return-1}}return r===t?v:-1}}e.AtomicTabMoveOperations=k}),define(se[502],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class L{constructor(y,E,S,p){this._cursorContextBrand=void 0,this.model=y,this.viewModel=E,this.coordinatesConverter=S,this.cursorConfig=p}}e.CursorContext=L}),define(se[152],oe([1,0,13,12,73]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DateTimeout=e.InfiniteTimeout=e.OffsetPair=e.SequenceDiff=e.DiffAlgorithmResult=void 0;class E{static trivial(a,i){return new E([new S(y.OffsetRange.ofLength(a.length),y.OffsetRange.ofLength(i.length))],!1)}static trivialTimedOut(a,i){return new E([new S(y.OffsetRange.ofLength(a.length),y.OffsetRange.ofLength(i.length))],!0)}constructor(a,i){this.diffs=a,this.hitTimeout=i}}e.DiffAlgorithmResult=E;class S{static invert(a,i){const n=[];return(0,L.forEachAdjacent)(a,(t,r)=>{n.push(S.fromOffsetPairs(t?t.getEndExclusives():p.zero,r?r.getStarts():new p(i,(t?t.seq2Range.endExclusive-t.seq1Range.endExclusive:0)+i)))}),n}static fromOffsetPairs(a,i){return new S(new y.OffsetRange(a.offset1,i.offset1),new y.OffsetRange(a.offset2,i.offset2))}constructor(a,i){this.seq1Range=a,this.seq2Range=i}swap(){return new S(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(a){return new S(this.seq1Range.join(a.seq1Range),this.seq2Range.join(a.seq2Range))}delta(a){return a===0?this:new S(this.seq1Range.delta(a),this.seq2Range.delta(a))}deltaStart(a){return a===0?this:new S(this.seq1Range.deltaStart(a),this.seq2Range.deltaStart(a))}deltaEnd(a){return a===0?this:new S(this.seq1Range.deltaEnd(a),this.seq2Range.deltaEnd(a))}intersect(a){const i=this.seq1Range.intersect(a.seq1Range),n=this.seq2Range.intersect(a.seq2Range);if(!(!i||!n))return new S(i,n)}getStarts(){return new p(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new p(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}e.SequenceDiff=S;class p{constructor(a,i){this.offset1=a,this.offset2=i}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(a){return a===0?this:new p(this.offset1+a,this.offset2+a)}equals(a){return this.offset1===a.offset1&&this.offset2===a.offset2}}e.OffsetPair=p,p.zero=new p(0,0),p.max=new p(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class _{isValid(){return!0}}e.InfiniteTimeout=_,_.instance=new _;class v{constructor(a){if(this.timeout=a,this.startTime=Date.now(),this.valid=!0,a<=0)throw new k.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime<this.timeout)&&this.valid){this.valid=!1;debugger}return this.valid}}e.DateTimeout=v}),define(se[283],oe([1,0,73,152]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class y{compute(v,b,a=k.InfiniteTimeout.instance){if(v.length===0||b.length===0)return k.DiffAlgorithmResult.trivial(v,b);const i=v,n=b;function t(g,h){for(;g<i.length&&h<n.length&&i.getElement(g)===n.getElement(h);)g++,h++;return g}let r=0;const u=new S;u.set(0,t(0,0));const f=new p;f.set(0,u.get(0)===0?null:new E(null,0,0,u.get(0)));let c=0;e:for(;;){if(r++,!a.isValid())return k.DiffAlgorithmResult.trivialTimedOut(i,n);const g=-Math.min(r,n.length+r%2),h=Math.min(r,i.length+r%2);for(c=g;c<=h;c+=2){let m=0;const C=c===h?-1:u.get(c+1),w=c===g?-1:u.get(c-1)+1;m++;const D=Math.min(Math.max(C,w),i.length),I=D-c;if(m++,D>i.length||I>n.length)continue;const T=t(D,I);u.set(c,T);const A=D===C?f.get(c+1):f.get(c-1);if(f.set(c,T!==D?new E(A,D,I,T-D):A),u.get(c)===i.length&&u.get(c)-c===n.length)break e}}let d=f.get(c);const s=[];let l=i.length,o=n.length;for(;;){const g=d?d.x+d.length:0,h=d?d.y+d.length:0;if((g!==l||h!==o)&&s.push(new k.SequenceDiff(new L.OffsetRange(g,l),new L.OffsetRange(h,o))),!d)break;l=d.x,o=d.y,d=d.prev}return s.reverse(),new k.DiffAlgorithmResult(s,!1)}}e.MyersDiffAlgorithm=y;class E{constructor(v,b,a,i){this.prev=v,this.x=b,this.y=a,this.length=i}}class S{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 a=this.negativeArr;this.negativeArr=new Int32Array(a.length*2),this.negativeArr.set(a)}this.negativeArr[v]=b}else{if(v>=this.positiveArr.length){const a=this.positiveArr;this.positiveArr=new Int32Array(a.length*2),this.positiveArr.set(a)}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(se[284],oe([1,0,13,73,152]),function(te,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,r,u){let f=u;return f=S(t,r,f),f=S(t,r,f),f=p(t,r,f),f}e.optimizeSequenceDiffs=E;function S(t,r,u){if(u.length===0)return u;const f=[];f.push(u[0]);for(let d=1;d<u.length;d++){const s=f[f.length-1];let l=u[d];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const o=l.seq1Range.start-s.seq1Range.endExclusive;let g;for(g=1;g<=o&&!(t.getElement(l.seq1Range.start-g)!==t.getElement(l.seq1Range.endExclusive-g)||r.getElement(l.seq2Range.start-g)!==r.getElement(l.seq2Range.endExclusive-g));g++);if(g--,g===o){f[f.length-1]=new y.SequenceDiff(new k.OffsetRange(s.seq1Range.start,l.seq1Range.endExclusive-o),new k.OffsetRange(s.seq2Range.start,l.seq2Range.endExclusive-o));continue}l=l.delta(-g)}f.push(l)}const c=[];for(let d=0;d<f.length-1;d++){const s=f[d+1];let l=f[d];if(l.seq1Range.isEmpty||l.seq2Range.isEmpty){const o=s.seq1Range.start-l.seq1Range.endExclusive;let g;for(g=0;g<o&&!(!t.isStronglyEqual(l.seq1Range.start+g,l.seq1Range.endExclusive+g)||!r.isStronglyEqual(l.seq2Range.start+g,l.seq2Range.endExclusive+g));g++);if(g===o){f[d+1]=new y.SequenceDiff(new k.OffsetRange(l.seq1Range.start+o,s.seq1Range.endExclusive),new k.OffsetRange(l.seq2Range.start+o,s.seq2Range.endExclusive));continue}g>0&&(l=l.delta(g))}c.push(l)}return f.length>0&&c.push(f[f.length-1]),c}function p(t,r,u){if(!t.getBoundaryScore||!r.getBoundaryScore)return u;for(let f=0;f<u.length;f++){const c=f>0?u[f-1]:void 0,d=u[f],s=f+1<u.length?u[f+1]:void 0,l=new k.OffsetRange(c?c.seq1Range.endExclusive+1:0,s?s.seq1Range.start-1:t.length),o=new k.OffsetRange(c?c.seq2Range.endExclusive+1:0,s?s.seq2Range.start-1:r.length);d.seq1Range.isEmpty?u[f]=_(d,t,r,l,o):d.seq2Range.isEmpty&&(u[f]=_(d.swap(),r,t,o,l).swap())}return u}function _(t,r,u,f,c){let s=1;for(;t.seq1Range.start-s>=f.start&&t.seq2Range.start-s>=c.start&&u.isStronglyEqual(t.seq2Range.start-s,t.seq2Range.endExclusive-s)&&s<100;)s++;s--;let l=0;for(;t.seq1Range.start+l<f.endExclusive&&t.seq2Range.endExclusive+l<c.endExclusive&&u.isStronglyEqual(t.seq2Range.start+l,t.seq2Range.endExclusive+l)&&l<100;)l++;if(s===0&&l===0)return t;let o=0,g=-1;for(let h=-s;h<=l;h++){const m=t.seq2Range.start+h,C=t.seq2Range.endExclusive+h,w=t.seq1Range.start+h,D=r.getBoundaryScore(w)+u.getBoundaryScore(m)+u.getBoundaryScore(C);D>g&&(g=D,o=h)}return t.delta(o)}function v(t,r,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,r,u){const f=y.SequenceDiff.invert(u,t.length),c=[];let d=new y.OffsetPair(0,0);function s(o,g){if(o.offset1<d.offset1||o.offset2<d.offset2)return;const h=t.findWordContaining(o.offset1),m=r.findWordContaining(o.offset2);if(!h||!m)return;let C=new y.SequenceDiff(h,m);const w=C.intersect(g);let D=w.seq1Range.length,I=w.seq2Range.length;for(;f.length>0;){const T=f[0];if(!(T.seq1Range.intersects(h)||T.seq2Range.intersects(m)))break;const P=t.findWordContaining(T.seq1Range.start),N=r.findWordContaining(T.seq2Range.start),M=new y.SequenceDiff(P,N),R=M.intersect(T);if(D+=R.seq1Range.length,I+=R.seq2Range.length,C=C.join(M),C.seq1Range.endExclusive>=T.seq1Range.endExclusive)f.shift();else break}D+I<(C.seq1Range.length+C.seq2Range.length)*2/3&&c.push(C),d=C.getEndExclusives()}for(;f.length>0;){const o=f.shift();o.seq1Range.isEmpty||(s(o.getStarts(),o),s(o.getEndExclusives().delta(-1),o))}return a(u,c)}e.extendDiffsToEntireWordIfAppropriate=b;function a(t,r){const u=[];for(;t.length>0||r.length>0;){const f=t[0],c=r[0];let d;f&&(!c||f.seq1Range.start<c.seq1Range.start)?d=t.shift():d=r.shift(),u.length>0&&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,r,u){let f=u;if(f.length===0)return f;let c=0,d;do{d=!1;const s=[f[0]];for(let l=1;l<f.length;l++){let h=function(C,w){const D=new k.OffsetRange(g.seq1Range.endExclusive,o.seq1Range.start);return t.getText(D).replace(/\s/g,"").length<=4&&(C.seq1Range.length+C.seq2Range.length>5||w.seq1Range.length+w.seq2Range.length>5)};const o=f[l],g=s[s.length-1];h(g,o)?(d=!0,s[s.length-1]=s[s.length-1].join(o)):s.push(o)}f=s}while(c++<10&&d);return f}e.removeVeryShortMatchingLinesBetweenDiffs=i;function n(t,r,u){let f=u;if(f.length===0)return f;let c=0,d;do{d=!1;const l=[f[0]];for(let o=1;o<f.length;o++){let m=function(w,D){const I=new k.OffsetRange(h.seq1Range.endExclusive,g.seq1Range.start);if(t.countLinesIn(I)>5||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 P=t.countLinesIn(w.seq1Range),N=w.seq1Range.length,M=r.countLinesIn(w.seq2Range),R=w.seq2Range.length,x=t.countLinesIn(D.seq1Range),O=D.seq1Range.length,B=r.countLinesIn(D.seq2Range),W=D.seq2Range.length,V=2*40+50;function K(F){return Math.min(F,V)}return Math.pow(Math.pow(K(P*40+N),1.5)+Math.pow(K(M*40+R),1.5),1.5)+Math.pow(Math.pow(K(x*40+O),1.5)+Math.pow(K(B*40+W),1.5),1.5)>(V**1.5)**1.5*1.3};const g=f[o],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 s=[];return(0,L.forEachWithNeighbors)(f,(l,o,g)=>{let h=o;function m(A){return A.length>0&&A.trim().length<=3&&o.seq1Range.length+o.seq2Range.length>100}const C=t.extendToFullLines(o.seq1Range),w=t.getText(new k.OffsetRange(C.start,o.seq1Range.start));m(w)&&(h=h.deltaStart(-w.length));const D=t.getText(new k.OffsetRange(o.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),T=h.intersect(I);s.length>0&&T.getStarts().equals(s[s.length-1].getEndExclusives())?s[s.length-1]=s[s.length-1].join(T):s.push(T)}),s}e.removeVeryShortMatchingTextBetweenLongDiffs=n}),define(se[503],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=void 0;class L{constructor(E,S){this.trimmedHash=E,this.lines=S}getElement(E){return this.trimmedHash[E]}get length(){return this.trimmedHash.length}getBoundaryScore(E){const S=E===0?0:k(this.lines[E-1]),p=E===this.lines.length?0:k(this.lines[E]);return 1e3-(S+p)}getText(E){return this.lines.slice(E.start,E.endExclusive).join(`
|
||
`)}isStronglyEqual(E,S){return this.lines[E]===this.lines[S]}}e.LineSequence=L;function k(y){let E=0;for(;E<y.length&&(y.charCodeAt(E)===32||y.charCodeAt(E)===9);)E++;return E}}),define(se[204],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRangeFragment=e.isSpace=e.Array2D=void 0;class L{constructor(S,p){this.width=S,this.height=p,this.array=[],this.array=new Array(S*p)}get(S,p){return this.array[S+p*this.width]}set(S,p,_){this.array[S+p*this.width]=_}}e.Array2D=L;function k(E){return E===32||E===9}e.isSpace=k;class y{static getKey(S){let p=this.chrKeys.get(S);return p===void 0&&(p=this.chrKeys.size,this.chrKeys.set(S,p)),p}constructor(S,p,_){this.range=S,this.lines=p,this.source=_,this.histogram=[];let v=0;for(let b=S.startLineNumber-1;b<S.endLineNumberExclusive-1;b++){const a=p[b];for(let n=0;n<a.length;n++){v++;const t=a[n],r=y.getKey(t);this.histogram[r]=(this.histogram[r]||0)+1}v++;const i=y.getKey(`
|
||
`);this.histogram[i]=(this.histogram[i]||0)+1}this.totalCount=v}computeSimilarity(S){var p,_;let v=0;const b=Math.max(this.histogram.length,S.histogram.length);for(let a=0;a<b;a++)v+=Math.abs(((p=this.histogram[a])!==null&&p!==void 0?p:0)-((_=S.histogram[a])!==null&&_!==void 0?_:0));return 1-v/(this.totalCount+S.totalCount)}}e.LineRangeFragment=y,y.chrKeys=new Map}),define(se[504],oe([1,0,73,152,204]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class E{compute(p,_,v=k.InfiniteTimeout.instance,b){if(p.length===0||_.length===0)return k.DiffAlgorithmResult.trivial(p,_);const a=new y.Array2D(p.length,_.length),i=new y.Array2D(p.length,_.length),n=new y.Array2D(p.length,_.length);for(let s=0;s<p.length;s++)for(let l=0;l<_.length;l++){if(!v.isValid())return k.DiffAlgorithmResult.trivialTimedOut(p,_);const o=s===0?0:a.get(s-1,l),g=l===0?0:a.get(s,l-1);let h;p.getElement(s)===_.getElement(l)?(s===0||l===0?h=0:h=a.get(s-1,l-1),s>0&&l>0&&i.get(s-1,l-1)===3&&(h+=n.get(s-1,l-1)),h+=b?b(s,l):1):h=-1;const m=Math.max(o,g,h);if(m===h){const C=s>0&&l>0?n.get(s-1,l-1):0;n.set(s,l,C+1),i.set(s,l,3)}else m===o?(n.set(s,l,0),i.set(s,l,1)):m===g&&(n.set(s,l,0),i.set(s,l,2));a.set(s,l,m)}const t=[];let r=p.length,u=_.length;function f(s,l){(s+1!==r||l+1!==u)&&t.push(new k.SequenceDiff(new L.OffsetRange(s+1,r),new L.OffsetRange(l+1,u))),r=s,u=l}let c=p.length-1,d=_.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(se[285],oe([1,0,60,73,10,5,204]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesSliceCharSequence=void 0;class p{constructor(n,t,r){this.lines=n,this.considerWhitespaceChanges=r,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;f<this.lineRange.endExclusive;f++){let c=n[f],d=0;if(u)d=c.length,c="",u=!1;else if(!r){const s=c.trimStart();d=c.length-s.length,c=s.trimEnd()}this.additionalOffsetByLine.push(d);for(let s=0;s<c.length;s++)this.elements.push(c.charCodeAt(s));f<n.length-1&&(this.elements.push(`
|
||
`.charCodeAt(0)),this.firstCharOffsetByLine[f-this.lineRange.start+1]=this.elements.length)}this.additionalOffsetByLine.push(0)}toString(){return`Slice: "${this.text}"`}get text(){return this.getText(new k.OffsetRange(0,this.length))}getText(n){return this.elements.slice(n.start,n.endExclusive).map(t=>String.fromCharCode(t)).join("")}getElement(n){return this.elements[n]}get length(){return this.elements.length}getBoundaryScore(n){const t=a(n>0?this.elements[n-1]:-1),r=a(n<this.elements.length?this.elements[n]:-1);if(t===7&&r===8)return 0;if(t===8)return 150;let u=0;return t!==r&&(u+=10,t===0&&r===1&&(u+=1)),u+=b(t),u+=b(r),u}translateOffset(n){if(this.lineRange.isEmpty)return new y.Position(this.lineRange.start+1,1);const t=(0,L.findLastIdxMonotonous)(this.firstCharOffsetByLine,r=>r<=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||!_(this.elements[n]))return;let t=n;for(;t>0&&_(this.elements[t-1]);)t--;let r=n;for(;r<this.elements.length&&_(this.elements[r]);)r++;return new k.OffsetRange(t,r)}countLinesIn(n){return this.translateOffset(n.endExclusive).lineNumber-this.translateOffset(n.start).lineNumber}isStronglyEqual(n,t){return this.elements[n]===this.elements[t]}extendToFullLines(n){var t,r;const u=(t=(0,L.findLastMonotonous)(this.firstCharOffsetByLine,c=>c<=n.start))!==null&&t!==void 0?t:0,f=(r=(0,L.findFirstMonotonous)(this.firstCharOffsetByLine,c=>n.endExclusive<=c))!==null&&r!==void 0?r:this.elements.length;return new k.OffsetRange(u,f)}}e.LinesSliceCharSequence=p;function _(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]:30,[6]:3,[7]:10,[8]:10};function b(i){return v[i]}function a(i){return i===10?8:i===13?7:(0,S.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(se[205],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedText=e.LinesDiff=void 0;class L{constructor(E,S,p){this.changes=E,this.moves=S,this.hitTimeout=p}}e.LinesDiff=L;class k{constructor(E,S){this.lineRangeMapping=E,this.changes=S}}e.MovedText=k}),define(se[112],oe([1,0,62]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.DetailedLineRangeMapping=e.LineRangeMapping=void 0;class k{static inverse(p,_,v){const b=[];let a=1,i=1;for(const t of p){const r=new k(new L.LineRange(a,t.original.startLineNumber),new L.LineRange(i,t.modified.startLineNumber));r.modified.isEmpty||b.push(r),a=t.original.endLineNumberExclusive,i=t.modified.endLineNumberExclusive}const n=new k(new L.LineRange(a,_+1),new L.LineRange(i,v+1));return n.modified.isEmpty||b.push(n),b}static clip(p,_,v){const b=[];for(const a of p){const i=a.original.intersect(_),n=a.modified.intersect(v);i&&!i.isEmpty&&n&&!n.isEmpty&&b.push(new k(i,n))}return b}constructor(p,_){this.original=p,this.modified=_}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,_,v){super(p,_),this.innerChanges=v}flip(){var p;return new y(this.modified,this.original,(p=this.innerChanges)===null||p===void 0?void 0:p.map(_=>_.flip()))}}e.DetailedLineRangeMapping=y;class E{constructor(p,_){this.originalRange=p,this.modifiedRange=_}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new E(this.modifiedRange,this.originalRange)}}e.RangeMapping=E}),define(se[505],oe([1,0,152,112,13,60,53,62,73,285,204,283]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeMovedLines=void 0;function i(d,s,l,o,g,h){let{moves:m,excludedChanges:C}=t(d,s,l,h);if(!h.isValid())return[];const w=d.filter(I=>!C.has(I)),D=r(w,o,g,s,l,h);return(0,y.pushMany)(m,D),m=f(m),m=m.filter(I=>{const T=I.original.toOffsetRange().slice(s).map(P=>P.trim());return T.join(`
|
||
`).length>=15&&n(T,P=>P.length>=2)>=2}),m=c(d,m),m}e.computeMovedLines=i;function n(d,s){let l=0;for(const o of d)s(o)&&l++;return l}function t(d,s,l,o){const g=[],h=d.filter(w=>w.modified.isEmpty&&w.original.length>=3).map(w=>new b.LineRangeFragment(w.original,s,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 T of m){const A=w.computeSimilarity(T);A>D&&(D=A,I=T)}if(D>.9&&I&&(m.delete(I),g.push(new k.LineRangeMapping(w.range,I.range)),C.add(w.source),C.add(I.source)),!o.isValid())return{moves:g,excludedChanges:C}}return{moves:g,excludedChanges:C}}function r(d,s,l,o,g,h){const m=[],C=new S.SetMap;for(const A of d)for(let P=A.original.startLineNumber;P<A.original.endLineNumberExclusive-2;P++){const N=`${s[P-1]}:${s[P+1-1]}:${s[P+2-1]}`;C.add(N,{range:new p.LineRange(P,P+3)})}const w=[];d.sort((0,y.compareBy)(A=>A.modified.startLineNumber,y.numberComparator));for(const A of d){let P=[];for(let N=A.modified.startLineNumber;N<A.modified.endLineNumberExclusive-2;N++){const M=`${l[N-1]}:${l[N+1-1]}:${l[N+2-1]}`,R=new p.LineRange(N,N+3),x=[];C.forEach(M,({range:O})=>{for(const W of P)if(W.originalLineRange.endLineNumberExclusive+1===O.endLineNumberExclusive&&W.modifiedLineRange.endLineNumberExclusive+1===R.endLineNumberExclusive){W.originalLineRange=new p.LineRange(W.originalLineRange.startLineNumber,O.endLineNumberExclusive),W.modifiedLineRange=new p.LineRange(W.modifiedLineRange.startLineNumber,R.endLineNumberExclusive),x.push(W);return}const B={modifiedLineRange:R,originalLineRange:O};w.push(B),x.push(B)}),P=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 P=A.modifiedLineRange.startLineNumber-A.originalLineRange.startLineNumber,N=D.subtractFrom(A.modifiedLineRange),M=I.subtractFrom(A.originalLineRange).getWithDelta(P),R=N.getIntersection(M);for(const x of R.ranges){if(x.length<3)continue;const O=x,B=x.delta(-P);m.push(new k.LineRangeMapping(B,O)),D.addRange(O),I.addRange(B)}}m.sort((0,y.compareBy)(A=>A.original.startLineNumber,y.numberComparator));const T=new E.MonotonousArray(d);for(let A=0;A<m.length;A++){const P=m[A],N=T.findLastMonotonous(K=>K.original.startLineNumber<=P.original.startLineNumber),M=(0,E.findLastMonotonous)(d,K=>K.modified.startLineNumber<=P.modified.startLineNumber),R=Math.max(P.original.startLineNumber-N.original.startLineNumber,P.modified.startLineNumber-M.modified.startLineNumber),x=T.findLastMonotonous(K=>K.original.startLineNumber<P.original.endLineNumberExclusive),O=(0,E.findLastMonotonous)(d,K=>K.modified.startLineNumber<P.modified.endLineNumberExclusive),B=Math.max(x.original.endLineNumberExclusive-P.original.endLineNumberExclusive,O.modified.endLineNumberExclusive-P.modified.endLineNumberExclusive);let W;for(W=0;W<R;W++){const K=P.original.startLineNumber-W-1,F=P.modified.startLineNumber-W-1;if(K>o.length||F>g.length||D.contains(F)||I.contains(K)||!u(o[K-1],g[F-1],h))break}W>0&&(I.addRange(new p.LineRange(P.original.startLineNumber-W,P.original.startLineNumber)),D.addRange(new p.LineRange(P.modified.startLineNumber-W,P.modified.startLineNumber)));let V;for(V=0;V<B;V++){const K=P.original.endLineNumberExclusive+V,F=P.modified.endLineNumberExclusive+V;if(K>o.length||F>g.length||D.contains(F)||I.contains(K)||!u(o[K-1],g[F-1],h))break}V>0&&(I.addRange(new p.LineRange(P.original.endLineNumberExclusive,P.original.endLineNumberExclusive+V)),D.addRange(new p.LineRange(P.modified.endLineNumberExclusive,P.modified.endLineNumberExclusive+V))),(W>0||V>0)&&(m[A]=new k.LineRangeMapping(new p.LineRange(P.original.startLineNumber-W,P.original.endLineNumberExclusive+V),new p.LineRange(P.modified.startLineNumber-W,P.modified.endLineNumberExclusive+V)))}return m}function u(d,s,l){if(d.trim()===s.trim())return!0;if(d.length>300&&s.length>300)return!1;const g=new a.MyersDiffAlgorithm().compute(new v.LinesSliceCharSequence([d],new _.OffsetRange(0,1),!1),new v.LinesSliceCharSequence([s],new _.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(T=>{(0,b.isSpace)(d.charCodeAt(T))||h++});function C(I){let T=0;for(let A=0;A<d.length;A++)(0,b.isSpace)(I.charCodeAt(A))||T++;return T}const w=C(d.length>s.length?d:s);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 s=[d[0]];for(let l=1;l<d.length;l++){const o=s[s.length-1],g=d[l],h=g.original.startLineNumber-o.original.endLineNumberExclusive,m=g.modified.startLineNumber-o.modified.endLineNumberExclusive;if(h>=0&&m>=0&&h+m<=2){s[s.length-1]=o.join(g);continue}s.push(g)}return s}function c(d,s){const l=new E.MonotonousArray(d);return s=s.filter(o=>{const g=l.findLastMonotonous(C=>C.original.startLineNumber<o.original.endLineNumberExclusive)||new k.LineRangeMapping(new p.LineRange(1,1),new p.LineRange(1,1)),h=(0,E.findLastMonotonous)(d,C=>C.modified.startLineNumber<o.modified.endLineNumberExclusive);return g!==h}),s}}),define(se[286],oe([1,0,13,90,62,73,5,152,504,283,505,284,205,112,285,503]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLineRangeMapping=e.lineRangeMappingFromRangeMappings=e.DefaultLinesDiffComputer=void 0;class u{constructor(){this.dynamicProgrammingDiffing=new _.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new v.MyersDiffAlgorithm}computeDiff(s,l,o){if(s.length<=1&&(0,L.equals)(s,l,(V,K)=>V===K))return new i.LinesDiff([],[],!1);if(s.length===1&&s[0].length===0||l.length===1&&l[0].length===0)return new i.LinesDiff([new n.DetailedLineRangeMapping(new y.LineRange(1,s.length+1),new y.LineRange(1,l.length+1),[new n.RangeMapping(new S.Range(1,1,s.length,s[0].length+1),new S.Range(1,1,l.length,l[0].length+1))])],[],!1);const g=o.maxComputationTimeMs===0?p.InfiniteTimeout.instance:new p.DateTimeout(o.maxComputationTimeMs),h=!o.ignoreTrimWhitespace,m=new Map;function C(V){let K=m.get(V);return K===void 0&&(K=m.size,m.set(V,K)),K}const w=s.map(V=>C(V.trim())),D=l.map(V=>C(V.trim())),I=new r.LineSequence(w,s),T=new r.LineSequence(D,l),A=(()=>I.length+T.length<1700?this.dynamicProgrammingDiffing.compute(I,T,g,(V,K)=>s[V]===l[K]?l[K].length===0?.1:1+Math.log(1+l[K].length):.99):this.myersDiffingAlgorithm.compute(I,T))();let P=A.diffs,N=A.hitTimeout;P=(0,a.optimizeSequenceDiffs)(I,T,P),P=(0,a.removeVeryShortMatchingLinesBetweenDiffs)(I,T,P);const M=[],R=V=>{if(h)for(let K=0;K<V;K++){const F=x+K,q=O+K;if(s[F]!==l[q]){const ie=this.refineDiff(s,l,new p.SequenceDiff(new E.OffsetRange(F,F+1),new E.OffsetRange(q,q+1)),g,h);for(const ae of ie.mappings)M.push(ae);ie.hitTimeout&&(N=!0)}}};let x=0,O=0;for(const V of P){(0,k.assertFn)(()=>V.seq1Range.start-x===V.seq2Range.start-O);const K=V.seq1Range.start-x;R(K),x=V.seq1Range.endExclusive,O=V.seq2Range.endExclusive;const F=this.refineDiff(s,l,V,g,h);F.hitTimeout&&(N=!0);for(const q of F.mappings)M.push(q)}R(s.length-x);const B=f(M,s,l);let W=[];return o.computeMoves&&(W=this.computeMoves(B,s,l,w,D,g,h)),(0,k.assertFn)(()=>{function V(F,q){if(F.lineNumber<1||F.lineNumber>q.length)return!1;const ie=q[F.lineNumber-1];return!(F.column<1||F.column>ie.length+1)}function K(F,q){return!(F.startLineNumber<1||F.startLineNumber>q.length+1||F.endLineNumberExclusive<1||F.endLineNumberExclusive>q.length+1)}for(const F of B){if(!F.innerChanges)return!1;for(const q of F.innerChanges)if(!(V(q.modifiedRange.getStartPosition(),l)&&V(q.modifiedRange.getEndPosition(),l)&&V(q.originalRange.getStartPosition(),s)&&V(q.originalRange.getEndPosition(),s)))return!1;if(!K(F.modified,l)||!K(F.original,s))return!1}return!0}),new i.LinesDiff(B,W,N)}computeMoves(s,l,o,g,h,m,C){return(0,b.computeMovedLines)(s,l,o,g,h,m).map(I=>{const T=this.refineDiff(l,o,new p.SequenceDiff(I.original.toOffsetRange(),I.modified.toOffsetRange()),m,C),A=f(T.mappings,l,o,!0);return new i.MovedText(I,A)})}refineDiff(s,l,o,g,h){const m=new t.LinesSliceCharSequence(s,o.seq1Range,h),C=new t.LinesSliceCharSequence(l,o.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,a.optimizeSequenceDiffs)(m,C,D),D=(0,a.extendDiffsToEntireWordIfAppropriate)(m,C,D),D=(0,a.removeShortMatches)(m,C,D),D=(0,a.removeVeryShortMatchingTextBetweenLongDiffs)(m,C,D),{mappings:D.map(T=>new n.RangeMapping(m.translateRange(T.seq1Range),C.translateRange(T.seq2Range))),hitTimeout:w.hitTimeout}}}e.DefaultLinesDiffComputer=u;function f(d,s,l,o=!1){const g=[];for(const h of(0,L.groupAdjacentBy)(d.map(m=>c(m,s,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)(()=>!o&&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<m.original.startLineNumber&&h.modified.endLineNumberExclusive<m.modified.startLineNumber)),g}e.lineRangeMappingFromRangeMappings=f;function c(d,s,l){let o=0,g=0;d.modifiedRange.endColumn===1&&d.originalRange.endColumn===1&&d.originalRange.startLineNumber+o<=d.originalRange.endLineNumber&&d.modifiedRange.startLineNumber+o<=d.modifiedRange.endLineNumber&&(g=-1),d.modifiedRange.startColumn-1>=l[d.modifiedRange.startLineNumber-1].length&&d.originalRange.startColumn-1>=s[d.originalRange.startLineNumber-1].length&&d.originalRange.startLineNumber<=d.originalRange.endLineNumber+g&&d.modifiedRange.startLineNumber<=d.modifiedRange.endLineNumber+g&&(o=1);const h=new y.LineRange(d.originalRange.startLineNumber+o,d.originalRange.endLineNumber+1+g),m=new y.LineRange(d.modifiedRange.startLineNumber+o,d.modifiedRange.endLineNumber+1+g);return new n.DetailedLineRangeMapping(h,m,[d])}e.getLineRangeMapping=c}),define(se[506],oe([1,0,173,205,112,11,5,90,62]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.LegacyLinesDiffComputer=void 0;const v=3;class b{computeDiff(o,g,h){var m;const w=new f(o,g,{maxComputationTime:h.maxComputationTimeMs,shouldIgnoreTrimWhitespace:h.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),D=[];let I=null;for(const T of w.changes){let A;T.originalEndLineNumber===0?A=new _.LineRange(T.originalStartLineNumber+1,T.originalStartLineNumber+1):A=new _.LineRange(T.originalStartLineNumber,T.originalEndLineNumber+1);let P;T.modifiedEndLineNumber===0?P=new _.LineRange(T.modifiedStartLineNumber+1,T.modifiedStartLineNumber+1):P=new _.LineRange(T.modifiedStartLineNumber,T.modifiedEndLineNumber+1);let N=new y.DetailedLineRangeMapping(A,P,(m=T.charChanges)===null||m===void 0?void 0:m.map(M=>new y.RangeMapping(new S.Range(M.originalStartLineNumber,M.originalStartColumn,M.originalEndLineNumber,M.originalEndColumn),new S.Range(M.modifiedStartLineNumber,M.modifiedStartColumn,M.modifiedEndLineNumber,M.modifiedEndColumn))));I&&(I.modified.endLineNumberExclusive===N.modified.startLineNumber||I.original.endLineNumberExclusive===N.original.startLineNumber)&&(N=new y.DetailedLineRangeMapping(I.original.join(N.original),I.modified.join(N.modified),I.innerChanges&&N.innerChanges?I.innerChanges.concat(N.innerChanges):void 0),D.pop()),D.push(N),I=N}return(0,p.assertFn)(()=>(0,p.checkAdjacentItems)(D,(T,A)=>A.original.startLineNumber-T.original.endLineNumberExclusive===A.modified.startLineNumber-T.modified.endLineNumberExclusive&&T.original.endLineNumberExclusive<A.original.startLineNumber&&T.modified.endLineNumberExclusive<A.modified.startLineNumber)),new k.LinesDiff(D,[],w.quitEarly)}}e.LegacyLinesDiffComputer=b;function a(l,o,g,h){return new L.LcsDiff(l,o,g).ComputeDiff(h)}class i{constructor(o){const g=[],h=[];for(let m=0,C=o.length;m<C;m++)g[m]=c(o[m],1),h[m]=d(o[m],1);this.lines=o,this._startColumns=g,this._endColumns=h}getElements(){const o=[];for(let g=0,h=this.lines.length;g<h;g++)o[g]=this.lines[g].substring(this._startColumns[g]-1,this._endColumns[g]-1);return o}getStrictElement(o){return this.lines[o]}getStartLineNumber(o){return o+1}getEndLineNumber(o){return o+1}createCharSequence(o,g,h){const m=[],C=[],w=[];let D=0;for(let I=g;I<=h;I++){const T=this.lines[I],A=o?this._startColumns[I]:1,P=o?this._endColumns[I]:T.length+1;for(let N=A;N<P;N++)m[D]=T.charCodeAt(N-1),C[D]=I+1,w[D]=N,D++;!o&&I<h&&(m[D]=10,C[D]=I+1,w[D]=T.length+1,D++)}return new n(m,C,w)}}class n{constructor(o,g,h){this._charCodes=o,this._lineNumbers=g,this._columns=h}toString(){return"["+this._charCodes.map((o,g)=>(o===10?"\\n":String.fromCharCode(o))+`-(${this._lineNumbers[g]},${this._columns[g]})`).join(", ")+"]"}_assertIndex(o,g){if(o<0||o>=g.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(o){return o>0&&o===this._lineNumbers.length?this.getEndLineNumber(o-1):(this._assertIndex(o,this._lineNumbers),this._lineNumbers[o])}getEndLineNumber(o){return o===-1?this.getStartLineNumber(o+1):(this._assertIndex(o,this._lineNumbers),this._charCodes[o]===10?this._lineNumbers[o]+1:this._lineNumbers[o])}getStartColumn(o){return o>0&&o===this._columns.length?this.getEndColumn(o-1):(this._assertIndex(o,this._columns),this._columns[o])}getEndColumn(o){return o===-1?this.getStartColumn(o+1):(this._assertIndex(o,this._columns),this._charCodes[o]===10?1:this._columns[o]+1)}}class t{constructor(o,g,h,m,C,w,D,I){this.originalStartLineNumber=o,this.originalStartColumn=g,this.originalEndLineNumber=h,this.originalEndColumn=m,this.modifiedStartLineNumber=C,this.modifiedStartColumn=w,this.modifiedEndLineNumber=D,this.modifiedEndColumn=I}static createFromDiffChange(o,g,h){const m=g.getStartLineNumber(o.originalStart),C=g.getStartColumn(o.originalStart),w=g.getEndLineNumber(o.originalStart+o.originalLength-1),D=g.getEndColumn(o.originalStart+o.originalLength-1),I=h.getStartLineNumber(o.modifiedStart),T=h.getStartColumn(o.modifiedStart),A=h.getEndLineNumber(o.modifiedStart+o.modifiedLength-1),P=h.getEndColumn(o.modifiedStart+o.modifiedLength-1);return new t(m,C,w,D,I,T,A,P)}}function r(l){if(l.length<=1)return l;const o=[l[0]];let g=o[0];for(let h=1,m=l.length;h<m;h++){const C=l[h],w=C.originalStart-(g.originalStart+g.originalLength),D=C.modifiedStart-(g.modifiedStart+g.modifiedLength);Math.min(w,D)<v?(g.originalLength=C.originalStart+C.originalLength-g.originalStart,g.modifiedLength=C.modifiedStart+C.modifiedLength-g.modifiedStart):(o.push(C),g=C)}return o}class u{constructor(o,g,h,m,C){this.originalStartLineNumber=o,this.originalEndLineNumber=g,this.modifiedStartLineNumber=h,this.modifiedEndLineNumber=m,this.charChanges=C}static createFromDiffResult(o,g,h,m,C,w,D){let I,T,A,P,N;if(g.originalLength===0?(I=h.getStartLineNumber(g.originalStart)-1,T=0):(I=h.getStartLineNumber(g.originalStart),T=h.getEndLineNumber(g.originalStart+g.originalLength-1)),g.modifiedLength===0?(A=m.getStartLineNumber(g.modifiedStart)-1,P=0):(A=m.getStartLineNumber(g.modifiedStart),P=m.getEndLineNumber(g.modifiedStart+g.modifiedLength-1)),w&&g.originalLength>0&&g.originalLength<20&&g.modifiedLength>0&&g.modifiedLength<20&&C()){const M=h.createCharSequence(o,g.originalStart,g.originalStart+g.originalLength-1),R=m.createCharSequence(o,g.modifiedStart,g.modifiedStart+g.modifiedLength-1);if(M.getElements().length>0&&R.getElements().length>0){let x=a(M,R,C,!0).changes;D&&(x=r(x)),N=[];for(let O=0,B=x.length;O<B;O++)N.push(t.createFromDiffChange(x[O],M,R))}}return new u(I,T,A,P,N)}}class f{constructor(o,g,h){this.shouldComputeCharChanges=h.shouldComputeCharChanges,this.shouldPostProcessCharChanges=h.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=h.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=h.shouldMakePrettyDiff,this.originalLines=o,this.modifiedLines=g,this.original=new i(o),this.modified=new i(g),this.continueLineDiff=s(h.maxComputationTime),this.continueCharDiff=s(h.maxComputationTime===0?0:Math.min(h.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};const o=a(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),g=o.changes,h=o.quitEarly;if(this.shouldIgnoreTrimWhitespace){const D=[];for(let I=0,T=g.length;I<T;I++)D.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace,g[I],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:h,changes:D}}const m=[];let C=0,w=0;for(let D=-1,I=g.length;D<I;D++){const T=D+1<I?g[D+1]:null,A=T?T.originalStart:this.originalLines.length,P=T?T.modifiedStart:this.modifiedLines.length;for(;C<A&&w<P;){const N=this.originalLines[C],M=this.modifiedLines[w];if(N!==M){{let R=c(N,1),x=c(M,1);for(;R>1&&x>1;){const O=N.charCodeAt(R-2),B=M.charCodeAt(x-2);if(O!==B)break;R--,x--}(R>1||x>1)&&this._pushTrimWhitespaceCharChange(m,C+1,1,R,w+1,1,x)}{let R=d(N,1),x=d(M,1);const O=N.length+1,B=M.length+1;for(;R<O&&x<B;){const W=N.charCodeAt(R-1),V=N.charCodeAt(x-1);if(W!==V)break;R++,x++}(R<O||x<B)&&this._pushTrimWhitespaceCharChange(m,C+1,R,O,w+1,x,B)}}C++,w++}T&&(m.push(u.createFromDiffResult(this.shouldIgnoreTrimWhitespace,T,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),C+=T.originalLength,w+=T.modifiedLength)}return{quitEarly:h,changes:m}}_pushTrimWhitespaceCharChange(o,g,h,m,C,w,D){if(this._mergeTrimWhitespaceCharChange(o,g,h,m,C,w,D))return;let I;this.shouldComputeCharChanges&&(I=[new t(g,h,g,m,C,w,C,D)]),o.push(new u(g,g,C,C,I))}_mergeTrimWhitespaceCharChange(o,g,h,m,C,w,D){const I=o.length;if(I===0)return!1;const T=o[I-1];return T.originalEndLineNumber===0||T.modifiedEndLineNumber===0?!1:T.originalEndLineNumber===g&&T.modifiedEndLineNumber===C?(this.shouldComputeCharChanges&&T.charChanges&&T.charChanges.push(new t(g,h,g,m,C,w,C,D)),!0):T.originalEndLineNumber+1===g&&T.modifiedEndLineNumber+1===C?(T.originalEndLineNumber=g,T.modifiedEndLineNumber=C,this.shouldComputeCharChanges&&T.charChanges&&T.charChanges.push(new t(g,h,g,m,C,w,C,D)),!0):!1}}e.DiffComputer=f;function c(l,o){const g=E.firstNonWhitespaceIndex(l);return g===-1?o:g+1}function d(l,o){const g=E.lastNonWhitespaceIndex(l);return g===-1?o:g+2}function s(l){if(l===0)return()=>!0;const o=Date.now();return()=>Date.now()-o<l}}),define(se[507],oe([1,0,506,286]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={getLegacy:()=>new L.LegacyLinesDiffComputer,getDefault:()=>new k.DefaultLinesDiffComputer}}),define(se[287],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class L{constructor(y,E,S,p,_,v,b){this.id=y,this.label=E,this.alias=S,this.metadata=p,this._precondition=_,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(se[180],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(se[153],oe([1,0,180]),function(te,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 S(p){return k(p)?p:y(p)?p.getModifiedEditor():E(p)&&k(p.activeCodeEditor)?p.activeCodeEditor:null}e.getCodeEditor=S}),define(se[131],oe([1,0]),function(te,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(se[508],oe([1,0]),function(te,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(se[132],oe([1,0]),function(te,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 S="mtk"+this.getForeground(y);const p=this.getFontStyle(y);return p&1&&(S+=" mtki"),p&2&&(S+=" mtkb"),p&4&&(S+=" mtku"),p&8&&(S+=" mtks"),S}static getInlineStyleFromMetadata(y,E){const S=this.getForeground(y),p=this.getFontStyle(y);let _=`color: ${E[S]};`;p&1&&(_+="font-style: italic;"),p&2&&(_+="font-weight: bold;");let v="";return p&4&&(v+=" underline"),p&8&&(v+=" line-through"),v&&(_+=`text-decoration:${v};`),_}static getPresentationFromMetadata(y){const E=this.getForeground(y),S=this.getFontStyle(y);return{foreground:E,italic:!!(S&1),bold:!!(S&2),underline:!!(S&4),strikethrough:!!(S&8)}}}e.TokenMetadata=L}),define(se[509],oe([1,0,39]),function(te,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 r=Number(t);(r||r===0&&t.replace(/\s/g,"")!=="")&&n.push(r)}return n}function y(i,n,t,r){return{red:i/255,blue:t/255,green:n/255,alpha:r}}function E(i,n){const t=n.index,r=n[0].length;if(!t)return;const u=i.positionAt(t);return{startLineNumber:u.lineNumber,startColumn:u.column,endLineNumber:u.lineNumber,endColumn:u.column+r}}function S(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 _(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=[],r=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(r.length>0)for(const u of r){const f=u.filter(l=>l!==void 0),c=f[1],d=f[2];if(!d)continue;let s;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;s=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;s=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;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;s=_(E(i,u),v(d,l),!0)}else c==="#"&&(s=S(E(i,u),c+d));s&&n.push(s)}return n}function a(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:b(i)}e.computeDefaultDocumentColors=a}),define(se[113],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var L;(function(S){S[S.None=0]="None",S[S.Indent=1]="Indent",S[S.IndentOutdent=2]="IndentOutdent",S[S.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 _=0,v=p.notIn.length;_<v;_++)switch(p.notIn[_]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(p){switch(p){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(p,_){if(p.getTokenCount()===0)return!0;const v=p.findTokenIndexAtOffset(_-2),b=p.getStandardTokenType(v);return this.isOK(b)}_findNeutralCharacterInRange(p,_){for(let v=p;v<=_;v++){const b=String.fromCharCode(v);if(!this.open.includes(b)&&!this.close.includes(b))return b}return null}findNeutralCharacter(){return this._neutralCharacterSearched||(this._neutralCharacterSearched=!0,this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(48,57)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(97,122)),this._neutralCharacter||(this._neutralCharacter=this._findNeutralCharacterInRange(65,90))),this._neutralCharacter}}e.StandardAutoClosingPairConditional=k;class y{constructor(p){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const _ of p)E(this.autoClosingPairsOpenByStart,_.open.charAt(0),_),E(this.autoClosingPairsOpenByEnd,_.open.charAt(_.open.length-1),_),E(this.autoClosingPairsCloseByStart,_.close.charAt(0),_),E(this.autoClosingPairsCloseByEnd,_.close.charAt(_.close.length-1),_),_.close.length===1&&_.open.length===1&&E(this.autoClosingPairsCloseSingleChar,_.close,_)}}e.AutoClosingPairs=y;function E(S,p,_){S.has(p)?S.get(p).push(_):S.set(p,[_])}}),define(se[510],oe([1,0,128]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=void 0;class k{constructor(i,n,t){const r=new Uint8Array(i*n);for(let u=0,f=i*n;u<f;u++)r[u]=t;this._data=r,this.rows=i,this.cols=n}get(i,n){return this._data[i*this.cols+n]}set(i,n,t){this._data[i*this.cols+n]=t}}class y{constructor(i){let n=0,t=0;for(let u=0,f=i.length;u<f;u++){const[c,d,s]=i[u];d>n&&(n=d),c>t&&(t=c),s>t&&(t=s)}n++,t++;const r=new k(t,n,0);for(let u=0,f=i.length;u<f;u++){const[c,d,s]=i[u];r.set(c,d,s)}this._states=r,this._maxCharCode=n}nextState(i,n){return n<0||n>=this._maxCharCode?0:this._states.get(i,n)}}e.StateMachine=y;let E=null;function S(){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 _(){if(p===null){p=new L.CharacterClassifier(0);const a=` <>'"\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;n<a.length;n++)p.set(a.charCodeAt(n),1);const i=".,;:";for(let n=0;n<i.length;n++)p.set(i.charCodeAt(n),2)}return p}class v{static _createLink(i,n,t,r,u){let f=u-1;do{const c=n.charCodeAt(f);if(i.get(c)!==2)break;f--}while(f>r);if(r>0){const c=n.charCodeAt(r-1),d=n.charCodeAt(f);(c===40&&d===41||c===91&&d===93||c===123&&d===125)&&f--}return{range:{startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:f+2},url:n.substring(r,f+1)}}static computeLinks(i,n=S()){const t=_(),r=[];for(let u=1,f=i.getLineCount();u<=f;u++){const c=i.getLineContent(u),d=c.length;let s=0,l=0,o=0,g=1,h=!1,m=!1,C=!1,w=!1;for(;s<d;){let D=!1;const I=c.charCodeAt(s);if(g===13){let T;switch(I){case 40:h=!0,T=0;break;case 41:T=h?0:1;break;case 91:C=!0,m=!0,T=0;break;case 93:C=!1,T=m?0:1;break;case 123:w=!0,T=0;break;case 125:T=w?0:1;break;case 39:case 34:case 96:o===I?T=1:o===39||o===34||o===96?T=0:T=1;break;case 42:T=o===42?1:0;break;case 124:T=o===124?1:0;break;case 32:T=C?0:1;break;default:T=t.get(I)}T===1&&(r.push(v._createLink(t,c,u,l,s)),D=!0)}else if(g===12){let T;I===91?(m=!0,T=0):T=t.get(I),T===1?D=!0:g=13}else g=n.nextState(g,I),g===0&&(D=!0);D&&(g=1,h=!1,m=!1,w=!1,l=s+1,o=I),s++}g===13&&r.push(v._createLink(t,c,u,l,d))}return r}}e.LinkComputer=v;function b(a){return!a||typeof a.getLineCount!="function"||typeof a.getLineContent!="function"?[]:v.computeLinks(a)}e.computeLinks=b}),define(se[133],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function L(E,S){const p=E.getCount(),_=E.findTokenIndexAtOffset(S),v=E.getLanguageId(_);let b=_;for(;b+1<p&&E.getLanguageId(b+1)===v;)b++;let a=_;for(;a>0&&E.getLanguageId(a-1)===v;)a--;return new k(E,v,a,b+1,E.getStartOffset(a),E.getEndOffset(b))}e.createScopedLineTokens=L;class k{constructor(S,p,_,v,b,a){this._scopedLineTokensBrand=void 0,this._actual=S,this.languageId=p,this._firstTokenIndex=_,this._lastTokenIndex=v,this.firstCharOffset=b,this._lastCharOffset=a}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(S){return this._actual.getLineContent().substring(0,this.firstCharOffset+S)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(S){return this._actual.findTokenIndexAtOffset(S+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(S){return this._actual.getStandardTokenType(S+this._firstTokenIndex)}}e.ScopedLineTokens=k;function y(E){return(E&3)!==0}e.ignoreBracketsInToken=y}),define(se[75],oe([1,0,10,5,24,133,85,203]),function(te,e,L,k,y,E,S,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 _=()=>!0,v=()=>!1,b=c=>c===" "||c===" ";class a{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,s,l,o){var g;this.languageConfigurationService=o,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=s.tabSize,this.indentSize=s.indentSize,this.insertSpaces=s.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 s=(d=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||d===void 0?void 0:d.getElectricCharacters();if(s)for(const l of s)this._electricChars[l]=!0}return this._electricChars}onElectricCharacter(d,s,l){const o=(0,E.createScopedLineTokens)(s,l-1),g=this.languageConfigurationService.getLanguageConfiguration(o.languageId).electricCharacter;return g?g.onElectricCharacter(d,o,l-o.firstCharOffset):null}normalizeIndentation(d){return(0,p.normalizeIndentation)(d,this.indentSize,this.insertSpaces)}_getShouldAutoClose(d,s,l){switch(s){case"beforeWhitespace":return b;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(d,l);case"always":return _;case"never":return v}}_getLanguageDefinedShouldAutoClose(d,s){const l=this.languageConfigurationService.getLanguageConfiguration(d).getAutoCloseBeforeSet(s);return o=>l.indexOf(o)!==-1}visibleColumnFromColumn(d,s){return S.CursorColumns.visibleColumnFromColumn(d.getLineContent(s.lineNumber),s.column,this.tabSize)}columnFromVisibleColumn(d,s,l){const o=S.CursorColumns.columnFromVisibleColumn(d.getLineContent(s),l,this.tabSize),g=d.getLineMinColumn(s);if(o<g)return g;const h=d.getLineMaxColumn(s);return o>h?h:o}}e.CursorConfiguration=a;class i{static fromModelState(d){return new n(d)}static fromViewState(d){return new t(d)}static fromModelSelection(d){const s=y.Selection.liftSelection(d),l=new r(k.Range.fromPositions(s.getSelectionStart()),0,0,s.getPosition(),0);return i.fromModelState(l)}static fromModelSelections(d){const s=[];for(let l=0,o=d.length;l<o;l++)s[l]=this.fromModelSelection(d[l]);return s}constructor(d,s){this._cursorStateBrand=void 0,this.modelState=d,this.viewState=s}equals(d){return this.viewState.equals(d.viewState)&&this.modelState.equals(d.modelState)}}e.CursorState=i;class n{constructor(d){this.modelState=d,this.viewState=null}}e.PartialModelCursorState=n;class t{constructor(d){this.modelState=null,this.viewState=d}}e.PartialViewCursorState=t;class r{constructor(d,s,l,o,g){this.selectionStart=d,this.selectionStartKind=s,this.selectionStartLeftoverVisibleColumns=l,this.position=o,this.leftoverVisibleColumns=g,this._singleCursorStateBrand=void 0,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(d){return this.selectionStartLeftoverVisibleColumns===d.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===d.leftoverVisibleColumns&&this.selectionStartKind===d.selectionStartKind&&this.position.equals(d.position)&&this.selectionStart.equalsRange(d.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(d,s,l,o){return d?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new L.Position(s,l),o):new r(new k.Range(s,l,s,l),0,o,new L.Position(s,l),o)}static _computeSelection(d,s){return d.isEmpty()||!s.isBeforeOrEqual(d.getStartPosition())?y.Selection.fromPositions(d.getStartPosition(),s):y.Selection.fromPositions(d.getEndPosition(),s)}}e.SingleCursorState=r;class u{constructor(d,s,l){this._editOperationResultBrand=void 0,this.type=d,this.commands=s,this.shouldPushStackElementBefore=l.shouldPushStackElementBefore,this.shouldPushStackElementAfter=l.shouldPushStackElementAfter}}e.EditOperationResult=u;function f(c){return c==="'"||c==='"'||c==="`"}e.isQuote=f}),define(se[511],oe([1,0,75,10,5]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class E{static columnSelect(p,_,v,b,a,i){const n=Math.abs(a-v)+1,t=v>a,r=b>i,u=b<i,f=[];for(let c=0;c<n;c++){const d=v+(t?-c:c),s=p.columnFromVisibleColumn(_,d,b),l=p.columnFromVisibleColumn(_,d,i),o=p.visibleColumnFromColumn(_,new k.Position(d,s)),g=p.visibleColumnFromColumn(_,new k.Position(d,l));u&&(o>i||g<b)||r&&(g>b||o<i)||f.push(new L.SingleCursorState(new y.Range(d,s,d,s),0,0,new k.Position(d,l),0))}if(f.length===0)for(let c=0;c<n;c++){const d=v+(t?-c:c),s=_.getLineMaxColumn(d);f.push(new L.SingleCursorState(new y.Range(d,s,d,s),0,0,new k.Position(d,s),0))}return{viewStates:f,reversed:t,fromLineNumber:v,fromVisualColumn:b,toLineNumber:a,toVisualColumn:i}}static columnSelectLeft(p,_,v){let b=v.toViewVisualColumn;return b>0&&b--,E.columnSelect(p,_,v.fromViewLineNumber,v.fromViewVisualColumn,v.toViewLineNumber,b)}static columnSelectRight(p,_,v){let b=0;const a=Math.min(v.fromViewLineNumber,v.toViewLineNumber),i=Math.max(v.fromViewLineNumber,v.toViewLineNumber);for(let t=a;t<=i;t++){const r=_.getLineMaxColumn(t),u=p.visibleColumnFromColumn(_,new k.Position(t,r));b=Math.max(b,u)}let n=v.toViewVisualColumn;return n<b&&n++,this.columnSelect(p,_,v.fromViewLineNumber,v.fromViewVisualColumn,v.toViewLineNumber,n)}static columnSelectUp(p,_,v,b){const a=b?p.pageSize:1,i=Math.max(1,v.toViewLineNumber-a);return this.columnSelect(p,_,v.fromViewLineNumber,v.fromViewVisualColumn,i,v.toViewVisualColumn)}static columnSelectDown(p,_,v,b){const a=b?p.pageSize:1,i=Math.min(_.getLineCount(),v.toViewLineNumber+a);return this.columnSelect(p,_,v.fromViewLineNumber,v.fromViewVisualColumn,i,v.toViewVisualColumn)}}e.ColumnSelection=E}),define(se[206],oe([1,0,11,85,10,5,282,75]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class _{constructor(a,i,n){this._cursorPositionBrand=void 0,this.lineNumber=a,this.column=i,this.leftoverVisibleColumns=n}}e.CursorPosition=_;class v{static leftPosition(a,i){if(i.column>a.getLineMinColumn(i.lineNumber))return i.delta(void 0,-L.prevCharLength(a.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new y.Position(n,a.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(a,i,n){if(i.column<=a.getLineIndentColumn(i.lineNumber)){const t=a.getLineMinColumn(i.lineNumber),r=a.getLineContent(i.lineNumber),u=S.AtomicTabMoveOperations.atomicPosition(r,i.column-1,n,0);if(u!==-1&&u+1>=t)return new y.Position(i.lineNumber,u+1)}return this.leftPosition(a,i)}static left(a,i,n){const t=a.stickyTabStops?v.leftPositionAtomicSoftTabs(i,n,a.tabSize):v.leftPosition(i,n);return new _(t.lineNumber,t.column,0)}static moveLeft(a,i,n,t,r){let u,f;if(n.hasSelection()&&!t)u=n.selection.startLineNumber,f=n.selection.startColumn;else{const c=n.position.delta(void 0,-(r-1)),d=i.normalizePosition(v.clipPositionColumn(c,i),0),s=v.left(a,i,d);u=s.lineNumber,f=s.column}return n.move(t,u,f,0)}static clipPositionColumn(a,i){return new y.Position(a.lineNumber,v.clipRange(a.column,i.getLineMinColumn(a.lineNumber),i.getLineMaxColumn(a.lineNumber)))}static clipRange(a,i,n){return a<i?i:a>n?n:a}static rightPosition(a,i,n){return n<a.getLineMaxColumn(i)?n=n+L.nextCharLength(a.getLineContent(i),n-1):i<a.getLineCount()&&(i=i+1,n=a.getLineMinColumn(i)),new y.Position(i,n)}static rightPositionAtomicSoftTabs(a,i,n,t,r){if(n<a.getLineIndentColumn(i)){const u=a.getLineContent(i),f=S.AtomicTabMoveOperations.atomicPosition(u,n-1,t,1);if(f!==-1)return new y.Position(i,f+1)}return this.rightPosition(a,i,n)}static right(a,i,n){const t=a.stickyTabStops?v.rightPositionAtomicSoftTabs(i,n.lineNumber,n.column,a.tabSize,a.indentSize):v.rightPosition(i,n.lineNumber,n.column);return new _(t.lineNumber,t.column,0)}static moveRight(a,i,n,t,r){let u,f;if(n.hasSelection()&&!t)u=n.selection.endLineNumber,f=n.selection.endColumn;else{const c=n.position.delta(void 0,r-1),d=i.normalizePosition(v.clipPositionColumn(c,i),1),s=v.right(a,i,d);u=s.lineNumber,f=s.column}return n.move(t,u,f,0)}static vertical(a,i,n,t,r,u,f,c){const d=k.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),t,a.tabSize)+r,s=i.getLineCount(),l=n===1&&t===1,o=n===s&&t===i.getLineMaxColumn(n),g=u<n?l:o;if(n=u,n<1?(n=1,f?t=i.getLineMinColumn(n):t=Math.min(i.getLineMaxColumn(n),t)):n>s?(n=s,f?t=i.getLineMaxColumn(n):t=Math.min(i.getLineMaxColumn(n),t)):t=a.columnFromVisibleColumn(i,n,d),g?r=0:r=d-k.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),t,a.tabSize),c!==void 0){const h=new y.Position(n,t),m=i.normalizePosition(h,c);r=r+(t-m.column),n=m.lineNumber,t=m.column}return new _(n,t,r)}static down(a,i,n,t,r,u,f){return this.vertical(a,i,n,t,r,n+u,f,4)}static moveDown(a,i,n,t,r){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(a,i,u+c,f,n.leftoverVisibleColumns,r,!0),i.normalizePosition(new y.Position(d.lineNumber,d.column),2).lineNumber>u)break;while(c++<10&&u+c<i.getLineCount());return n.move(t,d.lineNumber,d.column,d.leftoverVisibleColumns)}static translateDown(a,i,n){const t=n.selection,r=v.down(a,i,t.selectionStartLineNumber,t.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),u=v.down(a,i,t.positionLineNumber,t.positionColumn,n.leftoverVisibleColumns,1,!1);return new p.SingleCursorState(new E.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)}static up(a,i,n,t,r,u,f){return this.vertical(a,i,n,t,r,n-u,f,3)}static moveUp(a,i,n,t,r){let u,f;n.hasSelection()&&!t?(u=n.selection.startLineNumber,f=n.selection.startColumn):(u=n.position.lineNumber,f=n.position.column);const c=v.up(a,i,u,f,n.leftoverVisibleColumns,r,!0);return n.move(t,c.lineNumber,c.column,c.leftoverVisibleColumns)}static translateUp(a,i,n){const t=n.selection,r=v.up(a,i,t.selectionStartLineNumber,t.selectionStartColumn,n.selectionStartLeftoverVisibleColumns,1,!1),u=v.up(a,i,t.positionLineNumber,t.positionColumn,n.leftoverVisibleColumns,1,!1);return new p.SingleCursorState(new E.Range(r.lineNumber,r.column,r.lineNumber,r.column),0,r.leftoverVisibleColumns,new y.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)}static _isBlankLine(a,i){return a.getLineFirstNonWhitespaceColumn(i)===0}static moveToPrevBlankLine(a,i,n,t){let r=n.position.lineNumber;for(;r>1&&this._isBlankLine(i,r);)r--;for(;r>1&&!this._isBlankLine(i,r);)r--;return n.move(t,r,i.getLineMinColumn(r),0)}static moveToNextBlankLine(a,i,n,t){const r=i.getLineCount();let u=n.position.lineNumber;for(;u<r&&this._isBlankLine(i,u);)u++;for(;u<r&&!this._isBlankLine(i,u);)u++;return n.move(t,u,i.getLineMinColumn(u),0)}static moveToBeginningOfLine(a,i,n,t){const r=n.position.lineNumber,u=i.getLineMinColumn(r),f=i.getLineFirstNonWhitespaceColumn(r)||u;let c;return n.position.column===f?c=u:c=f,n.move(t,r,c,0)}static moveToEndOfLine(a,i,n,t,r){const u=n.position.lineNumber,f=i.getLineMaxColumn(u);return n.move(t,u,f,r?1073741824-f:0)}static moveToBeginningOfBuffer(a,i,n,t){return n.move(t,1,1,0)}static moveToEndOfBuffer(a,i,n,t){const r=i.getLineCount(),u=i.getLineMaxColumn(r);return n.move(t,r,u,0)}}e.MoveOperations=v}),define(se[207],oe([1,0,11,130,75,85,206,5,10]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class v{static deleteRight(a,i,n,t){const r=[];let u=a!==3;for(let f=0,c=t.length;f<c;f++){const d=t[f];let s=d;if(s.isEmpty()){const l=d.getPosition(),o=S.MoveOperations.right(i,n,l);s=new p.Range(o.lineNumber,o.column,l.lineNumber,l.column)}if(s.isEmpty()){r[f]=null;continue}s.startLineNumber!==s.endLineNumber&&(u=!0),r[f]=new k.ReplaceCommand(s,"")}return[u,r]}static isAutoClosingPairDelete(a,i,n,t,r,u,f){if(i==="never"&&n==="never"||a==="never")return!1;for(let c=0,d=u.length;c<d;c++){const s=u[c],l=s.getPosition();if(!s.isEmpty())return!1;const o=r.getLineContent(l.lineNumber);if(l.column<2||l.column>=o.length+1)return!1;const g=o.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=o.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(a==="auto"){let w=!1;for(let D=0,I=f.length;D<I;D++){const T=f[D];if(l.lineNumber===T.startLineNumber&&l.column===T.startColumn){w=!0;break}}if(!w)return!1}}return!0}static _runAutoClosingPairDelete(a,i,n){const t=[];for(let r=0,u=n.length;r<u;r++){const f=n[r].getPosition(),c=new p.Range(f.lineNumber,f.column-1,f.lineNumber,f.column+1);t[r]=new k.ReplaceCommand(c,"")}return[!0,t]}static deleteLeft(a,i,n,t,r){if(this.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,n,t,r))return this._runAutoClosingPairDelete(i,n,t);const u=[];let f=a!==2;for(let c=0,d=t.length;c<d;c++){const s=v.getDeleteRange(t[c],n,i);if(s.isEmpty()){u[c]=null;continue}s.startLineNumber!==s.endLineNumber&&(f=!0),u[c]=new k.ReplaceCommand(s,"")}return[f,u]}static getDeleteRange(a,i,n){if(!a.isEmpty())return a;const t=a.getPosition();if(n.useTabStops&&t.column>1){const r=i.getLineContent(t.lineNumber),u=L.firstNonWhitespaceIndex(r),f=u===-1?r.length+1:u+1;if(t.column<=f){const c=n.visibleColumnFromColumn(i,t),d=E.CursorColumns.prevIndentTabStop(c,n.indentSize),s=n.columnFromVisibleColumn(i,t.lineNumber,d);return new p.Range(t.lineNumber,s,t.lineNumber,t.column)}}return p.Range.fromPositions(v.getPositionAfterDeleteLeft(t,i),t)}static getPositionAfterDeleteLeft(a,i){if(a.column>1){const n=L.getLeftDeleteOffset(a.column-1,i.getLineContent(a.lineNumber));return a.with(void 0,n+1)}else if(a.lineNumber>1){const n=a.lineNumber-1;return new _.Position(n,i.getLineMaxColumn(n))}else return a}static cut(a,i,n){const t=[];let r=null;n.sort((u,f)=>_.Position.compare(u.getStartPosition(),f.getEndPosition()));for(let u=0,f=n.length;u<f;u++){const c=n[u];if(c.isEmpty())if(a.emptySelectionClipboard){const d=c.getPosition();let s,l,o,g;d.lineNumber<i.getLineCount()?(s=d.lineNumber,l=1,o=d.lineNumber+1,g=1):d.lineNumber>1&&r?.endLineNumber!==d.lineNumber?(s=d.lineNumber-1,l=i.getLineMaxColumn(d.lineNumber-1),o=d.lineNumber,g=i.getLineMaxColumn(d.lineNumber)):(s=d.lineNumber,l=1,o=d.lineNumber,g=i.getLineMaxColumn(d.lineNumber));const h=new p.Range(s,l,o,g);r=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(se[181],oe([1,0,11,75,207,150,10,5]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class _{static _createWord(i,n,t,r,u){return{start:r,end:u,wordType:n,nextCharClass:t}}static _findPreviousWordOnLine(i,n,t){const r=n.getLineContent(t.lineNumber);return this._doFindPreviousWordOnLine(r,i,t)}static _doFindPreviousWordOnLine(i,n,t){let r=0;for(let u=t.column-2;u>=0;u--){const f=i.charCodeAt(u),c=n.get(f);if(c===0){if(r===2)return this._createWord(i,r,c,u+1,this._findEndOfWord(i,n,r,u+1));r=1}else if(c===2){if(r===1)return this._createWord(i,r,c,u+1,this._findEndOfWord(i,n,r,u+1));r=2}else if(c===1&&r!==0)return this._createWord(i,r,c,u+1,this._findEndOfWord(i,n,r,u+1))}return r!==0?this._createWord(i,r,1,0,this._findEndOfWord(i,n,r,0)):null}static _findEndOfWord(i,n,t,r){const u=i.length;for(let f=r;f<u;f++){const c=i.charCodeAt(f),d=n.get(c);if(d===1||t===1&&d===2||t===2&&d===0)return f}return u}static _findNextWordOnLine(i,n,t){const r=n.getLineContent(t.lineNumber);return this._doFindNextWordOnLine(r,i,t)}static _doFindNextWordOnLine(i,n,t){let r=0;const u=i.length;for(let f=t.column-1;f<u;f++){const c=i.charCodeAt(f),d=n.get(c);if(d===0){if(r===2)return this._createWord(i,r,d,this._findStartOfWord(i,n,r,f-1),f);r=1}else if(d===2){if(r===1)return this._createWord(i,r,d,this._findStartOfWord(i,n,r,f-1),f);r=2}else if(d===1&&r!==0)return this._createWord(i,r,d,this._findStartOfWord(i,n,r,f-1),f)}return r!==0?this._createWord(i,r,1,this._findStartOfWord(i,n,r,u-1),u):null}static _findStartOfWord(i,n,t,r){for(let u=r;u>=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,r){let u=t.lineNumber,f=t.column;f===1&&u>1&&(u=u-1,f=n.getLineMaxColumn(u));let c=_._findPreviousWordOnLine(i,n,new S.Position(u,f));if(r===0)return new S.Position(u,c?c.start+1:1);if(r===1)return c&&c.wordType===2&&c.end-c.start===1&&c.nextCharClass===0&&(c=_._findPreviousWordOnLine(i,n,new S.Position(u,c.start+1))),new S.Position(u,c?c.start+1:1);if(r===3){for(;c&&c.wordType===2;)c=_._findPreviousWordOnLine(i,n,new S.Position(u,c.start+1));return new S.Position(u,c?c.start+1:1)}return c&&f<=c.end+1&&(c=_._findPreviousWordOnLine(i,n,new S.Position(u,c.start+1))),new S.Position(u,c?c.end+1:1)}static _moveWordPartLeft(i,n){const t=n.lineNumber,r=i.getLineMaxColumn(t);if(n.column===1)return t>1?new S.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 S.Position(t,f);if(c===45&&d!==45)return new S.Position(t,f);if((L.isLowerAsciiLetter(c)||L.isAsciiDigit(c))&&L.isUpperAsciiLetter(d))return new S.Position(t,f);if(L.isUpperAsciiLetter(c)&&L.isUpperAsciiLetter(d)&&f+1<r){const s=u.charCodeAt(f);if(L.isLowerAsciiLetter(s)||L.isAsciiDigit(s))return new S.Position(t,f)}}return new S.Position(t,1)}static moveWordRight(i,n,t,r){let u=t.lineNumber,f=t.column,c=!1;f===n.getLineMaxColumn(u)&&u<n.getLineCount()&&(c=!0,u=u+1,f=1);let d=_._findNextWordOnLine(i,n,new S.Position(u,f));if(r===2)d&&d.wordType===2&&d.end-d.start===1&&d.nextCharClass===0&&(d=_._findNextWordOnLine(i,n,new S.Position(u,d.end+1))),d?f=d.end+1:f=n.getLineMaxColumn(u);else if(r===3){for(c&&(f=0);d&&(d.wordType===2||d.start+1<=f);)d=_._findNextWordOnLine(i,n,new S.Position(u,d.end+1));d?f=d.start+1:f=n.getLineMaxColumn(u)}else d&&!c&&f>=d.start+1&&(d=_._findNextWordOnLine(i,n,new S.Position(u,d.end+1))),d?f=d.start+1:f=n.getLineMaxColumn(u);return new S.Position(u,f)}static _moveWordPartRight(i,n){const t=n.lineNumber,r=i.getLineMaxColumn(t);if(n.column===r)return t<i.getLineCount()?new S.Position(t+1,1):n;const u=i.getLineContent(t);for(let f=n.column+1;f<r;f++){const c=u.charCodeAt(f-2),d=u.charCodeAt(f-1);if(c!==95&&d===95)return new S.Position(t,f);if(c!==45&&d===45)return new S.Position(t,f);if((L.isLowerAsciiLetter(c)||L.isAsciiDigit(c))&&L.isUpperAsciiLetter(d))return new S.Position(t,f);if(L.isUpperAsciiLetter(c)&&L.isUpperAsciiLetter(d)&&f+1<r){const s=u.charCodeAt(f);if(L.isLowerAsciiLetter(s)||L.isAsciiDigit(s))return new S.Position(t,f)}}return new S.Position(t,r)}static _deleteWordLeftWhitespace(i,n){const t=i.getLineContent(n.lineNumber),r=n.column-2,u=L.lastNonWhitespaceIndex(t,r);return u+1<r?new p.Range(n.lineNumber,u+2,n.lineNumber,n.column):null}static deleteWordLeft(i,n){const t=i.wordSeparators,r=i.model,u=i.selection,f=i.whitespaceHeuristics;if(!u.isEmpty())return u;if(y.DeleteOperations.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,i.model,[i.selection],i.autoClosedCharacters)){const o=i.selection.getPosition();return new p.Range(o.lineNumber,o.column-1,o.lineNumber,o.column+1)}const c=new S.Position(u.positionLineNumber,u.positionColumn);let d=c.lineNumber,s=c.column;if(d===1&&s===1)return null;if(f){const o=this._deleteWordLeftWhitespace(r,c);if(o)return o}let l=_._findPreviousWordOnLine(t,r,c);return n===0?l?s=l.start+1:s>1?s=1:(d--,s=r.getLineMaxColumn(d)):(l&&s<=l.end+1&&(l=_._findPreviousWordOnLine(t,r,new S.Position(d,l.start+1))),l?s=l.end+1:s>1?s=1:(d--,s=r.getLineMaxColumn(d))),new p.Range(d,s,c.lineNumber,c.column)}static deleteInsideWord(i,n,t){if(!t.isEmpty())return t;const r=new S.Position(t.positionLineNumber,t.positionColumn),u=this._deleteInsideWordWhitespace(n,r);return u||this._deleteInsideWordDetermineDeleteRange(i,n,r)}static _charAtIsWhitespace(i,n){const t=i.charCodeAt(n);return t===32||t===9}static _deleteInsideWordWhitespace(i,n){const t=i.getLineContent(n.lineNumber),r=t.length;if(r===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,r-1);if(!this._charAtIsWhitespace(t,f))return null;for(;u>0&&this._charAtIsWhitespace(t,u-1);)u--;for(;f+1<r&&this._charAtIsWhitespace(t,f+1);)f++;return new p.Range(n.lineNumber,u+1,n.lineNumber,f+2)}static _deleteInsideWordDetermineDeleteRange(i,n,t){const r=n.getLineContent(t.lineNumber),u=r.length;if(u===0)return t.lineNumber>1?new p.Range(t.lineNumber-1,n.getLineMaxColumn(t.lineNumber-1),t.lineNumber,1):t.lineNumber<n.getLineCount()?new p.Range(t.lineNumber,1,t.lineNumber+1,1):new p.Range(t.lineNumber,1,t.lineNumber,1);const f=o=>o.start+1<=t.column&&t.column<=o.end+1,c=(o,g)=>(o=Math.min(o,t.column),g=Math.max(g,t.column),new p.Range(t.lineNumber,o,t.lineNumber,g)),d=o=>{let g=o.start+1,h=o.end+1,m=!1;for(;h-1<u&&this._charAtIsWhitespace(r,h-1);)m=!0,h++;if(!m)for(;g>1&&this._charAtIsWhitespace(r,g-2);)g--;return c(g,h)},s=_._findPreviousWordOnLine(i,n,t);if(s&&f(s))return d(s);const l=_._findNextWordOnLine(i,n,t);return l&&f(l)?d(l):s&&l?c(s.end+1,l.start+1):s?c(s.start+1,s.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(),r=_._moveWordPartLeft(i,t);return new p.Range(t.lineNumber,t.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(i,n){const t=i.length;for(let r=n;r<t;r++){const u=i.charAt(r);if(u!==" "&&u!==" ")return r}return t}static _deleteWordRightWhitespace(i,n){const t=i.getLineContent(n.lineNumber),r=n.column-1,u=this._findFirstNonWhitespaceChar(t,r);return r+1<u?new p.Range(n.lineNumber,n.column,n.lineNumber,u+1):null}static deleteWordRight(i,n){const t=i.wordSeparators,r=i.model,u=i.selection,f=i.whitespaceHeuristics;if(!u.isEmpty())return u;const c=new S.Position(u.positionLineNumber,u.positionColumn);let d=c.lineNumber,s=c.column;const l=r.getLineCount(),o=r.getLineMaxColumn(d);if(d===l&&s===o)return null;if(f){const h=this._deleteWordRightWhitespace(r,c);if(h)return h}let g=_._findNextWordOnLine(t,r,c);return n===2?g?s=g.end+1:s<o||d===l?s=o:(d++,g=_._findNextWordOnLine(t,r,new S.Position(d,1)),g?s=g.start+1:s=r.getLineMaxColumn(d)):(g&&s>=g.start+1&&(g=_._findNextWordOnLine(t,r,new S.Position(d,g.end+1))),g?s=g.start+1:s<o||d===l?s=o:(d++,g=_._findNextWordOnLine(t,r,new S.Position(d,1)),g?s=g.start+1:s=r.getLineMaxColumn(d))),new p.Range(d,s,c.lineNumber,c.column)}static _deleteWordPartRight(i,n){if(!n.isEmpty())return n;const t=n.getPosition(),r=_._moveWordPartRight(i,t);return new p.Range(t.lineNumber,t.column,r.lineNumber,r.column)}static _createWordAtPosition(i,n,t){const r=new p.Range(n,t.start+1,n,t.end+1);return{word:i.getValueInRange(r),startColumn:r.startColumn,endColumn:r.endColumn}}static getWordAtPosition(i,n,t){const r=(0,E.getMapForWordSeparators)(n),u=_._findPreviousWordOnLine(r,i,t);if(u&&u.wordType===1&&u.start<=t.column-1&&t.column-1<=u.end)return _._createWordAtPosition(i,t.lineNumber,u);const f=_._findNextWordOnLine(r,i,t);return f&&f.wordType===1&&f.start<=t.column-1&&t.column-1<=f.end?_._createWordAtPosition(i,t.lineNumber,f):null}static word(i,n,t,r,u){const f=(0,E.getMapForWordSeparators)(i.wordSeparators),c=_._findPreviousWordOnLine(f,n,u),d=_._findNextWordOnLine(f,n,u);if(!r){let h,m;return c&&c.wordType===1&&c.start<=u.column-1&&u.column-1<=c.end?(h=c.start+1,m=c.end+1):d&&d.wordType===1&&d.start<=u.column-1&&u.column-1<=d.end?(h=d.start+1,m=d.end+1):(c?h=c.end+1:h=1,d?m=d.start+1:m=n.getLineMaxColumn(u.lineNumber)),new k.SingleCursorState(new p.Range(u.lineNumber,h,u.lineNumber,m),1,0,new S.Position(u.lineNumber,m),0)}let s,l;c&&c.wordType===1&&c.start<u.column-1&&u.column-1<c.end?(s=c.start+1,l=c.end+1):d&&d.wordType===1&&d.start<u.column-1&&u.column-1<d.end?(s=d.start+1,l=d.end+1):(s=u.column,l=u.column);const o=u.lineNumber;let g;if(t.selectionStart.containsPosition(u))g=t.selectionStart.endColumn;else if(u.isBeforeOrEqual(t.selectionStart.getStartPosition())){g=s;const h=new S.Position(o,g);t.selectionStart.containsPosition(h)&&(g=t.selectionStart.endColumn)}else{g=l;const h=new S.Position(o,g);t.selectionStart.containsPosition(h)&&(g=t.selectionStart.startColumn)}return t.move(!0,o,g,0)}}e.WordOperations=_;class v extends _{static deleteWordPartLeft(i){const n=b([_.deleteWordLeft(i,0),_.deleteWordLeft(i,2),_._deleteWordPartLeft(i.model,i.selection)]);return n.sort(p.Range.compareRangesUsingEnds),n[2]}static deleteWordPartRight(i){const n=b([_.deleteWordRight(i,0),_.deleteWordRight(i,2),_._deleteWordPartRight(i.model,i.selection)]);return n.sort(p.Range.compareRangesUsingStarts),n[0]}static moveWordPartLeft(i,n,t){const r=b([_.moveWordLeft(i,n,t,0),_.moveWordLeft(i,n,t,2),_._moveWordPartLeft(n,t)]);return r.sort(S.Position.compare),r[2]}static moveWordPartRight(i,n,t){const r=b([_.moveWordRight(i,n,t,0),_.moveWordRight(i,n,t,2),_._moveWordPartRight(n,t)]);return r.sort(S.Position.compare),r[0]}}e.WordPartOperations=v;function b(a){return a.filter(i=>!!i)}}),define(se[208],oe([1,0,20,75,206,181,10,5]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class _{static addCursorDown(a,i,n){const t=[];let r=0;for(let u=0,f=i.length;u<f;u++){const c=i[u];t[r++]=new k.CursorState(c.modelState,c.viewState),n?t[r++]=k.CursorState.fromModelState(y.MoveOperations.translateDown(a.cursorConfig,a.model,c.modelState)):t[r++]=k.CursorState.fromViewState(y.MoveOperations.translateDown(a.cursorConfig,a,c.viewState))}return t}static addCursorUp(a,i,n){const t=[];let r=0;for(let u=0,f=i.length;u<f;u++){const c=i[u];t[r++]=new k.CursorState(c.modelState,c.viewState),n?t[r++]=k.CursorState.fromModelState(y.MoveOperations.translateUp(a.cursorConfig,a.model,c.modelState)):t[r++]=k.CursorState.fromViewState(y.MoveOperations.translateUp(a.cursorConfig,a,c.viewState))}return t}static moveToBeginningOfLine(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r];t[r]=this._moveToLineStart(a,f,n)}return t}static _moveToLineStart(a,i,n){const t=i.viewState.position.column,r=i.modelState.position.column,u=t===r,f=i.viewState.position.lineNumber,c=a.getLineFirstNonWhitespaceColumn(f);return!u&&!(t===c)?this._moveToLineStartByView(a,i,n):this._moveToLineStartByModel(a,i,n)}static _moveToLineStartByView(a,i,n){return k.CursorState.fromViewState(y.MoveOperations.moveToBeginningOfLine(a.cursorConfig,a,i.viewState,n))}static _moveToLineStartByModel(a,i,n){return k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfLine(a.cursorConfig,a.model,i.modelState,n))}static moveToEndOfLine(a,i,n,t){const r=[];for(let u=0,f=i.length;u<f;u++){const c=i[u];r[u]=this._moveToLineEnd(a,c,n,t)}return r}static _moveToLineEnd(a,i,n,t){const r=i.viewState.position,u=a.getLineMaxColumn(r.lineNumber),f=r.column===u,c=i.modelState.position,d=a.model.getLineMaxColumn(c.lineNumber),s=u-r.column===d-c.column;return f||s?this._moveToLineEndByModel(a,i,n,t):this._moveToLineEndByView(a,i,n,t)}static _moveToLineEndByView(a,i,n,t){return k.CursorState.fromViewState(y.MoveOperations.moveToEndOfLine(a.cursorConfig,a,i.viewState,n,t))}static _moveToLineEndByModel(a,i,n,t){return k.CursorState.fromModelState(y.MoveOperations.moveToEndOfLine(a.cursorConfig,a.model,i.modelState,n,t))}static expandLineSelection(a,i){const n=[];for(let t=0,r=i.length;t<r;t++){const u=i[t],f=u.modelState.selection.startLineNumber,c=a.model.getLineCount();let d=u.modelState.selection.endLineNumber,s;d===c?s=a.model.getLineMaxColumn(c):(d++,s=1),n[t]=k.CursorState.fromModelState(new k.SingleCursorState(new p.Range(f,1,f,1),0,0,new S.Position(d,s),0))}return n}static moveToBeginningOfBuffer(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r];t[r]=k.CursorState.fromModelState(y.MoveOperations.moveToBeginningOfBuffer(a.cursorConfig,a.model,f.modelState,n))}return t}static moveToEndOfBuffer(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r];t[r]=k.CursorState.fromModelState(y.MoveOperations.moveToEndOfBuffer(a.cursorConfig,a.model,f.modelState,n))}return t}static selectAll(a,i){const n=a.model.getLineCount(),t=a.model.getLineMaxColumn(n);return k.CursorState.fromModelState(new k.SingleCursorState(new p.Range(1,1,1,1),0,0,new S.Position(n,t),0))}static line(a,i,n,t,r){const u=a.model.validatePosition(t),f=r?a.coordinatesConverter.validateViewPosition(new S.Position(r.lineNumber,r.column),u):a.coordinatesConverter.convertModelPositionToViewPosition(u);if(!n){const d=a.model.getLineCount();let s=u.lineNumber+1,l=1;return s>d&&(s=d,l=a.model.getLineMaxColumn(s)),k.CursorState.fromModelState(new k.SingleCursorState(new p.Range(u.lineNumber,1,s,l),2,0,new S.Position(s,l),0))}const c=i.modelState.selectionStart.getStartPosition().lineNumber;if(u.lineNumber<c)return k.CursorState.fromViewState(i.viewState.move(!0,f.lineNumber,1,0));if(u.lineNumber>c){const d=a.getLineCount();let s=f.lineNumber+1,l=1;return s>d&&(s=d,l=a.getLineMaxColumn(s)),k.CursorState.fromViewState(i.viewState.move(!0,s,l,0))}else{const d=i.modelState.selectionStart.getEndPosition();return k.CursorState.fromModelState(i.modelState.move(!0,d.lineNumber,d.column,0))}}static word(a,i,n,t){const r=a.model.validatePosition(t);return k.CursorState.fromModelState(E.WordOperations.word(a.cursorConfig,a.model,i.modelState,n,r))}static cancelSelection(a,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 S.Position(n,t),0))}static moveTo(a,i,n,t,r){if(n){if(i.modelState.selectionStartKind===1)return this.word(a,i,n,t);if(i.modelState.selectionStartKind===2)return this.line(a,i,n,t,r)}const u=a.model.validatePosition(t),f=r?a.coordinatesConverter.validateViewPosition(new S.Position(r.lineNumber,r.column),u):a.coordinatesConverter.convertModelPositionToViewPosition(u);return k.CursorState.fromViewState(i.viewState.move(n,f.lineNumber,f.column,0))}static simpleMove(a,i,n,t,r,u){switch(n){case 0:return u===4?this._moveHalfLineLeft(a,i,t):this._moveLeft(a,i,t,r);case 1:return u===4?this._moveHalfLineRight(a,i,t):this._moveRight(a,i,t,r);case 2:return u===2?this._moveUpByViewLines(a,i,t,r):this._moveUpByModelLines(a,i,t,r);case 3:return u===2?this._moveDownByViewLines(a,i,t,r):this._moveDownByModelLines(a,i,t,r);case 4:return u===2?i.map(f=>k.CursorState.fromViewState(y.MoveOperations.moveToPrevBlankLine(a.cursorConfig,a,f.viewState,t))):i.map(f=>k.CursorState.fromModelState(y.MoveOperations.moveToPrevBlankLine(a.cursorConfig,a.model,f.modelState,t)));case 5:return u===2?i.map(f=>k.CursorState.fromViewState(y.MoveOperations.moveToNextBlankLine(a.cursorConfig,a,f.viewState,t))):i.map(f=>k.CursorState.fromModelState(y.MoveOperations.moveToNextBlankLine(a.cursorConfig,a.model,f.modelState,t)));case 6:return this._moveToViewMinColumn(a,i,t);case 7:return this._moveToViewFirstNonWhitespaceColumn(a,i,t);case 8:return this._moveToViewCenterColumn(a,i,t);case 9:return this._moveToViewMaxColumn(a,i,t);case 10:return this._moveToViewLastNonWhitespaceColumn(a,i,t);default:return null}}static viewportMove(a,i,n,t,r){const u=a.getCompletelyVisibleViewRange(),f=a.coordinatesConverter.convertViewRangeToModelRange(u);switch(n){case 11:{const c=this._firstLineNumberInRange(a.model,f,r),d=a.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(a,i[0],t,c,d)]}case 13:{const c=this._lastLineNumberInRange(a.model,f,r),d=a.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(a,i[0],t,c,d)]}case 12:{const c=Math.round((f.startLineNumber+f.endLineNumber)/2),d=a.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(a,i[0],t,c,d)]}case 14:{const c=[];for(let d=0,s=i.length;d<s;d++){const l=i[d];c[d]=this.findPositionInViewportIfOutside(a,l,u,t)}return c}default:return null}}static findPositionInViewportIfOutside(a,i,n,t){const r=i.viewState.position.lineNumber;if(n.startLineNumber<=r&&r<=n.endLineNumber-1)return new k.CursorState(i.modelState,i.viewState);{let u;r>n.endLineNumber-1?u=n.endLineNumber-1:r<n.startLineNumber?u=n.startLineNumber:u=r;const f=y.MoveOperations.vertical(a.cursorConfig,a,r,i.viewState.position.column,i.viewState.leftoverVisibleColumns,u,!1);return k.CursorState.fromViewState(i.viewState.move(t,f.lineNumber,f.column,f.leftoverVisibleColumns))}}static _firstLineNumberInRange(a,i,n){let t=i.startLineNumber;return i.startColumn!==a.getLineMinColumn(t)&&t++,Math.min(i.endLineNumber,t+n-1)}static _lastLineNumberInRange(a,i,n){let t=i.startLineNumber;return i.startColumn!==a.getLineMinColumn(t)&&t++,Math.max(t,i.endLineNumber-n+1)}static _moveLeft(a,i,n,t){return i.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveLeft(a.cursorConfig,a,r.viewState,n,t)))}static _moveHalfLineLeft(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=Math.round(a.getLineLength(c)/2);t[r]=k.CursorState.fromViewState(y.MoveOperations.moveLeft(a.cursorConfig,a,f.viewState,n,d))}return t}static _moveRight(a,i,n,t){return i.map(r=>k.CursorState.fromViewState(y.MoveOperations.moveRight(a.cursorConfig,a,r.viewState,n,t)))}static _moveHalfLineRight(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=Math.round(a.getLineLength(c)/2);t[r]=k.CursorState.fromViewState(y.MoveOperations.moveRight(a.cursorConfig,a,f.viewState,n,d))}return t}static _moveDownByViewLines(a,i,n,t){const r=[];for(let u=0,f=i.length;u<f;u++){const c=i[u];r[u]=k.CursorState.fromViewState(y.MoveOperations.moveDown(a.cursorConfig,a,c.viewState,n,t))}return r}static _moveDownByModelLines(a,i,n,t){const r=[];for(let u=0,f=i.length;u<f;u++){const c=i[u];r[u]=k.CursorState.fromModelState(y.MoveOperations.moveDown(a.cursorConfig,a.model,c.modelState,n,t))}return r}static _moveUpByViewLines(a,i,n,t){const r=[];for(let u=0,f=i.length;u<f;u++){const c=i[u];r[u]=k.CursorState.fromViewState(y.MoveOperations.moveUp(a.cursorConfig,a,c.viewState,n,t))}return r}static _moveUpByModelLines(a,i,n,t){const r=[];for(let u=0,f=i.length;u<f;u++){const c=i[u];r[u]=k.CursorState.fromModelState(y.MoveOperations.moveUp(a.cursorConfig,a.model,c.modelState,n,t))}return r}static _moveToViewPosition(a,i,n,t,r){return k.CursorState.fromViewState(i.viewState.move(n,t,r,0))}static _moveToModelPosition(a,i,n,t,r){return k.CursorState.fromModelState(i.modelState.move(n,t,r,0))}static _moveToViewMinColumn(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=a.getLineMinColumn(c);t[r]=this._moveToViewPosition(a,f,n,c,d)}return t}static _moveToViewFirstNonWhitespaceColumn(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=a.getLineFirstNonWhitespaceColumn(c);t[r]=this._moveToViewPosition(a,f,n,c,d)}return t}static _moveToViewCenterColumn(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=Math.round((a.getLineMaxColumn(c)+a.getLineMinColumn(c))/2);t[r]=this._moveToViewPosition(a,f,n,c,d)}return t}static _moveToViewMaxColumn(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=a.getLineMaxColumn(c);t[r]=this._moveToViewPosition(a,f,n,c,d)}return t}static _moveToViewLastNonWhitespaceColumn(a,i,n){const t=[];for(let r=0,u=i.length;r<u;r++){const f=i[r],c=f.viewState.position.lineNumber,d=a.getLineLastNonWhitespaceColumn(c);t[r]=this._moveToViewPosition(a,f,n,c,d)}return t}}e.CursorMoveCommands=_;var v;(function(b){const a=function(n){if(!L.isObject(n))return!1;const t=n;return!(!L.isString(t.to)||!L.isUndefined(t.select)&&!L.isBoolean(t.select)||!L.isUndefined(t.by)&&!L.isString(t.by)||!L.isUndefined(t.value)&&!L.isNumber(t.value))};b.metadata={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
|
||
* 'to': A mandatory logical position value providing where to move the cursor.
|
||
\`\`\`
|
||
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
||
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
||
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
||
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
||
\`\`\`
|
||
* 'by': Unit to move. Default is computed based on 'to' value.
|
||
\`\`\`
|
||
'line', 'wrappedLine', 'character', 'halfLine'
|
||
\`\`\`
|
||
* 'value': Number of units to move. Default is '1'.
|
||
* 'select': If 'true' makes the selection. Default is 'false'.
|
||
`,constraint:a,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},b.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},b.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function i(n){if(!n.to)return null;let t;switch(n.to){case b.RawDirection.Left:t=0;break;case b.RawDirection.Right:t=1;break;case b.RawDirection.Up:t=2;break;case b.RawDirection.Down:t=3;break;case b.RawDirection.PrevBlankLine:t=4;break;case b.RawDirection.NextBlankLine:t=5;break;case b.RawDirection.WrappedLineStart:t=6;break;case b.RawDirection.WrappedLineFirstNonWhitespaceCharacter:t=7;break;case b.RawDirection.WrappedLineColumnCenter:t=8;break;case b.RawDirection.WrappedLineEnd:t=9;break;case b.RawDirection.WrappedLineLastNonWhitespaceCharacter:t=10;break;case b.RawDirection.ViewPortTop:t=11;break;case b.RawDirection.ViewPortBottom:t=13;break;case b.RawDirection.ViewPortCenter:t=12;break;case b.RawDirection.ViewPortIfOutside:t=14;break;default:return null}let r=0;switch(n.by){case b.RawUnit.Line:r=1;break;case b.RawUnit.WrappedLine:r=2;break;case b.RawUnit.Character:r=3;break;case b.RawUnit.HalfLine:r=4;break}return{direction:t,unit:r,select:!!n.select,value:n.value||1}}b.parse=i})(v||(e.CursorMove=v={}))}),define(se[512],oe([1,0,75,10,5,24]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=void 0;class S{constructor(_){this._selTrackedRange=null,this._trackSelection=!0,this._setState(_,new L.SingleCursorState(new y.Range(1,1,1,1),0,0,new k.Position(1,1),0),new L.SingleCursorState(new y.Range(1,1,1,1),0,0,new k.Position(1,1),0))}dispose(_){this._removeTrackedRange(_)}startTrackingSelection(_){this._trackSelection=!0,this._updateTrackedRange(_)}stopTrackingSelection(_){this._trackSelection=!1,this._removeTrackedRange(_)}_updateTrackedRange(_){this._trackSelection&&(this._selTrackedRange=_.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(_){this._selTrackedRange=_.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new L.CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(_){const v=_.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.isEmpty()&&!v.isEmpty()?E.Selection.fromRange(v.collapseToEnd(),this.modelState.selection.getDirection()):E.Selection.fromRange(v,this.modelState.selection.getDirection())}ensureValidState(_){this._setState(_,this.modelState,this.viewState)}setState(_,v,b){this._setState(_,v,b)}static _validatePositionWithCache(_,v,b,a){return v.equals(b)?a:_.normalizePosition(v,2)}static _validateViewState(_,v){const b=v.position,a=v.selectionStart.getStartPosition(),i=v.selectionStart.getEndPosition(),n=_.normalizePosition(b,2),t=this._validatePositionWithCache(_,a,b,n),r=this._validatePositionWithCache(_,i,a,t);return b.equals(n)&&a.equals(t)&&i.equals(r)?v:new L.SingleCursorState(y.Range.fromPositions(t,r),v.selectionStartKind,v.selectionStartLeftoverVisibleColumns+a.column-t.column,n,v.leftoverVisibleColumns+b.column-n.column)}_setState(_,v,b){if(b&&(b=S._validateViewState(_.viewModel,b)),v){const a=_.model.validateRange(v.selectionStart),i=v.selectionStart.equalsRange(a)?v.selectionStartLeftoverVisibleColumns:0,n=_.model.validatePosition(v.position),t=v.position.equals(n)?v.leftoverVisibleColumns:0;v=new L.SingleCursorState(a,v.selectionStartKind,i,n,t)}else{if(!b)return;const a=_.model.validateRange(_.coordinatesConverter.convertViewRangeToModelRange(b.selectionStart)),i=_.model.validatePosition(_.coordinatesConverter.convertViewPositionToModelPosition(b.position));v=new L.SingleCursorState(a,b.selectionStartKind,b.selectionStartLeftoverVisibleColumns,i,b.leftoverVisibleColumns)}if(b){const a=_.coordinatesConverter.validateViewRange(b.selectionStart,v.selectionStart),i=_.coordinatesConverter.validateViewPosition(b.position,v.position);b=new L.SingleCursorState(a,v.selectionStartKind,v.selectionStartLeftoverVisibleColumns,i,v.leftoverVisibleColumns)}else{const a=_.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(v.selectionStart.startLineNumber,v.selectionStart.startColumn)),i=_.coordinatesConverter.convertModelPositionToViewPosition(new k.Position(v.selectionStart.endLineNumber,v.selectionStart.endColumn)),n=new y.Range(a.lineNumber,a.column,i.lineNumber,i.column),t=_.coordinatesConverter.convertModelPositionToViewPosition(v.position);b=new L.SingleCursorState(n,v.selectionStartKind,v.selectionStartLeftoverVisibleColumns,t,v.leftoverVisibleColumns)}this.modelState=v,this.viewState=b,this._updateTrackedRange(_)}}e.Cursor=S}),define(se[513],oe([1,0,13,60,75,512,10,5,24]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class v{constructor(a){this.context=a,this.cursors=[new E.Cursor(a)],this.lastAddedCursorIndex=0}dispose(){for(const a of this.cursors)a.dispose(this.context)}startTrackingSelections(){for(const a of this.cursors)a.startTrackingSelection(this.context)}stopTrackingSelections(){for(const a of this.cursors)a.stopTrackingSelection(this.context)}updateContext(a){this.context=a}ensureValidState(){for(const a of this.cursors)a.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(a=>a.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(a=>a.asCursorState())}getViewPositions(){return this.cursors.map(a=>a.viewState.position)}getTopMostViewPosition(){return(0,k.findFirstMinBy)(this.cursors,(0,L.compareBy)(a=>a.viewState.position,S.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,k.findLastMaxBy)(this.cursors,(0,L.compareBy)(a=>a.viewState.position,S.Position.compare)).viewState.position}getSelections(){return this.cursors.map(a=>a.modelState.selection)}getViewSelections(){return this.cursors.map(a=>a.viewState.selection)}setSelections(a){this.setStates(y.CursorState.fromModelSelections(a))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(a){a!==null&&(this.cursors[0].setState(this.context,a[0].modelState,a[0].viewState),this._setSecondaryStates(a.slice(1)))}_setSecondaryStates(a){const i=this.cursors.length-1,n=a.length;if(i<n){const t=n-i;for(let r=0;r<t;r++)this._addSecondaryCursor()}else if(i>n){const t=i-n;for(let r=0;r<t;r++)this._removeSecondaryCursor(this.cursors.length-2)}for(let t=0;t<n;t++)this.cursors[t+1].setState(this.context,a[t].modelState,a[t].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new E.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(a){this.lastAddedCursorIndex>=a+1&&this.lastAddedCursorIndex--,this.cursors[a+1].dispose(this.context),this.cursors.splice(a+1,1)}normalize(){if(this.cursors.length===1)return;const a=this.cursors.slice(0),i=[];for(let n=0,t=a.length;n<t;n++)i.push({index:n,selection:a[n].modelState.selection});i.sort((0,L.compareBy)(n=>n.selection,p.Range.compareRangesUsingStarts));for(let n=0;n<i.length-1;n++){const t=i[n],r=i[n+1],u=t.selection,f=r.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let c;if(f.isEmpty()||u.isEmpty()?c=f.getStartPosition().isBeforeOrEqual(u.getEndPosition()):c=f.getStartPosition().isBefore(u.getEndPosition()),c){const d=t.index<r.index?n:n+1,s=t.index<r.index?n+1:n,l=i[s].index,o=i[d].index,g=i[s].selection,h=i[d].selection;if(!g.equalsSelection(h)){const m=g.plusRange(h),C=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn,w=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn;let D;l===this.lastAddedCursorIndex?(D=C,this.lastAddedCursorIndex=o):D=w;let I;D?I=new _.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):I=new _.Selection(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),i[d].selection=I;const T=y.CursorState.fromModelSelection(I);a[o].setState(this.context,T.modelState,T.viewState)}for(const m of i)m.index>l&&m.index--;a.splice(l,1),i.splice(s,1),this._removeSecondaryCursor(l-1),n--}}}}e.CursorCollection=v}),define(se[514],oe([1,0,113]),function(te,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(S=>new L.StandardAutoClosingPairConditional(S)):E.brackets?this._autoClosingPairs=E.brackets.map(S=>new L.StandardAutoClosingPairConditional({open:S[0],close:S[1]})):this._autoClosingPairs=[],E.__electricCharacterSupport&&E.__electricCharacterSupport.docComment){const S=E.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new L.StandardAutoClosingPairConditional({open:S.open,close:S.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(se[515],oe([1,0]),function(te,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 S=0;return this.shouldIncrease(E)&&(S+=1),this.shouldDecrease(E)&&(S+=2),this.shouldIndentNextLine(E)&&(S+=4),this.shouldIgnore(E)&&(S+=8),S}}e.IndentRulesSupport=k}),define(se[516],oe([1,0]),function(te,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,S,p,_){if(y&&E){const v=this.doNavigateValueSet(E,_);if(v)return{range:y,value:v}}if(S&&p){const v=this.doNavigateValueSet(p,_);if(v)return{range:S,value:v}}return null}doNavigateValueSet(y,E){const S=this.numberReplace(y,E);return S!==null?S:this.textReplace(y,E)}numberReplace(y,E){const S=Math.pow(10,y.length-(y.lastIndexOf(".")+1));let p=Number(y);const _=parseFloat(y);return!isNaN(p)&&!isNaN(_)&&p===_?p===0&&!E?null:(p=Math.floor(p*S),p+=E?S:-S,String(p/S)):null}textReplace(y,E){return this.valueSetsReplace(this._defaultValueSet,y,E)}valueSetsReplace(y,E,S){let p=null;for(let _=0,v=y.length;p===null&&_<v;_++)p=this.valueSetReplace(y[_],E,S);return p}valueSetReplace(y,E,S){let p=y.indexOf(E);return p>=0?(p+=S?1:-1,p<0?p=y.length-1:p%=y.length,y[p]):null}}e.BasicInplaceReplace=L,L.INSTANCE=new L}),define(se[517],oe([1,0,267]),function(te,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 a=b.brackets?y(b.brackets):[],i=new L.CachedFunction(r=>{const u=new Set;return{info:new S(this,r,u),closing:u}}),n=new L.CachedFunction(r=>{const u=new Set,f=new Set;return{info:new p(this,r,u,f),opening:u,openingColorized:f}});for(const[r,u]of a){const f=i.get(r),c=n.get(u);f.closing.add(c.info),c.opening.add(f.info)}const t=b.colorizedBracketPairs?y(b.colorizedBracketPairs):a.filter(r=>!(r[0]==="<"&&r[1]===">"));for(const[r,u]of t){const f=i.get(r),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(([r,u])=>[r,u.info])),this._closingBrackets=new Map([...n.cachedValues].map(([r,u])=>[r,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(_){return _.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 S extends E{constructor(v,b,a){super(v,b),this.openedBrackets=a,this.isOpeningBracket=!0}}e.OpeningBracketKind=S;class p extends E{constructor(v,b,a,i){super(v,b),this.openingBrackets=a,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(se[518],oe([1,0,12,11,113]),function(te,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(_=>{const v=E._createOpenBracketRegExp(_[0]),b=E._createCloseBracketRegExp(_[1]);v&&b&&this._brackets.push({open:_[0],openRegExp:v,close:_[1],closeRegExp:b})}),this._regExpRules=p.onEnterRules||[]}onEnter(p,_,v,b){if(p>=3)for(let a=0,i=this._regExpRules.length;a<i;a++){const n=this._regExpRules[a];if([{reg:n.beforeText,text:v},{reg:n.afterText,text:b},{reg:n.previousLineText,text:_}].every(r=>r.reg?(r.reg.lastIndex=0,r.reg.test(r.text)):!0))return n.action}if(p>=2&&v.length>0&&b.length>0)for(let a=0,i=this._brackets.length;a<i;a++){const n=this._brackets[a];if(n.openRegExp.test(v)&&n.closeRegExp.test(b))return{indentAction:y.IndentAction.IndentOutdent}}if(p>=2&&v.length>0){for(let a=0,i=this._brackets.length;a<i;a++)if(this._brackets[a].openRegExp.test(v))return{indentAction:y.IndentAction.Indent}}return null}static _createOpenBracketRegExp(p){let _=k.escapeRegExpCharacters(p);return/\B/.test(_.charAt(0))||(_="\\b"+_),_+="\\s*$",E._safeRegExp(_)}static _createCloseBracketRegExp(p){let _=k.escapeRegExpCharacters(p);return/\B/.test(_.charAt(_.length-1))||(_=_+"\\b"),_="^\\s*"+_,E._safeRegExp(_)}static _safeRegExp(p){try{return new RegExp(p)}catch(_){return(0,L.onUnexpectedError)(_),null}}}e.OnEnterSupport=E}),define(se[519],oe([1,0,39]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateTokensCSSForColorMap=e.ThemeTrieElement=e.ThemeTrieElementRule=e.strcmp=e.toStandardTokenType=e.TokenTheme=e.ColorMap=e.parseTokenTheme=e.ParsedTokenThemeRule=void 0;class k{constructor(u,f,c,d,s){this._parsedThemeRuleBrand=void 0,this.token=u,this.index=f,this.fontStyle=c,this.foreground=d,this.background=s}}e.ParsedTokenThemeRule=k;function y(r){if(!r||!Array.isArray(r))return[];const u=[];let f=0;for(let c=0,d=r.length;c<d;c++){const s=r[c];let l=-1;if(typeof s.fontStyle=="string"){l=0;const h=s.fontStyle.split(" ");for(let m=0,C=h.length;m<C;m++)switch(h[m]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let o=null;typeof s.foreground=="string"&&(o=s.foreground);let g=null;typeof s.background=="string"&&(g=s.background),u[f++]=new k(s.token||"",c,l,o,g)}return u}e.parseTokenTheme=y;function E(r,u){r.sort((m,C)=>{const w=a(m.token,C.token);return w!==0?w:m.index-C.index});let f=0,c="000000",d="ffffff";for(;r.length>=1&&r[0].token==="";){const m=r.shift();m.fontStyle!==-1&&(f=m.fontStyle),m.foreground!==null&&(c=m.foreground),m.background!==null&&(d=m.background)}const s=new p;for(const m of u)s.getId(m);const l=s.getId(c),o=s.getId(d),g=new i(f,l,o),h=new n(g);for(let m=0,C=r.length;m<C;m++){const w=r[m];h.insert(w.token,w.fontStyle,s.getId(w.foreground),s.getId(w.background))}return new _(s,h)}const S=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class p{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(u){if(u===null)return 0;const f=u.match(S);if(!f)throw new Error("Illegal value for token color: "+u);u=f[1].toUpperCase();let c=this._color2id.get(u);return c||(c=++this._lastColorId,this._color2id.set(u,c),this._id2color[c]=L.Color.fromHex("#"+u),c)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=p;class _{static createFromRawTokenTheme(u,f){return this.createFromParsedTokenTheme(y(u),f)}static createFromParsedTokenTheme(u,f){return E(u,f)}constructor(u,f){this._colorMap=u,this._root=f,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}_match(u){return this._root.match(u)}match(u,f){let c=this._cache.get(f);if(typeof c>"u"){const d=this._match(f),s=b(f);c=(d.metadata|s<<8)>>>0,this._cache.set(f,c)}return(c|u<<0)>>>0}}e.TokenTheme=_;const v=/\b(comment|string|regex|regexp)\b/;function b(r){const u=r.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 a(r,u){return r<u?-1:r>u?1:0}e.strcmp=a;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 s=this._children.get(c);return typeof s<"u"?s.match(d):this._mainRule}insert(u,f,c,d){if(u===""){this._mainRule.acceptOverwrite(f,c,d);return}const s=u.indexOf(".");let l,o;s===-1?(l=u,o=""):(l=u.substring(0,s),o=u.substring(s+1));let g=this._children.get(l);typeof g>"u"&&(g=new n(this._mainRule.clone()),this._children.set(l,g)),g.insert(o,f,c,d)}}e.ThemeTrieElement=n;function t(r){const u=[];for(let f=1,c=r.length;f<c;f++){const d=r[f];u[f]=`.mtk${f} { color: ${d}; }`}return u.push(".mtki { font-style: italic; }"),u.push(".mtkb { font-weight: bold; }"),u.push(".mtku { text-decoration: underline; text-underline-position: under; }"),u.push(".mtks { text-decoration: line-through; }"),u.push(".mtks.mtku { text-decoration: underline line-through; text-underline-position: under; }"),u.join(`
|
||
`)}e.generateTokensCSSForColorMap=t}),define(se[41],oe([1,0,55]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.isITextSnapshot=e.FindMatch=e.TextModelResolvedOptions=e.InjectedTextCursorStops=e.MinimapPosition=e.GlyphMarginLane=e.OverviewRulerLane=void 0;var k;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(k||(e.OverviewRulerLane=k={}));var y;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(y||(e.GlyphMarginLane=y={}));var E;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(E||(e.MinimapPosition=E={}));var S;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(S||(e.InjectedTextCursorStops=S={}));class p{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(r){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,r.tabSize|0),r.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,r.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!r.insertSpaces,this.defaultEOL=r.defaultEOL|0,this.trimAutoWhitespace=!!r.trimAutoWhitespace,this.bracketPairColorizationOptions=r.bracketPairColorizationOptions}equals(r){return this.tabSize===r.tabSize&&this._indentSizeIsTabSize===r._indentSizeIsTabSize&&this.indentSize===r.indentSize&&this.insertSpaces===r.insertSpaces&&this.defaultEOL===r.defaultEOL&&this.trimAutoWhitespace===r.trimAutoWhitespace&&(0,L.equals)(this.bracketPairColorizationOptions,r.bracketPairColorizationOptions)}createChangeEvent(r){return{tabSize:this.tabSize!==r.tabSize,indentSize:this.indentSize!==r.indentSize,insertSpaces:this.insertSpaces!==r.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==r.trimAutoWhitespace}}}e.TextModelResolvedOptions=p;class _{constructor(r,u){this._findMatchBrand=void 0,this.range=r,this.matches=u}}e.FindMatch=_;function v(t){return t&&typeof t.read=="function"}e.isITextSnapshot=v;class b{constructor(r,u,f,c,d,s){this.identifier=r,this.range=u,this.text=f,this.forceMoveMarkers=c,this.isAutoWhitespaceEdit=d,this._isTracked=s}}e.ValidAnnotatedEditOperation=b;class a{constructor(r,u,f){this.regex=r,this.wordSeparators=u,this.simpleSearch=f}}e.SearchData=a;class i{constructor(r,u,f){this.reverseEdits=r,this.changes=u,this.trimAutoWhitespaceLineNumbers=f}}e.ApplyEditsResult=i;function n(t){return!t.isTooLargeForSyncing()&&!t.isForSimpleWidget}e.shouldSynchronizeModel=n}),define(se[91],oe([1,0,11,5]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfString=e.lengthsToRange=e.positionToLength=e.lengthGreaterThanEqual=e.lengthLessThanEqual=e.lengthLessThan=e.lengthDiffNonNegative=e.lengthEquals=e.sumLengths=e.lengthAdd=e.lengthGetColumnCountIfZeroLineCount=e.lengthGetLineCount=e.lengthToObj=e.toLength=e.lengthIsZero=e.lengthZero=e.lengthDiff=e.LengthObj=void 0;class y{constructor(g,h){this.lineCount=g,this.columnCount=h}toString(){return`${this.lineCount},${this.columnCount}`}}e.LengthObj=y,y.zero=new y(0,0);function E(o,g,h,m){return o!==h?_(h-o,m):_(0,m-g)}e.lengthDiff=E,e.lengthZero=0;function S(o){return o===0}e.lengthIsZero=S;const p=2**26;function _(o,g){return o*p+g}e.toLength=_;function v(o){const g=o,h=Math.floor(g/p),m=g-h*p;return new y(h,m)}e.lengthToObj=v;function b(o){return Math.floor(o/p)}e.lengthGetLineCount=b;function a(o){return o}e.lengthGetColumnCountIfZeroLineCount=a;function i(o,g){let h=o+g;return g>=p&&(h=h-o%p),h}e.lengthAdd=i;function n(o,g){return o.reduce((h,m)=>i(h,g(m)),e.lengthZero)}e.sumLengths=n;function t(o,g){return o===g}e.lengthEquals=t;function r(o,g){const h=o,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 T=h-w*p;return _(0,I-T)}else return _(D-w,I)}e.lengthDiffNonNegative=r;function u(o,g){return o<g}e.lengthLessThan=u;function f(o,g){return o<=g}e.lengthLessThanEqual=f;function c(o,g){return o>=g}e.lengthGreaterThanEqual=c;function d(o){return _(o.lineNumber-1,o.column-1)}e.positionToLength=d;function s(o,g){const h=o,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=s;function l(o){const g=(0,L.splitLines)(o);return _(g.length-1,g[g.length-1].length)}e.lengthOfString=l}),define(se[182],oe([1,0,5,91]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class y{static fromModelContentChanges(_){return _.map(b=>{const a=L.Range.lift(b.range);return new y((0,k.positionToLength)(a.getStartPosition()),(0,k.positionToLength)(a.getEndPosition()),(0,k.lengthOfString)(b.text))}).reverse()}constructor(_,v,b){this.startOffset=_,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(_){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=_.map(v=>S.from(v))}getOffsetBeforeChange(_){return this.adjustNextEdit(_),this.translateCurToOld(_)}getDistanceToNextChange(_){this.adjustNextEdit(_);const v=this.edits[this.nextEditIdx],b=v?this.translateOldToCur(v.offsetObj):null;return b===null?null:(0,k.lengthDiffNonNegative)(_,b)}translateOldToCur(_){return _.lineCount===this.deltaLineIdxInOld?(0,k.toLength)(_.lineCount+this.deltaOldToNewLineCount,_.columnCount+this.deltaOldToNewColumnCount):(0,k.toLength)(_.lineCount+this.deltaOldToNewLineCount,_.columnCount)}translateCurToOld(_){const v=(0,k.lengthToObj)(_);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(_){for(;this.nextEditIdx<this.edits.length;){const v=this.edits[this.nextEditIdx],b=this.translateOldToCur(v.endOffsetAfterObj);if((0,k.lengthLessThanEqual)(b,_)){this.nextEditIdx++;const a=(0,k.lengthToObj)(b),i=(0,k.lengthToObj)(this.translateOldToCur(v.endOffsetBeforeObj)),n=a.lineCount-i.lineCount;this.deltaOldToNewLineCount+=n;const t=this.deltaLineIdxInOld===v.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,r=a.columnCount-i.columnCount;this.deltaOldToNewColumnCount=t+r,this.deltaLineIdxInOld=v.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=E;class S{static from(_){return new S(_.startOffset,_.endOffset,_.newLength)}constructor(_,v,b){this.endOffsetBeforeObj=(0,k.lengthToObj)(v),this.endOffsetAfterObj=(0,k.lengthToObj)((0,k.lengthAdd)(_,b)),this.offsetObj=(0,k.lengthToObj)(_)}}}),define(se[288],oe([1,0,13,182,91]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.combineTextEditInfos=void 0;function E(_,v){if(_.length===0)return v;if(v.length===0)return _;const b=new L.ArrayQueue(p(_)),a=p(v);a.push({modified:!1,lengthBefore:void 0,lengthAfter:void 0});let i=b.dequeue();function n(f){if(f===void 0){const d=b.takeWhile(s=>!0)||[];return i&&d.unshift(i),d}const c=[];for(;i&&!(0,y.lengthIsZero)(f);){const[d,s]=i.splitAt(f);c.push(d),f=(0,y.lengthDiffNonNegative)(d.lengthAfter,f),i=s??b.dequeue()}return(0,y.lengthIsZero)(f)||c.push(new S(!1,f,f)),c}const t=[];function r(f,c,d){if(t.length>0&&(0,y.lengthEquals)(t[t.length-1].endOffset,f)){const s=t[t.length-1];t[t.length-1]=new k.TextEditInfo(s.startOffset,c,(0,y.lengthAdd)(s.newLength,d))}else t.push({startOffset:f,endOffset:c,newLength:d})}let u=y.lengthZero;for(const f of a){const c=n(f.lengthBefore);if(f.modified){const d=(0,y.sumLengths)(c,l=>l.lengthBefore),s=(0,y.lengthAdd)(u,d);r(u,s,f.lengthAfter),u=s}else for(const d of c){const s=u;u=(0,y.lengthAdd)(u,d.lengthBefore),d.modified&&r(s,u,d.lengthAfter)}}return t}e.combineTextEditInfos=E;class S{constructor(v,b,a){this.modified=v,this.lengthBefore=b,this.lengthAfter=a}splitAt(v){const b=(0,y.lengthDiffNonNegative)(v,this.lengthAfter);return(0,y.lengthEquals)(b,y.lengthZero)?[this,void 0]:this.modified?[new S(this.modified,this.lengthBefore,v),new S(this.modified,y.lengthZero,b)]:[new S(this.modified,v,v),new S(this.modified,b,b)]}toString(){return`${this.modified?"M":"U"}:${(0,y.lengthToObj)(this.lengthBefore)} -> ${(0,y.lengthToObj)(this.lengthAfter)}`}}function p(_){const v=[];let b=y.lengthZero;for(const a of _){const i=(0,y.lengthDiffNonNegative)(b,a.startOffset);(0,y.lengthIsZero)(i)||v.push(new S(!1,i,i));const n=(0,y.lengthDiffNonNegative)(a.startOffset,a.endOffset);v.push(new S(!0,n,a.newLength)),b=a.endOffset}return v}}),define(se[520],oe([1,0,91]),function(te,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,_){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 a=y(v);a!==-1?(this.nextNodes.push(v.getChild(a)),this.offsets.push(b),this.idxs.push(a)):this.nextNodeAfterCurrent()}else{if(_(v))return this.nextNodeAfterCurrent(),v;{const a=y(v);if(a===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(v.getChild(a)),this.offsets.push(b),this.idxs.push(a)}}}}nextNodeAfterCurrent(){for(;;){const p=E(this.offsets),_=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,_.length)),this.idxs[this.idxs.length-1]=b;break}else this.idxs.pop()}}}e.NodeReader=k;function y(S,p=-1){for(;;){if(p++,p>=S.childrenLength)return-1;if(S.getChild(p))return p}}function E(S){return S.length>0?S[S.length-1]:void 0}}),define(se[134],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const L=[];class k{static create(S,p){if(S<=128&&p.length===0){let _=k.cache[S];return _||(_=new k(S,p),k.cache[S]=_),_}return new k(S,p)}static getEmpty(){return this.empty}constructor(S,p){this.items=S,this.additionalItems=p}add(S,p){const _=p.getKey(S);let v=_>>5;if(v===0){const a=1<<_|this.items;return a===this.items?this:k.create(a,this.additionalItems)}v--;const b=this.additionalItems.slice(0);for(;b.length<v;)b.push(0);return b[v]|=1<<(_&31),k.create(this.items,b)}merge(S){const p=this.items|S.items;if(this.additionalItems===L&&S.additionalItems===L)return p===this.items?this:p===S.items?S:k.create(p,L);const _=[];for(let v=0;v<Math.max(this.additionalItems.length,S.additionalItems.length);v++){const b=this.additionalItems[v]||0,a=S.additionalItems[v]||0;_.push(b|a)}return k.create(p,_)}intersects(S){if(this.items&S.items)return!0;for(let p=0;p<Math.min(this.additionalItems.length,S.additionalItems.length);p++)if(this.additionalItems[p]&S.additionalItems[p])return!0;return!1}}e.SmallImmutableSet=k,k.cache=new Array(129),k.empty=k.create(0,L),e.identityKeyProvider={getKey(E){return E}};class y{constructor(){this.items=new Map}getKey(S){let p=this.items.get(S);return p===void 0&&(p=this.items.size,this.items.set(S,p)),p}}e.DenseKeyProvider=y}),define(se[183],oe([1,0,12,85,91,134]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InvalidBracketAstNode=e.BracketAstNode=e.TextAstNode=e.ListAstNode=e.PairAstNode=void 0;class S{get length(){return this._length}constructor(d){this._length=d}}class p extends S{static create(d,s,l){let o=d.length;return s&&(o=(0,y.lengthAdd)(o,s.length)),l&&(o=(0,y.lengthAdd)(o,l.length)),new p(o,d,s,l,s?s.missingOpeningBracketIds:E.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(d){switch(d){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const d=[];return d.push(this.openingBracket),this.child&&d.push(this.child),this.closingBracket&&d.push(this.closingBracket),d}constructor(d,s,l,o,g){super(d),this.openingBracket=s,this.child=l,this.closingBracket=o,this.missingOpeningBracketIds=g}canBeReused(d){return!(this.closingBracket===null||d.intersects(this.missingOpeningBracketIds))}deepClone(){return new p(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(d,s){return this.child?this.child.computeMinIndentation((0,y.lengthAdd)(d,this.openingBracket.length),s):Number.MAX_SAFE_INTEGER}}e.PairAstNode=p;class _ extends S{static create23(d,s,l,o=!1){let g=d.length,h=d.missingOpeningBracketIds;if(d.listHeight!==s.listHeight)throw new Error("Invalid list heights");if(g=(0,y.lengthAdd)(g,s.length),h=h.merge(s.missingOpeningBracketIds),l){if(d.listHeight!==l.listHeight)throw new Error("Invalid list heights");g=(0,y.lengthAdd)(g,l.length),h=h.merge(l.missingOpeningBracketIds)}return o?new b(g,d.listHeight+1,d,s,l,h):new v(g,d.listHeight+1,d,s,l,h)}static getEmpty(){return new i(y.lengthZero,0,[],E.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(d,s,l){super(d),this.listHeight=s,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const d=this.childrenLength;if(d===0)return;const s=this.getChild(d-1),l=s.kind===4?s.toMutable():s;return s!==l&&this.setChild(d-1,l),l}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const s=this.getChild(0),l=s.kind===4?s.toMutable():s;return s!==l&&this.setChild(0,l),l}canBeReused(d){if(d.intersects(this.missingOpeningBracketIds)||this.childrenLength===0)return!1;let s=this;for(;s.kind===4;){const l=s.childrenLength;if(l===0)throw new L.BugIndicatingError;s=s.getChild(l-1)}return s.canBeReused(d)}handleChildrenChanged(){this.throwIfImmutable();const d=this.childrenLength;let s=this.getChild(0).length,l=this.getChild(0).missingOpeningBracketIds;for(let o=1;o<d;o++){const g=this.getChild(o);s=(0,y.lengthAdd)(s,g.length),l=l.merge(g.missingOpeningBracketIds)}this._length=s,this._missingOpeningBracketIds=l,this.cachedMinIndentation=-1}computeMinIndentation(d,s){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let l=Number.MAX_SAFE_INTEGER,o=d;for(let g=0;g<this.childrenLength;g++){const h=this.getChild(g);h&&(l=Math.min(l,h.computeMinIndentation(o,s)),o=(0,y.lengthAdd)(o,h.length))}return this.cachedMinIndentation=l,l}}e.ListAstNode=_;class v extends _{get childrenLength(){return this._item3!==null?3:2}getChild(d){switch(d){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(d,s){switch(d){case 0:this._item1=s;return;case 1:this._item2=s;return;case 2:this._item3=s;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}constructor(d,s,l,o,g,h){super(d,s,h),this._item1=l,this._item2=o,this._item3=g}deepClone(){return new v(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(d){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=d,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const d=this._item3;return this._item3=null,this.handleChildrenChanged(),d}prependChildOfSameHeight(d){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=d,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const d=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),d}toMutable(){return this}}class b extends v{toMutable(){return new v(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class a extends _{get childrenLength(){return this._children.length}getChild(d){return this._children[d]}setChild(d,s){this._children[d]=s}get children(){return this._children}constructor(d,s,l,o){super(d,s,o),this._children=l}deepClone(){const d=new Array(this._children.length);for(let s=0;s<this._children.length;s++)d[s]=this._children[s].deepClone();return new a(this.length,this.listHeight,d,this.missingOpeningBracketIds)}appendChildOfSameHeight(d){this.throwIfImmutable(),this._children.push(d),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const d=this._children.pop();return this.handleChildrenChanged(),d}prependChildOfSameHeight(d){this.throwIfImmutable(),this._children.unshift(d),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const d=this._children.shift();return this.handleChildrenChanged(),d}toMutable(){return this}}class i extends a{toMutable(){return new a(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const n=[];class t extends S{get listHeight(){return 0}get childrenLength(){return 0}getChild(d){return null}get children(){return n}deepClone(){return this}}class r extends t{get kind(){return 0}get missingOpeningBracketIds(){return E.SmallImmutableSet.getEmpty()}canBeReused(d){return!0}computeMinIndentation(d,s){const l=(0,y.lengthToObj)(d),o=(l.columnCount===0?l.lineCount:l.lineCount+1)+1,g=(0,y.lengthGetLineCount)((0,y.lengthAdd)(d,this.length))+1;let h=Number.MAX_SAFE_INTEGER;for(let m=o;m<=g;m++){const C=s.getLineFirstNonWhitespaceColumn(m),w=s.getLineContent(m);if(C===0)continue;const D=k.CursorColumns.visibleColumnFromColumn(w,C,s.getOptions().tabSize);h=Math.min(h,D)}return h}}e.TextAstNode=r;class u extends t{static create(d,s,l){return new u(d,s,l)}get kind(){return 1}get missingOpeningBracketIds(){return E.SmallImmutableSet.getEmpty()}constructor(d,s,l){super(d),this.bracketInfo=s,this.bracketIds=l}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(d){return!1}computeMinIndentation(d,s){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=u;class f extends t{get kind(){return 3}constructor(d,s){super(s),this.missingOpeningBracketIds=d}canBeReused(d){return!d.intersects(this.missingOpeningBracketIds)}computeMinIndentation(d,s){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=f}),define(se[521],oe([1,0,183]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function k(v){if(v.length===0)return null;if(v.length===1)return v[0];let b=0;function a(){if(b>=v.length)return null;const r=b,u=v[r].listHeight;for(b++;b<v.length&&v[b].listHeight===u;)b++;return b-r>=2?y(r===0&&b===v.length?v:v.slice(r,b),!1):v[r]}let i=a(),n=a();if(!n)return i;for(let r=a();r;r=a())E(i,n)<=E(n,r)?(i=S(i,n),n=r):n=S(n,r);return S(i,n)}e.concat23Trees=k;function y(v,b=!1){if(v.length===0)return null;if(v.length===1)return v[0];let a=v.length;for(;a>3;){const i=a>>1;for(let n=0;n<i;n++){const t=n<<1;v[n]=L.ListAstNode.create23(v[t],v[t+1],t+3===a?v[t+2]:null,b)}a=i}return L.ListAstNode.create23(v[0],v[1],a>=3?v[2]:null,b)}e.concat23TreesOfSameHeight=y;function E(v,b){return Math.abs(v.listHeight-b.listHeight)}function S(v,b){return v.listHeight===b.listHeight?L.ListAstNode.create23(v,b,null,!1):v.listHeight>b.listHeight?p(v,b):_(b,v)}function p(v,b){v=v.toMutable();let a=v;const i=[];let n;for(;;){if(b.listHeight===a.listHeight){n=b;break}if(a.kind!==4)throw new Error("unexpected");i.push(a),a=a.makeLastElementMutable()}for(let t=i.length-1;t>=0;t--){const r=i[t];n?r.childrenLength>=3?n=L.ListAstNode.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?L.ListAstNode.create23(v,n,null,!1):v}function _(v,b){v=v.toMutable();let a=v;const i=[];for(;b.listHeight!==a.listHeight;){if(a.kind!==4)throw new Error("unexpected");i.push(a),a=a.makeFirstElementMutable()}let n=b;for(let t=i.length-1;t>=0;t--){const r=i[t];n?r.childrenLength>=3?n=L.ListAstNode.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?L.ListAstNode.create23(n,v,null,!1):v}}),define(se[289],oe([1,0,183,182,134,91,521,520]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function _(b,a,i,n){return new v(b,a,i,n).parseDocument()}e.parseDocument=_;class v{constructor(a,i,n,t){if(this.tokenizer=a,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 a=this.parseList(y.SmallImmutableSet.getEmpty(),0);return a||(a=L.ListAstNode.getEmpty()),a}parseList(a,i){const n=[];for(;;){let r=this.tryReadChildFromCache(a);if(!r){const u=this.tokenizer.peek();if(!u||u.kind===2&&u.bracketIds.intersects(a))break;r=this.parseChild(a,i+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?(0,S.concat23Trees)(n):(0,S.concat23TreesOfSameHeight)(n,this.createImmutableLists)}tryReadChildFromCache(a){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(a));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(a,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=a.merge(n.bracketIds),r=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,r,u.astNode)):L.PairAstNode.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}}),define(se[209],oe([1,0,12,132,183,91,134]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class p{constructor(i,n,t,r,u){this.length=i,this.kind=n,this.bracketId=t,this.bracketIds=r,this.astNode=u}}e.Token=p;class _{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=_;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.lineTokenOffset<f){const d=u.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<f&&d===u.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const s=k.TokenMetadata.getTokenType(d)===0,l=k.TokenMetadata.containsBalancedBrackets(d),o=u.getEndOffset(this.lineTokenOffset);if(l&&s&&this.lineCharOffset<o){const g=u.getLanguageId(this.lineTokenOffset),h=this.line.substring(this.lineCharOffset,o),m=this.bracketTokens.getSingleLanguageBracketTokens(g),C=m.regExpGlobal;if(C){C.lastIndex=0;const w=C.exec(h);w&&(c=m.getToken(w[0]),c&&(this.lineCharOffset+=w.index))}}if(t+=o-this.lineCharOffset,c)if(i!==this.lineIdx||n!==this.lineCharOffset){this.peekedToken=c;break}else return this.lineCharOffset+=(0,E.lengthGetColumnCountIfZeroLineCount)(c.length),c;else this.lineTokenOffset++,this.lineCharOffset=o}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,t+=33,t>1e3))break;if(t>1500)break}const r=(0,E.lengthDiff)(i,n,this.lineIdx,this.lineCharOffset);return new p(r,0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode(r))}}class b{constructor(i,n){this.text=i,this._offset=E.lengthZero,this.idx=0;const t=n.getRegExpStr(),r=t?new RegExp(t+`|
|
||
`,"gi"):null,u=[];let f,c=0,d=0,s=0,l=0;const o=[];for(let m=0;m<60;m++)o.push(new p((0,E.toLength)(0,m),0,-1,S.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,S.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,E.toLength)(1,m))));if(r)for(r.lastIndex=0;(f=r.exec(i))!==null;){const m=f.index,C=f[0];if(C===`
|
||
`)c++,d=m+1;else{if(s!==m){let w;if(l===c){const D=m-s;if(D<o.length)w=o[D];else{const I=(0,E.toLength)(0,D);w=new p(I,0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode(I))}}else{const D=c-l,I=m-d;if(D===1&&I<g.length)w=g[I];else{const T=(0,E.toLength)(D,I);w=new p(T,0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode(T))}}u.push(w)}u.push(n.getToken(C)),s=m+C.length,l=c}}const h=i.length;if(s!==h){const m=l===c?(0,E.toLength)(0,h-s):(0,E.toLength)(c-l,h-d);u.push(new p(m,0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode(m)))}this.length=(0,E.toLength)(c,h-d),this.tokens=u}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(i){throw new L.NotSupportedError}}e.FastTokenizer=b}),define(se[290],oe([1,0,11,183,91,134,209]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class p{static createFromLanguage(a,i){function n(r){return i.getKey(`${r.languageId}:::${r.bracketText}`)}const t=new Map;for(const r of a.bracketsNew.openingBrackets){const u=(0,y.toLength)(0,r.bracketText.length),f=n(r),c=E.SmallImmutableSet.getEmpty().add(f,E.identityKeyProvider);t.set(r.bracketText,new S.Token(u,1,f,c,k.BracketAstNode.create(u,r,c)))}for(const r of a.bracketsNew.closingBrackets){const u=(0,y.toLength)(0,r.bracketText.length);let f=E.SmallImmutableSet.getEmpty();const c=r.getOpeningBrackets();for(const d of c)f=f.add(n(d),E.identityKeyProvider);t.set(r.bracketText,new S.Token(u,2,n(c[0]),f,k.BracketAstNode.create(u,r,f)))}return new p(t)}constructor(a){this.map=a,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const a=[...this.map.keys()];return a.sort(),a.reverse(),a.map(i=>_(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const a=this.getRegExpStr();this._regExpGlobal=a?new RegExp(a,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(a){return this.map.get(a.toLowerCase())}findClosingTokenText(a){for(const[i,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(a))return i}get isEmpty(){return this.map.size===0}}e.BracketTokens=p;function _(b){let a=(0,L.escapeRegExpCharacters)(b);return/^[\w ]+/.test(b)&&(a=`\\b${a}`),/[\w ]+$/.test(b)&&(a=`${a}\\b`),a}class v{constructor(a,i){this.denseKeyProvider=a,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(a){return this.languageIdToBracketTokens.has(a)}getSingleLanguageBracketTokens(a){let i=this.languageIdToBracketTokens.get(a);return i||(i=p.createFromLanguage(this.getLanguageConfiguration(a),this.denseKeyProvider),this.languageIdToBracketTokens.set(a,i)),i}}e.LanguageAgnosticBracketTokens=v}),define(se[522],oe([1,0,290,91,289,134,209]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function p(v,b){const a=new E.DenseKeyProvider,i=new L.LanguageAgnosticBracketTokens(a,c=>b.getLanguageConfiguration(c)),n=new S.TextBufferTokenizer(new _([v]),i),t=(0,y.parseDocument)(n,[],void 0,!0);let r="";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);r+=l}else if(c.kind!==3){if(c.kind===0||c.kind===1)r+=u.substring((0,k.lengthGetColumnCountIfZeroLineCount)(d),(0,k.lengthGetColumnCountIfZeroLineCount)((0,k.lengthAdd)(d,c.length)));else if(c.kind===4)for(const s of c.children)f(s,d),d=(0,k.lengthAdd)(d,s.length)}}return f(t,k.lengthZero),r}e.fixBracketsInLine=p;class _{constructor(b){this.lines=b,this.tokenization={getLineTokens:a=>this.lines[a-1]}}getLineCount(){return this.lines.length}getLineLength(b){return this.lines[b-1].getLineContent().length}}}),define(se[523],oe([1,0,13]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedArray=void 0;class k{constructor(S){this._default=S,this._store=[]}get(S){return S<this._store.length?this._store[S]:this._default}set(S,p){for(;S>=this._store.length;)this._store[this._store.length]=this._default;this._store[S]=p}replace(S,p,_){if(S>=this._store.length)return;if(p===0){this.insert(S,_);return}else if(_===0){this.delete(S,p);return}const v=this._store.slice(0,S),b=this._store.slice(S+p),a=y(_,this._default);this._store=v.concat(a,b)}delete(S,p){p===0||S>=this._store.length||this._store.splice(S,p)}insert(S,p){if(p===0||S>=this._store.length)return;const _=[];for(let v=0;v<p;v++)_[v]=this._default;this._store=(0,L.arrayInsert)(this._store,S,_)}}e.FixedArray=k;function y(E,S){const p=[];for(let _=0;_<E;_++)p[_]=S;return p}}),define(se[524],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class L{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function k(E,S,p,_,v){v.spacesDiff=0,v.looksLikeAlignment=!1;let b;for(b=0;b<S&&b<_;b++){const f=E.charCodeAt(b),c=p.charCodeAt(b);if(f!==c)break}let a=0,i=0;for(let f=b;f<S;f++)E.charCodeAt(f)===32?a++:i++;let n=0,t=0;for(let f=b;f<_;f++)p.charCodeAt(f)===32?n++:t++;if(a>0&&i>0||n>0&&t>0)return;const r=Math.abs(i-t),u=Math.abs(a-n);if(r===0){v.spacesDiff=u,u>0&&0<=n-1&&n-1<E.length&&n<p.length&&p.charCodeAt(n)!==32&&E.charCodeAt(n-1)===32&&E.charCodeAt(E.length-1)===44&&(v.looksLikeAlignment=!0);return}if(u%r===0){v.spacesDiff=u/r;return}}function y(E,S,p){const _=Math.min(E.getLineCount(),1e4);let v=0,b=0,a="",i=0;const n=[2,4,6,8,3,5,7],t=8,r=[0,0,0,0,0,0,0,0,0],u=new L;for(let d=1;d<=_;d++){const s=E.getLineLength(d),l=E.getLineContent(d),o=s<=65536;let g=!1,h=0,m=0,C=0;for(let D=0,I=s;D<I;D++){const T=o?l.charCodeAt(D):E.getLineCharCode(d,D);if(T===9)C++;else if(T===32)m++;else{g=!0,h=D;break}}if(!g||(C>0?v++:m>1&&b++,k(a,i,l,h,u),u.looksLikeAlignment&&!(p&&S===u.spacesDiff)))continue;const w=u.spacesDiff;w<=t&&r[w]++,a=l,i=h}let f=p;v!==b&&(f=v<b);let c=S;if(f){let d=f?0:.1*_;n.forEach(s=>{const l=r[s];l>d&&(d=l,c=s)}),c===4&&r[4]>0&&r[2]>0&&r[2]>=r[4]/2&&(c=2)}return{insertSpaces:f,tabSize:c}}e.guessIndentation=y}),define(se[525],oe([1,0]),function(te,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,O){x.metadata=x.metadata&254|O<<0}function y(x){return(x.metadata&2)>>>1===1}function E(x,O){x.metadata=x.metadata&253|(O?1:0)<<1}function S(x){return(x.metadata&4)>>>2===1}function p(x,O){x.metadata=x.metadata&251|(O?1:0)<<2}function _(x){return(x.metadata&64)>>>6===1}function v(x,O){x.metadata=x.metadata&191|(O?1:0)<<6}function b(x){return(x.metadata&24)>>>3}function a(x,O){x.metadata=x.metadata&231|O<<3}function i(x){return(x.metadata&32)>>>5===1}function n(x,O){x.metadata=x.metadata&223|(O?1:0)<<5}class t{constructor(O,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=O,this.ownerId=0,this.options=null,p(this,!1),v(this,!1),a(this,1),n(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=W,this.range=null,E(this,!1)}reset(O,B,W,V){this.start=B,this.end=W,this.maxEnd=W,this.cachedVersionId=O,this.cachedAbsoluteStart=B,this.cachedAbsoluteEnd=W,this.range=V}setOptions(O){this.options=O;const B=this.options.className;p(this,B==="squiggly-error"||B==="squiggly-warning"||B==="squiggly-info"),v(this,this.options.glyphMarginClassName!==null),a(this,this.options.stickiness),n(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(O,B,W){this.cachedVersionId!==W&&(this.range=null),this.cachedVersionId=W,this.cachedAbsoluteStart=O,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 r{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(O,B,W,V,K,F){return this.root===e.SENTINEL?[]:h(this,O,B,W,V,K,F)}search(O,B,W,V){return this.root===e.SENTINEL?[]:g(this,O,B,W,V)}collectNodesFromOwner(O){return l(this,O)}collectNodesPostOrder(){return o(this)}insert(O){m(this,O),this._normalizeDeltaIfNecessary()}delete(O){w(this,O),this._normalizeDeltaIfNecessary()}resolveNode(O,B){const W=O;let V=0;for(;O!==this.root;)O===O.parent.right&&(V+=O.parent.delta),O=O.parent;const K=W.start+V,F=W.end+V;W.setCachedOffsets(K,F,B)}acceptReplace(O,B,W,V){const K=d(this,O,O+B);for(let F=0,q=K.length;F<q;F++){const ie=K[F];w(this,ie)}this._normalizeDeltaIfNecessary(),s(this,O,O+B,W),this._normalizeDeltaIfNecessary();for(let F=0,q=K.length;F<q;F++){const ie=K[F];ie.start=ie.cachedAbsoluteStart,ie.end=ie.cachedAbsoluteEnd,c(ie,O,O+B,W,V),ie.maxEnd=ie.end,m(this,ie)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,u(this))}}e.IntervalTree=r;function u(x){let O=x.root,B=0;for(;O!==e.SENTINEL;){if(O.left!==e.SENTINEL&&!y(O.left)){O=O.left;continue}if(O.right!==e.SENTINEL&&!y(O.right)){B+=O.delta,O=O.right;continue}O.start=B+O.start,O.end=B+O.end,O.delta=0,N(O),E(O,!0),E(O.left,!1),E(O.right,!1),O===O.parent.right&&(B-=O.parent.delta),O=O.parent}E(x.root,!1)}function f(x,O,B,W){return x<B?!0:x>B||W===1?!1:W===2?!0:O}function c(x,O,B,W,V){const K=b(x),F=K===0||K===2,q=K===1||K===2,ie=B-O,ae=W,ne=Math.min(ie,ae),$=x.start;let J=!1;const Q=x.end;let re=!1;O<=$&&Q<=B&&i(x)&&(x.start=O,J=!0,x.end=O,re=!0);{const he=V?1:ie>0?2:0;!J&&f($,F,O,he)&&(J=!0),!re&&f(Q,q,O,he)&&(re=!0)}if(ne>0&&!V){const he=ie>ae?2:0;!J&&f($,F,O+ne,he)&&(J=!0),!re&&f(Q,q,O+ne,he)&&(re=!0)}{const he=V?1:0;!J&&f($,F,B,he)&&(x.start=O+ae,J=!0),!re&&f(Q,q,B,he)&&(x.end=O+ae,re=!0)}const de=ae-ie;J||(x.start=Math.max(0,$+de)),re||(x.end=Math.max(0,Q+de)),x.start>x.end&&(x.end=x.start)}e.nodeAcceptEdit=c;function d(x,O,B){let W=x.root,V=0,K=0,F=0,q=0;const ie=[];let ae=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(K=V+W.maxEnd,K<O){E(W,!0);continue}if(W.left!==e.SENTINEL){W=W.left;continue}}if(F=V+W.start,F>B){E(W,!0);continue}if(q=V+W.end,q>=O&&(W.setCachedOffsets(F,q,0),ie[ae++]=W),E(W,!0),W.right!==e.SENTINEL&&!y(W.right)){V+=W.delta,W=W.right;continue}}return E(x.root,!1),ie}function s(x,O,B,W){let V=x.root,K=0,F=0,q=0;const ie=W-(B-O);for(;V!==e.SENTINEL;){if(y(V)){E(V.left,!1),E(V.right,!1),V===V.parent.right&&(K-=V.parent.delta),N(V),V=V.parent;continue}if(!y(V.left)){if(F=K+V.maxEnd,F<O){E(V,!0);continue}if(V.left!==e.SENTINEL){V=V.left;continue}}if(q=K+V.start,q>B){V.start+=ie,V.end+=ie,V.delta+=ie,(V.delta<-1073741824||V.delta>1073741824)&&(x.requestNormalizeDelta=!0),E(V,!0);continue}if(E(V,!0),V.right!==e.SENTINEL&&!y(V.right)){K+=V.delta,V=V.right;continue}}E(x.root,!1)}function l(x,O){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===O&&(W[V++]=B),E(B,!0),B.right!==e.SENTINEL&&!y(B.right)){B=B.right;continue}}return E(x.root,!1),W}function o(x){let O=x.root;const B=[];let W=0;for(;O!==e.SENTINEL;){if(y(O)){E(O.left,!1),E(O.right,!1),O=O.parent;continue}if(O.left!==e.SENTINEL&&!y(O.left)){O=O.left;continue}if(O.right!==e.SENTINEL&&!y(O.right)){O=O.right;continue}B[W++]=O,E(O,!0)}return E(x.root,!1),B}function g(x,O,B,W,V){let K=x.root,F=0,q=0,ie=0;const ae=[];let ne=0;for(;K!==e.SENTINEL;){if(y(K)){E(K.left,!1),E(K.right,!1),K===K.parent.right&&(F-=K.parent.delta),K=K.parent;continue}if(K.left!==e.SENTINEL&&!y(K.left)){K=K.left;continue}q=F+K.start,ie=F+K.end,K.setCachedOffsets(q,ie,W);let $=!0;if(O&&K.ownerId&&K.ownerId!==O&&($=!1),B&&S(K)&&($=!1),V&&!_(K)&&($=!1),$&&(ae[ne++]=K),E(K,!0),K.right!==e.SENTINEL&&!y(K.right)){F+=K.delta,K=K.right;continue}}return E(x.root,!1),ae}function h(x,O,B,W,V,K,F){let q=x.root,ie=0,ae=0,ne=0,$=0;const J=[];let Q=0;for(;q!==e.SENTINEL;){if(y(q)){E(q.left,!1),E(q.right,!1),q===q.parent.right&&(ie-=q.parent.delta),q=q.parent;continue}if(!y(q.left)){if(ae=ie+q.maxEnd,ae<O){E(q,!0);continue}if(q.left!==e.SENTINEL){q=q.left;continue}}if(ne=ie+q.start,ne>B){E(q,!0);continue}if($=ie+q.end,$>=O){q.setCachedOffsets(ne,$,K);let re=!0;W&&q.ownerId&&q.ownerId!==W&&(re=!1),V&&S(q)&&(re=!1),F&&!_(q)&&(re=!1),re&&(J[Q++]=q)}if(E(q,!0),q.right!==e.SENTINEL&&!y(q.right)){ie+=q.delta,q=q.right;continue}}return E(x.root,!1),J}function m(x,O){if(x.root===e.SENTINEL)return O.parent=e.SENTINEL,O.left=e.SENTINEL,O.right=e.SENTINEL,k(O,0),x.root=O,x.root;C(x,O),M(O.parent);let B=O;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,T(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),T(x,B.parent.parent))}return k(x.root,0),O}function C(x,O){let B=0,W=x.root;const V=O.start,K=O.end;for(;;)if(R(V,K,W.start+B,W.end+B)<0)if(W.left===e.SENTINEL){O.start-=B,O.end-=B,O.maxEnd-=B,W.left=O;break}else W=W.left;else if(W.right===e.SENTINEL){O.start-=B+W.delta,O.end-=B+W.delta,O.maxEnd-=B+W.delta,W.right=O;break}else B+=W.delta,W=W.right;O.parent=W,O.left=e.SENTINEL,O.right=e.SENTINEL,k(O,1)}function w(x,O){let B,W;if(O.left===e.SENTINEL?(B=O.right,W=O,B.delta+=O.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=O.delta,B.end+=O.delta):O.right===e.SENTINEL?(B=O.left,W=O):(W=D(O.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+=O.delta,W.end+=O.delta,W.delta=O.delta,(W.delta<-1073741824||W.delta>1073741824)&&(x.requestNormalizeDelta=!0)),W===x.root){x.root=B,k(B,0),O.detach(),I(),N(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===O?B.parent=W.parent:(W.parent===O?B.parent=W:B.parent=W.parent,W.left=O.left,W.right=O.right,W.parent=O.parent,k(W,L(O)),O===x.root?x.root=W:O===O.parent.left?O.parent.left=W:O.parent.right=W,W.left!==e.SENTINEL&&(W.left.parent=W),W.right!==e.SENTINEL&&(W.right.parent=W)),O.detach(),V){M(B.parent),W!==O&&(M(W),M(W.parent)),I();return}M(B),M(B.parent),W!==O&&(M(W),M(W.parent));let K;for(;B!==x.root&&L(B)===0;)B===B.parent.left?(K=B.parent.right,L(K)===1&&(k(K,0),k(B.parent,1),T(x,B.parent),K=B.parent.right),L(K.left)===0&&L(K.right)===0?(k(K,1),B=B.parent):(L(K.right)===0&&(k(K.left,0),k(K,1),A(x,K),K=B.parent.right),k(K,L(B.parent)),k(B.parent,0),k(K.right,0),T(x,B.parent),B=x.root)):(K=B.parent.left,L(K)===1&&(k(K,0),k(B.parent,1),A(x,B.parent),K=B.parent.left),L(K.left)===0&&L(K.right)===0?(k(K,1),B=B.parent):(L(K.left)===0&&(k(K.right,0),k(K,1),T(x,K),K=B.parent.left),k(K,L(B.parent)),k(B.parent,0),k(K.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 T(x,O){const B=O.right;B.delta+=O.delta,(B.delta<-1073741824||B.delta>1073741824)&&(x.requestNormalizeDelta=!0),B.start+=O.delta,B.end+=O.delta,O.right=B.left,B.left!==e.SENTINEL&&(B.left.parent=O),B.parent=O.parent,O.parent===e.SENTINEL?x.root=B:O===O.parent.left?O.parent.left=B:O.parent.right=B,B.left=O,O.parent=B,N(O),N(B)}function A(x,O){const B=O.left;O.delta-=B.delta,(O.delta<-1073741824||O.delta>1073741824)&&(x.requestNormalizeDelta=!0),O.start-=B.delta,O.end-=B.delta,O.left=B.right,B.right!==e.SENTINEL&&(B.right.parent=O),B.parent=O.parent,O.parent===e.SENTINEL?x.root=B:O===O.parent.right?O.parent.right=B:O.parent.left=B,B.right=O,O.parent=B,N(O),N(B)}function P(x){let O=x.end;if(x.left!==e.SENTINEL){const B=x.left.maxEnd;B>O&&(O=B)}if(x.right!==e.SENTINEL){const B=x.right.maxEnd+x.delta;B>O&&(O=B)}return O}function N(x){x.maxEnd=P(x)}e.recomputeMaxEnd=N;function M(x){for(;x!==e.SENTINEL;){const O=P(x);if(x.maxEnd===O)return;x.maxEnd=O,x=x.parent}}function R(x,O,B,W){return x===B?O-W:x-B}e.intervalCompare=R}),define(se[526],oe([1,0]),function(te,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(r,u){this.piece=r,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 r=this;for(;r.parent!==e.SENTINEL&&r.parent.left!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}prev(){if(this.left!==e.SENTINEL)return y(this.left);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.right!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.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 S(t){return t===e.SENTINEL?0:t.lf_left+t.piece.lineFeedCnt+S(t.right)}function p(){e.SENTINEL.parent=e.SENTINEL}function _(t,r){const u=r.right;u.size_left+=r.size_left+(r.piece?r.piece.length:0),u.lf_left+=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),r.right=u.left,u.left!==e.SENTINEL&&(u.left.parent=r),u.parent=r.parent,r.parent===e.SENTINEL?t.root=u:r.parent.left===r?r.parent.left=u:r.parent.right=u,u.left=r,r.parent=u}e.leftRotate=_;function v(t,r){const u=r.left;r.left=u.right,u.right!==e.SENTINEL&&(u.right.parent=r),u.parent=r.parent,r.size_left-=u.size_left+(u.piece?u.piece.length:0),r.lf_left-=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),r.parent===e.SENTINEL?t.root=u:r===r.parent.right?r.parent.right=u:r.parent.left=u,u.right=r,r.parent=u}e.rightRotate=v;function b(t,r){let u,f;if(r.left===e.SENTINEL?(f=r,u=f.right):r.right===e.SENTINEL?(f=r,u=f.left):(f=k(r.right),u=f.right),f===t.root){t.root=u,u.color=0,r.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===r?(u.parent=f.parent,n(t,u)):(f.parent===r?u.parent=f:u.parent=f.parent,n(t,u),f.left=r.left,f.right=r.right,f.parent=r.parent,f.color=r.color,r===t.root?t.root=f:r===r.parent.left?r.parent.left=f:r.parent.right=f,f.left!==e.SENTINEL&&(f.left.parent=f),f.right!==e.SENTINEL&&(f.right.parent=f),f.size_left=r.size_left,f.lf_left=r.lf_left,n(t,f)),r.detach(),u.parent.left===u){const s=E(u),l=S(u);if(s!==u.parent.size_left||l!==u.parent.lf_left){const o=s-u.parent.size_left,g=l-u.parent.lf_left;u.parent.size_left=s,u.parent.lf_left=l,i(t,u.parent,o,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,_(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,_(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,_(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 a(t,r){for(n(t,r);r!==t.root&&r.parent.color===1;)if(r.parent===r.parent.parent.left){const u=r.parent.parent.right;u.color===1?(r.parent.color=0,u.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.right&&(r=r.parent,_(t,r)),r.parent.color=0,r.parent.parent.color=1,v(t,r.parent.parent))}else{const u=r.parent.parent.left;u.color===1?(r.parent.color=0,u.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.left&&(r=r.parent,v(t,r)),r.parent.color=0,r.parent.parent.color=1,_(t,r.parent.parent))}t.root.color=0}e.fixInsert=a;function i(t,r,u,f){for(;r!==t.root&&r!==e.SENTINEL;)r.parent.left===r&&(r.parent.size_left+=u,r.parent.lf_left+=f),r=r.parent}e.updateTreeMetadata=i;function n(t,r){let u=0,f=0;if(r!==t.root){for(;r!==t.root&&r===r.parent.right;)r=r.parent;if(r!==t.root)for(r=r.parent,u=E(r.left)-r.size_left,f=S(r.left)-r.lf_left,r.size_left+=u,r.lf_left+=f;r!==t.root&&(u!==0||f!==0);)r.parent.left===r&&(r.parent.size_left+=u,r.parent.lf_left+=f),r=r.parent}}e.recomputeTreeMetadata=n}),define(se[291],oe([1,0,13,174]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class y{constructor(_){this.values=_,this.prefixSum=new Uint32Array(_.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(_,v){_=(0,k.toUint32)(_);const b=this.values,a=this.prefixSum,i=v.length;return i===0?!1:(this.values=new Uint32Array(b.length+i),this.values.set(b.subarray(0,_),0),this.values.set(b.subarray(_),_+i),this.values.set(v,_),_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(a.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(_,v){return _=(0,k.toUint32)(_),v=(0,k.toUint32)(v),this.values[_]===v?!1:(this.values[_]=v,_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),!0)}removeValues(_,v){_=(0,k.toUint32)(_),v=(0,k.toUint32)(v);const b=this.values,a=this.prefixSum;if(_>=b.length)return!1;const i=b.length-_;return v>=i&&(v=i),v===0?!1:(this.values=new Uint32Array(b.length-v),this.values.set(b.subarray(0,_),0),this.values.set(b.subarray(_+v),_),this.prefixSum=new Uint32Array(this.values.length),_-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=_-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(a.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(_){return _<0?0:(_=(0,k.toUint32)(_),this._getPrefixSum(_))}_getPrefixSum(_){if(_<=this.prefixSumValidIndex[0])return this.prefixSum[_];let v=this.prefixSumValidIndex[0]+1;v===0&&(this.prefixSum[0]=this.values[0],v++),_>=this.values.length&&(_=this.values.length-1);for(let b=v;b<=_;b++)this.prefixSum[b]=this.prefixSum[b-1]+this.values[b];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],_),this.prefixSum[_]}getIndexOf(_){_=Math.floor(_),this.getTotalSum();let v=0,b=this.values.length-1,a=0,i=0,n=0;for(;v<=b;)if(a=v+(b-v)/2|0,i=this.prefixSum[a],n=i-this.values[a],_<n)b=a-1;else if(_>=i)v=a+1;else break;return new S(a,_-n)}}e.PrefixSumComputer=y;class E{constructor(_){this._values=_,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(_){return this._ensureValid(),_===0?0:this._prefixSum[_-1]}getIndexOf(_){this._ensureValid();const v=this._indexBySum[_],b=v>0?this._prefixSum[v-1]:0;return new S(v,_-b)}removeValues(_,v){this._values.splice(_,v),this._invalidate(_)}insertValues(_,v){this._values=(0,L.arrayInsert)(this._values,_,v),this._invalidate(_)}_invalidate(_){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,_-1)}_ensureValid(){if(!this._isValid){for(let _=this._validEndIndex+1,v=this._values.length;_<v;_++){const b=this._values[_],a=_>0?this._prefixSum[_-1]:0;this._prefixSum[_]=a+b;for(let i=0;i<b;i++)this._indexBySum[a+i]=_}this._prefixSum.length=this._values.length,this._indexBySum.length=this._prefixSum[this._prefixSum.length-1],this._isValid=!0,this._validEndIndex=this._values.length-1}}setValue(_,v){this._values[_]!==v&&(this._values[_]=v,this._invalidate(_))}}e.ConstantTimePrefixSumComputer=E;class S{constructor(_,v){this.index=_,this.remainder=v,this._prefixSumIndexOfResultBrand=void 0,this.index=_,this.remainder=v}}e.PrefixSumIndexOfResult=S}),define(se[527],oe([1,0,11,10,291]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class E{constructor(p,_,v,b){this._uri=p,this._lines=_,this._eol=v,this._versionId=b,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(p){p.eol&&p.eol!==this._eol&&(this._eol=p.eol,this._lineStarts=null);const _=p.changes;for(const v of _)this._acceptDeleteRange(v.range),this._acceptInsertText(new k.Position(v.range.startLineNumber,v.range.startColumn),v.text);this._versionId=p.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const p=this._eol.length,_=this._lines.length,v=new Uint32Array(_);for(let b=0;b<_;b++)v[b]=this._lines[b].length+p;this._lineStarts=new y.PrefixSumComputer(v)}}_setLineText(p,_){this._lines[p]=_,this._lineStarts&&this._lineStarts.setValue(p,this._lines[p].length+this._eol.length)}_acceptDeleteRange(p){if(p.startLineNumber===p.endLineNumber){if(p.startColumn===p.endColumn)return;this._setLineText(p.startLineNumber-1,this._lines[p.startLineNumber-1].substring(0,p.startColumn-1)+this._lines[p.startLineNumber-1].substring(p.endColumn-1));return}this._setLineText(p.startLineNumber-1,this._lines[p.startLineNumber-1].substring(0,p.startColumn-1)+this._lines[p.endLineNumber-1].substring(p.endColumn-1)),this._lines.splice(p.startLineNumber,p.endLineNumber-p.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(p.startLineNumber,p.endLineNumber-p.startLineNumber)}_acceptInsertText(p,_){if(_.length===0)return;const v=(0,L.splitLines)(_);if(v.length===1){this._setLineText(p.lineNumber-1,this._lines[p.lineNumber-1].substring(0,p.column-1)+v[0]+this._lines[p.lineNumber-1].substring(p.column-1));return}v[v.length-1]+=this._lines[p.lineNumber-1].substring(p.column-1),this._setLineText(p.lineNumber-1,this._lines[p.lineNumber-1].substring(0,p.column-1)+v[0]);const b=new Uint32Array(v.length-1);for(let a=1;a<v.length;a++)this._lines.splice(p.lineNumber+a-1,0,v[a]),b[a-1]=v[a].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(p.lineNumber,b)}}e.MirrorTextModel=E}),define(se[292],oe([1,0,2]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class k extends L.Disposable{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=k}),define(se[184],oe([1,0,11,150,10,5,41]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Searcher=e.isValidMatch=e.TextModelSearch=e.createFindMatch=e.isMultilineRegexSource=e.SearchParams=void 0;const p=999;class _{constructor(c,d,s,l){this.searchString=c,this.isRegex=d,this.matchCase=s,this.wordSeparators=l}parseSearchRequest(){if(this.searchString==="")return null;let c;this.isRegex?c=v(this.searchString):c=this.searchString.indexOf(`
|
||
`)>=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 s=!this.isRegex&&!c;return s&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(s=this.matchCase),new S.SearchData(d,this.wordSeparators?(0,k.getMapForWordSeparators)(this.wordSeparators):null,s?this.searchString:null)}}e.SearchParams=_;function v(f){if(!f||f.length===0)return!1;for(let c=0,d=f.length;c<d;c++){const s=f.charCodeAt(c);if(s===10)return!0;if(s===92){if(c++,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 S.FindMatch(f,null);const s=[];for(let l=0,o=c.length;l<o;l++)s[l]=c[l];return new S.FindMatch(f,s)}e.createFindMatch=b;class a{constructor(c){const d=[];let s=0;for(let l=0,o=c.length;l<o;l++)c.charCodeAt(l)===10&&(d[s++]=l);this._lineFeedsOffsets=d}findLineFeedCountBeforeOffset(c){const d=this._lineFeedsOffsets;let s=0,l=d.length-1;if(l===-1||c<=d[0])return 0;for(;s<l;){const o=s+((l-s)/2>>0);d[o]>=c?l=o-1:d[o+1]>=c?(s=o,l=o):s=o+1}return s+1}}class i{static findMatches(c,d,s,l,o){const g=d.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(c,s,new u(g.wordSeparators,g.regex),l,o):this._doFindMatchesLineByLine(c,s,g,l,o):[]}static _getMultilineMatchRange(c,d,s,l,o,g){let h,m=0;l?(m=l.findLineFeedCountBeforeOffset(o),h=d+o+m):h=d+o;let C;if(l){const T=l.findLineFeedCountBeforeOffset(o+g.length)-m;C=h+g.length+T}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,s,l,o){const g=c.getOffsetAt(d.getStartPosition()),h=c.getValueInRange(d,1),m=c.getEOL()===`\r
|
||
`?new a(h):null,C=[];let w=0,D;for(s.reset(0);D=s.next(h);)if(C[w++]=b(this._getMultilineMatchRange(c,g,h,m,D.index,D[0]),D,l),w>=o)return C;return C}static _doFindMatchesLineByLine(c,d,s,l,o){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(s,C,d.startLineNumber,d.startColumn-1,h,g,l,o),g}const m=c.getLineContent(d.startLineNumber).substring(d.startColumn-1);h=this._findMatchesInLine(s,m,d.startLineNumber,d.startColumn-1,h,g,l,o);for(let C=d.startLineNumber+1;C<d.endLineNumber&&h<o;C++)h=this._findMatchesInLine(s,c.getLineContent(C),C,0,h,g,l,o);if(h<o){const C=c.getLineContent(d.endLineNumber).substring(0,d.endColumn-1);h=this._findMatchesInLine(s,C,d.endLineNumber,0,h,g,l,o)}return g}static _findMatchesInLine(c,d,s,l,o,g,h,m){const C=c.wordSeparators;if(!h&&c.simpleSearch){const I=c.simpleSearch,T=I.length,A=d.length;let P=-T;for(;(P=d.indexOf(I,P+T))!==-1;)if((!C||r(C,d,A,P,T))&&(g[o++]=new S.FindMatch(new E.Range(s,P+1+l,s,P+1+T+l),null),o>=m))return o;return o}const w=new u(c.wordSeparators,c.regex);let D;w.reset(0);do if(D=w.next(d),D&&(g[o++]=b(new E.Range(s,D.index+1+l,s,D.index+1+D[0].length+l),D,h),o>=m))return o;while(D);return o}static findNextMatch(c,d,s,l){const o=d.parseSearchRequest();if(!o)return null;const g=new u(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(c,s,g,l):this._doFindNextMatchLineByLine(c,s,g,l)}static _doFindNextMatchMultiline(c,d,s,l){const o=new y.Position(d.lineNumber,1),g=c.getOffsetAt(o),h=c.getLineCount(),m=c.getValueInRange(new E.Range(o.lineNumber,o.column,h,c.getLineMaxColumn(h)),1),C=c.getEOL()===`\r
|
||
`?new a(m):null;s.reset(d.column-1);const w=s.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),s,l):null}static _doFindNextMatchLineByLine(c,d,s,l){const o=c.getLineCount(),g=d.lineNumber,h=c.getLineContent(g),m=this._findFirstMatchInLine(s,h,g,d.column,l);if(m)return m;for(let C=1;C<=o;C++){const w=(g+C-1)%o,D=c.getLineContent(w+1),I=this._findFirstMatchInLine(s,D,w+1,1,l);if(I)return I}return null}static _findFirstMatchInLine(c,d,s,l,o){c.reset(l-1);const g=c.next(d);return g?b(new E.Range(s,g.index+1,s,g.index+1+g[0].length),g,o):null}static findPreviousMatch(c,d,s,l){const o=d.parseSearchRequest();if(!o)return null;const g=new u(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(c,s,g,l):this._doFindPreviousMatchLineByLine(c,s,g,l)}static _doFindPreviousMatchMultiline(c,d,s,l){const o=this._doFindMatchesMultiline(c,new E.Range(1,1,d.lineNumber,d.column),s,l,10*p);if(o.length>0)return o[o.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)),s,l):null}static _doFindPreviousMatchLineByLine(c,d,s,l){const o=c.getLineCount(),g=d.lineNumber,h=c.getLineContent(g).substring(0,d.column-1),m=this._findLastMatchInLine(s,h,g,l);if(m)return m;for(let C=1;C<=o;C++){const w=(o+g-C-1)%o,D=c.getLineContent(w+1),I=this._findLastMatchInLine(s,D,w+1,l);if(I)return I}return null}static _findLastMatchInLine(c,d,s,l){let o=null,g;for(c.reset(0);g=c.next(d);)o=b(new E.Range(s,g.index+1,s,g.index+1+g[0].length),g,l);return o}}e.TextModelSearch=i;function n(f,c,d,s,l){if(s===0)return!0;const o=c.charCodeAt(s-1);if(f.get(o)!==0||o===13||o===10)return!0;if(l>0){const g=c.charCodeAt(s);if(f.get(g)!==0)return!0}return!1}function t(f,c,d,s,l){if(s+l===d)return!0;const o=c.charCodeAt(s+l);if(f.get(o)!==0||o===13||o===10)return!0;if(l>0){const g=c.charCodeAt(s+l-1);if(f.get(g)!==0)return!0}return!1}function r(f,c,d,s,l){return n(f,c,d,s,l)&&t(f,c,d,s,l)}e.isValidMatch=r;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 s;do{if(this._prevMatchStartIndex+this._prevMatchLength===d||(s=this._searchRegex.exec(c),!s))return null;const l=s.index,o=s[0].length;if(l===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===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=o,!this._wordSeparators||r(this._wordSeparators,c,d,l,o))return s}while(s);return null}}e.Searcher=u}),define(se[293],oe([1,0,10,5,41,526,184]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=void 0;const p=65535;function _(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,s,l,o){this.lineStarts=c,this.cr=d,this.lf=s,this.crlf=l,this.isBasicASCII=o}}function b(f,c=!0){const d=[0];let s=1;for(let l=0,o=f.length;l<o;l++){const g=f.charCodeAt(l);g===13?l+1<o&&f.charCodeAt(l+1)===10?(d[s++]=l+2,l++):d[s++]=l+1:g===10&&(d[s++]=l+1)}return c?_(d):d}e.createLineStartsFast=b;function a(f,c){f.length=0,f[0]=0;let d=1,s=0,l=0,o=0,g=!0;for(let m=0,C=c.length;m<C;m++){const w=c.charCodeAt(m);w===13?m+1<C&&c.charCodeAt(m+1)===10?(o++,f[d++]=m+2,m++):(s++,f[d++]=m+1):w===10?(l++,f[d++]=m+1):g&&w!==9&&(w<32||w>126)&&(g=!1)}const h=new v(_(f),s,l,o,g);return f.length=0,h}e.createLineStarts=a;class i{constructor(c,d,s,l,o){this.bufferIndex=c,this.start=d,this.end=s,this.lineFeedCnt=l,this.length=o}}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,s=>(s!==E.SENTINEL&&this._pieces.push(s.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 r{constructor(c){this._limit=c,this._cache=[]}get(c){for(let d=this._cache.length-1;d>=0;d--){const s=this._cache[d];if(s.nodeStartOffset<=c&&s.nodeStartOffset+s.node.piece.length>=c)return s}return null}get2(c){for(let d=this._cache.length-1;d>=0;d--){const s=this._cache[d];if(s.nodeStartLineNumber&&s.nodeStartLineNumber<c&&s.nodeStartLineNumber+s.node.piece.lineFeedCnt>=c)return s}return null}set(c){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(c)}validate(c){let d=!1;const s=this._cache;for(let l=0;l<s.length;l++){const o=s[l];if(o.node.parent===null||o.nodeStartOffset>=c){s[l]=null,d=!0;continue}}if(d){const l=[];for(const o of s)o!==null&&l.push(o);this._cache=l}}}class u{constructor(c,d,s){this.create(c,d,s)}create(c,d,s){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=s;let l=null;for(let o=0,g=c.length;o<g;o++)if(c[o].buffer.length>0){c[o].lineStarts||(c[o].lineStarts=b(c[o].buffer));const h=new i(o+1,{line:0,column:0},{line:c[o].lineStarts.length-1,column:c[o].buffer.length-c[o].lineStarts[c[o].lineStarts.length-1]},c[o].lineStarts.length-1,c[o].buffer.length);this._buffers.push(c[o]),l=this.rbInsertRight(l,h)}this._searchCache=new r(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(c){const d=p,s=d-Math.floor(d/3),l=s*2;let o="",g=0;const h=[];if(this.iterate(this.root,m=>{const C=this.getNodeContent(m),w=C.length;if(g<=s||g+w<l)return o+=C,g+=w,!0;const D=o.replace(/\r\n|\r|\n/g,c);return h.push(new n(D,b(D))),o=C,g=w,!0}),g>0){const m=o.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 s=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){s+=l.size_left;const o=this.getAccumulatedValue(l,c-l.lf_left-2);return s+=o+d-1}else c-=l.lf_left+l.piece.lineFeedCnt,s+=l.size_left+l.piece.length,l=l.right;return s}getPositionAt(c){c=Math.floor(c),c=Math.max(0,c);let d=this.root,s=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 o=this.getIndexOf(d,c-d.size_left);if(s+=d.lf_left+o.index,o.index===0){const g=this.getOffsetAt(s+1,1),h=l-g;return new L.Position(s+1,h+1)}return new L.Position(s+1,o.remainder+1)}else if(c-=d.size_left+d.piece.length,s+=d.lf_left+d.piece.lineFeedCnt,d.right===E.SENTINEL){const o=this.getOffsetAt(s+1,1),g=l-c-o;return new L.Position(s+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 s=this.nodeAt2(c.startLineNumber,c.startColumn),l=this.nodeAt2(c.endLineNumber,c.endColumn),o=this.getValueInRange2(s,l);return d?d!==this._EOL||!this._EOLNormalized?o.replace(/\r\n|\r|\n/g,d):d===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,d):o}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 s=c.node;const l=this._buffers[s.piece.bufferIndex].buffer,o=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);let g=l.substring(o+c.remainder,o+s.piece.length);for(s=s.next();s!==E.SENTINEL;){const h=this._buffers[s.piece.bufferIndex].buffer,m=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(s===d.node){g+=h.substring(m,m+d.remainder);break}else g+=h.substr(m,s.piece.length);s=s.next()}return g}getLinesContent(){const c=[];let d=0,s="",l=!1;return this.iterate(this.root,o=>{if(o===E.SENTINEL)return!0;const g=o.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++]=s,s="",l=!1,h===0))return!0;if(w===D)return!this._EOLNormalized&&m.charCodeAt(I+h-1)===13?(l=!0,s+=m.substr(I,h-1)):s+=m.substr(I,h),!0;s+=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++]=s;for(let T=w+1;T<D;T++)s=this._EOLNormalized?m.substring(C[T],C[T+1]-this._EOLLength):m.substring(C[T],C[T+1]).replace(/(\r\n|\r|\n)$/,""),c[d++]=s;return!this._EOLNormalized&&m.charCodeAt(C[D]+g.end.column-1)===13?(l=!0,g.end.column===0?d--:s=m.substr(C[D],g.end.column-1)):s=m.substr(C[D],g.end.column),!0}),l&&(c[d++]=s,s=""),c[d++]=s,c}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(c){return this._lastVisitedLine.lineNumber===c?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=c,c===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(c):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(c,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(c).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(c){if(c.remainder===c.node.piece.length){const d=c.node.next();if(!d)return 0;const s=this._buffers[d.piece.bufferIndex],l=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);return s.buffer.charCodeAt(l)}else{const d=this._buffers[c.node.piece.bufferIndex],l=this.offsetInBuffer(c.node.piece.bufferIndex,c.node.piece.start)+c.remainder;return d.buffer.charCodeAt(l)}}getLineCharCode(c,d){const s=this.nodeAt2(c,d+1);return this._getCharCode(s)}getLineLength(c){if(c===this.getLineCount()){const d=this.getOffsetAt(c,1);return this.getLength()-d}return this.getOffsetAt(c+1,1)-this.getOffsetAt(c,1)-this._EOLLength}findMatchesInNode(c,d,s,l,o,g,h,m,C,w,D){const I=this._buffers[c.piece.bufferIndex],T=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start),A=this.offsetInBuffer(c.piece.bufferIndex,o),P=this.offsetInBuffer(c.piece.bufferIndex,g);let N;const M={line:0,column:0};let R,x;d._wordSeparators?(R=I.buffer.substring(A,P),x=O=>O+A,d.reset(0)):(R=I.buffer,x=O=>O,d.reset(A));do if(N=d.next(R),N){if(x(N.index)>=P)return w;this.positionInBuffer(c,x(N.index)-T,M);const O=this.getLineFeedCnt(c.piece.bufferIndex,o,M),B=M.line===o.line?M.column-o.column+l:M.column+1,W=B+N[0].length;if(D[w++]=(0,S.createFindMatch)(new k.Range(s+O,B,s+O,W),N,m),x(N.index)+N[0].length>=P||w>=C)return w}while(N);return w}findMatchesLineByLine(c,d,s,l){const o=[];let g=0;const h=new S.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,s,l,g,o),o;let I=c.startLineNumber,T=m.node;for(;T!==C.node;){const P=this.getLineFeedCnt(T.piece.bufferIndex,w,T.piece.end);if(P>=1){const M=this._buffers[T.piece.bufferIndex].lineStarts,R=this.offsetInBuffer(T.piece.bufferIndex,T.piece.start),x=M[w.line+P],O=I===c.startLineNumber?c.startColumn:1;if(g=this.findMatchesInNode(T,h,I,O,w,this.positionInBuffer(T,x-R),d,s,l,g,o),g>=l)return o;I+=P}const N=I===c.startLineNumber?c.startColumn-1:0;if(I===c.endLineNumber){const M=this.getLineContent(I).substring(N,c.endColumn-1);return g=this._findMatchesInLine(d,h,M,c.endLineNumber,N,g,o,s,l),o}if(g=this._findMatchesInLine(d,h,this.getLineContent(I).substr(N),I,N,g,o,s,l),g>=l)return o;I++,m=this.nodeAt2(I,1),T=m.node,w=this.positionInBuffer(m.node,m.remainder)}if(I===c.endLineNumber){const P=I===c.startLineNumber?c.startColumn-1:0,N=this.getLineContent(I).substring(P,c.endColumn-1);return g=this._findMatchesInLine(d,h,N,c.endLineNumber,P,g,o,s,l),o}const A=I===c.startLineNumber?c.startColumn:1;return g=this.findMatchesInNode(C.node,h,I,A,w,D,d,s,l,g,o),o}_findMatchesInLine(c,d,s,l,o,g,h,m,C){const w=c.wordSeparators;if(!m&&c.simpleSearch){const I=c.simpleSearch,T=I.length,A=s.length;let P=-T;for(;(P=s.indexOf(I,P+T))!==-1;)if((!w||(0,S.isValidMatch)(w,s,A,P,T))&&(h[g++]=new y.FindMatch(new k.Range(l,P+1+o,l,P+1+T+o),null),g>=C))return g;return g}let D;d.reset(0);do if(D=d.next(s),D&&(h[g++]=(0,S.createFindMatch)(new k.Range(l,D.index+1+o,l,D.index+1+D[0].length+o),D,m),g>=C))return g;while(D);return g}insert(c,d,s=!1){if(this._EOLNormalized=this._EOLNormalized&&s,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==E.SENTINEL){const{node:l,remainder:o,nodeStartOffset:g}=this.nodeAt(c),h=l.piece,m=h.bufferIndex,C=this.positionInBuffer(l,o);if(l.piece.bufferIndex===0&&h.end.line===this._lastChangeBufferPos.line&&h.end.column===this._lastChangeBufferPos.column&&g+h.length===c&&d.length<p){this.appendToNode(l,d),this.computeBufferMetadata();return}if(g===c)this.insertContentToNodeLeft(d,l),this._searchCache.validate(c);else if(g+l.piece.length>c){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,o)===10){const P={line:D.start.line+1,column:0};D=new i(D.bufferIndex,P,D.end,this.getLineFeedCnt(D.bufferIndex,P,D.end),D.length-1),d+=`
|
||
`}if(this.shouldCheckCRLF()&&this.startWithLF(d))if(this.nodeCharCodeAt(l,o-1)===13){const P=this.positionInBuffer(l,o-1);this.deleteNodeTail(l,P),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 T=l;for(let A=0;A<I.length;A++)T=this.rbInsertRight(T,I[A]);this.deleteNodes(w)}else this.insertContentToNodeRight(d,l)}else{const l=this.createNewPieces(d);let o=this.rbInsertLeft(null,l[0]);for(let g=1;g<l.length;g++)o=this.rbInsertRight(o,l[g])}this.computeBufferMetadata()}delete(c,d){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",d<=0||this.root===E.SENTINEL)return;const s=this.nodeAt(c),l=this.nodeAt(c+d),o=s.node,g=l.node;if(o===g){const I=this.positionInBuffer(o,s.remainder),T=this.positionInBuffer(o,l.remainder);if(s.nodeStartOffset===c){if(d===o.piece.length){const A=o.next();(0,E.rbDelete)(this,o),this.validateCRLFWithPrevNode(A),this.computeBufferMetadata();return}this.deleteNodeHead(o,T),this._searchCache.validate(c),this.validateCRLFWithPrevNode(o),this.computeBufferMetadata();return}if(s.nodeStartOffset+o.piece.length===c+d){this.deleteNodeTail(o,I),this.validateCRLFWithNextNode(o),this.computeBufferMetadata();return}this.shrinkNode(o,I,T),this.computeBufferMetadata();return}const h=[],m=this.positionInBuffer(o,s.remainder);this.deleteNodeTail(o,m),this._searchCache.validate(c),o.piece.length===0&&h.push(o);const C=this.positionInBuffer(g,l.remainder);this.deleteNodeHead(g,C),g.piece.length===0&&h.push(g);const w=o.next();for(let I=w;I!==E.SENTINEL&&I!==g;I=I.next())h.push(I);const D=o.piece.length===0?o.prev():o;this.deleteNodes(h),this.validateCRLFWithNextNode(D),this.computeBufferMetadata()}insertContentToNodeLeft(c,d){const s=[];if(this.shouldCheckCRLF()&&this.endWithCR(c)&&this.startWithLF(d)){const g=d.piece,h={line:g.start.line+1,column:0},m=new i(g.bufferIndex,h,g.end,this.getLineFeedCnt(g.bufferIndex,h,g.end),g.length-1);d.piece=m,c+=`
|
||
`,(0,E.updateTreeMetadata)(this,d,-1,-1),d.piece.length===0&&s.push(d)}const l=this.createNewPieces(c);let o=this.rbInsertLeft(d,l[l.length-1]);for(let g=l.length-2;g>=0;g--)o=this.rbInsertLeft(o,l[g]);this.validateCRLFWithPrevNode(o),this.deleteNodes(s)}insertContentToNodeRight(c,d){this.adjustCarriageReturnFromNext(c,d)&&(c+=`
|
||
`);const s=this.createNewPieces(c),l=this.rbInsertRight(d,s[0]);let o=l;for(let g=1;g<s.length;g++)o=this.rbInsertRight(o,s[g]);this.validateCRLFWithPrevNode(l)}positionInBuffer(c,d,s){const l=c.piece,o=c.piece.bufferIndex,g=this._buffers[o].lineStarts,m=g[l.start.line]+l.start.column+d;let C=l.start.line,w=l.end.line,D=0,I=0,T=0;for(;C<=w&&(D=C+(w-C)/2|0,T=g[D],D!==w);)if(I=g[D+1],m<T)w=D-1;else if(m>=I)C=D+1;else break;return s?(s.line=D,s.column=m-T,null):{line:D,column:m-T}}getLineFeedCnt(c,d,s){if(s.column===0)return s.line-d.line;const l=this._buffers[c].lineStarts;if(s.line===l.length-1)return s.line-d.line;const o=l[s.line+1],g=l[s.line]+s.column;if(o>g+1)return s.line-d.line;const h=g-1;return this._buffers[c].buffer.charCodeAt(h)===13?s.line-d.line+1:s.line-d.line}offsetInBuffer(c,d){return this._buffers[c].lineStarts[d.line]+d.column}deleteNodes(c){for(let d=0;d<c.length;d++)(0,E.rbDelete)(this,c[d])}createNewPieces(c){if(c.length>p){const w=[];for(;c.length>p;){const I=c.charCodeAt(p-1);let T;I===13||I>=55296&&I<=56319?(T=c.substring(0,p-1),c=c.substring(p-1)):(T=c.substring(0,p),c=c.substring(p));const A=b(T);w.push(new i(this._buffers.length,{line:0,column:0},{line:A.length-1,column:T.length-A[A.length-1]},A.length-1,T.length)),this._buffers.push(new n(T,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 s=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<s.length;w++)s[w]+=d+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1)),this._buffers[0].buffer+="_"+c,d+=1}else{if(d!==0)for(let w=0;w<s.length;w++)s[w]+=d;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1)),this._buffers[0].buffer+=c}const o=this._buffers[0].buffer.length,g=this._buffers[0].lineStarts.length-1,h=o-this._buffers[0].lineStarts[g],m={line:g,column:h},C=new i(0,l,m,this.getLineFeedCnt(0,l,m),o-d);return this._lastChangeBufferPos=m,[C]}getLineRawContent(c,d=0){let s=this.root,l="";const o=this._searchCache.get2(c);if(o){s=o.node;const g=this.getAccumulatedValue(s,c-o.nodeStartLineNumber-1),h=this._buffers[s.piece.bufferIndex].buffer,m=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(o.nodeStartLineNumber+s.piece.lineFeedCnt===c)l=h.substring(m+g,m+s.piece.length);else{const C=this.getAccumulatedValue(s,c-o.nodeStartLineNumber);return h.substring(m+g,m+C-d)}}else{let g=0;const h=c;for(;s!==E.SENTINEL;)if(s.left!==E.SENTINEL&&s.lf_left>=c-1)s=s.left;else if(s.lf_left+s.piece.lineFeedCnt>c-1){const m=this.getAccumulatedValue(s,c-s.lf_left-2),C=this.getAccumulatedValue(s,c-s.lf_left-1),w=this._buffers[s.piece.bufferIndex].buffer,D=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);return g+=s.size_left,this._searchCache.set({node:s,nodeStartOffset:g,nodeStartLineNumber:h-(c-1-s.lf_left)}),w.substring(D+m,D+C-d)}else if(s.lf_left+s.piece.lineFeedCnt===c-1){const m=this.getAccumulatedValue(s,c-s.lf_left-2),C=this._buffers[s.piece.bufferIndex].buffer,w=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);l=C.substring(w+m,w+s.piece.length);break}else c-=s.lf_left+s.piece.lineFeedCnt,g+=s.size_left+s.piece.length,s=s.right}for(s=s.next();s!==E.SENTINEL;){const g=this._buffers[s.piece.bufferIndex].buffer;if(s.piece.lineFeedCnt>0){const h=this.getAccumulatedValue(s,0),m=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);return l+=g.substring(m,m+h-d),l}else{const h=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);l+=g.substr(h,s.piece.length)}s=s.next()}return l}computeBufferMetadata(){let c=this.root,d=1,s=0;for(;c!==E.SENTINEL;)d+=c.lf_left+c.piece.lineFeedCnt,s+=c.size_left+c.piece.length,c=c.right;this._lineCnt=d,this._length=s,this._searchCache.validate(this._length)}getIndexOf(c,d){const s=c.piece,l=this.positionInBuffer(c,d),o=l.line-s.start.line;if(this.offsetInBuffer(s.bufferIndex,s.end)-this.offsetInBuffer(s.bufferIndex,s.start)===d){const g=this.getLineFeedCnt(c.piece.bufferIndex,s.start,l);if(g!==o)return{index:g,remainder:0}}return{index:o,remainder:l.column}}getAccumulatedValue(c,d){if(d<0)return 0;const s=c.piece,l=this._buffers[s.bufferIndex].lineStarts,o=s.start.line+d+1;return o>s.end.line?l[s.end.line]+s.end.column-l[s.start.line]-s.start.column:l[o]-l[s.start.line]-s.start.column}deleteNodeTail(c,d){const s=c.piece,l=s.lineFeedCnt,o=this.offsetInBuffer(s.bufferIndex,s.end),g=d,h=this.offsetInBuffer(s.bufferIndex,g),m=this.getLineFeedCnt(s.bufferIndex,s.start,g),C=m-l,w=h-o,D=s.length+w;c.piece=new i(s.bufferIndex,s.start,g,m,D),(0,E.updateTreeMetadata)(this,c,w,C)}deleteNodeHead(c,d){const s=c.piece,l=s.lineFeedCnt,o=this.offsetInBuffer(s.bufferIndex,s.start),g=d,h=this.getLineFeedCnt(s.bufferIndex,g,s.end),m=this.offsetInBuffer(s.bufferIndex,g),C=h-l,w=o-m,D=s.length+w;c.piece=new i(s.bufferIndex,g,s.end,h,D),(0,E.updateTreeMetadata)(this,c,w,C)}shrinkNode(c,d,s){const l=c.piece,o=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,o);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,s,g,this.getLineFeedCnt(l.bufferIndex,s,g),this.offsetInBuffer(l.bufferIndex,g)-this.offsetInBuffer(l.bufferIndex,s)),T=this.rbInsertRight(c,I);this.validateCRLFWithPrevNode(T)}appendToNode(c,d){this.adjustCarriageReturnFromNext(d,c)&&(d+=`
|
||
`);const s=this.shouldCheckCRLF()&&this.startWithLF(d)&&this.endWithCR(c),l=this._buffers[0].buffer.length;this._buffers[0].buffer+=d;const o=b(d,!1);for(let T=0;T<o.length;T++)o[T]+=l;if(s){const T=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:l-T}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(o.slice(1));const g=this._buffers[0].lineStarts.length-1,h=this._buffers[0].buffer.length-this._buffers[0].lineStarts[g],m={line:g,column:h},C=c.piece.length+d.length,w=c.piece.lineFeedCnt,D=this.getLineFeedCnt(0,c.piece.start,m),I=D-w;c.piece=new i(c.piece.bufferIndex,c.piece.start,m,D,C),this._lastChangeBufferPos=m,(0,E.updateTreeMetadata)(this,c,d.length,I)}nodeAt(c){let d=this.root;const s=this._searchCache.get(c);if(s)return{node:s.node,nodeStartOffset:s.nodeStartOffset,remainder:c-s.nodeStartOffset};let l=0;for(;d!==E.SENTINEL;)if(d.size_left>c)d=d.left;else if(d.size_left+d.piece.length>=c){l+=d.size_left;const o={node:d,remainder:c-d.size_left,nodeStartOffset:l};return this._searchCache.set(o),o}else c-=d.size_left+d.piece.length,l+=d.size_left+d.piece.length,d=d.right;return null}nodeAt2(c,d){let s=this.root,l=0;for(;s!==E.SENTINEL;)if(s.left!==E.SENTINEL&&s.lf_left>=c-1)s=s.left;else if(s.lf_left+s.piece.lineFeedCnt>c-1){const o=this.getAccumulatedValue(s,c-s.lf_left-2),g=this.getAccumulatedValue(s,c-s.lf_left-1);return l+=s.size_left,{node:s,remainder:Math.min(o+d-1,g),nodeStartOffset:l}}else if(s.lf_left+s.piece.lineFeedCnt===c-1){const o=this.getAccumulatedValue(s,c-s.lf_left-2);if(o+d-1<=s.piece.length)return{node:s,remainder:o+d-1,nodeStartOffset:l};d-=s.piece.length-o;break}else c-=s.lf_left+s.piece.lineFeedCnt,l+=s.size_left+s.piece.length,s=s.right;for(s=s.next();s!==E.SENTINEL;){if(s.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(s,0),g=this.offsetOfNode(s);return{node:s,remainder:Math.min(d-1,o),nodeStartOffset:g}}else if(s.piece.length>=d-1){const o=this.offsetOfNode(s);return{node:s,remainder:d-1,nodeStartOffset:o}}else d-=s.piece.length;s=s.next()}return null}nodeCharCodeAt(c,d){if(c.piece.lineFeedCnt<1)return-1;const s=this._buffers[c.piece.bufferIndex],l=this.offsetInBuffer(c.piece.bufferIndex,c.piece.start)+d;return s.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,s=this._buffers[d.bufferIndex].lineStarts,l=d.start.line,o=s[l]+d.start.column;return l===s.length-1||s[l+1]>o+1?!1:this._buffers[d.bufferIndex].buffer.charCodeAt(o)===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 s=[],l=this._buffers[c.piece.bufferIndex].lineStarts;let o;c.piece.end.column===0?o={line:c.piece.end.line-1,column:l[c.piece.end.line]-l[c.piece.end.line-1]-1}:o={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,o,h,g),(0,E.updateTreeMetadata)(this,c,-1,-1),c.piece.length===0&&s.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&&s.push(d);const D=this.createNewPieces(`\r
|
||
`);this.rbInsertRight(c,D[0]);for(let I=0;I<s.length;I++)(0,E.rbDelete)(this,s[I])}adjustCarriageReturnFromNext(c,d){if(this.shouldCheckCRLF()&&this.endWithCR(c)){const s=d.next();if(this.startWithLF(s)){if(c+=`
|
||
`,s.piece.length===1)(0,E.rbDelete)(this,s);else{const l=s.piece,o={line:l.start.line+1,column:0},g=l.length-1,h=this.getLineFeedCnt(l.bufferIndex,o,l.end);s.piece=new i(l.bufferIndex,o,l.end,h,g),(0,E.updateTreeMetadata)(this,s,-1,-1)}return!0}}return!1}iterate(c,d){if(c===E.SENTINEL)return d(E.SENTINEL);const s=this.iterate(c.left,d);return s&&d(c)&&this.iterate(c.right,d)}getNodeContent(c){if(c===E.SENTINEL)return"";const d=this._buffers[c.piece.bufferIndex],s=c.piece,l=this.offsetInBuffer(s.bufferIndex,s.start),o=this.offsetInBuffer(s.bufferIndex,s.end);return d.buffer.substring(l,o)}getPieceContent(c){const d=this._buffers[c.bufferIndex],s=this.offsetInBuffer(c.bufferIndex,c.start),l=this.offsetInBuffer(c.bufferIndex,c.end);return d.buffer.substring(s,l)}rbInsertRight(c,d){const s=new E.TreeNode(d,1);if(s.left=E.SENTINEL,s.right=E.SENTINEL,s.parent=E.SENTINEL,s.size_left=0,s.lf_left=0,this.root===E.SENTINEL)this.root=s,s.color=0;else if(c.right===E.SENTINEL)c.right=s,s.parent=c;else{const o=(0,E.leftest)(c.right);o.left=s,s.parent=o}return(0,E.fixInsert)(this,s),s}rbInsertLeft(c,d){const s=new E.TreeNode(d,1);if(s.left=E.SENTINEL,s.right=E.SENTINEL,s.parent=E.SENTINEL,s.size_left=0,s.lf_left=0,this.root===E.SENTINEL)this.root=s,s.color=0;else if(c.left===E.SENTINEL)c.left=s,s.parent=c;else{const l=(0,E.righttest)(c.left);l.right=s,s.parent=l}return(0,E.fixInsert)(this,s),s}}e.PieceTreeBase=u}),define(se[210],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function L(k,y){let E=0,S=0;const p=k.length;for(;S<p;){const _=k.charCodeAt(S);if(_===32)E++;else if(_===9)E=E-E%y+y;else break;S++}return S===p?-1:E}e.computeIndentLevel=L}),define(se[294],oe([1,0,90,10,41]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class E{constructor(a,i,n,t,r){this.injectionOffsets=a,this.injectionOptions=i,this.breakOffsets=n,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(a){return a>0?this.wrappedTextIndentLength:0}getLineLength(a){const i=a>0?this.breakOffsets[a-1]:0;let t=this.breakOffsets[a]-i;return a>0&&(t+=this.wrappedTextIndentLength),t}getMaxOutputOffset(a){return this.getLineLength(a)}translateToInputOffset(a,i){a>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let t=a===0?i:this.breakOffsets[a-1]+i;if(this.injectionOffsets!==null)for(let r=0;r<this.injectionOffsets.length&&t>this.injectionOffsets[r];r++)t<this.injectionOffsets[r]+this.injectionOptions[r].content.length?t=this.injectionOffsets[r]:t-=this.injectionOptions[r].content.length;return t}translateToOutputPosition(a,i=2){let n=a;if(this.injectionOffsets!==null)for(let t=0;t<this.injectionOffsets.length&&!(a<this.injectionOffsets[t]||i!==1&&a===this.injectionOffsets[t]);t++)n+=this.injectionOptions[t].content.length;return this.offsetInInputWithInjectionsToOutputPosition(n,i)}offsetInInputWithInjectionsToOutputPosition(a,i=2){let n=0,t=this.breakOffsets.length-1,r=0,u=0;for(;n<=t;){r=n+(t-n)/2|0;const c=this.breakOffsets[r];if(u=r>0?this.breakOffsets[r-1]:0,i===0)if(a<=u)t=r-1;else if(a>c)n=r+1;else break;else if(a<u)t=r-1;else if(a>=c)n=r+1;else break}let f=a-u;return r>0&&(f+=this.wrappedTextIndentLength),new v(r,f)}normalizeOutputPosition(a,i,n){if(this.injectionOffsets!==null){const t=this.outputPositionToOffsetInInputWithInjections(a,i),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(t,n);if(r!==t)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(a>0&&i===this.getMinOutputOffset(a))return new v(a-1,this.getMaxOutputOffset(a-1))}else if(n===1){const t=this.getOutputLineCount()-1;if(a<t&&i===this.getMaxOutputOffset(a))return new v(a+1,this.getMinOutputOffset(a+1))}return new v(a,i)}outputPositionToOffsetInInputWithInjections(a,i){return a>0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(a>0?this.breakOffsets[a-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(a,i){const n=this.getInjectedTextAtOffset(a);if(!n)return a;if(i===2){if(a===n.offsetInInputWithInjections+n.length&&S(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let t=n.offsetInInputWithInjections;if(p(this.injectionOptions[n.injectedTextIndex].cursorStops))return t;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(S(this.injectionOptions[r].cursorStops)||(t-=this.injectionOptions[r].content.length,p(this.injectionOptions[r].cursorStops)));)r--;return t}}else if(i===1||i===4){let t=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1<this.injectionOffsets.length&&this.injectionOffsets[r+1]===this.injectionOffsets[r];)t+=this.injectionOptions[r+1].content.length,r++;return t}else if(i===0||i===3){let t=n.offsetInInputWithInjections,r=n.injectedTextIndex;for(;r-1>=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)t-=this.injectionOptions[r-1].content.length,r--;return t}(0,L.assertNever)(i)}getInjectedText(a,i){const n=this.outputPositionToOffsetInInputWithInjections(a,i),t=this.getInjectedTextAtOffset(n);return t?{options:this.injectionOptions[t.injectedTextIndex]}:null}getInjectedTextAtOffset(a){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let t=0;for(let r=0;r<i.length;r++){const u=n[r].content.length,f=i[r]+t,c=i[r]+t+u;if(f>a)break;if(a<=c)return{injectedTextIndex:r,offsetInInputWithInjections:f,length:u};t+=u}}}}e.ModelLineProjectionData=E;function S(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 _{constructor(a){this.options=a}}e.InjectedText=_;class v{constructor(a,i){this.outputLineIndex=a,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(a){return new k.Position(a+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=v}),define(se[295],oe([1,0]),function(te,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 S=this._dragOperations.get(E);return this._dragOperations.delete(E),S}}}e.TreeViewsDnDService=L;class k{constructor(E){this.identifier=E}}e.DraggedTreeItemsIdentifier=k}),define(se[296],oe([1,0,5,184,11,90,151]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class p{static computeUnicodeHighlights(i,n,t){const r=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(`${_(Array.from(c))}`,"g");const s=new k.Searcher(null,d),l=[];let o=!1,g,h=0,m=0,C=0;e:for(let w=r,D=u;w<=D;w++){const I=i.getLineContent(w),T=I.length;s.reset(0);do if(g=s.next(I),g){let A=g.index,P=g.index+g[0].length;if(A>0){const x=I.charCodeAt(A-1);y.isHighSurrogate(x)&&A--}if(P+1<T){const x=I.charCodeAt(P-1);y.isHighSurrogate(x)&&P++}const N=I.substring(A,P);let M=(0,S.getWordAtText)(A+1,S.DEFAULT_WORD_REGEXP,I,0);M&&M.endColumn<=A+1&&(M=null);const R=f.shouldHighlightNonBasicASCII(N,M?M.word:null);if(R!==0){R===3?h++:R===2?m++:R===1?C++:(0,E.assertNever)(R);const x=1e3;if(l.length>=x){o=!0;break e}l.push(new L.Range(w,A+1,w,P+1))}}while(g)}return{ranges:l,hasMore:o,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 _(a,i){return`[${y.escapeRegExpCharacters(a.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 r=!1,u=!1;if(n)for(const f of n){const c=f.codePointAt(0),d=y.isBasicASCII(f);r=r||d,!d&&!this.ambiguousCharacters.isAmbiguous(c)&&!y.InvisibleCharacters.isInvisibleCharacter(c)&&(u=!0)}return!r&&u?0:this.options.invisibleCharacters&&!b(i)&&y.InvisibleCharacters.isInvisibleCharacter(t)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}function b(a){return a===" "||a===`
|
||
`||a===" "}}),define(se[211],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.ShowLightbulbIconMode=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 S;(function(F){F[F.Deprecated=1]="Deprecated"})(S||(e.CompletionItemTag=S={}));var p;(function(F){F[F.Invoke=0]="Invoke",F[F.TriggerCharacter=1]="TriggerCharacter",F[F.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(p||(e.CompletionTriggerKind=p={}));var _;(function(F){F[F.EXACT=0]="EXACT",F[F.ABOVE=1]="ABOVE",F[F.BELOW=2]="BELOW"})(_||(e.ContentWidgetPositionPreference=_={}));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 a;(function(F){F[F.Text=0]="Text",F[F.Read=1]="Read",F[F.Write=2]="Write"})(a||(e.DocumentHighlightKind=a={}));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 r;(function(F){F[F.LF=0]="LF",F[F.CRLF=1]="CRLF"})(r||(e.EndOfLineSequence=r={}));var u;(function(F){F[F.Left=1]="Left",F[F.Center=2]="Center",F[F.Right=3]="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 s;(function(F){F[F.Automatic=0]="Automatic",F[F.Explicit=1]="Explicit"})(s||(e.InlineCompletionTriggerKind=s={}));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 o;(function(F){F[F.Hint=1]="Hint",F[F.Info=2]="Info",F[F.Warning=4]="Warning",F[F.Error=8]="Error"})(o||(e.MarkerSeverity=o={}));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 T;(function(F){F[F.None=0]="None",F[F.Text=1]="Text",F[F.Blocks=2]="Blocks"})(T||(e.RenderMinimap=T={}));var A;(function(F){F[F.Smooth=0]="Smooth",F[F.Immediate=1]="Immediate"})(A||(e.ScrollType=A={}));var P;(function(F){F[F.Auto=1]="Auto",F[F.Hidden=2]="Hidden",F[F.Visible=3]="Visible"})(P||(e.ScrollbarVisibility=P={}));var N;(function(F){F[F.LTR=0]="LTR",F[F.RTL=1]="RTL"})(N||(e.SelectionDirection=N={}));var M;(function(F){F.Off="off",F.OnCode="onCode",F.On="on"})(M||(e.ShowLightbulbIconMode=M={}));var R;(function(F){F[F.Invoke=1]="Invoke",F[F.TriggerCharacter=2]="TriggerCharacter",F[F.ContentChange=3]="ContentChange"})(R||(e.SignatureHelpTriggerKind=R={}));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 O;(function(F){F[F.Deprecated=1]="Deprecated"})(O||(e.SymbolTag=O={}));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 K;(function(F){F[F.None=0]="None",F[F.Same=1]="Same",F[F.Indent=2]="Indent",F[F.DeepIndent=3]="DeepIndent"})(K||(e.WrappingIndent=K={}))}),define(se[528],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class L{constructor(S,p,_,v){this.range=S,this.nestingLevel=p,this.nestingLevelOfEqualBracketType=_,this.isInvalid=v}}e.BracketInfo=L;class k{constructor(S,p,_,v,b,a){this.range=S,this.openingBracketRange=p,this.closingBracketRange=_,this.nestingLevel=v,this.nestingLevelOfEqualBracketType=b,this.bracketPairNode=a}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=k;class y extends k{constructor(S,p,_,v,b,a,i){super(S,p,_,v,b,a),this.minVisibleColumnIndentation=i}}e.BracketPairWithMinIndentationInfo=y}),define(se[529],oe([1,0,6,2,528,182,290,91,289,134,209,13,288]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class n extends k.Disposable{didLanguageChange(s){return this.brackets.didLanguageChange(s)}constructor(s,l){if(super(),this.textModel=s,this.getLanguageConfiguration=l,this.didChangeEmitter=new L.Emitter,this.denseKeyProvider=new v.DenseKeyProvider,this.brackets=new S.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],s.tokenization.hasTokens)s.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 o=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),g=new b.FastTokenizer(this.textModel.getValue(),o);this.initialAstWithoutTokens=(0,_.parseDocument)(g,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const s=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,s||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:s}){const l=s.map(o=>new E.TextEditInfo((0,p.toLength)(o.fromLineNumber-1,0),(0,p.toLength)(o.toLineNumber,0),(0,p.toLength)(o.toLineNumber-o.fromLineNumber+1,0)));this.handleEdits(l,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(s){const l=E.TextEditInfo.fromModelContentChanges(s.changes);this.handleEdits(l,!1)}handleEdits(s,l){const o=(0,i.combineTextEditInfos)(this.queuedTextEdits,s);this.queuedTextEdits=o,this.initialAstWithoutTokens&&!l&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,i.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,s))}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(s,l,o){const h=l,m=new b.TextBufferTokenizer(this.textModel,this.brackets);return(0,_.parseDocument)(m,s,h,o)}getBracketsInRange(s,l){this.flushQueue();const o=(0,p.toLength)(s.startLineNumber-1,s.startColumn-1),g=(0,p.toLength)(s.endLineNumber-1,s.endColumn-1);return new a.CallbackIterable(h=>{const m=this.initialAstWithoutTokens||this.astWithTokens;u(m,p.lengthZero,m.length,o,g,h,0,0,new Map,l)})}getBracketPairsInRange(s,l){this.flushQueue();const o=(0,p.positionToLength)(s.getStartPosition()),g=(0,p.positionToLength)(s.getEndPosition());return new a.CallbackIterable(h=>{const m=this.initialAstWithoutTokens||this.astWithTokens,C=new f(h,l,this.textModel);c(m,p.lengthZero,m.length,o,g,C,0,new Map)})}getFirstBracketAfter(s){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return r(l,p.lengthZero,l.length,(0,p.positionToLength)(s))}getFirstBracketBefore(s){this.flushQueue();const l=this.initialAstWithoutTokens||this.astWithTokens;return t(l,p.lengthZero,l.length,(0,p.positionToLength)(s))}}e.BracketPairsTree=n;function t(d,s,l,o){if(d.kind===4||d.kind===2){const g=[];for(const h of d.children)l=(0,p.lengthAdd)(s,h.length),g.push({nodeOffsetStart:s,nodeOffsetEnd:l}),s=l;for(let h=g.length-1;h>=0;h--){const{nodeOffsetStart:m,nodeOffsetEnd:C}=g[h];if((0,p.lengthLessThan)(m,o)){const w=t(d.children[h],m,C,o);if(w)return w}}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,p.lengthsToRange)(s,l);return{bracketInfo:d.bracketInfo,range:g}}}return null}function r(d,s,l,o){if(d.kind===4||d.kind===2){for(const g of d.children){if(l=(0,p.lengthAdd)(s,g.length),(0,p.lengthLessThan)(o,l)){const h=r(g,s,l,o);if(h)return h}s=l}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,p.lengthsToRange)(s,l);return{bracketInfo:d.bracketInfo,range:g}}}return null}function u(d,s,l,o,g,h,m,C,w,D,I=!1){if(m>200)return!0;e:for(;;)switch(d.kind){case 4:{const T=d.childrenLength;for(let A=0;A<T;A++){const P=d.getChild(A);if(P){if(l=(0,p.lengthAdd)(s,P.length),(0,p.lengthLessThanEqual)(s,g)&&(0,p.lengthGreaterThanEqual)(l,o)){if((0,p.lengthGreaterThanEqual)(l,g)){d=P;continue e}if(!u(P,s,l,o,g,h,m,0,w,D))return!1}s=l}}return!0}case 2:{const T=!D||!d.closingBracket||d.closingBracket.bracketInfo.closesColorized(d.openingBracket.bracketInfo);let A=0;if(w){let N=w.get(d.openingBracket.text);N===void 0&&(N=0),A=N,T&&(N++,w.set(d.openingBracket.text,N))}const P=d.childrenLength;for(let N=0;N<P;N++){const M=d.getChild(N);if(M){if(l=(0,p.lengthAdd)(s,M.length),(0,p.lengthLessThanEqual)(s,g)&&(0,p.lengthGreaterThanEqual)(l,o)){if((0,p.lengthGreaterThanEqual)(l,g)&&M.kind!==1){d=M,T?(m++,C=A+1):C=A;continue e}if((T||M.kind!==1||!d.closingBracket)&&!u(M,s,l,o,g,h,T?m+1:m,T?A+1:A,w,D,!d.closingBracket))return!1}s=l}}return w?.set(d.openingBracket.text,A),!0}case 3:{const T=(0,p.lengthsToRange)(s,l);return h(new y.BracketInfo(T,m-1,0,!0))}case 1:{const T=(0,p.lengthsToRange)(s,l);return h(new y.BracketInfo(T,m-1,C-1,I))}case 0:return!0}}class f{constructor(s,l,o){this.push=s,this.includeMinIndentation=l,this.textModel=o}}function c(d,s,l,o,g,h,m,C){var w;if(m>200)return!0;let D=!0;if(d.kind===2){let I=0;if(C){let P=C.get(d.openingBracket.text);P===void 0&&(P=0),I=P,P++,C.set(d.openingBracket.text,P)}const T=(0,p.lengthAdd)(s,d.openingBracket.length);let A=-1;if(h.includeMinIndentation&&(A=d.computeMinIndentation(s,h.textModel)),D=h.push(new y.BracketPairWithMinIndentationInfo((0,p.lengthsToRange)(s,l),(0,p.lengthsToRange)(s,T),d.closingBracket?(0,p.lengthsToRange)((0,p.lengthAdd)(T,((w=d.child)===null||w===void 0?void 0:w.length)||p.lengthZero),l):void 0,m,I,d,A)),s=T,D&&d.child){const P=d.child;if(l=(0,p.lengthAdd)(s,P.length),(0,p.lengthLessThanEqual)(s,g)&&(0,p.lengthGreaterThanEqual)(l,o)&&(D=c(P,s,l,o,g,h,m+1,C),!D))return!1}C?.set(d.openingBracket.text,I)}else{let I=s;for(const T of d.children){const A=I;if(I=(0,p.lengthAdd)(I,T.length),(0,p.lengthLessThanEqual)(A,g)&&(0,p.lengthLessThanEqual)(o,I)&&(D=c(T,A,I,o,g,h,m,C),!D))return!1}}return D}}),define(se[114],oe([1,0]),function(te,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="",r=0;for(const u of n)t+=i.substring(r,u.column-1),r=u.column-1,t+=u.options.content;return t+=i.substring(r),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,r)=>t.lineNumber===r.lineNumber?t.column===r.column?t.order-r.order:t.column-r.column:t.lineNumber-r.lineNumber),n}constructor(i,n,t,r,u){this.ownerId=i,this.lineNumber=n,this.column=t,this.options=r,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 S{constructor(i,n,t,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=i,this.toLineNumber=n,this.detail=t}}e.ModelRawLinesInserted=S;class p{constructor(){this.changeType=5}}e.ModelRawEOLChanged=p;class _{constructor(i,n,t,r){this.changes=i,this.versionId=n,this.isUndoing=t,this.isRedoing=r,this.resultingSelection=null}containsEvent(i){for(let n=0,t=this.changes.length;n<t;n++)if(this.changes[n].changeType===i)return!0;return!1}static merge(i,n){const t=[].concat(i.changes).concat(n.changes),r=n.versionId,u=i.isUndoing||n.isUndoing,f=i.isRedoing||n.isRedoing;return new _(t,r,u,f)}}e.ModelRawContentChangedEvent=_;class v{constructor(i){this.changes=i}}e.ModelInjectedTextChangedEvent=v;class b{constructor(i,n){this.rawContentChangedEvent=i,this.contentChangedEvent=n}merge(i){const n=_.merge(this.rawContentChangedEvent,i.rawContentChangedEvent),t=b._mergeChangeEvents(this.contentChangedEvent,i.contentChangedEvent);return new b(n,t)}static _mergeChangeEvents(i,n){const t=[].concat(i.changes).concat(n.changes),r=n.eol,u=n.versionId,f=i.isUndoing||n.isUndoing,c=i.isRedoing||n.isRedoing,d=i.isFlush||n.isFlush,s=i.isEolChange&&n.isEolChange;return{changes:t,eol:r,isEolChange:s,versionId:u,isUndoing:f,isRedoing:c,isFlush:d}}}e.InternalModelContentChangeEvent=b}),define(se[212],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuideHorizontalLine=e.IndentGuide=e.HorizontalGuidesState=void 0;var L;(function(E){E[E.Disabled=0]="Disabled",E[E.EnabledForActive=1]="EnabledForActive",E[E.Enabled=2]="Enabled"})(L||(e.HorizontalGuidesState=L={}));class k{constructor(S,p,_,v,b,a){if(this.visibleColumn=S,this.column=p,this.className=_,this.horizontalLine=v,this.forWrappedLinesAfterColumn=b,this.forWrappedLinesBeforeOrAtColumn=a,S!==-1==(p!==-1))throw new Error}}e.IndentGuide=k;class y{constructor(S,p){this.top=S,this.endColumn=p}}e.IndentGuideHorizontalLine=y}),define(se[297],oe([1,0,60,11,85,5,292,210,212,12]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class b extends S.TextModelPart{constructor(n,t){super(),this.textModel=n,this.languageConfigurationService=t}getLanguageConfiguration(n){return this.languageConfigurationService.getLanguageConfiguration(n)}_computeIndentLevel(n){return(0,p.computeIndentLevel)(this.textModel.getLineContent(n+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(n,t,r){this.assertNotDisposed();const u=this.textModel.getLineCount();if(n<1||n>u)throw new v.BugIndicatingError("Illegal value for lineNumber");const f=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,c=!!(f&&f.offSide);let d=-2,s=-1,l=-2,o=-1;const g=R=>{if(d!==-1&&(d===-2||d>R-1)){d=-1,s=-1;for(let x=R-2;x>=0;x--){const O=this._computeIndentLevel(x);if(O>=0){d=x,s=O;break}}}if(l===-2){l=-1,o=-1;for(let x=R;x<u;x++){const O=this._computeIndentLevel(x);if(O>=0){l=x,o=O;break}}}};let h=-2,m=-1,C=-2,w=-1;const D=R=>{if(h===-2){h=-1,m=-1;for(let x=R-2;x>=0;x--){const O=this._computeIndentLevel(x);if(O>=0){h=x,m=O;break}}}if(C!==-1&&(C===-2||C<R-1)){C=-1,w=-1;for(let x=R;x<u;x++){const O=this._computeIndentLevel(x);if(O>=0){C=x,w=O;break}}}};let I=0,T=!0,A=0,P=!0,N=0,M=0;for(let R=0;T||P;R++){const x=n-R,O=n+R;R>1&&(x<1||x<t)&&(T=!1),R>1&&(O>u||O>r)&&(P=!1),R>5e4&&(T=!1,P=!1);let B=-1;if(T&&x>=1){const V=this._computeIndentLevel(x-1);V>=0?(l=x-1,o=V,B=Math.ceil(V/this.textModel.getOptions().indentSize)):(g(x),B=this._getIndentLevelForWhitespaceLine(c,s,o))}let W=-1;if(P&&O<=u){const V=this._computeIndentLevel(O-1);V>=0?(h=O-1,m=V,W=Math.ceil(V/this.textModel.getOptions().indentSize)):(D(O),W=this._getIndentLevelForWhitespaceLine(c,m,w))}if(R===0){M=B;continue}if(R===1){if(O<=u&&W>=0&&M+1===W){T=!1,I=O,A=O,N=W;continue}if(x>=1&&B>=0&&B-1===M){P=!1,I=x,A=x,N=B;continue}if(I=n,A=n,N=M,N===0)return{startLineNumber:I,endLineNumber:A,indent:N}}T&&(B>=N?I=x:T=!1),P&&(W>=N?A=O:P=!1)}return{startLineNumber:I,endLineNumber:A,indent:N}}getLinesBracketGuides(n,t,r,u){var f;const c=[];for(let h=n;h<=t;h++)c.push([]);const d=!0,s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new E.Range(n,1,t,this.textModel.getLineMaxColumn(t))).toArray();let l;if(r&&s.length>0){const h=(n<=r.lineNumber&&r.lineNumber<=t?s:this.textModel.bracketPairs.getBracketPairsInRange(E.Range.fromPositions(r)).toArray()).filter(m=>E.Range.strictContainsPosition(m.range,r));l=(f=(0,L.findLast)(h,m=>d||m.range.startLineNumber!==m.range.endLineNumber))===null||f===void 0?void 0:f.range}const o=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new a;for(const h of s){if(!h.closingBracketRange)continue;const m=l&&h.range.equalsRange(l);if(!m&&!u.includeInactive)continue;const C=g.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,o)+(u.highlightActive&&m?" "+g.activeClassName:""),w=h.openingBracketRange.getStartPosition(),D=h.closingBracketRange.getStartPosition(),I=u.horizontalGuides===_.HorizontalGuidesState.Enabled||u.horizontalGuides===_.HorizontalGuidesState.EnabledForActive&&m;if(h.range.startLineNumber===h.range.endLineNumber){d&&I&&c[h.range.startLineNumber-n].push(new _.IndentGuide(-1,h.openingBracketRange.getEndPosition().column,C,new _.IndentGuideHorizontalLine(!1,D.column),-1,-1));continue}const T=this.getVisibleColumnFromPosition(D),A=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),P=Math.min(A,T,h.minVisibleColumnIndentation+1);let N=!1;k.firstNonWhitespaceIndex(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))<h.closingBracketRange.startColumn-1&&(N=!0);const x=Math.max(w.lineNumber,n),O=Math.min(D.lineNumber,t),B=N?1:0;for(let W=x;W<O+B;W++)c[W-n].push(new _.IndentGuide(P,-1,C,null,W===w.lineNumber?w.column:-1,W===D.lineNumber?D.column:-1));I&&(w.lineNumber>=n&&A>P&&c[w.lineNumber-n].push(new _.IndentGuide(P,-1,C,new _.IndentGuideHorizontalLine(!1,w.column),-1,-1)),D.lineNumber<=t&&T>P&&c[D.lineNumber-n].push(new _.IndentGuide(P,-1,C,new _.IndentGuideHorizontalLine(!N,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 r=this.textModel.getLineCount();if(n<1||n>r)throw new Error("Illegal value for startLineNumber");if(t<1||t>r)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 s=-2,l=-1,o=-2,g=-1;for(let h=n;h<=t;h++){const m=h-n,C=this._computeIndentLevel(h-1);if(C>=0){s=h-1,l=C,d[m]=Math.ceil(C/u.indentSize);continue}if(s===-2){s=-1,l=-1;for(let w=h-2;w>=0;w--){const D=this._computeIndentLevel(w);if(D>=0){s=w,l=D;break}}}if(o!==-1&&(o===-2||o<h-1)){o=-1,g=-1;for(let w=h;w<r;w++){const D=this._computeIndentLevel(w);if(D>=0){o=w,g=D;break}}}d[m]=this._getIndentLevelForWhitespaceLine(c,l,g)}return d}_getIndentLevelForWhitespaceLine(n,t,r){const u=this.textModel.getOptions();return t===-1||r===-1?0:t<r?1+Math.floor(t/u.indentSize):t===r||n?Math.ceil(r/u.indentSize):1+Math.floor(r/u.indentSize)}}e.GuidesTextModelPart=b;class a{constructor(){this.activeClassName="indent-active"}getInlineClassName(n,t,r){return this.getInlineClassNameOfLevel(r?t:n)}getInlineClassNameOfLevel(n){return`bracket-indent-guide lvl-${n%30}`}}e.BracketPairGuidesClassNames=a}),define(se[530],oe([1,0,6,2]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class y{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(p){this._onDidChange.fire({changedLanguages:p,changedColorMap:!1})}register(p,_){return this._tokenizationSupports.set(p,_),this.handleChange([p]),(0,k.toDisposable)(()=>{this._tokenizationSupports.get(p)===_&&(this._tokenizationSupports.delete(p),this.handleChange([p]))})}get(p){return this._tokenizationSupports.get(p)||null}registerFactory(p,_){var v;(v=this._factories.get(p))===null||v===void 0||v.dispose();const b=new E(this,p,_);return this._factories.set(p,b),(0,k.toDisposable)(()=>{const a=this._factories.get(p);!a||a!==b||(this._factories.delete(p),a.dispose())})}async getOrCreate(p){const _=this.get(p);if(_)return _;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,_,v){super(),this._registry=p,this._languageId=_,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(se[531],oe([1,0]),function(te,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(se[298],oe([1,0,531]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class k{constructor(){this._tokens=[]}add(E,S){if(this._tokens.length>0){const p=this._tokens[this._tokens.length-1];if(p.endLineNumber+1===E){p.appendLineTokens(S);return}}this._tokens.push(new L.ContiguousMultilineTokens(E,[S]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=k}),define(se[94],oe([1,0,132]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class k{static createEmpty(S,p){const _=k.defaultTokenMetadata,v=new Uint32Array(2);return v[0]=S.length,v[1]=_,new k(v,S,p)}constructor(S,p,_){this._lineTokensBrand=void 0,this._tokens=S,this._tokensCount=this._tokens.length>>>1,this._text=p,this._languageIdCodec=_}equals(S){return S instanceof k?this.slicedEquals(S,0,this._tokensCount):!1}slicedEquals(S,p,_){if(this._text!==S._text||this._tokensCount!==S._tokensCount)return!1;const v=p<<1,b=v+(_<<1);for(let a=v;a<b;a++)if(this._tokens[a]!==S._tokens[a])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(S){return S>0?this._tokens[S-1<<1]:0}getMetadata(S){return this._tokens[(S<<1)+1]}getLanguageId(S){const p=this._tokens[(S<<1)+1],_=L.TokenMetadata.getLanguageId(p);return this._languageIdCodec.decodeLanguageId(_)}getStandardTokenType(S){const p=this._tokens[(S<<1)+1];return L.TokenMetadata.getTokenType(p)}getForeground(S){const p=this._tokens[(S<<1)+1];return L.TokenMetadata.getForeground(p)}getClassName(S){const p=this._tokens[(S<<1)+1];return L.TokenMetadata.getClassNameFromMetadata(p)}getInlineStyle(S,p){const _=this._tokens[(S<<1)+1];return L.TokenMetadata.getInlineStyleFromMetadata(_,p)}getPresentation(S){const p=this._tokens[(S<<1)+1];return L.TokenMetadata.getPresentationFromMetadata(p)}getEndOffset(S){return this._tokens[S<<1]}findTokenIndexAtOffset(S){return k.findIndexInTokensArray(this._tokens,S)}inflate(){return this}sliceAndInflate(S,p,_){return new y(this,S,p,_)}static convertToEndOffset(S,p){const v=(S.length>>>1)-1;for(let b=0;b<v;b++)S[b<<1]=S[b+1<<1];S[v<<1]=p}static findIndexInTokensArray(S,p){if(S.length<=2)return 0;let _=0,v=(S.length>>>1)-1;for(;_<v;){const b=_+Math.floor((v-_)/2),a=S[b<<1];if(a===p)return b+1;a<p?_=b+1:a>p&&(v=b)}return _}withInserted(S){if(S.length===0)return this;let p=0,_=0,v="";const b=new Array;let a=0;for(;;){const i=p<this._tokensCount?this._tokens[p<<1]:-1,n=_<S.length?S[_]:null;if(i!==-1&&(n===null||i<=n.offset)){v+=this._text.substring(a,i);const t=this._tokens[(p<<1)+1];b.push(v.length,t),p++,a=i}else if(n){if(n.offset>a){v+=this._text.substring(a,n.offset);const t=this._tokens[(p<<1)+1];b.push(v.length,t),a=n.offset}v+=n.text,b.push(v.length,n.tokenMetadata),_++}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(S,p,_,v){this._source=S,this._startOffset=p,this._endOffset=_,this._deltaOffset=v,this._firstTokenIndex=S.findTokenIndexAtOffset(p),this._tokensCount=0;for(let b=this._firstTokenIndex,a=S.getCount();b<a&&!(S.getStartOffset(b)>=_);b++)this._tokensCount++}getMetadata(S){return this._source.getMetadata(this._firstTokenIndex+S)}getLanguageId(S){return this._source.getLanguageId(this._firstTokenIndex+S)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(S){return S instanceof y?this._startOffset===S._startOffset&&this._endOffset===S._endOffset&&this._deltaOffset===S._deltaOffset&&this._source.slicedEquals(S._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(S){return this._source.getForeground(this._firstTokenIndex+S)}getEndOffset(S){const p=this._source.getEndOffset(this._firstTokenIndex+S);return Math.min(this._endOffset,p)-this._startOffset+this._deltaOffset}getClassName(S){return this._source.getClassName(this._firstTokenIndex+S)}getInlineStyle(S,p){return this._source.getInlineStyle(this._firstTokenIndex+S,p)}getPresentation(S){return this._source.getPresentation(this._firstTokenIndex+S)}findTokenIndexAtOffset(S){return this._source.findTokenIndexAtOffset(S+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(se[532],oe([1,0,94]),function(te,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(S,p){return S===null||S===e.EMPTY_LINE_TOKENS?S:k.delete(S,0,p)}static deleteEnding(S,p){if(S===null||S===e.EMPTY_LINE_TOKENS)return S;const _=y(S),v=_[_.length-2];return k.delete(S,p,v)}static delete(S,p,_){if(S===null||S===e.EMPTY_LINE_TOKENS||p===_)return S;const v=y(S),b=v.length>>>1;if(p===0&&v[v.length-2]===_)return e.EMPTY_LINE_TOKENS;const a=L.LineTokens.findIndexInTokensArray(v,p),i=a>0?v[a-1<<1]:0,n=v[a<<1];if(_<n){const c=_-p;for(let d=a;d<b;d++)v[d<<1]-=c;return S}let t,r;i!==p?(v[a<<1]=p,t=a+1<<1,r=p):(t=a<<1,r=i);const u=_-p;for(let c=a+1;c<b;c++){const d=v[c<<1]-u;d>r&&(v[t++]=d,v[t++]=v[(c<<1)+1],r=d)}if(t===v.length)return S;const f=new Uint32Array(t);return f.set(v.subarray(0,t),0),f.buffer}static append(S,p){if(p===e.EMPTY_LINE_TOKENS)return S;if(S===e.EMPTY_LINE_TOKENS)return p;if(S===null)return S;if(p===null)return null;const _=y(S),v=y(p),b=v.length>>>1,a=new Uint32Array(_.length+v.length);a.set(_,0);let i=_.length;const n=_[_.length-2];for(let t=0;t<b;t++)a[i++]=v[t<<1]+n,a[i++]=v[(t<<1)+1];return a.buffer}static insert(S,p,_){if(S===null||S===e.EMPTY_LINE_TOKENS)return S;const v=y(S),b=v.length>>>1;let a=L.LineTokens.findIndexInTokensArray(v,p);a>0&&v[a-1<<1]===p&&a--;for(let i=a;i<b;i++)v[i<<1]+=_;return S}}e.ContiguousTokensEditing=k;function y(E){return E instanceof Uint32Array?E:new Uint32Array(E)}e.toUint32Array=y}),define(se[533],oe([1,0,13,10,532,94,132]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class p{constructor(b){this._lineTokens=[],this._len=0,this._languageIdCodec=b}flush(){this._lineTokens=[],this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(b,a,i){let n=null;if(a<this._len&&(n=this._lineTokens[a]),n!==null&&n!==y.EMPTY_LINE_TOKENS)return new E.LineTokens((0,y.toUint32Array)(n),i,this._languageIdCodec);const t=new Uint32Array(2);return t[0]=i.length,t[1]=_(this._languageIdCodec.encodeLanguageId(b)),new E.LineTokens(t,i,this._languageIdCodec)}static _massageTokens(b,a,i){const n=i?(0,y.toUint32Array)(i):null;if(a===0){let t=!1;if(n&&n.length>1&&(t=S.TokenMetadata.getLanguageId(n[1])!==b),!t)return y.EMPTY_LINE_TOKENS}if(!n||n.length===0){const t=new Uint32Array(2);return t[0]=a,t[1]=_(b),t.buffer}return n[n.length-2]=a,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,a){a!==0&&(b+a>this._len&&(a=this._len-b),this._lineTokens.splice(b,a),this._len-=a)}_insertLines(b,a){if(a===0)return;const i=[];for(let n=0;n<a;n++)i[n]=null;this._lineTokens=L.arrayInsert(this._lineTokens,b,i),this._len+=a}setTokens(b,a,i,n,t){const r=p._massageTokens(this._languageIdCodec.encodeLanguageId(b),i,n);this._ensureLine(a);const u=this._lineTokens[a];return this._lineTokens[a]=r,t?!p._equals(u,r):!1}static _equals(b,a){if(!b||!a)return!b&&!a;const i=(0,y.toUint32Array)(b),n=(0,y.toUint32Array)(a);if(i.length!==n.length)return!1;for(let t=0,r=i.length;t<r;t++)if(i[t]!==n[t])return!1;return!0}acceptEdit(b,a,i){this._acceptDeleteRange(b),this._acceptInsertText(new k.Position(b.startLineNumber,b.startColumn),a,i)}_acceptDeleteRange(b){const a=b.startLineNumber-1;if(a>=this._len)return;if(b.startLineNumber===b.endLineNumber){if(b.startColumn===b.endColumn)return;this._lineTokens[a]=y.ContiguousTokensEditing.delete(this._lineTokens[a],b.startColumn-1,b.endColumn-1);return}this._lineTokens[a]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[a],b.startColumn-1);const i=b.endLineNumber-1;let n=null;i<this._len&&(n=y.ContiguousTokensEditing.deleteBeginning(this._lineTokens[i],b.endColumn-1)),this._lineTokens[a]=y.ContiguousTokensEditing.append(this._lineTokens[a],n),this._deleteLines(b.startLineNumber,b.endLineNumber-b.startLineNumber)}_acceptInsertText(b,a,i){if(a===0&&i===0)return;const n=b.lineNumber-1;if(!(n>=this._len)){if(a===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,a)}}setMultilineTokens(b,a){if(b.length===0)return{changes:[]};const i=[];for(let n=0,t=b.length;n<t;n++){const r=b[n];let u=0,f=0,c=!1;for(let d=r.startLineNumber;d<=r.endLineNumber;d++)c?(this.setTokens(a.getLanguageId(),d-1,a.getLineLength(d),r.getLineTokens(d),!1),f=d):this.setTokens(a.getLanguageId(),d-1,a.getLineLength(d),r.getLineTokens(d),!0)&&(c=!0,u=d,f=d);c&&i.push({fromLineNumber:u,toLineNumber:f})}return{changes:i}}}e.ContiguousTokensStore=p;function _(v){return(v<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}}),define(se[534],oe([1,0,10,5,129]),function(te,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 S(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,a=v.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(b,v.startColumn-1,a,v.endColumn-1),this._updateEndLineNumber()}split(v){const b=v.startLineNumber-this._startLineNumber,a=v.endLineNumber-this._startLineNumber,[i,n,t]=this._tokens.split(b,v.startColumn-1,a,v.endColumn-1);return[new E(this._startLineNumber,i),new E(this._startLineNumber+t,n)]}applyEdit(v,b){const[a,i,n]=(0,y.countEOL)(b);this.acceptEdit(v,a,i,n,b.length>0?b.charCodeAt(0):0)}acceptEdit(v,b,a,i,n){this._acceptDeleteRange(v),this._acceptInsertText(new L.Position(v.startLineNumber,v.startColumn),b,a,i,n),this._updateEndLineNumber()}_acceptDeleteRange(v){if(v.startLineNumber===v.endLineNumber&&v.startColumn===v.endColumn)return;const b=v.startLineNumber-this._startLineNumber,a=v.endLineNumber-this._startLineNumber;if(a<0){const n=a-b;this._startLineNumber-=n;return}const i=this._tokens.getMaxDeltaLine();if(!(b>=i+1)){if(b<0&&a>=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,a,v.endColumn-1)}else this._tokens.acceptDeleteRange(0,b,v.startColumn-1,a,v.endColumn-1)}}_acceptInsertText(v,b,a,i,n){if(b===0&&a===0)return;const t=v.lineNumber-this._startLineNumber;if(t<0){this._startLineNumber+=b;return}const r=this._tokens.getMaxDeltaLine();t>=r+1||this._tokens.acceptInsertText(t,v.column-1,b,a,i,n)}}e.SparseMultilineTokens=E;class S{constructor(v){this._tokens=v,this._tokenCount=v.length/4}toString(v){const b=[];for(let a=0;a<this._tokenCount;a++)b.push(`(${this._getDeltaLine(a)+v},${this._getStartCharacter(a)}-${this._getEndCharacter(a)})`);return`[${b.join(",")}]`}getMaxDeltaLine(){const v=this._getTokenCount();return v===0?-1:this._getDeltaLine(v-1)}getRange(){const v=this._getTokenCount();if(v===0)return null;const b=this._getStartCharacter(0),a=this._getDeltaLine(v-1),i=this._getEndCharacter(v-1);return new k.Range(0,b+1,a,i+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(v){return this._tokens[4*v]}_getStartCharacter(v){return this._tokens[4*v+1]}_getEndCharacter(v){return this._tokens[4*v+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(v){let b=0,a=this._getTokenCount()-1;for(;b<a;){const i=b+Math.floor((a-b)/2),n=this._getDeltaLine(i);if(n<v)b=i+1;else if(n>v)a=i-1;else{let t=i;for(;t>b&&this._getDeltaLine(t-1)===v;)t--;let r=i;for(;r<a&&this._getDeltaLine(r+1)===v;)r++;return new p(this._tokens.subarray(4*t,4*r+4))}}return this._getDeltaLine(b)===v?new p(this._tokens.subarray(4*b,4*b+4)):null}clear(){this._tokenCount=0}removeTokens(v,b,a,i){const n=this._tokens,t=this._tokenCount;let r=0,u=!1,f=0;for(let c=0;c<t;c++){const d=4*c,s=n[d],l=n[d+1],o=n[d+2],g=n[d+3];if((s>v||s===v&&o>=b)&&(s<a||s===a&&l<=i))u=!0;else{if(r===0&&(f=s),u){const h=4*r;n[h]=s-f,n[h+1]=l,n[h+2]=o,n[h+3]=g}r++}}return this._tokenCount=r,f}split(v,b,a,i){const n=this._tokens,t=this._tokenCount,r=[],u=[];let f=r,c=0,d=0;for(let s=0;s<t;s++){const l=4*s,o=n[l],g=n[l+1],h=n[l+2],m=n[l+3];if(o>v||o===v&&h>=b){if(o<a||o===a&&g<=i)continue;f!==u&&(f=u,c=0,d=o)}f[c++]=o-d,f[c++]=g,f[c++]=h,f[c++]=m}return[new S(new Uint32Array(r)),new S(new Uint32Array(u)),d]}acceptDeleteRange(v,b,a,i,n){const t=this._tokens,r=this._tokenCount,u=i-b;let f=0,c=!1;for(let d=0;d<r;d++){const s=4*d;let l=t[s],o=t[s+1],g=t[s+2];const h=t[s+3];if(l<b||l===b&&g<=a){f++;continue}else if(l===b&&o<a)l===i&&g>n?g-=n-a:g=a;else if(l===b&&o===a)if(l===i&&g>n)g-=n-a;else{c=!0;continue}else if(l<i||l===i&&o<n)if(l===i&&g>n)l=b,o=a,g=o+(g-n);else{c=!0;continue}else if(l>i){if(u===0&&!c){f=r;break}l-=u}else if(l===i&&o>=n)v&&l===0&&(o+=v,g+=v),l-=u,o-=n-a,g-=n-a;else throw new Error("Not possible!");const m=4*f;t[m]=l,t[m+1]=o,t[m+2]=g,t[m+3]=h,f++}this._tokenCount=f}acceptInsertText(v,b,a,i,n,t){const r=a===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;c<f;c++){const d=4*c;let s=u[d],l=u[d+1],o=u[d+2];if(!(s<v||s===v&&o<b)){if(s===v&&o===b)if(r)o+=1;else continue;else if(s===v&&l<b&&b<o)a===0?o+=i:o=b;else{if(s===v&&l===b&&r)continue;if(s===v)if(s+=a,a===0)l+=i,o+=i;else{const g=o-l;l=n+(l-b),o=l+g}else s+=a}u[d]=s,u[d+1]=l,u[d+2]=o}}}}class p{constructor(v){this._tokens=v}getCount(){return this._tokens.length/4}getStartCharacter(v){return this._tokens[4*v+1]}getEndCharacter(v){return this._tokens[4*v+2]}getMetadata(v){return this._tokens[4*v+3]}}e.SparseLineTokens=p}),define(se[535],oe([1,0,13,94]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class y{constructor(S){this._pieces=[],this._isComplete=!1,this._languageIdCodec=S}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(S,p){this._pieces=S||[],this._isComplete=p}setPartial(S,p){let _=S;if(p.length>0){const b=p[0].getRange(),a=p[p.length-1].getRange();if(!b||!a)return S;_=S.plusRange(b).plusRange(a)}let v=null;for(let b=0,a=this._pieces.length;b<a;b++){const i=this._pieces[b];if(i.endLineNumber<_.startLineNumber)continue;if(i.startLineNumber>_.endLineNumber){v=v||{index:b};break}if(i.removeTokens(_),i.isEmpty()){this._pieces.splice(b,1),b--,a--;continue}if(i.endLineNumber<_.startLineNumber)continue;if(i.startLineNumber>_.endLineNumber){v=v||{index:b};continue}const[n,t]=i.split(_);if(n.isEmpty()){v=v||{index:b};continue}t.isEmpty()||(this._pieces.splice(b,1,n,t),b++,a++,v=v||{index:b})}return v=v||{index:this._pieces.length},p.length>0&&(this._pieces=L.arrayInsert(this._pieces,v.index,p)),_}isComplete(){return this._isComplete}addSparseTokens(S,p){if(p.getLineContent().length===0)return p;const _=this._pieces;if(_.length===0)return p;const v=y._findFirstPieceWithLine(_,S),b=_[v].getLineTokens(S);if(!b)return p;const a=p.getCount(),i=b.getCount();let n=0;const t=[];let r=0,u=0;const f=(c,d)=>{c!==u&&(u=c,t[r++]=c,t[r++]=d)};for(let c=0;c<i;c++){const d=b.getStartCharacter(c),s=b.getEndCharacter(c),l=b.getMetadata(c),o=((l&1?2048:0)|(l&2?4096:0)|(l&4?8192:0)|(l&8?16384:0)|(l&16?16744448:0)|(l&32?4278190080:0))>>>0,g=~o>>>0;for(;n<a&&p.getEndOffset(n)<=d;)f(p.getEndOffset(n),p.getMetadata(n)),n++;for(n<a&&p.getStartOffset(n)<d&&f(d,p.getMetadata(n));n<a&&p.getEndOffset(n)<s;)f(p.getEndOffset(n),p.getMetadata(n)&g|l&o),n++;if(n<a)f(s,p.getMetadata(n)&g|l&o),p.getEndOffset(n)===s&&n++;else{const h=Math.min(Math.max(0,n-1),a-1);f(s,p.getMetadata(h)&g|l&o)}}for(;n<a;)f(p.getEndOffset(n),p.getMetadata(n)),n++;return new k.LineTokens(new Uint32Array(t),p.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(S,p){let _=0,v=S.length-1;for(;_<v;){let b=_+Math.floor((v-_)/2);if(S[b].endLineNumber<p)_=b+1;else if(S[b].startLineNumber>p)v=b-1;else{for(;b>_&&S[b-1].startLineNumber<=p&&p<=S[b-1].endLineNumber;)b--;return b}}return _}acceptEdit(S,p,_,v,b){for(const a of this._pieces)a.acceptEdit(S,p,_,v,b)}}e.SparseTokensStore=y}),define(se[154],oe([1,0,2]),function(te,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 S=!1;for(let p=0,_=E.length;p<_;p++){const v=E[p];switch(v.type){case 0:this.onCompositionStart(v)&&(S=!0);break;case 1:this.onCompositionEnd(v)&&(S=!0);break;case 2:this.onConfigurationChanged(v)&&(S=!0);break;case 3:this.onCursorStateChanged(v)&&(S=!0);break;case 4:this.onDecorationsChanged(v)&&(S=!0);break;case 5:this.onFlushed(v)&&(S=!0);break;case 6:this.onFocusChanged(v)&&(S=!0);break;case 7:this.onLanguageConfigurationChanged(v)&&(S=!0);break;case 8:this.onLineMappingChanged(v)&&(S=!0);break;case 9:this.onLinesChanged(v)&&(S=!0);break;case 10:this.onLinesDeleted(v)&&(S=!0);break;case 11:this.onLinesInserted(v)&&(S=!0);break;case 12:this.onRevealRangeRequest(v)&&(S=!0);break;case 13:this.onScrollChanged(v)&&(S=!0);break;case 15:this.onTokensChanged(v)&&(S=!0);break;case 14:this.onThemeChanged(v)&&(S=!0);break;case 16:this.onTokensColorsChanged(v)&&(S=!0);break;case 17:this.onZonesChanged(v)&&(S=!0);break;default:console.info("View received unknown event: "),console.info(v)}}S&&(this._shouldRender=!0)}}e.ViewEventHandler=k}),define(se[115],oe([1,0,154]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class k extends L.ViewEventHandler{}e.DynamicViewOverlay=k}),define(se[56],oe([1,0,154]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class k extends L.ViewEventHandler{constructor(S){super(),this._context=S,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=k;class y{static write(S,p){S.setAttribute("data-mprt",String(p))}static read(S){const p=S.getAttribute("data-mprt");return p===null?0:parseInt(p,10)}static collect(S,p){const _=[];let v=0;for(;S&&S!==S.ownerDocument.body&&S!==p;)S.nodeType===S.ELEMENT_NODE&&(_[v++]=this.read(S)),S=S.parentElement;const b=new Uint8Array(v);for(let a=0;a<v;a++)b[a]=_[v-a-1];return b}}e.PartFingerprints=y}),define(se[536],oe([1,0,40,56,430]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class y extends k.ViewPart{constructor(S){super(S),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let S=!1;const _=this._context.configuration.options.get(143),v=_.contentWidth-_.verticalScrollbarWidth;this.contentWidth!==v&&(this.contentWidth=v,S=!0);const b=_.contentLeft;return this.contentLeft!==b&&(this.contentLeft=b,S=!0),S}dispose(){super.dispose()}onConfigurationChanged(S){return this.update()}onScrollChanged(S){return S.scrollTopChanged||S.scrollLeftChanged}onDecorationsChanged(S){return!0}onZonesChanged(S){return!0}prepareRender(S){}render(S){var p;let _=0;const v=S.getDecorationsInViewport();for(const b of v){if(!b.options.blockClassName)continue;let a=this.blocks[_];a||(a=this.blocks[_]=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(a));let i,n;b.options.blockIsAfterEnd?(i=S.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!1),n=S.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!0)):(i=S.getVerticalOffsetForLineNumber(b.range.startLineNumber,!0),n=b.range.isEmpty()&&!b.options.blockDoesNotCollapse?S.getVerticalOffsetForLineNumber(b.range.startLineNumber,!1):S.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!0));const[t,r,u,f]=(p=b.options.blockPadding)!==null&&p!==void 0?p:[0,0,0,0];a.setClassName("blockDecorations-block "+b.options.blockClassName),a.setLeft(this.contentLeft-f),a.setWidth(this.contentWidth+f+r),a.setTop(i-S.scrollTop-t),a.setHeight(n-i+t+u),_++}for(let b=_;b<this.blocks.length;b++)this.blocks[b].domNode.remove();this.blocks.length=_}}e.BlockDecorations=y}),define(se[537],oe([1,0,115,148,5,432]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class E extends L.DynamicViewOverlay{constructor(p){super(),this._context=p;const _=this._context.configuration.options;this._lineHeight=_.get(66),this._typicalHalfwidthCharacterWidth=_.get(50).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(p){const _=this._context.configuration.options;return this._lineHeight=_.get(66),this._typicalHalfwidthCharacterWidth=_.get(50).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(p){return!0}onFlushed(p){return!0}onLinesChanged(p){return!0}onLinesDeleted(p){return!0}onLinesInserted(p){return!0}onScrollChanged(p){return p.scrollTopChanged||p.scrollWidthChanged}onZonesChanged(p){return!0}prepareRender(p){const _=p.getDecorationsInViewport();let v=[],b=0;for(let t=0,r=_.length;t<r;t++){const u=_[t];u.options.className&&(v[b++]=u)}v=v.sort((t,r)=>{if(t.options.zIndex<r.options.zIndex)return-1;if(t.options.zIndex>r.options.zIndex)return 1;const u=t.options.className,f=r.options.className;return u<f?-1:u>f?1:y.Range.compareRangesUsingStarts(t.range,r.range)});const a=p.visibleRange.startLineNumber,i=p.visibleRange.endLineNumber,n=[];for(let t=a;t<=i;t++){const r=t-a;n[r]=""}this._renderWholeLineDecorations(p,v,n),this._renderNormalDecorations(p,v,n),this._renderResult=n}_renderWholeLineDecorations(p,_,v){const b=String(this._lineHeight),a=p.visibleRange.startLineNumber,i=p.visibleRange.endLineNumber;for(let n=0,t=_.length;n<t;n++){const r=_[n];if(!r.options.isWholeLine)continue;const u='<div class="cdr '+r.options.className+'" style="left:0;width:100%;height:'+b+'px;"></div>',f=Math.max(r.range.startLineNumber,a),c=Math.min(r.range.endLineNumber,i);for(let d=f;d<=c;d++){const s=d-a;v[s]+=u}}}_renderNormalDecorations(p,_,v){var b;const a=String(this._lineHeight),i=p.visibleRange.startLineNumber;let n=null,t=!1,r=null,u=!1;for(let f=0,c=_.length;f<c;f++){const d=_[f];if(d.options.isWholeLine)continue;const s=d.options.className,l=!!d.options.showIfCollapsed;let o=d.range;if(l&&o.endColumn===1&&o.endLineNumber!==o.startLineNumber&&(o=new y.Range(o.startLineNumber,o.startColumn,o.endLineNumber-1,this._context.viewModel.getLineMaxColumn(o.endLineNumber-1))),n===s&&t===l&&y.Range.areIntersectingOrTouching(r,o)){r=y.Range.plusRange(r,o);continue}n!==null&&this._renderNormalDecoration(p,r,n,u,t,a,i,v),n=s,t=l,r=o,u=(b=d.options.shouldFillLineOnLineBreak)!==null&&b!==void 0?b:!1}n!==null&&this._renderNormalDecoration(p,r,n,u,t,a,i,v)}_renderNormalDecoration(p,_,v,b,a,i,n,t){const r=p.linesVisibleRangesForRange(_,v==="findMatch");if(r)for(let u=0,f=r.length;u<f;u++){const c=r[u];if(c.outsideRenderedLine)continue;const d=c.lineNumber-n;if(a&&c.ranges.length===1){const s=c.ranges[0];if(s.width<this._typicalHalfwidthCharacterWidth){const l=Math.round(s.left+s.width/2),o=Math.max(0,Math.round(l-this._typicalHalfwidthCharacterWidth/2));c.ranges[0]=new k.HorizontalRange(o,this._typicalHalfwidthCharacterWidth)}}for(let s=0,l=c.ranges.length;s<l;s++){const o=b&&c.continuesOnNextLine&&l===1,g=c.ranges[s],h='<div class="cdr '+v+'" style="left:'+String(g.left)+(o?"px;width:100%;height:":"px;width:"+String(g.width)+"px;height:")+i+'px;"></div>';t[d]+=h}}}render(p,_){if(!this._renderResult)return"";const v=_-p;return v<0||v>=this._renderResult.length?"":this._renderResult[v]}}e.DecorationsOverlay=E}),define(se[213],oe([1,0,40,13,115,56,10,5,41,433]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginWidgets=e.DedupOverlay=e.VisibleLineDecorationsToRender=e.LineDecorationToRender=e.DecorationToRender=void 0;class v{constructor(c,d,s,l,o){this.startLineNumber=c,this.endLineNumber=d,this.className=s,this.tooltip=l,this._decorationToRenderBrand=void 0,this.zIndex=o??0}}e.DecorationToRender=v;class b{constructor(c,d,s){this.className=c,this.zIndex=d,this.tooltip=s}}e.LineDecorationToRender=b;class a{constructor(){this.decorations=[]}add(c){this.decorations.push(c)}getDecorations(){return this.decorations}}e.VisibleLineDecorationsToRender=a;class i extends y.DynamicViewOverlay{_render(c,d,s){const l=[];for(let h=c;h<=d;h++){const m=h-c;l[m]=new a}if(s.length===0)return l;s.sort((h,m)=>h.className===m.className?h.startLineNumber===m.startLineNumber?h.endLineNumber-m.endLineNumber:h.startLineNumber-m.startLineNumber:h.className<m.className?-1:1);let o=null,g=0;for(let h=0,m=s.length;h<m;h++){const C=s[h],w=C.className,D=C.zIndex;let I=Math.max(C.startLineNumber,c)-c;const T=Math.min(C.endLineNumber,d)-c;o===w?(I=Math.max(g+1,I),g=Math.max(g,T)):(o=w,g=T);for(let A=I;A<=g;A++)l[A].add(new b(w,D,C.tooltip))}return l}}e.DedupOverlay=i;class n extends E.ViewPart{constructor(c){super(c),this._widgets={},this._context=c;const d=this._context.configuration.options,s=d.get(143);this.domNode=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=d.get(66),this._glyphMargin=d.get(57),this._glyphMarginLeft=s.glyphMarginLeft,this._glyphMarginWidth=s.glyphMarginWidth,this._glyphMarginDecorationLaneCount=s.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(c){const d=this._context.configuration.options,s=d.get(143);return this._lineHeight=d.get(66),this._glyphMargin=d.get(57),this._glyphMarginLeft=s.glyphMarginLeft,this._glyphMarginWidth=s.glyphMarginWidth,this._glyphMarginDecorationLaneCount=s.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(c){return!0}onFlushed(c){return!0}onLinesChanged(c){return!0}onLinesDeleted(c){return!0}onLinesInserted(c){return!0}onScrollChanged(c){return c.scrollTopChanged}onZonesChanged(c){return!0}addWidget(c){const d=(0,L.createFastDomNode)(c.getDomNode());this._widgets[c.getId()]={widget:c,preference:c.getPosition(),domNode:d,renderInfo:null},d.setPosition("absolute"),d.setDisplay("none"),d.setAttribute("widgetId",c.getId()),this.domNode.appendChild(d),this.setShouldRender()}setWidgetPosition(c,d){const s=this._widgets[c.getId()];return s.preference.lane===d.lane&&s.preference.zIndex===d.zIndex&&p.Range.equalsRange(s.preference.range,d.range)?!1:(s.preference=d,this.setShouldRender(),!0)}removeWidget(c){var d;const s=c.getId();if(this._widgets[s]){const o=this._widgets[s].domNode.domNode;delete this._widgets[s],(d=o.parentNode)===null||d===void 0||d.removeChild(o),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(c,d){var s,l,o;const g=c.visibleRange.startLineNumber,h=c.visibleRange.endLineNumber,m=c.getDecorationsInViewport();for(const C of m){const w=C.options.glyphMarginClassName;if(!w)continue;const D=Math.max(C.range.startLineNumber,g),I=Math.min(C.range.endLineNumber,h),T=(l=(s=C.options.glyphMargin)===null||s===void 0?void 0:s.position)!==null&&l!==void 0?l:_.GlyphMarginLane.Center,A=(o=C.options.zIndex)!==null&&o!==void 0?o:0;for(let P=D;P<=I;P++){const N=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(P,0)),M=this._context.viewModel.glyphLanes.getLanesAtLine(N.lineNumber).indexOf(T);d.push(new t(P,M,A,w))}}}_collectWidgetBasedGlyphRenderRequest(c,d){const s=c.visibleRange.startLineNumber,l=c.visibleRange.endLineNumber;for(const o of Object.values(this._widgets)){const g=o.preference.range,{startLineNumber:h,endLineNumber:m}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(p.Range.lift(g));if(!h||!m||m<s||h>l)continue;const C=Math.max(h,s),w=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new S.Position(C,0)),D=this._context.viewModel.glyphLanes.getLanesAtLine(w.lineNumber).indexOf(o.preference.lane);d.push(new r(C,D,o.preference.zIndex,o))}}_collectSortedGlyphRenderRequests(c){const d=[];return this._collectDecorationBasedGlyphRenderRequest(c,d),this._collectWidgetBasedGlyphRenderRequest(c,d),d.sort((s,l)=>s.lineNumber===l.lineNumber?s.laneIndex===l.laneIndex?s.zIndex===l.zIndex?l.type===s.type?s.type===0&&l.type===0?s.className<l.className?-1:1:0:l.type-s.type:l.zIndex-s.zIndex:s.laneIndex-l.laneIndex:s.lineNumber-l.lineNumber),d}prepareRender(c){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(const l of Object.values(this._widgets))l.renderInfo=null;const d=new k.ArrayQueue(this._collectSortedGlyphRenderRequests(c)),s=[];for(;d.length>0;){const l=d.peek();if(!l)break;const o=d.takeWhile(h=>h.lineNumber===l.lineNumber&&h.laneIndex===l.laneIndex);if(!o||o.length===0)break;const g=o[0];if(g.type===0){const h=[];for(const m of o){if(m.zIndex!==g.zIndex||m.type!==g.type)break;(h.length===0||h[h.length-1]!==m.className)&&h.push(m.className)}s.push(g.accept(h.join(" ")))}else g.widget.renderInfo={lineNumber:g.lineNumber,laneIndex:g.laneIndex}}this._decorationGlyphsToRender=s}render(c){if(!this._glyphMargin){for(const s of Object.values(this._widgets))s.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const s=this._managedDomNodes.pop();s?.domNode.remove()}return}const d=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const s of Object.values(this._widgets))if(!s.renderInfo)s.domNode.setDisplay("none");else{const l=c.viewportData.relativeVerticalOffset[s.renderInfo.lineNumber-c.viewportData.startLineNumber],o=this._glyphMarginLeft+s.renderInfo.laneIndex*this._lineHeight;s.domNode.setDisplay("block"),s.domNode.setTop(l),s.domNode.setLeft(o),s.domNode.setWidth(d),s.domNode.setHeight(this._lineHeight)}for(let s=0;s<this._decorationGlyphsToRender.length;s++){const l=this._decorationGlyphsToRender[s],o=c.viewportData.relativeVerticalOffset[l.lineNumber-c.viewportData.startLineNumber],g=this._glyphMarginLeft+l.laneIndex*this._lineHeight;let h;s<this._managedDomNodes.length?h=this._managedDomNodes[s]:(h=(0,L.createFastDomNode)(document.createElement("div")),this._managedDomNodes.push(h),this.domNode.appendChild(h)),h.setClassName("cgmr codicon "+l.combinedClassName),h.setPosition("absolute"),h.setTop(o),h.setLeft(g),h.setWidth(d),h.setHeight(this._lineHeight)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){const s=this._managedDomNodes.pop();s?.domNode.remove()}}}e.GlyphMarginWidgets=n;class t{constructor(c,d,s,l){this.lineNumber=c,this.laneIndex=d,this.zIndex=s,this.className=l,this.type=0}accept(c){return new u(this.lineNumber,this.laneIndex,c)}}class r{constructor(c,d,s,l){this.lineNumber=c,this.laneIndex=d,this.zIndex=s,this.widget=l,this.type=1}}class u{constructor(c,d,s){this.lineNumber=c,this.laneIndex=d,this.combinedClassName=s}}}),define(se[538],oe([1,0,213,437]),function(te,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){var S,p;const _=E.getDecorationsInViewport(),v=[];let b=0;for(let a=0,i=_.length;a<i;a++){const n=_[a],t=n.options.linesDecorationsClassName,r=n.options.zIndex;t&&(v[b++]=new L.DecorationToRender(n.range.startLineNumber,n.range.endLineNumber,t,(S=n.options.linesDecorationsTooltip)!==null&&S!==void 0?S:null,r));const u=n.options.firstLineDecorationClassName;u&&(v[b++]=new L.DecorationToRender(n.range.startLineNumber,n.range.startLineNumber,u,(p=n.options.linesDecorationsTooltip)!==null&&p!==void 0?p:null,r))}return v}prepareRender(E){const S=E.visibleRange.startLineNumber,p=E.visibleRange.endLineNumber,_=this._render(S,p,this._getDecorations(E)),v=this._decorationsLeft.toString(),b=this._decorationsWidth.toString(),a='" style="left:'+v+"px;width:"+b+'px;"></div>',i=[];for(let n=S;n<=p;n++){const t=n-S,r=_[t].getDecorations();let u="";for(const f of r){let c='<div class="cldr '+f.className;f.tooltip!==null&&(c+='" title="'+f.tooltip),c+=a,u+=c}i[t]=u}this._renderResult=i}render(E,S){return this._renderResult?this._renderResult[S-E]:""}}e.LinesDecorationsOverlay=k}),define(se[299],oe([1,0,40,56,438]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class y extends k.ViewPart{constructor(S){super(S);const p=this._context.configuration.options,_=p.get(143);this._canUseLayerHinting=!p.get(32),this._contentLeft=_.contentLeft,this._glyphMarginLeft=_.glyphMarginLeft,this._glyphMarginWidth=_.glyphMarginWidth,this._domNode=(0,L.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(y.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,L.createFastDomNode)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(y.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(S){const p=this._context.configuration.options,_=p.get(143);return this._canUseLayerHinting=!p.get(32),this._contentLeft=_.contentLeft,this._glyphMarginLeft=_.glyphMarginLeft,this._glyphMarginWidth=_.glyphMarginWidth,!0}onScrollChanged(S){return super.onScrollChanged(S)||S.scrollTopChanged}prepareRender(S){}render(S){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const p=S.scrollTop-S.bigNumbersDelta;this._domNode.setTop(-p);const _=Math.min(S.scrollHeight,1e6);this._domNode.setHeight(_),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(_)}}e.Margin=y,y.CLASS_NAME="glyph-margin",y.OUTER_CLASS_NAME="margin"}),define(se[539],oe([1,0,213,439]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class k extends L.DedupOverlay{constructor(E){super(),this._context=E,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){return!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 S=E.getDecorationsInViewport(),p=[];let _=0;for(let v=0,b=S.length;v<b;v++){const a=S[v],i=a.options.marginClassName,n=a.options.zIndex;i&&(p[_++]=new L.DecorationToRender(a.range.startLineNumber,a.range.endLineNumber,i,null,n))}return p}prepareRender(E){const S=E.visibleRange.startLineNumber,p=E.visibleRange.endLineNumber,_=this._render(S,p,this._getDecorations(E)),v=[];for(let b=S;b<=p;b++){const a=b-S,i=_[a].getDecorations();let n="";for(const t of i)n+='<div class="cmdr '+t.className+'" style=""></div>';v[a]=n}this._renderResult=v}render(E,S){return this._renderResult?this._renderResult[S-E]:""}}e.MarginViewLineDecorationsOverlay=k}),define(se[540],oe([1,0,40,56,442]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class y extends k.ViewPart{constructor(S){super(S),this.domNode=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const p=this._context.configuration.options;this._rulers=p.get(101),this._typicalHalfwidthCharacterWidth=p.get(50).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(S){const p=this._context.configuration.options;return this._rulers=p.get(101),this._typicalHalfwidthCharacterWidth=p.get(50).typicalHalfwidthCharacterWidth,!0}onScrollChanged(S){return S.scrollHeightChanged}prepareRender(S){}_ensureRulersCount(){const S=this._renderedRulers.length,p=this._rulers.length;if(S===p)return;if(S<p){const{tabSize:v}=this._context.viewModel.model.getOptions(),b=v;let a=p-S;for(;a>0;){const i=(0,L.createFastDomNode)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(b),this.domNode.appendChild(i),this._renderedRulers.push(i),a--}return}let _=S-p;for(;_>0;){const v=this._renderedRulers.pop();this.domNode.removeChild(v),_--}}render(S){this._ensureRulersCount();for(let p=0,_=this._rulers.length;p<_;p++){const v=this._renderedRulers[p],b=this._rulers[p];v.setBoxShadow(b.color?`1px 0 0 0 ${b.color} inset`:""),v.setHeight(Math.min(S.scrollHeight,1e6)),v.setLeft(b.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=y}),define(se[541],oe([1,0,40,56,443]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class y extends k.ViewPart{constructor(S){super(S),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const _=this._context.configuration.options.get(102);this._useShadows=_.useShadows,this._domNode=(0,L.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const S=this._useShadows&&this._scrollTop>0;return this._shouldShow!==S?(this._shouldShow=S,!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(S){const _=this._context.configuration.options.get(102);return this._useShadows=_.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(S){return this._scrollTop=S.scrollTop,this._updateShouldShow()}prepareRender(S){}render(S){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=y}),define(se[542],oe([1,0,40,12,56,10]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const S=()=>{throw new Error("Invalid change accessor")};class p extends y.ViewPart{constructor(b){super(b);const a=this._context.configuration.options,i=a.get(143);this._lineHeight=a.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(),a=new Map;for(const n of b)a.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const t=Object.keys(this._zones);for(let r=0,u=t.length;r<u;r++){const f=t[r],c=this._zones[f],d=this._computeWhitespaceProps(c.delegate);c.isInHiddenArea=d.isInHiddenArea;const s=a.get(f);s&&(s.afterLineNumber!==d.afterViewLineNumber||s.height!==d.heightInPx)&&(n.changeOneWhitespace(f,d.afterViewLineNumber,d.heightInPx),this._safeCallOnComputedHeight(c.delegate,d.heightInPx),i=!0)}}),i}onConfigurationChanged(b){const a=this._context.configuration.options,i=a.get(143);return this._lineHeight=a.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,b.hasChanged(66)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(b){return this._recomputeWhitespacesProps()}onLinesDeleted(b){return!0}onScrollChanged(b){return b.scrollTopChanged||b.scrollWidthChanged}onZonesChanged(b){return!0}onLinesInserted(b){return!0}_getZoneOrdinal(b){var a,i;return(i=(a=b.ordinal)!==null&&a!==void 0?a:b.afterColumn)!==null&&i!==void 0?i:1e4}_computeWhitespaceProps(b){if(b.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(b),minWidthInPx:this._minWidthInPixels(b)};let a;if(typeof b.afterColumn<"u")a=this._context.viewModel.model.validatePosition({lineNumber:b.afterLineNumber,column:b.afterColumn});else{const r=this._context.viewModel.model.validatePosition({lineNumber:b.afterLineNumber,column:1}).lineNumber;a=new E.Position(r,this._context.viewModel.model.getLineMaxColumn(r))}let i;a.column===this._context.viewModel.model.getLineMaxColumn(a.lineNumber)?i=this._context.viewModel.model.validatePosition({lineNumber:a.lineNumber+1,column:1}):i=this._context.viewModel.model.validatePosition({lineNumber:a.lineNumber,column:a.column+1});const n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(a,b.afterColumnAffinity,!0),t=b.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(i);return{isInHiddenArea:!t,afterViewLineNumber:n.lineNumber,heightInPx:t?this._heightInPixels(b):0,minWidthInPx:this._minWidthInPixels(b)}}changeViewZones(b){let a=!1;return this._context.viewModel.changeWhitespace(i=>{const n={addZone:t=>(a=!0,this._addZone(i,t)),removeZone:t=>{t&&(a=this._removeZone(i,t)||a)},layoutZone:t=>{t&&(a=this._layoutZone(i,t)||a)}};_(b,n),n.addZone=S,n.removeZone=S,n.layoutZone=S}),a}_addZone(b,a){const i=this._computeWhitespaceProps(a),t={whitespaceId:b.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(a),i.heightInPx,i.minWidthInPx),delegate:a,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,L.createFastDomNode)(a.domNode),marginDomNode:a.marginDomNode?(0,L.createFastDomNode)(a.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,a){if(this._zones.hasOwnProperty(a)){const i=this._zones[a];return delete this._zones[a],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,a){if(this._zones.hasOwnProperty(a)){const i=this._zones[a],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,a){if(typeof b.onComputedHeight=="function")try{b.onComputedHeight(a)}catch(i){(0,k.onUnexpectedError)(i)}}_safeCallOnDomNodeTop(b,a){if(typeof b.onDomNodeTop=="function")try{b.onDomNodeTop(a)}catch(i){(0,k.onUnexpectedError)(i)}}prepareRender(b){}render(b){const a=b.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of a)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const t=Object.keys(this._zones);for(let r=0,u=t.length;r<u;r++){const f=t[r],c=this._zones[f];let d=0,s=0,l="none";i.hasOwnProperty(f)?(d=i[f].verticalOffset-b.bigNumbersDelta,s=i[f].height,l="block",c.isVisible||(c.domNode.setAttribute("monaco-visible-view-zone","true"),c.isVisible=!0),this._safeCallOnDomNodeTop(c.delegate,b.getScrolledTopFromAbsoluteTop(i[f].verticalOffset))):(c.isVisible&&(c.domNode.removeAttribute("monaco-visible-view-zone"),c.isVisible=!1),this._safeCallOnDomNodeTop(c.delegate,b.getScrolledTopFromAbsoluteTop(-1e6))),c.domNode.setTop(d),c.domNode.setHeight(s),c.domNode.setDisplay(l),c.marginDomNode&&(c.marginDomNode.setTop(d),c.marginDomNode.setHeight(s),c.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(b.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=p;function _(v,b){try{return v(b)}catch(a){(0,k.onUnexpectedError)(a)}}}),define(se[214],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZonesChangedEvent=e.ViewTokensColorsChangedEvent=e.ViewTokensChangedEvent=e.ViewThemeChangedEvent=e.ViewScrollChangedEvent=e.ViewRevealRangeRequestEvent=e.ViewLinesInsertedEvent=e.ViewLinesDeletedEvent=e.ViewLinesChangedEvent=e.ViewLineMappingChangedEvent=e.ViewLanguageConfigurationEvent=e.ViewFocusChangedEvent=e.ViewFlushedEvent=e.ViewDecorationsChangedEvent=e.ViewCursorStateChangedEvent=e.ViewConfigurationChangedEvent=e.ViewCompositionEndEvent=e.ViewCompositionStartEvent=void 0;class L{constructor(){this.type=0}}e.ViewCompositionStartEvent=L;class k{constructor(){this.type=1}}e.ViewCompositionEndEvent=k;class y{constructor(l){this.type=2,this._source=l}hasChanged(l){return this._source.hasChanged(l)}}e.ViewConfigurationChangedEvent=y;class E{constructor(l,o,g){this.selections=l,this.modelSelections=o,this.reason=g,this.type=3}}e.ViewCursorStateChangedEvent=E;class S{constructor(l){this.type=4,l?(this.affectsMinimap=l.affectsMinimap,this.affectsOverviewRuler=l.affectsOverviewRuler,this.affectsGlyphMargin=l.affectsGlyphMargin,this.affectsLineNumber=l.affectsLineNumber):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0,this.affectsGlyphMargin=!0,this.affectsLineNumber=!0)}}e.ViewDecorationsChangedEvent=S;class p{constructor(){this.type=5}}e.ViewFlushedEvent=p;class _{constructor(l){this.type=6,this.isFocused=l}}e.ViewFocusChangedEvent=_;class v{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=v;class b{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=b;class a{constructor(l,o){this.fromLineNumber=l,this.count=o,this.type=9}}e.ViewLinesChangedEvent=a;class i{constructor(l,o){this.type=10,this.fromLineNumber=l,this.toLineNumber=o}}e.ViewLinesDeletedEvent=i;class n{constructor(l,o){this.type=11,this.fromLineNumber=l,this.toLineNumber=o}}e.ViewLinesInsertedEvent=n;class t{constructor(l,o,g,h,m,C,w){this.source=l,this.minimalReveal=o,this.range=g,this.selections=h,this.verticalType=m,this.revealHorizontal=C,this.scrollType=w,this.type=12}}e.ViewRevealRangeRequestEvent=t;class r{constructor(l){this.type=13,this.scrollWidth=l.scrollWidth,this.scrollLeft=l.scrollLeft,this.scrollHeight=l.scrollHeight,this.scrollTop=l.scrollTop,this.scrollWidthChanged=l.scrollWidthChanged,this.scrollLeftChanged=l.scrollLeftChanged,this.scrollHeightChanged=l.scrollHeightChanged,this.scrollTopChanged=l.scrollTopChanged}}e.ViewScrollChangedEvent=r;class u{constructor(l){this.theme=l,this.type=14}}e.ViewThemeChangedEvent=u;class f{constructor(l){this.type=15,this.ranges=l}}e.ViewTokensChangedEvent=f;class c{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=c;class d{constructor(){this.type=17}}e.ViewZonesChangedEvent=d}),define(se[155],oe([1,0,11]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class k{constructor(_,v,b,a){this.startColumn=_,this.endColumn=v,this.className=b,this.type=a,this._lineDecorationBrand=void 0}static _equals(_,v){return _.startColumn===v.startColumn&&_.endColumn===v.endColumn&&_.className===v.className&&_.type===v.type}static equalsArr(_,v){const b=_.length,a=v.length;if(b!==a)return!1;for(let i=0;i<b;i++)if(!k._equals(_[i],v[i]))return!1;return!0}static extractWrapped(_,v,b){if(_.length===0)return _;const a=v+1,i=b+1,n=b-v,t=[];let r=0;for(const u of _)u.endColumn<=a||u.startColumn>=i||(t[r++]=new k(Math.max(1,u.startColumn-a+1),Math.min(n+1,u.endColumn-a+1),u.className,u.type));return t}static filter(_,v,b,a){if(_.length===0)return[];const i=[];let n=0;for(let t=0,r=_.length;t<r;t++){const u=_[t],f=u.range;if(f.endLineNumber<v||f.startLineNumber>v||f.isEmpty()&&(u.type===0||u.type===3))continue;const c=f.startLineNumber===v?f.startColumn:b,d=f.endLineNumber===v?f.endColumn:a;i[n++]=new k(c,d,u.inlineClassName,u.type)}return i}static _typeCompare(_,v){const b=[2,0,1,3];return b[_]-b[v]}static compare(_,v){if(_.startColumn!==v.startColumn)return _.startColumn-v.startColumn;if(_.endColumn!==v.endColumn)return _.endColumn-v.endColumn;const b=k._typeCompare(_.type,v.type);return b!==0?b:_.className!==v.className?_.className<v.className?-1:1:0}}e.LineDecoration=k;class y{constructor(_,v,b,a){this.startOffset=_,this.endOffset=v,this.className=b,this.metadata=a}}e.DecorationSegment=y;class E{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(_){let v=0;for(let b=0,a=_.length;b<a;b++)v|=_[b];return v}consumeLowerThan(_,v,b){for(;this.count>0&&this.stopOffsets[0]<_;){let a=0;for(;a+1<this.count&&this.stopOffsets[a]===this.stopOffsets[a+1];)a++;b.push(new y(v,this.stopOffsets[a],this.classNames.join(" "),E._metadata(this.metadata))),v=this.stopOffsets[a]+1,this.stopOffsets.splice(0,a+1),this.classNames.splice(0,a+1),this.metadata.splice(0,a+1),this.count-=a+1}return this.count>0&&v<_&&(b.push(new y(v,_-1,this.classNames.join(" "),E._metadata(this.metadata))),v=_),v}insert(_,v,b){if(this.count===0||this.stopOffsets[this.count-1]<=_)this.stopOffsets.push(_),this.classNames.push(v),this.metadata.push(b);else for(let a=0;a<this.count;a++)if(this.stopOffsets[a]>=_){this.stopOffsets.splice(a,0,_),this.classNames.splice(a,0,v),this.metadata.splice(a,0,b);break}this.count++}}class S{static normalize(_,v){if(v.length===0)return[];const b=[],a=new E;let i=0;for(let n=0,t=v.length;n<t;n++){const r=v[n];let u=r.startColumn,f=r.endColumn;const c=r.className,d=r.type===1?2:r.type===2?4:0;if(u>1){const o=_.charCodeAt(u-2);L.isHighSurrogate(o)&&u--}if(f>1){const o=_.charCodeAt(f-2);L.isHighSurrogate(o)&&f--}const s=u-1,l=f-2;i=a.consumeLowerThan(s,i,b),a.count===0&&(i=s),a.insert(l,c,d)}return a.consumeLowerThan(1073741824,i,b),b}}e.LineDecorationsNormalizer=S}),define(se[543],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class L{constructor(y,E,S,p){this.endIndex=y,this.type=E,this.metadata=S,this.containsRTL=p,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=L}),define(se[544],oe([1,0,11]),function(te,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 _=this._inserts,v=this._changes,b=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],p._commitPendingChanges(_,v,b)}}class y{constructor(p,_,v,b,a){this.id=p,this.afterLineNumber=_,this.ordinal=v,this.height=b,this.minWidth=a,this.prefixSum=0}}e.EditorWhitespace=y;class E{constructor(p,_,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=_,this._paddingTop=v,this._paddingBottom=b}static findInsertionIndex(p,_,v){let b=0,a=p.length;for(;b<a;){const i=b+a>>>1;_===p[i].afterLineNumber?v<p[i].ordinal?a=i:b=i+1:_<p[i].afterLineNumber?a=i:b=i+1}return b}setLineHeight(p){this._checkPendingChanges(),this._lineHeight=p}setPadding(p,_){this._paddingTop=p,this._paddingBottom=_}onFlushed(p){this._checkPendingChanges(),this._lineCount=p}changeWhitespace(p){let _=!1;try{p({insertWhitespace:(b,a,i,n)=>{_=!0,b=b|0,a=a|0,i=i|0,n=n|0;const t=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new y(t,b,a,i,n)),t},changeOneWhitespace:(b,a,i)=>{_=!0,a=a|0,i=i|0,this._pendingChanges.change({id:b,newAfterLineNumber:a,newHeight:i})},removeWhitespace:b=>{_=!0,this._pendingChanges.remove({id:b})}})}finally{this._pendingChanges.commit(this)}return _}_commitPendingChanges(p,_,v){if((p.length>0||v.length>0)&&(this._minWidth=-1),p.length+_.length+v.length<=1){for(const t of p)this._insertWhitespace(t);for(const t of _)this._changeOneWhitespace(t.id,t.newAfterLineNumber,t.newHeight);for(const t of v){const r=this._findWhitespaceIndex(t.id);r!==-1&&this._removeWhitespace(r)}return}const b=new Set;for(const t of v)b.add(t.id);const a=new Map;for(const t of _)a.set(t.id,t);const i=t=>{const r=[];for(const u of t)if(!b.has(u.id)){if(a.has(u.id)){const f=a.get(u.id);u.afterLineNumber=f.newAfterLineNumber,u.height=f.newHeight}r.push(u)}return r},n=i(this._arr).concat(i(p));n.sort((t,r)=>t.afterLineNumber===r.afterLineNumber?t.ordinal-r.ordinal:t.afterLineNumber-r.afterLineNumber),this._arr=n,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(p){const _=E.findInsertionIndex(this._arr,p.afterLineNumber,p.ordinal);this._arr.splice(_,0,p),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,_-1)}_findWhitespaceIndex(p){const _=this._arr;for(let v=0,b=_.length;v<b;v++)if(_[v].id===p)return v;return-1}_changeOneWhitespace(p,_,v){const b=this._findWhitespaceIndex(p);if(b!==-1&&(this._arr[b].height!==v&&(this._arr[b].height=v,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,b-1)),this._arr[b].afterLineNumber!==_)){const a=this._arr[b];this._removeWhitespace(b),a.afterLineNumber=_,this._insertWhitespace(a)}}_removeWhitespace(p){this._arr.splice(p,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,p-1)}onLinesDeleted(p,_){this._checkPendingChanges(),p=p|0,_=_|0,this._lineCount-=_-p+1;for(let v=0,b=this._arr.length;v<b;v++){const a=this._arr[v].afterLineNumber;p<=a&&a<=_?this._arr[v].afterLineNumber=p-1:a>_&&(this._arr[v].afterLineNumber-=_-p+1)}}onLinesInserted(p,_){this._checkPendingChanges(),p=p|0,_=_|0,this._lineCount+=_-p+1;for(let v=0,b=this._arr.length;v<b;v++){const a=this._arr[v].afterLineNumber;p<=a&&(this._arr[v].afterLineNumber+=_-p+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(p){this._checkPendingChanges(),p=p|0;let _=Math.max(0,this._prefixSumValidIndex+1);_===0&&(this._arr[0].prefixSum=this._arr[0].height,_++);for(let v=_;v<=p;v++)this._arr[v].prefixSum=this._arr[v-1].prefixSum+this._arr[v].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,p),this._arr[p].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const p=this._lineHeight*this._lineCount,_=this.getWhitespacesTotalHeight();return p+_+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(p){this._checkPendingChanges(),p=p|0;const _=this._findLastWhitespaceBeforeLineNumber(p);return _===-1?0:this.getWhitespacesAccumulatedHeight(_)}_findLastWhitespaceBeforeLineNumber(p){p=p|0;const _=this._arr;let v=0,b=_.length-1;for(;v<=b;){const i=(b-v|0)/2|0,n=v+i|0;if(_[n].afterLineNumber<p){if(n+1>=_.length||_[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 v<this._arr.length?v:-1}getFirstWhitespaceIndexAfterLineNumber(p){return this._checkPendingChanges(),p=p|0,this._findFirstWhitespaceAfterLineNumber(p)}getVerticalOffsetForLineNumber(p,_=!1){this._checkPendingChanges(),p=p|0;let v;p>1?v=this._lineHeight*(p-1):v=0;const b=this.getWhitespaceAccumulatedHeightBeforeLineNumber(p-(_?1:0));return v+b+this._paddingTop}getVerticalOffsetAfterLineNumber(p,_=!1){this._checkPendingChanges(),p=p|0;const v=this._lineHeight*p,b=this.getWhitespaceAccumulatedHeightBeforeLineNumber(p+(_?1:0));return v+b+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let p=0;for(let _=0,v=this._arr.length;_<v;_++)p=Math.max(p,this._arr[_].minWidth);this._minWidth=p}return this._minWidth}isAfterLines(p){this._checkPendingChanges();const _=this.getLinesTotalHeight();return p>_}isInTopPadding(p){return this._paddingTop===0?!1:(this._checkPendingChanges(),p<this._paddingTop)}isInBottomPadding(p){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const _=this.getLinesTotalHeight();return p>=_-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(p){if(this._checkPendingChanges(),p=p|0,p<0)return 1;const _=this._lineCount|0,v=this._lineHeight;let b=1,a=_;for(;b<a;){const i=(b+a)/2|0,n=this.getVerticalOffsetForLineNumber(i)|0;if(p>=n+v)b=i+1;else{if(p>=n)return i;a=i}}return b>_?_:b}getLinesViewportData(p,_){this._checkPendingChanges(),p=p|0,_=_|0;const v=this._lineHeight,b=this.getLineNumberAtOrAfterVerticalOffset(p)|0,a=this.getVerticalOffsetForLineNumber(b)|0;let i=this._lineCount|0,n=this.getFirstWhitespaceIndexAfterLineNumber(b)|0;const t=this.getWhitespacesCount()|0;let r,u;n===-1?(n=t,u=i+1,r=0):(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,r=this.getHeightForWhitespaceIndex(n)|0);let f=a,c=f;const d=5e5;let s=0;a>=d&&(s=Math.floor(a/d)*d,s=Math.floor(s/v)*v,c-=s);const l=[],o=p+(_-p)/2;let g=-1;for(let w=b;w<=i;w++){if(g===-1){const D=f,I=f+v;(D<=o&&o<I||D>o)&&(g=w)}for(f+=v,l[w-b]=c,c+=v;u===w;)c+=r,f+=r,n++,n>=t?u=i+1:(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,r=this.getHeightForWhitespaceIndex(n)|0);if(f>=_){i=w;break}}g===-1&&(g=i);const h=this.getVerticalOffsetForLineNumber(i)|0;let m=b,C=i;return m<C&&a<p&&m++,m<C&&h+v>_&&C--,{bigNumbersDelta:s,startLineNumber:b,endLineNumber:i,relativeVerticalOffset:l,centeredLineNumber:g,completelyVisibleStartLineNumber:m,completelyVisibleEndLineNumber:C}}getVerticalOffsetForWhitespaceIndex(p){this._checkPendingChanges(),p=p|0;const _=this.getAfterLineNumberForWhitespaceIndex(p);let v;_>=1?v=this._lineHeight*_: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 _=0,v=this.getWhitespacesCount()-1;if(v<0)return-1;const b=this.getVerticalOffsetForWhitespaceIndex(v),a=this.getHeightForWhitespaceIndex(v);if(p>=b+a)return-1;for(;_<v;){const i=Math.floor((_+v)/2),n=this.getVerticalOffsetForWhitespaceIndex(i),t=this.getHeightForWhitespaceIndex(i);if(p>=n+t)_=i+1;else{if(p>=n)return i;v=i}}return _}getWhitespaceAtVerticalOffset(p){this._checkPendingChanges(),p=p|0;const _=this.getWhitespaceIndexAtOrAfterVerticallOffset(p);if(_<0||_>=this.getWhitespacesCount())return null;const v=this.getVerticalOffsetForWhitespaceIndex(_);if(v>p)return null;const b=this.getHeightForWhitespaceIndex(_),a=this.getIdForWhitespaceIndex(_),i=this.getAfterLineNumberForWhitespaceIndex(_);return{id:a,afterLineNumber:i,verticalOffset:v,height:b}}getWhitespaceViewportData(p,_){this._checkPendingChanges(),p=p|0,_=_|0;const v=this.getWhitespaceIndexAtOrAfterVerticallOffset(p),b=this.getWhitespacesCount()-1;if(v<0)return[];const a=[];for(let i=v;i<=b;i++){const n=this.getVerticalOffsetForWhitespaceIndex(i),t=this.getHeightForWhitespaceIndex(i);if(n>=_)break;a.push({id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:n,height:t})}return a}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(se[545],oe([1,0,5]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class k{constructor(E,S,p,_){this.selections=E,this.startLineNumber=S.startLineNumber|0,this.endLineNumber=S.endLineNumber|0,this.relativeVerticalOffset=S.relativeVerticalOffset,this.bigNumbersDelta=S.bigNumbersDelta|0,this.whitespaceViewportData=p,this._model=_,this.visibleRange=new L.Range(S.startLineNumber,this._model.getLineMinColumn(S.startLineNumber),S.endLineNumber,this._model.getLineMaxColumn(S.endLineNumber))}getViewLineRenderingData(E){return this._model.getViewportViewLineRenderingData(this.visibleRange,E)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=k}),define(se[86],oe([1,0,13,11,5]),function(te,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,r,u,f){this._viewportBrand=void 0,this.top=t|0,this.left=r|0,this.width=u|0,this.height=f|0}}e.Viewport=E;class S{constructor(t,r){this.tabSize=t,this.data=r}}e.MinimapLinesRenderingData=S;class p{constructor(t,r,u,f,c,d,s){this._viewLineDataBrand=void 0,this.content=t,this.continuesWithWrappedLine=r,this.minColumn=u,this.maxColumn=f,this.startVisibleColumn=c,this.tokens=d,this.inlineDecorations=s}}e.ViewLineData=p;class _{constructor(t,r,u,f,c,d,s,l,o,g){this.minColumn=t,this.maxColumn=r,this.content=u,this.continuesWithWrappedLine=f,this.isBasicASCII=_.isBasicASCII(u,d),this.containsRTL=_.containsRTL(u,this.isBasicASCII,c),this.tokens=s,this.inlineDecorations=l,this.tabSize=o,this.startVisibleColumn=g}static isBasicASCII(t,r){return r?k.isBasicASCII(t):!0}static containsRTL(t,r,u){return!r&&u?k.containsRTL(t):!1}}e.ViewLineRenderingData=_;class v{constructor(t,r,u){this.range=t,this.inlineClassName=r,this.type=u}}e.InlineDecoration=v;class b{constructor(t,r,u,f){this.startOffset=t,this.endOffset=r,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 a{constructor(t,r){this._viewModelDecorationBrand=void 0,this.range=t,this.options=r}}e.ViewModelDecoration=a;class i{constructor(t,r,u){this.color=t,this.zIndex=r,this.data=u}static compareByRenderingProps(t,r){return t.zIndex===r.zIndex?t.color<r.color?-1:t.color>r.color?1:0:t.zIndex-r.zIndex}static equals(t,r){return t.color===r.color&&t.zIndex===r.zIndex&&L.equals(t.data,r.data)}static equalsArr(t,r){return L.equals(t,r,i.equals)}}e.OverviewRulerDecorationsGroup=i}),define(se[546],oe([1,0,41]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginLanesModel=void 0;const k=L.GlyphMarginLane.Right;class y{constructor(S){this.persist=0,this._requiredLanes=1,this.lanes=new Uint8Array(Math.ceil((S+1)*k/8))}reset(S){const p=Math.ceil((S+1)*k/8);this.lanes.length<p?this.lanes=new Uint8Array(p):this.lanes.fill(0),this._requiredLanes=1}get requiredLanes(){return this._requiredLanes}push(S,p,_){_&&(this.persist|=1<<S-1);for(let v=p.startLineNumber;v<=p.endLineNumber;v++){const b=k*v+(S-1);this.lanes[b>>>3]|=1<<b%8,this._requiredLanes=Math.max(this._requiredLanes,this.countAtLine(v))}}getLanesAtLine(S){const p=[];let _=k*S;for(let v=0;v<k;v++)(this.persist&1<<v||this.lanes[_>>>3]&1<<_%8)&&p.push(v+1),_++;return p.length?p:[L.GlyphMarginLane.Center]}countAtLine(S){let p=k*S,_=0;for(let v=0;v<k;v++)(this.persist&1<<v||this.lanes[p>>>3]&1<<p%8)&&_++,p++;return _}}e.GlyphMarginLanesModel=y}),define(se[547],oe([1,0,94,10,114,86]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function S(n,t){return n===null?t?_.INSTANCE:v.INSTANCE:new p(n,t)}e.createModelLineProjection=S;class p{constructor(t,r){this._projectionData=t,this._isVisible=r}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,r,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 s=this._projectionData.injectionOffsets.map((o,g)=>new y.LineInjectedText(0,0,o+1,this._projectionData.injectionOptions[g],0));d=y.LineInjectedText.applyInjectedText(t.getLineContent(r),s).substring(f,c)}else d=t.getValueInRange({startLineNumber:r,startColumn:f+1,endLineNumber:r,endColumn:c+1});return u>0&&(d=a(this._projectionData.wrappedTextIndentLength)+d),d}getViewLineLength(t,r,u){return this._assertVisible(),this._projectionData.getLineLength(u)}getViewLineMinColumn(t,r,u){return this._assertVisible(),this._projectionData.getMinOutputOffset(u)+1}getViewLineMaxColumn(t,r,u){return this._assertVisible(),this._projectionData.getMaxOutputOffset(u)+1}getViewLineData(t,r,u){const f=new Array;return this.getViewLinesData(t,r,u,1,0,[!0],f),f[0]}getViewLinesData(t,r,u,f,c,d,s){this._assertVisible();const l=this._projectionData,o=l.injectionOffsets,g=l.injectionOptions;let h=null;if(o){h=[];let C=0,w=0;for(let D=0;D<l.getOutputLineCount();D++){const I=new Array;h[D]=I;const T=D>0?l.breakOffsets[D-1]:0,A=l.breakOffsets[D];for(;w<o.length;){const P=g[w].content.length,N=o[w]+C,M=N+P;if(N>A)break;if(T<M){const R=g[w];if(R.inlineClassName){const x=D>0?l.wrappedTextIndentLength:0,O=x+Math.max(N-T,0),B=x+Math.min(M-T,A-T);O!==B&&I.push(new E.SingleLineInlineDecoration(O,B,R.inlineClassName,R.inlineClassNameAffectsLetterSpacing))}}if(M<=A)C+=P,w++;else break}}}let m;o?m=t.tokenization.getLineTokens(r).withInserted(o.map((C,w)=>({offset:C,text:g[w].content,tokenMetadata:L.LineTokens.defaultTokenMetadata}))):m=t.tokenization.getLineTokens(r);for(let C=u;C<u+f;C++){const w=c+C-u;if(!d[w]){s[w]=null;continue}s[w]=this._getViewLineData(m,h?h[C]:null,C)}}_getViewLineData(t,r,u){this._assertVisible();const f=this._projectionData,c=u>0?f.wrappedTextIndentLength:0,d=u>0?f.breakOffsets[u-1]:0,s=f.breakOffsets[u],l=t.sliceAndInflate(d,s,c);let o=l.getLineContent();u>0&&(o=a(f.wrappedTextIndentLength)+o);const g=this._projectionData.getMinOutputOffset(u)+1,h=o.length+1,m=u+1<this.getViewLineCount(),C=u===0?0:f.breakOffsetsVisibleColumn[u-1];return new E.ViewLineData(o,m,g,h,C,l,r)}getModelColumnOfViewPosition(t,r){return this._assertVisible(),this._projectionData.translateToInputOffset(t,r-1)+1}getViewPositionOfModelPosition(t,r,u=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(r-1,u).toPosition(t)}getViewLineNumberOfModelPosition(t,r){this._assertVisible();const u=this._projectionData.translateToOutputPosition(r-1);return t+u.outputLineIndex}normalizePosition(t,r,u){const f=r.lineNumber-t;return this._projectionData.normalizeOutputPosition(t,r.column-1,u).toPosition(f)}getInjectedTextAt(t,r){return this._projectionData.getInjectedText(t,r-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class _{constructor(){}isVisible(){return!0}setVisible(t){return t?this:v.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(t,r,u){return t.getLineContent(r)}getViewLineLength(t,r,u){return t.getLineLength(r)}getViewLineMinColumn(t,r,u){return t.getLineMinColumn(r)}getViewLineMaxColumn(t,r,u){return t.getLineMaxColumn(r)}getViewLineData(t,r,u){const f=t.tokenization.getLineTokens(r),c=f.getLineContent();return new E.ViewLineData(c,!1,1,c.length+1,0,f.inflate(),null)}getViewLinesData(t,r,u,f,c,d,s){if(!d[c]){s[c]=null;return}s[c]=this.getViewLineData(t,r,0)}getModelColumnOfViewPosition(t,r){return r}getViewPositionOfModelPosition(t,r){return new k.Position(t,r)}getViewLineNumberOfModelPosition(t,r){return t}normalizePosition(t,r,u){return r}getInjectedTextAt(t,r){return null}}_.INSTANCE=new _;class v{constructor(){}isVisible(){return!1}setVisible(t){return t?_.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(t,r,u){throw new Error("Not supported")}getViewLineLength(t,r,u){throw new Error("Not supported")}getViewLineMinColumn(t,r,u){throw new Error("Not supported")}getViewLineMaxColumn(t,r,u){throw new Error("Not supported")}getViewLineData(t,r,u){throw new Error("Not supported")}getViewLinesData(t,r,u,f,c,d,s){throw new Error("Not supported")}getModelColumnOfViewPosition(t,r){throw new Error("Not supported")}getViewPositionOfModelPosition(t,r){throw new Error("Not supported")}getViewLineNumberOfModelPosition(t,r){throw new Error("Not supported")}normalizePosition(t,r,u){throw new Error("Not supported")}getInjectedTextAt(t,r){throw new Error("Not supported")}}v.INSTANCE=new v;const b=[""];function a(n){if(n>=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(se[548],oe([1,0,11,128,114,294]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class S{static create(f){return new S(f.get(132),f.get(131))}constructor(f,c){this.classifier=new p(f,c)}createLineBreaksComputer(f,c,d,s,l){const o=[],g=[],h=[];return{addRequest:(m,C,w)=>{o.push(m),g.push(C),h.push(w)},finalize:()=>{const m=f.typicalFullwidthCharacterWidth/f.typicalHalfwidthCharacterWidth,C=[];for(let w=0,D=o.length;w<D;w++){const I=g[w],T=h[w];T&&!T.injectionOptions&&!I?C[w]=b(this.classifier,T,o[w],c,d,m,s,l):C[w]=a(this.classifier,o[w],I,c,d,m,s,l)}return _.length=0,v.length=0,C}}}}e.MonospaceLineBreaksComputerFactory=S;class p extends k.CharacterClassifier{constructor(f,c){super(0);for(let d=0;d<f.length;d++)this.set(f.charCodeAt(d),1);for(let d=0;d<c.length;d++)this.set(c.charCodeAt(d),2)}get(f){return f>=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 _=[],v=[];function b(u,f,c,d,s,l,o,g){if(s===-1)return null;const h=c.length;if(h<=1)return null;const m=g==="keepAll",C=f.breakOffsets,w=f.breakOffsetsVisibleColumn,D=r(c,d,s,l,o),I=s-D,T=_,A=v;let P=0,N=0,M=0,R=s;const x=C.length;let O=0;if(O>=0){let B=Math.abs(w[O]-R);for(;O+1<x;){const W=Math.abs(w[O+1]-R);if(W>=B)break;B=W,O++}}for(;O<x;){let B=O<0?0:C[O],W=O<0?0:w[O];N>B&&(B=N,W=M);let V=0,K=0,F=0,q=0;if(W<=R){let ae=W,ne=B===0?0:c.charCodeAt(B-1),$=B===0?0:u.get(ne),J=!0;for(let Q=B;Q<h;Q++){const re=Q,de=c.charCodeAt(Q);let he,me;if(L.isHighSurrogate(de)?(Q++,he=0,me=2):(he=u.get(de),me=i(de,ae,d,l)),re>N&&t(ne,$,de,he,m)&&(V=re,K=ae),ae+=me,ae>R){re>N?(F=re,q=ae-me):(F=Q+1,q=ae),ae-K>I&&(V=0),J=!1;break}ne=de,$=he}if(J){P>0&&(T[P]=C[C.length-1],A[P]=w[C.length-1],P++);break}}if(V===0){let ae=W,ne=c.charCodeAt(B),$=u.get(ne),J=!1;for(let Q=B-1;Q>=N;Q--){const re=Q+1,de=c.charCodeAt(Q);if(de===9){J=!0;break}let he,me;if(L.isLowSurrogate(de)?(Q--,he=0,me=2):(he=u.get(de),me=L.isFullWidthCharacter(de)?l:1),ae<=R){if(F===0&&(F=re,q=ae),ae<=R-I)break;if(t(de,he,ne,$,m)){V=re,K=ae;break}}ae-=me,ne=de,$=he}if(V!==0){const Q=I-(q-K);if(Q<=d){const re=c.charCodeAt(F);let de;L.isHighSurrogate(re)?de=2:de=i(re,q,d,l),Q-de<0&&(V=0)}}if(J){O--;continue}}if(V===0&&(V=F,K=q),V<=N){const ae=c.charCodeAt(N);L.isHighSurrogate(ae)?(V=N+2,K=M+2):(V=N+1,K=M+i(ae,M,d,l))}for(N=V,T[P]=V,M=K,A[P]=K,P++,R=K+I;O<0||O<x&&w[O]<K;)O++;let ie=Math.abs(w[O]-R);for(;O+1<x;){const ae=Math.abs(w[O+1]-R);if(ae>=ie)break;ie=ae,O++}}return P===0?null:(T.length=P,A.length=P,_=f.breakOffsets,v=f.breakOffsetsVisibleColumn,f.breakOffsets=T,f.breakOffsetsVisibleColumn=A,f.wrappedTextIndentLength=D,f)}function a(u,f,c,d,s,l,o,g){const h=y.LineInjectedText.applyInjectedText(f,c);let m,C;if(c&&c.length>0?(m=c.map(K=>K.options),C=c.map(K=>K.column-1)):(m=null,C=null),s===-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=r(h,d,s,l,o),T=s-I,A=[],P=[];let N=0,M=0,R=0,x=s,O=h.charCodeAt(0),B=u.get(O),W=i(O,0,d,l),V=1;L.isHighSurrogate(O)&&(W+=1,O=h.charCodeAt(1),B=u.get(O),V++);for(let K=V;K<w;K++){const F=K,q=h.charCodeAt(K);let ie,ae;L.isHighSurrogate(q)?(K++,ie=0,ae=2):(ie=u.get(q),ae=i(q,W,d,l)),t(O,B,q,ie,D)&&(M=F,R=W),W+=ae,W>x&&((M===0||W-R>T)&&(M=F,R=W-ae),A[N]=M,P[N]=R,N++,x=R+T,M=0),O=q,B=ie}return N===0&&(!c||c.length===0)?null:(A[N]=w,P[N]=W,new E.ModelLineProjectionData(C,m,A,P,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,s){return c!==32&&(f===2&&d!==2||f!==1&&d===1||!s&&f===3&&d!==2||!s&&d===3&&f!==1)}function r(u,f,c,d,s){let l=0;if(s!==0){const o=L.firstNonWhitespaceIndex(u);if(o!==-1){for(let h=0;h<o;h++){const m=u.charCodeAt(h)===9?n(l,f):1;l+=m}const g=s===3?2:s===2?1:0;for(let h=0;h<g;h++){const m=n(l,f);l+=m}l+d>c&&(l=0)}}return l}}),define(se[300],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class L{constructor(S,p,_){this._colorZoneBrand=void 0,this.from=S|0,this.to=p|0,this.colorId=_|0}static compare(S,p){return S.colorId===p.colorId?S.from===p.from?S.to-p.to:S.from-p.from:S.colorId-p.colorId}}e.ColorZone=L;class k{constructor(S,p,_,v){this._overviewRulerZoneBrand=void 0,this.startLineNumber=S,this.endLineNumber=p,this.heightInLines=_,this.color=v,this._colorZone=null}static compare(S,p){return S.color===p.color?S.startLineNumber===p.startLineNumber?S.heightInLines===p.heightInLines?S.endLineNumber-p.endLineNumber:S.heightInLines-p.heightInLines:S.startLineNumber-p.startLineNumber:S.color<p.color?-1:1}setColorZone(S){this._colorZone=S}getColorZones(){return this._colorZone}}e.OverviewRulerZone=k;class y{constructor(S){this._getVerticalOffsetForLine=S,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(S){this._zones=S,this._zones.sort(k.compare)}setLineHeight(S){return this._lineHeight===S?!1:(this._lineHeight=S,this._colorZonesInvalid=!0,!0)}setPixelRatio(S){this._pixelRatio=S,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(S){return this._domWidth===S?!1:(this._domWidth=S,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(S){return this._domHeight===S?!1:(this._domHeight=S,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(S){return this._outerHeight===S?!1:(this._outerHeight=S,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const S=this._colorZonesInvalid,p=Math.floor(this._lineHeight),_=Math.floor(this.getCanvasHeight()),v=Math.floor(this._outerHeight),b=_/v,a=Math.floor(4*this._pixelRatio/2),i=[];for(let n=0,t=this._zones.length;n<t;n++){const r=this._zones[n];if(!S){const m=r.getColorZones();if(m){i.push(m);continue}}const u=this._getVerticalOffsetForLine(r.startLineNumber),f=r.heightInLines===0?this._getVerticalOffsetForLine(r.endLineNumber)+p:u+r.heightInLines*p,c=Math.floor(b*u),d=Math.floor(b*f);let s=Math.floor((c+d)/2),l=d-s;l<a&&(l=a),s-l<0&&(s=l),s+l>_&&(s=_-l);const o=r.color;let g=this._color2Id[o];g||(g=++this._lastAssignedId,this._color2Id[o]=g,this._id2Color[g]=o);const h=new L(s-l,s+l,g);r.setColorZone(h),i.push(h)}return this._colorZonesInvalid=!1,i.sort(L.compare),i}}e.OverviewZoneManager=y}),define(se[549],oe([1,0,40,300,154]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class E extends y.ViewEventHandler{constructor(p,_){super(),this._context=p;const v=this._context.configuration.options;this._domNode=(0,L.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(_),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 _=this._context.configuration.options;return p.hasChanged(66)&&(this._zoneManager.setLineHeight(_.get(66)),this._render()),p.hasChanged(141)&&(this._zoneManager.setPixelRatio(_.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 _=!1;_=this._zoneManager.setDOMWidth(p.width)||_,_=this._zoneManager.setDOMHeight(p.height)||_,_&&(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(),_=this._zoneManager.getCanvasHeight(),v=this._zoneManager.resolveColorZones(),b=this._zoneManager.getId2Color(),a=this._domNode.domNode.getContext("2d");return a.clearRect(0,0,p,_),v.length>0&&this._renderOneLane(a,v,b,p),!0}_renderOneLane(p,_,v,b){let a=0,i=0,n=0;for(const t of _){const r=t.colorId,u=t.from,f=t.to;r!==a?(p.fillRect(0,i,b,n-i),a=r,p.fillStyle=v[a],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(se[550],oe([1,0,508]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class k{constructor(E,S,p){this.configuration=E,this.theme=new L.EditorTheme(S),this.viewModel=p,this.viewLayout=p.viewLayout}addEventHandler(E){this.viewModel.addViewEventHandler(E)}removeEventHandler(E){this.viewModel.removeViewEventHandler(E)}}e.ViewContext=k}),define(se[215],oe([1,0,6,2]),function(te,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(s){this._addOutgoingEvent(s),this._emitOutgoingEvents()}_addOutgoingEvent(s){for(let l=0,o=this._outgoingEvents.length;l<o;l++){const g=this._outgoingEvents[l].kind===s.kind?this._outgoingEvents[l].attemptToMerge(s):null;if(g){this._outgoingEvents[l]=g;return}}this._outgoingEvents.push(s)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const s=this._outgoingEvents.shift();s.isNoOp()||this._onEvent.fire(s)}}addViewEventHandler(s){for(let l=0,o=this._eventHandlers.length;l<o;l++)this._eventHandlers[l]===s&&console.warn("Detected duplicate listener in ViewEventDispatcher",s);this._eventHandlers.push(s)}removeViewEventHandler(s){for(let l=0;l<this._eventHandlers.length;l++)if(this._eventHandlers[l]===s){this._eventHandlers.splice(l,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new E),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const s=this._collector.outgoingEvents,l=this._collector.viewEvents;this._collector=null;for(const o of s)this._addOutgoingEvent(o);l.length>0&&this._emitMany(l)}this._emitOutgoingEvents()}emitSingleViewEvent(s){try{this.beginEmitViewEvents().emitViewEvent(s)}finally{this.endEmitViewEvents()}}_emitMany(s){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(s):this._viewEventQueue=s,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const s=this._viewEventQueue;this._viewEventQueue=null;const l=this._eventHandlers.slice(0);for(const o of l)o.handleEvents(s)}}}e.ViewModelEventDispatcher=y;class E{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(s){this.viewEvents.push(s)}emitOutgoingEvent(s){this.outgoingEvents.push(s)}}e.ViewModelEventsCollector=E;class S{constructor(s,l,o,g){this.kind=0,this._oldContentWidth=s,this._oldContentHeight=l,this.contentWidth=o,this.contentHeight=g,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(s){return s.kind!==this.kind?null:new S(this._oldContentWidth,this._oldContentHeight,s.contentWidth,s.contentHeight)}}e.ContentSizeChangedEvent=S;class p{constructor(s,l){this.kind=1,this.oldHasFocus=s,this.hasFocus=l}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(s){return s.kind!==this.kind?null:new p(this.oldHasFocus,s.hasFocus)}}e.FocusChangedEvent=p;class _{constructor(s,l,o,g,h,m,C,w){this.kind=2,this._oldScrollWidth=s,this._oldScrollLeft=l,this._oldScrollHeight=o,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(s){return s.kind!==this.kind?null:new _(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,s.scrollWidth,s.scrollLeft,s.scrollHeight,s.scrollTop)}}e.ScrollChangedEvent=_;class v{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(s){return s.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=v;class b{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(s){return s.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=b;class a{constructor(s,l,o,g,h,m,C){this.kind=6,this.oldSelections=s,this.selections=l,this.oldModelVersionId=o,this.modelVersionId=g,this.source=h,this.reason=m,this.reachedMaxCursorCount=C}static _selectionsAreEqual(s,l){if(!s&&!l)return!0;if(!s||!l)return!1;const o=s.length,g=l.length;if(o!==g)return!1;for(let h=0;h<o;h++)if(!s[h].equalsSelection(l[h]))return!1;return!0}isNoOp(){return a._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(s){return s.kind!==this.kind?null:new a(this.oldSelections,s.selections,this.oldModelVersionId,s.modelVersionId,s.source,s.reason,this.reachedMaxCursorCount||s.reachedMaxCursorCount)}}e.CursorStateChangedEvent=a;class i{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(s){return s.kind!==this.kind?null:this}}e.ReadOnlyEditAttemptEvent=i;class n{constructor(s){this.event=s,this.kind=7}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelDecorationsChangedEvent=n;class t{constructor(s){this.event=s,this.kind=8}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelLanguageChangedEvent=t;class r{constructor(s){this.event=s,this.kind=9}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelLanguageConfigurationChangedEvent=r;class u{constructor(s){this.event=s,this.kind=10}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelContentChangedEvent=u;class f{constructor(s){this.event=s,this.kind=11}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelOptionsChangedEvent=f;class c{constructor(s){this.event=s,this.kind=12}isNoOp(){return!1}attemptToMerge(s){return null}}e.ModelTokensChangedEvent=c}),define(se[551],oe([1,0,6,2,147,544,86,215]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const _=125;class v{constructor(n,t,r,u){n=n|0,t=t|0,r=r|0,u=u|0,n<0&&(n=0),t<0&&(t=0),r<0&&(r=0),u<0&&(u=0),this.width=n,this.contentWidth=t,this.scrollWidth=Math.max(n,t),this.height=r,this.contentHeight=u,this.scrollHeight=Math.max(r,u)}equals(n){return this.width===n.width&&this.contentWidth===n.contentWidth&&this.height===n.height&&this.contentHeight===n.contentHeight}}class b extends k.Disposable{constructor(n,t){super(),this._onDidContentSizeChange=this._register(new L.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new v(0,0,0,0),this._scrollable=this._register(new y.Scrollable({forceIntegerValues:!0,smoothScrollDuration:n,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(n){this._scrollable.setSmoothScrollDuration(n)}validateScrollPosition(n){return this._scrollable.validateScrollPosition(n)}getScrollDimensions(){return this._dimensions}setScrollDimensions(n){if(this._dimensions.equals(n))return;const t=this._dimensions;this._dimensions=n,this._scrollable.setScrollDimensions({width:n.width,scrollWidth:n.scrollWidth,height:n.height,scrollHeight:n.scrollHeight},!0);const r=t.contentWidth!==n.contentWidth,u=t.contentHeight!==n.contentHeight;(r||u)&&this._onDidContentSizeChange.fire(new p.ContentSizeChangedEvent(t.contentWidth,t.contentHeight,n.contentWidth,n.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(n){this._scrollable.setScrollPositionNow(n)}setScrollPositionSmooth(n){this._scrollable.setScrollPositionSmooth(n)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}}class a extends k.Disposable{constructor(n,t,r){super(),this._configuration=n;const u=this._configuration.options,f=u.get(143),c=u.get(83);this._linesLayout=new E.LinesLayout(t,u.get(66),c.top,c.bottom),this._maxLineWidth=0,this._overlayWidgetsMinWidth=0,this._scrollable=this._register(new b(0,r)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new v(f.contentWidth,0,f.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(113)?_:0)}onConfigurationChanged(n){const t=this._configuration.options;if(n.hasChanged(66)&&this._linesLayout.setLineHeight(t.get(66)),n.hasChanged(83)){const r=t.get(83);this._linesLayout.setPadding(r.top,r.bottom)}if(n.hasChanged(143)){const r=t.get(143),u=r.contentWidth,f=r.height,c=this._scrollable.getScrollDimensions(),d=c.contentWidth;this._scrollable.setScrollDimensions(new v(u,c.contentWidth,f,this._getContentHeight(u,f,d)))}else this._updateHeight();n.hasChanged(113)&&this._configureSmoothScrollDuration()}onFlushed(n){this._linesLayout.onFlushed(n)}onLinesDeleted(n,t){this._linesLayout.onLinesDeleted(n,t)}onLinesInserted(n,t){this._linesLayout.onLinesInserted(n,t)}_getHorizontalScrollbarHeight(n,t){const u=this._configuration.options.get(102);return u.horizontal===2||n>=t?0:u.horizontalScrollbarSize}_getContentHeight(n,t,r){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,r)),f}_updateHeight(){const n=this._scrollable.getScrollDimensions(),t=n.width,r=n.height,u=n.contentWidth;this._scrollable.setScrollDimensions(new v(t,n.contentWidth,r,this._getContentHeight(t,r,u)))}getCurrentViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new S.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}getFutureViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new S.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}_computeContentWidth(){const n=this._configuration.options,t=this._maxLineWidth,r=n.get(144),u=n.get(50),f=n.get(143);if(r.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,r=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),u=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(r);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 r=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:r.scrollLeft+n,scrollTop:r.scrollTop+t})}}e.ViewLayout=a}),define(se[552],oe([1,0,5,24]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class y{constructor(S,p){this._selection=S,this._isMovingLeft=p}getEditOperations(S,p){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const _=this._selection.startLineNumber,v=this._selection.startColumn,b=this._selection.endColumn;if(!(this._isMovingLeft&&v===1)&&!(!this._isMovingLeft&&b===S.getLineMaxColumn(_)))if(this._isMovingLeft){const a=new L.Range(_,v-1,_,v),i=S.getValueInRange(a);p.addEditOperation(a,null),p.addEditOperation(new L.Range(_,b,_,b),i)}else{const a=new L.Range(_,b,_,b+1),i=S.getValueInRange(a);p.addEditOperation(a,null),p.addEditOperation(new L.Range(_,v,_,v),i)}}computeCursorState(S,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(se[116],oe([1,0,12]),function(te,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(a){this.value=a}equals(a){return this.value===a.value}contains(a){return this.equals(a)||this.value===""||a.value.startsWith(this.value+k.sep)}intersects(a){return this.contains(a)||a.contains(this)}append(a){return new k(this.value+k.sep+a)}}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,a){return!(b.include&&!b.include.intersects(a)||b.excludes&&b.excludes.some(i=>p(a,i,b.include))||!b.includeSourceActions&&k.Source.contains(a))}e.mayIncludeActionsOfKind=E;function S(b,a){const i=a.kind?new k(a.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&&!a.isPreferred)}e.filtersAction=S;function p(b,a,i){return!(!a.contains(b)||i&&a.contains(i))}class _{static fromUser(a,i){return!a||typeof a!="object"?new _(i.kind,i.apply,!1):new _(_.getKindFromUser(a,i.kind),_.getApplyFromUser(a,i.apply),_.getPreferredUser(a))}static getApplyFromUser(a,i){switch(typeof a.apply=="string"?a.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(a,i){return typeof a.kind=="string"?new k(a.kind):i}static getPreferredUser(a){return typeof a.preferred=="boolean"?a.preferred:!1}constructor(a,i,n){this.kind=a,this.apply=i,this.preferred=n}}e.CodeActionCommandArgs=_;class v{constructor(a,i,n){this.action=a,this.provider=i,this.highlightRange=n}async resolve(a){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,a)}catch(t){(0,L.onUnexpectedExternalError)(t)}n&&(this.action.edit=n.edit)}return this}}e.CodeActionItem=v}),define(se[553],oe([1,0,6]),function(te,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,S,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=S}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(E,S){let p=-1;for(let _=0;_<this.colorPresentations.length;_++)if(S.toLowerCase()===this.colorPresentations[_].label){p=_;break}if(p===-1){const _=S.split("(")[0].toLowerCase();for(let v=0;v<this.colorPresentations.length;v++)if(this.colorPresentations[v].label.toLowerCase().startsWith(_)){p=v;break}}p!==-1&&p!==this.presentationIndex&&(this.presentationIndex=p,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=k}),define(se[301],oe([1,0,74,10,5,24]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class S{constructor(_,v,b){this.languageConfigurationService=b,this._selection=_,this._insertSpace=v,this._usedEndToken=null}static _haystackHasNeedleAtOffset(_,v,b){if(b<0)return!1;const a=v.length,i=_.length;if(b+a>i)return!1;for(let n=0;n<a;n++){const t=_.charCodeAt(b+n),r=v.charCodeAt(n);if(t!==r&&!(t>=65&&t<=90&&t+32===r)&&!(r>=65&&r<=90&&r+32===t))return!1}return!0}_createOperationsForBlockComment(_,v,b,a,i,n){const t=_.startLineNumber,r=_.startColumn,u=_.endLineNumber,f=_.endColumn,c=i.getLineContent(t),d=i.getLineContent(u);let s=c.lastIndexOf(v,r-1+v.length),l=d.indexOf(b,f-1-b.length);if(s!==-1&&l!==-1)if(t===u)c.substring(s+v.length,l).indexOf(b)>=0&&(s=-1,l=-1);else{const g=c.substring(s+v.length),h=d.substring(0,l);(g.indexOf(b)>=0||h.indexOf(b)>=0)&&(s=-1,l=-1)}let o;s!==-1&&l!==-1?(a&&s+v.length<c.length&&c.charCodeAt(s+v.length)===32&&(v=v+" "),a&&l>0&&d.charCodeAt(l-1)===32&&(b=" "+b,l-=1),o=S._createRemoveBlockCommentOperations(new y.Range(t,s+v.length+1,u,l+1),v,b)):(o=S._createAddBlockCommentOperations(_,v,b,this._insertSpace),this._usedEndToken=o.length===1?b:null);for(const g of o)n.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(_,v,b){const a=[];return y.Range.isEmpty(_)?a.push(L.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-v.length,_.endLineNumber,_.endColumn+b.length))):(a.push(L.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-v.length,_.startLineNumber,_.startColumn))),a.push(L.EditOperation.delete(new y.Range(_.endLineNumber,_.endColumn,_.endLineNumber,_.endColumn+b.length)))),a}static _createAddBlockCommentOperations(_,v,b,a){const i=[];return y.Range.isEmpty(_)?i.push(L.EditOperation.replace(new y.Range(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn),v+" "+b)):(i.push(L.EditOperation.insert(new k.Position(_.startLineNumber,_.startColumn),v+(a?" ":""))),i.push(L.EditOperation.insert(new k.Position(_.endLineNumber,_.endColumn),(a?" ":"")+b))),i}getEditOperations(_,v){const b=this._selection.startLineNumber,a=this._selection.startColumn;_.tokenization.tokenizeIfCheap(b);const i=_.getLanguageIdAtPosition(b,a),n=this.languageConfigurationService.getLanguageConfiguration(i).comments;!n||!n.blockCommentStartToken||!n.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,n.blockCommentStartToken,n.blockCommentEndToken,this._insertSpace,_,v)}computeCursorState(_,v){const b=v.getInverseEditOperations();if(b.length===2){const a=b[0],i=b[1];return new E.Selection(a.range.endLineNumber,a.range.endColumn,i.range.startLineNumber,i.range.startColumn)}else{const a=b[0].range,i=this._usedEndToken?-this._usedEndToken.length-1:0;return new E.Selection(a.endLineNumber,a.endColumn+i,a.endLineNumber,a.endColumn+i)}}}e.BlockCommentCommand=S}),define(se[554],oe([1,0,11,74,10,5,24,301]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class _{constructor(b,a,i,n,t,r,u){this.languageConfigurationService=b,this._selection=a,this._tabSize=i,this._type=n,this._insertSpace=t,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=u||!1}static _gatherPreflightCommentStrings(b,a,i,n){b.tokenization.tokenizeIfCheap(a);const t=b.getLanguageIdAtPosition(a,1),r=n.getLanguageConfiguration(t).comments,u=r?r.lineCommentToken:null;if(!u)return null;const f=[];for(let c=0,d=i-a+1;c<d;c++)f[c]={ignore:!1,commentStr:u,commentStrOffset:0,commentStrLength:u.length};return f}static _analyzeLines(b,a,i,n,t,r,u,f){let c=!0,d;b===0?d=!0:b===1?d=!1:d=!0;for(let s=0,l=n.length;s<l;s++){const o=n[s],g=t+s;if(g===t&&u){o.ignore=!0;continue}const h=i.getLineContent(g),m=L.firstNonWhitespaceIndex(h);if(m===-1){o.ignore=r,o.commentStrOffset=h.length;continue}if(c=!1,o.ignore=!1,o.commentStrOffset=m,d&&!p.BlockCommentCommand._haystackHasNeedleAtOffset(h,o.commentStr,m)&&(b===0?d=!1:b===1||(o.ignore=!0)),d&&a){const C=m+o.commentStrLength;C<h.length&&h.charCodeAt(C)===32&&(o.commentStrLength+=1)}}if(b===0&&c){d=!1;for(let s=0,l=n.length;s<l;s++)n[s].ignore=!1}return{supported:!0,shouldRemoveComments:d,lines:n}}static _gatherPreflightData(b,a,i,n,t,r,u,f){const c=_._gatherPreflightCommentStrings(i,n,t,f);return c===null?{supported:!1}:_._analyzeLines(b,a,i,c,n,r,u,f)}_executeLineComments(b,a,i,n){let t;i.shouldRemoveComments?t=_._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(_._normalizeInsertionPoint(b,i.lines,n.startLineNumber,this._tabSize),t=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new y.Position(n.positionLineNumber,n.positionColumn);for(let u=0,f=t.length;u<f;u++)a.addEditOperation(t[u].range,t[u].text),E.Range.isEmpty(t[u].range)&&E.Range.getStartPosition(t[u].range).equals(r)&&b.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(t[u].text||"").length);this._selectionId=a.trackSelection(n)}_attemptRemoveBlockComment(b,a,i,n){let t=a.startLineNumber,r=a.endLineNumber;const u=n.length+Math.max(b.getLineFirstNonWhitespaceColumn(a.startLineNumber),a.startColumn);let f=b.getLineContent(t).lastIndexOf(i,u-1),c=b.getLineContent(r).indexOf(n,a.endColumn-1-i.length);return f!==-1&&c===-1&&(c=b.getLineContent(t).indexOf(n,f+i.length),r=t),f===-1&&c!==-1&&(f=b.getLineContent(r).lastIndexOf(i,c),t=r),a.isEmpty()&&(f===-1||c===-1)&&(f=b.getLineContent(t).indexOf(i),f!==-1&&(c=b.getLineContent(t).indexOf(n,f+i.length))),f!==-1&&b.getLineContent(t).charCodeAt(f+i.length)===32&&(i+=" "),c!==-1&&b.getLineContent(r).charCodeAt(c-1)===32&&(n=" "+n,c-=1),f!==-1&&c!==-1?p.BlockCommentCommand._createRemoveBlockCommentOperations(new E.Range(t,f+i.length+1,r,c+1),i,n):null}_executeBlockComment(b,a,i){b.tokenization.tokenizeIfCheap(i.startLineNumber);const n=b.getLanguageIdAtPosition(i.startLineNumber,1),t=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!t||!t.blockCommentStartToken||!t.blockCommentEndToken)return;const r=t.blockCommentStartToken,u=t.blockCommentEndToken;let f=this._attemptRemoveBlockComment(b,i,r,u);if(!f){if(i.isEmpty()){const c=b.getLineContent(i.startLineNumber);let d=L.firstNonWhitespaceIndex(c);d===-1&&(d=c.length),f=p.BlockCommentCommand._createAddBlockCommentOperations(new E.Range(i.startLineNumber,d+1,i.startLineNumber,c.length+1),r,u,this._insertSpace)}else f=p.BlockCommentCommand._createAddBlockCommentOperations(new E.Range(i.startLineNumber,b.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,b.getLineMaxColumn(i.endLineNumber)),r,u,this._insertSpace);f.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=a.trackSelection(i);for(const c of f)a.addEditOperation(c.range,c.text)}getEditOperations(b,a){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){a.addEditOperation(new E.Range(i.startLineNumber,b.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===b.getLineCount()?"":`
|
||
`),this._selectionId=a.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,b.getLineMaxColumn(i.endLineNumber-1)));const n=_._gatherPreflightData(this._type,this._insertSpace,b,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(b,a,n,i):this._executeBlockComment(b,a,i)}computeCursorState(b,a){let i=a.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new S.Selection(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(b,a){const i=[];for(let n=0,t=b.length;n<t;n++){const r=b[n];r.ignore||i.push(k.EditOperation.delete(new E.Range(a+n,r.commentStrOffset+1,a+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(b,a){const i=[],n=this._insertSpace?" ":"";for(let t=0,r=b.length;t<r;t++){const u=b[t];u.ignore||i.push(k.EditOperation.insert(new y.Position(a+t,u.commentStrOffset+1),u.commentStr+n))}return i}static nextVisibleColumn(b,a,i,n){return i?b+(a-b%a):b+n}static _normalizeInsertionPoint(b,a,i,n){let t=1073741824,r,u;for(let f=0,c=a.length;f<c;f++){if(a[f].ignore)continue;const d=b.getLineContent(i+f);let s=0;for(let l=0,o=a[f].commentStrOffset;s<t&&l<o;l++)s=_.nextVisibleColumn(s,n,d.charCodeAt(l)===9,1);s<t&&(t=s)}t=Math.floor(t/n)*n;for(let f=0,c=a.length;f<c;f++){if(a[f].ignore)continue;const d=b.getLineContent(i+f);let s=0;for(r=0,u=a[f].commentStrOffset;s<t&&r<u;r++)s=_.nextVisibleColumn(s,n,d.charCodeAt(r)===9,1);s>t?a[f].commentStrOffset=r-1:a[f].commentStrOffset=r}}}e.LineCommentCommand=_}),define(se[555],oe([1,0,5,24]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class y{constructor(S,p,_){this.selection=S,this.targetPosition=p,this.copy=_,this.targetSelection=null}getEditOperations(S,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),_),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.lineNumber<this.selection.endLineNumber){this.targetSelection=new k.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new k.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new k.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(S,p){return this.targetSelection}}e.DragAndDropCommand=y}),define(se[556],oe([1,0,5]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class k{constructor(E,S,p){this._editorSelection=E,this._ranges=S,this._replaceStrings=p,this._trackedEditorSelectionId=null}getEditOperations(E,S){if(this._ranges.length>0){const p=[];for(let b=0;b<this._ranges.length;b++)p.push({range:this._ranges[b],text:this._replaceStrings[b]});p.sort((b,a)=>L.Range.compareRangesUsingStarts(b.range,a.range));const _=[];let v=p[0];for(let b=1;b<p.length;b++)v.range.endLineNumber===p[b].range.startLineNumber&&v.range.endColumn===p[b].range.startColumn?(v.range=v.range.plusRange(p[b].range),v.text=v.text+p[b].text):(_.push(v),v=p[b]);_.push(v);for(const b of _)S.addEditOperation(b.range,b.text)}this._trackedEditorSelectionId=S.trackSelection(this._editorSelection)}computeCursorState(E,S){return S.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=k}),define(se[557],oe([1,0,406]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;class k{constructor(b){this.staticValue=b,this.kind=0}}class y{constructor(b){this.pieces=b,this.kind=1}}class E{static fromStaticValue(b){return new E([S.staticValue(b)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(b){!b||b.length===0?this._state=new k(""):b.length===1&&b[0].staticValue!==null?this._state=new k(b[0].staticValue):this._state=new y(b)}buildReplaceString(b,a){if(this._state.kind===0)return a?(0,L.buildReplaceStringWithCasePreserved)(b,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,t=this._state.pieces.length;n<t;n++){const r=this._state.pieces[n];if(r.staticValue!==null){i+=r.staticValue;continue}let u=E._substitute(r.matchIndex,b);if(r.caseOps!==null&&r.caseOps.length>0){const f=[],c=r.caseOps.length;let d=0;for(let s=0,l=u.length;s<l;s++){if(d>=c){f.push(u.slice(s));break}switch(r.caseOps[d]){case"U":f.push(u[s].toUpperCase());break;case"u":f.push(u[s].toUpperCase()),d++;break;case"L":f.push(u[s].toLowerCase());break;case"l":f.push(u[s].toLowerCase()),d++;break;default:f.push(u[s])}}u=f.join("")}i+=u}return i}static _substitute(b,a){if(a===null)return"";if(b===0)return a[0];let i="";for(;b>0;){if(b<a.length)return(a[b]||"")+i;i=String(b%10)+i,b=Math.floor(b/10)}return"$"+i}}e.ReplacePattern=E;class S{static staticValue(b){return new S(b,-1,null)}static caseOps(b,a){return new S(null,b,a)}constructor(b,a,i){this.staticValue=b,this.matchIndex=a,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}}e.ReplacePiece=S;class p{constructor(b){this._source=b,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(b){this._emitStatic(this._source.substring(this._lastCharIndex,b)),this._lastCharIndex=b}emitStatic(b,a){this._emitStatic(b),this._lastCharIndex=a}_emitStatic(b){b.length!==0&&(this._currentStaticPiece+=b)}emitMatchIndex(b,a,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=S.caseOps(b,i),this._lastCharIndex=a}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=S.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new E(this._result)}}function _(v){if(!v||v.length===0)return new E(null);const b=[],a=new p(v);for(let i=0,n=v.length;i<n;i++){const t=v.charCodeAt(i);if(t===92){if(i++,i>=n)break;const r=v.charCodeAt(i);switch(r){case 92:a.emitUnchanged(i-1),a.emitStatic("\\",i+1);break;case 110:a.emitUnchanged(i-1),a.emitStatic(`
|
||
`,i+1);break;case 116:a.emitUnchanged(i-1),a.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:a.emitUnchanged(i-1),a.emitStatic("",i+1),b.push(String.fromCharCode(r));break}continue}if(t===36){if(i++,i>=n)break;const r=v.charCodeAt(i);if(r===36){a.emitUnchanged(i-1),a.emitStatic("$",i+1);continue}if(r===48||r===38){a.emitUnchanged(i-1),a.emitMatchIndex(0,i+1,b),b.length=0;continue}if(49<=r&&r<=57){let u=r-48;if(i+1<n){const f=v.charCodeAt(i+1);if(48<=f&&f<=57){i++,u=u*10+(f-48),a.emitUnchanged(i-2),a.emitMatchIndex(u,i+1,b),b.length=0;continue}}a.emitUnchanged(i-1),a.emitMatchIndex(u,i+1,b),b.length=0;continue}}}return a.finalize()}e.parseReplaceString=_}),define(se[185],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=e.foldSourceAbbr=void 0,e.foldSourceAbbr={[0]:" ",[1]:"u",[2]:"r"},e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const L=4278190080;class k{constructor(p){const _=Math.ceil(p/32);this._states=new Uint32Array(_)}get(p){const _=p/32|0,v=p%32;return(this._states[_]&1<<v)!==0}set(p,_){const v=p/32|0,b=p%32,a=this._states[v];_?this._states[v]=a|1<<b:this._states[v]=a&~(1<<b)}}class y{constructor(p,_,v){if(p.length!==_.length||p.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=p,this._endIndexes=_,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=[],_=(v,b)=>{const a=p[p.length-1];return this.getStartLineNumber(a)<=v&&this.getEndLineNumber(a)>=b};for(let v=0,b=this._startIndexes.length;v<b;v++){const a=this._startIndexes[v],i=this._endIndexes[v];if(a>e.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&&!_(a,i);)p.pop();const n=p.length>0?p[p.length-1]:-1;p.push(v),this._startIndexes[v]=a+((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,_){this._collapseStates.set(p,_)}isUserDefined(p){return this._userDefinedStates.get(p)}setUserDefined(p,_){return this._userDefinedStates.set(p,_)}isRecovered(p){return this._recoveredStates.get(p)}setRecovered(p,_){return this._recoveredStates.set(p,_)}getSource(p){return this.isUserDefined(p)?1:this.isRecovered(p)?2:0}setSource(p,_){_===1?(this.setUserDefined(p,!0),this.setRecovered(p,!1)):_===2?(this.setUserDefined(p,!1),this.setRecovered(p,!0)):(this.setUserDefined(p,!1),this.setRecovered(p,!1))}setCollapsedAllOfType(p,_){let v=!1;if(this._types)for(let b=0;b<this._types.length;b++)this._types[b]===p&&(this.setCollapsed(b,_),v=!0);return v}toRegion(p){return new E(this,p)}getParentIndex(p){this.ensureParentIndices();const _=((this._startIndexes[p]&L)>>>24)+((this._endIndexes[p]&L)>>>16);return _===e.MAX_FOLDING_REGIONS?-1:_}contains(p,_){return this.getStartLineNumber(p)<=_&&this.getEndLineNumber(p)>=_}findIndex(p){let _=0,v=this._startIndexes.length;if(v===0)return-1;for(;_<v;){const b=Math.floor((_+v)/2);p<this.getStartLineNumber(b)?v=b:_=b+1}return _-1}findRange(p){let _=this.findIndex(p);if(_>=0){if(this.getEndLineNumber(_)>=p)return _;for(_=this.getParentIndex(_);_!==-1;){if(this.contains(_,p))return _;_=this.getParentIndex(_)}}return-1}toString(){const p=[];for(let _=0;_<this.length;_++)p[_]=`[${e.foldSourceAbbr[this.getSource(_)]}${this.isCollapsed(_)?"+":"-"}] ${this.getStartLineNumber(_)}/${this.getEndLineNumber(_)}`;return p.join(", ")}toFoldRange(p){return{startLineNumber:this._startIndexes[p]&e.MAX_LINE_NUMBER,endLineNumber:this._endIndexes[p]&e.MAX_LINE_NUMBER,type:this._types?this._types[p]:void 0,isCollapsed:this.isCollapsed(p),source:this.getSource(p)}}static fromFoldRanges(p){const _=p.length,v=new Uint32Array(_),b=new Uint32Array(_);let a=[],i=!1;for(let t=0;t<_;t++){const r=p[t];v[t]=r.startLineNumber,b[t]=r.endLineNumber,a.push(r.type),r.type&&(i=!0)}i||(a=void 0);const n=new y(v,b,a);for(let t=0;t<_;t++)p[t].isCollapsed&&n.setCollapsed(t,!0),n.setSource(t,p[t].source);return n}static sanitizeAndMerge(p,_,v){v=v??Number.MAX_VALUE;const b=(l,o)=>Array.isArray(l)?g=>g<o?l[g]:void 0:g=>g<o?l.toFoldRange(g):void 0,a=b(p,p.length),i=b(_,_.length);let n=0,t=0,r=a(0),u=i(0);const f=[];let c,d=0;const s=[];for(;r||u;){let l;if(u&&(!r||r.startLineNumber>=u.startLineNumber))r&&r.startLineNumber===u.startLineNumber?(u.source===1?l=u:(l=r,l.isCollapsed=u.isCollapsed&&r.endLineNumber===u.endLineNumber,l.source=0),r=a(++n)):(l=u,u.isCollapsed&&u.source===0&&(l.source=2)),u=i(++t);else{let o=t,g=u;for(;;){if(!g||g.startLineNumber>r.endLineNumber){l=r;break}if(g.source===1&&g.endLineNumber>r.endLineNumber)break;g=i(++o)}r=a(++n)}if(l){for(;c&&c.endLineNumber<l.startLineNumber;)c=f.pop();l.endLineNumber>l.startLineNumber&&l.startLineNumber>d&&l.endLineNumber<=v&&(!c||c.endLineNumber>=l.endLineNumber)&&(s.push(l),d=l.startLineNumber,c&&f.push(c),c=l)}}return s}}e.FoldingRegions=y;class E{constructor(p,_){this.ranges=p,this.index=_}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(se[302],oe([1,0,6,185,111]),function(te,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((s,l)=>s.regionIndex-l.regionIndex);const d={};this._decorationProvider.changeDecorations(s=>{let l=0,o=-1,g=-1;const h=m=>{for(;l<m;){const C=this._regions.getEndLineNumber(l),w=this._regions.isCollapsed(l);if(C<=o){const D=this.regions.getSource(l)!==0;s.changeDecorationOptions(this._editorDecorationIds[l],this._decorationProvider.getDecorationOption(w,C<=g,D))}w&&C>g&&(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),o=Math.max(o,this._regions.getEndLineNumber(C))}}h(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:c})}removeManualRanges(c){const d=new Array,s=l=>{for(const o of c)if(!(o.startLineNumber>l.endLineNumber||l.startLineNumber>o.endLineNumber))return!0;return!1};for(let l=0;l<this._regions.length;l++){const o=this._regions.toFoldRange(l);(o.source===0||!s(o))&&d.push(o)}this.updatePost(k.FoldingRegions.fromFoldRanges(d))}update(c,d=[]){const s=this._currentFoldedOrManualRanges(d),l=k.FoldingRegions.sanitizeAndMerge(c,s,this._textModel.getLineCount());this.updatePost(k.FoldingRegions.fromFoldRanges(l))}updatePost(c){const d=[];let s=-1;for(let l=0,o=c.length;l<o;l++){const g=c.getStartLineNumber(l),h=c.getEndLineNumber(l),m=c.isCollapsed(l),C=c.getSource(l)!==0,w={startLineNumber:g,startColumn:this._textModel.getLineMaxColumn(g),endLineNumber:h,endColumn:this._textModel.getLineMaxColumn(h)+1};d.push({range:w,options:this._decorationProvider.getDecorationOption(m,h<=s,C)}),m&&h>s&&(s=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,o)=>{for(const g of c)if(l<g&&g<=o)return!0;return!1},s=[];for(let l=0,o=this._regions.length;l<o;l++){let g=this.regions.isCollapsed(l);const h=this.regions.getSource(l);if(g||h!==0){const m=this._regions.toFoldRange(l),C=this._textModel.getDecorationRange(this._editorDecorationIds[l]);C&&(g&&d(C.startLineNumber,C.endLineNumber)&&(g=!1),s.push({startLineNumber:C.startLineNumber,endLineNumber:C.endLineNumber,type:m.type,isCollapsed:g,source:h}))}}return s}getMemento(){const c=this._currentFoldedOrManualRanges(),d=[],s=this._textModel.getLineCount();for(let l=0,o=c.length;l<o;l++){const g=c[l];if(g.startLineNumber>=g.endLineNumber||g.startLineNumber<1||g.endLineNumber>s)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,s;if(!Array.isArray(c))return;const l=[],o=this._textModel.getLineCount();for(const h of c){if(h.startLineNumber>=h.endLineNumber||h.startLineNumber<1||h.endLineNumber>o)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:(s=h.source)!==null&&s!==void 0?s:0})}const g=k.FoldingRegions.sanitizeAndMerge(this._regions,l,o);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 s=[];if(this._regions){let l=this._regions.findRange(c),o=1;for(;l>=0;){const g=this._regions.toRegion(l);(!d||d(g,o))&&s.push(g),o++,l=g.parentIndex}}return s}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 s=[],l=c?c.regionIndex+1:0,o=c?c.endLineNumber:Number.MAX_VALUE;if(d&&d.length===2){const g=[];for(let h=l,m=this._regions.length;h<m;h++){const C=this._regions.toRegion(h);if(this._regions.getStartLineNumber(h)<o){for(;g.length>0&&!C.containedBy(g[g.length-1]);)g.pop();g.push(C),d(C,g.length)&&s.push(C)}else break}}else for(let g=l,h=this._regions.length;g<h;g++){const m=this._regions.toRegion(g);if(this._regions.getStartLineNumber(g)<o)(!d||d(m))&&s.push(m);else break}return s}}e.FoldingModel=E;function S(f,c,d){const s=[];for(const l of d){const o=f.getRegionAtLine(l);if(o){const g=!o.isCollapsed;if(s.push(o),c>1){const h=f.getRegionsInside(o,(m,C)=>m.isCollapsed!==g&&C<c);s.push(...h)}}}f.toggleCollapseState(s)}e.toggleCollapseState=S;function p(f,c,d=Number.MAX_VALUE,s){const l=[];if(s&&s.length>0)for(const o of s){const g=f.getRegionAtLine(o);if(g&&(g.isCollapsed!==c&&l.push(g),d>1)){const h=f.getRegionsInside(g,(m,C)=>m.isCollapsed!==c&&C<d);l.push(...h)}}else{const o=f.getRegionsInside(null,(g,h)=>g.isCollapsed!==c&&h<d);l.push(...o)}f.toggleCollapseState(l)}e.setCollapseStateLevelsDown=p;function _(f,c,d,s){const l=[];for(const o of s){const g=f.getAllRegionsAtLine(o,(h,m)=>h.isCollapsed!==c&&m<=d);l.push(...g)}f.toggleCollapseState(l)}e.setCollapseStateLevelsUp=_;function v(f,c,d){const s=[];for(const l of d){const o=f.getAllRegionsAtLine(l,g=>g.isCollapsed!==c);o.length>0&&s.push(o[0])}f.toggleCollapseState(s)}e.setCollapseStateUp=v;function b(f,c,d,s){const l=(g,h)=>h===c&&g.isCollapsed!==d&&!s.some(m=>g.containsLine(m)),o=f.getRegionsInside(null,l);f.toggleCollapseState(o)}e.setCollapseStateAtLevel=b;function a(f,c,d){const s=[];for(const g of d){const h=f.getAllRegionsAtLine(g,void 0);h.length>0&&s.push(h[0])}const l=g=>s.every(h=>!h.containedBy(g)&&!g.containedBy(h))&&g.isCollapsed!==c,o=f.getRegionsInside(null,l);f.toggleCollapseState(o)}e.setCollapseStateForRest=a;function i(f,c,d){const s=f.textModel,l=f.regions,o=[];for(let g=l.length-1;g>=0;g--)if(d!==l.isCollapsed(g)){const h=l.getStartLineNumber(g);c.test(s.getLineContent(h))&&o.push(l.toRegion(g))}f.toggleCollapseState(o)}e.setCollapseStateForMatchingLines=i;function n(f,c,d){const s=f.regions,l=[];for(let o=s.length-1;o>=0;o--)d!==s.isCollapsed(o)&&c===s.getType(o)&&l.push(s.toRegion(o));f.toggleCollapseState(l)}e.setCollapseStateForType=n;function t(f,c){let d=null;const s=c.getRegionAtLine(f);if(s!==null&&(d=s.startLineNumber,f===d)){const l=s.parentIndex;l!==-1?d=c.regions.getStartLineNumber(l):d=null}return d}e.getParentFoldLine=t;function r(f,c){let d=c.getRegionAtLine(f);if(d!==null&&d.startLineNumber===f){if(f!==d.startLineNumber)return d.startLineNumber;{const s=d.parentIndex;let l=0;for(s!==-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===s)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.startLineNumber<f)return d.startLineNumber;d.regionIndex>0?d=c.regions.toRegion(d.regionIndex-1):d=null}return null}e.getPreviousFoldLine=r;function u(f,c){let d=c.getRegionAtLine(f);if(d!==null&&d.startLineNumber===f){const s=d.parentIndex;let l=0;if(s!==-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<c.regions.length){if(d=c.regions.toRegion(d.regionIndex+1),d.startLineNumber>=l)return null;if(d.parentIndex===s)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.regionIndex<c.regions.length?d=c.regions.toRegion(d.regionIndex+1):d=null}return null}e.getNextFoldLine=u}),define(se[558],oe([1,0,60,6,5,129]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class S{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(b){this._updateEventEmitter=new k.Emitter,this._hasLineChanges=!1,this._foldingModel=b,this._foldingModelListener=b.onDidChange(a=>this.updateHiddenRanges()),this._hiddenRanges=[],b.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(b){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=b.changes.some(a=>a.range.endLineNumber!==a.range.startLineNumber||(0,E.countEOL)(a.text)[0]!==0))}updateHiddenRanges(){let b=!1;const a=[];let i=0,n=0,t=Number.MAX_VALUE,r=-1;const u=this._foldingModel.regions;for(;i<u.length;i++){if(!u.isCollapsed(i))continue;const f=u.getStartLineNumber(i)+1,c=u.getEndLineNumber(i);t<=f&&c<=r||(!b&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===f&&this._hiddenRanges[n].endLineNumber===c?(a.push(this._hiddenRanges[n]),n++):(b=!0,a.push(new y.Range(f,1,c,1))),t=f,r=c)}(this._hasLineChanges||b||n<this._hiddenRanges.length)&&this.applyHiddenRanges(a)}applyHiddenRanges(b){this._hiddenRanges=b,this._hasLineChanges=!1,this._updateEventEmitter.fire(b)}hasRanges(){return this._hiddenRanges.length>0}isHidden(b){return _(this._hiddenRanges,b)!==null}adjustSelections(b){let a=!1;const i=this._foldingModel.textModel;let n=null;const t=r=>((!n||!p(r,n))&&(n=_(this._hiddenRanges,r)),n?n.startLineNumber-1:null);for(let r=0,u=b.length;r<u;r++){let f=b[r];const c=t(f.startLineNumber);c&&(f=f.setStartPosition(c,i.getLineMaxColumn(c)),a=!0);const d=t(f.endLineNumber);d&&(f=f.setEndPosition(d,i.getLineMaxColumn(d)),a=!0),b[r]=f}return a}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=S;function p(v,b){return v>=b.startLineNumber&&v<=b.endLineNumber}function _(v,b){const a=(0,L.findFirstIdxMonotonousOrArrLen)(v,i=>b<i.startLineNumber)-1;return a>=0&&v[a].endLineNumber>=b?v[a]:null}}),define(se[303],oe([1,0,210,185]),function(te,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 S{constructor(a,i,n){this.editorModel=a,this.languageConfigurationService=i,this.foldingRangesLimit=n,this.id=E}dispose(){}compute(a){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=S;class p{constructor(a){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=a}insertFirst(a,i,n){if(a>k.MAX_LINE_NUMBER||i>k.MAX_LINE_NUMBER)return;const t=this._length;this._startIndexes[t]=a,this._endIndexes[t]=i,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(a){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 r=this._length-1,u=0;r>=0;r--,u++)n[u]=this._startIndexes[r],t[u]=this._endIndexes[r];return new k.FoldingRegions(n,t)}else{this._foldingRangesLimit.update(this._length,i);let n=0,t=this._indentOccurrences.length;for(let c=0;c<this._indentOccurrences.length;c++){const d=this._indentOccurrences[c];if(d){if(d+n>i){t=c;break}n+=d}}const r=a.getOptions().tabSize,u=new Uint32Array(i),f=new Uint32Array(i);for(let c=this._length-1,d=0;c>=0;c--){const s=this._startIndexes[c],l=a.getLineContent(s),o=(0,L.computeIndentLevel)(l,r);(o<t||o===t&&n++<i)&&(u[d]=s,f[d]=this._endIndexes[c],d++)}return new k.FoldingRegions(u,f)}}}e.RangesCollector=p;const _={limit:y,update:()=>{}};function v(b,a,i,n=_){const t=b.getOptions().tabSize,r=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 s=b.getLineContent(d),l=(0,L.computeIndentLevel)(s,t);let o=f[f.length-1];if(l===-1){a&&(o.endAbove=d);continue}let g;if(u&&(g=s.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,o=f[h],r.insertFirst(d,o.line,l),o.line=d,o.indent=l,o.endAbove=d;continue}}else{f.push({indent:-2,endAbove:d,line:d});continue}if(o.indent>l){do f.pop(),o=f[f.length-1];while(o.indent>l);const h=o.endAbove-1;h-d>=1&&r.insertFirst(d,h,l)}o.indent===l?o.endAbove=d:f.push({indent:l,endAbove:d,line:d})}return r.toIndentRanges(b)}e.computeRanges=v}),define(se[304],oe([1,0,12,2,185]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const E={},S="syntax";class p{constructor(i,n,t,r,u){this.editorModel=i,this.providers=n,this.handleFoldingRangesChange=t,this.foldingRangesLimit=r,this.fallbackRangeProvider=u,this.id=S,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 _(this.providers,this.editorModel,i).then(n=>{var t,r;return n?b(n,this.foldingRangesLimit):(r=(t=this.fallbackRangeProvider)===null||t===void 0?void 0:t.compute(i))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=p;function _(a,i,n){let t=null;const r=a.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 s of c)s.start>0&&s.end>s.start&&s.end<=d&&t.push({start:s.start,end:s.end,rank:f,kind:s.kind})}},L.onUnexpectedExternalError));return Promise.all(r).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,r){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]=r,this._types[u]=t,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||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 r=0;r<this._length;r++)n[r]=this._startIndexes[r],t[r]=this._endIndexes[r];return new y.FoldingRegions(n,t,this._types)}else{this._foldingRangesLimit.update(this._length,i);let n=0,t=this._nestingLevelCounts.length;for(let c=0;c<this._nestingLevelCounts.length;c++){const d=this._nestingLevelCounts[c];if(d){if(d+n>i){t=c;break}n+=d}}const r=new Uint32Array(i),u=new Uint32Array(i),f=[];for(let c=0,d=0;c<this._length;c++){const s=this._nestingLevels[c];(s<t||s===t&&n++<i)&&(r[d]=this._startIndexes[c],u[d]=this._endIndexes[c],f[d]=this._types[c],d++)}return new y.FoldingRegions(r,u,f)}}}function b(a,i){const n=a.sort((f,c)=>{let d=f.start-c.start;return d===0&&(d=f.rank-c.rank),d}),t=new v(i);let r;const u=[];for(const f of n)if(!r)r=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else if(f.start>r.start)if(f.end<=r.end)u.push(r),r=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else{if(f.start>r.end){do r=u.pop();while(r&&f.start>r.end);r&&u.push(r),r=f}t.add(f.start,f.end,f.kind&&f.kind.value,u.length)}return t.toIndentRanges()}e.sanitizeRanges=b}),define(se[305],oe([1,0,74,5,127]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class E{static _handleEolEdits(p,_){let v;const b=[];for(const a of _)typeof a.eol=="number"&&(v=a.eol),a.range&&typeof a.text=="string"&&b.push(a);return typeof v=="number"&&p.hasModel()&&p.getModel().pushEOL(v),b}static _isFullModelReplaceEdit(p,_){if(!p.hasModel())return!1;const v=p.getModel(),b=v.validateRange(_.range);return v.getFullModelRange().equalsRange(b)}static execute(p,_,v){v&&p.pushUndoStop();const b=y.StableEditorScrollState.capture(p),a=E._handleEolEdits(p,_);a.length===1&&E._isFullModelReplaceEdit(p,a[0])?p.executeEdits("formatEditsCommand",a.map(i=>L.EditOperation.replace(k.Range.lift(i.range),i.text))):p.executeEdits("formatEditsCommand",a.map(i=>L.EditOperation.replaceMove(k.Range.lift(i.range),i.text))),v&&p.pushUndoStop(),b.restoreRelativeVerticalPositionOfCursor(p)}}e.FormattingEdit=E}),define(se[101],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class L{constructor(E,S,p,_){this.priority=E,this.range=S,this.initialMousePosX=p,this.initialMousePosY=_,this.type=1}equals(E){return E.type===1&&this.range.equalsRange(E.range)}canAdoptVisibleHover(E,S){return E.type===1&&S.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=L;class k{constructor(E,S,p,_,v,b){this.priority=E,this.owner=S,this.range=p,this.initialMousePosX=_,this.initialMousePosY=v,this.supportsMarkerHover=b,this.type=2}equals(E){return E.type===2&&this.owner===E.owner}canAdoptVisibleHover(E,S){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(se[559],oe([1,0,24]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class k{constructor(E,S,p){this._editRange=E,this._originalSelection=S,this._text=p}getEditOperations(E,S){S.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(E,S){const _=S.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new L.Selection(_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn),_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn)):new L.Selection(_.endLineNumber,_.endColumn-this._text.length,_.endLineNumber,_.endColumn)}}e.InPlaceReplaceCommand=k}),define(se[306],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function L(y,E){let S=0;for(let p=0;p<y.length;p++)y.charAt(p)===" "?S+=E:S++;return S}e.getSpaceCnt=L;function k(y,E,S){y=y<0?0:y;let p="";if(!S){const _=Math.floor(y/E);y=y%E;for(let v=0;v<_;v++)p+=" "}for(let _=0;_<y;_++)p+=" ";return p}e.generateIndent=k}),define(se[216],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showNextInlineSuggestionActionId=e.showPreviousInlineSuggestionActionId=e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit",e.showPreviousInlineSuggestionActionId="editor.action.inlineSuggest.showPrevious",e.showNextInlineSuggestionActionId="editor.action.inlineSuggest.showNext"}),define(se[156],oe([1,0,12,2,35,10,5]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lengthOfText=e.addPositions=e.applyObservableDecorations=e.ColumnRange=e.getReadonlyEmptyArray=e.applyEdits=void 0;function p(r,u){const f=new _(r),c=u.map(d=>{const s=S.Range.lift(d.range);return{startOffset:f.getOffset(s.getStartPosition()),endOffset:f.getOffset(s.getEndPosition()),text:d.text}});c.sort((d,s)=>s.startOffset-d.startOffset);for(const d of c)r=r.substring(0,d.startOffset)+d.text+r.substring(d.endOffset);return r}e.applyEdits=p;class _{constructor(u){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let f=0;f<u.length;f++)u.charAt(f)===`
|
||
`&&this.lineStartOffsetByLineIdx.push(f+1)}getOffset(u){return this.lineStartOffsetByLineIdx[u.lineNumber-1]+u.column-1}}const v=[];function b(){return v}e.getReadonlyEmptyArray=b;class a{constructor(u,f){if(this.startColumn=u,this.endColumnExclusive=f,u>f)throw new L.BugIndicatingError(`startColumn ${u} cannot be after endColumnExclusive ${f}`)}toRange(u){return new S.Range(u,this.startColumn,u,this.endColumnExclusive)}equals(u){return this.startColumn===u.startColumn&&this.endColumnExclusive===u.endColumnExclusive}}e.ColumnRange=a;function i(r,u){const f=new k.DisposableStore,c=r.createDecorationsCollection();return f.add((0,y.autorunOpts)({debugName:()=>`Apply decorations from ${u.debugName}`},d=>{const s=u.read(d);c.set(s)})),f.add({dispose:()=>{c.clear()}}),f}e.applyObservableDecorations=i;function n(r,u){return new E.Position(r.lineNumber+u.lineNumber-1,u.lineNumber===1?r.column+u.column-1:u.column)}e.addPositions=n;function t(r){let u=1,f=1;for(const c of r)c===`
|
||
`?(u++,f=1):f++;return new E.Position(u,f)}e.lengthOfText=t}),define(se[217],oe([1,0,156]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ghostTextOrReplacementEquals=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class k{constructor(_,v){this.lineNumber=_,this.parts=v}equals(_){return this.lineNumber===_.lineNumber&&this.parts.length===_.parts.length&&this.parts.every((v,b)=>v.equals(_.parts[b]))}renderForScreenReader(_){if(this.parts.length===0)return"";const v=this.parts[this.parts.length-1],b=_.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(_=>_.lines.length===0)}get lineCount(){return 1+this.parts.reduce((_,v)=>_+v.lines.length-1,0)}}e.GhostText=k;class y{constructor(_,v,b){this.column=_,this.lines=v,this.preview=b}equals(_){return this.column===_.column&&this.lines.length===_.lines.length&&this.lines.every((v,b)=>v===_.lines[b])}}e.GhostTextPart=y;class E{constructor(_,v,b,a=0){this.lineNumber=_,this.columnRange=v,this.newLines=b,this.additionalReservedLineCount=a,this.parts=[new y(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(_){return this.newLines.join(`
|
||
`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(_=>_.lines.length===0)}equals(_){return this.lineNumber===_.lineNumber&&this.columnRange.equals(_.columnRange)&&this.newLines.length===_.newLines.length&&this.newLines.every((v,b)=>v===_.newLines[b])&&this.additionalReservedLineCount===_.additionalReservedLineCount}}e.GhostTextReplacement=E;function S(p,_){return p===_?!0:!p||!_?!1:p instanceof k&&_ instanceof k||p instanceof E&&_ instanceof E?p.equals(_):!1}e.ghostTextOrReplacementEquals=S}),define(se[307],oe([1,0,173,11,5,217,156]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class p{constructor(t,r){this.range=t,this.text=r}removeCommonPrefix(t,r){const u=r?this.range.intersectRanges(r):this.range;if(!u)return this;const f=t.getValueInRange(u,1),c=(0,k.commonPrefixLength)(f,this.text),d=(0,S.addPositions)(this.range.getStartPosition(),(0,S.lengthOfText)(f.substring(0,c))),s=this.text.substring(c),l=y.Range.fromPositions(d,this.range.getEndPosition());return new p(l,s)}augments(t){return this.text.startsWith(t.text)&&_(this.range,t.range)}computeGhostText(t,r,u,f=0){let c=this.removeCommonPrefix(t);if(c.range.endLineNumber!==c.range.startLineNumber)return;const d=t.getLineContent(c.range.startLineNumber),s=(0,k.getLeadingWhitespace)(d).length;if(c.range.startColumn-1<=s){const w=(0,k.getLeadingWhitespace)(c.text).length,D=d.substring(c.range.startColumn-1,s),[I,T]=[c.range.getStartPosition(),c.range.getEndPosition()],A=I.column+D.length<=T.column?I.delta(0,D.length):T,P=y.Range.fromPositions(A,T),N=c.text.startsWith(D)?c.text.substring(D.length):c.text.substring(w);c=new p(P,N)}const o=t.getValueInRange(c.range),g=b(o,c.text);if(!g)return;const h=c.range.startLineNumber,m=new Array;if(r==="prefix"){const w=g.filter(D=>D.originalLength===0);if(w.length>1||w.length===1&&w[0].originalStart!==o.length)return}const C=c.text.length-f;for(const w of g){const D=c.range.startColumn+w.originalStart+w.originalLength;if(r==="subwordSmart"&&u&&u.lineNumber===c.range.startLineNumber&&D<u.column||w.originalLength>0)return;if(w.modifiedLength===0)continue;const I=w.modifiedStart+w.modifiedLength,T=Math.max(w.modifiedStart,Math.min(I,C)),A=c.text.substring(w.modifiedStart,T),P=c.text.substring(T,Math.max(w.modifiedStart,I));if(A.length>0){const N=(0,k.splitLines)(A);m.push(new E.GhostTextPart(D,N,!1))}if(P.length>0){const N=(0,k.splitLines)(P);m.push(new E.GhostTextPart(D,N,!0))}}return new E.GhostText(h,m)}}e.SingleTextEdit=p;function _(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 r=i(n,t,!0);if(r){const u=a(r);if(u>0){const f=i(n,t,!1);f&&a(f)<u&&(r=f)}}return v={originalValue:n,newValue:t,changes:r},r}}function a(n){let t=0;for(const r of n)t+=r.originalLength;return t}function i(n,t,r){if(n.length>5e3||t.length>5e3)return;function u(o){let g=0;for(let h=0,m=o.length;h<m;h++){const C=o.charCodeAt(h);C>g&&(g=C)}return g}const f=Math.max(u(n),u(t));function c(o){if(o<0)throw new Error("unexpected");return f+o+1}function d(o){let g=0,h=0;const m=new Int32Array(o.length);for(let C=0,w=o.length;C<w;C++)if(r&&o[C]==="("){const D=h*100+g;m[C]=c(2*D),g++}else if(r&&o[C]===")"){g=Math.max(g-1,0);const D=h*100+g;m[C]=c(2*D+1),g===0&&h++}else m[C]=o.charCodeAt(C);return m}const s=d(n),l=d(t);return new L.LcsDiff({getElements:()=>s},{getElements:()=>l}).ComputeDiff(!1).changes}}),define(se[560],oe([1,0,5,24]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class y{constructor(S,p,_){this._selection=S,this._isCopyingDown=p,this._noop=_||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(S,p){let _=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,_.startLineNumber<_.endLineNumber&&_.endColumn===1&&(this._endLineNumberDelta=1,_=_.setEndPosition(_.endLineNumber-1,S.getLineMaxColumn(_.endLineNumber-1)));const v=[];for(let a=_.startLineNumber;a<=_.endLineNumber;a++)v.push(S.getLineContent(a));const b=v.join(`
|
||
`);b===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?p.addEditOperation(new L.Range(_.endLineNumber,S.getLineMaxColumn(_.endLineNumber),_.endLineNumber+1,1),_.endLineNumber===S.getLineCount()?"":`
|
||
`):this._isCopyingDown?p.addEditOperation(new L.Range(_.startLineNumber,1,_.startLineNumber,1),b+`
|
||
`):p.addEditOperation(new L.Range(_.endLineNumber,S.getLineMaxColumn(_.endLineNumber),_.endLineNumber,S.getLineMaxColumn(_.endLineNumber)),`
|
||
`+b),this._selectionId=p.trackSelection(_),this._selectionDirection=this._selection.getDirection()}computeCursorState(S,p){let _=p.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let v=_.startLineNumber,b=_.startColumn,a=_.endLineNumber,i=_.endColumn;this._startLineNumberDelta!==0&&(v=v+this._startLineNumberDelta,b=1),this._endLineNumberDelta!==0&&(a=a+this._endLineNumberDelta,i=1),_=k.Selection.createWithDirection(v,b,a,i,this._selectionDirection)}return _}}e.CopyLinesCommand=y}),define(se[561],oe([1,0,74,5]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class y{static getCollator(){return y._COLLATOR||(y._COLLATOR=new Intl.Collator),y._COLLATOR}constructor(_,v){this.selection=_,this.descending=v,this.selectionId=null}getEditOperations(_,v){const b=S(_,this.selection,this.descending);b&&v.addEditOperation(b.range,b.text),this.selectionId=v.trackSelection(this.selection)}computeCursorState(_,v){return v.getTrackedSelection(this.selectionId)}static canRun(_,v,b){if(_===null)return!1;const a=E(_,v,b);if(!a)return!1;for(let i=0,n=a.before.length;i<n;i++)if(a.before[i]!==a.after[i])return!0;return!1}}e.SortLinesCommand=y,y._COLLATOR=null;function E(p,_,v){const b=_.startLineNumber;let a=_.endLineNumber;if(_.endColumn===1&&a--,b>=a)return null;const i=[];for(let t=b;t<=a;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:a,before:i,after:n}}function S(p,_,v){const b=E(p,_,v);return b?L.EditOperation.replace(new k.Range(b.startLineNumber,1,b.endLineNumber,p.getLineMaxColumn(b.endLineNumber)),b.after.join(`
|
||
`)):null}}),define(se[308],oe([1,0]),function(te,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 S;const p=(S=E.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:k.getLanguageId(),resource:k.uri}))===null||S===void 0?void 0:S.enabled;return typeof p=="boolean"?p:y.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=L}),define(se[309],oe([1,0,66,10,5]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class E{async provideSelectionRanges(p,_){const v=[];for(const b of _){const a=[];v.push(a);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,a))}return v}static _bracketsRightYield(p,_,v,b,a){const i=new Map,n=Date.now();for(;;){if(_>=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,_+1,v,b,a));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=a.get(u);c||(c=new L.LinkedList,a.set(u,c)),c.push(t.range)}}b=t.range.getEndPosition()}}static _bracketsLeftYield(p,_,v,b,a,i){const n=new Map,t=Date.now();for(;;){if(_>=E._maxRounds&&a.size===0){p();break}if(!b){p();break}const r=v.bracketPairs.findPrevBracket(b);if(!r){p();break}if(Date.now()-t>E._maxDuration){setTimeout(()=>E._bracketsLeftYield(p,_+1,v,b,a,i));break}if(r.bracketInfo.isOpeningBracket){const f=r.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=a.get(f);if(d){const s=d.shift();d.size===0&&a.delete(f);const l=y.Range.fromPositions(r.range.getEndPosition(),s.getStartPosition()),o=y.Range.fromPositions(r.range.getStartPosition(),s.getEndPosition());i.push({range:l}),i.push({range:o}),E._addBracketLeading(v,o,i)}}}else{const f=r.bracketInfo.getOpeningBrackets()[0].bracketText,c=n.has(f)?n.get(f):0;n.set(f,c+1)}b=r.range.getStartPosition()}}static _addBracketLeading(p,_,v){if(_.startLineNumber===_.endLineNumber)return;const b=_.startLineNumber,a=p.getLineFirstNonWhitespaceColumn(b);a!==0&&a!==_.startColumn&&(v.push({range:y.Range.fromPositions(new k.Position(b,a),_.getEndPosition())}),v.push({range:y.Range.fromPositions(new k.Position(b,1),_.getEndPosition())}));const i=b-1;if(i>0){const n=p.getLineFirstNonWhitespaceColumn(i);n===_.startColumn&&n!==p.getLineLastNonWhitespaceColumn(i)&&(v.push({range:y.Range.fromPositions(new k.Position(i,n),_.getEndPosition())}),v.push({range:y.Range.fromPositions(new k.Position(i,1),_.getEndPosition())}))}}}e.BracketSelectionRangeProvider=E,E._maxDuration=30,E._maxRounds=2}),define(se[562],oe([1,0,11,5]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class y{constructor(S=!0){this.selectSubwords=S}provideSelectionRanges(S,p){const _=[];for(const v of p){const b=[];_.push(b),this.selectSubwords&&this._addInWordRanges(b,S,v),this._addWordRanges(b,S,v),this._addWhitespaceLine(b,S,v),b.push({range:S.getFullModelRange()})}return _}_addInWordRanges(S,p,_){const v=p.getWordAtPosition(_);if(!v)return;const{word:b,startColumn:a}=v,i=_.column-a;let n=i,t=i,r=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)(r))break;r=u}for(n+=1;t<b.length;t++){const u=b.charCodeAt(t);if((0,L.isUpperAsciiLetter)(u)&&(0,L.isLowerAsciiLetter)(r))break;if(u===95||u===45)break;r=u}n<t&&S.push({range:new k.Range(_.lineNumber,a+n,_.lineNumber,a+t)})}_addWordRanges(S,p,_){const v=p.getWordAtPosition(_);v&&S.push({range:new k.Range(_.lineNumber,v.startColumn,_.lineNumber,v.endColumn)})}_addWhitespaceLine(S,p,_){p.getLineLength(_.lineNumber)>0&&p.getLineFirstNonWhitespaceColumn(_.lineNumber)===0&&p.getLineLastNonWhitespaceColumn(_.lineNumber)===0&&S.push({range:new k.Range(_.lineNumber,1,_.lineNumber,p.getLineMaxColumn(_.lineNumber))})}}e.WordSelectionRangeProvider=y}),define(se[117],oe([1,0]),function(te,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(r){return r>=48&&r<=57}static isVariableCharacter(r){return r===95||r>=97&&r<=122||r>=65&&r<=90}text(r){this.value=r,this.pos=0}tokenText(r){return this.value.substr(r.pos,r.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const r=this.pos;let u=0,f=this.value.charCodeAt(r),c;if(c=L._table[f],typeof c=="number")return this.pos+=1,{type:c,pos:r,len:1};if(L.isDigitCharacter(f)){c=8;do u+=1,f=this.value.charCodeAt(r+u);while(L.isDigitCharacter(f));return this.pos+=u,{type:c,pos:r,len:u}}if(L.isVariableCharacter(f)){c=9;do f=this.value.charCodeAt(r+ ++u);while(L.isVariableCharacter(f)||L.isDigitCharacter(f));return this.pos+=u,{type:c,pos:r,len:u}}c=10;do u+=1,f=this.value.charCodeAt(r+u);while(!isNaN(f)&&typeof L._table[f]>"u"&&!L.isDigitCharacter(f)&&!L.isVariableCharacter(f));return this.pos+=u,{type:c,pos:r,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(r){return r instanceof y&&this._children[this._children.length-1]instanceof y?this._children[this._children.length-1].value+=r.value:(r.parent=this,this._children.push(r)),this}replace(r,u){const{parent:f}=r,c=f.children.indexOf(r),d=f.children.slice(0);d.splice(c,1,...u),f._children=d,function s(l,o){for(const g of l)g.parent=o,s(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 r=this;for(;;){if(!r)return;if(r instanceof i)return r;r=r.parent}}toString(){return this.children.reduce((r,u)=>r+u.toString(),"")}len(){return 0}}e.Marker=k;class y extends k{constructor(r){super(),this.value=r}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 S extends E{static compareByIndex(r,u){return r.index===u.index?0:r.isFinalTabstop?1:u.isFinalTabstop||r.index<u.index?-1:r.index>u.index?1:0}constructor(r){super(),this.index=r}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 r=new S(this.index);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(u=>u.clone()),r}}e.Placeholder=S;class p extends k{constructor(){super(...arguments),this.options=[]}appendChild(r){return r instanceof y&&(r.parent=this,this.options.push(r)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const r=new p;return this.options.forEach(r.appendChild,r),r}}e.Choice=p;class _ extends k{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(r){const u=this;let f=!1,c=r.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(r){let u="";for(const f of this._children)if(f instanceof v){let c=r[f.index]||"";c=f.resolve(c),u+=c}else u+=f.toString();return u}toString(){return""}clone(){const r=new _;return r.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),r._children=this.children.map(u=>u.clone()),r}}e.Transform=_;class v extends k{constructor(r,u,f,c){super(),this.index=r,this.shorthandName=u,this.ifValue=f,this.elseValue=c}resolve(r){return this.shorthandName==="upcase"?r?r.toLocaleUpperCase():"":this.shorthandName==="downcase"?r?r.toLocaleLowerCase():"":this.shorthandName==="capitalize"?r?r[0].toLocaleUpperCase()+r.substr(1):"":this.shorthandName==="pascalcase"?r?this._toPascalCase(r):"":this.shorthandName==="camelcase"?r?this._toCamelCase(r):"":r&&typeof this.ifValue=="string"?this.ifValue:!r&&typeof this.elseValue=="string"?this.elseValue:r||""}_toPascalCase(r){const u=r.match(/[a-z0-9]+/gi);return u?u.map(f=>f.charAt(0).toUpperCase()+f.substr(1)).join(""):r}_toCamelCase(r){const u=r.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(""):r}clone(){return new v(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=v;class b extends E{constructor(r){super(),this.name=r}resolve(r){let u=r.resolve(this);return this.transform&&(u=this.transform.resolve(u||"")),u!==void 0?(this._children=[new y(u)],!0):!1}clone(){const r=new b(this.name);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(u=>u.clone()),r}}e.Variable=b;function a(t,r){const u=[...t];for(;u.length>0;){const f=u.shift();if(!r(f))break;u.unshift(...f.children)}}class i extends k{get placeholderInfo(){if(!this._placeholders){const r=[];let u;this.walk(function(f){return f instanceof S&&(r.push(f),u=!u||u.index<f.index?f:u),!0}),this._placeholders={all:r,last:u}}return this._placeholders}get placeholders(){const{all:r}=this.placeholderInfo;return r}offset(r){let u=0,f=!1;return this.walk(c=>c===r?(f=!0,!1):(u+=c.len(),!0)),f?u:-1}fullLen(r){let u=0;return a([r],f=>(u+=f.len(),!0)),u}enclosingPlaceholders(r){const u=[];let{parent:f}=r;for(;f;)f instanceof S&&u.push(f),f=f.parent;return u}resolveVariables(r){return this.walk(u=>(u instanceof b&&u.resolve(r)&&(this._placeholders=void 0),!0)),this}appendChild(r){return this._placeholders=void 0,super.appendChild(r)}replace(r,u){return this._placeholders=void 0,super.replace(r,u)}clone(){const r=new i;return this._children=this.children.map(u=>u.clone()),r}walk(r){a(this.children,r)}}e.TextmateSnippet=i;class n{constructor(){this._scanner=new L,this._token={type:14,pos:0,len:0}}static escape(r){return r.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(r){return/\${?CLIPBOARD/.test(r)}parse(r,u,f){const c=new i;return this.parseFragment(r,c),this.ensureFinalTabstop(c,f??!1,u??!1),c}parseFragment(r,u){const f=u.children.length;for(this._scanner.text(r),this._token=this._scanner.next();this._parse(u););const c=new Map,d=[];u.walk(o=>(o instanceof S&&(o.isFinalTabstop?c.set(0,void 0):!c.has(o.index)&&o.children.length>0?c.set(o.index,o.children):d.push(o)),!0));const s=(o,g)=>{const h=c.get(o.index);if(!h)return;const m=new S(o.index);m.transform=o.transform;for(const C of h){const w=C.clone();m.appendChild(w),w instanceof S&&c.has(w.index)&&!g.has(w.index)&&(g.add(w.index),s(w,g),g.delete(w.index))}u.replace(o,[m])},l=new Set;for(const o of d)s(o,l);return u.children.slice(f)}ensureFinalTabstop(r,u,f){(u||f&&r.placeholders.length>0)&&(r.placeholders.find(d=>d.index===0)||r.appendChild(new S(0)))}_accept(r,u){if(r===void 0||this._token.type===r){const f=u?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),f}return!1}_backTo(r){return this._scanner.pos=r.pos+r.len,this._token=r,!1}_until(r){const u=this._token;for(;this._token.type!==r;){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(r){return this._parseEscaped(r)||this._parseTabstopOrVariableName(r)||this._parseComplexPlaceholder(r)||this._parseComplexVariable(r)||this._parseAnything(r)}_parseEscaped(r){let u;return(u=this._accept(5,!0))?(u=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||u,r.appendChild(new y(u)),!0):!1}_parseTabstopOrVariableName(r){let u;const f=this._token;return this._accept(0)&&(u=this._accept(9,!0)||this._accept(8,!0))?(r.appendChild(/^\d+$/.test(u)?new S(Number(u)):new b(u)),!0):this._backTo(f)}_parseComplexPlaceholder(r){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 S(Number(u));if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(d),!0;if(!this._parse(d))return r.appendChild(new y("${"+u+":")),d.children.forEach(r.appendChild,r),!0}else if(d.index>0&&this._accept(7)){const s=new p;for(;;){if(this._parseChoiceElement(s)){if(this._accept(2))continue;if(this._accept(7)&&(d.appendChild(s),this._accept(4)))return r.appendChild(d),!0}return this._backTo(f),!1}}else return this._accept(6)?this._parseTransform(d)?(r.appendChild(d),!0):(this._backTo(f),!1):this._accept(4)?(r.appendChild(d),!0):this._backTo(f)}_parseChoiceElement(r){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):(r.appendChild(new y(f.join(""))),!0)}_parseComplexVariable(r){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 r.appendChild(d),!0;if(!this._parse(d))return r.appendChild(new y("${"+u+":")),d.children.forEach(r.appendChild,r),!0}else return this._accept(6)?this._parseTransform(d)?(r.appendChild(d),!0):(this._backTo(f),!1):this._accept(4)?(r.appendChild(d),!0):this._backTo(f)}_parseTransform(r){const u=new _;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 r.transform=u,!0}_parseFormatString(r){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 r.appendChild(new v(Number(c))),!0;if(!this._accept(1))return this._backTo(u),!1}else return r.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):(r.appendChild(new v(Number(c),d)),!0)}else if(this._accept(11)){const d=this._until(4);if(d)return r.appendChild(new v(Number(c),void 0,d,void 0)),!0}else if(this._accept(12)){const d=this._until(4);if(d)return r.appendChild(new v(Number(c),void 0,void 0,d)),!0}else if(this._accept(13)){const d=this._until(1);if(d){const s=this._until(4);if(s)return r.appendChild(new v(Number(c),void 0,d,s)),!0}}else{const d=this._until(4);if(d)return r.appendChild(new v(Number(c),void 0,void 0,d)),!0}return this._backTo(u),!1}_parseAnything(r){return this._token.type!==14?(r.appendChild(new y(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=n}),define(se[310],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class L{constructor(S,p){this.startLineNumber=S,this.endLineNumber=p}}e.StickyRange=L;class k{constructor(S,p,_){this.range=S,this.children=p,this.parent=_}}e.StickyElement=k;class y{constructor(S,p,_,v){this.uri=S,this.version=p,this.element=_,this.outlineProviderId=v}}e.StickyModel=y}),define(se[311],oe([1,0,13,71,11]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class E{constructor(_,v){this.leadingLineContent=_,this.characterCountDelta=v}}e.LineContext=E;class S{constructor(_,v,b,a,i,n,t=k.FuzzyScoreOptions.default,r=void 0){this.clipboardText=r,this._snippetCompareFn=S._compareCompletionItems,this._items=_,this._column=v,this._wordDistance=a,this._options=i,this._refilterKind=1,this._lineContext=b,this._fuzzyScoreOptions=t,n==="top"?this._snippetCompareFn=S._compareCompletionItemsSnippetsUp:n==="bottom"&&(this._snippetCompareFn=S._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(_){(this._lineContext.leadingLineContent!==_.leadingLineContent||this._lineContext.characterCountDelta!==_.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<_.characterCountDelta&&this._filteredItems?2:1,this._lineContext=_)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const _=new Set;for(const[v,b]of this.getItemsByProvider())b.length>0&&b[0].container.incomplete&&_.add(v);return _}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const _=[],{leadingLineContent:v,characterCountDelta:b}=this._lineContext;let a="",i="";const n=this._refilterKind===1?this._items:this._filteredItems,t=[],r=!this._options.filterGraceful||n.length>2e3?k.fuzzyScore:k.fuzzyScoreGracefulAggressive;for(let u=0;u<n.length;u++){const f=n[u];if(f.isInvalid)continue;const c=this._itemsByProvider.get(f.provider);c?c.push(f):this._itemsByProvider.set(f.provider,[f]);const d=f.position.column-f.editStart.column,s=d+b-(f.position.column-this._column);if(a.length!==s&&(a=s===0?"":v.slice(-s),i=a.toLowerCase()),f.word=a,s===0)f.score=k.FuzzyScore.Default;else{let l=0;for(;l<d;){const o=a.charCodeAt(l);if(o===32||o===9)l+=1;else break}if(l>=s)f.score=k.FuzzyScore.Default;else if(typeof f.completion.filterText=="string"){const o=r(a,i,l,f.completion.filterText,f.filterTextLow,0,this._fuzzyScoreOptions);if(!o)continue;(0,y.compareIgnoreCase)(f.completion.filterText,f.textLabel)===0?f.score=o:(f.score=(0,k.anyScore)(a,i,l,f.textLabel,f.labelLow,0),f.score[0]=o[0])}else{const o=r(a,i,l,f.textLabel,f.labelLow,0,this._fuzzyScoreOptions);if(!o)continue;f.score=o}}f.idx=u,f.distance=this._wordDistance.distance(f.position,f.completion),t.push(f),_.push(f.textLabel.length)}this._filteredItems=t.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:_.length?(0,L.quickSelect)(_.length-.85,_,(u,f)=>u-f):0}}static _compareCompletionItems(_,v){return _.score[0]>v.score[0]?-1:_.score[0]<v.score[0]?1:_.distance<v.distance?-1:_.distance>v.distance?1:_.idx<v.idx?-1:_.idx>v.idx?1:0}static _compareCompletionItemsSnippetsDown(_,v){if(_.completion.kind!==v.completion.kind){if(_.completion.kind===27)return 1;if(v.completion.kind===27)return-1}return S._compareCompletionItems(_,v)}static _compareCompletionItemsSnippetsUp(_,v){if(_.completion.kind!==v.completion.kind){if(_.completion.kind===27)return-1;if(v.completion.kind===27)return 1}return S._compareCompletionItems(_,v)}}e.CompletionModel=S}),define(se[563],oe([1,0,13,2,128]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class E{constructor(p,_,v,b){this._disposables=new k.DisposableStore,this._disposables.add(v.onDidSuggest(a=>{a.completionModel.items.length===0&&this.reset()})),this._disposables.add(v.onDidCancel(a=>{this.reset()})),this._disposables.add(_.onDidShow(()=>this._onItem(_.getFocusedItem()))),this._disposables.add(_.onDidFocus(this._onItem,this)),this._disposables.add(_.onDidHide(this.reset,this)),this._disposables.add(p.onWillType(a=>{if(this._active&&!_.isFrozen()&&v.state!==0){const i=a.charCodeAt(a.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 _=new y.CharacterSet;for(const v of p.item.completion.commitCharacters)v.length>0&&_.add(v.charCodeAt(0));this._active={acceptCharacters:_,item:p}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=E}),define(se[564],oe([1,0,2]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class k{constructor(E,S){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(),_=p.length;let v=!1;for(let a=0;a<_;a++)if(!p[a].isEmpty()){v=!0;break}if(!v){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const b=E.getModel();for(let a=0;a<_;a++){const i=p[a];if(b.getValueLengthInRange(i)>k._maxSelectionLength)return;this._lastOvertyped[a]={value:b.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}})),this._disposables.add(S.onDidTrigger(p=>{this._locked=!0})),this._disposables.add(S.onDidCancel(p=>{this._locked=!1}))}getLastOvertypedInfo(E){if(E>=0&&E<this._lastOvertyped.length)return this._lastOvertyped[E]}dispose(){this._disposables.dispose()}}e.OvertypingCapturer=k,k._maxSelectionLength=51200}),define(se[312],oe([1,0,13,5,309]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class E{static async create(p,_){if(!_.getOption(117).localityBonus||!_.hasModel())return E.None;const v=_.getModel(),b=_.getPosition();if(!p.canComputeWordRanges(v.uri))return E.None;const[a]=await new y.BracketSelectionRangeProvider().provideSelectionRanges(v,[b]);if(a.length===0)return E.None;const i=await p.computeWordRanges(v.uri,a[0].range);if(!i)return E.None;const n=v.getWordUntilPosition(b);return delete i[n.word],new class extends E{distance(t,r){if(!b.equals(_.getPosition()))return 0;if(r.kind===17)return 2<<20;const u=typeof r.label=="string"?r.label:r.label.label,f=i[u];if((0,L.isFalsyOrEmpty)(f))return 2<<20;const c=(0,L.binarySearch)(f,k.Range.fromPositions(t),k.Range.compareRangesUsingStarts),d=c>=0?f[c]:f[Math.max(0,~c-1)];let s=a.length;for(const l of a){if(!k.Range.containsRange(l.range,d))break;s-=1}return s}}}}e.WordDistance=E,E.None=new class extends E{distance(){return 0}}}),define(se[313],oe([1,0]),function(te,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 S(t){return!t}e.empty=S;function p(t,r){return t.ignoreCase&&r?r.toLowerCase():r}e.fixCase=p;function _(t){return t.replace(/[&<>'"_]/g,"-")}e.sanitize=_;function v(t,r){console.log(`${t.languageId}: ${r}`)}e.log=v;function b(t,r){return new Error(`${t.languageId}: ${r}`)}e.createError=b;function a(t,r,u,f,c){const d=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let s=null;return r.replace(d,function(l,o,g,h,m,C,w,D,I){return S(g)?S(h)?!S(m)&&m<f.length?p(t,f[m]):!S(w)&&t&&typeof t[w]=="string"?t[w]:(s===null&&(s=c.split("."),s.unshift(c)),!S(C)&&C<s.length?p(t,s[C]):""):p(t,u):"$"})}e.substituteMatches=a;function i(t,r){let u=r;for(;u&&u.length>0;){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,r){let u=r;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(se[565],oe([1,0,313]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function k(t,r){if(!r||!Array.isArray(r))return!1;for(const u of r)if(!t(u))return!1;return!0}function y(t,r){return typeof t=="boolean"?t:r}function E(t,r){return typeof t=="string"?t:r}function S(t){const r={};for(const u of t)r[u]=!0;return r}function p(t,r=!1){r&&(t=t.map(function(f){return f.toLowerCase()}));const u=S(t);return r?function(f){return u[f.toLowerCase()]!==void 0&&u.hasOwnProperty(f.toLowerCase())}:function(f){return u[f]!==void 0&&u.hasOwnProperty(f)}}function _(t,r){r=r.replace(/@@/g,"");let u=0,f;do f=!1,r=r.replace(/@(\w+)/g,function(d,s){f=!0;let l="";if(typeof t[s]=="string")l=t[s];else if(t[s]&&t[s]instanceof RegExp)l=t[s].source;else throw t[s]===void 0?L.createError(t,"language definition does not contain attribute '"+s+"', used at: "+r):L.createError(t,"attribute reference '"+s+"' must be a string, used at: "+r);return L.empty(l)?"":"(?:"+l+")"}),u++;while(f&&u<5);r=r.replace(/\x01/g,"@");const c=(t.ignoreCase?"i":"")+(t.unicode?"u":"");return new RegExp(r,c)}function v(t,r,u,f){if(f<0)return t;if(f<r.length)return r[f];if(f>=100){f=f-100;const c=u.split(".");if(c.unshift(u),f<c.length)return c[f]}return null}function b(t,r,u,f){let c=-1,d=u,s=u.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(c=parseInt(s[3]),s[2]&&(c=c+100)),d=s[4]);let l="~",o=d;!d||d.length===0?(l="!=",o=""):/^\w*$/.test(o)?l="==":(s=d.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],o=s[2]));let g;if((l==="~"||l==="!~")&&/^(\w|\|)*$/.test(o)){const h=p(o.split("|"),t.ignoreCase);g=function(m){return l==="~"?h(m):!h(m)}}else if(l==="@"||l==="!@"){const h=t[o];if(!h)throw L.createError(t,"the @ match target '"+o+"' is not defined, in rule: "+r);if(!k(function(C){return typeof C=="string"},h))throw L.createError(t,"the @ match target '"+o+"' must be an array of strings, in rule: "+r);const m=p(h,t.ignoreCase);g=function(C){return l==="@"?m(C):!m(C)}}else if(l==="~"||l==="!~")if(o.indexOf("$")<0){const h=_(t,"^"+o+"$");g=function(m){return l==="~"?h.test(m):!h.test(m)}}else g=function(h,m,C,w){return _(t,"^"+L.substituteMatches(t,o,m,C,w)+"$").test(h)};else if(o.indexOf("$")<0){const h=L.fixCase(t,o);g=function(m){return l==="=="?m===h:m!==h}}else{const h=L.fixCase(t,o);g=function(m,C,w,D,I){const T=L.substituteMatches(t,h,C,w,D);return l==="=="?m===T:m!==T}}return c===-1?{name:u,value:f,test:function(h,m,C,w){return g(h,h,m,C,w)}}:{name:u,value:f,test:function(h,m,C,w){const D=v(h,m,C,c);return g(D||"",h,m,C,w)}}}function a(t,r,u){if(u){if(typeof u=="string")return u;if(u.token||u.token===""){if(typeof u.token!="string")throw L.createError(t,"a 'token' attribute must be of type string, in rule: "+r);{const f={token:u.token};if(u.token.indexOf("$")>=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: "+r);if(u.next){if(typeof u.next!="string")throw L.createError(t,"the next state must be a string value in rule: "+r);{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: "+r);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;c<d;c++)f[c]=a(t,r,u[c]);return{group:f}}else if(u.cases){const f=[];for(const d in u.cases)if(u.cases.hasOwnProperty(d)){const s=a(t,r,u.cases[d]);d==="@default"||d==="@"||d===""?f.push({test:void 0,value:s,name:d}):d==="@eos"?f.push({test:function(l,o,g,h){return h},value:s,name:d}):f.push(b(t,r,d,s))}const c=t.defaultToken;return{test:function(d,s,l,o){for(const g of f)if(!g.test||g.test(d,s,l,o))return g.value;return c}}}else throw L.createError(t,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+r)}else return{token:""}}class i{constructor(r){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=r}setRegex(r,u){let f;if(typeof u=="string")f=u;else if(u instanceof RegExp)f=u.source;else throw L.createError(r,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=f.length>0&&f[0]==="^",this.name=this.name+": "+f,this.regex=_(r,"^(?:"+(this.matchOnlyAtLineStart?f.substr(1):f)+")")}setAction(r,u){this.action=a(r,this.name,u)}}function n(t,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const u={};u.languageId=t,u.includeLF=y(r.includeLF,!1),u.noThrow=!1,u.maxStack=100,u.start=typeof r.start=="string"?r.start:null,u.ignoreCase=y(r.ignoreCase,!1),u.unicode=y(r.unicode,!1),u.tokenPostfix=E(r.tokenPostfix,"."+u.languageId),u.defaultToken=E(r.defaultToken,"source"),u.usesEmbedded=!1;const f=r;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=r.tokenizer,f.defaultToken=u.defaultToken;function c(s,l,o){for(const g of o){let h=g.include;if(h){if(typeof h!="string")throw L.createError(u,"an 'include' attribute must be a string at: "+s);if(h[0]==="@"&&(h=h.substr(1)),!r.tokenizer[h])throw L.createError(u,"include target '"+h+"' is not defined at: "+s);c(s+"."+h,l,r.tokenizer[h])}else{const m=new i(s);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: "+s);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: "+s);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(!r.tokenizer||typeof r.tokenizer!="object")throw L.createError(u,"a language definition must define the 'tokenizer' attribute as an object");u.tokenizer=[];for(const s in r.tokenizer)if(r.tokenizer.hasOwnProperty(s)){u.start||(u.start=s);const l=r.tokenizer[s];u.tokenizer[s]=new Array,c("tokenizer."+s,u.tokenizer[s],l)}if(u.usesEmbedded=f.usesEmbedded,r.brackets){if(!Array.isArray(r.brackets))throw L.createError(u,"the 'brackets' attribute must be defined as an array")}else r.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 s of r.brackets){let l=s;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(se[566],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(se[567],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/findinput/findInput",e)}),define(se[568],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(se[569],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(se[570],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/hover/hoverWidget",e)}),define(se[571],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(se[572],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(se[573],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(se[574],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(se[575],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(se[576],oe([3,4]),function(te,e){return te.create("vs/base/browser/ui/tree/abstractTree",e)}),define(se[577],oe([3,4]),function(te,e){return te.create("vs/base/common/actions",e)}),define(se[42],oe([1,0,6,2,577]),function(te,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="",r=!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=r,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 S 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(r){t=r}this._onDidRun.fire({action:i,error:t})}async runAction(i,n){await i.run(n)}}e.ActionRunner=S;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 _{get actions(){return this._actions}constructor(i,n,t,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=i,this.label=n,this.class=r,this._actions=t}async run(){}}e.SubmenuAction=_;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(a){var i,n;return{id:a.id,label:a.label,class:a.class,enabled:(i=a.enabled)!==null&&i!==void 0?i:!0,checked:(n=a.checked)!==null&&n!==void 0?n:!1,run:async(...t)=>a.run(...t),tooltip:a.label}}e.toAction=b}),define(se[578],oe([1,0,42]),function(te,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,S){return super.runAction(E,this._getContext())}}e.ActionRunnerWithContext=k}),define(se[579],oe([3,4]),function(te,e){return te.create("vs/base/common/errorMessage",e)}),define(se[580],oe([1,0,13,20,579]),function(te,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),S(v.stack)||S(v.stacktrace)):p(v)}function S(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 _(v=null,b=!1){if(!v)return y.localize(3,null);if(Array.isArray(v)){const a=L.coalesce(v),i=_(a[0],b);return a.length>1?y.localize(4,null,i,a.length):i}if(k.isString(v))return v;if(v.detail){const a=v.detail;if(a.error)return E(a.error,b);if(a.exception)return E(a.exception,b)}return v.stack?E(v,b):v.message?v.message:y.localize(5,null)}e.toErrorMessage=_}),define(se[581],oe([3,4]),function(te,e){return te.create("vs/base/common/keybindingLabels",e)}),define(se[218],oe([1,0,581]),function(te,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(S,p,_=p){this.modifierLabels=[null],this.modifierLabels[2]=S,this.modifierLabels[1]=p,this.modifierLabels[3]=_}toLabel(S,p,_){if(p.length===0)return null;const v=[];for(let b=0,a=p.length;b<a;b++){const i=p[b],n=_(i);if(n===null)return null;v[b]=y(i,n,this.modifierLabels[S])}return v.join(" ")}}e.ModifierLabelProvider=k,e.UILabelProvider=new k({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:L.localize(0,null),shiftKey:L.localize(1,null),altKey:L.localize(2,null),metaKey:L.localize(3,null),separator:"+"},{ctrlKey:L.localize(4,null),shiftKey:L.localize(5,null),altKey:L.localize(6,null),metaKey:L.localize(7,null),separator:"+"}),e.AriaLabelProvider=new k({ctrlKey:L.localize(8,null),shiftKey:L.localize(9,null),altKey:L.localize(10,null),metaKey:L.localize(11,null),separator:"+"},{ctrlKey:L.localize(12,null),shiftKey:L.localize(13,null),altKey:L.localize(14,null),metaKey:L.localize(15,null),separator:"+"},{ctrlKey:L.localize(16,null),shiftKey:L.localize(17,null),altKey:L.localize(18,null),metaKey:L.localize(19,null),separator:"+"}),e.ElectronAcceleratorLabelProvider=new k({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new k({ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"cmd",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"win",separator:"+"},{ctrlKey:"ctrl",shiftKey:"shift",altKey:"alt",metaKey:"meta",separator:"+"});function y(E,S,p){if(S===null)return"";const _=[];return E.ctrlKey&&_.push(p.ctrlKey),E.shiftKey&&_.push(p.shiftKey),E.altKey&&_.push(p.altKey),E.metaKey&&_.push(p.metaKey),S!==""&&_.push(S),_.join(p.separator)}}),define(se[582],oe([3,4]),function(te,e){return te.create("vs/base/common/platform",e)}),define(se[17],oe([1,0,582]),function(te,e,L){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.isAndroid=e.isEdge=e.isSafari=e.isFirefox=e.isChrome=e.isLittleEndian=e.OS=e.setTimeout0=e.setTimeout0IsFaster=e.language=e.userAgent=e.isMobile=e.isIOS=e.webWorkerOrigin=e.isWebWorker=e.isWeb=e.isNative=e.isLinux=e.isMacintosh=e.isWindows=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let y=!1,E=!1,S=!1,p=!1,_=!1,v=!1,b=!1,a=!1,i=!1,n=!1,t,r=e.LANGUAGE_DEFAULT,u=e.LANGUAGE_DEFAULT,f,c;const d=globalThis;let s;typeof d.vscode<"u"&&typeof d.vscode.process<"u"?s=d.vscode.process:typeof process<"u"&&(s=process);const l=typeof((k=s?.versions)===null||k===void 0?void 0:k.electron)=="string",o=l&&s?.type==="renderer";if(typeof s=="object"){y=s.platform==="win32",E=s.platform==="darwin",S=s.platform==="linux",p=S&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,b=l,i=!!s.env.CI||!!s.env.BUILD_ARTIFACTSTAGINGDIRECTORY,t=e.LANGUAGE_DEFAULT,r=e.LANGUAGE_DEFAULT;const w=s.env.VSCODE_NLS_CONFIG;if(w)try{const D=JSON.parse(w),I=D.availableLanguages["*"];t=D.locale,u=D.osLocale,r=I||e.LANGUAGE_DEFAULT,f=D._translationsConfigFile}catch{}_=!0}else typeof navigator=="object"&&!o?(c=navigator.userAgent,y=c.indexOf("Windows")>=0,E=c.indexOf("Macintosh")>=0,a=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=c.indexOf("Linux")>=0,n=c?.indexOf("Mobi")>=0,v=!0,t=L.getConfiguredDefaultLocale(L.localize(0,null))||e.LANGUAGE_DEFAULT,r=t,u=navigator.language):console.error("Unable to resolve platform.");let g=0;E?g=1:y?g=3:S&&(g=2),e.isWindows=y,e.isMacintosh=E,e.isLinux=S,e.isNative=_,e.isWeb=v,e.isWebWorker=v&&typeof d.importScripts=="function",e.webWorkerOrigin=e.isWebWorker?d.origin:void 0,e.isIOS=a,e.isMobile=n,e.userAgent=c,e.language=r,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 T=0,A=w.length;T<A;T++){const P=w[T];if(P.id===I.data.vscodeScheduleAsyncWork){w.splice(T,1),P.callback();return}}});let D=0;return I=>{const T=++D;w.push({id:T,callback:I}),d.postMessage({vscodeScheduleAsyncWork:T},"*")}}return w=>setTimeout(w)})(),e.OS=E||a?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(se[219],oe([1,0,54,44,17]),function(te,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)}}),define(se[46],oe([1,0,54,65,125,17]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function S(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,_=512,v=1024,b=E.isMacintosh?2048:256;class a{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=S(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|=_),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=a}),define(se[67],oe([1,0,54,394,17]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class E{constructor(_,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(_,v.view);this.posx-=b.left,this.posy-=b.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=E;class S{constructor(_,v=0,b=0){var a;if(this.browserEvent=_||null,this.target=_?_.target||_.targetNode||_.srcElement:null,this.deltaY=b,this.deltaX=v,_){const i=_,n=_,t=((a=_.view)===null||a===void 0?void 0:a.devicePixelRatio)||1;if(typeof i.wheelDeltaY<"u")L.isChrome?this.deltaY=i.wheelDeltaY/(120*t):this.deltaY=i.wheelDeltaY/120;else if(typeof n.VERTICAL_AXIS<"u"&&n.axis===n.VERTICAL_AXIS)this.deltaY=-n.detail/3;else if(_.type==="wheel"){const r=_;r.deltaMode===r.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaY=-_.deltaY/3:this.deltaY=-_.deltaY:this.deltaY=-_.deltaY/40}if(typeof i.wheelDeltaX<"u")L.isSafari&&y.isWindows?this.deltaX=-(i.wheelDeltaX/120):L.isChrome?this.deltaX=i.wheelDeltaX/(120*t):this.deltaX=i.wheelDeltaX/120;else if(typeof n.HORIZONTAL_AXIS<"u"&&n.axis===n.HORIZONTAL_AXIS)this.deltaX=-_.detail/3;else if(_.type==="wheel"){const r=_;r.deltaMode===r.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaX=-_.deltaX/3:this.deltaX=-_.deltaX:this.deltaX=-_.deltaX/40}this.deltaY===0&&this.deltaX===0&&_.wheelDelta&&(L.isChrome?this.deltaY=_.wheelDelta/(120*t):this.deltaY=_.wheelDelta/120)}}preventDefault(){var _;(_=this.browserEvent)===null||_===void 0||_.preventDefault()}stopPropagation(){var _;(_=this.browserEvent)===null||_===void 0||_.stopPropagation()}}e.StandardWheelEvent=S}),define(se[14],oe([1,0,19,12,6,2,17,271]),function(te,e,L,k,y,E,S,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 _(I){return!!I&&typeof I.then=="function"}e.isThenable=_;function v(I){const T=new L.CancellationTokenSource,A=I(T.token),P=new Promise((N,M)=>{const R=T.token.onCancellationRequested(()=>{R.dispose(),M(new k.CancellationError)});Promise.resolve(A).then(x=>{R.dispose(),T.dispose(),N(x)},x=>{R.dispose(),T.dispose(),M(x)})});return new class{cancel(){T.cancel(),T.dispose()}then(N,M){return P.then(N,M)}catch(N){return this.then(void 0,N)}finally(N){return P.finally(N)}}}e.createCancelablePromise=v;function b(I,T,A){return new Promise((P,N)=>{const M=T.onCancellationRequested(()=>{M.dispose(),P(A)});I.then(P,N).finally(()=>M.dispose())})}e.raceCancellation=b;class a{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(T){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=T,!this.queuedPromise){const A=()=>{if(this.queuedPromise=null,this.isDisposed)return;const P=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,P};this.queuedPromise=new Promise(P=>{this.activePromise.then(A,A).then(P)})}return new Promise((A,P)=>{this.queuedPromise.then(A,P)})}return this.activePromise=T(),new Promise((A,P)=>{this.activePromise.then(N=>{this.activePromise=null,A(N)},N=>{this.activePromise=null,P(N)})})}dispose(){this.isDisposed=!0}}e.Throttler=a;const i=(I,T)=>{let A=!0;const P=setTimeout(()=>{A=!1,T()},I);return{isTriggered:()=>A,dispose:()=>{clearTimeout(P),A=!1}}},n=I=>{let T=!0;return queueMicrotask(()=>{T&&(T=!1,I())}),{isTriggered:()=>T,dispose:()=>{T=!1}}};class t{constructor(T){this.defaultDelay=T,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(T,A=this.defaultDelay){this.task=T,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((N,M)=>{this.doResolve=N,this.doReject=M}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const N=this.task;return this.task=null,N()}}));const P=()=>{var N;this.deferred=null,(N=this.doResolve)===null||N===void 0||N.call(this,null)};return this.deferred=A===p.MicrotaskDelay?n(P):i(A,P),this.completionPromise}isTriggered(){var T;return!!(!((T=this.deferred)===null||T===void 0)&&T.isTriggered())}cancel(){var T;this.cancelTimeout(),this.completionPromise&&((T=this.doReject)===null||T===void 0||T.call(this,new k.CancellationError),this.completionPromise=null)}cancelTimeout(){var T;(T=this.deferred)===null||T===void 0||T.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=t;class r{constructor(T){this.delayer=new t(T),this.throttler=new a}trigger(T,A){return this.delayer.trigger(()=>this.throttler.queue(T),A)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=r;function u(I,T){return T?new Promise((A,P)=>{const N=setTimeout(()=>{M.dispose(),A()},I),M=T.onCancellationRequested(()=>{clearTimeout(N),M.dispose(),P(new k.CancellationError)})}):v(A=>u(I,A))}e.timeout=u;function f(I,T=0,A){const P=setTimeout(()=>{I(),A&&N.dispose()},T),N=(0,E.toDisposable)(()=>{clearTimeout(P),A?.deleteAndLeak(N)});return A?.add(N),N}e.disposableTimeout=f;function c(I,T=P=>!!P,A=null){let P=0;const N=I.length,M=()=>{if(P>=N)return Promise.resolve(A);const R=I[P++];return Promise.resolve(R()).then(O=>T(O)?Promise.resolve(O):M())};return M()}e.first=c;class d{constructor(T,A){this._token=-1,typeof T=="function"&&typeof A=="number"&&this.setIfNotSet(T,A)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(T,A){this.cancel(),this._token=setTimeout(()=>{this._token=-1,T()},A)}setIfNotSet(T,A){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,T()},A))}}e.TimeoutTimer=d;class s{constructor(){this.disposable=void 0}cancel(){var T;(T=this.disposable)===null||T===void 0||T.dispose(),this.disposable=void 0}cancelAndSet(T,A,P=globalThis){this.cancel();const N=P.setInterval(()=>{T()},A);this.disposable=(0,E.toDisposable)(()=>{P.clearInterval(N),this.disposable=void 0})}dispose(){this.cancel()}}e.IntervalTimer=s;class l{constructor(T,A){this.timeoutToken=-1,this.runner=T,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(T=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,T)}get delay(){return this.timeout}set delay(T){this.timeout=T}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var T;(T=this.runner)===null||T===void 0||T.call(this)}}e.RunOnceScheduler=l,function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?e._runWhenIdle=(I,T)=>{(0,S.setTimeout0)(()=>{if(A)return;const P=Date.now()+15;T(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,P-Date.now())}}))});let A=!1;return{dispose(){A||(A=!0)}}}:e._runWhenIdle=(I,T,A)=>{const P=I.requestIdleCallback(T,typeof A=="number"?{timeout:A}:void 0);let N=!1;return{dispose(){N||(N=!0,I.cancelIdleCallback(P))}}},e.runWhenGlobalIdle=I=>(0,e._runWhenIdle)(globalThis,I)}();class o{constructor(T,A){this._didRun=!1,this._executor=()=>{try{this._value=A()}catch(P){this._error=P}finally{this._didRun=!0}},this._handle=(0,e._runWhenIdle)(T,()=>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=o;class g extends o{constructor(T){super(globalThis,T)}}e.GlobalIdleValue=g;class h{get isRejected(){var T;return((T=this.outcome)===null||T===void 0?void 0:T.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((T,A)=>{this.completeCallback=T,this.errorCallback=A})}complete(T){return new Promise(A=>{this.completeCallback(T),this.outcome={outcome:0,value:T},A()})}error(T){return new Promise(A=>{this.errorCallback(T),this.outcome={outcome:1,value:T},A()})}cancel(){return this.error(new k.CancellationError)}}e.DeferredPromise=h;var m;(function(I){async function T(P){let N;const M=await Promise.all(P.map(R=>R.then(x=>x,x=>{N||(N=x)})));if(typeof N<"u")throw N;return M}I.settled=T;function A(P){return new Promise(async(N,M)=>{try{await P(N,M)}catch(R){M(R)}})}I.withAsyncBody=A})(m||(e.Promises=m={}));class C{static fromArray(T){return new C(A=>{A.emitMany(T)})}static fromPromise(T){return new C(async A=>{A.emitMany(await T)})}static fromPromises(T){return new C(async A=>{await Promise.all(T.map(async P=>A.emitOne(await P)))})}static merge(T){return new C(async A=>{await Promise.all(T.map(async P=>{for await(const N of P)A.emitOne(N)}))})}constructor(T){this._state=0,this._results=[],this._error=null,this._onStateChanged=new y.Emitter,queueMicrotask(async()=>{const A={emitOne:P=>this.emitOne(P),emitMany:P=>this.emitMany(P),reject:P=>this.reject(P)};try{await Promise.resolve(T(A)),this.resolve()}catch(P){this.reject(P)}finally{A.emitOne=void 0,A.emitMany=void 0,A.reject=void 0}})}[Symbol.asyncIterator](){let T=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(T<this._results.length)return{done:!1,value:this._results[T++]};if(this._state===1)return{done:!0,value:void 0};await y.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(T,A){return new C(async P=>{for await(const N of T)P.emitOne(A(N))})}map(T){return C.map(this,T)}static filter(T,A){return new C(async P=>{for await(const N of T)A(N)&&P.emitOne(N)})}filter(T){return C.filter(this,T)}static coalesce(T){return C.filter(T,A=>!!A)}coalesce(){return C.coalesce(this)}static async toPromise(T){const A=[];for await(const P of T)A.push(P);return A}toPromise(){return C.toPromise(this)}emitOne(T){this._state===0&&(this._results.push(T),this._onStateChanged.fire())}emitMany(T){this._state===0&&(this._results=this._results.concat(T),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(T){this._state===0&&(this._state=2,this._error=T,this._onStateChanged.fire())}}e.AsyncIterableObject=C,C.EMPTY=C.fromArray([]);class w extends C{constructor(T,A){super(A),this._source=T}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=w;function D(I){const T=new L.CancellationTokenSource,A=I(T.token);return new w(T,async P=>{const N=T.token.onCancellationRequested(()=>{N.dispose(),T.dispose(),P.reject(new k.CancellationError)});try{for await(const M of A){if(T.token.isCancellationRequested)return;P.emitOne(M)}N.dispose(),T.dispose()}catch(M){N.dispose(),T.dispose(),P.reject(M)}})}e.createCancelableAsyncIterable=D}),define(se[583],oe([1,0,14,2]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class y extends k.Disposable{constructor(S,p,_){super(),this._visibility=S,this._visibleClassName=p,this._invisibleClassName=_,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new L.TimeoutTimer)}setVisibility(S){this._visibility!==S&&(this._visibility=S,this._updateShouldBeVisible())}setShouldBeVisible(S){this._rawShouldBeVisible=S,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const S=this._applyVisibilitySetting();this._shouldBeVisible!==S&&(this._shouldBeVisible=S,this.ensureVisibility())}setIsNeeded(S){this._isNeeded!==S&&(this._isNeeded=S,this.ensureVisibility())}setDomNode(S){this._domNode=S,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 S;(S=this._domNode)===null||S===void 0||S.setClassName(this._visibleClassName)},0))}_hide(S){var p;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(p=this._domNode)===null||p===void 0||p.setClassName(this._invisibleClassName+(S?" fade":"")))}}e.ScrollbarVisibilityController=y}),define(se[220],oe([1,0,143,13,14,271,173,6,52]),function(te,e,L,k,y,E,S,p,_){"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 a(n){return typeof n.collapsible=="boolean"}class i{constructor(t,r,u,f={}){this.user=t,this.list=r,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,r,u=_.Iterable.empty(),f={}){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");f.diffIdentityProvider?this.spliceSmart(f.diffIdentityProvider,t,r,u,f):this.spliceSimple(t,r,u,f)}spliceSmart(t,r,u,f,c,d){var s;f===void 0&&(f=_.Iterable.empty()),d===void 0&&(d=(s=c.diffDepth)!==null&&s!==void 0?s:0);const{parentNode:l}=this.getParentNodeWithListIndex(r);if(!l.lastDiffIds)return this.spliceSimple(r,u,f,c);const o=[...f],g=r[r.length-1],h=new S.LcsDiff({getElements:()=>l.lastDiffIds},{getElements:()=>[...l.children.slice(0,g),...o,...l.children.slice(g+u)].map(I=>t.getId(I.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return l.lastDiffIds=void 0,this.spliceSimple(r,u,o,c);const m=r.slice(0,-1),C=(I,T,A)=>{if(d>0)for(let P=0;P<A;P++)I--,T--,this.spliceSmart(t,[...m,I,0],Number.MAX_SAFE_INTEGER,o[T].children,c,d-1)};let w=Math.min(l.children.length,g+u),D=o.length;for(const I of h.changes.sort((T,A)=>A.originalStart-T.originalStart))C(w,D,w-(I.originalStart+I.originalLength)),w=I.originalStart,D=I.modifiedStart-g,this.spliceSimple([...m,w],I.originalLength,_.Iterable.slice(o,D,D+I.modifiedLength),c);C(w,D,w)}spliceSimple(t,r,u=_.Iterable.empty(),{onDidCreateNode:f,onDidDeleteNode:c,diffIdentityProvider:d}){const{parentNode:s,listIndex:l,revealed:o,visible:g}=this.getParentNodeWithListIndex(t),h=[],m=_.Iterable.map(u,M=>this.createTreeNode(M,s,s.visible?1:0,o,h,f)),C=t[t.length-1];let w=0;for(let M=C;M>=0&&M<s.children.length;M--){const R=s.children[M];if(R.visible){w=R.visibleChildIndex;break}}const D=[];let I=0,T=0;for(const M of m)D.push(M),T+=M.renderNodeCount,M.visible&&(M.visibleChildIndex=w+I++);const A=(0,k.splice)(s.children,C,r,D);d?s.lastDiffIds?(0,k.splice)(s.lastDiffIds,C,r,D.map(M=>d.getId(M.element).toString())):s.lastDiffIds=s.children.map(M=>d.getId(M.element).toString()):s.lastDiffIds=void 0;let P=0;for(const M of A)M.visible&&P++;if(P!==0)for(let M=C+D.length;M<s.children.length;M++){const R=s.children[M];R.visible&&(R.visibleChildIndex-=P)}if(s.visibleChildrenCount+=I-P,o&&g){const M=A.reduce((R,x)=>R+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(s,T-M),this.list.splice(l,M,h)}if(A.length>0&&c){const M=R=>{c(R),R.children.forEach(M)};A.forEach(M)}this._onDidSplice.fire({insertedNodes:D,deletedNodes:A});let N=s;for(;N;){if(N.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}N=N.parent}}rerender(t){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");const{node:r,listIndex:u,revealed:f}=this.getTreeNodeWithListIndex(t);r.visible&&f&&this.list.splice(u,1,[r])}has(t){return this.hasTreeNode(t)}getListIndex(t){const{listIndex:r,visible:u,revealed:f}=this.getTreeNodeWithListIndex(t);return u&&f?r:-1}getListRenderCount(t){return this.getTreeNode(t).renderNodeCount}isCollapsible(t){return this.getTreeNode(t).collapsible}setCollapsible(t,r){const u=this.getTreeNode(t);typeof r>"u"&&(r=!u.collapsible);const f={collapsible:r};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,f))}isCollapsed(t){return this.getTreeNode(t).collapsed}setCollapsed(t,r,u){const f=this.getTreeNode(t);typeof r>"u"&&(r=!f.collapsed);const c={collapsed:r,recursive:u||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,c))}_setCollapseState(t,r){const{node:u,listIndex:f,revealed:c}=this.getTreeNodeWithListIndex(t),d=this._setListNodeCollapseState(u,f,c,r);if(u!==this.root&&this.autoExpandSingleChildren&&d&&!a(r)&&u.collapsible&&!u.collapsed&&!r.recursive){let s=-1;for(let l=0;l<u.children.length;l++)if(u.children[l].visible)if(s>-1){s=-1;break}else s=l;s>-1&&this._setCollapseState([...t,s],r)}return d}_setListNodeCollapseState(t,r,u,f){const c=this._setNodeCollapseState(t,f,!1);if(!u||!t.visible||!c)return c;const d=t.renderNodeCount,s=this.updateNodeAfterCollapseChange(t),l=d-(r===-1?0:1);return this.list.splice(r+1,l,s.slice(1)),c}_setNodeCollapseState(t,r,u){let f;if(t===this.root?f=!1:(a(r)?(f=t.collapsible!==r.collapsible,t.collapsible=r.collapsible):t.collapsible?(f=t.collapsed!==r.collapsed,t.collapsed=r.collapsed):f=!1,f&&this._onDidChangeCollapseState.fire({node:t,deep:u})),!a(r)&&r.recursive)for(const c of t.children)f=this._setNodeCollapseState(c,r,!0)||f;return f}expandTo(t){this.eventBufferer.bufferEvents(()=>{let r=this.getTreeNode(t);for(;r.parent;)r=r.parent,t=t.slice(0,t.length-1),r.collapsed&&this._setCollapseState(t,{collapsed:!1,recursive:!1})})}refilter(){const t=this.root.renderNodeCount,r=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,t,r),this.refilterDelayer.cancel()}createTreeNode(t,r,u,f,c,d){const s={parent:r,element:t.element,children:[],depth:r.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(s,u);s.visibility=l,f&&c.push(s);const o=t.children||_.Iterable.empty(),g=f&&l!==0&&!s.collapsed;let h=0,m=1;for(const C of o){const w=this.createTreeNode(C,s,l,g,c,d);s.children.push(w),m+=w.renderNodeCount,w.visible&&(w.visibleChildIndex=h++)}return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=h,s.visible=l===2?h>0:l===1,s.visible?s.collapsed||(s.renderNodeCount=m):(s.renderNodeCount=0,f&&c.pop()),d?.(s),s}updateNodeAfterCollapseChange(t){const r=t.renderNodeCount,u=[];return this._updateNodeAfterCollapseChange(t,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-r),u}_updateNodeAfterCollapseChange(t,r){if(t.visible===!1)return 0;if(r.push(t),t.renderNodeCount=1,!t.collapsed)for(const u of t.children)t.renderNodeCount+=this._updateNodeAfterCollapseChange(u,r);return this._onDidChangeRenderNodeCount.fire(t),t.renderNodeCount}updateNodeAfterFilterChange(t){const r=t.renderNodeCount,u=[];return this._updateNodeAfterFilterChange(t,t.visible?1:0,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-r),u}_updateNodeAfterFilterChange(t,r,u,f=!0){let c;if(t!==this.root){if(c=this._filterNode(t,r),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 s=!1;if(!t.collapsed||c!==0){let l=0;for(const o of t.children)s=this._updateNodeAfterFilterChange(o,c,u,f&&!t.collapsed)||s,o.visible&&(o.visibleChildIndex=l++);t.visibleChildrenCount=l}else t.visibleChildrenCount=0;return t!==this.root&&(t.visible=c===2?s: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,r){if(r!==0)for(;t;)t.renderNodeCount+=r,this._onDidChangeRenderNodeCount.fire(t),t=t.parent}_filterNode(t,r){const u=this.filter?this.filter.filter(t.element,r):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,r=this.root){if(!t||t.length===0)return!0;const[u,...f]=t;return u<0||u>r.children.length?!1:this.hasTreeNode(f,r.children[u])}getTreeNode(t,r=this.root){if(!t||t.length===0)return r;const[u,...f]=t;if(u<0||u>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");return this.getTreeNode(f,r.children[u])}getTreeNodeWithListIndex(t){if(t.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:r,listIndex:u,revealed:f,visible:c}=this.getParentNodeWithListIndex(t),d=t[t.length-1];if(d<0||d>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");const s=r.children[d];return{node:s,listIndex:u,revealed:f,visible:c&&s.visible}}getParentNodeWithListIndex(t,r=this.root,u=0,f=!0,c=!0){const[d,...s]=t;if(d<0||d>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");for(let l=0;l<d;l++)u+=r.children[l].renderNodeCount;return f=f&&!r.collapsed,c=c&&r.visible,s.length===0?{parentNode:r,listIndex:u,revealed:f,visible:c}:this.getParentNodeWithListIndex(s,r.children[d],u+1,f,c)}getNode(t=[]){return this.getTreeNode(t)}getNodeLocation(t){const r=[];let u=t;for(;u.parent;)r.push(u.parent.children.indexOf(u)),u=u.parent;return r.reverse()}getParentNodeLocation(t){if(t.length!==0)return t.length===1?[]:(0,k.tail2)(t)[0]}getFirstElementChild(t){const r=this.getTreeNode(t);if(r.children.length!==0)return r.children[0].element}}e.IndexTreeModel=i}),define(se[221],oe([1,0,220,143,52]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class E{constructor(p,_,v={}){this.user=p,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new L.IndexTreeModel(p,_,null,v),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,v.sorter&&(this.sorter={compare(b,a){return v.sorter.compare(b.element,a.element)}}),this.identityProvider=v.identityProvider}setChildren(p,_=y.Iterable.empty(),v={}){const b=this.getElementLocation(p);this._setChildren(b,this.preserveCollapseState(_),v)}_setChildren(p,_=y.Iterable.empty(),v){const b=new Set,a=new Set,i=t=>{var r;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();a.add(f),this.nodesByIdentity.set(f,u)}(r=v.onDidCreateNode)===null||r===void 0||r.call(v,u)},n=t=>{var r;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();a.has(f)||this.nodesByIdentity.delete(f)}(r=v.onDidDeleteNode)===null||r===void 0||r.call(v,u)};this.model.splice([...p,0],Number.MAX_VALUE,_,{...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,_=>{let v=this.nodes.get(_.element);if(!v&&this.identityProvider){const i=this.identityProvider.getId(_.element).toString();v=this.nodesByIdentity.get(i)}if(!v){let i;return typeof _.collapsed>"u"?i=void 0:_.collapsed===k.ObjectTreeElementCollapseState.Collapsed||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed?i=!0:_.collapsed===k.ObjectTreeElementCollapseState.Expanded||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?i=!1:i=!!_.collapsed,{..._,children:this.preserveCollapseState(_.children),collapsed:i}}const b=typeof _.collapsible=="boolean"?_.collapsible:v.collapsible;let a;return typeof _.collapsed>"u"||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrCollapsed||_.collapsed===k.ObjectTreeElementCollapseState.PreserveOrExpanded?a=v.collapsed:_.collapsed===k.ObjectTreeElementCollapseState.Collapsed?a=!0:_.collapsed===k.ObjectTreeElementCollapseState.Expanded?a=!1:a=!!_.collapsed,{..._,collapsible:b,collapsed:a,children:this.preserveCollapseState(_.children)}})}rerender(p){const _=this.getElementLocation(p);this.model.rerender(_)}getFirstElementChild(p=null){const _=this.getElementLocation(p);return this.model.getFirstElementChild(_)}has(p){return this.nodes.has(p)}getListIndex(p){const _=this.getElementLocation(p);return this.model.getListIndex(_)}getListRenderCount(p){const _=this.getElementLocation(p);return this.model.getListRenderCount(_)}isCollapsible(p){const _=this.getElementLocation(p);return this.model.isCollapsible(_)}setCollapsible(p,_){const v=this.getElementLocation(p);return this.model.setCollapsible(v,_)}isCollapsed(p){const _=this.getElementLocation(p);return this.model.isCollapsed(_)}setCollapsed(p,_,v){const b=this.getElementLocation(p);return this.model.setCollapsed(b,_,v)}expandTo(p){const _=this.getElementLocation(p);this.model.expandTo(_)}refilter(){this.model.refilter()}getNode(p=null){if(p===null)return this.model.getNode(this.model.rootRef);const _=this.nodes.get(p);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${p}`);return _}getNodeLocation(p){return p.element}getParentNodeLocation(p){if(p===null)throw new k.TreeError(this.user,"Invalid getParentNodeLocation call");const _=this.nodes.get(p);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${p}`);const v=this.model.getNodeLocation(_),b=this.model.getParentNodeLocation(v);return this.model.getNode(b).element}getElementLocation(p){if(p===null)return[];const _=this.nodes.get(p);if(!_)throw new k.TreeError(this.user,`Tree element not found: ${p}`);return this.model.getNodeLocation(_)}}e.ObjectTreeModel=E}),define(se[584],oe([1,0,221,143,13,6,52]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function p(d){const s=[d.element],l=d.incompressible||!1;return{element:{elements:s,incompressible:l},children:S.Iterable.map(S.Iterable.from(d.children),p),collapsible:d.collapsible,collapsed:d.collapsed}}function _(d){const s=[d.element],l=d.incompressible||!1;let o,g;for(;[g,o]=S.Iterable.consume(S.Iterable.from(d.children),2),!(g.length!==1||g[0].incompressible);)d=g[0],s.push(d.element);return{element:{elements:s,incompressible:l},children:S.Iterable.map(S.Iterable.concat(g,o),_),collapsible:d.collapsible,collapsed:d.collapsed}}e.compress=_;function v(d,s=0){let l;return s<d.element.elements.length-1?l=[v(d,s+1)]:l=S.Iterable.map(S.Iterable.from(d.children),o=>v(o,0)),s===0&&d.element.incompressible?{element:d.element.elements[s],children:l,incompressible:!0,collapsible:d.collapsible,collapsed:d.collapsed}:{element:d.element.elements[s],children:l,collapsible:d.collapsible,collapsed:d.collapsed}}function b(d){return v(d,0)}e.decompress=b;function a(d,s,l){return d.element===s?{...d,children:l}:{...d,children:S.Iterable.map(S.Iterable.from(d.children),o=>a(o,s,l))}}const i=d=>({getId(s){return s.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(s,l,o={}){this.user=s,this.rootRef=null,this.nodes=new Map,this.model=new L.ObjectTreeModel(s,l,o),this.enabled=typeof o.compressionEnabled>"u"?!0:o.compressionEnabled,this.identityProvider=o.identityProvider}setChildren(s,l=S.Iterable.empty(),o){const g=o.diffIdentityProvider&&i(o.diffIdentityProvider);if(s===null){const N=S.Iterable.map(l,this.enabled?_:p);this._setChildren(null,N,{diffIdentityProvider:g,diffDepth:1/0});return}const h=this.nodes.get(s);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=a(D,s,l),T=(this.enabled?_:p)(I),A=o.diffIdentityProvider?(N,M)=>o.diffIdentityProvider.getId(N)===o.diffIdentityProvider.getId(M):void 0;if((0,y.equals)(T.element.elements,m.element.elements,A)){this._setChildren(h,T.children||S.Iterable.empty(),{diffIdentityProvider:g,diffDepth:1});return}const P=w.children.map(N=>N===m?T:N);this._setChildren(w.element,P,{diffIdentityProvider:g,diffDepth:m.depth-w.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(s){if(s===this.enabled)return;this.enabled=s;const o=this.model.getNode().children,g=S.Iterable.map(o,b),h=S.Iterable.map(g,s?_:p);this._setChildren(null,h,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(s,l,o){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(s,l,{...o,onDidCreateNode:h,onDidDeleteNode:m})}has(s){return this.nodes.has(s)}getListIndex(s){const l=this.getCompressedNode(s);return this.model.getListIndex(l)}getListRenderCount(s){const l=this.getCompressedNode(s);return this.model.getListRenderCount(l)}getNode(s){if(typeof s>"u")return this.model.getNode();const l=this.getCompressedNode(s);return this.model.getNode(l)}getNodeLocation(s){const l=this.model.getNodeLocation(s);return l===null?null:l.elements[l.elements.length-1]}getParentNodeLocation(s){const l=this.getCompressedNode(s),o=this.model.getParentNodeLocation(l);return o===null?null:o.elements[o.elements.length-1]}getFirstElementChild(s){const l=this.getCompressedNode(s);return this.model.getFirstElementChild(l)}isCollapsible(s){const l=this.getCompressedNode(s);return this.model.isCollapsible(l)}setCollapsible(s,l){const o=this.getCompressedNode(s);return this.model.setCollapsible(o,l)}isCollapsed(s){const l=this.getCompressedNode(s);return this.model.isCollapsed(l)}setCollapsed(s,l,o){const g=this.getCompressedNode(s);return this.model.setCollapsed(g,l,o)}expandTo(s){const l=this.getCompressedNode(s);this.model.expandTo(l)}rerender(s){const l=this.getCompressedNode(s);this.model.rerender(l)}refilter(){this.model.refilter()}getCompressedNode(s){if(s===null)return null;const l=this.nodes.get(s);if(!l)throw new k.TreeError(this.user,`Tree element not found: ${s}`);return l}}e.CompressedObjectTreeModel=n;const t=d=>d[d.length-1];e.DefaultElementMapper=t;class r{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(s=>new r(this.unwrapper,s))}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(s,l){this.unwrapper=s,this.node=l}}function u(d,s){return{splice(l,o,g){s.splice(l,o,g.map(h=>d.map(h)))},updateElementHeight(l,o){s.updateElementHeight(l,o)}}}function f(d,s){return{...s,identityProvider:s.identityProvider&&{getId(l){return s.identityProvider.getId(d(l))}},sorter:s.sorter&&{compare(l,o){return s.sorter.compare(l.elements[0],o.elements[0])}},filter:s.filter&&{filter(l,o){return s.filter.filter(d(l),o)}}}}class c{get onDidSplice(){return E.Event.map(this.model.onDidSplice,({insertedNodes:s,deletedNodes:l})=>({insertedNodes:s.map(o=>this.nodeMapper.map(o)),deletedNodes:l.map(o=>this.nodeMapper.map(o))}))}get onDidChangeCollapseState(){return E.Event.map(this.model.onDidChangeCollapseState,({node:s,deep:l})=>({node:this.nodeMapper.map(s),deep:l}))}get onDidChangeRenderNodeCount(){return E.Event.map(this.model.onDidChangeRenderNodeCount,s=>this.nodeMapper.map(s))}constructor(s,l,o={}){this.rootRef=null,this.elementMapper=o.elementMapper||e.DefaultElementMapper;const g=h=>this.elementMapper(h.elements);this.nodeMapper=new k.WeakMapper(h=>new r(g,h)),this.model=new n(s,u(this.nodeMapper,l),f(g,o))}setChildren(s,l=S.Iterable.empty(),o={}){this.model.setChildren(s,l,o)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(s){this.model.setCompressionEnabled(s)}has(s){return this.model.has(s)}getListIndex(s){return this.model.getListIndex(s)}getListRenderCount(s){return this.model.getListRenderCount(s)}getNode(s){return this.nodeMapper.map(this.model.getNode(s))}getNodeLocation(s){return s.element}getParentNodeLocation(s){return this.model.getParentNodeLocation(s)}getFirstElementChild(s){const l=this.model.getFirstElementChild(s);return l===null||typeof l>"u"?l:this.elementMapper(l.elements)}isCollapsible(s){return this.model.isCollapsible(s)}setCollapsible(s,l){return this.model.setCollapsible(s,l)}isCollapsed(s){return this.model.isCollapsed(s)}setCollapsed(s,l,o){return this.model.setCollapsed(s,l,o)}expandTo(s){return this.model.expandTo(s)}rerender(s){return this.model.rerender(s)}refilter(){return this.model.refilter()}getCompressedTreeNode(s=null){return this.model.getNode(s)}}e.CompressibleObjectTreeModel=c}),define(se[314],oe([1,0,17]),function(te,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(se[585],oe([1,0,314]),function(te,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 _=E();return _.add(p),{dispose(){_.delete(p)}}}else return{dispose(){}}}e.registerHotReloadHandler=y;function E(){S||(S=new Set);const p=globalThis;return p.$hotReload_applyNewExports||(p.$hotReload_applyNewExports=_=>{for(const v of S){const b=v(_);if(b)return b}}),S}let S;k()&&y(({oldExports:p,newSrc:_})=>{if(_.indexOf("/* hot-reload:patch-prototype-methods */")!==-1)return v=>{var b,a;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 r of Object.getOwnPropertyNames(n.prototype)){const u=Object.getOwnPropertyDescriptor(n.prototype,r),f=Object.getOwnPropertyDescriptor(t.prototype,r);((b=u?.value)===null||b===void 0?void 0:b.toString())!==((a=f?.value)===null||a===void 0?void 0:a.toString())&&console.log(`[hot-reload] Patching prototype method '${i}.${r}'`),Object.defineProperty(t.prototype,r,u)}v[i]=t}}}return!0}})}),define(se[95],oe([1,0,314]),function(te,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,S=122,p=46,_=47,v=92,b=58,a=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(o,g){if(o===null||typeof o!="object")throw new i(g,"Object",o)}function t(o,g){if(typeof o!="string")throw new i(g,"string",o)}const r=L.platform==="win32";function u(o){return o===_||o===v}function f(o){return o===_}function c(o){return o>=k&&o<=E||o>=y&&o<=S}function d(o,g,h,m){let C="",w=0,D=-1,I=0,T=0;for(let A=0;A<=o.length;++A){if(A<o.length)T=o.charCodeAt(A);else{if(m(T))break;T=_}if(m(T)){if(!(D===A-1||I===1))if(I===2){if(C.length<2||w!==2||C.charCodeAt(C.length-1)!==p||C.charCodeAt(C.length-2)!==p){if(C.length>2){const P=C.lastIndexOf(h);P===-1?(C="",w=0):(C=C.slice(0,P),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}${o.slice(D+1,A)}`:C=o.slice(D+1,A),w=A-D-1;D=A,I=0}else T===p&&I!==-1?++I:I=-1}return C}function s(o,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}${o}${m}`:m}e.win32={resolve(...o){let g="",h="",m=!1;for(let C=o.length-1;C>=-1;C--){let w;if(C>=0){if(w=o[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,T="",A=!1;const P=w.charCodeAt(0);if(D===1)u(P)&&(I=1,A=!0);else if(u(P))if(A=!0,u(w.charCodeAt(1))){let N=2,M=N;for(;N<D&&!u(w.charCodeAt(N));)N++;if(N<D&&N!==M){const R=w.slice(M,N);for(M=N;N<D&&u(w.charCodeAt(N));)N++;if(N<D&&N!==M){for(M=N;N<D&&!u(w.charCodeAt(N));)N++;(N===D||N!==M)&&(T=`\\\\${R}\\${w.slice(M,N)}`,I=N)}}}else I=1;else c(P)&&w.charCodeAt(1)===b&&(T=w.slice(0,2),I=2,D>2&&u(w.charCodeAt(2))&&(A=!0,I=3));if(T.length>0)if(g.length>0){if(T.toLowerCase()!==g.toLowerCase())continue}else g=T;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(o){t(o,"path");const g=o.length;if(g===0)return".";let h=0,m,C=!1;const w=o.charCodeAt(0);if(g===1)return f(w)?"\\":o;if(u(w))if(C=!0,u(o.charCodeAt(1))){let I=2,T=I;for(;I<g&&!u(o.charCodeAt(I));)I++;if(I<g&&I!==T){const A=o.slice(T,I);for(T=I;I<g&&u(o.charCodeAt(I));)I++;if(I<g&&I!==T){for(T=I;I<g&&!u(o.charCodeAt(I));)I++;if(I===g)return`\\\\${A}\\${o.slice(T)}\\`;I!==T&&(m=`\\\\${A}\\${o.slice(T,I)}`,h=I)}}}else h=1;else c(w)&&o.charCodeAt(1)===b&&(m=o.slice(0,2),h=2,g>2&&u(o.charCodeAt(2))&&(C=!0,h=3));let D=h<g?d(o.slice(h),!C,"\\",u):"";return D.length===0&&!C&&(D="."),D.length>0&&u(o.charCodeAt(g-1))&&(D+="\\"),m===void 0?C?`\\${D}`:D:C?`${m}\\${D}`:`${m}${D}`},isAbsolute(o){t(o,"path");const g=o.length;if(g===0)return!1;const h=o.charCodeAt(0);return u(h)||g>2&&c(h)&&o.charCodeAt(1)===b&&u(o.charCodeAt(2))},join(...o){if(o.length===0)return".";let g,h;for(let w=0;w<o.length;++w){const D=o[w];t(D,"path"),D.length>0&&(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<g.length&&u(g.charCodeAt(C));)C++;C>=2&&(g=`\\${g.slice(C)}`)}return e.win32.normalize(g)},relative(o,g){if(t(o,"from"),t(g,"to"),o===g)return"";const h=e.win32.resolve(o),m=e.win32.resolve(g);if(h===m||(o=h.toLowerCase(),g=m.toLowerCase(),o===g))return"";let C=0;for(;C<o.length&&o.charCodeAt(C)===v;)C++;let w=o.length;for(;w-1>C&&o.charCodeAt(w-1)===v;)w--;const D=w-C;let I=0;for(;I<g.length&&g.charCodeAt(I)===v;)I++;let T=g.length;for(;T-1>I&&g.charCodeAt(T-1)===v;)T--;const A=T-I,P=D<A?D:A;let N=-1,M=0;for(;M<P;M++){const x=o.charCodeAt(C+M);if(x!==g.charCodeAt(I+M))break;x===v&&(N=M)}if(M!==P){if(N===-1)return m}else{if(A>P){if(g.charCodeAt(I+M)===v)return m.slice(I+M+1);if(M===2)return m.slice(I+M)}D>P&&(o.charCodeAt(C+M)===v?N=M:M===2&&(N=3)),N===-1&&(N=0)}let R="";for(M=C+N+1;M<=w;++M)(M===w||o.charCodeAt(M)===v)&&(R+=R.length===0?"..":"\\..");return I+=N,R.length>0?`${R}${m.slice(I,T)}`:(m.charCodeAt(I)===v&&++I,m.slice(I,T))},toNamespacedPath(o){if(typeof o!="string"||o.length===0)return o;const g=e.win32.resolve(o);if(g.length<=2)return o;if(g.charCodeAt(0)===v){if(g.charCodeAt(1)===v){const h=g.charCodeAt(2);if(h!==a&&h!==p)return`\\\\?\\UNC\\${g.slice(2)}`}}else if(c(g.charCodeAt(0))&&g.charCodeAt(1)===b&&g.charCodeAt(2)===v)return`\\\\?\\${g}`;return o},dirname(o){t(o,"path");const g=o.length;if(g===0)return".";let h=-1,m=0;const C=o.charCodeAt(0);if(g===1)return u(C)?o:".";if(u(C)){if(h=m=1,u(o.charCodeAt(1))){let I=2,T=I;for(;I<g&&!u(o.charCodeAt(I));)I++;if(I<g&&I!==T){for(T=I;I<g&&u(o.charCodeAt(I));)I++;if(I<g&&I!==T){for(T=I;I<g&&!u(o.charCodeAt(I));)I++;if(I===g)return o;I!==T&&(h=m=I+1)}}}}else c(C)&&o.charCodeAt(1)===b&&(h=g>2&&u(o.charCodeAt(2))?3:2,m=h);let w=-1,D=!0;for(let I=g-1;I>=m;--I)if(u(o.charCodeAt(I))){if(!D){w=I;break}}else D=!1;if(w===-1){if(h===-1)return".";w=h}return o.slice(0,w)},basename(o,g){g!==void 0&&t(g,"ext"),t(o,"path");let h=0,m=-1,C=!0,w;if(o.length>=2&&c(o.charCodeAt(0))&&o.charCodeAt(1)===b&&(h=2),g!==void 0&&g.length>0&&g.length<=o.length){if(g===o)return"";let D=g.length-1,I=-1;for(w=o.length-1;w>=h;--w){const T=o.charCodeAt(w);if(u(T)){if(!C){h=w+1;break}}else I===-1&&(C=!1,I=w+1),D>=0&&(T===g.charCodeAt(D)?--D===-1&&(m=w):(D=-1,m=I))}return h===m?m=I:m===-1&&(m=o.length),o.slice(h,m)}for(w=o.length-1;w>=h;--w)if(u(o.charCodeAt(w))){if(!C){h=w+1;break}}else m===-1&&(C=!1,m=w+1);return m===-1?"":o.slice(h,m)},extname(o){t(o,"path");let g=0,h=-1,m=0,C=-1,w=!0,D=0;o.length>=2&&o.charCodeAt(1)===b&&c(o.charCodeAt(0))&&(g=m=2);for(let I=o.length-1;I>=g;--I){const T=o.charCodeAt(I);if(u(T)){if(!w){m=I+1;break}continue}C===-1&&(w=!1,C=I+1),T===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?"":o.slice(h,C)},format:s.bind(null,"\\"),parse(o){t(o,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return g;const h=o.length;let m=0,C=o.charCodeAt(0);if(h===1)return u(C)?(g.root=g.dir=o,g):(g.base=g.name=o,g);if(u(C)){if(m=1,u(o.charCodeAt(1))){let N=2,M=N;for(;N<h&&!u(o.charCodeAt(N));)N++;if(N<h&&N!==M){for(M=N;N<h&&u(o.charCodeAt(N));)N++;if(N<h&&N!==M){for(M=N;N<h&&!u(o.charCodeAt(N));)N++;N===h?m=N:N!==M&&(m=N+1)}}}}else if(c(C)&&o.charCodeAt(1)===b){if(h<=2)return g.root=g.dir=o,g;if(m=2,u(o.charCodeAt(2))){if(h===3)return g.root=g.dir=o,g;m=3}}m>0&&(g.root=o.slice(0,m));let w=-1,D=m,I=-1,T=!0,A=o.length-1,P=0;for(;A>=m;--A){if(C=o.charCodeAt(A),u(C)){if(!T){D=A+1;break}continue}I===-1&&(T=!1,I=A+1),C===p?w===-1?w=A:P!==1&&(P=1):w!==-1&&(P=-1)}return I!==-1&&(w===-1||P===0||P===1&&w===I-1&&w===D+1?g.base=g.name=o.slice(D,I):(g.name=o.slice(D,w),g.base=o.slice(D,I),g.ext=o.slice(w,I))),D>0&&D!==m?g.dir=o.slice(0,D-1):g.dir=g.root,g},sep:"\\",delimiter:";",win32:null,posix:null};const l=(()=>{if(r){const o=/\\/g;return()=>{const g=L.cwd().replace(o,"/");return g.slice(g.indexOf("/"))}}return()=>L.cwd()})();e.posix={resolve(...o){let g="",h=!1;for(let m=o.length-1;m>=-1&&!h;m--){const C=m>=0?o[m]:l();t(C,"path"),C.length!==0&&(g=`${C}/${g}`,h=C.charCodeAt(0)===_)}return g=d(g,!h,"/",f),h?`/${g}`:g.length>0?g:"."},normalize(o){if(t(o,"path"),o.length===0)return".";const g=o.charCodeAt(0)===_,h=o.charCodeAt(o.length-1)===_;return o=d(o,!g,"/",f),o.length===0?g?"/":h?"./":".":(h&&(o+="/"),g?`/${o}`:o)},isAbsolute(o){return t(o,"path"),o.length>0&&o.charCodeAt(0)===_},join(...o){if(o.length===0)return".";let g;for(let h=0;h<o.length;++h){const m=o[h];t(m,"path"),m.length>0&&(g===void 0?g=m:g+=`/${m}`)}return g===void 0?".":e.posix.normalize(g)},relative(o,g){if(t(o,"from"),t(g,"to"),o===g||(o=e.posix.resolve(o),g=e.posix.resolve(g),o===g))return"";const h=1,m=o.length,C=m-h,w=1,D=g.length-w,I=C<D?C:D;let T=-1,A=0;for(;A<I;A++){const N=o.charCodeAt(h+A);if(N!==g.charCodeAt(w+A))break;N===_&&(T=A)}if(A===I)if(D>I){if(g.charCodeAt(w+A)===_)return g.slice(w+A+1);if(A===0)return g.slice(w+A)}else C>I&&(o.charCodeAt(h+A)===_?T=A:A===0&&(T=0));let P="";for(A=h+T+1;A<=m;++A)(A===m||o.charCodeAt(A)===_)&&(P+=P.length===0?"..":"/..");return`${P}${g.slice(w+T)}`},toNamespacedPath(o){return o},dirname(o){if(t(o,"path"),o.length===0)return".";const g=o.charCodeAt(0)===_;let h=-1,m=!0;for(let C=o.length-1;C>=1;--C)if(o.charCodeAt(C)===_){if(!m){h=C;break}}else m=!1;return h===-1?g?"/":".":g&&h===1?"//":o.slice(0,h)},basename(o,g){g!==void 0&&t(g,"ext"),t(o,"path");let h=0,m=-1,C=!0,w;if(g!==void 0&&g.length>0&&g.length<=o.length){if(g===o)return"";let D=g.length-1,I=-1;for(w=o.length-1;w>=0;--w){const T=o.charCodeAt(w);if(T===_){if(!C){h=w+1;break}}else I===-1&&(C=!1,I=w+1),D>=0&&(T===g.charCodeAt(D)?--D===-1&&(m=w):(D=-1,m=I))}return h===m?m=I:m===-1&&(m=o.length),o.slice(h,m)}for(w=o.length-1;w>=0;--w)if(o.charCodeAt(w)===_){if(!C){h=w+1;break}}else m===-1&&(C=!1,m=w+1);return m===-1?"":o.slice(h,m)},extname(o){t(o,"path");let g=-1,h=0,m=-1,C=!0,w=0;for(let D=o.length-1;D>=0;--D){const I=o.charCodeAt(D);if(I===_){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?"":o.slice(g,m)},format:s.bind(null,"/"),parse(o){t(o,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return g;const h=o.charCodeAt(0)===_;let m;h?(g.root="/",m=1):m=0;let C=-1,w=0,D=-1,I=!0,T=o.length-1,A=0;for(;T>=m;--T){const P=o.charCodeAt(T);if(P===_){if(!I){w=T+1;break}continue}D===-1&&(I=!1,D=T+1),P===p?C===-1?C=T:A!==1&&(A=1):C!==-1&&(A=-1)}if(D!==-1){const P=w===0&&h?1:w;C===-1||A===0||A===1&&C===D-1&&C===w+1?g.base=g.name=o.slice(P,D):(g.name=o.slice(P,C),g.base=o.slice(P,D),g.ext=o.slice(C,D))}return w>0?g.dir=o.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=r?e.win32.normalize:e.posix.normalize,e.resolve=r?e.win32.resolve:e.posix.resolve,e.relative=r?e.win32.relative:e.posix.relative,e.dirname=r?e.win32.dirname:e.posix.dirname,e.basename=r?e.win32.basename:e.posix.basename,e.extname=r?e.win32.extname:e.posix.extname,e.sep=r?e.win32.sep:e.posix.sep}),define(se[222],oe([1,0,95,17,11]),function(te,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 S(i){return i.replace(/[\\/]/g,L.posix.sep)}e.toSlashes=S;function p(i){return i.indexOf("/")===-1&&(i=S(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),i}e.toPosixPath=p;function _(i,n=L.posix.sep){if(!i)return"";const t=i.length,r=i.charCodeAt(0);if(E(r)){if(E(i.charCodeAt(1))&&!E(i.charCodeAt(2))){let f=3;const c=f;for(;f<t&&!E(i.charCodeAt(f));f++);if(c!==f&&!E(i.charCodeAt(f+1))){for(f+=1;f<t;f++)if(E(i.charCodeAt(f)))return i.slice(0,f+1).replace(/[\\/]/g,n)}}return n}else if(b(r)&&i.charCodeAt(1)===58)return E(i.charCodeAt(2))?i.slice(0,2)+n:i.slice(0,2);let u=i.indexOf("://");if(u!==-1){for(u+=3;u<t;u++)if(E(i.charCodeAt(u)))return i.slice(0,u+1)}return""}e.getRoot=_;function v(i,n,t,r=L.sep){if(i===n)return!0;if(!i||!n||n.length>i.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)===r&&f--,i.charAt(f)===r}return n.charAt(n.length-1)!==r&&(n+=r),i.indexOf(n)===0}e.isEqualOrParent=v;function b(i){return i>=65&&i<=90||i>=97&&i<=122}e.isWindowsDriveLetter=b;function a(i,n=k.isWindows){return n?b(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}e.hasDriveLetter=a}),define(se[586],oe([1,0,71,95,17,11]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const S=[void 0,[]];function p(c,d,s=0,l=0){const o=d;return o.values&&o.values.length>1?_(c,o.values,s,l):v(c,d,s,l)}e.scoreFuzzy2=p;function _(c,d,s,l){let o=0;const g=[];for(const h of d){const[m,C]=v(c,h,s,l);if(typeof m!="number")return S;o+=m,g.push(...C)}return[o,a(g)]}function v(c,d,s,l){const o=(0,L.fuzzyScore)(d.original,d.originalLowercase,s,c,c.toLowerCase(),l,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return o?[o[0],(0,L.createMatches)(o)]:S}const b=Object.freeze({score:0});function a(c){const d=c.sort((o,g)=>o.start-g.start),s=[];let l;for(const o of d)!l||!i(l,o)?(l=o,s.push(o)):(l.start=Math.min(l.start,o.start),l.end=Math.max(l.end,o.end));return s}function i(c,d){return!(c.end<d.start||d.end<c.start)}function n(c){return c.startsWith('"')&&c.endsWith('"')}const t=" ";function r(c){typeof c!="string"&&(c="");const d=c.toLowerCase(),{pathNormalized:s,normalized:l,normalizedLowercase:o}=u(c),g=s.indexOf(k.sep)>=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:T,normalizedLowercase:A}=u(w);T&&(m||(m=[]),m.push({original:w,originalLowercase:w.toLowerCase(),pathNormalized:I,normalized:T,normalizedLowercase:A,expectContiguousMatch:D}))}return{original:c,originalLowercase:d,pathNormalized:s,normalized:l,normalizedLowercase:o,values:m,containsPathSeparator:g,expectContiguousMatch:h}}e.prepareQuery=r;function u(c){let d;y.isWindows?d=c.replace(/\//g,k.sep):d=c.replace(/\\/g,k.sep);const s=(0,E.stripWildcards)(d).replace(/\s|"/g,"");return{pathNormalized:d,normalized:s,normalizedLowercase:s.toLowerCase()}}function f(c){return Array.isArray(c)?r(c.map(d=>d.original).join(t)):r(c.original)}e.pieceToQuery=f}),define(se[315],oe([1,0,14,222,53,95,17,11]),function(te,e,L,k,y,E,S,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 _="[/\\\\]",v="[^/\\\\]",b=/\//g;function a(O,B){switch(O){case 0:return"";case 1:return`${v}*?`;default:return`(?:${_}|${v}+${_}${B?`|${_}${v}+`:""})*?`}}function i(O,B){if(!O)return[];const W=[];let V=!1,K=!1,F="";for(const q of O){switch(q){case B:if(!V&&!K){W.push(F),F="";continue}break;case"{":V=!0;break;case"}":V=!1;break;case"[":K=!0;break;case"]":K=!1;break}F+=q}return F&&W.push(F),W}e.splitGlobAware=i;function n(O){if(!O)return"";let B="";const W=i(O,e.GLOB_SPLIT);if(W.every(V=>V===e.GLOBSTAR))B=".*";else{let V=!1;W.forEach((K,F)=>{if(K===e.GLOBSTAR){if(V)return;B+=a(2,F===W.length-1)}else{let q=!1,ie="",ae=!1,ne="";for(const $ of K){if($!=="}"&&q){ie+=$;continue}if(ae&&($!=="]"||!ne)){let J;$==="-"?J=$:($==="^"||$==="!")&&!ne?J="^":$===e.GLOB_SPLIT?J="":J=(0,p.escapeRegExpCharacters)($),ne+=J;continue}switch($){case"{":q=!0;continue;case"[":ae=!0;continue;case"}":{const Q=`(?:${i(ie,",").map(re=>n(re)).join("|")})`;B+=Q,q=!1,ie="";break}case"]":{B+="["+ne+"]",ae=!1,ne="";break}case"?":B+=v;continue;case"*":B+=a(1);continue;default:B+=(0,p.escapeRegExpCharacters)($)}}F<W.length-1&&(W[F+1]!==e.GLOBSTAR||F+2<W.length)&&(B+=_)}V=K===e.GLOBSTAR})}return B}const t=/^\*\*\/\*\.[\w\.-]+$/,r=/^\*\*\/([\w\.-]+)\/?$/,u=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,f=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,c=/^\*\*((\/[\w\.-]+)+)\/?$/,d=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,s=new y.LRUCache(1e4),l=function(){return!1},o=function(){return null};function g(O,B){if(!O)return o;let W;typeof O!="string"?W=O.pattern:W=O,W=W.trim();const V=`${W}_${!!B.trimForExclusions}`;let K=s.get(V);if(K)return h(K,O);let F;return t.test(W)?K=C(W.substr(4),W):(F=r.exec(m(W,B)))?K=w(F[1],W):(B.trimForExclusions?f:u).test(W)?K=D(W,B):(F=c.exec(m(W,B)))?K=I(F[1].substr(1),W,!0):(F=d.exec(m(W,B)))?K=I(F[1],W,!1):K=T(W),s.set(V,K),h(K,O)}function h(O,B){if(typeof B=="string")return O;const W=function(V,K){return(0,k.isEqualOrParent)(V,B.base,!S.isLinux)?O((0,p.ltrim)(V.substr(B.base.length),E.sep),K):null};return W.allBasenames=O.allBasenames,W.allPaths=O.allPaths,W.basenames=O.basenames,W.patterns=O.patterns,W}function m(O,B){return B.trimForExclusions&&O.endsWith("/**")?O.substr(0,O.length-2):O}function C(O,B){return function(W,V){return typeof W=="string"&&W.endsWith(O)?B:null}}function w(O,B){const W=`/${O}`,V=`\\${O}`,K=function(q,ie){return typeof q!="string"?null:ie?ie===O?B:null:q===O||q.endsWith(W)||q.endsWith(V)?B:null},F=[O];return K.basenames=F,K.patterns=[B],K.allBasenames=F,K}function D(O,B){const W=x(O.slice(1,-1).split(",").map(ie=>g(ie,B)).filter(ie=>ie!==o),O),V=W.length;if(!V)return o;if(V===1)return W[0];const K=function(ie,ae){for(let ne=0,$=W.length;ne<$;ne++)if(W[ne](ie,ae))return O;return null},F=W.find(ie=>!!ie.allBasenames);F&&(K.allBasenames=F.allBasenames);const q=W.reduce((ie,ae)=>ae.allPaths?ie.concat(ae.allPaths):ie,[]);return q.length&&(K.allPaths=q),K}function I(O,B,W){const V=E.sep===E.posix.sep,K=V?O:O.replace(b,E.sep),F=E.sep+K,q=E.posix.sep+O;let ie;return W?ie=function(ae,ne){return typeof ae=="string"&&(ae===K||ae.endsWith(F)||!V&&(ae===O||ae.endsWith(q)))?B:null}:ie=function(ae,ne){return typeof ae=="string"&&(ae===K||!V&&ae===O)?B:null},ie.allPaths=[(W?"*/":"./")+O],ie}function T(O){try{const B=new RegExp(`^${n(O)}$`);return function(W){return B.lastIndex=0,typeof W=="string"&&B.test(W)?O:null}}catch{return o}}function A(O,B,W){return!O||typeof B!="string"?!1:P(O)(B,void 0,W)}e.match=A;function P(O,B={}){if(!O)return l;if(typeof O=="string"||N(O)){const W=g(O,B);if(W===o)return l;const V=function(K,F){return!!W(K,F)};return W.allBasenames&&(V.allBasenames=W.allBasenames),W.allPaths&&(V.allPaths=W.allPaths),V}return M(O,B)}e.parse=P;function N(O){const B=O;return B?typeof B.base=="string"&&typeof B.pattern=="string":!1}e.isRelativePattern=N;function M(O,B){const W=x(Object.getOwnPropertyNames(O).map(ie=>R(ie,O[ie],B)).filter(ie=>ie!==o)),V=W.length;if(!V)return o;if(!W.some(ie=>!!ie.requiresSiblings)){if(V===1)return W[0];const ie=function($,J){let Q;for(let re=0,de=W.length;re<de;re++){const he=W[re]($,J);if(typeof he=="string")return he;(0,L.isThenable)(he)&&(Q||(Q=[]),Q.push(he))}return Q?(async()=>{for(const re of Q){const de=await re;if(typeof de=="string")return de}return null})():null},ae=W.find($=>!!$.allBasenames);ae&&(ie.allBasenames=ae.allBasenames);const ne=W.reduce(($,J)=>J.allPaths?$.concat(J.allPaths):$,[]);return ne.length&&(ie.allPaths=ne),ie}const K=function(ie,ae,ne){let $,J;for(let Q=0,re=W.length;Q<re;Q++){const de=W[Q];de.requiresSiblings&&ne&&(ae||(ae=(0,E.basename)(ie)),$||($=ae.substr(0,ae.length-(0,E.extname)(ie).length)));const he=de(ie,ae,$,ne);if(typeof he=="string")return he;(0,L.isThenable)(he)&&(J||(J=[]),J.push(he))}return J?(async()=>{for(const Q of J){const re=await Q;if(typeof re=="string")return re}return null})():null},F=W.find(ie=>!!ie.allBasenames);F&&(K.allBasenames=F.allBasenames);const q=W.reduce((ie,ae)=>ae.allPaths?ie.concat(ae.allPaths):ie,[]);return q.length&&(K.allPaths=q),K}function R(O,B,W){if(B===!1)return o;const V=g(O,W);if(V===o)return o;if(typeof B=="boolean")return V;if(B){const K=B.when;if(typeof K=="string"){const F=(q,ie,ae,ne)=>{if(!ne||!V(q,ie))return null;const $=K.replace("$(basename)",()=>ae),J=ne($);return(0,L.isThenable)(J)?J.then(Q=>Q?O:null):J?O:null};return F.requiresSiblings=!0,F}}return V}function x(O,B){const W=O.filter(ie=>!!ie.basenames);if(W.length<2)return O;const V=W.reduce((ie,ae)=>{const ne=ae.basenames;return ne?ie.concat(ne):ie},[]);let K;if(B){K=[];for(let ie=0,ae=V.length;ie<ae;ie++)K.push(B)}else K=W.reduce((ie,ae)=>{const ne=ae.patterns;return ne?ie.concat(ne):ie},[]);const F=function(ie,ae){if(typeof ie!="string")return null;if(!ae){let $;for($=ie.length;$>0;$--){const J=ie.charCodeAt($-1);if(J===47||J===92)break}ae=ie.substr($)}const ne=V.indexOf(ae);return ne!==-1?K[ne]:null};F.basenames=V,F.patterns=K,F.allBasenames=V;const q=O.filter(ie=>!ie.basenames);return q.push(F),q}}),define(se[587],oe([1,0,222,17]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function y(S,p=k.isWindows){return(0,L.hasDriveLetter)(S,p)?S.charAt(0).toUpperCase()+S.slice(1):S}e.normalizeDriveLetter=y;let E=Object.create(null)}),define(se[22],oe([1,0,95,17]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const y=/^\w[\w\d+.-]*$/,E=/^\//,S=/^\/\//;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(S.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 _(h,m){return!h&&!m?"file":h}function v(h,m){switch(h){case"https":case"http":case"file":m?m[0]!==a&&(m=a+m):m=a;break}return m}const b="",a="/",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,T=!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=_(m,T),this.authority=C||b,this.path=v(this.scheme,w||b),this.query=D||b,this.fragment=I||b,p(this,T))}get fsPath(){return d(this,!1)}with(m){if(!m)return this;let{scheme:C,authority:w,path:D,query:I,fragment:T}=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),T===void 0?T=this.fragment:T===null&&(T=b),C===this.scheme&&w===this.authority&&D===this.path&&I===this.query&&T===this.fragment?this:new r(C,w,D,I,T)}static parse(m,C=!1){const w=i.exec(m);return w?new r(w[2]||b,g(w[4]||b),g(w[5]||b),g(w[7]||b),g(w[9]||b),C):new r(b,b,b,b,b)}static file(m){let C=b;if(k.isWindows&&(m=m.replace(/\\/g,a)),m[0]===a&&m[1]===a){const w=m.indexOf(a,2);w===-1?(C=m.substring(2),m=a):(C=m.substring(2,w),m=m.substring(w)||a)}return new r("file",C,m,b,b)}static from(m,C){return new r(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 s(this,m)}toJSON(){return this}static revive(m){var C,w;if(m){if(m instanceof n)return m;{const D=new r(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 r 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?s(this,!0):(this._formatted||(this._formatted=s(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<h.length;I++){const T=h.charCodeAt(I);if(T>=97&&T<=122||T>=65&&T<=90||T>=48&&T<=57||T===45||T===46||T===95||T===126||m&&T===47||C&&T===91||C&&T===93||C&&T===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[T];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;C<h.length;C++){const w=h.charCodeAt(C);w===35||w===63?(m===void 0&&(m=h.substr(0,C)),m+=u[w]):m!==void 0&&(m+=h[C])}return m!==void 0?m:h}function d(h,m){let C;return h.authority&&h.path.length>1&&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 s(h,m){const C=m?c:f;let w="",{scheme:D,authority:I,path:T,query:A,fragment:P}=h;if(D&&(w+=D,w+=":"),(I||D==="file")&&(w+=a,w+=a),I){let N=I.indexOf("@");if(N!==-1){const M=I.substr(0,N);I=I.substr(N+1),N=M.lastIndexOf(":"),N===-1?w+=C(M,!1,!1):(w+=C(M.substr(0,N),!1,!1),w+=":",w+=C(M.substr(N+1),!1,!0)),w+="@"}I=I.toLowerCase(),N=I.lastIndexOf(":"),N===-1?w+=C(I,!1,!0):(w+=C(I.substr(0,N),!1,!0),w+=I.substr(N))}if(T){if(T.length>=3&&T.charCodeAt(0)===47&&T.charCodeAt(2)===58){const N=T.charCodeAt(1);N>=65&&N<=90&&(T=`/${String.fromCharCode(N+32)}:${T.substr(3)}`)}else if(T.length>=2&&T.charCodeAt(1)===58){const N=T.charCodeAt(0);N>=65&&N<=90&&(T=`${String.fromCharCode(N+32)}:${T.substr(2)}`)}w+=C(T,!0,!1)}return A&&(w+="?",w+=C(A,!1,!1)),P&&(w+="#",w+=m?P:f(P,!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 o=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function g(h){return h.match(o)?h.replace(o,m=>l(m)):h}}),define(se[223],oe([1,0,144,22]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function y(_){return JSON.stringify(_,S)}e.stringify=y;function E(_){let v=JSON.parse(_);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(_,v=0){if(!_||v>200)return _;if(typeof _=="object"){switch(_.$mid){case 1:return k.URI.revive(_);case 2:return new RegExp(_.source,_.flags);case 17:return new Date(_.source)}if(_ instanceof L.VSBuffer||_ instanceof Uint8Array)return _;if(Array.isArray(_))for(let b=0;b<_.length;++b)_[b]=p(_[b],v+1);else for(const b in _)Object.hasOwnProperty.call(_,b)&&(_[b]=p(_[b],v+1))}return _}e.revive=p}),define(se[47],oe([1,0,12,17,11,22]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.VSCODE_AUTHORITY=e.RemoteAuthorities=e.connectionTokenQueryName=e.matchesSomeScheme=e.matchesScheme=e.Schemas=void 0;var S;(function(i){i.inMemory="inmemory",i.vscode="vscode",i.internal="private",i.walkThrough="walkThrough",i.walkThroughSnippet="walkThroughSnippet",i.http="http",i.https="https",i.file="file",i.mailto="mailto",i.untitled="untitled",i.data="data",i.command="command",i.vscodeRemote="vscode-remote",i.vscodeRemoteResource="vscode-remote-resource",i.vscodeManagedRemoteResource="vscode-managed-remote-resource",i.vscodeUserData="vscode-userdata",i.vscodeCustomEditor="vscode-custom-editor",i.vscodeNotebookCell="vscode-notebook-cell",i.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",i.vscodeNotebookCellOutput="vscode-notebook-cell-output",i.vscodeInteractiveInput="vscode-interactive-input",i.vscodeSettings="vscode-settings",i.vscodeWorkspaceTrust="vscode-workspace-trust",i.vscodeTerminal="vscode-terminal",i.vscodeChatSesssion="vscode-chat-editor",i.webviewPanel="webview-panel",i.vscodeWebview="vscode-webview",i.extension="extension",i.vscodeFileResource="vscode-file",i.tmp="tmp",i.vsls="vsls",i.vscodeSourceControl="vscode-scm"})(S||(e.Schemas=S={}));function p(i,n){return E.URI.isUri(i)?(0,y.equalsIgnoreCase)(i.scheme,n):(0,y.startsWithIgnoreCase)(i,n+":")}e.matchesScheme=p;function _(i,...n){return n.some(t=>p(i,t))}e.matchesSomeScheme=_,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=`/${S.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 r=this._hosts[t];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);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:S.vscodeRemoteResource,authority:`${r}:${u}`,path:this._remoteResourcesPath,query:c})}}e.RemoteAuthorities=new v,e.VSCODE_AUTHORITY="vscode-app";class b{uriToBrowserUri(n){return n.scheme===S.vscodeRemote?e.RemoteAuthorities.rewrite(n):n.scheme===S.file&&(k.isNative||k.webWorkerOrigin===`${S.vscodeFileResource}://${b.FALLBACK_AUTHORITY}`)?n.with({scheme:S.vscodeFileResource,authority:n.authority||b.FALLBACK_AUTHORITY,query:null,fragment:null}):n}}b.FALLBACK_AUTHORITY=e.VSCODE_AUTHORITY,e.FileAccess=new b;var a;(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 r(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=r;function u(f,c,d){if(!globalThis.crossOriginIsolated)return;const s=c&&d?"3":d?"2":"1";f instanceof URLSearchParams?f.set(t,s):f[t]=s}i.addSearchParam=u})(a||(e.COI=a={}))}),define(se[7],oe([1,0,54,219,46,67,14,12,6,316,2,47,17,111,44]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";var r;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.createStyleSheet2=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,r=function(){const Le=new Map;(0,t.ensureCodeWindow)(t.mainWindow,1),Le.set(t.mainWindow.vscodeWindowId,{window:t.mainWindow,disposables:new b.DisposableStore});const ye=new _.Emitter,Me=new _.Emitter,Te=new _.Emitter;return{onDidRegisterWindow:ye.event,onWillUnregisterWindow:Te.event,onDidUnregisterWindow:Me.event,registerWindow(we){if(Le.has(we.vscodeWindowId))return b.Disposable.None;const Re=new b.DisposableStore,Oe={window:we,disposables:Re.add(new b.DisposableStore)};return Le.set(we.vscodeWindowId,Oe),Re.add((0,b.toDisposable)(()=>{Le.delete(we.vscodeWindowId),Me.fire(we)})),Re.add(c(we,e.EventType.BEFORE_UNLOAD,()=>{Te.fire(we)})),ye.fire(Oe),Re},getWindows(){return Le.values()},getWindowsCount(){return Le.size},getWindowId(we){return we.vscodeWindowId},hasWindow(we){return Le.has(we)},getWindowById(we){return Le.get(we)},getWindow(we){var Re;const Oe=we;if(!((Re=Oe?.ownerDocument)===null||Re===void 0)&&Re.defaultView)return Oe.ownerDocument.defaultView.window;const Ve=we;return Ve?.view?Ve.view.window:t.mainWindow},getDocument(we){const Re=we;return(0,e.getWindow)(Re).document}}}(),e.registerWindow=r.registerWindow,e.getWindow=r.getWindow,e.getDocument=r.getDocument,e.getWindows=r.getWindows,e.getWindowsCount=r.getWindowsCount,e.getWindowId=r.getWindowId,e.getWindowById=r.getWindowById,e.hasWindow=r.hasWindow,e.onDidRegisterWindow=r.onDidRegisterWindow,e.onWillUnregisterWindow=r.onWillUnregisterWindow,e.onDidUnregisterWindow=r.onDidUnregisterWindow;function u(Le){for(;Le.firstChild;)Le.firstChild.remove()}e.clearNode=u;class f{constructor(ye,Me,Te,we){this._node=ye,this._type=Me,this._handler=Te,this._options=we||!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(Le,ye,Me,Te){return new f(Le,ye,Me,Te)}e.addDisposableListener=c;function d(Le,ye){return function(Me){return ye(new E.StandardMouseEvent(Le,Me))}}function s(Le){return function(ye){return Le(new y.StandardKeyboardEvent(ye))}}const l=function(ye,Me,Te,we){let Re=Te;return Me==="click"||Me==="mousedown"?Re=d((0,e.getWindow)(ye),Te):(Me==="keydown"||Me==="keypress"||Me==="keyup")&&(Re=s(Te)),c(ye,Me,Re,we)};e.addStandardDisposableListener=l;const o=function(ye,Me,Te){const we=d((0,e.getWindow)(ye),Me);return h(ye,we,Te)};e.addStandardDisposableGenericMouseDownListener=o;const g=function(ye,Me,Te){const we=d((0,e.getWindow)(ye),Me);return m(ye,we,Te)};e.addStandardDisposableGenericMouseUpListener=g;function h(Le,ye,Me){return c(Le,i.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,ye,Me)}e.addDisposableGenericMouseDownListener=h;function m(Le,ye,Me){return c(Le,i.isIOS&&k.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,ye,Me)}e.addDisposableGenericMouseUpListener=m;function C(Le,ye,Me){return(0,S._runWhenIdle)(Le,ye,Me)}e.runWhenWindowIdle=C;class w extends S.AbstractIdleValue{constructor(ye,Me){super(ye,Me)}}e.WindowIdleValue=w;class D extends S.IntervalTimer{constructor(ye){super(),this.defaultTarget=ye&&(0,e.getWindow)(ye)}cancelAndSet(ye,Me,Te){return super.cancelAndSet(ye,Me,Te??this.defaultTarget)}}e.WindowIntervalTimer=D;class I{constructor(ye,Me=0){this._runner=ye,this.priority=Me,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(ye){(0,p.onUnexpectedError)(ye)}}static sort(ye,Me){return Me.priority-ye.priority}}(function(){const Le=new Map,ye=new Map,Me=new Map,Te=new Map,we=Re=>{var Oe;Me.set(Re,!1);const Ve=(Oe=Le.get(Re))!==null&&Oe!==void 0?Oe:[];for(ye.set(Re,Ve),Le.set(Re,[]),Te.set(Re,!0);Ve.length>0;)Ve.sort(I.sort),Ve.shift().execute();Te.set(Re,!1)};e.scheduleAtNextAnimationFrame=(Re,Oe,Ve=0)=>{const $e=(0,e.getWindowId)(Re),Ze=new I(Oe,Ve);let Ge=Le.get($e);return Ge||(Ge=[],Le.set($e,Ge)),Ge.push(Ze),Me.get($e)||(Me.set($e,!0),Re.requestAnimationFrame(()=>we($e))),Ze},e.runAtThisOrScheduleAtNextAnimationFrame=(Re,Oe,Ve)=>{const $e=(0,e.getWindowId)(Re);if(Te.get($e)){const Ze=new I(Oe,Ve);let Ge=ye.get($e);return Ge||(Ge=[],ye.set($e,Ge)),Ge.push(Ze),Ze}else return(0,e.scheduleAtNextAnimationFrame)(Re,Oe,Ve)}})();function T(Le){return(0,e.getWindow)(Le).getComputedStyle(Le,null)}e.getComputedStyle=T;function A(Le,ye){const Me=(0,e.getWindow)(Le),Te=Me.document;if(Le!==Te.body)return new N(Le.clientWidth,Le.clientHeight);if(i.isIOS&&Me?.visualViewport)return new N(Me.visualViewport.width,Me.visualViewport.height);if(Me?.innerWidth&&Me.innerHeight)return new N(Me.innerWidth,Me.innerHeight);if(Te.body&&Te.body.clientWidth&&Te.body.clientHeight)return new N(Te.body.clientWidth,Te.body.clientHeight);if(Te.documentElement&&Te.documentElement.clientWidth&&Te.documentElement.clientHeight)return new N(Te.documentElement.clientWidth,Te.documentElement.clientHeight);if(ye)return A(ye);throw new Error("Unable to figure out browser width and height")}e.getClientArea=A;class P{static convertToPixels(ye,Me){return parseFloat(Me)||0}static getDimension(ye,Me,Te){const we=T(ye),Re=we?we.getPropertyValue(Me):"0";return P.convertToPixels(ye,Re)}static getBorderLeftWidth(ye){return P.getDimension(ye,"border-left-width","borderLeftWidth")}static getBorderRightWidth(ye){return P.getDimension(ye,"border-right-width","borderRightWidth")}static getBorderTopWidth(ye){return P.getDimension(ye,"border-top-width","borderTopWidth")}static getBorderBottomWidth(ye){return P.getDimension(ye,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(ye){return P.getDimension(ye,"padding-left","paddingLeft")}static getPaddingRight(ye){return P.getDimension(ye,"padding-right","paddingRight")}static getPaddingTop(ye){return P.getDimension(ye,"padding-top","paddingTop")}static getPaddingBottom(ye){return P.getDimension(ye,"padding-bottom","paddingBottom")}static getMarginLeft(ye){return P.getDimension(ye,"margin-left","marginLeft")}static getMarginTop(ye){return P.getDimension(ye,"margin-top","marginTop")}static getMarginRight(ye){return P.getDimension(ye,"margin-right","marginRight")}static getMarginBottom(ye){return P.getDimension(ye,"margin-bottom","marginBottom")}}class N{constructor(ye,Me){this.width=ye,this.height=Me}with(ye=this.width,Me=this.height){return ye!==this.width||Me!==this.height?new N(ye,Me):this}static is(ye){return typeof ye=="object"&&typeof ye.height=="number"&&typeof ye.width=="number"}static lift(ye){return ye instanceof N?ye:new N(ye.width,ye.height)}static equals(ye,Me){return ye===Me?!0:!ye||!Me?!1:ye.width===Me.width&&ye.height===Me.height}}e.Dimension=N,N.None=new N(0,0);function M(Le){let ye=Le.offsetParent,Me=Le.offsetTop,Te=Le.offsetLeft;for(;(Le=Le.parentNode)!==null&&Le!==Le.ownerDocument.body&&Le!==Le.ownerDocument.documentElement;){Me-=Le.scrollTop;const we=ae(Le)?null:T(Le);we&&(Te-=we.direction!=="rtl"?Le.scrollLeft:-Le.scrollLeft),Le===ye&&(Te+=P.getBorderLeftWidth(Le),Me+=P.getBorderTopWidth(Le),Me+=Le.offsetTop,Te+=Le.offsetLeft,ye=Le.offsetParent)}return{left:Te,top:Me}}e.getTopLeftOffset=M;function R(Le,ye,Me){typeof ye=="number"&&(Le.style.width=`${ye}px`),typeof Me=="number"&&(Le.style.height=`${Me}px`)}e.size=R;function x(Le){const ye=Le.getBoundingClientRect(),Me=(0,e.getWindow)(Le);return{left:ye.left+Me.scrollX,top:ye.top+Me.scrollY,width:ye.width,height:ye.height}}e.getDomNodePagePosition=x;function O(Le){let ye=Le,Me=1;do{const Te=T(ye).zoom;Te!=null&&Te!=="1"&&(Me*=Te),ye=ye.parentElement}while(ye!==null&&ye!==ye.ownerDocument.documentElement);return Me}e.getDomNodeZoomLevel=O;function B(Le){const ye=P.getMarginLeft(Le)+P.getMarginRight(Le);return Le.offsetWidth+ye}e.getTotalWidth=B;function W(Le){const ye=P.getBorderLeftWidth(Le)+P.getBorderRightWidth(Le),Me=P.getPaddingLeft(Le)+P.getPaddingRight(Le);return Le.offsetWidth-ye-Me}e.getContentWidth=W;function V(Le){const ye=P.getBorderTopWidth(Le)+P.getBorderBottomWidth(Le),Me=P.getPaddingTop(Le)+P.getPaddingBottom(Le);return Le.offsetHeight-ye-Me}e.getContentHeight=V;function K(Le){const ye=P.getMarginTop(Le)+P.getMarginBottom(Le);return Le.offsetHeight+ye}e.getTotalHeight=K;function F(Le,ye){return!!ye?.contains(Le)}e.isAncestor=F;function q(Le,ye,Me){for(;Le&&Le.nodeType===Le.ELEMENT_NODE;){if(Le.classList.contains(ye))return Le;if(Me){if(typeof Me=="string"){if(Le.classList.contains(Me))return null}else if(Le===Me)return null}Le=Le.parentNode}return null}e.findParentWithClass=q;function ie(Le,ye,Me){return!!q(Le,ye,Me)}e.hasParentWithClass=ie;function ae(Le){return Le&&!!Le.host&&!!Le.mode}e.isShadowRoot=ae;function ne(Le){return!!$(Le)}e.isInShadowDOM=ne;function $(Le){for(var ye;Le.parentNode;){if(Le===((ye=Le.ownerDocument)===null||ye===void 0?void 0:ye.body))return null;Le=Le.parentNode}return ae(Le)?Le:null}e.getShadowRoot=$;function J(){let Le=de().activeElement;for(;Le?.shadowRoot;)Le=Le.shadowRoot.activeElement;return Le}e.getActiveElement=J;function Q(Le){return J()===Le}e.isActiveElement=Q;function re(Le){return F(J(),Le)}e.isAncestorOfActiveElement=re;function de(){var Le;return(0,e.getWindowsCount)()<=1?t.mainWindow.document:(Le=Array.from((0,e.getWindows)()).map(({window:Me})=>Me.document).find(Me=>Me.hasFocus()))!==null&&Le!==void 0?Le:t.mainWindow.document}e.getActiveDocument=de;function he(){var Le,ye;return(ye=(Le=de().defaultView)===null||Le===void 0?void 0:Le.window)!==null&&ye!==void 0?ye:t.mainWindow}e.getActiveWindow=he;const me=new Map;function X(){return new U}e.createStyleSheet2=X;class U{constructor(){this._currentCssStyle="",this._styleSheet=void 0}setStyle(ye){ye!==this._currentCssStyle&&(this._currentCssStyle=ye,this._styleSheet?this._styleSheet.innerText=ye:this._styleSheet=G(t.mainWindow.document.head,Me=>Me.innerText=ye))}dispose(){this._styleSheet&&(u(this._styleSheet),this._styleSheet=void 0)}}function G(Le=t.mainWindow.document.head,ye,Me){const Te=document.createElement("style");if(Te.type="text/css",Te.media="screen",ye?.(Te),Le.appendChild(Te),Me&&Me.add((0,b.toDisposable)(()=>Le.removeChild(Te))),Le===t.mainWindow.document.head){const we=new Set;me.set(Te,we);for(const{window:Re,disposables:Oe}of(0,e.getWindows)()){if(Re===t.mainWindow)continue;const Ve=Oe.add(z(Te,we,Re));Me?.add(Ve)}}return Te}e.createStyleSheet=G;function z(Le,ye,Me){var Te,we;const Re=new b.DisposableStore,Oe=Le.cloneNode(!0);Me.document.head.appendChild(Oe),Re.add((0,b.toDisposable)(()=>Me.document.head.removeChild(Oe)));for(const Ve of j(Le))(Te=Oe.sheet)===null||Te===void 0||Te.insertRule(Ve.cssText,(we=Oe.sheet)===null||we===void 0?void 0:we.cssRules.length);return Re.add(e.sharedMutationObserver.observe(Le,Re,{childList:!0})(()=>{Oe.textContent=Le.textContent})),ye.add(Oe),Re.add((0,b.toDisposable)(()=>ye.delete(Oe))),Re}e.sharedMutationObserver=new class{constructor(){this.mutationObservers=new Map}observe(Le,ye,Me){let Te=this.mutationObservers.get(Le);Te||(Te=new Map,this.mutationObservers.set(Le,Te));const we=(0,n.hash)(Me);let Re=Te.get(we);if(Re)Re.users+=1;else{const Oe=new _.Emitter,Ve=new MutationObserver(Ze=>Oe.fire(Ze));Ve.observe(Le,Me);const $e=Re={users:1,observer:Ve,onDidMutate:Oe.event};ye.add((0,b.toDisposable)(()=>{$e.users-=1,$e.users===0&&(Oe.dispose(),Ve.disconnect(),Te?.delete(we),Te?.size===0&&this.mutationObservers.delete(Le))})),Te.set(we,Re)}return Re.onDidMutate}};let H=null;function Y(){return H||(H=G()),H}function j(Le){var ye,Me;return!((ye=Le?.sheet)===null||ye===void 0)&&ye.rules?Le.sheet.rules:!((Me=Le?.sheet)===null||Me===void 0)&&Me.cssRules?Le.sheet.cssRules:[]}function Z(Le,ye,Me=Y()){var Te,we;if(!(!Me||!ye)){(Te=Me.sheet)===null||Te===void 0||Te.insertRule(`${Le} {${ye}}`,0);for(const Re of(we=me.get(Me))!==null&&we!==void 0?we:[])Z(Le,ye,Re)}}e.createCSSRule=Z;function ee(Le,ye=Y()){var Me,Te;if(!ye)return;const we=j(ye),Re=[];for(let Oe=0;Oe<we.length;Oe++){const Ve=we[Oe];le(Ve)&&Ve.selectorText.indexOf(Le)!==-1&&Re.push(Oe)}for(let Oe=Re.length-1;Oe>=0;Oe--)(Me=ye.sheet)===null||Me===void 0||Me.deleteRule(Re[Oe]);for(const Oe of(Te=me.get(ye))!==null&&Te!==void 0?Te:[])ee(Le,Oe)}e.removeCSSRulesContainingSelector=ee;function le(Le){return typeof Le.selectorText=="string"}function ue(Le){return Le instanceof MouseEvent||Le instanceof(0,e.getWindow)(Le).MouseEvent}e.isMouseEvent=ue;function ce(Le){return Le instanceof KeyboardEvent||Le instanceof(0,e.getWindow)(Le).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 pe(Le){const ye=Le;return!!(ye&&typeof ye.preventDefault=="function"&&typeof ye.stopPropagation=="function")}e.isEventLike=pe,e.EventHelper={stop:(Le,ye)=>(Le.preventDefault(),ye&&Le.stopPropagation(),Le)};function ve(Le){const ye=[];for(let Me=0;Le&&Le.nodeType===Le.ELEMENT_NODE;Me++)ye[Me]=Le.scrollTop,Le=Le.parentNode;return ye}e.saveParentsScrollTop=ve;function Ce(Le,ye){for(let Me=0;Le&&Le.nodeType===Le.ELEMENT_NODE;Me++)Le.scrollTop!==ye[Me]&&(Le.scrollTop=ye[Me]),Le=Le.parentNode}e.restoreParentsScrollTop=Ce;class Se extends b.Disposable{static hasFocusWithin(ye){if(ye instanceof HTMLElement){const Me=$(ye),Te=Me?Me.activeElement:ye.ownerDocument.activeElement;return F(Te,ye)}else{const Me=ye;return F(Me.document.activeElement,Me.document)}}constructor(ye){super(),this._onDidFocus=this._register(new _.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new _.Emitter),this.onDidBlur=this._onDidBlur.event;let Me=Se.hasFocusWithin(ye),Te=!1;const we=()=>{Te=!1,Me||(Me=!0,this._onDidFocus.fire())},Re=()=>{Me&&(Te=!0,(ye instanceof HTMLElement?(0,e.getWindow)(ye):ye).setTimeout(()=>{Te&&(Te=!1,Me=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Se.hasFocusWithin(ye)!==Me&&(Me?Re():we())},this._register(c(ye,e.EventType.FOCUS,we,!0)),this._register(c(ye,e.EventType.BLUR,Re,!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 _e(Le){return new Se(Le)}e.trackFocus=_e;function Ee(Le,ye){return Le.after(ye),ye}e.after=Ee;function Ae(Le,...ye){if(Le.append(...ye),ye.length===1&&typeof ye[0]!="string")return ye[0]}e.append=Ae;function xe(Le,ye){return Le.insertBefore(ye,Le.firstChild),ye}e.prepend=xe;function Be(Le,...ye){Le.innerText="",Ae(Le,...ye)}e.reset=Be;const De=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ie;(function(Le){Le.HTML="http://www.w3.org/1999/xhtml",Le.SVG="http://www.w3.org/2000/svg"})(Ie||(e.Namespace=Ie={}));function fe(Le,ye,Me,...Te){const we=De.exec(ye);if(!we)throw new Error("Bad use of emmet");const Re=we[1]||"div";let Oe;return Le!==Ie.HTML?Oe=document.createElementNS(Le,Re):Oe=document.createElement(Re),we[3]&&(Oe.id=we[3]),we[4]&&(Oe.className=we[4].replace(/\./g," ").trim()),Me&&Object.entries(Me).forEach(([Ve,$e])=>{typeof $e>"u"||(/^on\w+$/.test(Ve)?Oe[Ve]=$e:Ve==="selected"?$e&&Oe.setAttribute(Ve,"true"):Oe.setAttribute(Ve,$e))}),Oe.append(...Te),Oe}function be(Le,ye,...Me){return fe(Ie.HTML,Le,ye,...Me)}e.$=be,be.SVG=function(Le,ye,...Me){return fe(Ie.SVG,Le,ye,...Me)};function Ne(Le,...ye){Le?Pe(...ye):ze(...ye)}e.setVisibility=Ne;function Pe(...Le){for(const ye of Le)ye.style.display="",ye.removeAttribute("aria-hidden")}e.show=Pe;function ze(...Le){for(const ye of Le)ye.style.display="none",ye.setAttribute("aria-hidden","true")}e.hide=ze;function Ke(Le,ye){const Me=Le.devicePixelRatio*ye;return Math.max(1,Math.floor(Me))/Le.devicePixelRatio}e.computeScreenAwareSize=Ke;function je(Le){t.mainWindow.open(Le,"_blank","noopener")}e.windowOpenNoOpener=je;function Je(Le,ye){const Me=()=>{ye(),Te=(0,e.scheduleAtNextAnimationFrame)(Le,Me)};let Te=(0,e.scheduleAtNextAnimationFrame)(Le,Me);return(0,b.toDisposable)(()=>Te.dispose())}e.animate=Je,a.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(t.mainWindow.location.href)?"https":"http");function rt(Le){return Le?`url('${a.FileAccess.uriToBrowserUri(Le).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=rt;function et(Le){return`'${Le.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=et;function st(Le,ye){if(Le!==void 0){const Me=Le.match(/^\s*var\((.+)\)$/);if(Me){const Te=Me[1].split(",",2);return Te.length===2&&(ye=st(Te[1].trim(),ye)),`var(${Te[0]}, ${ye})`}return Le}return ye}e.asCssValueWithDefault=st;function Qe(Le,ye=!1){const Me=document.createElement("a");return v.addHook("afterSanitizeAttributes",Te=>{for(const we of["href","src"])if(Te.hasAttribute(we)){const Re=Te.getAttribute(we);if(we==="href"&&Re.startsWith("#"))continue;if(Me.href=Re,!Le.includes(Me.protocol.replace(/:$/,""))){if(ye&&we==="src"&&Me.href.startsWith("data:"))continue;Te.removeAttribute(we)}}}),(0,b.toDisposable)(()=>{v.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=Qe,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","input","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 ft=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 at extends _.Emitter{constructor(){super(),this._subscriptions=new b.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(_.Event.runAndSubscribe(e.onDidRegisterWindow,({window:ye,disposables:Me})=>this.registerListeners(ye,Me),{window:t.mainWindow,disposables:this._subscriptions}))}registerListeners(ye,Me){Me.add(c(ye,"keydown",Te=>{if(Te.defaultPrevented)return;const we=new y.StandardKeyboardEvent(Te);if(!(we.keyCode===6&&Te.repeat)){if(Te.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Te.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Te.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Te.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(we.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Te.altKey,this._keyStatus.ctrlKey=Te.ctrlKey,this._keyStatus.metaKey=Te.metaKey,this._keyStatus.shiftKey=Te.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Te,this.fire(this._keyStatus))}},!0)),Me.add(c(ye,"keyup",Te=>{Te.defaultPrevented||(!Te.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Te.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Te.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Te.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=Te.altKey,this._keyStatus.ctrlKey=Te.ctrlKey,this._keyStatus.metaKey=Te.metaKey,this._keyStatus.shiftKey=Te.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Te,this.fire(this._keyStatus)))},!0)),Me.add(c(ye.document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),Me.add(c(ye.document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),Me.add(c(ye.document.body,"mousemove",Te=>{Te.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),Me.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 at.instance||(at.instance=new at),at.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=at;class ct extends b.Disposable{constructor(ye,Me){super(),this.element=ye,this.callbacks=Me,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this.callbacks.onDragStart&&this._register(c(this.element,e.EventType.DRAG_START,ye=>{var Me,Te;(Te=(Me=this.callbacks).onDragStart)===null||Te===void 0||Te.call(Me,ye)})),this.callbacks.onDrag&&this._register(c(this.element,e.EventType.DRAG,ye=>{var Me,Te;(Te=(Me=this.callbacks).onDrag)===null||Te===void 0||Te.call(Me,ye)})),this._register(c(this.element,e.EventType.DRAG_ENTER,ye=>{var Me,Te;this.counter++,this.dragStartTime=ye.timeStamp,(Te=(Me=this.callbacks).onDragEnter)===null||Te===void 0||Te.call(Me,ye)})),this._register(c(this.element,e.EventType.DRAG_OVER,ye=>{var Me,Te;ye.preventDefault(),(Te=(Me=this.callbacks).onDragOver)===null||Te===void 0||Te.call(Me,ye,ye.timeStamp-this.dragStartTime)})),this._register(c(this.element,e.EventType.DRAG_LEAVE,ye=>{var Me,Te;this.counter--,this.counter===0&&(this.dragStartTime=0,(Te=(Me=this.callbacks).onDragLeave)===null||Te===void 0||Te.call(Me,ye))})),this._register(c(this.element,e.EventType.DRAG_END,ye=>{var Me,Te;this.counter=0,this.dragStartTime=0,(Te=(Me=this.callbacks).onDragEnd)===null||Te===void 0||Te.call(Me,ye)})),this._register(c(this.element,e.EventType.DROP,ye=>{var Me,Te;this.counter=0,this.dragStartTime=0,(Te=(Me=this.callbacks).onDrop)===null||Te===void 0||Te.call(Me,ye)}))}}e.DragAndDropObserver=ct;const lt=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function mt(Le,...ye){let Me,Te;Array.isArray(ye[0])?(Me={},Te=ye[0]):(Me=ye[0]||{},Te=ye[1]);const we=lt.exec(Le);if(!we||!we.groups)throw new Error("Bad use of h");const Re=we.groups.tag||"div",Oe=document.createElement(Re);we.groups.id&&(Oe.id=we.groups.id);const Ve=[];if(we.groups.class)for(const Ze of we.groups.class.split("."))Ze!==""&&Ve.push(Ze);if(Me.className!==void 0)for(const Ze of Me.className.split("."))Ze!==""&&Ve.push(Ze);Ve.length>0&&(Oe.className=Ve.join(" "));const $e={};if(we.groups.name&&($e[we.groups.name]=Oe),Te)for(const Ze of Te)Ze instanceof HTMLElement?Oe.appendChild(Ze):typeof Ze=="string"?Oe.append(Ze):"root"in Ze&&(Object.assign($e,Ze),Oe.appendChild(Ze.root));for(const[Ze,Ge]of Object.entries(Me))if(Ze!=="className")if(Ze==="style")for(const[qe,Fe]of Object.entries(Ge))Oe.style.setProperty(pt(qe),typeof Fe=="number"?Fe+"px":""+Fe);else Ze==="tabIndex"?Oe.tabIndex=Ge:Oe.setAttribute(pt(Ze),Ge.toString());return $e.root=Oe,$e}e.h=mt;function pt(Le){return Le.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(se[317],oe([1,0,7]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function k(a,i={}){const n=E(i);return n.textContent=a,n}e.renderText=k;function y(a,i={}){const n=E(i);return p(n,_(a,!!i.renderCodeSegments),i.actionHandler,i.renderCodeSegments),n}e.renderFormattedText=y;function E(a){const i=a.inline?"span":"div",n=document.createElement(i);return a.className&&(n.className=a.className),n}e.createElement=E;class S{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(a,i,n,t){let r;if(i.type===2)r=document.createTextNode(i.content||"");else if(i.type===3)r=document.createElement("b");else if(i.type===4)r=document.createElement("i");else if(i.type===7&&t)r=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)})),r=u}else i.type===8?r=document.createElement("br"):i.type===1&&(r=a);r&&a!==r&&a.appendChild(r),r&&Array.isArray(i.children)&&i.children.forEach(u=>{p(r,u,n,t)})}function _(a,i){const n={type:1,children:[]};let t=0,r=n;const u=[],f=new S(a);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(),r.type===2&&(r=u.pop());const s=b(c,i);if(r.type===s||r.type===5&&s===6)r=u.pop();else{const l={type:s,children:[]};s===5&&(l.index=t,t++),r.children.push(l),u.push(r),r=l}}else if(c===`
|
||
`)r.type===2&&(r=u.pop()),r.children.push({type:8});else if(r.type!==2){const s={type:2,content:c};r.children.push(s),u.push(r),r=s}else r.content+=c}return r.type===2&&(r=u.pop()),u.length,n}function v(a,i){return b(a,i)!==0}function b(a,i){switch(a){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return i?7:0;default:return 0}}}),define(se[157],oe([1,0,7,2]),function(te,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(S,p){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const _=this._onStopCallback;this._onStopCallback=null,S&&_&&_(p)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(S,p,_,v,b){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=v,this._onStopCallback=b;let a=S;try{S.setPointerCapture(p),this._hooks.add((0,k.toDisposable)(()=>{try{S.releasePointerCapture(p)}catch{}}))}catch{a=L.getWindow(S)}this._hooks.add(L.addDisposableListener(a,L.EventType.POINTER_MOVE,i=>{if(i.buttons!==_){this.stopMonitoring(!0);return}i.preventDefault(),this._pointerMoveCallback(i)})),this._hooks.add(L.addDisposableListener(a,L.EventType.POINTER_UP,i=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=y}),define(se[63],oe([1,0,7,44,13,107,6,2,66]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var v;(function(a){a.Tap="-monaco-gesturetap",a.Change="-monaco-gesturechange",a.Start="-monaco-gesturestart",a.End="-monaco-gesturesend",a.Contextmenu="-monaco-gesturecontextmenu"})(v||(e.EventType=v={}));class b extends p.Disposable{constructor(){super(),this.dispatched=!1,this.targets=new _.LinkedList,this.ignoreTargets=new _.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(S.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,r=i.targetTouches.length;t<r;t++){const u=i.targetTouches.item(t);this.activeTouches[u.identifier]={id:u.identifier,initialTarget:u.target,initialTimeStamp:n,initialPageX:u.pageX,initialPageY:u.pageY,rollingTimestamps:[n],rollingPageX:[u.pageX],rollingPageY:[u.pageY]};const f=this.newGestureEvent(v.Start,u.target);f.pageX=u.pageX,f.pageY=u.pageY,this.dispatchEvent(f)}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}onTouchEnd(i,n){const t=Date.now(),r=Object.keys(this.activeTouches).length;for(let u=0,f=n.changedTouches.length;u<f;u++){const c=n.changedTouches.item(u);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("move of an UNKNOWN touch",c);continue}const d=this.activeTouches[c.identifier],s=Date.now()-d.initialTimeStamp;if(s<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.Tap,d.initialTarget);l.pageX=y.tail(d.rollingPageX),l.pageY=y.tail(d.rollingPageY),this.dispatchEvent(l)}else if(s>=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(r===1){const l=y.tail(d.rollingPageX),o=y.tail(d.rollingPageY),g=y.tail(d.rollingTimestamps)-d.rollingTimestamps[0],h=l-d.rollingPageX[0],m=o-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,o)}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,r,u,f,c,d,s){this.handle=L.scheduleAtNextAnimationFrame(i,()=>{const l=Date.now(),o=l-t;let g=0,h=0,m=!0;r+=b.SCROLL_FRICTION*o,c+=b.SCROLL_FRICTION*o,r>0&&(m=!1,g=u*r*o),c>0&&(m=!1,h=d*c*o);const C=this.newGestureEvent(v.Change);C.translationX=g,C.translationY=h,n.forEach(w=>w.dispatchEvent(C)),m||this.inertia(i,n,l,r,u,f+g,c,d,s+h)})}onTouchMove(i){const n=Date.now();for(let t=0,r=i.changedTouches.length;t<r;t++){const u=i.changedTouches.item(t);if(!this.activeTouches.hasOwnProperty(String(u.identifier))){console.warn("end of an UNKNOWN touch",u);continue}const f=this.activeTouches[u.identifier],c=this.newGestureEvent(v.Change,f.initialTarget);c.translationX=u.pageX-y.tail(f.rollingPageX),c.translationY=u.pageY-y.tail(f.rollingPageY),c.pageX=u.pageX,c.pageY=u.pageY,this.dispatchEvent(c),f.rollingPageX.length>3&&(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,ke([E.memoize],b,"isTouchDevice",null)}),define(se[48],oe([1,0,7,408]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const k=2e4;let y,E,S,p,_;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(),S=t();const r=()=>{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=r(),_=r(),n.appendChild(y)}e.setARIAContainer=v;function b(n){y&&(E.textContent!==n?(L.clearNode(S),i(E,n)):(L.clearNode(E),i(S,n)))}e.alert=b;function a(n){y&&(p.textContent!==n?(L.clearNode(_),i(p,n)):(L.clearNode(p),i(_,n)))}e.status=a;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(se[318],oe([1,0,219,7,2,17,172,412]),function(te,e,L,k,y,E,S){"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 _;(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(_||(e.LayoutAnchorMode=_={}));function v(i,n,t){const r=t.mode===_.ALIGN?t.offset:t.offset+t.size,u=t.mode===_.ALIGN?t.offset+t.size:t.offset;return t.position===0?n<=i-r?r:n<=u?u-n:Math.max(i-n,0):n<=u?u-n:n<=i-r?r: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 r;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,(r=this.shadowRootHostElement)===null||r===void 0||r.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=a,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,r;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(),(r=(t=this.delegate).focus)===null||r===void 0||r.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 r=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 s,l;const o=k.getActiveWindow();if(d===0){const h={offset:t.top-o.pageYOffset,size:t.height,position:f===0?0:1},m={offset:t.left,size:t.width,position:c===0?0:1,mode:_.ALIGN};s=v(o.innerHeight,u,h)+o.pageYOffset,S.Range.intersects({start:s,end:s+u},{start:h.offset,end:h.offset+h.size})&&(m.mode=_.AVOID),l=v(o.innerWidth,r,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:_.ALIGN};l=v(o.innerWidth,r,h),S.Range.intersects({start:l,end:l+r},{start:h.offset,end:h.offset+h.size})&&(m.mode=_.AVOID),s=v(o.innerHeight,u,m)+o.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=`${s-(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 a=`
|
||
: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(se[319],oe([1,0,7,11,413]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class y{constructor(S,p,_){this.options=p,this.styles=_,this.count=0,this.element=(0,L.append)(S,(0,L.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(S){this.count=S,this.render()}setTitleFormat(S){this.titleFormat=S,this.render()}render(){var S,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=(S=this.styles.badgeBackground)!==null&&S!==void 0?S:"",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(se[588],oe([1,0,7,46,63,42,6,273]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class p extends E.ActionRunner{constructor(b,a){super(),this._onDidChangeVisibility=this._register(new S.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=a.labelRenderer;i||(i=t=>(t.textContent=a.label||"",null));for(const t of[L.EventType.CLICK,L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this.element,t,r=>L.EventHelper.stop(r,!0)));for(const t of[L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this._label,t,r=>{(0,L.isMouseEvent)(r)&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,L.addDisposableListener)(this._label,L.EventType.KEY_UP,t=>{const r=new k.StandardKeyboardEvent(t);(r.equals(3)||r.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 _ extends p{constructor(b,a){super(b,a),this._options=a,this._actions=[],this.actions=a.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,a)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(b,a):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=_}),define(se[118],oe([1,0,7,28]),function(te,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 _=new Array;let v,b=0,a=0;for(;(v=y.exec(p))!==null;){a=v.index||0,b<a&&_.push(p.substring(b,a)),b=(v.index||0)+v[0].length;const[,i,n]=v;_.push(i?`$(${n})`:S({id:n}))}return b<p.length&&_.push(p.substring(b)),_}e.renderLabelWithIcons=E;function S(p){const _=L.$("span");return _.classList.add(...k.ThemeIcon.asClassNameArray(p)),_}e.renderIcon=S}),define(se[320],oe([1,0,7,118,55]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class E{constructor(p,_){var v;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=(v=_?.supportIcons)!==null&&v!==void 0?v:!1,this.domNode=L.append(p,L.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(p,_=[],v="",b){p||(p=""),b&&(p=E.escapeNewLines(p,_)),!(this.didEverRender&&this.text===p&&this.title===v&&y.equals(this.highlights,_))&&(this.text=p,this.title=v,this.highlights=_,this.render())}render(){const p=[];let _=0;for(const v of this.highlights){if(v.end===v.start)continue;if(_<v.start){const i=this.text.substring(_,v.start);this.supportIcons?p.push(...(0,k.renderLabelWithIcons)(i)):p.push(i),_=v.start}const b=this.text.substring(_,v.end),a=L.$("span.highlight",void 0,...this.supportIcons?(0,k.renderLabelWithIcons)(b):[b]);v.extraClasses&&a.classList.add(...v.extraClasses),p.push(a),_=v.end}if(_<this.text.length){const v=this.text.substring(_);this.supportIcons?p.push(...(0,k.renderLabelWithIcons)(v)):p.push(v)}L.reset(this.domNode,...p),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(p,_){let v=0,b=0;return p.replace(/\r\n|\r|\n/g,(a,i)=>{b=a===`\r
|
||
`?-1:0,i+=v;for(const n of _)n.end<=i||(n.start>=i&&(n.start+=b),n.end>=i&&(n.end+=b));return v+=b,"\u23CE"})}}e.HighlightedLabel=E}),define(se[224],oe([1,0,7,218,55,573,417]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const S=L.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class p{constructor(v,b,a){this.os=b,this.keyElements=new Set,this.options=a||Object.create(null);const i=this.options.keybindingLabelForeground;this.domNode=L.append(v,S(".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<b.length;i++)L.append(this.domNode,S("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderChord(this.domNode,b[i],this.matches?this.matches.chordPart:null);const a=(v=this.options.disableTitle)!==null&&v!==void 0&&v?void 0:this.keybinding.getAriaLabel()||void 0;a!==void 0?this.domNode.title=a:this.domNode.removeAttribute("title")}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}clear(){L.clearNode(this.domNode),this.keyElements.clear()}renderChord(v,b,a){const i=k.UILabelProvider.modifierLabels[this.os];b.ctrlKey&&this.renderKey(v,i.ctrlKey,!!a?.ctrlKey,i.separator),b.shiftKey&&this.renderKey(v,i.shiftKey,!!a?.shiftKey,i.separator),b.altKey&&this.renderKey(v,i.altKey,!!a?.altKey,i.separator),b.metaKey&&this.renderKey(v,i.metaKey,!!a?.metaKey,i.separator);const n=b.keyLabel;n&&this.renderKey(v,n,!!a?.keyCode,"")}renderKey(v,b,a,i){L.append(v,this.createKeyElement(b,a?".highlight":"")),i&&L.append(v,S("span.monaco-keybinding-key-separator",void 0,i))}renderUnbound(v){L.append(v,this.createKeyElement((0,E.localize)(0,null)))}createKeyElement(v,b=""){const a=S("span.monaco-keybinding-key"+b,void 0,v);return this.keyElements.add(a),this.options.keybindingLabelBackground&&(a.style.backgroundColor=this.options.keybindingLabelBackground),this.options.keybindingLabelBorder&&(a.style.borderColor=this.options.keybindingLabelBorder),this.options.keybindingLabelBottomBorder&&(a.style.borderBottomColor=this.options.keybindingLabelBottomBorder),this.options.keybindingLabelShadow&&(a.style.boxShadow=`inset 0 -1px 0 ${this.options.keybindingLabelShadow}`),a}static areSame(v,b){return v===b||!v&&!b?!0:!!v&&!!b&&(0,y.equals)(v.firstPart,b.firstPart)&&(0,y.equals)(v.chordPart,b.chordPart)}}e.KeybindingLabel=p}),define(se[589],oe([1,0,7]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function k(E){var S;try{(S=E.parentElement)===null||S===void 0||S.removeChild(E)}catch{}}class y{constructor(S){this.renderers=S,this.cache=new Map,this.transactionNodesPendingRemoval=new Set,this.inTransaction=!1}alloc(S){let p=this.getTemplateCache(S).pop(),_=!1;if(p)_=this.transactionNodesPendingRemoval.has(p.domNode),_&&this.transactionNodesPendingRemoval.delete(p.domNode);else{const v=(0,L.$)(".monaco-list-row"),a=this.getRenderer(S).renderTemplate(v);p={domNode:v,templateId:S,templateData:a}}return{row:p,isReusingConnectedDomNode:_}}release(S){S&&this.releaseRow(S)}transact(S){if(this.inTransaction)throw new Error("Already in transaction");this.inTransaction=!0;try{S()}finally{for(const p of this.transactionNodesPendingRemoval)this.doRemoveNode(p);this.transactionNodesPendingRemoval.clear(),this.inTransaction=!1}}releaseRow(S){const{domNode:p,templateId:_}=S;p&&(this.inTransaction?this.transactionNodesPendingRemoval.add(p):this.doRemoveNode(p)),this.getTemplateCache(_).push(S)}doRemoveNode(S){S.classList.remove("scrolling"),k(S)}getTemplateCache(S){let p=this.cache.get(S);return p||(p=[],this.cache.set(S,p)),p}dispose(){this.cache.forEach((S,p)=>{for(const _ of S)this.getRenderer(p).disposeTemplate(_.templateData),_.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(S){const p=this.renderers.get(S);if(!p)throw new Error(`No renderer found for ${S}`);return p}}e.RowCache=y}),define(se[590],oe([1,0,7,14,2,419]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const E="done",S="active",p="infinite",_="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(S,p,_,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,_),this.element.classList.add(S,p),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(_)}getContainer(){return this.element}}e.ProgressBar=b,b.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(se[158],oe([1,0,7,84,63,14,107,6,2,17,420]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const b=!1;var a;(function(l){l.North="north",l.South="south",l.East="east",l.West="west"})(a||(e.OrthogonalEdge=a={}));let i=4;const n=new p.Emitter;let t=300;const r=new p.Emitter;class u{constructor(o){this.el=o,this.disposables=new _.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()}}ke([S.memoize],u.prototype,"onPointerMove",null),ke([S.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(o){this.el=o,this.disposables=new _.DisposableStore}dispose(){this.disposables.dispose()}}ke([S.memoize],f.prototype,"onPointerMove",null),ke([S.memoize],f.prototype,"onPointerUp",null);class c{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(o){this.factory=o}dispose(){}}ke([S.memoize],c.prototype,"onPointerMove",null),ke([S.memoize],c.prototype,"onPointerUp",null);const d="pointer-events-disabled";class s extends _.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(o){this._state!==o&&(this.el.classList.toggle("disabled",o===0),this.el.classList.toggle("minimum",o===1),this.el.classList.toggle("maximum",o===2),this._state=o,this.onDidEnablementChange.fire(o))}set orthogonalStartSash(o){if(this._orthogonalStartSash!==o){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),o){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,_.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>s.onMouseEnter(o),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new k.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>s.onMouseLeave(o),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(o.onDidEnablementChange.event(g,this)),g(o.state)}this._orthogonalStartSash=o}}set orthogonalEndSash(o){if(this._orthogonalEndSash!==o){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),o){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,_.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>s.onMouseEnter(o),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new k.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>s.onMouseLeave(o),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(o.onDidEnablementChange.event(g,this)),g(o.state)}this._orthogonalEndSash=o}}constructor(o,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 _.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new _.DisposableStore),this.orthogonalEndSashDisposables=this._register(new _.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new _.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)(o,(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(P=>this.onPointerStart(P,new u(o)),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(()=>s.onMouseEnter(this)));const D=this._register(new k.DomEmitter(this.el,"mouseleave")).event;this._register(D(()=>s.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(P=>this.onPointerStart(P,new f(this.el)),this));const T=this._register(new k.DomEmitter(this.el,y.EventType.Tap)).event;let A;this._register(T(P=>{if(A){clearTimeout(A),A=void 0,this.onPointerDoublePress(P);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(P=>{this.size=P,this.layout()}))),this._register(r.event(P=>this.hoverDelay=P)),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(o,g){L.EventHelper.stop(o);let h=!1;if(!o.__orthogonalSashEvent){const R=this.getOrthogonalSash(o);R&&(h=!0,o.__orthogonalSashEvent=!0,R.onPointerStart(o,new c(g)))}if(this.linkedSash&&!o.__linkedSashEvent&&(o.__linkedSashEvent=!0,this.linkedSash.onPointerStart(o,new c(g))),!this.state)return;const m=this.el.ownerDocument.getElementsByTagName("iframe");for(const R of m)R.classList.add(d);const C=o.pageX,w=o.pageY,D=o.altKey,I={startX:C,currentX:C,startY:w,currentY:w,altKey:D};this.el.classList.add("active"),this._onDidStart.fire(I);const T=(0,L.createStyleSheet)(this.el),A=()=>{let R="";h?R="all-scroll":this.orientation===1?this.state===1?R="s-resize":this.state===2?R="n-resize":R=v.isMacintosh?"row-resize":"ns-resize":this.state===1?R="e-resize":this.state===2?R="w-resize":R=v.isMacintosh?"col-resize":"ew-resize",T.textContent=`* { cursor: ${R} !important; }`},P=new _.DisposableStore;A(),h||this.onDidEnablementChange.event(A,null,P);const N=R=>{L.EventHelper.stop(R,!1);const x={startX:C,currentX:R.pageX,startY:w,currentY:R.pageY,altKey:D};this._onDidChange.fire(x)},M=R=>{L.EventHelper.stop(R,!1),this.el.removeChild(T),this.el.classList.remove("active"),this._onDidEnd.fire(),P.dispose();for(const x of m)x.classList.remove(d)};g.onPointerMove(N,null,P),g.onPointerUp(M,null,P),P.add(g)}onPointerDoublePress(o){const g=this.getOrthogonalSash(o);g&&g._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(o,g=!1){o.el.classList.contains("active")?(o.hoverDelayer.cancel(),o.el.classList.add("hover")):o.hoverDelayer.trigger(()=>o.el.classList.add("hover"),o.hoverDelay).then(void 0,()=>{}),!g&&o.linkedSash&&s.onMouseEnter(o.linkedSash,!0)}static onMouseLeave(o,g=!1){o.hoverDelayer.cancel(),o.el.classList.remove("hover"),!g&&o.linkedSash&&s.onMouseLeave(o.linkedSash,!0)}clearSashHoverState(){s.onMouseLeave(this)}layout(){if(this.orientation===0){const o=this.layoutProvider;this.el.style.left=o.getVerticalSashLeft(this)-this.size/2+"px",o.getVerticalSashTop&&(this.el.style.top=o.getVerticalSashTop(this)+"px"),o.getVerticalSashHeight&&(this.el.style.height=o.getVerticalSashHeight(this)+"px")}else{const o=this.layoutProvider;this.el.style.top=o.getHorizontalSashTop(this)-this.size/2+"px",o.getHorizontalSashLeft&&(this.el.style.left=o.getHorizontalSashLeft(this)+"px"),o.getHorizontalSashWidth&&(this.el.style.width=o.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(o){var g;const h=(g=o.initialTarget)!==null&&g!==void 0?g:o.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=s}),define(se[225],oe([1,0,7,158,6,2]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class S{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 _,v=0,b=0;this._sashListener.add(y.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{_===void 0&&(this._onDidWillResize.fire(),_=this._size,v=0,b=0)})),this._sashListener.add(y.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{_!==void 0&&(_=void 0,v=0,b=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(a=>{_&&(b=a.currentX-a.startX,this.layout(_.height+v,_.width+b),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(a=>{_&&(b=-(a.currentX-a.startX),this.layout(_.height+v,_.width+b),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(a=>{_&&(v=-(a.currentY-a.startY),this.layout(_.height+v,_.width+b),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(a=>{_&&(v=a.currentY-a.startY,this.layout(_.height+v,_.width+b),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(y.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(a=>{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)(a=>{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(_,v,b,a){this._northSash.state=_?3:0,this._eastSash.state=v?3:0,this._southSash.state=b?3:0,this._westSash.state=a?3:0}layout(_=this.size.height,v=this.size.width){const{height:b,width:a}=this._minSize,{height:i,width:n}=this._maxSize;_=Math.max(b,Math.min(i,_)),v=Math.max(a,Math.min(n,v));const t=new L.Dimension(v,_);L.Dimension.equals(t,this._size)||(this.domNode.style.height=_+"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(_){this._maxSize=_}get maxSize(){return this._maxSize}set minSize(_){this._minSize=_}get minSize(){return this._minSize}set preferredSize(_){this._preferredSize=_}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=S}),define(se[591],oe([1,0,7,63,13,6,2,17]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class _ extends S.Disposable{constructor(b,a,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,a)}registerListeners(){this._register(k.Gesture.addTarget(this.selectElement)),[k.EventType.Tap].forEach(b=>{this._register(L.addDisposableListener(this.selectElement,b,a=>{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 a=!1;p.isMacintosh?(b.keyCode===18||b.keyCode===16||b.keyCode===10)&&(a=!0):(b.keyCode===18&&b.altKey||b.keyCode===10||b.keyCode===3)&&(a=!0),a&&b.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(b,a){(!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))})),a!==void 0&&this.select(a)}select(b){this.options.length===0?this.selected=0:b>=0&&b<this.options.length?this.selected=b:b>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selected<this.options.length&&typeof this.options[this.selected].text=="string"?this.selectElement.title=this.options[this.selected].text:this.selectElement.title=""}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(b){this.selectElement.tabIndex=b?0:-1}render(b){b.classList.add("select-container"),b.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}applyStyles(){var b,a,i;this.selectElement&&(this.selectElement.style.backgroundColor=(b=this.styles.selectBackground)!==null&&b!==void 0?b:"",this.selectElement.style.color=(a=this.styles.selectForeground)!==null&&a!==void 0?a:"",this.selectElement.style.borderColor=(i=this.styles.selectBorder)!==null&&i!==void 0?i:"")}createOption(b,a,i){const n=document.createElement("option");return n.value=b,n.text=b,n.disabled=!!i,n}}e.SelectBoxNative=_}),define(se[76],oe([1,0,7,46,67,63,2]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class p extends S.Disposable{onclick(v,b){this._register(L.addDisposableListener(v,L.EventType.CLICK,a=>b(new y.StandardMouseEvent(L.getWindow(v),a))))}onmousedown(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_DOWN,a=>b(new y.StandardMouseEvent(L.getWindow(v),a))))}onmouseover(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_OVER,a=>b(new y.StandardMouseEvent(L.getWindow(v),a))))}onmouseleave(v,b){this._register(L.addDisposableListener(v,L.EventType.MOUSE_LEAVE,a=>b(new y.StandardMouseEvent(L.getWindow(v),a))))}onkeydown(v,b){this._register(L.addDisposableListener(v,L.EventType.KEY_DOWN,a=>b(new k.StandardKeyboardEvent(a))))}onkeyup(v,b){this._register(L.addDisposableListener(v,L.EventType.KEY_UP,a=>b(new k.StandardKeyboardEvent(a))))}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(se[226],oe([1,0,157,76,14,28,7]),function(te,e,L,k,y,E,S){"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(S.addStandardDisposableListener(this.bgDomNode,S.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._register(S.addStandardDisposableListener(this.domNode,S.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._pointerdownRepeatTimer=this._register(new S.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,S.getWindow(v))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(b,200),this._pointerMoveMonitor.startMonitoring(v.target,v.pointerId,v.buttons,a=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),v.preventDefault()}}e.ScrollbarArrow=p}),define(se[321],oe([1,0,7,40,157,226,583,76,17]),function(te,e,L,k,y,E,S,p,_){"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 S.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,r){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 r=="number"&&this.slider.setHeight(r),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(),r=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),u=this._sliderPointerPosition(i);t<=u&&u<=r?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 r=this._pointerDownRelativePosition(n,t);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),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),r=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(_.isWindows&&c>v){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const s=this._sliderPointerPosition(u)-n;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(s))},()=>{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(se[592],oe([1,0,67,321,226,197,26]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class p extends k.AbstractScrollbar{constructor(v,b,a){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:a,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,r=(b.horizontalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonLeft,top:r,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:S.Codicon.scrollbarButtonRight,top:r,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(se[593],oe([1,0,67,321,226,197,26]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class p extends k.AbstractScrollbar{constructor(v,b,a){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:b.lazyRender,host:a,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,r=(b.verticalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonUp,top:t,left:r,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:S.Codicon.scrollbarButtonDown,top:void 0,left:r,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(se[77],oe([1,0,54,7,40,67,592,593,76,14,6,2,17,147,421]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,r=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){if(L.isChrome){const C=k.getWindow(m.browserEvent),w=(0,L.getZoomFactor)(C);this.accept(Date.now(),m.deltaX*w,m.deltaY*w)}else 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 _.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 S.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,a.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,a.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 T=m.deltaY*this._options.mouseWheelScrollSensitivity,A=m.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&A+T===0?A=T=0:Math.abs(T)>=Math.abs(A)?A=0:T=0),this._options.flipAxes&&([T,A]=[A,T]);const P=!i.isMacintosh&&m.browserEvent&&m.browserEvent.shiftKey;(this._options.scrollYToX||P)&&!A&&(A=T,T=0),m.browserEvent&&m.browserEvent.altKey&&(A=A*this._options.fastScrollSensitivity,T=T*this._options.fastScrollSensitivity);const N=this._scrollable.getFutureScrollPosition();let M={};if(T){const R=r*T,x=N.scrollTop-(R<0?Math.floor(R):Math.ceil(R));this._verticalScrollbar.writeScrollPosition(M,x)}if(A){const R=r*A,x=N.scrollLeft-(R<0?Math.floor(R):Math.ceil(R));this._horizontalScrollbar.writeScrollPosition(M,x)}M=this._scrollable.validateScrollPosition(M),(N.scrollLeft!==M.scrollLeft||N.scrollTop!==M.scrollTop)&&(u&&this._options.mouseWheelSmoothScroll&&w.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(M):this._scrollable.setScrollPositionNow(M),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":"",T=w||C?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${D}`),this._topShadowDomNode.setClassName(`shadow${I}`),this._topLeftShadowDomNode.setClassName(`shadow${T}${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 s 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=s;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 o 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=o;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(se[227],oe([1,0,7,46,77,2,570,414]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverAccessibleViewHint=e.HoverAction=e.HoverWidget=void 0;const p=L.$;class _ 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=_;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 r=L.append(this.action,p("span"));r.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(a,i){return a&&i?(0,S.localize)(0,null,i):a?(0,S.localize)(1,null):""}e.getHoverAccessibleViewHint=b}),define(se[228],oe([1,0,198,7,84,63,77,13,14,107,6,2,172,147,405,589,12]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 s{constructor(C){this.elements=C}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=s;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;w<C.files.length;w++){const D=C.files.item(w);D&&(D.size||D.type)&&this.files.push(D)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=l;function o(m,C){return Array.isArray(m)&&Array.isArray(C)?(0,p.equals)(m,C):m===C}class g{constructor(C){C?.getSetSize?this.getSetSize=C.getSetSize.bind(C):this.getSetSize=(w,D,I)=>I,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 T,A,P,N,M,R,x,O,B,W,V,K,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 _.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=a.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=a.Disposable.None,this.onDragLeaveTimeout=a.Disposable.None,this.disposables=new a.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((T=I.paddingTop)!==null&&T!==void 0?T:0);for(const ie of D)this.renderers.set(ie.templateId,ie);this.cache=this.disposables.add(new r.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",((P=I.transformOptimization)!==null&&P!==void 0?P: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:(N=I.smoothScrolling)!==null&&N!==void 0&&N?125:0,scheduleAtNextAnimationFrame:ie=>(0,k.scheduleAtNextAnimationFrame)((0,k.getWindow)(this.domNode),ie)})),this.scrollableElement=this.disposables.add(new S.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(M=I.alwaysConsumeMouseWheel)!==null&&M!==void 0?M:c.alwaysConsumeMouseWheel,horizontal:1,vertical:(R=I.verticalScrollMode)!==null&&R!==void 0?R: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,ie=>this.onTouchChange(ie))),this.disposables.add((0,k.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",ie=>ie.target.scrollTop=0)),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragover",ie=>this.onDragOver(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"drop",ie=>this.onDrop(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragleave",ie=>this.onDragLeave(this.toDragEvent(ie)))),this.disposables.add((0,k.addDisposableListener)(this.domNode,"dragend",ie=>this.onDragEnd(ie))),this.setRowLineHeight=(O=I.setRowLineHeight)!==null&&O!==void 0?O: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((K=I.initialSize)===null||K===void 0?void 0:K.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),T={start:C,end:C+w},A=i.Range.intersect(I,T),P=new Map;for(let $=A.end-1;$>=A.start;$--){const J=this.items[$];if(J.dragStartDisposable.dispose(),J.checkedDisposable.dispose(),J.row){let Q=P.get(J.templateId);Q||(Q=[],P.set(J.templateId,Q));const re=this.renderers.get(J.templateId);re&&re.disposeElement&&re.disposeElement(J.element,$,J.row.templateData,J.size),Q.push(J.row)}J.row=null}const N={start:C+w,end:this.items.length},M=i.Range.intersect(N,I),R=i.Range.relativeComplement(N,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:a.Disposable.None,checkedDisposable:a.Disposable.None}));let O;C===0&&w>=this.items.length?(this.rangeMap=new t.RangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,x),O=this.items,this.items=x):(this.rangeMap.splice(C,w,x),O=this.items.splice(C,w,...x));const B=D.length-w,W=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),V=(0,t.shift)(M,B),K=i.Range.intersect(W,V);for(let $=K.start;$<K.end;$++)this.updateItemInDOM(this.items[$],$);const F=i.Range.relativeComplement(V,W);for(const $ of F)for(let J=$.start;J<$.end;J++)this.removeItemFromDOM(J);const q=R.map($=>(0,t.shift)($,B)),ae=[{start:C,end:C+D.length},...q].map($=>i.Range.intersect(W,$)),ne=this.getNextToLastElement(ae);for(const $ of ae)for(let J=$.start;J<$.end;J++){const Q=this.items[J],re=P.get(Q.templateId),de=re?.pop();this.insertItemInDOM(J,ne,de)}for(const $ of P.values())for(const J of $)this.cache.release(J);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),O.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,T,A=!1){const P=this.getRenderRange(w,D),N=i.Range.relativeComplement(P,C),M=i.Range.relativeComplement(C,P),R=this.getNextToLastElement(N);if(A){const x=i.Range.intersect(C,P);for(let O=x.start;O<x.end;O++)this.updateItemInDOM(this.items[O],O)}this.cache.transact(()=>{for(const x of M)for(let O=x.start;O<x.end;O++)this.removeItemFromDOM(O);for(const x of N)for(let O=x.start;O<x.end;O++)this.insertItemInDOM(O,R)}),I!==void 0&&(this.rowsContainer.style.left=`-${I}px`),this.rowsContainer.style.top=`-${w}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=w,this.lastRenderHeight=D}insertItemInDOM(C,w,D){const I=this.items[C];let T=!1;if(!I.row)if(D)I.row=D;else{const R=this.cache.alloc(I.templateId);I.row=R.row,T=R.isReusingConnectedDomNode}const A=this.accessibilityProvider.getRole(I.element)||"listitem";I.row.domNode.setAttribute("role",A);const P=this.accessibilityProvider.isChecked(I.element);if(typeof P=="boolean")I.row.domNode.setAttribute("aria-checked",String(!!P));else if(P){const R=x=>I.row.domNode.setAttribute("aria-checked",String(!!x));R(P.value),I.checkedDisposable=P.onDidChange(R)}(T||!I.row.domNode.parentElement)&&(w?this.rowsContainer.insertBefore(I.row.domNode,w):this.rowsContainer.appendChild(I.row.domNode)),this.updateItemInDOM(I,C);const N=this.renderers.get(I.templateId);if(!N)throw new Error(`No renderer found for template id ${I.templateId}`);N?.renderElement(I.element,C,I.row.templateData,I.size);const M=this.dnd.getDragURI(I.element);I.dragStartDisposable.dispose(),I.row.domNode.draggable=!!M,M&&(I.dragStartDisposable=(0,k.addDisposableListener)(I.row.domNode,"dragstart",R=>this.onDragStart(I.element,M,R))),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,T=this.getTargetSector(C,w);return{browserEvent:C,index:w,element:I,sector:T}}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,T;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 P;this.dnd.getDragLabel&&(P=this.dnd.getDragLabel(A,D)),typeof P>"u"&&(P=String(A.length));const N=(0,k.$)(".monaco-drag-image");N.textContent=P;const R=(x=>{for(;x&&!x.classList.contains("monaco-workbench");)x=x.parentElement;return x||this.domNode.ownerDocument})(this.domNode);R.appendChild(N),D.dataTransfer.setDragImage(N,-10,-10),setTimeout(()=>R.removeChild(N),0)}this.domNode.classList.add("dragging"),this.currentDragData=new d(A),f.CurrentDragAndDropData=new s(A),(T=(I=this.dnd).onDragStart)===null||T===void 0||T.call(I,this.currentDragData,D)}onDragOver(C){var w,D;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 I=this.dnd.onDragOver(this.currentDragData,C.element,C.index,C.sector,C.browserEvent);if(this.canDrop=typeof I=="boolean"?I:I.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;C.browserEvent.dataTransfer.dropEffect=typeof I!="boolean"&&((w=I.effect)===null||w===void 0?void 0:w.type)===0?"copy":"move";let T;typeof I!="boolean"&&I.feedback?T=I.feedback:typeof C.index>"u"?T=[-1]:T=[C.index],T=(0,p.distinct)(T).filter(P=>P>=-1&&P<this.length).sort((P,N)=>P-N),T=T[0]===-1?[-1]:T;let A=typeof I!="boolean"&&I.effect&&I.effect.position?I.effect.position:"drop-target";if(o(this.currentDragFeedback,T)&&this.currentDragFeedbackPosition===A)return!0;if(this.currentDragFeedback=T,this.currentDragFeedbackPosition=A,this.currentDragFeedbackDisposable.dispose(),T[0]===-1)this.domNode.classList.add(A),this.rowsContainer.classList.add(A),this.currentDragFeedbackDisposable=(0,a.toDisposable)(()=>{this.domNode.classList.remove(A),this.rowsContainer.classList.remove(A)});else{if(T.length>1&&A!=="drop-target")throw new Error("Can't use multiple feedbacks with position different than 'over'");A==="drop-target-after"&&T[0]<this.length-1&&(T[0]+=1,A="drop-target-before");for(const P of T){const N=this.items[P];N.dropTarget=!0,(D=N.row)===null||D===void 0||D.domNode.classList.add(A)}this.currentDragFeedbackDisposable=(0,a.toDisposable)(()=>{var P;for(const N of T){const M=this.items[N];M.dropTarget=!1,(P=M.row)===null||P===void 0||P.domNode.classList.remove(A)}})}return!0}onDragLeave(C){var w,D;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,_.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.sector,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.currentDragFeedbackPosition=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=a.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,_.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)}getTargetSector(C,w){if(w===void 0)return;const D=C.offsetY/this.items[w].size;return Math.floor(D/.25)}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 T=Number(I);if(!isNaN(T))return T}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 T,A;C===this.elementTop(I.start)?(T=I.start,A=0):I.end-I.start>1&&(T=I.start+1,A=this.elementTop(T)-C);let P=0;for(;;){const N=this.getRenderRange(C,w);let M=!1;for(let R=N.start;R<N.end;R++){const x=this.probeDynamicHeight(R);x!==0&&this.rangeMap.splice(R,1,[this.items[R]]),P+=x,M=M||x!==0}if(!M){P!==0&&this.eventuallyUpdateScrollDimensions();const R=i.Range.relativeComplement(I,N);for(const O of R)for(let B=O.start;B<O.end;B++)this.items[B].row&&this.removeItemFromDOM(B);const x=i.Range.relativeComplement(N,I);for(const O of x)for(let B=O.start;B<O.end;B++){const W=B+1,V=W<this.items.length?this.items[W].row:null,K=V?V.domNode:null;this.insertItemInDOM(B,K)}for(let O=N.start;O<N.end;O++)this.items[O].row&&this.updateItemInDOM(this.items[O],O);if(typeof T=="number"){const O=this.scrollable.getFutureScrollPosition().scrollTop-C,B=this.elementTop(T)-A+O;this.setScrollTop(B,D)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(C){var w,D,I;const T=this.items[C];if(this.virtualDelegate.getDynamicHeight){const M=this.virtualDelegate.getDynamicHeight(T.element);if(M!==null){const R=T.size;return T.size=M,T.lastDynamicHeightWidth=this.renderWidth,M-R}}if(!T.hasDynamicHeight||T.lastDynamicHeightWidth===this.renderWidth||this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(T.element))return 0;const A=T.size;if(T.row)return T.row.domNode.style.height="",T.size=T.row.domNode.offsetHeight,T.lastDynamicHeightWidth=this.renderWidth,T.size-A;const{row:P}=this.cache.alloc(T.templateId);P.domNode.style.height="",this.rowsContainer.appendChild(P.domNode);const N=this.renderers.get(T.templateId);if(!N)throw new u.BugIndicatingError("Missing renderer for templateId: "+T.templateId);return N.renderElement(T.element,C,P.templateData,void 0),T.size=P.domNode.offsetHeight,(w=N.disposeElement)===null||w===void 0||w.call(N,T.element,C,P.templateData,void 0),(I=(D=this.virtualDelegate).setDynamicHeight)===null||I===void 0||I.call(D,T.element,T.size),T.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(P.domNode),this.cache.release(P),T.size-A}getNextToLastElement(C){const w=C[C.length-1];if(!w)return null;const D=this.items[w.end];return!D||!D.row?null:D.row.domNode}getElementDomId(C){return`${this.domId}_${C}`}dispose(){var C,w;for(const D of this.items)if(D.dragStartDisposable.dispose(),D.checkedDisposable.dispose(),D.row){const I=this.renderers.get(D.row.templateId);I&&((C=I.disposeElement)===null||C===void 0||C.call(I,D.element,-1,D.row.templateData,void 0),I.disposeTemplate(D.row.templateData))}this.items=[],this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(w=this.dragOverAnimationDisposable)===null||w===void 0||w.dispose(),this.disposables.dispose()}}e.ListView=h,h.InstanceCount=0,ke([v.memoize],h.prototype,"onMouseClick",null),ke([v.memoize],h.prototype,"onMouseDblClick",null),ke([v.memoize],h.prototype,"onMouseMiddleClick",null),ke([v.memoize],h.prototype,"onMouseDown",null),ke([v.memoize],h.prototype,"onMouseOver",null),ke([v.memoize],h.prototype,"onMouseOut",null),ke([v.memoize],h.prototype,"onContextMenu",null),ke([v.memoize],h.prototype,"onTouchStart",null),ke([v.memoize],h.prototype,"onTap",null)}),define(se[119],oe([1,0,7,84,46,63,48,396,13,14,39,107,6,71,2,145,17,20,395,228,67,275]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.unthemedListStyles=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.TypeNavigationMode=e.isButton=e.isStickyScrollContainer=e.isStickyScrollElement=e.isActionItem=e.isMonacoCustomToggle=e.isMonacoEditor=e.isInputElement=void 0;class l{constructor(X){this.trait=X,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(X){return X}renderElement(X,U,G){const z=this.renderedElements.findIndex(H=>H.templateData===G);if(z>=0){const H=this.renderedElements[z];this.trait.unrender(G),H.index=U}else{const H={index:U,templateData:G};this.renderedElements.push(H)}this.trait.renderIndex(U,G)}splice(X,U,G){const z=[];for(const H of this.renderedElements)H.index<X?z.push(H):H.index>=X+U&&z.push({index:H.index+G-U,templateData:H.templateData});this.renderedElements=z}renderIndexes(X){for(const{index:U,templateData:G}of this.renderedElements)X.indexOf(U)>-1&&this.trait.renderIndex(U,G)}disposeTemplate(X){const U=this.renderedElements.findIndex(G=>G.templateData===X);U<0||this.renderedElements.splice(U,1)}}class o{get name(){return this._trait}get renderer(){return new l(this)}constructor(X){this._trait=X,this.indexes=[],this.sortedIndexes=[],this._onChange=new i.Emitter,this.onChange=this._onChange.event}splice(X,U,G){const z=G.length-U,H=X+U,Y=[];let j=0;for(;j<this.sortedIndexes.length&&this.sortedIndexes[j]<X;)Y.push(this.sortedIndexes[j++]);for(let Z=0;Z<G.length;Z++)G[Z]&&Y.push(Z+X);for(;j<this.sortedIndexes.length&&this.sortedIndexes[j]>=H;)Y.push(this.sortedIndexes[j++]+z);this.renderer.splice(X,U,G.length),this._set(Y,Y)}renderIndex(X,U){U.classList.toggle(this._trait,this.contains(X))}unrender(X){X.classList.remove(this._trait)}set(X,U){return this._set(X,[...X].sort(J),U)}_set(X,U,G){const z=this.indexes,H=this.sortedIndexes;this.indexes=X,this.sortedIndexes=U;const Y=ne(H,X);return this.renderer.renderIndexes(Y),this._onChange.fire({indexes:X,browserEvent:G}),z}get(){return this.indexes}contains(X){return(0,_.binarySearch)(this.sortedIndexes,X,J)>=0}dispose(){(0,t.dispose)(this._onChange)}}ke([a.memoize],o.prototype,"renderer",null);class g extends o{constructor(X){super("selected"),this.setAriaSelected=X}renderIndex(X,U){super.renderIndex(X,U),this.setAriaSelected&&(this.contains(X)?U.setAttribute("aria-selected","true"):U.setAttribute("aria-selected","false"))}}class h{constructor(X,U,G){this.trait=X,this.view=U,this.identityProvider=G}splice(X,U,G){if(!this.identityProvider)return this.trait.splice(X,U,new Array(G.length).fill(!1));const z=this.trait.get().map(j=>this.identityProvider.getId(this.view.element(j)).toString());if(z.length===0)return this.trait.splice(X,U,new Array(G.length).fill(!1));const H=new Set(z),Y=G.map(j=>H.has(this.identityProvider.getId(j).toString()));this.trait.splice(X,U,Y)}}function m(me){return me.tagName==="INPUT"||me.tagName==="TEXTAREA"}e.isInputElement=m;function C(me,X){return me.classList.contains(X)?!0:me.classList.contains("monaco-list")||!me.parentElement?!1:C(me.parentElement,X)}function w(me){return C(me,"monaco-editor")}e.isMonacoEditor=w;function D(me){return C(me,"monaco-custom-toggle")}e.isMonacoCustomToggle=D;function I(me){return C(me,"action-item")}e.isActionItem=I;function T(me){return C(me,"monaco-tree-sticky-row")}e.isStickyScrollElement=T;function A(me){return me.classList.contains("monaco-tree-sticky-container")}e.isStickyScrollContainer=A;function P(me){return me.tagName==="A"&&me.classList.contains("monaco-button")||me.tagName==="DIV"&&me.classList.contains("monaco-button-dropdown")?!0:me.classList.contains("monaco-list")||!me.parentElement?!1:P(me.parentElement)}e.isButton=P;class N{get onKeyDown(){return i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,X=>X.filter(U=>!m(U.target)).map(U=>new y.StandardKeyboardEvent(U)))}constructor(X,U,G){this.list=X,this.view=U,this.disposables=new t.DisposableStore,this.multipleSelectionDisposables=new t.DisposableStore,this.multipleSelectionSupport=G.multipleSelectionSupport,this.disposables.add(this.onKeyDown(z=>{switch(z.keyCode){case 3:return this.onEnter(z);case 16:return this.onUpArrow(z);case 18:return this.onDownArrow(z);case 11:return this.onPageUpArrow(z);case 12:return this.onPageDownArrow(z);case 9:return this.onEscape(z);case 31:this.multipleSelectionSupport&&(u.isMacintosh?z.metaKey:z.ctrlKey)&&this.onCtrlA(z)}}))}updateOptions(X){X.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=X.multipleSelectionSupport)}onEnter(X){X.preventDefault(),X.stopPropagation(),this.list.setSelection(this.list.getFocus(),X.browserEvent)}onUpArrow(X){X.preventDefault(),X.stopPropagation(),this.list.focusPrevious(1,!1,X.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onDownArrow(X){X.preventDefault(),X.stopPropagation(),this.list.focusNext(1,!1,X.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageUpArrow(X){X.preventDefault(),X.stopPropagation(),this.list.focusPreviousPage(X.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onPageDownArrow(X){X.preventDefault(),X.stopPropagation(),this.list.focusNextPage(X.browserEvent);const U=this.list.getFocus()[0];this.list.setAnchor(U),this.list.reveal(U),this.view.domNode.focus()}onCtrlA(X){X.preventDefault(),X.stopPropagation(),this.list.setSelection((0,_.range)(this.list.length),X.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(X){this.list.getSelection().length&&(X.preventDefault(),X.stopPropagation(),this.list.setSelection([],X.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}ke([a.memoize],N.prototype,"onKeyDown",null);var M;(function(me){me[me.Automatic=0]="Automatic",me[me.Trigger=1]="Trigger"})(M||(e.TypeNavigationMode=M={}));var R;(function(me){me[me.Idle=0]="Idle",me[me.Typing=1]="Typing"})(R||(R={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(me){return me.ctrlKey||me.metaKey||me.altKey?!1:me.keyCode>=31&&me.keyCode<=56||me.keyCode>=21&&me.keyCode<=30||me.keyCode>=98&&me.keyCode<=107||me.keyCode>=85&&me.keyCode<=95}};class x{constructor(X,U,G,z,H){this.list=X,this.view=U,this.keyboardNavigationLabelProvider=G,this.keyboardNavigationEventFilter=z,this.delegate=H,this.enabled=!1,this.state=R.Idle,this.mode=M.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new t.DisposableStore,this.disposables=new t.DisposableStore,this.updateOptions(X.options)}updateOptions(X){var U,G;!((U=X.typeNavigationEnabled)!==null&&U!==void 0)||U?this.enable():this.disable(),this.mode=(G=X.typeNavigationMode)!==null&&G!==void 0?G:M.Automatic}enable(){if(this.enabled)return;let X=!1;const U=i.Event.chain(this.enabledDisposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,H=>H.filter(Y=>!m(Y.target)).filter(()=>this.mode===M.Automatic||this.triggered).map(Y=>new y.StandardKeyboardEvent(Y)).filter(Y=>X||this.keyboardNavigationEventFilter(Y)).filter(Y=>this.delegate.mightProducePrintableCharacter(Y)).forEach(Y=>L.EventHelper.stop(Y,!0)).map(Y=>Y.browserEvent.key)),G=i.Event.debounce(U,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);i.Event.reduce(i.Event.any(U,G),(H,Y)=>Y===null?null:(H||"")+Y,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),G(this.onClear,this,this.enabledDisposables),U(()=>X=!0,void 0,this.enabledDisposables),G(()=>X=!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 X;const U=this.list.getFocus();if(U.length>0&&U[0]===this.previouslyFocused){const G=(X=this.list.options.accessibilityProvider)===null||X===void 0?void 0:X.getAriaLabel(this.list.element(U[0]));G&&(0,S.alert)(G)}this.previouslyFocused=-1}onInput(X){if(!X){this.state=R.Idle,this.triggered=!1;return}const U=this.list.getFocus(),G=U.length>0?U[0]:0,z=this.state===R.Idle?1:0;this.state=R.Typing;for(let H=0;H<this.list.length;H++){const Y=(G+H+z)%this.list.length,j=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(Y)),Z=j&&j.toString();if(this.list.options.typeNavigationEnabled){if(typeof Z<"u"){if((0,n.matchesPrefix)(X,Z)){this.previouslyFocused=G,this.list.setFocus([Y]),this.list.reveal(Y);return}const ee=(0,n.matchesFuzzy2)(X,Z);if(ee&&ee[0].end-ee[0].start>1&&ee.length===1){this.previouslyFocused=G,this.list.setFocus([Y]),this.list.reveal(Y);return}}}else if(typeof Z>"u"||(0,n.matchesPrefix)(X,Z)){this.previouslyFocused=G,this.list.setFocus([Y]),this.list.reveal(Y);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class O{constructor(X,U){this.list=X,this.view=U,this.disposables=new t.DisposableStore;const G=i.Event.chain(this.disposables.add(new k.DomEmitter(U.domNode,"keydown")).event,H=>H.filter(Y=>!m(Y.target)).map(Y=>new y.StandardKeyboardEvent(Y)));i.Event.chain(G,H=>H.filter(Y=>Y.keyCode===2&&!Y.ctrlKey&&!Y.metaKey&&!Y.shiftKey&&!Y.altKey))(this.onTab,this,this.disposables)}onTab(X){if(X.target!==this.view.domNode)return;const U=this.list.getFocus();if(U.length===0)return;const G=this.view.domElement(U[0]);if(!G)return;const z=G.querySelector("[tabIndex]");if(!z||!(z instanceof HTMLElement)||z.tabIndex===-1)return;const H=(0,L.getWindow)(z).getComputedStyle(z);H.visibility==="hidden"||H.display==="none"||(X.preventDefault(),X.stopPropagation(),z.focus())}dispose(){this.disposables.dispose()}}function B(me){return u.isMacintosh?me.browserEvent.metaKey:me.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=B;function W(me){return me.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=W;function V(me){return(0,L.isMouseEvent)(me)&&me.button===2}const K={isSelectionSingleChangeEvent:B,isSelectionRangeChangeEvent:W};class F{constructor(X){this.list=X,this.disposables=new t.DisposableStore,this._onPointer=new i.Emitter,this.onPointer=this._onPointer.event,X.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||K),this.mouseSupport=typeof X.options.mouseSupport>"u"||!!X.options.mouseSupport,this.mouseSupport&&(X.onMouseDown(this.onMouseDown,this,this.disposables),X.onContextMenu(this.onContextMenu,this,this.disposables),X.onMouseDblClick(this.onDoubleClick,this,this.disposables),X.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(E.Gesture.addTarget(X.getHTMLElement()))),i.Event.any(X.onMouseClick,X.onMouseMiddleClick,X.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(X){X.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,X.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||K))}isSelectionSingleChangeEvent(X){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(X):!1}isSelectionRangeChangeEvent(X){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(X):!1}isSelectionChangeEvent(X){return this.isSelectionSingleChangeEvent(X)||this.isSelectionRangeChangeEvent(X)}onMouseDown(X){w(X.browserEvent.target)||(0,L.getActiveElement)()!==X.browserEvent.target&&this.list.domFocus()}onContextMenu(X){if(m(X.browserEvent.target)||w(X.browserEvent.target))return;const U=typeof X.index>"u"?[]:[X.index];this.list.setFocus(U,X.browserEvent)}onViewPointer(X){if(!this.mouseSupport||m(X.browserEvent.target)||w(X.browserEvent.target)||X.browserEvent.isHandledByList)return;X.browserEvent.isHandledByList=!0;const U=X.index;if(typeof U>"u"){this.list.setFocus([],X.browserEvent),this.list.setSelection([],X.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(X))return this.changeSelection(X);this.list.setFocus([U],X.browserEvent),this.list.setAnchor(U),V(X.browserEvent)||this.list.setSelection([U],X.browserEvent),this._onPointer.fire(X)}onDoubleClick(X){if(m(X.browserEvent.target)||w(X.browserEvent.target)||this.isSelectionChangeEvent(X)||X.browserEvent.isHandledByList)return;X.browserEvent.isHandledByList=!0;const U=this.list.getFocus();this.list.setSelection(U,X.browserEvent)}changeSelection(X){const U=X.index;let G=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(X)){if(typeof G>"u"){const le=this.list.getFocus()[0];G=le??U,this.list.setAnchor(G)}const z=Math.min(G,U),H=Math.max(G,U),Y=(0,_.range)(z,H+1),j=this.list.getSelection(),Z=ae(ne(j,[G]),G);if(Z.length===0)return;const ee=ne(Y,$(j,Z));this.list.setSelection(ee,X.browserEvent),this.list.setFocus([U],X.browserEvent)}else if(this.isSelectionSingleChangeEvent(X)){const z=this.list.getSelection(),H=z.filter(Y=>Y!==U);this.list.setFocus([U]),this.list.setAnchor(U),z.length===H.length?this.list.setSelection([...H,U],X.browserEvent):this.list.setSelection(H,X.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=F;class q{constructor(X,U){this.styleElement=X,this.selectorSuffix=U}style(X){var U,G;const z=this.selectorSuffix&&`.${this.selectorSuffix}`,H=[];X.listBackground&&H.push(`.monaco-list${z} .monaco-list-rows { background: ${X.listBackground}; }`),X.listFocusBackground&&(H.push(`.monaco-list${z}:focus .monaco-list-row.focused { background-color: ${X.listFocusBackground}; }`),H.push(`.monaco-list${z}:focus .monaco-list-row.focused:hover { background-color: ${X.listFocusBackground}; }`)),X.listFocusForeground&&H.push(`.monaco-list${z}:focus .monaco-list-row.focused { color: ${X.listFocusForeground}; }`),X.listActiveSelectionBackground&&(H.push(`.monaco-list${z}:focus .monaco-list-row.selected { background-color: ${X.listActiveSelectionBackground}; }`),H.push(`.monaco-list${z}:focus .monaco-list-row.selected:hover { background-color: ${X.listActiveSelectionBackground}; }`)),X.listActiveSelectionForeground&&H.push(`.monaco-list${z}:focus .monaco-list-row.selected { color: ${X.listActiveSelectionForeground}; }`),X.listActiveSelectionIconForeground&&H.push(`.monaco-list${z}:focus .monaco-list-row.selected .codicon { color: ${X.listActiveSelectionIconForeground}; }`),X.listFocusAndSelectionBackground&&H.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${z}:focus .monaco-list-row.selected.focused { background-color: ${X.listFocusAndSelectionBackground}; }
|
||
`),X.listFocusAndSelectionForeground&&H.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${z}:focus .monaco-list-row.selected.focused { color: ${X.listFocusAndSelectionForeground}; }
|
||
`),X.listInactiveFocusForeground&&(H.push(`.monaco-list${z} .monaco-list-row.focused { color: ${X.listInactiveFocusForeground}; }`),H.push(`.monaco-list${z} .monaco-list-row.focused:hover { color: ${X.listInactiveFocusForeground}; }`)),X.listInactiveSelectionIconForeground&&H.push(`.monaco-list${z} .monaco-list-row.focused .codicon { color: ${X.listInactiveSelectionIconForeground}; }`),X.listInactiveFocusBackground&&(H.push(`.monaco-list${z} .monaco-list-row.focused { background-color: ${X.listInactiveFocusBackground}; }`),H.push(`.monaco-list${z} .monaco-list-row.focused:hover { background-color: ${X.listInactiveFocusBackground}; }`)),X.listInactiveSelectionBackground&&(H.push(`.monaco-list${z} .monaco-list-row.selected { background-color: ${X.listInactiveSelectionBackground}; }`),H.push(`.monaco-list${z} .monaco-list-row.selected:hover { background-color: ${X.listInactiveSelectionBackground}; }`)),X.listInactiveSelectionForeground&&H.push(`.monaco-list${z} .monaco-list-row.selected { color: ${X.listInactiveSelectionForeground}; }`),X.listHoverBackground&&H.push(`.monaco-list${z}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${X.listHoverBackground}; }`),X.listHoverForeground&&H.push(`.monaco-list${z}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${X.listHoverForeground}; }`);const Y=(0,L.asCssValueWithDefault)(X.listFocusAndSelectionOutline,(0,L.asCssValueWithDefault)(X.listSelectionOutline,(U=X.listFocusOutline)!==null&&U!==void 0?U:""));Y&&H.push(`.monaco-list${z}:focus .monaco-list-row.focused.selected { outline: 1px solid ${Y}; outline-offset: -1px;}`),X.listFocusOutline&&H.push(`
|
||
.monaco-drag-image,
|
||
.monaco-list${z}:focus .monaco-list-row.focused { outline: 1px solid ${X.listFocusOutline}; outline-offset: -1px; }
|
||
.monaco-workbench.context-menu-visible .monaco-list${z}.last-focused .monaco-list-row.focused { outline: 1px solid ${X.listFocusOutline}; outline-offset: -1px; }
|
||
`);const j=(0,L.asCssValueWithDefault)(X.listSelectionOutline,(G=X.listInactiveFocusOutline)!==null&&G!==void 0?G:"");j&&H.push(`.monaco-list${z} .monaco-list-row.focused.selected { outline: 1px dotted ${j}; outline-offset: -1px; }`),X.listSelectionOutline&&H.push(`.monaco-list${z} .monaco-list-row.selected { outline: 1px dotted ${X.listSelectionOutline}; outline-offset: -1px; }`),X.listInactiveFocusOutline&&H.push(`.monaco-list${z} .monaco-list-row.focused { outline: 1px dotted ${X.listInactiveFocusOutline}; outline-offset: -1px; }`),X.listHoverOutline&&H.push(`.monaco-list${z} .monaco-list-row:hover { outline: 1px dashed ${X.listHoverOutline}; outline-offset: -1px; }`),X.listDropOverBackground&&H.push(`
|
||
.monaco-list${z}.drop-target,
|
||
.monaco-list${z} .monaco-list-rows.drop-target,
|
||
.monaco-list${z} .monaco-list-row.drop-target { background-color: ${X.listDropOverBackground} !important; color: inherit !important; }
|
||
`),X.listDropBetweenBackground&&(H.push(`
|
||
.monaco-list${z} .monaco-list-rows.drop-target-before .monaco-list-row:first-child::before,
|
||
.monaco-list${z} .monaco-list-row.drop-target-before::before {
|
||
content: ""; position: absolute; top: 0px; left: 0px; width: 100%; height: 1px;
|
||
background-color: ${X.listDropBetweenBackground};
|
||
}`),H.push(`
|
||
.monaco-list${z} .monaco-list-rows.drop-target-after .monaco-list-row:last-child::after,
|
||
.monaco-list${z} .monaco-list-row.drop-target-after::after {
|
||
content: ""; position: absolute; bottom: 0px; left: 0px; width: 100%; height: 1px;
|
||
background-color: ${X.listDropBetweenBackground};
|
||
}`)),X.tableColumnsBorder&&H.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: ${X.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;
|
||
}
|
||
`),X.tableOddRowsBackgroundColor&&H.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: ${X.tableOddRowsBackgroundColor};
|
||
}
|
||
`),this.styleElement.textContent=H.join(`
|
||
`)}}e.DefaultStyleController=q,e.unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",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 ie={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function ae(me,X){const U=me.indexOf(X);if(U===-1)return[];const G=[];let z=U-1;for(;z>=0&&me[z]===X-(U-z);)G.push(me[z--]);for(G.reverse(),z=U;z<me.length&&me[z]===X+(z-U);)G.push(me[z++]);return G}function ne(me,X){const U=[];let G=0,z=0;for(;G<me.length||z<X.length;)if(G>=me.length)U.push(X[z++]);else if(z>=X.length)U.push(me[G++]);else if(me[G]===X[z]){U.push(me[G]),G++,z++;continue}else me[G]<X[z]?U.push(me[G++]):U.push(X[z++]);return U}function $(me,X){const U=[];let G=0,z=0;for(;G<me.length||z<X.length;)if(G>=me.length)U.push(X[z++]);else if(z>=X.length)U.push(me[G++]);else if(me[G]===X[z]){G++,z++;continue}else me[G]<X[z]?U.push(me[G++]):z++;return U}const J=(me,X)=>me-X;class Q{constructor(X,U){this._templateId=X,this.renderers=U}get templateId(){return this._templateId}renderTemplate(X){return this.renderers.map(U=>U.renderTemplate(X))}renderElement(X,U,G,z){let H=0;for(const Y of this.renderers)Y.renderElement(X,U,G[H++],z)}disposeElement(X,U,G,z){var H;let Y=0;for(const j of this.renderers)(H=j.disposeElement)===null||H===void 0||H.call(j,X,U,G[Y],z),Y+=1}disposeTemplate(X){let U=0;for(const G of this.renderers)G.disposeTemplate(X[U++])}}class re{constructor(X){this.accessibilityProvider=X,this.templateId="a18n"}renderTemplate(X){return X}renderElement(X,U,G){const z=this.accessibilityProvider.getAriaLabel(X);z?G.setAttribute("aria-label",z):G.removeAttribute("aria-label");const H=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(X);typeof H=="number"?G.setAttribute("aria-level",`${H}`):G.removeAttribute("aria-level")}disposeTemplate(X){}}class de{constructor(X,U){this.list=X,this.dnd=U}getDragElements(X){const U=this.list.getSelectedElements();return U.indexOf(X)>-1?U:[X]}getDragURI(X){return this.dnd.getDragURI(X)}getDragLabel(X,U){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(X,U)}onDragStart(X,U){var G,z;(z=(G=this.dnd).onDragStart)===null||z===void 0||z.call(G,X,U)}onDragOver(X,U,G,z,H){return this.dnd.onDragOver(X,U,G,z,H)}onDragLeave(X,U,G,z){var H,Y;(Y=(H=this.dnd).onDragLeave)===null||Y===void 0||Y.call(H,X,U,G,z)}onDragEnd(X){var U,G;(G=(U=this.dnd).onDragEnd)===null||G===void 0||G.call(U,X)}drop(X,U,G,z,H){this.dnd.drop(X,U,G,z,H)}dispose(){this.dnd.dispose()}}class he{get onDidChangeFocus(){return i.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),X=>this.toListEvent(X),this.disposables)}get onDidChangeSelection(){return i.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),X=>this.toListEvent(X),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 X=!1;const U=i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keydown")).event,H=>H.map(Y=>new y.StandardKeyboardEvent(Y)).filter(Y=>X=Y.keyCode===58||Y.shiftKey&&Y.keyCode===68).map(Y=>L.EventHelper.stop(Y,!0)).filter(()=>!1)),G=i.Event.chain(this.disposables.add(new k.DomEmitter(this.view.domNode,"keyup")).event,H=>H.forEach(()=>X=!1).map(Y=>new y.StandardKeyboardEvent(Y)).filter(Y=>Y.keyCode===58||Y.shiftKey&&Y.keyCode===68).map(Y=>L.EventHelper.stop(Y,!0)).map(({browserEvent:Y})=>{const j=this.getFocus(),Z=j.length?j[0]:void 0,ee=typeof Z<"u"?this.view.element(Z):void 0,le=typeof Z<"u"?this.view.domElement(Z):this.view.domNode;return{index:Z,element:ee,anchor:le,browserEvent:Y}})),z=i.Event.chain(this.view.onContextMenu,H=>H.filter(Y=>!X).map(({element:Y,index:j,browserEvent:Z})=>({element:Y,index:j,anchor:new s.StandardMouseEvent((0,L.getWindow)(this.view.domNode),Z),browserEvent:Z})));return i.Event.any(U,G,z)}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(X,U,G,z,H=ie){var Y,j,Z,ee;this.user=X,this._options=H,this.focus=new o("focused"),this.anchor=new o("anchor"),this.eventBufferer=new i.EventBufferer,this._ariaLabel="",this.disposables=new t.DisposableStore,this._onDidDispose=new i.Emitter,this.onDidDispose=this._onDidDispose.event;const le=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(Y=this._options.accessibilityProvider)===null||Y===void 0?void 0:Y.getWidgetRole():"list";this.selection=new g(le!=="listbox");const ue=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=H.accessibilityProvider,this.accessibilityProvider&&(ue.push(new re(this.accessibilityProvider)),(Z=(j=this.accessibilityProvider).onDidChangeActiveDescendant)===null||Z===void 0||Z.call(j,this.onDidChangeActiveDescendant,this,this.disposables)),z=z.map(pe=>new Q(pe.templateId,[...ue,pe]));const ce={...H,dnd:H.dnd&&new de(this,H.dnd)};if(this.view=this.createListView(U,G,z,ce),this.view.domNode.setAttribute("role",le),H.styleController)this.styleController=H.styleController(this.view.domId);else{const pe=(0,L.createStyleSheet)(this.view.domNode);this.styleController=new q(pe,this.view.domId)}if(this.spliceable=new p.CombinedSpliceable([new h(this.focus,this.view,H.identityProvider),new h(this.selection,this.view,H.identityProvider),new h(this.anchor,this.view,H.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 O(this,this.view)),(typeof H.keyboardSupport!="boolean"||H.keyboardSupport)&&(this.keyboardController=new N(this,this.view,H),this.disposables.add(this.keyboardController)),H.keyboardNavigationLabelProvider){const pe=H.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new x(this,this.view,H.keyboardNavigationLabelProvider,(ee=H.keyboardNavigationEventFilter)!==null&&ee!==void 0?ee:()=>!0,pe),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(H),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(X,U,G,z){return new d.ListView(X,U,G,z)}createMouseController(X){return new F(this)}updateOptions(X={}){var U,G;this._options={...this._options,...X},(U=this.typeNavigationController)===null||U===void 0||U.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(X),(G=this.keyboardController)===null||G===void 0||G.updateOptions(X),this.view.updateOptions(X)}get options(){return this._options}splice(X,U,G=[]){if(X<0||X>this.view.length)throw new c.ListError(this.user,`Invalid start index: ${X}`);if(U<0)throw new c.ListError(this.user,`Invalid delete count: ${U}`);U===0&&G.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(X,U,G))}rerender(){this.view.rerender()}element(X){return this.view.element(X)}indexOf(X){return this.view.indexOf(X)}indexAt(X){return this.view.indexAt(X)}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(X){this.view.setScrollTop(X)}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(X){this._ariaLabel=X,this.view.domNode.setAttribute("aria-label",X)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(X,U){this.view.layout(X,U)}setSelection(X,U){for(const G of X)if(G<0||G>=this.length)throw new c.ListError(this.user,`Invalid index ${G}`);this.selection.set(X,U)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(X=>this.view.element(X))}setAnchor(X){if(typeof X>"u"){this.anchor.set([]);return}if(X<0||X>=this.length)throw new c.ListError(this.user,`Invalid index ${X}`);this.anchor.set([X])}getAnchor(){return(0,_.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const X=this.getAnchor();return typeof X>"u"?void 0:this.element(X)}setFocus(X,U){for(const G of X)if(G<0||G>=this.length)throw new c.ListError(this.user,`Invalid index ${G}`);this.focus.set(X,U)}focusNext(X=1,U=!1,G,z){if(this.length===0)return;const H=this.focus.get(),Y=this.findNextIndex(H.length>0?H[0]+X:0,U,z);Y>-1&&this.setFocus([Y],G)}focusPrevious(X=1,U=!1,G,z){if(this.length===0)return;const H=this.focus.get(),Y=this.findPreviousIndex(H.length>0?H[0]-X:0,U,z);Y>-1&&this.setFocus([Y],G)}async focusNextPage(X,U){let G=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);G=G===0?0:G-1;const z=this.getFocus()[0];if(z!==G&&(z===void 0||G>z)){const H=this.findPreviousIndex(G,!1,U);H>-1&&z!==H?this.setFocus([H],X):this.setFocus([G],X)}else{const H=this.view.getScrollTop();let Y=H+this.view.renderHeight;G>z&&(Y-=this.view.elementHeight(G)),this.view.setScrollTop(Y),this.view.getScrollTop()!==H&&(this.setFocus([]),await(0,v.timeout)(0),await this.focusNextPage(X,U))}}async focusPreviousPage(X,U,G=()=>0){let z;const H=G(),Y=this.view.getScrollTop()+H;Y===0?z=this.view.indexAt(Y):z=this.view.indexAfter(Y-1);const j=this.getFocus()[0];if(j!==z&&(j===void 0||j>=z)){const Z=this.findNextIndex(z,!1,U);Z>-1&&j!==Z?this.setFocus([Z],X):this.setFocus([z],X)}else{const Z=Y;this.view.setScrollTop(Y-this.view.renderHeight-H),this.view.getScrollTop()+G()!==Z&&(this.setFocus([]),await(0,v.timeout)(0),await this.focusPreviousPage(X,U,G))}}focusLast(X,U){if(this.length===0)return;const G=this.findPreviousIndex(this.length-1,!1,U);G>-1&&this.setFocus([G],X)}focusFirst(X,U){this.focusNth(0,X,U)}focusNth(X,U,G){if(this.length===0)return;const z=this.findNextIndex(X,!1,G);z>-1&&this.setFocus([z],U)}findNextIndex(X,U=!1,G){for(let z=0;z<this.length;z++){if(X>=this.length&&!U)return-1;if(X=X%this.length,!G||G(this.element(X)))return X;X++}return-1}findPreviousIndex(X,U=!1,G){for(let z=0;z<this.length;z++){if(X<0&&!U)return-1;if(X=(this.length+X%this.length)%this.length,!G||G(this.element(X)))return X;X--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(X=>this.view.element(X))}reveal(X,U,G=0){if(X<0||X>=this.length)throw new c.ListError(this.user,`Invalid index ${X}`);const z=this.view.getScrollTop(),H=this.view.elementTop(X),Y=this.view.elementHeight(X);if((0,f.isNumber)(U)){const j=Y-this.view.renderHeight+G;this.view.setScrollTop(j*(0,r.clamp)(U,0,1)+H-G)}else{const j=H+Y,Z=z+this.view.renderHeight;H<z+G&&j>=Z||(H<z+G||j>=Z&&Y>=this.view.renderHeight?this.view.setScrollTop(H-G):j>=Z&&this.view.setScrollTop(j-this.view.renderHeight))}}getRelativeTop(X,U=0){if(X<0||X>=this.length)throw new c.ListError(this.user,`Invalid index ${X}`);const G=this.view.getScrollTop(),z=this.view.elementTop(X),H=this.view.elementHeight(X);if(z<G+U||z+H>G+this.view.renderHeight)return null;const Y=H-this.view.renderHeight+U;return Math.abs((G+U-z)/Y)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(X){return this.view.getElementDomId(X)}getElementTop(X){return this.view.elementTop(X)}style(X){this.styleController.style(X)}toListEvent({indexes:X,browserEvent:U}){return{indexes:X,elements:X.map(G=>this.view.element(G)),browserEvent:U}}_onFocusChange(){const X=this.focus.get();this.view.domNode.classList.toggle("element-focused",X.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var X;const U=this.focus.get();if(U.length>0){let G;!((X=this.accessibilityProvider)===null||X===void 0)&&X.getActiveDescendantId&&(G=this.accessibilityProvider.getActiveDescendantId(this.view.element(U[0]))),this.view.domNode.setAttribute("aria-activedescendant",G||this.view.getElementDomId(U[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const X=this.selection.get();this.view.domNode.classList.toggle("selection-none",X.length===0),this.view.domNode.classList.toggle("selection-single",X.length===1),this.view.domNode.classList.toggle("selection-multiple",X.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}e.List=he,ke([a.memoize],he.prototype,"onDidChangeFocus",null),ke([a.memoize],he.prototype,"onDidChangeSelection",null),ke([a.memoize],he.prototype,"onContextMenu",null),ke([a.memoize],he.prototype,"onKeyDown",null),ke([a.memoize],he.prototype,"onDidFocus",null)}),define(se[594],oe([1,0,13,19,6,2,119,275]),function(te,e,L,k,y,E,S){"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,r){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,r);const c=new k.CancellationTokenSource,d=f.resolve(i,c.token);t.disposable={dispose:()=>c.cancel()},this.renderer.renderPlaceholder(i,t.data),d.then(s=>this.renderer.renderElement(s,i,t.data,r))}disposeTemplate(i){i.disposable&&(i.disposable.dispose(),i.disposable=void 0),i.data&&(this.renderer.disposeTemplate(i.data),i.data=void 0)}}class _{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(a,i){return{...i,accessibilityProvider:i.accessibilityProvider&&new _(a,i.accessibilityProvider)}}class b{constructor(i,n,t,r,u={}){const f=()=>this.model,c=r.map(d=>new p(d,f));this.list=new S.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(r=>this._model.get(r)),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(se[322],oe([1,0,7,84,158,77,13,39,6,2,145,147,20,424]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,o){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 o=="number"?o: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,o,g,h){this.container=l,this.view=o,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,o){this.layoutContainer(l);try{this.view.layout(this.size,l,o)}catch(g){console.error("Splitview: Failed to layout view"),console.error(g)}}dispose(){this.disposable.dispose()}}class r 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(s){s[s.Idle=0]="Idle",s[s.Busy=1]="Busy"})(f||(f={}));var c;(function(s){s.Distribute={type:"distribute"};function l(h){return{type:"split",index:h}}s.Split=l;function o(h){return{type:"auto",index:h}}s.Auto=o;function g(h){return{type:"invisible",cachedVisibleSize:h}}s.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 o of this.sashItems)o.sash.orthogonalStartSash=l;this._orthogonalStartSash=l}set orthogonalEndSash(l){for(const o of this.sashItems)o.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,o={}){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 _.Emitter),this._onDidSashReset=this._register(new _.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(g=o.orientation)!==null&&g!==void 0?g:0,this.inverseAltBehavior=(h=o.inverseAltBehavior)!==null&&h!==void 0?h:!1,this.proportionalLayout=(m=o.proportionalLayout)!==null&&m!==void 0?m:!0,this.getSashOrthogonalSize=o.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 a.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=o.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(w=o.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 T=this.scrollableElement.getScrollPosition(),A=Math.abs(this.viewContainer.scrollLeft-T.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,P=Math.abs(this.viewContainer.scrollTop-T.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(A!==void 0||P!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:A,scrollTop:P})})),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(o.styles||n),o.descriptor&&(this.size=o.descriptor.size,o.descriptor.views.forEach((I,T)=>{const A=i.isUndefined(I.visible)||I.visible?I.size:{type:"invisible",cachedVisibleSize:I.size},P=I.view;this.doAddView(P,A,T,!0)}),this._contentSize=this.viewItems.reduce((I,T)=>I+T.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,o,g=this.viewItems.length,h){this.doAddView(l,o,g,h)}layout(l,o){const g=Math.max(this.size,this._contentSize);if(this.size=l,this.layoutContext=o,this.proportions){let h=0;for(let m=0;m<this.viewItems.length;m++){const C=this.viewItems[m],w=this.proportions[m];typeof w=="number"?h+=w:l-=C.size}for(let m=0;m<this.viewItems.length;m++){const C=this.viewItems[m],w=this.proportions[m];typeof w=="number"&&h>0&&(C.size=(0,b.clamp)(Math.round(w*l/h),C.minimumSize,C.maximumSize))}}else{const h=(0,S.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:o,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(M=>M.size);let T=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(D=!D),D)if(h===this.sashItems.length-1){const R=this.viewItems[h];T=(R.minimumSize-R.size)/2,A=(R.maximumSize-R.size)/2}else{const R=this.viewItems[h+1];T=(R.size-R.maximumSize)/2,A=(R.size-R.minimumSize)/2}let P,N;if(!D){const M=(0,S.range)(h,-1),R=(0,S.range)(h+1,this.viewItems.length),x=M.reduce((ie,ae)=>ie+(this.viewItems[ae].minimumSize-I[ae]),0),O=M.reduce((ie,ae)=>ie+(this.viewItems[ae].viewMaximumSize-I[ae]),0),B=R.length===0?Number.POSITIVE_INFINITY:R.reduce((ie,ae)=>ie+(I[ae]-this.viewItems[ae].minimumSize),0),W=R.length===0?Number.NEGATIVE_INFINITY:R.reduce((ie,ae)=>ie+(I[ae]-this.viewItems[ae].viewMaximumSize),0),V=Math.max(x,W),K=Math.min(B,O),F=this.findFirstSnapIndex(M),q=this.findFirstSnapIndex(R);if(typeof F=="number"){const ie=this.viewItems[F],ae=Math.floor(ie.viewMinimumSize/2);P={index:F,limitDelta:ie.visible?V-ae:V+ae,size:ie.size}}if(typeof q=="number"){const ie=this.viewItems[q],ae=Math.floor(ie.viewMinimumSize/2);N={index:q,limitDelta:ie.visible?K+ae:K-ae,size:ie.size}}}this.sashDragState={start:w,current:w,index:h,sizes:I,minDelta:T,maxDelta:A,alt:D,snapBefore:P,snapAfter:N,disposable:m}};C(o,g)}onSashChange({current:l}){const{index:o,start:g,sizes:h,alt:m,minDelta:C,maxDelta:w,snapBefore:D,snapAfter:I}=this.sashDragState;this.sashDragState.current=l;const T=l-g,A=this.resize(o,T,h,void 0,void 0,C,w,D,I);if(m){const P=o===this.sashItems.length-1,N=this.viewItems.map(W=>W.size),M=P?o:o+1,R=this.viewItems[M],x=R.size-R.maximumSize,O=R.size-R.minimumSize,B=P?o-1:o+1;this.resize(B,-A,N,void 0,void 0,x,O)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(l){this._onDidSashChange.fire(l),this.sashDragState.disposable.dispose(),this.saveProportions();for(const o of this.viewItems)o.enabled=!0}onViewChange(l,o){const g=this.viewItems.indexOf(l);g<0||g>=this.viewItems.length||(o=typeof o=="number"?o:l.size,o=(0,b.clamp)(o,l.minimumSize,l.maximumSize),this.inverseAltBehavior&&g>0?(this.resize(g-1,Math.floor((l.size-o)/2)),this.distributeEmptySpace(),this.layoutViews()):(l.size=o,this.relayout([g],void 0)))}resizeView(l,o){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,S.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];o=Math.round(o),o=(0,b.clamp)(o,C.minimumSize,Math.min(C.maximumSize,this.size)),C.size=o,this.relayout(h,m)}finally{this.state=f.Idle}}}distributeViewSizes(){const l=[];let o=0;for(const w of this.viewItems)w.maximumSize-w.minimumSize>0&&(l.push(w),o+=w.size);const g=Math.floor(o/l.length);for(const w of l)w.size=(0,b.clamp)(g,w.minimumSize,w.maximumSize);const h=(0,S.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,o,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(P=>this.onViewChange(T,P)),w=(0,v.toDisposable)(()=>this.viewContainer.removeChild(m)),D=(0,v.combinedDisposable)(C,w);let I;typeof o=="number"?I=o:(o.type==="auto"&&(this.areViewsDistributed()?o={type:"distribute"}:o={type:"split",index:o.index}),o.type==="split"?I=this.getViewSize(o.index)/2:o.type==="invisible"?I={cachedVisibleSize:o.cachedVisibleSize}:I=l.minimumSize);const T=this.orientation===0?new r(m,l,I,D):new u(m,l,I,D);if(this.viewItems.splice(g,0,T),this.viewItems.length>1){const P={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},N=this.orientation===0?new y.Sash(this.sashContainer,{getHorizontalSashTop:ie=>this.getSashPosition(ie),getHorizontalSashWidth:this.getSashOrthogonalSize},{...P,orientation:1}):new y.Sash(this.sashContainer,{getVerticalSashLeft:ie=>this.getSashPosition(ie),getVerticalSashHeight:this.getSashOrthogonalSize},{...P,orientation:0}),M=this.orientation===0?ie=>({sash:N,start:ie.startY,current:ie.currentY,alt:ie.altKey}):ie=>({sash:N,start:ie.startX,current:ie.currentX,alt:ie.altKey}),x=_.Event.map(N.onDidStart,M)(this.onSashStart,this),B=_.Event.map(N.onDidChange,M)(this.onSashChange,this),V=_.Event.map(N.onDidEnd,()=>this.sashItems.findIndex(ie=>ie.sash===N))(this.onSashEnd,this),K=N.onDidReset(()=>{const ie=this.sashItems.findIndex(Q=>Q.sash===N),ae=(0,S.range)(ie,-1),ne=(0,S.range)(ie+1,this.viewItems.length),$=this.findFirstSnapIndex(ae),J=this.findFirstSnapIndex(ne);typeof $=="number"&&!this.viewItems[$].visible||typeof J=="number"&&!this.viewItems[J].visible||this._onDidSashReset.fire(ie)}),F=(0,v.combinedDisposable)(x,B,V,K,N),q={sash:N,disposable:F};this.sashItems.splice(g-1,0,q)}m.appendChild(l.element);let A;typeof o!="number"&&o.type==="split"&&(A=[o.index]),h||this.relayout([g],A),!h&&typeof o!="number"&&o.type==="distribute"&&this.distributeViewSizes()}finally{this.state=f.Idle}}relayout(l,o){const g=this.viewItems.reduce((h,m)=>h+m.size,0);this.resize(this.viewItems.length-1,this.size-g,void 0,l,o),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(l,o,g=this.viewItems.map(T=>T.size),h,m,C=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,D,I){if(l<0||l>=this.viewItems.length)return 0;const T=(0,S.range)(l,-1),A=(0,S.range)(l+1,this.viewItems.length);if(m)for(const q of m)(0,S.pushToStart)(T,q),(0,S.pushToStart)(A,q);if(h)for(const q of h)(0,S.pushToEnd)(T,q),(0,S.pushToEnd)(A,q);const P=T.map(q=>this.viewItems[q]),N=T.map(q=>g[q]),M=A.map(q=>this.viewItems[q]),R=A.map(q=>g[q]),x=T.reduce((q,ie)=>q+(this.viewItems[ie].minimumSize-g[ie]),0),O=T.reduce((q,ie)=>q+(this.viewItems[ie].maximumSize-g[ie]),0),B=A.length===0?Number.POSITIVE_INFINITY:A.reduce((q,ie)=>q+(g[ie]-this.viewItems[ie].minimumSize),0),W=A.length===0?Number.NEGATIVE_INFINITY:A.reduce((q,ie)=>q+(g[ie]-this.viewItems[ie].maximumSize),0),V=Math.max(x,W,C),K=Math.min(B,O,w);let F=!1;if(D){const q=this.viewItems[D.index],ie=o>=D.limitDelta;F=ie!==q.visible,q.setVisible(ie,D.size)}if(!F&&I){const q=this.viewItems[I.index],ie=o<I.limitDelta;F=ie!==q.visible,q.setVisible(ie,I.size)}if(F)return this.resize(l,o,g,h,m,C,w);o=(0,b.clamp)(o,V,K);for(let q=0,ie=o;q<P.length;q++){const ae=P[q],ne=(0,b.clamp)(N[q]+ie,ae.minimumSize,ae.maximumSize),$=ne-N[q];ie-=$,ae.size=ne}for(let q=0,ie=o;q<M.length;q++){const ae=M[q],ne=(0,b.clamp)(R[q]-ie,ae.minimumSize,ae.maximumSize),$=ne-R[q];ie+=$,ae.size=ne}return o}distributeEmptySpace(l){const o=this.viewItems.reduce((w,D)=>w+D.size,0);let g=this.size-o;const h=(0,S.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,S.pushToStart)(h,w);for(const w of m)(0,S.pushToEnd)(h,w);typeof l=="number"&&(0,S.pushToEnd)(h,l);for(let w=0;g!==0&&w<h.length;w++){const D=this.viewItems[h[w]],I=(0,b.clamp)(D.size+g,D.minimumSize,D.maximumSize),T=I-D.size;g-=T,D.size=I}}layoutViews(){this._contentSize=this.viewItems.reduce((o,g)=>o+g.size,0);let l=0;for(const o of this.viewItems)o.layout(l,this.layoutContext),l+=o.size;this.sashItems.forEach(o=>o.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 o=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;D<this.sashItems.length;D++){const{sash:I}=this.sashItems[D],T=this.viewItems[D];w+=T.size;const A=!(o[D]&&C[D+1]),P=!(g[D]&&m[D+1]);if(A&&P){const N=(0,S.range)(D,-1),M=(0,S.range)(D+1,this.viewItems.length),R=this.findFirstSnapIndex(N),x=this.findFirstSnapIndex(M),O=typeof R=="number"&&!this.viewItems[R].visible,B=typeof x=="number"&&!this.viewItems[x].visible;O&&m[D]&&(w>0||this.startSnappingEnabled)?I.state=1:B&&o[D]&&(w<this._contentSize||this.endSnappingEnabled)?I.state=2:I.state=0}else A&&!P?I.state=1:!A&&P?I.state=2:I.state=3}}getSashPosition(l){let o=0;for(let g=0;g<this.sashItems.length;g++)if(o+=this.viewItems[g].size,this.sashItems[g].sash===l)return o;return 0}findFirstSnapIndex(l){for(const o of l){const g=this.viewItems[o];if(g.visible&&g.snap)return o}for(const o of l){const g=this.viewItems[o];if(g.visible&&g.maximumSize-g.minimumSize>0)return;if(!g.visible&&g.snap)return o}}areViewsDistributed(){let l,o;for(const g of this.viewItems)if(l=l===void 0?g.size:Math.min(l,g.size),o=o===void 0?g.size:Math.max(o,g.size),o-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(o=>o.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=d}),define(se[595],oe([1,0,7,119,322,6,2,425]),function(te,e,L,k,y,E,S){"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 r=new Map(n.map(u=>[u.templateId,u]));this.renderers=[];for(const u of i){const f=r.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=[],r=[];for(let f=0;f<this.columns.length;f++){const c=this.renderers[f],d=(0,L.append)(n,(0,L.$)(".monaco-table-td",{"data-col-index":f}));d.style.width=`${this.getColumnSize(f)}px`,t.push(d),r.push(c.renderTemplate(d))}const u={container:i,cellContainers:t,cellTemplateData:r};return this.renderedTemplates.add(u),u}renderElement(i,n,t,r){for(let u=0;u<this.columns.length;u++){const c=this.columns[u].project(i);this.renderers[u].renderElement(c,n,t.cellTemplateData[u],r)}}disposeElement(i,n,t,r){for(let u=0;u<this.columns.length;u++){const f=this.renderers[u];if(f.disposeElement){const d=this.columns[u].project(i);f.disposeElement(d,n,t.cellTemplateData[u],r)}}}disposeTemplate(i){for(let n=0;n<this.columns.length;n++)this.renderers[n].disposeTemplate(i.cellTemplateData[n]);(0,L.clearNode)(i.container),this.renderedTemplates.delete(i)}layoutColumn(i,n){for(const{cellContainers:t}of this.renderedTemplates)t[i].style.width=`${n}px`}}p.TemplateId="row";function _(a){return{getHeight(i){return a.getHeight(i)},getTemplateId(){return p.TemplateId}}}class v{get minimumSize(){var i;return(i=this.column.minimumWidth)!==null&&i!==void 0?i:120}get maximumSize(){var i;return(i=this.column.maximumWidth)!==null&&i!==void 0?i:Number.POSITIVE_INFINITY}get onDidChange(){var i;return(i=this.column.onDidChangeWidthConstraints)!==null&&i!==void 0?i:E.Event.None}constructor(i,n){this.column=i,this.index=n,this._onDidLayout=new E.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,L.$)(".monaco-table-th",{"data-col-index":n,title:i.tooltip},i.label)}layout(i){this._onDidLayout.fire([this.index,i])}}class b{get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onDidScroll(){return this.list.onDidScroll}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get scrollTop(){return this.list.scrollTop}set scrollTop(i){this.list.scrollTop=i}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(i,n,t,r,u,f){this.virtualDelegate=t,this.domId=`table_id_${++b.InstanceCount}`,this.disposables=new S.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,L.append)(n,(0,L.$)(`.monaco-table.${this.domId}`));const c=r.map((l,o)=>new v(l,o)),d={size:c.reduce((l,o)=>l+o.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 s=new p(r,u,l=>this.splitview.getViewSize(l));this.list=this.disposables.add(new k.List(i,this.domNode,_(t),[s],f)),E.Event.any(...c.map(l=>l.onDidLayout))(([l,o])=>s.layoutColumn(l,o),null,this.disposables),this.splitview.onDidSashReset(l=>{const o=r.reduce((h,m)=>h+m.weight,0),g=r[l].weight/o*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(se[159],oe([1,0,76,28,6,426]),function(te,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 _=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,_.push(...k.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&_.push(...this._opts.actionClassName.split(" ")),this._checked&&_.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(..._),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(se[323],oe([1,0,159,26,568]),function(te,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),S=y.localize(1,null),p=y.localize(2,null);class _ 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=_;class v extends L.Toggle{constructor(i){super({icon:k.Codicon.wholeWord,title:S+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(se[49],oe([1,0,222,47,95,17,11,22]),function(te,e,L,k,y,E,S,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 _(a){return(0,p.uriToFsPath)(a,!0)}e.originalFSPath=_;class v{constructor(i){this._ignorePathCasing=i}compare(i,n,t=!1){return i===n?0:(0,S.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(_(i),_(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(_(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(_(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(_(i),_(n));return E.isWindows?L.toSlashes(u):u}let t=i.path||"/";const r=n.path||"/";if(this._ignorePathCasing(i)){let u=0;for(const f=Math.min(t.length,r.length);u<f&&!(t.charCodeAt(u)!==r.charCodeAt(u)&&t.charAt(u).toLowerCase()!==r.charAt(u).toLowerCase());u++);t=r.substr(0,u)+t.substr(u)}return y.posix.relative(t,r)}resolvePath(i,n){if(i.scheme===k.Schemas.file){const t=p.URI.file(y.resolve(_(i),n));return i.with({authority:t.authority,path:t.path})}return n=L.toPosixPath(n),i.with({path:y.posix.resolve(i.path,n)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,n){return i===n||i!==void 0&&n!==void 0&&(0,S.equalsIgnoreCase)(i,n)}hasTrailingPathSeparator(i,n=y.sep){if(i.scheme===k.Schemas.file){const t=_(i);return t.length>L.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 r=_(i);t=r!==void 0&&r.length===L.getRoot(r).length&&r[r.length-1]===n}else{n="/";const r=i.path;t=r.length===1&&r.charCodeAt(r.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(a=>a.scheme===k.Schemas.file?!E.isLinux:!0),e.extUriIgnorePathCase=new v(a=>!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(a){a.META_DATA_LABEL="label",a.META_DATA_DESCRIPTION="description",a.META_DATA_SIZE="size",a.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(a.META_DATA_MIME,u),t}a.parseMetaData=i})(b||(e.DataUri=b={}))}),define(se[58],oe([1,0,12,126,49,11,22]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.appendEscapedMarkdownCodeBlockFence=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class p{constructor(f="",c=!1){var d,s,l;if(this.value=f,typeof this.value!="string")throw(0,L.illegalArgument)("value");typeof c=="boolean"?(this.isTrusted=c,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(d=c.isTrusted)!==null&&d!==void 0?d:void 0,this.supportThemeIcons=(s=c.supportThemeIcons)!==null&&s!==void 0?s:!1,this.supportHtml=(l=c.supportHtml)!==null&&l!==void 0?l:!1)}appendText(f,c=0){return this.value+=a(this.supportThemeIcons?(0,k.escapeIcons)(f):f).replace(/([ \t]+)/g,(d,s)=>" ".repeat(s.length)).replace(/\>/gm,"\\>").replace(/\n/g,c===1?`\\
|
||
`:`
|
||
|
||
`),this}appendMarkdown(f){return this.value+=f,this}appendCodeblock(f,c){return this.value+=`
|
||
${i(c,f)}
|
||
`,this}appendLink(f,c,d){return this.value+="[",this.value+=this._escape(c,"]"),this.value+="](",this.value+=this._escape(String(f),")"),d&&(this.value+=` "${this._escape(this._escape(d,'"'),")")}"`),this.value+=")",this}_escape(f,c){const d=new RegExp((0,E.escapeRegExpCharacters)(c),"g");return f.replace(d,(s,l)=>f.charAt(l-1)!=="\\"?`\\${s}`:s)}}e.MarkdownString=p;function _(u){return v(u)?!u.value:Array.isArray(u)?u.every(_):!0}e.isEmptyMarkdownString=_;function v(u){return u instanceof p?!0:u&&typeof u=="object"?typeof u.value=="string"&&(typeof u.isTrusted=="boolean"||typeof u.isTrusted=="object"||u.isTrusted===void 0)&&(typeof u.supportThemeIcons=="boolean"||u.supportThemeIcons===void 0):!1}e.isMarkdownString=v;function b(u,f){return u===f?!0:!u||!f?!1:u.value===f.value&&u.isTrusted===f.isTrusted&&u.supportThemeIcons===f.supportThemeIcons&&u.supportHtml===f.supportHtml&&(u.baseUri===f.baseUri||!!u.baseUri&&!!f.baseUri&&(0,y.isEqual)(S.URI.from(u.baseUri),S.URI.from(f.baseUri)))}e.markdownStringEqual=b;function a(u){return u.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=a;function i(u,f){var c,d;const s=(d=(c=u.match(/^`+/gm))===null||c===void 0?void 0:c.reduce((o,g)=>o.length>g.length?o:g).length)!==null&&d!==void 0?d:0,l=s>=3?s+1:3;return[`${"`".repeat(l)}${f}`,u,`${"`".repeat(l)}`].join(`
|
||
`)}e.appendEscapedMarkdownCodeBlockFence=i;function n(u){return u.replace(/"/g,""")}e.escapeDoubleQuotes=n;function t(u){return u&&u.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}e.removeMarkdownEscapes=t;function r(u){const f=[],c=u.split("|").map(s=>s.trim());u=c[0];const d=c[1];if(d){const s=/height=(\d+)/.exec(d),l=/width=(\d+)/.exec(d),o=s?s[1]:"",g=l?l[1]:"",h=isFinite(parseInt(g)),m=isFinite(parseInt(o));h&&f.push(`width="${g}"`),m&&f.push(`height="${o}"`)}return{href:u,dimensions:f}}e.parseHrefAndDimensions=r}),define(se[186],oe([1,0,7,316,84,317,46,67,118,12,6,58,126,170,99,2,400,223,47,55,49,11,22]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o){"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:($,J,Q)=>{let re=[],de=[];return $&&({href:$,dimensions:re}=(0,a.parseHrefAndDimensions)($),de.push(`src="${(0,a.escapeDoubleQuotes)($)}"`)),Q&&de.push(`alt="${(0,a.escapeDoubleQuotes)(Q)}"`),J&&de.push(`title="${(0,a.escapeDoubleQuotes)(J)}"`),re.length&&(de=de.concat(re)),"<img "+de.join(" ")+">"},paragraph:$=>`<p>${$}</p>`,link:($,J,Q)=>typeof $!="string"?"":($===Q&&(Q=(0,a.removeMarkdownEscapes)(Q)),J=typeof J=="string"?(0,a.escapeDoubleQuotes)((0,a.removeMarkdownEscapes)(J)):"",$=(0,a.removeMarkdownEscapes)($),$=$.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${$}" title="${J||$}" draggable="false">${Q}</a>`)});function h($,J={},Q={}){var re,de;const he=new r.DisposableStore;let me=!1;const X=(0,E.createElement)(J),U=function(ue){let ce;try{ce=(0,f.parse)(decodeURIComponent(ue))}catch{}return ce?(ce=(0,d.cloneAndChange)(ce,pe=>{if($.uris&&$.uris[pe])return o.URI.revive($.uris[pe])}),encodeURIComponent(JSON.stringify(ce))):ue},G=function(ue,ce){const pe=$.uris&&$.uris[ue];let ve=o.URI.revive(pe);return ce?ue.startsWith(c.Schemas.data+":")?ue:(ve||(ve=o.URI.parse(ue)),c.FileAccess.uriToBrowserUri(ve).toString(!0)):!ve||o.URI.parse(ue).toString()===ve.toString()?ue:(ve.query&&(ve=ve.with({query:U(ve.query)})),ve.toString())},z=new u.marked.Renderer;z.image=g.image,z.link=g.link,z.paragraph=g.paragraph;const H=[],Y=[];if(J.codeBlockRendererSync?z.code=(ue,ce)=>{const pe=n.defaultGenerator.nextId(),ve=J.codeBlockRendererSync(m(ce),ue);return Y.push([pe,ve]),`<div class="code" data-code="${pe}">${(0,l.escape)(ue)}</div>`}:J.codeBlockRenderer&&(z.code=(ue,ce)=>{const pe=n.defaultGenerator.nextId(),ve=J.codeBlockRenderer(m(ce),ue);return H.push(ve.then(Ce=>[pe,Ce])),`<div class="code" data-code="${pe}">${(0,l.escape)(ue)}</div>`}),J.actionHandler){const ue=function(ve){let Ce=ve.target;if(!(Ce.tagName!=="A"&&(Ce=Ce.parentElement,!Ce||Ce.tagName!=="A")))try{let Se=Ce.dataset.href;Se&&($.baseUri&&(Se=C(o.URI.from($.baseUri),Se)),J.actionHandler.callback(Se,ve))}catch(Se){(0,v.onUnexpectedError)(Se)}finally{ve.preventDefault()}},ce=J.actionHandler.disposables.add(new y.DomEmitter(X,"click")),pe=J.actionHandler.disposables.add(new y.DomEmitter(X,"auxclick"));J.actionHandler.disposables.add(b.Event.any(ce.event,pe.event)(ve=>{const Ce=new p.StandardMouseEvent(L.getWindow(X),ve);!Ce.leftButton&&!Ce.middleButton||ue(Ce)})),J.actionHandler.disposables.add(L.addDisposableListener(X,"keydown",ve=>{const Ce=new S.StandardKeyboardEvent(ve);!Ce.equals(10)&&!Ce.equals(3)||ue(Ce)}))}$.supportHtml||(Q.sanitizer=ue=>($.isTrusted?ue.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?ue:"",Q.sanitize=!0,Q.silent=!0),Q.renderer=z;let j=(re=$.value)!==null&&re!==void 0?re:"";j.length>1e5&&(j=`${j.substr(0,1e5)}\u2026`),$.supportThemeIcons&&(j=(0,i.markdownEscapeEscapedIcons)(j));let Z;if(J.fillInIncompleteTokens){const ue={...u.marked.defaults,...Q},ce=u.marked.lexer(j,ue),pe=R(ce);Z=u.marked.parser(pe,ue)}else Z=u.marked.parse(j,Q);$.supportThemeIcons&&(Z=(0,_.renderLabelWithIcons)(Z).map(ce=>typeof ce=="string"?ce:ce.outerHTML).join(""));const le=new DOMParser().parseFromString(w($,Z),"text/html");if(le.body.querySelectorAll("img").forEach(ue=>{const ce=ue.getAttribute("src");if(ce){let pe=ce;try{$.baseUri&&(pe=C(o.URI.from($.baseUri),pe))}catch{}ue.src=G(pe,!0)}}),le.body.querySelectorAll("a").forEach(ue=>{const ce=ue.getAttribute("href");if(ue.setAttribute("href",""),!ce||/^data:|javascript:/i.test(ce)||/^command:/i.test(ce)&&!$.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(ce))ue.replaceWith(...ue.childNodes);else{let pe=G(ce,!1);$.baseUri&&(pe=C(o.URI.from($.baseUri),ce)),ue.dataset.href=pe}}),X.innerHTML=w($,le.body.innerHTML),H.length>0)Promise.all(H).then(ue=>{var ce,pe;if(me)return;const ve=new Map(ue),Ce=X.querySelectorAll("div[data-code]");for(const Se of Ce){const _e=ve.get((ce=Se.dataset.code)!==null&&ce!==void 0?ce:"");_e&&L.reset(Se,_e)}(pe=J.asyncRenderCallback)===null||pe===void 0||pe.call(J)});else if(Y.length>0){const ue=new Map(Y),ce=X.querySelectorAll("div[data-code]");for(const pe of ce){const ve=ue.get((de=pe.dataset.code)!==null&&de!==void 0?de:"");ve&&L.reset(pe,ve)}}if(J.asyncRenderCallback)for(const ue of X.getElementsByTagName("img")){const ce=he.add(L.addDisposableListener(ue,"load",()=>{ce.dispose(),J.asyncRenderCallback()}))}return{element:X,dispose:()=>{me=!0,he.dispose()}}}e.renderMarkdown=h;function m($){if(!$)return"";const J=$.split(/[\s+|:|,|\{|\?]/,1);return J.length?J[0]:$}function C($,J){return/^\w[\w\d+.-]*:/.test(J)?J:$.path.endsWith("/")?(0,s.resolvePath)($,J).toString():(0,s.resolvePath)((0,s.dirname)($),J).toString()}function w($,J){const{config:Q,allowedSchemes:re}=D($);k.addHook("uponSanitizeAttribute",(he,me)=>{var X;if(me.attrName==="style"||me.attrName==="class"){if(he.tagName==="SPAN"){if(me.attrName==="style"){me.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(me.attrValue);return}else if(me.attrName==="class"){me.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(me.attrValue);return}}me.keepAttr=!1;return}else if(he.tagName==="INPUT"&&((X=he.attributes.getNamedItem("type"))===null||X===void 0?void 0:X.value)==="checkbox"){if(me.attrName==="type"&&me.attrValue==="checkbox"||me.attrName==="disabled"||me.attrName==="checked"){me.keepAttr=!0;return}me.keepAttr=!1}}),k.addHook("uponSanitizeElement",(he,me)=>{var X,U;me.tagName==="input"&&(((X=he.attributes.getNamedItem("type"))===null||X===void 0?void 0:X.value)==="checkbox"?he.setAttribute("disabled",""):(U=he.parentElement)===null||U===void 0||U.removeChild(he))});const de=L.hookDomPurifyHrefAndSrcSanitizer(re);try{return k.sanitize(J,{...Q,RETURN_TRUSTED_TYPE:!0})}finally{k.removeHook("uponSanitizeAttribute"),de.dispose()}}e.allowedMarkdownAttr=["align","autoplay","alt","checked","class","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","src","style","target","title","type","width","start"];function D($){const J=[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 $.isTrusted&&J.push(c.Schemas.command),{config:{ALLOWED_TAGS:[...L.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:J}}function I($){return typeof $=="string"?$:T($)}e.renderStringAsPlaintext=I;function T($){var J;let Q=(J=$.value)!==null&&J!==void 0?J:"";Q.length>1e5&&(Q=`${Q.substr(0,1e5)}\u2026`);const re=u.marked.parse(Q,{renderer:P.value}).replace(/&(#\d+|[a-zA-Z]+);/g,de=>{var he;return(he=A.get(de))!==null&&he!==void 0?he:de});return w({isTrusted:!1},re).toString()}e.renderMarkdownAsPlaintext=T;const A=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),P=new t.Lazy(()=>{const $=new u.marked.Renderer;return $.code=J=>J,$.blockquote=J=>J,$.html=J=>"",$.heading=(J,Q,re)=>J+`
|
||
`,$.hr=()=>"",$.list=(J,Q)=>J,$.listitem=J=>J+`
|
||
`,$.paragraph=J=>J+`
|
||
`,$.table=(J,Q)=>J+Q+`
|
||
`,$.tablerow=J=>J,$.tablecell=(J,Q)=>J+" ",$.strong=J=>J,$.em=J=>J,$.codespan=J=>J,$.br=()=>`
|
||
`,$.del=J=>J,$.image=(J,Q,re)=>"",$.text=J=>J,$.link=(J,Q,re)=>re,$});function N($){let J="";return $.forEach(Q=>{J+=Q.raw}),J}function M($){var J,Q;for(let re=0;re<$.tokens.length;re++){const de=$.tokens[re];if(de.type==="text"){const he=de.raw.split(`
|
||
`),me=he[he.length-1];if(me.includes("`"))return O($);if(me.includes("**"))return q($);if(me.match(/\*\w/))return B($);if(me.match(/(^|\s)__\w/))return ie($);if(me.match(/(^|\s)_\w/))return W($);if(me.match(/(^|\s)\[.*\]\(\w*/)){const X=$.tokens.slice(re+1);return((J=X[0])===null||J===void 0?void 0:J.type)==="link"&&((Q=X[1])===null||Q===void 0?void 0:Q.type)==="text"&&X[1].raw.match(/^ *"[^"]*$/)?K($):V($)}else if(me.match(/(^|\s)\[\w/))return F($)}}}function R($){let J,Q;for(J=0;J<$.length;J++){const re=$[J];if(re.type==="paragraph"&&re.raw.match(/(\n|^)```/)){Q=x($.slice(J));break}if(re.type==="paragraph"&&re.raw.match(/(\n|^)\|/)){Q=ne($.slice(J));break}if(J===$.length-1&&re.type==="paragraph"){const de=M(re);if(de){Q=[de];break}}}if(Q){const re=[...$.slice(0,J),...Q];return re.links=$.links,re}return $}e.fillInIncompleteTokens=R;function x($){const J=N($);return u.marked.lexer(J+"\n```")}function O($){return ae($,"`")}function B($){return ae($,"*")}function W($){return ae($,"_")}function V($){return ae($,")")}function K($){return ae($,'")')}function F($){return ae($,"](about:blank)")}function q($){return ae($,"**")}function ie($){return ae($,"__")}function ae($,J){const Q=N(Array.isArray($)?$:[$]);return u.marked.lexer(Q+J)[0]}function ne($){const J=N($),Q=J.split(`
|
||
`);let re,de=!1;for(let he=0;he<Q.length;he++){const me=Q[he].trim();if(typeof re>"u"&&me.match(/^\s*\|/)){const X=me.match(/(\|[^\|]+)(?=\||$)/g);X&&(re=X.length)}else if(typeof re=="number")if(me.match(/^\s*\|/)){if(he!==Q.length-1)return;de=!0}else return}if(typeof re=="number"&&re>0){const he=de?Q.slice(0,-1).join(`
|
||
`):J,me=!!he.match(/\|\s*$/),X=he+(me?"":"|")+`
|
||
|${" --- |".repeat(re)}`;return u.marked.lexer(X)}}}),define(se[229],oe([1,0,7,316,46,186,63,118,39,6,58,2,28,409]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:_.Color.white.toString(),buttonForeground:_.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};class n extends a.Disposable{get onDidClick(){return this._onDidClick.event}constructor(r,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")),typeof u.ariaLabel=="string"&&this._element.setAttribute("aria-label",u.ariaLabel),r.appendChild(this._element),this._register(S.Gesture.addTarget(this._element)),[L.EventType.CLICK,S.EventType.Tap].forEach(d=>{this._register((0,L.addDisposableListener)(this._element,d,s=>{if(!this.enabled){L.EventHelper.stop(s);return}this._onDidClick.fire(s)}))}),this._register((0,L.addDisposableListener)(this._element,L.EventType.KEY_DOWN,d=>{const s=new y.StandardKeyboardEvent(d);let l=!1;this.enabled&&(s.equals(3)||s.equals(10))?(this._onDidClick.fire(d),l=!0):s.equals(9)&&(this._element.blur(),l=!0),l&&L.EventHelper.stop(s,!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(r){const u=[];for(let f of(0,p.renderLabelWithIcons)(r))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(r){let u;this.options.secondary?u=r?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:u=r?this.options.buttonHoverBackground:this.options.buttonBackground,u&&(this._element.style.backgroundColor=u)}get element(){return this._element}set label(r){var u;if(this._label===r||(0,b.isMarkdownString)(this._label)&&(0,b.isMarkdownString)(r)&&(0,b.markdownStringEqual)(this._label,r))return;this._element.classList.add("monaco-text-button");const f=this.options.supportShortLabel?this._labelElement:this._element;if((0,b.isMarkdownString)(r)){const c=(0,E.renderMarkdown)(r,{inline:!0});c.dispose();const d=(u=c.element.querySelector("p"))===null||u===void 0?void 0:u.innerHTML;if(d){const s=(0,k.sanitize)(d,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});f.innerHTML=s}else(0,L.reset)(f)}else this.options.supportIcons?(0,L.reset)(f,...this.getContentElements(r)):f.textContent=r;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,E.renderStringAsPlaintext)(r)),typeof this.options.ariaLabel=="string"?this._element.setAttribute("aria-label",this.options.ariaLabel):this.options.ariaLabel&&this._element.setAttribute("aria-label",this._element.title),this._label=r}get label(){return this._label}set icon(r){this._element.classList.add(...i.ThemeIcon.asClassNameArray(r))}set enabled(r){r?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=n}),define(se[324],oe([1,0,7,14,19,58,126,2,20,571]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function b(n,t){(0,_.isString)(t)?n.title=(0,S.stripIcons)(t):t?.markdownNotSupportedFallback?n.title=t.markdownNotSupportedFallback:n.removeAttribute("title")}e.setupNativeHover=b;class a{constructor(t,r,u){this.hoverDelegate=t,this.target=r,this.fadeInAnimation=u}async update(t,r,u){var f;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let c;if(t===void 0||(0,_.isString)(t)||t instanceof HTMLElement)c=t;else if(!(0,_.isFunction)(t.markdown))c=(f=t.markdown)!==null&&f!==void 0?f:t.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,v.localize)(0,null),r),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,r,u)}show(t,r,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,r)}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,r;(t=this._hoverWidget)===null||t===void 0||t.dispose(),(r=this._cancellationTokenSource)===null||r===void 0||r.dispose(!0),this._cancellationTokenSource=void 0}}function i(n,t,r,u){let f,c;const d=(T,A)=>{var P;const N=c!==void 0;T&&(c?.dispose(),c=void 0),A&&(f?.dispose(),f=void 0),N&&((P=n.onDidHideHover)===null||P===void 0||P.call(n))},s=(T,A,P)=>new k.TimeoutTimer(async()=>{(!c||c.isDisposed)&&(c=new a(n,P||t,T>0),await c.update(r,A,u))},T);let l=!1;const o=L.addDisposableListener(t,L.EventType.MOUSE_DOWN,()=>{l=!0,d(!0,!0)},!0),g=L.addDisposableListener(t,L.EventType.MOUSE_UP,()=>{l=!1},!0),h=L.addDisposableListener(t,L.EventType.MOUSE_LEAVE,T=>{l=!1,d(!1,T.fromElement===t)},!0),m=()=>{if(f)return;const T=new p.DisposableStore,A={targetElements:[t],dispose:()=>{}};if(n.placement===void 0||n.placement==="mouse"){const P=N=>{A.x=N.x+10,N.target instanceof HTMLElement&&N.target.classList.contains("action-label")&&d(!0,!0)};T.add(L.addDisposableListener(t,L.EventType.MOUSE_MOVE,P,!0))}T.add(s(n.delay,!1,A)),f=T},C=L.addDisposableListener(t,L.EventType.MOUSE_OVER,m,!0),w=()=>{if(l||f)return;const T={targetElements:[t],dispose:()=>{}},A=new p.DisposableStore,P=()=>d(!0,!0);A.add(L.addDisposableListener(t,L.EventType.BLUR,P,!0)),A.add(s(n.delay,!1,T)),f=A},D=L.addDisposableListener(t,L.EventType.FOCUS,w,!0);return{show:T=>{d(!1,!0),s(0,T)},hide:()=>{d(!0,!0)},update:async(T,A)=>{r=T,await c?.update(r,void 0,A)},dispose:()=>{C.dispose(),h.dispose(),o.dispose(),g.dispose(),D.dispose(),d(!0,!0)}}}e.setupCustomHover=i}),define(se[230],oe([1,0,7,320,324,2,55,172,415]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class _{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,r){super(),this.customHovers=new Map,this.creationOptions=r,this.domNode=this._register(new _(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")),r?.supportHighlights||r?.supportIcons?this.nameNode=new i(this.nameContainer,!!r.supportIcons):this.nameNode=new b(this.nameContainer),this.hoverDelegate=r?.hoverDelegate}get element(){return this.domNode.element}setLabel(t,r,u){var f;const c=["monaco-icon-label"],d=["monaco-icon-label-container"];let s="";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"?s+=u.title:s+=t)),this.domNode.className=c.join(" "),this.domNode.element.setAttribute("aria-label",s),this.labelContainer.className=d.join(" "),this.setupHover(u?.descriptionTitle?this.labelContainer:this.element,u?.title),this.nameNode.setLabel(t,u),r||this.descriptionNode){const l=this.getOrCreateDescriptionNode();l instanceof k.HighlightedLabel?(l.set(r||"",u?u.descriptionMatches:void 0,void 0,u?.labelEscapeNewLines),this.setupHover(l.element,u?.descriptionTitle)):(l.textContent=r&&u?.labelEscapeNewLines?k.HighlightedLabel.escapeNewLines(r,[]):r||"",this.setupHover(l.element,u?.descriptionTitle||""),l.empty=!r)}if(u?.suffix||this.suffixNode){const l=this.getOrCreateSuffixNode();l.textContent=(f=u?.suffix)!==null&&f!==void 0?f:""}}setupHover(t,r){const u=this.customHovers.get(t);if(u&&(u.dispose(),this.customHovers.delete(t)),!r){t.removeAttribute("title");return}if(!this.hoverDelegate)(0,y.setupNativeHover)(t,r);else{const f=(0,y.setupCustomHover)(this.hoverDelegate,t,r);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 _(L.after(this.nameContainer,L.$("span.monaco-icon-suffix-container"))));this.suffixNode=this._register(new _(L.append(t.element,L.$("span.label-suffix"))))}return this.suffixNode}getOrCreateDescriptionNode(){var t;if(!this.descriptionNode){const r=this._register(new _(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(r.element,L.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new _(L.append(r.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,r){if(!(this.label===t&&(0,S.equals)(this.options,r)))if(this.label=t,this.options=r,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=L.append(this.container,L.$("a.label-name",{id:r?.domId}))),this.singleLabel.textContent=t;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let u=0;u<t.length;u++){const f=t[u],c=r?.domId&&`${r?.domId}_${u}`;L.append(this.container,L.$("a.label-name",{id:c,"data-icon-label-count":t.length,"data-icon-label-index":u,role:"treeitem"},f)),u<t.length-1&&L.append(this.container,L.$("span.label-separator",void 0,r?.separator||"/"))}}}}function a(n,t,r){if(!r)return;let u=0;return n.map(f=>{const c={start:u,end:u+f.length},d=r.map(s=>p.Range.intersect(c,s)).filter(s=>!p.Range.isEmpty(s)).map(({start:s,end:l})=>({start:s-u,end:l-u}));return u=c.end+t.length,d})}class i{constructor(t,r){this.container=t,this.supportIcons=r,this.label=void 0,this.singleLabel=void 0}setLabel(t,r){if(!(this.label===t&&(0,S.equals)(this.options,r)))if(this.label=t,this.options=r,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:r?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(t,r?.matches,void 0,r?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const u=r?.separator||"/",f=a(t,u,r?.matches);for(let c=0;c<t.length;c++){const d=t[c],s=f?f[c]:void 0,l=r?.domId&&`${r?.domId}_${c}`,o=L.$("a.label-name",{id:l,"data-icon-label-count":t.length,"data-icon-label-index":c,role:"treeitem"});new k.HighlightedLabel(L.append(this.container,o),{supportIcons:this.supportIcons}).set(d,s,void 0,r?.labelEscapeNewLines),c<t.length-1&&L.append(o,L.$("span.label-separator",void 0,u))}}}}}),define(se[596],oe([1,0,7,84,46,186,119,13,6,65,2,17,574,423]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const n=L.$,t="selectOption.entry.template";class r{get templateId(){return t}renderTemplate(c){const d=Object.create(null);return d.root=c,d.text=L.append(c,n(".option-text")),d.detail=L.append(c,n(".option-detail")),d.decoratorRight=L.append(c,n(".option-decorator-right")),d}renderElement(c,d,s){const l=s,o=c.text,g=c.detail,h=c.decoratorRight,m=c.isDisabled;l.text.textContent=o,l.detail.textContent=g||"",l.decoratorRight.innerText=h||"",m?l.root.classList.add("option-disabled"):l.root.classList.remove("option-disabled")}disposeTemplate(c){}}class u extends b.Disposable{constructor(c,d,s,l,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.styles=l,this.selectBoxOptions=o||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=u.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN:this.selectBoxOptions.minBottomMargin<0&&(this.selectBoxOptions.minBottomMargin=0),this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new _.Emitter,this._register(this._onDidSelect),this.registerListeners(),this.constructSelectDropDown(s),this.selected=d||0,c&&this.setOptions(c,d),this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return t}constructSelectDropDown(c){this.contextViewProvider=c,this.selectDropDownContainer=L.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=L.append(this.selectDropDownContainer,n(".select-box-details-pane"));const d=L.append(this.selectDropDownContainer,n(".select-box-dropdown-container-width-control")),s=L.append(d,n(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",L.append(s,this.widthControlElement),this._dropDownPosition=0,this.styleElement=L.createStyleSheet(this.selectDropDownContainer),this.selectDropDownContainer.setAttribute("draggable","true"),this._register(L.addDisposableListener(this.selectDropDownContainer,L.EventType.DRAG_START,l=>{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 s=new y.StandardKeyboardEvent(d);let l=!1;a.isMacintosh?(s.keyCode===18||s.keyCode===16||s.keyCode===10||s.keyCode===3)&&(l=!0):(s.keyCode===18&&s.altKey||s.keyCode===16&&s.altKey||s.keyCode===10||s.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((s,l)=>{this.selectElement.add(this.createOption(s.text,l,s.isDisabled)),typeof s.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&&c<this.options.length?this.selected=c:c>this.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}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,s;const l=(c=this.styles.selectBackground)!==null&&c!==void 0?c:"",o=(d=this.styles.selectForeground)!==null&&d!==void 0?d:"",g=(s=this.styles.selectBorder)!==null&&s!==void 0?s:"";this.selectElement.style.backgroundColor=l,this.selectElement.style.color=o,this.selectElement.style.borderColor=g}styleList(){var c,d;const s=(c=this.styles.selectBackground)!==null&&c!==void 0?c:"",l=L.asCssValueWithDefault(this.styles.selectListBackground,s);this.selectDropDownListContainer.style.backgroundColor=l,this.selectionDetailsPane.style.backgroundColor=l;const o=(d=this.styles.focusBorder)!==null&&d!==void 0?d:"";this.selectDropDownContainer.style.outlineColor=o,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(c,d,s){const l=document.createElement("option");return l.value=c,l.text=c,l.disabled=!!s,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,s)=>{this.updateDetail(s),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),s=L.getDomNodePagePosition(this.selectElement),l=L.getWindow(this.selectElement).getComputedStyle(this.selectElement),o=parseFloat(l.getPropertyValue("--dropdown-padding-top"))+parseFloat(l.getPropertyValue("--dropdown-padding-bottom")),g=d.innerHeight-s.top-s.height-(this.selectBoxOptions.minBottomMargin||0),h=s.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,T=D+o+I,A=Math.floor((g-o-I)/this.getHeight()),P=Math.floor((h-o-I)/this.getHeight());if(c)return s.top+s.height>d.innerHeight-22||s.top<u.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||A<1&&P<1?!1:(A<u.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&P>A&&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(s.top+s.height>d.innerHeight-22||s.top<u.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&A<1||this._dropDownPosition===1&&P<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&A+P<1)return this.hideSelectDropDown(!0),!1;T>g&&(D=A*this.getHeight())}else T>h&&(D=P*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+o+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=D+o+"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 s=0,l=0;this.options.forEach((o,g)=>{const h=o.detail?o.detail.length:0,m=o.decoratorRight?o.decoratorRight.length:0,C=o.text.length+h+m;C>l&&(s=g,l=C)}),c.textContent=this.options[s].text+(this.options[s].decoratorRight?this.options[s].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 r,this.selectList=new S.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:l=>{let o=l.text;return l.detail&&(o+=`. ${l.detail}`),l.decoratorRight&&(o+=`. ${l.decoratorRight}`),l.description&&(o+=`. ${l.description}`),o},getWidgetAriaLabel:()=>(0,i.localize)(0,null),getRole:()=>a.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const d=this._register(new k.DomEmitter(this.selectDropDownListContainer,"keydown")),s=_.Event.chain(d.event,l=>l.filter(()=>this.selectList.length>0).map(o=>new y.StandardKeyboardEvent(o)));this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===3))(this.onEnter,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===2))(this.onEnter,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===9))(this.onEscape,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===16))(this.onUpArrow,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===18))(this.onDownArrow,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===12))(this.onPageDown,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===11))(this.onPageUp,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===14))(this.onHome,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode===13))(this.onEnd,this)),this._register(_.Event.chain(s,l=>l.filter(o=>o.keyCode>=21&&o.keyCode<=56||o.keyCode>=85&&o.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 s=d.closest(".monaco-list-row");if(!s)return;const l=Number(s.getAttribute("data-index")),o=s.classList.contains("option-disabled");l>=0&&l<this.options.length&&!o&&(this.selected=l,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0))}onListBlur(){this._sticky||(this.selected!==this._currentSelection&&this.select(this._currentSelection),this.hideSelectDropDown(!1))}renderDescriptionMarkdown(c,d){const s=o=>{for(let g=0;g<o.childNodes.length;g++){const h=o.childNodes.item(g);(h.tagName&&h.tagName.toLowerCase())==="img"?o.removeChild(h):s(h)}},l=(0,E.renderMarkdown)({value:c,supportThemeIcons:!0},{actionHandler:d});return l.element.classList.add("select-box-description-markdown"),s(l.element),l.element}onListFocus(c){!this._isVisible||!this._hasDetails||this.updateDetail(c.indexes[0])}updateDetail(c){var d,s;this.selectionDetailsPane.innerText="";const l=this.options[c],o=(d=l?.description)!==null&&d!==void 0?d:"",g=(s=l?.descriptionIsMarkdown)!==null&&s!==void 0?s:!1;if(o){if(g){const h=l.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(o,h))}else this.selectionDetailsPane.innerText=o;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(c){L.EventHelper.stop(c),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(c){L.EventHelper.stop(c),this.selected!==this._currentSelection&&(this._currentSelection=this.selected,this._onDidSelect.fire({index:this.selectElement.selectedIndex,selected:this.options[this.selected].text}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)),this.hideSelectDropDown(!0)}onDownArrow(c){if(this.selected<this.options.length-1){L.EventHelper.stop(c,!0);const d=this.options[this.selected+1].isDisabled;if(d&&this.options.length>this.selected+2)this.selected+=2;else{if(d)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(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.options.length-1&&(this.selected++,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onPageDown(c){L.EventHelper.stop(c),this.selectList.focusNextPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(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 s=-1;for(let l=0;l<this.options.length-1;l++)if(s=(l+this.selected+1)%this.options.length,this.options[s].text.charAt(0).toUpperCase()===d&&!this.options[s].isDisabled){this.select(s),this.selectList.setFocus([s]),this.selectList.reveal(this.selectList.getFocus()[0]),L.EventHelper.stop(c);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}e.SelectBoxList=u,u.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,u.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,u.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}),define(se[597],oe([1,0,596,591,76,17,422]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBox=void 0;class S extends y.Widget{constructor(_,v,b,a,i){super(),E.isMacintosh&&!i?.useCustomDrawn?this.selectBoxDelegate=new k.SelectBoxNative(_,v,a,i):this.selectBoxDelegate=new L.SelectBoxList(_,v,b,a,i),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(_,v){this.selectBoxDelegate.setOptions(_,v)}select(_){this.selectBoxDelegate.select(_)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(_){this.selectBoxDelegate.setFocusable(_)}render(_){this.selectBoxDelegate.render(_)}}e.SelectBox=S}),define(se[135],oe([1,0,54,198,7,63,324,597,42,2,17,20,566,272]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class n extends v.Disposable{get action(){return this._action}constructor(f,c,d={}){super(),this.options=d,this._context=f||this,this._action=c,c instanceof _.Action&&this._register(c.onDidChange(s=>{this.element&&this.handleActionChangeEvent(s)}))}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 _.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,s=>{var l;return(l=s.dataTransfer)===null||l===void 0?void 0:l.setData(k.DataTransfers.TEXT,this._action.label)}))),this._register((0,y.addDisposableListener)(c,E.EventType.Tap,s=>this.onClick(s,!0))),this._register((0,y.addDisposableListener)(c,y.EventType.MOUSE_DOWN,s=>{d||y.EventHelper.stop(s,!0),this._action.enabled&&s.button===0&&c.classList.add("active")})),b.isMacintosh&&this._register((0,y.addDisposableListener)(c,y.EventType.CONTEXT_MENU,s=>{s.button===0&&s.ctrlKey===!0&&this.onClick(s)})),this._register((0,y.addDisposableListener)(c,y.EventType.CLICK,s=>{y.EventHelper.stop(s,!0),this.options&&this.options.isMenu||this.onClick(s)})),this._register((0,y.addDisposableListener)(c,y.EventType.DBLCLICK,s=>{y.EventHelper.stop(s,!0)})),[y.EventType.MOUSE_UP,y.EventType.MOUSE_OUT].forEach(s=>{this._register((0,y.addDisposableListener)(c,s,l=>{y.EventHelper.stop(l),c.classList.remove("active")}))})}onClick(f,c=!1){var d;y.EventHelper.stop(f,!0);const s=a.isUndefinedOrNull(this._context)?!((d=this.options)===null||d===void 0)&&d.useEventAsContext?f:{preserveFocus:c}:this._context;this.actionRunner.run(this._action,s)}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,S.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),a.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===_.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 r extends n{constructor(f,c,d,s,l,o,g){super(f,c),this.selectBox=new p.SelectBox(d,s,l,o,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=r}),define(se[78],oe([1,0,7,46,135,42,6,2,20,272]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class v extends p.Disposable{constructor(a,i={}){var n,t,r,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 S.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new S.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new S.Emitter),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new S.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=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.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,s;switch(this._orientation){case 0:d=[15],s=[17];break;case 1:d=[16],s=[18],this.domNode.className+=" vertical";break}this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_DOWN,l=>{const o=new k.StandardKeyboardEvent(l);let g=!0;const h=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;d&&(o.equals(d[0])||o.equals(d[1]))?g=this.focusPrevious():s&&(o.equals(s[0])||o.equals(s[1]))?g=this.focusNext():o.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():o.equals(14)?g=this.focusFirst():o.equals(13)?g=this.focusLast():o.equals(2)&&h instanceof y.BaseActionViewItem&&h.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(o)?this._triggerKeys.keyDown?this.doTrigger(o):this.triggerKeyDown=!0:g=!1,g&&(o.preventDefault(),o.stopPropagation())})),this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_UP,l=>{const o=new k.StandardKeyboardEvent(l);this.isTriggerKeyEvent(o)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(o)),o.preventDefault(),o.stopPropagation()):(o.equals(2)||o.equals(1026)||o.equals(16)||o.equals(18)||o.equals(15)||o.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),a.appendChild(this.domNode)}refreshRole(){this.length()>=1?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(a){if(this.focusable=a,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(a){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||a.equals(n)}),i}updateFocusedItem(){var a,i;for(let n=0;n<this.actionsList.children.length;n++){const t=this.actionsList.children[n];if(L.isAncestor(L.getActiveElement(),t)){this.focusedItem=n,(i=(a=this.viewItems[this.focusedItem])===null||a===void 0?void 0:a.showHover)===null||i===void 0||i.call(a);break}}}get context(){return this._context}set context(a){this._context=a,this.viewItems.forEach(i=>i.setActionContext(a))}get actionRunner(){return this._actionRunner}set actionRunner(a){this._actionRunner=a,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=a)}getContainer(){return this.domNode}getAction(a){var i;if(typeof a=="number")return(i=this.viewItems[a])===null||i===void 0?void 0:i.action;if(a instanceof HTMLElement){for(;a.parentElement!==this.actionsList;){if(!a.parentElement)return;a=a.parentElement}for(let n=0;n<this.actionsList.childNodes.length;n++)if(this.actionsList.childNodes[n]===a)return this.viewItems[n].action}}push(a,i={}){const n=Array.isArray(a)?a:[a];let t=_.isNumber(i.index)?i.index:null;n.forEach(r=>{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(r,c)),f||(f=new y.ActionViewItem(this.context,r,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(a){let i=!1,n;if(a===void 0?i=!0:typeof a=="number"?n=a:typeof a=="boolean"&&(i=a),i&&typeof this.focusedItem>"u"){const t=this.viewItems.findIndex(r=>r.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(a){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(!a&&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(a){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(!a&&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(a,i,n=!1){var t,r;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;_.isFunction(u.focus)||(f=!1),this.options.focusOnlyEnabledItems&&_.isFunction(u.isEnabled)&&!u.isEnabled()&&(f=!1),u.action.id===E.Separator.ID&&(f=!1),f?(n||this.previouslyFocusedItem!==this.focusedItem)&&(u.focus(a),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0),f&&((r=u.showHover)===null||r===void 0||r.call(u))}}doTrigger(a){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?a:i._context;this.run(i._action,n)}}async run(a,i){await this._actionRunner.run(a,i)}dispose(){this._context=void 0,this.viewItems=(0,p.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=v}),define(se[325],oe([1,0,7,135,588,6,273]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class S extends k.BaseActionViewItem{constructor(_,v,b,a=Object.create(null)){super(null,_,a),this.actionItem=null,this._onDidChangeVisibility=this._register(new E.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=v,this.contextMenuProvider=b,this.options=a,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(_){this.actionItem=_;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),a={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(_,a)),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 _=null;return this.action.tooltip?_=this.action.tooltip:this.action.label&&(_=this.action.label),_??void 0}setActionContext(_){super.setActionContext(_),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=_:this.dropdownMenu.menuOptions={context:_})}show(){var _;(_=this.dropdownMenu)===null||_===void 0||_.show()}updateEnabled(){var _,v;const b=!this.action.enabled;(_=this.actionItem)===null||_===void 0||_.classList.toggle("disabled",b),(v=this.element)===null||v===void 0||v.classList.toggle("disabled",b)}}e.DropdownMenuActionViewItem=S}),define(se[231],oe([1,0,7,84,317,78,48,77,76,6,403,55,572,416]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 _.Widget{constructor(f,c,d){var s;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=(s=this.options.tooltip)!==null&&s!==void 0?s: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",o=L.append(this.element,n(".ibwrapper"));if(this.input=L.append(o,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(o,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===o});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,a.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:s=>{var l,o;if(!this.message)return null;f=L.append(s,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=(o=m.foreground)!==null&&o!==void 0?o:"",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),S.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 s=this.options.inputBoxStyles,l=(f=s.inputBackground)!==null&&f!==void 0?f:"",o=(c=s.inputForeground)!==null&&c!==void 0?c:"",g=(d=s.inputBorder)!==null&&d!==void 0?d:"";this.element.style.backgroundColor=l,this.element.style.color=o,this.input.style.backgroundColor="inherit",this.input.style.color=o,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,s=c.selectionEnd,l=c.value;d!==null&&s!==null&&(this.value=l.substr(0,d)+f+l.substr(s),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 r extends t{constructor(f,c,d){const s=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 o=()=>{if(d.showHistoryHint&&d.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(l)&&this.history.getHistory().length){const g=this.placeholder.endsWith(")")?s: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||o()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>o()),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(s)})}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??"",S.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,S.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=r}),define(se[232],oe([1,0,7,323,231,76,6,567,2,274]),function(te,e,L,k,y,E,S,p,_){"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 _.MutableDisposable),this.additionalToggles=[],this._onDidOptionChange=this._register(new S.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new S.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new S.Emitter),this._onKeyUp=this._register(new S.Emitter),this._onCaseSensitiveKeyDown=this._register(new S.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new S.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 r=t.appendCaseSensitiveLabel||"",u=t.appendWholeWordsLabel||"",f=t.appendRegexLabel||"",c=t.history||[],d=!!t.flexibleHeight,s=!!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:s,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:r,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 o=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const h=o.indexOf(this.domNode.ownerDocument.activeElement);if(h>=0){let m=-1;g.equals(17)?m=(h+1)%o.length:g.equals(15)&&(h===0?m=o.length-1:m=h-1),g.equals(9)?(o[h].blur(),this.inputBox.focus()):m>=0&&o[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",o=>{this.imeSessionInProgress=!0})),this._register(L.addDisposableListener(this.inputBox.inputElement,"compositionend",o=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,o=>this._onKeyDown.fire(o)),this.onkeyup(this.inputBox.inputElement,o=>this._onKeyUp.fire(o)),this.oninput(this.inputBox.inputElement,o=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,o=>this._onMouseDown.fire(o))}get 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 r of this.additionalToggles)r.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 r of this.additionalToggles)r.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 _.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,r,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=(r=this.wholeWords)===null||r===void 0?void 0:r.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,s)=>d+s.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(se[598],oe([1,0,7,159,231,76,26,6,569,274]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const v=_.localize(0,null),b=_.localize(1,null);class a extends k.Toggle{constructor(t){super({icon:S.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,r,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=r,this.placeholder=f.placeholder||"",this.validation=f.validation,this.label=f.label||v;const c=f.appendPreserveCaseLabel||"",d=f.history||[],s=!!f.flexibleHeight,l=!!f.flexibleWidth,o=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:s,flexibleWidth:l,flexibleMaxHeight:o,inputBoxStyles:f.inputBoxStyles})),this.preserveCase=this._register(new a({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(se[599],oe([1,0,54,63,7,46,67,78,135,318,77,42,14,26,28,126,2,17,11]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 s extends p.ActionBar{constructor(D,I,T,A){D.classList.add("monaco-menu-container"),D.setAttribute("role","presentation");const P=document.createElement("div");P.classList.add("monaco-menu"),P.setAttribute("role","presentation"),super(P,{orientation:1,actionViewItemProvider:x=>this.doGetActionViewItem(x,T,N),context:T.context,actionRunner:T.actionRunner,ariaLabel:T.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...f.isMacintosh||f.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=A,this.menuElement=P,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(D,A),this._register(k.Gesture.addTarget(P)),this._register((0,y.addDisposableListener)(P,y.EventType.KEY_DOWN,x=>{new E.StandardKeyboardEvent(x).equals(2)&&x.preventDefault()})),T.enableMnemonics&&this._register((0,y.addDisposableListener)(P,y.EventType.KEY_DOWN,x=>{const O=x.key.toLocaleLowerCase();if(this.mnemonics.has(O)){y.EventHelper.stop(x,!0);const B=this.mnemonics.get(O);if(B.length===1&&(B[0]instanceof o&&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(O,B)}}})),f.isLinux&&this._register((0,y.addDisposableListener)(P,y.EventType.KEY_DOWN,x=>{const O=new E.StandardKeyboardEvent(x);O.equals(14)||O.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),y.EventHelper.stop(x,!0)):(O.equals(13)||O.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 O=x.relatedTarget;(0,y.isAncestor)(O,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),x.stopPropagation())})),this._register((0,y.addDisposableListener)(this.actionsList,y.EventType.MOUSE_OVER,x=>{let O=x.target;if(!(!O||!(0,y.isAncestor)(O,this.actionsList)||O===this.actionsList)){for(;O.parentElement!==this.actionsList&&O.parentElement!==null;)O=O.parentElement;if(O.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(O),B!==this.focusedItem&&this.updateFocus()}}})),this._register(k.Gesture.addTarget(this.actionsList)),this._register((0,y.addDisposableListener)(this.actionsList,k.EventType.Tap,x=>{let O=x.initialTarget;if(!(!O||!(0,y.isAncestor)(O,this.actionsList)||O===this.actionsList)){for(;O.parentElement!==this.actionsList&&O.parentElement!==null;)O=O.parentElement;if(O.classList.contains("action-item")){const B=this.focusedItem;this.setFocusedItem(O),B!==this.focusedItem&&this.updateFocus()}}}));const N={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new b.DomScrollableElement(P,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const M=this.scrollableElement.getDomNode();M.style.position="",this.styleScrollElement(M,A),this._register((0,y.addDisposableListener)(P,k.EventType.Change,x=>{y.EventHelper.stop(x,!0);const O=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:O-x.translationY})})),this._register((0,y.addDisposableListener)(M,y.EventType.MOUSE_UP,x=>{x.preventDefault()}));const R=(0,y.getWindow)(D);P.style.maxHeight=`${Math.max(10,R.innerHeight-D.getBoundingClientRect().top-35)}px`,I=I.filter((x,O)=>{var B;return!((B=T.submenuIds)===null||B===void 0)&&B.has(x.id)?(console.warn(`Found submenu cycle: ${x.id}`),!1):!(x instanceof a.Separator&&(O===I.length-1||O===0||I[O-1]instanceof a.Separator))}),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,O,B)=>{x.updatePositionInSet(O+1,B.length)})}initializeOrUpdateStyleSheet(D,I){this.styleSheet||((0,y.isInShadowDOM)(D)?this.styleSheet=(0,y.createStyleSheet)(D):(s.globalStyleSheet||(s.globalStyleSheet=(0,y.createStyleSheet)()),this.styleSheet=s.globalStyleSheet)),this.styleSheet.textContent=C(I,(0,y.isInShadowDOM)(D))}styleScrollElement(D,I){var T,A;const P=(T=I.foregroundColor)!==null&&T!==void 0?T:"",N=(A=I.backgroundColor)!==null&&A!==void 0?A:"",M=I.borderColor?`1px solid ${I.borderColor}`:"",R="5px",x=I.shadowColor?`0 2px 8px ${I.shadowColor}`:"";D.style.outline=M,D.style.borderRadius=R,D.style.color=P,D.style.backgroundColor=N,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.actionsList.children.length;I++){const T=this.actionsList.children[I];if(D===T){this.focusedItem=I;break}}}updateFocus(D){super.updateFocus(D,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(D,I,T){if(D instanceof a.Separator)return new g(I.context,D,{icon:!0},this.menuStyles);if(D instanceof a.SubmenuAction){const A=new o(D,D.actions,T,{...I,submenuIds:new Set([...I.submenuIds||[],D.id])},this.menuStyles);if(I.enableMnemonics){const P=A.getMnemonic();if(P&&A.isEnabled()){let N=[];this.mnemonics.has(P)&&(N=this.mnemonics.get(P)),N.push(A),this.mnemonics.set(P,N)}}return A}else{const A={enableMnemonics:I.enableMnemonics,useEventAsContext:I.useEventAsContext};if(I.getKeyBinding){const N=I.getKeyBinding(D);if(N){const M=N.getLabel();M&&(A.keybinding=M)}}const P=new l(I.context,D,A,this.menuStyles);if(I.enableMnemonics){const N=P.getMnemonic();if(N&&P.isEnabled()){let M=[];this.mnemonics.has(N)&&(M=this.mnemonics.get(N)),M.push(P),this.mnemonics.set(N,M)}}return P}}}e.Menu=s;class l extends _.BaseActionViewItem{constructor(D,I,T,A){if(T.isMenu=!0,super(I,I,T),this.menuStyle=A,this.options=T,this.options.icon=T.icon!==void 0?T.icon:!1,this.options.label=T.label!==void 0?T.label:!0,this.cssClass="",this.options.label&&T.enableMnemonics){const P=this.action.label;if(P){const N=e.MENU_MNEMONIC_REGEX.exec(P);N&&(this.mnemonic=(N[1]?N[1]:N[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new i.RunOnceScheduler(()=>{this.element&&(this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_UP,P=>{if(y.EventHelper.stop(P,!0),L.isFirefox){if(new S.StandardMouseEvent((0,y.getWindow)(this.element),P).rightButton)return;this.onClick(P)}else setTimeout(()=>{this.onClick(P)},0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.CONTEXT_MENU,P=>{y.EventHelper.stop(P,!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===a.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,r.stripIcons)(this.action.label);if(I){const T=h(I);this.options.enableMnemonics||(I=T),this.label.setAttribute("aria-label",T.replace(/&&/g,"&"));const A=e.MENU_MNEMONIC_REGEX.exec(I);if(A){I=c.escape(I),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let P=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);for(;P&&P[1];)P=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(I);const N=M=>M.replace(/&&/g,"&");P?this.label.append(c.ltrim(N(I.substr(0,P.index))," "),(0,y.$)("u",{"aria-hidden":"true"},P[3]),c.rtrim(N(I.substr(P.index+P[0].length))," ")):this.label.innerText=N(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,T=D&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,A=D&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",P=D&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=I??"",this.item.style.backgroundColor=T??"",this.item.style.outline=A,this.item.style.outlineOffset=P),this.check&&(this.check.style.color=I??"")}}class o extends l{constructor(D,I,T,A,P){super(D,D,A,P),this.submenuActions=I,this.parentData=T,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 T=new E.StandardKeyboardEvent(I);(T.equals(17)||T.equals(3))&&(y.EventHelper.stop(I,!0),this.createSubmenu(!0))})),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,I=>{const T=new E.StandardKeyboardEvent(I);(0,y.getActiveElement)()===this.item&&(T.equals(17)||T.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,T,A){const P={top:0,left:0};return P.left=(0,v.layout)(D.width,I.width,{position:A===d.Right?0:1,offset:T.left,size:T.width}),P.left>=T.left&&P.left<T.left+T.width&&(T.left+10+I.width<=D.width&&(P.left=T.left+10),T.top+=10,T.height=0),P.top=(0,v.layout)(D.height,I.height,{position:0,offset:T.top,size:0}),P.top+I.height===T.top&&P.top+T.height+I.height<=D.height&&(P.top+=T.height),P}createSubmenu(D=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,y.append)(this.element,(0,y.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const I=(0,y.getWindow)(this.parentData.parent.domNode).getComputedStyle(this.parentData.parent.domNode),T=parseFloat(I.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new s(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new a.EmptySubmenuAction],this.submenuOptions,this.menuStyle);const A=this.element.getBoundingClientRect(),P={top:A.top-T,left:A.left,height:A.height+2*T,width:A.width},N=this.submenuContainer.getBoundingClientRect(),M=(0,y.getWindow)(this.element),{top:R,left:x}=this.calculateSubmenuMenuLayout(new y.Dimension(M.innerWidth,M.innerHeight),y.Dimension.lift(N),P,this.expandDirection);this.submenuContainer.style.left=`${x-N.left}px`,this.submenuContainer.style.top=`${R-N.top}px`,this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_UP,O=>{new E.StandardKeyboardEvent(O).equals(15)&&(y.EventHelper.stop(O,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_DOWN,O=>{new E.StandardKeyboardEvent(O).equals(15)&&y.EventHelper.stop(O,!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 _.ActionViewItem{constructor(D,I,T,A){super(D,I,T),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 T=!I[1];return w.replace(D,T?"$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 T=w.scrollbarShadow;T&&(I+=`
|
||
.monaco-scrollable-element > .shadow.top {
|
||
box-shadow: ${T} 0 6px 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.left {
|
||
box-shadow: ${T} 6px 0 6px -6px inset;
|
||
}
|
||
|
||
.monaco-scrollable-element > .shadow.top.left {
|
||
box-shadow: ${T} 6px 6px 6px -6px inset;
|
||
}
|
||
`);const A=w.scrollbarSliderBackground;A&&(I+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider {
|
||
background: ${A};
|
||
}
|
||
`);const P=w.scrollbarSliderHoverBackground;P&&(I+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
||
background: ${P};
|
||
}
|
||
`);const N=w.scrollbarSliderActiveBackground;N&&(I+=`
|
||
.monaco-scrollable-element > .scrollbar > .slider.active {
|
||
background: ${N};
|
||
}
|
||
`)}return I}}),define(se[600],oe([1,0,78,325,42,26,28,6,2,575,427]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class b extends _.Disposable{constructor(n,t,r={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 _.DisposableStore),this.options=r,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new a(()=>{var u;return(u=this.toggleMenuActionViewItem)===null||u===void 0?void 0:u.show()},r.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:r.orientation,ariaLabel:r.ariaLabel,actionRunner:r.actionRunner,allowContextMenu:r.allowContextMenu,highlightToggledItems:r.highlightToggledItems,actionViewItemProvider:(u,f)=>{var c;if(u.id===a.ID)return this.toggleMenuActionViewItem=new k.DropdownMenuActionViewItem(u,u.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:S.ThemeIcon.asClassNameArray((c=r.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(r.actionViewItemProvider){const d=r.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 r=n?n.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),r.push(this.toggleMenuAction)),r.forEach(u=>{this.actionBar.push(u,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(u)})})}getKeybindingLabel(n){var t,r,u;const f=this.lookupKeybindings?(r=(t=this.options).getKeyBinding)===null||r===void 0?void 0:r.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 a extends y.Action{constructor(n,t){t=t||v.localize(0,null),super(a.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=a,a.ID="toolbar.toggle.more"}),define(se[187],oe([1,0,7,84,46,78,232,231,228,119,159,220,143,42,13,14,26,28,53,6,71,2,145,20,576,428]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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 _.ElementsDragAndDropData{constructor(U){super(U.elements.map(G=>G.element)),this.data=U}}function C(X){return X instanceof _.ElementsDragAndDropData?new m(X):X}class w{constructor(U,G){this.modelProvider=U,this.dnd=G,this.autoExpandDisposable=l.Disposable.None,this.disposables=new l.DisposableStore}getDragURI(U){return this.dnd.getDragURI(U.element)}getDragLabel(U,G){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(U.map(z=>z.element),G)}onDragStart(U,G){var z,H;(H=(z=this.dnd).onDragStart)===null||H===void 0||H.call(z,C(U),G)}onDragOver(U,G,z,H,Y,j=!0){const Z=this.dnd.onDragOver(C(U),G&&G.element,z,H,Y),ee=this.autoExpandNode!==G;if(ee&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=G),typeof G>"u")return Z;if(ee&&typeof Z!="boolean"&&Z.autoExpand&&(this.autoExpandDisposable=(0,r.disposableTimeout)(()=>{const ve=this.modelProvider(),Ce=ve.getNodeLocation(G);ve.isCollapsed(Ce)&&ve.setCollapsed(Ce,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof Z=="boolean"||!Z.accept||typeof Z.bubble>"u"||Z.feedback){if(!j){const ve=typeof Z=="boolean"?Z:Z.accept,Ce=typeof Z=="boolean"?void 0:Z.effect;return{accept:ve,effect:Ce,feedback:[z]}}return Z}if(Z.bubble===1){const ve=this.modelProvider(),Ce=ve.getNodeLocation(G),Se=ve.getParentNodeLocation(Ce),_e=ve.getNode(Se),Ee=Se&&ve.getListIndex(Se);return this.onDragOver(U,_e,Ee,H,Y,!1)}const le=this.modelProvider(),ue=le.getNodeLocation(G),ce=le.getListIndex(ue),pe=le.getListRenderCount(ue);return{...Z,feedback:(0,t.range)(ce,ce+pe)}}drop(U,G,z,H,Y){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(C(U),G&&G.element,z,H,Y)}onDragEnd(U){var G,z;(z=(G=this.dnd).onDragEnd)===null||z===void 0||z.call(G,U)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function D(X,U){return U&&{...U,identityProvider:U.identityProvider&&{getId(G){return U.identityProvider.getId(G.element)}},dnd:U.dnd&&new w(X,U.dnd),multipleSelectionController:U.multipleSelectionController&&{isSelectionSingleChangeEvent(G){return U.multipleSelectionController.isSelectionSingleChangeEvent({...G,element:G.element})},isSelectionRangeChangeEvent(G){return U.multipleSelectionController.isSelectionRangeChangeEvent({...G,element:G.element})}},accessibilityProvider:U.accessibilityProvider&&{...U.accessibilityProvider,getSetSize(G){const z=X(),H=z.getNodeLocation(G),Y=z.getParentNodeLocation(H);return z.getNode(Y).visibleChildrenCount},getPosInSet(G){return G.visibleChildIndex+1},isChecked:U.accessibilityProvider&&U.accessibilityProvider.isChecked?G=>U.accessibilityProvider.isChecked(G.element):void 0,getRole:U.accessibilityProvider&&U.accessibilityProvider.getRole?G=>U.accessibilityProvider.getRole(G.element):()=>"treeitem",getAriaLabel(G){return U.accessibilityProvider.getAriaLabel(G.element)},getWidgetAriaLabel(){return U.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:U.accessibilityProvider&&U.accessibilityProvider.getWidgetRole?()=>U.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:U.accessibilityProvider&&U.accessibilityProvider.getAriaLevel?G=>U.accessibilityProvider.getAriaLevel(G.element):G=>G.depth,getActiveDescendantId:U.accessibilityProvider.getActiveDescendantId&&(G=>U.accessibilityProvider.getActiveDescendantId(G.element))},keyboardNavigationLabelProvider:U.keyboardNavigationLabelProvider&&{...U.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(G){return U.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(G.element)}}}}class I{constructor(U){this.delegate=U}getHeight(U){return this.delegate.getHeight(U.element)}getTemplateId(U){return this.delegate.getTemplateId(U.element)}hasDynamicHeight(U){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(U.element)}setDynamicHeight(U,G){var z,H;(H=(z=this.delegate).setDynamicHeight)===null||H===void 0||H.call(z,U.element,G)}}e.ComposedTreeDelegate=I;var T;(function(X){X.None="none",X.OnHover="onHover",X.Always="always"})(T||(e.RenderIndentGuides=T={}));class A{get elements(){return this._elements}constructor(U,G=[]){this._elements=G,this.disposables=new l.DisposableStore,this.onDidChange=d.Event.forEach(U,z=>this._elements=z,this.disposables)}dispose(){this.disposables.dispose()}}class P{constructor(U,G,z,H,Y,j={}){var Z;this.renderer=U,this.modelProvider=G,this.activeNodes=H,this.renderedIndentGuides=Y,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=P.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=l.Disposable.None,this.disposables=new l.DisposableStore,this.templateId=U.templateId,this.updateOptions(j),d.Event.map(z,ee=>ee.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(Z=U.onDidChangeTwistieState)===null||Z===void 0||Z.call(U,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(U={}){if(typeof U.indent<"u"){const G=(0,o.clamp)(U.indent,0,40);if(G!==this.indent){this.indent=G;for(const[z,H]of this.renderedNodes)this.renderTreeElement(z,H)}}if(typeof U.renderIndentGuides<"u"){const G=U.renderIndentGuides!==T.None;if(G!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=G;for(const[z,H]of this.renderedNodes)this._renderIndentGuides(z,H);if(this.indentGuidesDisposable.dispose(),G){const z=new l.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,z),this.indentGuidesDisposable=z,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof U.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=U.hideTwistiesOfChildlessElements)}renderTemplate(U){const G=(0,L.append)(U,(0,L.$)(".monaco-tl-row")),z=(0,L.append)(G,(0,L.$)(".monaco-tl-indent")),H=(0,L.append)(G,(0,L.$)(".monaco-tl-twistie")),Y=(0,L.append)(G,(0,L.$)(".monaco-tl-contents")),j=this.renderer.renderTemplate(Y);return{container:U,indent:z,twistie:H,indentGuidesDisposable:l.Disposable.None,templateData:j}}renderElement(U,G,z,H){this.renderedNodes.set(U,z),this.renderedElements.set(U.element,U),this.renderTreeElement(U,z),this.renderer.renderElement(U,G,z.templateData,H)}disposeElement(U,G,z,H){var Y,j;z.indentGuidesDisposable.dispose(),(j=(Y=this.renderer).disposeElement)===null||j===void 0||j.call(Y,U,G,z.templateData,H),typeof H=="number"&&(this.renderedNodes.delete(U),this.renderedElements.delete(U.element))}disposeTemplate(U){this.renderer.disposeTemplate(U.templateData)}onDidChangeTwistieState(U){const G=this.renderedElements.get(U);G&&this.onDidChangeNodeTwistieState(G)}onDidChangeNodeTwistieState(U){const G=this.renderedNodes.get(U);G&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(U,G))}renderTreeElement(U,G){const z=P.DefaultIndent+(U.depth-1)*this.indent;G.twistie.style.paddingLeft=`${z}px`,G.indent.style.width=`${z+this.indent-16}px`,U.collapsible?G.container.setAttribute("aria-expanded",String(!U.collapsed)):G.container.removeAttribute("aria-expanded"),G.twistie.classList.remove(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded));let H=!1;this.renderer.renderTwistie&&(H=this.renderer.renderTwistie(U.element,G.twistie)),U.collapsible&&(!this.hideTwistiesOfChildlessElements||U.visibleChildrenCount>0)?(H||G.twistie.classList.add(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded)),G.twistie.classList.add("collapsible"),G.twistie.classList.toggle("collapsed",U.collapsed)):G.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(U,G)}_renderIndentGuides(U,G){if((0,L.clearNode)(G.indent),G.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const z=new l.DisposableStore,H=this.modelProvider();for(;;){const Y=H.getNodeLocation(U),j=H.getParentNodeLocation(Y);if(!j)break;const Z=H.getNode(j),ee=(0,L.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(Z)&&ee.classList.add("active"),G.indent.childElementCount===0?G.indent.appendChild(ee):G.indent.insertBefore(ee,G.indent.firstElementChild),this.renderedIndentGuides.add(Z,ee),z.add((0,l.toDisposable)(()=>this.renderedIndentGuides.delete(Z,ee))),U=Z}G.indentGuidesDisposable=z}_onDidChangeActiveNodes(U){if(!this.shouldRenderIndentGuides)return;const G=new Set,z=this.modelProvider();U.forEach(H=>{const Y=z.getNodeLocation(H);try{const j=z.getParentNodeLocation(Y);H.collapsible&&H.children.length>0&&!H.collapsed?G.add(H):j&&G.add(z.getNode(j))}catch{}}),this.activeIndentNodes.forEach(H=>{G.has(H)||this.renderedIndentGuides.forEach(H,Y=>Y.classList.remove("active"))}),G.forEach(H=>{this.activeIndentNodes.has(H)||this.renderedIndentGuides.forEach(H,Y=>Y.classList.add("active"))}),this.activeIndentNodes=G}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,l.dispose)(this.disposables)}}e.TreeRenderer=P,P.DefaultIndent=8;class N{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(U,G,z){this.tree=U,this.keyboardNavigationLabelProvider=G,this._filter=z,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new l.DisposableStore,U.onWillRefilter(this.reset,this,this.disposables)}filter(U,G){let z=1;if(this._filter){const j=this._filter.filter(U,G);if(typeof j=="boolean"?z=j?1:0:(0,a.isFilterResult)(j)?z=(0,a.getVisibleState)(j.visibility):z=j,z===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:s.FuzzyScore.Default,visibility:z};const H=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(U),Y=Array.isArray(H)?H:[H];for(const j of Y){const Z=j&&j.toString();if(typeof Z>"u")return{data:s.FuzzyScore.Default,visibility:z};let ee;if(this.tree.findMatchType===B.Contiguous){const le=Z.toLowerCase().indexOf(this._lowercasePattern);if(le>-1){ee=[Number.MAX_SAFE_INTEGER,0];for(let ue=this._lowercasePattern.length;ue>0;ue--)ee.push(le+ue-1)}}else ee=(0,s.fuzzyScore)(this._pattern,this._lowercasePattern,0,Z,Z.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(ee)return this._matchCount++,Y.length===1?{data:ee,visibility:z}:{data:{label:Z,score:ee},visibility:z}}return this.tree.findMode===O.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(U):2:{data:s.FuzzyScore.Default,visibility:z}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,l.dispose)(this.disposables)}}class M extends b.Toggle{constructor(U){var G;super({icon:u.Codicon.listFilter,title:(0,h.localize)(0,null),isChecked:(G=U.isChecked)!==null&&G!==void 0?G:!1,inputActiveOptionBorder:U.inputActiveOptionBorder,inputActiveOptionForeground:U.inputActiveOptionForeground,inputActiveOptionBackground:U.inputActiveOptionBackground})}}e.ModeToggle=M;class R extends b.Toggle{constructor(U){var G;super({icon:u.Codicon.searchFuzzy,title:(0,h.localize)(1,null),isChecked:(G=U.isChecked)!==null&&G!==void 0?G:!1,inputActiveOptionBorder:U.inputActiveOptionBorder,inputActiveOptionForeground:U.inputActiveOptionForeground,inputActiveOptionBackground:U.inputActiveOptionBackground})}}e.FuzzyToggle=R;const x={inputBoxStyles:p.unthemedInboxStyles,toggleStyles:b.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var O;(function(X){X[X.Highlight=0]="Highlight",X[X.Filter=1]="Filter"})(O||(e.TreeFindMode=O={}));var B;(function(X){X[X.Fuzzy=0]="Fuzzy",X[X.Contiguous=1]="Contiguous"})(B||(e.TreeFindMatchType=B={}));class W extends l.Disposable{set mode(U){this.modeToggle.checked=U===O.Filter,this.findInput.inputBox.setPlaceHolder(U===O.Filter?(0,h.localize)(2,null):(0,h.localize)(3,null))}set matchType(U){this.matchTypeToggle.checked=U===B.Fuzzy}constructor(U,G,z,H,Y,j){var Z;super(),this.tree=G,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,U.appendChild(this.elements.root),this._register((0,l.toDisposable)(()=>U.removeChild(this.elements.root)));const ee=(Z=j?.styles)!==null&&Z!==void 0?Z:x;ee.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=ee.listFilterWidgetBackground),ee.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${ee.listFilterWidgetShadow}`),this.modeToggle=this._register(new M({...ee.toggleStyles,isChecked:H===O.Filter})),this.matchTypeToggle=this._register(new R({...ee.toggleStyles,isChecked:Y===B.Fuzzy})),this.onDidChangeMode=d.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?O.Filter:O.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 S.FindInput(this.elements.findInput,z,{label:(0,h.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:ee.inputBoxStyles,toggleStyles:ee.toggleStyles,history:j?.history})),this.actionbar=this._register(new E.ActionBar(this.elements.actionbar)),this.mode=H;const le=this._register(new k.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),ue=d.Event.chain(le.event,Ce=>Ce.map(Se=>new y.StandardKeyboardEvent(Se)));this._register(ue(Ce=>{if(Ce.equals(3)){Ce.preventDefault(),Ce.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(Ce.equals(18)){Ce.preventDefault(),Ce.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(Ce.equals(16)){Ce.preventDefault(),Ce.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const ce=this._register(new n.Action("close",(0,h.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(ce,{icon:!0,label:!1});const pe=this._register(new k.DomEmitter(this.elements.grab,"mousedown"));this._register(pe.event(Ce=>{const Se=new l.DisposableStore,_e=Se.add(new k.DomEmitter((0,L.getWindow)(Ce),"mousemove")),Ee=Se.add(new k.DomEmitter((0,L.getWindow)(Ce),"mouseup")),Ae=this.right,xe=Ce.pageX,Be=this.top,De=Ce.pageY;this.elements.grab.classList.add("grabbing");const Ie=this.elements.root.style.transition;this.elements.root.style.transition="unset";const fe=be=>{const Ne=be.pageX-xe;this.right=Ae-Ne;const Pe=be.pageY-De;this.top=Be+Pe,this.layout()};Se.add(_e.event(fe)),Se.add(Ee.event(be=>{fe(be),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=Ie,Se.dispose()}))}));const ve=d.Event.chain(this._register(new k.DomEmitter(this.elements.grab,"keydown")).event,Ce=>Ce.map(Se=>new y.StandardKeyboardEvent(Se)));this._register(ve(Ce=>{let Se,_e;if(Ce.keyCode===15?Se=Number.POSITIVE_INFINITY:Ce.keyCode===17?Se=0:Ce.keyCode===10&&(Se=this.right===0?Number.POSITIVE_INFINITY:0),Ce.keyCode===16?_e=0:Ce.keyCode===18&&(_e=Number.POSITIVE_INFINITY),Se!==void 0&&(Ce.preventDefault(),Ce.stopPropagation(),this.right=Se,this.layout()),_e!==void 0){Ce.preventDefault(),Ce.stopPropagation(),this.top=_e;const Ee=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=Ee},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(U=this.width){this.width=U,this.right=(0,o.clamp)(this.right,0,Math.max(0,U-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,o.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(U){this.findInput.showMessage(U)}clearMessage(){this.findInput.clearMessage()}async dispose(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),await(0,r.timeout)(300),super.dispose()}}class V{get pattern(){return this._pattern}get mode(){return this._mode}set mode(U){U!==this._mode&&(this._mode=U,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(U))}get matchType(){return this._matchType}set matchType(U){U!==this._matchType&&(this._matchType=U,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(U))}constructor(U,G,z,H,Y,j={}){var Z,ee;this.tree=U,this.view=z,this.filter=H,this.contextViewProvider=Y,this.options=j,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=(Z=U.options.defaultFindMode)!==null&&Z!==void 0?Z:O.Highlight,this._matchType=(ee=U.options.defaultFindMatchType)!==null&&ee!==void 0?ee:B.Fuzzy,G.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(U={}){U.defaultFindMode!==void 0&&(this.mode=U.defaultFindMode),U.defaultFindMatchType!==void 0&&(this.matchType=U.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var U,G,z,H;const Y=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&Y?!((U=this.tree.options.showNotFoundMessage)!==null&&U!==void 0)||U?(G=this.widget)===null||G===void 0||G.showMessage({type:2,content:(0,h.localize)(6,null)}):(z=this.widget)===null||z===void 0||z.showMessage({type:2}):(H=this.widget)===null||H===void 0||H.clearMessage()}shouldAllowFocus(U){return!this.widget||!this.pattern||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!s.FuzzyScore.isDefault(U.filterData)}layout(U){var G;this.width=U,(G=this.widget)===null||G===void 0||G.layout(U)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function K(X,U){return X.position===U.position&&F(X,U)}function F(X,U){return X.node.element===U.node.element&&X.startIndex===U.startIndex&&X.height===U.height&&X.endIndex===U.endIndex}class q{constructor(U=[]){this.stickyNodes=U}get count(){return this.stickyNodes.length}equal(U){return(0,t.equals)(this.stickyNodes,U.stickyNodes,K)}lastNodePartiallyVisible(){if(this.count===0)return!1;const U=this.stickyNodes[this.count-1];if(this.count===1)return U.position!==0;const G=this.stickyNodes[this.count-2];return G.position+G.height!==U.position}animationStateChanged(U){if(!(0,t.equals)(this.stickyNodes,U.stickyNodes,F)||this.count===0)return!1;const G=this.stickyNodes[this.count-1],z=U.stickyNodes[U.count-1];return G.position!==z.position}}class ie{constrainStickyScrollNodes(U,G,z){for(let H=0;H<U.length;H++){const Y=U[H];if(Y.position+Y.height>z||H>=G)return U.slice(0,H)}return U}}class ae extends l.Disposable{constructor(U,G,z,H,Y,j={}){var Z;super(),this.tree=U,this.model=G,this.view=z,this.treeDelegate=Y,this.maxWidgetViewRatio=.4;const ee=this.validateStickySettings(j);this.stickyScrollMaxItemCount=ee.stickyScrollMaxItemCount,this.stickyScrollDelegate=(Z=j.stickyScrollDelegate)!==null&&Z!==void 0?Z:new ie,this._widget=this._register(new ne(z.getScrollableElement(),z,U,H,Y,j.accessibilityProvider)),this.onDidChangeHasFocus=this._widget.onDidChangeHasFocus,this.onContextMenu=this._widget.onContextMenu,this._register(z.onDidScroll(()=>this.update())),this._register(z.onDidChangeContentHeight(()=>this.update())),this._register(U.onDidChangeCollapseState(()=>this.update())),this.update()}getNodeAtHeight(U){let G;if(U===0?G=this.view.firstVisibleIndex:G=this.view.indexAt(U+this.view.scrollTop),!(G<0||G>=this.view.length))return this.view.element(G)}update(){const U=this.getNodeAtHeight(0);if(!U||this.tree.scrollTop===0){this._widget.setState(void 0);return}const G=this.findStickyState(U);this._widget.setState(G)}findStickyState(U){const G=[];let z=U,H=0,Y=this.getNextStickyNode(z,void 0,H);for(;Y&&(G.push(Y),H+=Y.height,!(G.length<=this.stickyScrollMaxItemCount&&(z=this.getNextVisibleNode(Y),!z)));)Y=this.getNextStickyNode(z,Y.node,H);const j=this.constrainStickyNodes(G);return j.length?new q(j):void 0}getNextVisibleNode(U){return this.getNodeAtHeight(U.position+U.height)}getNextStickyNode(U,G,z){const H=this.getAncestorUnderPrevious(U,G);if(H&&!(H===U&&(!this.nodeIsUncollapsedParent(U)||this.nodeTopAlignsWithStickyNodesBottom(U,z))))return this.createStickyScrollNode(H,z)}nodeTopAlignsWithStickyNodesBottom(U,G){const z=this.getNodeIndex(U),H=this.view.getElementTop(z),Y=G;return this.view.scrollTop===H-Y}createStickyScrollNode(U,G){const z=this.treeDelegate.getHeight(U),{startIndex:H,endIndex:Y}=this.getNodeRange(U),j=this.calculateStickyNodePosition(Y,G,z);return{node:U,position:j,height:z,startIndex:H,endIndex:Y}}getAncestorUnderPrevious(U,G=void 0){let z=U,H=this.getParentNode(z);for(;H;){if(H===G)return z;z=H,H=this.getParentNode(z)}if(G===void 0)return z}calculateStickyNodePosition(U,G,z){let H=this.view.getRelativeTop(U);if(H===null&&this.view.firstVisibleIndex===U&&U+1<this.view.length){const le=this.treeDelegate.getHeight(this.view.element(U)),ue=this.view.getRelativeTop(U+1);H=ue?ue-le/this.view.renderHeight:null}if(H===null)return G;const Y=this.view.element(U),j=this.treeDelegate.getHeight(Y),ee=H*this.view.renderHeight+j;return G+z>ee&&G<=ee?ee-z:G}constrainStickyNodes(U){if(U.length===0)return[];const G=this.view.renderHeight*this.maxWidgetViewRatio,z=U[U.length-1];if(U.length<=this.stickyScrollMaxItemCount&&z.position+z.height<=G)return U;const H=this.stickyScrollDelegate.constrainStickyScrollNodes(U,this.stickyScrollMaxItemCount,G);if(!H.length)return[];const Y=H[H.length-1];if(H.length>this.stickyScrollMaxItemCount||Y.position+Y.height>G)throw new Error("stickyScrollDelegate violates constraints");return H}getParentNode(U){const G=this.model.getNodeLocation(U),z=this.model.getParentNodeLocation(G);return z?this.model.getNode(z):void 0}nodeIsUncollapsedParent(U){const G=this.model.getNodeLocation(U);return this.model.getListRenderCount(G)>1}getNodeIndex(U){const G=this.model.getNodeLocation(U);return this.model.getListIndex(G)}getNodeRange(U){const G=this.model.getNodeLocation(U),z=this.model.getListIndex(G);if(z<0)throw new Error("Node not found in tree");const H=this.model.getListRenderCount(G),Y=z+H-1;return{startIndex:z,endIndex:Y}}nodePositionTopBelowWidget(U){const G=[];let z=this.getParentNode(U);for(;z;)G.push(z),z=this.getParentNode(z);let H=0;for(let Y=0;Y<G.length&&Y<this.stickyScrollMaxItemCount;Y++)H+=this.treeDelegate.getHeight(G[Y]);return H}domFocus(){this._widget.domFocus()}focusedLast(){return this._widget.focusedLast()}updateOptions(U={}){if(!U.stickyScrollMaxItemCount)return;const G=this.validateStickySettings(U);this.stickyScrollMaxItemCount!==G.stickyScrollMaxItemCount&&(this.stickyScrollMaxItemCount=G.stickyScrollMaxItemCount,this.update())}validateStickySettings(U){let G=7;return typeof U.stickyScrollMaxItemCount=="number"&&(G=Math.max(U.stickyScrollMaxItemCount,1)),{stickyScrollMaxItemCount:G}}}class ne{constructor(U,G,z,H,Y,j){this.view=G,this.tree=z,this.treeRenderers=H,this.treeDelegate=Y,this.accessibilityProvider=j,this._previousElements=[],this._previousStateDisposables=new l.DisposableStore,this._rootDomNode=(0,L.$)(".monaco-tree-sticky-container.empty"),U.appendChild(this._rootDomNode);const Z=(0,L.$)(".monaco-tree-sticky-container-shadow");this._rootDomNode.appendChild(Z),this.stickyScrollFocus=new $(this._rootDomNode,G),this.onDidChangeHasFocus=this.stickyScrollFocus.onDidChangeHasFocus,this.onContextMenu=this.stickyScrollFocus.onContextMenu}setState(U){const G=!!this._previousState&&this._previousState.count>0,z=!!U&&U.count>0;if(!G&&!z||G&&z&&this._previousState.equal(U))return;if(G!==z&&this.setVisible(z),!z){this._previousState=void 0,this._previousElements=[],this._previousStateDisposables.clear();return}const H=U.stickyNodes[U.count-1];if(this._previousState&&U.animationStateChanged(this._previousState))this._previousElements[this._previousState.count-1].style.top=`${H.position}px`;else{this._previousStateDisposables.clear();const Y=Array(U.count);for(let j=U.count-1;j>=0;j--){const Z=U.stickyNodes[j],{element:ee,disposable:le}=this.createElement(Z,j,U.count);Y[j]=ee,this._rootDomNode.appendChild(ee),this._previousStateDisposables.add(le)}this.stickyScrollFocus.updateElements(Y,U),this._previousElements=Y}this._previousState=U,this._rootDomNode.style.height=`${H.position+H.height}px`}createElement(U,G,z){const H=U.startIndex,Y=document.createElement("div");Y.style.top=`${U.position}px`,Y.style.height=`${U.height}px`,Y.style.lineHeight=`${U.height}px`,Y.classList.add("monaco-tree-sticky-row"),Y.classList.add("monaco-list-row"),Y.setAttribute("data-index",`${H}`),Y.setAttribute("data-parity",H%2===0?"even":"odd"),Y.setAttribute("id",this.view.getElementID(H)),this.setAccessibilityAttributes(Y,U.node.element,G,z);const j=this.treeDelegate.getTemplateId(U.node),Z=this.treeRenderers.find(ce=>ce.templateId===j);if(!Z)throw new Error(`No renderer found for template id ${j}`);let ee=U.node;ee===this.tree.getNode(this.tree.getNodeLocation(U.node))&&(ee=new Proxy(U.node,{}));const le=Z.renderTemplate(Y);Z.renderElement(ee,U.startIndex,le,U.height);const ue=(0,l.toDisposable)(()=>{Z.disposeElement(ee,U.startIndex,le,U.height),Z.disposeTemplate(le),Y.remove()});return{element:Y,disposable:ue}}setAccessibilityAttributes(U,G,z,H){var Y;if(!this.accessibilityProvider)return;this.accessibilityProvider.getSetSize&&U.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(G,z,H))),this.accessibilityProvider.getPosInSet&&U.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(G,z))),this.accessibilityProvider.getRole&&U.setAttribute("role",(Y=this.accessibilityProvider.getRole(G))!==null&&Y!==void 0?Y:"treeitem");const j=this.accessibilityProvider.getAriaLabel(G);j&&U.setAttribute("aria-label",j);const Z=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(G);typeof Z=="number"&&U.setAttribute("aria-level",`${Z}`),U.setAttribute("aria-selected",String(!1))}setVisible(U){this._rootDomNode.classList.toggle("empty",!U),U||this.stickyScrollFocus.updateElements([],void 0)}domFocus(){this.stickyScrollFocus.domFocus()}focusedLast(){return this.stickyScrollFocus.focusedLast()}dispose(){this.stickyScrollFocus.dispose(),this._previousStateDisposables.dispose(),this._rootDomNode.remove()}}class $ extends l.Disposable{get domHasFocus(){return this._domHasFocus}set domHasFocus(U){U!==this._domHasFocus&&(this._onDidChangeHasFocus.fire(U),this._domHasFocus=U)}constructor(U,G){super(),this.container=U,this.view=G,this.focusedIndex=-1,this.elements=[],this._onDidChangeHasFocus=new d.Emitter,this.onDidChangeHasFocus=this._onDidChangeHasFocus.event,this._onContextMenu=new d.Emitter,this.onContextMenu=this._onContextMenu.event,this._domHasFocus=!1,this.container.addEventListener("focus",()=>this.onFocus()),this.container.addEventListener("blur",()=>this.onBlur()),this._register(this.view.onDidFocus(()=>this.toggleStickyScrollFocused(!1))),this._register(this.view.onKeyDown(z=>this.onKeyDown(z))),this._register(this.view.onMouseDown(z=>this.onMouseDown(z))),this._register(this.view.onContextMenu(z=>this.handleContextMenu(z)))}handleContextMenu(U){const G=U.browserEvent.target;if(!(0,v.isStickyScrollContainer)(G)&&!(0,v.isStickyScrollElement)(G)){this.focusedLast()&&this.view.domFocus();return}if(!(0,L.isKeyboardEvent)(U.browserEvent)){if(!this.state)throw new Error("Context menu should not be triggered when state is undefined");const j=this.state.stickyNodes.findIndex(Z=>{var ee;return Z.node.element===((ee=U.element)===null||ee===void 0?void 0:ee.element)});if(j===-1)throw new Error("Context menu should not be triggered when element is not in sticky scroll widget");this.container.focus(),this.setFocus(j);return}if(!this.state||this.focusedIndex<0)throw new Error("Context menu key should not be triggered when focus is not in sticky scroll widget");const H=this.state.stickyNodes[this.focusedIndex].node.element,Y=this.elements[this.focusedIndex];this._onContextMenu.fire({element:H,anchor:Y,browserEvent:U.browserEvent,isStickyScroll:!0})}onKeyDown(U){if(this.domHasFocus&&this.state){if(U.key==="ArrowUp")this.setFocusedElement(Math.max(0,this.focusedIndex-1)),U.preventDefault(),U.stopPropagation();else if(U.key==="ArrowDown"||U.key==="ArrowRight"){if(this.focusedIndex>=this.state.count-1){const G=this.state.stickyNodes[this.state.count-1].startIndex+1;this.view.domFocus(),this.view.setFocus([G]),this.scrollNodeUnderWidget(G,this.state)}else this.setFocusedElement(this.focusedIndex+1);U.preventDefault(),U.stopPropagation()}}}onMouseDown(U){const G=U.browserEvent.target;!(0,v.isStickyScrollContainer)(G)&&!(0,v.isStickyScrollElement)(G)||(U.browserEvent.preventDefault(),U.browserEvent.stopPropagation())}updateElements(U,G){if(G&&G.count===0)throw new Error("Sticky scroll state must be undefined when there are no sticky nodes");if(G&&G.count!==U.length)throw new Error("Sticky scroll focus received illigel state");const z=this.focusedIndex;if(this.removeFocus(),this.elements=U,this.state=G,G){const H=(0,o.clamp)(z,0,G.count-1);this.setFocus(H)}else this.domHasFocus&&this.view.domFocus();this.container.tabIndex=G?0:-1}setFocusedElement(U){const G=this.state;if(!G)throw new Error("Cannot set focus when state is undefined");if(this.setFocus(U),!(U<G.count-1)&&G.lastNodePartiallyVisible()){const z=G.stickyNodes[U];this.scrollNodeUnderWidget(z.endIndex+1,G)}}scrollNodeUnderWidget(U,G){const z=G.stickyNodes[G.count-1],H=G.count>1?G.stickyNodes[G.count-2]:void 0,Y=this.view.getElementTop(U),j=H?H.position+H.height+z.height:z.height;this.view.scrollTop=Y-j}domFocus(){if(!this.state)throw new Error("Cannot focus when state is undefined");this.container.focus()}focusedLast(){return this.state?this.view.getHTMLElement().classList.contains("sticky-scroll-focused"):!1}removeFocus(){this.focusedIndex!==-1&&(this.toggleElementFocus(this.elements[this.focusedIndex],!1),this.focusedIndex=-1)}setFocus(U){if(0>U)throw new Error("addFocus() can not remove focus");if(!this.state&&U>=0)throw new Error("Cannot set focus index when state is undefined");if(this.state&&U>=this.state.count)throw new Error("Cannot set focus index to an index that does not exist");const G=this.focusedIndex;G>=0&&this.toggleElementFocus(this.elements[G],!1),U>=0&&this.toggleElementFocus(this.elements[U],!0),this.focusedIndex=U}toggleElementFocus(U,G){U.classList.toggle("focused",G)}toggleStickyScrollFocused(U){this.view.getHTMLElement().classList.toggle("sticky-scroll-focused",U)}onFocus(){if(!this.state||this.elements.length===0)throw new Error("Cannot focus when state is undefined or elements are empty");this.domHasFocus=!0,this.toggleStickyScrollFocused(!0),this.focusedIndex===-1&&this.setFocus(0)}onBlur(){this.domHasFocus=!1}dispose(){this.toggleStickyScrollFocused(!1),this._onDidChangeHasFocus.fire(!1),super.dispose()}}function J(X){let U=i.TreeMouseEventTarget.Unknown;return(0,L.hasParentWithClass)(X.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?U=i.TreeMouseEventTarget.Twistie:(0,L.hasParentWithClass)(X.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?U=i.TreeMouseEventTarget.Element:(0,L.hasParentWithClass)(X.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(U=i.TreeMouseEventTarget.Filter),{browserEvent:X.browserEvent,element:X.element?X.element.element:null,target:U}}function Q(X,U){U(X),X.children.forEach(G=>Q(G,U))}class re{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(U,G){this.getFirstViewElementWithTrait=U,this.identityProvider=G,this.nodes=[],this._onDidChange=new d.Emitter,this.onDidChange=this._onDidChange.event}set(U,G){!G?.__forceEvent&&(0,t.equals)(this.nodes,U)||this._set(U,!1,G)}_set(U,G,z){if(this.nodes=[...U],this.elements=void 0,this._nodeSet=void 0,!G){const H=this;this._onDidChange.fire({get elements(){return H.get()},browserEvent:z})}}get(){return this.elements||(this.elements=this.nodes.map(U=>U.element)),[...this.elements]}getNodes(){return this.nodes}has(U){return this.nodeSet.has(U)}onDidModelSplice({insertedNodes:U,deletedNodes:G}){if(!this.identityProvider){const ee=this.createNodeSet(),le=ue=>ee.delete(ue);G.forEach(ue=>Q(ue,le)),this.set([...ee.values()]);return}const z=new Set,H=ee=>z.add(this.identityProvider.getId(ee.element).toString());G.forEach(ee=>Q(ee,H));const Y=new Map,j=ee=>Y.set(this.identityProvider.getId(ee.element).toString(),ee);U.forEach(ee=>Q(ee,j));const Z=[];for(const ee of this.nodes){const le=this.identityProvider.getId(ee.element).toString();if(!z.has(le))Z.push(ee);else{const ce=Y.get(le);ce&&ce.visible&&Z.push(ce)}}if(this.nodes.length>0&&Z.length===0){const ee=this.getFirstViewElementWithTrait();ee&&Z.push(ee)}this._set(Z,!0)}createNodeSet(){const U=new Set;for(const G of this.nodes)U.add(G);return U}}class de extends v.MouseController{constructor(U,G,z){super(U),this.tree=G,this.stickyScrollProvider=z}onViewPointer(U){if((0,v.isButton)(U.browserEvent.target)||(0,v.isInputElement)(U.browserEvent.target)||(0,v.isMonacoEditor)(U.browserEvent.target)||U.browserEvent.isHandledByList)return;const G=U.element;if(!G)return super.onViewPointer(U);if(this.isSelectionRangeChangeEvent(U)||this.isSelectionSingleChangeEvent(U))return super.onViewPointer(U);const z=U.browserEvent.target,H=z.classList.contains("monaco-tl-twistie")||z.classList.contains("monaco-icon-label")&&z.classList.contains("folder-icon")&&U.browserEvent.offsetX<16,Y=(0,v.isStickyScrollElement)(U.browserEvent.target);let j=!1;if(Y?j=!0:typeof this.tree.expandOnlyOnTwistieClick=="function"?j=this.tree.expandOnlyOnTwistieClick(G.element):j=!!this.tree.expandOnlyOnTwistieClick,Y)this.handleStickyScrollMouseEvent(U,G);else{if(j&&!H&&U.browserEvent.detail!==2)return super.onViewPointer(U);if(!this.tree.expandOnDoubleClick&&U.browserEvent.detail===2)return super.onViewPointer(U)}if(G.collapsible&&(!Y||H)){const Z=this.tree.getNodeLocation(G),ee=U.browserEvent.altKey;if(this.tree.setFocus([Z]),this.tree.toggleCollapsed(Z,ee),j&&H){U.browserEvent.isHandledByList=!0;return}}Y||super.onViewPointer(U)}handleStickyScrollMouseEvent(U,G){if((0,v.isMonacoCustomToggle)(U.browserEvent.target)||(0,v.isActionItem)(U.browserEvent.target))return;const z=this.stickyScrollProvider();if(!z)throw new Error("Sticky scroll controller not found");const H=this.list.indexOf(G),Y=this.list.getElementTop(H),j=z.nodePositionTopBelowWidget(G);this.tree.scrollTop=Y-j,this.list.domFocus(),this.list.setFocus([H]),this.list.setSelection([H])}onDoubleClick(U){U.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||U.browserEvent.isHandledByList||super.onDoubleClick(U)}onMouseDown(U){const G=U.browserEvent.target;if(!(0,v.isStickyScrollContainer)(G)&&!(0,v.isStickyScrollElement)(G)){super.onMouseDown(U);return}}onContextMenu(U){const G=U.browserEvent.target;if(!(0,v.isStickyScrollContainer)(G)&&!(0,v.isStickyScrollElement)(G)){super.onContextMenu(U);return}}}class he extends v.List{constructor(U,G,z,H,Y,j,Z,ee){super(U,G,z,H,ee),this.focusTrait=Y,this.selectionTrait=j,this.anchorTrait=Z}createMouseController(U){return new de(this,U.tree,U.stickyScrollProvider)}splice(U,G,z=[]){if(super.splice(U,G,z),z.length===0)return;const H=[],Y=[];let j;z.forEach((Z,ee)=>{this.focusTrait.has(Z)&&H.push(U+ee),this.selectionTrait.has(Z)&&Y.push(U+ee),this.anchorTrait.has(Z)&&(j=U+ee)}),H.length>0&&super.setFocus((0,t.distinct)([...super.getFocus(),...H])),Y.length>0&&super.setSelection((0,t.distinct)([...super.getSelection(),...Y])),typeof j=="number"&&super.setAnchor(j)}setFocus(U,G,z=!1){super.setFocus(U,G),z||this.focusTrait.set(U.map(H=>this.element(H)),G)}setSelection(U,G,z=!1){super.setSelection(U,G),z||this.selectionTrait.set(U.map(H=>this.element(H)),G)}setAnchor(U,G=!1){super.setAnchor(U),G||(typeof U>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(U)]))}}class me{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,J),U=>U.target!==i.TreeMouseEventTarget.Filter)}get onPointer(){return d.Event.map(this.view.onPointer,J)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return d.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var U,G;return(G=(U=this.findController)===null||U===void 0?void 0:U.mode)!==null&&G!==void 0?G:O.Highlight}set findMode(U){this.findController&&(this.findController.mode=U)}get findMatchType(){var U,G;return(G=(U=this.findController)===null||U===void 0?void 0:U.matchType)!==null&&G!==void 0?G:B.Fuzzy}set findMatchType(U){this.findController&&(this.findController.matchType=U)}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(U,G,z,H,Y={}){var j;this._user=U,this._options=Y,this.eventBufferer=new d.EventBufferer,this.onDidChangeFindOpenState=d.Event.None,this.onDidChangeStickyScrollFocused=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(z);const Z=new d.Relay,ee=new d.Relay,le=this.disposables.add(new A(ee.event)),ue=new c.SetMap;this.renderers=H.map(Se=>new P(Se,()=>this.model,Z.event,le,ue,Y));for(const Se of this.renderers)this.disposables.add(Se);let ce;Y.keyboardNavigationLabelProvider&&(ce=new N(this,Y.keyboardNavigationLabelProvider,Y.filter),Y={...Y,filter:ce},this.disposables.add(ce)),this.focus=new re(()=>this.view.getFocusedElements()[0],Y.identityProvider),this.selection=new re(()=>this.view.getSelectedElements()[0],Y.identityProvider),this.anchor=new re(()=>this.view.getAnchorElement(),Y.identityProvider),this.view=new he(U,G,this.treeDelegate,this.renderers,this.focus,this.selection,this.anchor,{...D(()=>this.model,Y),tree:this,stickyScrollProvider:()=>this.stickyScrollController}),this.model=this.createModel(U,this.view,Y),Z.input=this.model.onDidChangeCollapseState;const pe=d.Event.forEach(this.model.onDidSplice,Se=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(Se),this.selection.onDidModelSplice(Se)})},this.disposables);pe(()=>null,null,this.disposables);const ve=this.disposables.add(new d.Emitter),Ce=this.disposables.add(new r.Delayer(0));if(this.disposables.add(d.Event.any(pe,this.focus.onDidChange,this.selection.onDidChange)(()=>{Ce.trigger(()=>{const Se=new Set;for(const _e of this.focus.getNodes())Se.add(_e);for(const _e of this.selection.getNodes())Se.add(_e);ve.fire([...Se.values()])})})),ee.input=ve.event,Y.keyboardSupport!==!1){const Se=d.Event.chain(this.view.onKeyDown,_e=>_e.filter(Ee=>!(0,v.isInputElement)(Ee.target)).map(Ee=>new y.StandardKeyboardEvent(Ee)));d.Event.chain(Se,_e=>_e.filter(Ee=>Ee.keyCode===15))(this.onLeftArrow,this,this.disposables),d.Event.chain(Se,_e=>_e.filter(Ee=>Ee.keyCode===17))(this.onRightArrow,this,this.disposables),d.Event.chain(Se,_e=>_e.filter(Ee=>Ee.keyCode===10))(this.onSpace,this,this.disposables)}if((!((j=Y.findWidgetEnabled)!==null&&j!==void 0)||j)&&Y.keyboardNavigationLabelProvider&&Y.contextViewProvider){const Se=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new V(this,this.model,this.view,ce,Y.contextViewProvider,Se),this.focusNavigationFilter=_e=>this.findController.shouldAllowFocus(_e),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 ae(this,this.model,this.view,this.renderers,this.treeDelegate,Y),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus),this.styleElement=(0,L.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===T.Always)}updateOptions(U={}){var G;this._options={...this._options,...U};for(const z of this.renderers)z.updateOptions(U);this.view.updateOptions(this._options),(G=this.findController)===null||G===void 0||G.updateOptions(U),this.updateStickyScroll(U),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===T.Always)}get options(){return this._options}updateStickyScroll(U){var G;!this.stickyScrollController&&this._options.enableStickyScroll?(this.stickyScrollController=new ae(this,this.model,this.view,this.renderers,this.treeDelegate,this._options),this.onDidChangeStickyScrollFocused=this.stickyScrollController.onDidChangeHasFocus):this.stickyScrollController&&!this._options.enableStickyScroll&&(this.onDidChangeStickyScrollFocused=d.Event.None,this.stickyScrollController.dispose(),this.stickyScrollController=void 0),(G=this.stickyScrollController)===null||G===void 0||G.updateOptions(U)}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(U){this.view.scrollTop=U}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){var U;!((U=this.stickyScrollController)===null||U===void 0)&&U.focusedLast()?this.stickyScrollController.domFocus():this.view.domFocus()}layout(U,G){var z;this.view.layout(U,G),(0,g.isNumber)(G)&&((z=this.findController)===null||z===void 0||z.layout(G))}style(U){var G;const z=`.${this.view.domId}`,H=[];U.treeIndentGuidesStroke&&(H.push(`.monaco-list${z}:hover .monaco-tl-indent > .indent-guide, .monaco-list${z}.always .monaco-tl-indent > .indent-guide { border-color: ${U.treeInactiveIndentGuidesStroke}; }`),H.push(`.monaco-list${z} .monaco-tl-indent > .indent-guide.active { border-color: ${U.treeIndentGuidesStroke}; }`)),U.listBackground&&(H.push(`.monaco-list${z} .monaco-scrollable-element .monaco-tree-sticky-container { background-color: ${U.listBackground}; }`),H.push(`.monaco-list${z} .monaco-scrollable-element .monaco-tree-sticky-container .monaco-tree-sticky-row { background-color: ${U.listBackground}; }`)),U.listFocusForeground&&(H.push(`.monaco-list${z}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { color: ${U.listFocusForeground}; }`),H.push(`.monaco-list${z}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { color: inherit; }`));const Y=(0,L.asCssValueWithDefault)(U.listFocusAndSelectionOutline,(0,L.asCssValueWithDefault)(U.listSelectionOutline,(G=U.listFocusOutline)!==null&&G!==void 0?G:""));Y&&(H.push(`.monaco-list${z}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused.selected { outline: 1px solid ${Y}; outline-offset: -1px;}`),H.push(`.monaco-list${z}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused.selected { outline: inherit;}`)),U.listFocusOutline&&(H.push(`.monaco-list${z}.sticky-scroll-focused .monaco-scrollable-element .monaco-tree-sticky-container:focus .monaco-list-row.focused { outline: 1px solid ${U.listFocusOutline}; outline-offset: -1px; }`),H.push(`.monaco-list${z}:not(.sticky-scroll-focused) .monaco-scrollable-element .monaco-tree-sticky-container .monaco-list-row.focused { outline: inherit; }`),H.push(`.monaco-workbench.context-menu-visible .monaco-list${z}.last-focused.sticky-scroll-focused .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`),H.push(`.monaco-workbench.context-menu-visible .monaco-list${z}.last-focused:not(.sticky-scroll-focused) .monaco-tree-sticky-container .monaco-list-rows .monaco-list-row.focused { outline: inherit; }`)),this.styleElement.textContent=H.join(`
|
||
`),this.view.style(U)}getParentElement(U){const G=this.model.getParentNodeLocation(U);return this.model.getNode(G).element}getFirstElementChild(U){return this.model.getFirstElementChild(U)}getNode(U){return this.model.getNode(U)}getNodeLocation(U){return this.model.getNodeLocation(U)}collapse(U,G=!1){return this.model.setCollapsed(U,!0,G)}expand(U,G=!1){return this.model.setCollapsed(U,!1,G)}toggleCollapsed(U,G=!1){return this.model.setCollapsed(U,void 0,G)}isCollapsible(U){return this.model.isCollapsible(U)}setCollapsible(U,G){return this.model.setCollapsible(U,G)}isCollapsed(U){return this.model.isCollapsed(U)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(U,G){this.eventBufferer.bufferEvents(()=>{const z=U.map(Y=>this.model.getNode(Y));this.selection.set(z,G);const H=U.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setSelection(H,G,!0)})}getSelection(){return this.selection.get()}setFocus(U,G){this.eventBufferer.bufferEvents(()=>{const z=U.map(Y=>this.model.getNode(Y));this.focus.set(z,G);const H=U.map(Y=>this.model.getListIndex(Y)).filter(Y=>Y>-1);this.view.setFocus(H,G,!0)})}getFocus(){return this.focus.get()}reveal(U,G){this.model.expandTo(U);const z=this.model.getListIndex(U);if(z!==-1)if(!this.stickyScrollController)this.view.reveal(z,G);else{const H=this.stickyScrollController.nodePositionTopBelowWidget(this.getNode(U));this.view.reveal(z,G,H)}}onLeftArrow(U){U.preventDefault(),U.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const z=G[0],H=this.model.getNodeLocation(z);if(!this.model.setCollapsed(H,!0)){const j=this.model.getParentNodeLocation(H);if(!j)return;const Z=this.model.getListIndex(j);this.view.reveal(Z),this.view.setFocus([Z])}}onRightArrow(U){U.preventDefault(),U.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const z=G[0],H=this.model.getNodeLocation(z);if(!this.model.setCollapsed(H,!1)){if(!z.children.some(ee=>ee.visible))return;const[j]=this.view.getFocus(),Z=j+1;this.view.reveal(Z),this.view.setFocus([Z])}}onSpace(U){U.preventDefault(),U.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const z=G[0],H=this.model.getNodeLocation(z),Y=U.browserEvent.altKey;this.model.setCollapsed(H,void 0,Y)}dispose(){var U;(0,l.dispose)(this.disposables),(U=this.stickyScrollController)===null||U===void 0||U.dispose(),this.view.dispose()}}e.AbstractTree=me}),define(se[601],oe([1,0,187,221]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class y extends L.AbstractTree{constructor(S,p,_,v,b,a={}){super(S,p,_,v,a),this.user=S,this.dataSource=b,this.identityProvider=a.identityProvider}createModel(S,p,_){return new k.ObjectTreeModel(S,p,_)}}e.DataTree=y}),define(se[326],oe([1,0,187,584,221,107,52]),function(te,e,L,k,y,E,S){"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(n,t,r,u,f={}){super(n,t,r,u,f),this.user=n}setChildren(n,t=S.Iterable.empty(),r){this.model.setChildren(n,t,r)}rerender(n){if(n===void 0){this.view.rerender();return}this.model.rerender(n)}hasElement(n){return this.model.has(n)}createModel(n,t,r){return new y.ObjectTreeModel(n,t,r)}}e.ObjectTree=p;class _{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(n,t,r){this._compressedTreeNodeProvider=n,this.stickyScrollDelegate=t,this.renderer=r,this.templateId=r.templateId,r.onDidChangeTwistieState&&(this.onDidChangeTwistieState=r.onDidChangeTwistieState)}renderTemplate(n){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(n)}}renderElement(n,t,r,u){let f=this.stickyScrollDelegate.getCompressedNode(n);f||(f=this.compressedTreeNodeProvider.getCompressedTreeNode(n.element)),f.element.elements.length===1?(r.compressedTreeNode=void 0,this.renderer.renderElement(n,t,r.data,u)):(r.compressedTreeNode=f,this.renderer.renderCompressedElements(f,t,r.data,u))}disposeElement(n,t,r,u){var f,c,d,s;r.compressedTreeNode?(c=(f=this.renderer).disposeCompressedElements)===null||c===void 0||c.call(f,r.compressedTreeNode,t,r.data,u):(s=(d=this.renderer).disposeElement)===null||s===void 0||s.call(d,n,t,r.data,u)}disposeTemplate(n){this.renderer.disposeTemplate(n.data)}renderTwistie(n,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(n,t):!1}}ke([E.memoize],_.prototype,"compressedTreeNodeProvider",null);class v{constructor(n){this.modelProvider=n,this.compressedStickyNodes=new Map}getCompressedNode(n){return this.compressedStickyNodes.get(n)}constrainStickyScrollNodes(n,t,r){if(this.compressedStickyNodes.clear(),n.length===0)return[];for(let u=0;u<n.length;u++){const f=n[u],c=f.position+f.height;if(u+1<n.length&&c+n[u+1].height>r||u>=t-1&&t<n.length){const s=n.slice(0,u),l=n.slice(u),o=this.compressStickyNodes(l);return[...s,o]}}return n}compressStickyNodes(n){if(n.length===0)throw new Error("Can't compress empty sticky nodes");if(!this.modelProvider().isCompressionEnabled())return n[0];const t=[];for(const s of n){const l=this.modelProvider().getCompressedTreeNode(s.node.element);if(l.element){if(l.element.incompressible)break;t.push(...l.element.elements)}}if(t.length<2)return n[0];const r=n[n.length-1],u={elements:t,incompressible:!1},f={...r.node,children:[],element:u},c=new Proxy(n[0].node,{}),d={node:c,startIndex:n[0].startIndex,endIndex:r.endIndex,position:n[0].position,height:n[0].height};return this.compressedStickyNodes.set(c,f),d}}function b(i,n){return n&&{...n,keyboardNavigationLabelProvider:n.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let r;try{r=i().getCompressedTreeNode(t)}catch{return n.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return r.element.elements.length===1?n.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):n.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(r.element.elements)}}}}class a extends p{constructor(n,t,r,u,f={}){const c=()=>this,d=new v(()=>this.model),s=u.map(l=>new _(c,d,l));super(n,t,r,s,{...b(c,f),stickyScrollDelegate:d})}setChildren(n,t=S.Iterable.empty(),r){this.model.setChildren(n,t,r)}createModel(n,t,r){return new k.CompressibleObjectTreeModel(n,t,r)}updateOptions(n={}){super.updateOptions(n),typeof n.compressionEnabled<"u"&&this.model.setCompressionEnabled(n.compressionEnabled)}getCompressedTreeNode(n=null){return this.model.getCompressedTreeNode(n)}}e.CompressibleObjectTree=a}),define(se[602],oe([1,0,228,187,220,326,143,14,26,28,12,6,52,2,20]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function r(N){return{...N,children:[],refreshPromise:void 0,stale:!0,slow:!1,forceExpanded:!1}}function u(N,M){return M.parent?M.parent===N?!0:u(N,M.parent):!1}function f(N,M){return N===M||u(N,M)||u(M,N)}class c{get element(){return this.node.element.element}get children(){return this.node.children.map(M=>new c(M))}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(M){this.node=M}}class d{constructor(M,R,x){this.renderer=M,this.nodeMapper=R,this.onDidChangeTwistieState=x,this.renderedNodes=new Map,this.templateId=M.templateId}renderTemplate(M){return{templateData:this.renderer.renderTemplate(M)}}renderElement(M,R,x,O){this.renderer.renderElement(this.nodeMapper.map(M),R,x.templateData,O)}renderTwistie(M,R){return M.slow?(R.classList.add(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(R.classList.remove(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(M,R,x,O){var B,W;(W=(B=this.renderer).disposeElement)===null||W===void 0||W.call(B,this.nodeMapper.map(M),R,x.templateData,O)}disposeTemplate(M){this.renderer.disposeTemplate(M.templateData)}dispose(){this.renderedNodes.clear()}}function s(N){return{browserEvent:N.browserEvent,elements:N.elements.map(M=>M.element)}}function l(N){return{browserEvent:N.browserEvent,element:N.element&&N.element.element,target:N.target}}class o extends L.ElementsDragAndDropData{constructor(M){super(M.elements.map(R=>R.element)),this.data=M}}function g(N){return N instanceof L.ElementsDragAndDropData?new o(N):N}class h{constructor(M){this.dnd=M}getDragURI(M){return this.dnd.getDragURI(M.element)}getDragLabel(M,R){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(M.map(x=>x.element),R)}onDragStart(M,R){var x,O;(O=(x=this.dnd).onDragStart)===null||O===void 0||O.call(x,g(M),R)}onDragOver(M,R,x,O,B,W=!0){return this.dnd.onDragOver(g(M),R&&R.element,x,O,B)}drop(M,R,x,O,B){this.dnd.drop(g(M),R&&R.element,x,O,B)}onDragEnd(M){var R,x;(x=(R=this.dnd).onDragEnd)===null||x===void 0||x.call(R,M)}dispose(){this.dnd.dispose()}}function m(N){return N&&{...N,collapseByDefault:!0,identityProvider:N.identityProvider&&{getId(M){return N.identityProvider.getId(M.element)}},dnd:N.dnd&&new h(N.dnd),multipleSelectionController:N.multipleSelectionController&&{isSelectionSingleChangeEvent(M){return N.multipleSelectionController.isSelectionSingleChangeEvent({...M,element:M.element})},isSelectionRangeChangeEvent(M){return N.multipleSelectionController.isSelectionRangeChangeEvent({...M,element:M.element})}},accessibilityProvider:N.accessibilityProvider&&{...N.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:N.accessibilityProvider.getRole?M=>N.accessibilityProvider.getRole(M.element):()=>"treeitem",isChecked:N.accessibilityProvider.isChecked?M=>{var R;return!!(!((R=N.accessibilityProvider)===null||R===void 0)&&R.isChecked(M.element))}:void 0,getAriaLabel(M){return N.accessibilityProvider.getAriaLabel(M.element)},getWidgetAriaLabel(){return N.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:N.accessibilityProvider.getWidgetRole?()=>N.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:N.accessibilityProvider.getAriaLevel&&(M=>N.accessibilityProvider.getAriaLevel(M.element)),getActiveDescendantId:N.accessibilityProvider.getActiveDescendantId&&(M=>N.accessibilityProvider.getActiveDescendantId(M.element))},filter:N.filter&&{filter(M,R){return N.filter.filter(M.element,R)}},keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&{...N.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(M){return N.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(M.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof N.expandOnlyOnTwistieClick>"u"?void 0:typeof N.expandOnlyOnTwistieClick!="function"?N.expandOnlyOnTwistieClick:M=>N.expandOnlyOnTwistieClick(M.element),defaultFindVisibility:M=>M.hasChildren&&M.stale?1:typeof N.defaultFindVisibility=="number"?N.defaultFindVisibility:typeof N.defaultFindVisibility>"u"?2:N.defaultFindVisibility(M.element)}}function C(N,M){M(N),N.children.forEach(R=>C(R,M))}class w{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return a.Event.map(this.tree.onDidChangeFocus,s)}get onDidChangeSelection(){return a.Event.map(this.tree.onDidChangeSelection,s)}get onMouseDblClick(){return a.Event.map(this.tree.onMouseDblClick,l)}get onPointer(){return a.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 onDidChangeStickyScrollFocused(){return this.tree.onDidChangeStickyScrollFocused}get onDidDispose(){return this.tree.onDidDispose}constructor(M,R,x,O,B,W={}){this.user=M,this.dataSource=B,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new a.Emitter,this._onDidChangeNodeSlowState=new a.Emitter,this.nodeMapper=new S.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)?S.ObjectTreeElementCollapseState.PreserveOrCollapsed:S.ObjectTreeElementCollapseState.PreserveOrExpanded:void 0,this.tree=this.createTree(M,R,x,O,W),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.onDidChangeFindMatchType=this.tree.onDidChangeFindMatchType,this.root=r({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(M,R,x,O,B){const W=new k.ComposedTreeDelegate(x),V=O.map(F=>new d(F,this.nodeMapper,this._onDidChangeNodeSlowState.event)),K=m(B)||{};return new E.ObjectTree(M,R,W,V,K)}updateOptions(M={}){this.tree.updateOptions(M)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(M){this.tree.scrollTop=M}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(M,R){this.tree.layout(M,R)}style(M){this.tree.style(M)}getInput(){return this.root.element}async setInput(M,R){this.refreshPromises.forEach(O=>O.cancel()),this.refreshPromises.clear(),this.root.element=M;const x=R&&{viewState:R,focus:[],selection:[]};await this._updateChildren(M,!0,!1,x),x&&(this.tree.setFocus(x.focus),this.tree.setSelection(x.selection)),R&&typeof R.scrollTop=="number"&&(this.scrollTop=R.scrollTop)}async _updateChildren(M=this.root.element,R=!0,x=!1,O,B){if(typeof this.root.element>"u")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await a.Event.toPromise(this._onDidRender.event));const W=this.getDataNode(M);if(await this.refreshAndRenderNode(W,R,O,B),x)try{this.tree.rerender(W)}catch{}}rerender(M){if(M===void 0||M===this.root.element){this.tree.rerender();return}const R=this.getDataNode(M);this.tree.rerender(R)}getNode(M=this.root.element){const R=this.getDataNode(M),x=this.tree.getNode(R===this.root?null:R);return this.nodeMapper.map(x)}collapse(M,R=!1){const x=this.getDataNode(M);return this.tree.collapse(x===this.root?null:x,R)}async expand(M,R=!1){if(typeof this.root.element>"u")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await a.Event.toPromise(this._onDidRender.event));const x=this.getDataNode(M);if(this.tree.hasElement(x)&&!this.tree.isCollapsible(x)||(x.refreshPromise&&(await this.root.refreshPromise,await a.Event.toPromise(this._onDidRender.event)),x!==this.root&&!x.refreshPromise&&!this.tree.isCollapsed(x)))return!1;const O=this.tree.expand(x===this.root?null:x,R);return x.refreshPromise&&(await this.root.refreshPromise,await a.Event.toPromise(this._onDidRender.event)),O}setSelection(M,R){const x=M.map(O=>this.getDataNode(O));this.tree.setSelection(x,R)}getSelection(){return this.tree.getSelection().map(R=>R.element)}setFocus(M,R){const x=M.map(O=>this.getDataNode(O));this.tree.setFocus(x,R)}getFocus(){return this.tree.getFocus().map(R=>R.element)}reveal(M,R){this.tree.reveal(this.getDataNode(M),R)}getParentElement(M){const R=this.tree.getParentElement(this.getDataNode(M));return R&&R.element}getFirstElementChild(M=this.root.element){const R=this.getDataNode(M),x=this.tree.getFirstElementChild(R===this.root?null:R);return x&&x.element}getDataNode(M){const R=this.nodes.get(M===this.root.element?null:M);if(!R)throw new S.TreeError(this.user,`Data tree node not found: ${M}`);return R}async refreshAndRenderNode(M,R,x,O){await this.refreshNode(M,R,x),!this.disposables.isDisposed&&this.render(M,x,O)}async refreshNode(M,R,x){let O;if(this.subTreeRefreshPromises.forEach((B,W)=>{!O&&f(W,M)&&(O=B.then(()=>this.refreshNode(M,R,x)))}),O)return O;if(M!==this.root&&this.tree.getNode(M).collapsed){M.hasChildren=!!this.dataSource.hasChildren(M.element),M.stale=!0;return}return this.doRefreshSubTree(M,R,x)}async doRefreshSubTree(M,R,x){let O;M.refreshPromise=new Promise(B=>O=B),this.subTreeRefreshPromises.set(M,M.refreshPromise),M.refreshPromise.finally(()=>{M.refreshPromise=void 0,this.subTreeRefreshPromises.delete(M)});try{const B=await this.doRefreshNode(M,R,x);M.stale=!1,await p.Promises.settled(B.map(W=>this.doRefreshSubTree(W,R,x)))}finally{O()}}async doRefreshNode(M,R,x){M.hasChildren=!!this.dataSource.hasChildren(M.element);let O;if(!M.hasChildren)O=Promise.resolve(i.Iterable.empty());else{const B=this.doGetChildren(M);if((0,t.isIterable)(B))O=Promise.resolve(B);else{const W=(0,p.timeout)(800);W.then(()=>{M.slow=!0,this._onDidChangeNodeSlowState.fire(M)},V=>null),O=B.finally(()=>W.cancel())}}try{const B=await O;return this.setChildren(M,B,R,x)}catch(B){if(M!==this.root&&this.tree.hasElement(M)&&this.tree.collapse(M),(0,b.isCancellationError)(B))return[];throw B}finally{M.slow&&(M.slow=!1,this._onDidChangeNodeSlowState.fire(M))}}doGetChildren(M){let R=this.refreshPromises.get(M);if(R)return R;const x=this.dataSource.getChildren(M.element);return(0,t.isIterable)(x)?this.processChildren(x):(R=(0,p.createCancelablePromise)(async()=>this.processChildren(await x)),this.refreshPromises.set(M,R),R.finally(()=>{this.refreshPromises.delete(M)}))}_onDidChangeCollapseState({node:M,deep:R}){M.element!==null&&!M.collapsed&&M.element.stale&&(R?this.collapse(M.element.element):this.refreshAndRenderNode(M.element,!1).catch(b.onUnexpectedError))}setChildren(M,R,x,O){const B=[...R];if(M.children.length===0&&B.length===0)return[];const W=new Map,V=new Map;for(const q of M.children)W.set(q.element,q),this.identityProvider&&V.set(q.id,{node:q,collapsed:this.tree.hasElement(q)&&this.tree.isCollapsed(q)});const K=[],F=B.map(q=>{const ie=!!this.dataSource.hasChildren(q);if(!this.identityProvider){const J=r({element:q,parent:M,hasChildren:ie,defaultCollapseState:this.getDefaultCollapseState(q)});return ie&&J.defaultCollapseState===S.ObjectTreeElementCollapseState.PreserveOrExpanded&&K.push(J),J}const ae=this.identityProvider.getId(q).toString(),ne=V.get(ae);if(ne){const J=ne.node;return W.delete(J.element),this.nodes.delete(J.element),this.nodes.set(q,J),J.element=q,J.hasChildren=ie,x?ne.collapsed?(J.children.forEach(Q=>C(Q,re=>this.nodes.delete(re.element))),J.children.splice(0,J.children.length),J.stale=!0):K.push(J):ie&&!ne.collapsed&&K.push(J),J}const $=r({element:q,parent:M,id:ae,hasChildren:ie,defaultCollapseState:this.getDefaultCollapseState(q)});return O&&O.viewState.focus&&O.viewState.focus.indexOf(ae)>-1&&O.focus.push($),O&&O.viewState.selection&&O.viewState.selection.indexOf(ae)>-1&&O.selection.push($),(O&&O.viewState.expanded&&O.viewState.expanded.indexOf(ae)>-1||ie&&$.defaultCollapseState===S.ObjectTreeElementCollapseState.PreserveOrExpanded)&&K.push($),$});for(const q of W.values())C(q,ie=>this.nodes.delete(ie.element));for(const q of F)this.nodes.set(q.element,q);return M.children.splice(0,M.children.length,...F),M!==this.root&&this.autoExpandSingleChildren&&F.length===1&&K.length===0&&(F[0].forceExpanded=!0,K.push(F[0])),K}render(M,R,x){const O=M.children.map(W=>this.asTreeElement(W,R)),B=x&&{...x,diffIdentityProvider:x.diffIdentityProvider&&{getId(W){return x.diffIdentityProvider.getId(W.element)}}};this.tree.setChildren(M===this.root?null:M,O,B),M!==this.root&&this.tree.setCollapsible(M,M.hasChildren),this._onDidRender.fire()}asTreeElement(M,R){if(M.stale)return{element:M,collapsible:M.hasChildren,collapsed:!0};let x;return R&&R.viewState.expanded&&M.id&&R.viewState.expanded.indexOf(M.id)>-1?x=!1:M.forceExpanded?(x=!1,M.forceExpanded=!1):x=M.defaultCollapseState,{element:M,children:M.hasChildren?i.Iterable.map(M.children,O=>this.asTreeElement(O,R)):[],collapsible:M.hasChildren,collapsed:x}}processChildren(M){return this.sorter&&(M=[...M].sort(this.sorter.compare.bind(this.sorter))),M}dispose(){this.disposables.dispose(),this.tree.dispose()}}e.AsyncDataTree=w;class D{get element(){return{elements:this.node.element.elements.map(M=>M.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(M=>new D(M))}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(M){this.node=M}}class I{constructor(M,R,x,O){this.renderer=M,this.nodeMapper=R,this.compressibleNodeMapperProvider=x,this.onDidChangeTwistieState=O,this.renderedNodes=new Map,this.disposables=[],this.templateId=M.templateId}renderTemplate(M){return{templateData:this.renderer.renderTemplate(M)}}renderElement(M,R,x,O){this.renderer.renderElement(this.nodeMapper.map(M),R,x.templateData,O)}renderCompressedElements(M,R,x,O){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(M),R,x.templateData,O)}renderTwistie(M,R){return M.slow?(R.classList.add(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(R.classList.remove(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(M,R,x,O){var B,W;(W=(B=this.renderer).disposeElement)===null||W===void 0||W.call(B,this.nodeMapper.map(M),R,x.templateData,O)}disposeCompressedElements(M,R,x,O){var B,W;(W=(B=this.renderer).disposeCompressedElements)===null||W===void 0||W.call(B,this.compressibleNodeMapperProvider().map(M),R,x.templateData,O)}disposeTemplate(M){this.renderer.disposeTemplate(M.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,n.dispose)(this.disposables)}}function T(N){const M=N&&m(N);return M&&{...M,keyboardNavigationLabelProvider:M.keyboardNavigationLabelProvider&&{...M.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(R){return N.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(R.map(x=>x.element))}}}}class A extends w{constructor(M,R,x,O,B,W,V={}){super(M,R,x,B,W,V),this.compressionDelegate=O,this.compressibleNodeMapper=new S.WeakMapper(K=>new D(K)),this.filter=V.filter}createTree(M,R,x,O,B){const W=new k.ComposedTreeDelegate(x),V=O.map(F=>new I(F,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),K=T(B)||{};return new E.CompressibleObjectTree(M,R,W,V,K)}asTreeElement(M,R){return{incompressible:this.compressionDelegate.isIncompressible(M.element),...super.asTreeElement(M,R)}}updateOptions(M={}){this.tree.updateOptions(M)}render(M,R,x){if(!this.identityProvider)return super.render(M,R);const O=ne=>this.identityProvider.getId(ne).toString(),B=ne=>{const $=new Set;for(const J of ne){const Q=this.tree.getCompressedTreeNode(J===this.root?null:J);if(Q.element)for(const re of Q.element.elements)$.add(O(re.element))}return $},W=B(this.tree.getSelection()),V=B(this.tree.getFocus());super.render(M,R,x);const K=this.getSelection();let F=!1;const q=this.getFocus();let ie=!1;const ae=ne=>{const $=ne.element;if($)for(let J=0;J<$.elements.length;J++){const Q=O($.elements[J].element),re=$.elements[$.elements.length-1].element;W.has(Q)&&K.indexOf(re)===-1&&(K.push(re),F=!0),V.has(Q)&&q.indexOf(re)===-1&&(q.push(re),ie=!0)}ne.children.forEach(ae)};ae(this.tree.getCompressedTreeNode(M===this.root?null:M)),F&&this.setSelection(K),ie&&this.setFocus(q)}processChildren(M){return this.filter&&(M=i.Iterable.filter(M,R=>{const x=this.filter.filter(R,1),O=P(x);if(O===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return O===1})),super.processChildren(M)}}e.CompressibleAsyncDataTree=A;function P(N){return typeof N=="boolean"?N?1:0:(0,y.isFilterResult)(N)?(0,y.getVisibleState)(N.visibility):(0,y.getVisibleState)(N)}}),define(se[327],oe([1,0,12,6,2,55,17,11]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const _="$initialize";let v=!1;function b(g){S.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 a{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 r{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 a(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 r(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<h.args.length;C++)h.args[C]instanceof ArrayBuffer&&m.push(h.args[C]);else h.type===1&&h.res instanceof ArrayBuffer&&m.push(h.res);this._handler.sendMessage(h,m)}}class f extends y.Disposable{constructor(h,m,C){super();let w=null;this._worker=this._register(h.create("vs/base/common/worker/simpleWorker",N=>{this._protocol.handleMessage(N)},N=>{w?.(N)})),this._protocol=new u({sendMessage:(N,M)=>{this._worker.postMessage(N,M)},handleMessage:(N,M)=>{if(typeof C[N]!="function")return Promise.reject(new Error("Missing method "+N+" on main thread host."));try{return Promise.resolve(C[N].apply(C,M))}catch(R){return Promise.reject(R)}},handleEvent:(N,M)=>{if(d(N)){const R=C[N].call(C,M);if(typeof R!="function")throw new Error(`Missing dynamic event ${N} on main thread host.`);return R}if(c(N)){const R=C[N];if(typeof R!="function")throw new Error(`Missing event ${N} on main thread host.`);return R}throw new Error(`Malformed event name ${N}`)}}),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 T=(0,E.getAllMethodNames)(C);this._onModuleLoaded=this._protocol.sendMessage(_,[this._worker.getId(),JSON.parse(JSON.stringify(D)),m,T]);const A=(N,M)=>this._request(N,M),P=(N,M)=>this._protocol.listen(N,M);this._lazyProxy=new Promise((N,M)=>{w=M,this._onModuleLoaded.then(R=>{N(s(R,A,P))},R=>{M(R),this._onError("Worker failed to load "+m,R)})})}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 s(g,h,m){const C=I=>function(){const T=Array.prototype.slice.call(arguments,0);return h(I,T)},w=I=>function(T){return m(I,T)},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===_)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 T=s(w,(A,P)=>this._protocol.sendMessage(A,P),(A,P)=>this._protocol.listen(A,P));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(T),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<"u"&&delete m.trustedTypesPolicy,m.catchError=!0,globalThis.require.config(m)),new Promise((A,P)=>{(globalThis.require||te)([C],M=>{if(this._requestHandler=M.create(T),!this._requestHandler){P(new Error("No RequestHandler!"));return}A((0,E.getAllMethodNames)(this._requestHandler))},P)}))}}e.SimpleWorkerServer=l;function o(g){return new l(g,null)}e.create=o}),define(se[603],oe([1,0,93,12,47,327,2]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const p=(0,L.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:n=>n});function _(n){const t=globalThis.MonacoEnvironment;if(t){if(typeof t.getWorker=="function")return t.getWorker("workerMain.js",n);if(typeof t.getWorkerUrl=="function"){const r=t.getWorkerUrl("workerMain.js",n);return new Worker(p?p.createScriptURL(r):r,{name:n})}}if(typeof te=="function"){const r=te.toUrl("vs/base/worker/workerMain.js"),u=v(r,n);return new Worker(p?p.createScriptURL(u):u,{name:n})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function v(n,t){if(/^((http:)|(https:)|(file:))/.test(n)&&n.substring(0,globalThis.origin.length)!==globalThis.origin){const d="vs/base/worker/defaultWorkerFactory.js",s=te.toUrl(d).slice(0,-d.length),l=`/*${t}*/globalThis.MonacoEnvironment={baseUrl: '${s}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${n}') ?? '${n}');/*${t}*/`,o=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(o)}const r=n.lastIndexOf("?"),u=n.lastIndexOf("#",r),f=r>0?new URLSearchParams(n.substring(r+1,~u?u:void 0)):new URLSearchParams;return y.COI.addSearchParam(f,!0,!0),f.toString()?`${n}?${f.toString()}#${t}`:`${n}#${t}`}e.getWorkerBootstrapUrl=v;function b(n){return typeof n.then=="function"}class a extends S.Disposable{constructor(t,r,u,f,c){super(),this.id=r,this.label=u;const d=_(u);b(d)?this.worker=d:this.worker=Promise.resolve(d),this.postMessage(t,[]),this.worker.then(s=>{s.onmessage=function(l){f(l.data)},s.onmessageerror=c,typeof s.addEventListener=="function"&&s.addEventListener("error",c)}),this._register((0,S.toDisposable)(()=>{var s;(s=this.worker)===null||s===void 0||s.then(l=>{l.onmessage=null,l.onmessageerror=null,l.removeEventListener("error",c),l.terminate()}),this.worker=null}))}getId(){return this.id}postMessage(t,r){var u;(u=this.worker)===null||u===void 0||u.then(f=>{try{f.postMessage(t,r)}catch(c){(0,k.onUnexpectedError)(c),(0,k.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:c}))}})}}class i{constructor(t){this._label=t,this._webWorkerFailedBeforeError=!1}create(t,r,u){const f=++i.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new a(t,f,this._label||"anonymous"+f,r,c=>{(0,E.logOnceWebWorkerWarning)(c),this._webWorkerFailedBeforeError=c,u(c)})}}e.DefaultWorkerFactory=i,i.LAST_WORKER_ID=0}),define(se[604],oe([1,0,14,6,2,223,20]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var p;(function(a){a[a.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",a[a.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(p||(e.StorageHint=p={}));var _;(function(a){a[a.None=0]="None",a[a.Initialized=1]="Initialized",a[a.Closed=2]="Closed"})(_||(e.StorageState=_={}));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=_.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((r,u)=>this.acceptExternal(u,r)),(t=i.deleted)===null||t===void 0||t.forEach(r=>this.acceptExternal(r,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(i,n){if(this.state===_.Closed)return;let t=!1;(0,S.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,S.isUndefinedOrNull)(t)?n:t}getBoolean(i,n){const t=this.get(i);return(0,S.isUndefinedOrNull)(t)?n:t==="true"}getNumber(i,n){const t=this.get(i);return(0,S.isUndefinedOrNull)(t)?n:parseInt(t,10)}async set(i,n,t=!1){if(this.state===_.Closed)return;if((0,S.isUndefinedOrNull)(n))return this.delete(i,t);const r=(0,S.isObject)(n)||Array.isArray(n)?(0,E.stringify)(n):String(n);if(this.cache.get(i)!==r)return this.cache.set(i,r),this.pendingInserts.set(i,r),this.pendingDeletes.delete(i),this._onDidChangeStorage.fire({key:i,external:t}),this.doFlush()}async delete(i,n=!1){if(!(this.state===_.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((r,u)=>this.items.set(u,r)),(t=i.delete)===null||t===void 0||t.forEach(r=>this.items.delete(r))}}e.InMemoryStorageDatabase=b}),define(se[328],oe([1,0,2,6,7]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class E extends L.Disposable{constructor(p,_){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,_)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let p=null;const _=()=>{p?this.observe({width:p.width,height:p.height}):this.observe()};let v=!1,b=!1;const a=()=>{if(v&&!b)try{v=!1,b=!0,_()}finally{(0,y.scheduleAtNextAnimationFrame)((0,y.getWindow)(this._referenceDomElement),()=>{b=!1,a()})}};this._resizeObserver=new ResizeObserver(i=>{i&&i[0]&&i[0].contentRect?p={width:i[0].contentRect.width,height:i[0].contentRect.height}:p=null,v=!0,a()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(p){this.measureReferenceDomElement(!0,p)}measureReferenceDomElement(p,_){let v=0,b=0;_?(v=_.width,b=_.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(se[605],oe([1,0,7,40,56]),function(te,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 S(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,r,u){this._widgets[i.getId()].setPosition(n,t,r,u),this.setShouldRender()}removeWidget(i){const n=i.getId();if(this._widgets.hasOwnProperty(n)){const t=this._widgets[n];delete this._widgets[n];const r=t.domNode.domNode;r.parentNode.removeChild(r),r.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 S{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 r=this._context.configuration.options,u=r.get(143);this._fixedOverflowWidgets=r.get(42),this._contentWidth=u.contentWidth,this._contentLeft=u.contentLeft,this._lineHeight=r.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=r(n,this._context.viewModel,this._affinity),this._secondaryAnchor=r(t,this._context.viewModel,this._affinity);function r(u,f,c){if(!u)return new p(null,null);const d=f.model.validatePosition(u);if(f.coordinatesConverter.modelPositionIsVisible(d)){const s=f.coordinatesConverter.convertModelPositionToViewPosition(d,c??void 0);return new p(u,s)}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,r){this._setPosition(r,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,r){const u=i.top,f=u,c=i.top+i.height,d=r.viewportHeight-c,s=u-t,l=f>=t,o=c,g=d>=t;let h=i.left;return h+n>r.scrollLeft+r.viewportWidth&&(h=r.scrollLeft+r.viewportWidth-n),h<r.scrollLeft&&(h=r.scrollLeft),{fitsAbove:l,aboveTop:s,fitsBelow:g,belowTop:o,left:h}}_layoutHorizontalSegmentInPage(i,n,t,r){var u;const d=Math.max(15,n.left-r),s=Math.min(n.left+n.width+r,i.width-15),o=this._viewDomNode.domNode.ownerDocument.defaultView;let g=n.left+t-((u=o?.scrollX)!==null&&u!==void 0?u:0);if(g+r>s){const h=g-(s-r);g-=h,t-=h}if(g<d){const h=g-d;g-=h,t-=h}return[t,g]}_layoutBoxInPage(i,n,t,r){var u,f;const c=i.top-t,d=i.top+i.height,s=L.getDomNodePagePosition(this._viewDomNode.domNode),l=this._viewDomNode.domNode.ownerDocument,o=l.defaultView,g=s.top+c-((u=o?.scrollY)!==null&&u!==void 0?u:0),h=s.top+d-((f=o?.scrollY)!==null&&f!==void 0?f:0),m=L.getClientArea(l.body),[C,w]=this._layoutHorizontalSegmentInPage(m,s,i.left-r.scrollLeft+this._contentLeft,n),D=22,I=22,T=g>=D,A=h+t<=m.height-I;return this._fixedOverflowWidgets?{fitsAbove:T,aboveTop:Math.max(g,D),fitsBelow:A,belowTop:h,left:w}:{fitsAbove:T,aboveTop:c,fitsBelow:A,belowTop:d,left:C}}_prepareRenderWidgetAtExactPositionOverflowing(i){return new _(i.top,i.left+this._contentLeft)}_getAnchorsCoordinates(i){var n,t;const r=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:r,secondary:f};function c(d,s,l){if(!d)return null;const o=i.visibleRangeForPosition(d);if(!o)return null;const g=d.column===1&&s===3?0:o.left,h=i.getVerticalOffsetForLineNumber(d.lineNumber)-i.scrollTop;return new v(h,g,l)}}_reduceAnchorCoordinates(i,n,t){if(!n)return i;const r=this._context.configuration.options.get(50);let u=n.left;return u<i.left?u=Math.max(u,i.left-t+r.typicalFullwidthCharacterWidth):u=Math.min(u,i.left+t-r.typicalFullwidthCharacterWidth),new v(i.top,u,i.height)}_prepareRenderWidget(i){if(!this._preference||this._preference.length===0)return null;const{primary:n,secondary:t}=this._getAnchorsCoordinates(i);if(!n)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let f=null;if(typeof this._actual.beforeRender=="function"&&(f=b(this._actual.beforeRender,this._actual)),f)this._cachedDomNodeOffsetWidth=f.width,this._cachedDomNodeOffsetHeight=f.height;else{const d=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(d.width),this._cachedDomNodeOffsetHeight=Math.round(d.height)}}const r=this._reduceAnchorCoordinates(n,t,this._cachedDomNodeOffsetWidth);let u;this.allowEditorOverflow?u=this._layoutBoxInPage(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,i):u=this._layoutBoxInViewport(r,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,i);for(let f=1;f<=2;f++)for(const c of this._preference)if(c===1){if(!u)return null;if(f===2||u.fitsAbove)return{coordinate:new _(u.aboveTop,u.left),position:1}}else if(c===2){if(!u)return null;if(f===2||u.fitsBelow)return{coordinate:new _(u.belowTop,u.left),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new _(r.top,r.left)),position:0}:{coordinate:new _(r.top,r.left),position:0};return null}onBeforeRender(i){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<i.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>i.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 _{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(a,i,...n){try{return a.call(i,...n)}catch{return null}}}),define(se[606],oe([1,0,40,56,7,441]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class E extends k.ViewPart{constructor(p,_){super(p),this._viewDomNode=_;const b=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=b.verticalScrollbarWidth,this._minimapWidth=b.minimap.minimapWidth,this._horizontalScrollbarHeight=b.horizontalScrollbarHeight,this._editorHeight=b.height,this._editorWidth=b.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,L.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,L.createFastDomNode)(document.createElement("div")),k.PartFingerprints.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(p){const v=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=v.verticalScrollbarWidth,this._minimapWidth=v.minimap.minimapWidth,this._horizontalScrollbarHeight=v.horizontalScrollbarHeight,this._editorHeight=v.height,this._editorWidth=v.width,!0}addWidget(p){const _=(0,L.createFastDomNode)(p.getDomNode());this._widgets[p.getId()]={widget:p,preference:null,domNode:_},_.setPosition("absolute"),_.setAttribute("widgetId",p.getId()),p.allowEditorOverflow?this.overflowingOverlayWidgetsDomNode.appendChild(_):this._domNode.appendChild(_),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(p,_){const v=this._widgets[p.getId()];return v.preference===_?(this._updateMaxMinWidth(),!1):(v.preference=_,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(p){const _=p.getId();if(this._widgets.hasOwnProperty(_)){const b=this._widgets[_].domNode.domNode;delete this._widgets[_],b.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var p,_;let v=0;const b=Object.keys(this._widgets);for(let a=0,i=b.length;a<i;a++){const n=b[a],r=(_=(p=this._widgets[n].widget).getMinContentWidthInPx)===null||_===void 0?void 0:_.call(p);typeof r<"u"&&(v=Math.max(v,r))}this._context.viewLayout.setOverlayWidgetsMinWidth(v)}_renderWidget(p){const _=p.domNode;if(p.preference===null){_.setTop("");return}if(p.preference===0)_.setTop(0),_.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(p.preference===1){const v=_.domNode.clientHeight;_.setTop(this._editorHeight-v-2*this._horizontalScrollbarHeight),_.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else if(p.preference===2)_.setTop(0),_.domNode.style.right="50%";else{const{top:v,left:b}=p.preference;if(this._context.configuration.options.get(42)&&p.widget.allowEditorOverflow){const i=this._viewDomNodeRect;_.setTop(v+i.top),_.setLeft(b+i.left),_.setPosition("fixed")}else _.setTop(v),_.setLeft(b),_.setPosition("absolute")}}prepareRender(p){this._viewDomNodeRect=y.getDomNodePagePosition(this._viewDomNode.domNode)}render(p){this._domNode.setWidth(this._editorWidth);const _=Object.keys(this._widgets);for(let v=0,b=_.length;v<b;v++){const a=_[v];this._renderWidget(this._widgets[a])}}}e.ViewOverlayWidgets=E}),define(se[607],oe([1,0,7,12,2]),function(te,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,_,v){this._editor=p,this._instantiationService=v;for(const b of _){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[_,v]of this._instances)typeof v.saveViewState=="function"&&(p[_]=v.saveViewState());return p}restoreViewState(p){for(const[_,v]of this._instances)typeof v.restoreViewState=="function"&&v.restoreViewState(p[_])}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 _=this._findPendingContributionsByInstantiation(p);for(const v of _)this._instantiateById(v.id)}_findPendingContributionsByInstantiation(p){const _=[];for(const[,v]of this._pending)v.instantiation===p&&_.push(v);return _}_instantiateById(p){const _=this._pending.get(p);if(_){if(this._pending.delete(p),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const v=this._instantiationService.createInstance(_.ctor,this._editor);this._instances.set(_.id,v),typeof v.restoreViewState=="function"&&_.instantiation!==0&&console.warn(`Editor contribution '${_.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(v){(0,k.onUnexpectedError)(v)}}}}e.CodeEditorContributions=E}),define(se[608],oe([1,0,158,2,35]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=void 0;class E extends k.Disposable{constructor(p,_,v,b){super(),this._options=p,this._domNode=_,this._dimensions=v,this._sashes=b,this._sashRatio=(0,y.observableValue)(this,void 0),this.sashLeft=(0,y.derived)(this,a=>{var i;const n=(i=this._sashRatio.read(a))!==null&&i!==void 0?i:this._options.splitViewDefaultRatio.read(a);return this._computeSashLeft(n,a)}),this._sash=this._register(new L.Sash(this._domNode,{getVerticalSashTop:a=>0,getVerticalSashLeft:a=>this.sashLeft.get(),getVerticalSashHeight:a=>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(a=>{const i=this._dimensions.width.get(),n=this._computeSashLeft((this._startSashPosition+(a.currentX-a.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)(a=>{const i=this._sashes.read(a);i&&(this._sash.orthogonalEndSash=i.bottom)})),this._register((0,y.autorun)(a=>{const i=this._options.enableSplitViewResizing.read(a);this._sash.state=i?3:0,this.sashLeft.read(a),this._dimensions.height.read(a),this._sash.layout()}))}_computeSashLeft(p,_){const v=this._dimensions.width.read(_),b=Math.floor(this._options.splitViewDefaultRatio.read(_)*v),a=this._options.enableSplitViewResizing.read(_)?Math.floor(p*v):b,i=100;return v<=i*2?b:a<i?i:a>v-i?v-i:a}}e.DiffEditorSash=E}),define(se[87],oe([1,0,60,19,585,2,35,328,10,5,91]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterWithPrevious=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 a(T,A,P,N){if(T.length===0)return A;if(A.length===0)return T;const M=[];let R=0,x=0;for(;R<T.length&&x<A.length;){const O=T[R],B=A[x],W=P(O),V=P(B);W<V?(M.push(O),R++):W>V?(M.push(B),x++):(M.push(N(O,B)),R++,x++)}for(;R<T.length;)M.push(T[R]),R++;for(;x<A.length;)M.push(A[x]),x++;return M}e.joinCombine=a;function i(T,A){const P=new E.DisposableStore,N=T.createDecorationsCollection();return P.add((0,S.autorunOpts)({debugName:()=>`Apply decorations from ${A.debugName}`},M=>{const R=A.read(M);N.set(R)})),P.add({dispose:()=>{N.clear()}}),P}e.applyObservableDecorations=i;function n(T,A){return T.appendChild(A),(0,E.toDisposable)(()=>{T.removeChild(A)})}e.appendRemoveOnDispose=n;class t extends E.Disposable{get width(){return this._width}get height(){return this._height}constructor(A,P){super(),this.elementSizeObserver=this._register(new p.ElementSizeObserver(A,P)),this._width=(0,S.observableValue)(this,this.elementSizeObserver.getWidth()),this._height=(0,S.observableValue)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(N=>(0,S.transaction)(M=>{this._width.set(this.elementSizeObserver.getWidth(),M),this._height.set(this.elementSizeObserver.getHeight(),M)})))}observe(A){this.elementSizeObserver.observe(A)}setAutomaticLayout(A){A?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}e.ObservableElementSizeObserver=t;function r(T,A,P){let N=A.get(),M=N,R=N;const x=(0,S.observableValue)("animatedValue",N);let O=-1;const B=300;let W;P.add((0,S.autorunHandleChanges)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(K,F)=>(K.didChange(A)&&(F.animate=F.animate||K.change),!0)},(K,F)=>{W!==void 0&&(T.cancelAnimationFrame(W),W=void 0),M=R,N=A.read(K),O=Date.now()-(F.animate?0:B),V()}));function V(){const K=Date.now()-O;R=Math.floor(u(K,M,N-M,B)),K<B?W=T.requestAnimationFrame(V):R=N,x.set(R,void 0)}return x}e.animatedObservable=r;function u(T,A,P,N){return T===N?A+P:P*(-Math.pow(2,-10*T/N)+1)+A}class f extends E.Disposable{constructor(A,P,N){super(),this._register(new d(A,N)),this._register(s(N,{height:P.actualHeight,top:P.actualTop}))}}e.ViewZoneOverlayWidget=f;class c{get afterLineNumber(){return this._afterLineNumber.get()}constructor(A,P){this._afterLineNumber=A,this.heightInPx=P,this.domNode=document.createElement("div"),this._actualTop=(0,S.observableValue)(this,void 0),this._actualHeight=(0,S.observableValue)(this,void 0),this.actualTop=this._actualTop,this.actualHeight=this._actualHeight,this.showInHiddenAreas=!0,this.onChange=this._afterLineNumber,this.onDomNodeTop=N=>{this._actualTop.set(N,void 0)},this.onComputedHeight=N=>{this._actualHeight.set(N,void 0)}}}e.PlaceholderViewZone=c;class d{constructor(A,P){this._editor=A,this._domElement=P,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 s(T,A){return(0,S.autorun)(P=>{for(let[N,M]of Object.entries(A))M&&typeof M=="object"&&"read"in M&&(M=M.read(P)),typeof M=="number"&&(M=`${M}px`),N=N.replace(/[A-Z]/g,R=>"-"+R.toLowerCase()),T.style[N]=M})}e.applyStyle=s;function l(T,A){return o([T],A),T}e.readHotReloadableExport=l;function o(T,A){(0,y.isHotReloadEnabled)()&&(0,S.observableSignalFromEvent)("reload",N=>(0,y.registerHotReloadHandler)(({oldExports:M})=>{if([...Object.values(M)].some(R=>T.includes(R)))return R=>(N(void 0),!0)})).read(A)}e.observeHotReloadableExports=o;function g(T,A,P,N){const M=new E.DisposableStore,R=[];return M.add((0,S.autorunWithStore)((x,O)=>{const B=A.read(x),W=new Map,V=new Map;P&&P(!0),T.changeViewZones(K=>{for(const F of R)K.removeZone(F),N?.delete(F);R.length=0;for(const F of B){const q=K.addZone(F);F.setZoneId&&F.setZoneId(q),R.push(q),N?.add(q),W.set(F,q)}}),P&&P(!1),O.add((0,S.autorunHandleChanges)({createEmptyChangeSummary(){return{zoneIds:[]}},handleChange(K,F){const q=V.get(K.changedObservable);return q!==void 0&&F.zoneIds.push(q),!0}},(K,F)=>{for(const q of B)q.onChange&&(V.set(q.onChange,W.get(q)),q.onChange.read(K));P&&P(!0),T.changeViewZones(q=>{for(const ie of F.zoneIds)q.layoutZone(ie)}),P&&P(!1)}))})),M.add({dispose(){P&&P(!0),T.changeViewZones(x=>{for(const O of R)x.removeZone(O)}),N?.clear(),P&&P(!1)}}),M}e.applyViewZones=g;class h extends k.CancellationTokenSource{dispose(){super.dispose(!0)}}e.DisposableCancellationTokenSource=h;function m(T,A){const P=(0,L.findLast)(A,M=>M.original.startLineNumber<=T.lineNumber);if(!P)return v.Range.fromPositions(T);if(P.original.endLineNumberExclusive<=T.lineNumber){const M=T.lineNumber-P.original.endLineNumberExclusive+P.modified.endLineNumberExclusive;return v.Range.fromPositions(new _.Position(M,T.column))}if(!P.innerChanges)return v.Range.fromPositions(new _.Position(P.modified.startLineNumber,1));const N=(0,L.findLast)(P.innerChanges,M=>M.originalRange.getStartPosition().isBeforeOrEqual(T));if(!N){const M=T.lineNumber-P.original.startLineNumber+P.modified.startLineNumber;return v.Range.fromPositions(new _.Position(M,T.column))}if(N.originalRange.containsPosition(T))return N.modifiedRange;{const M=C(N.originalRange.getEndPosition(),T);return v.Range.fromPositions(w(N.modifiedRange.getEndPosition(),M))}}e.translatePosition=m;function C(T,A){return T.lineNumber===A.lineNumber?new b.LengthObj(0,A.column-T.column):new b.LengthObj(A.lineNumber-T.lineNumber,A.column-1)}function w(T,A){return A.lineCount===0?new _.Position(T.lineNumber,T.column+A.columnCount):new _.Position(T.lineNumber+A.lineCount,A.columnCount+1)}function D(T,A,P){const N=T.bindTo(A);return(0,S.autorunOpts)({debugName:()=>`Update ${T.key}`},M=>{N.set(P(M))})}e.bindContextKey=D;function I(T,A){let P;return T.filter(N=>{const M=A(N,P);return P=N,M})}e.filterWithPrevious=I}),define(se[102],oe([1,0,11,17,144]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let E;function S(){return E||(E=new TextDecoder("UTF-16LE")),E}let p;function _(){return p||(p=new TextDecoder("UTF-16BE")),p}let v;function b(){return v||(v=k.isLittleEndian()?S():_()),v}e.getPlatformTextDecoder=b;function a(t,r,u){const f=new Uint16Array(t.buffer,r,u);return u>0&&(f[0]===65279||f[0]===65534)?i(t,r,u):S().decode(f)}e.decodeUTF16LE=a;function i(t,r,u){const f=[];let c=0;for(let d=0;d<u;d++){const s=y.readUInt16LE(t,r);r+=2,f[c++]=String.fromCharCode(s)}return f.join("")}class n{constructor(r){this._capacity=r|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const r=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return b().decode(r)}_flushBuffer(){const r=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[r]:this._completedStrings[this._completedStrings.length]=r}appendCharCode(r){const u=this._capacity-this._bufferLength;u<=1&&(u===0||L.isHighSurrogate(r))&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendASCIICharCode(r){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=r}appendString(r){const u=r.length;if(this._bufferLength+u>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=r;return}for(let f=0;f<u;f++)this._buffer[this._bufferLength++]=r.charCodeAt(f)}}e.StringBuilder=n}),define(se[609],oe([1,0,93,11,20,72,102,294,114]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const v=(0,L.createTrustedTypesPolicy)("domLineBreaksComputer",{createHTML:u=>u});class b{static create(f){return new b(new WeakRef(f))}constructor(f){this.targetWindow=f}createLineBreaksComputer(f,c,d,s,l){const o=[],g=[];return{addRequest:(h,m,C)=>{o.push(h),g.push(m)},finalize:()=>a((0,y.assertIsDefined)(this.targetWindow.deref()),o,f,c,d,s,l,g)}}}e.DOMLineBreaksComputerFactory=b;function a(u,f,c,d,s,l,o,g){var h;function m(F){const q=g[F];if(q){const ie=_.LineInjectedText.applyInjectedText(f[F],q),ae=q.map($=>$.options),ne=q.map($=>$.column-1);return new p.ModelLineProjectionData(ne,ae,[ie.length],[],0)}else return null}if(s===-1){const F=[];for(let q=0,ie=f.length;q<ie;q++)F[q]=m(q);return F}const C=Math.round(s*c.typicalHalfwidthCharacterWidth),D=Math.round(d*(l===3?2:l===2?1:0)),I=Math.ceil(c.spaceWidth*D),T=document.createElement("div");(0,E.applyFontInfo)(T,c);const A=new S.StringBuilder(1e4),P=[],N=[],M=[],R=[],x=[];for(let F=0;F<f.length;F++){const q=_.LineInjectedText.applyInjectedText(f[F],g[F]);let ie=0,ae=0,ne=C;if(l!==0)if(ie=k.firstNonWhitespaceIndex(q),ie===-1)ie=0;else{for(let re=0;re<ie;re++){const de=q.charCodeAt(re)===9?d-ae%d:1;ae+=de}const Q=Math.ceil(c.spaceWidth*ae);Q+c.typicalFullwidthCharacterWidth>C?(ie=0,ae=0):ne=C-Q}const $=q.substr(ie),J=i($,ae,d,ne,A,I);P[F]=ie,N[F]=ae,M[F]=$,R[F]=J[0],x[F]=J[1]}const O=A.build(),B=(h=v?.createHTML(O))!==null&&h!==void 0?h:O;T.innerHTML=B,T.style.position="absolute",T.style.top="10000",o==="keepAll"?(T.style.wordBreak="keep-all",T.style.overflowWrap="anywhere"):(T.style.wordBreak="inherit",T.style.overflowWrap="break-word"),u.document.body.appendChild(T);const W=document.createRange(),V=Array.prototype.slice.call(T.children,0),K=[];for(let F=0;F<f.length;F++){const q=V[F],ie=n(W,q,M[F],R[F]);if(ie===null){K[F]=m(F);continue}const ae=P[F],ne=N[F]+D,$=x[F],J=[];for(let he=0,me=ie.length;he<me;he++)J[he]=$[ie[he]];if(ae!==0)for(let he=0,me=ie.length;he<me;he++)ie[he]+=ae;let Q,re;const de=g[F];de?(Q=de.map(he=>he.options),re=de.map(he=>he.column-1)):(Q=null,re=null),K[F]=new p.ModelLineProjectionData(re,Q,ie,J,ne)}return u.document.body.removeChild(T),K}function i(u,f,c,d,s,l){if(l!==0){const D=String(l);s.appendString('<div style="text-indent: -'),s.appendString(D),s.appendString("px; padding-left: "),s.appendString(D),s.appendString("px; box-sizing: border-box; width:")}else s.appendString('<div style="width:');s.appendString(String(d)),s.appendString('px;">');const o=u.length;let g=f,h=0;const m=[],C=[];let w=0<o?u.charCodeAt(0):0;s.appendString("<span>");for(let D=0;D<o;D++){D!==0&&D%16384===0&&s.appendString("</span><span>"),m[D]=h,C[D]=g;const I=w;w=D+1<o?u.charCodeAt(D+1):0;let T=1,A=1;switch(I){case 9:T=c-g%c,A=T;for(let P=1;P<=T;P++)P<T?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 32:w===32?s.appendCharCode(160):s.appendASCIICharCode(32);break;case 60:s.appendString("<");break;case 62:s.appendString(">");break;case 38:s.appendString("&");break;case 0:s.appendString("�");break;case 65279:case 8232:case 8233:case 133:s.appendCharCode(65533);break;default:k.isFullWidthCharacter(I)&&A++,I<32?s.appendCharCode(9216+I):s.appendCharCode(I)}h+=T,g+=A}return s.appendString("</span>"),m[u.length]=h,C[u.length]=g,s.appendString("</div>"),[m,C]}function n(u,f,c,d){if(c.length<=1)return null;const s=Array.prototype.slice.call(f.children,0),l=[];try{t(u,s,d,0,null,c.length-1,null,l)}catch(o){return console.log(o),null}return l.length===0?null:(l.push(c.length),l)}function t(u,f,c,d,s,l,o,g){if(d===l||(s=s||r(u,f,c[d],c[d+1]),o=o||r(u,f,c[l],c[l+1]),Math.abs(s[0].top-o[0].top)<=.1))return;if(d+1===l){g.push(l);return}const h=d+(l-d)/2|0,m=r(u,f,c[h],c[h+1]);t(u,f,c,d,s,h,m,g),t(u,f,c,h,m,l,o,g)}function r(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(se[233],oe([1,0,40,93,12,102]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class S{constructor(b){this._createLine=b,this._set(1,[])}flush(){this._set(1,[])}_set(b,a){this._lines=a,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 a=b-this._rendLineNumberStart;if(a<0||a>=this._lines.length)throw new y.BugIndicatingError("Illegal value for lineNumber");return this._lines[a]}onLinesDeleted(b,a){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(a<i){const f=a-b+1;return this._rendLineNumberStart-=f,null}if(b>n)return null;let t=0,r=0;for(let f=i;f<=n;f++){const c=f-this._rendLineNumberStart;b<=f&&f<=a&&(r===0?(t=c,r=1):r++)}if(b<i){let f=0;a<i?f=a-b+1:f=i-b,this._rendLineNumberStart-=f}return this._lines.splice(t,r)}onLinesChanged(b,a){const i=b+a-1;if(this.getCount()===0)return!1;const n=this.getStartLineNumber(),t=this.getEndLineNumber();let r=!1;for(let u=b;u<=i;u++)u>=n&&u<=t&&(this._lines[u-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(b,a){if(this.getCount()===0)return null;const i=a-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 r=[];for(let s=0;s<i;s++)r[s]=this._createLine();const u=b-this._rendLineNumberStart,f=this._lines.slice(0,u),c=this._lines.slice(u,this._lines.length-i),d=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=f.concat(r).concat(c),d}onTokensChanged(b){if(this.getCount()===0)return!1;const a=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let t=0,r=b.length;t<r;t++){const u=b[t];if(u.toLineNumber<a||u.fromLineNumber>i)continue;const f=Math.max(a,u.fromLineNumber),c=Math.min(i,u.toLineNumber);for(let d=f;d<=c;d++){const s=d-this._rendLineNumberStart;this._lines[s].onTokensChanged(),n=!0}}return n}}e.RenderedLinesCollection=S;class p{constructor(b){this._host=b,this.domNode=this._createDomNode(),this._linesCollection=new S(()=>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 a=this._linesCollection.onLinesDeleted(b.fromLineNumber,b.toLineNumber);if(a)for(let i=0,n=a.length;i<n;i++){const t=a[i].getDomNode();t&&this.domNode.domNode.removeChild(t)}return!0}onLinesInserted(b){const a=this._linesCollection.onLinesInserted(b.fromLineNumber,b.toLineNumber);if(a)for(let i=0,n=a.length;i<n;i++){const t=a[i].getDomNode();t&&this.domNode.domNode.removeChild(t)}return!0}onScrollChanged(b){return b.scrollTopChanged}onTokensChanged(b){return this._linesCollection.onTokensChanged(b.ranges)}onZonesChanged(b){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(b){return this._linesCollection.getLine(b)}renderLines(b){const a=this._linesCollection._get(),i=new _(this.domNode.domNode,this._host,b),n={rendLineNumberStart:a.rendLineNumberStart,lines:a.lines,linesLength:a.lines.length},t=i.render(n,b.startLineNumber,b.endLineNumber,b.relativeVerticalOffset);this._linesCollection._set(t.rendLineNumberStart,t.lines)}}e.VisibleLinesCollection=p;class _{constructor(b,a,i){this.domNode=b,this.host=a,this.viewportData=i}render(b,a,i,n){const t={rendLineNumberStart:b.rendLineNumberStart,lines:b.lines.slice(0),linesLength:b.linesLength};if(t.rendLineNumberStart+t.linesLength-1<a||i<t.rendLineNumberStart){t.rendLineNumberStart=a,t.linesLength=i-a+1,t.lines=[];for(let r=a;r<=i;r++)t.lines[r-a]=this.host.createVisibleLine();return this._finishRendering(t,!0,n),t}if(this._renderUntouchedLines(t,Math.max(a-t.rendLineNumberStart,0),Math.min(i-t.rendLineNumberStart,t.linesLength-1),n,a),t.rendLineNumberStart>a){const r=a,u=Math.min(i,t.rendLineNumberStart-1);r<=u&&(this._insertLinesBefore(t,r,u,n,a),t.linesLength+=u-r+1)}else if(t.rendLineNumberStart<a){const r=Math.min(t.linesLength,a-t.rendLineNumberStart);r>0&&(this._removeLinesBefore(t,r),t.linesLength-=r)}if(t.rendLineNumberStart=a,t.rendLineNumberStart+t.linesLength-1<i){const r=t.rendLineNumberStart+t.linesLength,u=i;r<=u&&(this._insertLinesAfter(t,r,u,n,a),t.linesLength+=u-r+1)}else if(t.rendLineNumberStart+t.linesLength-1>i){const r=Math.max(0,i-t.rendLineNumberStart+1),f=t.linesLength-1-r+1;f>0&&(this._removeLinesAfter(t,f),t.linesLength-=f)}return this._finishRendering(t,!1,n),t}_renderUntouchedLines(b,a,i,n,t){const r=b.rendLineNumberStart,u=b.lines;for(let f=a;f<=i;f++){const c=r+f;u[f].layoutLine(c,n[c-t])}}_insertLinesBefore(b,a,i,n,t){const r=[];let u=0;for(let f=a;f<=i;f++)r[u++]=this.host.createVisibleLine();b.lines=r.concat(b.lines)}_removeLinesBefore(b,a){for(let i=0;i<a;i++){const n=b.lines[i].getDomNode();n&&this.domNode.removeChild(n)}b.lines.splice(0,a)}_insertLinesAfter(b,a,i,n,t){const r=[];let u=0;for(let f=a;f<=i;f++)r[u++]=this.host.createVisibleLine();b.lines=b.lines.concat(r)}_removeLinesAfter(b,a){const i=b.linesLength-a;for(let n=0;n<a;n++){const t=b.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}b.lines.splice(i,a)}_finishRenderingNewLines(b,a,i,n){_._ttPolicy&&(i=_._ttPolicy.createHTML(i));const t=this.domNode.lastChild;a||!t?this.domNode.innerHTML=i:t.insertAdjacentHTML("afterend",i);let r=this.domNode.lastChild;for(let u=b.linesLength-1;u>=0;u--){const f=b.lines[u];n[u]&&(f.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(b,a,i){const n=document.createElement("div");_._ttPolicy&&(a=_._ttPolicy.createHTML(a)),n.innerHTML=a;for(let t=0;t<b.linesLength;t++){const r=b.lines[t];if(i[t]){const u=n.firstChild,f=r.getDomNode();f.parentNode.replaceChild(u,f),r.setDomNode(u)}}}_finishRendering(b,a,i){const n=_._sb,t=b.linesLength,r=b.lines,u=b.rendLineNumberStart,f=[];{n.reset();let c=!1;for(let d=0;d<t;d++){const s=r[d];f[d]=!1,!(s.getDomNode()||!s.renderLine(d+u,i[d],this.viewportData,n))&&(f[d]=!0,c=!0)}c&&this._finishRenderingNewLines(b,a,n.build(),f)}{n.reset();let c=!1;const d=[];for(let s=0;s<t;s++){const l=r[s];d[s]=!1,!(f[s]||!l.renderLine(s+u,i[s],this.viewportData,n))&&(d[s]=!0,c=!0)}c&&this._finishRenderingInvalidLines(b,n.build(),d)}}}_._ttPolicy=(0,k.createTrustedTypesPolicy)("editorViewLayer",{createHTML:v=>v}),_._sb=new E.StringBuilder(1e5)}),define(se[610],oe([1,0,40,72,233,56]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class S extends E.ViewPart{constructor(a){super(a),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 a=0,i=this._dynamicOverlays.length;a<i;a++)if(this._dynamicOverlays[a].shouldRender())return!0;return!1}dispose(){super.dispose();for(let a=0,i=this._dynamicOverlays.length;a<i;a++)this._dynamicOverlays[a].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new p(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(a){this._dynamicOverlays.push(a)}onConfigurationChanged(a){this._visibleLines.onConfigurationChanged(a);const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let u=i;u<=n;u++)this._visibleLines.getVisibleLine(u).onConfigurationChanged(a);const r=this._context.configuration.options.get(50);return(0,k.applyFontInfo)(this.domNode,r),!0}onFlushed(a){return this._visibleLines.onFlushed(a)}onFocusChanged(a){return this._isFocused=a.isFocused,!0}onLinesChanged(a){return this._visibleLines.onLinesChanged(a)}onLinesDeleted(a){return this._visibleLines.onLinesDeleted(a)}onLinesInserted(a){return this._visibleLines.onLinesInserted(a)}onScrollChanged(a){return this._visibleLines.onScrollChanged(a)||!0}onTokensChanged(a){return this._visibleLines.onTokensChanged(a)}onZonesChanged(a){return this._visibleLines.onZonesChanged(a)}prepareRender(a){const i=this._dynamicOverlays.filter(n=>n.shouldRender());for(let n=0,t=i.length;n<t;n++){const r=i[n];r.prepareRender(a),r.onDidRender()}}render(a){this._viewOverlaysRender(a),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(a){this._visibleLines.renderLines(a.viewportData)}}e.ViewOverlays=S;class p{constructor(a,i){this._configuration=a,this._lineHeight=this._configuration.options.get(66),this._dynamicOverlays=i,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(a){this._domNode=(0,L.createFastDomNode)(a)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(a){this._lineHeight=this._configuration.options.get(66)}renderLine(a,i,n,t){let r="";for(let u=0,f=this._dynamicOverlays.length;u<f;u++){const c=this._dynamicOverlays[u];r+=c.render(n.startLineNumber,a)}return this._renderedContent===r?!1:(this._renderedContent=r,t.appendString('<div style="position:absolute;top:'),t.appendString(String(i)),t.appendString("px;width:100%;height:"),t.appendString(String(this._lineHeight)),t.appendString('px;">'),t.appendString(r),t.appendString("</div>"),!0)}layoutLine(a,i){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=p;class _ extends S{constructor(a){super(a);const n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(a){const n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollWidthChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a),this.domNode.setWidth(Math.max(a.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=_;class v extends S{constructor(a){super(a);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(a){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(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollHeightChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a);const i=Math.min(a.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=v}),define(se[329],oe([1,0,144,102]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function y(_){return _.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,a,i){this.oldPosition=v,this.oldText=b,this.newPosition=a,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,a){const i=b.length;L.writeUInt32BE(v,i,a),a+=4;for(let n=0;n<i;n++)L.writeUInt16LE(v,b.charCodeAt(n),a),a+=2;return a}static _readString(v,b){const a=L.readUInt32BE(v,b);return b+=4,(0,k.decodeUTF16LE)(v,b,a)}writeSize(){return 4+4+E._writeStringSize(this.oldText)+E._writeStringSize(this.newText)}write(v,b){return L.writeUInt32BE(v,this.oldPosition,b),b+=4,L.writeUInt32BE(v,this.newPosition,b),b+=4,b=E._writeString(v,this.oldText,b),b=E._writeString(v,this.newText,b),b}static read(v,b,a){const i=L.readUInt32BE(v,b);b+=4;const n=L.readUInt32BE(v,b);b+=4;const t=E._readString(v,b);b+=E._writeStringSize(t);const r=E._readString(v,b);return b+=E._writeStringSize(r),a.push(new E(i,t,n,r)),b}}e.TextChange=E;function S(_,v){return _===null||_.length===0?v:new p(_,v).compress()}e.compressConsecutiveTextChanges=S;class p{constructor(v,b){this._prevEdits=v,this._currEdits=b,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let v=0,b=0,a=this._getPrev(v),i=this._getCurr(b);for(;v<this._prevLen||b<this._currLen;){if(a===null){this._acceptCurr(i),i=this._getCurr(++b);continue}if(i===null){this._acceptPrev(a),a=this._getPrev(++v);continue}if(i.oldEnd<=a.newPosition){this._acceptCurr(i),i=this._getCurr(++b);continue}if(a.newEnd<=i.oldPosition){this._acceptPrev(a),a=this._getPrev(++v);continue}if(i.oldPosition<a.newPosition){const[f,c]=p._splitCurr(i,a.newPosition-i.oldPosition);this._acceptCurr(f),i=c;continue}if(a.newPosition<i.oldPosition){const[f,c]=p._splitPrev(a,i.oldPosition-a.newPosition);this._acceptPrev(f),a=c;continue}let r,u;if(i.oldEnd===a.newEnd)r=a,u=i,a=this._getPrev(++v),i=this._getCurr(++b);else if(i.oldEnd<a.newEnd){const[f,c]=p._splitPrev(a,i.oldLength);r=f,u=i,a=c,i=this._getCurr(++b)}else{const[f,c]=p._splitCurr(i,a.newLength);r=a,u=f,a=this._getPrev(++v),i=c}this._result[this._resultLen++]=new E(r.oldPosition,r.oldText,u.newPosition,u.newText),this._prevDeltaOffset+=r.newLength-r.oldLength,this._currDeltaOffset+=u.newLength-u.oldLength}const n=p._merge(this._result);return p._removeNoOps(n)}_acceptCurr(v){this._result[this._resultLen++]=p._rebaseCurr(this._prevDeltaOffset,v),this._currDeltaOffset+=v.newLength-v.oldLength}_getCurr(v){return v<this._currLen?this._currEdits[v]:null}_acceptPrev(v){this._result[this._resultLen++]=p._rebasePrev(this._currDeltaOffset,v),this._prevDeltaOffset+=v.newLength-v.oldLength}_getPrev(v){return v<this._prevLen?this._prevEdits[v]:null}static _rebaseCurr(v,b){return new E(b.oldPosition-v,b.oldText,b.newPosition,b.newText)}static _rebasePrev(v,b){return new E(b.oldPosition,b.oldText,b.newPosition+v,b.newText)}static _splitPrev(v,b){const a=v.newText.substr(0,b),i=v.newText.substr(b);return[new E(v.oldPosition,v.oldText,v.newPosition,a),new E(v.oldEnd,"",v.newPosition+b,i)]}static _splitCurr(v,b){const a=v.oldText.substr(0,b),i=v.oldText.substr(b);return[new E(v.oldPosition,a,v.newPosition,v.newText),new E(v.oldPosition+b,i,v.newEnd,"")]}static _merge(v){if(v.length===0)return v;const b=[];let a=0,i=v[0];for(let n=1;n<v.length;n++){const t=v[n];i.oldEnd===t.oldPosition?i=new E(i.oldPosition,i.oldText+t.oldText,i.newPosition,i.newText+t.newText):(b[a++]=i,i=t)}return b[a++]=i,b}static _removeNoOps(v){if(v.length===0)return v;const b=[];let a=0;for(let i=0;i<v.length;i++){const n=v[i];n.oldText!==n.newText&&(b[a++]=n)}return b}}}),define(se[330],oe([1,0,315,95]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function y(E,S,p,_,v,b){if(Array.isArray(E)){let a=0;for(const i of E){const n=y(i,S,p,_,v,b);if(n===10)return n;n>a&&(a=n)}return a}else{if(typeof E=="string")return _?E==="*"?5:E===p?10:0:0;if(E){const{language:a,pattern:i,scheme:n,hasAccessToAllModels:t,notebookType:r}=E;if(!_&&!t)return 0;r&&v&&(S=v);let u=0;if(n)if(n===S.scheme)u=10;else if(n==="*")u=5;else return 0;if(a)if(a===p)u=10;else if(a==="*")u=Math.max(u,5);else return 0;if(r)if(r===b)u=10;else if(r==="*"&&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===S.fsPath||(0,L.match)(f,S.fsPath))u=10;else return 0}return u}else return 0}}e.score=y}),define(se[611],oe([1,0,6,2,41,330]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function S(b){return typeof b=="string"?!1:Array.isArray(b)?b.every(S):!!b.exclusive}class p{constructor(a,i,n,t){this.uri=a,this.languageId=i,this.notebookUri=n,this.notebookType=t}equals(a){var i,n;return this.notebookType===a.notebookType&&this.languageId===a.languageId&&this.uri.toString()===a.uri.toString()&&((i=this.notebookUri)===null||i===void 0?void 0:i.toString())===((n=a.notebookUri)===null||n===void 0?void 0:n.toString())}}class _{constructor(a){this._notebookInfoResolver=a,this._clock=0,this._entries=[],this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event}register(a,i){let n={selector:a,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(a){return this.all(a).length>0}all(a){if(!a)return[];this._updateScores(a);const i=[];for(const n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(a){const i=[];return this._orderedForEach(a,n=>i.push(n.provider)),i}orderedGroups(a){const i=[];let n,t;return this._orderedForEach(a,r=>{n&&t===r._score?n.push(r.provider):(t=r._score,n=[r.provider],i.push(n))}),i}_orderedForEach(a,i){this._updateScores(a);for(const n of this._entries)n._score>0&&i(n)}_updateScores(a){var i,n;const t=(i=this._notebookInfoResolver)===null||i===void 0?void 0:i.call(this,a.uri),r=t?new p(a.uri,a.getLanguageId(),t.uri,t.type):new p(a.uri,a.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(const u of this._entries)if(u._score=(0,E.score)(u.selector,r.uri,r.languageId,(0,y.shouldSynchronizeModel)(a),r.notebookUri,r.notebookType),S(u.selector)&&u._score>0){for(const f of this._entries)f._score=0;u._score=1e3;break}this._entries.sort(_._compareByScoreAndTime)}}static _compareByScoreAndTime(a,i){return a._score<i._score?1:a._score>i._score?-1:v(a.selector)&&!v(i.selector)?1:!v(a.selector)&&v(i.selector)?-1:a._time<i._time?1:a._time>i._time?-1:0}}e.LanguageFeatureRegistry=_;function v(b){return typeof b=="string"?!1:Array.isArray(b)?b.some(v):!!b.isBuiltin}}),define(se[234],oe([1,0,11,102,5]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class E{constructor(s,l,o,g,h,m){this._richEditBracketBrand=void 0,this.languageId=s,this.index=l,this.open=o,this.close=g,this.forwardRegex=h,this.reversedRegex=m,this._openSet=E._toSet(this.open),this._closeSet=E._toSet(this.close)}isOpen(s){return this._openSet.has(s)}isClose(s){return this._closeSet.has(s)}static _toSet(s){const l=new Set;for(const o of s)l.add(o);return l}}e.RichEditBracket=E;function S(d){const s=d.length;d=d.map(m=>[m[0].toLowerCase(),m[1].toLowerCase()]);const l=[];for(let m=0;m<s;m++)l[m]=m;const o=(m,C)=>{const[w,D]=m,[I,T]=C;return w===I||w===T||D===I||D===T},g=(m,C)=>{const w=Math.min(m,C),D=Math.max(m,C);for(let I=0;I<s;I++)l[I]===D&&(l[I]=w)};for(let m=0;m<s;m++){const C=d[m];for(let w=m+1;w<s;w++){const D=d[w];o(C,D)&&g(l[m],l[w])}}const h=[];for(let m=0;m<s;m++){const C=[],w=[];for(let D=0;D<s;D++)if(l[D]===m){const[I,T]=d[D];C.push(I),w.push(T)}C.length>0&&h.push({open:C,close:w})}return h}class p{constructor(s,l){this._richEditBracketsBrand=void 0;const o=S(l);this.brackets=o.map((g,h)=>new E(s,h,g.open,g.close,a(g.open,g.close,o,h),i(g.open,g.close,o,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 _(d,s,l,o){for(let g=0,h=s.length;g<h;g++){if(g===l)continue;const m=s[g];for(const C of m.open)C.indexOf(d)>=0&&o.push(C);for(const C of m.close)C.indexOf(d)>=0&&o.push(C)}}function v(d,s){return d.length-s.length}function b(d){if(d.length<=1)return d;const s=[],l=new Set;for(const o of d)l.has(o)||(s.push(o),l.add(o));return s}function a(d,s,l,o){let g=[];g=g.concat(d),g=g.concat(s);for(let h=0,m=g.length;h<m;h++)_(g[h],l,o,g);return g=b(g),g.sort(v),g.reverse(),u(g)}function i(d,s,l,o){let g=[];g=g.concat(d),g=g.concat(s);for(let h=0,m=g.length;h<m;h++)_(g[h],l,o,g);return g=b(g),g.sort(v),g.reverse(),u(g.map(f))}function n(d){let s=[];for(const l of d){for(const o of l.open)s.push(o);for(const o of l.close)s.push(o)}return s=b(s),u(s)}function t(d){let s=[];for(const l of d){for(const o of l.open)s.push(o);for(const o of l.close)s.push(o)}return s=b(s),u(s.map(f))}function r(d){const s=/^[\w ]+$/.test(d);return d=L.escapeRegExpCharacters(d),s?`\\b${d}\\b`:d}function u(d){const s=`(${d.map(r).join(")|(")})`;return L.createRegExp(s,!0)}const f=function(){function d(o){const g=new Uint16Array(o.length);let h=0;for(let m=o.length-1;m>=0;m--)g[h++]=o.charCodeAt(m);return k.getPlatformTextDecoder().decode(g)}let s=null,l=null;return function(g){return s!==g&&(s=g,l=d(s)),l}}();class c{static _findPrevBracketInText(s,l,o,g){const h=o.match(s);if(!h)return null;const m=o.length-(h.index||0),C=h[0].length,w=g+m;return new y.Range(l,w-C+1,l,w+1)}static findPrevBracketInRange(s,l,o,g,h){const C=f(o).substring(o.length-h,o.length-g);return this._findPrevBracketInText(s,l,C,g)}static findNextBracketInText(s,l,o,g){const h=o.match(s);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(s,l,o,g,h){const m=o.substring(g,h);return this.findNextBracketInText(s,l,m,g)}}e.BracketsUtils=c}),define(se[612],oe([1,0,13,133,234]),function(te,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 _ of this._richEditBrackets.brackets)for(const v of _.close){const b=v.charAt(v.length-1);p.push(b)}return(0,L.distinct)(p)}onElectricCharacter(p,_,v){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const b=_.findTokenIndexAtOffset(v-1);if((0,k.ignoreBracketsInToken)(_.getStandardTokenType(b)))return null;const a=this._richEditBrackets.reversedRegex,i=_.getLineContent().substring(0,v-1)+p,n=y.BracketsUtils.findPrevBracketInRange(a,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=_.getActualLineContentBefore(n.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:t}:null}}e.BracketElectricCharacterSupport=E}),define(se[613],oe([1,0,13,6,2,5,133,234,529]),function(te,e,L,k,y,E,S,p,_){"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(r,u){super(),this.textModel=r,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(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(r){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleContentChanged(r)}handleDidChangeBackgroundTokenizationState(){var r;(r=this.bracketPairsTree.value)===null||r===void 0||r.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(r){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleDidChangeTokens(r)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const r=new y.DisposableStore;this.bracketPairsTree.value=b(r.add(new _.BracketPairsTree(this.textModel,u=>this.languageConfigurationService.getLanguageConfiguration(u))),r),r.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(r){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(r,!1))||L.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(r){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(r,!0))||L.CallbackIterable.empty}getBracketsInRange(r,u=!1){var f;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((f=this.bracketPairsTree.value)===null||f===void 0?void 0:f.object.getBracketsInRange(r,u))||L.CallbackIterable.empty}findMatchingBracketUp(r,u,f){const c=this.textModel.validatePosition(u),d=this.textModel.getLanguageIdAtPosition(c.lineNumber,c.column);if(this.canBuildAST){const s=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew.getClosingBracketInfo(r);if(!s)return null;const l=this.getBracketPairsInRange(E.Range.fromPositions(u,u)).findLast(o=>s.closes(o.openingBracketInfo));return l?l.openingBracketRange:null}else{const s=r.toLowerCase(),l=this.languageConfigurationService.getLanguageConfiguration(d).brackets;if(!l)return null;const o=l.textIsBracket[s];return o?n(this._findMatchingBracketUp(o,c,a(f))):null}}matchBracket(r,u){if(this.canBuildAST){const f=this.getBracketPairsInRange(E.Range.fromPositions(r,r)).filter(c=>c.closingBracketRange!==void 0&&(c.openingBracketRange.containsPosition(r)||c.closingBracketRange.containsPosition(r))).findLastMaxBy((0,L.compareBy)(c=>c.openingBracketRange.containsPosition(r)?c.openingBracketRange:c.closingBracketRange,E.Range.compareRangesUsingStarts));return f?[f.openingBracketRange,f.closingBracketRange]:null}else{const f=a(u);return this._matchBracket(this.textModel.validatePosition(r),f)}}_establishBracketSearchOffsets(r,u,f,c){const d=u.getCount(),s=u.getLanguageId(c);let l=Math.max(0,r.column-1-f.maxBracketLength);for(let g=c-1;g>=0;g--){const h=u.getEndOffset(g);if(h<=l)break;if((0,S.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==s){l=h;break}}let o=Math.min(u.getLineContent().length,r.column-1+f.maxBracketLength);for(let g=c+1;g<d;g++){const h=u.getStartOffset(g);if(h>=o)break;if((0,S.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==s){o=h;break}}return{searchStartOffset:l,searchEndOffset:o}}_matchBracket(r,u){const f=r.lineNumber,c=this.textModel.tokenization.getLineTokens(f),d=this.textModel.getLineContent(f),s=c.findTokenIndexAtOffset(r.column-1);if(s<0)return null;const l=this.languageConfigurationService.getLanguageConfiguration(c.getLanguageId(s)).brackets;if(l&&!(0,S.ignoreBracketsInToken)(c.getStandardTokenType(s))){let{searchStartOffset:o,searchEndOffset:g}=this._establishBracketSearchOffsets(r,c,l,s),h=null;for(;;){const m=p.BracketsUtils.findNextBracketInRange(l.forwardRegex,f,d,o,g);if(!m)break;if(m.startColumn<=r.column&&r.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}}o=m.endColumn-1}if(h)return h}if(s>0&&c.getStartOffset(s)===r.column-1){const o=s-1,g=this.languageConfigurationService.getLanguageConfiguration(c.getLanguageId(o)).brackets;if(g&&!(0,S.ignoreBracketsInToken)(c.getStandardTokenType(o))){const{searchStartOffset:h,searchEndOffset:m}=this._establishBracketSearchOffsets(r,c,g,o),C=p.BracketsUtils.findPrevBracketInRange(g.reversedRegex,f,d,h,m);if(C&&C.startColumn<=r.column&&r.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(r,u,f,c){if(!u)return null;const d=f?this._findMatchingBracketDown(u,r.getEndPosition(),c):this._findMatchingBracketUp(u,r.getStartPosition(),c);return d?d instanceof i?d:[r,d]:null}_findMatchingBracketUp(r,u,f){const c=r.languageId,d=r.reversedRegex;let s=-1,l=0;const o=(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(r.isOpen(D)?s++:r.isClose(D)&&s--,s===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 T=!0;for(;w>=0;w--){const A=h.getLanguageId(w)===c&&!(0,S.ignoreBracketsInToken)(h.getStandardTokenType(w));if(A)T?D=h.getStartOffset(w):(D=h.getStartOffset(w),I=h.getEndOffset(w));else if(T&&D!==I){const P=o(g,C,D,I);if(P)return P}T=A}if(T&&D!==I){const A=o(g,C,D,I);if(A)return A}}return null}_findMatchingBracketDown(r,u,f){const c=r.languageId,d=r.forwardRegex;let s=1,l=0;const o=(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(r.isOpen(I)?s++:r.isClose(I)&&s--,s===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,T=0;h===u.lineNumber&&(D=m.findTokenIndexAtOffset(u.column-1),I=u.column-1,T=u.column-1);let A=!0;for(;D<C;D++){const P=m.getLanguageId(D)===c&&!(0,S.ignoreBracketsInToken)(m.getStandardTokenType(D));if(P)A||(I=m.getStartOffset(D)),T=m.getEndOffset(D);else if(A&&I!==T){const N=o(h,w,I,T);if(N)return N}A=P}if(A&&I!==T){const P=o(h,w,I,T);if(P)return P}}return null}findPrevBracket(r){var u;const f=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getFirstBracketBefore(f))||null;let c=null,d=null,s=null;for(let l=f.lineNumber;l>=1;l--){const o=this.textModel.tokenization.getLineTokens(l),g=o.getCount(),h=this.textModel.getLineContent(l);let m=g-1,C=h.length,w=h.length;if(l===f.lineNumber){m=o.findTokenIndexAtOffset(f.column-1),C=f.column-1,w=f.column-1;const I=o.getLanguageId(m);c!==I&&(c=I,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,s=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew)}let D=!0;for(;m>=0;m--){const I=o.getLanguageId(m);if(c!==I){if(d&&s&&D&&C!==w){const A=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(A)return this._toFoundBracket(s,A);D=!1}c=I,d=this.languageConfigurationService.getLanguageConfiguration(c).brackets,s=this.languageConfigurationService.getLanguageConfiguration(c).bracketsNew}const T=!!d&&!(0,S.ignoreBracketsInToken)(o.getStandardTokenType(m));if(T)D?C=o.getStartOffset(m):(C=o.getStartOffset(m),w=o.getEndOffset(m));else if(s&&d&&D&&C!==w){const A=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(A)return this._toFoundBracket(s,A)}D=T}if(s&&d&&D&&C!==w){const I=p.BracketsUtils.findPrevBracketInRange(d.reversedRegex,l,h,C,w);if(I)return this._toFoundBracket(s,I)}}return null}findNextBracket(r){var u;const f=this.textModel.validatePosition(r);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,s=null,l=null;for(let o=f.lineNumber;o<=c;o++){const g=this.textModel.tokenization.getLineTokens(o),h=g.getCount(),m=this.textModel.getLineContent(o);let C=0,w=0,D=0;if(o===f.lineNumber){C=g.findTokenIndexAtOffset(f.column-1),w=f.column-1,D=f.column-1;const T=g.getLanguageId(C);d!==T&&(d=T,s=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew)}let I=!0;for(;C<h;C++){const T=g.getLanguageId(C);if(d!==T){if(l&&s&&I&&w!==D){const P=p.BracketsUtils.findNextBracketInRange(s.forwardRegex,o,m,w,D);if(P)return this._toFoundBracket(l,P);I=!1}d=T,s=this.languageConfigurationService.getLanguageConfiguration(d).brackets,l=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew}const A=!!s&&!(0,S.ignoreBracketsInToken)(g.getStandardTokenType(C));if(A)I||(w=g.getStartOffset(C)),D=g.getEndOffset(C);else if(l&&s&&I&&w!==D){const P=p.BracketsUtils.findNextBracketInRange(s.forwardRegex,o,m,w,D);if(P)return this._toFoundBracket(l,P)}I=A}if(l&&s&&I&&w!==D){const T=p.BracketsUtils.findNextBracketInRange(s.forwardRegex,o,m,w,D);if(T)return this._toFoundBracket(l,T)}}return null}findEnclosingBrackets(r,u){const f=this.textModel.validatePosition(r);if(this.canBuildAST){const w=E.Range.fromPositions(f),D=this.getBracketPairsInRange(E.Range.fromPositions(f,f)).findLast(I=>I.closingBracketRange!==void 0&&I.range.strictContainsRange(w));return D?[D.openingBracketRange,D.closingBracketRange]:null}const c=a(u),d=this.textModel.getLineCount(),s=new Map;let l=[];const o=(w,D)=>{if(!s.has(w)){const I=[];for(let T=0,A=D?D.brackets.length:0;T<A;T++)I[T]=0;s.set(w,I)}l=s.get(w)};let g=0;const h=(w,D,I,T,A)=>{for(;;){if(c&&++g%100===0&&!c())return i.INSTANCE;const P=p.BracketsUtils.findNextBracketInRange(w.forwardRegex,D,I,T,A);if(!P)break;const N=I.substring(P.startColumn-1,P.endColumn-1).toLowerCase(),M=w.textIsBracket[N];if(M&&(M.isOpen(N)?l[M.index]++:M.isClose(N)&&l[M.index]--,l[M.index]===-1))return this._matchFoundBracket(P,M,!1,c);T=P.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(),T=this.textModel.getLineContent(w);let A=0,P=0,N=0;if(w===f.lineNumber){A=D.findTokenIndexAtOffset(f.column-1),P=f.column-1,N=f.column-1;const R=D.getLanguageId(A);m!==R&&(m=R,C=this.languageConfigurationService.getLanguageConfiguration(m).brackets,o(m,C))}let M=!0;for(;A<I;A++){const R=D.getLanguageId(A);if(m!==R){if(C&&M&&P!==N){const O=h(C,w,T,P,N);if(O)return n(O);M=!1}m=R,C=this.languageConfigurationService.getLanguageConfiguration(m).brackets,o(m,C)}const x=!!C&&!(0,S.ignoreBracketsInToken)(D.getStandardTokenType(A));if(x)M||(P=D.getStartOffset(A)),N=D.getEndOffset(A);else if(C&&M&&P!==N){const O=h(C,w,T,P,N);if(O)return n(O)}M=x}if(C&&M&&P!==N){const R=h(C,w,T,P,N);if(R)return n(R)}}return null}_toFoundBracket(r,u){if(!u)return null;let f=this.textModel.getValueInRange(u);f=f.toLowerCase();const c=r.getBracketInfo(f);return c?{range:u,bracketInfo:c}:null}}e.BracketPairsTextModelPart=v;function b(t,r){return{object:t,dispose:()=>r?.dispose()}}function a(t){if(typeof t>"u")return()=>!0;{const r=Date.now();return()=>Date.now()-r<=t}}class i{constructor(){this._searchCanceledBrand=void 0}}i.INSTANCE=new i;function n(t){return t instanceof i?null:t}}),define(se[331],oe([1,0,6,11,5,41,293,129,329,2]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class b extends v.Disposable{constructor(i,n,t,r,u,f,c){super(),this._onDidChangeContent=this._register(new L.Emitter),this._BOM=n,this._mightContainNonBasicASCII=!f,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=u,this._pieceTree=new S.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,r=this.getPositionAt(i),u=this.getPositionAt(t);return new y.Range(r.lineNumber,r.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),r=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,s=i.endLineNumber-i.startLineNumber;u=d*s}return r-t+u}getCharacterCountInRange(i,n=0){if(this._mightContainNonBasicASCII){let t=0;const r=i.startLineNumber,u=i.endLineNumber;for(let f=r;f<=u;f++){const c=this.getLineContent(f),d=f===r?i.startColumn-1:0,s=f===u?i.endColumn-1:c.length;for(let l=d;l<s;l++)k.isHighSurrogate(c.charCodeAt(l))?(t=t+1,l=l+1):t=t+1}return t+=this._getEndOfLine(n).length*(u-r),t}return this.getValueLengthInRange(i,n)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(i){return this._pieceTree.getLineContent(i)}getLineCharCode(i,n){return this._pieceTree.getLineCharCode(i,n)}getLineLength(i){return this._pieceTree.getLineLength(i)}getLineFirstNonWhitespaceColumn(i){const n=k.firstNonWhitespaceIndex(this.getLineContent(i));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(i){const n=k.lastNonWhitespaceIndex(this.getLineContent(i));return n===-1?0:n+2}_getEndOfLine(i){switch(i){case 1:return`
|
||
`;case 2:return`\r
|
||
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(i){this._pieceTree.setEOL(i)}applyEdits(i,n,t){let r=this._mightContainRTL,u=this._mightContainUnusualLineTerminators,f=this._mightContainNonBasicASCII,c=!0,d=[];for(let C=0;C<i.length;C++){const w=i[C];c&&w._isTracked&&(c=!1);const D=w.range;if(w.text){let N=!0;f||(N=!k.isBasicASCII(w.text),f=N),!r&&N&&(r=k.containsRTL(w.text)),!u&&N&&(u=k.containsUnusualLineTerminators(w.text))}let I="",T=0,A=0,P=0;if(w.text){let N;[T,A,P,N]=(0,p.countEOL)(w.text);const M=this.getEOL();N===0||N===(M===`\r
|
||
`?2:1)?I=w.text:I=w.text.replace(/\r\n|\r|\n/g,M)}d[C]={sortIndex:C,identifier:w.identifier||null,range:D,rangeOffset:this.getOffsetAt(D.startLineNumber,D.startColumn),rangeLength:this.getValueLengthInRange(D),text:I,eolCount:T,firstLineLength:A,lastLineLength:P,forceMoveMarkers:!!w.forceMoveMarkers,isAutoWhitespaceEdit:w.isAutoWhitespaceEdit||!1}}d.sort(b._sortOpsAscending);let s=!1;for(let C=0,w=d.length-1;C<w;C++){const D=d[C].range.getEndPosition(),I=d[C+1].range.getStartPosition();if(I.isBeforeOrEqual(D)){if(I.isBefore(D))throw new Error("Overlapping ranges are not allowed!");s=!0}}c&&(d=this._reduceOperations(d));const l=t||n?b._getInverseEditRanges(d):[],o=[];if(n)for(let C=0;C<d.length;C++){const w=d[C],D=l[C];if(w.isAutoWhitespaceEdit&&w.range.isEmpty())for(let I=D.startLineNumber;I<=D.endLineNumber;I++){let T="";I===D.startLineNumber&&(T=this.getLineContent(w.range.startLineNumber),k.firstNonWhitespaceIndex(T)!==-1)||o.push({lineNumber:I,oldContent:T})}}let g=null;if(t){let C=0;g=[];for(let w=0;w<d.length;w++){const D=d[w],I=l[w],T=this.getValueInRange(D.range),A=D.rangeOffset+C;C+=D.text.length-T.length,g[w]={sortIndex:D.sortIndex,identifier:D.identifier,range:I,text:T,textChange:new _.TextChange(D.rangeOffset,T,A,D.text)}}s||g.sort((w,D)=>w.sortIndex-D.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=u,this._mightContainNonBasicASCII=f;const h=this._doApplyEdits(d);let m=null;if(n&&o.length>0){o.sort((C,w)=>w.lineNumber-C.lineNumber),m=[];for(let C=0,w=o.length;C<w;C++){const D=o[C].lineNumber;if(C>0&&o[C-1].lineNumber===D)continue;const I=o[C].oldContent,T=this.getLineContent(D);T.length===0||T===I||k.firstNonWhitespaceIndex(T)!==-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,r=i[i.length-1].range,u=new y.Range(t.startLineNumber,t.startColumn,r.endLineNumber,r.endColumn);let f=t.startLineNumber,c=t.startColumn;const d=[];for(let h=0,m=i.length;h<m;h++){const C=i[h],w=C.range;n=n||C.forceMoveMarkers,d.push(this.getValueInRange(new y.Range(f,c,w.startLineNumber,w.startColumn))),C.text.length>0&&d.push(C.text),f=w.endLineNumber,c=w.endColumn}const s=d.join(""),[l,o,g]=(0,p.countEOL)(s);return{sortIndex:0,identifier:i[0].identifier,range:u,rangeOffset:this.getOffsetAt(u.startLineNumber,u.startColumn),rangeLength:this.getValueLengthInRange(u,0),text:s,eolCount:l,firstLineLength:o,lastLineLength:g,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(i){i.sort(b._sortOpsDescending);const n=[];for(let t=0;t<i.length;t++){const r=i[t],u=r.range.startLineNumber,f=r.range.startColumn,c=r.range.endLineNumber,d=r.range.endColumn;if(u===c&&f===d&&r.text.length===0)continue;r.text?(this._pieceTree.delete(r.rangeOffset,r.rangeLength),this._pieceTree.insert(r.rangeOffset,r.text,!0)):this._pieceTree.delete(r.rangeOffset,r.rangeLength);const s=new y.Range(u,f,c,d);n.push({range:s,rangeLength:r.rangeLength,text:r.text,rangeOffset:r.rangeOffset,forceMoveMarkers:r.forceMoveMarkers})}return n}findMatchesLineByLine(i,n,t,r){return this._pieceTree.findMatchesLineByLine(i,n,t,r)}static _getInverseEditRanges(i){const n=[];let t=0,r=0,u=null;for(let f=0,c=i.length;f<c;f++){const d=i[f];let s,l;u?u.range.endLineNumber===d.range.startLineNumber?(s=t,l=r+(d.range.startColumn-u.range.endColumn)):(s=t+(d.range.startLineNumber-u.range.endLineNumber),l=d.range.startColumn):(s=d.range.startLineNumber,l=d.range.startColumn);let o;if(d.text.length>0){const g=d.eolCount+1;g===1?o=new y.Range(s,l,s,l+d.firstLineLength):o=new y.Range(s,l,s+g-1,d.lastLineLength+1)}else o=new y.Range(s,l,s,l);t=o.endLineNumber,r=o.endColumn,n.push(o),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(se[614],oe([1,0,11,293,331]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class E{constructor(_,v,b,a,i,n,t,r,u){this._chunks=_,this._bom=v,this._cr=b,this._lf=a,this._crlf=i,this._containsRTL=n,this._containsUnusualLineTerminators=t,this._isBasicASCII=r,this._normalizeEOL=u}_getEOL(_){const v=this._cr+this._lf+this._crlf,b=this._cr+this._crlf;return v===0?_===1?`
|
||
`:`\r
|
||
`:b>v/2?`\r
|
||
`:`
|
||
`}create(_){const v=this._getEOL(_),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<n;i++){const t=b[i].buffer.replace(/\r\n|\r|\n/g,v),r=(0,k.createLineStartsFast)(t);b[i]=new k.StringBuffer(t,r)}const a=new y.PieceTreeTextBuffer(b,this._bom,v,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:a,disposable:a}}}class S{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(_){if(_.length===0)return;this.chunks.length===0&&L.startsWithUTF8BOM(_)&&(this.BOM=L.UTF8_BOM_CHARACTER,_=_.substr(1));const v=_.charCodeAt(_.length-1);v===13||v>=55296&&v<=56319?(this._acceptChunk1(_.substr(0,_.length-1),!1),this._hasPreviousChar=!0,this._previousChar=v):(this._acceptChunk1(_,!1),this._hasPreviousChar=!1,this._previousChar=v)}_acceptChunk1(_,v){!v&&_.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+_):this._acceptChunk2(_))}_acceptChunk2(_){const v=(0,k.createLineStarts)(this._tmpLineStarts,_);this.chunks.push(new k.StringBuffer(_,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(_)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=L.containsUnusualLineTerminators(_)))}finish(_=!0){return this._finish(),new E(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,_)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const _=this.chunks[this.chunks.length-1];_.buffer+=String.fromCharCode(this._previousChar);const v=(0,k.createLineStartsFast)(_.buffer);_.lineStarts=v,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=S}),define(se[615],oe([1,0,144,17]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function y(_){for(let v=0,b=_.length;v<b;v+=4){const a=_[v+0],i=_[v+1],n=_[v+2],t=_[v+3];_[v+0]=t,_[v+1]=n,_[v+2]=i,_[v+3]=a}}function E(_){const v=new Uint8Array(_.buffer,_.byteOffset,_.length*4);return k.isLittleEndian()||y(v),L.VSBuffer.wrap(v)}function S(_){const v=new Uint32Array(p(_));let b=0;if(v[b++]=_.id,_.type==="full")v[b++]=1,v[b++]=_.data.length,v.set(_.data,b),b+=_.data.length;else{v[b++]=2,v[b++]=_.deltas.length;for(const a of _.deltas)v[b++]=a.start,v[b++]=a.deleteCount,a.data?(v[b++]=a.data.length,v.set(a.data,b),b+=a.data.length):v[b++]=0}return E(v)}e.encodeSemanticTokensDto=S;function p(_){let v=0;if(v+=1+1,_.type==="full")v+=1+_.data.length;else{v+=1,v+=(1+1+1)*_.deltas.length;for(const b of _.deltas)b.data&&(v+=b.data.length)}return v}}),define(se[188],oe([1,0,6,2,17]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function E(a,i){return!!a[i]}class S{constructor(i,n){this.target=i.target,this.isLeftClick=i.event.leftButton,this.isMiddleClick=i.event.middleButton,this.isRightClick=i.event.rightButton,this.hasTriggerModifier=E(i.event,n.triggerModifier),this.hasSideBySideModifier=E(i.event,n.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.event.detail<=1}}e.ClickLinkMouseEvent=S;class p{constructor(i,n){this.keyCodeIsTriggerKey=i.keyCode===n.triggerKey,this.keyCodeIsSideBySideKey=i.keyCode===n.triggerSideBySideKey,this.hasTriggerModifier=E(i,n.triggerModifier)}}e.ClickLinkKeyboardEvent=p;class _{constructor(i,n,t,r){this.triggerKey=i,this.triggerModifier=n,this.triggerSideBySideKey=t,this.triggerSideBySideModifier=r}equals(i){return this.triggerKey===i.triggerKey&&this.triggerModifier===i.triggerModifier&&this.triggerSideBySideKey===i.triggerSideBySideKey&&this.triggerSideBySideModifier===i.triggerSideBySideModifier}}e.ClickLinkOptions=_;function v(a){return a==="altKey"?y.isMacintosh?new _(57,"metaKey",6,"altKey"):new _(5,"ctrlKey",6,"altKey"):y.isMacintosh?new _(6,"altKey",57,"metaKey"):new _(6,"altKey",5,"ctrlKey")}class b extends k.Disposable{constructor(i,n){var t;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new L.Emitter),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new L.Emitter),this.onExecute=this._onExecute.event,this._onCancel=this._register(new L.Emitter),this.onCancel=this._onCancel.event,this._editor=i,this._extractLineNumberFromMouseEvent=(t=n?.extractLineNumberFromMouseEvent)!==null&&t!==void 0?t:r=>r.target.position?r.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(r=>{if(r.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(r=>this._onEditorMouseMove(new S(r,this._opts)))),this._register(this._editor.onMouseDown(r=>this._onEditorMouseDown(new S(r,this._opts)))),this._register(this._editor.onMouseUp(r=>this._onEditorMouseUp(new S(r,this._opts)))),this._register(this._editor.onKeyDown(r=>this._onEditorKeyDown(new p(r,this._opts)))),this._register(this._editor.onKeyUp(r=>this._onEditorKeyUp(new p(r,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(r=>this._onDidChangeCursorSelection(r))),this._register(this._editor.onDidChangeModel(r=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(r=>{(r.scrollTopChanged||r.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(se[332],oe([1,0,14,12,6,2]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class S{constructor(v,b,a){this.value=v,this.isComplete=b,this.hasLoadingMessage=a}}e.HoverResult=S;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 S(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(se[616],oe([1,0,225,2,10,7]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableContentWidget=void 0;const S=30,p=24;class _ extends k.Disposable{constructor(b,a=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(a),this._resizableNode.layout(a.height,a.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 a=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(b);return!a||!i?void 0:E.getDomNodePagePosition(a).top+i.top-S}_availableVerticalSpaceBelow(b){const a=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(b);if(!a||!i)return;const n=E.getDomNodePagePosition(a),t=E.getClientArea(a.ownerDocument.body),r=n.top+i.top+i.height;return t.height-r-p}_findPositionPreference(b,a){var i,n;const t=Math.min((i=this._availableVerticalSpaceBelow(a))!==null&&i!==void 0?i:1/0,b),r=Math.min((n=this._availableVerticalSpaceAbove(a))!==null&&n!==void 0?n:1/0,b),u=Math.min(Math.max(r,t),b),f=Math.min(b,u);let c;return this._editor.getOption(60).above?c=f<=r?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=_}),define(se[333],oe([1,0,12,2,10,5,47,22]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class _{constructor(n,t){this.range=n,this.direction=t}}e.InlayHintAnchor=_;class v{constructor(n,t,r){this.hint=n,this.anchor=t,this.provider=r,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,r,u;try{const f=await Promise.resolve(this.provider.resolveInlayHint(this.hint,n));this.hint.tooltip=(t=f?.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(r=f?.label)!==null&&r!==void 0?r:this.hint.label,this.hint.textEdits=(u=f?.textEdits)!==null&&u!==void 0?u:this.hint.textEdits,this._isResolved=!0}catch(f){(0,L.onUnexpectedExternalError)(f),this._isResolved=!1}}}e.InlayHintItem=v;class b{static async create(n,t,r,u){const f=[],c=n.ordered(t).reverse().map(d=>r.map(async s=>{try{const l=await d.provideInlayHints(t,s,u);(l?.hints.length||d.onDidChangeInlayHints)&&f.push([l??b._emptyInlayHintList,d])}catch(l){(0,L.onUnexpectedExternalError)(l)}}));if(await Promise.all(c.flat()),u.isCancellationRequested||t.isDisposed())throw new L.CancellationError;return new b(r,f,t)}constructor(n,t,r){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 s=r.validatePosition(d.position);let l="before";const o=b._getRangeAtPosition(r,s);let g;o.getStartPosition().isBefore(s)?(g=E.Range.fromPositions(o.getStartPosition(),s),l="after"):(g=E.Range.fromPositions(s,o.getEndPosition()),l="before"),u.push(new v(d,new _(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 r=t.lineNumber,u=n.getWordAtPosition(t);if(u)return new E.Range(r,u.startColumn,r,u.endColumn);n.tokenization.tokenizeIfCheap(r);const f=n.tokenization.getLineTokens(r),c=t.column-1,d=f.findTokenIndexAtOffset(c);let s=f.getStartOffset(d),l=f.getEndOffset(d);return l-s===1&&(s===c&&d>1?(s=f.getStartOffset(d-1),l=f.getEndOffset(d-1)):l===c&&d<f.getCount()-1&&(s=f.getStartOffset(d+1),l=f.getEndOffset(d+1))),new E.Range(r,s+1,r,l+1)}}e.InlayHintsFragments=b,b._emptyInlayHintList=Object.freeze({dispose(){},hints:[]});function a(i){return p.URI.from({scheme:S.Schemas.command,path:i.id,query:i.arguments&&encodeURIComponent(JSON.stringify(i.arguments))}).toString()}e.asCommandLink=a}),define(se[617],oe([1,0,90,14,19,53,12,5,522,156,117]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionItem=e.InlineCompletionList=e.InlineCompletionProviderResult=e.provideInlineCompletions=void 0;async function a(f,c,d,s,l=y.CancellationToken.None,o){const g=r(c,d),h=f.all(d),m=new E.SetMap;for(const M of h)M.groupId&&m.add(M.groupId,M);function C(M){if(!M.yieldsToGroupIds)return[];const R=[];for(const x of M.yieldsToGroupIds||[]){const O=m.get(x);for(const B of O)R.push(B)}return R}const w=new Map,D=new Set;function I(M,R){if(R=[...R,M],D.has(M))return R;D.add(M);try{const x=C(M);for(const O of x){const B=I(O,R);if(B)return B}}finally{D.delete(M)}}function T(M){const R=w.get(M);if(R)return R;const x=I(M,[]);x&&(0,S.onUnexpectedExternalError)(new Error(`Inline completions: cyclic yield-to dependency detected. Path: ${x.map(B=>B.toString?B.toString():""+B).join(" -> ")}`));const O=new k.DeferredPromise;return w.set(M,O.p),(async()=>{if(!x){const B=C(M);for(const W of B){const V=await T(W);if(V&&V.items.length>0)return}}try{return await M.provideInlineCompletions(d,c,s,l)}catch(B){(0,S.onUnexpectedExternalError)(B);return}})().then(B=>O.complete(B),B=>O.error(B)),O.p}const A=await Promise.all(h.map(async M=>({provider:M,completions:await T(M)}))),P=new Map,N=[];for(const M of A){const R=M.completions;if(!R)continue;const x=new n(R,M.provider);N.push(x);for(const O of R.items){const B=t.from(O,x,g,d,o);P.set(B.hash(),B)}}return new i(Array.from(P.values()),new Set(P.keys()),N)}e.provideInlineCompletions=a;class i{constructor(c,d,s){this.completions=c,this.hashs=d,this.providerResults=s}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,s,l,o){let g,h,m=c.range?p.Range.lift(c.range):s;if(typeof c.insertText=="string"){if(g=c.insertText,o&&c.completeBracketPairs){g=u(g,m.getStartPosition(),l,o);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(o&&c.completeBracketPairs){c.insertText.snippet=u(c.insertText.snippet,m.getStartPosition(),l,o);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,s,l,o,g,h,m){this.filterText=c,this.command=d,this.range=s,this.insertText=l,this.snippetInfo=o,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 r(f,c){const d=c.getWordAtPosition(f),s=c.getLineMaxColumn(f.lineNumber);return d?new p.Range(f.lineNumber,d.startColumn,f.lineNumber,s):p.Range.fromPositions(f,f.with(void 0,s))}function u(f,c,d,s){const o=d.getLineContent(c.lineNumber).substring(0,c.column-1)+f,g=d.tokenization.tokenizeLineWithEdit(c,o.length-(c.column-1),f),h=g?.sliceAndInflate(c.column-1,o.length,0);return h?(0,_.fixBracketsInLine)(h,s):f}}),define(se[618],oe([3,4]),function(te,e){return te.create("vs/editor/browser/controller/textAreaHandler",e)}),define(se[619],oe([3,4]),function(te,e){return te.create("vs/editor/browser/coreCommands",e)}),define(se[620],oe([3,4]),function(te,e){return te.create("vs/editor/browser/editorExtensions",e)}),define(se[621],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(se[622],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer",e)}),define(se[623],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/components/diffEditorEditors",e)}),define(se[624],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin",e)}),define(se[625],oe([1,0,7,42,26,2,17,28,624]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class v extends E.Disposable{get visibility(){return this._visibility}set visibility(a){this._visibility!==a&&(this._visibility=a,this._diffActions.style.visibility=a?"visible":"hidden")}constructor(a,i,n,t,r,u,f,c,d){super(),this._getViewZoneId=a,this._marginDomNode=i,this._modifiedEditor=n,this._diff=t,this._editor=r,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 s=this._modifiedEditor.getOption(66);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${s}px`,this._diffActions.style.lineHeight=`${s}px`,this._marginDomNode.appendChild(this._diffActions);let l=0;const o=n.getOption(126)&&!S.isIOS,g=(h,m)=>{var C;this._contextMenuService.showContextMenu({domForShadowRoot:o&&(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,_.localize)(0,null):(0,_.localize)(1,null):t.original.length>1?(0,_.localize)(2,null):(0,_.localize)(3,null),void 0,!0,async()=>{const T=this._originalTextModel.getValueInRange(t.original.toExclusiveRange());await this._clipboardService.writeText(T)})),t.original.length>1&&w.push(new k.Action("diff.clipboard.copyDeletedLineContent",D?(0,_.localize)(4,null,t.original.startLineNumber+l):(0,_.localize)(5,null,t.original.startLineNumber+l),void 0,!0,async()=>{let T=this._originalTextModel.getLineContent(t.original.startLineNumber+l);T===""&&(T=this._originalTextModel.getEndOfLineSequence()===0?`
|
||
`:`\r
|
||
`),await this._clipboardService.writeText(T)})),n.getOption(90)||w.push(new k.Action("diff.inline.revertChange",(0,_.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(s/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,s),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,s),g(h.event.posx,h.event.posy+s))}))}_updateLightBulbPosition(a,i,n){const{top:t}=(0,L.getDomNodePagePosition)(a),r=i-t,u=Math.floor(r/n),f=u*n;if(this._diffActions.style.top=`${f}px`,this._viewLineCounts){let c=0;for(let d=0;d<this._viewLineCounts.length;d++)if(c+=this._viewLineCounts[d],u<c)return d}return u}}e.InlineDiffDeletedCodeMargin=v}),define(se[626],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/diffEditor.contribution",e)}),define(se[627],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature",e)}),define(se[628],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature",e)}),define(se[334],oe([1,0,7,78,42,13,60,26,2,35,28,87,73,628]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedBlocksLinesFeature=void 0;class t extends _.Disposable{constructor(c,d,s,l,o){super(),this._rootElement=c,this._diffModel=d,this._originalEditorLayoutInfo=s,this._modifiedEditorLayoutInfo=l,this._editors=o,this._originalScrollTop=(0,v.observableFromEvent)(this._editors.original.onDidScrollChange,()=>this._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,T)=>{var A;this._element.replaceChildren();const P=this._diffModel.read(I),N=(A=P?.diff.read(I))===null||A===void 0?void 0:A.movedTexts;if(!N||N.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(I);const M=this._originalEditorLayoutInfo.read(I),R=this._modifiedEditorLayoutInfo.read(I);if(!M||!R){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(I),this._originalViewZonesChangedSignal.read(I);const x=N.map(q=>{function ie(me,X){const U=X.getTopForLineNumber(me.startLineNumber,!0),G=X.getTopForLineNumber(me.endLineNumberExclusive,!0);return(U+G)/2}const ae=ie(q.lineRangeMapping.original,this._editors.original),ne=this._originalScrollTop.read(I),$=ie(q.lineRangeMapping.modified,this._editors.modified),J=this._modifiedScrollTop.read(I),Q=ae-ne,re=$-J,de=Math.min(ae,$),he=Math.max(ae,$);return{range:new i.OffsetRange(de,he),from:Q,to:re,fromWithoutScroll:ae,toWithoutScroll:$,move:q}});x.sort((0,E.tieBreakComparators)((0,E.compareBy)(q=>q.fromWithoutScroll>q.toWithoutScroll,E.booleanComparator),(0,E.compareBy)(q=>q.fromWithoutScroll>q.toWithoutScroll?q.fromWithoutScroll:-q.toWithoutScroll,E.numberComparator)));const O=r.compute(x.map(q=>q.range)),B=10,W=M.verticalScrollbarWidth,V=(O.getTrackCount()-1)*10+B*2,K=W+V+(R.contentLeft-t.movedCodeBlockPadding);let F=0;for(const q of x){const ie=O.getTrack(F),ae=W+B+ie*10,ne=15,$=15,J=K,Q=R.glyphMarginWidth+R.lineNumbersWidth,re=18,de=document.createElementNS("http://www.w3.org/2000/svg","rect");de.classList.add("arrow-rectangle"),de.setAttribute("x",`${J-Q}`),de.setAttribute("y",`${q.to-re/2}`),de.setAttribute("width",`${Q}`),de.setAttribute("height",`${re}`),this._element.appendChild(de);const he=document.createElementNS("http://www.w3.org/2000/svg","g"),me=document.createElementNS("http://www.w3.org/2000/svg","path");me.setAttribute("d",`M 0 ${q.from} L ${ae} ${q.from} L ${ae} ${q.to} L ${J-$} ${q.to}`),me.setAttribute("fill","none"),he.appendChild(me);const X=document.createElementNS("http://www.w3.org/2000/svg","polygon");X.classList.add("arrow"),T.add((0,v.autorun)(U=>{me.classList.toggle("currentMove",q.move===P.activeMovedText.read(U)),X.classList.toggle("currentMove",q.move===P.activeMovedText.read(U))})),X.setAttribute("points",`${J-$},${q.to-ne/2} ${J},${q.to} ${J-$},${q.to+ne/2}`),he.appendChild(X),this._element.appendChild(he),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,_.toDisposable)(()=>this._element.remove())),this._register((0,v.autorun)(I=>{const T=this._originalEditorLayoutInfo.read(I),A=this._modifiedEditorLayoutInfo.read(I);!T||!A||(this._element.style.left=`${T.width-T.verticalScrollbarWidth}px`,this._element.style.height=`${T.height}px`,this._element.style.width=`${T.verticalScrollbarWidth+T.contentLeft-t.movedCodeBlockPadding+this.width.read(I)}px`)})),this._register((0,v.recomputeInitiallyAndOnChange)(this._state));const g=(0,v.derived)(I=>{const T=this._diffModel.read(I),A=T?.diff.read(I);return A?A.movedTexts.map(P=>({move:P,original:new a.PlaceholderViewZone((0,v.constObservable)(P.lineRangeMapping.original.startLineNumber-1),18),modified:new a.PlaceholderViewZone((0,v.constObservable)(P.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,a.applyViewZones)(this._editors.original,g.map(I=>I.map(T=>T.original)))),this._register((0,a.applyViewZones)(this._editors.modified,g.map(I=>I.map(T=>T.modified)))),this._register((0,v.autorunWithStore)((I,T)=>{const A=g.read(I);for(const P of A)T.add(new u(this._editors.original,P.original,P.move,"original",this._diffModel.get())),T.add(new u(this._editors.modified,P.modified,P.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,T)=>(I.didChange(C)&&(D="original"),I.didChange(w)&&(D="modified"),!0)},I=>{C.read(I),w.read(I);const T=this._diffModel.read(I);if(!T)return;const A=T.diff.read(I);let P;if(A&&D==="original"){const N=h.read(I);N&&(P=A.movedTexts.find(M=>M.lineRangeMapping.original.contains(N.lineNumber)))}if(A&&D==="modified"){const N=m.read(I);N&&(P=A.movedTexts.find(M=>M.lineRangeMapping.modified.contains(N.lineNumber)))}P!==T.movedTextToCompare.get()&&T.movedTextToCompare.set(void 0,void 0),T.setActiveMovedText(P)}))}}e.MovedBlocksLinesFeature=t,t.movedCodeBlockPadding=4;class r{static compute(c){const d=[],s=[];for(const l of c){let o=d.findIndex(g=>!g.intersectsStrict(l));o===-1&&(d.length>=6?o=(0,S.findMaxIdxBy)(d,(0,E.compareBy)(h=>h.intersectWithRangeLength(l),E.numberComparator)):(o=d.length,d.push(new i.OffsetRangeSet))),d[o].addRange(l),s.push(o)}return new r(d.length,s)}constructor(c,d){this._trackCount=c,this.trackPerLineIdx=d}getTrack(c){return this.trackPerLineIdx[c]}getTrackCount(){return this._trackCount}}class u extends a.ViewZoneOverlayWidget{constructor(c,d,s,l,o){const g=(0,L.h)("div.diff-hidden-lines-widget");super(c,d,g.root),this._editor=c,this._move=s,this._kind=l,this._diffModel=o,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,a.applyStyle)(this._nodes.root,{paddingRight:h.map(I=>I.verticalScrollbarWidth)}));let m;s.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()===s?void 0:this._move,void 0)});this._register((0,v.autorun)(I=>{const T=this._diffModel.movedTextToCompare.read(I)===s;D.checked=T})),C.push(D,{icon:!1,label:!0})}}}),define(se[629],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/features/revertButtonsFeature",e)}),define(se[630],oe([1,0,7,118,26,2,35,62,5,41,629]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RevertButton=e.RevertButtonsFeature=void 0;class a extends E.Disposable{constructor(t,r,u,f){super(),this._editors=t,this._diffModel=r,this._options=u,this._widget=f;const c=[],d=(0,S.derived)(this,s=>{const l=this._diffModel.read(s),o=l?.diff.read(s);if(!o)return c;const g=this._editors.modifiedSelections.read(s);if(g.every(w=>w.isEmpty()))return c;const h=new p.LineRangeSet(g.map(w=>p.LineRange.fromRangeInclusive(w))),C=o.mappings.filter(w=>w.lineRangeMapping.innerChanges&&h.intersects(w.lineRangeMapping.modified)).map(w=>({mapping:w,rangeMappings:w.lineRangeMapping.innerChanges.filter(D=>g.some(I=>_.Range.areIntersecting(D.modifiedRange,I)))}));return C.length===0||C.every(w=>w.rangeMappings.length===0)?c:C});this._register((0,S.autorunWithStore)((s,l)=>{const o=this._diffModel.read(s),g=o?.diff.read(s);if(!o||!g||this._diffModel.read(s).movedTextToCompare.read(s)||!this._options.shouldRenderRevertArrows.read(s))return;const m=[],C=d.read(s),w=new Set(C.map(D=>D.mapping));if(C.length>0){const D=this._editors.modifiedSelections.read(s),I=l.add(new i(D[D.length-1].positionLineNumber,this._widget,C.flatMap(T=>T.rangeMappings),!0));this._editors.modified.addGlyphMarginWidget(I),m.push(I)}for(const D of g.mappings)if(!w.has(D)&&!D.lineRangeMapping.modified.isEmpty&&D.lineRangeMapping.innerChanges){const I=l.add(new i(D.lineRangeMapping.modified.startLineNumber,this._widget,D.lineRangeMapping.innerChanges,!1));this._editors.modified.addGlyphMarginWidget(I),m.push(I)}l.add((0,E.toDisposable)(()=>{for(const D of m)this._editors.modified.removeGlyphMarginWidget(D)}))}))}}e.RevertButtonsFeature=a;class i extends E.Disposable{getId(){return this._id}constructor(t,r,u,f){super(),this._lineNumber=t,this._widget=r,this._diffs=u,this._selection=f,this._id=`revertButton${i.counter++}`,this._domNode=(0,L.h)("div.revertButton",{title:this._selection?(0,b.localize)(0,null):(0,b.localize)(1,null)},[(0,k.renderIcon)(y.Codicon.arrowRight)]).root,this._register((0,L.addDisposableListener)(this._domNode,L.EventType.MOUSE_DOWN,c=>{c.button!==2&&(c.stopPropagation(),c.preventDefault())})),this._register((0,L.addDisposableListener)(this._domNode,L.EventType.MOUSE_UP,c=>{c.stopPropagation(),c.preventDefault()})),this._register((0,L.addDisposableListener)(this._domNode,L.EventType.CLICK,c=>{this._widget.revertRangeMappings(this._diffs),c.stopPropagation(),c.preventDefault()}))}getDomNode(){return this._domNode}getPosition(){return{lane:v.GlyphMarginLane.Right,range:{startColumn:1,startLineNumber:this._lineNumber,endColumn:1,endLineNumber:this._lineNumber},zIndex:10001}}}e.RevertButton=i,i.counter=0}),define(se[631],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/diffEditor/registrations.contribution",e)}),define(se[632],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/hoverWidget/hoverWidget",e)}),define(se[633],oe([3,4]),function(te,e){return te.create("vs/editor/browser/widget/multiDiffEditorWidget/colors",e)}),define(se[634],oe([3,4]),function(te,e){return te.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(se[635],oe([3,4]),function(te,e){return te.create("vs/editor/common/config/editorOptions",e)}),define(se[36],oe([1,0,13,55,17,179,151,635]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.ShowLightbulbIconMode=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 _{constructor(fe){this._values=fe}hasChanged(fe){return this._values[fe]}}e.ConfigurationChangedEvent=_;class v{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=v;class b{constructor(fe,be,Ne,Pe){this.id=fe,this.name=be,this.defaultValue=Ne,this.schema=Pe}applyUpdate(fe,be){return i(fe,be)}compute(fe,be,Ne){return Ne}}class a{constructor(fe,be){this.newValue=fe,this.didChange=be}}e.ApplyUpdateResult=a;function i(Ie,fe){if(typeof Ie!="object"||typeof fe!="object"||!Ie||!fe)return new a(fe,Ie!==fe);if(Array.isArray(Ie)||Array.isArray(fe)){const Ne=Array.isArray(Ie)&&Array.isArray(fe)&&L.equals(Ie,fe);return new a(fe,!Ne)}let be=!1;for(const Ne in fe)if(fe.hasOwnProperty(Ne)){const Pe=i(Ie[Ne],fe[Ne]);Pe.didChange&&(Ie[Ne]=Pe.newValue,be=!0)}return new a(Ie,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,Ne,Pe){this.id=fe,this.name=be,this.defaultValue=Ne,this.schema=Pe}applyUpdate(fe,be){return i(fe,be)}validate(fe){return typeof fe>"u"?this.defaultValue:fe}compute(fe,be,Ne){return Ne}}function r(Ie,fe){return typeof Ie>"u"?fe:Ie==="false"?!1:!!Ie}e.boolean=r;class u extends t{constructor(fe,be,Ne,Pe=void 0){typeof Pe<"u"&&(Pe.type="boolean",Pe.default=Ne),super(fe,be,Ne,Pe)}validate(fe){return r(fe,this.defaultValue)}}function f(Ie,fe,be,Ne){if(typeof Ie>"u")return fe;let Pe=parseInt(Ie,10);return isNaN(Pe)?fe:(Pe=Math.max(be,Pe),Pe=Math.min(Ne,Pe),Pe|0)}e.clampedInt=f;class c extends t{static clampedInt(fe,be,Ne,Pe){return f(fe,be,Ne,Pe)}constructor(fe,be,Ne,Pe,ze,Ke=void 0){typeof Ke<"u"&&(Ke.type="integer",Ke.default=Ne,Ke.minimum=Pe,Ke.maximum=ze),super(fe,be,Ne,Ke),this.minimum=Pe,this.maximum=ze}validate(fe){return c.clampedInt(fe,this.defaultValue,this.minimum,this.maximum)}}function d(Ie,fe,be,Ne){if(typeof Ie>"u")return fe;const Pe=s.float(Ie,fe);return s.clamp(Pe,be,Ne)}e.clampedFloat=d;class s extends t{static clamp(fe,be,Ne){return fe<be?be:fe>Ne?Ne:fe}static float(fe,be){if(typeof fe=="number")return fe;if(typeof fe>"u")return be;const Ne=parseFloat(fe);return isNaN(Ne)?be:Ne}constructor(fe,be,Ne,Pe,ze){typeof ze<"u"&&(ze.type="number",ze.default=Ne),super(fe,be,Ne,ze),this.validationFn=Pe}validate(fe){return this.validationFn(s.float(fe,this.defaultValue))}}class l extends t{static string(fe,be){return typeof fe!="string"?be:fe}constructor(fe,be,Ne,Pe=void 0){typeof Pe<"u"&&(Pe.type="string",Pe.default=Ne),super(fe,be,Ne,Pe)}validate(fe){return l.string(fe,this.defaultValue)}}function o(Ie,fe,be,Ne){return typeof Ie!="string"?fe:Ne&&Ie in Ne?Ne[Ie]:be.indexOf(Ie)===-1?fe:Ie}e.stringSet=o;class g extends t{constructor(fe,be,Ne,Pe,ze=void 0){typeof ze<"u"&&(ze.type="string",ze.enum=Pe,ze.default=Ne),super(fe,be,Ne,ze),this._allowedValues=Pe}validate(fe){return o(fe,this.defaultValue,this._allowedValues)}}class h extends b{constructor(fe,be,Ne,Pe,ze,Ke,je=void 0){typeof je<"u"&&(je.type="string",je.enum=ze,je.default=Pe),super(fe,be,Ne,je),this._allowedValues=ze,this._convert=Ke}validate(fe){return typeof fe!="string"?this.defaultValue:this._allowedValues.indexOf(fe)===-1?this.defaultValue:this._convert(fe)}}function m(Ie){switch(Ie){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,Ne){return Ne===0?fe.accessibilitySupport:Ne}}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:r(be.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:r(be.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function D(Ie){switch(Ie){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var I;(function(Ie){Ie[Ie.Line=1]="Line",Ie[Ie.Block=2]="Block",Ie[Ie.Underline=3]="Underline",Ie[Ie.LineThin=4]="LineThin",Ie[Ie.BlockOutline=5]="BlockOutline",Ie[Ie.UnderlineThin=6]="UnderlineThin"})(I||(e.TextEditorCursorStyle=I={}));function T(Ie){switch(Ie){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,Ne){const Pe=["monaco-editor"];return be.get(39)&&Pe.push(be.get(39)),fe.extraEditorClassName&&Pe.push(fe.extraEditorClassName),be.get(73)==="default"?Pe.push("mouse-default"):be.get(73)==="copy"&&Pe.push("mouse-copy"),be.get(110)&&Pe.push("showUnused"),be.get(138)&&Pe.push("showDeprecated"),Pe.join(" ")}}class P extends u{constructor(){super(37,"emptySelectionClipboard",!0,{description:p.localize(6,null)})}compute(fe,be,Ne){return Ne&&fe.emptySelectionClipboard}}class N 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:r(be.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof fe.seedSearchStringFromSelection=="boolean"?fe.seedSearchStringFromSelection?"always":"never":o(be.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof fe.autoFindInSelection=="boolean"?fe.autoFindInSelection?"always":"never":o(be.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:r(be.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:r(be.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:r(be.loop,this.defaultValue.loop)}}}class M extends b{constructor(){super(51,"fontLigatures",M.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"||fe.length===0?M.OFF:fe==="true"?M.ON:fe:fe?M.ON:M.OFF}}e.EditorFontLigatures=M,M.OFF='"liga" off, "calt" off',M.ON='"liga" on, "calt" on';class R extends b{constructor(){super(54,"fontVariations",R.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"?R.OFF:fe==="true"?R.TRANSLATE:fe:fe?R.TRANSLATE:R.OFF}compute(fe,be,Ne){return fe.fontInfo.fontVariationSettings}}e.EditorFontVariations=R,R.OFF="normal",R.TRANSLATE="translate";class x extends n{constructor(){super(50)}compute(fe,be,Ne){return fe.fontInfo}}class O 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=s.float(fe,this.defaultValue);return be===0?e.EDITOR_FONT_DEFAULTS.fontSize:s.clamp(be,6,100)}compute(fe,be,Ne){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)]},Ne=["","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:Ne,description:p.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:fe.alternativeTypeDefinitionCommand,enum:Ne,description:p.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:fe.alternativeDeclarationCommand,enum:Ne,description:p.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:fe.alternativeImplementationCommand,enum:Ne,description:p.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:fe.alternativeReferenceCommand,enum:Ne,description:p.localize(41,null)}})}validate(fe){var be,Ne,Pe,ze,Ke;if(!fe||typeof fe!="object")return this.defaultValue;const je=fe;return{multiple:o(je.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(be=je.multipleDefinitions)!==null&&be!==void 0?be:o(je.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Ne=je.multipleTypeDefinitions)!==null&&Ne!==void 0?Ne:o(je.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Pe=je.multipleDeclarations)!==null&&Pe!==void 0?Pe:o(je.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(ze=je.multipleImplementations)!==null&&ze!==void 0?ze:o(je.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Ke=je.multipleReferences)!==null&&Ke!==void 0?Ke:o(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:r(be.enabled,this.defaultValue.enabled),delay:c.clampedInt(be.delay,this.defaultValue.delay,0,1e4),sticky:r(be.sticky,this.defaultValue.sticky),hidingDelay:c.clampedInt(be.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:r(be.above,this.defaultValue.above)}}}class K extends n{constructor(){super(143)}compute(fe,be,Ne){return K.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,Ne=Math.floor(fe.paddingTop/fe.lineHeight);let Pe=Math.floor(fe.paddingBottom/fe.lineHeight);fe.scrollBeyondLastLine&&(Pe=Math.max(Pe,be-1));const ze=(Ne+fe.viewLineCount+Pe)/(fe.pixelRatio*fe.height),Ke=Math.floor(fe.viewLineCount/ze);return{typicalViewportLineCount:be,extraLinesBeforeFirstLine:Ne,extraLinesBeyondLastLine:Pe,desiredRatio:ze,minimapLineCount:Ke}}static _computeMinimapLayout(fe,be){const Ne=fe.outerWidth,Pe=fe.outerHeight,ze=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(ze*Pe),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Pe};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,Je=fe.lineHeight,rt=fe.typicalHalfwidthCharacterWidth,et=fe.scrollBeyondLastLine,st=fe.minimap.renderCharacters;let Qe=ze>=2?Math.round(fe.minimap.scale*2):fe.minimap.scale;const ft=fe.minimap.maxColumn,at=fe.minimap.size,ct=fe.minimap.side,lt=fe.verticalScrollbarWidth,mt=fe.viewLineCount,pt=fe.remainingWidth,Le=fe.isViewportWrapping,ye=st?2:3;let Me=Math.floor(ze*Pe);const Te=Me/ze;let we=!1,Re=!1,Oe=ye*Qe,Ve=Qe/ze,$e=1;if(at==="fill"||at==="fit"){const{typicalViewportLineCount:Ue,extraLinesBeforeFirstLine:tt,extraLinesBeyondLastLine:Xe,desiredRatio:dt,minimapLineCount:it}=K.computeContainedMinimapLineCount({viewLineCount:mt,scrollBeyondLastLine:et,paddingTop:fe.paddingTop,paddingBottom:fe.paddingBottom,height:Pe,lineHeight:Je,pixelRatio:ze});if(mt/it>1)we=!0,Re=!0,Qe=1,Oe=1,Ve=Qe/ze;else{let ot=!1,ht=Qe+1;if(at==="fit"){const St=Math.ceil((tt+mt+Xe)*Oe);Le&&je&&pt<=be.stableFitRemainingWidth?(ot=!0,ht=be.stableFitMaxMinimapScale):ot=St>Me}if(at==="fill"||ot){we=!0;const St=Qe;Oe=Math.min(Je*ze,Math.max(1,Math.floor(1/dt))),Le&&je&&pt<=be.stableFitRemainingWidth&&(ht=be.stableFitMaxMinimapScale),Qe=Math.min(ht,Math.max(1,Math.floor(Oe/ye))),Qe>St&&($e=Math.min(2,Qe/St)),Ve=Qe/ze/$e,Me=Math.ceil(Math.max(Ue,tt+mt+Xe)*Oe),Le?(be.stableMinimapLayoutInput=fe,be.stableFitRemainingWidth=pt,be.stableFitMaxMinimapScale=Qe):(be.stableMinimapLayoutInput=null,be.stableFitRemainingWidth=0)}}}const Ze=Math.floor(ft*Ve),Ge=Math.min(Ze,Math.max(0,Math.floor((pt-lt-2)*Ve/(rt+Ve)))+e.MINIMAP_GUTTER_WIDTH);let qe=Math.floor(ze*Ge);const Fe=qe/ze;qe=Math.floor(qe*$e);const We=st?1:2,He=ct==="left"?0:Ne-Ge-lt;return{renderMinimap:We,minimapLeft:He,minimapWidth:Ge,minimapHeightIsEditorHeight:we,minimapIsSampling:Re,minimapScale:Qe,minimapLineHeight:Oe,minimapCanvasInnerWidth:qe,minimapCanvasInnerHeight:Me,minimapCanvasOuterWidth:Fe,minimapCanvasOuterHeight:Te}}static computeLayout(fe,be){const Ne=be.outerWidth|0,Pe=be.outerHeight|0,ze=be.lineHeight|0,Ke=be.lineNumbersDigitCount|0,je=be.typicalHalfwidthCharacterWidth,Je=be.maxDigitWidth,rt=be.pixelRatio,et=be.viewLineCount,st=fe.get(135),Qe=st==="inherit"?fe.get(134):st,ft=Qe==="inherit"?fe.get(130):Qe,at=fe.get(133),ct=be.isDominatedByLongLines,lt=fe.get(57),mt=fe.get(67).renderType!==0,pt=fe.get(68),Le=fe.get(104),ye=fe.get(83),Me=fe.get(72),Te=fe.get(102),we=Te.verticalScrollbarSize,Re=Te.verticalHasArrows,Oe=Te.arrowSize,Ve=Te.horizontalScrollbarSize,$e=fe.get(43),Ze=fe.get(109)!=="never";let Ge=fe.get(65);$e&&Ze&&(Ge+=16);let qe=0;if(mt){const wt=Math.max(Ke,pt);qe=Math.round(wt*Je)}let Fe=0;lt&&(Fe=ze*be.glyphMarginDecorationLaneCount);let We=0,He=We+Fe,Ue=He+qe,tt=Ue+Ge;const Xe=Ne-Fe-qe-Ge;let dt=!1,it=!1,nt=-1;Qe==="inherit"&&ct?(dt=!0,it=!0):ft==="on"||ft==="bounded"?it=!0:ft==="wordWrapColumn"&&(nt=at);const ot=K._computeMinimapLayout({outerWidth:Ne,outerHeight:Pe,lineHeight:ze,typicalHalfwidthCharacterWidth:je,pixelRatio:rt,scrollBeyondLastLine:Le,paddingTop:ye.top,paddingBottom:ye.bottom,minimap:Me,verticalScrollbarWidth:we,viewLineCount:et,remainingWidth:Xe,isViewportWrapping:it},be.memory||new v);ot.renderMinimap!==0&&ot.minimapLeft===0&&(We+=ot.minimapWidth,He+=ot.minimapWidth,Ue+=ot.minimapWidth,tt+=ot.minimapWidth);const ht=Xe-ot.minimapWidth,St=Math.max(1,Math.floor((ht-we-2)/je)),ut=Re?Oe:0;return it&&(nt=Math.max(1,St),ft==="bounded"&&(nt=Math.min(nt,at))),{width:Ne,height:Pe,glyphMarginLeft:We,glyphMarginWidth:Fe,glyphMarginDecorationLaneCount:be.glyphMarginDecorationLaneCount,lineNumbersLeft:He,lineNumbersWidth:qe,decorationsLeft:Ue,decorationsWidth:Ge,contentLeft:tt,contentWidth:ht,minimap:ot,viewportColumn:St,isWordWrapMinified:dt,isViewportWrapping:it,wrappingColumn:nt,verticalScrollbarWidth:we,horizontalScrollbarHeight:Ve,overviewRuler:{top:ut,width:we,height:Pe-2*ut,right:0}}}}e.EditorLayoutInfoComputer=K;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 o(fe,"simple",["simple","advanced"])}compute(fe,be,Ne){return be.get(2)===2?"advanced":Ne}}var q;(function(Ie){Ie.Off="off",Ie.OnCode="onCode",Ie.On="on"})(q||(e.ShowLightbulbIconMode=q={}));class ie extends b{constructor(){const fe={enabled:q.OnCode};super(64,"lightbulb",fe,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[q.Off,q.OnCode,q.On],default:fe.enabled,enumDescriptions:[p.localize(50,null),p.localize(51,null),p.localize(52,null)],description:p.localize(53,null)}})}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:{enabled:o(fe.enabled,this.defaultValue.enabled,[q.Off,q.OnCode,q.On])}}}class ae 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(54,null),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:fe.maxLineCount,minimum:1,maximum:10,description:p.localize(55,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:fe.defaultModel,description:p.localize(56,null)},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:fe.scrollWithEditor,description:p.localize(57,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:r(be.enabled,this.defaultValue.enabled),maxLineCount:c.clampedInt(be.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:o(be.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:r(be.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class ne 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(58,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[p.localize(59,null),p.localize(60,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),p.localize(61,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),p.localize(62,null)]},"editor.inlayHints.fontSize":{type:"number",default:fe.fontSize,markdownDescription:p.localize(63,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:fe.fontFamily,markdownDescription:p.localize(64,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:fe.padding,description:p.localize(65,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:o(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:r(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,Ne){return Ne<0?c.clampedInt(-Ne*fe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Ne}}class J extends s{constructor(){super(66,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,fe=>s.clamp(fe,0,150),{markdownDescription:p.localize(66,null)})}compute(fe,be,Ne){return fe.fontInfo.lineHeight}}class Q 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(67,null)},"editor.minimap.autohide":{type:"boolean",default:fe.autohide,description:p.localize(68,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p.localize(69,null),p.localize(70,null),p.localize(71,null)],default:fe.size,description:p.localize(72,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:fe.side,description:p.localize(73,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:fe.showSlider,description:p.localize(74,null)},"editor.minimap.scale":{type:"number",default:fe.scale,minimum:1,maximum:3,enum:[1,2,3],description:p.localize(75,null)},"editor.minimap.renderCharacters":{type:"boolean",default:fe.renderCharacters,description:p.localize(76,null)},"editor.minimap.maxColumn":{type:"number",default:fe.maxColumn,description:p.localize(77,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:r(be.enabled,this.defaultValue.enabled),autohide:r(be.autohide,this.defaultValue.autohide),size:o(be.size,this.defaultValue.size,["proportional","fill","fit"]),side:o(be.side,this.defaultValue.side,["right","left"]),showSlider:o(be.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:r(be.renderCharacters,this.defaultValue.renderCharacters),scale:c.clampedInt(be.scale,1,1,3),maxColumn:c.clampedInt(be.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function re(Ie){return Ie==="ctrlCmd"?y.isMacintosh?"metaKey":"ctrlKey":"altKey"}class de extends b{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p.localize(78,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p.localize(79,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 he extends b{constructor(){const fe={enabled:!0,cycle:!0};super(85,"parameterHints",fe,{"editor.parameterHints.enabled":{type:"boolean",default:fe.enabled,description:p.localize(80,null)},"editor.parameterHints.cycle":{type:"boolean",default:fe.cycle,description:p.localize(81,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:r(be.enabled,this.defaultValue.enabled),cycle:r(be.cycle,this.defaultValue.cycle)}}}class me extends n{constructor(){super(141)}compute(fe,be,Ne){return fe.pixelRatio}}class X extends b{constructor(){const fe={other:"on",comments:"off",strings:"off"},be=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[p.localize(82,null),p.localize(83,null),p.localize(84,null)]}];super(88,"quickSuggestions",fe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:be,default:fe.strings,description:p.localize(85,null)},comments:{anyOf:be,default:fe.comments,description:p.localize(86,null)},other:{anyOf:be,default:fe.other,description:p.localize(87,null)}},default:fe,markdownDescription:p.localize(88,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=fe}validate(fe){if(typeof fe=="boolean"){const rt=fe?"on":"off";return{comments:rt,strings:rt,other:rt}}if(!fe||typeof fe!="object")return this.defaultValue;const{other:be,comments:Ne,strings:Pe}=fe,ze=["on","inline","off"];let Ke,je,Je;return typeof be=="boolean"?Ke=be?"on":"off":Ke=o(be,this.defaultValue.other,ze),typeof Ne=="boolean"?je=Ne?"on":"off":je=o(Ne,this.defaultValue.comments,ze),typeof Pe=="boolean"?Je=Pe?"on":"off":Je=o(Pe,this.defaultValue.strings,ze),{other:Ke,comments:je,strings:Je}}}class U extends b{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p.localize(89,null),p.localize(90,null),p.localize(91,null),p.localize(92,null)],default:"on",description:p.localize(93,null)})}validate(fe){let be=this.defaultValue.renderType,Ne=this.defaultValue.renderFn;return typeof fe<"u"&&(typeof fe=="function"?(be=4,Ne=fe):fe==="interval"?be=3:fe==="relative"?be=2:fe==="on"?be=1:be=0),{renderType:be,renderFn:Ne}}}function G(Ie){const fe=Ie.get(97);return fe==="editable"?Ie.get(90):fe!=="on"}e.filterValidationDecorations=G;class z extends b{constructor(){const fe=[],be={type:"number",description:p.localize(94,null)};super(101,"rulers",fe,{type:"array",items:{anyOf:[be,{type:["object"],properties:{column:be,color:{type:"string",description:p.localize(95,null),format:"color-hex"}}}]},default:fe,description:p.localize(96,null)})}validate(fe){if(Array.isArray(fe)){const be=[];for(const Ne of fe)if(typeof Ne=="number")be.push({column:c.clampedInt(Ne,0,0,1e4),color:null});else if(Ne&&typeof Ne=="object"){const Pe=Ne;be.push({column:c.clampedInt(Pe.column,0,0,1e4),color:Pe.color})}return be.sort((Ne,Pe)=>Ne.column-Pe.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 Y(Ie,fe){if(typeof Ie!="string")return fe;switch(Ie){case"hidden":return 2;case"visible":return 3;default:return 1}}class j 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(97,null),p.localize(98,null),p.localize(99,null)],default:"auto",description:p.localize(100,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p.localize(101,null),p.localize(102,null),p.localize(103,null)],default:"auto",description:p.localize(104,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:fe.verticalScrollbarSize,description:p.localize(105,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:fe.horizontalScrollbarSize,description:p.localize(106,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:fe.scrollByPage,description:p.localize(107,null)},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:fe.ignoreHorizontalScrollbarInContentHeight,description:p.localize(108,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe,Ne=c.clampedInt(be.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Pe=c.clampedInt(be.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:c.clampedInt(be.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Y(be.vertical,this.defaultValue.vertical),horizontal:Y(be.horizontal,this.defaultValue.horizontal),useShadows:r(be.useShadows,this.defaultValue.useShadows),verticalHasArrows:r(be.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:r(be.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:r(be.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:r(be.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Ne,horizontalSliderSize:c.clampedInt(be.horizontalSliderSize,Ne,0,1e3),verticalScrollbarSize:Pe,verticalSliderSize:c.clampedInt(be.verticalSliderSize,Pe,0,1e3),scrollByPage:r(be.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:r(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 Z 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(109,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:fe.invisibleCharacters,description:p.localize(110,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:fe.ambiguousCharacters,description:p.localize(111,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeComments,description:p.localize(112,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeStrings,description:p.localize(113,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:fe.allowedCharacters,description:p.localize(114,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:fe.allowedLocales,description:p.localize(115,null)}})}applyUpdate(fe,be){let Ne=!1;be.allowedCharacters&&fe&&(k.equals(fe.allowedCharacters,be.allowedCharacters)||(fe={...fe,allowedCharacters:be.allowedCharacters},Ne=!0)),be.allowedLocales&&fe&&(k.equals(fe.allowedLocales,be.allowedLocales)||(fe={...fe,allowedLocales:be.allowedLocales},Ne=!0));const Pe=super.applyUpdate(fe,be);return Ne?new a(Pe.newValue,!0):Pe}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{nonBasicASCII:ce(be.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:r(be.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:r(be.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:ce(be.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:ce(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 Ne={};for(const[Pe,ze]of Object.entries(fe))ze===!0&&(Ne[Pe]=!0);return Ne}}class ee extends b{constructor(){const fe={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",fe,{"editor.inlineSuggest.enabled":{type:"boolean",default:fe.enabled,description:p.localize(116,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:fe.showToolbar,enum:["always","onHover","never"],enumDescriptions:[p.localize(117,null),p.localize(118,null),p.localize(119,null)],description:p.localize(120,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:fe.suppressSuggestions,description:p.localize(121,null)},"editor.inlineSuggest.fontFamily":{type:"string",default:fe.fontFamily,description:p.localize(122,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const be=fe;return{enabled:r(be.enabled,this.defaultValue.enabled),mode:o(be.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:o(be.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:r(be.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:r(be.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:l.string(be.fontFamily,this.defaultValue.fontFamily)}}}class le 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:r(be.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:r(be.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class ue 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:ce(be.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ce(be.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:r(be.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:r(be.indentation,this.defaultValue.indentation),highlightActiveIndentation:ce(be.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function ce(Ie,fe,be){const Ne=be.indexOf(Ie);return Ne===-1?fe:be[Ne]}class pe 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:o(be.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:r(be.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:r(be.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:r(be.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:r(be.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:o(be.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:r(be.showIcons,this.defaultValue.showIcons),showStatusBar:r(be.showStatusBar,this.defaultValue.showStatusBar),preview:r(be.preview,this.defaultValue.preview),previewMode:o(be.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:r(be.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:r(be.showMethods,this.defaultValue.showMethods),showFunctions:r(be.showFunctions,this.defaultValue.showFunctions),showConstructors:r(be.showConstructors,this.defaultValue.showConstructors),showDeprecated:r(be.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:r(be.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:r(be.showFields,this.defaultValue.showFields),showVariables:r(be.showVariables,this.defaultValue.showVariables),showClasses:r(be.showClasses,this.defaultValue.showClasses),showStructs:r(be.showStructs,this.defaultValue.showStructs),showInterfaces:r(be.showInterfaces,this.defaultValue.showInterfaces),showModules:r(be.showModules,this.defaultValue.showModules),showProperties:r(be.showProperties,this.defaultValue.showProperties),showEvents:r(be.showEvents,this.defaultValue.showEvents),showOperators:r(be.showOperators,this.defaultValue.showOperators),showUnits:r(be.showUnits,this.defaultValue.showUnits),showValues:r(be.showValues,this.defaultValue.showValues),showConstants:r(be.showConstants,this.defaultValue.showConstants),showEnums:r(be.showEnums,this.defaultValue.showEnums),showEnumMembers:r(be.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:r(be.showKeywords,this.defaultValue.showKeywords),showWords:r(be.showWords,this.defaultValue.showWords),showColors:r(be.showColors,this.defaultValue.showColors),showFiles:r(be.showFiles,this.defaultValue.showFiles),showReferences:r(be.showReferences,this.defaultValue.showReferences),showFolders:r(be.showFolders,this.defaultValue.showFolders),showTypeParameters:r(be.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:r(be.showSnippets,this.defaultValue.showSnippets),showUsers:r(be.showUsers,this.defaultValue.showUsers),showIssues:r(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:r(fe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:r(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,Ne){return be.get(2)===2?0:Ne}}class Se extends n{constructor(){super(144)}compute(fe,be,Ne){const Pe=be.get(143);return{isDominatedByLongLines:fe.isDominatedByLongLines,isWordWrapMinified:Pe.isWordWrapMinified,isViewportWrapping:Pe.isViewportWrapping,wrappingColumn:Pe.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:r(be.enabled,this.defaultValue.enabled),showDropSelector:o(be.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Ee 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:r(be.enabled,this.defaultValue.enabled),showPasteSelector:o(be.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const Ae="Consolas, 'Courier New', monospace",xe="Menlo, Monaco, 'Courier New', monospace",Be="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:y.isMacintosh?xe:y.isLinux?Be:Ae,fontWeight:"normal",fontSize:y.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function De(Ie){return e.editorOptionsRegistry[Ie.id]=Ie,Ie}e.EditorOptions={acceptSuggestionOnCommitCharacter:De(new u(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p.localize(202,null)})),acceptSuggestionOnEnter:De(new g(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p.localize(203,null),""],markdownDescription:p.localize(204,null)})),accessibilitySupport:De(new C),accessibilityPageSize:De(new c(3,"accessibilityPageSize",10,1,1073741824,{description:p.localize(205,null),tags:["accessibility"]})),ariaLabel:De(new l(4,"ariaLabel",p.localize(206,null))),ariaRequired:De(new u(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:De(new u(8,"screenReaderAnnounceInlineSuggestion",!0,{description:p.localize(207,null),tags:["accessibility"]})),autoClosingBrackets:De(new g(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(208,null),p.localize(209,null),""],description:p.localize(210,null)})),autoClosingComments:De(new g(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(211,null),p.localize(212,null),""],description:p.localize(213,null)})),autoClosingDelete:De(new g(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p.localize(214,null),""],description:p.localize(215,null)})),autoClosingOvertype:De(new g(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p.localize(216,null),""],description:p.localize(217,null)})),autoClosingQuotes:De(new g(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p.localize(218,null),p.localize(219,null),""],description:p.localize(220,null)})),autoIndent:De(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:De(new u(13,"automaticLayout",!1)),autoSurround:De(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:De(new le),bracketPairGuides:De(new ue),stickyTabStops:De(new u(115,"stickyTabStops",!1,{description:p.localize(231,null)})),codeLens:De(new u(17,"codeLens",!0,{description:p.localize(232,null)})),codeLensFontFamily:De(new l(18,"codeLensFontFamily","",{description:p.localize(233,null)})),codeLensFontSize:De(new c(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p.localize(234,null)})),colorDecorators:De(new u(20,"colorDecorators",!0,{description:p.localize(235,null)})),colorDecoratorActivatedOn:De(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:De(new c(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:p.localize(240,null)})),columnSelection:De(new u(22,"columnSelection",!1,{description:p.localize(241,null)})),comments:De(new w),contextmenu:De(new u(24,"contextmenu",!0)),copyWithSyntaxHighlighting:De(new u(25,"copyWithSyntaxHighlighting",!0,{description:p.localize(242,null)})),cursorBlinking:De(new h(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],D,{description:p.localize(243,null)})),cursorSmoothCaretAnimation:De(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:De(new h(28,"cursorStyle",I.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],T,{description:p.localize(248,null)})),cursorSurroundingLines:De(new c(29,"cursorSurroundingLines",0,0,1073741824,{description:p.localize(249,null)})),cursorSurroundingLinesStyle:De(new g(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p.localize(250,null),p.localize(251,null)],markdownDescription:p.localize(252,null)})),cursorWidth:De(new c(31,"cursorWidth",0,0,1073741824,{markdownDescription:p.localize(253,null)})),disableLayerHinting:De(new u(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:De(new u(33,"disableMonospaceOptimizations",!1)),domReadOnly:De(new u(34,"domReadOnly",!1)),dragAndDrop:De(new u(35,"dragAndDrop",!0,{description:p.localize(254,null)})),emptySelectionClipboard:De(new P),dropIntoEditor:De(new _e),stickyScroll:De(new ae),experimentalWhitespaceRendering:De(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:De(new l(39,"extraEditorClassName","")),fastScrollSensitivity:De(new s(40,"fastScrollSensitivity",5,Ie=>Ie<=0?5:Ie,{markdownDescription:p.localize(259,null)})),find:De(new N),fixedOverflowWidgets:De(new u(42,"fixedOverflowWidgets",!1)),folding:De(new u(43,"folding",!0,{description:p.localize(260,null)})),foldingStrategy:De(new g(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p.localize(261,null),p.localize(262,null)],description:p.localize(263,null)})),foldingHighlight:De(new u(45,"foldingHighlight",!0,{description:p.localize(264,null)})),foldingImportsByDefault:De(new u(46,"foldingImportsByDefault",!1,{description:p.localize(265,null)})),foldingMaximumRegions:De(new c(47,"foldingMaximumRegions",5e3,10,65e3,{description:p.localize(266,null)})),unfoldOnClickAfterEndOfLine:De(new u(48,"unfoldOnClickAfterEndOfLine",!1,{description:p.localize(267,null)})),fontFamily:De(new l(49,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:p.localize(268,null)})),fontInfo:De(new x),fontLigatures2:De(new M),fontSize:De(new O),fontWeight:De(new B),fontVariations:De(new R),formatOnPaste:De(new u(55,"formatOnPaste",!1,{description:p.localize(269,null)})),formatOnType:De(new u(56,"formatOnType",!1,{description:p.localize(270,null)})),glyphMargin:De(new u(57,"glyphMargin",!0,{description:p.localize(271,null)})),gotoLocation:De(new W),hideCursorInOverviewRuler:De(new u(59,"hideCursorInOverviewRuler",!1,{description:p.localize(272,null)})),hover:De(new V),inDiffEditor:De(new u(61,"inDiffEditor",!1)),letterSpacing:De(new s(63,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,Ie=>s.clamp(Ie,-5,20),{description:p.localize(273,null)})),lightbulb:De(new ie),lineDecorationsWidth:De(new $),lineHeight:De(new J),lineNumbers:De(new U),lineNumbersMinChars:De(new c(68,"lineNumbersMinChars",5,1,300)),linkedEditing:De(new u(69,"linkedEditing",!1,{description:p.localize(274,null)})),links:De(new u(70,"links",!0,{description:p.localize(275,null)})),matchBrackets:De(new g(71,"matchBrackets","always",["always","near","never"],{description:p.localize(276,null)})),minimap:De(new Q),mouseStyle:De(new g(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:De(new s(74,"mouseWheelScrollSensitivity",1,Ie=>Ie===0?1:Ie,{markdownDescription:p.localize(277,null)})),mouseWheelZoom:De(new u(75,"mouseWheelZoom",!1,{markdownDescription:y.isMacintosh?p.localize(278,null):p.localize(279,null)})),multiCursorMergeOverlapping:De(new u(76,"multiCursorMergeOverlapping",!0,{description:p.localize(280,null)})),multiCursorModifier:De(new h(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],re,{markdownEnumDescriptions:[p.localize(281,null),p.localize(282,null)],markdownDescription:p.localize(283,null)})),multiCursorPaste:De(new g(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p.localize(284,null),p.localize(285,null)],markdownDescription:p.localize(286,null)})),multiCursorLimit:De(new c(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:p.localize(287,null)})),occurrencesHighlight:De(new g(80,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[p.localize(288,null),p.localize(289,null),p.localize(290,null)],markdownDescription:p.localize(291,null)})),overviewRulerBorder:De(new u(81,"overviewRulerBorder",!0,{description:p.localize(292,null)})),overviewRulerLanes:De(new c(82,"overviewRulerLanes",3,0,3)),padding:De(new de),pasteAs:De(new Ee),parameterHints:De(new he),peekWidgetDefaultFocus:De(new g(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p.localize(293,null),p.localize(294,null)],description:p.localize(295,null)})),definitionLinkOpensInPeek:De(new u(87,"definitionLinkOpensInPeek",!1,{description:p.localize(296,null)})),quickSuggestions:De(new X),quickSuggestionsDelay:De(new c(89,"quickSuggestionsDelay",10,0,1073741824,{description:p.localize(297,null)})),readOnly:De(new u(90,"readOnly",!1)),readOnlyMessage:De(new H),renameOnType:De(new u(92,"renameOnType",!1,{description:p.localize(298,null),markdownDeprecationMessage:p.localize(299,null)})),renderControlCharacters:De(new u(93,"renderControlCharacters",!0,{description:p.localize(300,null),restricted:!0})),renderFinalNewline:De(new g(94,"renderFinalNewline",y.isLinux?"dimmed":"on",["off","on","dimmed"],{description:p.localize(301,null)})),renderLineHighlight:De(new g(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p.localize(302,null)],description:p.localize(303,null)})),renderLineHighlightOnlyWhenFocus:De(new u(96,"renderLineHighlightOnlyWhenFocus",!1,{description:p.localize(304,null)})),renderValidationDecorations:De(new g(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:De(new g(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p.localize(305,null),p.localize(306,null),p.localize(307,null),""],description:p.localize(308,null)})),revealHorizontalRightPadding:De(new c(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:De(new u(100,"roundedSelection",!0,{description:p.localize(309,null)})),rulers:De(new z),scrollbar:De(new j),scrollBeyondLastColumn:De(new c(103,"scrollBeyondLastColumn",4,0,1073741824,{description:p.localize(310,null)})),scrollBeyondLastLine:De(new u(104,"scrollBeyondLastLine",!0,{description:p.localize(311,null)})),scrollPredominantAxis:De(new u(105,"scrollPredominantAxis",!0,{description:p.localize(312,null)})),selectionClipboard:De(new u(106,"selectionClipboard",!0,{description:p.localize(313,null),included:y.isLinux})),selectionHighlight:De(new u(107,"selectionHighlight",!0,{description:p.localize(314,null)})),selectOnLineNumbers:De(new u(108,"selectOnLineNumbers",!0)),showFoldingControls:De(new g(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[p.localize(315,null),p.localize(316,null),p.localize(317,null)],description:p.localize(318,null)})),showUnused:De(new u(110,"showUnused",!0,{description:p.localize(319,null)})),showDeprecated:De(new u(138,"showDeprecated",!0,{description:p.localize(320,null)})),inlayHints:De(new ne),snippetSuggestions:De(new g(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p.localize(321,null),p.localize(322,null),p.localize(323,null),p.localize(324,null)],description:p.localize(325,null)})),smartSelect:De(new ve),smoothScrolling:De(new u(113,"smoothScrolling",!1,{description:p.localize(326,null)})),stopRenderingLineAfter:De(new c(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:De(new pe),inlineSuggest:De(new ee),inlineCompletionsAccessibilityVerbose:De(new u(147,"inlineCompletionsAccessibilityVerbose",!1,{description:p.localize(327,null)})),suggestFontSize:De(new c(118,"suggestFontSize",0,0,1e3,{markdownDescription:p.localize(328,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:De(new c(119,"suggestLineHeight",0,0,1e3,{markdownDescription:p.localize(329,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:De(new u(120,"suggestOnTriggerCharacters",!0,{description:p.localize(330,null)})),suggestSelection:De(new g(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p.localize(331,null),p.localize(332,null),p.localize(333,null)],description:p.localize(334,null)})),tabCompletion:De(new g(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p.localize(335,null),p.localize(336,null),p.localize(337,null)],description:p.localize(338,null)})),tabIndex:De(new c(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:De(new Z),unusualLineTerminators:De(new g(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p.localize(339,null),p.localize(340,null),p.localize(341,null)],description:p.localize(342,null)})),useShadowDOM:De(new u(126,"useShadowDOM",!0)),useTabStops:De(new u(127,"useTabStops",!0,{description:p.localize(343,null)})),wordBreak:De(new g(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[p.localize(344,null),p.localize(345,null)],description:p.localize(346,null)})),wordSeparators:De(new l(129,"wordSeparators",S.USUAL_WORD_SEPARATORS,{description:p.localize(347,null)})),wordWrap:De(new g(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p.localize(348,null),p.localize(349,null),p.localize(350,null),p.localize(351,null)],description:p.localize(352,null)})),wordWrapBreakAfterCharacters:De(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:De(new l(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:De(new c(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:p.localize(353,null)})),wordWrapOverride1:De(new g(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:De(new g(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:De(new A),defaultColorDecorators:De(new u(145,"defaultColorDecorators",!1,{markdownDescription:p.localize(354,null)})),pixelRatio:De(new me),tabFocusMode:De(new u(142,"tabFocusMode",!1,{markdownDescription:p.localize(355,null)})),layoutInfo:De(new K),wrappingInfo:De(new Se),wrappingIndent:De(new Ce),wrappingStrategy:De(new F)}}),define(se[636],oe([1,0,7,40,11,72,36,10,5,200]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class b{constructor(n,t,r,u,f,c,d){this.top=n,this.left=t,this.paddingLeft=r,this.width=u,this.height=f,this.textContent=c,this.textContentClassName=d}}class a{constructor(n){this._context=n;const t=this._context.configuration.options,r=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=r.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,r),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,r=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,E.applyFontInfo)(this._domNode,r),!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,r=this._context.viewModel.getLineContent(n),[u,f]=y.getCharContainingOffset(r,t-1);return[new p.Position(n,u+1),r.substring(u,f)]}_prepareRender(n){let t="",r="";const[u,f]=this._getGraphemeAwarePosition();if(this._cursorStyle===S.TextEditorCursorStyle.Line||this._cursorStyle===S.TextEditorCursorStyle.LineThin){const h=n.visibleRangeForPosition(u);if(!h||h.outsideRenderedLine)return null;const m=L.getWindow(this._domNode.domNode);let C;this._cursorStyle===S.TextEditorCursorStyle.Line?(C=L.computeScreenAwareSize(m,this._lineCursorWidth>0?this._lineCursorWidth:2),C>2&&(t=f,r=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,r)}const c=n.linesVisibleRangesForRange(new _.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 s=d.ranges[0],l=f===" "?this._typicalHalfwidthCharacterWidth:s.width<1?this._typicalHalfwidthCharacterWidth:s.width;this._cursorStyle===S.TextEditorCursorStyle.Block&&(t=f,r=this._getTokenClassName(u));let o=n.getVerticalOffsetForLineNumber(u.lineNumber)-n.bigNumbersDelta,g=this._lineHeight;return(this._cursorStyle===S.TextEditorCursorStyle.Underline||this._cursorStyle===S.TextEditorCursorStyle.UnderlineThin)&&(o+=this._lineHeight-2,g=2),new b(o,s.left,0,l,g,t,r)}_getTokenClassName(n){const t=this._context.viewModel.getViewLineData(n.lineNumber),r=t.tokens.findTokenIndexAtOffset(n.column-1);return t.tokens.getClassName(r)}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=a}),define(se[637],oe([1,0,35,278,36]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorOptions=void 0;class E{get editorOptions(){return this._options}constructor(_){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(_,k.diffEditorDefaultOptions)};this._options=(0,L.observableValue)(this,v)}updateOptions(_){const v=S(_,this._options.get()),b={...this._options.get(),..._,...v};this._options.set(b,void 0,{changedOptions:_})}setWidth(_){this._diffEditorWidth.set(_,void 0)}}e.DiffEditorOptions=E;function S(p,_){var v,b,a,i,n,t,r,u;return{enableSplitViewResizing:(0,y.boolean)(p.enableSplitViewResizing,_.enableSplitViewResizing),splitViewDefaultRatio:(0,y.clampedFloat)(p.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,y.boolean)(p.renderSideBySide,_.renderSideBySide),renderMarginRevertIcon:(0,y.boolean)(p.renderMarginRevertIcon,_.renderMarginRevertIcon),maxComputationTime:(0,y.clampedInt)(p.maxComputationTime,_.maxComputationTime,0,1073741824),maxFileSize:(0,y.clampedInt)(p.maxFileSize,_.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,y.boolean)(p.ignoreTrimWhitespace,_.ignoreTrimWhitespace),renderIndicators:(0,y.boolean)(p.renderIndicators,_.renderIndicators),originalEditable:(0,y.boolean)(p.originalEditable,_.originalEditable),diffCodeLens:(0,y.boolean)(p.diffCodeLens,_.diffCodeLens),renderOverviewRuler:(0,y.boolean)(p.renderOverviewRuler,_.renderOverviewRuler),diffWordWrap:(0,y.stringSet)(p.diffWordWrap,_.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,y.stringSet)(p.diffAlgorithm,_.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,y.boolean)(p.accessibilityVerbose,_.accessibilityVerbose),experimental:{showMoves:(0,y.boolean)((v=p.experimental)===null||v===void 0?void 0:v.showMoves,_.experimental.showMoves),showEmptyDecorations:(0,y.boolean)((b=p.experimental)===null||b===void 0?void 0:b.showEmptyDecorations,_.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,y.boolean)((i=(a=p.hideUnchangedRegions)===null||a===void 0?void 0:a.enabled)!==null&&i!==void 0?i:(n=p.experimental)===null||n===void 0?void 0:n.collapseUnchangedRegions,_.hideUnchangedRegions.enabled),contextLineCount:(0,y.clampedInt)((t=p.hideUnchangedRegions)===null||t===void 0?void 0:t.contextLineCount,_.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,y.clampedInt)((r=p.hideUnchangedRegions)===null||r===void 0?void 0:r.minimumLineCount,_.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,y.clampedInt)((u=p.hideUnchangedRegions)===null||u===void 0?void 0:u.revealLineCount,_.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,y.boolean)(p.isInEmbeddedEditor,_.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,y.boolean)(p.onlyShowAccessibleDiffViewer,_.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,y.clampedInt)(p.renderSideBySideInlineBreakpoint,_.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,y.boolean)(p.useInlineViewWhenSpaceIsLimited,_.useInlineViewWhenSpaceIsLimited)}}}),define(se[235],oe([1,0,17,36,149]),function(te,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,S=8;class p{static createFromValidatedSettings(b,a,i){const n=b.get(49),t=b.get(53),r=b.get(52),u=b.get(51),f=b.get(54),c=b.get(66),d=b.get(63);return p._create(n,t,r,u,f,c,d,a,i)}static _create(b,a,i,n,t,r,u,f,c){r===0?r=E*i:r<S&&(r=r*i),r=Math.round(r),r<S&&(r=S);const d=1+(c?0:y.EditorZoom.getZoomLevel()*.1);return i*=d,r*=d,t===k.EditorFontVariations.TRANSLATE&&(a==="normal"||a==="bold"?t=k.EditorFontVariations.OFF:(t=`'wght' ${parseInt(a,10)}`,a="normal")),new p({pixelRatio:f,fontFamily:b,fontWeight:a,fontSize:i,fontFeatureSettings:n,fontVariationSettings:t,lineHeight:r,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,a=p._wrapInQuotes(this.fontFamily);return b&&this.fontFamily!==b?`${a}, ${b}`:a}static _wrapInQuotes(b){return/[,"']/.test(b)?b:/[+ ]/.test(b)?`"${b}"`:b}}e.BareFontInfo=p,e.SERIALIZED_FONT_INFO_VERSION=2;class _ extends p{constructor(b,a){super(b),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=a,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=_}),define(se[335],oe([1,0,54,44,6,2,491,36,235]),function(te,e,L,k,y,E,S,p,_){"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 _.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,r){const u=new S.CharWidthRequest(i,n);return t.push(u),r?.push(u),u}_actualReadFontInfo(i){const n=[],t=[],r=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),s=this._createRequest("2",0,n,t),l=this._createRequest("3",0,n,t),o=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),T=this._createRequest("\xB7",0,n,t),A=this._createRequest(String.fromCharCode(11825),0,n,null),P="|/-_ilm%";for(let O=0,B=P.length;O<B;O++)this._createRequest(P.charAt(O),0,n,t),this._createRequest(P.charAt(O),1,n,t),this._createRequest(P.charAt(O),2,n,t);(0,S.readCharWidths)(i,n);const N=Math.max(c.width,d.width,s.width,l.width,o.width,g.width,h.width,m.width,C.width,w.width);let M=i.fontFeatureSettings===p.EditorFontLigatures.OFF;const R=t[0].width;for(let O=1,B=t.length;M&&O<B;O++){const W=R-t[O].width;if(W<-.001||W>.001){M=!1;break}}let x=!0;return M&&I.width!==R&&(x=!1),I.width>D.width&&(x=!1),new _.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:M,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:u.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:f.width,middotWidth:T.width,wsmiddotWidth:A.width,maxDigitWidth:N},!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(se[336],oe([1,0,10,5,86,36]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class S{constructor(i,n,t,r,u){this.editorId=i,this.model=n,this.configuration=t,this._linesCollection=r,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 r=i.range,u=i.options;let f;if(u.isWholeLine){const c=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(r.startLineNumber,1),0,!1,!0),d=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);f=new k.Range(c.lineNumber,c.column,d.lineNumber,d.column)}else f=this._coordinatesConverter.convertModelRangeToViewRange(r,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 r=new k.Range(i,this._linesCollection.getViewLineMinColumn(i),i,this._linesCollection.getViewLineMaxColumn(i));return this._getDecorationsInRange(r,n,t).inlineDecorations[0]}_getDecorationsInRange(i,n,t){const r=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 s=[];for(let l=u;l<=f;l++)s[l-u]=[];for(let l=0,o=r.length;l<o;l++){const g=r[l],h=g.options;if(!p(this.model,g))continue;const m=this._getOrCreateViewModelDecoration(g),C=m.range;if(c[d++]=m,h.inlineClassName){const w=new y.InlineDecoration(C,h.inlineClassName,h.inlineClassNameAffectsLetterSpacing?3:0),D=Math.max(u,C.startLineNumber),I=Math.min(f,C.endLineNumber);for(let T=D;T<=I;T++)s[T-u].push(w)}if(h.beforeContentClassName&&u<=C.startLineNumber&&C.startLineNumber<=f){const w=new y.InlineDecoration(new k.Range(C.startLineNumber,C.startColumn,C.startLineNumber,C.startColumn),h.beforeContentClassName,1);s[C.startLineNumber-u].push(w)}if(h.afterContentClassName&&u<=C.endLineNumber&&C.endLineNumber<=f){const w=new y.InlineDecoration(new k.Range(C.endLineNumber,C.endColumn,C.endLineNumber,C.endColumn),h.afterContentClassName,2);s[C.endLineNumber-u].push(w)}}return{decorations:c,inlineDecorations:s}}}e.ViewModelDecorations=S;function p(a,i){return!(i.options.hideInCommentTokens&&_(a,i)||i.options.hideInStringTokens&&v(a,i))}e.isModelDecorationVisible=p;function _(a,i){return b(a,i.range,n=>n===1)}e.isModelDecorationInComment=_;function v(a,i){return b(a,i.range,n=>n===2)}e.isModelDecorationInString=v;function b(a,i,n){for(let t=i.startLineNumber;t<=i.endLineNumber;t++){const r=a.tokenization.getLineTokens(t),u=t===i.startLineNumber,f=t===i.endLineNumber;let c=u?r.findTokenIndexAtOffset(i.startColumn-1):0;for(;c<r.getCount()&&!(f&&r.getStartOffset(c)>i.endColumn-1);){if(!n(r.getStandardTokenType(c)))return!1;c++}}return!0}}),define(se[638],oe([3,4]),function(te,e){return te.create("vs/editor/common/core/editorColorRegistry",e)}),define(se[639],oe([3,4]),function(te,e){return te.create("vs/editor/common/editorContextKeys",e)}),define(se[640],oe([3,4]),function(te,e){return te.create("vs/editor/common/languages",e)}),define(se[31],oe([1,0,26,22,5,530,640]),function(te,e,L,k,y,E,S){"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 _{constructor(h,m){this.tokens=h,this.endState=m,this._tokenizationResultBrand=void 0}}e.TokenizationResult=_;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 T=C.get(D);return typeof T>"u"&&!I&&(T=9),T}g.fromString=w})(b||(e.CompletionItemKinds=b={}));var a;(function(g){g[g.Automatic=0]="Automatic",g[g.Explicit=1]="Explicit"})(a||(e.InlineCompletionTriggerKind=a={}));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 r(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=r,e.symbolKindNames={[17]:(0,S.localize)(0,null),[16]:(0,S.localize)(1,null),[4]:(0,S.localize)(2,null),[13]:(0,S.localize)(3,null),[8]:(0,S.localize)(4,null),[9]:(0,S.localize)(5,null),[21]:(0,S.localize)(6,null),[23]:(0,S.localize)(7,null),[7]:(0,S.localize)(8,null),[0]:(0,S.localize)(9,null),[11]:(0,S.localize)(10,null),[10]:(0,S.localize)(11,null),[19]:(0,S.localize)(12,null),[5]:(0,S.localize)(13,null),[1]:(0,S.localize)(14,null),[2]:(0,S.localize)(15,null),[20]:(0,S.localize)(16,null),[15]:(0,S.localize)(17,null),[18]:(0,S.localize)(18,null),[24]:(0,S.localize)(19,null),[3]:(0,S.localize)(20,null),[6]:(0,S.localize)(21,null),[14]:(0,S.localize)(22,null),[22]:(0,S.localize)(23,null),[25]:(0,S.localize)(24,null),[12]:(0,S.localize)(25,null)};function u(g,h){return(0,S.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 s;(function(g){function h(m){return!m||typeof m!="object"?!1:typeof m.id=="string"&&typeof m.title=="string"}g.is=h})(s||(e.Command=s={}));var l;(function(g){g[g.Type=1]="Type",g[g.Parameter=2]="Parameter"})(l||(e.InlayHintKind=l={}));class o{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=o,e.TokenizationRegistry=new E.TokenizationRegistry}),define(se[160],oe([1,0,31]),function(te,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,S){return new L.TokenizationResult([new L.Token(0,"",E)],S)}e.nullTokenize=k;function y(E,S){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,S===null?e.NullState:S)}e.nullTokenizeEncoded=y}),define(se[337],oe([1,0,11,94,31,160]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const S={getInitialState:()=>E.NullState,tokenizeEncoded:(b,a,i)=>(0,E.nullTokenizeEncoded)(0,i)};async function p(b,a,i){if(!i)return v(a,b.languageIdCodec,S);const n=await y.TokenizationRegistry.getOrCreate(i);return v(a,b.languageIdCodec,n||S)}e.tokenizeToString=p;function _(b,a,i,n,t,r,u){let f="<div>",c=n,d=0,s=!0;for(let l=0,o=a.getCount();l<o;l++){const g=a.getEndOffset(l);if(g<=n)continue;let h="";for(;c<g&&c<t;c++){const m=b.charCodeAt(c);switch(m){case 9:{let C=r-(c+d)%r;for(d+=C-1;C>0;)u&&s?(h+=" ",s=!1):(h+=" ",s=!0),C--;break}case 60:h+="<",s=!1;break;case 62:h+=">",s=!1;break;case 38:h+="&",s=!1;break;case 0:h+="�",s=!1;break;case 65279:case 8232:case 8233:case 133:h+="\uFFFD",s=!1;break;case 13:h+="​",s=!1;break;case 32:u&&s?(h+=" ",s=!1):(h+=" ",s=!0);break;default:h+=String.fromCharCode(m),s=!1}}if(f+=`<span style="${a.getInlineStyle(l,i)}">${h}</span>`,g>t||c>=t)break}return f+="</div>",f}e.tokenizeLineToHTML=_;function v(b,a,i){let n='<div class="monaco-tokenized-source">';const t=L.splitLines(b);let r=i.getInitialState();for(let u=0,f=t.length;u<f;u++){const c=t[u];u>0&&(n+="<br/>");const d=i.tokenizeEncoded(c,!0,r);k.LineTokens.convertToEndOffset(d.tokens,c.length);const l=new k.LineTokens(d.tokens,c,a).inflate();let o=0;for(let g=0,h=l.getCount();g<h;g++){const m=l.getClassName(g),C=l.getEndOffset(g);n+=`<span class="${m}">${L.escape(c.substring(o,C))}</span>`,o=C}r=d.endState}return n+="</div>",n}e._tokenizeToString=v}),define(se[641],oe([1,0,14,12,17,61,129,62,73,160,523,298,94]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,o){this.tokenizationSupport=o,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new r(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,o,g,h){super(l,o),this._textModel=g,this._languageIdCodec=h}updateTokensUntilLine(l,o){const g=this._textModel.getLanguageId();for(;;){const h=this.getFirstInvalidLine();if(!h||h.lineNumber>o)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,o){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)+o+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,o,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+o),I=this._textModel.getLanguageIdAtPosition(h,0),T=c(this._languageIdCodec,I,this.tokenizationSupport,D,!0,C);return new i.LineTokens(T.tokens,D,this._languageIdCodec)}isCheapToTokenize(l){const o=this.store.getFirstInvalidEndStateLineNumberOrMax();return l<o||l===o&&this._textModel.getLineLength(l)<2048}tokenizeHeuristically(l,o,g){if(g<=this.store.getFirstInvalidEndStateLineNumberOrMax())return{heuristicTokens:!1};if(o<=this.store.getFirstInvalidEndStateLineNumberOrMax())return this.updateTokensUntilLine(l,g),{heuristicTokens:!1};let h=this.guessStartState(o);const m=this._textModel.getLanguageId();for(let C=o;C<=g;C++){const w=this._textModel.getLineContent(C),D=c(this._languageIdCodec,m,this.tokenizationSupport,w,!0,h);l.add(C,D.tokens),h=D.endState}return{heuristicTokens:!0}}guessStartState(l){let o=this._textModel.getLineFirstNonWhitespaceColumn(l);const g=[];let h=null;for(let w=l-1;o>1&&w>=1;w--){const D=this._textModel.getLineFirstNonWhitespaceColumn(w);if(D!==0&&D<o&&(g.push(this._textModel.getLineContent(w)),o=D,h=this.getStartState(w),h))break}h||(h=this.tokenizationSupport.getInitialState()),g.reverse();const m=this._textModel.getLanguageId();let C=h;for(const w of g)C=c(this._languageIdCodec,m,this.tokenizationSupport,w,!1,C).endState;return C}}e.TokenizerWithStateStoreAndTextModel=t;class r{constructor(l){this.lineCount=l,this._tokenizationStateStore=new u,this._invalidEndStatesLineNumbers=new f,this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(1,l+1))}getEndState(l){return this._tokenizationStateStore.getEndState(l)}setEndState(l,o){if(!o)throw new k.BugIndicatingError("Cannot set null/undefined state");this._invalidEndStatesLineNumbers.delete(l);const g=this._tokenizationStateStore.setEndState(l,o);return g&&l<this.lineCount&&this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(l+1,l+2)),g}acceptChange(l,o){this.lineCount+=o-l.length,this._tokenizationStateStore.acceptChange(l,o),this._invalidEndStatesLineNumbers.addRangeAndResize(new _.OffsetRange(l.startLineNumber,l.endLineNumberExclusive),o)}acceptChanges(l){for(const o of l){const[g]=(0,S.countEOL)(o.text);this.acceptChange(new p.LineRange(o.range.startLineNumber,o.range.endLineNumber+1),g+1)}}invalidateEndStateRange(l){this._invalidEndStatesLineNumbers.addRange(new _.OffsetRange(l.startLineNumber,l.endLineNumberExclusive))}getFirstInvalidEndStateLineNumber(){return this._invalidEndStatesLineNumbers.min}getFirstInvalidEndStateLineNumberOrMax(){return this.getFirstInvalidEndStateLineNumber()||Number.MAX_SAFE_INTEGER}allStatesValid(){return this._invalidEndStatesLineNumbers.min===null}getStartState(l,o){return l===1?o:this.getEndState(l-1)}getFirstInvalidLine(l){const o=this.getFirstInvalidEndStateLineNumber();if(o===null)return null;const g=this.getStartState(o,l);if(!g)throw new k.BugIndicatingError("Start state must be defined");return{lineNumber:o,startState:g}}}e.TrackingTokenizationStateStore=r;class u{constructor(){this._lineEndStates=new b.FixedArray(null)}getEndState(l){return this._lineEndStates.get(l)}setEndState(l,o){const g=this._lineEndStates.get(l);return g&&g.equals(o)?!1:(this._lineEndStates.set(l,o),!0)}acceptChange(l,o){let g=l.length;o>0&&g>0&&(g--,o--),this._lineEndStates.replace(l.startLineNumber,g,o)}}e.TokenizationStateStore=u;class f{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(l){const o=this._ranges.findIndex(g=>g.contains(l));if(o!==-1){const g=this._ranges[o];g.start===l?g.endExclusive===l+1?this._ranges.splice(o,1):this._ranges[o]=new _.OffsetRange(l+1,g.endExclusive):g.endExclusive===l+1?this._ranges[o]=new _.OffsetRange(g.start,l):this._ranges.splice(o,1,new _.OffsetRange(g.start,l),new _.OffsetRange(l+1,g.endExclusive))}}addRange(l){_.OffsetRange.addRange(l,this._ranges)}addRangeAndResize(l,o){let g=0;for(;!(g>=this._ranges.length||l.start<=this._ranges[g].endExclusive);)g++;let h=g;for(;!(h>=this._ranges.length||l.endExclusive<this._ranges[h].start);)h++;const m=o-l.length;for(let C=h;C<this._ranges.length;C++)this._ranges[C]=this._ranges[C].delta(m);if(g===h){const C=new _.OffsetRange(l.start,l.start+o);C.isEmpty||this._ranges.splice(g,0,C)}else{const C=Math.min(l.start,this._ranges[g].start),w=Math.max(l.endExclusive,this._ranges[h-1].endExclusive),D=new _.OffsetRange(C,w+m);D.isEmpty?this._ranges.splice(g,h-g):this._ranges.splice(g,h-g,D)}}toString(){return this._ranges.map(l=>l.toString()).join(" + ")}}e.RangePriorityQueueImpl=f;function c(s,l,o,g,h,m){let C=null;if(o)try{C=o.tokenizeEncoded(g,h,m.clone())}catch(w){(0,k.onUnexpectedError)(w)}return C||(C=(0,v.nullTokenizeEncoded)(s.encodeLanguageId(l),m)),i.LineTokens.convertToEndOffset(C.tokens,g.length),C}class d{constructor(l,o){this._tokenizerWithStateStore=l,this._backgroundTokenStore=o,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 o=Date.now()+l.timeRemaining(),g=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<o?(0,y.setTimeout0)(g):this._beginBackgroundTokenization())};g()}_backgroundTokenizeForAtLeast1ms(){const l=this._tokenizerWithStateStore._textModel.getLineCount(),o=new a.ContiguousMultilineTokensBuilder,g=E.StopWatch.create(!1);do if(g.elapsed()>1||this._tokenizeOneInvalidLine(o)>=l)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(o.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(l){var o;const g=(o=this._tokenizerWithStateStore)===null||o===void 0?void 0:o.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,o){this._tokenizerWithStateStore.store.invalidateEndStateRange(new p.LineRange(l,o))}}e.DefaultBackgroundTokenizer=d}),define(se[642],oe([1,0,13,14,12,6,2,129,62,10,151,31,292,641,298,533,535]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class f extends i.TextModelPart{constructor(l,o,g,h,m,C){super(),this._languageService=l,this._languageConfigurationService=o,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 o of l.changes){const[g,h,m]=(0,p.countEOL)(o.text);this._semanticTokens.acceptEdit(o.range,g,h,m,o.text.length>0?o.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(l)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(l){this.validateLineNumber(l);const o=this.grammarTokens.getLineTokens(l);return this._semanticTokens.addSparseTokens(l,o)}_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,o,g){return this.grammarTokens.getTokenTypeIfInsertingCharacter(l,o,g)}tokenizeLineWithEdit(l,o,g){return this.grammarTokens.tokenizeLineWithEdit(l,o,g)}setSemanticTokens(l,o){this._semanticTokens.set(l,o),this._emitModelTokensChangedEvent({semanticTokensApplied:l!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(l,o){if(this.hasCompleteSemanticTokens())return;const g=this._textModel.validateRange(this._semanticTokens.setPartial(l,o));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:g.startLineNumber,toLineNumber:g.endLineNumber}]})}getWordAtPosition(l){this.assertNotDisposed();const o=this._textModel.validatePosition(l),g=this._textModel.getLineContent(o.lineNumber),h=this.getLineTokens(o.lineNumber),m=h.findTokenIndexAtOffset(o.column-1),[C,w]=f._findLanguageBoundaries(h,m),D=(0,b.getWordAtText)(o.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===o.column-1){const[I,T]=f._findLanguageBoundaries(h,m-1),A=(0,b.getWordAtText)(o.column,this.getLanguageConfiguration(h.getLanguageId(m-1)).getWordDefinition(),g.substring(I,T),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,o){const g=l.getLanguageId(o);let h=0;for(let C=o;C>=0&&l.getLanguageId(C)===g;C--)h=l.getStartOffset(C);let m=l.getLineContent().length;for(let C=o,w=l.getCount();C<w&&l.getLanguageId(C)===g;C++)m=l.getEndOffset(C);return[h,m]}getWordUntilPosition(l){const o=this.getWordAtPosition(l);return o?{word:o.word.substr(0,l.column-o.startColumn),startColumn:o.startColumn,endColumn:l.column}:{word:"",startColumn:l.column,endColumn:l.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(l,o){const g=this._textModel.validatePosition(new v.Position(l,o)),h=this.getLineTokens(g.lineNumber);return h.getLanguageId(h.findTokenIndexAtOffset(g.column-1))}setLanguageId(l,o="api"){if(this._languageId===l)return;const g={oldLanguage:this._languageId,newLanguage:l,source:o};this._languageId=l,this._bracketPairsTextModelPart.handleDidChangeLanguage(g),this.grammarTokens.resetTokenization(),this._onDidChangeLanguage.fire(g),this._onDidChangeLanguageConfiguration.fire({})}}e.TokenizationTextModelPart=f;class c extends S.Disposable{get backgroundTokenizationState(){return this._backgroundTokenizationState}constructor(l,o,g,h){super(),this._languageIdCodec=l,this._textModel=o,this.getLanguageId=g,this._tokenizer=null,this._defaultBackgroundTokenizer=null,this._backgroundTokenizer=this._register(new S.MutableDisposable),this._tokens=new r.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundTokenizer=this._register(new S.MutableDisposable),this._backgroundTokenizationState=1,this._onDidChangeBackgroundTokenizationState=this._register(new E.Emitter),this.onDidChangeBackgroundTokenizationState=this._onDidChangeBackgroundTokenizationState.event,this._onDidChangeTokens=this._register(new E.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._attachedViewStates=this._register(new S.DisposableMap),this._register(a.TokenizationRegistry.onDidChange(m=>{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 o;this._tokens.flush(),(o=this._debugBackgroundTokens)===null||o===void 0||o.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=a.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 T=this._tokenizer.store.getFirstInvalidEndStateLineNumber();T!==null&&w>=T&&((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._textModel.isTooLargeForTokenization()&&(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new n.DefaultBackgroundTokenizer(this._tokenizer,C),this._defaultBackgroundTokenizer.handleChanges()),h?.backgroundTokenizerShouldOnlyVerifyTokens&&h.createBackgroundTokenizer?(this._debugBackgroundTokens=new r.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 o,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),(o=this._debugBackgroundTokens)===null||o===void 0||o.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:o}=this._tokens.setMultilineTokens(l,this._textModel);return o.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:o}),{changes:o}}refreshAllVisibleLineTokens(){const l=_.LineRange.joinMany([...this._attachedViewStates].map(([o,g])=>g.lineRanges));this.refreshRanges(l)}refreshRanges(l){for(const o of l)this.refreshRange(o.startLineNumber,o.endLineNumberExclusive-1)}refreshRange(l,o){var g,h;if(!this._tokenizer)return;l=Math.max(1,Math.min(this._textModel.getLineCount(),l)),o=Math.min(this._textModel.getLineCount(),o);const m=new t.ContiguousMultilineTokensBuilder,{heuristicTokens:C}=this._tokenizer.tokenizeHeuristically(m,l,o),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 o,g;const h=new t.ContiguousMultilineTokensBuilder;(o=this._tokenizer)===null||o===void 0||o.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 o;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)&&(!((o=this._debugBackgroundTokenizer.value)===null||o===void 0)&&o.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(l)}return h}getTokenTypeIfInsertingCharacter(l,o,g){if(!this._tokenizer)return 0;const h=this._textModel.validatePosition(new v.Position(l,o));return this.forceTokenization(h.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(h,g)}tokenizeLineWithEdit(l,o,g){if(!this._tokenizer)return null;const h=this._textModel.validatePosition(l);return this.forceTokenization(h.lineNumber),this._tokenizer.tokenizeLineWithEdit(h,o,g)}get hasTokens(){return this._tokens.hasTokens}}class d extends S.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,o)=>l.equals(o))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(l){this._lineRanges=l.visibleLineRanges,l.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(se[338],oe([1,0,19,6,65,22,10,5,24,31,211]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class a{static chord(t,r){return(0,y.KeyChord)(t,r)}}e.KeyMod=a,a.CtrlCmd=2048,a.Shift=1024,a.Alt=512,a.WinCtrl=256;function i(){return{editor:void 0,languages:void 0,CancellationTokenSource:L.CancellationTokenSource,Emitter:k.Emitter,KeyCode:b.KeyCode,KeyMod:a,Position:S.Position,Range:p.Range,Selection:_.Selection,SelectionDirection:b.SelectionDirection,MarkerSeverity:b.MarkerSeverity,MarkerTag:b.MarkerTag,Uri:E.URI,Token:v.Token}}e.createMonacoBaseAPI=i}),define(se[643],oe([1,0,173,22,10,5,527,151,510,516,338,61,296,507,55,509]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class u extends S.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(s){const l=[];for(let o=0;o<this._lines.length;o++){const g=this._lines[o],h=this.offsetAt(new y.Position(o+1,1)),m=g.matchAll(s);for(const C of m)(C.index||C.index===0)&&(C.index=C.index+h),l.push(C)}return l}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(s){return this._lines[s-1]}getWordAtPosition(s,l){const o=(0,p.getWordAtText)(s.column,(0,p.ensureValidWordDefinition)(l),this._lines[s.lineNumber-1],0);return o?new E.Range(s.lineNumber,o.startColumn,s.lineNumber,o.endColumn):null}words(s){const l=this._lines,o=this._wordenize.bind(this);let g=0,h="",m=0,C=[];return{*[Symbol.iterator](){for(;;)if(m<C.length){const w=h.substring(C[m].start,C[m].end);m+=1,yield w}else if(g<l.length)h=l[g],C=o(h,s),m=0,g+=1;else break}}}getLineWords(s,l){const o=this._lines[s-1],g=this._wordenize(o,l),h=[];for(const m of g)h.push({word:o.substring(m.start,m.end),startColumn:m.start+1,endColumn:m.end+1});return h}_wordenize(s,l){const o=[];let g;for(l.lastIndex=0;(g=l.exec(s))&&g[0].length!==0;)o.push({start:g.index,end:g.index+g[0].length});return o}getValueInRange(s){if(s=this._validateRange(s),s.startLineNumber===s.endLineNumber)return this._lines[s.startLineNumber-1].substring(s.startColumn-1,s.endColumn-1);const l=this._eol,o=s.startLineNumber-1,g=s.endLineNumber-1,h=[];h.push(this._lines[o].substring(s.startColumn-1));for(let m=o+1;m<g;m++)h.push(this._lines[m]);return h.push(this._lines[g].substring(0,s.endColumn-1)),h.join(l)}offsetAt(s){return s=this._validatePosition(s),this._ensureLineStarts(),this._lineStarts.getPrefixSum(s.lineNumber-2)+(s.column-1)}positionAt(s){s=Math.floor(s),s=Math.max(0,s),this._ensureLineStarts();const l=this._lineStarts.getIndexOf(s),o=this._lines[l.index].length;return{lineNumber:1+l.index,column:1+Math.min(l.remainder,o)}}_validateRange(s){const l=this._validatePosition({lineNumber:s.startLineNumber,column:s.startColumn}),o=this._validatePosition({lineNumber:s.endLineNumber,column:s.endColumn});return l.lineNumber!==s.startLineNumber||l.column!==s.startColumn||o.lineNumber!==s.endLineNumber||o.column!==s.endColumn?{startLineNumber:l.lineNumber,startColumn:l.column,endLineNumber:o.lineNumber,endColumn:o.column}:s}_validatePosition(s){if(!y.Position.isIPosition(s))throw new Error("bad position");let{lineNumber:l,column:o}=s,g=!1;if(l<1)l=1,o=1,g=!0;else if(l>this._lines.length)l=this._lines.length,o=this._lines[l-1].length+1,g=!0;else{const h=this._lines[l-1].length+1;o<1?(o=1,g=!0):o>h&&(o=h,g=!0)}return g?{lineNumber:l,column:o}:s}}class f{constructor(s,l){this._host=s,this._models=Object.create(null),this._foreignModuleFactory=l,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(s){return this._models[s]}_getModels(){const s=[];return Object.keys(this._models).forEach(l=>s.push(this._models[l])),s}acceptNewModel(s){this._models[s.url]=new u(k.URI.parse(s.url),s.lines,s.EOL,s.versionId)}acceptModelChanged(s,l){if(!this._models[s])return;this._models[s].onEvents(l)}acceptRemovedModel(s){this._models[s]&&delete this._models[s]}async computeUnicodeHighlights(s,l,o){const g=this._getModel(s);return g?i.UnicodeTextModelHighlighter.computeUnicodeHighlights(g,l,o):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(s,l,o,g){const h=this._getModel(s),m=this._getModel(l);return!h||!m?null:f.computeDiff(h,m,o,g)}static computeDiff(s,l,o,g){const h=g==="advanced"?n.linesDiffComputers.getDefault():n.linesDiffComputers.getLegacy(),m=s.getLinesContent(),C=l.getLinesContent(),w=h.computeDiff(m,C,o),D=w.changes.length>0?!1:this._modelsAreIdentical(s,l);function I(T){return T.map(A=>{var P;return[A.original.startLineNumber,A.original.endLineNumberExclusive,A.modified.startLineNumber,A.modified.endLineNumberExclusive,(P=A.innerChanges)===null||P===void 0?void 0:P.map(N=>[N.originalRange.startLineNumber,N.originalRange.startColumn,N.originalRange.endLineNumber,N.originalRange.endColumn,N.modifiedRange.startLineNumber,N.modifiedRange.startColumn,N.modifiedRange.endLineNumber,N.modifiedRange.endColumn])]})}return{identical:D,quitEarly:w.hitTimeout,changes:I(w.changes),moves:w.moves.map(T=>[T.lineRangeMapping.original.startLineNumber,T.lineRangeMapping.original.endLineNumberExclusive,T.lineRangeMapping.modified.startLineNumber,T.lineRangeMapping.modified.endLineNumberExclusive,I(T.changes)])}}static _modelsAreIdentical(s,l){const o=s.getLineCount(),g=l.getLineCount();if(o!==g)return!1;for(let h=1;h<=o;h++){const m=s.getLineContent(h),C=l.getLineContent(h);if(m!==C)return!1}return!0}async computeMoreMinimalEdits(s,l,o){const g=this._getModel(s);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,T=D.range?0:1;return I-T});let C=0;for(let w=1;w<l.length;w++)E.Range.getEndPosition(l[C].range).equals(E.Range.getStartPosition(l[w].range))?(l[C].range=E.Range.fromPositions(E.Range.getStartPosition(l[C].range),E.Range.getEndPosition(l[w].range)),l[C].text+=l[w].text):(C++,l[C]=l[w]);l.length=C+1;for(let{range:w,text:D,eol:I}of l){if(typeof I=="number"&&(m=I),E.Range.isEmpty(w)&&!D)continue;const T=g.getValueInRange(w);if(D=D.replace(/\r\n|\n|\r/g,g.eol),T===D)continue;if(Math.max(D.length,T.length)>f._diffLimit){h.push({range:w,text:D});continue}const A=(0,L.stringDiff)(T,D,o),P=g.offsetAt(E.Range.lift(w).getStartPosition());for(const N of A){const M=g.positionAt(P+N.originalStart),R=g.positionAt(P+N.originalStart+N.originalLength),x={text:D.substr(N.modifiedStart,N.modifiedLength),range:{startLineNumber:M.lineNumber,startColumn:M.column,endLineNumber:R.lineNumber,endColumn:R.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(s){const l=this._getModel(s);return l?(0,_.computeLinks)(l):null}async computeDefaultDocumentColors(s){const l=this._getModel(s);return l?(0,r.computeDefaultDocumentColors)(l):null}async textualSuggest(s,l,o,g){const h=new a.StopWatch,m=new RegExp(o,g),C=new Set;e:for(const w of s){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(s,l,o,g){const h=this._getModel(s);if(!h)return Object.create(null);const m=new RegExp(o,g),C=Object.create(null);for(let w=l.startLineNumber;w<l.endLineNumber;w++){const D=h.getLineWords(w,m);for(const I of D){if(!isNaN(Number(I.word)))continue;let T=C[I.word];T||(T=[],C[I.word]=T),T.push({startLineNumber:w,startColumn:I.startColumn,endLineNumber:w,endColumn:I.endColumn})}}return C}async navigateValueSet(s,l,o,g,h){const m=this._getModel(s);if(!m)return null;const C=new RegExp(g,h);l.startColumn===l.endColumn&&(l={startLineNumber:l.startLineNumber,startColumn:l.startColumn,endLineNumber:l.endLineNumber,endColumn:l.endColumn+1});const w=m.getValueInRange(l),D=m.getWordAtPosition({lineNumber:l.startLineNumber,column:l.startColumn},C);if(!D)return null;const I=m.getValueInRange(D);return v.BasicInplaceReplace.INSTANCE.navigateValueSet(l,w,D,I,o)}loadForeignModule(s,l,o){const g=(C,w)=>this._host.fhr(C,w),m={host:(0,t.createProxyObject)(o,g),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(m,l),Promise.resolve((0,t.getAllMethodNames)(this._foreignModule))):new Promise((C,w)=>{te([s],D=>{this._foreignModule=D.create(m,l),C((0,t.getAllMethodNames)(this._foreignModule))},w)})}fmr(s,l){if(!this._foreignModule||typeof this._foreignModule[s]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+s));try{return Promise.resolve(this._foreignModule[s].apply(this._foreignModule,l))}catch(o){return Promise.reject(o)}}}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(se[339],oe([1,0,6,2,281,31]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class S extends k.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,k.markAsSingleton)(new S)),this._INSTANCE}constructor(){super(),this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(E.TokenizationRegistry.onDidChange(_=>{_.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const _=E.TokenizationRegistry.getColorMap();if(!_){this._colors=[y.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[y.RGBA8.Empty];for(let b=1;b<_.length;b++){const a=_[b].rgba;this._colors[b]=new y.RGBA8(a.r,a.g,a.b,Math.round(a.a*255))}const v=_[2].getRelativeLuminance();this._backgroundIsLight=v>=.5,this._onDidChange.fire(void 0)}getColor(_){return(_<1||_>=this._colors.length)&&(_=2),this._colors[_]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=S,S._INSTANCE=null}),define(se[644],oe([3,4]),function(te,e){return te.create("vs/editor/common/languages/modesRegistry",e)}),define(se[645],oe([3,4]),function(te,e){return te.create("vs/editor/common/model/editStack",e)}),define(se[340],oe([1,0,645,12,24,22,329,144,49]),function(te,e,L,k,y,E,S,p,_){"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(),s=n(f);return new b(d,d,s,s,c,c,[])}constructor(f,c,d,s,l,o,g){this.beforeVersionId=f,this.afterVersionId=c,this.beforeEOL=d,this.afterEOL=s,this.beforeCursorState=l,this.afterCursorState=o,this.changes=g}append(f,c,d,s,l){c.length>0&&(this.changes=(0,S.compressConsecutiveTextChanges)(this.changes,c)),this.afterEOL=d,this.afterVersionId=s,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 s of c)p.writeUInt32BE(f,s.selectionStartLineNumber,d),d+=4,p.writeUInt32BE(f,s.selectionStartColumn,d),d+=4,p.writeUInt32BE(f,s.positionLineNumber,d),d+=4,p.writeUInt32BE(f,s.positionColumn,d),d+=4;return d}static _readSelections(f,c,d){const s=p.readUInt32BE(f,c);c+=4;for(let l=0;l<s;l++){const o=p.readUInt32BE(f,c);c+=4;const g=p.readUInt32BE(f,c);c+=4;const h=p.readUInt32BE(f,c);c+=4;const m=p.readUInt32BE(f,c);c+=4,d.push(new y.Selection(o,g,h,m))}return c}serialize(){let f=10+b._writeSelectionsSize(this.beforeCursorState)+b._writeSelectionsSize(this.afterCursorState)+4;for(const s of this.changes)f+=s.writeSize();const c=new Uint8Array(f);let d=0;p.writeUInt32BE(c,this.beforeVersionId,d),d+=4,p.writeUInt32BE(c,this.afterVersionId,d),d+=4,p.writeUInt8(c,this.beforeEOL,d),d+=1,p.writeUInt8(c,this.afterEOL,d),d+=1,d=b._writeSelections(c,this.beforeCursorState,d),d=b._writeSelections(c,this.afterCursorState,d),p.writeUInt32BE(c,this.changes.length,d),d+=4;for(const s of this.changes)d=s.write(c,d);return c.buffer}static deserialize(f){const c=new Uint8Array(f);let d=0;const s=p.readUInt32BE(c,d);d+=4;const l=p.readUInt32BE(c,d);d+=4;const o=p.readUInt8(c,d);d+=1;const g=p.readUInt8(c,d);d+=1;const h=[];d=b._readSelections(c,d,h);const m=[];d=b._readSelections(c,d,m);const C=p.readUInt32BE(c,d);d+=4;const w=[];for(let D=0;D<C;D++)d=S.TextChange.read(c,d,w);return new b(s,l,o,g,h,m,w)}}e.SingleModelEditStackData=b;class a{get type(){return 0}get resource(){return E.URI.isUri(this.model)?this.model:this.model.uri}constructor(f,c,d,s){this.label=f,this.code=c,this.model=d,this._data=b.create(d,s)}toString(){return(this._data instanceof b?this._data:b.deserialize(this._data)).changes.map(c=>c.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,s,l){this._data instanceof b&&this._data.append(f,c,d,s,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=a;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 s of this._editStackElementsArr){const l=v(s.resource);this._editStackElementsMap.set(l,s)}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,s,l){const o=v(f.uri);this._editStackElementsMap.get(o).append(f,c,d,s,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,_.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 a||u instanceof i:!1}e.isEditStackElement=t;class r{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 s=new a(L.localize(0,null),"undoredo.textBufferEdit",this._model,f);return this._undoRedoService.pushElement(s,c),s}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,s){const l=this._getOrCreateEditStackElement(f,s),o=this._model.applyEdits(c,!0),g=r._computeCursorState(d,o),h=o.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=r}),define(se[646],oe([3,4]),function(te,e){return te.create("vs/editor/common/standaloneStrings",e)}),define(se[96],oe([1,0,646]),function(te,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(a){a.inspectTokensAction=L.localize(0,null)})(k||(e.InspectTokensNLS=k={}));var y;(function(a){a.gotoLineActionLabel=L.localize(1,null)})(y||(e.GoToLineNLS=y={}));var E;(function(a){a.helpQuickAccessActionLabel=L.localize(2,null)})(E||(e.QuickHelpNLS=E={}));var S;(function(a){a.quickCommandActionLabel=L.localize(3,null),a.quickCommandHelp=L.localize(4,null)})(S||(e.QuickCommandNLS=S={}));var p;(function(a){a.quickOutlineActionLabel=L.localize(5,null),a.quickOutlineByCategoryActionLabel=L.localize(6,null)})(p||(e.QuickOutlineNLS=p={}));var _;(function(a){a.editorViewAccessibleLabel=L.localize(7,null),a.accessibilityHelpMessage=L.localize(8,null)})(_||(e.StandaloneCodeEditorNLS=_={}));var v;(function(a){a.toggleHighContrast=L.localize(9,null)})(v||(e.ToggleHighContrastNLS=v={}));var b;(function(a){a.bulkEditServiceSummary=L.localize(10,null)})(b||(e.StandaloneServicesNLS=b={}))}),define(se[647],oe([3,4]),function(te,e){return te.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(se[120],oe([1,0,647,11,102,155,543]),function(te,e,L,k,y,E,S){"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 _{constructor(w,D,I,T,A,P,N,M,R,x,O,B,W,V,K,F,q,ie,ae){this.useMonospaceOptimizations=w,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.continuesWithWrappedLine=T,this.isBasicASCII=A,this.containsRTL=P,this.fauxIndentLength=N,this.lineTokens=M,this.lineDecorations=R.sort(E.LineDecoration.compare),this.tabSize=x,this.startVisibleColumn=O,this.spaceWidth=B,this.stopRenderingLineAfter=K,this.renderWhitespace=F==="all"?4:F==="boundary"?1:F==="selection"?2:F==="trailing"?3:0,this.renderControlCharacters=q,this.fontLigatures=ie,this.selectionsOnLine=ae&&ae.sort((J,Q)=>J.startOffset<Q.startOffset?-1:1);const ne=Math.abs(V-B),$=Math.abs(W-B);ne<$?(this.renderSpaceWidth=V,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=W,this.renderSpaceCharCode=183)}sameSelection(w){if(this.selectionsOnLine===null)return w===null;if(w===null||w.length!==this.selectionsOnLine.length)return!1;for(let D=0;D<this.selectionsOnLine.length;D++)if(!this.selectionsOnLine[D].equals(w[D]))return!1;return!0}equals(w){return this.useMonospaceOptimizations===w.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===w.canUseHalfwidthRightwardsArrow&&this.lineContent===w.lineContent&&this.continuesWithWrappedLine===w.continuesWithWrappedLine&&this.isBasicASCII===w.isBasicASCII&&this.containsRTL===w.containsRTL&&this.fauxIndentLength===w.fauxIndentLength&&this.tabSize===w.tabSize&&this.startVisibleColumn===w.startVisibleColumn&&this.spaceWidth===w.spaceWidth&&this.renderSpaceWidth===w.renderSpaceWidth&&this.renderSpaceCharCode===w.renderSpaceCharCode&&this.stopRenderingLineAfter===w.stopRenderingLineAfter&&this.renderWhitespace===w.renderWhitespace&&this.renderControlCharacters===w.renderControlCharacters&&this.fontLigatures===w.fontLigatures&&E.LineDecoration.equalsArr(this.lineDecorations,w.lineDecorations)&&this.lineTokens.equals(w.lineTokens)&&this.sameSelection(w.selectionsOnLine)}}e.RenderLineInput=_;class v{constructor(w,D){this.partIndex=w,this.charIndex=D}}e.DomPosition=v;class b{static getPartIndex(w){return(w&4294901760)>>>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,T){const A=(D<<16|I<<0)>>>0;this._data[w-1]=A,this._horizontalOffset[w-1]=T}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),T=b.getCharIndex(D);return new v(I,T)}getColumn(w,D){return this.partDataToCharOffset(w.partIndex,D,w.charIndex)+1}partDataToCharOffset(w,D,I){if(this.length===0)return 0;const T=(w<<16|I<<0)>>>0;let A=0,P=this.length-1;for(;A+1<P;){const K=A+P>>>1,F=this._data[K];if(F===T)return K;F>T?P=K:A=K}if(A===P)return A;const N=this._data[A],M=this._data[P];if(N===T)return A;if(M===T)return P;const R=b.getPartIndex(N),x=b.getCharIndex(N),O=b.getPartIndex(M);let B;R!==O?B=D:B=b.getCharIndex(M);const W=I-x,V=B-I;return W<=V?A:P}}e.CharacterMapping=b;class a{constructor(w,D,I){this._renderLineOutputBrand=void 0,this.characterMapping=w,this.containsRTL=D,this.containsForeignElements=I}}e.RenderLineOutput=a;function i(C,w){if(C.lineContent.length===0){if(C.lineDecorations.length>0){w.appendString("<span>");let D=0,I=0,T=0;for(const P of C.lineDecorations)(P.type===1||P.type===2)&&(w.appendString('<span class="'),w.appendString(P.className),w.appendString('"></span>'),P.type===1&&(T|=1,D++),P.type===2&&(T|=2,I++));w.appendString("</span>");const A=new b(1,D+I);return A.setColumnInfo(1,D,0,0),new a(A,!1,T)}return w.appendString("<span><span></span></span>"),new a(new b(0,0),!1,0)}return g(u(C),w)}e.renderViewLine=i;class n{constructor(w,D,I,T){this.characterMapping=w,this.html=D,this.containsRTL=I,this.containsForeignElements=T}}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 r{constructor(w,D,I,T,A,P,N,M,R,x,O,B,W,V,K,F){this.fontIsMonospace=w,this.canUseHalfwidthRightwardsArrow=D,this.lineContent=I,this.len=T,this.isOverflowing=A,this.overflowingCharCount=P,this.parts=N,this.containsForeignElements=M,this.fauxIndentLength=R,this.tabSize=x,this.startVisibleColumn=O,this.containsRTL=B,this.spaceWidth=W,this.renderSpaceCharCode=V,this.renderWhitespace=K,this.renderControlCharacters=F}}function u(C){const w=C.lineContent;let D,I,T;C.stopRenderingLineAfter!==-1&&C.stopRenderingLineAfter<w.length?(D=!0,I=w.length-C.stopRenderingLineAfter,T=C.stopRenderingLineAfter):(D=!1,I=0,T=w.length);let A=f(w,C.containsRTL,C.lineTokens,C.fauxIndentLength,T);C.renderControlCharacters&&!C.isBasicASCII&&(A=s(w,A)),(C.renderWhitespace===4||C.renderWhitespace===1||C.renderWhitespace===2&&C.selectionsOnLine||C.renderWhitespace===3&&!C.continuesWithWrappedLine)&&(A=l(C,w,T,A));let P=0;if(C.lineDecorations.length>0){for(let N=0,M=C.lineDecorations.length;N<M;N++){const R=C.lineDecorations[N];R.type===3||R.type===1?P|=1:R.type===2&&(P|=2)}A=o(w,T,A,C.lineDecorations)}return C.containsRTL||(A=c(w,A,!C.isBasicASCII||C.fontLigatures)),new r(C.useMonospaceOptimizations,C.canUseHalfwidthRightwardsArrow,w,T,D,I,A,P,C.fauxIndentLength,C.tabSize,C.startVisibleColumn,C.containsRTL,C.spaceWidth,C.renderSpaceCharCode,C.renderWhitespace,C.renderControlCharacters)}function f(C,w,D,I,T){const A=[];let P=0;I>0&&(A[P++]=new S.LinePart(I,"",0,!1));let N=I;for(let M=0,R=D.getCount();M<R;M++){const x=D.getEndOffset(M);if(x<=I)continue;const O=D.getClassName(M);if(x>=T){const W=w?k.containsRTL(C.substring(N,T)):!1;A[P++]=new S.LinePart(T,O,0,W);break}const B=w?k.containsRTL(C.substring(N,x)):!1;A[P++]=new S.LinePart(x,O,0,B),N=x}return A}function c(C,w,D){let I=0;const T=[];let A=0;if(D)for(let P=0,N=w.length;P<N;P++){const M=w[P],R=M.endIndex;if(I+50<R){const x=M.type,O=M.metadata,B=M.containsRTL;let W=-1,V=I;for(let K=I;K<R;K++)C.charCodeAt(K)===32&&(W=K),W!==-1&&K-V>=50&&(T[A++]=new S.LinePart(W+1,x,O,B),V=W+1,W=-1);V!==R&&(T[A++]=new S.LinePart(R,x,O,B))}else T[A++]=M;I=R}else for(let P=0,N=w.length;P<N;P++){const M=w[P],R=M.endIndex,x=R-I;if(x>50){const O=M.type,B=M.metadata,W=M.containsRTL,V=Math.ceil(x/50);for(let K=1;K<V;K++){const F=I+K*50;T[A++]=new S.LinePart(F,O,B,W)}T[A++]=new S.LinePart(R,O,B,W)}else T[A++]=M;I=R}return T}function d(C){return C<32?C!==9:C===127||C>=8234&&C<=8238||C>=8294&&C<=8297||C>=8206&&C<=8207||C===1564}function s(C,w){const D=[];let I=new S.LinePart(0,"",0,!1),T=0;for(const A of w){const P=A.endIndex;for(;T<P;T++){const N=C.charCodeAt(T);d(N)&&(T>I.endIndex&&(I=new S.LinePart(T,A.type,A.metadata,A.containsRTL),D.push(I)),I=new S.LinePart(T+1,"mtkcontrol",A.metadata,!1),D.push(I))}T>I.endIndex&&(I=new S.LinePart(P,A.type,A.metadata,A.containsRTL),D.push(I))}return D}function l(C,w,D,I){const T=C.continuesWithWrappedLine,A=C.fauxIndentLength,P=C.tabSize,N=C.startVisibleColumn,M=C.useMonospaceOptimizations,R=C.selectionsOnLine,x=C.renderWhitespace===1,O=C.renderWhitespace===3,B=C.renderSpaceWidth!==C.spaceWidth,W=[];let V=0,K=0,F=I[K].type,q=I[K].containsRTL,ie=I[K].endIndex;const ae=I.length;let ne=!1,$=k.firstNonWhitespaceIndex(w),J;$===-1?(ne=!0,$=D,J=D):J=k.lastNonWhitespaceIndex(w);let Q=!1,re=0,de=R&&R[re],he=N%P;for(let X=A;X<D;X++){const U=w.charCodeAt(X);de&&X>=de.endOffset&&(re++,de=R&&R[re]);let G;if(X<$||X>J)G=!0;else if(U===9)G=!0;else if(U===32)if(x)if(Q)G=!0;else{const z=X+1<D?w.charCodeAt(X+1):0;G=z===32||z===9}else G=!0;else G=!1;if(G&&R&&(G=!!de&&de.startOffset<=X&&de.endOffset>X),G&&O&&(G=ne||X>J),G&&q&&X>=$&&X<=J&&(G=!1),Q){if(!G||!M&&he>=P){if(B){const z=V>0?W[V-1].endIndex:A;for(let H=z+1;H<=X;H++)W[V++]=new S.LinePart(H,"mtkw",1,!1)}else W[V++]=new S.LinePart(X,"mtkw",1,!1);he=he%P}}else(X===ie||G&&X>A)&&(W[V++]=new S.LinePart(X,F,0,q),he=he%P);for(U===9?he=P:k.isFullWidthCharacter(U)?he+=2:he++,Q=G;X===ie&&(K++,K<ae);)F=I[K].type,q=I[K].containsRTL,ie=I[K].endIndex}let me=!1;if(Q)if(T&&x){const X=D>0?w.charCodeAt(D-1):0,U=D>1?w.charCodeAt(D-2):0;X===32&&U!==32&&U!==9||(me=!0)}else me=!0;if(me)if(B){const X=V>0?W[V-1].endIndex:A;for(let U=X+1;U<=D;U++)W[V++]=new S.LinePart(U,"mtkw",1,!1)}else W[V++]=new S.LinePart(D,"mtkw",1,!1);else W[V++]=new S.LinePart(D,F,0,q);return W}function o(C,w,D,I){I.sort(E.LineDecoration.compare);const T=E.LineDecorationsNormalizer.normalize(C,I),A=T.length;let P=0;const N=[];let M=0,R=0;for(let O=0,B=D.length;O<B;O++){const W=D[O],V=W.endIndex,K=W.type,F=W.metadata,q=W.containsRTL;for(;P<A&&T[P].startOffset<V;){const ie=T[P];if(ie.startOffset>R&&(R=ie.startOffset,N[M++]=new S.LinePart(R,K,F,q)),ie.endOffset+1<=V)R=ie.endOffset+1,N[M++]=new S.LinePart(R,K+" "+ie.className,F|ie.metadata,q),P++;else{R=V,N[M++]=new S.LinePart(R,K+" "+ie.className,F|ie.metadata,q);break}}V>R&&(R=V,N[M++]=new S.LinePart(R,K,F,q))}const x=D[D.length-1].endIndex;if(P<A&&T[P].startOffset===x)for(;P<A&&T[P].startOffset===x;){const O=T[P];N[M++]=new S.LinePart(R,O.className,O.metadata,!1),P++}return N}function g(C,w){const D=C.fontIsMonospace,I=C.canUseHalfwidthRightwardsArrow,T=C.containsForeignElements,A=C.lineContent,P=C.len,N=C.isOverflowing,M=C.overflowingCharCount,R=C.parts,x=C.fauxIndentLength,O=C.tabSize,B=C.startVisibleColumn,W=C.containsRTL,V=C.spaceWidth,K=C.renderSpaceCharCode,F=C.renderWhitespace,q=C.renderControlCharacters,ie=new b(P+1,R.length);let ae=!1,ne=0,$=B,J=0,Q=0,re=0;W?w.appendString('<span dir="ltr">'):w.appendString("<span>");for(let de=0,he=R.length;de<he;de++){const me=R[de],X=me.endIndex,U=me.type,G=me.containsRTL,z=F!==0&&me.isWhitespace(),H=z&&!D&&(U==="mtkw"||!T),Y=ne===X&&me.isPseudoAfter();if(J=0,w.appendString("<span "),G&&w.appendString('style="unicode-bidi:isolate" '),w.appendString('class="'),w.appendString(H?"mtkz":U),w.appendASCIICharCode(34),z){let j=0;{let Z=ne,ee=$;for(;Z<X;Z++){const ue=(A.charCodeAt(Z)===9?O-ee%O:1)|0;j+=ue,Z>=x&&(ee+=ue)}}for(H&&(w.appendString(' style="width:'),w.appendString(String(V*j)),w.appendString('px"')),w.appendASCIICharCode(62);ne<X;ne++){ie.setColumnInfo(ne+1,de-re,J,Q),re=0;const Z=A.charCodeAt(ne);let ee,le;if(Z===9){ee=O-$%O|0,le=ee,!I||le>1?w.appendCharCode(8594):w.appendCharCode(65515);for(let ue=2;ue<=le;ue++)w.appendCharCode(160)}else ee=2,le=1,w.appendCharCode(K),w.appendCharCode(8204);J+=ee,Q+=le,ne>=x&&($+=le)}}else for(w.appendASCIICharCode(62);ne<X;ne++){ie.setColumnInfo(ne+1,de-re,J,Q),re=0;const j=A.charCodeAt(ne);let Z=1,ee=1;switch(j){case 9:Z=O-$%O,ee=Z;for(let le=1;le<=Z;le++)w.appendCharCode(160);break;case 32:w.appendCharCode(160);break;case 60:w.appendString("<");break;case 62:w.appendString(">");break;case 38:w.appendString("&");break;case 0:q?w.appendCharCode(9216):w.appendString("�");break;case 65279:case 8232:case 8233:case 133:w.appendCharCode(65533);break;default:k.isFullWidthCharacter(j)&&ee++,q&&j<32?w.appendCharCode(9216+j):q&&j===127?w.appendCharCode(9249):q&&d(j)?(w.appendString("[U+"),w.appendString(h(j)),w.appendString("]"),Z=8,ee=Z):w.appendCharCode(j)}J+=Z,Q+=ee,ne>=x&&($+=ee)}Y?re++:re=0,ne>=P&&!ae&&me.isPseudoAfter()&&(ae=!0,ie.setColumnInfo(ne+1,de,J,Q)),w.appendString("</span>")}return ae||ie.setColumnInfo(P+1,R.length-1,J,Q),N&&(w.appendString('<span class="mtkoverflow">'),w.appendString(L.localize(0,null,m(M))),w.appendString("</span>")),w.appendString("</span>"),new a(ie,W,T)}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(se[648],oe([1,0,93,72,36,102,155,120,86]),function(te,e,L,k,y,E,S,p,_){"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,r,u,f){(0,k.applyFontInfo)(f,r.fontInfo);const c=u.length>0,d=new E.StringBuilder(1e4);let s=0,l=0;const o=[];for(let C=0;C<t.lineTokens.length;C++){const w=C+1,D=t.lineTokens[C],I=t.lineBreakData[C],T=S.LineDecoration.filter(u,w,1,Number.MAX_SAFE_INTEGER);if(I){let A=0;for(const P of I.breakOffsets){const N=D.sliceAndInflate(A,P,0);s=Math.max(s,n(l,N,S.LineDecoration.extractWrapped(T,A,P),c,t.mightContainNonBasicASCII,t.mightContainRTL,r,d)),l++,A=P}o.push(I.breakOffsets.length)}else o.push(1),s=Math.max(s,n(l,D,T,c,t.mightContainNonBasicASCII,t.mightContainRTL,r,d)),l++}s+=r.scrollBeyondLastColumn;const g=d.build(),h=v?v.createHTML(g):g;f.innerHTML=h;const m=s*r.typicalHalfwidthCharacterWidth;return{heightInLines:l,minWidthInPx:m,viewLineCounts:o}}e.renderLines=b;class a{constructor(r,u,f,c){this.lineTokens=r,this.lineBreakData=u,this.mightContainNonBasicASCII=f,this.mightContainRTL=c}}e.LineSource=a;class i{static fromEditor(r){var u;const f=r.getOptions(),c=f.get(50),d=f.get(143);return new i(((u=r.getModel())===null||u===void 0?void 0:u.getOptions().tabSize)||0,c,f.get(33),c.typicalHalfwidthCharacterWidth,f.get(103),f.get(66),d.decorationsWidth,f.get(116),f.get(98),f.get(93),f.get(51))}constructor(r,u,f,c,d,s,l,o,g,h,m){this.tabSize=r,this.fontInfo=u,this.disableMonospaceOptimizations=f,this.typicalHalfwidthCharacterWidth=c,this.scrollBeyondLastColumn=d,this.lineHeight=s,this.lineDecorationsWidth=l,this.stopRenderingLineAfter=o,this.renderWhitespace=g,this.renderControlCharacters=h,this.fontLigatures=m}}e.RenderOptions=i;function n(t,r,u,f,c,d,s,l){l.appendString('<div class="view-line'),f||l.appendString(" char-delete"),l.appendString('" style="top:'),l.appendString(String(t*s.lineHeight)),l.appendString('px;width:1000000px;">');const o=r.getLineContent(),g=_.ViewLineRenderingData.isBasicASCII(o,c),h=_.ViewLineRenderingData.containsRTL(o,g,d),m=(0,p.renderViewLine)(new p.RenderLineInput(s.fontInfo.isMonospace&&!s.disableMonospaceOptimizations,s.fontInfo.canUseHalfwidthRightwardsArrow,o,!1,g,h,0,r,u,s.tabSize,0,s.fontInfo.spaceWidth,s.fontInfo.middotWidth,s.fontInfo.wsmiddotWidth,s.stopRenderingLineAfter,s.renderWhitespace,s.renderControlCharacters,s.fontLigatures!==y.EditorFontLigatures.OFF,null),l);return l.appendString("</div>"),m.characterMapping.getHorizontalOffset(m.characterMapping.length)}}),define(se[649],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(se[650],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(se[651],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(se[652],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(se[653],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(se[654],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(se[655],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(se[656],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(se[657],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/codeActionController",e)}),define(se[658],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(se[659],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(se[660],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(se[661],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(se[662],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(se[663],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/comment/browser/comment",e)}),define(se[664],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(se[665],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(se[666],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution",e)}),define(se[667],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteController",e)}),define(se[668],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/dropOrPasteInto/browser/defaultProviders",e)}),define(se[669],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution",e)}),define(se[670],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController",e)}),define(se[671],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(se[672],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/find/browser/findController",e)}),define(se[673],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/find/browser/findWidget",e)}),define(se[674],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/folding/browser/folding",e)}),define(se[675],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(se[676],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(se[677],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/format/browser/formatActions",e)}),define(se[678],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(se[679],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(se[680],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(se[681],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(se[682],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(se[683],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(se[684],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(se[685],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(se[161],oe([1,0,12,6,170,2,53,49,11,5,685]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class a{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=a;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:s,endLineNumber:l,endColumn:o}=u,g=c.getWordUntilPosition({lineNumber:d,column:s-f}),h=new v.Range(d,g.startColumn,d,s),m=new v.Range(l,o,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 S.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 s of u)if((!d||!p.extUri.isEqual(d.uri,s.uri,!0))&&(d=new n(this,s.uri),this.groups.push(d)),d.children.length===0||t._compareReferences(s,d.children[d.children.length-1])!==0){const l=new a(c===s,d,s,o=>this._onDidChangeReferenceRange.fire(o));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 s=c.children.length,l=c.parent.groups.length;return l===1||f&&d+1<s||!f&&d>0?(f?d=(d+1)%s:d=(d+s-1)%s,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,s)=>({idx:s,prefixLen:_.commonPrefixLength(d.uri.toString(),u.toString()),offsetDist:Math.abs(d.range.startLineNumber-f.lineNumber)*100+Math.abs(d.range.startColumn-f.column)})).sort((d,s)=>d.prefixLen>s.prefixLen?-1:d.prefixLen<s.prefixLen?1:d.offsetDist<s.offsetDist?-1:d.offsetDist>s.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(se[686],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(se[687],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/hover/browser/hover",e)}),define(se[688],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(se[689],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(se[690],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(se[691],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(se[692],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(se[693],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(se[694],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(se[695],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(se[696],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController",e)}),define(se[697],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(se[698],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(se[699],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(se[700],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(se[701],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/links/browser/links",e)}),define(se[702],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/message/browser/messageController",e)}),define(se[703],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(se[704],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(se[705],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(se[706],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(se[707],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(se[708],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(se[709],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(se[710],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/rename/browser/rename",e)}),define(se[711],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(se[712],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(se[713],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(se[714],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(se[715],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(se[716],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(se[717],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(se[718],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(se[719],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(se[720],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(se[721],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(se[722],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(se[723],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(se[724],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(se[725],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(se[726],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(se[727],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(se[728],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(se[729],oe([3,4]),function(te,e){return te.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(se[730],oe([3,4]),function(te,e){return te.create("vs/platform/action/common/actionCommonCategories",e)}),define(se[731],oe([3,4]),function(te,e){return te.create("vs/platform/actionWidget/browser/actionList",e)}),define(se[732],oe([3,4]),function(te,e){return te.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(se[733],oe([3,4]),function(te,e){return te.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(se[734],oe([3,4]),function(te,e){return te.create("vs/platform/actions/browser/toolbar",e)}),define(se[735],oe([3,4]),function(te,e){return te.create("vs/platform/actions/common/menuService",e)}),define(se[736],oe([3,4]),function(te,e){return te.create("vs/platform/audioCues/browser/audioCueService",e)}),define(se[737],oe([3,4]),function(te,e){return te.create("vs/platform/configuration/common/configurationRegistry",e)}),define(se[738],oe([3,4]),function(te,e){return te.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(se[739],oe([3,4]),function(te,e){return te.create("vs/platform/contextkey/common/contextkey",e)}),define(se[740],oe([3,4]),function(te,e){return te.create("vs/platform/contextkey/common/contextkeys",e)}),define(se[741],oe([3,4]),function(te,e){return te.create("vs/platform/contextkey/common/scanner",e)}),define(se[742],oe([3,4]),function(te,e){return te.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(se[743],oe([3,4]),function(te,e){return te.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(se[744],oe([3,4]),function(te,e){return te.create("vs/platform/list/browser/listService",e)}),define(se[745],oe([3,4]),function(te,e){return te.create("vs/platform/markers/common/markers",e)}),define(se[746],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(se[747],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(se[748],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/quickInput",e)}),define(se[749],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/quickInputController",e)}),define(se[750],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/quickInputList",e)}),define(se[751],oe([3,4]),function(te,e){return te.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(se[752],oe([3,4]),function(te,e){return te.create("vs/platform/theme/common/colorRegistry",e)}),define(se[753],oe([3,4]),function(te,e){return te.create("vs/platform/theme/common/iconRegistry",e)}),define(se[754],oe([3,4]),function(te,e){return te.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(se[755],oe([3,4]),function(te,e){return te.create("vs/platform/workspace/common/workspace",e)}),define(se[756],oe([1,0]),function(te,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(se[757],oe([1,0,730]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:(0,L.localize2)(1,"View"),Help:(0,L.localize2)(2,"Help"),Test:(0,L.localize2)(3,"Test"),File:(0,L.localize2)(4,"File"),Preferences:(0,L.localize2)(5,"Preferences"),Developer:{value:(0,L.localize)(0,null),original:"Developer"}})}),define(se[758],oe([1,0,12,741]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function y(..._){switch(_.length){case 1:return(0,k.localize)(0,null,_[0]);case 2:return(0,k.localize)(1,null,_[0],_[1]);case 3:return(0,k.localize)(2,null,_[0],_[1],_[2]);default:return}}const E=(0,k.localize)(3,null),S=(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,a=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:a};this._errors.push({offset:b,lexeme:a,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),a=p._keywords.get(b);a?this._addToken(a):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,a=!1;for(;;){if(v>=this._input.length){this._current=v,this._error(S);return}const n=this._input.charCodeAt(v);if(b)b=!1;else if(n===47&&!a){v++;break}else n===91?a=!0:n===92?b=!0:n===93&&(a=!1);v++}for(;v<this._input.length&&p._regexFlags.has(this._input.charCodeAt(v));)v++;this._current=v;const i=this._input.substring(this._start,this._current);this._tokens.push({type:10,lexeme:i,offset:this._start})}_isAtEnd(){return this._current>=this._input.length}}e.Scanner=p,p._regexFlags=new Set(["i","g","s","m","y","u"].map(_=>_.charCodeAt(0))),p._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}),define(se[759],oe([1,0]),function(te,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(se[760],oe([1,0]),function(te,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 S of E)this.add(S)}add(E){this._set.add(L.toKey(E))}has(E){return this._set.has(L.toKey(E))}}e.ExtensionIdentifierSet=k}),define(se[341],oe([1,0]),function(te,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(se[761],oe([1,0]),function(te,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(se[236],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class L{constructor(y,E=[],S=!1){this.ctor=y,this.staticArguments=E,this.supportsDelayedInstantiation=S}}e.SyncDescriptor=L}),define(se[45],oe([1,0,236]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const k=[];function y(S,p,_){p instanceof L.SyncDescriptor||(p=new L.SyncDescriptor(p,[],!!_)),k.push([S,p])}e.registerSingleton=y;function E(){return k}e.getSingletonServiceDescriptors=E}),define(se[762],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class L{constructor(E,S){this.key=E,this.data=S,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 S of this._nodes.values())S.outgoing.size===0&&E.push(S);return E}insertEdge(E,S){const p=this.lookupOrInsertNode(E),_=this.lookupOrInsertNode(S);p.outgoing.set(_.key,_),_.incoming.set(p.key,p)}removeNode(E){const S=this._hashFn(E);this._nodes.delete(S);for(const p of this._nodes.values())p.outgoing.delete(S),p.incoming.delete(S)}lookupOrInsertNode(E){const S=this._hashFn(E);let p=this._nodes.get(S);return p||(p=new L(S,E),this._nodes.set(S,p)),p}isEmpty(){return this._nodes.size===0}toString(){const E=[];for(const[S,p]of this._nodes)E.push(`${S}
|
||
(-> incoming)[${[...p.incoming.keys()].join(", ")}]
|
||
(outgoing ->)[${[...p.outgoing.keys()].join(",")}]
|
||
`);return E.join(`
|
||
`)}findCycleSlow(){for(const[E,S]of this._nodes){const p=new Set([E]),_=this._findCycle(S,p);if(_)return _}}_findCycle(E,S){for(const[p,_]of E.outgoing){if(S.has(p))return[...S,p].join(" -> ");S.add(p);const v=this._findCycle(_,S);if(v)return v;S.delete(p)}}}e.Graph=k}),define(se[8],oe([1,0]),function(te,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 S(p){return p[E.DI_DEPENDENCIES]||[]}E.getServiceDependencies=S})(L||(e._util=L={})),e.IInstantiationService=y("instantiationService");function k(E,S,p){S[L.DI_TARGET]===S?S[L.DI_DEPENDENCIES].push({id:E,index:p}):(S[L.DI_DEPENDENCIES]=[{id:E,index:p}],S[L.DI_TARGET]=S)}function y(E){if(L.serviceIds.has(E))return L.serviceIds.get(E);const S=function(p,_,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");k(S,p,v)};return S.toString=()=>E,L.serviceIds.set(E,S),S}e.createDecorator=y}),define(se[136],oe([1,0,8,22,20]),function(te,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(S.is(b))return S.lift(b);if(p.is(b))return p.lift(b);throw new Error("Unsupported edit")})}}e.ResourceEdit=E;class S extends E{static is(v){return v instanceof S?!0:(0,y.isObject)(v)&&k.URI.isUri(v.resource)&&(0,y.isObject)(v.textEdit)}static lift(v){return v instanceof S?v:new S(v.resource,v.textEdit,v.versionId,v.metadata)}constructor(v,b,a=void 0,i){super(i),this.resource=v,this.textEdit=b,this.versionId=a}}e.ResourceTextEdit=S;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,a={},i){super(i),this.oldResource=v,this.newResource=b,this.options=a}}e.ResourceFileEdit=p}),define(se[33],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,L.createDecorator)("codeEditorService")});var ge=this&&this.__param||function(te,e){return function(L,k){e(L,k,te)}};define(se[342],oe([1,0,7,118,26,58,2,35,171,28,20,87,62,10,5,31,627,8]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.HideUnchangedRegionsFeature=void 0;let d=c=class extends S.Disposable{static setBreadcrumbsSourceFactory(o){this._breadcrumbsSourceFactory.set(o,void 0)}get isUpdatingHiddenAreas(){return this._isUpdatingHiddenAreas}constructor(o,g,h,m){super(),this._editors=o,this._diffModel=g,this._options=h,this._instantiationService=m,this._modifiedOutlineSource=(0,_.derivedDisposable)(this,I=>{const T=this._editors.modifiedModel.read(I),A=c._breadcrumbsSourceFactory.read(I);return!T||!A?void 0:A(T,this._instantiationService)}),this._isUpdatingHiddenAreas=!1,this._register(this._editors.original.onDidChangeCursorPosition(I=>{if(I.reason===3){const T=this._diffModel.get();(0,p.transaction)(A=>{for(const P of this._editors.original.getSelections()||[])T?.ensureOriginalLineIsVisible(P.getStartPosition().lineNumber,0,A),T?.ensureOriginalLineIsVisible(P.getEndPosition().lineNumber,0,A)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(I=>{if(I.reason===3){const T=this._diffModel.get();(0,p.transaction)(A=>{for(const P of this._editors.modified.getSelections()||[])T?.ensureModifiedLineIsVisible(P.getStartPosition().lineNumber,0,A),T?.ensureModifiedLineIsVisible(P.getEndPosition().lineNumber,0,A)})}}));const C=this._diffModel.map((I,T)=>{var A,P;const N=(A=I?.unchangedRegions.read(T))!==null&&A!==void 0?A:[];return N.length===1&&N[0].modifiedLineNumber===1&&N[0].lineCount===((P=this._editors.modifiedModel.read(T))===null||P===void 0?void 0:P.getLineCount())?[]:N});this.viewZones=(0,p.derivedWithStore)(this,(I,T)=>{const A=this._modifiedOutlineSource.read(I);if(!A)return{origViewZones:[],modViewZones:[]};const P=[],N=[],M=this._options.renderSideBySide.read(I),R=C.read(I);for(const x of R)if(!x.shouldHideControls(I)){{const O=(0,p.derived)(this,W=>x.getHiddenOriginalRange(W).startLineNumber-1),B=new a.PlaceholderViewZone(O,24);P.push(B),T.add(new s(this._editors.original,B,x,x.originalUnchangedRange,!M,A,W=>this._diffModel.get().ensureModifiedLineIsVisible(W,2,void 0),this._options))}{const O=(0,p.derived)(this,W=>x.getHiddenModifiedRange(W).startLineNumber-1),B=new a.PlaceholderViewZone(O,24);N.push(B),T.add(new s(this._editors.modified,B,x,x.modifiedUnchangedRange,!1,A,W=>this._diffModel.get().ensureModifiedLineIsVisible(W,2,void 0),this._options))}}return{origViewZones:P,modViewZones:N}});const w={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},D={description:"Fold Unchanged",glyphMarginHoverMessage:new E.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,u.localize)(0,null)),glyphMarginClassName:"fold-unchanged "+v.ThemeIcon.asClassName(y.Codicon.fold),zIndex:10001};this._register((0,a.applyObservableDecorations)(this._editors.original,(0,p.derived)(this,I=>{const T=C.read(I),A=T.map(P=>({range:P.originalUnchangedRange.toInclusiveRange(),options:w}));for(const P of T)P.shouldHideControls(I)&&A.push({range:t.Range.fromPositions(new n.Position(P.originalLineNumber,1)),options:D});return A}))),this._register((0,a.applyObservableDecorations)(this._editors.modified,(0,p.derived)(this,I=>{const T=C.read(I),A=T.map(P=>({range:P.modifiedUnchangedRange.toInclusiveRange(),options:w}));for(const P of T)P.shouldHideControls(I)&&A.push({range:i.LineRange.ofLength(P.modifiedLineNumber,1).toInclusiveRange(),options:D});return A}))),this._register((0,p.autorun)(I=>{const T=C.read(I);this._isUpdatingHiddenAreas=!0;try{this._editors.original.setHiddenAreas(T.map(A=>A.getHiddenOriginalRange(I).toInclusiveRange()).filter(b.isDefined)),this._editors.modified.setHiddenAreas(T.map(A=>A.getHiddenModifiedRange(I).toInclusiveRange()).filter(b.isDefined))}finally{this._isUpdatingHiddenAreas=!1}})),this._register(this._editors.modified.onMouseUp(I=>{var T;if(!I.event.rightButton&&I.target.position&&(!((T=I.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const A=I.target.position.lineNumber,P=this._diffModel.get();if(!P)return;const N=P.unchangedRegions.get().find(M=>M.modifiedUnchangedRange.includes(A));if(!N)return;N.collapseAll(void 0),I.event.stopPropagation(),I.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(I=>{var T;if(!I.event.rightButton&&I.target.position&&(!((T=I.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const A=I.target.position.lineNumber,P=this._diffModel.get();if(!P)return;const N=P.unchangedRegions.get().find(M=>M.originalUnchangedRange.includes(A));if(!N)return;N.collapseAll(void 0),I.event.stopPropagation(),I.event.preventDefault()}}))}};e.HideUnchangedRegionsFeature=d,d._breadcrumbsSourceFactory=(0,p.observableValue)("breadcrumbsSourceFactory",void 0),e.HideUnchangedRegionsFeature=d=c=ke([ge(3,f.IInstantiationService)],d);class s extends a.ViewZoneOverlayWidget{constructor(o,g,h,m,C,w,D,I){const T=(0,L.h)("div.diff-hidden-lines-widget");super(o,g,T.root),this._editor=o,this._unchangedRegion=h,this._unchangedRegionRange=m,this._hide=C,this._modifiedOutlineSource=w,this._revealModifiedHiddenLine=D,this._options=I,this._nodes=(0,L.h)("div.diff-hidden-lines",[(0,L.h)("div.top@top",{title:(0,u.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,u.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,u.localize)(3,null),role:"button"})]),T.root.appendChild(this._nodes.root);const A=(0,p.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._hide?(0,L.reset)(this._nodes.first):this._register((0,a.applyStyle)(this._nodes.first,{width:A.map(N=>N.contentLeft)})),this._register((0,p.autorun)(N=>{const M=this._unchangedRegion.visibleLineCountTop.read(N)+this._unchangedRegion.visibleLineCountBottom.read(N)===this._unchangedRegion.lineCount;this._nodes.bottom.classList.toggle("canMoveTop",!M),this._nodes.bottom.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(N)>0),this._nodes.top.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(N)>0),this._nodes.top.classList.toggle("canMoveBottom",!M);const R=this._unchangedRegion.isDragged.read(N),x=this._editor.getDomNode();x&&(x.classList.toggle("draggingUnchangedRegion",!!R),R==="top"?(x.classList.toggle("canMoveTop",this._unchangedRegion.visibleLineCountTop.read(N)>0),x.classList.toggle("canMoveBottom",!M)):R==="bottom"?(x.classList.toggle("canMoveTop",!M),x.classList.toggle("canMoveBottom",this._unchangedRegion.visibleLineCountBottom.read(N)>0)):(x.classList.toggle("canMoveTop",!1),x.classList.toggle("canMoveBottom",!1)))}));const P=this._editor;this._register((0,L.addDisposableListener)(this._nodes.top,"mousedown",N=>{if(N.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),N.preventDefault();const M=N.clientY;let R=!1;const x=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set("top",void 0);const O=(0,L.getWindow)(this._nodes.top),B=(0,L.addDisposableListener)(O,"mousemove",V=>{const F=V.clientY-M;R=R||Math.abs(F)>2;const q=Math.round(F/P.getOption(66)),ie=Math.max(0,Math.min(x+q,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(ie,void 0)}),W=(0,L.addDisposableListener)(O,"mouseup",V=>{R||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),B.dispose(),W.dispose()})})),this._register((0,L.addDisposableListener)(this._nodes.bottom,"mousedown",N=>{if(N.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),N.preventDefault();const M=N.clientY;let R=!1;const x=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set("bottom",void 0);const O=(0,L.getWindow)(this._nodes.bottom),B=(0,L.addDisposableListener)(O,"mousemove",V=>{const F=V.clientY-M;R=R||Math.abs(F)>2;const q=Math.round(F/P.getOption(66)),ie=Math.max(0,Math.min(x-q,this._unchangedRegion.getMaxVisibleLineCountBottom())),ae=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(ie,void 0);const ne=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);P.setScrollTop(P.getScrollTop()+(ne-ae))}),W=(0,L.addDisposableListener)(O,"mouseup",V=>{if(this._unchangedRegion.isDragged.set(void 0,void 0),!R){const K=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const F=P.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);P.setScrollTop(P.getScrollTop()+(F-K))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),B.dispose(),W.dispose()})})),this._register((0,p.autorun)(N=>{const M=[];if(!this._hide){const R=h.getHiddenModifiedRange(N).length,x=(0,u.localize)(4,null,R),O=(0,L.$)("span",{title:(0,u.localize)(5,null)},x);O.addEventListener("dblclick",V=>{V.button===0&&(V.preventDefault(),this._unchangedRegion.showAll(void 0))}),M.push(O);const B=this._unchangedRegion.getHiddenModifiedRange(N),W=this._modifiedOutlineSource.getBreadcrumbItems(B,N);if(W.length>0){M.push((0,L.$)("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let V=0;V<W.length;V++){const K=W[V],F=r.SymbolKinds.toIcon(K.kind),q=(0,L.h)("div.breadcrumb-item",{style:{display:"flex",alignItems:"center"}},[(0,k.renderIcon)(F),"\xA0",K.name,...V===W.length-1?[]:[(0,k.renderIcon)(y.Codicon.chevronRight)]]).root;M.push(q),q.onclick=()=>{this._revealModifiedHiddenLine(K.startLineNumber)}}}}(0,L.reset)(this._nodes.others,...M)}))}}}),define(se[43],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,L.createDecorator)("languageService")}),define(se[121],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,L.createDecorator)("editorWorkerService")}),define(se[18],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,L.createDecorator)("ILanguageFeaturesService")}),define(se[763],oe([1,0,611,18,45]),function(te,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 _;return(_=this._notebookTypeResolver)===null||_===void 0?void 0:_.call(this,p)}}e.LanguageFeaturesService=E,(0,y.registerSingleton)(k.ILanguageFeaturesService,E,1)}),define(se[237],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,L.createDecorator)("markerDecorationsService")}),define(se[51],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,L.createDecorator)("modelService")}),define(se[68],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,L.createDecorator)("textModelService")}),define(se[238],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,L.createDecorator)("semanticTokensStylingService")}),define(se[189],oe([1,0,8]),function(te,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(se[764],oe([1,0,45,8,295]),function(te,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(se[239],oe([1,0,136,117]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sortEditsByYieldTo=e.createCombinedWorkspaceEdit=void 0;function y(S,p,_){var v,b,a,i;return(typeof _.insertText=="string"?_.insertText==="":_.insertText.snippet==="")?{edits:(b=(v=_.additionalEdit)===null||v===void 0?void 0:v.edits)!==null&&b!==void 0?b:[]}:{edits:[...p.map(n=>new L.ResourceTextEdit(S,{range:n,text:typeof _.insertText=="string"?k.SnippetParser.escape(_.insertText)+"$0":_.insertText.snippet,insertAsSnippet:!0})),...(i=(a=_.additionalEdit)===null||a===void 0?void 0:a.edits)!==null&&i!==void 0?i:[]]}}e.createCombinedWorkspaceEdit=y;function E(S){var p;function _(n,t){return"providerId"in n&&n.providerId===t.providerId||"mimeType"in n&&n.mimeType===t.handledMimeType}const v=new Map;for(const n of S)for(const t of(p=n.yieldTo)!==null&&p!==void 0?p:[])for(const r of S)if(r!==n&&_(t,r)){let u=v.get(n);u||(u=[],v.set(n,u)),u.push(r)}if(!v.size)return Array.from(S);const b=new Set,a=[];function i(n){if(!n.length)return[];const t=n[0];if(a.includes(t))return console.warn(`Yield to cycle detected for ${t.providerId}`),n;if(b.has(t))return i(n.slice(1));let r=[];const u=v.get(t);return u&&(a.push(t),r=i(u),a.pop()),b.add(t),[...r,t,...i(n.slice(1))]}return i(Array.from(S))}e.sortEditsByYieldTo=E}),define(se[765],oe([1,0,93,6,2,35,11,72,36,10,5,102,43,41,94,155,120,217,156,467]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 T=I instanceof f.GhostTextReplacement?I.columnRange:void 0,A=[],P=[];function N(B,W){if(P.length>0){const V=P[P.length-1];W&&V.decorations.push(new r.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)P.push({content:V,decorations:W?[new r.LineDecoration(1,V.length+1,W,0)]:[]})}const M=D.getLineContent(I.lineNumber);let R,x=0;for(const B of I.parts){let W=B.lines;R===void 0?(A.push({column:B.column,text:W[0],preview:B.preview}),W=W.slice(1)):N([M.substring(x,B.column-1)],void 0),W.length>0&&(N(W,e.GHOST_TEXT_DESCRIPTION),R===void 0&&B.column<=M.length&&(R=B.column)),x=B.column-1}R!==void 0&&N([M.substring(x)],void 0);const O=R!==void 0?new c.ColumnRange(R,M.length+1):void 0;return{replacedRange:T,inlineTexts:A,additionalLines:P,hiddenRange:O,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 T of D.inlineTexts)I.push({range:b.Range.fromPositions(new v.Position(D.lineNumber,T.column)),options:{description:e.GHOST_TEXT_DESCRIPTION,after:{content:T.text,inlineClassName:T.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:n.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return I}),this.additionalLinesWidget=this._register(new s(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=ke([ge(2,i.ILanguageService)],d);class s 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 T=Math.max(m.length,C);if(T>0){const A=document.createElement("div");l(A,D,m,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=I.addZone({afterLineNumber:h,heightInLines:T,domNode:A,afterColumnAffinity:1})}})}}function l(g,h,m,C,w){const D=C.get(33),I=C.get(116),T="none",A=C.get(93),P=C.get(51),N=C.get(50),M=C.get(66),R=new a.StringBuilder(1e4);R.appendString('<div class="suggest-preview-text">');for(let B=0,W=m.length;B<W;B++){const V=m[B],K=V.content;R.appendString('<div class="view-line'),R.appendString('" style="top:'),R.appendString(String(B*M)),R.appendString('px;width:1000000px;">');const F=S.isBasicASCII(K),q=S.containsRTL(K),ie=t.LineTokens.createEmpty(K,w);(0,u.renderViewLine)(new u.RenderLineInput(N.isMonospace&&!D,N.canUseHalfwidthRightwardsArrow,K,!1,F,q,0,ie,V.decorations,h,0,N.spaceWidth,N.middotWidth,N.wsmiddotWidth,I,T,A,P!==_.EditorFontLigatures.OFF,null),R),R.appendString("</div>")}R.appendString("</div>"),(0,p.applyFontInfo)(g,N);const x=R.build(),O=o?o.createHTML(x):x;g.innerHTML=O}const o=(0,L.createTrustedTypesPolicy)("editorGhostText",{createHTML:g=>g})}),define(se[137],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,L.createDecorator)("themeService")}),define(se[122],oe([1,0,8,736]),function(te,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(_){return new y(_.fileName)}constructor(_){this.fileName=_}}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(_){this.randomOneOf=_}}e.SoundSource=E;class S{static register(_){const v=new E("randomOneOf"in _.sound?_.sound.randomOneOf:[_.sound]),b=new S(v,_.name,_.settingsKey,_.alertSettingsKey,_.alertMessage);return S._audioCues.add(b),b}constructor(_,v,b,a,i){this.sound=_,this.name=v,this.settingsKey=b,this.alertSettingsKey=a,this.alertMessage=i}}e.AudioCue=S,S._audioCues=new Set,S.error=S.register({name:(0,k.localize)(0,null),sound:y.error,settingsKey:"audioCues.lineHasError",alertSettingsKey:"accessibility.alert.error",alertMessage:(0,k.localize)(1,null)}),S.warning=S.register({name:(0,k.localize)(2,null),sound:y.warning,settingsKey:"audioCues.lineHasWarning",alertSettingsKey:"accessibility.alert.warning",alertMessage:(0,k.localize)(3,null)}),S.foldedArea=S.register({name:(0,k.localize)(4,null),sound:y.foldedArea,settingsKey:"audioCues.lineHasFoldedArea",alertSettingsKey:"accessibility.alert.foldedArea",alertMessage:(0,k.localize)(5,null)}),S.break=S.register({name:(0,k.localize)(6,null),sound:y.break,settingsKey:"audioCues.lineHasBreakpoint",alertSettingsKey:"accessibility.alert.breakpoint",alertMessage:(0,k.localize)(7,null)}),S.inlineSuggestion=S.register({name:(0,k.localize)(8,null),sound:y.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),S.terminalQuickFix=S.register({name:(0,k.localize)(9,null),sound:y.quickFixes,settingsKey:"audioCues.terminalQuickFix",alertSettingsKey:"accessibility.alert.terminalQuickFix",alertMessage:(0,k.localize)(10,null)}),S.onDebugBreak=S.register({name:(0,k.localize)(11,null),sound:y.break,settingsKey:"audioCues.onDebugBreak",alertSettingsKey:"accessibility.alert.onDebugBreak",alertMessage:(0,k.localize)(12,null)}),S.noInlayHints=S.register({name:(0,k.localize)(13,null),sound:y.error,settingsKey:"audioCues.noInlayHints",alertSettingsKey:"accessibility.alert.noInlayHints",alertMessage:(0,k.localize)(14,null)}),S.taskCompleted=S.register({name:(0,k.localize)(15,null),sound:y.taskCompleted,settingsKey:"audioCues.taskCompleted",alertSettingsKey:"accessibility.alert.taskCompleted",alertMessage:(0,k.localize)(16,null)}),S.taskFailed=S.register({name:(0,k.localize)(17,null),sound:y.taskFailed,settingsKey:"audioCues.taskFailed",alertSettingsKey:"accessibility.alert.taskFailed",alertMessage:(0,k.localize)(18,null)}),S.terminalCommandFailed=S.register({name:(0,k.localize)(19,null),sound:y.error,settingsKey:"audioCues.terminalCommandFailed",alertSettingsKey:"accessibility.alert.terminalCommandFailed",alertMessage:(0,k.localize)(20,null)}),S.terminalBell=S.register({name:(0,k.localize)(21,null),sound:y.terminalBell,settingsKey:"audioCues.terminalBell",alertSettingsKey:"accessibility.alert.terminalBell",alertMessage:(0,k.localize)(22,null)}),S.notebookCellCompleted=S.register({name:(0,k.localize)(23,null),sound:y.taskCompleted,settingsKey:"audioCues.notebookCellCompleted",alertSettingsKey:"accessibility.alert.notebookCellCompleted",alertMessage:(0,k.localize)(24,null)}),S.notebookCellFailed=S.register({name:(0,k.localize)(25,null),sound:y.taskFailed,settingsKey:"audioCues.notebookCellFailed",alertSettingsKey:"accessibility.alert.notebookCellFailed",alertMessage:(0,k.localize)(26,null)}),S.diffLineInserted=S.register({name:(0,k.localize)(27,null),sound:y.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),S.diffLineDeleted=S.register({name:(0,k.localize)(28,null),sound:y.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),S.diffLineModified=S.register({name:(0,k.localize)(29,null),sound:y.diffLineModified,settingsKey:"audioCues.diffLineModified"}),S.chatRequestSent=S.register({name:(0,k.localize)(30,null),sound:y.chatRequestSent,settingsKey:"audioCues.chatRequestSent",alertSettingsKey:"accessibility.alert.chatRequestSent",alertMessage:(0,k.localize)(31,null)}),S.chatResponseReceived=S.register({name:(0,k.localize)(32,null),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[y.chatResponseReceived1,y.chatResponseReceived2,y.chatResponseReceived3,y.chatResponseReceived4]}}),S.chatResponsePending=S.register({name:(0,k.localize)(33,null),sound:y.chatResponsePending,settingsKey:"audioCues.chatResponsePending",alertSettingsKey:"accessibility.alert.chatResponsePending",alertMessage:(0,k.localize)(34,null)}),S.clear=S.register({name:(0,k.localize)(35,null),sound:y.clear,settingsKey:"audioCues.clear",alertSettingsKey:"accessibility.alert.clear",alertMessage:(0,k.localize)(36,null)}),S.save=S.register({name:(0,k.localize)(37,null),sound:y.save,settingsKey:"audioCues.save",alertSettingsKey:"accessibility.alert.save",alertMessage:(0,k.localize)(38,null)}),S.format=S.register({name:(0,k.localize)(39,null),sound:y.format,settingsKey:"audioCues.format",alertSettingsKey:"accessibility.alert.format",alertMessage:(0,k.localize)(40,null)})}),define(se[103],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,L.createDecorator)("clipboardService")}),define(se[25],oe([1,0,6,52,2,66,20,8]),function(te,e,L,k,y,E,S,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(_,v){if(!_)throw new Error("invalid command");if(typeof _=="string"){if(!v)throw new Error("invalid command");return this.registerCommand({id:_,handler:v})}if(_.metadata&&Array.isArray(_.metadata.args)){const t=[];for(const u of _.metadata.args)t.push(u.constraint);const r=_.handler;_.handler=function(u,...f){return(0,S.validateConstraints)(f,t),r(u,...f)}}const{id:b}=_;let a=this._commands.get(b);a||(a=new E.LinkedList,this._commands.set(b,a));const i=a.unshift(_),n=(0,y.toDisposable)(()=>{i();const t=this._commands.get(b);t?.isEmpty()&&this._commands.delete(b)});return this._onDidRegisterCommand.fire(b),n}registerCommandAlias(_,v){return e.CommandsRegistry.registerCommand(_,(b,...a)=>b.get(e.ICommandService).executeCommand(v,...a))}getCommand(_){const v=this._commands.get(_);if(!(!v||v.isEmpty()))return k.Iterable.first(v)}getCommands(){const _=new Map;for(const v of this._commands.keys()){const b=this.getCommand(v);b&&_.set(v,b)}return _}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(se[343],oe([1,0,19,12,2,20,22,51,25,18]),function(te,e,L,k,y,E,S,p,_,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 r of n.lenses)this.lenses.push({symbol:r,provider:t})}}e.CodeLensModel=b;async function a(i,n,t){const r=i.ordered(n),u=new Map,f=new b,c=r.map(async(d,s)=>{u.set(d,s);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,s)=>d.symbol.range.startLineNumber<s.symbol.range.startLineNumber?-1:d.symbol.range.startLineNumber>s.symbol.range.startLineNumber?1:u.get(d.provider)<u.get(s.provider)?-1:u.get(d.provider)>u.get(s.provider)?1:d.symbol.range.startColumn<s.symbol.range.startColumn?-1:d.symbol.range.startColumn>s.symbol.range.startColumn?1:0),f}e.getCodeLensModel=a,_.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(i,...n){let[t,r]=n;(0,E.assertType)(S.URI.isUri(t)),(0,E.assertType)(typeof r=="number"||!r);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 a(u,f,L.CancellationToken.None).then(s=>{d.add(s);const l=[];for(const o of s.lenses)r==null||o.symbol.command?c.push(o.symbol):r-- >0&&o.provider.resolveCodeLens&&l.push(Promise.resolve(o.provider.resolveCodeLens(f,o.symbol,L.CancellationToken.None)).then(g=>c.push(g||o.symbol)));return Promise.all(l)}).then(()=>c).finally(()=>{setTimeout(()=>d.dispose(),100)})})}),define(se[766],oe([1,0,13,19,12,2,20,22,5,51,25,18]),function(te,e,L,k,y,E,S,p,_,v,b,a){"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 s=c.links.map(l=>new i(l,d));f=n._union(f,s),(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,s,l,o;for(d=0,l=0,s=u.length,o=f.length;d<s&&l<o;){const g=u[d],h=f[l];if(_.Range.areIntersectingOrTouching(g.range,h.range)){d++;continue}_.Range.compareRangesUsingStarts(g.range,h.range)<0?(c.push(g),d++):(c.push(h),l++)}for(;d<s;d++)c.push(u[d]);for(;l<o;l++)c.push(f[l]);return c}}e.LinksList=n;function t(r,u,f){const c=[],d=r.ordered(u).reverse().map((s,l)=>Promise.resolve(s.provideLinks(u,f)).then(o=>{o&&(c[l]=[o,s])},y.onUnexpectedExternalError));return Promise.all(d).then(()=>{const s=new n((0,L.coalesce)(c));return f.isCancellationRequested?(s.dispose(),new n([])):s})}e.getLinks=t,b.CommandsRegistry.registerCommand("_executeLinkProvider",async(r,...u)=>{let[f,c]=u;(0,S.assertType)(f instanceof p.URI),typeof c!="number"&&(c=0);const{linkProvider:d}=r.get(a.ILanguageFeaturesService),s=r.get(v.IModelService).getModel(f);if(!s)return[];const l=await t(d,s,k.CancellationToken.None);if(!l)return[];for(let g=0;g<Math.min(c,l.links.length);g++)await l.links[g].resolve(k.CancellationToken.None);const o=l.links.slice(0);return l.dispose(),o})}),define(se[344],oe([1,0,19,12,22,51,25,20,615,5,18]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDocumentRangeSemanticTokens=e.hasDocumentRangeSemanticTokensProvider=e.getDocumentSemanticTokens=e.hasDocumentSemanticTokensProvider=e.DocumentSemanticTokensResult=e.isSemanticTokensEdits=e.isSemanticTokens=void 0;function a(o){return o&&!!o.data}e.isSemanticTokens=a;function i(o){return o&&Array.isArray(o.edits)}e.isSemanticTokensEdits=i;class n{constructor(g,h,m){this.provider=g,this.tokens=h,this.error=m}}e.DocumentSemanticTokensResult=n;function t(o,g){return o.has(g)}e.hasDocumentSemanticTokensProvider=t;function r(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:[]}async function u(o,g,h,m,C){const w=r(o,g),D=await Promise.all(w.map(async I=>{let T,A=null;try{T=await I.provideDocumentSemanticTokens(g,I===h?m:null,C)}catch(P){A=P,T=null}return(!T||!a(T)&&!i(T))&&(T=null),new n(I,T,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(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:null}class c{constructor(g,h){this.provider=g,this.tokens=h}}function d(o,g){return o.has(g)}e.hasDocumentRangeSemanticTokensProvider=d;function s(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:[]}async function l(o,g,h,m){const C=s(o,g),w=await Promise.all(C.map(async D=>{let I;try{I=await D.provideDocumentRangeSemanticTokens(g,h,m)}catch(T){(0,k.onUnexpectedExternalError)(T),I=null}return(!I||!a(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,S.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(o,...g)=>{const[h]=g;(0,p.assertType)(h instanceof y.URI);const m=o.get(E.IModelService).getModel(h);if(!m)return;const{documentSemanticTokensProvider:C}=o.get(b.ILanguageFeaturesService),w=f(C,m);return w?w[0].getLegend():o.get(S.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",h)}),S.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(o,...g)=>{const[h]=g;(0,p.assertType)(h instanceof y.URI);const m=o.get(E.IModelService).getModel(h);if(!m)return;const{documentSemanticTokensProvider:C}=o.get(b.ILanguageFeaturesService);if(!t(C,m))return o.get(S.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||!a(I))return;const T=(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:I.data});return I.resultId&&D.releaseDocumentSemanticTokens(I.resultId),T}),S.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(o,...g)=>{const[h,m]=g;(0,p.assertType)(h instanceof y.URI);const C=o.get(E.IModelService).getModel(h);if(!C)return;const{documentRangeSemanticTokensProvider:w}=o.get(b.ILanguageFeaturesService),D=s(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()}),S.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(o,...g)=>{const[h,m]=g;(0,p.assertType)(h instanceof y.URI),(0,p.assertType)(v.Range.isIRange(m));const C=o.get(E.IModelService).getModel(h);if(!C)return;const{documentRangeSemanticTokensProvider:w}=o.get(b.ILanguageFeaturesService),D=await l(w,C,v.Range.lift(m),L.CancellationToken.None);if(!(!D||!D.tokens))return(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:D.tokens.data})})}),define(se[27],oe([1,0,8]),function(te,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 a=Object.create(null);for(const i in v)y(a,i,v[i],b);return a}e.toValuesTree=k;function y(v,b,a,i){const n=b.split("."),t=n.pop();let r=v;for(let u=0;u<n.length;u++){const f=n[u];let c=r[f];switch(typeof c){case"undefined":c=r[f]=Object.create(null);break;case"object":break;default:i(`Ignoring ${b} as ${n.slice(0,u+1).join(".")} is ${JSON.stringify(c)}`);return}r=c}if(typeof r=="object"&&r!==null)try{r[t]=a}catch{i(`Ignoring ${b} as ${n.join(".")} is ${JSON.stringify(r)}`)}else i(`Ignoring ${b} as ${n.join(".")} is ${JSON.stringify(r)}`)}e.addToValueTree=y;function E(v,b){const a=b.split(".");S(v,a)}e.removeFromValueTree=E;function S(v,b){const a=b.shift();if(b.length===0){delete v[a];return}if(Object.keys(v).indexOf(a)!==-1){const i=v[a];typeof i=="object"&&!Array.isArray(i)&&(S(i,b),Object.keys(i).length===0&&delete v[a])}}function p(v,b,a){function i(r,u){let f=r;for(const c of u){if(typeof f!="object"||f===null)return;f=f[c]}return f}const n=b.split("."),t=i(v,n);return typeof t>"u"?a:t}e.getConfigurationValue=p;function _(v){return v.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=_}),define(se[345],oe([1,0,2,31,160,313,27]),function(te,e,L,k,y,E,S){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const _=5;class v{static create(d,s){return this._INSTANCE.create(d,s)}constructor(d){this._maxCacheDepth=d,this._entries=Object.create(null)}create(d,s){if(d!==null&&d.depth>=this._maxCacheDepth)return new b(d,s);let l=b.getStackElementId(d);l.length>0&&(l+="|"),l+=s;let o=this._entries[l];return o||(o=new b(d,s),this._entries[l]=o,o)}}v._INSTANCE=new v(_);class b{constructor(d,s){this.parent=d,this.state=s,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(d){let s="";for(;d!==null;)s.length>0&&(s+="|"),s+=d.state,d=d.parent;return s}static _equals(d,s){for(;d!==null&&s!==null;){if(d===s)return!0;if(d.state!==s.state)return!1;d=d.parent,s=s.parent}return d===null&&s===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 a{constructor(d,s){this.languageId=d,this.state=s}equals(d){return this.languageId===d.languageId&&this.state.equals(d.state)}clone(){return this.state.clone()===this.state?this:new a(this.languageId,this.state)}}class i{static create(d,s){return this._INSTANCE.create(d,s)}constructor(d){this._maxCacheDepth=d,this._entries=Object.create(null)}create(d,s){if(s!==null)return new n(d,s);if(d!==null&&d.depth>=this._maxCacheDepth)return new n(d,s);const l=b.getStackElementId(d);let o=this._entries[l];return o||(o=new n(d,null),this._entries[l]=o,o)}}i._INSTANCE=new i(_);class n{constructor(d,s){this.stack=d,this.embeddedLanguageData=s}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,s){this._lastTokenType===s&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=s,this._lastTokenLanguage=this._languageId,this._tokens.push(new k.Token(d,s,this._languageId)))}nestedLanguageTokenize(d,s,l,o){const g=l.languageId,h=l.state,m=k.TokenizationRegistry.get(g);if(!m)return this.enterLanguage(g),this.emit(o,""),h;const C=m.tokenize(d,s,h);if(o!==0)for(const w of C.tokens)this._tokens.push(new k.Token(w.offset+o,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 r{constructor(d,s){this._languageService=d,this._theme=s,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(d){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(d)}emit(d,s){const l=this._theme.match(this._currentLanguageId,s)|1024;this._lastTokenMetadata!==l&&(this._lastTokenMetadata=l,this._tokens.push(d),this._tokens.push(l))}static _merge(d,s,l){const o=d!==null?d.length:0,g=s.length,h=l!==null?l.length:0;if(o===0&&g===0&&h===0)return new Uint32Array(0);if(o===0&&g===0)return l;if(g===0&&h===0)return d;const m=new Uint32Array(o+g+h);d!==null&&m.set(d);for(let C=0;C<g;C++)m[o+C]=s[C];return l!==null&&m.set(l,o+g),m}nestedLanguageTokenize(d,s,l,o){const g=l.languageId,h=l.state,m=k.TokenizationRegistry.get(g);if(!m)return this.enterLanguage(g),this.emit(o,""),h;const C=m.tokenizeEncoded(d,s,h);if(o!==0)for(let w=0,D=C.tokens.length;w<D;w+=2)C.tokens[w]+=o;return this._prependTokens=r._merge(this._prependTokens,this._tokens,C.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,C.endState}finalize(d){return new k.EncodedTokenizationResult(r._merge(this._prependTokens,this._tokens,null),d)}}let u=p=class extends L.Disposable{constructor(d,s,l,o,g){super(),this._configurationService=g,this._languageService=d,this._standaloneThemeService=s,this._languageId=l,this._lexer=o,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let h=!1;this._register(k.TokenizationRegistry.onDidChange(m=>{if(h)return;let C=!1;for(let w=0,D=m.changedLanguages.length;w<D;w++){const I=m.changedLanguages[w];if(this._embeddedLanguages[I]){C=!0;break}}C&&(h=!0,k.TokenizationRegistry.handleChange([this._languageId]),h=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(m=>{m.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const d=[];for(const s in this._embeddedLanguages){const l=k.TokenizationRegistry.get(s);if(l){if(l instanceof p){const o=l.getLoadStatus();o.loaded===!1&&d.push(o.promise)}continue}k.TokenizationRegistry.isResolved(s)||d.push(k.TokenizationRegistry.getOrCreate(s))}return d.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(d).then(s=>{})}}getInitialState(){const d=v.create(null,this._lexer.start);return i.create(d,null)}tokenize(d,s,l){if(d.length>=this._maxTokenizationLineLength)return(0,y.nullTokenize)(this._languageId,l);const o=new t,g=this._tokenize(d,s,l,o);return o.finalize(g)}tokenizeEncoded(d,s,l){if(d.length>=this._maxTokenizationLineLength)return(0,y.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),l);const o=new r(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),g=this._tokenize(d,s,l,o);return o.finalize(g)}_tokenize(d,s,l,o){return l.embeddedLanguageData?this._nestedTokenize(d,s,l,0,o):this._myTokenize(d,s,l,0,o)}_findLeavingNestedLanguageOffset(d,s){let l=this._lexer.tokenizer[s.stack.state];if(!l&&(l=E.findRules(this._lexer,s.stack.state),!l))throw E.createError(this._lexer,"tokenizer state is not defined: "+s.stack.state);let o=-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||(o===-1||w<o)&&(o=w)}if(!g)throw E.createError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+s.stack.state);return o}_nestedTokenize(d,s,l,o,g){const h=this._findLeavingNestedLanguageOffset(d,l);if(h===-1){const w=g.nestedLanguageTokenize(d,s,l.embeddedLanguageData,o);return i.create(l.stack,new a(l.embeddedLanguageData.languageId,w))}const m=d.substring(0,h);m.length>0&&g.nestedLanguageTokenize(m,!1,l.embeddedLanguageData,o);const C=d.substring(h);return this._myTokenize(C,s,l,o+h,g)}_safeRuleName(d){return d?d.name:"(unknown)"}_myTokenize(d,s,l,o,g){g.enterLanguage(this._languageId);const h=d.length,m=s&&this._lexer.includeLF?d+`
|
||
`:d,C=m.length;let w=l.embeddedLanguageData,D=l.stack,I=0,T=null,A=!0;for(;A||I<C;){const P=I,N=D.depth,M=T?T.groups.length:0,R=D.state;let x=null,O=null,B=null,W=null,V=null;if(T){x=T.matches;const q=T.groups.shift();O=q.matched,B=q.action,W=T.rule,T.groups.length===0&&(T=null)}else{if(!A&&I>=C)break;A=!1;let q=this._lexer.tokenizer[R];if(!q&&(q=E.findRules(this._lexer,R),!q))throw E.createError(this._lexer,"tokenizer state is not defined: "+R);const ie=m.substr(I);for(const ae of q)if((I===0||!ae.matchOnlyAtLineStart)&&(x=ie.match(ae.regex),x)){O=x[0],B=ae.action;break}}if(x||(x=[""],O=""),B||(I<C&&(x=[m.charAt(I)],O=x[0]),B=this._lexer.defaultToken),O===null)break;for(I+=O.length;E.isFuzzyAction(B)&&E.isIAction(B)&&B.test;)B=B.test(O,x,R,I===C);let K=null;if(typeof B=="string"||Array.isArray(B))K=B;else if(B.group)K=B.group;else if(B.token!==null&&B.token!==void 0){if(B.tokenSubst?K=E.substituteMatches(this._lexer,B.token,O,x,R):K=B.token,B.nextEmbedded)if(B.nextEmbedded==="@pop"){if(!w)throw E.createError(this._lexer,"cannot pop embedded language if not inside one");w=null}else{if(w)throw E.createError(this._lexer,"cannot enter embedded language from within an embedded language");V=E.substituteMatches(this._lexer,B.nextEmbedded,O,x,R)}if(B.goBack&&(I=Math.max(0,I-B.goBack)),B.switchTo&&typeof B.switchTo=="string"){let q=E.substituteMatches(this._lexer,B.switchTo,O,x,R);if(q[0]==="@"&&(q=q.substr(1)),E.findRules(this._lexer,q))D=D.switchTo(q);else throw E.createError(this._lexer,"trying to switch to a state '"+q+"' that is undefined in rule: "+this._safeRuleName(W))}else{if(B.transform&&typeof B.transform=="function")throw E.createError(this._lexer,"action.transform not supported");if(B.next)if(B.next==="@push"){if(D.depth>=this._lexer.maxStack)throw E.createError(this._lexer,"maximum tokenizer stack size reached: ["+D.state+","+D.parent.state+",...]");D=D.push(R)}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 q=E.substituteMatches(this._lexer,B.next,O,x,R);if(q[0]==="@"&&(q=q.substr(1)),E.findRules(this._lexer,q))D=D.push(q);else throw E.createError(this._lexer,"trying to set a next state '"+q+"' 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,O,x,R))}if(K===null)throw E.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(W));const F=q=>{const ie=this._languageService.getLanguageIdByLanguageName(q)||this._languageService.getLanguageIdByMimeType(q)||q,ae=this._getNestedEmbeddedLanguageData(ie);if(I<C){const ne=d.substr(I);return this._nestedTokenize(ne,s,i.create(D,ae),o+I,g)}else return i.create(D,ae)};if(Array.isArray(K)){if(T&&T.groups.length>0)throw E.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(W));if(x.length!==K.length+1)throw E.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(W));let q=0;for(let ie=1;ie<x.length;ie++)q+=x[ie].length;if(q!==O.length)throw E.createError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(W));T={rule:W,matches:x,groups:[]};for(let ie=0;ie<K.length;ie++)T.groups[ie]={action:K[ie],matched:x[ie+1]};I-=O.length;continue}else{if(K==="@rematch"&&(I-=O.length,O="",x=null,K="",V!==null))return F(V);if(O.length===0){if(C===0||N!==D.depth||R!==D.state||(T?T.groups.length:0)!==M)continue;throw E.createError(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(W))}let q=null;if(E.isString(K)&&K.indexOf("@brackets")===0){const ie=K.substr(9),ae=f(this._lexer,O);if(!ae)throw E.createError(this._lexer,"@brackets token returned but no bracket defined as: "+O);q=E.sanitize(ae.token+ie)}else{const ie=K===""?"":K+this._lexer.tokenPostfix;q=E.sanitize(ie)}P<h&&g.emit(P+o,q)}if(V!==null)return F(V)}return i.create(D,w)}_getNestedEmbeddedLanguageData(d){if(!this._languageService.isRegisteredLanguageId(d))return new a(d,y.NullState);d!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(d),k.TokenizationRegistry.getOrCreate(d),this._embeddedLanguages[d]=!0);const s=k.TokenizationRegistry.get(d);return s?new a(d,s.getInitialState()):new a(d,y.NullState)}};e.MonarchTokenizer=u,e.MonarchTokenizer=u=p=ke([ge(4,S.IConfigurationService)],u);function f(c,d){if(!d)return null;d=E.fixCase(c,d);const s=c.brackets;for(const l of s){if(l.open===d)return{token:l.token,bracketType:1};if(l.close===d)return{token:l.token,bracketType:-1}}return null}}),define(se[767],oe([1,0,93,11,31,94,120,86,345]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Colorizer=void 0;const v=(0,L.createTrustedTypesPolicy)("standaloneColorizer",{createHTML:t=>t});class b{static colorizeElement(r,u,f,c){c=c||{};const d=c.theme||"vs",s=c.mimeType||f.getAttribute("lang")||f.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const l=u.getLanguageIdByMimeType(s)||s;r.setTheme(d);const o=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,o||"",l,c).then(g,h=>console.error(h))}static async colorize(r,u,f,c){const d=r.languageIdCodec;let s=4;c&&typeof c.tabSize=="number"&&(s=c.tabSize),k.startsWithUTF8BOM(u)&&(u=u.substr(1));const l=k.splitLines(u);if(!r.isRegisteredLanguageId(f))return i(l,s,d);const o=await y.TokenizationRegistry.getOrCreate(f);return o?a(l,s,o,d):i(l,s,d)}static colorizeLine(r,u,f,c,d=4){const s=p.ViewLineRenderingData.isBasicASCII(r,u),l=p.ViewLineRenderingData.containsRTL(r,s,f);return(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,r,!1,s,l,0,c,[],d,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,u,f=4){const c=r.getLineContent(u);r.tokenization.forceTokenization(u);const s=r.tokenization.getLineTokens(u).inflate();return this.colorizeLine(c,r.mightContainNonBasicASCII(),r.mightContainRTL(),s,f)}}e.Colorizer=b;function a(t,r,u,f){return new Promise((c,d)=>{const s=()=>{const l=n(t,r,u,f);if(u instanceof _.MonarchTokenizer){const o=u.getLoadStatus();if(o.loaded===!1){o.promise.then(s,d);return}}c(l)};s()})}function i(t,r,u){let f=[];const d=new Uint32Array(2);d[0]=0,d[1]=33587200;for(let s=0,l=t.length;s<l;s++){const o=t[s];d[0]=o.length;const g=new E.LineTokens(d,o,u),h=p.ViewLineRenderingData.isBasicASCII(o,!0),m=p.ViewLineRenderingData.containsRTL(o,h,!0),C=(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,o,!1,h,m,0,g,[],r,0,0,0,0,-1,"none",!1,!1,null));f=f.concat(C.html),f.push("<br/>")}return f.join("")}function n(t,r,u,f){let c=[],d=u.getInitialState();for(let s=0,l=t.length;s<l;s++){const o=t[s],g=u.tokenizeEncoded(o,!0,d);E.LineTokens.convertToEndOffset(g.tokens,o.length);const h=new E.LineTokens(g.tokens,o,f),m=p.ViewLineRenderingData.isBasicASCII(o,!0),C=p.ViewLineRenderingData.containsRTL(o,m,!0),w=(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,o,!1,m,C,0,h.inflate(),[],r,0,0,0,0,-1,"none",!1,!1,null));c=c.concat(w.html),c.push("<br/>"),d=g.endState}return c.join("")}}),define(se[15],oe([1,0,17,11,758,8,739]),function(te,e,L,k,y,E,S){"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 _=Object.prototype.hasOwnProperty,v={regexParsingWithErrorRecovery:!0},b=(0,S.localize)(0,null),a=(0,S.localize)(1,null),i=(0,S.localize)(2,null),n=(0,S.localize)(3,null),t=(0,S.localize)(4,null),r=(0,S.localize)(5,null),u=(0,S.localize)(6,null),f=(0,S.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:a});return}this._tokens=this._scanner.reset($).scan(),this._current=0,this._parsingErrors=[];try{const J=this._expr();if(!this._isAtEnd()){const Q=this._peek(),re=Q.type===17?r:void 0;throw this._parsingErrors.push({message:t,offset:Q.offset,lexeme:y.Scanner.getLexeme(Q),additionalInfo:re}),c._parseError}return J}catch(J){if(J!==c._parseError)throw J;return}}_expr(){return this._or()}_or(){const $=[this._and()];for(;this._matchOne(16);){const J=this._and();$.push(J)}return $.length===1?$[0]:d.or(...$)}_and(){const $=[this._term()];for(;this._matchOne(15);){const J=this._term();$.push(J)}return $.length===1?$[0]:d.and(...$)}_term(){if(this._matchOne(2)){const $=this._peek();switch($.type){case 11:return this._advance(),o.INSTANCE;case 12:return this._advance(),g.INSTANCE;case 0:{this._advance();const J=this._expr();return this._consume(1,n),J?.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 J=this._expr();return this._consume(1,n),J}case 17:{const J=$.lexeme;if(this._advance(),this._matchOne(9)){const re=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),re.type!==10)throw this._errExpectedButGot("REGEX",re);const de=re.lexeme,he=de.lastIndexOf("/"),me=he===de.length-1?void 0:this._removeFlagsGY(de.substring(he+1));let X;try{X=new RegExp(de.substring(1,he),me)}catch{throw this._errExpectedButGot("REGEX",re)}return R.create(J,X)}switch(re.type){case 10:case 19:{const de=[re.lexeme];this._advance();let he=this._peek(),me=0;for(let H=0;H<re.lexeme.length;H++)re.lexeme.charCodeAt(H)===40?me++:re.lexeme.charCodeAt(H)===41&&me--;for(;!this._isAtEnd()&&he.type!==15&&he.type!==16;){switch(he.type){case 0:me++;break;case 1:me--;break;case 10:case 18:for(let H=0;H<he.lexeme.length;H++)he.lexeme.charCodeAt(H)===40?me++:re.lexeme.charCodeAt(H)===41&&me--}if(me<0)break;de.push(y.Scanner.getLexeme(he)),this._advance(),he=this._peek()}const X=de.join(""),U=X.lastIndexOf("/"),G=U===X.length-1?void 0:this._removeFlagsGY(X.substring(U+1));let z;try{z=new RegExp(X.substring(1,U),G)}catch{throw this._errExpectedButGot("REGEX",re)}return d.regex(J,z)}case 18:{const de=re.lexeme;this._advance();let he=null;if(!(0,k.isFalsyOrWhitespace)(de)){const me=de.indexOf("/"),X=de.lastIndexOf("/");if(me!==X&&me>=0){const U=de.slice(me+1,X),G=de[X+1]==="i"?"i":"";try{he=new RegExp(U,G)}catch{throw this._errExpectedButGot("REGEX",re)}}}if(he===null)throw this._errExpectedButGot("REGEX",re);return R.create(J,he)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,i);const re=this._value();return d.notIn(J,re)}switch(this._peek().type){case 3:{this._advance();const re=this._value();if(this._previous().type===18)return d.equals(J,re);switch(re){case"true":return d.has(J);case"false":return d.not(J);default:return d.equals(J,re)}}case 4:{this._advance();const re=this._value();if(this._previous().type===18)return d.notEquals(J,re);switch(re){case"true":return d.not(J);case"false":return d.has(J);default:return d.notEquals(J,re)}}case 5:return this._advance(),N.create(J,this._value());case 6:return this._advance(),M.create(J,this._value());case 7:return this._advance(),A.create(J,this._value());case 8:return this._advance(),P.create(J,this._value());case 13:return this._advance(),d.in(J,this._value());default:return d.has(J)}}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($,J){if(this._check($))return this._advance();throw this._errExpectedButGot(J,this._peek())}_errExpectedButGot($,J,Q){const re=(0,S.localize)(8,null,$,y.Scanner.getLexeme(J)),de=J.offset,he=y.Scanner.getLexeme(J);return this._parsingErrors.push({message:re,offset:de,lexeme:he,additionalInfo:Q}),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 o.INSTANCE}static true(){return g.INSTANCE}static has($){return h.create($)}static equals($,J){return m.create($,J)}static notEquals($,J){return D.create($,J)}static regex($,J){return R.create($,J)}static in($,J){return C.create($,J)}static notIn($,J){return w.create($,J)}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 s(ne,$){const J=ne?ne.substituteConstants():void 0,Q=$?$.substituteConstants():void 0;return!J&&!Q?!0:!J||!Q?!1:J.equals(Q)}e.expressionsAreEqualWithConstantSubstitution=s;function l(ne,$){return ne.cmp($)}class o{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=o,o.INSTANCE=new o;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 o.INSTANCE}}e.ContextKeyTrueExpr=g,g.INSTANCE=new g;class h{static create($,J=null){const Q=p.get($);return typeof Q=="boolean"?Q?g.INSTANCE:o.INSTANCE:new h($,J)}constructor($,J){this.key=$,this.negated=J,this.type=2}cmp($){return $.type!==this.type?this.type-$.type:K(this.key,$.key)}equals($){return $.type===this.type?this.key===$.key:!1}substituteConstants(){const $=p.get(this.key);return typeof $=="boolean"?$?g.INSTANCE:o.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($,J,Q=null){if(typeof J=="boolean")return J?h.create($,Q):I.create($,Q);const re=p.get($);return typeof re=="boolean"?J===(re?"true":"false")?g.INSTANCE:o.INSTANCE:new m($,J,Q)}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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 J=$?"true":"false";return this.value===J?g.INSTANCE:o.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($,J){return new C($,J)}constructor($,J){this.key=$,this.valueKey=J,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 J=$.getValue(this.valueKey),Q=$.getValue(this.key);return Array.isArray(J)?J.includes(Q):typeof Q=="string"&&typeof J=="object"&&J!==null?_.call(J,Q):!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($,J){return new w($,J)}constructor($,J){this.key=$,this.valueKey=J,this.type=11,this._negated=C.create($,J)}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($,J,Q=null){if(typeof J=="boolean")return J?I.create($,Q):h.create($,Q);const re=p.get($);return typeof re=="boolean"?J===(re?"true":"false")?o.INSTANCE:g.INSTANCE:new D($,J,Q)}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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 J=$?"true":"false";return this.value===J?o.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($,J=null){const Q=p.get($);return typeof Q=="boolean"?Q?o.INSTANCE:g.INSTANCE:new I($,J)}constructor($,J){this.key=$,this.negated=J,this.type=3}cmp($){return $.type!==this.type?this.type-$.type:K(this.key,$.key)}equals($){return $.type===this.type?this.key===$.key:!1}substituteConstants(){const $=p.get(this.key);return typeof $=="boolean"?$?o.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 T(ne,$){if(typeof ne=="string"){const J=parseFloat(ne);isNaN(J)||(ne=J)}return typeof ne=="string"||typeof ne=="number"?$(ne):o.INSTANCE}class A{static create($,J,Q=null){return T(J,re=>new A($,re,Q))}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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=M.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=A;class P{static create($,J,Q=null){return T(J,re=>new P($,re,Q))}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=P;class N{static create($,J,Q=null){return T(J,re=>new N($,re,Q))}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=N;class M{static create($,J,Q=null){return T(J,re=>new M($,re,Q))}constructor($,J,Q){this.key=$,this.value=J,this.negated=Q,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=M;class R{static create($,J){return new R($,J)}constructor($,J){this.key=$,this.regexp=J,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 J=this.regexp?this.regexp.source:"",Q=$.regexp?$.regexp.source:"";return J<Q?-1:J>Q?1:0}equals($){if($.type===this.type){const J=this.regexp?this.regexp.source:"",Q=$.regexp?$.regexp.source:"";return this.key===$.key&&J===Q}return!1}substituteConstants(){return this}evaluate($){const J=$.getValue(this.key);return this.regexp?this.regexp.test(J):!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=R;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 O(ne){let $=null;for(let J=0,Q=ne.length;J<Q;J++){const re=ne[J].substituteConstants();if(ne[J]!==re&&$===null){$=[];for(let de=0;de<J;de++)$[de]=ne[de]}$!==null&&($[J]=re)}return $===null?ne:$}class B{static create($,J,Q){return B._normalizeArr($,J,Q)}constructor($,J){this.expr=$,this.negated=J,this.type=6}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 J=0,Q=this.expr.length;J<Q;J++){const re=l(this.expr[J],$.expr[J]);if(re!==0)return re}return 0}equals($){if($.type===this.type){if(this.expr.length!==$.expr.length)return!1;for(let J=0,Q=this.expr.length;J<Q;J++)if(!this.expr[J].equals($.expr[J]))return!1;return!0}return!1}substituteConstants(){const $=O(this.expr);return $===this.expr?this:B.create($,this.negated,!1)}evaluate($){for(let J=0,Q=this.expr.length;J<Q;J++)if(!this.expr[J].evaluate($))return!1;return!0}static _normalizeArr($,J,Q){const re=[];let de=!1;for(const he of $)if(he){if(he.type===1){de=!0;continue}if(he.type===0)return o.INSTANCE;if(he.type===6){re.push(...he.expr);continue}re.push(he)}if(re.length===0&&de)return g.INSTANCE;if(re.length!==0){if(re.length===1)return re[0];re.sort(l);for(let he=1;he<re.length;he++)re[he-1].equals(re[he])&&(re.splice(he,1),he--);if(re.length===1)return re[0];for(;re.length>1;){const he=re[re.length-1];if(he.type!==9)break;re.pop();const me=re.pop(),X=re.length===0,U=W.create(he.expr.map(G=>B.create([G,me],null,Q)),null,X);U&&(re.push(U),re.sort(l))}if(re.length===1)return re[0];if(Q){for(let he=0;he<re.length;he++)for(let me=he+1;me<re.length;me++)if(re[he].negate().equals(re[me]))return o.INSTANCE;if(re.length===1)return re[0]}return new B(re,J)}}serialize(){return this.expr.map($=>$.serialize()).join(" && ")}keys(){const $=[];for(const J of this.expr)$.push(...J.keys());return $}negate(){if(!this.negated){const $=[];for(const J of this.expr)$.push(J.negate());this.negated=W.create($,this,!0)}return this.negated}}e.ContextKeyAndExpr=B;class W{static create($,J,Q){return W._normalizeArr($,J,Q)}constructor($,J){this.expr=$,this.negated=J,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 J=0,Q=this.expr.length;J<Q;J++){const re=l(this.expr[J],$.expr[J]);if(re!==0)return re}return 0}equals($){if($.type===this.type){if(this.expr.length!==$.expr.length)return!1;for(let J=0,Q=this.expr.length;J<Q;J++)if(!this.expr[J].equals($.expr[J]))return!1;return!0}return!1}substituteConstants(){const $=O(this.expr);return $===this.expr?this:W.create($,this.negated,!1)}evaluate($){for(let J=0,Q=this.expr.length;J<Q;J++)if(this.expr[J].evaluate($))return!0;return!1}static _normalizeArr($,J,Q){let re=[],de=!1;if($){for(let he=0,me=$.length;he<me;he++){const X=$[he];if(X){if(X.type===0){de=!0;continue}if(X.type===1)return g.INSTANCE;if(X.type===9){re=re.concat(X.expr);continue}re.push(X)}}if(re.length===0&&de)return o.INSTANCE;re.sort(l)}if(re.length!==0){if(re.length===1)return re[0];for(let he=1;he<re.length;he++)re[he-1].equals(re[he])&&(re.splice(he,1),he--);if(re.length===1)return re[0];if(Q){for(let he=0;he<re.length;he++)for(let me=he+1;me<re.length;me++)if(re[he].negate().equals(re[me]))return g.INSTANCE;if(re.length===1)return re[0]}return new W(re,J)}}serialize(){return this.expr.map($=>$.serialize()).join(" || ")}keys(){const $=[];for(const J of this.expr)$.push(...J.keys());return $}negate(){if(!this.negated){const $=[];for(const J of this.expr)$.push(J.negate());for(;$.length>1;){const J=$.shift(),Q=$.shift(),re=[];for(const de of ae(J))for(const he of ae(Q))re.push(B.create([de,he],null,!1));$.unshift(W.create(re,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($,J,Q){super($,null),this._defaultValue=J,typeof Q=="object"?V._info.push({...Q,key:$}):Q!==!0&&V._info.push({key:$,description:Q,type:J!=null?typeof J: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 K(ne,$){return ne<$?-1:ne>$?1:0}function F(ne,$,J,Q){return ne<J?-1:ne>J?1:$<Q?-1:$>Q?1:0}function q(ne,$){if(ne.type===0||$.type===1)return!0;if(ne.type===9)return $.type===9?ie(ne.expr,$.expr):!1;if($.type===9){for(const J of $.expr)if(q(ne,J))return!0;return!1}if(ne.type===6){if($.type===6)return ie($.expr,ne.expr);for(const J of ne.expr)if(q(J,$))return!0;return!1}return ne.equals($)}e.implies=q;function ie(ne,$){let J=0,Q=0;for(;J<ne.length&&Q<$.length;){const re=ne[J].cmp($[Q]);if(re<0)return!1;re===0&&J++,Q++}return J===ne.length}function ae(ne){return ne.type===9?ne.expr:[ne]}}),define(se[21],oe([1,0,639,15]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var y;(function(E){E.editorSimpleInput=new k.RawContextKey("editorSimpleInput",!1,!0),E.editorTextFocus=new k.RawContextKey("editorTextFocus",!1,L.localize(0,null)),E.focus=new k.RawContextKey("editorFocus",!1,L.localize(1,null)),E.textInputFocus=new k.RawContextKey("textInputFocus",!1,L.localize(2,null)),E.readOnly=new k.RawContextKey("editorReadonly",!1,L.localize(3,null)),E.inDiffEditor=new k.RawContextKey("inDiffEditor",!1,L.localize(4,null)),E.isEmbeddedDiffEditor=new k.RawContextKey("isEmbeddedDiffEditor",!1,L.localize(5,null)),E.inMultiDiffEditor=new k.RawContextKey("inMultiDiffEditor",!1,L.localize(6,null)),E.multiDiffEditorAllCollapsed=new k.RawContextKey("multiDiffEditorAllCollapsed",void 0,L.localize(7,null)),E.hasChanges=new k.RawContextKey("diffEditorHasChanges",!1,L.localize(8,null)),E.comparingMovedCode=new k.RawContextKey("comparingMovedCode",!1,L.localize(9,null)),E.accessibleDiffViewerVisible=new k.RawContextKey("accessibleDiffViewerVisible",!1,L.localize(10,null)),E.diffEditorRenderSideBySideInlineBreakpointReached=new k.RawContextKey("diffEditorRenderSideBySideInlineBreakpointReached",!1,L.localize(11,null)),E.columnSelection=new k.RawContextKey("editorColumnSelection",!1,L.localize(12,null)),E.writable=E.readOnly.toNegated(),E.hasNonEmptySelection=new k.RawContextKey("editorHasSelection",!1,L.localize(13,null)),E.hasOnlyEmptySelection=E.hasNonEmptySelection.toNegated(),E.hasMultipleSelections=new k.RawContextKey("editorHasMultipleSelections",!1,L.localize(14,null)),E.hasSingleSelection=E.hasMultipleSelections.toNegated(),E.tabMovesFocus=new k.RawContextKey("editorTabMovesFocus",!1,L.localize(15,null)),E.tabDoesNotMoveFocus=E.tabMovesFocus.toNegated(),E.isInWalkThroughSnippet=new k.RawContextKey("isInEmbeddedEditor",!1,!0),E.canUndo=new k.RawContextKey("canUndo",!1,!0),E.canRedo=new k.RawContextKey("canRedo",!1,!0),E.hoverVisible=new k.RawContextKey("editorHoverVisible",!1,L.localize(16,null)),E.hoverFocused=new k.RawContextKey("editorHoverFocused",!1,L.localize(17,null)),E.stickyScrollFocused=new k.RawContextKey("stickyScrollFocused",!1,L.localize(18,null)),E.stickyScrollVisible=new k.RawContextKey("stickyScrollVisible",!1,L.localize(19,null)),E.standaloneColorPickerVisible=new k.RawContextKey("standaloneColorPickerVisible",!1,L.localize(20,null)),E.standaloneColorPickerFocused=new k.RawContextKey("standaloneColorPickerFocused",!1,L.localize(21,null)),E.inCompositeEditor=new k.RawContextKey("inCompositeEditor",void 0,L.localize(22,null)),E.notInCompositeEditor=E.inCompositeEditor.toNegated(),E.languageId=new k.RawContextKey("editorLangId","",L.localize(23,null)),E.hasCompletionItemProvider=new k.RawContextKey("editorHasCompletionItemProvider",!1,L.localize(24,null)),E.hasCodeActionsProvider=new k.RawContextKey("editorHasCodeActionsProvider",!1,L.localize(25,null)),E.hasCodeLensProvider=new k.RawContextKey("editorHasCodeLensProvider",!1,L.localize(26,null)),E.hasDefinitionProvider=new k.RawContextKey("editorHasDefinitionProvider",!1,L.localize(27,null)),E.hasDeclarationProvider=new k.RawContextKey("editorHasDeclarationProvider",!1,L.localize(28,null)),E.hasImplementationProvider=new k.RawContextKey("editorHasImplementationProvider",!1,L.localize(29,null)),E.hasTypeDefinitionProvider=new k.RawContextKey("editorHasTypeDefinitionProvider",!1,L.localize(30,null)),E.hasHoverProvider=new k.RawContextKey("editorHasHoverProvider",!1,L.localize(31,null)),E.hasDocumentHighlightProvider=new k.RawContextKey("editorHasDocumentHighlightProvider",!1,L.localize(32,null)),E.hasDocumentSymbolProvider=new k.RawContextKey("editorHasDocumentSymbolProvider",!1,L.localize(33,null)),E.hasReferenceProvider=new k.RawContextKey("editorHasReferenceProvider",!1,L.localize(34,null)),E.hasRenameProvider=new k.RawContextKey("editorHasRenameProvider",!1,L.localize(35,null)),E.hasSignatureHelpProvider=new k.RawContextKey("editorHasSignatureHelpProvider",!1,L.localize(36,null)),E.hasInlayHintsProvider=new k.RawContextKey("editorHasInlayHintsProvider",!1,L.localize(37,null)),E.hasDocumentFormattingProvider=new k.RawContextKey("editorHasDocumentFormattingProvider",!1,L.localize(38,null)),E.hasDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,L.localize(39,null)),E.hasMultipleDocumentFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,L.localize(40,null)),E.hasMultipleDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,L.localize(41,null))})(y||(e.EditorContextKeys=y={}))}),define(se[240],oe([1,0,35,11,85,15,2,695]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionContextKeys=void 0;class _ extends S.Disposable{constructor(b,a){super(),this.contextKeyService=b,this.model=a,this.inlineCompletionVisible=_.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=_.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=_.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=_.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,L.autorun)(i=>{const n=this.model.read(i),t=n?.state.read(i),r=!!t?.inlineCompletion&&t?.ghostText!==void 0&&!t?.ghostText.isEmpty();this.inlineCompletionVisible.set(r),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,r=!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],s=n.textModel.getLineIndentColumn(u.lineNumber);if(f<=s){let o=(0,k.firstNonWhitespaceIndex)(d);o===-1&&(o=d.length-1),t=o>0;const g=n.textModel.getOptions().tabSize;r=y.CursorColumns.visibleColumnFromColumn(d,o+1,g)<g}}this.inlineCompletionSuggestsIndentation.set(t),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(r)}))}}e.InlineCompletionContextKeys=_,_.inlineSuggestionVisible=new E.RawContextKey("inlineSuggestionVisible",!1,(0,p.localize)(0,null)),_.inlineSuggestionHasIndentation=new E.RawContextKey("inlineSuggestionHasIndentation",!1,(0,p.localize)(1,null)),_.inlineSuggestionHasIndentationLessThanTabSize=new E.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,p.localize)(2,null)),_.suppressSuggestions=new E.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,(0,p.localize)(3,null))}),define(se[241],oe([1,0,19,12,20,22,10,31,18,68,25,15]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new a.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new a.RawContextKey("parameterHintsMultipleSignatures",!1)};async function i(n,t,r,u,f){const c=n.ordered(t);for(const d of c)try{const s=await d.provideSignatureHelp(t,r,f,u);if(s)return s}catch(s){(0,k.onUnexpectedExternalError)(s)}}e.provideSignatureHelp=i,b.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",async(n,...t)=>{const[r,u,f]=t;(0,y.assertType)(E.URI.isUri(r)),(0,y.assertType)(S.Position.isIPosition(u)),(0,y.assertType)(typeof f=="string"||!f);const c=n.get(_.ILanguageFeaturesService),d=await n.get(v.ITextModelService).createModelReference(r);try{const s=await i(c.signatureHelpProvider,d.object.textEditorModel,S.Position.lift(u),{triggerKind:p.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:f},L.CancellationToken.None);return s?(setTimeout(()=>s.dispose(),0),s.value):void 0}finally{d.dispose()}})}),define(se[768],oe([1,0,14,12,6,2,128,31,241]),function(te,e,L,k,y,E,S,p,_){"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,r=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 S.CharacterSet,this.retriggerChars=new S.CharacterSet,this.triggerId=0,this.editor=n,this.providers=t,this.throttledDelayer=new L.Delayer(r),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 r=this.editor.getModel();if(!r||!this.providers.has(r))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,r=t%n===n-1,u=this.editor.getOption(85).cycle;if((n<2||r)&&!u){this.cancel();return}this.updateActiveSignature(r&&u?0:t+1)}previous(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t===0,u=this.editor.getOption(85).cycle;if((n<2||r)&&!u){this.cancel();return}this.updateActiveSignature(r&&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,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const u=this._pendingTriggers.reduce(a);this._pendingTriggers=[];const f={triggerKind:u.triggerKind,triggerCharacter:u.triggerCharacter,isRetrigger:t,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;const c=this.editor.getModel(),d=this.editor.getPosition();this.state=new v.Pending((0,L.createCancelablePromise)(s=>(0,_.provideSignatureHelp)(this.providers,c,d,f,s)),r);try{const s=await this.state.request;return n!==this.triggerId?(s?.dispose(),!1):!s||!s.value.signatures||s.value.signatures.length===0?(s?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new v.Active(s.value),this._lastSignatureHelpResult.value=s,this._onChangedHints.fire(this.state.hints),!0)}catch(s){return n===this.triggerId&&(this.state=v.Default),(0,k.onUnexpectedError)(s),!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 r of t.signatureHelpTriggerCharacters||[])if(r.length){const u=r.charCodeAt(0);this.triggerChars.add(u),this.retriggerChars.add(u)}for(const r of t.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(n){if(!this.triggerOnType)return;const t=n.length-1,r=n.charCodeAt(t);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&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 a(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(se[769],oe([1,0,15]),function(te,e,L){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let y=k=class{constructor(S,p){this._editor=S,this._index=0,this._ckOtherSuggestions=k.OtherSuggestions.bindTo(p)}dispose(){this.reset()}reset(){var S;this._ckOtherSuggestions.reset(),(S=this._listener)===null||S===void 0||S.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:S,index:p},_){if(S.items.length===0){this.reset();return}if(k._moveIndex(!0,S,p)===p){this.reset();return}this._acceptNext=_,this._model=S,this._index=p,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(S,p,_){let v=_;for(let b=p.items.length;b>0&&(v=(v+p.items.length+(S?1:-1))%p.items.length,!(v===_||!p.items[v].completion.additionalTextEdits));b--);return v}next(){this._move(!0)}prev(){this._move(!1)}_move(S){if(this._model)try{this._ignore=!0,this._index=k._moveIndex(S,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=ke([ge(1,L.IContextKeyService)],y)}),define(se[770],oe([1,0,15]),function(te,e,L){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let y=k=class{constructor(S,p){this._editor=S,this._enabled=!1,this._ckAtEnd=k.AtEnd.bindTo(p),this._configListener=this._editor.onDidChangeConfiguration(_=>_.hasChanged(122)&&this._update()),this._update()}dispose(){var S;this._configListener.dispose(),(S=this._selectionListener)===null||S===void 0||S.dispose(),this._ckAtEnd.reset()}_update(){const S=this._editor.getOption(122)==="on";if(this._enabled!==S)if(this._enabled=S,this._enabled){const p=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const _=this._editor.getModel(),v=this._editor.getSelection(),b=_.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=ke([ge(1,L.IContextKeyService)],y)}),define(se[69],oe([1,0,15,8]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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)}),define(se[771],oe([1,0,54,13,6,2,55,17,328,335,492,202,36,149,235,69]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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 _.ElementSizeObserver(C,m.dimension)),this._rawOptions=o(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(a.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:a.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=o(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=ke([ge(3,r.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 s{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=s;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 s;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 o(g){const h=S.deepClone(g);return(0,b.migrateOptions)(h),h}}),define(se[772],oe([1,0,6,52,2,55,199,22,738,25,27,15]),function(te,e,L,k,y,E,S,p,_,v,b,a){"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 r extends n{constructor(D,I,T){super(D,null),this._configurationService=I,this._values=S.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(A=>{if(A.source===7){const P=Array.from(this._values,([N])=>N);this._values.clear(),T.fire(new c(P))}else{const P=[];for(const N of A.affectedKeys){const M=`config.${N}`,R=this._values.findSuperstr(M);R!==void 0&&(P.push(...k.Iterable.map(R,([x])=>x)),this._values.deleteSuperstr(M)),this._values.has(M)&&(P.push(M),this._values.delete(M))}T.fire(new c(P))}})}dispose(){this._listener.dispose()}getValue(D){if(D.indexOf(r._keyPrefix)!==0)return super.getValue(D);if(this._values.has(D))return this._values.get(D);const I=D.substr(r._keyPrefix.length),T=this._configurationService.getValue(I);let A;switch(typeof T){case"number":case"boolean":case"string":A=T;break;default:Array.isArray(T)?A=JSON.stringify(T):A=T}return this._values.set(D,A),A}setValue(D,I){return super.setValue(D,I)}removeValue(D){return super.removeValue(D)}}r._keyPrefix="config.";class u{constructor(D,I,T){this._service=D,this._key=I,this._defaultValue=T,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 s(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 T=this.getContextValuesContainer(this._myContextId);T&&T.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 o=class extends l{constructor(D){super(0),this._contexts=new Map,this._lastContextId=0;const I=this._register(new r(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=o,e.ContextKeyService=o=ke([ge(0,b.IConfigurationService)],o);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 T="";this._domNode.classList&&(T=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${T?": "+T:""}`)}this._domNode.setAttribute(i,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(D=>{const T=this._parent.getContextValuesContainer(this._myContextId).value;s(D,T)||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(a.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[...a.RawContextKey.all()].sort((w,D)=>w.key.localeCompare(D.key))},metadata:{description:(0,_.localize)(0,null),args:[]}}),v.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const w=[],D=new Set;for(const I of a.RawContextKey.all())D.has(I.key)||(D.add(I.key),w.push(I));w.sort((I,T)=>I.key.localeCompare(T.key)),console.log(JSON.stringify(w,void 0,2))})}),define(se[242],oe([1,0,17,740,15]),function(te,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(se[59],oe([1,0,8]),function(te,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(se[162],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,L.createDecorator)("dialogService")}),define(se[243],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEnvironmentService=void 0,e.IEnvironmentService=(0,L.createDecorator)("environmentService")}),define(se[244],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHoverService=void 0,e.IHoverService=(0,L.createDecorator)("hoverService")}),define(se[163],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class L{constructor(...y){this._entries=new Map;for(const[E,S]of y)this.set(E,S)}set(y,E){const S=this._entries.get(y);return this._entries.set(y,E),S}get(y){return this._entries.get(y)}}e.ServiceCollection=L}),define(se[773],oe([1,0,14,12,2,236,762,8,163,66]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const b=!1;class a extends Error{constructor(r){var u;super("cyclic dependency between services"),this.message=(u=r.findCycleSlow())!==null&&u!==void 0?u:`UNABLE to detect cycle, dumping graph:
|
||
${r.toString()}`}}class i{constructor(r=new _.ServiceCollection,u=!1,f,c=b){var d;this._services=r,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 S.Graph(s=>s):void 0}createChild(r){return new i(r,this._strict,this,this._enableTracing)}invokeFunction(r,...u){const f=n.traceInvocation(this._enableTracing,r);let c=!1;try{return r({get:s=>{if(c)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(s,f);if(!l)throw new Error(`[invokeFunction] unknown service '${s}'`);return l}},...u)}finally{c=!0,f.stop()}}createInstance(r,...u){let f,c;return r instanceof E.SyncDescriptor?(f=n.traceCreation(this._enableTracing,r.ctor),c=this._createInstance(r.ctor,r.staticArguments.concat(u),f)):(f=n.traceCreation(this._enableTracing,r),c=this._createInstance(r,u,f)),f.stop(),c}_createInstance(r,u=[],f){const c=p._util.getServiceDependencies(r).sort((l,o)=>l.index-o.index),d=[];for(const l of c){const o=this._getOrCreateServiceInstance(l.id,f);o||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${l.id}.`,!1),d.push(o)}const s=c.length>0?c[0].index:u.length;if(u.length!==s){console.trace(`[createInstance] First service dependency of ${r.name} at position ${s+1} conflicts with ${u.length} static arguments`);const l=s-u.length;l>0?u=u.concat(new Array(l)):u=u.slice(0,s)}return Reflect.construct(r,u.concat(d))}_setServiceInstance(r,u){if(this._services.get(r)instanceof E.SyncDescriptor)this._services.set(r,u);else if(this._parent)this._parent._setServiceInstance(r,u);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(r){const u=this._services.get(r);return!u&&this._parent?this._parent._getServiceInstanceOrDescriptor(r):u}_getOrCreateServiceInstance(r,u){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(r));const f=this._getServiceInstanceOrDescriptor(r);return f instanceof E.SyncDescriptor?this._safeCreateAndCacheServiceInstance(r,f,u.branch(r,!0)):(u.branch(r,!1),f)}_safeCreateAndCacheServiceInstance(r,u,f){if(this._activeInstantiations.has(r))throw new Error(`illegal state - RECURSIVELY instantiating service '${r}'`);this._activeInstantiations.add(r);try{return this._createAndCacheServiceInstance(r,u,f)}finally{this._activeInstantiations.delete(r)}}_createAndCacheServiceInstance(r,u,f){var c;const d=new S.Graph(o=>o.id.toString());let s=0;const l=[{id:r,desc:u,_trace:f}];for(;l.length;){const o=l.pop();if(d.lookupOrInsertNode(o),s++>1e3)throw new a(d);for(const g of p._util.getServiceDependencies(o.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(g.id);if(h||this._throwIfStrict(`[createInstance] ${r} depends on ${g.id} which is NOT registered.`,!0),(c=this._globalGraph)===null||c===void 0||c.insertEdge(String(o.id),String(g.id)),h instanceof E.SyncDescriptor){const m={id:g.id,desc:h,_trace:o._trace.branch(g.id,!0)};d.insertEdge(o,m),l.push(m)}}}for(;;){const o=d.roots();if(o.length===0){if(!d.isEmpty())throw new a(d);break}for(const{data:g}of o){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(r)}_createServiceInstanceWithOwner(r,u,f=[],c,d){if(this._services.get(r)instanceof E.SyncDescriptor)return this._createServiceInstance(r,u,f,c,d);if(this._parent)return this._parent._createServiceInstanceWithOwner(r,u,f,c,d);throw new Error(`illegalState - creating UNKNOWN service instance ${u.name}`)}_createServiceInstance(r,u,f=[],c,d){if(c){const s=new i(void 0,this._strict,this,this._enableTracing);s._globalGraphImplicitDependency=String(r);const l=new Map,o=new L.GlobalIdleValue(()=>{const g=s._createInstance(u,f,d);for(const[h,m]of l){const C=g[h];if(typeof C=="function")for(const w of m)w.disposable=C.apply(g,w.listener)}return l.clear(),g});return new Proxy(Object.create(null),{get(g,h){if(!o.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,T,A)=>{if(o.isInitialized)return o.value[h](I,T,A);{const P={listener:[I,T,A],disposable:void 0},N=w.push(P);return(0,y.toDisposable)(()=>{var R;N(),(R=P.disposable)===null||R===void 0||R.dispose()})}}}if(h in g)return g[h];const m=o.value;let C=m[h];return typeof C!="function"||(C=C.bind(m),g[h]=C),C},set(g,h,m){return o.value[h]=m,!0},getPrototypeOf(g){return u.prototype}})}else return this._createInstance(u,f,d)}_throwIfStrict(r,u){if(u&&console.warn(r),this._strict)throw new Error(r)}}e.InstantiationService=i;class n{static traceInvocation(r,u){return r?new n(2,u.name||new Error().stack.split(`
|
||
`).slice(3,4).join(`
|
||
`)):n._None}static traceCreation(r,u){return r?new n(1,u.name):n._None}constructor(r,u){this.type=r,this.name=u,this._start=Date.now(),this._dep=[]}branch(r,u){const f=new n(3,r.toString());return this._dep.push([r,u,f]),f}stop(){const r=Date.now()-this._start;n._totals+=r;let u=!1;function f(d,s){const l=[],o=new Array(d+1).join(" ");for(const[g,h,m]of s._dep)if(h&&m){u=!0,l.push(`${o}CREATES -> ${g}`);const C=f(d+1,m);C&&l.push(C)}else l.push(`${o}uses -> ${g}`);return l.join(`
|
||
`)}const c=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${f(1,this)}`,`DONE, took ${r.toFixed(2)}ms (grand total ${n._totals.toFixed(2)}ms)`];(r>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(se[774],oe([1,0,12,218,125]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class E extends y.ResolvedKeybinding{constructor(p,_){if(super(),_.length===0)throw(0,L.illegalArgument)("chords");this._os=p,this._chords=_}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(se[34],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,L.createDecorator)("keybindingService")}),define(se[346],oe([1,0,7,229,42,6,2,136,239,15,59,8,34,458]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.PostEditWidgetManager=void 0;let t=n=class extends S.Disposable{constructor(f,c,d,s,l,o,g,h,m,C){super(),this.typeId=f,this.editor=c,this.showCommand=s,this.range=l,this.edits=o,this.onSelectNewEdit=g,this._contextMenuService=h,this._keybindingService=C,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=d.bindTo(m),this.visibleContext.set(!0),this._register((0,S.toDisposable)(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,S.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(w=>{l.containsPosition(w.position)||this.dispose()})),this._register(E.Event.runAndSubscribe(C.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var f;const c=(f=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||f===void 0?void 0:f.getLabel();this.button.element.title=this.showCommand.label+(c?` (${c})`:"")}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 n.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const f=L.getDomNodePagePosition(this.button.element);return{x:f.left+f.width,y:f.top+f.height}},getActions:()=>this.edits.allEdits.map((f,c)=>(0,y.toAction)({id:"",label:f.label,checked:c===this.edits.activeEditIndex,run:()=>{if(c!==this.edits.activeEditIndex)return this.onSelectNewEdit(c)}}))})}};t.baseId="editor.widget.postEditWidget",t=n=ke([ge(7,b.IContextMenuService),ge(8,v.IContextKeyService),ge(9,i.IKeybindingService)],t);let r=class extends S.Disposable{constructor(f,c,d,s,l,o){super(),this._id=f,this._editor=c,this._visibleContext=d,this._showCommand=s,this._instantiationService=l,this._bulkEditService=o,this._currentWidget=this._register(new S.MutableDisposable),this._register(E.Event.any(c.onDidChangeModel,c.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(f,c,d,s){const l=this._editor.getModel();if(!l||!f.length)return;const o=c.allEdits[c.activeEditIndex];if(!o)return;const g=(0,_.createCombinedWorkspaceEdit)(l.uri,f,o),h=f[0],m=l.deltaDecorations([],[{range:h,options:{description:"paste-line-suffix",stickiness:0}}]);let C,w;try{C=await this._bulkEditService.apply(g,{editor:this._editor,token:s}),w=l.getDecorationRange(m[0])}finally{l.deltaDecorations(m,[])}d&&C.isApplied&&c.allEdits.length>1&&this.show(w??h,c,async D=>{const I=this._editor.getModel();I&&(await I.undo(),this.applyEditAndShowIfNeeded(f,{activeEditIndex:D,allEdits:c.allEdits},d,s))})}show(f,c,d){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(t,this._id,this._editor,this._visibleContext,this._showCommand,f,c,d))}clear(){this._currentWidget.clear()}tryShowSelector(){var f;(f=this._currentWidget.value)===null||f===void 0||f.showSelector()}};e.PostEditWidgetManager=r,e.PostEditWidgetManager=r=ke([ge(4,a.IInstantiationService),ge(5,p.IBulkEditService)],r)}),define(se[347],oe([1,0,15]),function(te,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(_,v,b){return{kind:2,commandId:_,commandArgs:v,isBubble:b}}class E{constructor(v,b,a){var i;this._log=a,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<t;n++){const r=this._keybindings[n];if(r.chords.length===0)continue;const u=(i=r.when)===null||i===void 0?void 0:i.substituteConstants();u&&u.type===0||this._addKeyPress(r.chords[0],r)}}static _isTargetedForRemoval(v,b,a){if(b){for(let i=0;i<b.length;i++)if(b[i]!==v.chords[i])return!1}return!(a&&a.type!==1&&(!v.when||!(0,L.expressionsAreEqualWithConstantSubstitution)(a,v.when)))}static handleRemovals(v){const b=new Map;for(let i=0,n=v.length;i<n;i++){const t=v[i];if(t.command&&t.command.charAt(0)==="-"){const r=t.command.substring(1);b.has(r)?b.get(r).push(t):b.set(r,[t])}}if(b.size===0)return v;const a=[];for(let i=0,n=v.length;i<n;i++){const t=v[i];if(!t.command||t.command.length===0){a.push(t);continue}if(t.command.charAt(0)==="-")continue;const r=b.get(t.command);if(!r||!t.isDefault){a.push(t);continue}let u=!1;for(const f of r){const c=f.when;if(this._isTargetedForRemoval(t,f.chords,c)){u=!0;break}}if(!u){a.push(t);continue}}return a}_addKeyPress(v,b){const a=this._map.get(v);if(typeof a>"u"){this._map.set(v,[b]),this._addToLookupMap(b);return}for(let i=a.length-1;i>=0;i--){const n=a[i];if(n.command===b.command)continue;let t=!0;for(let r=1;r<n.chords.length&&r<b.chords.length;r++)if(n.chords[r]!==b.chords[r]){t=!1;break}t&&E.whenIsEntirelyIncluded(n.when,b.when)&&this._removeFromLookupMap(n)}a.push(b),this._addToLookupMap(b)}_addToLookupMap(v){if(!v.command)return;let b=this._lookupMap.get(v.command);typeof b>"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 a=0,i=b.length;a<i;a++)if(b[a]===v){b.splice(a,1);return}}}static whenIsEntirelyIncluded(v,b){return!b||b.type===1?!0:!v||v.type===1?!1:(0,L.implies)(v,b)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(v,b){const a=this._lookupMap.get(v);if(typeof a>"u"||a.length===0)return null;if(a.length===1)return a[0];for(let i=a.length-1;i>=0;i--){const n=a[i];if(b.contextMatchesRules(n.when))return n}return a[a.length-1]}resolve(v,b,a){const i=[...b,a];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;u<f;u++){const c=n[u];if(i.length>c.chords.length)continue;let d=!0;for(let s=1;s<i.length;s++)if(c.chords[s]!==i[s]){d=!1;break}d&&t.push(c)}}const r=this._findCommand(v,t);return r?i.length<r.chords.length?(this._log(`\\ From ${t.length} keybinding entries, awaiting ${r.chords.length-i.length} more chord(s), when: ${S(r.when)}, source: ${p(r)}.`),k):(this._log(`\\ From ${t.length} keybinding entries, matched ${r.command}, when: ${S(r.when)}, source: ${p(r)}.`),y(r.command,r.commandArgs,r.bubble)):(this._log(`\\ From ${t.length} keybinding entries, no when clauses matched the context.`),e.NoMatchingKb)}_findCommand(v,b){for(let a=b.length-1;a>=0;a--){const i=b[a];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 _?`${_.serialize()}`:"no when condition"}function p(_){return _.extensionId?_.isBuiltinExtension?`built-in extension ${_.extensionId}`:`user extension ${_.extensionId}`:_.isDefault?"built-in":"user"}}),define(se[775],oe([1,0,14,12,6,270,2,743,347]),function(te,e,L,k,y,E,S,p,_){"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 S.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:y.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(n,t,r,u,f){super(),this._contextKeyService=n,this._commandService=t,this._telemetryService=r,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=a.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new L.TimeoutTimer,this._currentlyDispatchingCommandId=null,this._logging=!1}dispose(){super.dispose()}_log(n){this._logging&&this._logService.info(`[KeybindingService]: ${n}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(n,t){const r=this._getResolver().lookupPrimaryKeybinding(n,t||this._contextKeyService);if(r)return r.resolvedKeybinding}dispatchEvent(n,t){return this._dispatch(n,t)}softDispatch(n,t){this._log("/ Soft dispatching keyboard event");const r=this.resolveKeyboardEvent(n);if(r.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),_.NoMatchingKb;const[u]=r.getDispatchChords();if(u===null)return this._log("\\ Keyboard event cannot be dispatched"),_.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 r=this._currentChords.map(({label:u})=>u).join(", ");this._currentChordStatusMessage=this._notificationService.status(p.localize(1,null,r))}}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 r=this.resolveKeyboardEvent(n),[u]=r.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=a.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=a.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(r,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[f]=r.getChords();return this._ignoreSingleModifiers=new a(f),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(n,t,r=!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(r){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 s=this._contextKeyService.getContext(t),l=n.getLabel(),o=this._getResolver().resolve(s,d,c);switch(o.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 ${o.commandId} ]`),o.commandId===null||o.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(),o.isBubble||(f=!0),this._log(`+ Invoking command ${o.commandId}.`),this._currentlyDispatchingCommandId=o.commandId;try{typeof o.commandArgs>"u"?this._commandService.executeCommand(o.commandId).then(void 0,g=>this._notificationService.warn(g)):this._commandService.executeCommand(o.commandId,o.commandArgs).then(void 0,g=>this._notificationService.warn(g))}finally{this._currentlyDispatchingCommandId=null}v.test(o.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:o.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 a{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}}}a.EMPTY=new a(null)}),define(se[348],oe([1,0]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class L{constructor(E,S,p,_,v,b,a){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=S?S.charCodeAt(0)===94:!1,this.command=this.bubble?S.substr(1):S,this.commandArgs=p,this.when=_,this.isDefault=v,this.extensionId=b,this.isBuiltinExtension=a}}e.ResolvedKeybindingItem=L;function k(y){const E=[];for(let S=0,p=y.length;S<p;S++){const _=y[S];if(!_)return[];E.push(_)}return E}e.toEmptyArrayIfContainsNull=k}),define(se[776],oe([1,0,65,125,774,348]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class S extends y.BaseResolvedKeybinding{constructor(_,v){super(v,_)}_keyCodeToUILabel(_){if(this._os===2)switch(_){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return L.KeyCodeUtils.toString(_)}_getLabel(_){return _.isDuplicateModifierCase()?"":this._keyCodeToUILabel(_.keyCode)}_getAriaLabel(_){return _.isDuplicateModifierCase()?"":L.KeyCodeUtils.toString(_.keyCode)}_getElectronAccelerator(_){return L.KeyCodeUtils.toElectronAccelerator(_.keyCode)}_getUserSettingsLabel(_){if(_.isDuplicateModifierCase())return"";const v=L.KeyCodeUtils.toUserSettingsUS(_.keyCode);return v&&v.toLowerCase()}_getChordDispatch(_){return S.getDispatchStr(_)}static getDispatchStr(_){if(_.isModifierKey())return null;let v="";return _.ctrlKey&&(v+="ctrl+"),_.shiftKey&&(v+="shift+"),_.altKey&&(v+="alt+"),_.metaKey&&(v+="meta+"),v+=L.KeyCodeUtils.toString(_.keyCode),v}_getSingleModifierChordDispatch(_){return _.keyCode===5&&!_.shiftKey&&!_.altKey&&!_.metaKey?"ctrl":_.keyCode===4&&!_.ctrlKey&&!_.altKey&&!_.metaKey?"shift":_.keyCode===6&&!_.ctrlKey&&!_.shiftKey&&!_.metaKey?"alt":_.keyCode===57&&!_.ctrlKey&&!_.shiftKey&&!_.altKey?"meta":null}static _scanCodeToKeyCode(_){const v=L.IMMUTABLE_CODE_TO_KEY_CODE[_];if(v!==-1)return v;switch(_){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(_){if(!_)return null;if(_ instanceof k.KeyCodeChord)return _;const v=this._scanCodeToKeyCode(_.scanCode);return v===0?null:new k.KeyCodeChord(_.ctrlKey,_.shiftKey,_.altKey,_.metaKey,v)}static resolveKeybinding(_,v){const b=(0,E.toEmptyArrayIfContainsNull)(_.chords.map(a=>this._toKeyCodeChord(a)));return b.length>0?[new S(b,v)]:[]}}e.USLayoutResolvedKeybinding=S}),define(se[164],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,L.createDecorator)("labelService")}),define(se[123],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,L.createDecorator)("layoutService")}),define(se[349],oe([1,0,7,44,13,6,33,45,123]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let v=class{get mainContainer(){var i,n;return(n=(i=(0,y.firstOrDefault)(this._codeEditorService.listCodeEditors()))===null||i===void 0?void 0:i.getContainerDomNode())!==null&&n!==void 0?n:k.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,y.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=E.Event.None,this.onDidLayoutActiveContainer=E.Event.None,this.onDidLayoutContainer=E.Event.None,this.onDidChangeActiveContainer=E.Event.None,this.onDidAddContainer=E.Event.None,this.whenActiveContainerStylesLoaded=Promise.resolve(),this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};v=ke([ge(0,S.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=ke([ge(1,S.ICodeEditorService)],b),(0,p.registerSingleton)(_.ILayoutService,v,1)}),define(se[777],oe([1,0,7,44,6,2,69,27,15,123]),function(te,e,L,k,y,E,S,p,_,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=S.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const r=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(f=>{f.affectsConfiguration("editor.accessibilitySupport")&&(r(),this._onDidChangeScreenReaderOptimized.fire()),f.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),r(),this._register(this.onDidChangeScreenReaderOptimized(()=>r()));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=ke([ge(0,_.IContextKeyService),ge(1,v.ILayoutService),ge(2,p.IConfigurationService)],b)}),define(se[778],oe([1,0,318,2,123,7]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let S=class extends k.Disposable{constructor(_){super(),this.layoutService=_,this.currentViewDisposable=k.Disposable.None,this.contextView=this._register(new L.ContextView(this.layoutService.mainContainer,1)),this.layout(),this._register(_.onDidLayoutContainer(()=>this.layout()))}showContextView(_,v,b){let a;v?v===this.layoutService.getContainer((0,E.getWindow)(v))?a=1:b?a=3:a=2:a=1,this.contextView.setContainer(v??this.layoutService.activeContainer,a),this.contextView.show(_);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(_){this.contextView.hide(_)}dispose(){super.dispose(),this.currentViewDisposable.dispose(),this.currentViewDisposable=k.Disposable.None}};e.ContextViewService=S,e.ContextViewService=S=ke([ge(0,y.ILayoutService)],S)}),define(se[64],oe([1,0,6,2,15,8]),function(te,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 S;(function(a){a[a.Off=0]="Off",a[a.Trace=1]="Trace",a[a.Debug=2]="Debug",a[a.Info=3]="Info",a[a.Warning=4]="Warning",a[a.Error=5]="Error"})(S||(e.LogLevel=S={})),e.DEFAULT_LOG_LEVEL=S.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!==S.Off&&this.level<=i}}e.AbstractLogger=p;class _ extends p{constructor(i=e.DEFAULT_LOG_LEVEL,n=!0){super(),this.useColors=n,this.setLevel(i)}trace(i,...n){this.checkLogLevel(S.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",i,...n):console.log(i,...n))}debug(i,...n){this.checkLogLevel(S.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",i,...n):console.log(i,...n))}info(i,...n){this.checkLogLevel(S.Info)&&(this.useColors?console.log("%c INFO","color: #33f",i,...n):console.log(i,...n))}warn(i,...n){this.checkLogLevel(S.Warning)&&(this.useColors?console.log("%c WARN","color: #993",i,...n):console.log(i,...n))}error(i,...n){this.checkLogLevel(S.Error)&&(this.useColors?console.log("%c ERR","color: #f33",i,...n):console.error(i,...n))}}e.ConsoleLogger=_;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();super.dispose()}}e.MultiplexLogger=v;function b(a){switch(a){case S.Trace:return"trace";case S.Debug:return"debug";case S.Info:return"info";case S.Warning:return"warn";case S.Error:return"error";case S.Off:return"off"}}e.LogLevelToString=b,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",b(S.Info))}),define(se[190],oe([1,0,54,7,84,46,266,14,6,2,109,11,280,24,69,64]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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(o,g){this._lastState={lastCopiedValue:o,data:g}}get(o){return this._lastState&&this._lastState.lastCopiedValue===o?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=f,f.INSTANCE=new f;class c{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(o){o=o||"";const g={text:o,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=o.length,g}}let d=class extends v.Disposable{get textAreaState(){return this._textAreaState}constructor(o,g,h,m,C,w){super(),this._host=o,this._textArea=g,this._OS=h,this._browser=m,this._accessibilityService=C,this._logService=w,this._onFocus=this._register(new _.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new _.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new _.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new _.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new _.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new _.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new _.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new _.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new _.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new _.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new _.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(_.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 T=new E.StandardKeyboardEvent(I);(T.keyCode===114||this._currentComposition&&T.keyCode===1)&&T.stopPropagation(),T.equals(9)&&T.preventDefault(),D=T,this._onKeyDown.fire(T)})),this._register(this._textArea.onKeyUp(I=>{const T=new E.StandardKeyboardEvent(I);this._onKeyUp.fire(T)})),this._register(this._textArea.onCompositionStart(I=>{i._debugComposition&&console.log("[compositionstart]",I);const T=new c;if(this._currentComposition){this._currentComposition=T;return}if(this._currentComposition=T,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),T.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 T=this._currentComposition;if(!T)return;if(this._browser.isAndroid){const P=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),N=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,P);this._textAreaState=P,this._onType.fire(N),this._onCompositionUpdate.fire(I);return}const A=T.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 T=this._currentComposition;if(!T)return;if(this._currentComposition=null,this._browser.isAndroid){const P=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),N=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,P);this._textAreaState=P,this._onType.fire(N),this._onCompositionEnd.fire();return}const A=T.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 T=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),A=i.TextAreaState.deduceInput(this._textAreaState,T,this._OS===2);A.replacePrevCharCnt===0&&A.text.length===1&&(a.isHighSurrogate(A.text.charCodeAt(0))||A.text.charCodeAt(0)===127)||(this._textAreaState=T,(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[T,A]=e.ClipboardEventUtils.getTextData(I.clipboardData);T&&(A=A||f.INSTANCE.get(T),this._onPaste.fire({text:T,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 o=0;return k.addDisposableListener(this._textArea.ownerDocument,"selectionchange",g=>{if(S.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const h=Date.now(),m=h-o;if(o=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 T=this._textAreaState.deduceEditorPosition(D),A=this._host.deduceModelPosition(T[0],T[1],T[2]),P=this._textAreaState.deduceEditorPosition(I),N=this._host.deduceModelPosition(P[0],P[1],P[2]),M=new n.Selection(A.lineNumber,A.column,N.lineNumber,N.column);this._onSelectionChangeRequest.fire(M)})}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(o){this._hasFocus!==o&&(this._hasFocus=o,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(o,g){this._hasFocus||(g=g.collapseSelection()),g.writeToTextArea(o,this._textArea,this._hasFocus),this._textAreaState=g}writeNativeTextAreaContent(o){!this._accessibilityService.isScreenReaderOptimized()&&o==="render"||this._currentComposition||(this._logService.trace(`writeTextAreaState(reason: ${o})`),this._setAndWriteTextAreaState(o,this._host.getScreenReaderContent()))}_ensureClipboardGetsEditorSelection(o){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),o.preventDefault(),o.clipboardData&&e.ClipboardEventUtils.setTextData(o.clipboardData,g.text,g.html,h)}};e.TextAreaInput=d,e.TextAreaInput=d=ke([ge(4,t.IAccessibilityService),ge(5,r.ILogService)],d),e.ClipboardEventUtils={getTextData(l){const o=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 o.length===0&&g===null&&l.files.length>0?[Array.prototype.slice.call(l.files,0).map(C=>C.name).join(`
|
||
`),null]:[o,g]},setTextData(l,o,g,h){l.setData(b.Mimes.text,o),typeof g=="string"&&l.setData("text/html",g),l.setData("vscode-editor-data",JSON.stringify(h))}};class s extends v.Disposable{get ownerDocument(){return this._actual.ownerDocument}constructor(o){super(),this._actual=o,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 _.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>S.inputLatency.onKeyDown())),this._register(this.onBeforeInput(()=>S.inputLatency.onBeforeInput())),this._register(this.onInput(()=>S.inputLatency.onInput())),this._register(this.onKeyUp(()=>S.inputLatency.onKeyUp())),this._register(k.addDisposableListener(this._actual,u.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const o=k.getShadowRoot(this._actual);return o?o.activeElement===this._actual:this._actual.isConnected?k.getActiveElement()===this._actual:!1}setIgnoreSelectionChangeTime(o){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(o,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(o,g,h){const m=this._actual;let C=null;const w=k.getShadowRoot(m);w?C=w.activeElement:C=k.getActiveElement();const D=k.getWindow(C),I=C===m,T=m.selectionStart,A=m.selectionEnd;if(I&&T===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 P=k.saveParentsScrollTop(m);this.setIgnoreSelectionChangeTime("setSelectionRange"),m.focus(),m.setSelectionRange(g,h),k.restoreParentsScrollTop(m,P)}catch{}}}e.TextAreaWrapper=s}),define(se[79],oe([1,0,111,53,145,243,45,8,64,47]),function(te,e,L,k,y,E,S,p,_,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 r=new WeakMap;let u=0;function f(c){let d=r.get(c);return d===void 0&&(d=++u,r.set(c,d)),d}t.of=f})(b||(b={}));class a{constructor(r){this._default=r}get(r){return this._default}update(r,u){return this._default}default(){return this._default}}class i{constructor(r,u,f,c,d,s){this._logService=r,this._name=u,this._registry=f,this._default=c,this._min=d,this._max=s,this._cache=new k.LRUCache(50,.7)}_key(r){return r.id+this._registry.all(r).reduce((u,f)=>(0,L.doHash)(b.of(f),u),0)}get(r){const u=this._key(r),f=this._cache.get(u);return f?(0,y.clamp)(f.value,this._min,this._max):this.default()}update(r,u){const f=this._key(r);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)(r.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${r.uri.toString()} is ${d}ms`),d}_overall(){const r=new y.MovingAverage;for(const[,u]of this._cache)r.update(u.value);return r.value}default(){const r=this._overall()|0||this._default;return(0,y.clamp)(r,this._min,this._max)}}let n=class{constructor(r,u){this._logService=r,this._data=new Map,this._isDev=u.isExtensionDevelopment||!u.isBuilt}for(r,u,f){var c,d,s;const l=(c=f?.min)!==null&&c!==void 0?c:50,o=(d=f?.max)!==null&&d!==void 0?d:l**2,g=(s=f?.key)!==null&&s!==void 0?s:void 0,h=`${b.of(r)},${l}${g?","+g:""}`;let m=this._data.get(h);return m||(this._isDev?m=new i(this._logService,u,r,this._overallAverage()|0||l*1.5,l,o):(this._logService.debug(`[DEBOUNCE: ${u}] is disabled in developed mode`),m=new a(l*1.5)),this._data.set(h,m)),m}_overallAverage(){const r=new y.MovingAverage;for(const u of this._data.values())r.update(u.default());return r.value}};e.LanguageFeatureDebounceService=n,e.LanguageFeatureDebounceService=n=ke([ge(0,_.ILogService),ge(1,E.IEnvironmentService)],n),(0,S.registerSingleton)(e.ILanguageFeatureDebounceService,n,1)}),define(se[165],oe([1,0,13,19,12,52,53,10,5,79,8,45,51,2,18]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 r{remove(){var l;(l=this.parent)===null||l===void 0||l.children.delete(this.id)}static findId(l,o){let g;typeof l=="string"?g=`${o.id}/${l}`:(g=`${o.id}/${l.name}`,o.children.get(g)!==void 0&&(g=`${o.id}/${l.name}_${l.range.startLineNumber}_${l.range.startColumn}`));let h=g;for(let m=0;o.children.get(h)!==void 0;m++)h=`${g}_${m}`;return h}static empty(l){return l.children.size===0}}e.TreeElement=r;class u extends r{constructor(l,o,g){super(),this.id=l,this.parent=o,this.symbol=g,this.children=new Map}}e.OutlineElement=u;class f extends r{constructor(l,o,g,h){super(),this.id=l,this.parent=o,this.label=g,this.order=h,this.children=new Map}}e.OutlineGroup=f;class c extends r{static create(l,o,g){const h=new k.CancellationTokenSource(g),m=new c(o.uri),C=l.ordered(o),w=C.map((I,T)=>{var A;const P=r.findId(`provider_${T}`,m),N=new f(P,m,(A=I.displayName)!==null&&A!==void 0?A:"Unknown Outline Provider",T);return Promise.resolve(I.provideDocumentSymbols(o,h.token)).then(M=>{for(const R of M||[])c._makeOutlineElement(R,N);return N},M=>((0,y.onUnexpectedExternalError)(M),N)).then(M=>{r.empty(M)?M.remove():m._groups.set(P,M)})}),D=l.onDidChange(()=>{const I=l.ordered(o);(0,L.equals)(I,C)||h.cancel()});return Promise.all(w).then(()=>h.token.isCancellationRequested&&!g.isCancellationRequested?c.create(l,o,g):m._compact()).finally(()=>{h.dispose(),D.dispose(),h.dispose()})}static _makeOutlineElement(l,o){const g=r.findId(l,o),h=new u(g,o,l);if(l.children)for(const m of l.children)c._makeOutlineElement(m,h);o.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[o,g]of this._groups)g.children.size===0?this._groups.delete(o):l+=1;if(l!==1)this.children=this._groups;else{const o=E.Iterable.first(this._groups.values());for(const[,g]of o.children)g.parent=this,this.children.set(g.id,g)}return this}getTopLevelSymbols(){const l=[];for(const o of this.children.values())o instanceof u?l.push(o.symbol):l.push(...E.Iterable.map(o.children.values(),g=>g.symbol));return l.sort((o,g)=>_.Range.compareRangesUsingStarts(o.range,g.range))}asListOfDocumentSymbols(){const l=this.getTopLevelSymbols(),o=[];return c._flattenDocumentSymbols(o,l,""),o.sort((g,h)=>p.Position.compare(_.Range.getStartPosition(g.range),_.Range.getStartPosition(h.range))||p.Position.compare(_.Range.getEndPosition(h.range),_.Range.getEndPosition(g.range)))}static _flattenDocumentSymbols(l,o,g){for(const h of o)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,o,g){this._languageFeaturesService=l,this._disposables=new n.DisposableStore,this._cache=new S.LRUCache(10,.7),this._debounceInformation=o.for(l.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(g.onModelRemoved(h=>{this._cache.delete(h.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(l,o){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=o.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=ke([ge(0,t.ILanguageFeaturesService),ge(1,v.ILanguageFeatureDebounceService),ge(2,i.IModelService)],d),(0,a.registerSingleton)(e.IOutlineModelService,d,1)}),define(se[779],oe([1,0,13,35,342,87,18,165,2,6]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let b=class extends _.Disposable{constructor(i,n,t){super(),this._textModel=i,this._languageFeaturesService=n,this._outlineModelService=t,this._currentModel=(0,k.observableValue)(this,void 0);const r=(0,k.observableSignalFromEvent)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),u=(0,k.observableSignalFromEvent)("_textModel.onDidChangeContent",v.Event.debounce(f=>this._textModel.onDidChangeContent(f),()=>{},100));this._register((0,k.autorunWithStore)(async(f,c)=>{r.read(f),u.read(f);const d=c.add(new E.DisposableCancellationTokenSource),s=await this._outlineModelService.getOrCreate(this._textModel,d.token);c.isDisposed||this._currentModel.set(s,void 0)}))}getBreadcrumbItems(i,n){const t=this._currentModel.read(n);if(!t)return[];const r=t.asListOfDocumentSymbols().filter(u=>i.contains(u.range.startLineNumber)&&!i.contains(u.range.endLineNumber));return r.sort((0,L.reverseOrder)((0,L.compareBy)(u=>u.range.endLineNumber-u.range.startLineNumber,L.numberComparator))),r.map(u=>({name:u.name,kind:u.kind,startLineNumber:u.range.startLineNumber}))}};b=ke([ge(1,S.ILanguageFeaturesService),ge(2,p.IOutlineModelService)],b),y.HideUnchangedRegionsFeature.setBreadcrumbsSourceFactory((a,i)=>i.createInstance(b,a))}),define(se[780],oe([1,0,19,20,22,68,165,25]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),p.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(_,...v){const[b]=v;(0,k.assertType)(y.URI.isUri(b));const a=_.get(S.IOutlineModelService),n=await _.get(E.ITextModelService).createModelReference(b);try{return(await a.getOrCreate(n.object.textEditorModel,L.CancellationToken.None)).getTopLevelSymbols()}finally{n.dispose()}})}),define(se[781],oe([1,0,54,7,44,14,6,111,2,123,64]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let i=a=class extends _.Disposable{constructor(t,r){super(),this.layoutService=t,this.logService=r,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(L.isSafari||L.isWebkitWebView)&&this.installWebKitWriteTextWorkaround(),this._register(S.Event.runAndSubscribe(k.onDidRegisterWindow,({window:u,disposables:f})=>{f.add((0,k.addDisposableListener)(u.document,"copy",()=>this.clearResources()))},{window:y.mainWindow,disposables:this._store}))}installWebKitWriteTextWorkaround(){const t=()=>{const r=new E.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=r,navigator.clipboard.write([new ClipboardItem({"text/plain":r.p})]).catch(async u=>{(!(u instanceof Error)||u.name!=="NotAllowedError"||!r.isRejected)&&this.logService.error(u)})};this._register(S.Event.runAndSubscribe(this.layoutService.onDidAddContainer,({container:r,disposables:u})=>{u.add((0,k.addDisposableListener)(r,"click",t)),u.add((0,k.addDisposableListener)(r,"keydown",t))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(t,r){if(this.writeResources([]),r){this.mapTextToType.set(r,t);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(t);try{return await navigator.clipboard.writeText(t)}catch(u){console.error(u)}this.fallbackWriteText(t)}fallbackWriteText(t){const r=(0,k.getActiveDocument)(),u=r.activeElement,f=r.body.appendChild((0,k.$)("textarea",{"aria-hidden":!0}));f.style.height="1px",f.style.width="1px",f.style.position="absolute",f.value=t,f.focus(),f.select(),r.execCommand("copy"),u instanceof HTMLElement&&u.focus(),r.body.removeChild(f)}async readText(t){if(t)return this.mapTextToType.get(t)||"";try{return await navigator.clipboard.readText()}catch(r){console.error(r)}return""}async readFindText(){return this.findText}async writeFindText(t){this.findText=t}async writeResources(t){t.length===0?this.clearResources():(this.resources=t,this.resourcesStateHash=await this.computeResourcesStateHash())}async readResources(){const t=await this.computeResourcesStateHash();return this.resourcesStateHash!==t&&this.clearResources(),this.resources}async computeResourcesStateHash(){if(this.resources.length===0)return;const t=await this.readText();return(0,p.hash)(t.substring(0,a.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearResources(){this.resources=[],this.resourcesStateHash=void 0}};e.BrowserClipboardService=i,i.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3,e.BrowserClipboardService=i=a=ke([ge(0,v.ILayoutService),ge(1,b.ILogService)],i)}),define(se[782],oe([1,0,2,64]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class y extends L.Disposable{constructor(S,p=[]){super(),this.logger=new k.MultiplexLogger([S,...p]),this._register(S.onDidChangeLogLevel(_=>this.setLevel(_)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(S){this.logger.setLevel(S)}getLevel(){return this.logger.getLevel()}trace(S,...p){this.logger.trace(S,...p)}debug(S,...p){this.logger.debug(S,...p)}info(S,...p){this.logger.info(S,...p)}warn(S,...p){this.logger.warn(S,...p)}error(S,...p){this.logger.error(S,...p)}}e.LogService=y}),define(se[97],oe([1,0,100,745,8]),function(te,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 _(n,t){return t-n}p.compare=_;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 a(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=a;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 S;(function(p){const _="";function v(a){return b(a,!0)}p.makeKey=v;function b(a,i){const n=[_];return a.source?n.push(a.source.replace("\xA6","\\\xA6")):n.push(_),a.code?typeof a.code=="string"?n.push(a.code.replace("\xA6","\\\xA6")):n.push(a.code.value.replace("\xA6","\\\xA6")):n.push(_),a.severity!==void 0&&a.severity!==null?n.push(E.toString(a.severity)):n.push(_),a.message&&i?n.push(a.message.replace("\xA6","\\\xA6")):n.push(_),a.startLineNumber!==void 0&&a.startLineNumber!==null?n.push(a.startLineNumber.toString()):n.push(_),a.startColumn!==void 0&&a.startColumn!==null?n.push(a.startColumn.toString()):n.push(_),a.endLineNumber!==void 0&&a.endLineNumber!==null?n.push(a.endLineNumber.toString()):n.push(_),a.endColumn!==void 0&&a.endColumn!==null?n.push(a.endColumn.toString()):n.push(_),n.push(_),n.join("\xA6")}p.makeKeyOptionalMessage=b})(S||(e.IMarkerData=S={})),e.IMarkerService=(0,y.createDecorator)("markerService")}),define(se[783],oe([1,0,13,6,2,66,11,22,5,45,8,97,27]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 s=this._configService.getValue("problems.sortOrder"),l=(g,h)=>{let m=(0,S.compare)(g.resource.toString(),h.resource.toString());return m===0&&(s==="position"?m=_.Range.compareRangesUsingStarts(g,h)||a.MarkerSeverity.compare(g.severity,h.severity):m=a.MarkerSeverity.compare(g.severity,h.severity)||_.Range.compareRangesUsingStarts(g,h)),m},o=()=>{this._markers=this._markerService.read({resource:p.URI.isUri(f)?f:void 0,severities:a.MarkerSeverity.Error|a.MarkerSeverity.Warning|a.MarkerSeverity.Info}),typeof f=="function"&&(this._markers=this._markers.filter(g=>this._resourceFilter(g.resource))),this._markers.sort(l)};o(),this._dispoables.add(c.onMarkerChanged(g=>{(!this._resourceFilter||g.some(h=>this._resourceFilter(h)))&&(o(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(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 s=!1,l=this._markers.findIndex(o=>o.resource.toString()===f.uri.toString());l<0&&(l=(0,L.binarySearch)(this._markers,{resource:f.uri},(o,g)=>(0,S.compare)(o.resource.toString(),g.resource.toString())),l<0&&(l=~l));for(let o=l;o<this._markers.length;o++){let g=_.Range.lift(this._markers[o]);if(g.isEmpty()){const h=f.getWordAtPosition(g.getStartPosition());h&&(g=new _.Range(g.startLineNumber,h.startColumn,g.startLineNumber,h.endColumn))}if(c&&(g.containsPosition(c)||c.isBeforeOrEqual(g.getStartPosition()))){this._nextIdx=o,s=!0;break}if(this._markers[o].resource.toString()!==f.uri.toString())break}s||(this._nextIdx=d?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(f,c,d){if(this._markers.length===0)return!1;const s=this._nextIdx;return this._nextIdx===-1?this._initIdx(c,d,f):f?this._nextIdx=(this._nextIdx+1)%this._markers.length:f||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),s!==this._nextIdx}find(f,c){let d=this._markers.findIndex(s=>s.resource.toString()===f.toString());if(!(d<0)){for(;d<this._markers.length;d++)if(_.Range.containsPosition(this._markers[d],c))return new n(this._markers[d],d+1,this._markers.length)}}};e.MarkerList=t,e.MarkerList=t=ke([ge(1,a.IMarkerService),ge(2,i.IConfigurationService)],t),e.IMarkerNavigationService=(0,b.createDecorator)("IMarkerNavigationService");let r=class{constructor(f,c){this._markerService=f,this._configService=c,this._provider=new E.LinkedList}getMarkerList(f){for(const c of this._provider){const d=c.getMarkerList(f);if(d)return d}return new t(f,this._markerService,this._configService)}};r=ke([ge(0,a.IMarkerService),ge(1,i.IConfigurationService)],r),(0,v.registerSingleton)(e.IMarkerNavigationService,r,1)}),define(se[784],oe([1,0,13,6,52,53,47,22,97]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=e.unsupportedSchemas=void 0,e.unsupportedSchemas=new Set([S.Schemas.inMemory,S.Schemas.vscodeSourceControl,S.Schemas.walkThrough,S.Schemas.walkThroughSnippet]);class v{constructor(){this._byResource=new E.ResourceMap,this._byOwner=new Map}set(n,t,r){let u=this._byResource.get(n);u||(u=new Map,this._byResource.set(n,u)),u.set(t,r);let f=this._byOwner.get(t);f||(f=new E.ResourceMap,this._byOwner.set(t,f)),f.set(n,r)}get(n,t){const r=this._byResource.get(n);return r?.get(t)}delete(n,t){let r=!1,u=!1;const f=this._byResource.get(n);f&&(r=f.delete(t));const c=this._byOwner.get(t);if(c&&(u=c.delete(n)),r!==u)throw new Error("illegal state");return r&&u}values(n){var t,r,u,f;return typeof n=="string"?(r=(t=this._byOwner.get(n))===null||t===void 0?void 0:t.values())!==null&&r!==void 0?r:y.Iterable.empty():p.URI.isUri(n)?(f=(u=this._byResource.get(n))===null||u===void 0?void 0:u.values())!==null&&f!==void 0?f:y.Iterable.empty():y.Iterable.map(y.Iterable.concat(...this._byOwner.values()),c=>c[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 r=this._data.get(t);r&&this._substract(r);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:r}of this._service.read({resource:n}))r===_.MarkerSeverity.Error?t.errors+=1:r===_.MarkerSeverity.Warning?t.warnings+=1:r===_.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 a{constructor(){this._onMarkerChanged=new k.DebounceEmitter({delay:0,merge:a._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 r of t||[])this.changeOne(n,r,[])}changeOne(n,t,r){if((0,L.isFalsyOrEmpty)(r))this._data.delete(t,n)&&this._onMarkerChanged.fire([t]);else{const u=[];for(const f of r){const c=a._toMarker(n,t,f);c&&u.push(c)}this._data.set(t,n,u),this._onMarkerChanged.fire([t])}}static _toMarker(n,t,r){let{code:u,severity:f,message:c,source:d,startLineNumber:s,startColumn:l,endLineNumber:o,endColumn:g,relatedInformation:h,tags:m}=r;if(c)return s=s>0?s:1,l=l>0?l:1,o=o>=s?o:s,g=g>0?g:l,{resource:t,owner:n,code:u,severity:f,message:c,source:d,startLineNumber:s,startColumn:l,endLineNumber:o,endColumn:g,relatedInformation:h,tags:m}}changeAll(n,t){const r=[],u=this._data.values(n);if(u)for(const f of u){const c=y.Iterable.first(f);c&&(r.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 s=a._toMarker(n,c,d);if(!s)continue;const l=f.get(c);l?l.push(s):(f.set(c,[s]),r.push(c))}for(const[c,d]of f)this._data.set(c,n,d)}r.length>0&&this._onMarkerChanged.fire(r)}read(n=Object.create(null)){let{owner:t,resource:r,severities:u,take:f}=n;if((!f||f<0)&&(f=-1),t&&r){const c=this._data.get(r,t);if(c){const d=[];for(const s of c)if(a._accept(s,u)){const l=d.push(s);if(f>0&&l===f)break}return d}else return[]}else if(!t&&!r){const c=[];for(const d of this._data.values())for(const s of d)if(a._accept(s,u)){const l=c.push(s);if(f>0&&l===f)return c}return c}else{const c=this._data.values(r??t),d=[];for(const s of c)for(const l of s)if(a._accept(l,u)){const o=d.push(l);if(f>0&&o===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 r of n)for(const u of r)t.set(u,!0);return Array.from(t.keys())}}e.MarkerService=a}),define(se[50],oe([1,0,100,8]),function(te,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(se[57],oe([1,0,8]),function(te,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 S=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(y.fragment);return S&&(E={startLineNumber:parseInt(S[1]),startColumn:S[2]?parseInt(S[2]):1,endLineNumber:S[4]?parseInt(S[4]):void 0,endColumn:S[4]?S[5]?parseInt(S[5]):1:void 0},y=y.with({fragment:""})),{selection:E,uri:y}}e.extractSelection=k}),define(se[785],oe([1,0,7,44,19,66,53,223,47,49,22,33,25,759,57]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let r=class{constructor(d){this._commandService=d}async open(d,s){if(!(0,_.matchesScheme)(d,_.Schemas.command))return!1;if(!s?.allowCommands||(typeof d=="string"&&(d=b.URI.parse(d)),Array.isArray(s.allowCommands)&&!s.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}};r=ke([ge(0,i.ICommandService)],r);let u=class{constructor(d){this._editorService=d}async open(d,s){typeof d=="string"&&(d=b.URI.parse(d));const{selection:l,uri:o}=(0,t.extractSelection)(d);return d=o,d.scheme===_.Schemas.file&&(d=(0,v.normalizePath)(d)),await this._editorService.openCodeEditor({resource:d,options:{selection:l,source:s?.fromUserGesture?n.EditorOpenSource.USER:n.EditorOpenSource.API,...s?.editorOptions}},this._editorService.getFocusedCodeEditor(),s?.openToSide),!0}};u=ke([ge(0,a.ICodeEditorService)],u);let f=class{constructor(d,s){this._openers=new E.LinkedList,this._validators=new E.LinkedList,this._resolvers=new E.LinkedList,this._resolvedUriTargets=new S.ResourceMap(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new E.LinkedList,this._defaultExternalOpener={openExternal:async l=>((0,_.matchesSomeScheme)(l,_.Schemas.http,_.Schemas.https)?L.windowOpenNoOpener(l):k.mainWindow.location.href=l,!0)},this._openers.push({open:async(l,o)=>o?.openExternal||(0,_.matchesSomeScheme)(l,_.Schemas.mailto,_.Schemas.http,_.Schemas.https,_.Schemas.vsls)?(await this._doOpenExternal(l,o),!0):!1}),this._openers.push(new r(s)),this._openers.push(new u(d))}registerOpener(d){return{dispose:this._openers.unshift(d)}}async open(d,s){var l;const o=typeof d=="string"?b.URI.parse(d):d,g=(l=this._resolvedUriTargets.get(o))!==null&&l!==void 0?l:d;for(const h of this._validators)if(!await h.shouldOpen(g,s))return!1;for(const h of this._openers)if(await h.open(d,s))return!0;return!1}async resolveExternalUri(d,s){for(const l of this._resolvers)try{const o=await l.resolveExternalUri(d,s);if(o)return this._resolvedUriTargets.has(o.resolved)||this._resolvedUriTargets.set(o.resolved,d),o}catch{}throw new Error("Could not resolve external URI: "+d.toString())}async _doOpenExternal(d,s){const l=typeof d=="string"?b.URI.parse(d):d;let o;try{o=(await this.resolveExternalUri(l,s)).resolved}catch{o=l}let g;if(typeof d=="string"&&l.toString()===o.toString()?g=d:g=encodeURI(o.toString(!0)),s?.allowContributedOpeners){const h=typeof s?.allowContributedOpeners=="string"?s?.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=ke([ge(0,a.ICodeEditorService),ge(1,i.ICommandService)],f)}),define(se[786],oe([1,0,7,84,46,63,6,2,57,489]),function(te,e,L,k,y,E,S,p,_){"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(a){a?(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=a}constructor(a,i,n={},t){var r;super(),this._link=i,this._enabled=!0,this.el=(0,L.append)(a,(0,L.$)("a.monaco-link",{tabIndex:(r=i.tabIndex)!==null&&r!==void 0?r: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=S.Event.chain(f.event,l=>l.map(o=>new y.StandardKeyboardEvent(o)).filter(o=>o.keyCode===3)),d=this._register(new k.DomEmitter(this.el,E.EventType.Tap)).event;this._register(E.Gesture.addTarget(this.el));const s=S.Event.any(u.event,c,d);this._register(s(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=ke([ge(3,_.IOpenerService)],v)}),define(se[88],oe([1,0,8]),function(te,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(se[787],oe([1,0,14,19,2,20]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var S;(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"})(S||(e.TriggerAction=S={}));function p(b){const a=b;return Array.isArray(a.items)}function _(b){const a=b;return!!a.picks&&a.additionalPicks instanceof Promise}class v extends y.Disposable{constructor(a,i){super(),this.prefix=a,this.options=i}provide(a,i,n){var t;const r=new y.DisposableStore;a.canAcceptInBackground=!!(!((t=this.options)===null||t===void 0)&&t.canAcceptInBackground),a.matchOnLabel=a.matchOnDescription=a.matchOnDetail=a.sortByLabel=!1;let u;const f=r.add(new y.MutableDisposable),c=async()=>{var d;const s=f.value=new y.DisposableStore;u?.dispose(!0),a.busy=!1,u=new k.CancellationTokenSource(i);const l=u.token;let o=a.value.substring(this.prefix.length);!((d=this.options)===null||d===void 0)&&d.shouldSkipTrimPickFilter||(o=o.trim());const g=this._getPicks(o,s,l,n),h=(C,w)=>{var D;let I,T;if(p(C)?(I=C.items,T=C.active):I=C,I.length===0){if(w)return!1;(o.length>0||a.hideInput)&&(!((D=this.options)===null||D===void 0)&&D.noResultsPick)&&((0,E.isFunction)(this.options.noResultsPick)?I=[this.options.noResultsPick(o)]:I=[this.options.noResultsPick])}return a.items=I,T&&(a.activeItems=[T]),!0},m=async C=>{let w=!1,D=!1;await Promise.all([(async()=>{typeof C.mergeDelay=="number"&&(await(0,L.timeout)(C.mergeDelay),l.isCancellationRequested)||D||(w=h(C.picks,!0))})(),(async()=>{a.busy=!0;try{const I=await C.additionalPicks;if(l.isCancellationRequested)return;let T,A;p(C.picks)?(T=C.picks.items,A=C.picks.active):T=C.picks;let P,N;if(p(I)?(P=I.items,N=I.active):P=I,P.length>0||!w){let M;if(!A&&!N){const R=a.activeItems[0];R&&T.indexOf(R)!==-1&&(M=R)}h({items:[...T,...P],active:A||N||M})}}finally{l.isCancellationRequested||(a.busy=!1),D=!0}})()])};if(g!==null)if(_(g))await m(g);else if(!(g instanceof Promise))h(g);else{a.busy=!0;try{const C=await g;if(l.isCancellationRequested)return;_(C)?await m(C):h(C)}finally{l.isCancellationRequested||(a.busy=!1)}}};return r.add(a.onDidChangeValue(()=>c())),c(),r.add(a.onDidAccept(d=>{const[s]=a.selectedItems;typeof s?.accept=="function"&&(d.inBackground||a.hide(),s.accept(a.keyMods,d))})),r.add(a.onDidTriggerItemButton(async({button:d,item:s})=>{var l,o;if(typeof s.trigger=="function"){const g=(o=(l=s.buttons)===null||l===void 0?void 0:l.indexOf(d))!==null&&o!==void 0?o:-1;if(g>=0){const h=s.trigger(g,a.keyMods),m=typeof h=="number"?h:await h;if(i.isCancellationRequested)return;switch(m){case S.NO_ACTION:break;case S.CLOSE_PICKER:a.hide();break;case S.REFRESH_PICKER:c();break;case S.REMOVE_ITEM:{const C=a.items.indexOf(s);if(C!==-1){const w=a.items.slice(),D=w.splice(C,1),I=a.activeItems.filter(A=>A!==D[0]),T=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=w,I&&(a.activeItems=I),a.keepScrollPosition=T}break}}}}})),r}}e.PickerQuickAccessProvider=v}),define(se[788],oe([1,0,7,232,2,100,178]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const S=L.$;class p extends y.Disposable{constructor(v,b,a){super(),this.parent=v,this.onKeyDown=n=>L.addStandardDisposableListener(this.findInput.inputBox.inputElement,L.EventType.KEY_DOWN,n),this.onDidChange=n=>this.findInput.onDidChange(n),this.container=L.append(this.parent,S(".quick-input-box")),this.findInput=this._register(new k.FindInput(this.container,void 0,{label:"",inputBoxStyles:b,toggleStyles:a}));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(se[350],oe([1,0,7,84,6,46,63,118,170,399,751,178]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.quickInputButtonToAction=void 0;const a={},i=new _.IdGenerator("quick-input-button-icon-");function n(u){if(!u)return;let f;const c=u.dark.toString();return a[c]?f=a[c]:(f=i.nextId(),L.createCSSRule(`.${f}, .hc-light .${f}`,`background-image: ${L.asCSSUrl(u.light||u.dark)}`),L.createCSSRule(`.vs-dark .${f}, .hc-black .${f}`,`background-image: ${L.asCSSUrl(u.dark)}`),a[c]=f),f}function t(u,f,c){let d=u.iconClass||n(u.iconPath);return u.alwaysVisible&&(d=d?`${d} always-visible`:"always-visible"),{id:f,label:"",tooltip:u.tooltip||"",class:d,enabled:!0,run:c}}e.quickInputButtonToAction=t;function r(u,f,c){L.reset(f);const d=(0,v.parseLinkedText)(u);let s=0;for(const l of d.nodes)if(typeof l=="string")f.append(...(0,p.renderLabelWithIcons)(l));else{let o=l.title;!o&&l.href.startsWith("command:")?o=(0,b.localize)(0,null,l.href.substring(8)):o||(o=l.href);const g=L.$("a",{href:l.href,title:o,tabIndex:s++},l.label);g.style.textDecoration="underline";const h=I=>{L.isEventLike(I)&&L.EventHelper.stop(I,!0),c.callback(l.href)},m=c.disposables.add(new k.DomEmitter(g,L.EventType.CLICK)).event,C=c.disposables.add(new k.DomEmitter(g,L.EventType.KEY_DOWN)).event,w=y.Event.chain(C,I=>I.filter(T=>{const A=new E.StandardKeyboardEvent(T);return A.equals(10)||A.equals(3)}));c.disposables.add(S.Gesture.addTarget(g));const D=c.disposables.add(new k.DomEmitter(g,S.EventType.Tap)).event;y.Event.any(m,D,w)(h,null,c.disposables),f.appendChild(g)}}e.renderQuickInputDescription=r}),define(se[70],oe([1,0,8]),function(te,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(S){S[S.Blur=1]="Blur",S[S.Gesture=2]="Gesture",S[S.Other=3]="Other"})(k||(e.QuickInputHideReason=k={}));var y;(function(S){S[S.NONE=0]="NONE",S[S.FIRST=1]="FIRST",S[S.SECOND=2]="SECOND",S[S.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(se[37],oe([1,0,90,20]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class y{constructor(){this.data=new Map}add(S,p){L.ok(k.isString(S)),L.ok(k.isObject(p)),L.ok(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,p)}as(S){return this.data.get(S)||null}}e.Registry=new y}),define(se[351],oe([1,0,37]),function(te,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(S){return S&&S===this.proto}getData(S){if(this.hasData(S))return this.data}}e.LocalSelectionTransfer=y,y.INSTANCE=new y}),define(se[352],oe([1,0,198,176,109,22,351]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExternalVSDataTransfer=e.toVSDataTransfer=void 0;function p(a){const i=new k.VSDataTransfer;for(const n of a.items){const t=n.type;if(n.kind==="string"){const r=new Promise(u=>n.getAsString(u));i.append(t,(0,k.createStringDataTransferItem)(r))}else if(n.kind==="file"){const r=n.getAsFile();r&&i.append(t,_(r))}}return i}e.toVSDataTransfer=p;function _(a){const i=a.path?E.URI.parse(a.path):void 0;return(0,k.createFileDataTransferItem)(a.name,i,async()=>new Uint8Array(await a.arrayBuffer()))}const v=Object.freeze([S.CodeDataTransfers.EDITORS,S.CodeDataTransfers.FILES,L.DataTransfers.RESOURCES,L.DataTransfers.INTERNAL_URI_LIST]);function b(a,i=!1){const n=p(a),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 r=[];for(const u of a.items){const f=u.getAsFile();if(f){const c=f.path;try{c?r.push(E.URI.file(c).toString()):r.push(E.URI.parse(f.name,!0).toString())}catch{}}}r.length&&n.replace(y.Mimes.uriList,(0,k.createStringDataTransferItem)(k.UriList.create(r)))}for(const r of v)n.delete(r);return n}e.toExternalVSDataTransfer=b}),define(se[245],oe([1,0,6,37]),function(te,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(_,v){this.schemasById[y(_)]=v,this._onDidChangeSchema.fire(_)}notifySchemaChanged(_){this._onDidChangeSchema.fire(_)}}const S=new E;k.Registry.add(e.Extensions.JSONContribution,S)}),define(se[98],oe([1,0,13,6,20,737,27,245,37]),function(te,e,L,k,y,E,S,p,_){"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=_.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 s=new Set;this.doRegisterConfigurations(c,d,s),v.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:s})}registerDefaultConfigurations(c){const d=new Set;this.doRegisterDefaultConfigurations(c,d),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:d,defaultsOverrides:!0})}doRegisterDefaultConfigurations(c,d){var s;const l=[];for(const{overrides:o,source:g}of c)for(const h in o)if(d.add(h),e.OVERRIDE_PROPERTY_REGEX.test(h)){const m=this.configurationDefaultsOverrides.get(h),C=(s=m?.valuesSources)!==null&&s!==void 0?s:new Map;if(g)for(const T of Object.keys(o[h]))C.set(T,g);const w={...m?.value||{},...o[h]};this.configurationDefaultsOverrides.set(h,{source:g,value:w,valuesSources:C});const D=(0,S.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:o[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,s){c.forEach(l=>{this.validateAndRegisterProperties(l,d,l.extensionInfo,l.restrictedProperties,void 0,s),this.configurationContributors.push(l),this.registerJSONConfiguration(l)})}validateAndRegisterProperties(c,d=!0,s,l,o=3,g){var h;o=y.isUndefinedOrNull(c.scope)?o: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=s,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)?o: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,s,l,o,g)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(c){const d=s=>{const l=s.properties;if(l)for(const g in l)this.updateSchema(g,l[g]);const o=s.allOf;o?.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}]`,s={type:"object",description:E.localize(2,null),errorMessage:E.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(d,s),e.allSettings.properties[d]=s,e.applicationSettings.properties[d]=s,e.machineSettings.properties[d]=s,e.machineOverridableSettings.properties[d]=s,e.windowSettings.properties[d]=s,e.resourceSettings.properties[d]=s}}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 s=this.configurationDefaultsOverrides.get(c);let l=s?.value,o=s?.source;y.isUndefined(l)&&(l=d.defaultDefaultValue,o=void 0),y.isUndefined(l)&&(l=t(d.type)),d.default=l,d.defaultValueSource=o}}const a="\\[([^\\]]+)\\]",i=new RegExp(a,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${a})+$`,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 s=d[1].trim();s&&c.push(s),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 r=new b;_.Registry.add(e.Extensions.Configuration,r);function u(f,c){var d,s,l,o;return f.trim()?e.OVERRIDE_PROPERTY_REGEX.test(f)?E.localize(7,null,f):r.getConfigurationProperties()[f]!==void 0?E.localize(8,null,f):!((d=c.policy)===null||d===void 0)&&d.name&&r.getPolicyConfigurations().get((s=c.policy)===null||s===void 0?void 0:s.name)!==void 0?E.localize(9,null,f,(l=c.policy)===null||l===void 0?void 0:l.name,r.getPolicyConfigurations().get((o=c.policy)===null||o===void 0?void 0:o.name)):null:E.localize(6,null)}e.validateProperty=u}),define(se[246],oe([1,0,278,36,179,634,98,37]),function(te,e,L,k,y,E,S,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 _={...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(r){return typeof r.type<"u"||typeof r.anyOf<"u"}for(const r of k.editorOptionsRegistry){const u=r.schema;if(typeof u<"u")if(v(u))_.properties[`editor.${r.name}`]=u;else for(const f in u)Object.hasOwnProperty.call(u,f)&&(_.properties[f]=u[f])}let b=null;function a(){return b===null&&(b=Object.create(null),Object.keys(_.properties).forEach(r=>{b[r]=!0})),b}function i(r){return a()[`editor.${r}`]||!1}e.isEditorConfigurationKey=i;function n(r){return a()[`diffEditor.${r}`]||!1}e.isDiffEditorConfigurationKey=n,p.Registry.as(S.Extensions.Configuration).registerConfiguration(_)}),define(se[80],oe([1,0,644,6,37,109,98]),function(te,e,L,k,y,E,S){"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,a=this._languages.length;b<a;b++)if(this._languages[b]===v){this._languages.splice(b,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=p,e.ModesRegistry=new p,y.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[L.localize(0,null),"text"],mimetypes:[E.Mimes.text]}),y.Registry.as(S.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(se[104],oe([1,0,186,93,12,6,2,72,43,80,337,57,450]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.openLinkFromMarkdown=e.MarkdownRenderer=void 0;let n=i=class{constructor(f,c,d){this._options=f,this._languageService=c,this._openerService=d,this._onDidRenderAsync=new E.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(f,c,d){if(!f)return{element:document.createElement("span"),dispose:()=>{}};const s=new S.DisposableStore,l=s.add((0,L.renderMarkdown)(f,{...this._getRenderOptions(f,s),...c},d));return l.element.classList.add("rendered-markdown"),{element:l.element,dispose:()=>s.dispose()}}_getRenderOptions(f,c){return{codeBlockRenderer:async(d,s)=>{var l,o,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,s,h),C=document.createElement("span");if(C.innerHTML=(g=(o=i._ttpTokenizer)===null||o===void 0?void 0:o.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=ke([ge(1,_.ILanguageService),ge(2,a.IOpenerService)],n);async function t(u,f,c){try{return await u.open(f,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:r(c)})}catch(d){return(0,y.onUnexpectedError)(d),!1}}e.openLinkFromMarkdown=t;function r(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}}),define(se[789],oe([1,0,2,6,7,34,27,36,227,76,57,8,104,58,632,17,69,48,449]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverWidget=void 0;const c=y.$;let d=class extends v.Widget{get _targetWindow(){return y.getWindow(this._target.targetElements[0])}get _targetDocumentElement(){return y.getWindow(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return this._hoverPosition===2?0:1}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(g){this._isLocked!==g&&(this._isLocked=g,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(g,h,m,C,w,D){var I,T,A,P,N,M,R,x;super(),this._keybindingService=h,this._configurationService=m,this._openerService=C,this._instantiationService=w,this._accessibilityService=D,this._messageListeners=new L.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._onDispose=this._register(new k.Emitter),this._onRequestLayout=this._register(new k.Emitter),this._linkHandler=g.linkHandler||(F=>(0,i.openLinkFromMarkdown)(this._openerService,F,(0,n.isMarkdownString)(g.content)?g.content.isTrusted:void 0)),this._target="targetElements"in g.target?g.target:new l(g.target),this._hoverPointer=!((I=g.appearance)===null||I===void 0)&&I.showPointer?c("div.workbench-hover-pointer"):void 0,this._hover=this._register(new _.HoverWidget),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),!((T=g.appearance)===null||T===void 0)&&T.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),!((A=g.appearance)===null||A===void 0)&&A.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),g.additionalClasses&&this._hover.containerDomNode.classList.add(...g.additionalClasses),!((P=g.position)===null||P===void 0)&&P.forcePosition&&(this._forcePosition=!0),g.trapFocus&&(this._enableFocusTraps=!0),this._hoverPosition=(M=(N=g.position)===null||N===void 0?void 0:N.hoverPosition)!==null&&M!==void 0?M:3,this.onmousedown(this._hover.containerDomNode,F=>F.stopPropagation()),this.onkeydown(this._hover.containerDomNode,F=>{F.equals(9)&&this.dispose()}),this._register(y.addDisposableListener(this._targetWindow,"blur",()=>this.dispose()));const O=c("div.hover-row.markdown-hover"),B=c("div.hover-contents");if(typeof g.content=="string")B.textContent=g.content,B.style.whiteSpace="pre-wrap";else if(g.content instanceof HTMLElement)B.appendChild(g.content),B.classList.add("html-hover-contents");else{const F=g.content,q=this._instantiationService.createInstance(i.MarkdownRenderer,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||p.EDITOR_FONT_DEFAULTS.fontFamily}),{element:ie}=q.render(F,{actionHandler:{callback:ae=>this._linkHandler(ae),disposables:this._messageListeners},asyncRenderCallback:()=>{B.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}});B.appendChild(ie)}if(O.appendChild(B),this._hover.contentsDomNode.appendChild(O),g.actions&&g.actions.length>0){const F=c("div.hover-row.status-bar"),q=c("div.actions");g.actions.forEach(ie=>{const ae=this._keybindingService.lookupKeybinding(ie.commandId),ne=ae?ae.getLabel():null;_.HoverAction.render(q,{label:ie.label,commandId:ie.commandId,run:$=>{ie.run($),this.dispose()},iconClass:ie.iconClass},ne)}),F.appendChild(q),this._hover.containerDomNode.appendChild(F)}this._hoverContainer=c("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let W;if(g.actions&&g.actions.length>0?W=!1:((R=g.persistence)===null||R===void 0?void 0:R.hideOnHover)===void 0?W=typeof g.content=="string"||(0,n.isMarkdownString)(g.content)&&!g.content.value.includes("](")&&!g.content.value.includes("</a>"):W=g.persistence.hideOnHover,W&&(!((x=g.appearance)===null||x===void 0)&&x.showHoverHint)){const F=c("div.hover-row.status-bar"),q=c("div.info");q.textContent=(0,t.localize)(0,null,r.isMacintosh?"Option":"Alt"),F.appendChild(q),this._hover.containerDomNode.appendChild(F)}const V=[...this._target.targetElements];W||V.push(this._hoverContainer);const K=this._register(new s(V));if(this._register(K.onMouseOut(()=>{this._isLocked||this.dispose()})),W){const F=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new s(F)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=K}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;const g=this._hover.containerDomNode,h=this.findLastFocusableChild(this._hover.containerDomNode);if(h){const m=y.prepend(this._hoverContainer,c("div")),C=y.append(this._hoverContainer,c("div"));m.tabIndex=0,C.tabIndex=0,this._register(y.addDisposableListener(C,"focus",w=>{g.focus(),w.preventDefault()})),this._register(y.addDisposableListener(m,"focus",w=>{h.focus(),w.preventDefault()}))}}findLastFocusableChild(g){if(g.hasChildNodes())for(let h=0;h<g.childNodes.length;h++){const m=g.childNodes.item(g.childNodes.length-h-1);if(m.nodeType===m.ELEMENT_NODE){const w=m;if(typeof w.tabIndex=="number"&&w.tabIndex>=0)return w}const C=this.findLastFocusableChild(m);if(C)return C}}render(g){var h;g.appendChild(this._hoverContainer);const C=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&(0,_.getHoverAccessibleViewHint)(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(h=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||h===void 0?void 0:h.getAriaLabel());C&&(0,f.status)(C),this.layout(),this.addFocusTrap()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const g=P=>{const N=y.getDomNodeZoomLevel(P),M=P.getBoundingClientRect();return{top:M.top*N,bottom:M.bottom*N,right:M.right*N,left:M.left*N}},h=this._target.targetElements.map(P=>g(P)),m=Math.min(...h.map(P=>P.top)),C=Math.max(...h.map(P=>P.right)),w=Math.max(...h.map(P=>P.bottom)),D=Math.min(...h.map(P=>P.left)),I=C-D,T=w-m,A={top:m,right:C,bottom:w,left:D,width:I,height:T,center:{x:D+I/2,y:m+T/2}};if(this.adjustHorizontalHoverPosition(A),this.adjustVerticalHoverPosition(A),this.adjustHoverMaxHeight(A),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:A.left+=3,A.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:A.left-=3,A.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:A.top+=3,A.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:A.top-=3,A.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px";break}A.center.x=A.left+I/2,A.center.y=A.top+T/2}this.computeXCordinate(A),this.computeYCordinate(A),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(A)),this._hover.onContentsChanged()}computeXCordinate(g){const h=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=g.right:this._hoverPosition===0?this._x=g.left-h:(this._hoverPointer?this._x=g.center.x-this._hover.containerDomNode.clientWidth/2:this._x=g.left,this._x+h>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-h-2,this._targetDocumentElement.clientLeft))),this._x<this._targetDocumentElement.clientLeft&&(this._x=g.left+2)}computeYCordinate(g){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=g.top:this._hoverPosition===2?this._y=g.bottom-2:this._hoverPointer?this._y=g.center.y+this._hover.containerDomNode.clientHeight/2:this._y=g.bottom,this._y>this._targetWindow.innerHeight&&(this._y=g.bottom)}adjustHorizontalHoverPosition(g){if(this._target.x===void 0){if(this._forcePosition){const h=(this._hoverPointer?3:0)+2;this._hoverPosition===1?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-g.right-h}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${g.left-h}px`);return}this._hoverPosition===1?this._targetDocumentElement.clientWidth-g.right<this._hover.containerDomNode.clientWidth&&(g.left>=this._hover.containerDomNode.clientWidth?this._hoverPosition=0:this._hoverPosition=2):this._hoverPosition===0&&(g.left<this._hover.containerDomNode.clientWidth&&(this._targetDocumentElement.clientWidth-g.right>=this._hover.containerDomNode.clientWidth?this._hoverPosition=1:this._hoverPosition=2),g.left-this._hover.containerDomNode.clientWidth<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}}adjustVerticalHoverPosition(g){this._target.y!==void 0||this._forcePosition||(this._hoverPosition===3?g.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&g.bottom+this._hover.containerDomNode.clientHeight>this._targetWindow.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(g){let h=this._targetWindow.innerHeight/2;if(this._forcePosition){const m=(this._hoverPointer?3:0)+2;this._hoverPosition===3?h=Math.min(h,g.top-m):this._hoverPosition===2&&(h=Math.min(h,this._targetWindow.innerHeight-g.bottom-m))}if(this._hover.containerDomNode.style.maxHeight=`${h}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){const m=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==m&&(this._hover.contentsDomNode.style.paddingRight=m)}}setHoverPointerPosition(g){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(this._hoverPosition===0?"right":"left");const h=this._hover.containerDomNode.clientHeight;h>g.height?this._hoverPointer.style.top=`${g.center.y-(this._y-h)-3}px`:this._hoverPointer.style.top=`${Math.round(h/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(this._hoverPosition===3?"bottom":"top");const h=this._hover.containerDomNode.clientWidth;let m=Math.round(h/2)-3;const C=this._x+m;(C<g.left||C>g.right)&&(m=g.center.x-this._x-3),this._hoverPointer.style.left=`${m}px`;break}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._hoverContainer.remove(),this._messageListeners.dispose(),this._target.dispose(),super.dispose()),this._isDisposed=!0}};e.HoverWidget=d,e.HoverWidget=d=ke([ge(1,E.IKeybindingService),ge(2,S.IConfigurationService),ge(3,b.IOpenerService),ge(4,a.IInstantiationService),ge(5,u.IAccessibilityService)],d);class s extends v.Widget{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(g){super(),this._elements=g,this._isMouseIn=!0,this._onMouseOut=this._register(new k.Emitter),this._elements.forEach(h=>this.onmouseover(h,()=>this._onTargetMouseOver(h))),this._elements.forEach(h=>this.onmouseleave(h,()=>this._onTargetMouseLeave(h)))}_onTargetMouseOver(g){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout(g)}_onTargetMouseLeave(g){this._isMouseIn=!1,this._evaluateMouseState(g)}_evaluateMouseState(g){this._clearEvaluateMouseStateTimeout(g),this._mouseTimeout=y.getWindow(g).setTimeout(()=>this._fireIfMouseOutside(),0)}_clearEvaluateMouseStateTimeout(g){this._mouseTimeout&&(y.getWindow(g).clearTimeout(this._mouseTimeout),this._mouseTimeout=void 0)}_fireIfMouseOutside(){this._isMouseIn||this._onMouseOut.fire()}}class l{constructor(g){this._element=g,this.targetElements=[this._element]}dispose(){}}}),define(se[32],oe([1,0,6,2,11,151,113,133,514,612,515,518,234,8,27,43,45,80,517]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationChangeEvent=e.getScopedLineTokens=e.getIndentationAtPosition=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class d{constructor(M){this.languageId=M}affects(M){return this.languageId?this.languageId===M:!0}}e.LanguageConfigurationServiceChangeEvent=d,e.ILanguageConfigurationService=(0,n.createDecorator)("languageConfigurationService");let s=class extends k.Disposable{constructor(M,R){super(),this.configurationService=M,this.languageService=R,this._registry=this._register(new A),this.onDidChangeEmitter=this._register(new L.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const x=new Set(Object.values(o));this._register(this.configurationService.onDidChangeConfiguration(O=>{const B=O.change.keys.some(V=>x.has(V)),W=O.change.overrides.filter(([V,K])=>K.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(O=>{this.configurations.delete(O.languageId),this.onDidChangeEmitter.fire(new d(O.languageId))}))}register(M,R,x){return this._registry.register(M,R,x)}getLanguageConfiguration(M){let R=this.configurations.get(M);return R||(R=l(M,this._registry,this.configurationService,this.languageService),this.configurations.set(M,R)),R}};e.LanguageConfigurationService=s,e.LanguageConfigurationService=s=ke([ge(0,t.IConfigurationService),ge(1,r.ILanguageService)],s);function l(N,M,R,x){let O=M.getLanguageConfiguration(N);if(!O){if(!x.isRegisteredLanguageId(N))return new P(N,{});O=new P(N,{})}const B=g(O.languageId,R),W=D([O.underlyingConfig,B]);return new P(O.languageId,W)}const o={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function g(N,M){const R=M.getValue(o.brackets,{overrideIdentifier:N}),x=M.getValue(o.colorizedBracketPairs,{overrideIdentifier:N});return{brackets:h(R),colorizedBracketPairs:h(x)}}function h(N){if(Array.isArray(N))return N.map(M=>{if(!(!Array.isArray(M)||M.length!==2))return[M[0],M[1]]}).filter(M=>!!M)}function m(N,M,R){const x=N.getLineContent(M);let O=y.getLeadingWhitespace(x);return O.length>R-1&&(O=O.substring(0,R-1)),O}e.getIndentationAtPosition=m;function C(N,M,R){N.tokenization.forceTokenization(M);const x=N.tokenization.getLineTokens(M),O=typeof R>"u"?N.getLineMaxColumn(M)-1:R-1;return(0,p.createScopedLineTokens)(x,O)}e.getScopedLineTokens=C;class w{constructor(M){this.languageId=M,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(M,R){const x=new I(M,R,++this._order);return this._entries.push(x),this._resolved=null,(0,k.toDisposable)(()=>{for(let O=0;O<this._entries.length;O++)if(this._entries[O]===x){this._entries.splice(O,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const M=this._resolve();M&&(this._resolved=new P(this.languageId,M))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(I.cmp),D(this._entries.map(M=>M.configuration)))}}function D(N){let M={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const R of N)M={comments:R.comments||M.comments,brackets:R.brackets||M.brackets,wordPattern:R.wordPattern||M.wordPattern,indentationRules:R.indentationRules||M.indentationRules,onEnterRules:R.onEnterRules||M.onEnterRules,autoClosingPairs:R.autoClosingPairs||M.autoClosingPairs,surroundingPairs:R.surroundingPairs||M.surroundingPairs,autoCloseBefore:R.autoCloseBefore||M.autoCloseBefore,folding:R.folding||M.folding,colorizedBracketPairs:R.colorizedBracketPairs||M.colorizedBracketPairs,__electricCharacterSupport:R.__electricCharacterSupport||M.__electricCharacterSupport};return M}class I{constructor(M,R,x){this.configuration=M,this.priority=R,this.order=x}static cmp(M,R){return M.priority===R.priority?M.order-R.order:M.priority-R.priority}}class T{constructor(M){this.languageId=M}}e.LanguageConfigurationChangeEvent=T;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(M,R,x=0){let O=this._entries.get(M);O||(O=new w(M),this._entries.set(M,O));const B=O.register(R,x);return this._onDidChange.fire(new T(M)),(0,k.toDisposable)(()=>{B.dispose(),this._onDidChange.fire(new T(M))})}getLanguageConfiguration(M){const R=this._entries.get(M);return R?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=A;class P{constructor(M,R){this.languageId=M,this.underlyingConfig=R,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new a.OnEnterSupport(this.underlyingConfig):null,this.comments=P._handleComments(this.underlyingConfig),this.characterPair=new _.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(M,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(M,R,x,O){return this._onEnterSupport?this._onEnterSupport.onEnter(M,R,x,O):null}getAutoClosingPairs(){return new S.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(M){return this.characterPair.getAutoCloseBeforeSet(M)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(M){const R=M.comments;if(!R)return null;const x={};if(R.lineComment&&(x.lineCommentToken=R.lineComment),R.blockComment){const[O,B]=R.blockComment;x.blockCommentStartToken=O,x.blockCommentEndToken=B}return x}}e.ResolvedLanguageConfiguration=P,(0,u.registerSingleton)(e.ILanguageConfigurationService,s,1)}),define(se[247],oe([1,0,14,2,327,603,5,32,643,51,189,13,64,61,12,18,205,112,62,44,7]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const l=60*1e3,o=5*60*1e3;function g(A,P){const N=A.getModel(P);return!(!N||N.isTooLargeForSyncing())}let h=class extends k.Disposable{constructor(P,N,M,R,x){super(),this._modelService=P,this._workerManager=this._register(new C(this._modelService,R)),this._logService=M,this._register(x.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(O,B)=>g(this._modelService,O.uri)?this._workerManager.withWorker().then(W=>W.computeLinks(O.uri)).then(W=>W&&{links:W}):Promise.resolve({links:[]})})),this._register(x.completionProvider.register("*",new m(this._workerManager,N,this._modelService,R)))}dispose(){super.dispose()}canComputeUnicodeHighlights(P){return g(this._modelService,P)}computedUnicodeHighlights(P,N,M){return this._workerManager.withWorker().then(R=>R.computedUnicodeHighlights(P,N,M))}async computeDiff(P,N,M,R){const x=await this._workerManager.withWorker().then(W=>W.computeDiff(P,N,M,R));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 K;return new f.DetailedLineRangeMapping(new c.LineRange(V[0],V[1]),new c.LineRange(V[2],V[3]),(K=V[4])===null||K===void 0?void 0:K.map(F=>new f.RangeMapping(new S.Range(F[0],F[1],F[2],F[3]),new S.Range(F[4],F[5],F[6],F[7]))))})}}computeMoreMinimalEdits(P,N,M=!1){if((0,a.isNonEmptyArray)(N)){if(!g(this._modelService,P))return Promise.resolve(N);const R=n.StopWatch.create(),x=this._workerManager.withWorker().then(O=>O.computeMoreMinimalEdits(P,N,M));return x.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",P.toString(!0),R.elapsed())),Promise.race([x,(0,L.timeout)(1e3).then(()=>N)])}else return Promise.resolve(void 0)}canNavigateValueSet(P){return g(this._modelService,P)}navigateValueSet(P,N,M){return this._workerManager.withWorker().then(R=>R.navigateValueSet(P,N,M))}canComputeWordRanges(P){return g(this._modelService,P)}computeWordRanges(P,N){return this._workerManager.withWorker().then(M=>M.computeWordRanges(P,N))}};e.EditorWorkerService=h,e.EditorWorkerService=h=ke([ge(0,v.IModelService),ge(1,b.ITextResourceConfigurationService),ge(2,i.ILogService),ge(3,p.ILanguageConfigurationService),ge(4,r.ILanguageFeaturesService)],h);class m{constructor(P,N,M,R){this.languageConfigurationService=R,this._debugDisplayName="wordbasedCompletions",this._workerManager=P,this._configurationService=N,this._modelService=M}async provideCompletionItems(P,N){const M=this._configurationService.getValue(P.uri,N,"editor");if(M.wordBasedSuggestions==="off")return;const R=[];if(M.wordBasedSuggestions==="currentDocument")g(this._modelService,P.uri)&&R.push(P.uri);else for(const F of this._modelService.getModels())g(this._modelService,F.uri)&&(F===P?R.unshift(F.uri):(M.wordBasedSuggestions==="allDocuments"||F.getLanguageId()===P.getLanguageId())&&R.push(F.uri));if(R.length===0)return;const x=this.languageConfigurationService.getLanguageConfiguration(P.getLanguageId()).getWordDefinition(),O=P.getWordAtPosition(N),B=O?new S.Range(N.lineNumber,O.startColumn,N.lineNumber,O.endColumn):S.Range.fromPositions(N),W=B.setEndPosition(N.lineNumber,N.column),K=await(await this._workerManager.withWorker()).textualSuggest(R,O?.word,x);if(K)return{duration:K.duration,suggestions:K.words.map(F=>({kind:18,label:F,insertText:F,range:{insert:W,replace:B}}))}}}class C extends k.Disposable{constructor(P,N){super(),this.languageConfigurationService=N,this._modelService=P,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new s.WindowIntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(o/2),d.$window),this._register(this._modelService.onModelRemoved(R=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>o&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new T(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class w extends k.Disposable{constructor(P,N,M){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=P,this._modelService=N,!M){const R=new L.IntervalTimer;R.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(R)}}dispose(){for(const P in this._syncedModels)(0,k.dispose)(this._syncedModels[P]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(P,N){for(const M of P){const R=M.toString();this._syncedModels[R]||this._beginModelSync(M,N),this._syncedModels[R]&&(this._syncedModelsLastUsedTime[R]=new Date().getTime())}}_checkStopModelSync(){const P=new Date().getTime(),N=[];for(const M in this._syncedModelsLastUsedTime)P-this._syncedModelsLastUsedTime[M]>l&&N.push(M);for(const M of N)this._stopModelSync(M)}_beginModelSync(P,N){const M=this._modelService.getModel(P);if(!M||!N&&M.isTooLargeForSyncing())return;const R=P.toString();this._proxy.acceptNewModel({url:M.uri.toString(),lines:M.getLinesContent(),EOL:M.getEOL(),versionId:M.getVersionId()});const x=new k.DisposableStore;x.add(M.onDidChangeContent(O=>{this._proxy.acceptModelChanged(R.toString(),O)})),x.add(M.onWillDispose(()=>{this._stopModelSync(R)})),x.add((0,k.toDisposable)(()=>{this._proxy.acceptRemovedModel(R)})),this._syncedModels[R]=x}_stopModelSync(P){const N=this._syncedModels[P];delete this._syncedModels[P],delete this._syncedModelsLastUsedTime[P],(0,k.dispose)(N)}}class D{constructor(P){this._instance=P,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class I{constructor(P){this._workerClient=P}fhr(P,N){return this._workerClient.fhr(P,N)}}e.EditorWorkerHost=I;class T extends k.Disposable{constructor(P,N,M,R){super(),this.languageConfigurationService=R,this._disposed=!1,this._modelService=P,this._keepIdleModels=N,this._workerFactory=new E.DefaultWorkerFactory(M),this._worker=null,this._modelManager=null}fhr(P,N){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(P){(0,y.logOnceWebWorkerWarning)(P),this._worker=new D(new _.EditorSimpleWorker(new I(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,P=>((0,y.logOnceWebWorkerWarning)(P),this._worker=new D(new _.EditorSimpleWorker(new I(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(P){return this._modelManager||(this._modelManager=this._register(new w(P,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(P,N=!1){return this._disposed?Promise.reject((0,t.canceled)()):this._getProxy().then(M=>(this._getOrCreateModelManager(M).ensureSyncedResources(P,N),M))}computedUnicodeHighlights(P,N,M){return this._withSyncedResources([P]).then(R=>R.computeUnicodeHighlights(P.toString(),N,M))}computeDiff(P,N,M,R){return this._withSyncedResources([P,N],!0).then(x=>x.computeDiff(P.toString(),N.toString(),M,R))}computeMoreMinimalEdits(P,N,M){return this._withSyncedResources([P]).then(R=>R.computeMoreMinimalEdits(P.toString(),N,M))}computeLinks(P){return this._withSyncedResources([P]).then(N=>N.computeLinks(P.toString()))}computeDefaultDocumentColors(P){return this._withSyncedResources([P]).then(N=>N.computeDefaultDocumentColors(P.toString()))}async textualSuggest(P,N,M){const R=await this._withSyncedResources(P),x=M.source,O=M.flags;return R.textualSuggest(P.map(B=>B.toString()),N,x,O)}computeWordRanges(P,N){return this._withSyncedResources([P]).then(M=>{const R=this._modelService.getModel(P);if(!R)return Promise.resolve(null);const x=this.languageConfigurationService.getLanguageConfiguration(R.getLanguageId()).getWordDefinition(),O=x.source,B=x.flags;return M.computeWordRanges(P.toString(),N,O,B)})}navigateValueSet(P,N,M){return this._withSyncedResources([P]).then(R=>{const x=this._modelService.getModel(P);if(!x)return null;const O=this.languageConfigurationService.getLanguageConfiguration(x.getLanguageId()).getWordDefinition(),B=O.source,W=O.flags;return R.navigateValueSet(P.toString(),N,M,B,W)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=T}),define(se[790],oe([1,0,55,247]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function y(S,p,_){return new E(S,p,_)}e.createWebWorker=y;class E extends k.EditorWorkerClient{constructor(p,_,v){super(p,v.keepIdleModels||!1,v.label,_),this._foreignModuleId=v.moduleId,this._foreignModuleCreateData=v.createData||null,this._foreignModuleHost=v.host||null,this._foreignProxy=null}fhr(p,_){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,_))}catch(v){return Promise.reject(v)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(p=>{const _=this._foreignModuleHost?(0,L.getAllMethodNames)(this._foreignModuleHost):[];return p.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,_).then(v=>{this._foreignModuleCreateData=null;const b=(n,t)=>p.fmr(n,t),a=(n,t)=>function(){const r=Array.prototype.slice.call(arguments,0);return t(n,r)},i={};for(const n of v)i[n]=a(n,b);return i})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(p){return this._withSyncedResources(p).then(_=>this.getProxy())}}}),define(se[248],oe([1,0,11,113,133,32]),function(te,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 S(i,n,t){const r=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)!==r)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,r=!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 s=t-1;s>0&&n.getLineContent(s)==="";s--)if(s===1)return{indentation:"",action:null};const c=S(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 s=c-1,l=f.getIndentMetadata(n.getLineContent(s));if(!(l&3)&&l&4){let o=0;for(let g=s-1;g>0;g--)if(!f.shouldIndentNextLine(n.getLineContent(g))){o=g;break}return{indentation:L.getLeadingWhitespace(n.getLineContent(o+1)),action:null,line:o+1}}if(r)return{indentation:L.getLeadingWhitespace(n.getLineContent(c)),action:null,line:c};for(let o=c;o>0;o--){const g=n.getLineContent(o);if(f.shouldIncrease(g))return{indentation:L.getLeadingWhitespace(g),action:k.IndentAction.Indent,line:o};if(f.shouldIndentNextLine(g)){let h=0;for(let m=o-1;m>0;m--)if(!f.shouldIndentNextLine(n.getLineContent(o))){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:o}}return{indentation:L.getLeadingWhitespace(n.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=p;function _(i,n,t,r,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 s=p(i,n,r,void 0,f),l=n.getLineContent(r);if(s){const o=s.line;if(o!==void 0){let g=!0;for(let h=o;h<r-1;h++)if(!/^\s*$/.test(n.getLineContent(h))){g=!1;break}if(g){const h=c.onEnter(i,"",n.getLineContent(o),"");if(h){let m=L.getLeadingWhitespace(n.getLineContent(o));return h.removeText&&(m=m.substring(0,m.length-h.removeText)),h.indentAction===k.IndentAction.Indent||h.indentAction===k.IndentAction.IndentOutdent?m=u.shiftIndent(m):h.indentAction===k.IndentAction.Outdent&&(m=u.unshiftIndent(m)),d.shouldDecrease(l)&&(m=u.unshiftIndent(m)),h.appendText&&(m+=h.appendText),L.getLeadingWhitespace(m)}}}return d.shouldDecrease(l)?s.action===k.IndentAction.Indent?s.indentation:u.unshiftIndent(s.indentation):s.action===k.IndentAction.Indent?u.shiftIndent(s.indentation):s.indentation}return null}e.getGoodIndentForLine=_;function v(i,n,t,r,u){if(i<4)return null;n.tokenization.forceTokenization(t.startLineNumber);const f=n.tokenization.getLineTokens(t.startLineNumber),c=(0,y.createScopedLineTokens)(f,t.startColumn-1),d=c.getLineContent();let s=!1,l;c.firstCharOffset>0&&f.getLanguageId(0)!==c.languageId?(s=!0,l=d.substr(0,t.startColumn-1-c.firstCharOffset)):l=f.getLineContent().substring(0,t.startColumn-1);let o;t.isEmpty()?o=d.substr(t.startColumn-1-c.firstCharOffset):o=(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:T=>n.tokenization.getLineTokens(T),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(T,A)=>n.getLanguageIdAtPosition(T,A)},getLineContent:T=>T===t.startLineNumber?h:n.getLineContent(T)},w=L.getLeadingWhitespace(f.getLineContent()),D=p(i,C,t.startLineNumber+1,void 0,u);if(!D){const T=s?w:m;return{beforeEnter:T,afterEnter:T}}let I=s?w:D.indentation;return D.action===k.IndentAction.Indent&&(I=r.shiftIndent(I)),g.shouldDecrease(o)&&(I=r.unshiftIndent(I)),{beforeEnter:s?w:m,afterEnter:I}}e.getIndentForEnter=v;function b(i,n,t,r,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 s=c.getLineContent(),l=s.substr(0,t.startColumn-1-c.firstCharOffset);let o;if(t.isEmpty()?o=s.substr(t.startColumn-1-c.firstCharOffset):o=(0,E.getScopedLineTokens)(n,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset),!d.shouldDecrease(l+o)&&d.shouldDecrease(l+r+o)){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 a(i,n,t){const r=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!r||n<1||n>i.getLineCount()?null:r.getIndentMetadata(i.getLineContent(n))}e.getIndentMetadata=a}),define(se[249],oe([1,0,113,32]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function y(E,S,p,_){const v=(0,k.getScopedLineTokens)(S,p.startLineNumber,p.startColumn),b=_.getLanguageConfiguration(v.languageId);if(!b)return null;const a=v.getLineContent(),i=a.substr(0,p.startColumn-1-v.firstCharOffset);let n;p.isEmpty()?n=a.substr(p.startColumn-1-v.firstCharOffset):n=(0,k.getScopedLineTokens)(S,p.endLineNumber,p.endColumn).getLineContent().substr(p.endColumn-1-v.firstCharOffset);let t="";if(p.startLineNumber>1&&v.firstCharOffset===0){const s=(0,k.getScopedLineTokens)(S,p.startLineNumber-1);s.languageId===v.languageId&&(t=s.getLineContent())}const r=b.onEnter(E,t,i,n);if(!r)return null;const u=r.indentAction;let f=r.appendText;const c=r.removeText||0;f?u===L.IndentAction.Indent&&(f=" "+f):u===L.IndentAction.Indent||u===L.IndentAction.IndentOutdent?f=" ":f="";let d=(0,k.getIndentationAtPosition)(S,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(se[250],oe([1,0,11,85,5,24,249,32]),function(te,e,L,k,y,E,S,p){"use strict";var _;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 r=t.length;r<=n;r++)t[r]=t[r-1]+i;return t[n]}let a=_=class{static unshiftIndent(n,t,r,u,f){const c=k.CursorColumns.visibleColumnFromColumn(n,t,r);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,r)/r;return b(d,l)}}static shiftIndent(n,t,r,u,f){const c=k.CursorColumns.visibleColumnFromColumn(n,t,r);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,r)/r;return b(d,l)}}constructor(n,t,r){this._languageConfigurationService=r,this._opts=t,this._selection=n,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(n,t,r){this._useLastEditRangeForCursorEndPosition?n.addTrackedEditOperation(t,r):n.addEditOperation(t,r)}getEditOperations(n,t){const r=this._selection.startLineNumber;let u=this._selection.endLineNumber;this._selection.endColumn===1&&r!==u&&(u=u-1);const{tabSize:f,indentSize:c,insertSpaces:d}=this._opts,s=r===u;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(n.getLineContent(r))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,o=0;for(let g=r;g<=u;g++,l=o){o=0;const h=n.getLineContent(g);let m=L.firstNonWhitespaceIndex(h);if(this._opts.isUnshift&&(h.length===0||m===0)||!s&&!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,S.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(o=l,D.appendText)for(let I=0,T=D.appendText.length;I<T&&o<c&&D.appendText.charCodeAt(I)===32;I++)o++;D.removeText&&(o=Math.max(0,o-D.removeText));for(let I=0;I<o&&!(m===0||h.charCodeAt(m-1)!==32);I++)m--}}if(this._opts.isUnshift&&m===0)continue;let C;this._opts.isUnshift?C=_.unshiftIndent(h,m+1,f,c,d):C=_.shiftIndent(h,m+1,f,c,d),this._addEditOperation(t,new y.Range(g,1,g,m+1),C),g===r&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=m+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&n.getLineLength(r)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const l=d?b(" ",c):" ";for(let o=r;o<=u;o++){const g=n.getLineContent(o);let h=L.firstNonWhitespaceIndex(g);if(!(this._opts.isUnshift&&(g.length===0||h===0))&&!(!s&&!this._opts.isUnshift&&g.length===0)&&(h===-1&&(h=g.length),!(this._opts.isUnshift&&h===0)))if(this._opts.isUnshift){h=Math.min(h,c);for(let m=0;m<h;m++)if(g.charCodeAt(m)===9){h=m+1;break}this._addEditOperation(t,new y.Range(o,1,o,h+1),"")}else this._addEditOperation(t,new y.Range(o,1,o,1),l),o===r&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(n,t){if(this._useLastEditRangeForCursorEndPosition){const u=t.getInverseEditOperations()[0];return new E.Selection(u.range.endLineNumber,u.range.endColumn,u.range.endLineNumber,u.range.endColumn)}const r=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const u=this._selection.startColumn;return r.startColumn<=u?r:r.getDirection()===0?new E.Selection(r.startLineNumber,u,r.endLineNumber,r.endColumn):new E.Selection(r.endLineNumber,r.endColumn,r.startLineNumber,u)}return r}};e.ShiftCommand=a,e.ShiftCommand=a=_=ke([ge(2,p.ILanguageConfigurationService)],a)}),define(se[251],oe([1,0,12,11,130,250,501,75,150,5,10,113,32,133,248,249]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class u{static indent(h,m,C){if(m===null||C===null)return[];const w=[];for(let D=0,I=C.length;D<I;D++)w[D]=new E.ShiftCommand(C[D],{isUnshift:!1,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService);return w}static outdent(h,m,C){const w=[];for(let D=0,I=C.length;D<I;D++)w[D]=new E.ShiftCommand(C[D],{isUnshift:!0,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService);return w}static shiftIndent(h,m,C){return C=C||1,E.ShiftCommand.shiftIndent(m,m.length+C,h.tabSize,h.indentSize,h.insertSpaces)}static unshiftIndent(h,m,C){return C=C||1,E.ShiftCommand.unshiftIndent(m,m.length+C,h.tabSize,h.indentSize,h.insertSpaces)}static _distributedPaste(h,m,C,w){const D=[];for(let I=0,T=C.length;I<T;I++)D[I]=new y.ReplaceCommand(C[I],w[I]);return new p.EditOperationResult(0,D,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(h,m,C,w,D){const I=[];for(let T=0,A=C.length;T<A;T++){const P=C[T],N=P.getPosition();if(D&&!P.isEmpty()&&(D=!1),D&&w.indexOf(`
|
||
`)!==w.length-1&&(D=!1),D){const M=new v.Range(N.lineNumber,1,N.lineNumber,1);I[T]=new y.ReplaceCommandThatPreservesSelection(M,w,P,!0)}else I[T]=new y.ReplaceCommand(P,w)}return new p.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(h,m,C,w,D){if(w||m.length===1)return null;if(D&&D.length===m.length)return D;if(h.multiCursorPaste==="spread"){C.charCodeAt(C.length-1)===10&&(C=C.substr(0,C.length-1)),C.charCodeAt(C.length-1)===13&&(C=C.substr(0,C.length-1));const I=k.splitLines(C);if(I.length===m.length)return I}return null}static paste(h,m,C,w,D,I){const T=this._distributePasteToCursors(h,C,w,D,I);return T?(C=C.sort(v.Range.compareRangesUsingStarts),this._distributedPaste(h,m,C,T)):this._simplePaste(h,m,C,w,D)}static _goodIndentForLine(h,m,C){let w=null,D="";const I=(0,t.getInheritIndentForLine)(h.autoIndent,m,C,!1,h.languageConfigurationService);if(I)w=I.action,D=I.indentation;else if(C>1){let T;for(T=C-1;T>=1;T--){const N=m.getLineContent(T);if(k.lastNonWhitespaceIndex(N)>=0)break}if(T<1)return null;const A=m.getLineMaxColumn(T),P=(0,r.getEnterAction)(h.autoIndent,m,new v.Range(T,A,T,A),h.languageConfigurationService);P&&(D=P.indentation+P.appendText)}return w&&(w===a.IndentAction.Indent&&(D=u.shiftIndent(h,D)),w===a.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 T=h.visibleColumnFromColumn(m,I),A=h.indentSize,P=A-T%A;for(let N=0;N<P;N++)D+=" "}else D=" ";return new y.ReplaceCommand(C,D,w)}static tab(h,m,C){const w=[];for(let D=0,I=C.length;D<I;D++){const T=C[D];if(T.isEmpty()){const A=m.getLineContent(T.startLineNumber);if(/^\s*$/.test(A)&&m.tokenization.isCheapToTokenize(T.startLineNumber)){let P=this._goodIndentForLine(h,m,T.startLineNumber);P=P||" ";const N=h.normalizeIndentation(P);if(!A.startsWith(N)){w[D]=new y.ReplaceCommand(new v.Range(T.startLineNumber,1,T.startLineNumber,A.length+1),N,!0);continue}}w[D]=this._replaceJumpToNextIndent(h,m,T,!0)}else{if(T.startLineNumber===T.endLineNumber){const A=m.getLineMaxColumn(T.startLineNumber);if(T.startColumn!==1||T.endColumn!==A){w[D]=this._replaceJumpToNextIndent(h,m,T,!1);continue}}w[D]=new E.ShiftCommand(T,{isUnshift:!1,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService)}}return w}static compositionType(h,m,C,w,D,I,T,A){const P=w.map(N=>this._compositionType(C,N,D,I,T,A));return new p.EditOperationResult(4,P,{shouldPushStackElementBefore:s(h,4),shouldPushStackElementAfter:!1})}static _compositionType(h,m,C,w,D,I){if(!m.isEmpty())return null;const T=m.getPosition(),A=Math.max(1,T.column-w),P=Math.min(h.getLineMaxColumn(T.lineNumber),T.column+D),N=new v.Range(T.lineNumber,A,T.lineNumber,P);return h.getValueInRange(N)===C&&I===0?null:new y.ReplaceCommandWithOffsetCursorState(N,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),P=k.getLeadingWhitespace(A).substring(0,w.startColumn-1);return u._typeCommand(w,`
|
||
`+h.normalizeIndentation(P),C)}const D=(0,r.getEnterAction)(h.autoIndent,m,w,h.languageConfigurationService);if(D){if(D.indentAction===a.IndentAction.None)return u._typeCommand(w,`
|
||
`+h.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===a.IndentAction.Indent)return u._typeCommand(w,`
|
||
`+h.normalizeIndentation(D.indentation+D.appendText),C);if(D.indentAction===a.IndentAction.IndentOutdent){const A=h.normalizeIndentation(D.indentation),P=h.normalizeIndentation(D.indentation+D.appendText),N=`
|
||
`+P+`
|
||
`+A;return C?new y.ReplaceCommandWithoutChangingPosition(w,N,!0):new y.ReplaceCommandWithOffsetCursorState(w,N,-1,P.length-A.length,!0)}else if(D.indentAction===a.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),T=k.getLeadingWhitespace(I).substring(0,w.startColumn-1);if(h.autoIndent>=4){const A=(0,t.getIndentForEnter)(h.autoIndent,m,w,{unshiftIndent:P=>u.unshiftIndent(h,P),shiftIndent:P=>u.shiftIndent(h,P),normalizeIndentation:P=>h.normalizeIndentation(P)},h.languageConfigurationService);if(A){let P=h.visibleColumnFromColumn(m,w.getEndPosition());const N=w.endColumn,M=m.getLineContent(w.endLineNumber),R=k.firstNonWhitespaceIndex(M);if(R>=0?w=w.setEndPosition(w.endLineNumber,Math.max(w.endColumn,R+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 N<=R+1&&(h.insertSpaces||(P=Math.ceil(P/h.indentSize)),x=Math.min(P+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(T),C)}static _isAutoIndentType(h,m,C){if(h.autoIndent<4)return!1;for(let w=0,D=C.length;w<D;w++)if(!m.tokenization.isCheapToTokenize(C[w].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(h,m,C,w){const D=(0,i.getIndentationAtPosition)(m,C.startLineNumber,C.startColumn),I=(0,t.getIndentActionForType)(h.autoIndent,m,C,w,{shiftIndent:T=>u.shiftIndent(h,T),unshiftIndent:T=>u.unshiftIndent(h,T)},h.languageConfigurationService);if(I===null)return null;if(I!==h.normalizeIndentation(D)){const T=m.getLineFirstNonWhitespaceColumn(C.startLineNumber);return T===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(T-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,T=C.length;I<T;I++){const A=C[I];if(!A.isEmpty())return!1;const P=A.getPosition(),N=m.getLineContent(P.lineNumber);if(N.charAt(P.column-1)!==D)return!1;const R=(0,p.isQuote)(D);if((P.column>2?N.charCodeAt(P.column-2):0)===92&&R)return!1;if(h.autoClosingOvertype==="auto"){let O=!1;for(let B=0,W=w.length;B<W;B++){const V=w[B];if(P.lineNumber===V.startLineNumber&&P.column===V.startColumn){O=!0;break}}if(!O)return!1}}return!0}static _runAutoClosingOvertype(h,m,C,w,D){const I=[];for(let T=0,A=w.length;T<A;T++){const N=w[T].getPosition(),M=new v.Range(N.lineNumber,N.column,N.lineNumber,N.column+1);I[T]=new y.ReplaceCommand(M,D)}return new p.EditOperationResult(4,I,{shouldPushStackElementBefore:s(h,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(h,m){const C=m.charAt(0),w=h.autoClosingPairs.autoClosingPairsOpenByStart.get(C)||[],D=h.autoClosingPairs.autoClosingPairsCloseByStart.get(C)||[],I=w.some(A=>m.startsWith(A.open)),T=D.some(A=>m.startsWith(A.close));return!I&&T}static _findAutoClosingPairOpen(h,m,C,w){const D=h.autoClosingPairs.autoClosingPairsOpenByEnd.get(w);if(!D)return null;let I=null;for(const T of D)if(I===null||T.open.length>I.open.length){let A=!0;for(const P of C)if(m.getValueInRange(new v.Range(P.lineNumber,P.column-T.open.length+1,P.lineNumber,P.column))+w!==T.open){A=!1;break}A&&(I=T)}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 O of C)if(!O.isEmpty())return null;const I=C.map(O=>{const B=O.getPosition();return D?{lineNumber:B.lineNumber,beforeColumn:B.column-w.length,afterColumn:B.column}:{lineNumber:B.lineNumber,beforeColumn:B.column,afterColumn:B.column}}),T=this._findAutoClosingPairOpen(h,m,I.map(O=>new b.Position(O.lineNumber,O.beforeColumn)),w);if(!T)return null;let A,P;if((0,p.isQuote)(w)?(A=h.autoClosingQuotes,P=h.shouldAutoCloseBefore.quote):(h.blockCommentStartToken?T.open.includes(h.blockCommentStartToken):!1)?(A=h.autoClosingComments,P=h.shouldAutoCloseBefore.comment):(A=h.autoClosingBrackets,P=h.shouldAutoCloseBefore.bracket),A==="never")return null;const M=this._findContainedAutoClosingPair(h,T),R=M?M.close:"";let x=!0;for(const O of I){const{lineNumber:B,beforeColumn:W,afterColumn:V}=O,K=m.getLineContent(B),F=K.substring(0,W-1),q=K.substring(V-1);if(q.startsWith(R)||(x=!1),q.length>0){const $=q.charAt(0);if(!u._isBeforeClosingBrace(h,q)&&!P($))return null}if(T.open.length===1&&(w==="'"||w==='"')&&A!=="always"){const $=(0,_.getMapForWordSeparators)(h.wordSeparators);if(F.length>0){const J=F.charCodeAt(F.length-1);if($.get(J)===0)return null}}if(!m.tokenization.isCheapToTokenize(B))return null;m.tokenization.forceTokenization(B);const ie=m.tokenization.getLineTokens(B),ae=(0,n.createScopedLineTokens)(ie,W-1);if(!T.shouldAutoClose(ae,W-ae.firstCharOffset))return null;const ne=T.findNeutralCharacter();if(ne){const $=m.tokenization.getTokenTypeIfInsertingCharacter(B,W,ne);if(!T.isOK($))return null}}return x?T.close.substring(0,T.close.length-R.length):T.close}static _runAutoClosingOpenCharType(h,m,C,w,D,I,T){const A=[];for(let P=0,N=w.length;P<N;P++){const M=w[P];A[P]=new f(M,D,!I,T)}return new p.EditOperationResult(4,A,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(h,m){return(0,p.isQuote)(m)?h.autoSurround==="quotes"||h.autoSurround==="languageDefined":h.autoSurround==="brackets"||h.autoSurround==="languageDefined"}static _isSurroundSelectionType(h,m,C,w){if(!u._shouldSurroundChar(h,w)||!h.surroundingPairs.hasOwnProperty(w))return!1;const D=(0,p.isQuote)(w);for(const I of C){if(I.isEmpty())return!1;let T=!0;for(let A=I.startLineNumber;A<=I.endLineNumber;A++){const P=m.getLineContent(A),N=A===I.startLineNumber?I.startColumn-1:0,M=A===I.endLineNumber?I.endColumn-1:P.length,R=P.substring(N,M);if(/[^ \t]/.test(R)){T=!1;break}}if(T)return!1;if(D&&I.startLineNumber===I.endLineNumber&&I.startColumn+1===I.endColumn){const A=m.getValueInRange(I);if((0,p.isQuote)(A))return!1}}return!0}static _runSurroundSelectionType(h,m,C,w,D){const I=[];for(let T=0,A=w.length;T<A;T++){const P=w[T],N=m.surroundingPairs[D];I[T]=new S.SurroundSelectionCommand(P,D,N)}return new p.EditOperationResult(0,I,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(h,m,C){return!!(C.length===1&&m.tokenization.isCheapToTokenize(C[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(h,m,C,w,D){if(!m.electricChars.hasOwnProperty(D)||!w.isEmpty())return null;const I=w.getPosition();C.tokenization.forceTokenization(I.lineNumber);const T=C.tokenization.getLineTokens(I.lineNumber);let A;try{A=m.onElectricCharacter(D,T,I.column)}catch(P){return(0,L.onUnexpectedError)(P),null}if(!A)return null;if(A.matchOpenBracket){const P=(T.getLineContent()+D).lastIndexOf(A.matchOpenBracket)+1,N=C.bracketPairs.findMatchingBracketUp(A.matchOpenBracket,{lineNumber:I.lineNumber,column:P},500);if(N){if(N.startLineNumber===I.lineNumber)return null;const M=C.getLineContent(N.startLineNumber),R=k.getLeadingWhitespace(M),x=m.normalizeIndentation(R),O=C.getLineContent(I.lineNumber),B=C.getLineFirstNonWhitespaceColumn(I.lineNumber)||I.column,W=O.substring(B-1,I.column-1),V=x+W+D,K=new v.Range(I.lineNumber,1,I.lineNumber,I.column),F=new y.ReplaceCommand(K,V);return new p.EditOperationResult(d(V,h),[F],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(h,m,C,w,D,I){if(!w)return null;let T=null;for(const M of w)if(T===null)T=M.insertedText;else if(T!==M.insertedText)return null;if(!T||T.length!==1)return null;const A=T;let P=!1;for(const M of w)if(M.deletedText.length!==0){P=!0;break}if(P){if(!u._shouldSurroundChar(m,A)||!m.surroundingPairs.hasOwnProperty(A))return null;const M=(0,p.isQuote)(A);for(const O of w)if(O.deletedSelectionStart!==0||O.deletedSelectionEnd!==O.deletedText.length||/^[ \t]+$/.test(O.deletedText)||M&&(0,p.isQuote)(O.deletedText))return null;const R=[];for(const O of D){if(!O.isEmpty())return null;R.push(O.getPosition())}if(R.length!==w.length)return null;const x=[];for(let O=0,B=R.length;O<B;O++)x.push(new S.CompositionSurroundSelectionCommand(R[O],w[O].deletedText,m.surroundingPairs[A]));return new p.EditOperationResult(4,x,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(m,C,D,I,A)){const M=D.map(R=>new y.ReplaceCommand(new v.Range(R.positionLineNumber,R.positionColumn,R.positionLineNumber,R.positionColumn+1),"",!1));return new p.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const N=this._getAutoClosingPairClose(m,C,D,A,!0);return N!==null?this._runAutoClosingOpenCharType(h,m,C,D,A,!0,N):null}static typeWithInterceptors(h,m,C,w,D,I,T){if(!h&&T===`
|
||
`){const N=[];for(let M=0,R=D.length;M<R;M++)N[M]=u._enter(C,w,!1,D[M]);return new p.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!h&&this._isAutoIndentType(C,w,D)){const N=[];let M=!1;for(let R=0,x=D.length;R<x;R++)if(N[R]=this._runAutoIndentType(C,w,D[R],T),!N[R]){M=!0;break}if(!M)return new p.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(C,w,D,I,T))return this._runAutoClosingOvertype(m,C,w,D,T);if(!h){const N=this._getAutoClosingPairClose(C,w,D,T,!1);if(N)return this._runAutoClosingOpenCharType(m,C,w,D,T,!1,N)}if(!h&&this._isSurroundSelectionType(C,w,D,T))return this._runSurroundSelectionType(m,C,w,D,T);if(!h&&this._isTypeInterceptorElectricChar(C,w,D)){const N=this._typeInterceptorElectricChar(m,C,w,D[0],T);if(N)return N}const A=[];for(let N=0,M=D.length;N<M;N++)A[N]=new y.ReplaceCommand(D[N],T);const P=d(T,m);return new p.EditOperationResult(P,A,{shouldPushStackElementBefore:s(m,P),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(h,m,C,w,D){const I=[];for(let A=0,P=w.length;A<P;A++)I[A]=new y.ReplaceCommand(w[A],D);const T=d(D,h);return new p.EditOperationResult(T,I,{shouldPushStackElementBefore:s(h,T),shouldPushStackElementAfter:!1})}static lineInsertBefore(h,m,C){if(m===null||C===null)return[];const w=[];for(let D=0,I=C.length;D<I;D++){let T=C[D].positionLineNumber;if(T===1)w[D]=new y.ReplaceCommandWithoutChangingPosition(new v.Range(1,1,1,1),`
|
||
`);else{T--;const A=m.getLineMaxColumn(T);w[D]=this._enter(h,m,!1,new v.Range(T,A,T,A))}}return w}static lineInsertAfter(h,m,C){if(m===null||C===null)return[];const w=[];for(let D=0,I=C.length;D<I;D++){const T=C[D].positionLineNumber,A=m.getLineMaxColumn(T);w[D]=this._enter(h,m,!1,new v.Range(T,A,T,A))}return w}static lineBreakInsert(h,m,C){const w=[];for(let D=0,I=C.length;D<I;D++)w[D]=this._enter(h,m,!0,C[D]);return w}}e.TypeOperations=u;class f extends y.ReplaceCommandWithOffsetCursorState{constructor(h,m,C,w){super(h,(C?m:"")+w,0,-w.length),this._openCharacter=m,this._closeCharacter=w,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(h,m){const w=m.getInverseEditOperations()[0].range;return this.closeCharacterRange=new v.Range(w.startLineNumber,w.endColumn-this._closeCharacter.length,w.endLineNumber,w.endColumn),this.enclosingRange=new v.Range(w.startLineNumber,w.endColumn-this._openCharacter.length-this._closeCharacter.length,w.endLineNumber,w.endColumn),super.computeCursorState(h,m)}}e.TypeWithAutoClosingCommand=f;class c{constructor(h,m,C,w,D,I){this.deletedText=h,this.deletedSelectionStart=m,this.deletedSelectionEnd=C,this.insertedText=w,this.insertedSelectionStart=D,this.insertedSelectionEnd=I}}e.CompositionOutcome=c;function d(g,h){return g===" "?h===5||h===6?6:5:4}function s(g,h){return o(g)&&!o(h)?!0:g===5?!1:l(g)!==l(h)}function l(g){return g===6||g===5?"space":g}function o(g){return g===4||g===5||g===6}}),define(se[791],oe([1,0,12,11,513,75,502,207,251,5,24,114,214,2,215]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class r extends n.Disposable{constructor(o,g,h,m){super(),this._model=o,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=g,this._coordinatesConverter=h,this.context=new S.CursorContext(this._model,this._viewModel,this._coordinatesConverter,m),this._cursors=new y.CursorCollection(this.context),this._hasFocus=!1,this._isHandling=!1,this._compositionState=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,n.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(o){this.context=new S.CursorContext(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors.updateContext(this.context)}onLineMappingChanged(o){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(o,"viewModel",0,this.getCursorStates())}setHasFocus(o){this._hasFocus=o}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const o=this._cursors.getSelections();for(let g=0;g<this._autoClosedActions.length;g++){const h=this._autoClosedActions[g];h.isValid(o)||(h.dispose(),this._autoClosedActions.splice(g,1),g--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(o,g,h,m){let C=!1;const w=this.context.cursorConfig.multiCursorLimit;m!==null&&m.length>w&&(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(o,g,h,D,C)}setCursorColumnSelectData(o){this._columnSelectData=o}revealPrimary(o,g,h,m,C,w){const D=this._cursors.getViewPositions();let I=null,T=null;D.length>1?T=this._cursors.getViewSelections():I=v.Range.fromPositions(D[0],D[0]),o.emitViewEvent(new i.ViewRevealRangeRequestEvent(g,h,I,T,m,C,w))}saveState(){const o=[],g=this._cursors.getSelections();for(let h=0,m=g.length;h<m;h++){const C=g[h];o.push({inSelectionMode:!C.isEmpty(),selectionStart:{lineNumber:C.selectionStartLineNumber,column:C.selectionStartColumn},position:{lineNumber:C.positionLineNumber,column:C.positionColumn}})}return o}restoreState(o,g){const h=[];for(let m=0,C=g.length;m<C;m++){const w=g[m];let D=1,I=1;w.position&&w.position.lineNumber&&(D=w.position.lineNumber),w.position&&w.position.column&&(I=w.position.column);let T=D,A=I;w.selectionStart&&w.selectionStart.lineNumber&&(T=w.selectionStart.lineNumber),w.selectionStart&&w.selectionStart.column&&(A=w.selectionStart.column),h.push({selectionStartLineNumber:T,selectionStartColumn:A,positionLineNumber:D,positionColumn:I})}this.setStates(o,"restoreState",0,E.CursorState.fromModelSelections(h)),this.revealPrimary(o,"restoreState",!1,0,!0,1)}onModelContentChanged(o,g){if(g instanceof a.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(o,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const h=g.rawContentChangedEvent;if(this._knownModelVersionId=h.versionId,this._isHandling)return;const m=h.containsEvent(1);if(this._prevEditOperationType=0,m)this._cursors.dispose(),this._cursors=new y.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,"model",1,null,!1);else if(this._hasFocus&&h.resultingSelection&&h.resultingSelection.length>0){const C=E.CursorState.fromModelSelections(h.resultingSelection);this.setStates(o,"modelChange",h.isUndoing?5:h.isRedoing?6:2,C)&&this.revealPrimary(o,"modelChange",!1,0,!0,0)}else{const C=this._cursors.readSelectionFromMarkers();this.setStates(o,"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 o=this._cursors.getPrimaryCursor(),g=o.viewState.selectionStart.getStartPosition(),h=o.viewState.position;return{isReal:!1,fromViewLineNumber:g.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g),toViewLineNumber:h.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,h)}}getSelections(){return this._cursors.getSelections()}setSelections(o,g,h,m){this.setStates(o,g,m,E.CursorState.fromModelSelections(h))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(o){this._prevEditOperationType=o}_pushAutoClosedAction(o,g){const h=[],m=[];for(let D=0,I=o.length;D<I;D++)h.push({range:o[D],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),m.push({range:g[D],options:{description:"auto-closed-enclosing",stickiness:1}});const C=this._model.deltaDecorations([],h),w=this._model.deltaDecorations([],m);this._autoClosedActions.push(new f(this._model,C,w))}_executeEditOperation(o){if(!o)return;o.shouldPushStackElementBefore&&this._model.pushStackElement();const g=c.executeCommands(this._model,this._cursors.getSelections(),o.commands);if(g){this._interpretCommandResult(g);const h=[],m=[];for(let C=0;C<o.commands.length;C++){const w=o.commands[C];w instanceof _.TypeWithAutoClosingCommand&&w.enclosingRange&&w.closeCharacterRange&&(h.push(w.closeCharacterRange),m.push(w.enclosingRange))}h.length>0&&this._pushAutoClosedAction(h,m),this._prevEditOperationType=o.type}o.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(o){(!o||o.length===0)&&(o=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(o),this._cursors.normalize()}_emitStateChangedIfNecessary(o,g,h,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(o.emitViewEvent(new i.ViewCursorStateChangedEvent(I,D,h)),!m||m.cursorState.length!==w.cursorState.length||w.cursorState.some((T,A)=>!T.modelState.equals(m.cursorState[A].modelState))){const T=m?m.cursorState.map(P=>P.modelState.selection):null,A=m?m.modelVersionId:0;o.emitOutgoingEvent(new t.CursorStateChangedEvent(T,D,A,w.modelVersionId,g||"keyboard",h,C))}return!0}_findAutoClosingPairs(o){if(!o.length)return null;const g=[];for(let h=0,m=o.length;h<m;h++){const C=o[h];if(!C.text||C.text.indexOf(`
|
||
`)>=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 T=I[0].open,A=C.text.length-w[2].length-1,P=C.text.lastIndexOf(T,A-1);if(P===-1)return null;g.push([P,A])}return g}executeEdits(o,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,T=>{if(C)for(let P=0,N=C.length;P<N;P++){const[M,R]=C[P],x=T[P],O=x.range.startLineNumber,B=x.range.startColumn-1+M,W=x.range.startColumn-1+R;w.push(new v.Range(O,W+1,O,W+2)),D.push(new v.Range(O,B+1,O,W+2))}const A=m(T);return A&&(this._isHandling=!0),A});I&&(this._isHandling=!1,this.setSelections(o,g,I,0)),w.length>0&&this._pushAutoClosedAction(w,D)}_executeEdit(o,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(),o()}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(o){this._compositionState=new s(this._model,this.getSelections())}endComposition(o,g){const h=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{g==="keyboard"&&this._executeEditOperation(_.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,h,this.getSelections(),this.getAutoClosedCharacters()))},o,g)}type(o,g,h){this._executeEdit(()=>{if(h==="keyboard"){const m=g.length;let C=0;for(;C<m;){const w=k.nextCharLength(g,C),D=g.substr(C,w);this._executeEditOperation(_.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),D)),C+=w}}else this._executeEditOperation(_.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g))},o,h)}compositionType(o,g,h,m,C,w){if(g.length===0&&h===0&&m===0){if(C!==0){const D=this.getSelections().map(I=>{const T=I.getPosition();return new b.Selection(T.lineNumber,T.column+C,T.lineNumber,T.column+C)});this.setSelections(o,w,D,0)}return}this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g,h,m,C))},o,w)}paste(o,g,h,m,C){this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),g,h,m||[]))},o,C,4)}cut(o,g){this._executeEdit(()=>{this._executeEditOperation(p.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},o,g)}executeCommand(o,g,h){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new E.EditOperationResult(0,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,h)}executeCommands(o,g,h){this._executeEdit(()=>{this._executeEditOperation(new E.EditOperationResult(0,g,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,h)}}e.CursorsController=r;class u{static from(o,g){return new u(o.getVersionId(),g.getCursorStates())}constructor(o,g){this.modelVersionId=o,this.cursorState=g}equals(o){if(!o||this.modelVersionId!==o.modelVersionId||this.cursorState.length!==o.cursorState.length)return!1;for(let g=0,h=this.cursorState.length;g<h;g++)if(!this.cursorState[g].equals(o.cursorState[g]))return!1;return!0}}class f{static getAllAutoClosedCharacters(o){let g=[];for(const h of o)g=g.concat(h.getAutoClosedCharactersRanges());return g}constructor(o,g,h){this._model=o,this._autoClosedCharactersDecorations=g,this._autoClosedEnclosingDecorations=h}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const o=[];for(let g=0;g<this._autoClosedCharactersDecorations.length;g++){const h=this._model.getDecorationRange(this._autoClosedCharactersDecorations[g]);h&&o.push(h)}return o}isValid(o){const g=[];for(let h=0;h<this._autoClosedEnclosingDecorations.length;h++){const m=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[h]);if(m&&(g.push(m),m.startLineNumber!==m.endLineNumber))return!1}g.sort(v.Range.compareRangesUsingStarts),o.sort(v.Range.compareRangesUsingStarts);for(let h=0;h<o.length;h++)if(h>=g.length||!g[h].strictContainsRange(o[h]))return!1;return!0}}class c{static executeCommands(o,g,h){const m={model:o,selectionsBefore:g,trackedRanges:[],trackedRangesDirection:[]},C=this._innerExecuteCommands(m,h);for(let w=0,D=m.trackedRanges.length;w<D;w++)m.model._setTrackedRange(m.trackedRanges[w],null,0);return C}static _innerExecuteCommands(o,g){if(this._arrayIsEmpty(g))return null;const h=this._getEditOperations(o,g);if(h.operations.length===0)return null;const m=h.operations,C=this._getLoserCursorMap(m);if(C.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const w=[];for(let T=0,A=m.length;T<A;T++)C.hasOwnProperty(m[T].identifier.major.toString())||w.push(m[T]);h.hadTrackedEditOperation&&w.length>0&&(w[0]._isTracked=!0);let D=o.model.pushEditOperations(o.selectionsBefore,w,T=>{const A=[];for(let M=0;M<o.selectionsBefore.length;M++)A[M]=[];for(const M of T)M.identifier&&A[M.identifier.major].push(M);const P=(M,R)=>M.identifier.minor-R.identifier.minor,N=[];for(let M=0;M<o.selectionsBefore.length;M++)A[M].length>0?(A[M].sort(P),N[M]=g[M].computeCursorState(o.model,{getInverseEditOperations:()=>A[M],getTrackedSelection:R=>{const x=parseInt(R,10),O=o.model._getTrackedRange(o.trackedRanges[x]);return o.trackedRangesDirection[x]===0?new b.Selection(O.startLineNumber,O.startColumn,O.endLineNumber,O.endColumn):new b.Selection(O.endLineNumber,O.endColumn,O.startLineNumber,O.startColumn)}})):N[M]=o.selectionsBefore[M];return N});D||(D=o.selectionsBefore);const I=[];for(const T in C)C.hasOwnProperty(T)&&I.push(parseInt(T,10));I.sort((T,A)=>A-T);for(const T of I)D.splice(T,1);return D}static _arrayIsEmpty(o){for(let g=0,h=o.length;g<h;g++)if(o[g])return!1;return!0}static _getEditOperations(o,g){let h=[],m=!1;for(let C=0,w=g.length;C<w;C++){const D=g[C];if(D){const I=this._getEditOperationsFromCommand(o,C,D);h=h.concat(I.operations),m=m||I.hadTrackedEditOperation}}return{operations:h,hadTrackedEditOperation:m}}static _getEditOperationsFromCommand(o,g,h){const m=[];let C=0;const w=(P,N,M=!1)=>{v.Range.isEmpty(P)&&N===""||m.push({identifier:{major:g,minor:C++},range:P,text:N,forceMoveMarkers:M,isAutoWhitespaceEdit:h.insertsAutoWhitespace})};let D=!1;const A={addEditOperation:w,addTrackedEditOperation:(P,N,M)=>{D=!0,w(P,N,M)},trackSelection:(P,N)=>{const M=b.Selection.liftSelection(P);let R;if(M.isEmpty())if(typeof N=="boolean")N?R=2:R=3;else{const B=o.model.getLineMaxColumn(M.startLineNumber);M.startColumn===B?R=2:R=3}else R=1;const x=o.trackedRanges.length,O=o.model._setTrackedRange(null,M,R);return o.trackedRanges[x]=O,o.trackedRangesDirection[x]=M.getDirection(),x.toString()}};try{h.getEditOperations(o.model,A)}catch(P){return(0,L.onUnexpectedError)(P),{operations:[],hadTrackedEditOperation:!1}}return{operations:m,hadTrackedEditOperation:D}}static _getLoserCursorMap(o){o=o.slice(0),o.sort((h,m)=>-v.Range.compareRangesUsingEnds(h.range,m.range));const g={};for(let h=1;h<o.length;h++){const m=o[h-1],C=o[h];if(v.Range.getStartPosition(m.range).isBefore(v.Range.getEndPosition(C.range))){let w;m.identifier.major>C.identifier.major?w=m.identifier.major:w=C.identifier.major,g[w.toString()]=!0;for(let D=0;D<o.length;D++)o[D].identifier.major===w&&(o.splice(D,1),D<h&&h--,D--);h>0&&h--}}return g}}class d{constructor(o,g,h){this.text=o,this.startSelection=g,this.endSelection=h}}class s{static _capture(o,g){const h=[];for(const m of g){if(m.startLineNumber!==m.endLineNumber)return null;h.push(new d(o.getLineContent(m.startLineNumber),m.startColumn-1,m.endColumn-1))}return h}constructor(o,g){this._original=s._capture(o,g)}deduceOutcome(o,g){if(!this._original)return null;const h=s._capture(o,g);if(!h||this._original.length!==h.length)return null;const m=[];for(let C=0,w=this._original.length;C<w;C++)m.push(s._deduceOutcome(this._original[C],h[C]));return m}static _deduceOutcome(o,g){const h=Math.min(o.startSelection,g.startSelection,k.commonPrefixLength(o.text,g.text)),m=Math.min(o.text.length-o.endSelection,g.text.length-g.endSelection,k.commonSuffixLength(o.text,g.text)),C=o.text.substring(h,o.text.length-m),w=g.text.substring(h,g.text.length-m);return new _.CompositionOutcome(C,o.startSelection-h,o.endSelection-h,w,g.startSelection-h,g.endSelection-h)}}}),define(se[792],oe([1,0,47,49,80,341]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClasses=void 0;const S=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function p(b,a,i,n,t){if(t)return[`codicon-${t.id}`,"predefined-file-icon"];const r=n===E.FileKind.ROOT_FOLDER?["rootfolder-icon"]:n===E.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(i){let u;if(i.scheme===L.Schemas.data)u=k.DataUri.parseMetaData(i).get(k.DataUri.META_DATA_LABEL);else{const f=i.path.match(S);f?(u=v(f[2].toLowerCase()),f[1]&&r.push(`${v(f[1].toLowerCase())}-name-dir-icon`)):u=v(i.authority.toLowerCase())}if(n===E.FileKind.ROOT_FOLDER)r.push(`${u}-root-name-folder-icon`);else if(n===E.FileKind.FOLDER)r.push(`${u}-name-folder-icon`);else{if(u){if(r.push(`${u}-name-file-icon`),r.push("name-file-icon"),u.length<=255){const c=u.split(".");for(let d=1;d<c.length;d++)r.push(`${c.slice(d).join(".")}-ext-file-icon`)}r.push("ext-file-icon")}const f=_(b,a,i);f&&r.push(`${v(f)}-lang-file-icon`)}}return r}e.getIconClasses=p;function _(b,a,i){if(!i)return null;let n=null;if(i.scheme===L.Schemas.data){const r=k.DataUri.parseMetaData(i).get(k.DataUri.META_DATA_MIME);r&&(n=a.getLanguageIdByMimeType(r))}else{const t=b.getModel(i);t&&(n=t.getLanguageId())}return n&&n!==y.PLAINTEXT_LANGUAGE_ID?n:a.guessLanguageIdByFilepathOrFirstLine(i)}function v(b){return b.replace(/[\11\12\14\15\40]/g,"/")}}),define(se[793],oe([1,0,315,109,47,95,49,11,80]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.clearPlatformLanguageAssociations=e.registerPlatformLanguageAssociation=void 0;let v=[],b=[],a=[];function i(s,l=!1){n(s,!1,l)}e.registerPlatformLanguageAssociation=i;function n(s,l,o){const g=t(s,l);v.push(g),g.userConfigured?a.push(g):b.push(g),o&&!g.userConfigured&&v.forEach(h=>{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(s,l){return{id:s.id,mime:s.mime,filename:s.filename,extension:s.extension,filepattern:s.filepattern,firstline:s.firstline,userConfigured:l,filenameLowercase:s.filename?s.filename.toLowerCase():void 0,extensionLowercase:s.extension?s.extension.toLowerCase():void 0,filepatternLowercase:s.filepattern?(0,L.parse)(s.filepattern.toLowerCase()):void 0,filepatternOnPath:s.filepattern?s.filepattern.indexOf(E.posix.sep)>=0:!1}}function r(){v=v.filter(s=>s.userConfigured),b=[]}e.clearPlatformLanguageAssociations=r;function u(s,l){return f(s,l).map(o=>o.id)}e.getLanguageIds=u;function f(s,l){let o;if(s)switch(s.scheme){case y.Schemas.file:o=s.fsPath;break;case y.Schemas.data:{o=S.DataUri.parseMetaData(s).get(S.DataUri.META_DATA_LABEL);break}case y.Schemas.vscodeNotebookCell:o=void 0;break;default:o=s.path}if(!o)return[{id:"unknown",mime:k.Mimes.unknown}];o=o.toLowerCase();const g=(0,E.basename)(o),h=c(o,g,a);if(h)return[h,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];const m=c(o,g,b);if(m)return[m,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}];if(l){const C=d(l);if(C)return[C,{id:_.PLAINTEXT_LANGUAGE_ID,mime:k.Mimes.text}]}return[{id:"unknown",mime:k.Mimes.unknown}]}function c(s,l,o){var g;let h,m,C;for(let w=o.length-1;w>=0;w--){const D=o[w];if(l===D.filenameLowercase){h=D;break}if(D.filepattern&&(!m||D.filepattern.length>m.filepattern.length)){const I=D.filepatternOnPath?s: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(s){if((0,p.startsWithUTF8BOM)(s)&&(s=s.substr(1)),s.length>0)for(let l=v.length-1;l>=0;l--){const o=v[l];if(!o.firstline)continue;const g=s.match(o.firstline);if(g&&g.length>0)return o}}}),define(se[794],oe([1,0,6,2,11,793,80,98,37]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const v=Object.prototype.hasOwnProperty,b="vs.editor.nullLanguage";class a{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(b,0),this._register(S.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(t,r){this._languageIdToLanguage[r]=t,this._languageToLanguageId.set(t,r)}register(t){if(this._languageToLanguageId.has(t))return;const r=this._nextLanguageId++;this._register(t,r)}encodeLanguageId(t){return this._languageToLanguageId.get(t)||0}decodeLanguageId(t){return this._languageIdToLanguage[t]||b}}e.LanguageIdCodec=a;class i extends k.Disposable{constructor(t=!0,r=!1){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=r,this.languageIdCodec=new a,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},t&&(this._initializeFromRegistry(),this._register(S.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(S.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(t)}_registerLanguages(t){for(const r of t)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{const u=this._languages[r];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})}),_.Registry.as(p.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(t){const r=t.id;let u;v.call(this._languages,r)?u=this._languages[r]:(this.languageIdCodec.register(r),u={identifier:r,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[r]=u),this._mergeLanguage(u,t)}_mergeLanguage(t,r){const u=r.id;let f=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(t.mimetypes.push(...r.mimetypes),f=r.mimetypes[0]),f||(f=`text/x-${u}`,t.mimetypes.push(f)),Array.isArray(r.extensions)){r.configuration?t.extensions=r.extensions.concat(t.extensions):t.extensions=t.extensions.concat(r.extensions);for(const s of r.extensions)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,extension:s},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(const s of r.filenames)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,filename:s},this._warnOnOverwrite),t.filenames.push(s);if(Array.isArray(r.filenamePatterns))for(const s of r.filenamePatterns)(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,filepattern:s},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let s=r.firstLine;s.charAt(0)!=="^"&&(s="^"+s);try{const l=new RegExp(s);(0,y.regExpLeadsToEndlessLoop)(l)||(0,E.registerPlatformLanguageAssociation)({id:u,mime:f,firstline:l},this._warnOnOverwrite)}catch(l){console.warn(`[${r.id}]: Invalid regular expression \`${s}\`: `,l)}}t.aliases.push(u);let c=null;if(typeof r.aliases<"u"&&Array.isArray(r.aliases)&&(r.aliases.length===0?c=[null]:c=r.aliases),c!==null)for(const s of c)!s||s.length===0||t.aliases.push(s);const d=c!==null&&c.length>0;if(!(d&&c[0]===null)){const s=(d?c[0]:null)||u;(d||!t.name)&&(t.name=s)}r.configuration&&t.configurationFiles.push(r.configuration),r.icon&&t.icons.push(r.icon)}isRegisteredLanguageId(t){return t?v.call(this._languages,t):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(t){const r=t.toLowerCase();return v.call(this._lowercaseNameMap,r)?this._lowercaseNameMap[r]:null}getLanguageIdByMimeType(t){return t&&v.call(this._mimeTypesMap,t)?this._mimeTypesMap[t]:null}guessLanguageIdByFilepathOrFirstLine(t,r){return!t&&!r?[]:(0,E.getLanguageIds)(t,r)}}e.LanguagesRegistry=i,i.instanceCount=0}),define(se[795],oe([1,0,6,2,794,13,31,80]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class _ extends k.Disposable{constructor(a=!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,_.instanceCount++,this._registry=this._register(new y.LanguagesRegistry(!0,a)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){_.instanceCount--,super.dispose()}isRegisteredLanguageId(a){return this._registry.isRegisteredLanguageId(a)}getLanguageIdByLanguageName(a){return this._registry.getLanguageIdByLanguageName(a)}getLanguageIdByMimeType(a){return this._registry.getLanguageIdByMimeType(a)}guessLanguageIdByFilepathOrFirstLine(a,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(a,i);return(0,E.firstOrDefault)(n,null)}createById(a){return new v(this.onDidChange,()=>this._createAndGetLanguageIdentifier(a))}createByFilepathOrFirstLine(a,i){return new v(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(a,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(a){return(!a||!this.isRegisteredLanguageId(a))&&(a=p.PLAINTEXT_LANGUAGE_ID),a}requestBasicLanguageFeatures(a){this._requestedBasicLanguages.has(a)||(this._requestedBasicLanguages.add(a),this._onDidRequestBasicLanguageFeatures.fire(a))}requestRichLanguageFeatures(a){this._requestedRichLanguages.has(a)||(this._requestedRichLanguages.add(a),this.requestBasicLanguageFeatures(a),S.TokenizationRegistry.getOrCreate(a),this._onDidRequestRichLanguageFeatures.fire(a))}}e.LanguageService=_,_.instanceCount=0;class v{constructor(a,i){this._onDidChangeLanguages=a,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 a;const i=this._selector();i!==this.languageId&&(this.languageId=i,(a=this._emitter)===null||a===void 0||a.fire(this.languageId))}}}),define(se[353],oe([1,0,39,247,51,32,2,18,131]),function(te,e,L,k,y,E,S,p,_){"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 r=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),s=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),o=[];return o.push({label:d,textEdit:{range:r,text:d}}),o.push({label:s,textEdit:{range:r,text:s}}),o.push({label:l,textEdit:{range:r,text:l}}),o}}e.DefaultDocumentColorProvider=v;let b=class extends S.Disposable{constructor(i,n,t){super(),this._register(t.colorProvider.register("*",new v(i,n)))}};b=ke([ge(0,y.IModelService),ge(1,E.ILanguageConfigurationService),ge(2,p.ILanguageFeaturesService)],b),(0,_.registerEditorFeature)(b)}),define(se[354],oe([1,0,19,12,22,5,51,25,18,353,27]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;async function a(c,d,s,l=!0){return u(new n,c,d,s,l)}e.getColors=a;function i(c,d,s,l){return Promise.resolve(s.provideColorPresentations(c,d,l))}e.getColorPresentations=i;class n{constructor(){}async compute(d,s,l,o){const g=await d.provideDocumentColors(s,l);if(Array.isArray(g))for(const h of g)o.push({colorInfo:h,provider:d});return Array.isArray(g)}}class t{constructor(){}async compute(d,s,l,o){const g=await d.provideDocumentColors(s,l);if(Array.isArray(g))for(const h of g)o.push({range:h.range,color:[h.color.red,h.color.green,h.color.blue,h.color.alpha]});return Array.isArray(g)}}class r{constructor(d){this.colorInfo=d}async compute(d,s,l,o){const g=await d.provideColorPresentations(s,this.colorInfo,L.CancellationToken.None);return Array.isArray(g)&&o.push(...g),Array.isArray(g)}}async function u(c,d,s,l,o){let g=!1,h;const m=[],C=d.ordered(s);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,s,l,m)&&(g=!0)}catch(I){(0,k.onUnexpectedExternalError)(I)}}return g?m:h&&o?(await c.compute(h,s,l,m),m):[]}function f(c,d){const{colorProvider:s}=c.get(_.ILanguageFeaturesService),l=c.get(S.IModelService).getModel(d);if(!l)throw(0,k.illegalArgument)();const o=c.get(b.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:d});return{model:l,colorProviderRegistry:s,isDefaultColorDecoratorsEnabled:o}}p.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(c,...d){const[s]=d;if(!(s instanceof y.URI))throw(0,k.illegalArgument)();const{model:l,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:g}=f(c,s);return u(new t,o,l,L.CancellationToken.None,g)}),p.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(c,...d){const[s,l]=d,{uri:o,range:g}=l;if(!(o instanceof y.URI)||!Array.isArray(s)||s.length!==4||!E.Range.isIRange(g))throw(0,k.illegalArgument)();const{model:h,colorProviderRegistry:m,isDefaultColorDecoratorsEnabled:C}=f(c,o),[w,D,I,T]=s;return u(new r({range:g,color:{red:w,green:D,blue:I,alpha:T}}),m,h,L.CancellationToken.None,C)})}),define(se[796],oe([1,0,7,13,58,2,104,332,227,41]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const b=L.$;class a extends E.Disposable{constructor(t,r,u){super(),this._renderDisposeables=this._register(new E.DisposableStore),this._editor=t,this._isVisible=!1,this._messages=[],this._hover=this._register(new _.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new S.MarkdownRenderer({editor:this._editor},r,u)),this._computer=new i(this._editor),this._hoverOperation=this._register(new p.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(f=>{this._withResult(f.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(f=>{f.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return a.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(r=>this._editor.applyFontInfo(r))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(t,r){this._computer.lineNumber===t&&this._computer.lane===r||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=t,this._computer.lane=r,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(t){this._messages=t,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(t,r){this._renderDisposeables.clear();const u=document.createDocumentFragment();for(const f of r){const c=b("div.hover-row.markdown-hover"),d=L.append(c,b("div.hover-contents")),s=this._renderDisposeables.add(this._markdownRenderer.render(f.value));d.appendChild(s.element),u.appendChild(c)}this._updateContents(u),this._showAt(t)}_updateContents(t){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(t),this._updateFont()}_showAt(t){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const r=this._editor.getLayoutInfo(),u=this._editor.getTopForLineNumber(t),f=this._editor.getScrollTop(),c=this._editor.getOption(66),d=this._hover.containerDomNode.clientHeight,s=u-f-(d-c)/2,l=r.glyphMarginLeft+r.glyphMarginWidth+(this._computer.lane==="lineNo"?r.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(s),0)}px`}}e.MarginHoverWidget=a,a.ID="editor.contrib.modesGlyphHoverWidget";class i{get lineNumber(){return this._lineNumber}set lineNumber(t){this._lineNumber=t}get lane(){return this._laneOrLine}set lane(t){this._laneOrLine=t}constructor(t){this._editor=t,this._lineNumber=-1,this._laneOrLine=v.GlyphMarginLane.Center}computeSync(){var t,r;const u=s=>({value:s}),f=this._editor.getLineDecorations(this._lineNumber),c=[],d=this._laneOrLine==="lineNo";if(!f)return c;for(const s of f){const l=(r=(t=s.options.glyphMargin)===null||t===void 0?void 0:t.position)!==null&&r!==void 0?r:v.GlyphMarginLane.Center;if(!d&&l!==this._laneOrLine)continue;const o=d?s.options.lineNumberHoverMessage:s.options.glyphMarginHoverMessage;!o||(0,y.isEmptyMarkdownString)(o)||c.push(...(0,k.asArray)(o).map(u))}return c}}}),define(se[797],oe([1,0,19,71,2,35,10,31,32,18,617,307]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let i=class extends y.Disposable{constructor(l,o,g,h,m){super(),this.textModel=l,this.versionId=o,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,o,g){var h,m;const C=new t(l,o,this.textModel.getVersionId()),w=o.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,T=(async()=>{if((D||o.triggerKind===p.InlineCompletionTriggerKind.Automatic)&&await n(this._debounceValue.get(this.textModel)),I.token.isCancellationRequested||this.textModel.getVersionId()!==C.versionId)return!1;const N=new Date,M=await(0,b.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,l,this.textModel,o,I.token,this.languageConfigurationService);if(I.token.isCancellationRequested||this.textModel.getVersionId()!==C.versionId)return!1;const R=new Date;this._debounceValue.update(this.textModel,R.getTime()-N.getTime());const x=new f(M,C,this.textModel,this.versionId);if(g){const O=g.toInlineCompletion(void 0);g.canBeReused(this.textModel,l)&&!M.has(O)&&x.prepend(g.inlineCompletion,O.range,!0)}return this._updateOperation.clear(),(0,E.transaction)(O=>{w.set(x,O)}),!0})(),A=new u(C,I,T);return this._updateOperation.value=A,T}clear(l){this._updateOperation.clear(),this.inlineCompletions.set(void 0,l),this.suggestWidgetInlineCompletions.set(void 0,l)}clearSuggestWidgetInlineCompletions(l){var o;!((o=this._updateOperation.value)===null||o===void 0)&&o.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,l)}cancelUpdate(){this._updateOperation.clear()}};e.InlineCompletionsSource=i,e.InlineCompletionsSource=i=ke([ge(3,v.ILanguageFeaturesService),ge(4,_.ILanguageConfigurationService)],i);function n(s,l){return new Promise(o=>{let g;const h=setTimeout(()=>{g&&g.dispose(),o()},s);l&&(g=l.onCancellationRequested(()=>{clearTimeout(h),g&&g.dispose(),o()}))})}class t{constructor(l,o,g){this.position=l,this.context=o,this.versionId=g}satisfies(l){return this.position.equals(l.position)&&r(this.context.selectedSuggestionInfo,l.context.selectedSuggestionInfo,(o,g)=>o.equals(g))&&(l.context.triggerKind===p.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===p.InlineCompletionTriggerKind.Explicit)&&this.versionId===l.versionId}}function r(s,l,o){return!s||!l?s===l:o(s,l)}class u{constructor(l,o,g){this.request=l,this.cancellationTokenSource=o,this.promise=g}dispose(){this.cancellationTokenSource.cancel()}}class f{get inlineCompletions(){return this._inlineCompletions}constructor(l,o,g,h){this.inlineCompletionProviderResult=l,this.request=o,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,o,g){g&&l.source.addRef();const h=this.textModel.deltaDecorations([],[{range:o,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new c(l,h,this._rangeVersionId,o)),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,o,g,h){this.inlineCompletion=l,this.decorationId=o,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 a.SingleTextEdit(this._getUpdatedRange(l),this.inlineCompletion.insertText)}isVisible(l,o,g){const h=this._toFilterTextReplacement(g).removeCommonPrefix(l);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(g).getStartPosition())||o.lineNumber!==h.range.startLineNumber)return!1;const m=l.getValueInRange(h.range,1),C=h.text,w=Math.max(0,o.column-h.range.startColumn);let D=C.substring(0,w),I=C.substring(w),T=m.substring(0,w),A=m.substring(w);const P=l.getLineIndentColumn(h.range.startLineNumber);return h.range.startColumn<=P&&(T=T.trimStart(),T.length===0&&(A=A.trimStart()),D=D.trimStart(),D.length===0&&(I=I.trimStart())),D.startsWith(T)&&!!(0,k.matchesSubString)(A,I)}canBeReused(l,o){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(o)&&this.isVisible(l,o,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(l){return new a.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 o=l.getDecorationRange(this.decorationId);return o?this._updatedRange.equalsRange(o)?!1:(this._updatedRange=o,!0):(this._isValid=!1,!0)}}e.InlineCompletionWithUpdatedRange=c;function d(s){return s.startLineNumber===s.endLineNumber?new S.Position(1,1+s.endColumn-s.startColumn):new S.Position(1+s.endLineNumber-s.startLineNumber,s.endColumn)}}),define(se[798],oe([1,0,11,250,5,24,113,32,306,248,249]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let a=class{constructor(n,t,r,u){this._languageConfigurationService=u,this._selection=n,this._isMovingDown=t,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(n,t){const r=n.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){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.startLineNumber<u.endLineNumber&&u.endColumn===1&&(this._moveEndPositionDown=!0,u=u.setEndPosition(u.endLineNumber-1,n.getLineMaxColumn(u.endLineNumber-1)));const{tabSize:f,indentSize:c,insertSpaces:d}=n.getOptions(),s=this.buildIndentConverter(f,c,d),l={tokenization:{getLineTokens:o=>n.tokenization.getLineTokens(o),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(o,g)=>n.getLanguageIdAtPosition(o,g)},getLineContent:null};if(u.startLineNumber===u.endLineNumber&&n.getLineMaxColumn(u.startLineNumber)===1){const o=u.startLineNumber,g=this._isMovingDown?o+1:o-1;n.getLineMaxColumn(g)===1?t.addEditOperation(new y.Range(1,1,1,1),null):(t.addEditOperation(new y.Range(o,1,o,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 o,g;if(this._isMovingDown){o=u.endLineNumber+1,g=n.getLineContent(o),t.addEditOperation(new y.Range(o-1,n.getLineMaxColumn(o-1),o,n.getLineMaxColumn(o)),null);let h=g;if(this.shouldAutoIndent(n,u)){const m=this.matchEnterRule(n,s,f,o,u.startLineNumber-1);if(m!==null){const w=L.getLeadingWhitespace(n.getLineContent(o)),D=m+_.getSpaceCnt(w,f);h=_.generateIndent(D,f,d)+this.trimStart(g)}else{l.getLineContent=D=>D===u.startLineNumber?n.getLineContent(o):n.getLineContent(D);const w=(0,v.getGoodIndentForLine)(this._autoIndent,l,n.getLanguageIdAtPosition(o,1),u.startLineNumber,s,this._languageConfigurationService);if(w!==null){const D=L.getLeadingWhitespace(n.getLineContent(o)),I=_.getSpaceCnt(w,f),T=_.getSpaceCnt(D,f);I!==T&&(h=_.generateIndent(I,f,d)+this.trimStart(g))}}t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+`
|
||
`);const C=this.matchEnterRuleMovingDown(n,s,f,u.startLineNumber,o,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(o,1),u.startLineNumber+1,s,this._languageConfigurationService);if(w!==null){const D=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),I=_.getSpaceCnt(w,f),T=_.getSpaceCnt(D,f);if(I!==T){const A=I-T;this.getIndentEditsOfMovingBlock(n,t,u,f,d,A)}}}}else t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+`
|
||
`)}else if(o=u.startLineNumber-1,g=n.getLineContent(o),t.addEditOperation(new y.Range(o,1,o+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===o?n.getLineContent(u.startLineNumber):n.getLineContent(m);const h=this.matchEnterRule(n,s,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),o,s,this._languageConfigurationService);if(m!==null){const C=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),w=_.getSpaceCnt(m,f),D=_.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,r){return{shiftIndent:u=>k.ShiftCommand.shiftIndent(u,u.length+1,n,t,r),unshiftIndent:u=>k.ShiftCommand.unshiftIndent(u,u.length+1,n,t,r)}}parseEnterResult(n,t,r,u,f){if(f){let c=f.indentation;f.indentAction===S.IndentAction.None||f.indentAction===S.IndentAction.Indent?c=f.indentation+f.appendText:f.indentAction===S.IndentAction.IndentOutdent?c=f.indentation:f.indentAction===S.IndentAction.Outdent&&(c=t.unshiftIndent(f.indentation)+f.appendText);const d=n.getLineContent(u);if(this.trimStart(d).indexOf(this.trimStart(c))>=0){const s=L.getLeadingWhitespace(n.getLineContent(u));let l=L.getLeadingWhitespace(c);const o=(0,v.getIndentMetadata)(n,u,this._languageConfigurationService);o!==null&&o&2&&(l=t.unshiftIndent(l));const g=_.getSpaceCnt(l,r),h=_.getSpaceCnt(s,r);return g-h}}return null}matchEnterRuleMovingDown(n,t,r,u,f,c){if(L.lastNonWhitespaceIndex(c)>=0){const d=n.getLineMaxColumn(f),s=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(f,d,f,d),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,s)}else{let d=u-1;for(;d>=1;){const o=n.getLineContent(d);if(L.lastNonWhitespaceIndex(o)>=0)break;d--}if(d<1||u>n.getLineCount())return null;const s=n.getLineMaxColumn(d),l=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(d,s,d,s),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,l)}}matchEnterRule(n,t,r,u,f,c){let d=f;for(;d>=1;){let o;if(d===f&&c!==void 0?o=c:o=n.getLineContent(d),L.lastNonWhitespaceIndex(o)>=0)break;d--}if(d<1||u>n.getLineCount())return null;const s=n.getLineMaxColumn(d),l=(0,b.getEnterAction)(this._autoIndent,n,new y.Range(d,s,d,s),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,l)}trimStart(n){return n.replace(/^\s+/,"")}shouldAutoIndent(n,t){if(this._autoIndent<4||!n.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const r=n.getLanguageIdAtPosition(t.startLineNumber,1),u=n.getLanguageIdAtPosition(t.endLineNumber,1);return!(r!==u||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(n,t,r,u,f,c){for(let d=r.startLineNumber;d<=r.endLineNumber;d++){const s=n.getLineContent(d),l=L.getLeadingWhitespace(s),g=_.getSpaceCnt(l,u)+c,h=_.generateIndent(g,u,f);h!==l&&(t.addEditOperation(new y.Range(d,1,d,l.length+1),h),d===r.endLineNumber&&r.endColumn<=l.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(n,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber<r.endLineNumber&&(r=r.setEndPosition(r.endLineNumber,2)),r}};e.MoveLinesCommand=a,e.MoveLinesCommand=a=ke([ge(3,p.ILanguageConfigurationService)],a)}),define(se[355],oe([1,0,7,77,26,28,6,58,2,104,225,719,8]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 S.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new S.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new _.DisposableStore,this._renderDisposeable=new _.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=a.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(),s=f.get(118)||c.fontSize,l=f.get(119)||c.lineHeight,o=c.fontWeight,g=`${s}px`,h=`${l}px`;this.domNode.style.fontSize=g,this.domNode.style.lineHeight=`${l/s}`,this.domNode.style.fontWeight=o,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=a.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,s;this._renderDisposeable.clear();let{detail:l,documentation:o}=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: ${(s=f.completion.commitCharacters)===null||s===void 0?void 0:s.join("")}
|
||
`,o=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 o=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),L.clearNode(this._docs);const g=this._markdownRenderer.render(o);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 isEmpty(){return this.domNode.classList.contains("no-docs")}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=ke([ge(1,i.IInstantiationService)],t);class r{constructor(f,c){this.widget=f,this._editor=c,this.allowEditorOverflow=!0,this._disposables=new _.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,s,l=0,o=0;this._disposables.add(this._resizable.onDidWillResize(()=>{d=this._topLeft,s=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(g=>{if(d&&s){this.widget.layout(g.dimension.width,g.dimension.height);let h=!1;g.west&&(o=s.width-g.dimension.width,h=!0),g.north&&(l=s.height-g.dimension.height,h=!0),h&&this._applyTopLeft({top:d.top+l,left:d.left+o})}g.done&&(d=void 0,s=void 0,l=0,o=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 this._topLeft?{preference:this._topLeft}:null}show(){this._added||(this._editor.addOverlayWidget(this),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 s=f.getBoundingClientRect();this._anchorBox=s,this._preferAlignAtTop=c,this._placeAtAnchor(this._anchorBox,(d=this._userSize)!==null&&d!==void 0?d:this.widget.size,c)}_placeAtAnchor(f,c,d){var s;const l=L.getClientArea(this.getDomNode().ownerDocument.body),o=this.widget.getLayoutInfo(),g=new L.Dimension(220,2*o.lineHeight),h=f.top,m=function(){const B=l.width-(f.left+f.width+o.borderWidth+o.horizontalPadding),W=-o.borderWidth+f.left+f.width,V=new L.Dimension(B,l.height-f.top-o.borderHeight-o.verticalPadding),K=V.with(void 0,f.top+f.height-o.borderHeight-o.verticalPadding);return{top:h,left:W,fit:B-c.width,maxSizeTop:V,maxSizeBottom:K,minSize:g.with(Math.min(B,g.width))}}(),C=function(){const B=f.left-o.borderWidth-o.horizontalPadding,W=Math.max(o.horizontalPadding,f.left-c.width-o.borderWidth),V=new L.Dimension(B,l.height-f.top-o.borderHeight-o.verticalPadding),K=V.with(void 0,f.top+f.height-o.borderHeight-o.verticalPadding);return{top:h,left:W,fit:B-c.width,maxSizeTop:V,maxSizeBottom:K,minSize:g.with(Math.min(B,g.width))}}(),w=function(){const B=f.left,W=-o.borderWidth+f.top+f.height,V=new L.Dimension(f.width-o.borderHeight,l.height-f.top-f.height-o.verticalPadding);return{top:W,left:B,fit:V.height-c.height,maxSizeBottom:V,maxSizeTop:V,minSize:g.with(V.width)}}(),D=[m,C,w],I=(s=D.find(B=>B.fit>=0))!==null&&s!==void 0?s:D.sort((B,W)=>W.fit-B.fit)[0],T=f.top+f.height-o.borderHeight;let A,P=c.height;const N=Math.max(I.maxSizeTop.height,I.maxSizeBottom.height);P>N&&(P=N);let M;d?P<=I.maxSizeTop.height?(A=!0,M=I.maxSizeTop):(A=!1,M=I.maxSizeBottom):P<=I.maxSizeBottom.height?(A=!1,M=I.maxSizeBottom):(A=!0,M=I.maxSizeTop);let{top:R,left:x}=I;!A&&P>f.height&&(R=T-P);const O=this._editor.getDomNode();if(O){const B=O.getBoundingClientRect();R-=B.top,x-=B.left}this._applyTopLeft({left:x,top:R}),this._resizable.enableSashes(!A,I===m,A,I!==m),this._resizable.minSize=I.minSize,this._resizable.maxSize=M,this._resizable.layout(P,Math.min(M.width,c.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(f){this._topLeft=f,this._editor.layoutOverlayWidget(this)}}e.SuggestDetailsOverlay=r}),define(se[356],oe([1,0,13,53,55,20,22,27,98,37]),function(te,e,L,k,y,E,S,p,_,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 a{constructor(f={},c=[],d=[],s){this._contents=f,this._keys=c,this._overrides=d,this.raw=s,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 a)return d;const s=new i("");return s.parseRaw(d),s.configurationModel});this._rawConfiguration=c.reduce((d,s)=>s===d?s:d.merge(s),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),s=c?this.rawConfiguration.getOverrideValue(f,c):void 0,l=c?this.rawConfiguration.override(c).getValue(f):d;return{value:d,override:s,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 s=y.deepClone(this.contents),l=y.deepClone(this.overrides),o=[...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(s,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)o.indexOf(m)===-1&&o.push(m)}return new a(s,o,l,g.every(h=>h instanceof a)?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 s of L.distinct([...Object.keys(this.contents),...Object.keys(c)])){let l=this.contents[s];const o=c[s];o&&(typeof l=="object"&&typeof o=="object"?(l=y.deepClone(l),this.mergeContents(l,o)):l=o),d[s]=l}return new a(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 s=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)&&s(l.contents);return s(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),_.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.splice(this.overrides.findIndex(d=>L.equals(d.identifiers,(0,_.overrideIdentifiersFromKey)(f))),1))}updateValue(f,c,d){(0,p.addToValueTree)(this.contents,f,c,s=>console.error(s)),d=d||this.keys.indexOf(f)===-1,d&&this.keys.push(f),_.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.push({identifiers:(0,_.overrideIdentifiersFromKey)(f),keys:Object.keys(this.contents[f]),contents:(0,p.toValuesTree)(this.contents[f],s=>console.error(s))})}}e.ConfigurationModel=a;class i{constructor(f){this._name=f,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new a}parseRaw(f,c){this._raw=f;const{contents:d,keys:s,overrides:l,restricted:o,hasExcludedProperties:g}=this.doParseRaw(f,c);this._configurationModel=new a(d,s,l,g?[f]:void 0),this._restrictedConfigurations=o||[]}doParseRaw(f,c){const d=v.Registry.as(_.Extensions.Configuration).getConfigurationProperties(),s=this.filter(f,d,!0,c);f=s.raw;const l=(0,p.toValuesTree)(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`)),o=Object.keys(f),g=this.toOverrides(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`));return{contents:l,keys:o,overrides:g,restricted:s.restricted,hasExcludedProperties:s.hasExcludedProperties}}filter(f,c,d,s){var l,o,g;let h=!1;if(!s?.scopes&&!s?.skipRestricted&&!(!((l=s?.exclude)===null||l===void 0)&&l.length))return{raw:f,restricted:[],hasExcludedProperties:h};const m={},C=[];for(const w in f)if(_.OVERRIDE_PROPERTY_REGEX.test(w)&&d){const D=this.filter(f[w],c,!1,s);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),!(!((o=s.exclude)===null||o===void 0)&&o.includes(w))&&(!((g=s.include)===null||g===void 0)&&g.includes(w)||(I===void 0||s.scopes===void 0||s.scopes.includes(I))&&!(s.skipRestricted&&D?.restricted))?m[w]=f[w]:h=!0}return{raw:m,restricted:C,hasExcludedProperties:h}}toOverrides(f,c){const d=[];for(const s of Object.keys(f))if(_.OVERRIDE_PROPERTY_REGEX.test(s)){const l={};for(const o in f[s])l[o]=f[s][o];d.push({identifiers:(0,_.overrideIdentifiersFromKey)(s),keys:Object.keys(l),contents:(0,p.toValuesTree)(l,c)})}return d}}e.ConfigurationModelParser=i;class n{constructor(f,c,d,s,l,o,g,h,m,C,w,D,I){this.key=f,this.overrides=c,this._value=d,this.overrideIdentifiers=s,this.defaultConfiguration=l,this.policyConfiguration=o,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 s=f.inspect(c,d);return{get value(){return b(s.value)},get override(){return b(s.override)},get merged(){return b(s.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,s,l=new a,o=new a,g=new k.ResourceMap,h=new a,m=new k.ResourceMap){this._defaultConfiguration=f,this._policyConfiguration=c,this._applicationConfiguration=d,this._localUserConfiguration=s,this._remoteUserConfiguration=l,this._workspaceConfiguration=o,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 s;d.resource?(s=this._memoryConfigurationByResource.get(d.resource),s||(s=new a,this._memoryConfigurationByResource.set(d.resource,s))):s=this._memoryConfiguration,c===void 0?s.removeValue(f):s.setValue(f,c),d.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(f,c,d){const s=this.getConsolidatedConfigurationModel(f,c,d),l=this.getFolderConfigurationModelForResource(c.resource,d),o=c.resource?this._memoryConfigurationByResource.get(c.resource)||this._memoryConfiguration:this._memoryConfiguration,g=new Set;for(const h of s.overrides)for(const m of h.identifiers)s.getOverrideValue(f,m)!==void 0&&g.add(m);return new n(f,c,s.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,o)}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 s=this.getConsolidatedConfigurationModelForResource(c,d);return c.overrideIdentifier&&(s=s.override(c.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(f)!==void 0&&(s=s.merge(this._policyConfiguration)),s}getConsolidatedConfigurationModelForResource({resource:f},c){let d=this.getWorkspaceConsolidatedConfiguration();if(c&&f){const s=c.getFolder(f);s&&(d=this.getFolderConsolidatedConfiguration(s.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(),s=this._folderConfigurations.get(f);s?(c=d.merge(s),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:s,keys:l}=this._folderConfigurations.get(c);return f.push([c,{contents:d,overrides:s,keys:l}]),f},[])}}static parse(f){const c=this.parseConfigurationModel(f.defaults),d=this.parseConfigurationModel(f.policy),s=this.parseConfigurationModel(f.application),l=this.parseConfigurationModel(f.user),o=this.parseConfigurationModel(f.workspace),g=f.folders.reduce((h,m)=>(h.set(S.URI.revive(m[0]),this.parseConfigurationModel(m[1])),h),new k.ResourceMap);return new t(c,d,s,l,new a,o,g,new a,new k.ResourceMap)}static parseConfigurationModel(f){return new a(f.contents,f.keys,f.overrides)}}e.Configuration=t;class r{constructor(f,c,d,s){this.change=f,this.previous=c,this.currentConfiguraiton=d,this.currentWorkspace=s,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 o of l)this.affectedKeys.add(o);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 s=this._marker+f,l=this._affectsConfigStr.indexOf(s);if(l<0)return!1;const o=l+s.length;if(o>=this._affectsConfigStr.length)return!1;const g=this._affectsConfigStr.charCodeAt(o);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=r}),define(se[799],oe([1,0,2,356,98,37]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class S 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 _=E.Registry.as(y.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(_),_)}updateConfigurationModel(_,v){const b=this.getConfigurationDefaultOverrides();for(const a of _){const i=b[a],n=v[a];i!==void 0?this._configurationModel.addValue(a,i):n?this._configurationModel.addValue(a,n.default):this._configurationModel.removeValue(a)}}}e.DefaultConfiguration=S}),define(se[124],oe([1,0,125,17,25,37,2,66]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class _{constructor(){this._coreKeybindings=new p.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(a){if(k.OS===1){if(a&&a.win)return a.win}else if(k.OS===2){if(a&&a.mac)return a.mac}else if(a&&a.linux)return a.linux;return a}registerKeybindingRule(a){const i=_.bindToCurrentPlatform(a),n=new S.DisposableStore;if(i&&i.primary){const t=(0,L.decodeKeybinding)(i.primary,k.OS);t&&n.add(this._registerDefaultKeybinding(t,a.id,a.args,a.weight,0,a.when))}if(i&&Array.isArray(i.secondary))for(let t=0,r=i.secondary.length;t<r;t++){const u=i.secondary[t],f=(0,L.decodeKeybinding)(u,k.OS);f&&n.add(this._registerDefaultKeybinding(f,a.id,a.args,a.weight,-t-1,a.when))}return n}registerCommandAndKeybindingRule(a){return(0,S.combinedDisposable)(this.registerKeybindingRule(a),y.CommandsRegistry.registerCommand(a))}_registerDefaultKeybinding(a,i,n,t,r,u){const f=this._coreKeybindings.push({keybinding:a,command:i,commandArgs:n,when:u,weight1:t,weight2:r,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,S.toDisposable)(()=>{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 _,e.Extensions={EditorModes:"platform.keybindingsRegistry"},E.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function v(b,a){if(b.weight1!==a.weight1)return b.weight1-a.weight1;if(b.command&&a.command){if(b.command<a.command)return-1;if(b.command>a.command)return 1}return b.weight2-a.weight2}}),define(se[30],oe([1,0,42,28,6,2,66,25,15,8,124]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";var a;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(s){return s.command!==void 0}e.isIMenuItem=i;function n(s){return s.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.DebugHoverContext=new t("DebugHoverContext"),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.EditorTabsBarShowTabsZenModeSubmenu=new t("EditorTabsBarShowTabsZenModeSubmenu"),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.SCMIncomingChanges=new t("SCMIncomingChanges"),t.SCMOutgoingChanges=new t("SCMOutgoingChanges"),t.SCMIncomingChangesAllChangesContext=new t("SCMIncomingChangesAllChangesContext"),t.SCMIncomingChangesHistoryItemContext=new t("SCMIncomingChangesHistoryItemContext"),t.SCMOutgoingChangesAllChangesContext=new t("SCMOutgoingChangesAllChangesContext"),t.SCMOutgoingChangesHistoryItemContext=new t("SCMOutgoingChangesHistoryItemContext"),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.SCMSourceControlInline=new t("SCMSourceControlInline"),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 r{static for(l){let o=this._all.get(l);return o||(o=new r(l),this._all.set(l,o)),o}static merge(l){const o=new Set;for(const g of l)g instanceof r&&o.add(g.id);return o}constructor(l){this.id=l,this.has=o=>o===l}}r._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new y.MicrotaskEmitter({merge:r.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(s){return this._commands.set(s.id,s),this._onDidChangeMenu.fire(r.for(t.CommandPalette)),(0,E.toDisposable)(()=>{this._commands.delete(s.id)&&this._onDidChangeMenu.fire(r.for(t.CommandPalette))})}getCommand(s){return this._commands.get(s)}getCommands(){const s=new Map;return this._commands.forEach((l,o)=>s.set(o,l)),s}appendMenuItem(s,l){let o=this._menuItems.get(s);o||(o=new S.LinkedList,this._menuItems.set(s,o));const g=o.push(l);return this._onDidChangeMenu.fire(r.for(s)),(0,E.toDisposable)(()=>{g(),this._onDidChangeMenu.fire(r.for(s))})}appendMenuItems(s){const l=new E.DisposableStore;for(const{id:o,item:g}of s)l.add(this.appendMenuItem(o,g));return l}getMenuItems(s){let l;return this._menuItems.has(s)?l=[...this._menuItems.get(s)]:l=[],s===t.CommandPalette&&this._appendImplicitItems(l),l}_appendImplicitItems(s){const l=new Set;for(const o of s)i(o)&&(l.add(o.command.id),o.alt&&l.add(o.alt.id));this._commands.forEach((o,g)=>{l.has(g)||s.push({command:o})})}};class u extends L.SubmenuAction{constructor(l,o,g){super(`submenuitem.${l.submenu.id}`,typeof l.title=="string"?l.title:l.title.value,g,"submenu"),this.item=l,this.hideActions=o}}e.SubmenuItemAction=u;let f=a=class{static label(l,o){return o?.renderShortTitle&&l.shortTitle?typeof l.shortTitle=="string"?l.shortTitle:l.shortTitle.value:typeof l.title=="string"?l.title:l.title.value}constructor(l,o,g,h,m,C){var w,D;this.hideActions=h,this._commandService=C,this.id=l.id,this.label=a.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 T=l.toggled.condition?l.toggled:{condition:l.toggled};this.checked=m.contextMatchesRules(T.condition),this.checked&&T.tooltip&&(this.tooltip=typeof T.tooltip=="string"?T.tooltip:T.tooltip.value),this.checked&&k.ThemeIcon.isThemeIcon(T.icon)&&(I=T.icon),this.checked&&T.title&&(this.label=typeof T.title=="string"?T.title:T.title.value)}I||(I=k.ThemeIcon.isThemeIcon(l.icon)?l.icon:void 0),this.item=l,this.alt=o?new a(o,void 0,g,h,m,C):void 0,this._options=g,this.class=I&&k.ThemeIcon.asClassName(I)}run(...l){var o,g;let h=[];return!((o=this._options)===null||o===void 0)&&o.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=a=ke([ge(4,_.IContextKeyService),ge(5,p.ICommandService)],f);class c{constructor(l){this.desc=l}}e.Action2=c;function d(s){const l=new E.DisposableStore,o=new s,{f1:g,menu:h,keybinding:m,...C}=o.desc;if(p.CommandsRegistry.getCommand(C.id))throw new Error(`Cannot register two commands with the same id: ${C.id}`);if(l.add(p.CommandsRegistry.registerCommand({id:C.id,handler:(w,...D)=>o.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?_.ContextKeyExpr.and(C.precondition,w.when):w.when}));else m&&l.add(b.KeybindingsRegistry.registerKeybindingRule({...m,id:C.id,when:C.precondition?_.ContextKeyExpr.and(C.precondition,m.when):m.when}));return l}e.registerAction2=d}),define(se[800],oe([1,0,48,202,723,30]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class S extends E.Action2{constructor(){super({id:S.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=S,S.ID="editor.action.toggleTabFocusMode",(0,E.registerAction2)(S)}),define(se[357],oe([1,0,232,598,15,124,742,2,7]),function(te,e,L,k,y,E,S,p,_){"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,S.localize)(0,null));const v="historyNavigationWidgetFocus",b="historyNavigationForwardsEnabled",a="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,s=new y.RawContextKey(v,!1).bindTo(f),l=new y.RawContextKey(b,!0).bindTo(f),o=new y.RawContextKey(a,!0).bindTo(f),g=()=>{s.set(!0),i=c},h=()=>{s.set(!1),i===c&&(i=void 0)};return(0,_.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:o,dispose(){d.dispose()}}}e.registerAndCreateHistoryNavigationContext=t;let r=class extends L.FindInput{constructor(c,d,s,l){super(c,d,s);const o=this._register(l.createScoped(this.inputBox.element));this._register(t(o,this.inputBox))}};e.ContextScopedFindInput=r,e.ContextScopedFindInput=r=ke([ge(3,y.IContextKeyService)],r);let u=class extends k.ReplaceInput{constructor(c,d,s,l,o=!1){super(c,d,o,s);const g=this._register(l.createScoped(this.inputBox.element));this._register(t(g,this.inputBox))}};e.ContextScopedReplaceInput=u,e.ContextScopedReplaceInput=u=ke([ge(3,y.IContextKeyService)],u),E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(v),y.ContextKeyExpr.equals(a,!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(se[138],oe([1,0,19,12,71,2,61,20,22,10,5,68,117,716,30,25,15,18,357]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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(N,M,R,x){var O;this.position=N,this.completion=M,this.container=R,this.provider=x,this.isInvalid=!1,this.score=y.FuzzyScore.Default,this.distance=0,this.textLabel=typeof M.label=="string"?M.label:(O=M.label)===null||O===void 0?void 0:O.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=M.sortText&&M.sortText.toLowerCase(),this.filterTextLow=M.filterText&&M.filterText.toLowerCase(),this.extensionId=M.extensionId,b.Range.isIRange(M.range)?(this.editStart=new v.Position(M.range.startLineNumber,M.range.startColumn),this.editInsertEnd=new v.Position(M.range.endLineNumber,M.range.endColumn),this.editReplaceEnd=new v.Position(M.range.endLineNumber,M.range.endColumn),this.isInvalid=this.isInvalid||b.Range.spansMultipleLines(M.range)||M.range.startLineNumber!==N.lineNumber):(this.editStart=new v.Position(M.range.insert.startLineNumber,M.range.insert.startColumn),this.editInsertEnd=new v.Position(M.range.insert.endLineNumber,M.range.insert.endColumn),this.editReplaceEnd=new v.Position(M.range.replace.endLineNumber,M.range.replace.endColumn),this.isInvalid=this.isInvalid||b.Range.spansMultipleLines(M.range.insert)||b.Range.spansMultipleLines(M.range.replace)||M.range.insert.startLineNumber!==N.lineNumber||M.range.replace.startLineNumber!==N.lineNumber||M.range.insert.startColumn!==M.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(N){if(!this._resolveCache){const M=N.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),R=new S.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,N)).then(x=>{Object.assign(this.completion,x),this._resolveDuration=R.elapsed()},x=>{(0,k.isCancellationError)(x)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{M.dispose()})}return this._resolveCache}}e.CompletionItem=d;class s{constructor(N=2,M=new Set,R=new Set,x=new Map,O=!0){this.snippetSortOrder=N,this.kindFilter=M,this.providerFilter=R,this.providerItemsToReuse=x,this.showDeprecated=O}}e.CompletionOptions=s,s.default=new s;let l;function o(){return l}e.getSnippetSuggestSupport=o;class g{constructor(N,M,R,x){this.items=N,this.needsClipboard=M,this.durations=R,this.disposable=x}}e.CompletionItemModel=g;async function h(P,N,M,R=s.default,x={triggerKind:0},O=L.CancellationToken.None){const B=new S.StopWatch;M=M.clone();const W=N.getWordAtPosition(M),V=W?new b.Range(M.lineNumber,W.startColumn,M.lineNumber,W.endColumn):b.Range.fromPositions(M),K={replace:V,insert:V.setEndPosition(M.lineNumber,M.column)},F=[],q=new E.DisposableStore,ie=[];let ae=!1;const ne=(J,Q,re)=>{var de,he,me;let X=!1;if(!Q)return X;for(const U of Q.suggestions)if(!R.kindFilter.has(U.kind)){if(!R.showDeprecated&&(!((de=U?.tags)===null||de===void 0)&&de.includes(1)))continue;U.range||(U.range=K),U.sortText||(U.sortText=typeof U.label=="string"?U.label:U.label.label),!ae&&U.insertTextRules&&U.insertTextRules&4&&(ae=i.SnippetParser.guessNeedsClipboard(U.insertText)),F.push(new d(M,U,Q,J)),X=!0}return(0,E.isDisposable)(Q)&&q.add(Q),ie.push({providerName:(he=J._debugDisplayName)!==null&&he!==void 0?he:"unknown_provider",elapsedProvider:(me=Q.duration)!==null&&me!==void 0?me:-1,elapsedOverall:re.elapsed()}),X},$=(async()=>{if(!l||R.kindFilter.has(27))return;const J=R.providerItemsToReuse.get(l);if(J){J.forEach(de=>F.push(de));return}if(R.providerFilter.size>0&&!R.providerFilter.has(l))return;const Q=new S.StopWatch,re=await l.provideCompletionItems(N,M,x,O);ne(l,re,Q)})();for(const J of P.orderedGroups(N)){let Q=!1;if(await Promise.all(J.map(async re=>{if(R.providerItemsToReuse.has(re)){const de=R.providerItemsToReuse.get(re);de.forEach(he=>F.push(he)),Q=Q||de.length>0;return}if(!(R.providerFilter.size>0&&!R.providerFilter.has(re)))try{const de=new S.StopWatch,he=await re.provideCompletionItems(N,M,x,O);Q=ne(re,he,de)||Q}catch(de){(0,k.onUnexpectedExternalError)(de)}})),Q||O.isCancellationRequested)break}return await $,O.isCancellationRequested?(q.dispose(),Promise.reject(new k.CancellationError)):new g(F.sort(I(R.snippetSortOrder)),ae,{entries:ie,elapsed:B.elapsed()},q)}e.provideSuggestionItems=h;function m(P,N){if(P.sortTextLow&&N.sortTextLow){if(P.sortTextLow<N.sortTextLow)return-1;if(P.sortTextLow>N.sortTextLow)return 1}return P.textLabel<N.textLabel?-1:P.textLabel>N.textLabel?1:P.completion.kind-N.completion.kind}function C(P,N){if(P.completion.kind!==N.completion.kind){if(P.completion.kind===27)return-1;if(N.completion.kind===27)return 1}return m(P,N)}function w(P,N){if(P.completion.kind!==N.completion.kind){if(P.completion.kind===27)return 1;if(N.completion.kind===27)return-1}return m(P,N)}const D=new Map;D.set(0,C),D.set(2,w),D.set(1,m);function I(P){return D.get(P)}e.getSuggestionComparator=I,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(P,...N)=>{const[M,R,x,O]=N;(0,p.assertType)(_.URI.isUri(M)),(0,p.assertType)(v.Position.isIPosition(R)),(0,p.assertType)(typeof x=="string"||!x),(0,p.assertType)(typeof O=="number"||!O);const{completionProvider:B}=P.get(f.ILanguageFeaturesService),W=await P.get(a.ITextModelService).createModelReference(M);try{const V={incomplete:!1,suggestions:[]},K=[],F=W.object.textEditorModel.validatePosition(R),q=await h(B,W.object.textEditorModel,F,void 0,{triggerCharacter:x??void 0,triggerKind:x?1:0});for(const ie of q.items)K.length<(O??0)&&K.push(ie.resolve(L.CancellationToken.None)),V.incomplete=V.incomplete||ie.container.incomplete,V.suggestions.push(ie.completion);try{return await Promise.all(K),V}finally{setTimeout(()=>q.disposable.dispose(),100)}}finally{W.dispose()}});function T(P,N){var M;(M=P.getContribution("editor.contrib.suggestController"))===null||M===void 0||M.triggerSuggest(new Set().add(N),void 0,!0)}e.showSimpleSuggestions=T;class A{static isAllOff(N){return N.other==="off"&&N.comments==="off"&&N.strings==="off"}static isAllOn(N){return N.other==="on"&&N.comments==="on"&&N.strings==="on"}static valueFor(N,M){switch(M){case 1:return N.comments;case 2:return N.strings;default:return N.other}}}e.QuickSuggestionsOptions=A}),define(se[139],oe([1,0,13,2,37]),function(te,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 S{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(_){return _.prefix.length===0?this.defaultProvider=_:this.providers.push(_),this.providers.sort((v,b)=>b.prefix.length-v.prefix.length),(0,k.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(_),1),this.defaultProvider===_&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,L.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(_){return _&&this.providers.find(b=>_.startsWith(b.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=S,y.Registry.add(e.Extensions.Quickaccess,new S)}),define(se[801],oe([1,0,747,37,2,34,139,70]),function(te,e,L,k,y,E,S,p){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let v=_=class{constructor(a,i){this.quickInputService=a,this.keybindingService=i,this.registry=k.Registry.as(S.Extensions.Quickaccess)}provide(a){const i=new y.DisposableStore;return i.add(a.onDidAccept(()=>{const[n]=a.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),i.add(a.onDidChangeValue(n=>{const t=this.registry.getQuickAccessProvider(n.substr(_.PREFIX.length));t&&t.prefix&&t.prefix!==_.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),a.items=this.getQuickAccessProviders().filter(n=>n.prefix!==_.PREFIX),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)).flatMap(i=>this.createPicks(i))}createPicks(a){return a.helpEntries.map(i=>{const n=i.prefix||a.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=_=ke([ge(0,p.IQuickInputService),ge(1,E.IKeybindingService)],v)}),define(se[802],oe([1,0,37,139,96,801]),function(te,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(se[803],oe([1,0,14,19,6,2,8,139,70,37]),function(te,e,L,k,y,E,S,p,_,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 r;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 s=new E.DisposableStore,l=s.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=(r=t?.itemActivation)!==null&&r!==void 0?r:_.ItemActivation.SECOND),l.contextKey=f?.contextKey,l.filterValue=h=>h.substring(f?f.prefix.length:0);let o;n&&(o=new L.DeferredPromise,s.add(y.Event.once(l.onWillAccept)(h=>{h.veto(),l.hide()}))),s.add(this.registerPickerListeners(l,u,f,i,t?.providerOptions));const g=s.add(new k.CancellationTokenSource);if(u&&s.add(u.provide(l,g.token,t?.providerOptions)),y.Event.once(l.onDidHide)(()=>{l.selectedItems.length===0&&g.cancel(),s.dispose(),o?.complete(l.selectedItems.slice(0))}),l.show(),n)return o?.p}adjustValueSelection(i,n,t){var r;let u;t?.preserveValue?u=[i.value.length,i.value.length]:u=[(r=n?.prefix.length)!==null&&r!==void 0?r:0,i.value.length],i.valueSelection=u}registerPickerListeners(i,n,t,r,u){const f=new E.DisposableStore,c=this.visibleQuickAccess={picker:i,descriptor:t,value:r};return f.add((0,E.toDisposable)(()=>{c===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),f.add(i.onDidChangeValue(d=>{const[s]=this.getOrInstantiateProvider(d);s!==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=ke([ge(0,_.IQuickInputService),ge(1,S.IInstantiationService)],b)}),define(se[804],oe([1,0,26,28,100,490]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var E;(function(S){function p(_){switch(_){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""}}S.className=p})(E||(e.SeverityIcon=E={}))}),define(se[92],oe([1,0,6,2,20,604,8]),function(te,e,L,k,y,E,S){"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,S.createDecorator)("storageService");var p;(function(a){a[a.NONE=0]="NONE",a[a.SHUTDOWN=1]="SHUTDOWN"})(p||(e.WillSaveStateReason=p={}));function _(a){const i=a.get(e.TARGET_KEY);if(i)try{return JSON.parse(i)}catch{}return Object.create(null)}e.loadKeyTargets=_;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,r=>r.scope===i&&(n===void 0||r.key===n),t)}emitDidChangeValue(i,n){const{key:t,external:r}=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:r})}get(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.get(i,t)}getBoolean(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.getBoolean(i,t)}getNumber(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.getNumber(i,t)}store(i,n,t,r,u=!1){if((0,y.isUndefinedOrNull)(n)){this.remove(i,t,u);return}this.withPausedEmitters(()=>{var f;this.updateKeyTarget(i,t,r),(f=this.getStorage(t))===null||f===void 0||f.set(i,n,u)})}remove(i,n,t=!1){this.withPausedEmitters(()=>{var r;this.updateKeyTarget(i,n,void 0),(r=this.getStorage(n))===null||r===void 0||r.delete(i,t)})}withPausedEmitters(i){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{i()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(i,n,t,r=!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),r)):typeof c[i]=="number"&&(delete c[i],(f=this.getStorage(n))===null||f===void 0||f.set(e.TARGET_KEY,JSON.stringify(c),r))}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?_(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(se[805],oe([1,0,6,53,5,343,45,8,92,44,7]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,p.createDecorator)("ICodeLensCache");class a{constructor(t,r){this.lineCount=t,this.data=r}}let i=class{constructor(t){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new k.LRUCache(20,.75);const r="codelens/cache";(0,b.runWhenWindowIdle)(v.mainWindow,()=>t.remove(r,1));const u="codelens/cache2",f=t.get(u,1,"{}");this._deserialize(f),L.Event.once(t.onWillSaveState)(c=>{c.reason===_.WillSaveStateReason.SHUTDOWN&&t.store(u,this._serialize(),1,1)})}put(t,r){const u=r.lenses.map(d=>{var s;return{range:d.symbol.range,command:d.symbol.command&&{id:"",title:(s=d.symbol.command)===null||s===void 0?void 0:s.title}}}),f=new E.CodeLensModel;f.add({lenses:u,dispose:()=>{}},this._fakeProvider);const c=new a(t.getLineCount(),f);this._cache.set(t.uri.toString(),c)}get(t){const r=this._cache.get(t.uri.toString());return r&&r.lineCount===t.getLineCount()?r.data:void 0}delete(t){this._cache.delete(t.uri.toString())}_serialize(){const t=Object.create(null);for(const[r,u]of this._cache){const f=new Set;for(const c of u.data.lenses)f.add(c.symbol.range.startLineNumber);t[r]={lineCount:u.lineCount,lines:[...f.values()]}}return JSON.stringify(t)}_deserialize(t){try{const r=JSON.parse(t);for(const u in r){const f=r[u],c=[];for(const s of f.lines)c.push({range:new y.Range(s,1,s,11)});const d=new E.CodeLensModel;d.add({lenses:c,dispose(){}},this._fakeProvider),this._cache.set(u,new a(f.lineCount,d))}}catch{}}};e.CodeLensCache=i,e.CodeLensCache=i=ke([ge(0,_.IStorageService)],i),(0,S.registerSingleton)(e.ICodeLensCache,i,1)}),define(se[358],oe([1,0,14,2,53,199,31,27,45,8,92]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";var a;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,s){if(s.length===0)return 0;const l=s[0].score[0];for(let o=0;o<s.length;o++){const{score:g,completion:h}=s[o];if(g[0]!==l)break;if(h.preselect)return o}return 0}}e.Memory=i;class n extends i{constructor(){super("first")}memorize(c,d,s){}toJSON(){}fromJSON(){}}e.NoMemory=n;class t extends i{constructor(){super("recentlyUsed"),this._cache=new y.LRUCache(300,.66),this._seq=0}memorize(c,d,s){const l=`${c.getLanguageId()}/${s.textLabel}`;this._cache.set(l,{touch:this._seq++,type:s.completion.kind,insertText:s.completion.insertText})}select(c,d,s){if(s.length===0)return 0;const l=c.getLineContent(d.lineNumber).substr(d.column-10,d.column-1);if(/\s$/.test(l))return super.select(c,d,s);const o=s[0].score[0];let g=-1,h=-1,m=-1;for(let C=0;C<s.length&&s[C].score[0]===o;C++){const w=`${c.getLanguageId()}/${s[C].textLabel}`,D=this._cache.peek(w);if(D&&D.touch>m&&D.type===s[C].completion.kind&&D.insertText===s[C].completion.insertText&&(m=D.touch,h=C),s[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[s,l]of c)l.touch=d,l.type=typeof l.type=="number"?l.type:S.CompletionItemKinds.fromString(l.type),this._cache.set(s,l);this._seq=this._cache.size}}e.LRUMemory=t;class r extends i{constructor(){super("recentlyUsedByPrefix"),this._trie=E.TernarySearchTree.forStrings(),this._seq=0}memorize(c,d,s){const{word:l}=c.getWordUntilPosition(d),o=`${c.getLanguageId()}/${l}`;this._trie.set(o,{type:s.completion.kind,insertText:s.completion.insertText,touch:this._seq++})}select(c,d,s){const{word:l}=c.getWordUntilPosition(d);if(!l)return super.select(c,d,s);const o=`${c.getLanguageId()}/${l}`;let g=this._trie.get(o);if(g||(g=this._trie.findSubstr(o)),g)for(let h=0;h<s.length;h++){const{kind:m,insertText:C}=s[h].completion;if(m===g.type&&C===g.insertText)return h}return super.select(c,d,s)}toJSON(){const c=[];return this._trie.forEach((d,s)=>c.push([s,d])),c.sort((d,s)=>-(d[1].touch-s[1].touch)).forEach((d,s)=>d[1].touch=s),c.slice(0,200)}fromJSON(c){if(this._trie.clear(),c.length>0){this._seq=c[0][1].touch+1;for(const[d,s]of c)s.type=typeof s.type=="number"?s.type:S.CompletionItemKinds.fromString(s.type),this._trie.set(d,s)}}}e.PrefixMemory=r;let u=a=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(s=>{s.reason===b.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(c,d,s){this._withStrategy(c,d).memorize(c,d,s),this._persistSoon.schedule()}select(c,d,s){return this._withStrategy(c,d).select(c,d,s)}_withStrategy(c,d){var s;const l=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:c.getLanguageIdAtPosition(d.lineNumber,d.column),resource:c.uri});if(((s=this._strategy)===null||s===void 0?void 0:s.name)!==l){this._saveState();const o=a._strategyCtors.get(l)||n;this._strategy=new o;try{const h=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,m=this._storageService.get(`${a._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,s=JSON.stringify(this._strategy);this._storageService.store(`${a._storagePrefix}/${this._strategy.name}`,s,d,1)}}};e.SuggestMemoryService=u,u._strategyCtors=new Map([["recentlyUsedByPrefix",r],["recentlyUsed",t],["first",n]]),u._storagePrefix="suggest/memories",e.SuggestMemoryService=u=a=ke([ge(0,b.IStorageService),ge(1,p.IConfigurationService)],u),e.ISuggestMemoryService=(0,v.createDecorator)("ISuggestMemories"),(0,_.registerSingleton)(e.ISuggestMemoryService,u,1)}),define(se[806],oe([1,0,14,6,2,30,25,15,42,92,13,735]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";var i,n;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let t=class{constructor(s,l){this._commandService=s,this._hiddenStates=new r(l)}createMenu(s,l,o){return new f(s,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...o},this._commandService,l)}resetHiddenStates(s){this._hiddenStates.reset(s)}};e.MenuService=t,e.MenuService=t=ke([ge(0,S.ICommandService),ge(1,v.IStorageService)],t);let r=i=class{constructor(s){this._storageService=s,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=s.get(i._key,0,"{}");this._data=JSON.parse(l)}catch{this._data=Object.create(null)}this._disposables.add(s.onDidChangeValue(0,i._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const l=s.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(s,l){var o;return(o=this._hiddenByDefaultCache.get(`${s.id}/${l}`))!==null&&o!==void 0?o:!1}setDefaultState(s,l,o){this._hiddenByDefaultCache.set(`${s.id}/${l}`,o)}isHidden(s,l){var o,g;const h=this._isHiddenByDefault(s,l),m=(g=(o=this._data[s.id])===null||o===void 0?void 0:o.includes(l))!==null&&g!==void 0?g:!1;return h?!m:m}updateHidden(s,l,o){this._isHiddenByDefault(s,l)&&(o=!o);const h=this._data[s.id];if(o)h?h.indexOf(l)<0&&h.push(l):this._data[s.id]=[l];else if(h){const m=h.indexOf(l);m>=0&&(0,b.removeFastWithoutKeepingOrder)(h,m),h.length===0&&delete this._data[s.id]}this._persist()}reset(s){if(s===void 0)this._data=Object.create(null),this._persist();else{for(const{id:l}of s)this._data[l]&&delete this._data[l];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const s=JSON.stringify(this._data);this._storageService.store(i._key,s,0,0)}finally{this._ignoreChangeEvent=!1}}};r._key="menu.hiddenCommands",r=i=ke([ge(0,v.IStorageService)],r);let u=n=class{constructor(s,l,o,g,h){this._id=s,this._hiddenStates=l,this._collectContextKeysForSubmenus=o,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 s=E.MenuRegistry.getMenuItems(this._id);let l;s.sort(n._compareMenuItems);for(const o of s){const g=o.group||"";(!l||l[0]!==g)&&(l=[g,[]],this._menuGroups.push(l)),l[1].push(o),this._collectContextKeys(o)}}_collectContextKeys(s){if(n._fillInKbExprKeys(s.when,this._structureContextKeys),(0,E.isIMenuItem)(s)){if(s.command.precondition&&n._fillInKbExprKeys(s.command.precondition,this._preconditionContextKeys),s.command.toggled){const l=s.command.toggled.condition||s.command.toggled;n._fillInKbExprKeys(l,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&E.MenuRegistry.getMenuItems(s.submenu).forEach(this._collectContextKeys,this)}createActionGroups(s){const l=[];for(const o of this._menuGroups){const[g,h]=o,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,s,D,this._contextKeyService,this._commandService));else{const I=new n(C.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(s),T=_.Separator.join(...I.map(A=>A[1]));T.length>0&&m.push(new E.SubmenuItemAction(C,D,T))}}m.length>0&&l.push([g,m])}return l}static _fillInKbExprKeys(s,l){if(s)for(const o of s.keys())l.add(o)}static _compareMenuItems(s,l){const o=s.group,g=l.group;if(o!==g){if(o){if(!g)return-1}else return 1;if(o==="navigation")return-1;if(g==="navigation")return 1;const C=o.localeCompare(g);if(C!==0)return C}const h=s.order||0,m=l.order||0;return h<m?-1:h>m?1:n._compareTitles((0,E.isIMenuItem)(s)?s.command.title:s.title,(0,E.isIMenuItem)(l)?l.command.title:l.title)}static _compareTitles(s,l){const o=typeof s=="string"?s:s.original,g=typeof l=="string"?l:l.original;return o.localeCompare(g)}};u=n=ke([ge(3,S.ICommandService),ge(4,p.IContextKeyService)],u);let f=class{constructor(s,l,o,g,h){this._disposables=new y.DisposableStore,this._menuInfo=new u(s,l,o.emitEventsForSubmenuChanges,g,h);const m=new L.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},o.eventDebounceDelay);this._disposables.add(m),this._disposables.add(E.MenuRegistry.onDidChangeMenu(I=>{I.has(s)&&m.schedule()}));const C=this._disposables.add(new y.DisposableStore),w=I=>{let T=!1,A=!1,P=!1;for(const N of I)if(T=T||N.isStructuralChange,A=A||N.isEnablementChange,P=P||N.isToggleChange,T&&A&&P)break;return{menu:this,isStructuralChange:T,isEnablementChange:A,isToggleChange:P}},D=()=>{C.add(h.onDidChangeContext(I=>{const T=I.affectsSome(this._menuInfo.structureContextKeys),A=I.affectsSome(this._menuInfo.preconditionContextKeys),P=I.affectsSome(this._menuInfo.toggledContextKeys);(T||A||P)&&this._onDidChange.fire({menu:this,isStructuralChange:T,isEnablementChange:A,isToggleChange:P})})),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:o.eventDebounceDelay,merge:w}),this.onDidChange=this._onDidChange.event}getActions(s){return this._menuInfo.createActionGroups(s)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};f=ke([ge(3,S.ICommandService),ge(4,p.IContextKeyService)],f);function c(d,s,l){const o=(0,E.isISubmenuItem)(s)?s.submenu.id:s.id,g=typeof s.title=="string"?s.title:s.title.value,h=(0,_.toAction)({id:`hide/${d.id}/${o}`,label:(0,a.localize)(0,null,g),run(){l.updateHidden(d,o,!0)}}),m=(0,_.toAction)({id:`toggle/${d.id}/${o}`,label:g,get checked(){return!l.isHidden(d,o)},run(){l.updateHidden(d,o,!!this.checked)}});return{hide:h,toggle:m,get isHidden(){return!m.checked}}}}),define(se[81],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,L.createDecorator)("telemetryService")}),define(se[16],oe([1,0,620,22,33,10,51,68,30,25,15,8,124,37,81,20,64,7]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 O of x){let B=O.kbExpr;this.precondition&&(B?B=b.ContextKeyExpr.and(B,this.precondition):B=this.precondition);const W={id:this.id,weight:O.weight,args:O.args,when:B,primary:O.primary,secondary:O.secondary,win:O.win,linux:O.linux,mac:O.mac};i.KeybindingsRegistry.registerKeybindingRule(W)}}v.CommandsRegistry.registerCommand({id:this.id,handler:(x,O)=>this.runCommand(x,O),metadata:this.metadata})}_registerMenuItem(x){_.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,O,B,W){return this._implementations.push({priority:x,name:O,implementation:B,when:W}),this._implementations.sort((V,K)=>K.priority-V.priority),{dispose:()=>{for(let V=0;V<this._implementations.length;V++)if(this._implementations[V].implementation===B){this._implementations.splice(V,1);return}}}}runCommand(x,O){const B=x.get(u.ILogService),W=x.get(b.IContextKeyService);B.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const V of this._implementations){if(V.when){const F=W.getContext((0,f.getActiveElement)());if(!V.when.evaluate(F))continue}const K=V.implementation(x,O);if(K)return B.trace(`Command '${this.id}' was handled by '${V.name}'.`),typeof K=="boolean"?void 0:K}B.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=d;class s extends c{constructor(x,O){super(O),this.command=x}runCommand(x,O){return this.command.runCommand(x,O)}}e.ProxyCommand=s;class l extends c{static bindToContribution(x){return class extends l{constructor(B){super(B),this._callback=B.handler}runEditorCommand(B,W,V){const K=x(W);K&&this._callback(K,V)}}}static runEditorCommand(x,O,B,W){const V=x.get(y.ICodeEditorService),K=V.getFocusedCodeEditor()||V.getActiveCodeEditor();if(K)return K.invokeWithinContext(F=>{if(F.get(b.IContextKeyService).contextMatchesRules(B??void 0))return W(F,K,O)})}runCommand(x,O){return l.runEditorCommand(x,O,this.precondition,(B,W,V)=>this.runEditorCommand(B,W,V))}}e.EditorCommand=l;class o extends l{static convertOptions(x){let O;Array.isArray(x.menuOpts)?O=x.menuOpts:x.menuOpts?O=[x.menuOpts]:O=[];function B(W){return W.menuId||(W.menuId=_.MenuId.EditorContext),W.title||(W.title=x.label),W.when=b.ContextKeyExpr.and(x.precondition,W.when),W}return Array.isArray(x.contextMenuOpts)?O.push(...x.contextMenuOpts.map(B)):x.contextMenuOpts&&O.push(B(x.contextMenuOpts)),x.menuOpts=O,x}constructor(x){super(o.convertOptions(x)),this.label=x.label,this.alias=x.alias}runEditorCommand(x,O,B){return this.reportTelemetry(x,O),this.run(x,O,B||{})}reportTelemetry(x,O){x.get(t.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=o;class g extends o{constructor(){super(...arguments),this._implementations=[]}addImplementation(x,O){return this._implementations.push([x,O]),this._implementations.sort((B,W)=>W[0]-B[0]),{dispose:()=>{for(let B=0;B<this._implementations.length;B++)if(this._implementations[B][1]===O){this._implementations.splice(B,1);return}}}}run(x,O,B){for(const W of this._implementations){const V=W[1](x,O,B);if(V)return typeof V=="boolean"?void 0:V}}}e.MultiEditorAction=g;class h extends _.Action2{run(x,...O){const B=x.get(y.ICodeEditorService),W=B.getFocusedCodeEditor()||B.getActiveCodeEditor();if(W)return W.invokeWithinContext(V=>{var K,F;const q=V.get(b.IContextKeyService),ie=V.get(u.ILogService);if(!q.contextMatchesRules((K=this.desc.precondition)!==null&&K!==void 0?K:void 0)){ie.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,...O)})}}e.EditorAction2=h;function m(R,x){v.CommandsRegistry.registerCommand(R,function(O,...B){const W=O.get(a.IInstantiationService),[V,K]=B;(0,r.assertType)(k.URI.isUri(V)),(0,r.assertType)(E.Position.isIPosition(K));const F=O.get(S.IModelService).getModel(V);if(F){const q=E.Position.lift(K);return W.invokeFunction(x,F,q,...B.slice(2))}return O.get(p.ITextModelService).createModelReference(V).then(q=>new Promise((ie,ae)=>{try{const ne=W.invokeFunction(x,q.object.textEditorModel,E.Position.lift(K),B.slice(2));ie(ne)}catch(ne){ae(ne)}}).finally(()=>{q.dispose()}))})}e.registerModelAndPositionCommand=m;function C(R){return N.INSTANCE.registerEditorCommand(R),R}e.registerEditorCommand=C;function w(R){const x=new R;return N.INSTANCE.registerEditorAction(x),x}e.registerEditorAction=w;function D(R){return N.INSTANCE.registerEditorAction(R),R}e.registerMultiEditorAction=D;function I(R){N.INSTANCE.registerEditorAction(R)}e.registerInstantiatedEditorAction=I;function T(R,x,O){N.INSTANCE.registerEditorContribution(R,x,O)}e.registerEditorContribution=T;var A;(function(R){function x(K){return N.INSTANCE.getEditorCommand(K)}R.getEditorCommand=x;function O(){return N.INSTANCE.getEditorActions()}R.getEditorActions=O;function B(){return N.INSTANCE.getEditorContributions()}R.getEditorContributions=B;function W(K){return N.INSTANCE.getEditorContributions().filter(F=>K.indexOf(F.id)>=0)}R.getSomeEditorContributions=W;function V(){return N.INSTANCE.getDiffEditorContributions()}R.getDiffEditorContributions=V})(A||(e.EditorExtensionsRegistry=A={}));const P={EditorCommonContributions:"editor.contributions"};class N{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(x,O,B){this.editorContributions.push({id:x,ctor:O,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}}N.INSTANCE=new N,n.Registry.add(P.EditorCommonContributions,N.INSTANCE);function M(R){return R.register(),R}e.UndoCommand=M(new d({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(0,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(1,null),order:1}]})),M(new s(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=M(new d({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(2,null),order:2},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(3,null),order:1}]})),M(new s(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=M(new d({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:L.localize(4,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(5,null),order:1}]}))}),define(se[191],oe([1,0,619,54,20,48,16,33,511,75,207,208,251,10,5,21,15,124,7]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 s extends S.EditorCommand{runEditorCommand(P,N,M){const R=N._getViewModel();R&&this.runCoreEditorCommand(R,M||{})}}e.CoreEditorCommand=s;var l;(function(A){const P=function(M){if(!y.isObject(M))return!1;const R=M;return!(!y.isString(R.to)||!y.isUndefined(R.by)&&!y.isString(R.by)||!y.isUndefined(R.value)&&!y.isNumber(R.value)||!y.isUndefined(R.revealCursor)&&!y.isBoolean(R.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:P,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 N(M){let R;switch(M.to){case A.RawDirection.Up:R=1;break;case A.RawDirection.Right:R=2;break;case A.RawDirection.Down:R=3;break;case A.RawDirection.Left:R=4;break;default:return null}let x;switch(M.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 O=Math.floor(M.value||1),B=!!M.revealCursor;return{direction:R,unit:x,value:O,revealCursor:B,select:!!M.select}}A.parse=N})(l||(e.EditorScroll_=l={}));var o;(function(A){const P=function(N){if(!y.isObject(N))return!1;const M=N;return!(!y.isNumber(M.lineNumber)&&!y.isString(M.lineNumber)||!y.isUndefined(M.at)&&!y.isString(M.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:P,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"}})(o||(e.RevealLine_=o={}));class g{constructor(P){P.addImplementation(1e4,"code-editor",(N,M)=>{const R=N.get(p.ICodeEditorService).getFocusedCodeEditor();return R&&R.hasTextFocus()?this._runEditorCommand(N,R,M):!1}),P.addImplementation(1e3,"generic-dom-input-textarea",(N,M)=>{const R=(0,c.getActiveElement)();return R&&["input","textarea"].indexOf(R.tagName.toLowerCase())>=0?(this.runDOMCommand(R),!0):!1}),P.addImplementation(0,"generic-dom",(N,M)=>{const R=N.get(p.ICodeEditorService).getActiveCodeEditor();return R?(R.focus(),this._runEditorCommand(N,R,M)):!1})}_runEditorCommand(P,N,M){const R=this.runEditorCommand(P,N,M);return R||!0}}var h;(function(A){class P extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){if(!re.position)return;Q.model.pushStackElement(),Q.setCursorStates(re.source,3,[a.CursorMoveCommands.moveTo(Q,Q.getPrimaryCursorState(),this._inSelectionMode,re.position,re.viewPosition)])&&re.revealType!==2&&Q.revealPrimaryCursor(re.source,!0,!0)}}A.MoveTo=(0,S.registerEditorCommand)(new P({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),A.MoveToSelect=(0,S.registerEditorCommand)(new P({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class N extends s{runCoreEditorCommand(Q,re){Q.model.pushStackElement();const de=this._getColumnSelectResult(Q,Q.getPrimaryCursorState(),Q.getCursorColumnSelectData(),re);de!==null&&(Q.setCursorStates(re.source,3,de.viewStates.map(he=>v.CursorState.fromViewState(he))),Q.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:de.fromLineNumber,fromViewVisualColumn:de.fromVisualColumn,toViewLineNumber:de.toLineNumber,toViewVisualColumn:de.toVisualColumn}),de.reversed?Q.revealTopMostCursor(re.source):Q.revealBottomMostCursor(re.source))}}A.ColumnSelect=(0,S.registerEditorCommand)(new class extends N{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(J,Q,re,de){if(typeof de.position>"u"||typeof de.viewPosition>"u"||typeof de.mouseColumn>"u")return null;const he=J.model.validatePosition(de.position),me=J.coordinatesConverter.validateViewPosition(new n.Position(de.viewPosition.lineNumber,de.viewPosition.column),he),X=de.doColumnSelect?re.fromViewLineNumber:me.lineNumber,U=de.doColumnSelect?re.fromViewVisualColumn:de.mouseColumn-1;return _.ColumnSelection.columnSelect(J.cursorConfig,J,X,U,me.lineNumber,de.mouseColumn-1)}}),A.CursorColumnSelectLeft=(0,S.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(J,Q,re,de){return _.ColumnSelection.columnSelectLeft(J.cursorConfig,J,re)}}),A.CursorColumnSelectRight=(0,S.registerEditorCommand)(new class extends N{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(J,Q,re,de){return _.ColumnSelection.columnSelectRight(J.cursorConfig,J,re)}});class M extends N{constructor(Q){super(Q),this._isPaged=Q.isPaged}_getColumnSelectResult(Q,re,de,he){return _.ColumnSelection.columnSelectUp(Q.cursorConfig,Q,de,this._isPaged)}}A.CursorColumnSelectUp=(0,S.registerEditorCommand)(new M({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),A.CursorColumnSelectPageUp=(0,S.registerEditorCommand)(new M({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class R extends N{constructor(Q){super(Q),this._isPaged=Q.isPaged}_getColumnSelectResult(Q,re,de,he){return _.ColumnSelection.columnSelectDown(Q.cursorConfig,Q,de,this._isPaged)}}A.CursorColumnSelectDown=(0,S.registerEditorCommand)(new R({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),A.CursorColumnSelectPageDown=(0,S.registerEditorCommand)(new R({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class x extends s{constructor(){super({id:"cursorMove",precondition:void 0,metadata:a.CursorMove.metadata})}runCoreEditorCommand(Q,re){const de=a.CursorMove.parse(re);de&&this._runCursorMove(Q,re.source,de)}_runCursorMove(Q,re,de){Q.model.pushStackElement(),Q.setCursorStates(re,3,x._move(Q,Q.getCursorStates(),de)),Q.revealPrimaryCursor(re,!0)}static _move(Q,re,de){const he=de.select,me=de.value;switch(de.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return a.CursorMoveCommands.simpleMove(Q,re,de.direction,he,me,de.unit);case 11:case 13:case 12:case 14:return a.CursorMoveCommands.viewportMove(Q,re,de.direction,he,me);default:return null}}}A.CursorMoveImpl=x,A.CursorMove=(0,S.registerEditorCommand)(new x);class O extends s{constructor(Q){super(Q),this._staticArgs=Q.args}runCoreEditorCommand(Q,re){let de=this._staticArgs;this._staticArgs.value===-1&&(de={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:re.pageSize||Q.cursorConfig.pageSize}),Q.model.pushStackElement(),Q.setCursorStates(re.source,3,a.CursorMoveCommands.simpleMove(Q,Q.getCursorStates(),de.direction,de.select,de.value,de.unit)),Q.revealPrimaryCursor(re.source,!0)}}A.CursorLeft=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),A.CursorLeftSelect=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1039}})),A.CursorRight=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),A.CursorRightSelect=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1041}})),A.CursorUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),A.CursorUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),A.CursorPageUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:11}})),A.CursorPageUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1035}})),A.CursorDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),A.CursorDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),A.CursorPageDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:12}})),A.CursorPageDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1036}})),A.CreateCursor=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(J,Q){if(!Q.position)return;let re;Q.wholeLine?re=a.CursorMoveCommands.line(J,J.getPrimaryCursorState(),!1,Q.position,Q.viewPosition):re=a.CursorMoveCommands.moveTo(J,J.getPrimaryCursorState(),!1,Q.position,Q.viewPosition);const de=J.getCursorStates();if(de.length>1){const he=re.modelState?re.modelState.position:null,me=re.viewState?re.viewState.position:null;for(let X=0,U=de.length;X<U;X++){const G=de[X];if(!(he&&!G.modelState.selection.containsPosition(he))&&!(me&&!G.viewState.selection.containsPosition(me))){de.splice(X,1),J.model.pushStackElement(),J.setCursorStates(Q.source,3,de);return}}}de.push(re),J.model.pushStackElement(),J.setCursorStates(Q.source,3,de)}}),A.LastCursorMoveToSelect=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(J,Q){if(!Q.position)return;const re=J.getLastAddedCursorIndex(),de=J.getCursorStates(),he=de.slice(0);he[re]=a.CursorMoveCommands.moveTo(J,de[re],!0,Q.position,Q.viewPosition),J.model.pushStackElement(),J.setCursorStates(Q.source,3,he)}});class B extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,a.CursorMoveCommands.moveToBeginningOfLine(Q,Q.getCursorStates(),this._inSelectionMode)),Q.revealPrimaryCursor(re.source,!0)}}A.CursorHome=(0,S.registerEditorCommand)(new B({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),A.CursorHomeSelect=(0,S.registerEditorCommand)(new B({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class W extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,this._exec(Q.getCursorStates())),Q.revealPrimaryCursor(re.source,!0)}_exec(Q){const re=[];for(let de=0,he=Q.length;de<he;de++){const me=Q[de],X=me.modelState.position.lineNumber;re[de]=v.CursorState.fromModelState(me.modelState.move(this._inSelectionMode,X,1,0))}return re}}A.CursorLineStart=(0,S.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),A.CursorLineStartSelect=(0,S.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class V extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,a.CursorMoveCommands.moveToEndOfLine(Q,Q.getCursorStates(),this._inSelectionMode,re.sticky||!1)),Q.revealPrimaryCursor(re.source,!0)}}A.CursorEnd=(0,S.registerEditorCommand)(new V({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},metadata:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:L.localize(0,null),type:"boolean",default:!1}}}}]}})),A.CursorEndSelect=(0,S.registerEditorCommand)(new V({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},metadata:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:L.localize(1,null),type:"boolean",default:!1}}}}]}}));class K extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,this._exec(Q,Q.getCursorStates())),Q.revealPrimaryCursor(re.source,!0)}_exec(Q,re){const de=[];for(let he=0,me=re.length;he<me;he++){const X=re[he],U=X.modelState.position.lineNumber,G=Q.model.getLineMaxColumn(U);de[he]=v.CursorState.fromModelState(X.modelState.move(this._inSelectionMode,U,G,0))}return de}}A.CursorLineEnd=(0,S.registerEditorCommand)(new K({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),A.CursorLineEndSelect=(0,S.registerEditorCommand)(new K({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class F extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,a.CursorMoveCommands.moveToBeginningOfBuffer(Q,Q.getCursorStates(),this._inSelectionMode)),Q.revealPrimaryCursor(re.source,!0)}}A.CursorTop=(0,S.registerEditorCommand)(new F({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),A.CursorTopSelect=(0,S.registerEditorCommand)(new F({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class q extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){Q.model.pushStackElement(),Q.setCursorStates(re.source,3,a.CursorMoveCommands.moveToEndOfBuffer(Q,Q.getCursorStates(),this._inSelectionMode)),Q.revealPrimaryCursor(re.source,!0)}}A.CursorBottom=(0,S.registerEditorCommand)(new q({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),A.CursorBottomSelect=(0,S.registerEditorCommand)(new q({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class ie extends s{constructor(){super({id:"editorScroll",precondition:void 0,metadata:l.metadata})}determineScrollMethod(Q){const re=[6],de=[1,2,3,4,5,6],he=[4,2],me=[1,3];return re.includes(Q.unit)&&he.includes(Q.direction)?this._runHorizontalEditorScroll.bind(this):de.includes(Q.unit)&&me.includes(Q.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(Q,re){const de=l.parse(re);if(!de)return;const he=this.determineScrollMethod(de);he&&he(Q,re.source,de)}_runVerticalEditorScroll(Q,re,de){const he=this._computeDesiredScrollTop(Q,de);if(de.revealCursor){const me=Q.getCompletelyVisibleViewRangeAtScrollTop(he);Q.setCursorStates(re,3,[a.CursorMoveCommands.findPositionInViewportIfOutside(Q,Q.getPrimaryCursorState(),me,de.select)])}Q.viewLayout.setScrollPosition({scrollTop:he},0)}_computeDesiredScrollTop(Q,re){if(re.unit===1){const me=Q.viewLayout.getFutureViewport(),X=Q.getCompletelyVisibleViewRangeAtScrollTop(me.top),U=Q.coordinatesConverter.convertViewRangeToModelRange(X);let G;re.direction===1?G=Math.max(1,U.startLineNumber-re.value):G=Math.min(Q.model.getLineCount(),U.startLineNumber+re.value);const z=Q.coordinatesConverter.convertModelPositionToViewPosition(new n.Position(G,1));return Q.viewLayout.getVerticalOffsetForLineNumber(z.lineNumber)}if(re.unit===5){let me=0;return re.direction===3&&(me=Q.model.getLineCount()-Q.cursorConfig.pageSize),Q.viewLayout.getVerticalOffsetForLineNumber(me)}let de;re.unit===3?de=Q.cursorConfig.pageSize*re.value:re.unit===4?de=Math.round(Q.cursorConfig.pageSize/2)*re.value:de=re.value;const he=(re.direction===1?-1:1)*de;return Q.viewLayout.getCurrentScrollTop()+he*Q.cursorConfig.lineHeight}_runHorizontalEditorScroll(Q,re,de){const he=this._computeDesiredScrollLeft(Q,de);Q.viewLayout.setScrollPosition({scrollLeft:he},0)}_computeDesiredScrollLeft(Q,re){const de=(re.direction===4?-1:1)*re.value;return Q.viewLayout.getCurrentScrollLeft()+de*Q.cursorConfig.typicalHalfwidthCharacterWidth}}A.EditorScrollImpl=ie,A.EditorScroll=(0,S.registerEditorCommand)(new ie),A.ScrollLineUp=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Up,by:l.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollPageUp=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Up,by:l.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollEditorTop=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Up,by:l.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollLineDown=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Down,by:l.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollPageDown=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Down,by:l.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollEditorBottom=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Down,by:l.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollLeft=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Left,by:l.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:Q.source})}}),A.ScrollRight=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(J,Q){A.EditorScroll.runCoreEditorCommand(J,{to:l.RawDirection.Right,by:l.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:Q.source})}});class ae extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){re.position&&(Q.model.pushStackElement(),Q.setCursorStates(re.source,3,[a.CursorMoveCommands.word(Q,Q.getPrimaryCursorState(),this._inSelectionMode,re.position)]),re.revealType!==2&&Q.revealPrimaryCursor(re.source,!0,!0))}}A.WordSelect=(0,S.registerEditorCommand)(new ae({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),A.WordSelectDrag=(0,S.registerEditorCommand)(new ae({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),A.LastCursorWordSelect=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(J,Q){if(!Q.position)return;const re=J.getLastAddedCursorIndex(),de=J.getCursorStates(),he=de.slice(0),me=de[re];he[re]=a.CursorMoveCommands.word(J,me,me.modelState.hasSelection(),Q.position),J.model.pushStackElement(),J.setCursorStates(Q.source,3,he)}});class ne extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){re.position&&(Q.model.pushStackElement(),Q.setCursorStates(re.source,3,[a.CursorMoveCommands.line(Q,Q.getPrimaryCursorState(),this._inSelectionMode,re.position,re.viewPosition)]),re.revealType!==2&&Q.revealPrimaryCursor(re.source,!1,!0))}}A.LineSelect=(0,S.registerEditorCommand)(new ne({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),A.LineSelectDrag=(0,S.registerEditorCommand)(new ne({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class $ extends s{constructor(Q){super(Q),this._inSelectionMode=Q.inSelectionMode}runCoreEditorCommand(Q,re){if(!re.position)return;const de=Q.getLastAddedCursorIndex(),he=Q.getCursorStates(),me=he.slice(0);me[de]=a.CursorMoveCommands.line(Q,he[de],this._inSelectionMode,re.position,re.viewPosition),Q.model.pushStackElement(),Q.setCursorStates(re.source,3,me)}}A.LastCursorLineSelect=(0,S.registerEditorCommand)(new $({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),A.LastCursorLineSelectDrag=(0,S.registerEditorCommand)(new $({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),A.CancelSelection=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"cancelSelection",precondition:r.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(J,Q){J.model.pushStackElement(),J.setCursorStates(Q.source,3,[a.CursorMoveCommands.cancelSelection(J,J.getPrimaryCursorState())]),J.revealPrimaryCursor(Q.source,!0)}}),A.RemoveSecondaryCursors=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"removeSecondaryCursors",precondition:r.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:d+1,kbExpr:r.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(J,Q){J.model.pushStackElement(),J.setCursorStates(Q.source,3,[J.getPrimaryCursorState()]),J.revealPrimaryCursor(Q.source,!0),(0,E.status)(L.localize(2,null))}}),A.RevealLine=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"revealLine",precondition:void 0,metadata:o.metadata})}runCoreEditorCommand(J,Q){const re=Q,de=re.lineNumber||0;let he=typeof de=="number"?de+1:parseInt(de)+1;he<1&&(he=1);const me=J.model.getLineCount();he>me&&(he=me);const X=new t.Range(he,1,he,J.model.getLineMaxColumn(he));let U=0;if(re.at)switch(re.at){case o.RawAtArgument.Top:U=3;break;case o.RawAtArgument.Center:U=1;break;case o.RawAtArgument.Bottom:U=4;break;default:break}const G=J.coordinatesConverter.convertModelRangeToViewRange(X);J.revealRange(Q.source,!1,G,U,0)}}),A.SelectAll=new class extends g{constructor(){super(S.SelectAllCommand)}runDOMCommand(J){k.isFirefox&&(J.focus(),J.select()),J.ownerDocument.execCommand("selectAll")}runEditorCommand(J,Q,re){const de=Q._getViewModel();de&&this.runCoreEditorCommand(de,re)}runCoreEditorCommand(J,Q){J.model.pushStackElement(),J.setCursorStates("keyboard",3,[a.CursorMoveCommands.selectAll(J,J.getPrimaryCursorState())])}},A.SetSelection=(0,S.registerEditorCommand)(new class extends s{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(J,Q){Q.selection&&(J.model.pushStackElement(),J.setCursorStates(Q.source,3,[v.CursorState.fromModelSelection(Q.selection)]))}})})(h||(e.CoreNavigationCommands=h={}));const m=u.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,r.EditorContextKeys.columnSelection);function C(A,P){f.KeybindingsRegistry.registerKeybindingRule({id:A,primary:P,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 P extends S.EditorCommand{runEditorCommand(M,R,x){const O=R._getViewModel();O&&this.runCoreEditingCommand(R,O,x||{})}}A.CoreEditingCommand=P,A.LineBreakInsert=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"lineBreakInsert",precondition:r.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(N,M,R){N.pushUndoStop(),N.executeCommands(this.id,i.TypeOperations.lineBreakInsert(M.cursorConfig,M.model,M.getCursorStates().map(x=>x.modelState.selection)))}}),A.Outdent=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"outdent",precondition:r.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:u.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(N,M,R){N.pushUndoStop(),N.executeCommands(this.id,i.TypeOperations.outdent(M.cursorConfig,M.model,M.getCursorStates().map(x=>x.modelState.selection))),N.pushUndoStop()}}),A.Tab=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"tab",precondition:r.EditorContextKeys.writable,kbOpts:{weight:d,kbExpr:u.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(N,M,R){N.pushUndoStop(),N.executeCommands(this.id,i.TypeOperations.tab(M.cursorConfig,M.model,M.getCursorStates().map(x=>x.modelState.selection))),N.pushUndoStop()}}),A.DeleteLeft=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(N,M,R){const[x,O]=b.DeleteOperations.deleteLeft(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(B=>B.modelState.selection),M.getCursorAutoClosedCharacters());x&&N.pushUndoStop(),N.executeCommands(this.id,O),M.setPrevEditOperationType(2)}}),A.DeleteRight=(0,S.registerEditorCommand)(new class extends P{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:d,kbExpr:r.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(N,M,R){const[x,O]=b.DeleteOperations.deleteRight(M.getPrevEditOperationType(),M.cursorConfig,M.model,M.getCursorStates().map(B=>B.modelState.selection));x&&N.pushUndoStop(),N.executeCommands(this.id,O),M.setPrevEditOperationType(3)}}),A.Undo=new class extends g{constructor(){super(S.UndoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("undo")}runEditorCommand(N,M,R){if(!(!M.hasModel()||M.getOption(90)===!0))return M.getModel().undo()}},A.Redo=new class extends g{constructor(){super(S.RedoCommand)}runDOMCommand(N){N.ownerDocument.execCommand("redo")}runEditorCommand(N,M,R){if(!(!M.hasModel()||M.getOption(90)===!0))return M.getModel().redo()}}})(D||(e.CoreEditingCommands=D={}));class I extends S.Command{constructor(P,N,M){super({id:P,precondition:void 0,metadata:M}),this._handlerId=N}runCommand(P,N){const M=P.get(p.ICodeEditorService).getFocusedCodeEditor();M&&M.trigger("keyboard",this._handlerId,N)}}function T(A,P){w(new I("default:"+A,A)),w(new I(A,A,P))}T("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),T("replacePreviousChar"),T("compositionType"),T("compositionStart"),T("compositionEnd"),T("paste"),T("cut")}),define(se[807],oe([1,0,237,16]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let y=class{constructor(S,p){}dispose(){}};e.MarkerDecorationsContribution=y,y.ID="editor.contrib.markerDecorations",e.MarkerDecorationsContribution=y=ke([ge(1,L.IMarkerDecorationsService)],y),(0,k.registerEditorContribution)(y.ID,y,0)}),define(se[808],oe([1,0,191,10,17]),function(te,e,L,k,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class E{constructor(p,_,v,b){this.configuration=p,this.viewModel=_,this.userInputEvents=v,this.commandDelegate=b}paste(p,_,v,b){this.commandDelegate.paste(p,_,v,b)}type(p){this.commandDelegate.type(p)}compositionType(p,_,v,b){this.commandDelegate.compositionType(p,_,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 _=this.viewModel.getLineMinColumn(p.lineNumber);return p.column<_?new k.Position(p.lineNumber,_):p}_hasMulticursorModifier(p){switch(this.configuration.options.get(77)){case"altKey":return p.altKey;case"ctrlKey":return p.ctrlKey;case"metaKey":return p.metaKey;default:return!1}}_hasNonMulticursorModifier(p){switch(this.configuration.options.get(77)){case"altKey":return p.ctrlKey||p.metaKey;case"ctrlKey":return p.altKey||p.metaKey;case"metaKey":return p.ctrlKey||p.altKey;default:return!1}}dispatchMouse(p){const _=this.configuration.options,v=y.isLinux&&_.get(106),b=_.get(22);p.middleButton&&!v?this._columnSelect(p.position,p.mouseColumn,p.inSelectionMode):p.startedOnLineNumbers?this._hasMulticursorModifier(p)?p.inSelectionMode?this._lastCursorLineSelect(p.position,p.revealType):this._createCursor(p.position,!0):p.inSelectionMode?this._lineSelectDrag(p.position,p.revealType):this._lineSelect(p.position,p.revealType):p.mouseDownCount>=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,_){return p=this._validateViewColumn(p),{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,revealType:_}}moveTo(p,_){L.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_moveToSelect(p,_){L.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_columnSelect(p,_,v){p=this._validateViewColumn(p),L.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,mouseColumn:_,doColumnSelect:v})}_createCursor(p,_){p=this._validateViewColumn(p),L.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(p),viewPosition:p,wholeLine:_})}_lastCursorMoveToSelect(p,_){L.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_wordSelect(p,_){L.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_wordSelectDrag(p,_){L.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_lastCursorWordSelect(p,_){L.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_lineSelect(p,_){L.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_lineSelectDrag(p,_){L.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_lastCursorLineSelect(p,_){L.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_lastCursorLineSelectDrag(p,_){L.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(p,_))}_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(se[809],oe([1,0,45,8,6,61,62,112,121,81]),function(te,e,L,k,y,E,S,p,_,v){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=e.WorkerBasedDiffProviderFactoryService=e.IDiffProviderFactoryService=void 0,e.IDiffProviderFactoryService=(0,k.createDecorator)("diffProviderFactoryService");let a=class{constructor(t){this.instantiationService=t}createDiffProvider(t){return this.instantiationService.createInstance(i,t)}};e.WorkerBasedDiffProviderFactoryService=a,e.WorkerBasedDiffProviderFactoryService=a=ke([ge(0,k.IInstantiationService)],a),(0,L.registerSingleton)(e.IDiffProviderFactoryService,a,1);let i=b=class{constructor(t,r,u){this.editorWorkerService=r,this.telemetryService=u,this.onDidChangeEventEmitter=new y.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(t)}dispose(){var t;(t=this.diffAlgorithmOnDidChangeSubscription)===null||t===void 0||t.dispose()}async computeDiff(t,r,u,f){var c,d;if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(t,r,u,f);if(t.getLineCount()===1&&t.getLineMaxColumn(1)===1)return r.getLineCount()===1&&r.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new p.DetailedLineRangeMapping(new S.LineRange(1,2),new S.LineRange(1,r.getLineCount()+1),[new p.RangeMapping(t.getFullModelRange(),r.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const s=JSON.stringify([t.uri.toString(),r.uri.toString()]),l=JSON.stringify([t.id,r.id,t.getAlternativeVersionId(),r.getAlternativeVersionId(),JSON.stringify(u)]),o=b.diffCache.get(s);if(o&&o.context===l)return o.result;const g=E.StopWatch.create(),h=await this.editorWorkerService.computeDiff(t.uri,r.uri,u,this.diffAlgorithm),m=g.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:m,timedOut:(c=h?.quitEarly)!==null&&c!==void 0?c:!0,detectedMoves:u.computeMoves?(d=h?.moves.length)!==null&&d!==void 0?d:0:-1}),f.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!h)throw new Error("no diff result available");return b.diffCache.size>10&&b.diffCache.delete(b.diffCache.keys().next().value),b.diffCache.set(s,{result:h,context:l}),h}setOptions(t){var r;let u=!1;t.diffAlgorithm&&this.diffAlgorithm!==t.diffAlgorithm&&((r=this.diffAlgorithmOnDidChangeSubscription)===null||r===void 0||r.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=t.diffAlgorithm,typeof t.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=t.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),u=!0),u&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=i,i.diffCache=new Map,e.WorkerBasedDocumentDiffProvider=i=b=ke([ge(1,_.IEditorWorkerService),ge(2,v.ITelemetryService)],i)}),define(se[359],oe([1,0,14,19,2,35,809,87,62,286,112,182,288,284,20,13,90]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;let f=class extends y.Disposable{setActiveMovedText(C){this._activeMovedText.set(C,void 0)}constructor(C,w,D){super(),this.model=C,this._options=w,this._diffProviderFactoryService=D,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,void 0),this.unchangedRegions=(0,E.derived)(this,P=>{var N,M;return this._options.hideUnchangedRegions.read(P)?(M=(N=this._unchangedRegions.read(P))===null||N===void 0?void 0:N.regions)!==null&&M!==void 0?M:[]:((0,E.transaction)(R=>{var x;for(const O of((x=this._unchangedRegions.get())===null||x===void 0?void 0:x.regions)||[])O.collapseAll(R)}),[])}),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,P=>{var N,M;return(M=(N=this.movedTextToCompare.read(P))!==null&&N!==void 0?N:this._hoveredMovedText.read(P))!==null&&M!==void 0?M:this._activeMovedText.read(P)}),this._cancellationTokenSource=new k.CancellationTokenSource,this._diffProvider=(0,E.derived)(this,P=>{const N=this._diffProviderFactoryService.createDiffProvider({diffAlgorithm:this._options.diffAlgorithm.read(P)}),M=(0,E.observableSignalFromEvent)("onDidChange",N.onDidChange);return{diffProvider:N,onChangeSignal:M}}),this._register((0,y.toDisposable)(()=>this._cancellationTokenSource.cancel()));const I=(0,E.observableSignal)("contentChangedSignal"),T=this._register(new L.RunOnceScheduler(()=>I.trigger(void 0),200));this._register((0,E.autorun)(P=>{const N=this._unchangedRegions.read(P);if(!N||N.regions.some(W=>W.isDragged.read(P)))return;const M=N.originalDecorationIds.map(W=>C.original.getDecorationRange(W)).map(W=>W?_.LineRange.fromRangeInclusive(W):void 0),R=N.modifiedDecorationIds.map(W=>C.modified.getDecorationRange(W)).map(W=>W?_.LineRange.fromRangeInclusive(W):void 0),x=N.regions.map((W,V)=>!M[V]||!R[V]?void 0:new o(M[V].startLineNumber,R[V].startLineNumber,M[V].length,W.visibleLineCountTop.read(P),W.visibleLineCountBottom.read(P))).filter(t.isDefined),O=[];let B=!1;for(const W of(0,r.groupAdjacentBy)(x,(V,K)=>V.getHiddenModifiedRange(P).endLineNumberExclusive===K.getHiddenModifiedRange(P).startLineNumber))if(W.length>1){B=!0;const V=W.reduce((F,q)=>F+q.lineCount,0),K=new o(W[0].originalLineNumber,W[0].modifiedLineNumber,V,W[0].visibleLineCountTop.get(),W[W.length-1].visibleLineCountBottom.get());O.push(K)}else O.push(W[0]);if(B){const W=C.original.deltaDecorations(N.originalDecorationIds,O.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),V=C.modified.deltaDecorations(N.modifiedDecorationIds,O.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));(0,E.transaction)(K=>{this._unchangedRegions.set({regions:O,originalDecorationIds:W,modifiedDecorationIds:V},K)})}}));const A=(P,N,M)=>{const R=o.fromDiffs(P.changes,C.original.getLineCount(),C.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(M),this._options.hideUnchangedRegionsContextLineCount.read(M));let x;const O=this._unchangedRegions.get();if(O){const K=O.originalDecorationIds.map(ae=>C.original.getDecorationRange(ae)).map(ae=>ae?_.LineRange.fromRangeInclusive(ae):void 0),F=O.modifiedDecorationIds.map(ae=>C.modified.getDecorationRange(ae)).map(ae=>ae?_.LineRange.fromRangeInclusive(ae):void 0);let ie=(0,p.filterWithPrevious)(O.regions.map((ae,ne)=>{if(!K[ne]||!F[ne])return;const $=K[ne].length;return new o(K[ne].startLineNumber,F[ne].startLineNumber,$,Math.min(ae.visibleLineCountTop.get(),$),Math.min(ae.visibleLineCountBottom.get(),$-ae.visibleLineCountTop.get()))}).filter(t.isDefined),(ae,ne)=>!ne||ae.modifiedLineNumber>=ne.modifiedLineNumber+ne.lineCount&&ae.originalLineNumber>=ne.originalLineNumber+ne.lineCount).map(ae=>new b.LineRangeMapping(ae.getHiddenOriginalRange(M),ae.getHiddenModifiedRange(M)));ie=b.LineRangeMapping.clip(ie,_.LineRange.ofLength(1,C.original.getLineCount()),_.LineRange.ofLength(1,C.modified.getLineCount())),x=b.LineRangeMapping.inverse(ie,C.original.getLineCount(),C.modified.getLineCount())}const B=[];if(x)for(const K of R){const F=x.filter(q=>q.original.intersectsStrict(K.originalUnchangedRange)&&q.modified.intersectsStrict(K.modifiedUnchangedRange));B.push(...K.setVisibleRanges(F,N))}else B.push(...R);const W=C.original.deltaDecorations(O?.originalDecorationIds||[],B.map(K=>({range:K.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),V=C.modified.deltaDecorations(O?.modifiedDecorationIds||[],B.map(K=>({range:K.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));this._unchangedRegions.set({regions:B,originalDecorationIds:W,modifiedDecorationIds:V},N)};this._register(C.modified.onDidChangeContent(P=>{if(this._diff.get()){const M=a.TextEditInfo.fromModelContentChanges(P.changes),R=(this._lastDiff,C.original,C.modified,void 0);R&&(this._lastDiff=R,(0,E.transaction)(x=>{this._diff.set(s.fromDiffResult(this._lastDiff),x),A(R,x);const O=this.movedTextToCompare.get();this.movedTextToCompare.set(O?this._lastDiff.moves.find(B=>B.lineRangeMapping.modified.intersect(O.lineRangeMapping.modified)):void 0,x)}))}this._isDiffUpToDate.set(!1,void 0),T.schedule()})),this._register(C.original.onDidChangeContent(P=>{if(this._diff.get()){const M=a.TextEditInfo.fromModelContentChanges(P.changes),R=(this._lastDiff,C.original,C.modified,void 0);R&&(this._lastDiff=R,(0,E.transaction)(x=>{this._diff.set(s.fromDiffResult(this._lastDiff),x),A(R,x);const O=this.movedTextToCompare.get();this.movedTextToCompare.set(O?this._lastDiff.moves.find(B=>B.lineRangeMapping.modified.intersect(O.lineRangeMapping.modified)):void 0,x)}))}this._isDiffUpToDate.set(!1,void 0),T.schedule()})),this._register((0,E.autorunWithStore)(async(P,N)=>{var M,R;this._options.hideUnchangedRegionsMinimumLineCount.read(P),this._options.hideUnchangedRegionsContextLineCount.read(P),T.cancel(),I.read(P);const x=this._diffProvider.read(P);x.onChangeSignal.read(P),(0,p.readHotReloadableExport)(v.DefaultLinesDiffComputer,P),(0,p.readHotReloadableExport)(n.optimizeSequenceDiffs,P),this._isDiffUpToDate.set(!1,void 0);let O=[];N.add(C.original.onDidChangeContent(V=>{const K=a.TextEditInfo.fromModelContentChanges(V.changes);O=(0,i.combineTextEditInfos)(O,K)}));let B=[];N.add(C.modified.onDidChangeContent(V=>{const K=a.TextEditInfo.fromModelContentChanges(V.changes);B=(0,i.combineTextEditInfos)(B,K)}));let W=await x.diffProvider.computeDiff(C.original,C.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(P),maxComputationTimeMs:this._options.maxComputationTimeMs.read(P),computeMoves:this._options.showMoves.read(P)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(W=c(W,C.original,C.modified),W=(M=(C.original,C.modified,void 0))!==null&&M!==void 0?M:W,W=(R=(C.original,C.modified,void 0))!==null&&R!==void 0?R:W,(0,E.transaction)(V=>{A(W,V),this._lastDiff=W;const K=s.fromDiffResult(W);this._diff.set(K,V),this._isDiffUpToDate.set(!0,V);const F=this.movedTextToCompare.get();this.movedTextToCompare.set(F?this._lastDiff.moves.find(q=>q.lineRangeMapping.modified.intersect(F.lineRangeMapping.modified)):void 0,V)}))}))}ensureModifiedLineIsVisible(C,w,D){var I,T;if(((I=this.diff.get())===null||I===void 0?void 0:I.mappings.length)===0)return;const A=((T=this._unchangedRegions.get())===null||T===void 0?void 0:T.regions)||[];for(const P of A)if(P.getHiddenModifiedRange(void 0).contains(C)){P.showModifiedLine(C,w,D);return}}ensureOriginalLineIsVisible(C,w,D){var I,T;if(((I=this.diff.get())===null||I===void 0?void 0:I.mappings.length)===0)return;const A=((T=this._unchangedRegions.get())===null||T===void 0?void 0:T.regions)||[];for(const P of A)if(P.getHiddenOriginalRange(void 0).contains(C)){P.showOriginalLine(C,w,D);return}}async waitForDiff(){await(0,E.waitForState)(this.isDiffUpToDate,C=>C)}serializeState(){const C=this._unchangedRegions.get();return{collapsedRegions:C?.regions.map(w=>({range:w.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(C){var w;const D=(w=C.collapsedRegions)===null||w===void 0?void 0:w.map(T=>_.LineRange.deserialize(T.range)),I=this._unchangedRegions.get();!I||!D||(0,E.transaction)(T=>{for(const A of I.regions)for(const P of D)if(A.modifiedUnchangedRange.intersect(P)){A.setHiddenModifiedRange(P,T);break}})}};e.DiffEditorViewModel=f,e.DiffEditorViewModel=f=ke([ge(2,S.IDiffProviderFactoryService)],f);function c(m,C,w){return{changes:m.changes.map(D=>new b.DetailedLineRangeMapping(D.original,D.modified,D.innerChanges?D.innerChanges.map(I=>d(I,C,w)):void 0)),moves:m.moves,identical:m.identical,quitEarly:m.quitEarly}}function d(m,C,w){let D=m.originalRange,I=m.modifiedRange;return(D.endColumn!==1||I.endColumn!==1)&&D.endColumn===C.getLineMaxColumn(D.endLineNumber)&&I.endColumn===w.getLineMaxColumn(I.endLineNumber)&&D.endLineNumber<C.getLineCount()&&I.endLineNumber<w.getLineCount()&&(D=D.setEndPosition(D.endLineNumber+1,1),I=I.setEndPosition(I.endLineNumber+1,1)),new b.RangeMapping(D,I)}class s{static fromDiffResult(C){return new s(C.changes.map(w=>new l(w)),C.moves||[],C.identical,C.quitEarly)}constructor(C,w,D,I){this.mappings=C,this.movedTexts=w,this.identical=D,this.quitEarly=I}}e.DiffState=s;class l{constructor(C){this.lineRangeMapping=C}}e.DiffMapping=l;class o{static fromDiffs(C,w,D,I,T){const A=b.DetailedLineRangeMapping.inverse(C,w,D),P=[];for(const N of A){let M=N.original.startLineNumber,R=N.modified.startLineNumber,x=N.original.length;const O=M===1&&R===1,B=M+x===w+1&&R+x===D+1;(O||B)&&x>=T+I?(O&&!B&&(x-=T),B&&!O&&(M+=T,R+=T,x-=T),P.push(new o(M,R,x,0,0))):x>=T*2+I&&(M+=T,R+=T,x-=T*2,P.push(new o(M,R,x,0,0)))}return P}get originalUnchangedRange(){return _.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return _.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(C,w,D,I,T){this.originalLineNumber=C,this.modifiedLineNumber=w,this.lineCount=D,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,N=>this.visibleLineCountTop.read(N)+this.visibleLineCountBottom.read(N)===this.lineCount&&!this.isDragged.read(N)),this.isDragged=(0,E.observableValue)(this,void 0);const A=Math.max(Math.min(I,this.lineCount),0),P=Math.max(Math.min(T,this.lineCount-I),0);(0,u.softAssert)(I===A),(0,u.softAssert)(T===P),this._visibleLineCountTop.set(A,void 0),this._visibleLineCountBottom.set(P,void 0)}setVisibleRanges(C,w){const D=[],I=new _.LineRangeSet(C.map(N=>N.modified)).subtractFrom(this.modifiedUnchangedRange);let T=this.originalLineNumber,A=this.modifiedLineNumber;const P=this.modifiedLineNumber+this.lineCount;if(I.ranges.length===0)this.showAll(w),D.push(this);else{let N=0;for(const M of I.ranges){const R=N===I.ranges.length-1;N++;const x=(R?P:M.endLineNumberExclusive)-A,O=new o(T,A,x,0,0);O.setHiddenModifiedRange(M,w),D.push(O),T=O.originalUnchangedRange.endLineNumberExclusive,A=O.modifiedUnchangedRange.endLineNumberExclusive}}return D}shouldHideControls(C){return this._shouldHideControls.read(C)}getHiddenOriginalRange(C){return _.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(C),this.lineCount-this._visibleLineCountTop.read(C)-this._visibleLineCountBottom.read(C))}getHiddenModifiedRange(C){return _.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(C),this.lineCount-this._visibleLineCountTop.read(C)-this._visibleLineCountBottom.read(C))}setHiddenModifiedRange(C,w){const D=C.startLineNumber-this.modifiedLineNumber,I=this.modifiedLineNumber+this.lineCount-C.endLineNumberExclusive;this.setState(D,I,w)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(C=10,w){const D=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+C,D),w)}showMoreBelow(C=10,w){const D=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+C,D),w)}showAll(C){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),C)}showModifiedLine(C,w,D){const I=C+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),T=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-C;w===0&&I<T||w===1?this._visibleLineCountTop.set(this._visibleLineCountTop.get()+I,D):this._visibleLineCountBottom.set(this._visibleLineCountBottom.get()+T,D)}showOriginalLine(C,w,D){const I=C-this.originalLineNumber,T=this.originalLineNumber+this.lineCount-C;w===0&&I<T||w===1?this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+T-I,this.getMaxVisibleLineCountTop()),D):this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+I-T,this.getMaxVisibleLineCountBottom()),D)}collapseAll(C){this._visibleLineCountTop.set(0,C),this._visibleLineCountBottom.set(0,C)}setState(C,w,D){C=Math.max(Math.min(C,this.lineCount),0),w=Math.max(Math.min(w,this.lineCount-C),0),this._visibleLineCountTop.set(C,D),this._visibleLineCountBottom.set(w,D)}}e.UnchangedRegion=o;function g(m,C,w,D){}function h(m,C,w,D){}}),define(se[810],oe([1,0,48,58,65,16,24,21,649,15,453]),function(te,e,L,k,y,E,S,p,_,v){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new v.RawContextKey("selectionAnchorSet",!1);let a=b=class{static get(f){return f.getContribution(b.ID)}constructor(f,c){this.editor=f,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(c),this.modelChangeListener=f.onDidChangeModel(()=>this.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(S.Selection.fromPositions(f,f),{description:"selection-anchor",stickiness:1,hoverMessage:new k.MarkdownString().appendText((0,_.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,L.alert)((0,_.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(S.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()}};a.ID="editor.contrib.selectionAnchorController",a=b=ke([ge(1,v.IContextKeyService)],a);class i extends E.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,_.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=a.get(c))===null||d===void 0||d.setSelectionAnchor()}}class n extends E.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,_.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}async run(f,c){var d;(d=a.get(c))===null||d===void 0||d.goToSelectionAnchor()}}class t extends E.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,_.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=a.get(c))===null||d===void 0||d.selectFromAnchorToCursor()}}class r extends E.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,_.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=a.get(c))===null||d===void 0||d.cancelSelectionAnchor()}}(0,E.registerEditorContribution)(a.ID,a,4),(0,E.registerEditorAction)(i),(0,E.registerEditorAction)(n),(0,E.registerEditorAction)(t),(0,E.registerEditorAction)(r)}),define(se[811],oe([1,0,16,21,552,651]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends L.EditorAction{constructor(b,a){super(a),this.left=b}run(b,a){if(!a.hasModel())return;const i=[],n=a.getSelections();for(const t of n)i.push(new y.MoveCaretCommand(t,this.left));a.pushUndoStop(),a.executeCommands(this.id,i),a.pushUndoStop()}}class p extends S{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:E.localize(0,null),alias:"Move Selected Text Left",precondition:k.EditorContextKeys.writable})}}class _ extends S{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)(_)}),define(se[812],oe([1,0,16,130,206,5,21,652]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends L.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:p.localize(0,null),alias:"Transpose Letters",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(b,a){if(!a.hasModel())return;const i=a.getModel(),n=[],t=a.getSelections();for(const r of t){if(!r.isEmpty())continue;const u=r.startLineNumber,f=r.startColumn,c=i.getLineMaxColumn(u);if(u===1&&(f===1||f===2&&c===2))continue;const d=f===c?r.getPosition():y.MoveOperations.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),s=y.MoveOperations.leftPosition(i,d),l=y.MoveOperations.leftPosition(i,s),o=i.getValueInRange(E.Range.fromPositions(l,s)),g=i.getValueInRange(E.Range.fromPositions(s,d)),h=E.Range.fromPositions(l,d);n.push(new k.ReplaceCommand(h,g+o))}n.length>0&&(a.pushUndoStop(),a.executeCommands(this.id,n),a.pushUndoStop())}}(0,L.registerEditorAction)(_)}),define(se[813],oe([1,0,65,16,5,21,32,301,554,663,30]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class a extends k.EditorAction{constructor(f,c){super(c),this._type=f}run(f,c){const d=f.get(S.ILanguageConfigurationService);if(!c.hasModel())return;const s=c.getModel(),l=[],o=s.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<h.length;C++){const w=h[C];m.selection.endLineNumber===w.selection.startLineNumber&&(m.index<w.index?w.ignoreFirstLine=!0:(m.ignoreFirstLine=!0,m=w))}for(const C of h)l.push(new _.LineCommentCommand(d,C.selection,o.tabSize,this._type,g.insertSpace,g.ignoreEmptyLines,C.ignoreFirstLine));c.pushUndoStop(),c.executeCommands(this.id,l),c.pushUndoStop()}}class i extends a{constructor(){super(0,{id:"editor.action.commentLine",label:v.localize(0,null),alias:"Toggle Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:b.MenuId.MenubarEditMenu,group:"5_insert",title:v.localize(1,null),order:1}})}}class n extends a{constructor(){super(1,{id:"editor.action.addCommentLine",label:v.localize(2,null),alias:"Add Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2081),weight:100}})}}class t extends a{constructor(){super(2,{id:"editor.action.removeCommentLine",label:v.localize(3,null),alias:"Remove Line Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2099),weight:100}})}}class r extends k.EditorAction{constructor(){super({id:"editor.action.blockComment",label:v.localize(4,null),alias:"Toggle Block Comment",precondition:E.EditorContextKeys.writable,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:b.MenuId.MenubarEditMenu,group:"5_insert",title:v.localize(5,null),order:2}})}run(f,c){const d=f.get(S.ILanguageConfigurationService);if(!c.hasModel())return;const s=c.getOption(23),l=[],o=c.getSelections();for(const g of o)l.push(new p.BlockCommentCommand(g,s.insertSpace,d));c.pushUndoStop(),c.executeCommands(this.id,l),c.pushUndoStop()}}(0,k.registerEditorAction)(i),(0,k.registerEditorAction)(n),(0,k.registerEditorAction)(t),(0,k.registerEditorAction)(r)}),define(se[814],oe([1,0,2,16,21,665]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class S{constructor(i){this.selections=i}equals(i){const n=this.selections.length,t=i.selections.length;if(n!==t)return!1;for(let r=0;r<n;r++)if(!this.selections[r].equalsSelection(i.selections[r]))return!1;return!0}}class p{constructor(i,n,t){this.cursorState=i,this.scrollTop=n,this.scrollLeft=t}}class _ extends L.Disposable{static get(i){return i.getContribution(_.ID)}constructor(i){super(),this._editor=i,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(i.onDidChangeModel(n=>{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 S(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 S(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 S(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=_,_.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 r;(r=_.get(n))===null||r===void 0||r.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 r;(r=_.get(n))===null||r===void 0||r.cursorRedo()}}e.CursorRedo=b,(0,k.registerEditorContribution)(_.ID,_,0),(0,k.registerEditorAction)(v),(0,k.registerEditorAction)(b)}),define(se[815],oe([1,0,16,15,19,66,8,45,671]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const v=(0,S.createDecorator)("IEditorCancelService"),b=new k.RawContextKey("cancellableOperation",!1,(0,_.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 r;return t.key.set(!0),r=t.tokens.push(n),()=>{r&&(r(),t.key.set(!t.tokens.isEmpty()),r=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 a extends y.CancellationTokenSource{constructor(n,t){super(t),this.editor=n,this._unregister=n.invokeWithinContext(r=>r.get(v).add(n,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=a,(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(se[105],oe([1,0,11,5,19,2,815]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class p{constructor(a,i){if(this.flags=i,this.flags&1){const n=a.getModel();this.modelVersionId=n?L.format("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=a.getPosition():this.position=null,this.flags&2?this.selection=a.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=a.getScrollLeft(),this.scrollTop=a.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(a){if(!(a instanceof p))return!1;const i=a;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(a){return this._equals(new p(a,this.flags))}}e.EditorState=p;class _ extends S.EditorKeybindingCancellationTokenSource{constructor(a,i,n,t){super(a,t),this._listener=new E.DisposableStore,i&4&&this._listener.add(a.onDidChangeCursorPosition(r=>{(!n||!k.Range.containsPosition(n,r.position))&&this.cancel()})),i&2&&this._listener.add(a.onDidChangeCursorSelection(r=>{(!n||!k.Range.containsRange(n,r.selection))&&this.cancel()})),i&8&&this._listener.add(a.onDidScrollChange(r=>this.cancel())),i&1&&(this._listener.add(a.onDidChangeModel(r=>this.cancel())),this._listener.add(a.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=_;class v extends y.CancellationTokenSource{constructor(a,i){super(i),this._listener=a.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=v}),define(se[140],oe([1,0,13,19,12,2,22,136,5,24,18,51,105,654,25,50,88,81,116]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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,T){return I.isPreferred&&!T.isPreferred?-1:!I.isPreferred&&T.isPreferred?1:0}static codeActionsComparator({action:I},{action:T}){return I.isAI&&!T.isAI?1:!I.isAI&&T.isAI?-1:(0,L.isNonEmptyArray)(I.diagnostics)?(0,L.isNonEmptyArray)(T.diagnostics)?d.codeActionsPreferredComparator(I,T):-1:(0,L.isNonEmptyArray)(T.diagnostics)?1:d.codeActionsPreferredComparator(I,T)}constructor(I,T,A){super(),this.documentation=T,this._register(A),this.allActions=[...I].sort(d.codeActionsComparator),this.validActions=this.allActions.filter(({action:P})=>!P.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 s={actions:[],documentation:void 0};async function l(D,I,T,A,P,N){var M;const R=A.filter||{},x={...R,excludes:[...R.excludes||[],c.CodeActionKind.Notebook]},O={only:(M=R.include)===null||M===void 0?void 0:M.value,trigger:A.type},B=new i.TextModelCancellationTokenSource(I,N),W=A.type===2,V=o(D,I,W?x:R),K=new E.DisposableStore,F=V.map(async ie=>{try{P.report(ie);const ae=await ie.provideCodeActions(I,T,O,B.token);if(ae&&K.add(ae),B.token.isCancellationRequested)return s;const ne=(ae?.actions||[]).filter(J=>J&&(0,c.filtersAction)(R,J)),$=h(ie,ne,R.include);return{actions:ne.map(J=>new c.CodeActionItem(J,ie)),documentation:$}}catch(ae){if((0,y.isCancellationError)(ae))throw ae;return(0,y.onUnexpectedExternalError)(ae),s}}),q=D.onDidChange(()=>{const ie=D.all(I);(0,L.equals)(ie,V)||B.cancel()});try{const ie=await Promise.all(F),ae=ie.map($=>$.actions).flat(),ne=[...(0,L.coalesce)(ie.map($=>$.documentation)),...g(D,I,A,ae)];return new d(ae,ne,K)}finally{q.dispose(),B.dispose()}}e.getCodeActions=l;function o(D,I,T){return D.all(I).filter(A=>A.providedCodeActionKinds?A.providedCodeActionKinds.some(P=>(0,c.mayIncludeActionsOfKind)(T,new c.CodeActionKind(P))):!0)}function*g(D,I,T,A){var P,N,M;if(I&&A.length)for(const R of D.all(I))R._getAdditionalMenuItems&&(yield*(P=R._getAdditionalMenuItems)===null||P===void 0?void 0:P.call(R,{trigger:T.type,only:(M=(N=T.filter)===null||N===void 0?void 0:N.include)===null||M===void 0?void 0:M.value},A.map(x=>x.action)))}function h(D,I,T){if(!D.documentation)return;const A=D.documentation.map(P=>({kind:new c.CodeActionKind(P.kind),command:P.command}));if(T){let P;for(const N of A)N.kind.contains(T)&&(P?P.kind.contains(N.kind)&&(P=N):P=N);if(P)return P?.command}for(const P of I)if(P.kind){for(const N of A)if(N.kind.contains(new c.CodeActionKind(P.kind)))return N.command}}var m;(function(D){D.OnSave="onSave",D.FromProblemsView="fromProblemsView",D.FromCodeActions="fromCodeActions",D.FromAILightbulb="fromAILightbulb"})(m||(e.ApplyCodeActionReason=m={}));async function C(D,I,T,A,P=k.CancellationToken.None){var N;const M=D.get(p.IBulkEditService),R=D.get(t.ICommandService),x=D.get(f.ITelemetryService),O=D.get(r.INotificationService);if(x.publicLog2("codeAction.applyCodeAction",{codeActionTitle:I.action.title,codeActionKind:I.action.kind,codeActionIsPreferred:!!I.action.isPreferred,reason:T}),await I.resolve(P),!P.isCancellationRequested&&!(!((N=I.action.edit)===null||N===void 0)&&N.edits.length&&!(await M.apply(I.action.edit,{editor:A?.editor,label:I.action.title,quotableLabel:I.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:T!==m.OnSave,showPreview:A?.preview})).isApplied)&&I.action.command)try{await R.executeCommand(I.action.command.id,...I.action.command.arguments||[])}catch(B){const W=w(B);O.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,T,A,P){if(!(I instanceof S.URI))throw(0,y.illegalArgument)();const{codeActionProvider:N}=D.get(b.ILanguageFeaturesService),M=D.get(a.IModelService).getModel(I);if(!M)throw(0,y.illegalArgument)();const R=v.Selection.isISelection(T)?v.Selection.liftSelection(T):_.Range.isIRange(T)?M.validateRange(T):void 0;if(!R)throw(0,y.illegalArgument)();const x=typeof A=="string"?new c.CodeActionKind(A):void 0,O=await l(N,M,R,{type:1,triggerAction:c.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:x}},u.Progress.None,k.CancellationToken.None),B=[],W=Math.min(O.validActions.length,typeof P=="number"?P:0);for(let V=0;V<W;V++)B.push(O.validActions[V].resolve(k.CancellationToken.None));try{return await Promise.all(B),O.validActions.map(V=>V.action)}finally{setTimeout(()=>O.dispose(),100)}})}),define(se[816],oe([1,0,99,140,116,34]),function(te,e,L,k,y,E){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let p=S=class{constructor(v){this.keybindingService=v}getResolver(){const v=new L.Lazy(()=>this.keybindingService.getKeybindings().filter(b=>S.codeActionCommands.indexOf(b.command)>=0).filter(b=>b.resolvedKeybinding).map(b=>{let a=b.commandArgs;return b.command===k.organizeImportsCommandId?a={kind:y.CodeActionKind.SourceOrganizeImports.value}:b.command===k.fixAllCommandId&&(a={kind:y.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:b.resolvedKeybinding,...y.CodeActionCommandArgs.fromUser(a,{kind:y.CodeActionKind.None,apply:"never"})}}));return b=>{if(b.kind){const a=this.bestKeybindingForCodeAction(b,v.value);return a?.resolvedKeybinding}}}bestKeybindingForCodeAction(v,b){if(!v.kind)return;const a=new y.CodeActionKind(v.kind);return b.filter(i=>i.kind.contains(a)).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=S=ke([ge(0,E.IKeybindingService)],p)}),define(se[360],oe([1,0,14,12,6,2,49,36,10,24,15,88,116,140]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.APPLY_FIX_ALL_COMMAND_ID=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new b.RawContextKey("supportedCodeAction",""),e.APPLY_FIX_ALL_COMMAND_ID="_typescript.applyFixAllCodeAction";class t extends E.Disposable{constructor(d,s,l,o=250){super(),this._editor=d,this._markerService=s,this._signalChange=l,this._delay=o,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 s=this._getRangeOfSelectionUnlessWhitespaceEnclosed(d);this._signalChange(s?{trigger:d,selection:s}:void 0)}_onMarkerChanges(d){const s=this._editor.getModel();s&&d.some(l=>(0,S.isEqual)(l,s.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:i.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(d){if(!this._editor.hasModel())return;const s=this._editor.getSelection();if(d.type===1)return s;const l=this._editor.getOption(64).enabled;if(l!==p.ShowLightbulbIconMode.Off){{if(l===p.ShowLightbulbIconMode.On)return s;if(l===p.ShowLightbulbIconMode.OnCode){if(!s.isEmpty())return s;const g=this._editor.getModel(),{lineNumber:h,column:m}=s.getPosition(),C=g.getLineContent(h);if(C.length===0)return;if(m===1){if(/\s/.test(C[0]))return}else if(m===g.getLineMaxColumn(h)){if(/\s/.test(C[C.length-1]))return}else if(/\s/.test(C[m-2])&&/\s/.test(C[m-1]))return}}return s}}}var r;(function(c){c.Empty={type:0};class d{constructor(l,o,g){this.trigger=l,this.position=o,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})(r||(e.CodeActionsState=r={}));const u=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class f extends E.Disposable{constructor(d,s,l,o,g,h){super(),this._editor=d,this._registry=s,this._markerService=l,this._progressService=g,this._configurationService=h,this._codeActionOracle=this._register(new E.MutableDisposable),this._state=r.Empty,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(o),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._register(this._editor.onDidChangeConfiguration(m=>{m.hasChanged(64)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(r.Empty,!0))}_settingEnabledNearbyQuickfixes(){var d;const s=(d=this._editor)===null||d===void 0?void 0:d.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:s?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(r.Empty);const d=this._editor.getModel();if(d&&this._registry.has(d)&&!this._editor.getOption(90)){const s=this._registry.all(d).flatMap(l=>{var o;return(o=l.providedCodeActionKinds)!==null&&o!==void 0?o:[]});this._supportedCodeActions.set(s.join(" ")),this._codeActionOracle.value=new t(this._editor,this._markerService,l=>{var o;if(!l){this.setState(r.Empty);return}const g=l.selection.getStartPosition(),h=(0,L.createCancelablePromise)(async m=>{var C,w,D,I,T,A,P,N,M,R;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 x=await(0,n.getCodeActions)(this._registry,d,l.selection,l.trigger,a.Progress.None,m),O=[...x.allActions];if(m.isCancellationRequested)return u;const B=(D=x.validActions)===null||D===void 0?void 0:D.some(V=>V.action.kind?i.CodeActionKind.QuickFix.contains(new i.CodeActionKind(V.action.kind)):!1),W=this._markerService.read({resource:d.uri});if(B){for(const V of x.validActions)!((T=(I=V.action.command)===null||I===void 0?void 0:I.arguments)===null||T===void 0)&&T.some(K=>typeof K=="string"&&K.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(V.action.diagnostics=[...W.filter(K=>K.relatedInformation)]);return{validActions:x.validActions,allActions:O,documentation:x.documentation,hasAutoFix:x.hasAutoFix,hasAIFix:x.hasAIFix,allAIFixes:x.allAIFixes,dispose:()=>{x.dispose()}}}else if(!B&&W.length>0){const V=l.selection.getPosition();let K=V,F=Number.MAX_VALUE;const q=[...x.validActions];for(const ae of W){const ne=ae.endColumn,$=ae.endLineNumber,J=ae.startLineNumber;if($===V.lineNumber||J===V.lineNumber){K=new _.Position($,ne);const Q={type:l.trigger.type,triggerAction:l.trigger.triggerAction,filter:{include:!((A=l.trigger.filter)===null||A===void 0)&&A.include?(P=l.trigger.filter)===null||P===void 0?void 0:P.include:i.CodeActionKind.QuickFix},autoApply:l.trigger.autoApply,context:{notAvailableMessage:((N=l.trigger.context)===null||N===void 0?void 0:N.notAvailableMessage)||"",position:K}},re=new v.Selection(K.lineNumber,K.column,K.lineNumber,K.column),de=await(0,n.getCodeActions)(this._registry,d,re,Q,a.Progress.None,m);if(de.validActions.length!==0){for(const he of de.validActions)!((R=(M=he.action.command)===null||M===void 0?void 0:M.arguments)===null||R===void 0)&&R.some(me=>typeof me=="string"&&me.includes(e.APPLY_FIX_ALL_COMMAND_ID))&&(he.action.diagnostics=[...W.filter(me=>me.relatedInformation)]);x.allActions.length===0&&O.push(...de.allActions),Math.abs(V.column-ne)<F?q.unshift(...de.validActions):q.push(...de.validActions)}F=Math.abs(V.column-ne)}}const ie=q.filter((ae,ne,$)=>$.findIndex(J=>J.action.title===ae.action.title)===ne);return ie.sort((ae,ne)=>ae.action.isPreferred&&!ne.action.isPreferred?-1:!ae.action.isPreferred&&ne.action.isPreferred||ae.action.isAI&&!ne.action.isAI?1:!ae.action.isAI&&ne.action.isAI?-1:0),{validActions:ie,allActions:O,documentation:x.documentation,hasAutoFix:x.hasAutoFix,hasAIFix:x.hasAIFix,allAIFixes:x.allAIFixes,dispose:()=>{x.dispose()}}}}return(0,n.getCodeActions)(this._registry,d,l.selection,l.trigger,a.Progress.None,m)});l.trigger.type===1&&((o=this._progressService)===null||o===void 0||o.showWhile(h,250)),this.setState(new r.Triggered(l.trigger,g,h))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:i.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(d){var s;(s=this._codeActionOracle.value)===null||s===void 0||s.trigger(d)}setState(d,s){d!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=d,!s&&!this._disposed&&this._onDidChangeState.fire(d))}}e.CodeActionModel=f}),define(se[361],oe([1,0,7,63,26,6,2,28,210,140,659,25,34,455]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var t;(function(u){u.Hidden={type:0};class f{constructor(d,s,l,o){this.actions=d,this.trigger=s,this.editorPosition=l,this.widgetPosition=o,this.type=1}}u.Showing=f})(t||(t={}));let r=n=class extends S.Disposable{constructor(f,c,d){super(),this._editor=f,this._keybindingService=c,this._onClick=this._register(new E.Emitter),this.onClick=this._onClick.event,this._state=t.Hidden,this._iconClasses=[],this._domNode=L.$("div.lightBulbWidget"),this._register(k.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const l=this._editor.getModel();(this.state.type!==1||!l||this.state.editorPosition.lineNumber>=l.getLineCount())&&this.hide()})),this._register(L.addStandardDisposableGenericMouseDownListener(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:l,height:o}=L.getDomNodePagePosition(this._domNode),g=this._editor.getOption(66);let h=Math.floor(g/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(h+=g),this._onClick.fire({x:s.posx,y:l+o+h,actions:this.state.actions,trigger:this.state.trigger})})),this._register(L.addDisposableListener(this._domNode,"mouseenter",s=>{(s.buttons&1)===1&&this.hide()})),this._register(E.Event.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var s,l,o,g;this._preferredKbLabel=(l=(s=this._keybindingService.lookupKeybinding(v.autoFixCommandId))===null||s===void 0?void 0:s.getLabel())!==null&&l!==void 0?l:void 0,this._quickFixKbLabel=(g=(o=this._keybindingService.lookupKeybinding(v.quickFixCommandId))===null||o===void 0?void 0:o.getLabel())!==null&&g!==void 0?g: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(f,c,d){if(f.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(64).enabled)return this.hide();const l=this._editor.getModel();if(!l)return this.hide();const{lineNumber:o,column:g}=l.validatePosition(d),h=l.getOptions().tabSize,m=this._editor.getOptions().get(50),C=l.getLineContent(o),w=(0,_.computeIndentLevel)(C,h),D=m.spaceWidth*w>22,I=P=>P>2&&this._editor.getTopForLineNumber(P)===this._editor.getTopForLineNumber(P-1);let T=o,A=1;if(!D){if(o>1&&!I(o-1))T-=1;else if(o<l.getLineCount()&&!I(o+1))T+=1;else if(g*m.spaceWidth<22)return this.hide();A=/^\S\s*$/.test(l.getLineContent(T))?2:1}this.state=new t.Showing(f,c,d,{position:{lineNumber:T,column:A},preference:n._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==t.Hidden&&(this.state=t.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(f){this._state=f,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let f,c=!1;this.state.actions.allAIFixes?(f=y.Codicon.sparkleFilled,this.state.actions.validActions.length===1&&(c=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?f=y.Codicon.lightbulbSparkleAutofix:f=y.Codicon.lightbulbAutofix:this.state.actions.hasAIFix?f=y.Codicon.lightbulbSparkle:f=y.Codicon.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,c),this._iconClasses=p.ThemeIcon.asClassNameArray(f),this._domNode.classList.add(...this._iconClasses)}_updateLightbulbTitle(f,c){this.state.type===1&&(c?this.title=b.localize(0,null,this.state.actions.validActions[0].action.title):f&&this._preferredKbLabel?this.title=b.localize(1,null,this._preferredKbLabel):!f&&this._quickFixKbLabel?this.title=b.localize(2,null,this._quickFixKbLabel):f||(this.title=b.localize(3,null)))}set title(f){this._domNode.title=f}};e.LightBulbWidget=r,r.ID="editor.contrib.lightbulbWidget",r._posPref=[0],e.LightBulbWidget=r=n=ke([ge(1,i.IKeybindingService),ge(2,a.ICommandService)],r)}),define(se[817],oe([1,0,16,149,676]),function(te,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:"Increase Editor Font Size",precondition:void 0})}run(v,b){k.EditorZoom.setZoomLevel(k.EditorZoom.getZoomLevel()+1)}}class S extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:y.localize(1,null),alias:"Decrease Editor Font Size",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:"Reset Editor Font Size",precondition:void 0})}run(v,b){k.EditorZoom.setZoomLevel(0)}}(0,L.registerEditorAction)(E),(0,L.registerEditorAction)(S),(0,L.registerEditorAction)(p)}),define(se[362],oe([1,0,13,19,12,52,66,20,22,105,153,10,5,24,121,68,305,25,760,8,18,64,122]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.getRealAndSyntheticDocumentFormattersOrdered=void 0;function g(P,N,M){const R=[],x=new c.ExtensionIdentifierSet,O=P.ordered(M);for(const W of O)R.push(W),W.extensionId&&x.add(W.extensionId);const B=N.ordered(M);for(const W of B){if(W.extensionId){if(x.has(W.extensionId))continue;x.add(W.extensionId)}R.push({displayName:W.displayName,extensionId:W.extensionId,provideDocumentFormattingEdits(V,K,F){return W.provideDocumentRangeFormattingEdits(V,V.getFullModelRange(),K,F)}})}return R}e.getRealAndSyntheticDocumentFormattersOrdered=g;class h{static setFormatterSelector(N){return{dispose:h._selectors.unshift(N)}}static async select(N,M,R,x){if(N.length===0)return;const O=E.Iterable.first(h._selectors);if(O)return await O(N,M,R,x)}}e.FormattingConflicts=h,h._selectors=new S.LinkedList;async function m(P,N,M,R,x,O,B){const W=P.get(d.IInstantiationService),{documentRangeFormattingEditProvider:V}=P.get(s.ILanguageFeaturesService),K=(0,b.isCodeEditor)(N)?N.getModel():N,F=V.ordered(K),q=await h.select(F,K,R,2);q&&(x.report(q),await W.invokeFunction(C,q,N,M,O,B))}e.formatDocumentRangesWithSelectedProvider=m;async function C(P,N,M,R,x,O){var B,W;const V=P.get(t.IEditorWorkerService),K=P.get(l.ILogService),F=P.get(o.IAudioCueService);let q,ie;(0,b.isCodeEditor)(M)?(q=M.getModel(),ie=new v.EditorStateCancellationTokenSource(M,5,void 0,x)):(q=M,ie=new v.TextModelCancellationTokenSource(M,x));const ae=[];let ne=0;for(const de of(0,L.asArray)(R).sort(i.Range.compareRangesUsingStarts))ne>0&&i.Range.areIntersectingOrTouching(ae[ne-1],de)?ae[ne-1]=i.Range.fromPositions(ae[ne-1].getStartPosition(),de.getEndPosition()):ne=ae.push(de);const $=async de=>{var he,me;K.trace("[format][provideDocumentRangeFormattingEdits] (request)",(he=N.extensionId)===null||he===void 0?void 0:he.value,de);const X=await N.provideDocumentRangeFormattingEdits(q,de,q.getFormattingOptions(),ie.token)||[];return K.trace("[format][provideDocumentRangeFormattingEdits] (response)",(me=N.extensionId)===null||me===void 0?void 0:me.value,X),X},J=(de,he)=>{if(!de.length||!he.length)return!1;const me=de.reduce((X,U)=>i.Range.plusRange(X,U.range),de[0].range);if(!he.some(X=>i.Range.intersectRanges(me,X.range)))return!1;for(const X of de)for(const U of he)if(i.Range.intersectRanges(X.range,U.range))return!0;return!1},Q=[],re=[];try{if(typeof N.provideDocumentRangesFormattingEdits=="function"){K.trace("[format][provideDocumentRangeFormattingEdits] (request)",(B=N.extensionId)===null||B===void 0?void 0:B.value,ae);const de=await N.provideDocumentRangesFormattingEdits(q,ae,q.getFormattingOptions(),ie.token)||[];K.trace("[format][provideDocumentRangeFormattingEdits] (response)",(W=N.extensionId)===null||W===void 0?void 0:W.value,de),re.push(de)}else{for(const de of ae){if(ie.token.isCancellationRequested)return!0;re.push(await $(de))}for(let de=0;de<ae.length;++de)for(let he=de+1;he<ae.length;++he){if(ie.token.isCancellationRequested)return!0;if(J(re[de],re[he])){const me=i.Range.plusRange(ae[de],ae[he]),X=await $(me);ae.splice(he,1),ae.splice(de,1),ae.push(me),re.splice(he,1),re.splice(de,1),re.push(X),de=0,he=0}}}for(const de of re){if(ie.token.isCancellationRequested)return!0;const he=await V.computeMoreMinimalEdits(q.uri,de);he&&Q.push(...he)}}finally{ie.dispose()}if(Q.length===0)return!1;if((0,b.isCodeEditor)(M))u.FormattingEdit.execute(M,Q,!0),M.revealPositionInCenterIfOutsideViewport(M.getPosition(),1);else{const[{range:de}]=Q,he=new n.Selection(de.startLineNumber,de.startColumn,de.endLineNumber,de.endColumn);q.pushEditOperations([he],Q.map(me=>({text:me.text,range:i.Range.lift(me.range),forceMoveMarkers:!0})),me=>{for(const{range:X}of me)if(i.Range.areIntersectingOrTouching(X,he))return[new n.Selection(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn)];return null})}return F.playAudioCue(o.AudioCue.format,{userGesture:O}),!0}e.formatDocumentRangesWithProvider=C;async function w(P,N,M,R,x,O){const B=P.get(d.IInstantiationService),W=P.get(s.ILanguageFeaturesService),V=(0,b.isCodeEditor)(N)?N.getModel():N,K=g(W.documentFormattingEditProvider,W.documentRangeFormattingEditProvider,V),F=await h.select(K,V,M,1);F&&(R.report(F),await B.invokeFunction(D,F,N,M,x,O))}e.formatDocumentWithSelectedProvider=w;async function D(P,N,M,R,x,O){const B=P.get(t.IEditorWorkerService),W=P.get(o.IAudioCueService);let V,K;(0,b.isCodeEditor)(M)?(V=M.getModel(),K=new v.EditorStateCancellationTokenSource(M,5,void 0,x)):(V=M,K=new v.TextModelCancellationTokenSource(M,x));let F;try{const q=await N.provideDocumentFormattingEdits(V,V.getFormattingOptions(),K.token);if(F=await B.computeMoreMinimalEdits(V.uri,q),K.token.isCancellationRequested)return!0}finally{K.dispose()}if(!F||F.length===0)return!1;if((0,b.isCodeEditor)(M))u.FormattingEdit.execute(M,F,R!==2),R!==2&&M.revealPositionInCenterIfOutsideViewport(M.getPosition(),1);else{const[{range:q}]=F,ie=new n.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn);V.pushEditOperations([ie],F.map(ae=>({text:ae.text,range:i.Range.lift(ae.range),forceMoveMarkers:!0})),ae=>{for(const{range:ne}of ae)if(i.Range.areIntersectingOrTouching(ne,ie))return[new n.Selection(ne.startLineNumber,ne.startColumn,ne.endLineNumber,ne.endColumn)];return null})}return W.playAudioCue(o.AudioCue.format,{userGesture:O}),!0}e.formatDocumentWithProvider=D;async function I(P,N,M,R,x,O){const B=N.documentRangeFormattingEditProvider.ordered(M);for(const W of B){const V=await Promise.resolve(W.provideDocumentRangeFormattingEdits(M,R,x,O)).catch(y.onUnexpectedExternalError);if((0,L.isNonEmptyArray)(V))return await P.computeMoreMinimalEdits(M.uri,V)}}e.getDocumentRangeFormattingEditsUntilResult=I;async function T(P,N,M,R,x){const O=g(N.documentFormattingEditProvider,N.documentRangeFormattingEditProvider,M);for(const B of O){const W=await Promise.resolve(B.provideDocumentFormattingEdits(M,R,x)).catch(y.onUnexpectedExternalError);if((0,L.isNonEmptyArray)(W))return await P.computeMoreMinimalEdits(M.uri,W)}}e.getDocumentFormattingEditsUntilResult=T;function A(P,N,M,R,x,O,B){const W=N.onTypeFormattingEditProvider.ordered(M);return W.length===0||W[0].autoFormatTriggerCharacters.indexOf(x)<0?Promise.resolve(void 0):Promise.resolve(W[0].provideOnTypeFormattingEdits(M,R,x,O,B)).catch(y.onUnexpectedExternalError).then(V=>P.computeMoreMinimalEdits(M.uri,V))}e.getOnTypeFormattingEdits=A,f.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(P,...N){const[M,R,x]=N;(0,p.assertType)(_.URI.isUri(M)),(0,p.assertType)(i.Range.isIRange(R));const O=P.get(r.ITextModelService),B=P.get(t.IEditorWorkerService),W=P.get(s.ILanguageFeaturesService),V=await O.createModelReference(M);try{return I(B,W,V.object.textEditorModel,i.Range.lift(R),x,k.CancellationToken.None)}finally{V.dispose()}}),f.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(P,...N){const[M,R]=N;(0,p.assertType)(_.URI.isUri(M));const x=P.get(r.ITextModelService),O=P.get(t.IEditorWorkerService),B=P.get(s.ILanguageFeaturesService),W=await x.createModelReference(M);try{return T(O,B,W.object.textEditorModel,R,k.CancellationToken.None)}finally{W.dispose()}}),f.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(P,...N){const[M,R,x,O]=N;(0,p.assertType)(_.URI.isUri(M)),(0,p.assertType)(a.Position.isIPosition(R)),(0,p.assertType)(typeof x=="string");const B=P.get(r.ITextModelService),W=P.get(t.IEditorWorkerService),V=P.get(s.ILanguageFeaturesService),K=await B.createModelReference(M);try{return A(W,V,K.object.textEditorModel,a.Position.lift(R),x,O,k.CancellationToken.None)}finally{K.dispose()}})}),define(se[818],oe([1,0,13,19,12,65,2,16,33,128,5,21,121,18,362,305,677,122,25,15,8,88]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormatOnType=void 0;let o=class{constructor(w,D,I,T){this._editor=w,this._languageFeaturesService=D,this._workerService=I,this._audioCueService=T,this._disposables=new S.DisposableStore,this._sessionDisposables=new S.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 T of D.autoFormatTriggerCharacters)I.add(T.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(T=>{const A=T.charCodeAt(T.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(),T=new k.CancellationTokenSource,A=this._editor.onDidChangeModelContent(P=>{if(P.isFlush){T.cancel(),A.dispose();return}for(let N=0,M=P.changes.length;N<M;N++)if(P.changes[N].range.endLineNumber<=I.lineNumber){T.cancel(),A.dispose();return}});(0,t.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,D,I,w,D.getFormattingOptions(),T.token).then(P=>{T.token.isCancellationRequested||(0,L.isNonEmptyArray)(P)&&(this._audioCueService.playAudioCue(f.AudioCue.format,{userGesture:!1}),r.FormattingEdit.execute(this._editor,P,!0))}).finally(()=>{A.dispose()})}};e.FormatOnType=o,o.ID="editor.contrib.autoFormat",e.FormatOnType=o=ke([ge(1,n.ILanguageFeaturesService),ge(2,i.IEditorWorkerService),ge(3,f.IAudioCueService)],o);let g=class{constructor(w,D,I){this.editor=w,this._languageFeaturesService=D,this._instantiationService=I,this._callOnDispose=new S.DisposableStore,this._callOnModel=new S.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=ke([ge(1,n.ILanguageFeaturesService),ge(2,s.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(a.EditorContextKeys.notInCompositeEditor,a.EditorContextKeys.writable,a.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:a.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(s.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(a.EditorContextKeys.writable,a.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:a.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(w,D){if(!D.hasModel())return;const I=w.get(s.IInstantiationService),T=D.getModel(),A=D.getSelections().map(N=>N.isEmpty()?new b.Range(N.startLineNumber,1,N.startLineNumber,T.getLineMaxColumn(N.startLineNumber)):N);await w.get(l.IEditorProgressService).showWhile(I.invokeFunction(t.formatDocumentRangesWithSelectedProvider,D,A,1,l.Progress.None,k.CancellationToken.None,!0),250)}}(0,p.registerEditorContribution)(o.ID,o,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(_.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(se[252],oe([1,0,13,19,12,16,18,161]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;async function _(r,u,f,c){const s=f.ordered(r).map(o=>Promise.resolve(c(o,r,u)).then(void 0,g=>{(0,y.onUnexpectedExternalError)(g)})),l=await Promise.all(s);return(0,L.coalesce)(l.flat())}function v(r,u,f,c){return _(u,f,r,(d,s,l)=>d.provideDefinition(s,l,c))}e.getDefinitionsAtPosition=v;function b(r,u,f,c){return _(u,f,r,(d,s,l)=>d.provideDeclaration(s,l,c))}e.getDeclarationsAtPosition=b;function a(r,u,f,c){return _(u,f,r,(d,s,l)=>d.provideImplementation(s,l,c))}e.getImplementationsAtPosition=a;function i(r,u,f,c){return _(u,f,r,(d,s,l)=>d.provideTypeDefinition(s,l,c))}e.getTypeDefinitionsAtPosition=i;function n(r,u,f,c,d){return _(u,f,r,async(s,l,o)=>{const g=await s.provideReferences(l,o,{includeDeclaration:!0},d);if(!c||!g||g.length!==2)return g;const h=await s.provideReferences(l,o,{includeDeclaration:!1},d);return h&&h.length===1?h:g})}e.getReferencesAtPosition=n;async function t(r){const u=await r(),f=new p.ReferencesModel(u,""),c=f.references.map(d=>d.link);return f.dispose(),c}(0,E.registerModelAndPositionCommand)("_executeDefinitionProvider",(r,u,f)=>{const c=r.get(S.ILanguageFeaturesService),d=v(c.definitionProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(r,u,f)=>{const c=r.get(S.ILanguageFeaturesService),d=i(c.typeDefinitionProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeDeclarationProvider",(r,u,f)=>{const c=r.get(S.ILanguageFeaturesService),d=b(c.declarationProvider,u,f,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeReferenceProvider",(r,u,f)=>{const c=r.get(S.ILanguageFeaturesService),d=n(c.referenceProvider,u,f,!1,k.CancellationToken.None);return t(()=>d)}),(0,E.registerModelAndPositionCommand)("_executeImplementationProvider",(r,u,f)=>{const c=r.get(S.ILanguageFeaturesService),d=a(c.implementationProvider,u,f,k.CancellationToken.None);return t(()=>d)})}),define(se[819],oe([1,0,6,2,49,16,33,5,686,15,45,8,34,124,50]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,_.localize)(0,null)),e.ISymbolNavigationService=(0,a.createDecorator)("ISymbolNavigationService");let r=class{constructor(c,d,s,l){this._editorService=d,this._notificationService=s,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 s=new u(this._editorService),l=s.onDidChange(o=>{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)(s,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"),s=d?(0,_.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,d.getLabel()):(0,_.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(s)}};r=ke([ge(0,v.IContextKeyService),ge(1,S.ICodeEditorService),ge(2,t.INotificationService),ge(3,i.IKeybindingService)],r),(0,b.registerSingleton)(e.ISymbolNavigationService,r,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=ke([ge(0,S.ICodeEditorService)],u)}),define(se[363],oe([1,0,14,19,12,16,18]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class p{constructor(n,t,r){this.provider=n,this.hover=t,this.ordinal=r}}e.HoverProviderResult=p;async function _(i,n,t,r,u){try{const f=await Promise.resolve(i.provideHover(t,r,u));if(f&&a(f))return new p(i,f,n)}catch(f){(0,y.onUnexpectedExternalError)(f)}}function v(i,n,t,r){const f=i.ordered(n).map((c,d)=>_(c,d,n,t,r));return L.AsyncIterableObject.fromPromises(f).coalesce()}e.getHover=v;function b(i,n,t,r){return v(i,n,t,r).map(u=>u.hover).toPromise()}e.getHoverPromise=b,(0,E.registerModelAndPositionCommand)("_executeHoverProvider",(i,n,t)=>{const r=i.get(S.ILanguageFeaturesService);return b(r.hoverProvider,n,t,k.CancellationToken.None)});function a(i){const n=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return n&&t}}),define(se[253],oe([1,0,7,13,14,58,2,104,10,5,43,363,688,27,57,18]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const u=L.$;class f{constructor(l,o,g,h,m){this.owner=l,this.range=o,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,o,g,h,m){this._editor=l,this._languageService=o,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,o){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),T=this._editor.getOption(116),A=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:I});let P=!1;T>=0&&D>T&&l.range.startColumn>=T&&(P=!0,C.push(new f(this,l.range,[{value:i.localize(1,null)}],!1,w++))),!P&&typeof A=="number"&&D>=A&&C.push(new f(this,l.range,[{value:i.localize(2,null)}],!1,w++));let N=!1;for(const M of o){const R=M.range.startLineNumber===h?M.range.startColumn:1,x=M.range.endLineNumber===h?M.range.endColumn:m,O=M.options.hoverMessage;if(!O||(0,E.isEmptyMarkdownString)(O))continue;M.options.beforeContentClassName&&(N=!0);const B=new v.Range(l.range.startLineNumber,R,l.range.startLineNumber,x);C.push(new f(this,B,(0,k.asArray)(O),N,w++))}return C}computeAsync(l,o,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 _.Position(l.range.startLineNumber,l.range.startColumn);return(0,a.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,o){return d(l,o,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=c,e.MarkdownHoverParticipant=c=ke([ge(1,b.ILanguageService),ge(2,t.IOpenerService),ge(3,n.IConfigurationService),ge(4,r.ILanguageFeaturesService)],c);function d(s,l,o,g,h){l.sort((C,w)=>C.ordinal-w.ordinal);const m=new S.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")),T=m.add(new p.MarkdownRenderer({editor:o},g,h));m.add(T.onDidRenderAsync(()=>{I.className="hover-contents code-hover-contents",s.onContentsChanged()}));const A=m.add(T.render(w));I.appendChild(A.element),s.fragment.appendChild(D)}return m}e.renderMarkdownHovers=d}),define(se[820],oe([1,0,2,11,16,250,74,5,24,21,32,51,306,691,70,203,248]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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(P,N,M,R,x){if(P.getLineCount()===1&&P.getLineMaxColumn(1)===1)return[];const O=N.getLanguageConfiguration(P.getLanguageId()).indentationRules;if(!O)return[];for(R=Math.min(R,P.getLineCount());M<=R&&O.unIndentedLinePattern;){const J=P.getLineContent(M);if(!O.unIndentedLinePattern.test(J))break;M++}if(M>R-1)return[];const{tabSize:B,indentSize:W,insertSpaces:V}=P.getOptions(),K=(J,Q)=>(Q=Q||1,E.ShiftCommand.shiftIndent(J,J.length+Q,B,W,V)),F=(J,Q)=>(Q=Q||1,E.ShiftCommand.unshiftIndent(J,J.length+Q,B,W,V)),q=[];let ie;const ae=P.getLineContent(M);let ne=ae;if(x!=null){ie=x;const J=k.getLeadingWhitespace(ae);ne=ie+ae.substring(J.length),O.decreaseIndentPattern&&O.decreaseIndentPattern.test(ne)&&(ie=F(ie),ne=ie+ae.substring(J.length)),ae!==ne&&q.push(S.EditOperation.replaceMove(new _.Selection(M,1,M,J.length+1),(0,r.normalizeIndentation)(ie,W,V)))}else ie=k.getLeadingWhitespace(ae);let $=ie;O.increaseIndentPattern&&O.increaseIndentPattern.test(ne)?($=K($),ie=K(ie)):O.indentNextLinePattern&&O.indentNextLinePattern.test(ne)&&($=K($)),M++;for(let J=M;J<=R;J++){const Q=P.getLineContent(J),re=k.getLeadingWhitespace(Q),de=$+Q.substring(re.length);O.decreaseIndentPattern&&O.decreaseIndentPattern.test(de)&&($=F($),ie=F(ie)),re!==$&&q.push(S.EditOperation.replaceMove(new _.Selection(J,1,J,re.length+1),(0,r.normalizeIndentation)($,W,V))),!(O.unIndentedLinePattern&&O.unIndentedLinePattern.test(Q))&&(O.increaseIndentPattern&&O.increaseIndentPattern.test(de)?(ie=K(ie),$=ie):O.indentNextLinePattern&&O.indentNextLinePattern.test(de)?$=K($):$=ie)}return q}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(N,M){const R=M.getModel();if(!R)return;const x=R.getOptions(),O=M.getSelection();if(!O)return;const B=new T(O,x.tabSize);M.pushUndoStop(),M.executeCommands(this.id,[B]),M.pushUndoStop(),R.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(N,M){const R=M.getModel();if(!R)return;const x=R.getOptions(),O=M.getSelection();if(!O)return;const B=new A(O,x.tabSize);M.pushUndoStop(),M.executeCommands(this.id,[B]),M.pushUndoStop(),R.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=d,d.ID="editor.action.indentationToTabs";class s extends y.EditorAction{constructor(N,M,R){super(R),this.insertSpaces=N,this.displaySizeOnly=M}run(N,M){const R=N.get(t.IQuickInputService),x=N.get(a.IModelService),O=M.getModel();if(!O)return;const B=x.getCreationOptions(O.getLanguageId(),O.uri,O.isForSimpleWidget),W=O.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})),K=Math.min(O.getOptions().tabSize-1,7);setTimeout(()=>{R.pick(V,{placeHolder:n.localize(5,null),activeItem:V[K]}).then(F=>{if(F&&O&&!O.isDisposed()){const q=parseInt(F.label,10);this.displaySizeOnly?O.updateOptions({tabSize:q}):O.updateOptions({tabSize:q,indentSize:q,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=s;class l extends s{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 o extends s{constructor(){super(!0,!1,{id:o.ID,label:n.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=o,o.ID="editor.action.indentUsingSpaces";class g extends s{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(N,M){const R=N.get(a.IModelService),x=M.getModel();if(!x)return;const O=R.getCreationOptions(x.getLanguageId(),x.uri,x.isForSimpleWidget);x.detectIndentation(O.insertSpaces,O.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(N,M){const R=N.get(b.ILanguageConfigurationService),x=M.getModel();if(!x)return;const O=f(x,R,1,x.getLineCount());O.length>0&&(M.pushUndoStop(),M.executeEdits(this.id,O),M.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(N,M){const R=N.get(b.ILanguageConfigurationService),x=M.getModel();if(!x)return;const O=M.getSelections();if(O===null)return;const B=[];for(const W of O){let V=W.startLineNumber,K=W.endLineNumber;if(V!==K&&W.endColumn===1&&K--,V===1){if(V===K)continue}else V--;const F=f(x,R,V,K);B.push(...F)}B.length>0&&(M.pushUndoStop(),M.executeEdits(this.id,B),M.pushUndoStop())}}e.ReindentSelectedLinesAction=C;class w{constructor(N,M){this._initialSelection=M,this._edits=[],this._selectionId=null;for(const R of N)R.range&&typeof R.text=="string"&&this._edits.push(R)}getEditOperations(N,M){for(const x of this._edits)M.addEditOperation(p.Range.lift(x.range),x.text);let R=!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?(R=!0,this._selectionId=M.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(R=!0,this._selectionId=M.trackSelection(this._initialSelection,!1))),R||(this._selectionId=M.trackSelection(this._initialSelection))}computeCursorState(N,M){return M.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=w;let D=class{constructor(N,M){this.editor=N,this._languageConfigurationService=M,this.callOnDispose=new L.DisposableStore,this.callOnModel=new L.DisposableStore,this.callOnDispose.add(N.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(N.onDidChangeModel(()=>this.update())),this.callOnDispose.add(N.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:N})=>{this.trigger(N)}))}trigger(N){const M=this.editor.getSelections();if(M===null||M.length>1)return;const R=this.editor.getModel();if(!R||!R.tokenization.isCheapToTokenize(N.getStartPosition().lineNumber))return;const x=this.editor.getOption(12),{tabSize:O,indentSize:B,insertSpaces:W}=R.getOptions(),V=[],K={shiftIndent:ae=>E.ShiftCommand.shiftIndent(ae,ae.length+1,O,B,W),unshiftIndent:ae=>E.ShiftCommand.unshiftIndent(ae,ae.length+1,O,B,W)};let F=N.startLineNumber;for(;F<=N.endLineNumber;){if(this.shouldIgnoreLine(R,F)){F++;continue}break}if(F>N.endLineNumber)return;let q=R.getLineContent(F);if(!/\S/.test(q.substring(0,N.startColumn-1))){const ae=(0,u.getGoodIndentForLine)(x,R,R.getLanguageId(),F,K,this._languageConfigurationService);if(ae!==null){const ne=k.getLeadingWhitespace(q),$=i.getSpaceCnt(ae,O),J=i.getSpaceCnt(ne,O);if($!==J){const Q=i.generateIndent($,O,W);V.push({range:new p.Range(F,1,F,ne.length+1),text:Q}),q=Q+q.substr(ne.length)}else{const Q=(0,u.getIndentMetadata)(R,F,this._languageConfigurationService);if(Q===0||Q===8)return}}}const ie=F;for(;F<N.endLineNumber;){if(!/\S/.test(R.getLineContent(F+1))){F++;continue}break}if(F!==N.endLineNumber){const ae={tokenization:{getLineTokens:$=>R.tokenization.getLineTokens($),getLanguageId:()=>R.getLanguageId(),getLanguageIdAtPosition:($,J)=>R.getLanguageIdAtPosition($,J)},getLineContent:$=>$===ie?q:R.getLineContent($)},ne=(0,u.getGoodIndentForLine)(x,ae,R.getLanguageId(),F+1,K,this._languageConfigurationService);if(ne!==null){const $=i.getSpaceCnt(ne,O),J=i.getSpaceCnt(k.getLeadingWhitespace(R.getLineContent(F+1)),O);if($!==J){const Q=$-J;for(let re=F+1;re<=N.endLineNumber;re++){const de=R.getLineContent(re),he=k.getLeadingWhitespace(de),X=i.getSpaceCnt(he,O)+Q,U=i.generateIndent(X,O,W);U!==he&&V.push({range:new p.Range(re,1,re,he.length+1),text:U})}}}}if(V.length>0){this.editor.pushUndoStop();const ae=new w(V,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",ae),this.editor.pushUndoStop()}}shouldIgnoreLine(N,M){N.tokenization.forceTokenization(M);const R=N.getLineFirstNonWhitespaceColumn(M);if(R===0)return!0;const x=N.tokenization.getLineTokens(M);if(x.getCount()>0){const O=x.findTokenIndexAtOffset(R);if(O>=0&&x.getStandardTokenType(O)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=D,D.ID="editor.contrib.autoIndentOnPaste",e.AutoIndentOnPaste=D=ke([ge(1,b.ILanguageConfigurationService)],D);function I(P,N,M,R){if(P.getLineCount()===1&&P.getLineMaxColumn(1)===1)return;let x="";for(let B=0;B<M;B++)x+=" ";const O=new RegExp(x,"gi");for(let B=1,W=P.getLineCount();B<=W;B++){let V=P.getLineFirstNonWhitespaceColumn(B);if(V===0&&(V=P.getLineMaxColumn(B)),V===1)continue;const K=new p.Range(B,1,B,V),F=P.getValueInRange(K),q=R?F.replace(/\t/ig,x):F.replace(O," ");N.addEditOperation(K,q)}}class T{constructor(N,M){this.selection=N,this.tabSize=M,this.selectionId=null}getEditOperations(N,M){this.selectionId=M.trackSelection(this.selection),I(N,M,this.tabSize,!0)}computeCursorState(N,M){return M.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=T;class A{constructor(N,M){this.selection=N,this.tabSize=M,this.selectionId=null}getEditOperations(N,M){this.selectionId=M.trackSelection(this.selection),I(N,M,this.tabSize,!1)}computeCursorState(N,M){return M.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=A,(0,y.registerEditorContribution)(D.ID,D,2),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(d),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(g),(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(C)}),define(se[821],oe([1,0,16,208,21,698]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpandLineSelectionAction=void 0;class S extends L.EditorAction{constructor(){super({id:"expandLineSelection",label:E.localize(0,null),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:y.EditorContextKeys.textInputFocus,primary:2090}})}run(_,v,b){if(b=b||{},!v.hasModel())return;const a=v._getViewModel();a.model.pushStackElement(),a.setCursorStates(b.source,3,k.CursorMoveCommands.expandLineSelection(a,a.getCursorStates())),a.revealPrimaryCursor(b.source,!0)}}e.ExpandLineSelectionAction=S,(0,L.registerEditorAction)(S)}),define(se[822],oe([1,0,65,191,16,130,500,251,74,10,5,24,21,560,798,561,699,30,32]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=e.CamelCaseAction=e.SnakeCaseAction=e.TitleCaseAction=e.LowerCaseAction=e.UpperCaseAction=e.AbstractCaseAction=e.TransposeAction=e.JoinLinesAction=e.DeleteAllRightAction=e.DeleteAllLeftAction=e.AbstractDeleteAllToBoundaryAction=e.InsertLineAfterAction=e.InsertLineBeforeAction=e.IndentLinesAction=e.DeleteLinesAction=e.TrimTrailingWhitespaceAction=e.DeleteDuplicateLinesAction=e.SortLinesDescendingAction=e.SortLinesAscendingAction=e.AbstractSortLinesAction=e.DuplicateSelectionAction=void 0;class d extends y.EditorAction{constructor(re,de){super(de),this.down=re}run(re,de){if(!de.hasModel())return;const he=de.getSelections().map((U,G)=>({selection:U,index:G,ignore:!1}));he.sort((U,G)=>b.Range.compareRangesUsingStarts(U.selection,G.selection));let me=he[0];for(let U=1;U<he.length;U++){const G=he[U];me.selection.endLineNumber===G.selection.startLineNumber&&(me.index<G.index?G.ignore=!0:(me.ignore=!0,me=G))}const X=[];for(const U of he)X.push(new n.CopyLinesCommand(U.selection,this.down,U.ignore));de.pushUndoStop(),de.executeCommands(this.id,X),de.pushUndoStop()}}class s extends d{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:u.localize(0,null),alias:"Copy Line Up",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:u.localize(1,null),order:1}})}}class l extends d{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:u.localize(2,null),alias:"Copy Line Down",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:u.localize(3,null),order:2}})}}class o extends y.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:u.localize(4,null),alias:"Duplicate Selection",precondition:i.EditorContextKeys.writable,menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:u.localize(5,null),order:5}})}run(re,de,he){if(!de.hasModel())return;const me=[],X=de.getSelections(),U=de.getModel();for(const G of X)if(G.isEmpty())me.push(new n.CopyLinesCommand(G,!0));else{const z=new a.Selection(G.endLineNumber,G.endColumn,G.endLineNumber,G.endColumn);me.push(new E.ReplaceCommandThatSelectsText(z,U.getValueInRange(G)))}de.pushUndoStop(),de.executeCommands(this.id,me),de.pushUndoStop()}}e.DuplicateSelectionAction=o;class g extends y.EditorAction{constructor(re,de){super(de),this.down=re}run(re,de){const he=re.get(c.ILanguageConfigurationService),me=[],X=de.getSelections()||[],U=de.getOption(12);for(const G of X)me.push(new t.MoveLinesCommand(G,this.down,U,he));de.pushUndoStop(),de.executeCommands(this.id,me),de.pushUndoStop()}}class h extends g{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:u.localize(6,null),alias:"Move Line Up",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:u.localize(7,null),order:3}})}}class m extends g{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:u.localize(8,null),alias:"Move Line Down",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"2_line",title:u.localize(9,null),order:4}})}}class C extends y.EditorAction{constructor(re,de){super(de),this.descending=re}run(re,de){const he=de.getSelections()||[];for(const X of he)if(!r.SortLinesCommand.canRun(de.getModel(),X,this.descending))return;const me=[];for(let X=0,U=he.length;X<U;X++)me[X]=new r.SortLinesCommand(he[X],this.descending);de.pushUndoStop(),de.executeCommands(this.id,me),de.pushUndoStop()}}e.AbstractSortLinesAction=C;class w extends C{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:u.localize(10,null),alias:"Sort Lines Ascending",precondition:i.EditorContextKeys.writable})}}e.SortLinesAscendingAction=w;class D extends C{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:u.localize(11,null),alias:"Sort Lines Descending",precondition:i.EditorContextKeys.writable})}}e.SortLinesDescendingAction=D;class I extends y.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:u.localize(12,null),alias:"Delete Duplicate Lines",precondition:i.EditorContextKeys.writable})}run(re,de){if(!de.hasModel())return;const he=de.getModel();if(he.getLineCount()===1&&he.getLineMaxColumn(1)===1)return;const me=[],X=[];let U=0;for(const G of de.getSelections()){const z=new Set,H=[];for(let ee=G.startLineNumber;ee<=G.endLineNumber;ee++){const le=he.getLineContent(ee);z.has(le)||(H.push(le),z.add(le))}const Y=new a.Selection(G.startLineNumber,1,G.endLineNumber,he.getLineMaxColumn(G.endLineNumber)),j=G.startLineNumber-U,Z=new a.Selection(j,1,j+H.length-1,H[H.length-1].length);me.push(_.EditOperation.replace(Y,H.join(`
|
||
`))),X.push(Z),U+=G.endLineNumber-G.startLineNumber+1-H.length}de.pushUndoStop(),de.executeEdits(this.id,me,X),de.pushUndoStop()}}e.DeleteDuplicateLinesAction=I;class T extends y.EditorAction{constructor(){super({id:T.ID,label:u.localize(13,null),alias:"Trim Trailing Whitespace",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2102),weight:100}})}run(re,de,he){let me=[];he.reason==="auto-save"&&(me=(de.getSelections()||[]).map(G=>new v.Position(G.positionLineNumber,G.positionColumn)));const X=de.getSelection();if(X===null)return;const U=new S.TrimTrailingWhitespaceCommand(X,me);de.pushUndoStop(),de.executeCommands(this.id,[U]),de.pushUndoStop()}}e.TrimTrailingWhitespaceAction=T,T.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(re,de){if(!de.hasModel())return;const he=this._getLinesToRemove(de),me=de.getModel();if(me.getLineCount()===1&&me.getLineMaxColumn(1)===1)return;let X=0;const U=[],G=[];for(let z=0,H=he.length;z<H;z++){const Y=he[z];let j=Y.startLineNumber,Z=Y.endLineNumber,ee=1,le=me.getLineMaxColumn(Z);Z<me.getLineCount()?(Z+=1,le=1):j>1&&(j-=1,ee=me.getLineMaxColumn(j)),U.push(_.EditOperation.replace(new a.Selection(j,ee,Z,le),"")),G.push(new a.Selection(j-X,Y.positionColumn,j-X,Y.positionColumn)),X+=Y.endLineNumber-Y.startLineNumber+1}de.pushUndoStop(),de.executeEdits(this.id,U,G),de.pushUndoStop()}_getLinesToRemove(re){const de=re.getSelections().map(X=>{let U=X.endLineNumber;return X.startLineNumber<X.endLineNumber&&X.endColumn===1&&(U-=1),{startLineNumber:X.startLineNumber,selectionStartColumn:X.selectionStartColumn,endLineNumber:U,positionColumn:X.positionColumn}});de.sort((X,U)=>X.startLineNumber===U.startLineNumber?X.endLineNumber-U.endLineNumber:X.startLineNumber-U.startLineNumber);const he=[];let me=de[0];for(let X=1;X<de.length;X++)me.endLineNumber+1>=de[X].startLineNumber?me.endLineNumber=de[X].endLineNumber:(he.push(me),me=de[X]);return he.push(me),he}}e.DeleteLinesAction=A;class P 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(re,de){const he=de._getViewModel();he&&(de.pushUndoStop(),de.executeCommands(this.id,p.TypeOperations.indent(he.cursorConfig,de.getModel(),de.getSelections())),de.pushUndoStop())}}e.IndentLinesAction=P;class N 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(re,de){k.CoreEditingCommands.Outdent.runEditorCommand(re,de,null)}}class M 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(re,de){const he=de._getViewModel();he&&(de.pushUndoStop(),de.executeCommands(this.id,p.TypeOperations.lineInsertBefore(he.cursorConfig,de.getModel(),de.getSelections())))}}e.InsertLineBeforeAction=M;class R 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(re,de){const he=de._getViewModel();he&&(de.pushUndoStop(),de.executeCommands(this.id,p.TypeOperations.lineInsertAfter(he.cursorConfig,de.getModel(),de.getSelections())))}}e.InsertLineAfterAction=R;class x extends y.EditorAction{run(re,de){if(!de.hasModel())return;const he=de.getSelection(),me=this._getRangesToDelete(de),X=[];for(let z=0,H=me.length-1;z<H;z++){const Y=me[z],j=me[z+1];b.Range.intersectRanges(Y,j)===null?X.push(Y):me[z+1]=b.Range.plusRange(Y,j)}X.push(me[me.length-1]);const U=this._getEndCursorState(he,X),G=X.map(z=>_.EditOperation.replace(z,""));de.pushUndoStop(),de.executeEdits(this.id,G,U),de.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=x;class O 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(re,de){let he=null;const me=[];let X=0;return de.forEach(U=>{let G;if(U.endColumn===1&&X>0){const z=U.startLineNumber-X;G=new a.Selection(z,U.startColumn,z,U.startColumn)}else G=new a.Selection(U.startLineNumber,U.startColumn,U.startLineNumber,U.startColumn);X+=U.endLineNumber-U.startLineNumber,U.intersectRanges(re)?he=G:me.push(G)}),he&&me.unshift(he),me}_getRangesToDelete(re){const de=re.getSelections();if(de===null)return[];let he=de;const me=re.getModel();return me===null?[]:(he.sort(b.Range.compareRangesUsingStarts),he=he.map(X=>{if(X.isEmpty())if(X.startColumn===1){const U=Math.max(1,X.startLineNumber-1),G=X.startLineNumber===1?1:me.getLineLength(U)+1;return new b.Range(U,G,X.startLineNumber,1)}else return new b.Range(X.startLineNumber,1,X.startLineNumber,X.startColumn);else return new b.Range(X.startLineNumber,1,X.endLineNumber,X.endColumn)}),he)}}e.DeleteAllLeftAction=O;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(re,de){let he=null;const me=[];for(let X=0,U=de.length,G=0;X<U;X++){const z=de[X],H=new a.Selection(z.startLineNumber-G,z.startColumn,z.startLineNumber-G,z.startColumn);z.intersectRanges(re)?he=H:me.push(H)}return he&&me.unshift(he),me}_getRangesToDelete(re){const de=re.getModel();if(de===null)return[];const he=re.getSelections();if(he===null)return[];const me=he.map(X=>{if(X.isEmpty()){const U=de.getLineMaxColumn(X.startLineNumber);return X.startColumn===U?new b.Range(X.startLineNumber,X.startColumn,X.startLineNumber+1,1):new b.Range(X.startLineNumber,X.startColumn,X.startLineNumber,U)}return X});return me.sort(b.Range.compareRangesUsingStarts),me}}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(re,de){const he=de.getSelections();if(he===null)return;let me=de.getSelection();if(me===null)return;he.sort(b.Range.compareRangesUsingStarts);const X=[],U=he.reduce((Z,ee)=>Z.isEmpty()?Z.endLineNumber===ee.startLineNumber?(me.equalsSelection(Z)&&(me=ee),ee):ee.startLineNumber>Z.endLineNumber+1?(X.push(Z),ee):new a.Selection(Z.startLineNumber,Z.startColumn,ee.endLineNumber,ee.endColumn):ee.startLineNumber>Z.endLineNumber?(X.push(Z),ee):new a.Selection(Z.startLineNumber,Z.startColumn,ee.endLineNumber,ee.endColumn));X.push(U);const G=de.getModel();if(G===null)return;const z=[],H=[];let Y=me,j=0;for(let Z=0,ee=X.length;Z<ee;Z++){const le=X[Z],ue=le.startLineNumber,ce=1;let pe=0,ve,Ce;const Se=G.getLineLength(le.endLineNumber)-le.endColumn;if(le.isEmpty()||le.startLineNumber===le.endLineNumber){const Ae=le.getStartPosition();Ae.lineNumber<G.getLineCount()?(ve=ue+1,Ce=G.getLineMaxColumn(ve)):(ve=Ae.lineNumber,Ce=G.getLineMaxColumn(Ae.lineNumber))}else ve=le.endLineNumber,Ce=G.getLineMaxColumn(ve);let _e=G.getLineContent(ue);for(let Ae=ue+1;Ae<=ve;Ae++){const xe=G.getLineContent(Ae),Be=G.getLineFirstNonWhitespaceColumn(Ae);if(Be>=1){let De=!0;_e===""&&(De=!1),De&&(_e.charAt(_e.length-1)===" "||_e.charAt(_e.length-1)===" ")&&(De=!1,_e=_e.replace(/[\s\uFEFF\xA0]+$/g," "));const Ie=xe.substr(Be-1);_e+=(De?" ":"")+Ie,De?pe=Ie.length+1:pe=Ie.length}else pe=0}const Ee=new b.Range(ue,ce,ve,Ce);if(!Ee.isEmpty()){let Ae;le.isEmpty()?(z.push(_.EditOperation.replace(Ee,_e)),Ae=new a.Selection(Ee.startLineNumber-j,_e.length-pe+1,ue-j,_e.length-pe+1)):le.startLineNumber===le.endLineNumber?(z.push(_.EditOperation.replace(Ee,_e)),Ae=new a.Selection(le.startLineNumber-j,le.startColumn,le.endLineNumber-j,le.endColumn)):(z.push(_.EditOperation.replace(Ee,_e)),Ae=new a.Selection(le.startLineNumber-j,le.startColumn,le.startLineNumber-j,_e.length-Se)),b.Range.intersectRanges(Ee,me)!==null?Y=Ae:H.push(Ae)}j+=Ee.endLineNumber-Ee.startLineNumber}H.unshift(Y),de.pushUndoStop(),de.executeEdits(this.id,z,H),de.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(re,de){const he=de.getSelections();if(he===null)return;const me=de.getModel();if(me===null)return;const X=[];for(let U=0,G=he.length;U<G;U++){const z=he[U];if(!z.isEmpty())continue;const H=z.getStartPosition(),Y=me.getLineMaxColumn(H.lineNumber);if(H.column>=Y){if(H.lineNumber===me.getLineCount())continue;const j=new b.Range(H.lineNumber,Math.max(1,H.column-1),H.lineNumber+1,1),Z=me.getValueInRange(j).split("").reverse().join("");X.push(new E.ReplaceCommand(new a.Selection(H.lineNumber,Math.max(1,H.column-1),H.lineNumber+1,1),Z))}else{const j=new b.Range(H.lineNumber,Math.max(1,H.column-1),H.lineNumber,H.column+1),Z=me.getValueInRange(j).split("").reverse().join("");X.push(new E.ReplaceCommandThatPreservesSelection(j,Z,new a.Selection(H.lineNumber,H.column+1,H.lineNumber,H.column+1)))}}de.pushUndoStop(),de.executeCommands(this.id,X),de.pushUndoStop()}}e.TransposeAction=V;class K extends y.EditorAction{run(re,de){const he=de.getSelections();if(he===null)return;const me=de.getModel();if(me===null)return;const X=de.getOption(129),U=[];for(const G of he)if(G.isEmpty()){const z=G.getStartPosition(),H=de.getConfiguredWordAtPosition(z);if(!H)continue;const Y=new b.Range(z.lineNumber,H.startColumn,z.lineNumber,H.endColumn),j=me.getValueInRange(Y);U.push(_.EditOperation.replace(Y,this._modifyText(j,X)))}else{const z=me.getValueInRange(G);U.push(_.EditOperation.replace(G,this._modifyText(z,X)))}de.pushUndoStop(),de.executeEdits(this.id,U),de.pushUndoStop()}}e.AbstractCaseAction=K;class F extends K{constructor(){super({id:"editor.action.transformToUppercase",label:u.localize(23,null),alias:"Transform to Uppercase",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){return re.toLocaleUpperCase()}}e.UpperCaseAction=F;class q extends K{constructor(){super({id:"editor.action.transformToLowercase",label:u.localize(24,null),alias:"Transform to Lowercase",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){return re.toLocaleLowerCase()}}e.LowerCaseAction=q;class ie{constructor(re,de){this._pattern=re,this._flags=de,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 ae extends K{constructor(){super({id:"editor.action.transformToTitlecase",label:u.localize(25,null),alias:"Transform to Title Case",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){const he=ae.titleBoundary.get();return he?re.toLocaleLowerCase().replace(he,me=>me.toLocaleUpperCase()):re}}e.TitleCaseAction=ae,ae.titleBoundary=new ie("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class ne extends K{constructor(){super({id:"editor.action.transformToSnakecase",label:u.localize(26,null),alias:"Transform to Snake Case",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){const he=ne.caseBoundary.get(),me=ne.singleLetters.get();return!he||!me?re:re.replace(he,"$1_$2").replace(me,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=ne,ne.caseBoundary=new ie("(\\p{Ll})(\\p{Lu})","gmu"),ne.singleLetters=new ie("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class $ extends K{constructor(){super({id:"editor.action.transformToCamelcase",label:u.localize(27,null),alias:"Transform to Camel Case",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){const he=$.wordBoundary.get();if(!he)return re;const me=re.split(he);return me.shift()+me.map(U=>U.substring(0,1).toLocaleUpperCase()+U.substring(1)).join("")}}e.CamelCaseAction=$,$.wordBoundary=new ie("[_\\s-]","gm");class J extends K{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(de=>de.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:u.localize(28,null),alias:"Transform to Kebab Case",precondition:i.EditorContextKeys.writable})}_modifyText(re,de){const he=J.caseBoundary.get(),me=J.singleLetters.get(),X=J.underscoreBoundary.get();return!he||!me||!X?re:re.replace(X,"$1-$3").replace(he,"$1-$2").replace(me,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=J,J.caseBoundary=new ie("(\\p{Ll})(\\p{Lu})","gmu"),J.singleLetters=new ie("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),J.underscoreBoundary=new ie("(\\S)(_)(\\S)","gm"),(0,y.registerEditorAction)(s),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(m),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(D),(0,y.registerEditorAction)(I),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(P),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(B),(0,y.registerEditorAction)(W),(0,y.registerEditorAction)(V),(0,y.registerEditorAction)(F),(0,y.registerEditorAction)(q),ne.caseBoundary.isSupported()&&ne.singleLetters.isSupported()&&(0,y.registerEditorAction)(ne),$.wordBoundary.isSupported()&&(0,y.registerEditorAction)($),ae.titleBoundary.isSupported()&&(0,y.registerEditorAction)(ae),J.isSupported()&&(0,y.registerEditorAction)(J)}),define(se[823],oe([1,0,2,16]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends L.Disposable{constructor(S){super(),this._editor=S,this._register(this._editor.onMouseDown(p=>{const _=this._editor.getOption(116);_>=0&&p.target.type===6&&p.target.position.column>=_&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}y.ID="editor.contrib.longLinesHelper",(0,k.registerEditorContribution)(y.ID,y,2)}),define(se[166],oe([1,0,186,48,6,58,2,16,5,104,702,15,57,7,472]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let r=t=class{static get(d){return d.getContribution(t.ID)}constructor(d,s,l){this._openerService=l,this._messageWidget=new S.MutableDisposable,this._messageListeners=new S.DisposableStore,this._mouseOverMessage=!1,this._editor=d,this._visible=t.MESSAGE_VISIBLE.bindTo(s)}dispose(){var d;(d=this._message)===null||d===void 0||d.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(d,s){(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:o=>{this.closeMessage(),(0,v.openLinkFromMarkdown)(this._openerService,o,(0,E.isMarkdownString)(d)?d.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new f(this._editor,s,typeof d=="string"?d:this._message.element),this._messageListeners.add(y.Event.debounce(this._editor.onDidBlurEditorText,(o,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(o=>{o.target.position&&(l?l.containsPosition(o.target.position)||this.closeMessage():l=new _.Range(s.lineNumber-3,1,o.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=r,r.ID="editor.contrib.messageController",r.MESSAGE_VISIBLE=new a.RawContextKey("messageVisible",!1,b.localize(0,null)),e.MessageController=r=t=ke([ge(1,a.IContextKeyService),ge(2,i.IOpenerService)],r);const u=p.EditorCommand.bindToContribution(r.get);(0,p.registerEditorCommand)(new u({id:"leaveEditorMessage",precondition:r.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class f{static fadeOut(d){const s=()=>{d.dispose(),clearTimeout(l),d.getDomNode().removeEventListener("animationend",s)},l=setTimeout(s,110);return d.getDomNode().addEventListener("animationend",s),d.getDomNode().classList.add("fadeOut"),{dispose:s}}constructor(d,{lineNumber:s,column:l},o){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=d,this._editor.revealLinesInCenterIfOutsideViewport(s,s,0),this._position={lineNumber:s,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 o=="string"?(h.classList.add("message"),h.textContent=o):(o.classList.add("message"),h.appendChild(o)),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)(r.ID,r,4)}),define(se[824],oe([1,0,58,2,16,166,709]),function(te,e,L,k,y,E,S){"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(S.localize(0,null)):b=new L.MarkdownString(S.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(se[825],oe([1,0,13,19,12,16,10,5,24,21,309,562,712,30,25,18,68,20,22]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class s{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 s(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 P;if(!(!L.isNonEmptyArray(A)||A.length!==D.length)&&!(!this._editor.hasModel()||!L.equals(this._editor.getSelections(),D,(N,M)=>N.equalsSelection(M)))){for(let N=0;N<A.length;N++)A[N]=A[N].filter(M=>M.containsPosition(D[N].getStartPosition())&&M.containsPosition(D[N].getEndPosition())),A[N].unshift(D[N]);this._state=A.map(N=>new s(0,N)),(P=this._selectionListener)===null||P===void 0||P.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var N;this._ignoreSelection||((N=this._selectionListener)===null||N===void 0||N.dispose(),this._state=void 0)})}}),!this._state)return;this._state=this._state.map(A=>A.mov(w));const T=this._state.map(A=>_.Selection.fromPositions(A.ranges[A.index].getStartPosition(),A.ranges[A.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(T)}finally{this._ignoreSelection=!1}}};e.SmartSelectController=l,l.ID="editor.contrib.smartSelectController",e.SmartSelectController=l=d=ke([ge(1,r.ILanguageFeaturesService)],l);class o 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 o{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 o{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,T){const A=C.all(w).concat(new a.WordSelectionRangeProvider(I.selectSubwords));A.length===1&&A.unshift(new b.BracketSelectionRangeProvider);const P=[],N=[];for(const M of A)P.push(Promise.resolve(M.provideSelectionRanges(w,D,T)).then(R=>{if(L.isNonEmptyArray(R)&&R.length===D.length)for(let x=0;x<D.length;x++){N[x]||(N[x]=[]);for(const O of R[x])p.Range.isIRange(O.range)&&p.Range.containsPosition(O.range,D[x])&&N[x].push(p.Range.lift(O.range))}},y.onUnexpectedExternalError));return await Promise.all(P),N.map(M=>{if(M.length===0)return[];M.sort((B,W)=>S.Position.isBefore(B.getStartPosition(),W.getStartPosition())?1:S.Position.isBefore(W.getStartPosition(),B.getStartPosition())||S.Position.isBefore(B.getEndPosition(),W.getEndPosition())?-1:S.Position.isBefore(W.getEndPosition(),B.getEndPosition())?1:0);const R=[];let x;for(const B of M)(!x||p.Range.containsRange(B,x)&&!p.Range.equalsRange(B,x))&&(R.push(B),x=B);if(!I.selectLeadingAndTrailingWhitespace)return R;const O=[R[0]];for(let B=1;B<R.length;B++){const W=R[B-1],V=R[B];if(V.startLineNumber!==W.startLineNumber||V.endLineNumber!==W.endLineNumber){const K=new p.Range(W.startLineNumber,w.getLineFirstNonWhitespaceColumn(W.startLineNumber),W.endLineNumber,w.getLineLastNonWhitespaceColumn(W.endLineNumber));K.containsRange(W)&&!K.equalsRange(W)&&V.containsRange(K)&&!V.equalsRange(K)&&O.push(K);const F=new p.Range(W.startLineNumber,1,W.endLineNumber,w.getLineMaxColumn(W.endLineNumber));F.containsRange(W)&&!F.equalsRange(K)&&V.containsRange(F)&&!V.equalsRange(F)&&O.push(F)}O.push(V)}return O})}e.provideSelectionRanges=m,t.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",async function(C,...w){const[D,I]=w;(0,f.assertType)(c.URI.isUri(D));const T=C.get(r.ILanguageFeaturesService).selectionRangeProvider,A=await C.get(u.ITextModelService).createModelReference(D);try{return m(T,A.object.textEditorModel,I,{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},k.CancellationToken.None)}finally{A.dispose()}})}),define(se[826],oe([1,0,61,16,724]),function(te,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,_){if(!_.hasModel())return;const v=_.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(se[827],oe([1,0,2,49,16,33,726,162]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const _="ignoreUnusualLineTerminators";function v(i,n,t){i.setModelProperty(n.uri,_,t)}function b(i,n){return i.getModelProperty(n.uri,_)}let a=class extends L.Disposable{constructor(n,t,r){super(),this._editor=n,this._dialogService=t,this._codeEditorService=r,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 r;try{this._isPresentingDialog=!0,r=await this._dialogService.confirm({title:S.localize(0,null),message:S.localize(1,null),detail:S.localize(2,null,(0,k.basename)(n.uri)),primaryButton:S.localize(3,null),cancelButton:S.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!r.confirmed){v(this._codeEditorService,n,!0);return}n.removeUnusualLineTerminators(this._editor.getSelections())}};e.UnusualLineTerminatorsDetector=a,a.ID="editor.contrib.unusualLineTerminatorsDetector",e.UnusualLineTerminatorsDetector=a=ke([ge(1,p.IDialogService),ge(2,E.ICodeEditorService)],a),(0,y.registerEditorContribution)(a.ID,a,1)}),define(se[364],oe([1,0,16,130,36,75,181,150,10,5,24,21,32,729,69,15,242]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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($,J,Q){if(!J.hasModel())return;const re=(0,p.getMapForWordSeparators)(J.getOption(129)),de=J.getModel(),me=J.getSelections().map(X=>{const U=new _.Position(X.positionLineNumber,X.positionColumn),G=this._move(re,de,U,this._wordNavigationType);return this._moveTo(X,G,this._inSelectionMode)});if(de.pushStackElement(),J._getViewModel().setCursorStates("moveWordCommand",3,me.map(X=>E.CursorState.fromModelSelection(X))),me.length===1){const X=new _.Position(me[0].positionLineNumber,me[0].positionColumn);J.revealPosition(X,0)}}_moveTo($,J,Q){return Q?new b.Selection($.selectionStartLineNumber,$.selectionStartColumn,J.lineNumber,J.column):new b.Selection(J.lineNumber,J.column,J.lineNumber,J.column)}}e.MoveWordCommand=f;class c extends f{_move($,J,Q,re){return S.WordOperations.moveWordLeft($,J,Q,re)}}e.WordLeftCommand=c;class d extends f{_move($,J,Q,re){return S.WordOperations.moveWordRight($,J,Q,re)}}e.WordRightCommand=d;class s extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=s;class l extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=l;class o extends c{constructor(){var $;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,($=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=o;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:r.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,($=r.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($,J,Q,re){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),J,Q,re)}}e.CursorWordAccessibilityLeft=C;class w extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move($,J,Q,re){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),J,Q,re)}}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:r.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,($=r.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 T extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class A extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=A;class P extends d{constructor(){var $;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(a.EditorContextKeys.textInputFocus,($=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||$===void 0?void 0:$.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=P;class N extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=N;class M extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move($,J,Q,re){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),J,Q,re)}}e.CursorWordAccessibilityRight=M;class R extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move($,J,Q,re){return super._move((0,p.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),J,Q,re)}}e.CursorWordAccessibilityRightSelect=R;class x extends L.EditorCommand{constructor($){super($),this._whitespaceHeuristics=$.whitespaceHeuristics,this._wordNavigationType=$.wordNavigationType}runEditorCommand($,J,Q){const re=$.get(i.ILanguageConfigurationService);if(!J.hasModel())return;const de=(0,p.getMapForWordSeparators)(J.getOption(129)),he=J.getModel(),me=J.getSelections(),X=J.getOption(6),U=J.getOption(11),G=re.getLanguageConfiguration(he.getLanguageId()).getAutoClosingPairs(),z=J._getViewModel(),H=me.map(Y=>{const j=this._delete({wordSeparators:de,model:he,selection:Y,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:J.getOption(9),autoClosingBrackets:X,autoClosingQuotes:U,autoClosingPairs:G,autoClosedCharacters:z.getCursorAutoClosedCharacters()},this._wordNavigationType);return new k.ReplaceCommand(j,"")});J.pushUndoStop(),J.executeCommands(this.id,H),J.pushUndoStop()}}e.DeleteWordCommand=x;class O extends x{_delete($,J){const Q=S.WordOperations.deleteWordLeft($,J);return Q||new v.Range(1,1,1,1)}}e.DeleteWordLeftCommand=O;class B extends x{_delete($,J){const Q=S.WordOperations.deleteWordRight($,J);if(Q)return Q;const re=$.model.getLineCount(),de=$.model.getLineMaxColumn(re);return new v.Range(re,de,re,de)}}e.DeleteWordRightCommand=B;class W extends O{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:a.EditorContextKeys.writable})}}e.DeleteWordStartLeft=W;class V extends O{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:a.EditorContextKeys.writable})}}e.DeleteWordEndLeft=V;class K extends O{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=K;class F extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:a.EditorContextKeys.writable})}}e.DeleteWordStartRight=F;class q extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:a.EditorContextKeys.writable})}}e.DeleteWordEndRight=q;class ie extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:a.EditorContextKeys.writable,kbOpts:{kbExpr:a.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=ie;class ae extends L.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:a.EditorContextKeys.writable,label:n.localize(0,null),alias:"Delete Word"})}run($,J,Q){if(!J.hasModel())return;const re=(0,p.getMapForWordSeparators)(J.getOption(129)),de=J.getModel(),me=J.getSelections().map(X=>{const U=S.WordOperations.deleteInsideWord(re,de,X);return new k.ReplaceCommand(U,"")});J.pushUndoStop(),J.executeCommands(this.id,me),J.pushUndoStop()}}e.DeleteInsideWord=ae,(0,L.registerEditorCommand)(new s),(0,L.registerEditorCommand)(new l),(0,L.registerEditorCommand)(new o),(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 T),(0,L.registerEditorCommand)(new A),(0,L.registerEditorCommand)(new P),(0,L.registerEditorCommand)(new N),(0,L.registerEditorCommand)(new C),(0,L.registerEditorCommand)(new w),(0,L.registerEditorCommand)(new M),(0,L.registerEditorCommand)(new R),(0,L.registerEditorCommand)(new W),(0,L.registerEditorCommand)(new V),(0,L.registerEditorCommand)(new K),(0,L.registerEditorCommand)(new F),(0,L.registerEditorCommand)(new q),(0,L.registerEditorCommand)(new ie),(0,L.registerEditorAction)(ae)}),define(se[828],oe([1,0,16,181,5,21,364,25]),function(te,e,L,k,y,E,S,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 _ extends S.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=_;class v extends S.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 s=f.model.getLineCount(),l=f.model.getLineMaxColumn(s);return new y.Range(s,l,s,l)}}e.DeleteWordPartRight=v;class b extends S.MoveWordCommand{_move(f,c,d,s){return k.WordPartOperations.moveWordPartLeft(f,c,d)}}e.WordPartLeftCommand=b;class a 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=a,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 S.MoveWordCommand{_move(f,c,d,s){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 r 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=r,(0,L.registerEditorCommand)(new _),(0,L.registerEditorCommand)(new v),(0,L.registerEditorCommand)(new a),(0,L.registerEditorCommand)(new i),(0,L.registerEditorCommand)(new t),(0,L.registerEditorCommand)(new r)}),define(se[829],oe([1,0,7,2,16,17,484]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class S 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=S,S.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)(S.ID,S,3)}),define(se[830],oe([1,0,7,39,2,16,31,132,160,43,137,96,485]),function(te,e,L,k,y,E,S,p,_,v,b,a){"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,s,l){super(),this._editor=d,this._languageService=l,this._widget=null,this._register(this._editor.onDidChangeModel(o=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(o=>this.stop())),this._register(S.TokenizationRegistry.onDidChange(o=>this.stop())),this._register(this._editor.onKeyUp(o=>o.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=ke([ge(1,b.IStandaloneThemeService),ge(2,v.ILanguageService)],n);class t extends E.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:a.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(d,s){const l=n.get(s);l?.launch()}}function r(c){let d="";for(let s=0,l=c.length;s<l;s++){const o=c.charCodeAt(s);switch(o){case 9:d+="\u2192";break;case 32:d+="\xB7";break;default:d+=String.fromCharCode(o)}}return d}function u(c,d){const s=S.TokenizationRegistry.get(d);if(s)return s;const l=c.encodeLanguageId(d);return{getInitialState:()=>_.NullState,tokenize:(o,g,h)=>(0,_.nullTokenize)(d,h),tokenizeEncoded:(o,g,h)=>(0,_.nullTokenizeEncoded)(l,h)}}class f extends y.Disposable{constructor(d,s){super(),this.allowEditorOverflow=!0,this._editor=d,this._languageService=s,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 s=this._getTokensAtLine(d.lineNumber);let l=0;for(let C=s.tokens1.length-1;C>=0;C--){const w=s.tokens1[C];if(d.column-1>=w.offset){l=C;break}}let o=0;for(let C=s.tokens2.length>>>1;C>=0;C--)if(d.column-1>=s.tokens2[C<<1]){o=C;break}const g=this._model.getLineContent(d.lineNumber);let h="";if(l<s.tokens1.length){const C=s.tokens1[l].offset,w=l+1<s.tokens1.length?s.tokens1[l+1].offset:g.length;h=g.substring(C,w)}(0,L.reset)(this._domNode,(0,L.$)("h2.tm-token",void 0,r(h),(0,L.$)("span.tm-token-length",void 0,`${h.length} ${h.length===1?"char":"chars"}`))),(0,L.append)(this._domNode,(0,L.$)("hr.tokens-inspect-separator",{style:"clear:both"}));const m=(o<<1)+1<s.tokens2.length?this._decodeMetadata(s.tokens2[(o<<1)+1]):null;(0,L.append)(this._domNode,(0,L.$)("table.tm-metadata-table",void 0,(0,L.$)("tbody",void 0,(0,L.$)("tr",void 0,(0,L.$)("td.tm-metadata-key",void 0,"language"),(0,L.$)("td.tm-metadata-value",void 0,`${m?m.languageId:"-?-"}`)),(0,L.$)("tr",void 0,(0,L.$)("td.tm-metadata-key",void 0,"token type"),(0,L.$)("td.tm-metadata-value",void 0,`${m?this._tokenTypeToString(m.tokenType):"-?-"}`)),(0,L.$)("tr",void 0,(0,L.$)("td.tm-metadata-key",void 0,"font style"),(0,L.$)("td.tm-metadata-value",void 0,`${m?this._fontStyleToString(m.fontStyle):"-?-"}`)),(0,L.$)("tr",void 0,(0,L.$)("td.tm-metadata-key",void 0,"foreground"),(0,L.$)("td.tm-metadata-value",void 0,`${m?k.Color.Format.CSS.formatHex(m.foreground):"-?-"}`)),(0,L.$)("tr",void 0,(0,L.$)("td.tm-metadata-key",void 0,"background"),(0,L.$)("td.tm-metadata-value",void 0,`${m?k.Color.Format.CSS.formatHex(m.background):"-?-"}`))))),(0,L.append)(this._domNode,(0,L.$)("hr.tokens-inspect-separator")),l<s.tokens1.length&&(0,L.append)(this._domNode,(0,L.$)("span.tm-token-type",void 0,s.tokens1[l].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(d){const s=S.TokenizationRegistry.getColorMap(),l=p.TokenMetadata.getLanguageId(d),o=p.TokenMetadata.getTokenType(d),g=p.TokenMetadata.getFontStyle(d),h=p.TokenMetadata.getForeground(d),m=p.TokenMetadata.getBackground(d);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(l),tokenType:o,fontStyle:g,foreground:s[h],background:s[m]}}_tokenTypeToString(d){switch(d){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 3:return"RegEx";default:return"??"}}_fontStyleToString(d){let s="";return d&1&&(s+="italic "),d&2&&(s+="bold "),d&4&&(s+="underline "),d&8&&(s+="strikethrough "),s.length===0&&(s="---"),s}_getTokensAtLine(d){const s=this._getStateBeforeLine(d),l=this._tokenizationSupport.tokenize(this._model.getLineContent(d),!0,s),o=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(d),!0,s);return{startState:s,tokens1:l.tokens,tokens2:o.tokens,endState:l.endState}}_getStateBeforeLine(d){let s=this._tokenizationSupport.getInitialState();for(let l=1;l<d;l++)s=this._tokenizationSupport.tokenize(this._model.getLineContent(l),!0,s).endState;return s}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}f._ID="editor.contrib.inspectTokensWidget",(0,E.registerEditorContribution)(n.ID,n,4),(0,E.registerEditorAction)(t)}),define(se[831],oe([1,0,580,12,71,108,2,53,407,746,25,27,162,8,34,787,92,81]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";var c,d;Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let s=c=class extends r.PickerQuickAccessProvider{constructor(g,h,m,C,w,D){super(c.PREFIX,g),this.instantiationService=h,this.keybindingService=m,this.commandService=C,this.telemetryService=w,this.dialogService=D,this.commandsHistory=this._register(this.instantiationService.createInstance(l)),this.options=g}async _getPicks(g,h,m,C){var w,D,I,T;const A=await this.getCommandPicks(m);if(m.isCancellationRequested)return[];const P=(0,E.createSingleCallFunction)(()=>{const W=new _.TfIdfCalculator;W.updateDocuments(A.map(K=>({key:K.commandId,textChunks:[this.getTfIdfChunk(K)]})));const V=W.calculateScores(g,m);return(0,_.normalizeTfIdfScores)(V).filter(K=>K.score>c.TFIDF_THRESHOLD).slice(0,c.TFIDF_MAX_RESULTS)}),N=[];for(const W of A){const V=(w=c.WORD_FILTER(g,W.label))!==null&&w!==void 0?w:void 0,K=W.commandAlias&&(D=c.WORD_FILTER(g,W.commandAlias))!==null&&D!==void 0?D:void 0;if(V||K)W.highlights={label:V,detail:this.options.showAlias?K:void 0},N.push(W);else if(g===W.commandId)N.push(W);else if(g.length>=3){const F=P();if(m.isCancellationRequested)return[];const q=F.find(ie=>ie.key===W.commandId);q&&(W.tfIdfScore=q.score,N.push(W))}}const M=new Map;for(const W of N){const V=M.get(W.label);V?(W.description=W.commandId,V.description=V.commandId):M.set(W.label,W)}N.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 K=this.commandsHistory.peek(W.commandId),F=this.commandsHistory.peek(V.commandId);if(K&&F)return K>F?-1:1;if(K)return-1;if(F)return 1;if(this.options.suggestedCommandIds){const q=this.options.suggestedCommandIds.has(W.commandId),ie=this.options.suggestedCommandIds.has(V.commandId);if(q&&ie)return 0;if(q)return-1;if(ie)return 1}return W.label.localeCompare(V.label)});const R=[];let x=!1,O=!0,B=!!this.options.suggestedCommandIds;for(let W=0;W<N.length;W++){const V=N[W];W===0&&this.commandsHistory.peek(V.commandId)&&(R.push({type:"separator",label:(0,v.localize)(0,null)}),x=!0),O&&V.tfIdfScore!==void 0&&(R.push({type:"separator",label:(0,v.localize)(1,null)}),O=!1),B&&V.tfIdfScore===void 0&&!this.commandsHistory.peek(V.commandId)&&(!((I=this.options.suggestedCommandIds)===null||I===void 0)&&I.has(V.commandId))&&(R.push({type:"separator",label:(0,v.localize)(2,null)}),x=!0,B=!1),x&&V.tfIdfScore===void 0&&!this.commandsHistory.peek(V.commandId)&&!(!((T=this.options.suggestedCommandIds)===null||T===void 0)&&T.has(V.commandId))&&(R.push({type:"separator",label:(0,v.localize)(3,null)}),x=!1),R.push(this.toCommandPick(V,C))}return this.hasAdditionalCommandPicks(g,m)?{picks:R,additionalPicks:(async()=>{var W;const V=await this.getAdditionalCommandPicks(A,N,g,m);if(m.isCancellationRequested)return[];const K=V.map(F=>this.toCommandPick(F,C));return O&&((W=K[0])===null||W===void 0?void 0:W.type)!=="separator"&&K.unshift({type:"separator",label:(0,v.localize)(4,null)}),K})()}:R}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=s,s.PREFIX=">",s.TFIDF_THRESHOLD=.5,s.TFIDF_MAX_RESULTS=5,s.WORD_FILTER=(0,y.or)(y.matchesPrefix,y.matchesWords,y.matchesContiguousSubString),e.AbstractCommandsQuickAccessProvider=s=c=ke([ge(1,n.IInstantiationService),ge(2,t.IKeybindingService),ge(3,b.ICommandService),ge(4,f.ITelemetryService),ge(5,i.IDialogService)],s);let l=d=class extends S.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=ke([ge(0,u.IStorageService),ge(1,a.IConfigurationService)],l)}),define(se[832],oe([1,0,126,831]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class y extends k.AbstractCommandsQuickAccessProvider{constructor(S,p,_,v,b,a){super(S,p,_,v,b,a)}getCodeEditorCommandPicks(){const S=this.activeTextEditorControl;if(!S)return[];const p=[];for(const _ of S.getSupportedActions())p.push({commandId:_.id,commandAlias:_.alias,label:(0,L.stripIcons)(_.label)||_.id});return p}}e.AbstractEditorCommandsQuickAccessProvider=y}),define(se[833],oe([1,0,37,139,96,33,832,8,34,25,81,162,16,21,70]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let r=class extends S.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){var c;return(c=this.codeEditorService.getFocusedCodeEditor())!==null&&c!==void 0?c:void 0}constructor(c,d,s,l,o,g){super({showAlias:!1},c,s,l,o,g),this.codeEditorService=d}async getCommandPicks(){return this.getCodeEditorCommandPicks()}hasAdditionalCommandPicks(){return!1}async getAdditionalCommandPicks(){return[]}};e.StandaloneCommandsQuickAccessProvider=r,e.StandaloneCommandsQuickAccessProvider=r=ke([ge(0,p.IInstantiationService),ge(1,E.ICodeEditorService),ge(2,_.IKeybindingService),ge(3,v.ICommandService),ge(4,b.ITelemetryService),ge(5,a.IDialogService)],r);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(r.PREFIX)}}e.GotoLineAction=u,u.ID="editor.action.quickCommand",(0,i.registerEditorAction)(u),L.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:r,prefix:r.PREFIX,helpEntries:[{description:y.QuickCommandNLS.quickCommandHelp,commandId:u.ID}]})}),define(se[29],oe([1,0,90,14,39,6,752,245,37]),function(te,e,L,k,y,E,S,p,_){"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.listDropBetweenBackground=e.listDropOverBackground=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.editorStickyScrollShadow=e.editorStickyScrollBorder=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 a(A,P){return`var(${v(A)}, ${P})`}e.asCssVariableWithDefault=a,e.Extensions={ColorContribution:"base.contributions.colors"};class i{constructor(){this._onDidChangeSchema=new E.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(P,N,M,R=!1,x){const O={id:P,description:M,defaults:N,needsTransparency:R,deprecationMessage:x};this.colorsById[P]=O;const B={type:"string",description:M,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return x&&(B.deprecationMessage=x),R&&(B.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",B.patternErrorMessage="This color must be transparent or it will obscure content"),this.colorSchema.properties[P]=B,this.colorReferenceSchema.enum.push(P),this.colorReferenceSchema.enumDescriptions.push(M),this._onDidChangeSchema.fire(),P}getColors(){return Object.keys(this.colorsById).map(P=>this.colorsById[P])}resolveDefaultColor(P,N){const M=this.colorsById[P];if(M&&M.defaults){const R=M.defaults[N.type];return D(R,N)}}getColorSchema(){return this.colorSchema}toString(){const P=(N,M)=>{const R=N.indexOf(".")===-1?0:1,x=M.indexOf(".")===-1?0:1;return R!==x?R-x:N.localeCompare(M)};return Object.keys(this.colorsById).sort(P).map(N=>`- \`${N}\`: ${this.colorsById[N].description}`).join(`
|
||
`)}}const n=new i;_.Registry.add(e.Extensions.ColorContribution,n);function t(A,P,N,M,R){return n.registerColor(A,P,N,M,R)}e.registerColor=t,e.foreground=t("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},S.localize(0,null)),e.disabledForeground=t("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},S.localize(1,null)),e.errorForeground=t("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},S.localize(2,null)),e.descriptionForeground=t("descriptionForeground",{light:"#717171",dark:h(e.foreground,.7),hcDark:h(e.foreground,.7),hcLight:h(e.foreground,.7)},S.localize(3,null)),e.iconForeground=t("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},S.localize(4,null)),e.focusBorder=t("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},S.localize(5,null)),e.contrastBorder=t("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},S.localize(6,null)),e.activeContrastBorder=t("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(7,null)),e.selectionBackground=t("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},S.localize(8,null)),e.textSeparatorForeground=t("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:y.Color.black,hcLight:"#292929"},S.localize(9,null)),e.textLinkForeground=t("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},S.localize(10,null)),e.textLinkActiveForeground=t("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},S.localize(11,null)),e.textPreformatForeground=t("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#000000",hcLight:"#FFFFFF"},S.localize(12,null)),e.textPreformatBackground=t("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:"#FFFFFF",hcLight:"#09345f"},S.localize(13,null)),e.textBlockQuoteBackground=t("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},S.localize(14,null)),e.textBlockQuoteBorder=t("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:y.Color.white,hcLight:"#292929"},S.localize(15,null)),e.textCodeBlockBackground=t("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:y.Color.black,hcLight:"#F2F2F2"},S.localize(16,null)),e.widgetShadow=t("widget.shadow",{dark:h(y.Color.black,.36),light:h(y.Color.black,.16),hcDark:null,hcLight:null},S.localize(17,null)),e.widgetBorder=t("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(18,null)),e.inputBackground=t("input.background",{dark:"#3C3C3C",light:y.Color.white,hcDark:y.Color.black,hcLight:y.Color.white},S.localize(19,null)),e.inputForeground=t("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(20,null)),e.inputBorder=t("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(21,null)),e.inputActiveOptionBorder=t("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(22,null)),e.inputActiveOptionHoverBackground=t("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},S.localize(23,null)),e.inputActiveOptionBackground=t("inputOption.activeBackground",{dark:h(e.focusBorder,.4),light:h(e.focusBorder,.2),hcDark:y.Color.transparent,hcLight:y.Color.transparent},S.localize(24,null)),e.inputActiveOptionForeground=t("inputOption.activeForeground",{dark:y.Color.white,light:y.Color.black,hcDark:e.foreground,hcLight:e.foreground},S.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)},S.localize(26,null)),e.inputValidationInfoBackground=t("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:y.Color.black,hcLight:y.Color.white},S.localize(27,null)),e.inputValidationInfoForeground=t("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(28,null)),e.inputValidationInfoBorder=t("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(29,null)),e.inputValidationWarningBackground=t("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:y.Color.black,hcLight:y.Color.white},S.localize(30,null)),e.inputValidationWarningForeground=t("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(31,null)),e.inputValidationWarningBorder=t("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(32,null)),e.inputValidationErrorBackground=t("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:y.Color.black,hcLight:y.Color.white},S.localize(33,null)),e.inputValidationErrorForeground=t("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(34,null)),e.inputValidationErrorBorder=t("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(35,null)),e.selectBackground=t("dropdown.background",{dark:"#3C3C3C",light:y.Color.white,hcDark:y.Color.black,hcLight:y.Color.white},S.localize(36,null)),e.selectListBackground=t("dropdown.listBackground",{dark:null,light:null,hcDark:y.Color.black,hcLight:y.Color.white},S.localize(37,null)),e.selectForeground=t("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:y.Color.white,hcLight:e.foreground},S.localize(38,null)),e.selectBorder=t("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(39,null)),e.buttonForeground=t("button.foreground",{dark:y.Color.white,light:y.Color.white,hcDark:y.Color.white,hcLight:y.Color.white},S.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)},S.localize(41,null)),e.buttonBackground=t("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},S.localize(42,null)),e.buttonHoverBackground=t("button.hoverBackground",{dark:g(e.buttonBackground,.2),light:o(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},S.localize(43,null)),e.buttonBorder=t("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(44,null)),e.buttonSecondaryForeground=t("button.secondaryForeground",{dark:y.Color.white,light:y.Color.white,hcDark:y.Color.white,hcLight:e.foreground},S.localize(45,null)),e.buttonSecondaryBackground=t("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:y.Color.white},S.localize(46,null)),e.buttonSecondaryHoverBackground=t("button.secondaryHoverBackground",{dark:g(e.buttonSecondaryBackground,.2),light:o(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},S.localize(47,null)),e.badgeBackground=t("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:y.Color.black,hcLight:"#0F4A85"},S.localize(48,null)),e.badgeForeground=t("badge.foreground",{dark:y.Color.white,light:"#333",hcDark:y.Color.white,hcLight:y.Color.white},S.localize(49,null)),e.scrollbarShadow=t("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},S.localize(50,null)),e.scrollbarSliderBackground=t("scrollbarSlider.background",{dark:y.Color.fromHex("#797979").transparent(.4),light:y.Color.fromHex("#646464").transparent(.4),hcDark:h(e.contrastBorder,.6),hcLight:h(e.contrastBorder,.4)},S.localize(51,null)),e.scrollbarSliderHoverBackground=t("scrollbarSlider.hoverBackground",{dark:y.Color.fromHex("#646464").transparent(.7),light:y.Color.fromHex("#646464").transparent(.7),hcDark:h(e.contrastBorder,.8),hcLight:h(e.contrastBorder,.8)},S.localize(52,null)),e.scrollbarSliderActiveBackground=t("scrollbarSlider.activeBackground",{dark:y.Color.fromHex("#BFBFBF").transparent(.4),light:y.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(53,null)),e.progressBarBackground=t("progressBar.background",{dark:y.Color.fromHex("#0E70C0"),light:y.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(54,null)),e.editorErrorBackground=t("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(55,null),!0),e.editorErrorForeground=t("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},S.localize(56,null)),e.editorErrorBorder=t("editorError.border",{dark:null,light:null,hcDark:y.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},S.localize(57,null)),e.editorWarningBackground=t("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(58,null),!0),e.editorWarningForeground=t("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},S.localize(59,null)),e.editorWarningBorder=t("editorWarning.border",{dark:null,light:null,hcDark:y.Color.fromHex("#FFCC00").transparent(.8),hcLight:y.Color.fromHex("#FFCC00").transparent(.8)},S.localize(60,null)),e.editorInfoBackground=t("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(61,null),!0),e.editorInfoForeground=t("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},S.localize(62,null)),e.editorInfoBorder=t("editorInfo.border",{dark:null,light:null,hcDark:y.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},S.localize(63,null)),e.editorHintForeground=t("editorHint.foreground",{dark:y.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},S.localize(64,null)),e.editorHintBorder=t("editorHint.border",{dark:null,light:null,hcDark:y.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},S.localize(65,null)),e.sashHoverBorder=t("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(66,null)),e.editorBackground=t("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:y.Color.black,hcLight:y.Color.white},S.localize(67,null)),e.editorForeground=t("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:y.Color.white,hcLight:e.foreground},S.localize(68,null)),e.editorStickyScrollBackground=t("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},S.localize(69,null)),e.editorStickyScrollHoverBackground=t("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},S.localize(70,null)),e.editorStickyScrollBorder=t("editorStickyScroll.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(71,null)),e.editorStickyScrollShadow=t("editorStickyScroll.shadow",{dark:e.scrollbarShadow,light:e.scrollbarShadow,hcDark:e.scrollbarShadow,hcLight:e.scrollbarShadow},S.localize(72,null)),e.editorWidgetBackground=t("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:y.Color.white},S.localize(73,null)),e.editorWidgetForeground=t("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(74,null)),e.editorWidgetBorder=t("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(75,null)),e.editorWidgetResizeBorder=t("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},S.localize(76,null)),e.quickInputBackground=t("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(77,null)),e.quickInputForeground=t("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},S.localize(78,null)),e.quickInputTitleBackground=t("quickInputTitle.background",{dark:new y.Color(new y.RGBA(255,255,255,.105)),light:new y.Color(new y.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:y.Color.white},S.localize(79,null)),e.pickerGroupForeground=t("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:y.Color.white,hcLight:"#0F4A85"},S.localize(80,null)),e.pickerGroupBorder=t("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:y.Color.white,hcLight:"#0F4A85"},S.localize(81,null)),e.keybindingLabelBackground=t("keybindingLabel.background",{dark:new y.Color(new y.RGBA(128,128,128,.17)),light:new y.Color(new y.RGBA(221,221,221,.4)),hcDark:y.Color.transparent,hcLight:y.Color.transparent},S.localize(82,null)),e.keybindingLabelForeground=t("keybindingLabel.foreground",{dark:y.Color.fromHex("#CCCCCC"),light:y.Color.fromHex("#555555"),hcDark:y.Color.white,hcLight:e.foreground},S.localize(83,null)),e.keybindingLabelBorder=t("keybindingLabel.border",{dark:new y.Color(new y.RGBA(51,51,51,.6)),light:new y.Color(new y.RGBA(204,204,204,.4)),hcDark:new y.Color(new y.RGBA(111,195,223)),hcLight:e.contrastBorder},S.localize(84,null)),e.keybindingLabelBottomBorder=t("keybindingLabel.bottomBorder",{dark:new y.Color(new y.RGBA(68,68,68,.6)),light:new y.Color(new y.RGBA(187,187,187,.4)),hcDark:new y.Color(new y.RGBA(111,195,223)),hcLight:e.foreground},S.localize(85,null)),e.editorSelectionBackground=t("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},S.localize(86,null)),e.editorSelectionForeground=t("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:y.Color.white},S.localize(87,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)},S.localize(88,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},S.localize(89,null),!0),e.editorSelectionHighlightBorder=t("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(90,null)),e.editorFindMatch=t("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},S.localize(91,null)),e.editorFindMatchHighlight=t("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},S.localize(92,null),!0),e.editorFindRangeHighlight=t("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},S.localize(93,null),!0),e.editorFindMatchBorder=t("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(94,null)),e.editorFindMatchHighlightBorder=t("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(95,null)),e.editorFindRangeHighlightBorder=t("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:h(e.activeContrastBorder,.4),hcLight:h(e.activeContrastBorder,.4)},S.localize(96,null),!0),e.searchEditorFindMatch=t("searchEditor.findMatchBackground",{light:h(e.editorFindMatchHighlight,.66),dark:h(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},S.localize(97,null)),e.searchEditorFindMatchBorder=t("searchEditor.findMatchBorder",{light:h(e.editorFindMatchHighlightBorder,.66),dark:h(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},S.localize(98,null)),e.searchResultsInfoForeground=t("search.resultsInfoForeground",{light:e.foreground,dark:h(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},S.localize(99,null)),e.editorHoverHighlight=t("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},S.localize(100,null),!0),e.editorHoverBackground=t("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(101,null)),e.editorHoverForeground=t("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},S.localize(102,null)),e.editorHoverBorder=t("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},S.localize(103,null)),e.editorHoverStatusBarBackground=t("editorHoverWidget.statusBarBackground",{dark:g(e.editorHoverBackground,.2),light:o(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(104,null)),e.editorActiveLinkForeground=t("editorLink.activeForeground",{dark:"#4E94CE",light:y.Color.blue,hcDark:y.Color.cyan,hcLight:"#292929"},S.localize(105,null)),e.editorInlayHintForeground=t("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:y.Color.white,hcLight:y.Color.black},S.localize(106,null)),e.editorInlayHintBackground=t("editorInlayHint.background",{dark:h(e.badgeBackground,.1),light:h(e.badgeBackground,.1),hcDark:h(y.Color.white,.1),hcLight:h(e.badgeBackground,.1)},S.localize(107,null)),e.editorInlayHintTypeForeground=t("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},S.localize(108,null)),e.editorInlayHintTypeBackground=t("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},S.localize(109,null)),e.editorInlayHintParameterForeground=t("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},S.localize(110,null)),e.editorInlayHintParameterBackground=t("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},S.localize(111,null)),e.editorLightBulbForeground=t("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},S.localize(112,null)),e.editorLightBulbAutoFixForeground=t("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S.localize(113,null)),e.editorLightBulbAiForeground=t("editorLightBulbAi.foreground",{dark:e.editorLightBulbForeground,light:e.editorLightBulbForeground,hcDark:e.editorLightBulbForeground,hcLight:e.editorLightBulbForeground},S.localize(114,null)),e.defaultInsertColor=new y.Color(new y.RGBA(155,185,85,.2)),e.defaultRemoveColor=new y.Color(new y.RGBA(255,0,0,.2)),e.diffInserted=t("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},S.localize(115,null),!0),e.diffRemoved=t("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},S.localize(116,null),!0),e.diffInsertedLine=t("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},S.localize(117,null),!0),e.diffRemovedLine=t("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},S.localize(118,null),!0),e.diffInsertedLineGutter=t("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(119,null)),e.diffRemovedLineGutter=t("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(120,null)),e.diffOverviewRulerInserted=t("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(121,null)),e.diffOverviewRulerRemoved=t("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(122,null)),e.diffInsertedOutline=t("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},S.localize(123,null)),e.diffRemovedOutline=t("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},S.localize(124,null)),e.diffBorder=t("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(125,null)),e.diffDiagonalFill=t("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},S.localize(126,null)),e.diffUnchangedRegionBackground=t("diffEditor.unchangedRegionBackground",{dark:"sideBar.background",light:"sideBar.background",hcDark:"sideBar.background",hcLight:"sideBar.background"},S.localize(127,null)),e.diffUnchangedRegionForeground=t("diffEditor.unchangedRegionForeground",{dark:"foreground",light:"foreground",hcDark:"foreground",hcLight:"foreground"},S.localize(128,null)),e.diffUnchangedTextBackground=t("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},S.localize(129,null)),e.listFocusBackground=t("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(130,null)),e.listFocusForeground=t("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(131,null)),e.listFocusOutline=t("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(132,null)),e.listFocusAndSelectionOutline=t("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(133,null)),e.listActiveSelectionBackground=t("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},S.localize(134,null)),e.listActiveSelectionForeground=t("list.activeSelectionForeground",{dark:y.Color.white,light:y.Color.white,hcDark:null,hcLight:null},S.localize(135,null)),e.listActiveSelectionIconForeground=t("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(136,null)),e.listInactiveSelectionBackground=t("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},S.localize(137,null)),e.listInactiveSelectionForeground=t("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(138,null)),e.listInactiveSelectionIconForeground=t("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(139,null)),e.listInactiveFocusBackground=t("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(140,null)),e.listInactiveFocusOutline=t("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(141,null)),e.listHoverBackground=t("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:y.Color.white.transparent(.1),hcLight:y.Color.fromHex("#0F4A85").transparent(.1)},S.localize(142,null)),e.listHoverForeground=t("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(143,null)),e.listDropOverBackground=t("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},S.localize(144,null)),e.listDropBetweenBackground=t("list.dropBetweenBackground",{dark:e.iconForeground,light:e.iconForeground,hcDark:null,hcLight:null},S.localize(145,null)),e.listHighlightForeground=t("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(146,null)),e.listFocusHighlightForeground=t("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:C(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},S.localize(147,null)),e.listInvalidItemForeground=t("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},S.localize(148,null)),e.listErrorForeground=t("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},S.localize(149,null)),e.listWarningForeground=t("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},S.localize(150,null)),e.listFilterWidgetBackground=t("listFilterWidget.background",{light:o(e.editorWidgetBackground,0),dark:g(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(151,null)),e.listFilterWidgetOutline=t("listFilterWidget.outline",{dark:y.Color.transparent,light:y.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},S.localize(152,null)),e.listFilterWidgetNoMatchesOutline=t("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(153,null)),e.listFilterWidgetShadow=t("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},S.localize(154,null)),e.listFilterMatchHighlight=t("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},S.localize(155,null)),e.listFilterMatchHighlightBorder=t("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},S.localize(156,null)),e.treeIndentGuidesStroke=t("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},S.localize(157,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)},S.localize(158,null)),e.tableColumnsBorder=t("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},S.localize(159,null)),e.tableOddRowsBackgroundColor=t("tree.tableOddRowsBackground",{dark:h(e.foreground,.04),light:h(e.foreground,.04),hcDark:null,hcLight:null},S.localize(160,null)),e.listDeemphasizedForeground=t("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},S.localize(161,null)),e.checkboxBackground=t("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},S.localize(162,null)),e.checkboxSelectBackground=t("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(163,null)),e.checkboxForeground=t("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},S.localize(164,null)),e.checkboxBorder=t("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},S.localize(165,null)),e.checkboxSelectBorder=t("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},S.localize(166,null)),e._deprecatedQuickInputListFocusBackground=t("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,S.localize(167,null)),e.quickInputListFocusForeground=t("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},S.localize(168,null)),e.quickInputListFocusIconForeground=t("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},S.localize(169,null)),e.quickInputListFocusBackground=t("quickInputList.focusBackground",{dark:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},S.localize(170,null)),e.menuBorder=t("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(171,null)),e.menuForeground=t("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},S.localize(172,null)),e.menuBackground=t("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},S.localize(173,null)),e.menuSelectionForeground=t("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},S.localize(174,null)),e.menuSelectionBackground=t("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},S.localize(175,null)),e.menuSelectionBorder=t("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(176,null)),e.menuSeparatorBackground=t("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(177,null)),e.toolbarHoverBackground=t("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},S.localize(178,null)),e.toolbarHoverOutline=t("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(179,null)),e.toolbarActiveBackground=t("toolbar.activeBackground",{dark:g(e.toolbarHoverBackground,.1),light:o(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},S.localize(180,null)),e.snippetTabstopHighlightBackground=t("editor.snippetTabstopHighlightBackground",{dark:new y.Color(new y.RGBA(124,124,124,.3)),light:new y.Color(new y.RGBA(10,50,100,.2)),hcDark:new y.Color(new y.RGBA(124,124,124,.3)),hcLight:new y.Color(new y.RGBA(10,50,100,.2))},S.localize(181,null)),e.snippetTabstopHighlightBorder=t("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(182,null)),e.snippetFinalTabstopHighlightBackground=t("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(183,null)),e.snippetFinalTabstopHighlightBorder=t("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new y.Color(new y.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},S.localize(184,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)},S.localize(185,null)),e.breadcrumbsBackground=t("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},S.localize(186,null)),e.breadcrumbsFocusForeground=t("breadcrumb.focusForeground",{light:o(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},S.localize(187,null)),e.breadcrumbsActiveSelectionForeground=t("breadcrumb.activeSelectionForeground",{light:o(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},S.localize(188,null)),e.breadcrumbsPickerBackground=t("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(189,null));const r=.5,u=y.Color.fromHex("#40C8AE").transparent(r),f=y.Color.fromHex("#40A6FF").transparent(r),c=y.Color.fromHex("#606060").transparent(.4),d=.4,s=1;e.mergeCurrentHeaderBackground=t("merge.currentHeaderBackground",{dark:u,light:u,hcDark:null,hcLight:null},S.localize(190,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)},S.localize(191,null),!0),e.mergeIncomingHeaderBackground=t("merge.incomingHeaderBackground",{dark:f,light:f,hcDark:null,hcLight:null},S.localize(192,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)},S.localize(193,null),!0),e.mergeCommonHeaderBackground=t("merge.commonHeaderBackground",{dark:c,light:c,hcDark:null,hcLight:null},S.localize(194,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)},S.localize(195,null),!0),e.mergeBorder=t("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},S.localize(196,null)),e.overviewRulerCurrentContentForeground=t("editorOverviewRuler.currentContentForeground",{dark:h(e.mergeCurrentHeaderBackground,s),light:h(e.mergeCurrentHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(197,null)),e.overviewRulerIncomingContentForeground=t("editorOverviewRuler.incomingContentForeground",{dark:h(e.mergeIncomingHeaderBackground,s),light:h(e.mergeIncomingHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(198,null)),e.overviewRulerCommonContentForeground=t("editorOverviewRuler.commonContentForeground",{dark:h(e.mergeCommonHeaderBackground,s),light:h(e.mergeCommonHeaderBackground,s),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(199,null)),e.overviewRulerFindMatchForeground=t("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},S.localize(200,null),!0),e.overviewRulerSelectionHighlightForeground=t("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},S.localize(201,null),!0),e.minimapFindMatch=t("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},S.localize(202,null),!0),e.minimapSelectionOccurrenceHighlight=t("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},S.localize(203,null),!0),e.minimapSelection=t("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},S.localize(204,null),!0),e.minimapInfo=t("minimap.infoHighlight",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoBorder,hcLight:e.editorInfoBorder},S.localize(205,null)),e.minimapWarning=t("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},S.localize(206,null)),e.minimapError=t("minimap.errorHighlight",{dark:new y.Color(new y.RGBA(255,18,18,.7)),light:new y.Color(new y.RGBA(255,18,18,.7)),hcDark:new y.Color(new y.RGBA(255,50,50,1)),hcLight:"#B5200D"},S.localize(207,null)),e.minimapBackground=t("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(208,null)),e.minimapForegroundOpacity=t("minimap.foregroundOpacity",{dark:y.Color.fromHex("#000f"),light:y.Color.fromHex("#000f"),hcDark:y.Color.fromHex("#000f"),hcLight:y.Color.fromHex("#000f")},S.localize(209,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)},S.localize(210,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)},S.localize(211,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)},S.localize(212,null)),e.problemsErrorIconForeground=t("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},S.localize(213,null)),e.problemsWarningIconForeground=t("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},S.localize(214,null)),e.problemsInfoIconForeground=t("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},S.localize(215,null)),e.chartsForeground=t("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(216,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)},S.localize(217,null)),e.chartsRed=t("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},S.localize(218,null)),e.chartsBlue=t("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},S.localize(219,null)),e.chartsYellow=t("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},S.localize(220,null)),e.chartsOrange=t("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},S.localize(221,null)),e.chartsGreen=t("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},S.localize(222,null)),e.chartsPurple=t("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},S.localize(223,null));function l(A,P){var N,M,R,x;switch(A.op){case 0:return(N=D(A.value,P))===null||N===void 0?void 0:N.darken(A.factor);case 1:return(M=D(A.value,P))===null||M===void 0?void 0:M.lighten(A.factor);case 2:return(R=D(A.value,P))===null||R===void 0?void 0:R.transparent(A.factor);case 3:{const O=D(A.background,P);return O?(x=D(A.value,P))===null||x===void 0?void 0:x.makeOpaque(O):D(A.value,P)}case 4:for(const O of A.values){const B=D(O,P);if(B)return B}return;case 6:return D(P.defines(A.if)?A.then:A.else,P);case 5:{const O=D(A.value,P);if(!O)return;const B=D(A.background,P);return B?O.isDarkerThan(B)?y.Color.getLighterColor(O,B,A.factor).transparent(A.transparency):y.Color.getDarkerColor(O,B,A.factor).transparent(A.transparency):O.transparent(A.factor*A.transparency)}default:throw(0,L.assertNever)(A)}}e.executeTransform=l;function o(A,P){return{op:0,value:A,factor:P}}e.darken=o;function g(A,P){return{op:1,value:A,factor:P}}e.lighten=g;function h(A,P){return{op:2,value:A,factor:P}}e.transparent=h;function m(...A){return{op:4,values:A}}e.oneOf=m;function C(A,P,N){return{op:6,if:A,then:P,else:N}}e.ifDefinedThenElse=C;function w(A,P,N,M){return{op:5,value:A,background:P,factor:N,transparency:M}}function D(A,P){if(A!==null){if(typeof A=="string")return A[0]==="#"?y.Color.fromHex(A):P.getColor(A);if(A instanceof y.Color)return A;if(typeof A=="object")return l(A,P)}}e.resolveColorValue=D,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const I=_.Registry.as(p.Extensions.JSONContribution);I.registerSchema(e.workbenchColorsSchemaId,n.getColorSchema());const T=new k.RunOnceScheduler(()=>I.notifySchemaChanged(e.workbenchColorsSchemaId),200);n.onDidChangeSchema(()=>{T.isScheduled()||T.schedule()})}),define(se[167],oe([1,0,7,157,67,14,2,29]),function(te,e,L,k,y,E,S,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 _{constructor(o,g){this.x=o,this.y=g,this._pageCoordinatesBrand=void 0}toClientCoordinates(o){return new v(this.x-o.scrollX,this.y-o.scrollY)}}e.PageCoordinates=_;class v{constructor(o,g){this.clientX=o,this.clientY=g,this._clientCoordinatesBrand=void 0}toPageCoordinates(o){return new _(this.clientX+o.scrollX,this.clientY+o.scrollY)}}e.ClientCoordinates=v;class b{constructor(o,g,h,m){this.x=o,this.y=g,this.width=h,this.height=m,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=b;class a{constructor(o,g){this.x=o,this.y=g,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=a;function i(l){const o=L.getDomNodePagePosition(l);return new b(o.left,o.top,o.width,o.height)}e.createEditorPagePosition=i;function n(l,o,g){const h=o.width/l.offsetWidth,m=o.height/l.offsetHeight,C=(g.x-o.x)/h,w=(g.y-o.y)/m;return new a(C,w)}e.createCoordinatesRelativeToEditor=n;class t extends y.StandardMouseEvent{constructor(o,g,h){super(L.getWindow(h),o),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=g,this.pos=new _(this.posx,this.posy),this.editorPos=i(h),this.relativePos=n(h,this.editorPos,this.pos)}}e.EditorMouseEvent=t;class r{constructor(o){this._editorViewDomNode=o}_create(o){return new t(o,!1,this._editorViewDomNode)}onContextMenu(o,g){return L.addDisposableListener(o,"contextmenu",h=>{g(this._create(h))})}onMouseUp(o,g){return L.addDisposableListener(o,"mouseup",h=>{g(this._create(h))})}onMouseDown(o,g){return L.addDisposableListener(o,L.EventType.MOUSE_DOWN,h=>{g(this._create(h))})}onPointerDown(o,g){return L.addDisposableListener(o,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onMouseLeave(o,g){return L.addDisposableListener(o,L.EventType.MOUSE_LEAVE,h=>{g(this._create(h))})}onMouseMove(o,g){return L.addDisposableListener(o,"mousemove",h=>g(this._create(h)))}}e.EditorMouseEventFactory=r;class u{constructor(o){this._editorViewDomNode=o}_create(o){return new t(o,!1,this._editorViewDomNode)}onPointerUp(o,g){return L.addDisposableListener(o,"pointerup",h=>{g(this._create(h))})}onPointerDown(o,g){return L.addDisposableListener(o,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onPointerLeave(o,g){return L.addDisposableListener(o,L.EventType.POINTER_LEAVE,h=>{g(this._create(h))})}onPointerMove(o,g){return L.addDisposableListener(o,"pointermove",h=>g(this._create(h)))}}e.EditorPointerEventFactory=u;class f extends S.Disposable{constructor(o){super(),this._editorViewDomNode=o,this._globalPointerMoveMonitor=this._register(new k.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(o,g,h,m,C){this._keydownListener=L.addStandardDisposableListener(o.ownerDocument,"keydown",w=>{w.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,w.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(o,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(o){this._editor=o,this._instanceId=++c._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new E.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(o){const g=this.getOrCreateRule(o);return g.increaseRefCount(),{className:g.className,dispose:()=>{g.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(o){const g=this.computeUniqueKey(o);let h=this._rules.get(g);if(!h){const m=this._counter++;h=new d(g,`dyn-rule-${this._instanceId}-${m}`,L.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,o),this._rules.set(g,h)}return h}computeUniqueKey(o){return JSON.stringify(o)}garbageCollect(){for(const o of this._rules.values())o.hasReferences()||(this._rules.delete(o.key),o.dispose())}}e.DynamicCssRules=c,c._idPool=0;class d{constructor(o,g,h,m){this.key=o,this.className=g,this.properties=m,this._referenceCount=0,this._styleElementDisposables=new S.DisposableStore,this._styleElement=L.createStyleSheet(h,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(o,g){let h=`.${o} {`;for(const m in g){const C=g[m];let w;typeof C=="object"?w=(0,p.asCssVariable)(C.id):w=C;const D=s(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 s(l){return l.replace(/(^[A-Z])/,([o])=>o.toLowerCase()).replace(/([A-Z])/g,([o])=>`-${o.toLowerCase()}`)}}),define(se[834],oe([1,0,7,40,157,2,17,11,233,56,36,5,281,339,86,29,24,63,497,41,108,440]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const l=140,o=2;class g{constructor(N,M,R){const x=N.options,O=x.get(141),B=x.get(143),W=B.minimap,V=x.get(50),K=x.get(72);this.renderMinimap=W.renderMinimap,this.size=K.size,this.minimapHeightIsEditorHeight=W.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=x.get(104),this.paddingTop=x.get(83).top,this.paddingBottom=x.get(83).bottom,this.showSlider=K.showSlider,this.autohide=K.autohide,this.pixelRatio=O,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,s.createSingleCallFunction)(()=>c.MinimapCharRendererFactory.create(this.fontScale,V.fontFamily)),this.defaultBackgroundColor=R.getColor(2),this.backgroundColor=g._getMinimapBackground(M,this.defaultBackgroundColor),this.foregroundAlpha=g._getMinimapForegroundOpacity(M)}static _getMinimapBackground(N,M){const R=N.getColor(r.minimapBackground);return R?new i.RGBA8(R.rgba.r,R.rgba.g,R.rgba.b,Math.round(255*R.rgba.a)):M}static _getMinimapForegroundOpacity(N){const M=N.getColor(r.minimapForegroundOpacity);return M?i.RGBA8._clamp(Math.round(255*M.rgba.a)):255}equals(N){return this.renderMinimap===N.renderMinimap&&this.size===N.size&&this.minimapHeightIsEditorHeight===N.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===N.scrollBeyondLastLine&&this.paddingTop===N.paddingTop&&this.paddingBottom===N.paddingBottom&&this.showSlider===N.showSlider&&this.autohide===N.autohide&&this.pixelRatio===N.pixelRatio&&this.typicalHalfwidthCharacterWidth===N.typicalHalfwidthCharacterWidth&&this.lineHeight===N.lineHeight&&this.minimapLeft===N.minimapLeft&&this.minimapWidth===N.minimapWidth&&this.minimapHeight===N.minimapHeight&&this.canvasInnerWidth===N.canvasInnerWidth&&this.canvasInnerHeight===N.canvasInnerHeight&&this.canvasOuterWidth===N.canvasOuterWidth&&this.canvasOuterHeight===N.canvasOuterHeight&&this.isSampling===N.isSampling&&this.editorHeight===N.editorHeight&&this.fontScale===N.fontScale&&this.minimapLineHeight===N.minimapLineHeight&&this.minimapCharWidth===N.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(N.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(N.backgroundColor)&&this.foregroundAlpha===N.foregroundAlpha}}class h{constructor(N,M,R,x,O,B,W,V,K){this.scrollTop=N,this.scrollHeight=M,this.sliderNeeded=R,this._computedSliderRatio=x,this.sliderTop=O,this.sliderHeight=B,this.topPaddingLineCount=W,this.startLineNumber=V,this.endLineNumber=K}getDesiredScrollTopFromDelta(N){return Math.round(this.scrollTop+N/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(N){return Math.round((N-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(N){const M=Math.max(this.startLineNumber,N.startLineNumber),R=Math.min(this.endLineNumber,N.endLineNumber);return M>R?null:[M,R]}getYForLineNumber(N,M){return+(N-this.startLineNumber+this.topPaddingLineCount)*M}static create(N,M,R,x,O,B,W,V,K,F,q){const ie=N.pixelRatio,ae=N.minimapLineHeight,ne=Math.floor(N.canvasInnerHeight/ae),$=N.lineHeight;if(N.minimapHeightIsEditorHeight){let X=V*N.lineHeight+N.paddingTop+N.paddingBottom;N.scrollBeyondLastLine&&(X+=Math.max(0,O-N.lineHeight-N.paddingBottom));const U=Math.max(1,Math.floor(O*O/X)),G=Math.max(0,N.minimapHeight-U),z=G/(F-O),H=K*z,Y=G>0,j=Math.floor(N.canvasInnerHeight/N.minimapLineHeight),Z=Math.floor(N.paddingTop/N.lineHeight);return new h(K,F,Y,z,H,U,Z,1,Math.min(W,j))}let J;if(B&&R!==W){const X=R-M+1;J=Math.floor(X*ae/ie)}else{const X=O/$;J=Math.floor(X*ae/ie)}const Q=Math.floor(N.paddingTop/$);let re=Math.floor(N.paddingBottom/$);if(N.scrollBeyondLastLine){const X=O/$;re=Math.max(re,X-1)}let de;if(re>0){const X=O/$;de=(Q+W+re-X-1)*ae/ie}else de=Math.max(0,(Q+W)*ae/ie-J);de=Math.min(N.minimapHeight-J,de);const he=de/(F-O),me=K*he;if(ne>=Q+W+re){const X=de>0;return new h(K,F,X,he,me,J,Q,1,W)}else{let X;M>1?X=M+Q:X=Math.max(1,K/$);let U,G=Math.max(1,Math.floor(X-me*ie/ae));G<Q?(U=Q-G+1,G=1):(U=0,G=Math.max(1,G-Q)),q&&q.scrollHeight===F&&(q.scrollTop>K&&(G=Math.min(G,q.startLineNumber),U=Math.max(U,q.topPaddingLineCount)),q.scrollTop<K&&(G=Math.max(G,q.startLineNumber),U=Math.min(U,q.topPaddingLineCount)));const z=Math.min(W,G-U+ne-1),H=(K-x)/$;let Y;return K>=N.paddingTop?Y=(M-G+U+H)*ae/ie:Y=K/N.paddingTop*(U+H)*ae/ie,new h(K,F,!0,he,Y,J,U,G,z)}}}class m{constructor(N){this.dy=N}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}m.INVALID=new m(-1);class C{constructor(N,M,R){this.renderedLayout=N,this._imageData=M,this._renderedLines=new _.RenderedLinesCollection(()=>m.INVALID),this._renderedLines._set(N.startLineNumber,R)}linesEquals(N){if(!this.scrollEquals(N))return!1;const R=this._renderedLines._get().lines;for(let x=0,O=R.length;x<O;x++)if(R[x].dy===-1)return!1;return!0}scrollEquals(N){return this.renderedLayout.startLineNumber===N.startLineNumber&&this.renderedLayout.endLineNumber===N.endLineNumber}_get(){const N=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:N.rendLineNumberStart,lines:N.lines}}onLinesChanged(N,M){return this._renderedLines.onLinesChanged(N,M)}onLinesDeleted(N,M){this._renderedLines.onLinesDeleted(N,M)}onLinesInserted(N,M){this._renderedLines.onLinesInserted(N,M)}onTokensChanged(N){return this._renderedLines.onTokensChanged(N)}}class w{constructor(N,M,R,x){this._backgroundFillData=w._createBackgroundFillData(M,R,x),this._buffers=[N.createImageData(M,R),N.createImageData(M,R)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const N=this._buffers[this._lastUsedBuffer];return N.data.set(this._backgroundFillData),N}static _createBackgroundFillData(N,M,R){const x=R.r,O=R.g,B=R.b,W=R.a,V=new Uint8ClampedArray(N*M*4);let K=0;for(let F=0;F<M;F++)for(let q=0;q<N;q++)V[K]=x,V[K+1]=O,V[K+2]=B,V[K+3]=W,K+=4;return V}}class D{static compute(N,M,R){if(N.renderMinimap===0||!N.isSampling)return[null,[]];const{minimapLineCount:x}=b.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:M,scrollBeyondLastLine:N.scrollBeyondLastLine,paddingTop:N.paddingTop,paddingBottom:N.paddingBottom,height:N.editorHeight,lineHeight:N.lineHeight,pixelRatio:N.pixelRatio}),O=M/x,B=O/2;if(!R||R.minimapLines.length===0){const J=[];if(J[0]=1,x>1){for(let Q=0,re=x-1;Q<re;Q++)J[Q]=Math.round(Q*O+B);J[x-1]=M}return[new D(O,J),[]]}const W=R.minimapLines,V=W.length,K=[];let F=0,q=0,ie=1;const ae=10;let ne=[],$=null;for(let J=0;J<x;J++){const Q=Math.max(ie,Math.round(J*O)),re=Math.max(Q,Math.round((J+1)*O));for(;F<V&&W[F]<Q;){if(ne.length<ae){const he=F+1+q;$&&$.type==="deleted"&&$._oldIndex===F-1?$.deleteToLineNumber++:($={type:"deleted",_oldIndex:F,deleteFromLineNumber:he,deleteToLineNumber:he},ne.push($)),q--}F++}let de;if(F<V&&W[F]<=re)de=W[F],F++;else if(J===0?de=1:J+1===x?de=M:de=Math.round(J*O+B),ne.length<ae){const he=F+1+q;$&&$.type==="inserted"&&$._i===J-1?$.insertToLineNumber++:($={type:"inserted",_i:J,insertFromLineNumber:he,insertToLineNumber:he},ne.push($)),q++}K[J]=de,ie=de}if(ne.length<ae)for(;F<V;){const J=F+1+q;$&&$.type==="deleted"&&$._oldIndex===F-1?$.deleteToLineNumber++:($={type:"deleted",_oldIndex:F,deleteFromLineNumber:J,deleteToLineNumber:J},ne.push($)),q--,F++}else ne=[{type:"flush"}];return[new D(O,K),ne]}constructor(N,M){this.samplingRatio=N,this.minimapLines=M}modelLineToMinimapLine(N){return Math.min(this.minimapLines.length,Math.max(1,Math.round(N/this.samplingRatio)))}modelLineRangeToMinimapLineRange(N,M){let R=this.modelLineToMinimapLine(N)-1;for(;R>0&&this.minimapLines[R-1]>=N;)R--;let x=this.modelLineToMinimapLine(M)-1;for(;x+1<this.minimapLines.length&&this.minimapLines[x+1]<=M;)x++;if(R===x){const O=this.minimapLines[R];if(O<N||O>M)return null}return[R+1,x+1]}decorationLineRangeToMinimapLineRange(N,M){let R=this.modelLineToMinimapLine(N),x=this.modelLineToMinimapLine(M);return N!==M&&x===R&&(x===this.minimapLines.length?R>1&&R--:x++),[R,x]}onLinesDeleted(N){const M=N.toLineNumber-N.fromLineNumber+1;let R=this.minimapLines.length,x=0;for(let O=this.minimapLines.length-1;O>=0&&!(this.minimapLines[O]<N.fromLineNumber);O--)this.minimapLines[O]<=N.toLineNumber?(this.minimapLines[O]=Math.max(1,N.fromLineNumber-1),R=Math.min(R,O),x=Math.max(x,O)):this.minimapLines[O]-=M;return[R,x]}onLinesInserted(N){const M=N.toLineNumber-N.fromLineNumber+1;for(let R=this.minimapLines.length-1;R>=0&&!(this.minimapLines[R]<N.fromLineNumber);R--)this.minimapLines[R]+=M}}class I extends v.ViewPart{constructor(N){super(N),this.tokensColorTracker=n.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);const[M]=D.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=M,this._shouldCheckSampling=!1,this._actual=new T(N.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const N=new g(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(N)?!1:(this.options=N,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(N){return this._onOptionsMaybeChanged()}onCursorStateChanged(N){return this._selections=N.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(N){return N.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(N){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(N){if(this._samplingState){const M=this._samplingState.modelLineRangeToMinimapLineRange(N.fromLineNumber,N.fromLineNumber+N.count-1);return M?this._actual.onLinesChanged(M[0],M[1]-M[0]+1):!1}else return this._actual.onLinesChanged(N.fromLineNumber,N.count)}onLinesDeleted(N){if(this._samplingState){const[M,R]=this._samplingState.onLinesDeleted(N);return M<=R&&this._actual.onLinesChanged(M+1,R-M+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(N.fromLineNumber,N.toLineNumber)}onLinesInserted(N){return this._samplingState?(this._samplingState.onLinesInserted(N),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(N.fromLineNumber,N.toLineNumber)}onScrollChanged(N){return this._actual.onScrollChanged()}onThemeChanged(N){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(N){if(this._samplingState){const M=[];for(const R of N.ranges){const x=this._samplingState.modelLineRangeToMinimapLineRange(R.fromLineNumber,R.toLineNumber);x&&M.push({fromLineNumber:x[0],toLineNumber:x[1]})}return M.length?this._actual.onTokensChanged(M):!1}else return this._actual.onTokensChanged(N.ranges)}onTokensColorsChanged(N){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(N){return this._actual.onZonesChanged()}prepareRender(N){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(N){let M=N.visibleRange.startLineNumber,R=N.visibleRange.endLineNumber;this._samplingState&&(M=this._samplingState.modelLineToMinimapLine(M),R=this._samplingState.modelLineToMinimapLine(R));const x={viewportContainsWhitespaceGaps:N.viewportData.whitespaceViewportData.length>0,scrollWidth:N.scrollWidth,scrollHeight:N.scrollHeight,viewportStartLineNumber:M,viewportEndLineNumber:R,viewportStartLineNumberVerticalOffset:N.getVerticalOffsetForLineNumber(M),scrollTop:N.scrollTop,scrollLeft:N.scrollLeft,viewportWidth:N.viewportWidth,viewportHeight:N.viewportHeight};this._actual.render(x)}_recreateLineSampling(){this._minimapSelections=null;const N=!!this._samplingState,[M,R]=D.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=M,N&&this._samplingState)for(const x of R)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(N){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[N-1]):this._context.viewModel.getLineContent(N)}getLineMaxColumn(N){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[N-1]):this._context.viewModel.getLineMaxColumn(N)}getMinimapLinesRenderingData(N,M,R){if(this._samplingState){const x=[];for(let O=0,B=M-N+1;O<B;O++)R[O]?x[O]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[N+O-1]):x[O]=null;return x}return this._context.viewModel.getMinimapLinesRenderingData(N,M,R).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const N of this._selections){const[M,R]=this._samplingState.decorationLineRangeToMinimapLineRange(N.startLineNumber,N.endLineNumber);this._minimapSelections.push(new u.Selection(M,N.startColumn,R,N.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(N,M){let R;if(this._samplingState){const O=this._samplingState.minimapLines[N-1],B=this._samplingState.minimapLines[M-1];R=new a.Range(O,1,B,this._context.viewModel.getLineMaxColumn(B))}else R=new a.Range(N,1,M,this._context.viewModel.getLineMaxColumn(M));const x=this._context.viewModel.getMinimapDecorationsInRange(R);if(this._samplingState){const O=[];for(const B of x){if(!B.options.minimap)continue;const W=B.range,V=this._samplingState.modelLineToMinimapLine(W.startLineNumber),K=this._samplingState.modelLineToMinimapLine(W.endLineNumber);O.push(new t.ViewModelDecoration(new a.Range(V,W.startColumn,K,W.endColumn),B.options))}return O}return x}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(N){this._samplingState&&(N=this._samplingState.minimapLines[N-1]),this._context.viewModel.revealRange("mouse",!1,new a.Range(N,1,N,1),1,0)}setScrollTop(N){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:N},1)}}e.Minimap=I;class T extends E.Disposable{constructor(N,M){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=N,this._model=M,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(r.minimapSelection),this._domNode=(0,k.createFastDomNode)(document.createElement("div")),v.PartFingerprints.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,k.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,k.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,k.createFastDomNode)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,k.createFastDomNode)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,k.createFastDomNode)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._pointerDownListener=L.addStandardDisposableListener(this._domNode.domNode,L.EventType.POINTER_DOWN,R=>{if(R.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(R.button===0&&this._lastRenderData){const K=L.getDomNodePagePosition(this._slider.domNode),F=K.top+K.height/2;this._startSliderDragging(R,F,this._lastRenderData.renderedLayout)}return}const O=this._model.options.minimapLineHeight,B=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*R.offsetY;let V=Math.floor(B/O)+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,R=>{R.preventDefault(),R.stopPropagation(),R.button===0&&this._lastRenderData&&this._startSliderDragging(R,R.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=f.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Start,R=>{R.preventDefault(),R.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(R))},{passive:!1}),this._sliderTouchMoveListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Change,R=>{R.preventDefault(),R.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(R)},{passive:!1}),this._sliderTouchEndListener=L.addStandardDisposableListener(this._domNode.domNode,f.EventType.End,R=>{R.preventDefault(),R.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(N,M,R){if(!N.target||!(N.target instanceof Element))return;const x=N.pageX;this._slider.toggleClassName("active",!0);const O=(B,W)=>{const V=L.getDomNodePagePosition(this._domNode.domNode),K=Math.min(Math.abs(W-x),Math.abs(W-V.left),Math.abs(W-V.left-V.width));if(S.isWindows&&K>l){this._model.setScrollTop(R.scrollTop);return}const F=B-M;this._model.setScrollTop(R.getDesiredScrollTopFromDelta(F))};N.pageY!==M&&O(N.pageY,x),this._sliderPointerMoveMonitor.startMonitoring(N.target,N.pointerId,N.buttons,B=>O(B.pageY,B.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(N){const M=this._domNode.domNode.getBoundingClientRect().top,R=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(N.pageY-M);this._model.setScrollTop(R)}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 N=["minimap"];return this._model.options.showSlider==="always"?N.push("slider-always"):N.push("slider-mouseover"),this._model.options.autohide&&N.push("autohide"),N.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(N,M){return this._lastRenderData?this._lastRenderData.onLinesChanged(N,M):!1}onLinesDeleted(N,M){var R;return(R=this._lastRenderData)===null||R===void 0||R.onLinesDeleted(N,M),!0}onLinesInserted(N,M){var R;return(R=this._lastRenderData)===null||R===void 0||R.onLinesInserted(N,M),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(r.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(N){return this._lastRenderData?this._lastRenderData.onTokensChanged(N):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(N){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}N.scrollLeft+N.viewportWidth>=N.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const R=h.create(this._model.options,N.viewportStartLineNumber,N.viewportEndLineNumber,N.viewportStartLineNumberVerticalOffset,N.viewportHeight,N.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),N.scrollTop,N.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(R.sliderNeeded?"block":"none"),this._slider.setTop(R.sliderTop),this._slider.setHeight(R.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(R.sliderHeight),this.renderDecorations(R),this._lastRenderData=this.renderLines(R)}renderDecorations(N){if(this._renderDecorations){this._renderDecorations=!1;const M=this._model.getSelections();M.sort(a.Range.compareRangesUsingStarts);const R=this._model.getMinimapDecorationsInViewport(N.startLineNumber,N.endLineNumber);R.sort((ie,ae)=>(ie.options.zIndex||0)-(ae.options.zIndex||0));const{canvasInnerWidth:x,canvasInnerHeight:O}=this._model.options,B=this._model.options.minimapLineHeight,W=this._model.options.minimapCharWidth,V=this._model.getOptions().tabSize,K=this._decorationsCanvas.domNode.getContext("2d");K.clearRect(0,0,x,O);const F=new A(N.startLineNumber,N.endLineNumber,!1);this._renderSelectionLineHighlights(K,M,F,N,B),this._renderDecorationsLineHighlights(K,R,F,N,B);const q=new A(N.startLineNumber,N.endLineNumber,null);this._renderSelectionsHighlights(K,M,q,N,B,V,W,x),this._renderDecorationsHighlights(K,R,q,N,B,V,W,x)}}_renderSelectionLineHighlights(N,M,R,x,O){if(!this._selectionColor||this._selectionColor.isTransparent())return;N.fillStyle=this._selectionColor.transparent(.5).toString();let B=0,W=0;for(const V of M){const K=x.intersectWithViewport(V);if(!K)continue;const[F,q]=K;for(let ne=F;ne<=q;ne++)R.set(ne,!0);const ie=x.getYForLineNumber(F,O),ae=x.getYForLineNumber(q,O);W>=ie||(W>B&&N.fillRect(b.MINIMAP_GUTTER_WIDTH,B,N.canvas.width,W-B),B=ie),W=ae}W>B&&N.fillRect(b.MINIMAP_GUTTER_WIDTH,B,N.canvas.width,W-B)}_renderDecorationsLineHighlights(N,M,R,x,O){const B=new Map;for(let W=M.length-1;W>=0;W--){const V=M[W],K=V.options.minimap;if(!K||K.position!==d.MinimapPosition.Inline)continue;const F=x.intersectWithViewport(V.range);if(!F)continue;const[q,ie]=F,ae=K.getColor(this._theme.value);if(!ae||ae.isTransparent())continue;let ne=B.get(ae.toString());ne||(ne=ae.transparent(.5).toString(),B.set(ae.toString(),ne)),N.fillStyle=ne;for(let $=q;$<=ie;$++){if(R.has($))continue;R.set($,!0);const J=x.getYForLineNumber(q,O);N.fillRect(b.MINIMAP_GUTTER_WIDTH,J,N.canvas.width,O)}}}_renderSelectionsHighlights(N,M,R,x,O,B,W,V){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const K of M){const F=x.intersectWithViewport(K);if(!F)continue;const[q,ie]=F;for(let ae=q;ae<=ie;ae++)this.renderDecorationOnLine(N,R,K,this._selectionColor,x,ae,O,O,B,W,V)}}_renderDecorationsHighlights(N,M,R,x,O,B,W,V){for(const K of M){const F=K.options.minimap;if(!F)continue;const q=x.intersectWithViewport(K.range);if(!q)continue;const[ie,ae]=q,ne=F.getColor(this._theme.value);if(!(!ne||ne.isTransparent()))for(let $=ie;$<=ae;$++)switch(F.position){case d.MinimapPosition.Inline:this.renderDecorationOnLine(N,R,K.range,ne,x,$,O,O,B,W,V);continue;case d.MinimapPosition.Gutter:{const J=x.getYForLineNumber($,O),Q=2;this.renderDecoration(N,ne,Q,J,o,O);continue}}}}renderDecorationOnLine(N,M,R,x,O,B,W,V,K,F,q){const ie=O.getYForLineNumber(B,V);if(ie+W<0||ie>this._model.options.canvasInnerHeight)return;const{startLineNumber:ae,endLineNumber:ne}=R,$=ae===B?R.startColumn:1,J=ne===B?R.endColumn:this._model.getLineMaxColumn(B),Q=this.getXOffsetForPosition(M,B,$,K,F,q),re=this.getXOffsetForPosition(M,B,J,K,F,q);this.renderDecoration(N,x,Q,ie,re-Q,W)}getXOffsetForPosition(N,M,R,x,O,B){if(R===1)return b.MINIMAP_GUTTER_WIDTH;if((R-1)*O>=B)return B;let V=N.get(M);if(!V){const K=this._model.getLineContent(M);V=[b.MINIMAP_GUTTER_WIDTH];let F=b.MINIMAP_GUTTER_WIDTH;for(let q=1;q<K.length+1;q++){const ie=K.charCodeAt(q-1),ae=ie===9?x*O:p.isFullWidthCharacter(ie)?2*O:O,ne=F+ae;if(ne>=B){V[q]=B;break}V[q]=ne,F=ne}N.set(M,V)}return R-1<V.length?V[R-1]:B}renderDecoration(N,M,R,x,O,B){N.fillStyle=M&&M.toString()||"",N.fillRect(R,x,O,B)}renderLines(N){const M=N.startLineNumber,R=N.endLineNumber,x=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(N)){const le=this._lastRenderData._get();return new C(N,le.imageData,le.lines)}const O=this._getBuffer();if(!O)return null;const[B,W,V]=T._renderUntouchedLines(O,N.topPaddingLineCount,M,R,x,this._lastRenderData),K=this._model.getMinimapLinesRenderingData(M,R,V),F=this._model.getOptions().tabSize,q=this._model.options.defaultBackgroundColor,ie=this._model.options.backgroundColor,ae=this._model.options.foregroundAlpha,ne=this._model.tokensColorTracker,$=ne.backgroundIsLight(),J=this._model.options.renderMinimap,Q=this._model.options.charRenderer(),re=this._model.options.fontScale,de=this._model.options.minimapCharWidth,me=(J===1?2:2+1)*re,X=x>me?Math.floor((x-me)/2):0,U=ie.a/255,G=new i.RGBA8(Math.round((ie.r-q.r)*U+q.r),Math.round((ie.g-q.g)*U+q.g),Math.round((ie.b-q.b)*U+q.b),255);let z=N.topPaddingLineCount*x;const H=[];for(let le=0,ue=R-M+1;le<ue;le++)V[le]&&T._renderLine(O,G,ie.a,$,J,de,ne,ae,Q,z,X,F,K[le],re,x),H[le]=new m(z),z+=x;const Y=B===-1?0:B,Z=(W===-1?O.height:W)-Y;return this._canvas.domNode.getContext("2d").putImageData(O,0,0,0,Y,O.width,Z),new C(N,O,H)}static _renderUntouchedLines(N,M,R,x,O,B){const W=[];if(!B){for(let z=0,H=x-R+1;z<H;z++)W[z]=!0;return[-1,-1,W]}const V=B._get(),K=V.imageData.data,F=V.rendLineNumberStart,q=V.lines,ie=q.length,ae=N.width,ne=N.data,$=(x-R+1)*O*ae*4;let J=-1,Q=-1,re=-1,de=-1,he=-1,me=-1,X=M*O;for(let z=R;z<=x;z++){const H=z-R,Y=z-F,j=Y>=0&&Y<ie?q[Y].dy:-1;if(j===-1){W[H]=!0,X+=O;continue}const Z=j*ae*4,ee=(j+O)*ae*4,le=X*ae*4,ue=(X+O)*ae*4;de===Z&&me===le?(de=ee,me=ue):(re!==-1&&(ne.set(K.subarray(re,de),he),J===-1&&re===0&&re===he&&(J=de),Q===-1&&de===$&&re===he&&(Q=re)),re=Z,de=ee,he=le,me=ue),W[H]=!1,X+=O}re!==-1&&(ne.set(K.subarray(re,de),he),J===-1&&re===0&&re===he&&(J=de),Q===-1&&de===$&&re===he&&(Q=re));const U=J===-1?-1:J/(ae*4),G=Q===-1?-1:Q/(ae*4);return[U,G,W]}static _renderLine(N,M,R,x,O,B,W,V,K,F,q,ie,ae,ne,$){const J=ae.content,Q=ae.tokens,re=N.width-B,de=$===1;let he=b.MINIMAP_GUTTER_WIDTH,me=0,X=0;for(let U=0,G=Q.getCount();U<G;U++){const z=Q.getEndOffset(U),H=Q.getForeground(U),Y=W.getColor(H);for(;me<z;me++){if(he>re)return;const j=J.charCodeAt(me);if(j===9){const Z=ie-(me+X)%ie;X+=Z-1,he+=Z*B}else if(j===32)he+=B;else{const Z=p.isFullWidthCharacter(j)?2:1;for(let ee=0;ee<Z;ee++)if(O===2?K.blockRenderChar(N,he,F+q,Y,V,M,R,de):K.renderChar(N,he,F+q,j,Y,V,M,R,ne,x,de),he+=B,he>re)return}}}}}class A{constructor(N,M,R){this._startLineNumber=N,this._endLineNumber=M,this._defaultValue=R,this._values=[];for(let x=0,O=this._endLineNumber-this._startLineNumber+1;x<O;x++)this._values[x]=R}has(N){return this.get(N)!==this._defaultValue}set(N,M){N<this._startLineNumber||N>this._endLineNumber||(this._values[N-this._startLineNumber]=M)}get(N){return N<this._startLineNumber||N>this._endLineNumber?this._defaultValue:this._values[N-this._startLineNumber]}}}),define(se[835],oe([1,0,633,29]),function(te,e,L,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.multiDiffEditorBorder=e.multiDiffEditorBackground=e.multiDiffEditorHeaderBackground=void 0,e.multiDiffEditorHeaderBackground=(0,k.registerColor)("multiDiffEditor.headerBackground",{dark:"#808080",light:"#b4b4b4",hcDark:"#808080",hcLight:"#b4b4b4"},(0,L.localize)(0,null)),e.multiDiffEditorBackground=(0,k.registerColor)("multiDiffEditor.background",{dark:"#000000",light:"#e5e5e5",hcDark:"#000000",hcLight:"#e5e5e5"},(0,L.localize)(1,null)),e.multiDiffEditorBorder=(0,k.registerColor)("multiDiffEditor.border",{dark:"sideBarSectionHeader.border",light:"#cccccc",hcDark:"sideBarSectionHeader.border",hcLight:"#cccccc"},(0,L.localize)(2,null))}),define(se[254],oe([1,0,722,29,479]),function(te,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(se[836],oe([1,0,26,116,658,177,254]),function(te,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)}),S=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.surroundWith},{kind:k.CodeActionKind.Source,title:(0,y.localize)(7,null),icon:L.Codicon.symbolFile},E]);function p(_,v,b){if(!v)return _.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 a=S.map(n=>({group:n,actions:[]}));for(const n of _){const t=n.action.kind?new k.CodeActionKind(n.action.kind):k.CodeActionKind.None;for(const r of a)if(r.group.kind.contains(t)){r.actions.push(n);break}}const i=[];for(const n of a)if(n.actions.length){i.push({kind:"header",group:n.group});for(const t of n.actions){const r=n.group;i.push({kind:"action",item:t,group:t.action.isAI?{title:r.title,kind:r.kind,icon:L.Codicon.sparkle}:r,label:t.action.title,disabled:!!t.action.disabled,keybinding:b(t.action)})}}return i}e.toMenuItems=p}),define(se[106],oe([1,0,29,39]),function(te,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(S,p){const _={...p};for(const v in S){const b=S[v];_[v]=b!==void 0?(0,L.asCssVariable)(b):void 0}return _}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),listDropOverBackground:(0,L.asCssVariable)(L.listDropOverBackground),listDropBetweenBackground:(0,L.asCssVariable)(L.listDropBetweenBackground),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(S){return y(S,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,listDropOverBackground:void 0,listDropBetweenBackground: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(se[837],oe([1,0,7,319,320,230,71,2,49,68,683,8,34,164,106,161]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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 r.ReferencesModel||w instanceof r.FileReferences}getChildren(w){if(w instanceof r.ReferencesModel)return w.groups;if(w instanceof r.FileReferences)return w.resolve(this._resolverService).then(D=>D.children);throw new Error("bad tree")}};e.DataSource=f,e.DataSource=f=ke([ge(0,v.ITextModelService)],f);class c{getHeight(){return 23}getTemplateId(w){return w instanceof r.FileReferences?o.id:h.id}}e.Delegate=c;let d=class{constructor(w){this._keybindingService=w}getKeyboardNavigationLabel(w){var D;if(w instanceof r.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,_.basename)(w.uri)}};e.StringRepresentationProvider=d,e.StringRepresentationProvider=d=ke([ge(0,i.IKeybindingService)],d);class s{getId(w){return w instanceof r.OneReference?w.id:w.uri}}e.IdentityProvider=s;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,_.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 T=w.children.length;this.badge.setCount(T),T>1?this.badge.setTitleFormat((0,b.localize)(0,null,T)):this.badge.setTitleFormat((0,b.localize)(1,null,T))}};l=ke([ge(1,n.ILabelService)],l);let o=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,S.createMatches)(w.filterData))}disposeTemplate(w){w.dispose()}};e.FileReferencesRenderer=o,o.id="FileReferencesRenderer",e.FileReferencesRenderer=o=u=ke([ge(0,a.IInstantiationService)],o);class g{constructor(w){this.label=new y.HighlightedLabel(w)}set(w,D){var I;const T=(I=w.parent.getPreview(w))===null||I===void 0?void 0:I.preview(w.range);if(!T||!T.value)this.label.set(`${(0,_.basename)(w.uri)}:${w.range.startLineNumber+1}:${w.range.startColumn+1}`);else{const{value:A,highlight:P}=T;D&&!S.FuzzyScore.isDefault(D)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(A,(0,S.createMatches)(D))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(A,[P]))}}}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(se[838],oe([1,0,7,224,119,19,26,2,17,28,731,59,34,106,29,276]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 r{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,_.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(S.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(),T=(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&&T?this._supportsPreview&&g.canPreview?m.container.title=(0,b.localize)(0,null,I,T):m.container.title=(0,b.localize)(1,null,I):m.container.title=""}disposeTemplate(g){}};u=ke([ge(1,i.IKeybindingService)],u);class f extends UIEvent{constructor(){super("acceptSelectedAction")}}class c extends UIEvent{constructor(){super("previewSelectedAction")}}function d(o){if(o.kind==="action")return o.label}let s=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:T=>T.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:T=>T.kind};this._list=this._register(new y.List(g,this.domNode,I,[new u(h,this._keybindingService),new r],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:d},accessibilityProvider:{getAriaLabel:T=>{if(T.kind==="action"){let A=T.label?l(T?.label):"";return T.disabled&&(A=(0,b.localize)(2,null,A,T.disabled)),A}return null},getWidgetAriaLabel:()=>(0,b.localize)(3,null),getRole:T=>T.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(n.defaultListStyles),this._register(this._list.onMouseClick(T=>this.onListClick(T))),this._register(this._list.onMouseOver(T=>this.onListHover(T))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(T=>this.onListSelection(T))),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(T=>T.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 T=this._allMenuItems.map((A,P)=>{const N=this.domNode.ownerDocument.getElementById(this._list.getElementID(P));if(N){N.style.width="auto";const M=N.getBoundingClientRect().width;return N.style.width="",M}return 0});w=Math.max(...T,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;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=s,e.ActionList=s=ke([ge(4,a.IContextViewService),ge(5,i.IKeybindingService)],s);function l(o){return o.replace(/\r\n|\r|\n/g," ")}}),define(se[839],oe([1,0,7,78,2,732,838,30,15,59,45,8,29,276]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 _.RawContextKey("codeActionMenuVisible",!1,(0,E.localize)(1,null))};e.IActionWidgetService=(0,a.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,s,l,o,g){const h=n.Visible.bindTo(this._contextKeyService),m=this._instantiationService.createInstance(S.ActionList,f,c,d,s);this._contextViewService.showContextView({getAnchor:()=>l,render:C=>(h.set(!0),this._renderWidget(C,m,g??[])),onHide:C=>{h.reset(),this._onWidgetClosed(C)}},o,!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 s;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 o=new y.DisposableStore,g=document.createElement("div"),h=f.appendChild(g);h.classList.add("context-view-block"),o.add(L.addDisposableListener(h,L.EventType.MOUSE_DOWN,T=>T.stopPropagation()));const m=document.createElement("div"),C=f.appendChild(m);C.classList.add("context-view-pointerBlock"),o.add(L.addDisposableListener(C,L.EventType.POINTER_MOVE,()=>C.remove())),o.add(L.addDisposableListener(C,L.EventType.MOUSE_DOWN,()=>C.remove()));let w=0;if(d.length){const T=this._createActionBar(".action-widget-action-bar",d);T&&(l.appendChild(T.getContainer().parentElement),o.add(T),w=T.getContainer().offsetWidth)}const D=(s=this._list.value)===null||s===void 0?void 0:s.layout(w);l.style.width=`${D}px`;const I=o.add(L.trackFocus(f));return o.add(I.onDidBlur(()=>this.hide())),o}_createActionBar(f,c){if(!c.length)return;const d=L.$(f),s=new k.ActionBar(d);return s.push(c,{icon:!1,label:!0}),s}_onWidgetClosed(f){var c;(c=this._list.value)===null||c===void 0||c.hide(f)}};t=ke([ge(0,v.IContextViewService),ge(1,_.IContextKeyService),ge(2,a.IInstantiationService)],t),(0,b.registerSingleton)(e.IActionWidgetService,t,1);const r=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:r,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:r,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:r,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:S.acceptSelectedActionCommand,title:{value:(0,E.localize)(5,null),original:"Accept selected action"},precondition:n.Visible,keybinding:{weight:r,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:S.previewSelectedActionCommand,title:{value:(0,E.localize)(6,null),original:"Preview selected action"},precondition:n.Visible,keybinding:{weight:r,primary:2051}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.acceptSelected(!0)}})}),define(se[840],oe([1,0,7,67,599,42,12,2,106]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class v{constructor(a,i,n,t){this.contextViewService=a,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(a){this.options=a}showContextMenu(a){const i=a.getActions();if(!i.length)return;this.focusToReturn=(0,L.getActiveElement)();let n;const t=a.domForShadowRoot instanceof HTMLElement?a.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>a.getAnchor(),canRelayout:!1,anchorAlignment:a.anchorAlignment,anchorAxisAlignment:a.anchorAxisAlignment,render:r=>{var u;this.lastContainer=r;const f=a.getMenuClassName?a.getMenuClassName():"";f&&(r.className+=" "+f),this.options.blockMouse&&(this.block=r.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=a.actionRunner||new E.ActionRunner;d.onWillRun(l=>this.onActionRun(l,!a.skipTelemetry),this,c),d.onDidRun(this.onDidActionRun,this,c),n=new y.Menu(r,i,{actionViewItemProvider:a.getActionViewItem,context:a.getActionsContext?a.getActionsContext():null,actionRunner:d,getKeyBinding:a.getKeyBinding?a.getKeyBinding:l=>this.keybindingService.lookupKeybinding(l.id)},_.defaultMenuStyles),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,c),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,c);const s=(0,L.getWindow)(r);return c.add((0,L.addDisposableListener)(s,L.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),c.add((0,L.addDisposableListener)(s,L.EventType.MOUSE_DOWN,l=>{if(l.defaultPrevented)return;const o=new k.StandardMouseEvent(s,l);let g=o.target;if(!o.rightButton){for(;g;){if(g===r)return;g=g.parentElement}this.contextViewService.hideContextView(!0)}})),(0,p.combinedDisposable)(c,n)},focus:()=>{n?.focus(!!a.autoSelectFirstItem)},onHide:r=>{var u,f,c;(u=a.onHide)===null||u===void 0||u.call(a,!!r),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(a,i){i&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:a.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(a){a.error&&!(0,S.isCancellationError)(a.error)&&this.notificationService.error(a.error)}}e.ContextMenuHandler=v}),define(se[192],oe([1,0,7,594,119,595,187,602,601,326,6,2,744,27,98,15,242,59,8,34,37,106]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l){"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.WorkbenchTreeStickyScrollFocused=e.RawWorkbenchListFocusContextKey=e.WorkbenchListScrollAtBottomContextKey=e.WorkbenchListScrollAtTopContextKey=e.RawWorkbenchListScrollAtBoundaryContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,c.createDecorator)("listService");class o{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new a.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(ce){var pe,ve;ce!==this._lastFocusedWidget&&((pe=this._lastFocusedWidget)===null||pe===void 0||pe.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=ce,(ve=this._lastFocusedWidget)===null||ve===void 0||ve.getHTMLElement().classList.add("last-focused"))}register(ce,pe){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new y.DefaultStyleController((0,L.createStyleSheet)(),"").style(l.defaultListStyles)),this.lists.some(Ce=>Ce.widget===ce))throw new Error("Cannot register the same widget multiple times");const ve={widget:ce,extraContextKeys:pe};return this.lists.push(ve),(0,L.isActiveElement)(ce.getHTMLElement())&&this.setLastFocusedList(ce),(0,a.combinedDisposable)(ce.onDidFocus(()=>this.setLastFocusedList(ce)),(0,a.toDisposable)(()=>this.lists.splice(this.lists.indexOf(ve),1)),ce.onDidDispose(()=>{this.lists=this.lists.filter(Ce=>Ce!==ve),this._lastFocusedWidget===ce&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}e.ListService=o,e.RawWorkbenchListScrollAtBoundaryContextKey=new r.RawContextKey("listScrollAtBoundary","none"),e.WorkbenchListScrollAtTopContextKey=r.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("top"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.WorkbenchListScrollAtBottomContextKey=r.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("bottom"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.RawWorkbenchListFocusContextKey=new r.RawContextKey("listFocus",!0),e.WorkbenchTreeStickyScrollFocused=new r.RawContextKey("treestickyScrollFocused",!1),e.WorkbenchListSupportsMultiSelectContextKey=new r.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=r.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,r.ContextKeyExpr.not(u.InputFocusedContextKey),e.WorkbenchTreeStickyScrollFocused.negate()),e.WorkbenchListHasSelectionOrFocus=new r.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new r.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new r.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new r.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new r.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new r.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new r.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new r.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new r.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new r.RawContextKey("treeFindOpen",!1);const g="listTypeNavigationMode",h="listAutomaticKeyboardNavigation";function m(ue,ce){const pe=ue.createScoped(ce.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(pe),pe}function C(ue,ce){const pe=e.RawWorkbenchListScrollAtBoundaryContextKey.bindTo(ue),ve=()=>{const Ce=ce.scrollTop===0,Se=ce.scrollHeight-ce.renderHeight-ce.scrollTop<1;Ce&&Se?pe.set("both"):Ce?pe.set("top"):Se?pe.set("bottom"):pe.set("none")};return ve(),ce.onDidScroll(ve)}const w="workbench.list.multiSelectModifier",D="workbench.list.openMode",I="workbench.list.horizontalScrolling",T="workbench.list.defaultFindMode",A="workbench.list.typeNavigationMode",P="workbench.list.keyboardNavigation",N="workbench.list.scrollByPage",M="workbench.list.defaultFindMatchType",R="workbench.tree.indent",x="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",B="workbench.list.mouseWheelScrollSensitivity",W="workbench.list.fastScrollSensitivity",V="workbench.tree.expandMode",K="workbench.tree.enableStickyScroll",F="workbench.tree.stickyScrollMaxItemCount";function q(ue){return ue.getValue(w)==="alt"}class ie extends a.Disposable{constructor(ce){super(),this.configurationService=ce,this.useAltAsMultipleSelectionModifier=q(ce),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(ce=>{ce.affectsConfiguration(w)&&(this.useAltAsMultipleSelectionModifier=q(this.configurationService))}))}isSelectionSingleChangeEvent(ce){return this.useAltAsMultipleSelectionModifier?ce.browserEvent.altKey:(0,y.isSelectionSingleChangeEvent)(ce)}isSelectionRangeChangeEvent(ce){return(0,y.isSelectionRangeChangeEvent)(ce)}}function ae(ue,ce){var pe;const ve=ue.get(n.IConfigurationService),Ce=ue.get(d.IKeybindingService),Se=new a.DisposableStore;return[{...ce,keyboardNavigationDelegate:{mightProducePrintableCharacter(Ee){return Ce.mightProducePrintableCharacter(Ee)}},smoothScrolling:!!ve.getValue(O),mouseWheelScrollSensitivity:ve.getValue(B),fastScrollSensitivity:ve.getValue(W),multipleSelectionController:(pe=ce.multipleSelectionController)!==null&&pe!==void 0?pe:Se.add(new ie(ve)),keyboardNavigationEventFilter:me(Ce),scrollByPage:!!ve.getValue(N)},Se]}let ne=class extends y.List{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe){const Be=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!Ae.getValue(I),[De,Ie]=xe.invokeFunction(ae,Se);super(ce,pe,ve,Ce,{keyboardSupport:!1,...De,horizontalScrolling:Be}),this.disposables.add(Ie),this.contextKeyService=m(_e,this),this.disposables.add(C(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Se.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Se.horizontalScrolling,this._useAltAsMultipleSelectionModifier=q(Ae),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const be=this.getSelection(),Ne=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(be.length>0||Ne.length>0),this.listMultiSelection.set(be.length>1),this.listDoubleSelection.set(be.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const be=this.getSelection(),Ne=this.getFocus();this.listHasSelectionOrFocus.set(be.length>0||Ne.length>0)})),this.disposables.add(Ae.onDidChangeConfiguration(be=>{be.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=q(Ae));let Ne={};if(be.affectsConfiguration(I)&&this.horizontalScrolling===void 0){const Pe=!!Ae.getValue(I);Ne={...Ne,horizontalScrolling:Pe}}if(be.affectsConfiguration(N)){const Pe=!!Ae.getValue(N);Ne={...Ne,scrollByPage:Pe}}if(be.affectsConfiguration(O)){const Pe=!!Ae.getValue(O);Ne={...Ne,smoothScrolling:Pe}}if(be.affectsConfiguration(B)){const Pe=Ae.getValue(B);Ne={...Ne,mouseWheelScrollSensitivity:Pe}}if(be.affectsConfiguration(W)){const Pe=Ae.getValue(W);Ne={...Ne,fastScrollSensitivity:Pe}}Object.keys(Ne).length>0&&this.updateOptions(Ne)})),this.navigator=new re(this,{configurationService:Ae,...Se}),this.disposables.add(this.navigator)}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles!==void 0&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this.style(ce?(0,l.getListStyles)(ce):l.defaultListStyles)}};e.WorkbenchList=ne,e.WorkbenchList=ne=ke([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,n.IConfigurationService),ge(8,c.IInstantiationService)],ne);let $=class extends k.PagedList{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe){const Be=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:!!Ae.getValue(I),[De,Ie]=xe.invokeFunction(ae,Se);super(ce,pe,ve,Ce,{keyboardSupport:!1,...De,horizontalScrolling:Be}),this.disposables=new a.DisposableStore,this.disposables.add(Ie),this.contextKeyService=m(_e,this),this.disposables.add(C(this.contextKeyService,this.widget)),this.horizontalScrolling=Se.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!Se.selectionNavigation),this._useAltAsMultipleSelectionModifier=q(Ae),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(Se.overrideStyles),this.disposables.add(Ae.onDidChangeConfiguration(be=>{be.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=q(Ae));let Ne={};if(be.affectsConfiguration(I)&&this.horizontalScrolling===void 0){const Pe=!!Ae.getValue(I);Ne={...Ne,horizontalScrolling:Pe}}if(be.affectsConfiguration(N)){const Pe=!!Ae.getValue(N);Ne={...Ne,scrollByPage:Pe}}if(be.affectsConfiguration(O)){const Pe=!!Ae.getValue(O);Ne={...Ne,smoothScrolling:Pe}}if(be.affectsConfiguration(B)){const Pe=Ae.getValue(B);Ne={...Ne,mouseWheelScrollSensitivity:Pe}}if(be.affectsConfiguration(W)){const Pe=Ae.getValue(W);Ne={...Ne,fastScrollSensitivity:Pe}}Object.keys(Ne).length>0&&this.updateOptions(Ne)})),this.navigator=new re(this,{configurationService:Ae,...Se}),this.disposables.add(this.navigator)}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles!==void 0&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this.style(ce?(0,l.getListStyles)(ce):l.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=$,e.WorkbenchPagedList=$=ke([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,n.IConfigurationService),ge(8,c.IInstantiationService)],$);let J=class extends E.Table{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be){const De=typeof _e.horizontalScrolling<"u"?_e.horizontalScrolling:!!xe.getValue(I),[Ie,fe]=Be.invokeFunction(ae,_e);super(ce,pe,ve,Ce,Se,{keyboardSupport:!1,...Ie,horizontalScrolling:De}),this.disposables.add(fe),this.contextKeyService=m(Ee,this),this.disposables.add(C(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=q(xe),this.disposables.add(this.contextKeyService),this.disposables.add(Ae.register(this)),this.updateStyles(_e.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ne=this.getSelection(),Pe=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ne.length>0||Pe.length>0),this.listMultiSelection.set(Ne.length>1),this.listDoubleSelection.set(Ne.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ne=this.getSelection(),Pe=this.getFocus();this.listHasSelectionOrFocus.set(Ne.length>0||Pe.length>0)})),this.disposables.add(xe.onDidChangeConfiguration(Ne=>{Ne.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=q(xe));let Pe={};if(Ne.affectsConfiguration(I)&&this.horizontalScrolling===void 0){const ze=!!xe.getValue(I);Pe={...Pe,horizontalScrolling:ze}}if(Ne.affectsConfiguration(N)){const ze=!!xe.getValue(N);Pe={...Pe,scrollByPage:ze}}if(Ne.affectsConfiguration(O)){const ze=!!xe.getValue(O);Pe={...Pe,smoothScrolling:ze}}if(Ne.affectsConfiguration(B)){const ze=xe.getValue(B);Pe={...Pe,mouseWheelScrollSensitivity:ze}}if(Ne.affectsConfiguration(W)){const ze=xe.getValue(W);Pe={...Pe,fastScrollSensitivity:ze}}Object.keys(Pe).length>0&&this.updateOptions(Pe)})),this.navigator=new de(this,{configurationService:xe,..._e}),this.disposables.add(this.navigator)}updateOptions(ce){super.updateOptions(ce),ce.overrideStyles!==void 0&&this.updateStyles(ce.overrideStyles),ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyles(ce){this.style(ce?(0,l.getListStyles)(ce):l.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=J,e.WorkbenchTable=J=ke([ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService),ge(9,c.IInstantiationService)],J);class Q extends a.Disposable{constructor(ce,pe){var ve;super(),this.widget=ce,this._onDidOpen=this._register(new b.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(b.Event.filter(this.widget.onDidChangeSelection,Ce=>(0,L.isKeyboardEvent)(Ce.browserEvent))(Ce=>this.onSelectionFromKeyboard(Ce))),this._register(this.widget.onPointer(Ce=>this.onPointer(Ce.element,Ce.browserEvent))),this._register(this.widget.onMouseDblClick(Ce=>this.onMouseDblClick(Ce.element,Ce.browserEvent))),typeof pe?.openOnSingleClick!="boolean"&&pe?.configurationService?(this.openOnSingleClick=pe?.configurationService.getValue(D)!=="doubleClick",this._register(pe?.configurationService.onDidChangeConfiguration(Ce=>{Ce.affectsConfiguration(D)&&(this.openOnSingleClick=pe?.configurationService.getValue(D)!=="doubleClick")}))):this.openOnSingleClick=(ve=pe?.openOnSingleClick)!==null&&ve!==void 0?ve:!0}onSelectionFromKeyboard(ce){if(ce.elements.length!==1)return;const pe=ce.browserEvent,ve=typeof pe.preserveFocus=="boolean"?pe.preserveFocus:!0,Ce=typeof pe.pinned=="boolean"?pe.pinned:!ve,Se=!1;this._open(this.getSelectedElement(),ve,Ce,Se,ce.browserEvent)}onPointer(ce,pe){if(!this.openOnSingleClick||pe.detail===2)return;const Ce=pe.button===1,Se=!0,_e=Ce,Ee=pe.ctrlKey||pe.metaKey||pe.altKey;this._open(ce,Se,_e,Ee,pe)}onMouseDblClick(ce,pe){if(!pe)return;const ve=pe.target;if(ve.classList.contains("monaco-tl-twistie")||ve.classList.contains("monaco-icon-label")&&ve.classList.contains("folder-icon")&&pe.offsetX<16)return;const Se=!1,_e=!0,Ee=pe.ctrlKey||pe.metaKey||pe.altKey;this._open(ce,Se,_e,Ee,pe)}_open(ce,pe,ve,Ce,Se){ce&&this._onDidOpen.fire({editorOptions:{preserveFocus:pe,pinned:ve,revealIfVisible:!0},sideBySide:Ce,element:ce,browserEvent:Se})}}class re extends Q{constructor(ce,pe){super(ce,pe),this.widget=ce}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class de extends Q{constructor(ce,pe){super(ce,pe)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class he extends Q{constructor(ce,pe){super(ce,pe)}getSelectedElement(){var ce;return(ce=this.widget.getSelection()[0])!==null&&ce!==void 0?ce:void 0}}function me(ue){let ce=!1;return pe=>{if(pe.toKeyCodeChord().isModifierKey())return!1;if(ce)return ce=!1,!1;const ve=ue.softDispatch(pe,pe.target);return ve.kind===1?(ce=!0,!1):(ce=!1,ve.kind===0)}}let X=class extends v.ObjectTree{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe){const{options:Be,getTypeNavigationMode:De,disposable:Ie}=_e.invokeFunction(Z,Se);super(ce,pe,ve,Ce,Be),this.disposables.add(Ie),this.internals=new ee(this,Se,De,Se.overrideStyles,Ee,Ae,xe),this.disposables.add(this.internals)}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};e.WorkbenchObjectTree=X,e.WorkbenchObjectTree=X=ke([ge(5,c.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService)],X);let U=class extends v.CompressibleObjectTree{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe){const{options:Be,getTypeNavigationMode:De,disposable:Ie}=_e.invokeFunction(Z,Se);super(ce,pe,ve,Ce,Be),this.disposables.add(Ie),this.internals=new ee(this,Se,De,Se.overrideStyles,Ee,Ae,xe),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};e.WorkbenchCompressibleObjectTree=U,e.WorkbenchCompressibleObjectTree=U=ke([ge(5,c.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService)],U);let G=class extends _.DataTree{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be){const{options:De,getTypeNavigationMode:Ie,disposable:fe}=Ee.invokeFunction(Z,_e);super(ce,pe,ve,Ce,Se,De),this.disposables.add(fe),this.internals=new ee(this,_e,Ie,_e.overrideStyles,Ae,xe,Be),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles!==void 0&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};e.WorkbenchDataTree=G,e.WorkbenchDataTree=G=ke([ge(6,c.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,n.IConfigurationService)],G);let z=class extends p.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be){const{options:De,getTypeNavigationMode:Ie,disposable:fe}=Ee.invokeFunction(Z,_e);super(ce,pe,ve,Ce,Se,De),this.disposables.add(fe),this.internals=new ee(this,_e,Ie,_e.overrideStyles,Ae,xe,Be),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};e.WorkbenchAsyncDataTree=z,e.WorkbenchAsyncDataTree=z=ke([ge(6,c.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,n.IConfigurationService)],z);let H=class extends p.CompressibleAsyncDataTree{constructor(ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be,De){const{options:Ie,getTypeNavigationMode:fe,disposable:be}=Ae.invokeFunction(Z,Ee);super(ce,pe,ve,Ce,Se,_e,Ie),this.disposables.add(be),this.internals=new ee(this,Ee,fe,Ee.overrideStyles,xe,Be,De),this.disposables.add(this.internals)}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};e.WorkbenchCompressibleAsyncDataTree=H,e.WorkbenchCompressibleAsyncDataTree=H=ke([ge(7,c.IInstantiationService),ge(8,r.IContextKeyService),ge(9,e.IListService),ge(10,n.IConfigurationService)],H);function Y(ue){const ce=ue.getValue(T);if(ce==="highlight")return S.TreeFindMode.Highlight;if(ce==="filter")return S.TreeFindMode.Filter;const pe=ue.getValue(P);if(pe==="simple"||pe==="highlight")return S.TreeFindMode.Highlight;if(pe==="filter")return S.TreeFindMode.Filter}function j(ue){const ce=ue.getValue(M);if(ce==="fuzzy")return S.TreeFindMatchType.Fuzzy;if(ce==="contiguous")return S.TreeFindMatchType.Contiguous}function Z(ue,ce){var pe;const ve=ue.get(n.IConfigurationService),Ce=ue.get(f.IContextViewService),Se=ue.get(r.IContextKeyService),_e=ue.get(c.IInstantiationService),Ee=()=>{const fe=Se.getContextKeyValue(g);if(fe==="automatic")return y.TypeNavigationMode.Automatic;if(fe==="trigger"||Se.getContextKeyValue(h)===!1)return y.TypeNavigationMode.Trigger;const Ne=ve.getValue(A);if(Ne==="automatic")return y.TypeNavigationMode.Automatic;if(Ne==="trigger")return y.TypeNavigationMode.Trigger},Ae=ce.horizontalScrolling!==void 0?ce.horizontalScrolling:!!ve.getValue(I),[xe,Be]=_e.invokeFunction(ae,ce),De=ce.paddingBottom,Ie=ce.renderIndentGuides!==void 0?ce.renderIndentGuides:ve.getValue(x);return{getTypeNavigationMode:Ee,disposable:Be,options:{keyboardSupport:!1,...xe,indent:typeof ve.getValue(R)=="number"?ve.getValue(R):void 0,renderIndentGuides:Ie,smoothScrolling:!!ve.getValue(O),defaultFindMode:Y(ve),defaultFindMatchType:j(ve),horizontalScrolling:Ae,scrollByPage:!!ve.getValue(N),paddingBottom:De,hideTwistiesOfChildlessElements:ce.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(pe=ce.expandOnlyOnTwistieClick)!==null&&pe!==void 0?pe:ve.getValue(V)==="doubleClick",contextViewProvider:Ce,findWidgetStyles:l.defaultFindWidgetStyles,enableStickyScroll:!!ve.getValue(K),stickyScrollMaxItemCount:Number(ve.getValue(F))}}}let ee=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(ce,pe,ve,Ce,Se,_e,Ee){var Ae;this.tree=ce,this.disposables=[],this.contextKeyService=m(Se,ce),this.disposables.push(C(this.contextKeyService,ce)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(pe.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!pe.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set((Ae=pe.findWidgetEnabled)!==null&&Ae!==void 0?Ae:!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.treeStickyScrollFocused=e.WorkbenchTreeStickyScrollFocused.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=q(Ee),this.updateStyleOverrides(Ce);const Be=()=>{const Ie=ce.getFocus()[0];if(!Ie)return;const fe=ce.getNode(Ie);this.treeElementCanCollapse.set(fe.collapsible&&!fe.collapsed),this.treeElementHasParent.set(!!ce.getParentElement(Ie)),this.treeElementCanExpand.set(fe.collapsible&&fe.collapsed),this.treeElementHasChild.set(!!ce.getFirstElementChild(Ie))},De=new Set;De.add(g),De.add(h),this.disposables.push(this.contextKeyService,_e.register(ce),ce.onDidChangeSelection(()=>{const Ie=ce.getSelection(),fe=ce.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Ie.length>0||fe.length>0),this.hasMultiSelection.set(Ie.length>1),this.hasDoubleSelection.set(Ie.length===2)})}),ce.onDidChangeFocus(()=>{const Ie=ce.getSelection(),fe=ce.getFocus();this.hasSelectionOrFocus.set(Ie.length>0||fe.length>0),Be()}),ce.onDidChangeCollapseState(Be),ce.onDidChangeModel(Be),ce.onDidChangeFindOpenState(Ie=>this.treeFindOpen.set(Ie)),ce.onDidChangeStickyScrollFocused(Ie=>this.treeStickyScrollFocused.set(Ie)),Ee.onDidChangeConfiguration(Ie=>{let fe={};if(Ie.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=q(Ee)),Ie.affectsConfiguration(R)){const be=Ee.getValue(R);fe={...fe,indent:be}}if(Ie.affectsConfiguration(x)&&pe.renderIndentGuides===void 0){const be=Ee.getValue(x);fe={...fe,renderIndentGuides:be}}if(Ie.affectsConfiguration(O)){const be=!!Ee.getValue(O);fe={...fe,smoothScrolling:be}}if(Ie.affectsConfiguration(T)||Ie.affectsConfiguration(P)){const be=Y(Ee);fe={...fe,defaultFindMode:be}}if(Ie.affectsConfiguration(A)||Ie.affectsConfiguration(P)){const be=ve();fe={...fe,typeNavigationMode:be}}if(Ie.affectsConfiguration(M)){const be=j(Ee);fe={...fe,defaultFindMatchType:be}}if(Ie.affectsConfiguration(I)&&pe.horizontalScrolling===void 0){const be=!!Ee.getValue(I);fe={...fe,horizontalScrolling:be}}if(Ie.affectsConfiguration(N)){const be=!!Ee.getValue(N);fe={...fe,scrollByPage:be}}if(Ie.affectsConfiguration(V)&&pe.expandOnlyOnTwistieClick===void 0&&(fe={...fe,expandOnlyOnTwistieClick:Ee.getValue(V)==="doubleClick"}),Ie.affectsConfiguration(K)){const be=Ee.getValue(K);fe={...fe,enableStickyScroll:be}}if(Ie.affectsConfiguration(F)){const be=Math.max(1,Ee.getValue(F));fe={...fe,stickyScrollMaxItemCount:be}}if(Ie.affectsConfiguration(B)){const be=Ee.getValue(B);fe={...fe,mouseWheelScrollSensitivity:be}}if(Ie.affectsConfiguration(W)){const be=Ee.getValue(W);fe={...fe,fastScrollSensitivity:be}}Object.keys(fe).length>0&&ce.updateOptions(fe)}),this.contextKeyService.onDidChangeContext(Ie=>{Ie.affectsSome(De)&&ce.updateOptions({typeNavigationMode:ve()})})),this.navigator=new he(ce,{configurationService:Ee,...pe}),this.disposables.push(this.navigator)}updateOptions(ce){ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyleOverrides(ce){this.tree.style(ce?(0,l.getListStyles)(ce):l.defaultListStyles)}dispose(){this.disposables=(0,a.dispose)(this.disposables)}};ee=ke([ge(4,r.IContextKeyService),ge(5,e.IListService),ge(6,n.IConfigurationService)],ee),s.Registry.as(t.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,i.localize)(0,null),type:"object",properties:{[w]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,i.localize)(1,null),(0,i.localize)(2,null)],default:"ctrlCmd",description:(0,i.localize)(3,null)},[D]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(4,null)},[I]:{type:"boolean",default:!1,description:(0,i.localize)(5,null)},[N]:{type:"boolean",default:!1,description:(0,i.localize)(6,null)},[R]:{type:"number",default:8,minimum:4,maximum:40,description:(0,i.localize)(7,null)},[x]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,i.localize)(8,null)},[O]:{type:"boolean",default:!1,description:(0,i.localize)(9,null)},[B]:{type:"number",default:1,markdownDescription:(0,i.localize)(10,null)},[W]:{type:"number",default:5,markdownDescription:(0,i.localize)(11,null)},[T]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,i.localize)(12,null),(0,i.localize)(13,null)],default:"highlight",description:(0,i.localize)(14,null)},[P]:{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)},[M]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,i.localize)(20,null),(0,i.localize)(21,null)],default:"fuzzy",description:(0,i.localize)(22,null)},[V]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(23,null)},[K]:{type:"boolean",default:!0,description:(0,i.localize)(24,null)},[F]:{type:"number",minimum:1,default:7,markdownDescription:(0,i.localize)(25,null)},[A]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,i.localize)(26,null)}}})}),define(se[82],oe([1,0,14,26,28,6,20,22,753,245,37]),function(te,e,L,k,y,E,S,p,_,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 a;(function(s){function l(o,g){let h=o.defaults;for(;y.ThemeIcon.isThemeIcon(h);){const m=t.getIcon(h.id);if(!m)return;h=m.defaults}return h}s.getDefinition=l})(a||(e.IconContribution=a={}));var i;(function(s){function l(g){return{weight:g.weight,style:g.style,src:g.src.map(h=>({format:h.format,location:h.location.toString()}))}}s.toJSONObject=l;function o(g){const h=m=>(0,S.isString)(m)?m:void 0;if(g&&Array.isArray(g.src)&&g.src.every(m=>(0,S.isString)(m.format)&&(0,S.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)}))}}s.fromJSONObject=o})(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,_.localize)(0,null)},fontCharacter:{type:"string",description:(0,_.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,o,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:o,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),o=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(`|<i class="${o(m)}"></i>|${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(`|<i class="${o(m)}"></i>|${m.id}|`);return g.join(`
|
||
`)}}const t=new n;b.Registry.add(e.Extensions.IconContribution,t);function r(s,l,o,g){return t.registerIcon(s,l,o,g)}e.registerIcon=r;function u(){return t}e.getIconRegistry=u;function f(){const s=(0,k.getCodiconFontCharacters)();for(const l in s){const o="\\"+s[l].toString(16);t.registerIcon(l,{fontCharacter:o})}}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=r("widget-close",k.Codicon.close,(0,_.localize)(2,null)),e.gotoPreviousLocation=r("goto-previous-location",k.Codicon.arrowUp,(0,_.localize)(3,null)),e.gotoNextLocation=r("goto-next-location",k.Codicon.arrowDown,(0,_.localize)(4,null)),e.syncing=y.ThemeIcon.modify(k.Codicon.sync,"spin"),e.spinningLoading=y.ThemeIcon.modify(k.Codicon.loading,"spin")}),define(se[841],oe([1,0,7,93,78,77,42,13,26,2,35,28,72,87,36,62,73,10,5,112,43,94,120,86,622,122,8,82,447]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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",_.Codicon.add,(0,h.localize)(0,null)),I=(0,w.registerIcon)("diff-review-remove",_.Codicon.remove,(0,h.localize)(1,null)),T=(0,w.registerIcon)("diff-review-close",_.Codicon.close,(0,h.localize)(2,null));let A=class extends v.Disposable{constructor(q,ie,ae,ne,$,J,Q,re,de){super(),this._parentNode=q,this._visible=ie,this._setVisible=ae,this._canClose=ne,this._width=$,this._height=J,this._diffs=Q,this._editors=re,this._instantiationService=de,this._state=(0,b.derivedWithStore)(this,(he,me)=>{const X=this._visible.read(he);if(this._parentNode.style.visibility=X?"visible":"hidden",!X)return null;const U=me.add(this._instantiationService.createInstance(P,this._diffs,this._editors,this._setVisible,this._canClose)),G=me.add(this._instantiationService.createInstance(K,this._parentNode,U,this._width,this._height,this._editors));return{model:U,view:G}}).recomputeInitiallyAndOnChange(this._store)}next(){(0,b.transaction)(q=>{const ie=this._visible.get();this._setVisible(!0,q),ie&&this._state.get().model.nextGroup(q)})}prev(){(0,b.transaction)(q=>{this._setVisible(!0,q),this._state.get().model.previousGroup(q)})}close(){(0,b.transaction)(q=>{this._setVisible(!1,q)})}};e.AccessibleDiffViewer=A,A._ttPolicy=(0,k.createTrustedTypesPolicy)("diffReview",{createHTML:F=>F}),e.AccessibleDiffViewer=A=ke([ge(8,C.IInstantiationService)],A);let P=class extends v.Disposable{constructor(q,ie,ae,ne,$){super(),this._diffs=q,this._editors=ie,this._setVisible=ae,this.canClose=ne,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((J,Q)=>this._groups.read(Q)[J]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((J,Q)=>{var re;return(re=this.currentGroup.read(Q))===null||re===void 0?void 0:re.lines[J]}),this._register((0,b.autorun)(J=>{const Q=this._diffs.read(J);if(!Q){this._groups.set([],void 0);return}const re=M(Q,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());(0,b.transaction)(de=>{const he=this._editors.modified.getPosition();if(he){const me=re.findIndex(X=>he?.lineNumber<X.range.modified.endLineNumberExclusive);me!==-1&&this._currentGroupIdx.set(me,de)}this._groups.set(re,de)})})),this._register((0,b.autorun)(J=>{const Q=this.currentElement.read(J);Q?.type===R.Deleted?this._audioCueService.playAudioCue(m.AudioCue.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):Q?.type===R.Added&&this._audioCueService.playAudioCue(m.AudioCue.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register((0,b.autorun)(J=>{var Q;const re=this.currentElement.read(J);if(re&&re.type!==R.Header){const de=(Q=re.modifiedLineNumber)!==null&&Q!==void 0?Q:re.diff.modified.startLineNumber;this._editors.modified.setSelection(c.Range.fromPositions(new f.Position(de,1)))}}))}_goToGroupDelta(q,ie){const ae=this.groups.get();!ae||ae.length<=1||(0,b.subtransaction)(ie,ne=>{this._currentGroupIdx.set(u.OffsetRange.ofLength(ae.length).clipCyclic(this._currentGroupIdx.get()+q),ne),this._currentElementIdx.set(0,ne)})}nextGroup(q){this._goToGroupDelta(1,q)}previousGroup(q){this._goToGroupDelta(-1,q)}_goToLineDelta(q){const ie=this.currentGroup.get();!ie||ie.lines.length<=1||(0,b.transaction)(ae=>{this._currentElementIdx.set(u.OffsetRange.ofLength(ie.lines.length).clip(this._currentElementIdx.get()+q),ae)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(q){const ie=this.currentGroup.get();if(!ie)return;const ae=ie.lines.indexOf(q);ae!==-1&&(0,b.transaction)(ne=>{this._currentElementIdx.set(ae,ne)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const q=this.currentElement.get();q&&(q.type===R.Deleted?(this._editors.original.setSelection(c.Range.fromPositions(new f.Position(q.originalLineNumber,1))),this._editors.original.revealLine(q.originalLineNumber),this._editors.original.focus()):(q.type!==R.Header&&(this._editors.modified.setSelection(c.Range.fromPositions(new f.Position(q.modifiedLineNumber,1))),this._editors.modified.revealLine(q.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};P=ke([ge(4,m.IAudioCueService)],P);const N=3;function M(F,q,ie){const ae=[];for(const ne of(0,p.groupAdjacentBy)(F,($,J)=>J.modified.startLineNumber-$.modified.endLineNumberExclusive<2*N)){const $=[];$.push(new O);const J=new r.LineRange(Math.max(1,ne[0].original.startLineNumber-N),Math.min(ne[ne.length-1].original.endLineNumberExclusive+N,q+1)),Q=new r.LineRange(Math.max(1,ne[0].modified.startLineNumber-N),Math.min(ne[ne.length-1].modified.endLineNumberExclusive+N,ie+1));(0,p.forEachAdjacent)(ne,(he,me)=>{const X=new r.LineRange(he?he.original.endLineNumberExclusive:J.startLineNumber,me?me.original.startLineNumber:J.endLineNumberExclusive),U=new r.LineRange(he?he.modified.endLineNumberExclusive:Q.startLineNumber,me?me.modified.startLineNumber:Q.endLineNumberExclusive);X.forEach(G=>{$.push(new V(G,U.startLineNumber+(G-X.startLineNumber)))}),me&&(me.original.forEach(G=>{$.push(new B(me,G))}),me.modified.forEach(G=>{$.push(new W(me,G))}))});const re=ne[0].modified.join(ne[ne.length-1].modified),de=ne[0].original.join(ne[ne.length-1].original);ae.push(new x(new d.LineRangeMapping(re,de),$))}return ae}var R;(function(F){F[F.Header=0]="Header",F[F.Unchanged=1]="Unchanged",F[F.Deleted=2]="Deleted",F[F.Added=3]="Added"})(R||(R={}));class x{constructor(q,ie){this.range=q,this.lines=ie}}class O{constructor(){this.type=R.Header}}class B{constructor(q,ie){this.diff=q,this.originalLineNumber=ie,this.type=R.Deleted,this.modifiedLineNumber=void 0}}class W{constructor(q,ie){this.diff=q,this.modifiedLineNumber=ie,this.type=R.Added,this.originalLineNumber=void 0}}class V{constructor(q,ie){this.originalLineNumber=q,this.modifiedLineNumber=ie,this.type=R.Unchanged}}let K=class extends v.Disposable{constructor(q,ie,ae,ne,$,J){super(),this._element=q,this._model=ie,this._width=ae,this._height=ne,this._editors=$,this._languageService=J,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const Q=document.createElement("div");Q.className="diff-review-actions",this._actionBar=this._register(new y.ActionBar(Q)),this._register((0,b.autorun)(re=>{this._actionBar.clear(),this._model.canClose.read(re)&&this._actionBar.push(new S.Action("diffreview.close",(0,h.localize)(3,null),"close-diff-review "+a.ThemeIcon.asClassName(T),!0,async()=>ie.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(),Q),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)((re,de)=>{this._model.currentGroup.read(re),this._render(de)})),this._register((0,L.addStandardDisposableListener)(this.domNode,"keydown",re=>{(re.equals(18)||re.equals(2066)||re.equals(530))&&(re.preventDefault(),this._model.goToNextLine()),(re.equals(16)||re.equals(2064)||re.equals(528))&&(re.preventDefault(),this._model.goToPreviousLine()),(re.equals(9)||re.equals(2057)||re.equals(521)||re.equals(1033))&&(re.preventDefault(),this._model.close()),(re.equals(10)||re.equals(3))&&(re.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(q){const ie=this._editors.original.getOptions(),ae=this._editors.modified.getOptions(),ne=document.createElement("div");ne.className="diff-review-table",ne.setAttribute("role","list"),ne.setAttribute("aria-label",(0,h.localize)(4,null)),(0,i.applyFontInfo)(ne,ae.get(50)),(0,L.reset)(this._content,ne);const $=this._editors.original.getModel(),J=this._editors.modified.getModel();if(!$||!J)return;const Q=$.getOptions(),re=J.getOptions(),de=ae.get(66),he=this._model.currentGroup.get();for(const me of he?.lines||[]){if(!he)break;let X;if(me.type===R.Header){const G=document.createElement("div");G.className="diff-review-row",G.setAttribute("role","listitem");const z=he.range,H=this._model.currentGroupIndex.get(),Y=this._model.groups.get().length,j=ue=>ue===0?(0,h.localize)(5,null):ue===1?(0,h.localize)(6,null):(0,h.localize)(7,null,ue),Z=j(z.original.length),ee=j(z.modified.length);G.setAttribute("aria-label",(0,h.localize)(8,null,H+1,Y,z.original.startLineNumber,Z,z.modified.startLineNumber,ee));const le=document.createElement("div");le.className="diff-review-cell diff-review-summary",le.appendChild(document.createTextNode(`${H+1}/${Y}: @@ -${z.original.startLineNumber},${z.original.length} +${z.modified.startLineNumber},${z.modified.length} @@`)),G.appendChild(le),X=G}else X=this._createRow(me,de,this._width.get(),ie,$,Q,ae,J,re);ne.appendChild(X);const U=(0,b.derived)(G=>this._model.currentElement.read(G)===me);q.add((0,b.autorun)(G=>{const z=U.read(G);X.tabIndex=z?0:-1,z&&X.focus()})),q.add((0,L.addDisposableListener)(X,"focus",()=>{this._model.goToLine(me)}))}this._scrollbar.scanDomNode()}_createRow(q,ie,ae,ne,$,J,Q,re,de){const he=ne.get(143),me=he.glyphMarginWidth+he.lineNumbersWidth,X=Q.get(143),U=10+X.glyphMarginWidth+X.lineNumbersWidth;let G="diff-review-row",z="";const H="diff-review-spacer";let Y=null;switch(q.type){case R.Added:G="diff-review-row line-insert",z=" char-insert",Y=D;break;case R.Deleted:G="diff-review-row line-delete",z=" char-delete",Y=I;break}const j=document.createElement("div");j.style.minWidth=ae+"px",j.className=G,j.setAttribute("role","listitem"),j.ariaLevel="";const Z=document.createElement("div");Z.className="diff-review-cell",Z.style.height=`${ie}px`,j.appendChild(Z);const ee=document.createElement("span");ee.style.width=me+"px",ee.style.minWidth=me+"px",ee.className="diff-review-line-number"+z,q.originalLineNumber!==void 0?ee.appendChild(document.createTextNode(String(q.originalLineNumber))):ee.innerText="\xA0",Z.appendChild(ee);const le=document.createElement("span");le.style.width=U+"px",le.style.minWidth=U+"px",le.style.paddingRight="10px",le.className="diff-review-line-number"+z,q.modifiedLineNumber!==void 0?le.appendChild(document.createTextNode(String(q.modifiedLineNumber))):le.innerText="\xA0",Z.appendChild(le);const ue=document.createElement("span");if(ue.className=H,Y){const ve=document.createElement("span");ve.className=a.ThemeIcon.asClassName(Y),ve.innerText="\xA0\xA0",ue.appendChild(ve)}else ue.innerText="\xA0\xA0";Z.appendChild(ue);let ce;if(q.modifiedLineNumber!==void 0){let ve=this._getLineHtml(re,Q,de.tabSize,q.modifiedLineNumber,this._languageService.languageIdCodec);A._ttPolicy&&(ve=A._ttPolicy.createHTML(ve)),Z.insertAdjacentHTML("beforeend",ve),ce=re.getLineContent(q.modifiedLineNumber)}else{let ve=this._getLineHtml($,ne,J.tabSize,q.originalLineNumber,this._languageService.languageIdCodec);A._ttPolicy&&(ve=A._ttPolicy.createHTML(ve)),Z.insertAdjacentHTML("beforeend",ve),ce=$.getLineContent(q.originalLineNumber)}ce.length===0&&(ce=(0,h.localize)(9,null));let pe="";switch(q.type){case R.Unchanged:q.originalLineNumber===q.modifiedLineNumber?pe=(0,h.localize)(10,null,ce,q.originalLineNumber):pe=(0,h.localize)(11,null,ce,q.originalLineNumber,q.modifiedLineNumber);break;case R.Added:pe=(0,h.localize)(12,null,ce,q.modifiedLineNumber);break;case R.Deleted:pe=(0,h.localize)(13,null,ce,q.originalLineNumber);break}return j.setAttribute("aria-label",pe),j}_getLineHtml(q,ie,ae,ne,$){const J=q.getLineContent(ne),Q=ie.get(50),re=l.LineTokens.createEmpty(J,$),de=g.ViewLineRenderingData.isBasicASCII(J,q.mightContainNonBasicASCII()),he=g.ViewLineRenderingData.containsRTL(J,de,q.mightContainRTL());return(0,o.renderViewLine2)(new o.RenderLineInput(Q.isMonospace&&!ie.get(33),Q.canUseHalfwidthRightwardsArrow,J,!1,de,he,0,re,[],ae,0,Q.spaceWidth,Q.middotWidth,Q.wsmiddotWidth,ie.get(116),ie.get(98),ie.get(93),ie.get(51)!==t.EditorFontLigatures.OFF,null)).html}};K=ke([ge(5,s.ILanguageService)],K)}),define(se[842],oe([1,0,54,7,157,76,26,39,6,2,28,661,29,82,201]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const t=k.$;class r 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,a.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(T=>{this.backgroundColor=T.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=r;class u extends v.Disposable{constructor(m){super(),this._onClicked=this._register(new _.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",S.Codicon.close,(0,a.localize)(1,null))))).classList.add("close-icon"),this._register(k.addDisposableListener(this._button,k.EventType.CLICK,()=>{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 s(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 o(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 _.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new _.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 _.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new _.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 s 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)),T=new p.Color(new p.RGBA(C,w,D,0));this.overlay.style.background=`linear-gradient(to bottom, ${I} 0%, ${T} 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 o extends v.Disposable{constructor(m){super(),this._onClicked=this._register(new _.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._register(k.addDisposableListener(this._button,k.EventType.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}e.InsertButton=o;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 T=t(".colorpicker-widget");m.appendChild(T),this.header=this._register(new r(T,this.model,D,I)),this.body=this._register(new f(T,this.model,this.pixelRatio,I))}layout(){this.body.layout()}}e.ColorPickerWidget=g}),define(se[843],oe([1,0,7,48,77,26,6,2,11,20,43,104,241,705,15,57,29,82,28,473]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const s=L.$,l=(0,f.registerIcon)("parameter-hints-next",E.Codicon.chevronDown,n.localize(0,null)),o=(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 a.MarkdownRenderer({editor:m},I,D)),this.keyVisible=i.Context.Visible.bindTo(w),this.keyMultipleSignatures=i.Context.MultipleSignatures.bindTo(w)}createParameterHintDOMNodes(){const m=s(".editor-widget.parameter-hints-widget"),C=L.append(m,s(".phwrapper"));C.tabIndex=-1;const w=L.append(C,s(".controls")),D=L.append(w,s(".button"+c.ThemeIcon.asCSSSelector(o))),I=L.append(w,s(".overloads")),T=L.append(w,s(".button"+c.ThemeIcon.asCSSSelector(l)));this._register(L.addDisposableListener(D,"click",x=>{L.EventHelper.stop(x),this.previous()})),this._register(L.addDisposableListener(T,"click",x=>{L.EventHelper.stop(x),this.next()}));const A=s(".body"),P=new y.DomScrollableElement(A,{alwaysConsumeMouseWheel:!0});this._register(P),C.appendChild(P.getDomNode());const N=L.append(A,s(".signature")),M=L.append(A,s(".docs"));m.style.userSelect="text",this.domNodes={element:m,signature:N,overloads:I,docs:M,scrollbar:P},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(x=>{this.visible&&this.editor.layoutContentWidget(this)}));const R=()=>{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}`};R(),this._register(S.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor),x=>x.filter(O=>O.hasChanged(50)))(R)),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,s(".code")),T=this.editor.getOption(50);I.style.fontSize=`${T.fontSize}px`,I.style.fontFamily=T.fontFamily;const A=D.parameters.length>0,P=(C=D.activeParameter)!==null&&C!==void 0?C:m.activeParameter;if(A)this.renderParameters(I,D,P);else{const R=L.append(I,s("span"));R.textContent=D.label}const N=D.parameters[P];if(N?.documentation){const R=s("span.documentation");if(typeof N.documentation=="string")R.textContent=N.documentation;else{const x=this.renderMarkdownDocs(N.documentation);R.appendChild(x.element)}L.append(this.domNodes.docs,s("p",{},R))}if(D.documentation!==void 0)if(typeof D.documentation=="string")L.append(this.domNodes.docs,s("p",{},D.documentation));else{const R=this.renderMarkdownDocs(D.documentation);L.append(this.domNodes.docs,R.element)}const M=this.hasDocs(D,N);if(this.domNodes.signature.classList.toggle("has-docs",M),this.domNodes.docs.classList.toggle("empty",!M),this.domNodes.overloads.textContent=String(m.activeSignature+1).padStart(m.signatures.length.toString().length,"0")+"/"+m.signatures.length,N){let R="";const x=D.parameters[P];Array.isArray(x.label)?R=D.label.substring(x.label[0],x.label[1]):R=x.label,x.documentation&&(R+=typeof x.documentation=="string"?`, ${x.documentation}`:`, ${x.documentation.value}`),D.documentation&&(R+=typeof D.documentation=="string"?`, ${D.documentation}`:`, ${D.documentation.value}`),this.announcedLabel!==R&&(k.alert(n.localize(2,null,R)),this.announcedLabel=R)}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),T=document.createElement("span");T.textContent=C.label.substring(0,D);const A=document.createElement("span");A.textContent=C.label.substring(D,I),A.className="parameter active";const P=document.createElement("span");P.textContent=C.label.substring(I),L.append(m,T,A,P)}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,_.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=ke([ge(2,t.IContextKeyService),ge(3,r.IOpenerService),ge(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(se[844],oe([1,0,99,2,16,21,31,18,768,241,704,15,8,843]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=e.ParameterHintsController=void 0;let r=t=class extends k.Disposable{static get(s){return s.getContribution(t.ID)}constructor(s,l,o){super(),this.editor=s,this.model=this._register(new _.ParameterHintsModel(s,o.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 s;(s=this.widget.rawValue)===null||s===void 0||s.previous()}next(){var s;(s=this.widget.rawValue)===null||s===void 0||s.next()}trigger(s){this.model.trigger(s,0)}};e.ParameterHintsController=r,r.ID="editor.controller.parameterHints",e.ParameterHintsController=r=t=ke([ge(1,i.IInstantiationService),ge(2,p.ILanguageFeaturesService)],r);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(s,l){const o=r.get(l);o?.trigger({triggerKind:S.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=u,(0,y.registerEditorContribution)(r.ID,r,2),(0,y.registerEditorAction)(u);const f=100+75,c=y.EditorCommand.bindToContribution(r.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:a.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:a.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(se[845],oe([1,0,7,78,42,2,104,8,786,82,28,480]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const a=26;let i=class extends E.Disposable{constructor(r,u){super(),this._editor=r,this.instantiationService=u,this.banner=this._register(this.instantiationService.createInstance(n))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(r){this.banner.show({...r,onClose:()=>{var u;this.hide(),(u=r.onClose)===null||u===void 0||u.call(r)}}),this._editor.setBanner(this.banner.element,a)}};e.BannerController=i,e.BannerController=i=ke([ge(1,p.IInstantiationService)],i);let n=class extends E.Disposable{constructor(r){super(),this.instantiationService=r,this.markdownRenderer=this.instantiationService.createInstance(S.MarkdownRenderer,{}),this.element=(0,L.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(r){if(r.ariaLabel)return r.ariaLabel;if(typeof r.message=="string")return r.message}getBannerMessage(r){if(typeof r=="string"){const u=(0,L.$)("span");return u.innerText=r,u}return this.markdownRenderer.render(r).element}clear(){(0,L.clearNode)(this.element)}show(r){(0,L.clearNode)(this.element);const u=this.getAriaLabel(r);u&&this.element.setAttribute("aria-label",u);const f=(0,L.append)(this.element,(0,L.$)("div.icon-container"));f.setAttribute("aria-hidden","true"),r.icon&&f.appendChild((0,L.$)(`div${b.ThemeIcon.asCSSSelector(r.icon)}`));const c=(0,L.append)(this.element,(0,L.$)("div.message-container"));if(c.setAttribute("aria-hidden","true"),c.appendChild(this.getBannerMessage(r.message)),this.messageActionsContainer=(0,L.append)(this.element,(0,L.$)("div.message-actions-container")),r.actions)for(const s of r.actions)this._register(this.instantiationService.createInstance(_.Link,this.messageActionsContainer,{...s,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 r.onClose=="function"&&r.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};n=ke([ge(0,p.IInstantiationService)],n)}),define(se[846],oe([1,0,7,6,2,28,82]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function p(v){const b=new y.DisposableStore,a=b.add(new k.Emitter),i=(0,S.getIconRegistry)();return b.add(i.onDidChange(()=>a.fire())),v&&b.add(v.onDidProductIconThemeChange(()=>a.fire())),{dispose:()=>b.dispose(),onDidChange:a.event,getCSS(){const n=v?v.getProductIconTheme():new _,t={},r=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=r(f);c&&u.push(c)}for(const f in t){const c=t[f],d=c.weight?`font-weight: ${c.weight};`:"",s=c.style?`font-style: ${c.style};`:"",l=c.src.map(o=>`${(0,L.asCSSUrl)(o.location)} format('${o.format}')`).join(", ");u.push(`@font-face { src: ${l}; font-family: ${(0,L.asCSSPropertyValue)(f)};${d}${s} font-display: block; }`)}return u.join(`
|
||
`)}}}e.getIconsStyleSheet=p;class _{getIcon(b){const a=(0,S.getIconRegistry)();let i=b.defaults;for(;E.ThemeIcon.isThemeIcon(i);){const n=a.getIcon(i.id);if(!n)return;i=n.defaults}return i}}e.UnthemedProductIconTheme=_}),define(se[89],oe([1,0]),function(te,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(se[255],oe([1,0,54,40,17,494,148,155,120,89,36]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnOfNodeOffset=e.ViewLine=e.ViewLineOptions=void 0;const a=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 T=null;if((0,v.isHighContrast)(D.themeType)||this._options.renderWhitespace==="selection"){const M=m.selections;for(const R of M){if(R.endLineNumber<g||R.startLineNumber>g)continue;const x=R.startLineNumber===g?R.startColumn:w.minColumn,O=R.endLineNumber===g?R.endColumn:w.maxColumn;x<O&&((0,v.isHighContrast)(D.themeType)&&I.push(new p.LineDecoration(x,O,"inline-selected-text",0)),this._options.renderWhitespace==="selection"&&(T||(T=[]),T.push(new _.LineRange(x-1,O-1))))}}const A=new _.RenderLineInput(D.useMonospaceOptimizations,D.canUseHalfwidthRightwardsArrow,w.content,w.continuesWithWrappedLine,w.isBasicASCII,w.containsRTL,w.minColumn-1,w.tokens,I,w.tabSize,w.startVisibleColumn,D.spaceWidth,D.middotWidth,D.wsmiddotWidth,D.stopRenderingLineAfter,D.renderWhitespace,D.renderControlCharacters,D.fontLigatures!==b.EditorFontLigatures.OFF,T);if(this._renderedViewLine&&this._renderedViewLine.input.equals(A))return!1;C.appendString('<div style="top:'),C.appendString(String(h)),C.appendString("px;height:"),C.appendString(String(this._options.lineHeight)),C.appendString('px;" class="'),C.appendString(t.CLASS_NAME),C.appendString('">');const P=(0,_.renderViewLine)(A,C);C.appendString("</div>");let N=null;return i&&a&&w.isBasicASCII&&D.useMonospaceOptimizations&&P.containsForeignElements===0&&(N=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,A,P.characterMapping)),N||(N=c(this._renderedViewLine?this._renderedViewLine.domNode:null,A,P.characterMapping,P.containsRTL,P.containsForeignElements)),this._renderedViewLine=N,!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 r:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():i}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(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 S.VisibleRanges(!0,[new S.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 S.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 r{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<C;w++)this._keyColumnPixelOffsetCache[w]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=m,this._charWidth=h.spaceWidth}getWidth(g){if(!this.domNode||this.input.lineContent.length<300){const h=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*h)}return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,g?.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||this._cachedWidth!==-1}monospaceAssumptionsAreValid(){if(!this.domNode)return i;if(this.input.lineContent.length<300){const g=this.getWidth(null),h=this.domNode.domNode.firstChild.offsetWidth;Math.abs(g-h)>=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 S.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),T=this._characterMapping.getHorizontalOffset(h);return D+this._charWidth*(T-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 S.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 S.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 T=E.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),0,0,0,0,C);return!T||T.length===0?-1:T[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 T=this._characterMapping.getHorizontalOffset(m),A=Math.round(this.input.spaceWidth*T);if(Math.abs(A-I)<=1)return A}return I}_readRawVisibleRangesForRange(g,h,m,C){if(h===1&&m===this._characterMapping.length)return[new S.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 T=D[D.length-1];T.left<I&&(T.width=I-T.left)}}return D}}const c=function(){return L.isWebKit?d:s}();function d(o,g,h,m,C){return new f(o,g,h,m,C)}function s(o,g,h,m,C){return new u(o,g,h,m,C)}function l(o,g,h){const m=g.textContent.length;let C=-1;for(;g;)g=g.previousSibling,C++;return o.getColumn(new _.DomPosition(C,h),m)}e.getColumnOfNodeOffset=l}),define(se[365],oe([1,0,167,56,255,10,5,85,7,282]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;class b{constructor(m=null){this.hitTarget=m,this.type=0}}class a{constructor(m,C,w){this.position=m,this.spanNode=C,this.injectedText=w,this.type=1}}var i;(function(h){function m(C,w,D){const I=C.getPositionFromDOMInfo(w,D);return I?new a(I,w,null):new b(w)}h.createFromDOMInfo=m})(i||(i={}));class n{constructor(m,C){this.lastViewCursorsRenderData=m,this.lastTextareaPosition=C}}e.PointerHandlerLastRenderData=n;class t{static _deduceRage(m,C=null){return!C&&m?new S.Range(m.lineNumber,m.column,m.lineNumber,m.column):C??null}static createUnknown(m,C,w){return{type:0,element:m,mouseColumn:C,position:w,range:this._deduceRage(w)}}static createTextarea(m,C){return{type:1,element:m,mouseColumn:C,position:null,range:null}}static createMargin(m,C,w,D,I,T){return{type:m,element:C,mouseColumn:w,position:D,range:I,detail:T}}static createViewZone(m,C,w,D,I){return{type:m,element:C,mouseColumn:w,position:D,range:this._deduceRage(D),detail:I}}static createContentText(m,C,w,D,I){return{type:6,element:m,mouseColumn:C,position:w,range:this._deduceRage(w,D),detail:I}}static createContentEmpty(m,C,w,D){return{type:7,element:m,mouseColumn:C,position:w,range:this._deduceRage(w),detail:D}}static createContentWidget(m,C,w){return{type:9,element:m,mouseColumn:C,position:null,range:null,detail:w}}static createScrollbar(m,C,w){return{type:11,element:m,mouseColumn:C,position:w,range:this._deduceRage(w)}}static createOverlayWidget(m,C,w){return{type:12,element:m,mouseColumn:C,position:null,range:null,detail:w}}static createOutsideEditor(m,C,w,D){return{type:13,element:null,mouseColumn:m,position:C,range:this._deduceRage(C),outsidePosition:w,outsideDistance:D}}static _typeToString(m){return m===1?"TEXTAREA":m===2?"GUTTER_GLYPH_MARGIN":m===3?"GUTTER_LINE_NUMBERS":m===4?"GUTTER_LINE_DECORATIONS":m===5?"GUTTER_VIEW_ZONE":m===6?"CONTENT_TEXT":m===7?"CONTENT_EMPTY":m===8?"CONTENT_VIEW_ZONE":m===9?"CONTENT_WIDGET":m===10?"OVERVIEW_RULER":m===11?"SCROLLBAR":m===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(m){return this._typeToString(m.type)+": "+m.position+" - "+m.range+" - "+JSON.stringify(m.detail)}}e.MouseTarget=t;class r{static isTextArea(m){return m.length===2&&m[0]===3&&m[1]===7}static isChildOfViewLines(m){return m.length>=4&&m[0]===3&&m[3]===8}static isStrictChildOfViewLines(m){return m.length>4&&m[0]===3&&m[3]===8}static isChildOfScrollableElement(m){return m.length>=2&&m[0]===3&&m[1]===6}static isChildOfMinimap(m){return m.length>=2&&m[0]===3&&m[1]===9}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}static isChildOfOverflowingOverlayWidgets(m){return m.length>=1&&m[0]===5}}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 T=null,A,P=null;return w.afterLineNumber!==I&&(P=new E.Position(w.afterLineNumber+1,1)),w.afterLineNumber>0&&(T=new E.Position(w.afterLineNumber,m.viewModel.getLineMaxColumn(w.afterLineNumber))),P===null?A=T:T===null?A=P:C<D?A=T:A=P,{viewZoneId:w.id,afterLineNumber:w.afterLineNumber,positionBefore:T,positionAfter:P,position:A}}return null}getFullLineRangeAtCoord(m){if(this._context.viewLayout.isAfterLines(m)){const D=this._context.viewModel.getLineCount(),I=this._context.viewModel.getLineMaxColumn(D);return{range:new S.Range(D,I,D,I),isAfterLines:!0}}const C=this._context.viewLayout.getLineNumberAtVerticalOffset(m),w=this._context.viewModel.getLineMaxColumn(C);return{range:new S.Range(C,1,C,w),isAfterLines:!1}}getLineNumberAtVerticalOffset(m){return this._context.viewLayout.getLineNumberAtVerticalOffset(m)}isAfterLines(m){return this._context.viewLayout.isAfterLines(m)}isInTopPadding(m){return this._context.viewLayout.isInTopPadding(m)}isInBottomPadding(m){return this._context.viewLayout.isInBottomPadding(m)}getVerticalOffsetForLineNumber(m){return this._context.viewLayout.getVerticalOffsetForLineNumber(m)}findAttribute(m,C){return u._findAttribute(m,C,this._viewHelper.viewDomNode)}static _findAttribute(m,C,w){for(;m&&m!==m.ownerDocument.body;){if(m.hasAttribute&&m.hasAttribute(C))return m.getAttribute(C);if(m===w)return null;m=m.parentNode}return null}getLineWidth(m){return this._viewHelper.getLineWidth(m)}visibleRangeForPosition(m,C){return this._viewHelper.visibleRangeForPosition(m,C)}getPositionFromDOMInfo(m,C){return this._viewHelper.getPositionFromDOMInfo(m,C)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=u;class f{constructor(m,C,w,D){this.editorPos=C,this.pos=w,this.relativePos=D,this.mouseVerticalOffset=Math.max(0,m.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=m.getCurrentScrollLeft()+this.relativePos.x-m.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<m.layoutInfo.contentLeft&&this.relativePos.x>=m.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,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.column<this._ctx.viewModel.getLineMaxColumn(m.lineNumber)?p.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(m.lineNumber),m.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(m=null){return t.createUnknown(this.target,this._getMouseColumn(m),m)}fulfillTextarea(){return t.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(m,C,w,D){return t.createMargin(m,this.target,this._getMouseColumn(C),C,w,D)}fulfillViewZone(m,C,w){return t.createViewZone(m,this.target,this._getMouseColumn(C),C,w)}fulfillContentText(m,C,w){return t.createContentText(this.target,this._getMouseColumn(m),m,C,w)}fulfillContentEmpty(m,C){return t.createContentEmpty(this.target,this._getMouseColumn(m),m,C)}fulfillContentWidget(m){return t.createContentWidget(this.target,this._getMouseColumn(),m)}fulfillScrollbar(m){return t.createScrollbar(this.target,this._getMouseColumn(m),m)}fulfillOverlayWidget(m){return t.createOverlayWidget(this.target,this._getMouseColumn(),m)}withTarget(m){return new c(this._ctx,this.editorPos,this.pos,this.relativePos,m)}}const d={isAfterLines:!0};function s(h){return{isAfterLines:!1,horizontalDistanceToText:h}}class l{constructor(m,C){this._context=m,this._viewHelper=C}mouseTargetIsWidget(m){const C=m.target,w=k.PartFingerprints.collect(C,this._viewHelper.viewDomNode);return!!(r.isChildOfContentWidgets(w)||r.isChildOfOverflowingContentWidgets(w)||r.isChildOfOverlayWidgets(w)||r.isChildOfOverflowingOverlayWidgets(w))}createMouseTarget(m,C,w,D,I){const T=new u(this._context,this._viewHelper,m),A=new c(T,C,w,D,I);try{const P=l._createMouseTarget(T,A,!1);if(P.type===6&&T.stickyTabStops&&P.position!==null){const N=l._snapToSoftTabBoundary(P.position,T.viewModel),M=S.Range.fromPositions(N,N).plusRange(P.range);return A.fulfillContentText(N,M,P.detail)}return P}catch{return A.fulfillUnknown()}}static _createMouseTarget(m,C,w){if(C.target===null){if(w)return C.fulfillUnknown();const T=l._doHitTest(m,C);return T.type===1?l.createMouseTargetFromHitTestPosition(m,C,T.spanNode,T.position,T.injectedText):this._createMouseTarget(m,C.withTarget(T.hitTarget),!0)}const D=C;let I=null;return!r.isChildOfOverflowGuard(C.targetPath)&&!r.isChildOfOverflowingContentWidgets(C.targetPath)&&!r.isChildOfOverflowingOverlayWidgets(C.targetPath)&&(I=I||C.fulfillUnknown()),I=I||l._hitTestContentWidget(m,D),I=I||l._hitTestOverlayWidget(m,D),I=I||l._hitTestMinimap(m,D),I=I||l._hitTestScrollbarSlider(m,D),I=I||l._hitTestViewZone(m,D),I=I||l._hitTestMargin(m,D),I=I||l._hitTestViewCursor(m,D),I=I||l._hitTestTextArea(m,D),I=I||l._hitTestViewLines(m,D,w),I=I||l._hitTestScrollbar(m,D),I||C.fulfillUnknown()}static _hitTestContentWidget(m,C){if(r.isChildOfContentWidgets(C.targetPath)||r.isChildOfOverflowingContentWidgets(C.targetPath)){const w=m.findAttribute(C.target,"widgetId");return w?C.fulfillContentWidget(w):C.fulfillUnknown()}return null}static _hitTestOverlayWidget(m,C){if(r.isChildOfOverlayWidgets(C.targetPath)||r.isChildOfOverflowingOverlayWidgets(C.targetPath)){const w=m.findAttribute(C.target,"widgetId");return w?C.fulfillOverlayWidget(w):C.fulfillUnknown()}return null}static _hitTestViewCursor(m,C){if(C.target){const w=m.lastRenderData.lastViewCursorsRenderData;for(const D of w)if(C.target===D.domNode)return C.fulfillContentText(D.position,null,{mightBeForeignElement:!1,injectedText:null})}if(C.isInContentArea){const w=m.lastRenderData.lastViewCursorsRenderData,D=C.mouseContentHorizontalOffset,I=C.mouseVerticalOffset;for(const T of w){if(D<T.contentLeft||D>T.contentLeft+T.width)continue;const A=m.getVerticalOffsetForLineNumber(T.position.lineNumber);if(A<=I&&I<=A+T.height)return C.fulfillContentText(T.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 r.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 T={isAfterLines:w.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:I};if(I-=m.layoutInfo.glyphMarginLeft,I<=m.layoutInfo.glyphMarginWidth){const A=m.viewModel.coordinatesConverter.convertViewPositionToModelPosition(w.range.getStartPosition()),P=m.viewModel.glyphLanes.getLanesAtLine(A.lineNumber);return T.glyphMarginLane=P[Math.floor(I/m.lineHeight)],C.fulfillMargin(2,D,w.range,T)}return I-=m.layoutInfo.glyphMarginWidth,I<=m.layoutInfo.lineNumbersWidth?C.fulfillMargin(3,D,w.range,T):(I-=m.layoutInfo.lineNumbersWidth,C.fulfillMargin(4,D,w.range,T))}return null}static _hitTestViewLines(m,C,w){if(!r.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(),T=m.viewModel.getLineMaxColumn(I);return C.fulfillContentEmpty(new E.Position(I,T),d)}if(w){if(r.isStrictChildOfViewLines(C.targetPath)){const I=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset);if(m.viewModel.getLineLength(I)===0){const A=m.getLineWidth(I),P=s(C.mouseContentHorizontalOffset-A);return C.fulfillContentEmpty(new E.Position(I,1),P)}const T=m.getLineWidth(I);if(C.mouseContentHorizontalOffset>=T){const A=s(C.mouseContentHorizontalOffset-T),P=new E.Position(I,m.viewModel.getLineMaxColumn(I));return C.fulfillContentEmpty(P,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(r.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(r.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(r.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 T=D.lineNumber,A=D.column,P=m.getLineWidth(T);if(C.mouseContentHorizontalOffset>P){const K=s(C.mouseContentHorizontalOffset-P);return C.fulfillContentEmpty(D,K)}const N=m.visibleRangeForPosition(T,A);if(!N)return C.fulfillUnknown(D);const M=N.left;if(Math.abs(C.mouseContentHorizontalOffset-M)<1)return C.fulfillContentText(D,null,{mightBeForeignElement:!!I,injectedText:I});const R=[];if(R.push({offset:N.left,column:A}),A>1){const K=m.visibleRangeForPosition(T,A-1);K&&R.push({offset:K.left,column:A-1})}const x=m.viewModel.getLineMaxColumn(T);if(A<x){const K=m.visibleRangeForPosition(T,A+1);K&&R.push({offset:K.left,column:A+1})}R.sort((K,F)=>K.offset-F.offset);const O=C.pos.toClientCoordinates(_.getWindow(m.viewDomNode)),B=w.getBoundingClientRect(),W=B.left<=O.clientX&&O.clientX<=B.right;let V=null;for(let K=1;K<R.length;K++){const F=R[K-1],q=R[K];if(F.offset<=C.mouseContentHorizontalOffset&&C.mouseContentHorizontalOffset<=q.offset){V=new S.Range(T,F.column,T,q.column);const ie=Math.abs(F.offset-C.mouseContentHorizontalOffset),ae=Math.abs(q.offset-C.mouseContentHorizontalOffset);D=ie<ae?new E.Position(T,F.column):new E.Position(T,q.column);break}}return C.fulfillContentText(D,V,{mightBeForeignElement:!W||!!I,injectedText:I})}static _doHitTestWithCaretRangeFromPoint(m,C){const w=m.getLineNumberAtVerticalOffset(C.mouseVerticalOffset),D=m.getVerticalOffsetForLineNumber(w),I=D+m.lineHeight;if(!(w===m.viewModel.getLineCount()&&C.mouseVerticalOffset>I)){const A=Math.floor((D+I)/2);let P=C.pos.y+(A-C.mouseVerticalOffset);P<=C.editorPos.y&&(P=C.editorPos.y+1),P>=C.editorPos.y+C.editorPos.height&&(P=C.editorPos.y+C.editorPos.height-1);const N=new L.PageCoordinates(C.pos.x,P),M=this._actualDoHitTestWithCaretRangeFromPoint(m,N.toClientCoordinates(_.getWindow(m.viewDomNode)));if(M.type===1)return M}return this._actualDoHitTestWithCaretRangeFromPoint(m,C.pos.toClientCoordinates(_.getWindow(m.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(m,C){const w=_.getShadowRoot(m.viewDomNode);let D;if(w?typeof w.caretRangeFromPoint>"u"?D=o(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 T=I.parentNode,A=T?T.parentNode:null,P=A?A.parentNode:null;return(P&&P.nodeType===P.ELEMENT_NODE?P.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(m,T,D.startOffset):new b(I.parentNode)}else if(I.nodeType===I.ELEMENT_NODE){const T=I.parentNode,A=T?T.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,T=I?I.parentNode:null;return(T&&T.nodeType===T.ELEMENT_NODE?T.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,T=D?D.parentNode:null,A=T&&T.nodeType===T.ELEMENT_NODE?T.className:null;if(I===y.ViewLine.CLASS_NAME){const P=w.offsetNode.childNodes[Math.min(w.offset,w.offsetNode.childNodes.length-1)];if(P)return i.createFromDOMInfo(m,P,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(_.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 a(I,w.spanNode,D))}return w}}e.MouseTargetFactory=l;function o(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(),T=_.getWindow(D),A=T.getComputedStyle(D,null).getPropertyValue("font-style"),P=T.getComputedStyle(D,null).getPropertyValue("font-variant"),N=T.getComputedStyle(D,null).getPropertyValue("font-weight"),M=T.getComputedStyle(D,null).getPropertyValue("font-size"),R=T.getComputedStyle(D,null).getPropertyValue("line-height"),x=T.getComputedStyle(D,null).getPropertyValue("font-family"),O=`${A} ${P} ${N} ${M}/${R} ${x}`,B=D.innerText;let W=I.left,V=0,K;if(m>I.left+I.width)V=B.length;else{const F=g.getInstance();for(let q=0;q<B.length+1;q++){if(K=F.getCharWidth(B.charAt(q),O)/2,W+=K,m<W){V=q;break}W+=K}}w.setStart(D.firstChild,V),w.setEnd(D.firstChild,V)}return w}class g{static getInstance(){return g._INSTANCE||(g._INSTANCE=new g),g._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(m,C){const w=m+C;if(this._cache[w])return this._cache[w];const D=this._canvas.getContext("2d");D.font=C;const T=D.measureText(m).width;return this._cache[w]=T,T}}g._INSTANCE=null}),define(se[847],oe([1,0,7,67,2,17,365,167,149,10,24,154,77]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class n extends a.ViewEventHandler{constructor(d,s,l){super(),this._mouseLeaveMonitor=null,this._context=d,this.viewController=s,this.viewHelper=l,this.mouseTargetFactory=new S.MouseTargetFactory(this._context,l),this._mouseDownOperation=this._register(new t(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(h,m)=>this._createMouseTarget(h,m),h=>this._getMouseColumn(h))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const o=new p.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(o.onContextMenu(this.viewHelper.viewDomNode,h=>this._onContextMenu(h,!0))),this._register(o.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(o.onMouseUp(this.viewHelper.viewDomNode,h=>this._onMouseUp(h))),this._register(o.onMouseLeave(this.viewHelper.viewDomNode,h=>this._onMouseLeave(h)));let g=0;this._register(o.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(o.onMouseDown(this.viewHelper.viewDomNode,h=>this._onMouseDown(h,g))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const d=i.MouseWheelClassifier.INSTANCE;let s=0,l=_.EditorZoom.getZoomLevel(),o=!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=_.EditorZoom.getZoomLevel(),I=w.deltaY>0?1:-1;_.EditorZoom.setZoomLevel(D+I),w.preventDefault(),w.stopPropagation()}}else Date.now()-s>50&&(l=_.EditorZoom.getZoomLevel(),o=m(C),g=0),s=Date.now(),g+=w.deltaY,o&&(_.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 s=this._context.configuration.options.get(143).height;this._height!==s&&(this._height=s,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(d){return this._mouseDownOperation.onCursorStateChanged(d),!1}onFocusChanged(d){return!1}getTargetAtClientPoint(d,s){const o=new p.ClientCoordinates(d,s).toPageCoordinates(L.getWindow(this.viewHelper.viewDomNode)),g=(0,p.createEditorPagePosition)(this.viewHelper.viewDomNode);if(o.y<g.y||o.y>g.y+g.height||o.x<g.x||o.x>g.x+g.width)return null;const h=(0,p.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,g,o);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),g,o,h,null)}_createMouseTarget(d,s){let l=d.target;if(!this.viewHelper.viewDomNode.contains(l)){const o=L.getShadowRoot(this.viewHelper.viewDomNode);o&&(l=o.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,s?l:null)}_getMouseColumn(d){return this.mouseTargetFactory.getMouseColumn(d.relativePos)}_onContextMenu(d,s){this.viewController.emitContextMenu({event:d,target:this._createMouseTarget(d,s)})}_onMouseMove(d){this.mouseTargetFactory.mouseTargetIsWidget(d)||d.preventDefault(),!(this._mouseDownOperation.isActive()||d.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:d,target:this._createMouseTarget(d,!0)})}_onMouseLeave(d){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:d,target:null})}_onMouseUp(d){this.viewController.emitMouseUp({event:d,target:this._createMouseTarget(d,!0)})}_onMouseDown(d,s){const l=this._createMouseTarget(d,!0),o=l.type===6||l.type===7,g=l.type===2||l.type===3||l.type===4,h=l.type===3,m=this._context.configuration.options.get(108),C=l.type===8||l.type===5,w=l.type===9;let D=d.leftButton||d.middleButton;E.isMacintosh&&d.leftButton&&d.ctrlKey&&(D=!1);const I=()=>{d.preventDefault(),this.viewHelper.focusTextArea()};if(D&&(o||h&&m))I(),this._mouseDownOperation.start(l.type,d,s);else if(g)d.preventDefault();else if(C){const T=l.detail;D&&this.viewHelper.shouldSuppressMouseDownOnViewZone(T.viewZoneId)&&(I(),this._mouseDownOperation.start(l.type,d,s),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,s,l,o,g,h){super(),this._context=d,this._viewController=s,this._viewHelper=l,this._mouseTargetFactory=o,this._createMouseTarget=g,this._getMouseColumn=h,this._mouseMoveMonitor=this._register(new p.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new r(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 s=this._findMousePosition(d,!1);s&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:d,target:s}):s.type===13&&(s.outsidePosition==="above"||s.outsidePosition==="below")?this._topBottomDragScrolling.start(s,d):(this._topBottomDragScrolling.stop(),this._dispatchMouse(s,!0,1)))}start(d,s,l){this._lastMouseEvent=s,this._mouseState.setStartedOnLineNumbers(d===3),this._mouseState.setStartButtons(s),this._mouseState.setModifiers(s);const o=this._findMousePosition(s,!0);if(!o||!o.position)return;this._mouseState.trySetCount(s.detail,o.position),s.detail=this._mouseState.count;const g=this._context.configuration.options;if(!g.get(90)&&g.get(35)&&!g.get(22)&&!this._mouseState.altKey&&s.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&o.type===6&&o.position&&this._currentSelection.containsPosition(o.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,s.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(o,s.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,l,s.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 s=d.editorPos,l=this._context.viewModel,o=this._context.viewLayout,g=this._getMouseColumn(d);if(d.posy<s.y){const m=s.y-d.posy,C=Math.max(o.getCurrentScrollTop()-m,0),w=S.HitTestContext.getZoneAtCoord(this._context,C);if(w){const I=this._helpPositionJumpOverViewZone(w);if(I)return S.MouseTarget.createOutsideEditor(g,I,"above",m)}const D=o.getLineNumberAtVerticalOffset(C);return S.MouseTarget.createOutsideEditor(g,new v.Position(D,1),"above",m)}if(d.posy>s.y+s.height){const m=d.posy-s.y-s.height,C=o.getCurrentScrollTop()+d.relativePos.y,w=S.HitTestContext.getZoneAtCoord(this._context,C);if(w){const I=this._helpPositionJumpOverViewZone(w);if(I)return S.MouseTarget.createOutsideEditor(g,I,"below",m)}const D=o.getLineNumberAtVerticalOffset(C);return S.MouseTarget.createOutsideEditor(g,new v.Position(D,l.getLineMaxColumn(D)),"below",m)}const h=o.getLineNumberAtVerticalOffset(o.getCurrentScrollTop()+d.relativePos.y);if(d.posx<s.x){const m=s.x-d.posx;return S.MouseTarget.createOutsideEditor(g,new v.Position(h,1),"left",m)}if(d.posx>s.x+s.width){const m=d.posx-s.x-s.width;return S.MouseTarget.createOutsideEditor(g,new v.Position(h,l.getLineMaxColumn(h)),"right",m)}return null}_findMousePosition(d,s){const l=this._getPositionOutsideEditor(d);if(l)return l;const o=this._createMouseTarget(d,s);if(!o.position)return null;if(o.type===8||o.type===5){const h=this._helpPositionJumpOverViewZone(o.detail);if(h)return S.MouseTarget.createViewZone(o.type,o.element,o.mouseColumn,h,o.detail)}return o}_helpPositionJumpOverViewZone(d){const s=new v.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),l=d.positionBefore,o=d.positionAfter;return l&&o?l.isBefore(s)?l:o:null}_dispatchMouse(d,s,l){d.position&&this._viewController.dispatchMouse({position:d.position,mouseColumn:d.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:l,inSelectionMode:s,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 r extends y.Disposable{constructor(d,s,l,o){super(),this._context=d,this._viewHelper=s,this._mouseTargetFactory=l,this._dispatchMouse=o,this._operation=null}dispose(){super.dispose(),this.stop()}start(d,s){this._operation?this._operation.setPosition(d,s):this._operation=new u(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,d,s)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class u extends y.Disposable{constructor(d,s,l,o,g,h){super(),this._context=d,this._viewHelper=s,this._mouseTargetFactory=l,this._dispatchMouse=o,this._position=g,this._mouseEvent=h,this._lastTime=Date.now(),this._animationFrameDisposable=L.scheduleAtNextAnimationFrame(L.getWindow(h.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(d,s){this._position=d,this._mouseEvent=s}_tick(){const d=Date.now(),s=d-this._lastTime;return this._lastTime=d,s}_getScrollSpeed(){const d=this._context.configuration.options.get(66),s=this._context.configuration.options.get(143).height/d,l=this._position.outsideDistance/d;return l<=1.5?Math.max(30,s*(1+l)):l<=3?Math.max(60,s*(2+l)):Math.max(200,s*(7+l))}_execute(){const d=this._context.configuration.options.get(66),s=this._getScrollSpeed(),l=this._tick(),o=s*(l/1e3)*d,g=this._position.outsidePosition==="above"?-o:o;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),T=(0,p.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,w,I);C=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),w,I,T,null)}(!C.position||C.position.lineNumber!==m)&&(this._position.outsidePosition==="above"?C=S.MouseTarget.createOutsideEditor(this._position.mouseColumn,new v.Position(m,1),"above",this._position.outsideDistance):C=S.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,s){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(s)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=s,this._lastMouseDownCount=Math.min(d,this._lastMouseDownPositionEqualCount)}}f.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(se[848],oe([1,0,219,7,63,44,2,17,847,190,167]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class a extends _.MouseHandler{constructor(r,u,f){super(r,u,f),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,d=>this.onTap(d))),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,d=>this.onChange(d))),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,d=>this._onContextMenu(new b.EditorMouseEvent(d,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",d=>{const s=d.pointerType;if(s==="mouse"){this._lastPointerType="mouse";return}else s==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const c=new b.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,s)=>this._onMouseDown(d,s)))}onTap(r){!r.initialTarget||!this.viewHelper.linesContentDomNode.contains(r.initialTarget)||(r.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(r,!1))}onChange(r){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-r.translationX,-r.translationY),this._lastPointerType==="pen"&&this._dispatchGesture(r,!0)}_dispatchGesture(r,u){const f=this._createMouseTarget(new b.EditorMouseEvent(r,!1,this.viewHelper.viewDomNode),!1);f.position&&this.viewController.dispatchMouse({position:f.position,mouseColumn:f.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:r.tapCount,inSelectionMode:u,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:f.type===6&&f.detail.injectedText!==null})}_onMouseDown(r,u){r.browserEvent.pointerType!=="touch"&&super._onMouseDown(r,u)}}e.PointerEventHandler=a;class i extends _.MouseHandler{constructor(r,u,f){super(r,u,f),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,c=>this.onTap(c))),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,c=>this.onChange(c))),this._register(k.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,c=>this._onContextMenu(new b.EditorMouseEvent(c,!1,this.viewHelper.viewDomNode),!1)))}onTap(r){r.preventDefault(),this.viewHelper.focusTextArea();const u=this._createMouseTarget(new b.EditorMouseEvent(r,!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(r){this._context.viewModel.viewLayout.deltaScrollNow(-r.translationX,-r.translationY)}}class n extends S.Disposable{constructor(r,u,f){super(),(p.isIOS||p.isAndroid&&p.isMobile)&&L.BrowserFeatures.pointerEvents?this.handler=this._register(new a(r,u,f)):E.mainWindow.TouchEvent?this.handler=this._register(new i(r,u,f)):this.handler=this._register(new _.MouseHandler(r,u,f))}getTargetAtClientPoint(r,u){return this.handler.getTargetAtClientPoint(r,u)}}e.PointerHandler=n}),define(se[849],oe([1,0,200,14,17,72,148,233,56,493,255,10,5,436]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,s,l,o,g,h){this.minimalReveal=c,this.lineNumber=d,this.startColumn=s,this.endColumn=l,this.startScrollTop=o,this.stopScrollTop=g,this.scrollType=h,this.type="range",this.minLineNumber=d,this.maxLineNumber=d}}class r{constructor(c,d,s,l,o){this.minimalReveal=c,this.selections=d,this.startScrollTop=s,this.stopScrollTop=l,this.scrollType=o,this.type="selections";let g=d[0].startLineNumber,h=d[0].endLineNumber;for(let m=1,C=d.length;m<C;m++){const w=d[m];g=Math.min(g,w.startLineNumber),h=Math.max(h,w.endLineNumber)}this.minLineNumber=g,this.maxLineNumber=h}}class u extends _.ViewPart{constructor(c,d){super(c),this._linesContent=d,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new p.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const s=this._context.configuration,l=this._context.configuration.options,o=l.get(50),g=l.get(144);this._lineHeight=l.get(66),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=g.isViewportWrapping,this._revealHorizontalRightPadding=l.get(99),this._cursorSurroundingLines=l.get(29),this._cursorSurroundingLinesStyle=l.get(30),this._canUseLayerHinting=!l.get(32),this._viewLineOptions=new b.ViewLineOptions(s,this._context.theme.type),_.PartFingerprints.write(this.domNode,8),this.domNode.setClassName(`view-lines ${L.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,E.applyFontInfo)(this.domNode,o),this._maxLineWidth=0,this._asyncUpdateLineWidths=new k.RunOnceScheduler(()=>{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,s=d.get(50),l=d.get(144);return this._lineHeight=d.get(66),this._typicalHalfwidthCharacterWidth=s.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,s),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 s=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let o=s;o<=l;o++)this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(c){const d=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();let l=!1;for(let o=d;o<=s;o++)l=this._visibleLines.getVisibleLine(o).onSelectionChanged()||l;return l}onDecorationsChanged(c){{const d=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let l=d;l<=s;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 s=this._context.viewLayout.validateScrollPosition({scrollTop:d});c.revealHorizontal?c.range&&c.range.startLineNumber!==c.range.endLineNumber?s={scrollTop:s.scrollTop,scrollLeft:0}:c.range?this._horizontalRevealRequest=new t(c.minimalReveal,c.range.startLineNumber,c.range.startColumn,c.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),s.scrollTop,c.scrollType):c.selections&&c.selections.length>0&&(this._horizontalRevealRequest=new r(c.minimalReveal,c.selections,this._context.viewLayout.getCurrentScrollTop(),s.scrollTop,c.scrollType)):this._horizontalRevealRequest=null;const o=Math.abs(this._context.viewLayout.getCurrentScrollTop()-s.scrollTop)<=this._lineHeight?1:c.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(s,o),!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),s=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(c.scrollTop<d||c.scrollTop>s)&&(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 s=this._getViewLineDomNode(c);if(s===null)return null;const l=this._getLineNumberFor(s);if(l===-1||l<1||l>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(l)===1)return new a.Position(l,1);const o=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();if(l<o||l>g)return null;let h=this._visibleLines.getVisibleLine(l).getColumnOfNodeOffset(c,d);const m=this._context.viewModel.getLineMinColumn(l);return h<m&&(h=m),new a.Position(l,h)}_getViewLineDomNode(c){for(;c&&c.nodeType===1;){if(c.className===b.ViewLine.CLASS_NAME)return c;c=c.parentElement}return null}_getLineNumberFor(c){const d=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();for(let l=d;l<=s;l++){const o=this._visibleLines.getVisibleLine(l);if(c===o.getDomNode())return l}return-1}getLineWidth(c){const d=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(c<d||c>s)return-1;const l=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(c).getWidth(l);return this._updateLineWidthsSlowIfDomDidLayout(l),o}linesVisibleRangesForRange(c,d){if(this.shouldRender())return null;const s=c.endLineNumber,l=i.Range.intersectRanges(c,this._lastRenderedData.getCurrentVisibleRange());if(!l)return null;const o=[];let g=0;const h=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let m=0;d&&(m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(l.startLineNumber,1)).lineNumber);const C=this._visibleLines.getStartLineNumber(),w=this._visibleLines.getEndLineNumber();for(let D=l.startLineNumber;D<=l.endLineNumber;D++){if(D<C||D>w)continue;const I=D===l.startLineNumber?l.startColumn:1,T=D!==l.endLineNumber,A=T?this._context.viewModel.getLineMaxColumn(D):l.endColumn,P=this._visibleLines.getVisibleLine(D).getVisibleRangesForRange(D,I,A,h);if(P){if(d&&D<s){const N=m;m=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(D+1,1)).lineNumber,N!==m&&(P.ranges[P.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}o[g++]=new S.LineVisibleRanges(P.outsideRenderedLine,D,S.HorizontalRange.from(P.ranges),T)}}return this._updateLineWidthsSlowIfDomDidLayout(h),g===0?null:o}_visibleRangesForLineRange(c,d,s){if(this.shouldRender()||c<this._visibleLines.getStartLineNumber()||c>this._visibleLines.getEndLineNumber())return null;const l=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),o=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(c,d,s,l);return this._updateLineWidthsSlowIfDomDidLayout(l),o}visibleRangeForPosition(c){const d=this._visibleRangesForLineRange(c.lineNumber,c.column,c.column);return d?new S.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(),s=this._visibleLines.getEndLineNumber();let l=1,o=!0;for(let g=d;g<=s;g++){const h=this._visibleLines.getVisibleLine(g);if(c&&!h.getWidthIsFast()){o=!1;continue}l=Math.max(l,h.getWidth(null))}return o&&d===1&&s===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(l),o}_checkMonospaceFontAssumptions(){let c=-1,d=-1;const s=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let o=s;o<=l;o++){const g=this._visibleLines.getVisibleLine(o);if(g.needsMonospaceFontCheck()){const h=g.getWidth(null);h>d&&(d=h,c=o)}}if(c!==-1&&!this._visibleLines.getVisibleLine(c).monospaceAssumptionsAreValid())for(let o=s;o<=l;o++)this._visibleLines.getVisibleLine(o).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 s=this._horizontalRevealRequest;if(c.startLineNumber<=s.minLineNumber&&s.maxLineNumber<=c.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const l=this._computeScrollLeftToReveal(s);l&&(this._isViewportWrapping||this._ensureMaxLineWidth(l.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:l.scrollLeft},s.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),y.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const s=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber();for(let o=s;o<=l;o++)if(this._visibleLines.getVisibleLine(o).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._maxLineWidth<d&&(this._maxLineWidth=d,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(c,d,s,l,o,g){const h=c.top,m=c.height,C=h+m;let w,D,I;if(o&&o.length>0){let M=o[0].startLineNumber,R=o[0].endLineNumber;for(let x=1,O=o.length;x<O;x++){const B=o[x];M=Math.min(M,B.startLineNumber),R=Math.max(R,B.endLineNumber)}w=!1,D=this._context.viewLayout.getVerticalOffsetForLineNumber(M),I=this._context.viewLayout.getVerticalOffsetForLineNumber(R)+this._lineHeight}else if(l)w=!0,D=this._context.viewLayout.getVerticalOffsetForLineNumber(l.startLineNumber),I=this._context.viewLayout.getVerticalOffsetForLineNumber(l.endLineNumber)+this._lineHeight;else return-1;const T=(d==="mouse"||s)&&this._cursorSurroundingLinesStyle==="default";let A=0,P=0;if(T)s||(A=this._lineHeight);else{const M=Math.min(m/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?A=Math.max(M,this._maxNumberStickyLines)*this._lineHeight:A=M*this._lineHeight,P=Math.max(0,M-1)*this._lineHeight}s||(g===0||g===4)&&(P+=this._lineHeight),D-=A,I+=P;let N;if(I-D>m){if(!w)return-1;N=D}else if(g===5||g===6)if(g===6&&h<=D&&I<=C)N=h;else{const M=Math.max(5*this._lineHeight,m*.2),R=D-M,x=I-m;N=Math.max(x,R)}else if(g===1||g===2)if(g===2&&h<=D&&I<=C)N=h;else{const M=(D+I)/2;N=Math.max(0,M-m/2)}else N=this._computeMinimumScrolling(h,C,D,I,g===3,g===4);return N}_computeScrollLeftToReveal(c){const d=this._context.viewLayout.getCurrentViewport(),s=this._context.configuration.options.get(143),l=d.left,o=l+d.width-s.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,o,g,h),maxHorizontalOffset:h}}_computeMinimumScrolling(c,d,s,l,o,g){c=c|0,d=d|0,s=s|0,l=l|0,o=!!o,g=!!g;const h=d-c;if(l-s<h){if(o)return s;if(g)return Math.max(0,l-h);if(s<c)return s;if(l>d)return Math.max(0,l-h)}else return s;return c}}e.ViewLines=u,u.HORIZONTAL_EXTRA_PX=30}),define(se[366],oe([1,0,7,46,78,230,224,13,14,398,107,12,6,126,2,17,11,750,350,99,22,89,178]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const o=L.$;class g{constructor(N,M,R,x,O,B,W){var V,K,F;this._checked=!1,this._hidden=!1,this.hasCheckbox=x,this.index=R,this.fireButtonTriggered=O,this.fireSeparatorButtonTriggered=B,this._onChecked=W,this.onChecked=x?i.Event.map(i.Event.filter(this._onChecked.event,q=>q.listElement===this),q=>q.checked):i.Event.None,N.type==="separator"?this._separator=N:(this.item=N,M&&M.type==="separator"&&!M.buttons&&(this._separator=M),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=(K=this.item.highlights)===null||K===void 0?void 0:K.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 q;const ie=(q=N.label)!==null&&q!==void 0?q:"",ae=(0,n.parseLabelWithIcons)(ie).text.trim(),ne=N.ariaLabel||[ie,this.saneDescription,this.saneDetail].map($=>(0,n.getCodiconAriaLabel)($)).filter($=>!!$).join(", ");return{saneLabel:ie,saneSortLabel:ae,saneAriaLabel:ne}})}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(N){this._element=N}get hidden(){return this._hidden}set hidden(N){this._hidden=N}get checked(){return this._checked}set checked(N){N!==this._checked&&(this._checked=N,this._onChecked.fire({listElement:this,checked:N}))}get separator(){return this._separator}set separator(N){this._separator=N}get labelHighlights(){return this._labelHighlights}set labelHighlights(N){this._labelHighlights=N}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(N){this._descriptionHighlights=N}get detailHighlights(){return this._detailHighlights}set detailHighlights(N){this._detailHighlights=N}}class h{constructor(N,M){this.themeService=N,this.hoverDelegate=M}get templateId(){return h.ID}renderTemplate(N){const M=Object.create(null);M.toDisposeElement=[],M.toDisposeTemplate=[],M.entry=L.append(N,o(".quick-input-list-entry"));const R=L.append(M.entry,o("label.quick-input-list-label"));M.toDisposeTemplate.push(L.addStandardDisposableListener(R,L.EventType.CLICK,K=>{M.checkbox.offsetParent||K.preventDefault()})),M.checkbox=L.append(R,o("input.quick-input-list-checkbox")),M.checkbox.type="checkbox",M.toDisposeTemplate.push(L.addStandardDisposableListener(M.checkbox,L.EventType.CHANGE,K=>{M.element.checked=M.checkbox.checked}));const x=L.append(R,o(".quick-input-list-rows")),O=L.append(x,o(".quick-input-list-row")),B=L.append(x,o(".quick-input-list-row"));M.label=new E.IconLabel(O,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),M.toDisposeTemplate.push(M.label),M.icon=L.prepend(M.label.element,o(".quick-input-list-icon"));const W=L.append(O,o(".quick-input-list-entry-keybinding"));M.keybinding=new S.KeybindingLabel(W,r.OS);const V=L.append(B,o(".quick-input-list-label-meta"));return M.detail=new E.IconLabel(V,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate}),M.toDisposeTemplate.push(M.detail),M.separator=L.append(M.entry,o(".quick-input-list-separator")),M.actionBar=new y.ActionBar(M.entry,this.hoverDelegate?{hoverDelegate:this.hoverDelegate}:void 0),M.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),M.toDisposeTemplate.push(M.actionBar),M}renderElement(N,M,R){var x,O,B,W;R.element=N,N.element=(x=R.entry)!==null&&x!==void 0?x:void 0;const V=N.item?N.item:N.separator;R.checkbox.checked=N.checked,R.toDisposeElement.push(N.onChecked(ne=>R.checkbox.checked=ne));const{labelHighlights:K,descriptionHighlights:F,detailHighlights:q}=N;if(!((O=N.item)===null||O===void 0)&&O.iconPath){const ne=(0,l.isDark)(this.themeService.getColorTheme().type)?N.item.iconPath.dark:(B=N.item.iconPath.light)!==null&&B!==void 0?B:N.item.iconPath.dark,$=s.URI.revive(ne);R.icon.className="quick-input-list-icon",R.icon.style.backgroundImage=L.asCSSUrl($)}else R.icon.style.backgroundImage="",R.icon.className=!((W=N.item)===null||W===void 0)&&W.iconClass?`quick-input-list-icon ${N.item.iconClass}`:"";const ie={matches:K||[],descriptionTitle:N.saneTooltip?void 0:N.saneDescription,descriptionMatches:F||[],labelEscapeNewLines:!0};V.type!=="separator"?(ie.extraClasses=V.iconClasses,ie.italic=V.italic,ie.strikethrough=V.strikethrough,R.entry.classList.remove("quick-input-list-separator-as-item")):R.entry.classList.add("quick-input-list-separator-as-item"),R.label.setLabel(N.saneLabel,N.saneDescription,ie),R.keybinding.set(V.type==="separator"?void 0:V.keybinding),N.saneDetail?(R.detail.element.style.display="",R.detail.setLabel(N.saneDetail,void 0,{matches:q,title:N.saneTooltip?void 0:N.saneDetail,labelEscapeNewLines:!0})):R.detail.element.style.display="none",N.item&&N.separator&&N.separator.label?(R.separator.textContent=N.separator.label,R.separator.style.display=""):R.separator.style.display="none",R.entry.classList.toggle("quick-input-list-separator-border",!!N.separator);const ae=V.buttons;ae&&ae.length?(R.actionBar.push(ae.map((ne,$)=>(0,c.quickInputButtonToAction)(ne,`id-${$}`,()=>V.type!=="separator"?N.fireButtonTriggered({button:ne,item:V}):N.fireSeparatorButtonTriggered({button:ne,separator:V}))),{icon:!0,label:!1}),R.entry.classList.add("has-actions")):R.entry.classList.remove("has-actions")}disposeElement(N,M,R){R.toDisposeElement=(0,t.dispose)(R.toDisposeElement),R.actionBar.clear()}disposeTemplate(N){N.toDisposeElement=(0,t.dispose)(N.toDisposeElement),N.toDisposeTemplate=(0,t.dispose)(N.toDisposeTemplate)}}h.ID="listelement";class m{getHeight(N){return N.item?N.saneDetail?44:22:24}getTemplateId(N){return h.ID}}var C;(function(P){P[P.First=1]="First",P[P.Second=2]="Second",P[P.Last=3]="Last",P[P.Next=4]="Next",P[P.Previous=5]="Previous",P[P.NextPage=6]="NextPage",P[P.PreviousPage=7]="PreviousPage"})(C||(e.QuickInputListFocus=C={}));class w{constructor(N,M,R,x){this.parent=N,this.options=R,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=M,this.container=L.append(this.parent,o(".quick-input-list"));const O=new m,B=new A;this.list=R.createList("QuickInput",this.container,O,[new h(x,R.hoverDelegate)],{identityProvider:{getId:V=>{var K,F,q,ie,ae,ne,$,J;return(J=(ne=(ie=(F=(K=V.item)===null||K===void 0?void 0:K.id)!==null&&F!==void 0?F:(q=V.item)===null||q===void 0?void 0:q.label)!==null&&ie!==void 0?ie:(ae=V.separator)===null||ae===void 0?void 0:ae.id)!==null&&ne!==void 0?ne:($=V.separator)===null||$===void 0?void 0:$.label)!==null&&J!==void 0?J:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:B}),this.list.getHTMLElement().id=M,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(V=>{const K=new k.StandardKeyboardEvent(V);switch(K.keyCode){case 10:this.toggleCheckbox();break;case 31:(r.isMacintosh?V.metaKey:V.ctrlKey)&&this.list.setFocus((0,p.range)(this.list.length));break;case 16:{const F=this.list.getFocus();F.length===1&&F[0]===0&&this._onLeave.fire();break}case 18:{const F=this.list.getFocus();F.length===1&&F[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(K)})),this.disposables.push(this.list.onMouseDown(V=>{V.browserEvent.button!==2&&V.browserEvent.preventDefault()})),this.disposables.push(L.addDisposableListener(this.container,L.EventType.CLICK,V=>{(V.x||V.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(V=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(V=>{typeof V.index=="number"&&(V.browserEvent.preventDefault(),this.list.setSelection([V.index]))}));const W=new _.ThrottledDelayer(R.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(async V=>{var K;if(V.browserEvent.target instanceof HTMLAnchorElement){W.cancel();return}if(!(!(V.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&L.isAncestor(V.browserEvent.relatedTarget,(K=V.element)===null||K===void 0?void 0:K.element)))try{await W.trigger(async()=>{V.element&&this.showHover(V.element)})}catch(F){if(!(0,a.isCancellationError)(F))throw F}})),this.disposables.push(this.list.onMouseOut(V=>{var K;L.isAncestor(V.browserEvent.relatedTarget,(K=V.element)===null||K===void 0?void 0:K.element)||W.cancel()})),this.disposables.push(W),this.disposables.push(this._listElementChecked.event(V=>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,N=>N.elements.map(M=>M.item))}get onDidChangeSelection(){return i.Event.map(this.list.onDidChangeSelection,N=>({items:N.elements.map(M=>M.item),event:N.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(N){this.list.scrollTop=N}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(N){this.list.getHTMLElement().ariaLabel=N}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(N,M=!0){for(let R=0,x=N.length;R<x;R++){const O=N[R];if(!O.hidden)if(O.checked)M=!0;else return!1}return M}getCheckedCount(){let N=0;const M=this.elements;for(let R=0,x=M.length;R<x;R++)M[R].checked&&N++;return N}getVisibleCount(){let N=0;const M=this.elements;for(let R=0,x=M.length;R<x;R++)M[R].hidden||N++;return N}setAllVisibleChecked(N){try{this._fireCheckedEvents=!1,this.elements.forEach(M=>{M.hidden||(M.checked=N)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(N){this.elementDisposables=(0,t.dispose)(this.elementDisposables);const M=B=>this.fireButtonTriggered(B),R=B=>this.fireSeparatorButtonTriggered(B);this.inputElements=N;const x=new Map,O=this.parent.classList.contains("show-checkboxes");this.elements=N.reduce((B,W,V)=>{var K;const F=V>0?N[V-1]:void 0;if(W.type==="separator"&&!W.buttons)return B;const q=new g(W,F,V,O,M,R,this._listElementChecked),ie=B.length;return B.push(q),x.set((K=q.item)!==null&&K!==void 0?K:q.separator,ie),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(N=>N.item)}setFocusedElements(N){if(this.list.setFocus(N.filter(M=>this.elementsToIndexes.has(M)).map(M=>this.elementsToIndexes.get(M))),N.length>0){const M=this.list.getFocus()[0];typeof M=="number"&&this.list.reveal(M)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(N){this.list.setSelection(N.filter(M=>this.elementsToIndexes.has(M)).map(M=>this.elementsToIndexes.get(M)))}getCheckedElements(){return this.elements.filter(N=>N.checked).map(N=>N.item).filter(N=>!!N)}setCheckedElements(N){try{this._fireCheckedEvents=!1;const M=new Set;for(const R of N)M.add(R);for(const R of this.elements)R.checked=M.has(R.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(N){this.list.getHTMLElement().style.pointerEvents=N?"":"none"}focus(N){if(!this.list.length)return;switch(N===C.Second&&this.list.length<2&&(N=C.First),N){case C.First:this.list.scrollTop=0,this.list.focusFirst(void 0,R=>!!R.item);break;case C.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,R=>!!R.item);break;case C.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,R=>!!R.item);break;case C.Next:{this.list.focusNext(void 0,!0,void 0,x=>!!x.item);const R=this.list.getFocus()[0];R!==0&&!this.elements[R-1].item&&this.list.firstVisibleIndex>R-1&&this.list.reveal(R-1);break}case C.Previous:{this.list.focusPrevious(void 0,!0,void 0,x=>!!x.item);const R=this.list.getFocus()[0];R!==0&&!this.elements[R-1].item&&this.list.firstVisibleIndex>R-1&&this.list.reveal(R-1);break}case C.NextPage:this.list.focusNextPage(void 0,R=>!!R.item);break;case C.PreviousPage:this.list.focusPreviousPage(void 0,R=>!!R.item);break}const M=this.list.getFocus()[0];typeof M=="number"&&this.list.reveal(M)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(N){var M,R,x;this._lastHover&&!this._lastHover.isDisposed&&((R=(M=this.options.hoverDelegate).onDidHideHover)===null||R===void 0||R.call(M),(x=this._lastHover)===null||x===void 0||x.dispose()),!(!N.element||!N.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:N.saneTooltip,target:N.element,linkHandler:O=>{this.options.linkOpenerDelegate(O)},appearance:{showPointer:!0},container:this.container,position:{hoverPosition:1}},!1))}layout(N){this.list.getHTMLElement().style.maxHeight=N?`${Math.floor(N/44)*44+6}px`:"",this.list.layout()}filter(N){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const M=N;if(N=N.trim(),!N||!(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 O=x.index&&this.inputElements[x.index-1];x.item&&(x.separator=O&&O.type==="separator"&&!O.buttons?O:void 0)});else{let x;this.elements.forEach(O=>{var B,W,V,K;let F;this.matchOnLabelMode==="fuzzy"?F=this.matchOnLabel&&(B=(0,n.matchesFuzzyIconAware)(N,(0,n.parseLabelWithIcons)(O.saneLabel)))!==null&&B!==void 0?B:void 0:F=this.matchOnLabel&&(W=D(M,(0,n.parseLabelWithIcons)(O.saneLabel)))!==null&&W!==void 0?W:void 0;const q=this.matchOnDescription&&(V=(0,n.matchesFuzzyIconAware)(N,(0,n.parseLabelWithIcons)(O.saneDescription||"")))!==null&&V!==void 0?V:void 0,ie=this.matchOnDetail&&(K=(0,n.matchesFuzzyIconAware)(N,(0,n.parseLabelWithIcons)(O.saneDetail||"")))!==null&&K!==void 0?K:void 0;if(F||q||ie?(O.labelHighlights=F,O.descriptionHighlights=q,O.detailHighlights=ie,O.hidden=!1):(O.labelHighlights=void 0,O.descriptionHighlights=void 0,O.detailHighlights=void 0,O.hidden=O.item?!O.item.alwaysShow:!0),O.item?O.separator=void 0:O.separator&&(O.hidden=!0),!this.sortByLabel){const ae=O.index&&this.inputElements[O.index-1];x=ae&&ae.type==="separator"?ae:x,x&&!O.hidden&&(O.separator=x,x=void 0)}})}const R=this.elements.filter(x=>!x.hidden);if(this.sortByLabel&&N){const x=N.toLowerCase();R.sort((O,B)=>T(O,B,x))}return this.elementsToIndexes=R.reduce((x,O,B)=>{var W;return x.set((W=O.item)!==null&&W!==void 0?W:O.separator,B),x},new Map),this.list.splice(0,this.list.length,R),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(R.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const N=this.list.getFocusedElements(),M=this.allVisibleChecked(N);for(const R of N)R.checked=!M}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(N){this.container.style.display=N?"":"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(N){this._onButtonTriggered.fire(N)}fireSeparatorButtonTriggered(N){this._onSeparatorButtonTriggered.fire(N)}style(N){this.list.style(N)}toggleHover(){const N=this.list.getFocusedElements()[0];if(!N?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const M=this.list.getFocusedElements()[0];if(!M)return;this.showHover(M);const R=new t.DisposableStore;R.add(this.list.onDidChangeFocus(x=>{x.indexes.length&&this.showHover(x.elements[0])})),this._lastHover&&R.add(this._lastHover),this._toggleHover=R,this.elementDisposables.push(this._toggleHover)}}e.QuickInputList=w,ke([b.memoize],w.prototype,"onDidChangeFocus",null),ke([b.memoize],w.prototype,"onDidChangeSelection",null);function D(P,N){const{text:M,iconOffsets:R}=N;if(!R||R.length===0)return I(P,M);const x=(0,u.ltrim)(M," "),O=M.length-x.length,B=I(P,x);if(B)for(const W of B){const V=R[W.start+O]+O;W.start+=V,W.end+=V}return B}function I(P,N){const M=N.toLowerCase().indexOf(P.toLowerCase());return M!==-1?[{start:M,end:M+P.length}]:null}function T(P,N,M){const R=P.labelHighlights||[],x=N.labelHighlights||[];return R.length&&!x.length?-1:!R.length&&x.length?1:R.length===0&&x.length===0?0:(0,v.compareAnything)(P.saneSortLabel,N.saneSortLabel,M)}class A{getWidgetAriaLabel(){return(0,f.localize)(0,null)}getAriaLabel(N){var M;return!((M=N.separator)===null||M===void 0)&&M.label?`${N.saneAriaLabel}, ${N.separator.label}`:N.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(N){return N.hasCheckbox?"checkbox":"option"}isChecked(N){if(N.hasCheckbox)return{value:N.checked,onDidChange:N.onChecked}}}}),define(se[367],oe([1,0,7,46,159,13,14,26,6,2,17,100,28,748,70,366,350,178]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputHoverDelegate=e.InputBox=e.QuickPick=e.backButton=void 0,e.backButton={iconClass:i.ThemeIcon.asClassName(p.Codicon.quickInputBack),tooltip:(0,n.localize)(0,null),handle:-1};class f extends v.Disposable{constructor(o){super(),this.ui=o,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=f.noPromptMessage,this._severity=a.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new _.Emitter),this.onDidHideEmitter=this._register(new _.Emitter),this.onDisposeEmitter=this._register(new _.Emitter),this.visibleDisposables=this._register(new v.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(o){this._title=o,this.update()}get description(){return this._description}set description(o){this._description=o,this.update()}get step(){return this._steps}set step(o){this._steps=o,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(o){this._totalSteps=o,this.update()}get enabled(){return this._enabled}set enabled(o){this._enabled=o,this.update()}get contextKey(){return this._contextKey}set contextKey(o){this._contextKey=o,this.update()}get busy(){return this._busy}set busy(o){this._busy=o,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(o){const g=this._ignoreFocusOut!==o&&!b.isIOS;this._ignoreFocusOut=o&&!b.isIOS,g&&this.update()}get buttons(){return this._buttons}set buttons(o){this._buttons=o,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(o){this._toggles=o??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(o){this._validationMessage=o,this.update()}get severity(){return this._severity}set severity(o){this._severity=o,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(o=>{this.buttons.indexOf(o)!==-1&&this.onDidTriggerButtonEmitter.fire(o)})),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(o=t.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:o})}update(){var o,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 S.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).map((I,T)=>(0,u.quickInputButtonToAction)(I,`id-${T}`,async()=>this.onDidTriggerButtonEmitter.fire(I)));this.ui.leftActionBar.push(w,{icon:!0,label:!1}),this.ui.rightActionBar.clear();const D=this.buttons.filter(I=>I!==e.backButton).map((I,T)=>(0,u.quickInputButtonToAction)(I,`id-${T}`,async()=>this.onDidTriggerButtonEmitter.fire(I)));this.ui.rightActionBar.push(D,{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const w=(g=(o=this.toggles)===null||o===void 0?void 0:o.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,u.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,n.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(o){if(this.ui.inputBox.showDecoration(o),o!==a.default.Ignore){const g=this.ui.inputBox.stylesForType(o);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()}}f.noPromptMessage=(0,n.localize)(1,null);class c extends f{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new _.Emitter),this.onWillAcceptEmitter=this._register(new _.Emitter),this.onDidAcceptEmitter=this._register(new _.Emitter),this.onDidCustomEmitter=this._register(new _.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._keepScrollPosition=!1,this._itemActivation=t.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new _.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new _.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new _.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new _.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=o=>o,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(o){this._quickNavigate=o,this.update()}get value(){return this._value}set value(o){this.doSetValue(o)}doSetValue(o,g){this._value!==o&&(this._value=o,g||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(o){this._ariaLabel=o,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(o){this._placeholder=o,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(o){this.ui.list.scrollTop=o}set items(o){this._items=o,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(o){this._canSelectMany=o,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(o){this._canAcceptInBackground=o}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(o){this._matchOnDescription=o,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(o){this._matchOnDetail=o,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(o){this._matchOnLabel=o,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(o){this._matchOnLabelMode=o,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(o){this._sortByLabel=o,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(o){this._keepScrollPosition=o}get itemActivation(){return this._itemActivation}set itemActivation(o){this._itemActivation=o}get activeItems(){return this._activeItems}set activeItems(o){this._activeItems=o,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(o){this._selectedItems=o,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?t.NO_KEY_MODS:this.ui.keyMods}set valueSelection(o){this._valueSelection=o,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(o){this._customButton=o,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(o){this._customButtonLabel=o,this.update()}get customHover(){return this._customButtonHover}set customHover(o){this._customButtonHover=o,this.update()}get ok(){return this._ok}set ok(o){this._ok=o,this.update()}get hideInput(){return!!this._hideInput}set hideInput(o){this._hideInput=o,this.update()}trySelectFirst(){this.canSelectMany||this.ui.list.focus(r.QuickInputListFocus.First)}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(o=>{this.doSetValue(o,!0)})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(o=>{switch(o.keyCode){case 18:this.ui.list.focus(r.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(o,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(r.QuickInputListFocus.Previous):this.ui.list.focus(r.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(o,!0);break;case 12:this.ui.list.focus(r.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(o,!0);break;case 11:this.ui.list.focus(r.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(o,!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:(o.ctrlKey||o.metaKey)&&!o.shiftKey&&!o.altKey&&(this.ui.list.focus(r.QuickInputListFocus.First),L.EventHelper.stop(o,!0));break;case 13:(o.ctrlKey||o.metaKey)&&!o.shiftKey&&!o.altKey&&(this.ui.list.focus(r.QuickInputListFocus.Last),L.EventHelper.stop(o,!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(o=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,E.equals)(o,this._activeItems,(g,h)=>g===h)||(this._activeItems=o,this.onDidChangeActiveEmitter.fire(o))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:o,event:g})=>{if(this.canSelectMany){o.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,E.equals)(o,this._selectedItems,(h,m)=>h===m)||(this._selectedItems=o,this.onDidChangeSelectionEmitter.fire(o),o.length&&this.handleAccept(L.isMouseEvent(g)&&g.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(o=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,E.equals)(o,this._selectedItems,(g,h)=>g===h)||(this._selectedItems=o,this.onDidChangeSelectionEmitter.fire(o)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(o=>this.onDidTriggerItemButtonEmitter.fire(o))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(o=>this.onDidTriggerSeparatorButtonEmitter.fire(o))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(o){let g=!1;this.onWillAcceptEmitter.fire({veto:()=>g=!0}),g||this.onDidAcceptEmitter.fire({inBackground:o})}registerQuickNavigation(){return L.addDisposableListener(this.ui.container,L.EventType.KEY_UP,o=>{if(this.canSelectMany||!this._quickNavigate)return;const g=new k.StandardKeyboardEvent(o),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 o=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||c.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 t.ItemActivation.NONE:this._itemActivation=t.ItemActivation.FIRST;break;case t.ItemActivation.SECOND:this.ui.list.focus(r.QuickInputListFocus.Second),this._itemActivation=t.ItemActivation.FIRST;break;case t.ItemActivation.LAST:this.ui.list.focus(r.QuickInputListFocus.Last),this._itemActivation=t.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(r.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=o)}}e.QuickPick=c,c.DEFAULT_ARIA_LABEL=(0,n.localize)(3,null);class d extends f{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new _.Emitter),this.onDidAcceptEmitter=this._register(new _.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(o){this._value=o||"",this.update()}get placeholder(){return this._placeholder}set placeholder(o){this._placeholder=o,this.update()}get password(){return this._password}set password(o){this._password=o,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(o=>{o!==this.value&&(this._value=o,this.onDidValueChangeEmitter.fire(o))})),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 o={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(o),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}e.InputBox=d;class s{get delay(){return Date.now()-this.lastHoverHideTime<200?0:this.configurationService.getValue("workbench.hover.delay")}constructor(o,g){this.configurationService=o,this.hoverService=g,this.lastHoverHideTime=0,this.placement="element"}showHover(o,g){var h;const m=(o.content instanceof HTMLElement?(h=o.content.textContent)!==null&&h!==void 0?h:"":typeof o.content=="string"?o.content:o.content.value).length>20;return this.hoverService.showHover({...o,persistence:{hideOnKeyDown:!1},appearance:{showHoverHint:m,skipFadeInAnimation:!0}},g)}onDidHideHover(){this.lastHoverHideTime=Date.now()}}e.QuickInputHoverDelegate=s}),define(se[850],oe([1,0,7,78,229,319,590,19,6,2,100,749,70,788,366,367,44]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const f=L.$;class c extends v.Disposable{constructor(s,l,o){super(),this.options=s,this.themeService=l,this.layoutService=o,this.enabled=!0,this.onDidAcceptEmitter=this._register(new _.Emitter),this.onDidCustomEmitter=this._register(new _.Emitter),this.onDidTriggerButtonEmitter=this._register(new _.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new _.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new _.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=s.idPrefix,this.parentElement=s.container,this.styles=s.styles,this._register(_.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(s,l){const o=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(s,g,o,!0))}getUI(s){if(this.ui)return s&&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 o=L.createStyleSheet(l),g=L.append(l,f(".quick-input-titlebar")),h=this._register(new k.ActionBar(g,{hoverDelegate:this.options.hoverDelegate}));h.domNode.classList.add("quick-input-left-action-bar");const m=L.append(g,f(".quick-input-title")),C=this._register(new k.ActionBar(g,{hoverDelegate:this.options.hoverDelegate}));C.domNode.classList.add("quick-input-right-action-bar");const w=L.append(l,f(".quick-input-header")),D=L.append(w,f("input.quick-input-check-all"));D.type="checkbox",D.setAttribute("aria-label",(0,a.localize)(0,null)),this._register(L.addStandardDisposableListener(D,L.EventType.CHANGE,J=>{const Q=D.checked;ne.setAllVisibleChecked(Q)})),this._register(L.addDisposableListener(D,L.EventType.CLICK,J=>{(J.x||J.y)&&P.setFocus()}));const I=L.append(w,f(".quick-input-description")),T=L.append(w,f(".quick-input-and-message")),A=L.append(T,f(".quick-input-filter")),P=this._register(new n.QuickInputBox(A,this.styles.inputBox,this.styles.toggle));P.setAttribute("aria-describedby",`${this.idPrefix}message`);const N=L.append(A,f(".quick-input-visible-count"));N.setAttribute("aria-live","polite"),N.setAttribute("aria-atomic","true");const M=new E.CountBadge(N,{countFormat:(0,a.localize)(1,null)},this.styles.countBadge),R=L.append(A,f(".quick-input-count"));R.setAttribute("aria-live","polite");const x=new E.CountBadge(R,{countFormat:(0,a.localize)(2,null)},this.styles.countBadge),O=L.append(w,f(".quick-input-action")),B=this._register(new y.Button(O,this.styles.button));B.label=(0,a.localize)(3,null),this._register(B.onDidClick(J=>{this.onDidAcceptEmitter.fire()}));const W=L.append(w,f(".quick-input-action")),V=this._register(new y.Button(W,{...this.styles.button,supportIcons:!0}));V.label=(0,a.localize)(4,null),this._register(V.onDidClick(J=>{this.onDidCustomEmitter.fire()}));const K=L.append(T,f(`#${this.idPrefix}message.quick-input-message`)),F=this._register(new S.ProgressBar(l,this.styles.progressBar));F.getContainer().classList.add("quick-input-progress");const q=L.append(l,f(".quick-input-html-widget"));q.tabIndex=-1;const ie=L.append(l,f(".quick-input-description")),ae=this.idPrefix+"list",ne=this._register(new t.QuickInputList(l,ae,this.options,this.themeService));P.setAttribute("aria-controls",ae),this._register(ne.onDidChangeFocus(()=>{var J;P.setAttribute("aria-activedescendant",(J=ne.getActiveDescendant())!==null&&J!==void 0?J:"")})),this._register(ne.onChangedAllVisibleChecked(J=>{D.checked=J})),this._register(ne.onChangedVisibleCount(J=>{M.setCount(J)})),this._register(ne.onChangedCheckedCount(J=>{x.setCount(J)})),this._register(ne.onLeave(()=>{setTimeout(()=>{P.setFocus(),this.controller instanceof r.QuickPick&&this.controller.canSelectMany&&ne.clearFocus()},0)}));const $=L.trackFocus(l);return this._register($),this._register(L.addDisposableListener(l,L.EventType.FOCUS,J=>{L.isAncestor(J.relatedTarget,l)||(this.previousFocusElement=J.relatedTarget instanceof HTMLElement?J.relatedTarget:void 0)},!0)),this._register($.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(i.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(L.addDisposableListener(l,L.EventType.FOCUS,J=>{P.setFocus()})),this._register(L.addStandardDisposableListener(l,L.EventType.KEY_DOWN,J=>{if(!L.isAncestor(J.target,q))switch(J.keyCode){case 3:L.EventHelper.stop(J,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:L.EventHelper.stop(J,!0),this.hide(i.QuickInputHideReason.Gesture);break;case 2:if(!J.altKey&&!J.ctrlKey&&!J.metaKey){const Q=[".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")?Q.push("input"):Q.push("input[type=text]"),this.getUI().list.isDisplayed()&&Q.push(".monaco-list"),this.getUI().message&&Q.push(".quick-input-message a"),this.getUI().widget){if(L.isAncestor(J.target,this.getUI().widget))break;Q.push(".quick-input-html-widget")}const re=l.querySelectorAll(Q.join(", "));J.shiftKey&&J.target===re[0]?(L.EventHelper.stop(J,!0),ne.clearFocus()):!J.shiftKey&&L.isAncestor(J.target,re[re.length-1])&&(L.EventHelper.stop(J,!0),re[0].focus())}break;case 10:J.ctrlKey&&(L.EventHelper.stop(J,!0),this.getUI().list.toggleHover());break}})),this.ui={container:l,styleSheet:o,leftActionBar:h,titleBar:g,title:m,description1:ie,description2:I,widget:q,rightActionBar:C,checkAll:D,inputContainer:T,filterContainer:A,inputBox:P,visibleCountContainer:N,visibleCount:M,countContainer:R,count:x,okContainer:O,ok:B,message:K,customButtonContainer:W,customButton:V,list:ne,progressBar:F,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:J=>this.show(J),hide:()=>this.hide(),setVisibilities:J=>this.setVisibilities(J),setEnabled:J=>this.setEnabled(J),setContextKey:J=>this.options.setContextKey(J),linkOpenerDelegate:J=>this.options.linkOpenerDelegate(J)},this.updateStyles(),this.ui}reparentUI(s){this.ui&&(this.parentElement=s,L.append(this.parentElement,this.ui.container))}pick(s,l={},o=p.CancellationToken.None){return new Promise((g,h)=>{let m=I=>{var T;m=g,(T=l.onKeyMods)===null||T===void 0||T.call(l,C.keyMods),g(I)};if(o.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 T=I[0];T&&l.onDidFocus&&l.onDidFocus(T)}),C.onDidChangeSelection(I=>{if(!C.canSelectMany){const T=I[0];T&&(m(T),C.hide())}}),C.onDidTriggerItemButton(I=>l.onDidTriggerItemButton&&l.onDidTriggerItemButton({...I,removeItem:()=>{const T=C.items.indexOf(I.item);if(T!==-1){const A=C.items.slice(),P=A.splice(T,1),N=C.activeItems.filter(R=>R!==P[0]),M=C.keepScrollPosition;C.keepScrollPosition=!0,C.items=A,N&&(C.activeItems=N),C.keepScrollPosition=M}}})),C.onDidTriggerSeparatorButton(I=>{var T;return(T=l.onDidTriggerSeparatorButton)===null||T===void 0?void 0:T.call(l,I)}),C.onDidChangeValue(I=>{w&&!I&&(C.activeItems.length!==1||C.activeItems[0]!==w)&&(C.activeItems=[w])}),o.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.quickNavigate=l.quickNavigate,C.hideInput=!!l.hideInput,C.contextKey=l.contextKey,C.busy=!0,Promise.all([s,l.activeItem]).then(([I,T])=>{w=T,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(s).then(void 0,I=>{h(I),C.hide()})})}createQuickPick(){const s=this.getUI(!0);return new r.QuickPick(s)}createInputBox(){const s=this.getUI(!0);return new r.InputBox(s)}show(s){const l=this.getUI(!0);this.onShowEmitter.fire();const o=this.controller;this.controller=s,o?.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();r.backButton.tooltip=g?(0,a.localize)(5,null,g):(0,a.localize)(6,null),l.container.style.display="",this.updateLayout(),l.inputBox.setFocus()}isVisible(){return!!this.ui&&this.ui.container.style.display!=="none"}setVisibilities(s){const l=this.getUI();l.title.style.display=s.title?"":"none",l.description1.style.display=s.description&&(s.inputBox||s.checkAll)?"":"none",l.description2.style.display=s.description&&!(s.inputBox||s.checkAll)?"":"none",l.checkAll.style.display=s.checkAll?"":"none",l.inputContainer.style.display=s.inputBox?"":"none",l.filterContainer.style.display=s.inputBox?"":"none",l.visibleCountContainer.style.display=s.visibleCount?"":"none",l.countContainer.style.display=s.count?"":"none",l.okContainer.style.display=s.ok?"":"none",l.customButtonContainer.style.display=s.customButton?"":"none",l.message.style.display=s.message?"":"none",l.progressBar.getContainer().style.display=s.progressBar?"":"none",l.list.display(!!s.list),l.container.classList.toggle("show-checkboxes",!!s.checkBox),l.container.classList.toggle("hidden-input",!s.inputBox&&!s.description),this.updateLayout()}setEnabled(s){if(s!==this.enabled){this.enabled=s;for(const l of this.getUI().leftActionBar.viewItems)l.action.enabled=s;for(const l of this.getUI().rightActionBar.viewItems)l.action.enabled=s;this.getUI().checkAll.disabled=!s,this.getUI().inputBox.enabled=s,this.getUI().ok.enabled=s,this.getUI().list.enabled=s}}hide(s){var l,o;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=(o=C.parentElement)!==null&&o!==void 0?o:void 0;C?.offsetParent?(C.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}g.didHide(s)}layout(s,l){this.dimension=s,this.titleBarOffset=l,this.updateLayout()}updateLayout(){if(this.ui&&this.isVisible()){this.ui.container.style.top=`${this.titleBarOffset}px`;const s=this.ui.container.style,l=Math.min(this.dimension.width*.62,c.MAX_WIDTH);s.width=l+"px",s.marginLeft="-"+l/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(s){this.styles=s,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:s,quickInputBackground:l,quickInputForeground:o,widgetBorder:g,widgetShadow:h}=this.styles.widget;this.ui.titleBar.style.backgroundColor=s??"",this.ui.container.style.backgroundColor=l??"",this.ui.container.style.color=o??"",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(se[23],oe([1,0,6,2,8,37,89]),function(te,e,L,k,y,E,S){"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 _(n){switch(n){case S.ColorScheme.DARK:return"vs-dark";case S.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case S.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=_,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 r=this.themingParticipants.indexOf(t);this.themingParticipants.splice(r,1)})}getThemingParticipants(){return this.themingParticipants}}const b=new v;E.Registry.add(e.Extensions.ThemingContribution,b);function a(n){return b.onColorThemeChange(n)}e.registerThemingParticipant=a;class i extends k.Disposable{constructor(t){super(),this.themeService=t,this.theme=t.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(t){this.theme=t,this.updateStyles()}updateStyles(){}}e.Themable=i}),define(se[851],oe([1,0,6,2,66,23]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let S=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 a of b){if(a.hasTextFocus())return a;a.hasWidgetFocus()&&(v=a)}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(a=>a.removeDecorationsByType(v))))}setModelProperty(v,b,a){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,a)}getModelProperty(v,b){const a=v.toString();if(this._modelProperties.has(a))return this._modelProperties.get(a).get(b)}async openCodeEditor(v,b,a){for(const i of this._codeEditorOpenHandlers){const n=await i(v,b,a);if(n!==null)return n}return null}registerCodeEditorOpenHandler(v){const b=this._codeEditorOpenHandlers.unshift(v);return(0,k.toDisposable)(b)}};e.AbstractCodeEditorService=S,e.AbstractCodeEditorService=S=ke([ge(0,E.IThemeService)],S);class p{constructor(v){this._styleSheet=v}}e.GlobalStyleSheet=p}),define(se[852],oe([1,0,45,23,29,244,59,8,789,2,7,34,46,69,123,44]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverService=void 0;let u=class{constructor(s,l,o,g,h,m){this._instantiationService=s,this._contextViewService=l,this._keybindingService=g,this._layoutService=h,this._accessibilityService=m,o.onDidShowContextMenu(()=>this.hideHover())}showHover(s,l,o){var g,h,m,C;if(f(this._currentHoverOptions)===f(s)||this._currentHover&&(!((h=(g=this._currentHoverOptions)===null||g===void 0?void 0:g.persistence)===null||h===void 0)&&h.sticky))return;this._currentHoverOptions=s,this._lastHoverOptions=s;const w=s.trapFocus||this._accessibilityService.isScreenReaderOptimized(),D=(0,b.getActiveElement)();o||(w&&D?this._lastFocusedElementBeforeOpen=D:this._lastFocusedElementBeforeOpen=void 0);const I=new v.DisposableStore,T=this._instantiationService.createInstance(_.HoverWidget,s);if(!((m=s.persistence)===null||m===void 0)&&m.sticky&&(T.isLocked=!0),T.onDispose(()=>{var P,N;((P=this._currentHover)===null||P===void 0?void 0:P.domNode)&&(0,b.isAncestorOfActiveElement)(this._currentHover.domNode)&&((N=this._lastFocusedElementBeforeOpen)===null||N===void 0||N.focus()),this._currentHoverOptions===s&&(this._currentHoverOptions=void 0),I.dispose()}),!s.container){const P=s.target instanceof HTMLElement?s.target:s.target.targetElements[0];s.container=this._layoutService.getContainer((0,b.getWindow)(P))}const A=this._contextViewService;if(A.showContextView(new c(T,l),s.container),T.onRequestLayout(()=>A.layout()),!((C=s.persistence)===null||C===void 0)&&C.sticky)I.add((0,b.addDisposableListener)((0,b.getWindow)(s.container).document,b.EventType.MOUSE_DOWN,P=>{(0,b.isAncestor)(P.target,T.domNode)||this.doHideHover()}));else{if("targetElements"in s.target)for(const N of s.target.targetElements)I.add((0,b.addDisposableListener)(N,b.EventType.CLICK,()=>this.hideHover()));else I.add((0,b.addDisposableListener)(s.target,b.EventType.CLICK,()=>this.hideHover()));const P=(0,b.getActiveElement)();if(P){const N=(0,b.getWindow)(P).document;I.add((0,b.addDisposableListener)(P,b.EventType.KEY_DOWN,M=>{var R;return this._keyDown(M,T,!!(!((R=s.persistence)===null||R===void 0)&&R.hideOnKeyDown))})),I.add((0,b.addDisposableListener)(N,b.EventType.KEY_DOWN,M=>{var R;return this._keyDown(M,T,!!(!((R=s.persistence)===null||R===void 0)&&R.hideOnKeyDown))})),I.add((0,b.addDisposableListener)(P,b.EventType.KEY_UP,M=>this._keyUp(M,T))),I.add((0,b.addDisposableListener)(N,b.EventType.KEY_UP,M=>this._keyUp(M,T)))}}if("IntersectionObserver"in r.mainWindow){const P=new IntersectionObserver(M=>this._intersectionChange(M,T),{threshold:0}),N="targetElements"in s.target?s.target.targetElements[0]:s.target;P.observe(N),I.add((0,v.toDisposable)(()=>P.disconnect()))}return this._currentHover=T,T}hideHover(){var s;!((s=this._currentHover)===null||s===void 0)&&s.isLocked||!this._currentHoverOptions||this.doHideHover()}doHideHover(){this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView()}_intersectionChange(s,l){s[s.length-1].isIntersecting||l.dispose()}_keyDown(s,l,o){var g,h;if(s.key==="Alt"){l.isLocked=!0;return}const m=new i.StandardKeyboardEvent(s);this._keybindingService.resolveKeyboardEvent(m).getSingleModifierDispatchChords().some(w=>!!w)||this._keybindingService.softDispatch(m,m.target).kind!==0||o&&(!(!((g=this._currentHoverOptions)===null||g===void 0)&&g.trapFocus)||s.key!=="Tab")&&(this.hideHover(),(h=this._lastFocusedElementBeforeOpen)===null||h===void 0||h.focus())}_keyUp(s,l){var o;s.key==="Alt"&&(l.isLocked=!1,l.isMouseIn||(this.hideHover(),(o=this._lastFocusedElementBeforeOpen)===null||o===void 0||o.focus()))}};e.HoverService=u,e.HoverService=u=ke([ge(0,p.IInstantiationService),ge(1,S.IContextViewService),ge(2,S.IContextMenuService),ge(3,a.IKeybindingService),ge(4,t.ILayoutService),ge(5,n.IAccessibilityService)],u);function f(d){var s;if(d!==void 0)return(s=d?.id)!==null&&s!==void 0?s:d}class c{get anchorPosition(){return this._hover.anchor}constructor(s,l=!1){this._hover=s,this._focus=l}render(s){return this._hover.render(s),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}(0,L.registerSingleton)(E.IHoverService,u,1),(0,k.registerThemingParticipant)((d,s)=>{const l=d.getColor(y.editorHoverBorder);l&&(s.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${l.transparent(.5)}; }`),s.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${l.transparent(.5)}; }`))})}),define(se[853],oe([1,0,7,40,77,56,23]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class p extends E.ViewPart{constructor(v,b,a,i){super(v);const n=this._context.configuration.options,t=n.get(102),r=n.get(74),u=n.get(40),f=n.get(105),c={listenOnDomNode:a.domNode,className:"editor-scrollable "+(0,S.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:r,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(),6),this.scrollbarDomNode=(0,k.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(s,l,o)=>{const g={};if(l){const h=s.scrollTop;h&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+h,s.scrollTop=0)}if(o){const h=s.scrollLeft;h&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+h,s.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(L.addDisposableListener(a.domNode,"scroll",s=>d(a.domNode,!0,!0))),this._register(L.addDisposableListener(b.domNode,"scroll",s=>d(b.domNode,!0,!1))),this._register(L.addDisposableListener(i.domNode,"scroll",s=>d(i.domNode,!0,!1))),this._register(L.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",s=>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,a=b.get(102),i=b.get(74),n=b.get(40),t=b.get(105),r={vertical:a.vertical,horizontal:a.horizontal,verticalScrollbarSize:a.verticalScrollbarSize,horizontalScrollbarSize:a.horizontalScrollbarSize,scrollByPage:a.scrollByPage,handleMouseWheel:a.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:t};this.scrollbar.updateOptions(r)}return v.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(v){return!0}onThemeChanged(v){return this.scrollbar.updateClassName("editor-scrollable "+(0,S.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(v){}render(v){this.scrollbar.renderNow()}}e.EditorScrollbar=p}),define(se[854],oe([1,0,115,29,23,444]),function(te,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 S{constructor(i,n){this.lineNumber=i,this.ranges=n}}function p(a){return new E(a)}function _(a){return new S(a.lineNumber,a.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;n<t;n++)if(i[n].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(i,n,t){const r=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 s=0;!u&&s<t.length;s++)t[s].lineNumber===c&&(u=t[s].ranges[0]);const d=n[n.length-1].lineNumber;if(d===i.endLineNumber)for(let s=t.length-1;!f&&s>=0;s--)t[s].lineNumber===d&&(f=t[s].ranges[0]);u&&!u.startStyle&&(u=null),f&&!f.startStyle&&(f=null)}for(let c=0,d=n.length;c<d;c++){const s=n[c].ranges[0],l=s.left,o=s.left+s.width,g={top:0,bottom:0},h={top:0,bottom:0};if(c>0){const m=n[c-1].ranges[0].left,C=n[c-1].ranges[0].left+n[c-1].ranges[0].width;b(l-m)<r?g.top=2:l>m&&(g.top=1),b(o-C)<r?h.top=2:m<o&&o<C&&(h.top=1)}else u&&(g.top=u.startStyle.top,h.top=u.endStyle.top);if(c+1<d){const m=n[c+1].ranges[0].left,C=n[c+1].ranges[0].left+n[c+1].ranges[0].width;b(l-m)<r?g.bottom=2:m<l&&l<C&&(g.bottom=1),b(o-C)<r?h.bottom=2:o<C&&(h.bottom=1)}else f&&(g.bottom=f.startStyle.bottom,h.bottom=f.endStyle.bottom);s.startStyle=g,s.endStyle=h}}_getVisibleRangesWithStyle(i,n,t){const u=(n.linesVisibleRangesForRange(i,!0)||[]).map(_);return!this._visibleRangesHaveGaps(u)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(n.visibleRange,u,t),u}_createSelectionPiece(i,n,t,r,u){return'<div class="cslr '+t+'" style="top:'+i.toString()+"px;left:"+r.toString()+"px;width:"+u.toString()+"px;height:"+n+'px;"></div>'}_actualRenderOneSelection(i,n,t,r){if(r.length===0)return;const u=!!r[0].ranges[0].startStyle,f=this._lineHeight.toString(),c=(this._lineHeight-1).toString(),d=r[0].lineNumber,s=r[r.length-1].lineNumber;for(let l=0,o=r.length;l<o;l++){const g=r[l],h=g.lineNumber,m=h-n,C=t&&(h===s||h===d)?c:f,w=t&&h===d?1:0;let D="",I="";for(let T=0,A=g.ranges.length;T<A;T++){const P=g.ranges[T];if(u){const M=P.startStyle,R=P.endStyle;if(M.top===1||M.bottom===1){D+=this._createSelectionPiece(w,C,v.SELECTION_CLASS_NAME,P.left-v.ROUNDED_PIECE_WIDTH,v.ROUNDED_PIECE_WIDTH);let x=v.EDITOR_BACKGROUND_CLASS_NAME;M.top===1&&(x+=" "+v.SELECTION_TOP_RIGHT),M.bottom===1&&(x+=" "+v.SELECTION_BOTTOM_RIGHT),D+=this._createSelectionPiece(w,C,x,P.left-v.ROUNDED_PIECE_WIDTH,v.ROUNDED_PIECE_WIDTH)}if(R.top===1||R.bottom===1){D+=this._createSelectionPiece(w,C,v.SELECTION_CLASS_NAME,P.left+P.width,v.ROUNDED_PIECE_WIDTH);let x=v.EDITOR_BACKGROUND_CLASS_NAME;R.top===1&&(x+=" "+v.SELECTION_TOP_LEFT),R.bottom===1&&(x+=" "+v.SELECTION_BOTTOM_LEFT),D+=this._createSelectionPiece(w,C,x,P.left+P.width,v.ROUNDED_PIECE_WIDTH)}}let N=v.SELECTION_CLASS_NAME;if(u){const M=P.startStyle,R=P.endStyle;M.top===0&&(N+=" "+v.SELECTION_TOP_LEFT),M.bottom===0&&(N+=" "+v.SELECTION_BOTTOM_LEFT),R.top===0&&(N+=" "+v.SELECTION_TOP_RIGHT),R.bottom===0&&(N+=" "+v.SELECTION_BOTTOM_RIGHT)}I+=this._createSelectionPiece(w,C,N,P.left,P.width)}i[m][0]+=D,i[m][1]+=I}}prepareRender(i){const n=[],t=i.visibleRange.startLineNumber,r=i.visibleRange.endLineNumber;for(let f=t;f<=r;f++){const c=f-t;n[c]=["",""]}const u=[];for(let f=0,c=this._selections.length;f<c;f++){const d=this._selections[f];if(d.isEmpty()){u[f]=null;continue}const s=this._getVisibleRangesWithStyle(d,i,this._previousFrameVisibleRangesWithStyle[f]);u[f]=s,this._actualRenderOneSelection(n,t,this._selections.length>1,s)}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)((a,i)=>{const n=a.getColor(k.editorSelectionForeground);n&&!n.isTransparent()&&i.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function b(a){return a<0?-a:a}}),define(se[368],oe([1,0,7,40,197,2,35,87,10,300,29,23]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerFeature=void 0;let n=i=class extends E.Disposable{constructor(r,u,f,c,d,s,l){super(),this._editors=r,this._rootElement=u,this._diffModel=f,this._rootWidth=c,this._rootHeight=d,this._modifiedEditorLayoutInfo=s,this._themeService=l,this.width=i.ENTIRE_DIFF_OVERVIEW_WIDTH;const o=(0,S.observableFromEvent)(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),g=(0,S.derived)(C=>{const w=o.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,S.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 T=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(T&&(w.add(T),w.add((0,p.appendRemoveOnDispose)(m,T.getDomNode()))),!I||!T)return;const A=(0,S.observableSignalFromEvent)("viewZoneChanged",this._editors.original.onDidChangeViewZones),P=(0,S.observableSignalFromEvent)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),N=(0,S.observableSignalFromEvent)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),M=(0,S.observableSignalFromEvent)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);w.add((0,S.autorun)(R=>{var x;A.read(R),P.read(R),N.read(R),M.read(R);const O=g.read(R),B=(x=D?.diff.read(R))===null||x===void 0?void 0:x.mappings;function W(F,q,ie){const ae=ie._getViewModel();return ae?F.filter(ne=>ne.length>0).map(ne=>{const $=ae.coordinatesConverter.convertModelPositionToViewPosition(new _.Position(ne.startLineNumber,1)),J=ae.coordinatesConverter.convertModelPositionToViewPosition(new _.Position(ne.endLineNumberExclusive,1)),Q=J.lineNumber-$.lineNumber;return new v.OverviewRulerZone($.lineNumber,J.lineNumber,Q,q.toString())}):[]}const V=W((B||[]).map(F=>F.lineRangeMapping.original),O.removeColor,this._editors.original),K=W((B||[]).map(F=>F.lineRangeMapping.modified),O.insertColor,this._editors.modified);I?.setZones(V),T?.setZones(K)})),w.add((0,S.autorun)(R=>{const x=this._rootHeight.read(R),O=this._rootWidth.read(R),B=this._modifiedEditorLayoutInfo.read(R);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}),T.setLayout({top:0,height:x,right:0,width:i.ONE_OVERVIEW_WIDTH});const V=this._editors.modifiedScrollTop.read(R),K=this._editors.modifiedScrollHeight.read(R),F=this._editors.modified.getOption(102),q=new y.ScrollbarState(F.verticalHasArrows?F.arrowSize:0,F.verticalScrollbarSize,0,B.height,K,V);h.setTop(q.getSliderPosition()),h.setHeight(q.getSliderSize())}else h.setTop(0),h.setHeight(0);m.style.height=x+"px",m.style.left=O-i.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",h.setWidth(i.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}};e.OverviewRulerFeature=n,n.ONE_OVERVIEW_WIDTH=15,n.ENTIRE_DIFF_OVERVIEW_WIDTH=i.ONE_OVERVIEW_WIDTH*2,e.OverviewRulerFeature=n=i=ke([ge(6,a.IThemeService)],n)}),define(se[855],oe([1,0,6,2,35,368,36,623,8,34,10]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorEditors=void 0;let a=class extends k.Disposable{get onDidContentSizeChange(){return this._onDidContentSizeChange.event}constructor(n,t,r,u,f,c,d){super(),this.originalEditorElement=n,this.modifiedEditorElement=t,this._options=r,this._createInnerEditor=f,this._instantiationService=c,this._keybindingService=d,this._onDidContentSizeChange=this._register(new L.Emitter),this.original=this._register(this._createLeftHandSideEditor(r.editorOptions.get(),u.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(r.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 s;return(s=this.modified.getSelections())!==null&&s!==void 0?s:[]}),this.modifiedCursor=(0,y.observableFromEvent)(this.modified.onDidChangeCursorPosition,()=>{var s;return(s=this.modified.getPosition())!==null&&s!==void 0?s:new b.Position(1,1)}),this._register((0,y.autorunHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:(s,l)=>(s.didChange(r.editorOptions)&&Object.assign(l,s.change.changedOptions),!0)},(s,l)=>{r.editorOptions.read(s),this._options.renderSideBySide.read(s),this.modified.updateOptions(this._adjustOptionsForRightHandSide(s,l)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(s,l))}))}_createLeftHandSideEditor(n,t){const r=this._adjustOptionsForLeftHandSide(void 0,n),u=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,r,t);return u.setContextValue("isInDiffLeftEditor",!0),u}_createRightHandSideEditor(n,t){const r=this._adjustOptionsForRightHandSide(void 0,n),u=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,r,t);return u.setContextValue("isInDiffRightEditor",!0),u}_constructInnerEditor(n,t,r,u){const f=this._createInnerEditor(n,t,r,u);return this._register(f.onDidContentSizeChange(c=>{const d=this.original.getContentWidth()+this.modified.getContentWidth()+E.OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH,s=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:s,contentWidth:d,contentHeightChanged:c.contentHeightChanged,contentWidthChanged:c.contentWidthChanged})})),f}_adjustOptionsForLeftHandSide(n,t){const r=this._adjustOptionsForSubEditor(t);return this._options.renderSideBySide.get()?(r.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},r.wordWrapOverride1=this._options.diffWordWrap.get()):(r.wordWrapOverride1="off",r.wordWrapOverride2="off",r.stickyScroll={enabled:!1},r.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),r.glyphMargin=this._options.renderSideBySide.get(),t.originalAriaLabel&&(r.ariaLabel=t.originalAriaLabel),r.ariaLabel=this._updateAriaLabel(r.ariaLabel),r.readOnly=!this._options.originalEditable.get(),r.dropIntoEditor={enabled:!r.readOnly},r.extraEditorClassName="original-in-monaco-diff-editor",r}_adjustOptionsForRightHandSide(n,t){const r=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(r.ariaLabel=t.modifiedAriaLabel),r.ariaLabel=this._updateAriaLabel(r.ariaLabel),r.wordWrapOverride1=this._options.diffWordWrap.get(),r.revealHorizontalRightPadding=S.EditorOptions.revealHorizontalRightPadding.defaultValue+E.OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH,r.scrollbar.verticalHasArrows=!1,r.extraEditorClassName="modified-in-monaco-diff-editor",r}_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 r=(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+r:n?n.replaceAll(r,""):""}};e.DiffEditorEditors=a,e.DiffEditorEditors=a=ke([ge(5,_.IInstantiationService),ge(6,v.IKeybindingService)],a)}),define(se[83],oe([1,0,638,39,29,23]),function(te,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 S=(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:S,light:S,hcDark:S,hcLight:S},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:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningForeground,hcLight:y.editorWarningForeground},L.localize(65,null)),e.editorUnicodeHighlightBackground=(0,y.registerColor)("editorUnicodeHighlight.background",{dark:y.editorWarningBackground,light:y.editorWarningBackground,hcDark:y.editorWarningBackground,hcLight:y.editorWarningBackground},L.localize(66,null)),(0,E.registerThemingParticipant)((_,v)=>{const b=_.getColor(y.editorBackground),a=_.getColor(e.editorLineHighlight),i=a&&!a.isTransparent()?a:b;i&&v.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)})}),define(se[856],oe([1,0,115,83,13,23,24,89,10,431]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class v extends L.DynamicViewOverlay{constructor(n){super(),this._context=n;const t=this._context.configuration.options,r=t.get(143);this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=r.isViewportWrapping,this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new S.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let n=!1;const t=new Set;for(const f of this._selections)t.add(f.positionLineNumber);const r=Array.from(t);r.sort((f,c)=>f-c),y.equals(this._cursorLineNumbers,r)||(this._cursorLineNumbers=r,n=!0);const u=this._selections.every(f=>f.isEmpty());return this._selectionIsEmpty!==u&&(this._selectionIsEmpty=u,n=!0),n}onThemeChanged(n){return this._readFromSelections()}onConfigurationChanged(n){const t=this._context.configuration.options,r=t.get(143);return this._lineHeight=t.get(66),this._renderLineHighlight=t.get(95),this._renderLineHighlightOnlyWhenFocus=t.get(96),this._wordWrap=r.isViewportWrapping,this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,!0}onCursorStateChanged(n){return this._selections=n.selections,this._readFromSelections()}onFlushed(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollWidthChanged||n.scrollTopChanged}onZonesChanged(n){return!0}onFocusChanged(n){return this._renderLineHighlightOnlyWhenFocus?(this._focused=n.isFocused,!0):!1}prepareRender(n){if(!this._shouldRenderThis()){this._renderData=null;return}const t=n.visibleRange.startLineNumber,r=n.visibleRange.endLineNumber,u=[];for(let c=t;c<=r;c++){const d=c-t;u[d]=""}if(this._wordWrap){const c=this._renderOne(n,!1);for(const d of this._cursorLineNumbers){const s=this._context.viewModel.coordinatesConverter,l=s.convertViewPositionToModelPosition(new _.Position(d,1)).lineNumber,o=s.convertModelPositionToViewPosition(new _.Position(l,1)).lineNumber,g=s.convertModelPositionToViewPosition(new _.Position(l,this._context.viewModel.model.getLineMaxColumn(l))).lineNumber,h=Math.max(o,t),m=Math.min(g,r);for(let C=h;C<=m;C++){const w=C-t;u[w]=c}}}const f=this._renderOne(n,!0);for(const c of this._cursorLineNumbers){if(c<t||c>r)continue;const d=c-t;u[d]=f}this._renderData=u}render(n,t){if(!this._renderData)return"";const r=t-n;return r>=this._renderData.length?"":this._renderData[r]}_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=v;class b extends v{_renderOne(n,t){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(t?" current-line-exact":"")}" style="width:${Math.max(n.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=b;class a extends v{_renderOne(n,t){return`<div class="${"current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&t?" current-line-exact-margin":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=a,(0,E.registerThemingParticipant)((i,n)=>{const t=i.getColor(k.editorLineHighlight);if(t&&(n.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||i.defines(k.editorLineHighlightBorder)){const r=i.getColor(k.editorLineHighlightBorder);r&&(n.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${r}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${r}; }`),(0,p.isHighContrast)(i.type)&&(n.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),n.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}})}),define(se[857],oe([1,0,115,83,23,10,13,20,297,212,434]),function(te,e,L,k,y,E,S,p,_,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,r=t.get(144),u=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.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,r=t.get(144),u=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.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,r,u,f;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const c=n.visibleRange.startLineNumber,d=n.visibleRange.endLineNumber,s=n.scrollWidth,l=this._lineHeight,o=this._primaryPosition,g=this.getGuidesByLine(c,Math.min(d+1,this._context.viewModel.getLineCount()),o),h=[];for(let m=c;m<=d;m++){const C=m-c,w=g[C];let D="";const I=(r=(t=n.visibleRangeForPosition(new E.Position(m,1)))===null||t===void 0?void 0:t.left)!==null&&r!==void 0?r:0;for(const T of w){const A=T.column===-1?I+(T.visibleColumn-1)*this._spaceWidth:n.visibleRangeForPosition(new E.Position(m,T.column)).left;if(A>s||this._maxIndentLeft>0&&A>this._maxIndentLeft)break;const P=T.horizontalLine?T.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",N=T.horizontalLine?((f=(u=n.visibleRangeForPosition(new E.Position(m,T.horizontalLine.endColumn)))===null||u===void 0?void 0:u.left)!==null&&f!==void 0?f:A+this._spaceWidth)-A:this._spaceWidth;D+=`<div class="core-guide ${T.className} ${P}" style="left:${A}px;height:${l}px;width:${N}px"></div>`}h[C]=D}this._renderResult=h}getGuidesByLine(n,t,r){const u=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(n,t,r,{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,s=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&r){const g=this._context.viewModel.getActiveIndentGuide(r.lineNumber,n,t);c=g.startLineNumber,d=g.endLineNumber,s=g.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),o=[];for(let g=n;g<=t;g++){const h=new Array;o.push(h);const m=u?u[g-n]:[],C=new S.ArrayQueue(m),w=f?f[g-n]:0;for(let D=1;D<=w;D++){const I=(D-1)*l+1,T=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||m.length===0)&&c<=g&&g<=d&&D===s;h.push(...C.takeWhile(P=>P.visibleColumn<I)||[]);const A=C.peek();(!A||A.visibleColumn!==I||A.horizontalLine)&&h.push(new v.IndentGuide(I,-1,`core-guide-indent lvl-${(D-1)%30}`+(T?" indent-active":""),null,-1,-1))}h.push(...C.takeWhile(D=>!0)||[])}return o}render(n,t){if(!this._renderResult)return"";const r=t-n;return r<0||r>=this._renderResult.length?"":this._renderResult[r]}}e.IndentGuidesOverlay=b;function a(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}],r=new _.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 s,l;const o=i.getColor(d.bracketColor),g=i.getColor(d.guideColor),h=i.getColor(d.guideColorActive),m=a((s=a(g))!==null&&s!==void 0?s:o?.transparent(.3)),C=a((l=a(h))!==null&&l!==void 0?l:o);if(!(!m||!C))return{guideColor:m,guideColorActive:C}}).filter(p.isDefined),c=u.map(d=>{const s=i.getColor(d.indentColor),l=i.getColor(d.indentColorActive),o=a(s),g=a(l);if(!(!o||!g))return{indentColor:o,indentColorActive:g}}).filter(p.isDefined);if(f.length>0){for(let d=0;d<30;d++){const s=f[d%f.length];n.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(d).replace(/ /g,".")} { --guide-color: ${s.guideColor}; --guide-color-active: ${s.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.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(c.length>0){for(let d=0;d<30;d++){const s=c[d%c.length];n.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${d} { --indent-color: ${s.indentColor}; --indent-color-active: ${s.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(se[369],oe([1,0,17,115,10,5,23,83,435]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class _ extends k.DynamicViewOverlay{constructor(b){super(),this._context=b,this._readConfig(),this._lastCursorModelPosition=new y.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const b=this._context.configuration.options;this._lineHeight=b.get(66);const a=b.get(67);this._renderLineNumbers=a.renderType,this._renderCustomLineNumbers=a.renderFn,this._renderFinalNewline=b.get(94);const i=b.get(143);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){return this._readConfig(),!0}onCursorStateChanged(b){const a=b.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(a);let i=!1;return this._activeLineNumber!==a.lineNumber&&(this._activeLineNumber=a.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(i=!0),i}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}onDecorationsChanged(b){return b.affectsLineNumber}_getLineRenderLineNumber(b){const a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new y.Position(b,1));if(a.column!==1)return"";const i=a.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?'<span class="relative-current-line-number">'+i+"</span>":String(n)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(b){if(this._renderLineNumbers===0){this._renderResult=null;return}const a=L.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=b.visibleRange.startLineNumber,n=b.visibleRange.endLineNumber,t=this._context.viewModel.getDecorationsInViewport(b.visibleRange).filter(c=>!!c.options.lineNumberClassName);t.sort((c,d)=>E.Range.compareRangesUsingEnds(c.range,d.range));let r=0;const u=this._context.viewModel.getLineCount(),f=[];for(let c=i;c<=n;c++){const d=c-i;let s=this._getLineRenderLineNumber(c),l="";for(;r<t.length&&t[r].range.endLineNumber<c;)r++;for(let o=r;o<t.length;o++){const{range:g,options:h}=t[o];g.startLineNumber<=c&&(l+=" "+h.lineNumberClassName)}if(!s&&!l){f[d]="";continue}c===u&&this._context.viewModel.getLineLength(c)===0&&(this._renderFinalNewline==="off"&&(s=""),this._renderFinalNewline==="dimmed"&&(l+=" dimmed-line-number")),c===this._activeLineNumber&&(l+=" active-line-number"),f[d]=`<div class="${_.CLASS_NAME}${a}${l}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${s}</div>`}this._renderResult=f}render(b,a){if(!this._renderResult)return"";const i=a-b;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}e.LineNumbersOverlay=_,_.CLASS_NAME="line-numbers",(0,S.registerThemingParticipant)((v,b)=>{const a=v.getColor(p.editorLineNumbers),i=v.getColor(p.editorDimmedLineNumber);i?b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${i}; }`):a&&b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${a.transparent(.4)}; }`)})}),define(se[858],oe([1,0,618,54,40,17,11,72,190,280,56,369,299,36,150,10,5,24,200,31,39,270,34,8,429]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class h{constructor(I,T,A,P,N){this._context=I,this.modelLineNumber=T,this.distanceToModelLineStart=A,this.widthOfHiddenLineTextBefore=P,this.distanceToModelLineEnd=N,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(I){const T=new r.Position(this.modelLineNumber,this.distanceToModelLineStart+1),A=new r.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(T),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,T,A,P,N){super(I),this._keybindingService=P,this._instantiationService=N,this._primaryCursorPosition=new r.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=T,this._visibleRangeProvider=A,this._scrollLeft=0,this._scrollTop=0;const M=this._context.configuration.options,R=M.get(143);this._setAccessibilityOptions(M),this._contentLeft=R.contentLeft,this._contentWidth=R.contentWidth,this._contentHeight=R.height,this._fontInfo=M.get(50),this._lineHeight=M.get(66),this._emptySelectionClipboard=M.get(37),this._copyWithSyntaxHighlighting=M.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,7),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(M)),this.textArea.setAttribute("aria-required",M.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(M.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",M.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,y.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const O={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:V=>this._context.viewModel.getLineMaxColumn(V),getValueInRange:(V,K)=>this._context.viewModel.getValueInRange(V,K),getValueLengthInRange:(V,K)=>this._context.viewModel.getValueLengthInRange(V,K),modifyPosition:(V,K)=>this._context.viewModel.modifyPosition(V,K)},B={getDataToCopy:()=>{const V=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,E.isWindows),K=this._context.viewModel.model.getEOL(),F=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),q=Array.isArray(V)?V:null,ie=Array.isArray(V)?V.join(K):V;let ae,ne=null;if(_.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&ie.length<65536){const $=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);$&&(ae=$.html,ne=$.mode)}return{isFromEmptySelection:F,multicursorText:q,text:ie,html:ae,mode:ne}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const V=this._selections[0];if(E.isMacintosh&&V.isEmpty()){const F=V.getStartPosition();let q=this._getWordBeforePosition(F);if(q.length===0&&(q=this._getCharacterBeforePosition(F)),q.length>0)return new v.TextAreaState(q,q.length,q.length,u.Range.fromPositions(F),0)}const K=500;if(E.isMacintosh&&!V.isEmpty()&&O.getValueLengthInRange(V,0)<K){const F=O.getValueInRange(V,0);return new v.TextAreaState(F,0,F.length,V,0)}if(k.isSafari&&!V.isEmpty()){const F="vscode-placeholder";return new v.TextAreaState(F,0,F.length,null,void 0)}return v.TextAreaState.EMPTY}if(k.isAndroid){const V=this._selections[0];if(V.isEmpty()){const K=V.getStartPosition(),[F,q]=this._getAndroidWordAtPosition(K);if(F.length>0)return new v.TextAreaState(F,q,q,u.Range.fromPositions(K),0)}return v.TextAreaState.EMPTY}return v.PagedScreenReaderStrategy.fromEditorSelection(O,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(V,K,F)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(V,K,F)},W=this._register(new _.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(this._instantiationService.createInstance(_.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 K=!1,F=null,q=null;V.metadata&&(K=this._emptySelectionClipboard&&!!V.metadata.isFromEmptySelection,F=typeof V.metadata.multicursorText<"u"?V.metadata.multicursorText:null,q=V.metadata.mode),this._viewController.paste(V.text,K,F,q)})),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 K=this.textArea.domNode,F=this._modelSelections[0],{distanceToModelLineStart:q,widthOfHiddenTextBefore:ie}=(()=>{const ne=K.value.substring(0,Math.min(K.selectionStart,K.selectionEnd)),$=ne.lastIndexOf(`
|
||
`),J=ne.substring($+1),Q=J.lastIndexOf(" "),re=J.length-Q-1,de=F.getStartPosition(),he=Math.min(de.column-1,re),me=de.column-1-he,X=J.substring(0,J.length-he),{tabSize:U}=this._context.viewModel.model.getOptions(),G=w(this.textArea.domNode.ownerDocument,X,this._fontInfo,U);return{distanceToModelLineStart:me,widthOfHiddenTextBefore:G}})(),{distanceToModelLineEnd:ae}=(()=>{const ne=K.value.substring(Math.max(K.selectionStart,K.selectionEnd)),$=ne.indexOf(`
|
||
`),J=$===-1?ne:ne.substring(0,$),Q=J.indexOf(" "),re=Q===-1?J.length:J.length-Q-1,de=F.getEndPosition(),he=Math.min(this._context.viewModel.model.getLineMaxColumn(de.lineNumber)-de.column,re);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(de.lineNumber)-de.column-he}})();this._context.viewModel.revealRange("keyboard",!0,u.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new h(this._context,F.startLineNumber,q,ie,ae),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 T='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',A=this._context.viewModel.getLineContent(I.lineNumber),P=(0,t.getMapForWordSeparators)(T);let N=!0,M=I.column,R=!0,x=I.column,O=0;for(;O<50&&(N||R);){if(N&&M<=1&&(N=!1),N){const B=A.charCodeAt(M-2);P.get(B)!==0?N=!1:M--}if(R&&x>A.length&&(R=!1),R){const B=A.charCodeAt(x-1);P.get(B)!==0?R=!1:x++}O++}return[A.substring(M-1,x-1),I.column-M]}_getWordBeforePosition(I){const T=this._context.viewModel.getLineContent(I.lineNumber),A=(0,t.getMapForWordSeparators)(this._context.configuration.options.get(129));let P=I.column,N=0;for(;P>1;){const M=T.charCodeAt(P-2);if(A.get(M)!==0||N>50)return T.substring(P-1,I.column-1);N++,P--}return T.substring(0,I.column-1)}_getCharacterBeforePosition(I){if(I.column>1){const A=this._context.viewModel.getLineContent(I.lineNumber).charAt(I.column-2);if(!S.isHighSurrogate(A.charCodeAt(0)))return A}return""}_getAriaLabel(I){var T,A,P;if(I.get(2)===1){const M=(T=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||T===void 0?void 0:T.getAriaLabel(),R=(A=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||A===void 0?void 0:A.getAriaLabel(),x=(P=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||P===void 0?void 0:P.getAriaLabel(),O=L.localize(1,null);return M?L.localize(2,null,O,M):R?L.localize(3,null,O,R):x?L.localize(4,null,O,x):O}return I.get(4)}_setAccessibilityOptions(I){this._accessibilitySupport=I.get(2);const T=I.get(3);this._accessibilitySupport===2&&T===n.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=T;const P=I.get(143).wrappingColumn;if(P!==-1&&this._accessibilitySupport!==1){const N=I.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(P*N.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=m?0:1}onConfigurationChanged(I){const T=this._context.configuration.options,A=T.get(143);this._setAccessibilityOptions(T),this._contentLeft=A.contentLeft,this._contentWidth=A.contentWidth,this._contentHeight=A.height,this._fontInfo=T.get(50),this._lineHeight=T.get(66),this._emptySelectionClipboard=T.get(37),this._copyWithSyntaxHighlighting=T.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:P}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${P*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(T)),this.textArea.setAttribute("aria-required",T.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(T.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 T;this._primaryCursorPosition=new r.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=I.visibleRangeForPosition(this._primaryCursorPosition),(T=this._visibleTextArea)===null||T===void 0||T.prepareRender(I)}render(I){this._textAreaInput.writeNativeTextAreaContent("render"),this._render()}_render(){var I;if(this._visibleTextArea){const P=this._visibleTextArea.visibleTextareaStart,N=this._visibleTextArea.visibleTextareaEnd,M=this._visibleTextArea.startPosition,R=this._visibleTextArea.endPosition;if(M&&R&&P&&N&&N.left>=this._scrollLeft&&P.left<=this._scrollLeft+this._contentWidth){const x=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,O=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let B=this._visibleTextArea.widthOfHiddenLineTextBefore,W=this._contentLeft+P.left-this._scrollLeft,V=N.left-P.left+1;if(W<this._contentLeft){const ne=this._contentLeft-W;W+=ne,B+=ne,V-=ne}V>this._contentWidth&&(V=this._contentWidth);const K=this._context.viewModel.getViewLineData(M.lineNumber),F=K.tokens.findTokenIndexAtOffset(M.column-1),q=K.tokens.findTokenIndexAtOffset(R.column-1),ie=F===q,ae=this._visibleTextArea.definePresentation(ie?K.tokens.getPresentation(F):null);this.textArea.domNode.scrollTop=O*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()||[])[ae.foreground],italic:ae.italic,bold:ae.bold,underline:ae.underline,strikethrough:ae.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const T=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(T<this._contentLeft||T>this._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:T,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const P=(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=P*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:A,left:this._textAreaWrapping?this._contentLeft:T,width:this._textAreaWidth,height:m?0:1,useCover:!1})}_newlinecount(I){let T=0,A=-1;do{if(A=I.indexOf(`
|
||
`,A+1),A===-1)break;T++}while(!0);return T}_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 T=this.textArea,A=this.textAreaCover;(0,p.applyFontInfo)(T,this._fontInfo),T.setTop(I.top),T.setLeft(I.left),T.setWidth(I.width),T.setHeight(I.height),T.setColor(I.color?s.Color.Format.CSS.formatHex(I.color):""),T.setFontStyle(I.italic?"italic":""),I.bold&&T.setFontWeight("bold"),T.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 P=this._context.configuration.options;P.get(57)?A.setClassName("monaco-editor-background textAreaCover "+i.Margin.OUTER_CLASS_NAME):P.get(67).renderType!==0?A.setClassName("monaco-editor-background textAreaCover "+a.LineNumbersOverlay.CLASS_NAME):A.setClassName("monaco-editor-background textAreaCover")}};e.TextAreaHandler=C,e.TextAreaHandler=C=ke([ge(3,o.IKeybindingService),ge(4,g.IInstantiationService)],C);function w(D,I,T,A){if(I.length===0)return 0;const P=D.createElement("div");P.style.position="absolute",P.style.top="-50000px",P.style.width="50000px";const N=D.createElement("span");(0,p.applyFontInfo)(N,T),N.style.whiteSpace="pre",N.style.tabSize=`${A*T.spaceWidth}px`,N.append(I),P.appendChild(N),D.body.appendChild(P);const M=N.offsetWidth;return D.body.removeChild(P),M}}),define(se[859],oe([1,0,40,39,56,10,31,83,86,13]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class b{constructor(n,t){const r=n.options;this.lineHeight=r.get(66),this.pixelRatio=r.get(141),this.overviewRulerLanes=r.get(82),this.renderBorder=r.get(81);const u=t.getColor(p.editorOverviewRulerBorder);this.borderColor=u?u.toString():null,this.hideCursor=r.get(59);const f=t.getColor(p.editorCursorForeground);this.cursorColor=f?f.transparent(.7).toString():null,this.themeType=t.type;const c=r.get(72),d=c.enabled,s=c.side,l=t.getColor(p.editorOverviewRulerBackground),o=S.TokenizationRegistry.getDefaultBackground();l?this.backgroundColor=l:d&&s==="right"?this.backgroundColor=o:this.backgroundColor=null;const h=r.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,r){const u=t-n;if(r>=3){const f=Math.floor(u/3),c=Math.floor(u/3),d=u-f-c,s=n,l=s+f,o=s+f+d;return[[0,s,l,s,o,s,l,s],[0,f,d,f+d,c,f+d+c,d+c,f+d+c]]}else if(r===2){const f=Math.floor(u/2),c=u-f,d=n,s=d+f;return[[0,d,d,d,s,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 a 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=S.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,r=n.selections.length;t<r;t++)this._cursorPositions[t]=n.selections[t].getPosition();return this._cursorPositions.sort(E.Position.compare),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(n){return n.affectsOverviewRuler?this._markRenderingIsMaybeNeeded():!1}onFlushed(n){return this._markRenderingIsNeeded()}onScrollChanged(n){return n.scrollHeightChanged?this._markRenderingIsNeeded():!1}onZonesChanged(n){return this._markRenderingIsNeeded()}onThemeChanged(n){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}getDomNode(){return this._domNode.domNode}prepareRender(n){}render(n){this._render(),this._actualShouldRender=0}_render(){const n=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(n?k.Color.Format.CSS.formatHexA(n):""),this._domNode.setDisplay("none");return}const t=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(t.sort(_.OverviewRulerDecorationsGroup.compareByRenderingProps),this._actualShouldRender===1&&!_.OverviewRulerDecorationsGroup.equalsArr(this._renderedDecorations,t)&&(this._actualShouldRender=2),this._actualShouldRender===1&&!(0,v.equals)(this._renderedCursorPositions,this._cursorPositions,(C,w)=>C.lineNumber===w.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const r=this._settings.canvasWidth,u=this._settings.canvasHeight,f=this._settings.lineHeight,c=this._context.viewLayout,d=this._context.viewLayout.getScrollHeight(),s=u/d,l=6*this._settings.pixelRatio|0,o=l/2|0,g=this._domNode.domNode.getContext("2d");n?n.isOpaque()?(g.fillStyle=k.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,r,u)):(g.clearRect(0,0,r,u),g.fillStyle=k.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,r,u)):g.clearRect(0,0,r,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,T=0,A=0;for(let P=0,N=D.length/3;P<N;P++){const M=D[3*P],R=D[3*P+1],x=D[3*P+2];let O=c.getVerticalOffsetForLineNumber(R)*s|0,B=(c.getVerticalOffsetForLineNumber(x)+f)*s|0;if(B-O<l){let V=(O+B)/2|0;V<o?V=o:V+o>u&&(V=u-o),O=V-o,B=V+o}O>A+1||M!==I?(P!==0&&g.fillRect(h[I],T,m[I],A-T),I=M,T=O,A=B):B>A&&(A=B)}g.fillRect(h[I],T,m[I],A-T)}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 T=-100,A=-100;for(let P=0,N=this._cursorPositions.length;P<N;P++){const M=this._cursorPositions[P];let R=c.getVerticalOffsetForLineNumber(M.lineNumber)*s|0;R<w?R=w:R+w>u&&(R=u-w);const x=R-w,O=x+C;x>A+1?(P!==0&&g.fillRect(D,T,I,A-T),T=x,A=O):O>A&&(A=O)}g.fillRect(D,T,I,A-T)}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(r,0),g.stroke())}}e.DecorationsOverviewRuler=a}),define(se[860],oe([1,0,40,14,56,636,36,83,23,89,7,445]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class a 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 r=0,u=this._secondaryCursors.length;r<u;r++)this._secondaryCursors[r].onConfigurationChanged(n);return!0}_onCursorPositionChanged(n,t,r){const u=this._secondaryCursors.length!==t.length||this._cursorSmoothCaretAnimation==="explicit"&&r!==3;if(this._primaryCursor.onCursorPositionChanged(n,u),this._updateBlinking(),this._secondaryCursors.length<t.length){const f=t.length-this._secondaryCursors.length;for(let c=0;c<f;c++){const d=new E.ViewCursor(this._context);this._domNode.domNode.insertBefore(d.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(d)}}else if(this._secondaryCursors.length>t.length){const f=this._secondaryCursors.length-t.length;for(let c=0;c<f;c++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let f=0;f<t.length;f++)this._secondaryCursors[f].onCursorPositionChanged(t[f],u)}onCursorStateChanged(n){const t=[];for(let u=0,f=n.selections.length;u<f;u++)t[u]=n.selections[u].getPosition();this._onCursorPositionChanged(t[0],t.slice(1),n.reason);const r=n.selections[0].isEmpty();return this._selectionIsEmpty!==r&&(this._selectionIsEmpty=r,this._updateDomClassName()),!0}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onFocusChanged(n){return this._editorHasFocus=n.isFocused,this._updateBlinking(),!1}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return!0}onTokensChanged(n){const t=r=>{for(let u=0,f=n.ranges.length;u<f;u++)if(n.ranges[u].fromLineNumber<=r.lineNumber&&r.lineNumber<=n.ranges[u].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const r of this._secondaryCursors)if(t(r.getPosition()))return!0;return!1}onZonesChanged(n){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const n=this._getCursorBlinking(),t=n===0,r=n===5;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!t&&!r&&(n===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},a.BLINK_INTERVAL,(0,b.getWindow)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},a.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let n="cursors-layer";switch(this._selectionIsEmpty||(n+=" has-selection"),this._cursorStyle){case S.TextEditorCursorStyle.Line:n+=" cursor-line-style";break;case S.TextEditorCursorStyle.Block:n+=" cursor-block-style";break;case S.TextEditorCursorStyle.Underline:n+=" cursor-underline-style";break;case S.TextEditorCursorStyle.LineThin:n+=" cursor-line-thin-style";break;case S.TextEditorCursorStyle.BlockOutline:n+=" cursor-block-outline-style";break;case S.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<t;n++)this._secondaryCursors[n].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let n=0,t=this._secondaryCursors.length;n<t;n++)this._secondaryCursors[n].hide();this._isVisible=!1}prepareRender(n){this._primaryCursor.prepareRender(n);for(let t=0,r=this._secondaryCursors.length;t<r;t++)this._secondaryCursors[t].prepareRender(n)}render(n){const t=[];let r=0;const u=this._primaryCursor.render(n);u&&(t[r++]=u);for(let f=0,c=this._secondaryCursors.length;f<c;f++){const d=this._secondaryCursors[f].render(n);d&&(t[r++]=d)}this._renderData=t}getLastRenderData(){return this._renderData}}e.ViewCursors=a,a.BLINK_INTERVAL=500,(0,_.registerThemingParticipant)((i,n)=>{const t=i.getColor(p.editorCursorForeground);if(t){let r=i.getColor(p.editorCursorBackground);r||(r=t.opposite()),n.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${r}; }`),(0,v.isHighContrast)(i.type)&&n.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${r}; border-right: 1px solid ${r}; }`)}})}),define(se[861],oe([1,0,115,11,120,10,83,446]),function(te,e,L,k,y,E,S){"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 _(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 a=new _(this._context.configuration);return this._options.equals(a)?b.hasChanged(143):(this._options=a,!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 a=b.visibleRange.startLineNumber,n=b.visibleRange.endLineNumber-a+1,t=new Array(n);for(let u=0;u<n;u++)t[u]=!0;const r=this._context.viewModel.getMinimapLinesRenderingData(b.viewportData.startLineNumber,b.viewportData.endLineNumber,t);this._renderResult=[];for(let u=b.viewportData.startLineNumber;u<=b.viewportData.endLineNumber;u++){const f=u-b.viewportData.startLineNumber,c=r.data[f];let d=null;if(this._options.renderWhitespace==="selection"){const s=this._selection;for(const l of s){if(l.endLineNumber<u||l.startLineNumber>u)continue;const o=l.startLineNumber===u?l.startColumn:c.minColumn,g=l.endLineNumber===u?l.endColumn:c.maxColumn;o<g&&(d||(d=[]),d.push(new y.LineRange(o-1,g-1)))}}this._renderResult[f]=this._applyRenderWhitespace(b,u,d,c)}}_applyRenderWhitespace(b,a,i,n){if(this._options.renderWhitespace==="selection"&&!i||this._options.renderWhitespace==="trailing"&&n.continuesWithWrappedLine)return"";const t=this._context.theme.getColor(S.editorWhitespaces),r=this._options.renderWithSVG,u=n.content,f=this._options.stopRenderingLineAfter===-1?u.length:Math.min(this._options.stopRenderingLineAfter,u.length),c=n.continuesWithWrappedLine,d=n.minColumn-1,s=this._options.renderWhitespace==="boundary",l=this._options.renderWhitespace==="trailing",o=this._options.lineHeight,g=this._options.middotWidth,h=this._options.wsmiddotWidth,m=this._options.spaceWidth,C=Math.abs(h-m),w=Math.abs(g-m),D=C<w?11825:183,I=this._options.canUseHalfwidthRightwardsArrow;let T="",A=!1,P=k.firstNonWhitespaceIndex(u),N;P===-1?(A=!0,P=f,N=f):N=k.lastNonWhitespaceIndex(u);let M=0,R=i&&i[M],x=0;for(let O=d;O<f;O++){const B=u.charCodeAt(O);if(R&&O>=R.endOffset&&(M++,R=i&&i[M]),B!==9&&B!==32||l&&!A&&O<=N)continue;if(s&&O>=P&&O<=N&&B===32){const V=O-1>=0?u.charCodeAt(O-1):0,K=O+1<f?u.charCodeAt(O+1):0;if(V!==32&&K!==32)continue}if(s&&c&&O===f-1){const V=O-1>=0?u.charCodeAt(O-1):0;if(B===32&&V!==32&&V!==9)continue}if(i&&(!R||R.startOffset>O||R.endOffset<=O))continue;const W=b.visibleRangeForPosition(new E.Position(a,O+1));W&&(r?(x=Math.max(x,W.left),B===9?T+=this._renderArrow(o,m,W.left):T+=`<circle cx="${(W.left+m/2).toFixed(2)}" cy="${(o/2).toFixed(2)}" r="${(m/7).toFixed(2)}" />`):B===9?T+=`<div class="mwh" style="left:${W.left}px;height:${o}px;">${I?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:T+=`<div class="mwh" style="left:${W.left}px;height:${o}px;">${String.fromCharCode(D)}</div>`)}return r?(x=Math.round(x+m),`<svg style="position:absolute;width:${x}px;height:${o}px" viewBox="0 0 ${x} ${o}" xmlns="http://www.w3.org/2000/svg" fill="${t}">`+T+"</svg>"):T}_renderArrow(b,a,i){const n=a/7,t=a,r=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},s={x:d.x+.1*c.x,y:d.y+.1*c.x},l={x:s.x+.35*c.x,y:s.y-.35*c.x},o={x:l.x,y:-l.y},g={x:s.x,y:-s.y},h={x:d.x,y:-d.y},m={x:c.x,y:-c.y},C={x:f.x,y:-f.y};return`<path d="M ${[f,c,d,s,l,o,g,h,m,C].map(I=>`${(u+I.x).toFixed(2)} ${(r+I.y).toFixed(2)}`).join(" L ")}" />`}render(b,a){if(!this._renderResult)return"";const i=a-b;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}e.WhitespaceOverlay=p;class _{constructor(b){const a=b.options,i=a.get(50),n=a.get(38);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=a.get(98),this.renderWithSVG=!0):(this.renderWhitespace=a.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=a.get(66),this.stopRenderingLineAfter=a.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(se[862],oe([1,0,7,40,266,12,365,848,858,148,808,610,56,279,536,605,856,537,853,213,857,369,849,538,299,539,834,606,859,549,540,541,854,860,542,861,10,5,24,41,154,545,550,8,23]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P,N,M,R,x,O,B,W,V,K,F,q,ie){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;let ae=class extends V.ViewEventHandler{constructor(Q,re,de,he,me,X,U){super(),this._instantiationService=U,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new B.Selection(1,1,1,1)],this._renderAnimationFrame=null;const G=new b.ViewController(re,he,me,Q);this._context=new F.ViewContext(re,de,he),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(_.TextAreaHandler,this._context,G,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,k.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,k.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,k.createFastDomNode)(document.createElement("div")),i.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new c.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new o.ViewLines(this._context,this._linesContent),this._viewZones=new M.ViewZones(this._context),this._viewParts.push(this._viewZones);const z=new D.DecorationsOverviewRuler(this._context);this._viewParts.push(z);const H=new A.ScrollDecorationViewPart(this._context);this._viewParts.push(H);const Y=new a.ContentViewOverlays(this._context);this._viewParts.push(Y),Y.addDynamicOverlay(new u.CurrentLineHighlightOverlay(this._context)),Y.addDynamicOverlay(new P.SelectionsOverlay(this._context)),Y.addDynamicOverlay(new s.IndentGuidesOverlay(this._context)),Y.addDynamicOverlay(new f.DecorationsOverlay(this._context)),Y.addDynamicOverlay(new R.WhitespaceOverlay(this._context));const j=new a.MarginViewOverlays(this._context);this._viewParts.push(j),j.addDynamicOverlay(new u.CurrentLineMarginHighlightOverlay(this._context)),j.addDynamicOverlay(new m.MarginViewLineDecorationsOverlay(this._context)),j.addDynamicOverlay(new g.LinesDecorationsOverlay(this._context)),j.addDynamicOverlay(new l.LineNumbersOverlay(this._context)),this._glyphMarginWidgets=new d.GlyphMarginWidgets(this._context),this._viewParts.push(this._glyphMarginWidgets);const Z=new h.Margin(this._context);Z.getDomNode().appendChild(this._viewZones.marginDomNode),Z.getDomNode().appendChild(j.getDomNode()),Z.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(Z),this._contentWidgets=new r.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new N.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new w.ViewOverlayWidgets(this._context,this.domNode),this._viewParts.push(this._overlayWidgets);const ee=new T.Rulers(this._context);this._viewParts.push(ee);const le=new t.BlockDecorations(this._context);this._viewParts.push(le);const ue=new C.Minimap(this._context);if(this._viewParts.push(ue),z){const ce=this._scrollbar.getOverviewRulerLayoutInfo();ce.parent.insertBefore(z.getDomNode(),ce.insertBefore)}this._linesContent.appendChild(Y.getDomNode()),this._linesContent.appendChild(ee.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(Z.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(ue.getDomNode()),this._overflowGuardContainer.appendChild(le.domNode),this.domNode.appendChild(this._overflowGuardContainer),X?(X.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode),X.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode)):(this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this.domNode.appendChild(this._overlayWidgets.overflowingOverlayWidgetsDomNode)),this._applyLayout(),this._pointerHandler=this._register(new p.PointerHandler(this._context,G,this._createPointerHandlerHelper()))}_computeGlyphMarginLanes(){const Q=this._context.viewModel.model,re=this._context.viewModel.glyphLanes;let de=[],he=0;de=de.concat(Q.getAllMarginDecorations().map(me=>{var X,U,G;const z=(U=(X=me.options.glyphMargin)===null||X===void 0?void 0:X.position)!==null&&U!==void 0?U:W.GlyphMarginLane.Center;return he=Math.max(he,me.range.endLineNumber),{range:me.range,lane:z,persist:(G=me.options.glyphMargin)===null||G===void 0?void 0:G.persistLane}})),de=de.concat(this._glyphMarginWidgets.getWidgets().map(me=>{const X=Q.validateRange(me.preference.range);return he=Math.max(he,X.endLineNumber),{range:X,lane:me.preference.lane}})),de.sort((me,X)=>O.Range.compareRangesUsingStarts(me.range,X.range)),re.reset(he);for(const me of de)re.push(me.lane,me.range,me.persist);return re}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:Q=>{this._textAreaHandler.textArea.domNode.dispatchEvent(Q)},getLastRenderData:()=>{const Q=this._viewCursors.getLastRenderData()||[],re=this._textAreaHandler.getLastRenderData();return new S.PointerHandlerLastRenderData(Q,re)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:Q=>this._viewZones.shouldSuppressMouseDownOnViewZone(Q),shouldSuppressMouseDownOnWidget:Q=>this._contentWidgets.shouldSuppressMouseDownOnWidget(Q),getPositionFromDOMInfo:(Q,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(Q,re)),visibleRangeForPosition:(Q,re)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new x.Position(Q,re))),getLineWidth:Q=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(Q))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:Q=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(Q))}}_applyLayout(){const re=this._context.configuration.options.get(143);this.domNode.setWidth(re.width),this.domNode.setHeight(re.height),this._overflowGuardContainer.setWidth(re.width),this._overflowGuardContainer.setHeight(re.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const Q=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+(0,ie.getThemeTypeSelector)(this._context.theme.type)+Q}handleEvents(Q){super.handleEvents(Q),this._scheduleRender()}onConfigurationChanged(Q){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(Q){return this._selections=Q.selections,!1}onDecorationsChanged(Q){return Q.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(Q){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(Q){return this._context.theme.update(Q.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 Q of this._viewParts)Q.dispose();super.dispose()}_scheduleRender(){if(this._store.isDisposed)throw new E.BugIndicatingError;if(this._renderAnimationFrame===null){const Q=this._createCoordinatedRendering();this._renderAnimationFrame=$.INSTANCE.scheduleCoordinatedRendering({window:L.getWindow(this.domNode.domNode),prepareRenderText:()=>{if(this._store.isDisposed)throw new E.BugIndicatingError;try{return Q.prepareRenderText()}finally{this._renderAnimationFrame=null}},renderText:()=>{if(this._store.isDisposed)throw new E.BugIndicatingError;return Q.renderText()},prepareRender:(re,de)=>{if(this._store.isDisposed)throw new E.BugIndicatingError;return Q.prepareRender(re,de)},render:(re,de)=>{if(this._store.isDisposed)throw new E.BugIndicatingError;return Q.render(re,de)}})}}_flushAccumulatedAndRenderNow(){const Q=this._createCoordinatedRendering();ne(()=>Q.prepareRenderText());const re=ne(()=>Q.renderText());if(re){const[de,he]=re;ne(()=>Q.prepareRender(de,he)),ne(()=>Q.render(de,he))}}_getViewPartsToRender(){const Q=[];let re=0;for(const de of this._viewParts)de.shouldRender()&&(Q[re++]=de);return Q}_createCoordinatedRendering(){return{prepareRenderText:()=>{if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=!1;const Q=this._computeGlyphMarginLanes();this._context.configuration.setGlyphMarginDecorationLaneCount(Q.requiredLanes)}y.inputLatency.onRenderStart()},renderText:()=>{if(!this.domNode.domNode.isConnected)return null;let Q=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&Q.length===0)return null;const re=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(re.startLineNumber,re.endLineNumber,re.centeredLineNumber);const de=new K.ViewportData(this._selections,re,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);return this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(de),this._viewLines.shouldRender()&&(this._viewLines.renderText(de),this._viewLines.onDidRender(),Q=this._getViewPartsToRender()),[Q,new v.RenderingContext(this._context.viewLayout,de,this._viewLines)]},prepareRender:(Q,re)=>{for(const de of Q)de.prepareRender(re)},render:(Q,re)=>{for(const de of Q)de.render(re),de.onDidRender()}}}delegateVerticalScrollbarPointerDown(Q){this._scrollbar.delegateVerticalScrollbarPointerDown(Q)}delegateScrollFromMouseWheelEvent(Q){this._scrollbar.delegateScrollFromMouseWheelEvent(Q)}restoreState(Q){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:Q.scrollTop,scrollLeft:Q.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(Q,re){const de=this._context.viewModel.model.validatePosition({lineNumber:Q,column:re}),he=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(de);this._flushAccumulatedAndRenderNow();const me=this._viewLines.visibleRangeForPosition(new x.Position(he.lineNumber,he.column));return me?me.left:-1}getTargetAtClientPoint(Q,re){const de=this._pointerHandler.getTargetAtClientPoint(Q,re);return de?n.ViewUserInputEvents.convertViewToModelMouseTarget(de,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(Q){return new I.OverviewRuler(this._context,Q)}change(Q){this._viewZones.changeViewZones(Q),this._scheduleRender()}render(Q,re){if(re){this._viewLines.forceShouldRender();for(const de of this._viewParts)de.forceShouldRender()}Q?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(Q){this._textAreaHandler.writeScreenReaderContent(Q)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(Q){this._textAreaHandler.setAriaOptions(Q)}addContentWidget(Q){this._contentWidgets.addWidget(Q.widget),this.layoutContentWidget(Q),this._scheduleRender()}layoutContentWidget(Q){var re,de,he,me,X,U,G,z;this._contentWidgets.setWidgetPosition(Q.widget,(de=(re=Q.position)===null||re===void 0?void 0:re.position)!==null&&de!==void 0?de:null,(me=(he=Q.position)===null||he===void 0?void 0:he.secondaryPosition)!==null&&me!==void 0?me:null,(U=(X=Q.position)===null||X===void 0?void 0:X.preference)!==null&&U!==void 0?U:null,(z=(G=Q.position)===null||G===void 0?void 0:G.positionAffinity)!==null&&z!==void 0?z:null),this._scheduleRender()}removeContentWidget(Q){this._contentWidgets.removeWidget(Q.widget),this._scheduleRender()}addOverlayWidget(Q){this._overlayWidgets.addWidget(Q.widget),this.layoutOverlayWidget(Q),this._scheduleRender()}layoutOverlayWidget(Q){const re=Q.position?Q.position.preference:null;this._overlayWidgets.setWidgetPosition(Q.widget,re)&&this._scheduleRender()}removeOverlayWidget(Q){this._overlayWidgets.removeWidget(Q.widget),this._scheduleRender()}addGlyphMarginWidget(Q){this._glyphMarginWidgets.addWidget(Q.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(Q){const re=Q.position;this._glyphMarginWidgets.setWidgetPosition(Q.widget,re)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(Q){this._glyphMarginWidgets.removeWidget(Q.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};e.View=ae,e.View=ae=ke([ge(6,q.IInstantiationService)],ae);function ne(J){try{return J()}catch(Q){return(0,E.onUnexpectedError)(Q),null}}class ${constructor(){this._coordinatedRenderings=[],this._animationFrameRunners=new Map}scheduleCoordinatedRendering(Q){return this._coordinatedRenderings.push(Q),this._scheduleRender(Q.window),{dispose:()=>{const re=this._coordinatedRenderings.indexOf(Q);if(re!==-1&&(this._coordinatedRenderings.splice(re,1),this._coordinatedRenderings.length===0)){for(const[de,he]of this._animationFrameRunners)he.dispose();this._animationFrameRunners.clear()}}}}_scheduleRender(Q){if(!this._animationFrameRunners.has(Q)){const re=()=>{this._animationFrameRunners.delete(Q),this._onRenderScheduled()};this._animationFrameRunners.set(Q,L.runAtThisOrScheduleAtNextAnimationFrame(Q,re,100))}}_onRenderScheduled(){const Q=this._coordinatedRenderings.slice(0);this._coordinatedRenderings=[];for(const de of Q)ne(()=>de.prepareRenderText());const re=[];for(let de=0,he=Q.length;de<he;de++){const me=Q[de];re[de]=ne(()=>me.renderText())}for(let de=0,he=Q.length;de<he;de++){const me=Q[de],X=re[de];if(!X)continue;const[U,G]=X;ne(()=>me.prepareRender(U,G))}for(let de=0,he=Q.length;de<he;de++){const me=Q[de],X=re[de];if(!X)continue;const[U,G]=X;ne(()=>me.render(U,G))}}}$.INSTANCE=new $}),define(se[863],oe([1,0,6,2,5,83,23]),function(te,e,L,k,y,E,S){"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 _,this.onDidChangeEmitter=new L.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=b.getOptions().bracketPairColorizationOptions,this._register(b.bracketPairs.onDidChange(a=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(b){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(b,a,i,n){return n?[]:a===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(b,!0).map(r=>({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range})).toArray():[]}getAllDecorations(b,a){return b===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new y.Range(1,1,this.textModel.getLineCount(),1),b,a):[]}}e.ColorizedBracketPairsDecorationProvider=p;class _{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(b,a){return b.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(a?b.nestingLevelOfEqualBracketType:b.nestingLevel)}getInlineClassNameOfLevel(b){return`bracket-highlighting-${b%30}`}}(0,S.registerThemingParticipant)((v,b)=>{const a=[E.editorBracketHighlightingForeground1,E.editorBracketHighlightingForeground2,E.editorBracketHighlightingForeground3,E.editorBracketHighlightingForeground4,E.editorBracketHighlightingForeground5,E.editorBracketHighlightingForeground6],i=new _;b.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${v.getColor(E.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const n=a.map(t=>v.getColor(t)).filter(t=>!!t).filter(t=>!t.isTransparent());for(let t=0;t<30;t++){const r=n[t%n.length];b.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(t)} { color: ${r}; }`)}})}),define(se[864],oe([1,0,97,2,41,23,83,51,5,47,6,29,53,268]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 r(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(s=>s.owner).forEach(s=>this._markerService.remove(s,[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=ke([ge(0,p.IModelService),ge(1,L.IMarkerService)],t);class r 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 s=d.map(g=>this._map.get(g)),l=c.map(g=>({range:this._createDecorationRange(this.model,g),options:this._createDecorationOption(g)})),o=this.model.deltaDecorations(s,l);for(const g of d)this._map.delete(g);for(let g=0;g<o.length;g++)this._map.set(c[g],o[g]);return!0}getMarker(f){return this._map.getKey(f.id)}_createDecorationRange(f,c){let d=_.Range.lift(c);if(c.severity===L.MarkerSeverity.Hint&&!this._hasMarkerTag(c,1)&&!this._hasMarkerTag(c,2)&&(d=d.setEndPosition(d.startLineNumber,d.startColumn+2)),d=f.validateRange(d),d.isEmpty()){const s=f.getLineLastNonWhitespaceColumn(d.startLineNumber)||f.getLineMaxColumn(d.startLineNumber);if(s===1||d.endColumn>=s)return d;const l=f.getWordAtPosition(d.getStartPosition());l&&(d=new _.Range(d.startLineNumber,l.startColumn,d.endLineNumber,l.endColumn))}else if(c.endColumn===Number.MAX_VALUE&&c.startColumn===1&&d.startLineNumber===d.endLineNumber){const s=f.getLineFirstNonWhitespaceColumn(c.startLineNumber);s<d.endColumn&&(d=new _.Range(d.startLineNumber,s,d.endLineNumber,d.endColumn),c.startColumn=s)}return d}_createDecorationOption(f){let c,d,s,l,o;switch(f.severity){case L.MarkerSeverity.Hint:this._hasMarkerTag(f,2)?c=void 0:this._hasMarkerTag(f,1)?c="squiggly-unnecessary":c="squiggly-hint",s=0;break;case L.MarkerSeverity.Info:c="squiggly-info",d=(0,E.themeColorFromId)(S.overviewRulerInfo),s=10,o={color:(0,E.themeColorFromId)(a.minimapInfo),position:y.MinimapPosition.Inline};break;case L.MarkerSeverity.Warning:c="squiggly-warning",d=(0,E.themeColorFromId)(S.overviewRulerWarning),s=20,o={color:(0,E.themeColorFromId)(a.minimapWarning),position:y.MinimapPosition.Inline};break;case L.MarkerSeverity.Error:default:c="squiggly-error",d=(0,E.themeColorFromId)(S.overviewRulerError),s=30,o={color:(0,E.themeColorFromId)(a.minimapError),position:y.MinimapPosition.Inline};break}return f.tags&&(f.tags.indexOf(1)!==-1&&(l="squiggly-inline-unnecessary"),f.tags.indexOf(2)!==-1&&(l="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:c,showIfCollapsed:!0,overviewRuler:{color:d,position:y.OverviewRulerLane.Right},minimap:o,zIndex:s,inlineClassName:l}}_hasMarkerTag(f,c){return f.tags?f.tags.indexOf(c)>=0:!1}}}),define(se[256],oe([1,0,132,23,64,534,43]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let p=class{constructor(i,n,t,r){this._legend=i,this._themeService=n,this._languageService=t,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new b}getMetadata(i,n,t){const r=this._languageService.languageIdCodec.encodeLanguageId(t),u=this._hashTable.get(i,n,r);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 s=n;for(let o=0;s>0&&o<this._legend.tokenModifiers.length;o++)s&1&&d.push(this._legend.tokenModifiers[o]),s=s>>1;s>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 o=(l.italic?1:0)<<11;f|=o|1}if(typeof l.bold<"u"){const o=(l.bold?2:0)<<11;f|=o|2}if(typeof l.underline<"u"){const o=(l.underline?4:0)<<11;f|=o|4}if(typeof l.strikethrough<"u"){const o=(l.strikethrough?8:0)<<11;f|=o|8}if(l.foreground){const o=l.foreground<<15;f|=o|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,r,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,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${n}`))}warnInvalidLengthSemanticTokens(i,n){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${i}, column ${n}`))}warnInvalidEditStart(i,n,t,r,u){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${i}, resultId: ${n}) at edit #${t}: The provided start offset ${r} is outside the previous data (length ${u}).`))}};e.SemanticTokensProviderStyling=p,e.SemanticTokensProviderStyling=p=ke([ge(1,k.IThemeService),ge(2,S.ILanguageService),ge(3,y.ILogService)],p);function _(a,i,n){const t=a.data,r=a.data.length/5|0,u=Math.max(Math.ceil(r/1024),400),f=[];let c=0,d=1,s=0;for(;c<r;){const l=c;let o=Math.min(l+u,r);if(o<r){let I=o;for(;I-1>l&&t[5*I]===0;)I--;if(I-1===l){let T=o;for(;T+1<r&&t[5*T]===0;)T++;o=T}else o=I}let g=new Uint32Array((o-l)*4),h=0,m=0,C=0,w=0;for(;c<o;){const I=5*c,T=t[I],A=t[I+1],P=d+T|0,N=T===0?s+A|0:A,M=t[I+2],R=N+M|0,x=t[I+3],O=t[I+4];if(R<=N)i.warnInvalidLengthSemanticTokens(P,N+1);else if(C===P&&w>N)i.warnOverlappingSemanticTokens(P,N+1);else{const B=i.getMetadata(x,O,n);B!==2147483647&&(m===0&&(m=P),g[h]=P-m,g[h+1]=N,g[h+2]=R,g[h+3]=B,h+=4,C=P,w=R)}d=P,s=N,c++}h!==g.length&&(g=g.subarray(0,h));const D=E.SparseMultilineTokens.create(m,g);f.push(D)}return f}e.toMultilineTokens2=_;class v{constructor(i,n,t,r){this.tokenTypeIndex=i,this.tokenModifierSet=n,this.languageId=t,this.metadata=r,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<b._SIZES.length?2/3*this._currentLength:0),this._elements=[],b._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(i,n){for(let t=0;t<n;t++)i[t]=null}_hash2(i,n){return(i<<5)-i+n|0}_hashFunc(i,n,t){return this._hash2(this._hash2(i,n),t)%this._currentLength}get(i,n,t){const r=this._hashFunc(i,n,t);let u=this._elements[r];for(;u;){if(u.tokenTypeIndex===i&&u.tokenModifierSet===n&&u.languageId===t)return u;u=u.next}return null}add(i,n,t,r){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const u=this._elements;this._currentLengthIndex++,this._currentLength=b._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<b._SIZES.length?2/3*this._currentLength:0),this._elements=[],b._nullOutEntries(this._elements,this._currentLength);for(const f of u){let c=f;for(;c;){const d=c.next;c.next=null,this._add(c),c=d}}}this._add(new v(i,n,t,r))}_add(i){const n=this._hashFunc(i.tokenTypeIndex,i.tokenModifierSet,i.languageId);i.next=this._elements[n],this._elements[n]=i}}b._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(se[865],oe([1,0,2,43,23,64,256,238,45]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensStylingService=void 0;let v=class extends L.Disposable{constructor(a,i,n){super(),this._themeService=a,this._logService=i,this._languageService=n,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(a){return this._caches.has(a)||this._caches.set(a,new S.SemanticTokensProviderStyling(a.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(a)}};e.SemanticTokensStylingService=v,e.SemanticTokensStylingService=v=ke([ge(0,y.IThemeService),ge(1,E.ILogService),ge(2,k.ILanguageService)],v),(0,_.registerSingleton)(p.ISemanticTokensStylingService,v,1)}),define(se[370],oe([1,0,108,2,153,41,83,23,48]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class v{constructor(a){this.options=a,this.rangeHighlightDecorationId=void 0}provide(a,i){var n;const t=new k.DisposableStore;a.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),a.matchOnLabel=a.matchOnDescription=a.matchOnDetail=a.sortByLabel=!1;const r=t.add(new k.MutableDisposable);return r.value=this.doProvide(a,i),t.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(a,i)})),t}doProvide(a,i){var n;const t=new k.DisposableStore,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const u={editor:r},f=(0,y.getCodeEditor)(r);if(f){let c=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;t.add(f.onDidChangeCursorPosition(()=>{var d;c=(d=r.saveViewState())!==null&&d!==void 0?d:void 0})),u.restoreViewState=()=>{c&&r===this.activeTextEditorControl&&r.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(r))),t.add(this.provideWithTextEditor(u,a,i))}else t.add(this.provideWithoutTextEditor(a,i));return t}canProvideWithTextEditor(a){return!0}gotoLocation({editor:a},i){a.setSelection(i.range),a.revealRangeInCenter(i.range,0),i.preserveFocus||a.focus();const n=a.getModel();n&&"getLineContent"in n&&(0,_.status)(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(a){var i;return(0,y.isDiffEditor)(a)?(i=a.getModel())===null||i===void 0?void 0:i.modified:a.getModel()}addDecorations(a,i){a.changeDecorations(n=>{const t=[];this.rangeHighlightDecorationId&&(t.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),t.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{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)(S.overviewRulerRangeHighlight),position:E.OverviewRulerLane.Full}}}],[u,f]=n.deltaDecorations(t,r);this.rangeHighlightDecorationId={rangeHighlightId:u,overviewRulerDecorationId:f}})}clearDecorations(a){const i=this.rangeHighlightDecorationId;i&&(a.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=v}),define(se[866],oe([1,0,2,153,370,707]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class S extends y.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(_){const v=(0,E.localize)(0,null);return _.items=[{label:v}],_.ariaLabel=v,L.Disposable.None}provideWithTextEditor(_,v,b){const a=_.editor,i=new L.DisposableStore;i.add(v.onDidAccept(r=>{const[u]=v.selectedItems;if(u){if(!this.isValidLineNumber(a,u.lineNumber))return;this.gotoLocation(_,{range:this.toRange(u.lineNumber,u.column),keyMods:v.keyMods,preserveFocus:r.inBackground}),r.inBackground||v.hide()}}));const n=()=>{const r=this.parsePosition(a,v.value.trim().substr(S.PREFIX.length)),u=this.getPickLabel(a,r.lineNumber,r.column);if(v.items=[{lineNumber:r.lineNumber,column:r.column,label:u}],v.ariaLabel=u,!this.isValidLineNumber(a,r.lineNumber)){this.clearDecorations(a);return}const f=this.toRange(r.lineNumber,r.column);a.revealRangeInCenter(f,0),this.addDecorations(a,f)};n(),i.add(v.onDidChangeValue(()=>n()));const t=(0,k.getCodeEditor)(a);return t&&t.getOptions().get(67).renderType===2&&(t.updateOptions({lineNumbers:"on"}),i.add((0,L.toDisposable)(()=>t.updateOptions({lineNumbers:"relative"})))),i}toRange(_=1,v=1){return{startLineNumber:_,startColumn:v,endLineNumber:_,endColumn:v}}parsePosition(_,v){const b=v.split(/,|:|#/).map(i=>parseInt(i,10)).filter(i=>!isNaN(i)),a=this.lineCount(_)+1;return{lineNumber:b[0]>0?b[0]:a+b[0],column:b[1]}}getPickLabel(_,v,b){if(this.isValidLineNumber(_,v))return this.isValidColumn(_,v,b)?(0,E.localize)(1,null,v,b):(0,E.localize)(2,null,v);const a=_.getPosition()||{lineNumber:1,column:1},i=this.lineCount(_);return i>1?(0,E.localize)(3,null,a.lineNumber,a.column,i):(0,E.localize)(4,null,a.lineNumber,a.column)}isValidLineNumber(_,v){return!v||typeof v!="number"?!1:v>0&&v<=this.lineCount(_)}isValidColumn(_,v,b){if(!b||typeof b!="number")return!1;const a=this.getModel(_);if(!a)return!1;const i={lineNumber:v,column:b};return a.validatePosition(i).equals(i)}lineCount(_){var v,b;return(b=(v=this.getModel(_))===null||v===void 0?void 0:v.getLineCount())!==null&&b!==void 0?b:0}}e.AbstractGotoLineQuickAccessProvider=S,S.PREFIX=":"}),define(se[867],oe([1,0,14,19,26,28,586,2,11,5,31,165,370,708,18,60]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let f=u=class extends i.AbstractEditorNavigationQuickAccessProvider{constructor(l,o,g=Object.create(null)){super(g),this._languageFeaturesService=l,this._outlineModelService=o,this.options=g,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(l){return this.provideLabelPick(l,(0,n.localize)(0,null)),p.Disposable.None}provideWithTextEditor(l,o,g){const h=l.editor,m=this.getModel(h);return m?this._languageFeaturesService.documentSymbolProvider.has(m)?this.doProvideWithEditorSymbols(l,m,o,g):this.doProvideWithoutEditorSymbols(l,m,o,g):p.Disposable.None}doProvideWithoutEditorSymbols(l,o,g,h){const m=new p.DisposableStore;return this.provideLabelPick(g,(0,n.localize)(1,null)),(async()=>!await this.waitForLanguageSymbolRegistry(o,m)||h.isCancellationRequested||m.add(this.doProvideWithEditorSymbols(l,o,g,h)))(),m}provideLabelPick(l,o){l.items=[{label:o,index:0,kind:14}],l.ariaLabel=o}async waitForLanguageSymbolRegistry(l,o){if(this._languageFeaturesService.documentSymbolProvider.has(l))return!0;const g=new L.DeferredPromise,h=o.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(l)&&(h.dispose(),g.complete(!0))}));return o.add((0,p.toDisposable)(()=>g.complete(!1))),g.p}doProvideWithEditorSymbols(l,o,g,h){var m;const C=l.editor,w=new p.DisposableStore;w.add(g.onDidAccept(A=>{const[P]=g.selectedItems;P&&P.range&&(this.gotoLocation(l,{range:P.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(o,h);let I;const T=async A=>{I?.dispose(!0),g.busy=!1,I=new k.CancellationTokenSource(h),g.busy=!0;try{const P=(0,S.prepareQuery)(g.value.substr(u.PREFIX.length).trim()),N=await this.doGetSymbolPicks(D,P,void 0,I.token);if(h.isCancellationRequested)return;if(N.length>0){if(g.items=N,A&&P.original.length===0){const M=(0,r.findLast)(N,R=>!!(R.type!=="separator"&&R.range&&v.Range.containsPosition(R.range.decoration,A)));M&&(g.activeItems=[M])}}else P.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(()=>T(void 0))),T((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,o,g,h){var m,C;const w=await l;if(h.isCancellationRequested)return[];const D=o.original.indexOf(u.SCOPE_PREFIX)===0,I=D?1:0;let T,A;o.values&&o.values.length>1?(T=(0,S.pieceToQuery)(o.values[0]),A=(0,S.pieceToQuery)(o.values.slice(1))):T=o;let P;const N=(C=(m=this.options)===null||m===void 0?void 0:m.openSideBySideDirection)===null||C===void 0?void 0:C.call(m);N&&(P=[{iconClass:N==="right"?E.ThemeIcon.asClassName(y.Codicon.splitHorizontal):E.ThemeIcon.asClassName(y.Codicon.splitVertical),tooltip:N==="right"?(0,n.localize)(4,null):(0,n.localize)(5,null)}]);const M=[];for(let O=0;O<w.length;O++){const B=w[O],W=(0,_.trim)(B.name),V=`$(${b.SymbolKinds.toIcon(B.kind).id}) ${W}`,K=V.length-W.length;let F=B.containerName;g?.extraContainerLabel&&(F?F=`${g.extraContainerLabel} \u2022 ${F}`:F=g.extraContainerLabel);let q,ie,ae,ne;if(o.original.length>I){let J=!1;if(T!==o&&([q,ie]=(0,S.scoreFuzzy2)(V,{...o,values:void 0},I,K),typeof q=="number"&&(J=!0)),typeof q!="number"&&([q,ie]=(0,S.scoreFuzzy2)(V,T,I,K),typeof q!="number"))continue;if(!J&&A){if(F&&A.original.length>0&&([ae,ne]=(0,S.scoreFuzzy2)(F,A)),typeof ae!="number")continue;typeof q=="number"&&(q+=ae)}}const $=B.tags&&B.tags.indexOf(1)>=0;M.push({index:O,kind:B.kind,score:q,label:V,ariaLabel:(0,b.getAriaLabelForSymbol)(B.name,B.kind),description:F,highlights:$?void 0:{label:ie,description:ne},range:{selection:v.Range.collapseToStart(B.selectionRange),decoration:B.range},strikethrough:$,buttons:P})}const R=M.sort((O,B)=>D?this.compareByKindAndScore(O,B):this.compareByScore(O,B));let x=[];if(D){let V=function(){B&&typeof O=="number"&&W>0&&(B.label=(0,_.format)(d[O]||c,W))},O,B,W=0;for(const K of R)O!==K.kind?(V(),O=K.kind,W=1,B={type:"separator"},x.push(B)):W++,x.push(K);V()}else R.length>0&&(x=[{label:(0,n.localize)(6,null,M.length),type:"separator"},...R]);return x}compareByScore(l,o){if(typeof l.score!="number"&&typeof o.score=="number")return 1;if(typeof l.score=="number"&&typeof o.score!="number")return-1;if(typeof l.score=="number"&&typeof o.score=="number"){if(l.score>o.score)return-1;if(l.score<o.score)return 1}return l.index<o.index?-1:l.index>o.index?1:0}compareByKindAndScore(l,o){const g=d[l.kind]||c,h=d[o.kind]||c,m=g.localeCompare(h);return m===0?this.compareByScore(l,o):m}async getDocumentSymbols(l,o){const g=await this._outlineModelService.getOrCreate(l,o);return o.isCancellationRequested?[]:g.asListOfDocumentSymbols()}};e.AbstractGotoSymbolQuickAccessProvider=f,f.PREFIX="@",f.SCOPE_PREFIX=":",f.PREFIX_BY_CATEGORY=`${u.PREFIX}${u.SCOPE_PREFIX}`,e.AbstractGotoSymbolQuickAccessProvider=f=u=ke([ge(0,t.ILanguageFeaturesService),ge(1,a.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(se[868],oe([1,0,2,10,711,15,34,29,23,475]),function(te,e,L,k,y,E,S,p,_){"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(a,i,n,t,r){this._editor=a,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(r),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(a){var i,n,t,r;if(!this._input||!this._domNode)return;const u=a.getColor(p.widgetShadow),f=a.getColor(p.widgetBorder);this._domNode.style.backgroundColor=String((i=a.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=a.getColor(p.inputForeground))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((t=a.getColor(p.inputBackground))!==null&&t!==void 0?t:"");const c=a.getColor(p.inputBorder);this._input.style.borderWidth=c?"1px":"0px",this._input.style.borderStyle=c?"solid":"none",this._input.style.borderColor=(r=c?.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const a=this._editor.getOption(50);this._input.style.fontFamily=a.fontFamily,this._input.style.fontWeight=a.fontWeight,this._input.style.fontSize=`${a.fontSize}px`,this._label.style.fontSize=`${a.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var a,i;const[n,t]=this._acceptKeybindings;return this._label.innerText=(0,y.localize)(2,null,(a=this._keybindingService.lookupKeybinding(n))===null||a===void 0?void 0:a.getLabel(),(i=this._keybindingService.lookupKeybinding(t))===null||i===void 0?void 0:i.getLabel()),null}afterRender(a){a||this.cancelInput(!0)}acceptInput(a){var i;(i=this._currentAcceptInput)===null||i===void 0||i.call(this,a)}cancelInput(a){var i;(i=this._currentCancelInput)===null||i===void 0||i.call(this,a)}getInput(a,i,n,t,r,u){this._domNode.classList.toggle("preview",r),this._position=new k.Position(a.startLineNumber,a.startColumn),this._input.value=i,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",t.toString()),this._input.size=Math.max((a.endColumn-a.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:r&&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=ke([ge(2,_.IThemeService),ge(3,S.IKeybindingService),ge(4,E.IContextKeyService)],v)}),define(se[869],oe([1,0,48,14,19,12,2,20,22,105,16,136,33,10,5,21,189,166,710,98,15,8,64,50,88,37,868,18]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class I{constructor(R,x,O){this.model=R,this.position=x,this._providerRenameIdx=0,this._providers=O.ordered(R)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(R){const x=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const B=this._providers[this._providerRenameIdx];if(!B.resolveRenameLocation)break;const W=await B.resolveRenameLocation(this.model,this.position,R);if(W){if(W.rejectReason){x.push(W.rejectReason);continue}return W}}this._providerRenameIdx=0;const O=this.model.getWordAtPosition(this.position);return O?{range:new t.Range(this.position.lineNumber,O.startColumn,this.position.lineNumber,O.endColumn),text:O.word,rejectReason:x.length>0?x.join(`
|
||
`):void 0}:{range:t.Range.fromPositions(this.position),text:"",rejectReason:x.length>0?x.join(`
|
||
`):void 0}}async provideRenameEdits(R,x){return this._provideRenameEdits(R,this._providerRenameIdx,[],x)}async _provideRenameEdits(R,x,O,B){const W=this._providers[x];if(!W)return{edits:[],rejectReason:O.join(`
|
||
`)};const V=await W.provideRenameEdits(this.model,this.position,R,B);if(V){if(V.rejectReason)return this._provideRenameEdits(R,x+1,O.concat(V.rejectReason),B)}else return this._provideRenameEdits(R,x+1,O.concat(c.localize(0,null)),B);return V}}async function T(M,R,x,O){const B=new I(R,x,M),W=await B.resolveRenameLocation(y.CancellationToken.None);return W?.rejectReason?{edits:[],rejectReason:W.rejectReason}:B.provideRenameEdits(O,y.CancellationToken.None)}e.rename=T;let A=D=class{static get(R){return R.getContribution(D.ID)}constructor(R,x,O,B,W,V,K,F){this.editor=R,this._instaService=x,this._notificationService=O,this._bulkEditService=B,this._progressService=W,this._logService=V,this._configService=K,this._languageFeaturesService=F,this._disposableStore=new S.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 R,x;if(this._cts.dispose(!0),this._cts=new y.CancellationTokenSource,!this.editor.hasModel())return;const O=this.editor.getPosition(),B=new I(this.editor.getModel(),O,this._languageFeaturesService.renameProvider);if(!B.hasProvider())return;const W=new v.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let V;try{const J=B.resolveRenameLocation(W.token);this._progressService.showWhile(J,250),V=await J}catch(J){(R=f.MessageController.get(this.editor))===null||R===void 0||R.showMessage(J||c.localize(1,null),O);return}finally{W.dispose()}if(!V)return;if(V.rejectReason){(x=f.MessageController.get(this.editor))===null||x===void 0||x.showMessage(V.rejectReason,O);return}if(W.token.isCancellationRequested)return;const K=new v.EditorStateCancellationTokenSource(this.editor,5,V.range,this._cts.token),F=this.editor.getSelection();let q=0,ie=V.text.length;!t.Range.isEmpty(F)&&!t.Range.spansMultipleLines(F)&&t.Range.containsRange(V.range,F)&&(q=Math.max(0,F.startColumn-V.range.startColumn),ie=Math.min(V.range.endColumn,F.endColumn)-V.range.startColumn);const ae=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ne=await this._renameInputField.getInput(V.range,V.text,q,ie,ae,K.token);if(typeof ne=="boolean"){ne&&this.editor.focus(),K.dispose();return}this.editor.focus();const $=(0,k.raceCancellation)(B.provideRenameEdits(ne.newName,K.token),K.token).then(async J=>{if(!(!J||!this.editor.hasModel())){if(J.rejectReason){this._notificationService.info(J.rejectReason);return}this.editor.setSelection(t.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(J,{editor:this.editor,showPreview:ne.wantsPreview,label:c.localize(2,null,V?.text,ne.newName),code:"undoredo.rename",quotableLabel:c.localize(3,null,V?.text,ne.newName),respectAutoSaveConfig:!0}).then(Q=>{Q.ariaSummary&&(0,L.alert)(c.localize(4,null,V.text,ne.newName,Q.ariaSummary))}).catch(Q=>{this._notificationService.error(c.localize(5,null)),this._logService.error(Q)})}},J=>{this._notificationService.error(c.localize(6,null)),this._logService.error(J)}).finally(()=>{K.dispose()});return this._progressService.showWhile($,250),$}acceptRenameInput(R){this._renameInputField.acceptInput(R)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};A.ID="editor.contrib.renameController",A=D=ke([ge(1,l.IInstantiationService),ge(2,g.INotificationService),ge(3,a.IBulkEditService),ge(4,h.IEditorProgressService),ge(5,o.ILogService),ge(6,u.ITextResourceConfigurationService),ge(7,w.ILanguageFeaturesService)],A);class P extends b.EditorAction{constructor(){super({id:"editor.action.rename",label:c.localize(7,null),alias:"Rename Symbol",precondition:s.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(R,x){const O=R.get(i.ICodeEditorService),[B,W]=Array.isArray(x)&&x||[void 0,void 0];return _.URI.isUri(B)&&n.Position.isIPosition(W)?O.openCodeEditor({resource:B},O.getActiveCodeEditor()).then(V=>{V&&(V.setPosition(W),V.invokeWithinContext(K=>(this.reportTelemetry(K,V),this.run(K,V))))},E.onUnexpectedError):super.runCommand(R,x)}run(R,x){const O=A.get(x);return O?O.run():Promise.resolve()}}e.RenameAction=P,(0,b.registerEditorContribution)(A.ID,A,4),(0,b.registerEditorAction)(P);const N=b.EditorCommand.bindToContribution(A.get);(0,b.registerEditorCommand)(new N({id:"acceptRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:s.ContextKeyExpr.and(r.EditorContextKeys.focus,s.ContextKeyExpr.not("isComposing")),primary:3}})),(0,b.registerEditorCommand)(new N({id:"acceptRenameInputWithPreview",precondition:s.ContextKeyExpr.and(C.CONTEXT_RENAME_INPUT_VISIBLE,s.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:M=>M.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:s.ContextKeyExpr.and(r.EditorContextKeys.focus,s.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,b.registerEditorCommand)(new N({id:"cancelRenameInput",precondition:C.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,b.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(M,R,x,...O){const[B]=O;(0,p.assertType)(typeof B=="string");const{renameProvider:W}=M.get(w.ILanguageFeaturesService);return T(W,R,x,B)}),(0,b.registerModelAndPositionCommand)("_executePrepareRename",async function(M,R,x){const{renameProvider:O}=M.get(w.ILanguageFeaturesService),W=await new I(R,x,O).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(se[870],oe([1,0,2,12,51,27,14,19,23,256,344,79,61,18,238,131,308]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let c=class extends L.Disposable{constructor(o,g,h,m,C,w){super(),this._watchers=Object.create(null);const D=A=>{this._watchers[A.uri.toString()]=new d(A,o,h,C,w)},I=(A,P)=>{P.dispose(),delete this._watchers[A.uri.toString()]},T=()=>{for(const A of g.getModels()){const P=this._watchers[A.uri.toString()];(0,u.isSemanticColoringEnabled)(A,h,m)?P||D(A):P&&I(A,P)}};g.getModels().forEach(A=>{(0,u.isSemanticColoringEnabled)(A,h,m)&&D(A)}),this._register(g.onModelAdded(A=>{(0,u.isSemanticColoringEnabled)(A,h,m)&&D(A)})),this._register(g.onModelRemoved(A=>{const P=this._watchers[A.uri.toString()];P&&I(A,P)})),this._register(m.onDidChangeConfiguration(A=>{A.affectsConfiguration(u.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&T()})),this._register(h.onDidColorThemeChange(T))}dispose(){for(const o of Object.values(this._watchers))o.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=c,e.DocumentSemanticTokensFeature=c=ke([ge(0,t.ISemanticTokensStylingService),ge(1,y.IModelService),ge(2,_.IThemeService),ge(3,E.IConfigurationService),ge(4,a.ILanguageFeatureDebounceService),ge(5,n.ILanguageFeaturesService)],c);let d=f=class extends L.Disposable{constructor(o,g,h,m,C){super(),this._semanticTokensStylingService=g,this._isDisposed=!1,this._model=o,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 S.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(o))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 o=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,o.token);this._currentDocumentRequestCancellationTokenSource=o,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:T,tokens:A}=I,P=this._semanticTokensStylingService.getStyling(T);this._setDocumentSemanticTokens(T,A||null,P,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(o,g,h,m,C){C=Math.min(C,h.length-m,o.length-g);for(let w=0;w<C;w++)h[m+w]=o[g+w]}_setDocumentSemanticTokens(o,g,h,m){const C=this._currentDocumentResponse,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){o&&g&&o.releaseDocumentSemanticTokens(g.resultId);return}if(!o||!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 N of g.edits)D+=(N.data?N.data.length:0)-N.deleteCount;const I=C.data,T=new Uint32Array(I.length+D);let A=I.length,P=T.length;for(let N=g.edits.length-1;N>=0;N--){const M=g.edits[N];if(M.start>I.length){h.warnInvalidEditStart(C.resultId,g.resultId,N,M.start,I.length),this._model.tokenization.setSemanticTokens(null,!0);return}const R=A-(M.start+M.deleteCount);R>0&&(f._copy(I,A-R,T,P-R,R),P-=R),M.data&&(f._copy(M.data,0,T,P-M.data.length,M.data.length),P-=M.data.length),A=M.start}A>0&&f._copy(I,0,T,0,A),g={resultId:g.resultId,data:T}}}if((0,b.isSemanticTokens)(g)){this._currentDocumentResponse=new s(o,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 T of D)for(const A of I.changes)T.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=ke([ge(1,t.ISemanticTokensStylingService),ge(2,_.IThemeService),ge(3,a.ILanguageFeatureDebounceService),ge(4,n.ILanguageFeaturesService)],d);class s{constructor(o,g,h){this.provider=o,this.resultId=g,this.data=h}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,r.registerEditorFeature)(c)}),define(se[871],oe([1,0,14,2,16,344,308,256,27,23,79,61,18,238]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,s,l){super(),this._semanticTokensStylingService=f,this._themeService=c,this._configurationService=d,this._editor=u,this._provider=l.documentRangeSemanticTokensProvider,this._debounceInformation=s.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new L.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const o=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{o()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),o()})),this._register(this._editor.onDidChangeModelContent(g=>{this._cancelAll(),o()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),o()})),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(S.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),o())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),o()})),o()}_cancelAll(){for(const u of this._outstandingRequests)u.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(u){for(let f=0,c=this._outstandingRequests.length;f<c;f++)if(this._outstandingRequests[f]===u){this._outstandingRequests.splice(f,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const u=this._editor.getModel();if(u.tokenization.hasCompleteSemanticTokens())return;if(!(0,S.isSemanticColoringEnabled)(u,this._themeService,this._configurationService)){u.tokenization.hasSomeSemanticTokens()&&u.tokenization.setSemanticTokens(null,!1);return}if(!(0,E.hasDocumentRangeSemanticTokensProvider)(this._provider,u)){u.tokenization.hasSomeSemanticTokens()&&u.tokenization.setSemanticTokens(null,!1);return}const f=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(f.map(c=>this._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))),s=new a.StopWatch(!1);return d.then(l=>{if(this._debounceInformation.update(u,s.elapsed()),!l||!l.tokens||u.isDisposed()||u.getVersionId()!==c)return;const{provider:o,tokens:g}=l,h=this._semanticTokensStylingService.getStyling(o);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=ke([ge(1,n.ISemanticTokensStylingService),ge(2,v.IThemeService),ge(3,_.IConfigurationService),ge(4,b.ILanguageFeatureDebounceService),ge(5,i.ILanguageFeaturesService)],t),(0,y.registerEditorContribution)(t.ID,t,1)}),define(se[872],oe([1,0,7,230,26,28,6,71,2,22,31,792,51,43,720,341,82,23,355]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function s(m){return`suggest-aria-id:${m}`}e.getAriaId=s;const l=(0,u.registerIcon)("suggest-more-info",y.Codicon.chevronRight,t.localize(0,null)),o=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(C.completion.documentation){const D=typeof C.completion.documentation=="string"?C.completion.documentation:C.completion.documentation.value,I=d._regexRelaxed.exec(D);if(I&&(I.index===0||I.index+I[0].length===D.length))return w[0]=I[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 S.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(C){const w=new _.DisposableStore,D=C;D.classList.add("show-file-icons");const I=(0,L.append)(C,(0,L.$)(".icon")),T=(0,L.append)(I,(0,L.$)("span.colorspan")),A=(0,L.append)(C,(0,L.$)(".contents")),P=(0,L.append)(A,(0,L.$)(".main")),N=(0,L.append)(P,(0,L.$)(".icon-label.codicon")),M=(0,L.append)(P,(0,L.$)("span.left")),R=(0,L.append)(P,(0,L.$)("span.right")),x=new k.IconLabel(M,{supportHighlights:!0,supportIcons:!0});w.add(x);const O=(0,L.append)(M,(0,L.$)("span.signature-label")),B=(0,L.append)(M,(0,L.$)("span.qualifier-label")),W=(0,L.append)(R,(0,L.$)("span.details-label")),V=(0,L.append)(R,(0,L.$)("span.readMore"+E.ThemeIcon.asCSSSelector(l)));return V.title=t.localize(1,null),{root:D,left:M,right:R,icon:I,colorspan:T,iconLabel:x,iconContainer:N,parametersLabel:O,qualifierLabel:B,detailsLabel:W,readMore:V,disposables:w,configureFont:()=>{const F=this._editor.getOptions(),q=F.get(50),ie=q.getMassagedFontFamily(),ae=q.fontFeatureSettings,ne=F.get(118)||q.fontSize,$=F.get(119)||q.lineHeight,J=q.fontWeight,Q=q.letterSpacing,re=`${ne}px`,de=`${$}px`,he=`${Q}px`;D.style.fontSize=re,D.style.fontWeight=J,D.style.letterSpacing=he,P.style.fontFamily=ie,P.style.fontFeatureSettings=ae,P.style.lineHeight=de,I.style.height=de,I.style.width=de,V.style.height=de,V.style.width=de}}}renderElement(C,w,D){D.configureFont();const{completion:I}=C;D.root.id=s(w),D.colorspan.style.backgroundColor="";const T={labelEscapeNewLines:!0,matches:(0,p.createMatches)(C.score)},A=[];if(I.kind===19&&o.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 P=(0,a.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FILE),N=(0,a.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:I.detail}),r.FileKind.FILE);T.extraClasses=P.length>N.length?P:N}else I.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(D.icon.className="icon hide",D.iconContainer.className="icon hide",T.extraClasses=[(0,a.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:C.textLabel}),r.FileKind.FOLDER),(0,a.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:I.detail}),r.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&&(T.extraClasses=(T.extraClasses||[]).concat(["deprecated"]),T.matches=[]),D.iconLabel.setLabel(C.textLabel,void 0,T),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=P=>{P.stopPropagation(),P.preventDefault()},D.readMore.onclick=P=>{P.stopPropagation(),P.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=ke([ge(1,i.IModelService),ge(2,n.ILanguageService),ge(3,f.IThemeService)],g);function h(m){return m.replace(/\r\n|\r|\n/g,"")}}),define(se[873],oe([1,0,866,37,139,33,96,6,16,21,70]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let a=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=a,e.StandaloneGotoLineQuickAccessProvider=a=ke([ge(0,E.ICodeEditorService)],a);class i extends _.EditorAction{constructor(){super({id:i.ID,label:S.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(a.PREFIX)}}e.GotoLineAction=i,i.ID="editor.action.gotoLine",(0,_.registerEditorAction)(i),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:a,prefix:a.PREFIX,helpEntries:[{description:S.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(se[874],oe([1,0,867,37,139,33,96,6,16,21,70,165,18,177,254]),function(te,e,L,k,y,E,S,p,_,v,b,a,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=ke([ge(0,E.ICodeEditorService),ge(1,i.ILanguageFeaturesService),ge(2,a.IOutlineModelService)],n);class t extends _.EditorAction{constructor(){super({id:t.ID,label:S.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,_.registerEditorAction)(t),k.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:S.QuickOutlineNLS.quickOutlineActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:t.ID},{description:S.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(se[371],oe([1,0,7,47,851,33,15,45,23]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let v=class extends y.AbstractCodeEditorService{constructor(a,i){super(i),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=a.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(n,t,r)=>t?this.doOpenEditor(t,n):null))}_checkContextKey(){let a=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){a=!0;break}this._editorIsOpen.set(a)}setActiveCodeEditor(a){this._activeCodeEditor=a}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(a,i){if(!this.findModel(a,i.resource)){if(i.resource){const r=i.resource.scheme;if(r===k.Schemas.http||r===k.Schemas.https)return(0,L.windowOpenNoOpener)(i.resource.toString()),a}return null}const t=i.options?i.options.selection:null;if(t)if(typeof t.endLineNumber=="number"&&typeof t.endColumn=="number")a.setSelection(t),a.revealRangeInCenter(t,1);else{const r={lineNumber:t.startLineNumber,column:t.startColumn};a.setPosition(r),a.revealPositionInCenter(r,1)}return a}findModel(a,i){const n=a.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};e.StandaloneCodeEditorService=v,e.StandaloneCodeEditorService=v=ke([ge(0,S.IContextKeyService),ge(1,_.IThemeService)],v),(0,p.registerSingleton)(E.ICodeEditorService,v,0)}),define(se[875],oe([1,0,83,29]),function(te,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(se[372],oe([1,0,7,54,39,6,31,132,519,875,37,29,23,2,89,846,44]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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(a.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?(s(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=_.TokenTheme.createFromRawTokenTheme(m,C)}return this._tokenTheme}getTokenStyleMetadata(m,C,w){const I=this.tokenTheme._match([m].concat(C).join(".")).metadata,T=p.TokenMetadata.getForeground(I),A=p.TokenMetadata.getFontStyle(I);return{foreground:T,italic:!!(A&1),bold:!!(A&2),underline:!!(A&4),strikethrough:!!(A&8)}}}function s(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 o(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 r.UnthemedProductIconTheme,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(e.VS_LIGHT_THEME_NAME,o(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,o(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,o(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,o(e.HC_LIGHT_THEME_NAME));const m=this._register((0,r.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)(u.mainWindow,"(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<this._styleElements.length;w++)if(this._styleElements[w]===C){this._styleElements.splice(w,1);return}}}}defineTheme(m,C){if(!/^[a-z0-9\-]+$/i.test(m))throw new Error("Illegal theme name!");if(!s(C.base)&&!s(m))throw new Error("Illegal theme base!");this._knownThemes.set(m,new d(m,C)),s(m)&&this._knownThemes.forEach(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:T=>{C[T]||(m.push(T),C[T]=!0)}};c.getThemingParticipants().forEach(T=>T(this._theme,w,this._environment));const D=[];for(const T of f.getColors()){const A=this._theme.getColor(T.id,!0);A&&D.push(`${(0,a.asCssVariableName)(T.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,_.generateTokensCSSForColorMap)(I)),this._themeCSS=m.join(`
|
||
`),this._updateCSS(),S.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(se[876],oe([1,0,16,137,96,89,372]),function(te,e,L,k,y,E,S){"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 a=v.get(k.IStandaloneThemeService),i=a.getColorTheme();(0,E.isHighContrast)(i.type)?(a.setTheme(this._originalThemeName||((0,E.isDark)(i.type)?S.VS_DARK_THEME_NAME:S.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(a.setTheme((0,E.isDark)(i.type)?S.HC_BLACK_THEME_NAME:S.HC_LIGHT_THEME_NAME),this._originalThemeName=i.themeName)}}(0,L.registerEditorAction)(p)}),define(se[141],oe([1,0,7,46,135,325,42,218,2,17,733,30,756,15,59,8,34,50,92,23,28,89,20,29,106,69,488]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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(M,R,x,O){const B=M.getActions(R),W=L.ModifierKeyEmitter.getInstance(),V=W.keyStatus.altKey||(v.isWindows||v.isLinux)&&W.keyStatus.shiftKey;D(B,x,V,O?K=>K===O:K=>K==="navigation")}e.createAndFillInContextMenuActions=C;function w(M,R,x,O,B,W){const V=M.getActions(R);D(V,x,!1,typeof O=="string"?F=>F===O:O,B,W)}e.createAndFillInActionBarActions=w;function D(M,R,x,O=V=>V==="navigation",B=()=>!1,W=!1){let V,K;Array.isArray(R)?(V=R,K=R):(V=R.primary,K=R.secondary);const F=new Set;for(const[q,ie]of M){let ae;O(q)?(ae=V,ae.length>0&&W&&ae.push(new S.Separator)):(ae=K,ae.length>0&&ae.push(new S.Separator));for(let ne of ie){x&&(ne=ne instanceof a.MenuItemAction&&ne.alt?ne.alt:ne);const $=ae.push(ne);ne instanceof S.SubmenuAction&&F.add({group:q,action:ne,index:$-1})}}for(const{group:q,action:ie,index:ae}of F){const ne=O(q)?V:K,$=ie.actions;B(ie,q,ne.length)&&ne.splice(ae,1,...$)}}let I=class extends y.ActionViewItem{constructor(R,x,O,B,W,V,K,F){super(void 0,R,{icon:!!(R.class||R.item.icon),label:!R.class&&!R.item.icon,draggable:x?.draggable,keybinding:x?.keybinding,hoverDelegate:x?.hoverDelegate}),this._keybindingService=O,this._notificationService=B,this._contextKeyService=W,this._themeService=V,this._contextMenuService=K,this._accessibilityService=F,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new _.MutableDisposable),this._altKey=L.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(R){R.preventDefault(),R.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(x){this._notificationService.error(x)}}render(R){if(super.render(R),R.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let x=!1;const O=()=>{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(O)),this._register((0,L.addDisposableListener)(R,"mouseleave",B=>{x=!1,O()})),this._register((0,L.addDisposableListener)(R,"mouseenter",B=>{x=!0,O()})),O()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var R;const x=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),O=x&&x.getLabel(),B=this._commandAction.tooltip||this._commandAction.label;let W=O?(0,b.localize)(0,null,B,O):B;if(!this._wantsAltCommand&&(!((R=this._menuItemAction.alt)===null||R===void 0)&&R.enabled)){const V=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,K=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),F=K&&K.getLabel(),q=F?(0,b.localize)(1,null,V,F):V;W=(0,b.localize)(2,null,W,p.UILabelProvider.modifierLabels[v.OS].altKey,q)}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(R){this._itemClassDispose.value=void 0;const{element:x,label:O}=this;if(!x||!O)return;const B=this._commandAction.checked&&(0,i.isICommandActionToggleInfo)(R.toggled)&&R.toggled.icon?R.toggled.icon:R.icon;if(B)if(s.ThemeIcon.isThemeIcon(B)){const W=s.ThemeIcon.asClassNameArray(B);O.classList.add(...W),this._itemClassDispose.value=(0,_.toDisposable)(()=>{O.classList.remove(...W)})}else O.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(B.dark):(0,L.asCSSUrl)(B.light),O.classList.add("icon"),this._itemClassDispose.value=(0,_.combinedDisposable)((0,_.toDisposable)(()=>{O.style.backgroundImage="",O.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};e.MenuEntryActionViewItem=I,e.MenuEntryActionViewItem=I=ke([ge(2,u.IKeybindingService),ge(3,f.INotificationService),ge(4,n.IContextKeyService),ge(5,d.IThemeService),ge(6,t.IContextMenuService),ge(7,m.IAccessibilityService)],I);let T=class extends E.DropdownMenuActionViewItem{constructor(R,x,O,B,W){var V,K,F;const q={...x,menuAsChild:(V=x?.menuAsChild)!==null&&V!==void 0?V:!1,classNames:(K=x?.classNames)!==null&&K!==void 0?K:s.ThemeIcon.isThemeIcon(R.item.icon)?s.ThemeIcon.asClassName(R.item.icon):void 0,keybindingProvider:(F=x?.keybindingProvider)!==null&&F!==void 0?F:ie=>O.lookupKeybinding(ie.id)};super(R,{getActions:()=>R.actions},B,q),this._keybindingService=O,this._contextMenuService=B,this._themeService=W}render(R){super.render(R),(0,o.assertType)(this.element),R.classList.add("menu-entry");const x=this._action,{icon:O}=x.item;if(O&&!s.ThemeIcon.isThemeIcon(O)){this.element.classList.add("icon");const B=()=>{this.element&&(this.element.style.backgroundImage=(0,l.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(O.dark):(0,L.asCSSUrl)(O.light))};B(),this._register(this._themeService.onDidColorThemeChange(()=>{B()}))}}};e.SubmenuEntryActionViewItem=T,e.SubmenuEntryActionViewItem=T=ke([ge(2,u.IKeybindingService),ge(3,t.IContextMenuService),ge(4,d.IThemeService)],T);let A=class extends y.BaseActionViewItem{constructor(R,x,O,B,W,V,K,F){var q,ie,ae;super(null,R),this._keybindingService=O,this._notificationService=B,this._contextMenuService=W,this._menuService=V,this._instaService=K,this._storageService=F,this._container=null,this._options=x,this._storageKey=`${R.item.submenu.id}_lastActionId`;let ne;const $=x?.persistLastActionId?F.get(this._storageKey,1):void 0;$&&(ne=R.actions.find(Q=>$===Q.id)),ne||(ne=R.actions[0]),this._defaultAction=this._instaService.createInstance(I,ne,{keybinding:this._getDefaultActionKeybindingLabel(ne)});const J={keybindingProvider:Q=>this._keybindingService.lookupKeybinding(Q.id),...x,menuAsChild:(q=x?.menuAsChild)!==null&&q!==void 0?q:!0,classNames:(ie=x?.classNames)!==null&&ie!==void 0?ie:["codicon","codicon-chevron-down"],actionRunner:(ae=x?.actionRunner)!==null&&ae!==void 0?ae:new S.ActionRunner};this._dropdown=new E.DropdownMenuActionViewItem(R,R.actions,this._contextMenuService,J),this._register(this._dropdown.actionRunner.onDidRun(Q=>{Q.action instanceof a.MenuItemAction&&this.update(Q.action)}))}update(R){var x;!((x=this._options)===null||x===void 0)&&x.persistLastActionId&&this._storageService.store(this._storageKey,R.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(I,R,{keybinding:this._getDefaultActionKeybindingLabel(R)}),this._defaultAction.actionRunner=new class extends S.ActionRunner{async runAction(O,B){await O.run(void 0)}},this._container&&this._defaultAction.render((0,L.prepend)(this._container,(0,L.$)(".action-container")))}_getDefaultActionKeybindingLabel(R){var x;let O;if(!((x=this._options)===null||x===void 0)&&x.renderKeybindingWithDefaultActionLabel){const B=this._keybindingService.lookupKeybinding(R.id);B&&(O=`(${B.getLabel()})`)}return O}setActionContext(R){super.setActionContext(R),this._defaultAction.setActionContext(R),this._dropdown.setActionContext(R)}render(R){this._container=R,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 O=(0,L.$)(".dropdown-action-container");this._dropdown.render((0,L.append)(this._container,O)),this._register((0,L.addDisposableListener)(O,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(R){R?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(R){R?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=ke([ge(2,u.IKeybindingService),ge(3,f.INotificationService),ge(4,t.IContextMenuService),ge(5,a.IMenuService),ge(6,r.IInstantiationService),ge(7,c.IStorageService)],A);let P=class extends y.SelectActionViewItem{constructor(R,x){super(null,R,R.actions.map(O=>({text:O.id===S.Separator.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":O.label,isDisabled:!O.enabled})),0,x,h.defaultSelectBoxStyles,{ariaLabel:R.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,R.actions.findIndex(O=>O.checked)))}render(R){super.render(R),R.style.borderColor=(0,g.asCssVariable)(g.selectBorder)}runAction(R,x){const O=this.action.actions[x];O&&this.actionRunner.run(O)}};P=ke([ge(1,t.IContextViewService)],P);function N(M,R,x){return R instanceof a.MenuItemAction?M.createInstance(I,R,x):R instanceof a.SubmenuItemAction?R.item.isSelection?M.createInstance(P,R):R.item.rememberDefaultAction?M.createInstance(A,R,{...x,persistLastActionId:!0}):M.createInstance(T,R,x):void 0}e.createActionViewItem=N}),define(se[877],oe([1,0,7,78,2,721,141,30,15,8]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class b extends S.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 a=class{constructor(n,t,r,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?r.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 r=[],u=[];for(const[f,c]of n.getActions())f==="left"?r.push(...c):u.push(...c);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(u)};this._menuDisposables.add(n.onDidChange(()=>t())),this._menuDisposables.add(n)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=a,e.SuggestWidgetStatus=a=ke([ge(2,v.IInstantiationService),ge(3,p.IMenuService),ge(4,_.IContextKeyService)],a)}),define(se[373],oe([1,0,7,67,600,42,13,268,12,6,52,2,734,141,30,15,59,34,81]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuWorkbenchToolBar=e.WorkbenchToolBar=void 0;let d=class extends y.ToolBar{constructor(o,g,h,m,C,w,D){super(o,C,{getKeyBinding:T=>{var A;return(A=w.lookupKeybinding(T.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 a.DisposableStore);const I=g?.telemetrySource;I&&this._store.add(this.actionBar.onDidRun(T=>D.publicLog2("workbenchActionExecuted",{id:T.action.id,from:I})))}setActions(o,g=[],h){var m,C,w;this._sessionDisposables.clear();const D=o.slice(),I=g.slice(),T=[];let A=0;const P=[];let N=!1;if(((m=this._options)===null||m===void 0?void 0:m.hiddenItemStrategy)!==-1)for(let M=0;M<D.length;M++){const R=D[M];!(R instanceof t.MenuItemAction)&&!(R instanceof t.SubmenuItemAction)||R.hideActions&&(T.push(R.hideActions.toggle),R.hideActions.toggle.checked&&A++,R.hideActions.isHidden&&(N=!0,D[M]=void 0,((C=this._options)===null||C===void 0?void 0:C.hiddenItemStrategy)!==0&&(P[M]=R)))}if(((w=this._options)===null||w===void 0?void 0:w.overflowBehavior)!==void 0){const M=(0,p.intersection)(new Set(this._options.overflowBehavior.exempted),b.Iterable.map(D,O=>O?.id)),R=this._options.overflowBehavior.maxItems-M.size;let x=0;for(let O=0;O<D.length;O++){const B=D[O];B&&(x++,!M.has(B.id)&&x>=R&&(D[O]=void 0,P[O]=B))}}(0,S.coalesceInPlace)(D),(0,S.coalesceInPlace)(P),super.setActions(D,E.Separator.join(P,I)),T.length>0&&this._sessionDisposables.add((0,L.addDisposableListener)(this.getElement(),"contextmenu",M=>{var R,x,O,B,W;const V=new k.StandardMouseEvent((0,L.getWindow)(this.getElement()),M),K=this.getItemAction(V.target);if(!K)return;V.preventDefault(),V.stopPropagation();let F=!1;if(A===1&&((R=this._options)===null||R===void 0?void 0:R.hiddenItemStrategy)===0){F=!0;for(let ae=0;ae<T.length;ae++)if(T[ae].checked){T[ae]=(0,E.toAction)({id:K.id,label:K.label,checked:!0,enabled:!1,run(){}});break}}let q;if(!F&&(K instanceof t.MenuItemAction||K instanceof t.SubmenuItemAction)){if(!K.hideActions)return;q=K.hideActions.hide}else q=(0,E.toAction)({id:"label",label:(0,i.localize)(0,null),enabled:!1,run(){}});const ie=E.Separator.join([q],T);!((x=this._options)===null||x===void 0)&&x.resetMenu&&!h&&(h=[this._options.resetMenu]),N&&h&&(ie.push(new E.Separator),ie.push((0,E.toAction)({id:"resetThisMenu",label:(0,i.localize)(1,null),run:()=>this._menuService.resetHiddenStates(h)}))),this._contextMenuService.showContextMenu({getAnchor:()=>V,getActions:()=>ie,menuId:(O=this._options)===null||O===void 0?void 0:O.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=ke([ge(2,t.IMenuService),ge(3,r.IContextKeyService),ge(4,u.IContextMenuService),ge(5,f.IKeybindingService),ge(6,c.ITelemetryService)],d);let s=class extends d{constructor(o,g,h,m,C,w,D,I){super(o,{resetMenu:g,...h},m,C,w,D,I),this._onDidChangeMenuItems=this._store.add(new v.Emitter);const T=this._store.add(m.createMenu(g,C,{emitEventsForSubmenuChanges:!0})),A=()=>{var P,N,M;const R=[],x=[];(0,n.createAndFillInActionBarActions)(T,h?.menuOptions,{primary:R,secondary:x},(P=h?.toolbarOptions)===null||P===void 0?void 0:P.primaryGroup,(N=h?.toolbarOptions)===null||N===void 0?void 0:N.shouldInlineSubmenu,(M=h?.toolbarOptions)===null||M===void 0?void 0:M.useSeparatorsInPrimaryActions),o.classList.toggle("has-no-actions",R.length===0&&x.length===0),super.setActions(R,x)};this._store.add(T.onDidChange(()=>{A(),this._onDidChangeMenuItems.fire(this)})),A()}setActions(){throw new _.BugIndicatingError("This toolbar is populated from a menu.")}};e.MenuWorkbenchToolBar=s,e.MenuWorkbenchToolBar=s=ke([ge(3,t.IMenuService),ge(4,r.IContextKeyService),ge(5,u.IContextMenuService),ge(6,f.IKeybindingService),ge(7,c.ITelemetryService)],s)}),define(se[257],oe([1,0,7,135,224,42,13,14,26,2,35,17,28,10,31,216,697,141,373,30,25,15,59,8,34,81,82,468]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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,O,B){super(),this.editor=x,this.model=O,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,K,F;const q=(V=this.model.read(W))===null||V===void 0?void 0:V.ghostText.read(W);if(!this.alwaysShowToolbar.read(W)||!q||q.parts.length===0)return this.sessionPosition=void 0,null;const ie=q.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==q.lineNumber&&(this.sessionPosition=void 0);const ae=new n.Position(q.lineNumber,Math.min(ie,(F=(K=this.sessionPosition)===null||K===void 0?void 0:K.column)!==null&&F!==void 0?F:Number.MAX_SAFE_INTEGER));return this.sessionPosition=ae,ae}),this._register((0,b.autorunWithStore)((W,V)=>{const K=this.model.read(W);if(!K||!this.alwaysShowToolbar.read(W))return;const F=V.add(this.instantiationService.createInstance(A,this.editor,!0,this.position,K.selectedInlineCompletionIndex,K.inlineCompletionsCount,K.selectedInlineCompletion.map(q=>{var ie;return(ie=q?.inlineCompletion.source.inlineCompletions.commands)!==null&&ie!==void 0?ie:[]})));x.addContentWidget(F),V.add((0,v.toDisposable)(()=>x.removeContentWidget(F))),V.add((0,b.autorun)(q=>{this.position.read(q)&&K.lastTriggerKind.read(q)!==t.InlineCompletionTriggerKind.Explicit&&K.triggerExplicitly()}))}))}};e.InlineCompletionsHintsWidget=D,e.InlineCompletionsHintsWidget=D=ke([ge(2,g.IInstantiationService)],D);const I=(0,C.registerIcon)("inline-suggestion-hints-next",_.Codicon.chevronRight,(0,u.localize)(0,null)),T=(0,C.registerIcon)("inline-suggestion-hints-previous",_.Codicon.chevronLeft,(0,u.localize)(1,null));let A=w=class extends v.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(x,O,B){const W=new E.Action(x,O,B,!0,()=>this._commandService.executeCommand(x)),V=this.keybindingService.lookupKeybinding(x,this._contextKeyService);let K=O;return V&&(K=(0,u.localize)(2,null,O,V.getLabel())),W.tooltip=K,W}constructor(x,O,B,W,V,K,F,q,ie,ae,ne){super(),this.editor=x,this.withBorder=O,this._position=B,this._currentSuggestionIdx=W,this._suggestionCount=V,this._extraCommands=K,this._commandService=F,this.keybindingService=ie,this._contextKeyService=ae,this._menuService=ne,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(r.showPreviousInlineSuggestionActionId,(0,u.localize)(3,null),i.ThemeIcon.asClassName(T)),this.availableSuggestionCountAction=new E.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(r.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(q.createInstance(M,this.nodes.toolBar,d.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:$=>$.startsWith("primary")},actionViewItemProvider:($,J)=>{if($ instanceof d.MenuItemAction)return q.createInstance(N,$,void 0);if($===this.availableSuggestionCountAction){const Q=new P(void 0,$,{label:!0,icon:!1});return Q.setClass("availableSuggestionCount"),Q}},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 J=this._suggestionCount.read($),Q=this._currentSuggestionIdx.read($);J!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${Q+1}/${J}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),J!==void 0&&J>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,b.autorun)($=>{const J=this._extraCommands.read($);if((0,S.equals)(this.lastCommands,J))return;this.lastCommands=J;const Q=J.map(re=>({class:void 0,id:re.id,enabled:!0,tooltip:re.tooltip||"",label:re.title,run:de=>this._commandService.executeCommand(re.id)}));for(const[re,de]of this.inlineCompletionsActionsMenus.getActions())for(const he of de)he instanceof d.MenuItemAction&&Q.push(he);Q.length>0&&Q.unshift(new E.Separator),this.toolBar.setAdditionalSecondaryActions(Q)}))}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=ke([ge(6,s.ICommandService),ge(7,g.IInstantiationService),ge(8,h.IKeybindingService),ge(9,l.IContextKeyService),ge(10,d.IMenuService)],A);class P 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)}updateTooltip(){}}class N extends f.MenuEntryActionViewItem{updateLabel(){const x=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!x)return super.updateLabel();if(this.label){const O=(0,L.h)("div.keybinding").root;new y.KeybindingLabel(O,a.OS,{disableTitle:!0,...y.unthemedKeybindingLabelOptions}).set(x),this.label.textContent=this._action.label,this.label.appendChild(O),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}}let M=class extends c.WorkbenchToolBar{constructor(x,O,B,W,V,K,F,q){super(x,{resetMenu:O,...B},W,V,K,F,q),this.menuId=O,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,O,B,W,V,K,F;const q=[],ie=[];(0,f.createAndFillInActionBarActions)(this.menu,(x=this.options2)===null||x===void 0?void 0:x.menuOptions,{primary:q,secondary:ie},(B=(O=this.options2)===null||O===void 0?void 0:O.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=(K=this.options2)===null||K===void 0?void 0:K.toolbarOptions)===null||F===void 0?void 0:F.useSeparatorsInPrimaryActions),ie.push(...this.additionalActions),q.unshift(...this.prependedPrimaryActions),this.setActions(q,ie)}setPrependedPrimaryActions(x){(0,S.equals)(this.prependedPrimaryActions,x,(O,B)=>O===B)||(this.prependedPrimaryActions=x,this.updateToolbar())}setAdditionalSecondaryActions(x){(0,S.equals)(this.additionalActions,x,(O,B)=>O===B)||(this.additionalActions=x,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=M,e.CustomizedMenuWorkbenchToolBar=M=ke([ge(3,d.IMenuService),ge(4,l.IContextKeyService),ge(5,o.IContextMenuService),ge(6,h.IKeybindingService),ge(7,m.ITelemetryService)],M)}),define(se[878],oe([1,0,7,42,6,2,141,30,15,34,50,81,840,59]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,s,l,o){super(),this.telemetryService=f,this.notificationService=c,this.contextViewService=d,this.keybindingService=s,this.menuService=l,this.contextKeyService=o,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new y.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new y.Emitter)}configure(f){this.contextMenuHandler.configure(f)}showContextMenu(f){f=r.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=ke([ge(0,a.ITelemetryService),ge(1,b.INotificationService),ge(2,n.IContextViewService),ge(3,v.IKeybindingService),ge(4,p.IMenuService),ge(5,_.IContextKeyService)],t);var r;(function(u){function f(d){return d&&d.menuId instanceof p.MenuId}function c(d,s,l){if(!f(d))return d;const{menuId:o,menuActionOptions:g,contextKeyService:h}=d;return{...d,getActions:()=>{const m=[];if(o){const C=s.createMenu(o,h??l);(0,S.createAndFillInContextMenuActions)(C,g,m),C.dispose()}return d.getActions?k.Separator.join(d.getActions(),m):m}}}u.transform=c})(r||(e.ContextMenuMenuDelegate=r={}))}),define(se[879],oe([1,0,19,6,15,8,123,192,57,803,106,29,23,367,850,27,244]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let f=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(d,s,l,o,g,h){super(l),this.instantiationService=d,this.contextKeyService=s,this.layoutService=o,this.configurationService=g,this.hoverService=h,this._onShow=this._register(new k.Emitter),this._onHide=this._register(new k.Emitter),this.contexts=new Map}createController(d=this.layoutService,s){const l={idPrefix:"quickInput_",container:d.activeContainer,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:g=>this.setContextKey(g),linkOpenerDelegate:g=>{this.instantiationService.invokeFunction(h=>{h.get(_.IOpenerService).open(g,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>d.focus(),createList:(g,h,m,C,w)=>this.instantiationService.createInstance(p.WorkbenchList,g,h,m,C,w),styles:this.computeStyles(),hoverDelegate:new n.QuickInputHoverDelegate(this.configurationService,this.hoverService)},o=this._register(new t.QuickInputController({...l,...s},this.themeService,this.layoutService));return o.layout(d.activeContainerDimension,d.activeContainerOffset.quickPickTop),this._register(d.onDidLayoutActiveContainer(g=>o.layout(g,d.activeContainerOffset.quickPickTop))),this._register(d.onDidChangeActiveContainer(()=>{o.isVisible()||o.layout(d.activeContainerDimension,d.activeContainerOffset.quickPickTop)})),this._register(o.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(o.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),o}setContextKey(d){let s;d&&(s=this.contexts.get(d),s||(s=new y.RawContextKey(d,!1).bindTo(this.contextKeyService),this.contexts.set(d,s))),!(s&&s.get())&&(this.resetContextKeys(),s?.set(!0))}resetContextKeys(){this.contexts.forEach(d=>{d.get()&&d.reset()})}pick(d,s={},l=L.CancellationToken.None){return this.controller.pick(d,s,l)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,a.asCssVariable)(a.quickInputBackground),quickInputForeground:(0,a.asCssVariable)(a.quickInputForeground),quickInputTitleBackground:(0,a.asCssVariable)(a.quickInputTitleBackground),widgetBorder:(0,a.asCssVariable)(a.widgetBorder),widgetShadow:(0,a.asCssVariable)(a.widgetShadow)},inputBox:b.defaultInputBoxStyles,toggle:b.defaultToggleStyles,countBadge:b.defaultCountBadgeStyles,button:b.defaultButtonStyles,progressBar:b.defaultProgressBarStyles,keybindingLabel:b.defaultKeybindingLabelStyles,list:(0,b.getListStyles)({listBackground:a.quickInputBackground,listFocusBackground:a.quickInputListFocusBackground,listFocusForeground:a.quickInputListFocusForeground,listInactiveFocusForeground:a.quickInputListFocusForeground,listInactiveSelectionIconForeground:a.quickInputListFocusIconForeground,listInactiveFocusBackground:a.quickInputListFocusBackground,listFocusOutline:a.activeContrastBorder,listInactiveFocusOutline:a.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,a.asCssVariable)(a.pickerGroupBorder),pickerGroupForeground:(0,a.asCssVariable)(a.pickerGroupForeground)}}}};e.QuickInputService=f,e.QuickInputService=f=ke([ge(0,E.IInstantiationService),ge(1,y.IContextKeyService),ge(2,i.IThemeService),ge(3,S.ILayoutService),ge(4,r.IConfigurationService),ge(5,u.IHoverService)],f)}),define(se[880],oe([1,0,6,16,23,19,8,15,349,33,879,108,27,244,486]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let t=class extends b.QuickInputService{constructor(d,s,l,o,g,h,m){super(s,l,o,new _.EditorScopedLayoutService(d.getContainerDomNode(),g),h,m),this.host=void 0;const C=u.get(d);if(C){const w=C.widget;this.host={_serviceBrand:void 0,get mainContainer(){return w.getDomNode()},getContainer(){return w.getDomNode()},get containers(){return[w.getDomNode()]},get activeContainer(){return w.getDomNode()},get mainContainerDimension(){return d.getLayoutInfo()},get activeContainerDimension(){return d.getLayoutInfo()},get onDidLayoutMainContainer(){return d.onDidLayoutChange},get onDidLayoutActiveContainer(){return d.onDidLayoutChange},get onDidLayoutContainer(){return L.Event.map(d.onDidLayoutChange,D=>({container:w.getDomNode(),dimension:D}))},get onDidChangeActiveContainer(){return L.Event.None},get onDidAddContainer(){return L.Event.None},get whenActiveContainerStylesLoaded(){return Promise.resolve()},get mainContainerOffset(){return{top:0,quickPickTop:0}},get activeContainerOffset(){return{top:0,quickPickTop:0}},focus:()=>d.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};t=ke([ge(1,S.IInstantiationService),ge(2,p.IContextKeyService),ge(3,y.IThemeService),ge(4,v.ICodeEditorService),ge(5,i.IConfigurationService),ge(6,n.IHoverService)],t);let r=class{get activeService(){const d=this.codeEditorService.getFocusedCodeEditor();if(!d)throw new Error("Quick input service needs a focused editor to work.");let s=this.mapEditorToService.get(d);if(!s){const l=s=this.instantiationService.createInstance(t,d);this.mapEditorToService.set(d,s),(0,a.createSingleCallFunction)(d.onDidDispose)(()=>{l.dispose(),this.mapEditorToService.delete(d)})}return s}get quickAccess(){return this.activeService.quickAccess}constructor(d,s){this.instantiationService=d,this.codeEditorService=s,this.mapEditorToService=new Map}pick(d,s={},l=E.CancellationToken.None){return this.activeService.pick(d,s,l)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};e.StandaloneQuickInputService=r,e.StandaloneQuickInputService=r=ke([ge(0,S.IInstantiationService),ge(1,v.ICodeEditorService)],r);class u{static get(d){return d.getContribution(u.ID)}constructor(d){this.editor=d,this.widget=new f(this.editor)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=u,u.ID="editor.controller.quickInput";class f{constructor(d){this.codeEditor=d,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return f.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=f,f.ID="editor.contrib.quickInputWidget",(0,k.registerEditorContribution)(u.ID,u,4)}),define(se[193],oe([1,0,8]),function(te,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,_){this.resource=p,this.elements=_}}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(se[38],oe([1,0,13,39,12,6,2,11,22,129,203,62,10,5,24,179,43,32,41,613,863,340,297,524,525,331,614,184,642,114,193]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T){"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 P(Y){const j=new C.PieceTreeTextBufferBuilder;return j.acceptChunk(Y),j.finish()}e.createTextBufferFactory=P;function N(Y){const j=new C.PieceTreeTextBufferBuilder;let Z;for(;typeof(Z=Y.read())=="string";)j.acceptChunk(Z);return j.finish()}e.createTextBufferFactoryFromSnapshot=N;function M(Y,j){let Z;return typeof Y=="string"?Z=P(Y):c.isITextSnapshot(Y)?Z=N(Y):Z=Y,Z.create(j)}e.createTextBuffer=M;let R=0;const x=999,O=1e4;class B{constructor(j){this._source=j,this._eos=!1}read(){if(this._eos)return null;const j=[];let Z=0,ee=0;do{const le=this._source.read();if(le===null)return this._eos=!0,Z===0?null:j.join("");if(le.length>0&&(j[Z++]=le,ee+=le.length),ee>=64*1024)return j.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};let V=A=class extends S.Disposable{static resolveOptions(j,Z){if(Z.detectIndentation){const ee=(0,g.guessIndentation)(j,Z.tabSize,Z.insertSpaces);return new c.TextModelResolvedOptions({tabSize:ee.tabSize,indentSize:"tabSize",insertSpaces:ee.insertSpaces,trimAutoWhitespace:Z.trimAutoWhitespace,defaultEOL:Z.defaultEOL,bracketPairColorizationOptions:Z.bracketPairColorizationOptions})}return new c.TextModelResolvedOptions(Z)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(j){return this._eventEmitter.slowEvent(Z=>j(Z.contentChangedEvent))}onDidChangeContentOrInjectedText(j){return(0,S.combinedDisposable)(this._eventEmitter.fastEvent(Z=>j(Z)),this._onDidChangeInjectedText.event(Z=>j(Z)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(j,Z,ee,le=null,ue,ce,pe){super(),this._undoRedoService=ue,this._languageService=ce,this._languageConfigurationService=pe,this._onWillDispose=this._register(new E.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new U(Ae=>this.handleBeforeFireDecorationsChangedEvent(Ae))),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 G),this._languageSelectionListener=this._register(new S.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new z,R++,this.id="$model"+R,this.isForSimpleWidget=ee.isForSimpleWidget,typeof le>"u"||le===null?this._associatedResource=_.URI.parse("inmemory://model/"+R):this._associatedResource=le,this._attachedEditorCount=0;const{textBuffer:ve,disposable:Ce}=M(j,ee.defaultEOL);this._buffer=ve,this._bufferDisposable=Ce,this._options=A.resolveOptions(this._buffer,ee);const Se=typeof Z=="string"?Z:Z.languageId;typeof Z!="string"&&(this._languageSelectionListener.value=Z.onDidChange(()=>this._setLanguage(Z.languageId))),this._bracketPairs=this._register(new d.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new o.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new s.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new D.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,Se,this._attachedViews);const _e=this._buffer.getLineCount(),Ee=this._buffer.getValueLengthInRange(new n.Range(1,1,_e,this._buffer.getLineLength(_e)+1),0);ee.largeFileOptimizations?(this._isTooLargeForTokenization=Ee>A.LARGE_FILE_SIZE_THRESHOLD||_e>A.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=Ee>A.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=Ee>A._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=p.singleLetterHash(R),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new ae,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(Se)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const j=new m.PieceTreeTextBuffer([],"",`
|
||
`,!1,!1,!0,!0);j.dispose(),this._buffer=j,this._bufferDisposable=S.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(j,Z){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(Z),this._bracketPairs.handleDidChangeContent(Z),this._eventEmitter.fire(new I.InternalModelContentChangeEvent(j,Z)))}setValue(j){if(this._assertNotDisposed(),j==null)throw(0,y.illegalArgument)();const{textBuffer:Z,disposable:ee}=M(j,this._options.defaultEOL);this._setValueFromTextBuffer(Z,ee)}_createContentChanged2(j,Z,ee,le,ue,ce,pe,ve){return{changes:[{range:j,rangeOffset:Z,rangeLength:ee,text:le}],eol:this._buffer.getEOL(),isEolChange:ve,versionId:this.getVersionId(),isUndoing:ue,isRedoing:ce,isFlush:pe}}_setValueFromTextBuffer(j,Z){this._assertNotDisposed();const ee=this.getFullModelRange(),le=this.getValueLengthInRange(ee),ue=this.getLineCount(),ce=this.getLineMaxColumn(ue);this._buffer=j,this._bufferDisposable.dispose(),this._bufferDisposable=Z,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new ae,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,ue,ce),0,le,this.getValue(),!1,!1,!0,!1))}setEOL(j){this._assertNotDisposed();const Z=j===1?`\r
|
||
`:`
|
||
`;if(this._buffer.getEOL()===Z)return;const ee=this.getFullModelRange(),le=this.getValueLengthInRange(ee),ue=this.getLineCount(),ce=this.getLineMaxColumn(ue);this._onBeforeEOLChange(),this._buffer.setEOL(Z),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new I.ModelRawContentChangedEvent([new I.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,ue,ce),0,le,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const j=this.getVersionId(),Z=this._decorationsTree.collectNodesPostOrder();for(let ee=0,le=Z.length;ee<le;ee++){const ue=Z[ee],ce=ue.range,pe=ue.cachedAbsoluteStart-ue.start,ve=this._buffer.getOffsetAt(ce.startLineNumber,ce.startColumn),Ce=this._buffer.getOffsetAt(ce.endLineNumber,ce.endColumn);ue.cachedAbsoluteStart=ve,ue.cachedAbsoluteEnd=Ce,ue.cachedVersionId=j,ue.start=ve-pe,ue.end=Ce-pe,(0,h.recomputeMaxEnd)(ue)}}onBeforeAttached(){return this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.attachView()}onBeforeDetached(j){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0)),this._attachedViews.detachView(j)}isAttachedToEditor(){return this._attachedEditorCount>0}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 j=0,Z=0;const ee=this._buffer.getLineCount();for(let le=1;le<=ee;le++){const ue=this._buffer.getLineLength(le);ue>=O?Z+=ue:j+=ue}return Z>j}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(j){this._assertNotDisposed();const Z=typeof j.tabSize<"u"?j.tabSize:this._options.tabSize,ee=typeof j.indentSize<"u"?j.indentSize:this._options.originalIndentSize,le=typeof j.insertSpaces<"u"?j.insertSpaces:this._options.insertSpaces,ue=typeof j.trimAutoWhitespace<"u"?j.trimAutoWhitespace:this._options.trimAutoWhitespace,ce=typeof j.bracketColorizationOptions<"u"?j.bracketColorizationOptions:this._options.bracketPairColorizationOptions,pe=new c.TextModelResolvedOptions({tabSize:Z,indentSize:ee,insertSpaces:le,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:ue,bracketPairColorizationOptions:ce});if(this._options.equals(pe))return;const ve=this._options.createChangeEvent(pe);this._options=pe,this._bracketPairs.handleDidChangeOptions(ve),this._decorationProvider.handleDidChangeOptions(ve),this._onDidChangeOptions.fire(ve)}detectIndentation(j,Z){this._assertNotDisposed();const ee=(0,g.guessIndentation)(this._buffer,Z,j);this.updateOptions({insertSpaces:ee.insertSpaces,tabSize:ee.tabSize,indentSize:ee.tabSize})}normalizeIndentation(j){return this._assertNotDisposed(),(0,b.normalizeIndentation)(j,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(j=null){const Z=this.findMatches(p.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(j,Z.map(ee=>({range:ee.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(j){this._assertNotDisposed();const Z=this._validatePosition(j.lineNumber,j.column,0);return this._buffer.getOffsetAt(Z.lineNumber,Z.column)}getPositionAt(j){this._assertNotDisposed();const Z=Math.min(this._buffer.getLength(),Math.max(0,j));return this._buffer.getPositionAt(Z)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(j){this._versionId=j}_overwriteAlternativeVersionId(j){this._alternativeVersionId=j}_overwriteInitialUndoRedoSnapshot(j){this._initialUndoRedoSnapshot=j}getValue(j,Z=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new y.BugIndicatingError("Operation would exceed heap memory limits");const ee=this.getFullModelRange(),le=this.getValueInRange(ee,j);return Z?this._buffer.getBOM()+le:le}createSnapshot(j=!1){return new B(this._buffer.createSnapshot(j))}getValueLength(j,Z=!1){this._assertNotDisposed();const ee=this.getFullModelRange(),le=this.getValueLengthInRange(ee,j);return Z?this._buffer.getBOM().length+le:le}getValueInRange(j,Z=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(j),Z)}getValueLengthInRange(j,Z=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(j),Z)}getCharacterCountInRange(j,Z=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(j),Z)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(j){if(this._assertNotDisposed(),j<1||j>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(j)}getLineLength(j){if(this._assertNotDisposed(),j<1||j>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(j)}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(j){return this._assertNotDisposed(),1}getLineMaxColumn(j){if(this._assertNotDisposed(),j<1||j>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(j)+1}getLineFirstNonWhitespaceColumn(j){if(this._assertNotDisposed(),j<1||j>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(j)}getLineLastNonWhitespaceColumn(j){if(this._assertNotDisposed(),j<1||j>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(j)}_validateRangeRelaxedNoAllocations(j){const Z=this._buffer.getLineCount(),ee=j.startLineNumber,le=j.startColumn;let ue=Math.floor(typeof ee=="number"&&!isNaN(ee)?ee:1),ce=Math.floor(typeof le=="number"&&!isNaN(le)?le:1);if(ue<1)ue=1,ce=1;else if(ue>Z)ue=Z,ce=this.getLineMaxColumn(ue);else if(ce<=1)ce=1;else{const _e=this.getLineMaxColumn(ue);ce>=_e&&(ce=_e)}const pe=j.endLineNumber,ve=j.endColumn;let Ce=Math.floor(typeof pe=="number"&&!isNaN(pe)?pe:1),Se=Math.floor(typeof ve=="number"&&!isNaN(ve)?ve:1);if(Ce<1)Ce=1,Se=1;else if(Ce>Z)Ce=Z,Se=this.getLineMaxColumn(Ce);else if(Se<=1)Se=1;else{const _e=this.getLineMaxColumn(Ce);Se>=_e&&(Se=_e)}return ee===ue&&le===ce&&pe===Ce&&ve===Se&&j instanceof n.Range&&!(j instanceof t.Selection)?j:new n.Range(ue,ce,Ce,Se)}_isValidPosition(j,Z,ee){if(typeof j!="number"||typeof Z!="number"||isNaN(j)||isNaN(Z)||j<1||Z<1||(j|0)!==j||(Z|0)!==Z)return!1;const le=this._buffer.getLineCount();if(j>le)return!1;if(Z===1)return!0;const ue=this.getLineMaxColumn(j);if(Z>ue)return!1;if(ee===1){const ce=this._buffer.getLineCharCode(j,Z-2);if(p.isHighSurrogate(ce))return!1}return!0}_validatePosition(j,Z,ee){const le=Math.floor(typeof j=="number"&&!isNaN(j)?j:1),ue=Math.floor(typeof Z=="number"&&!isNaN(Z)?Z:1),ce=this._buffer.getLineCount();if(le<1)return new i.Position(1,1);if(le>ce)return new i.Position(ce,this.getLineMaxColumn(ce));if(ue<=1)return new i.Position(le,1);const pe=this.getLineMaxColumn(le);if(ue>=pe)return new i.Position(le,pe);if(ee===1){const ve=this._buffer.getLineCharCode(le,ue-2);if(p.isHighSurrogate(ve))return new i.Position(le,ue-1)}return new i.Position(le,ue)}validatePosition(j){return this._assertNotDisposed(),j instanceof i.Position&&this._isValidPosition(j.lineNumber,j.column,1)?j:this._validatePosition(j.lineNumber,j.column,1)}_isValidRange(j,Z){const ee=j.startLineNumber,le=j.startColumn,ue=j.endLineNumber,ce=j.endColumn;if(!this._isValidPosition(ee,le,0)||!this._isValidPosition(ue,ce,0))return!1;if(Z===1){const pe=le>1?this._buffer.getLineCharCode(ee,le-2):0,ve=ce>1&&ce<=this._buffer.getLineLength(ue)?this._buffer.getLineCharCode(ue,ce-2):0,Ce=p.isHighSurrogate(pe),Se=p.isHighSurrogate(ve);return!Ce&&!Se}return!0}validateRange(j){if(this._assertNotDisposed(),j instanceof n.Range&&!(j instanceof t.Selection)&&this._isValidRange(j,1))return j;const ee=this._validatePosition(j.startLineNumber,j.startColumn,0),le=this._validatePosition(j.endLineNumber,j.endColumn,0),ue=ee.lineNumber,ce=ee.column,pe=le.lineNumber,ve=le.column;{const Ce=ce>1?this._buffer.getLineCharCode(ue,ce-2):0,Se=ve>1&&ve<=this._buffer.getLineLength(pe)?this._buffer.getLineCharCode(pe,ve-2):0,_e=p.isHighSurrogate(Ce),Ee=p.isHighSurrogate(Se);return!_e&&!Ee?new n.Range(ue,ce,pe,ve):ue===pe&&ce===ve?new n.Range(ue,ce-1,pe,ve-1):_e&&Ee?new n.Range(ue,ce-1,pe,ve+1):_e?new n.Range(ue,ce-1,pe,ve):new n.Range(ue,ce,pe,ve+1)}return new n.Range(ue,ce,pe,ve)}modifyPosition(j,Z){this._assertNotDisposed();const ee=this.getOffsetAt(j)+Z;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,ee)))}getFullModelRange(){this._assertNotDisposed();const j=this.getLineCount();return new n.Range(1,1,j,this.getLineMaxColumn(j))}findMatchesLineByLine(j,Z,ee,le){return this._buffer.findMatchesLineByLine(j,Z,ee,le)}findMatches(j,Z,ee,le,ue,ce,pe=x){this._assertNotDisposed();let ve=null;Z!==null&&(Array.isArray(Z)||(Z=[Z]),Z.every(_e=>n.Range.isIRange(_e))&&(ve=Z.map(_e=>this.validateRange(_e)))),ve===null&&(ve=[this.getFullModelRange()]),ve=ve.sort((_e,Ee)=>_e.startLineNumber-Ee.startLineNumber||_e.startColumn-Ee.startColumn);const Ce=[];Ce.push(ve.reduce((_e,Ee)=>n.Range.areIntersecting(_e,Ee)?_e.plusRange(Ee):(Ce.push(_e),Ee)));let Se;if(!ee&&j.indexOf(`
|
||
`)<0){const Ee=new w.SearchParams(j,ee,le,ue).parseSearchRequest();if(!Ee)return[];Se=Ae=>this.findMatchesLineByLine(Ae,Ee,ce,pe)}else Se=_e=>w.TextModelSearch.findMatches(this,new w.SearchParams(j,ee,le,ue),_e,ce,pe);return Ce.map(Se).reduce((_e,Ee)=>_e.concat(Ee),[])}findNextMatch(j,Z,ee,le,ue,ce){this._assertNotDisposed();const pe=this.validatePosition(Z);if(!ee&&j.indexOf(`
|
||
`)<0){const Ce=new w.SearchParams(j,ee,le,ue).parseSearchRequest();if(!Ce)return null;const Se=this.getLineCount();let _e=new n.Range(pe.lineNumber,pe.column,Se,this.getLineMaxColumn(Se)),Ee=this.findMatchesLineByLine(_e,Ce,ce,1);return w.TextModelSearch.findNextMatch(this,new w.SearchParams(j,ee,le,ue),pe,ce),Ee.length>0||(_e=new n.Range(1,1,pe.lineNumber,this.getLineMaxColumn(pe.lineNumber)),Ee=this.findMatchesLineByLine(_e,Ce,ce,1),Ee.length>0)?Ee[0]:null}return w.TextModelSearch.findNextMatch(this,new w.SearchParams(j,ee,le,ue),pe,ce)}findPreviousMatch(j,Z,ee,le,ue,ce){this._assertNotDisposed();const pe=this.validatePosition(Z);return w.TextModelSearch.findPreviousMatch(this,new w.SearchParams(j,ee,le,ue),pe,ce)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(j){if((this.getEOL()===`
|
||
`?0:1)!==j)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(j)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(j){return j instanceof c.ValidAnnotatedEditOperation?j:new c.ValidAnnotatedEditOperation(j.identifier||null,this.validateRange(j.range),j.text,j.forceMoveMarkers||!1,j.isAutoWhitespaceEdit||!1,j._isTracked||!1)}_validateEditOperations(j){const Z=[];for(let ee=0,le=j.length;ee<le;ee++)Z[ee]=this._validateEditOperation(j[ee]);return Z}pushEditOperations(j,Z,ee,le){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(j,this._validateEditOperations(Z),ee,le)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(j,Z,ee,le){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const ue=Z.map(pe=>({range:this.validateRange(pe.range),text:pe.text}));let ce=!0;if(j)for(let pe=0,ve=j.length;pe<ve;pe++){const Ce=j[pe];let Se=!1;for(let _e=0,Ee=ue.length;_e<Ee;_e++){const Ae=ue[_e].range,xe=Ae.startLineNumber>Ce.endLineNumber,Be=Ce.startLineNumber>Ae.endLineNumber;if(!xe&&!Be){Se=!0;break}}if(!Se){ce=!1;break}}if(ce)for(let pe=0,ve=this._trimAutoWhitespaceLines.length;pe<ve;pe++){const Ce=this._trimAutoWhitespaceLines[pe],Se=this.getLineMaxColumn(Ce);let _e=!0;for(let Ee=0,Ae=ue.length;Ee<Ae;Ee++){const xe=ue[Ee].range,Be=ue[Ee].text;if(!(Ce<xe.startLineNumber||Ce>xe.endLineNumber)&&!(Ce===xe.startLineNumber&&xe.startColumn===Se&&xe.isEmpty()&&Be&&Be.length>0&&Be.charAt(0)===`
|
||
`)&&!(Ce===xe.startLineNumber&&xe.startColumn===1&&xe.isEmpty()&&Be&&Be.length>0&&Be.charAt(Be.length-1)===`
|
||
`)){_e=!1;break}}if(_e){const Ee=new n.Range(Ce,1,Ce,Se);Z.push(new c.ValidAnnotatedEditOperation(null,Ee,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(j,Z,ee,le)}_applyUndo(j,Z,ee,le){const ue=j.map(ce=>{const pe=this.getPositionAt(ce.newPosition),ve=this.getPositionAt(ce.newEnd);return{range:new n.Range(pe.lineNumber,pe.column,ve.lineNumber,ve.column),text:ce.oldText}});this._applyUndoRedoEdits(ue,Z,!0,!1,ee,le)}_applyRedo(j,Z,ee,le){const ue=j.map(ce=>{const pe=this.getPositionAt(ce.oldPosition),ve=this.getPositionAt(ce.oldEnd);return{range:new n.Range(pe.lineNumber,pe.column,ve.lineNumber,ve.column),text:ce.newText}});this._applyUndoRedoEdits(ue,Z,!1,!0,ee,le)}_applyUndoRedoEdits(j,Z,ee,le,ue,ce){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=ee,this._isRedoing=le,this.applyEdits(j,!1),this.setEOL(Z),this._overwriteAlternativeVersionId(ue)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(ce),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(j,Z=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const ee=this._validateEditOperations(j);return this._doApplyEdits(ee,Z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(j,Z){const ee=this._buffer.getLineCount(),le=this._buffer.applyEdits(j,this._options.trimAutoWhitespace,Z),ue=this._buffer.getLineCount(),ce=le.changes;if(this._trimAutoWhitespaceLines=le.trimAutoWhitespaceLineNumbers,ce.length!==0){for(let Ce=0,Se=ce.length;Ce<Se;Ce++){const _e=ce[Ce];this._decorationsTree.acceptReplace(_e.rangeOffset,_e.rangeLength,_e.text.length,_e.forceMoveMarkers)}const pe=[];this._increaseVersionId();let ve=ee;for(let Ce=0,Se=ce.length;Ce<Se;Ce++){const _e=ce[Ce],[Ee]=(0,v.countEOL)(_e.text);this._onDidChangeDecorations.fire();const Ae=_e.range.startLineNumber,xe=_e.range.endLineNumber,Be=xe-Ae,De=Ee,Ie=Math.min(Be,De),fe=De-Be,be=ue-ve-fe+Ae,Ne=be,Pe=be+De,ze=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new i.Position(Ne,1)),this.getOffsetAt(new i.Position(Pe,this.getLineMaxColumn(Pe))),0),Ke=I.LineInjectedText.fromDecorations(ze),je=new L.ArrayQueue(Ke);for(let Je=Ie;Je>=0;Je--){const rt=Ae+Je,et=be+Je;je.takeFromEndWhile(Qe=>Qe.lineNumber>et);const st=je.takeFromEndWhile(Qe=>Qe.lineNumber===et);pe.push(new I.ModelRawLineChanged(rt,this.getLineContent(et),st))}if(Ie<Be){const Je=Ae+Ie;pe.push(new I.ModelRawLinesDeleted(Je+1,xe))}if(Ie<De){const Je=new L.ArrayQueue(Ke),rt=Ae+Ie,et=De-Ie,st=ue-ve-et+rt+1,Qe=[],ft=[];for(let at=0;at<et;at++){const ct=st+at;ft[at]=this.getLineContent(ct),Je.takeWhile(lt=>lt.lineNumber<ct),Qe[at]=Je.takeWhile(lt=>lt.lineNumber===ct)}pe.push(new I.ModelRawLinesInserted(rt+1,Ae+De,ft,Qe))}ve+=fe}this._emitContentChangedEvent(new I.ModelRawContentChangedEvent(pe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:ce,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return le.reverseEdits===null?void 0:le.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(j){if(j===null||j.size===0)return;const ee=Array.from(j).map(le=>new I.ModelRawLineChanged(le,this.getLineContent(le),this._getInjectedTextInLine(le)));this._onDidChangeInjectedText.fire(new I.ModelInjectedTextChangedEvent(ee))}changeDecorations(j,Z=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(Z,j)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(j,Z){const ee={addDecoration:(ue,ce)=>this._deltaDecorationsImpl(j,[],[{range:ue,options:ce}])[0],changeDecoration:(ue,ce)=>{this._changeDecorationImpl(ue,ce)},changeDecorationOptions:(ue,ce)=>{this._changeDecorationOptionsImpl(ue,X(ce))},removeDecoration:ue=>{this._deltaDecorationsImpl(j,[ue],[])},deltaDecorations:(ue,ce)=>ue.length===0&&ce.length===0?[]:this._deltaDecorationsImpl(j,ue,ce)};let le=null;try{le=Z(ee)}catch(ue){(0,y.onUnexpectedError)(ue)}return ee.addDecoration=W,ee.changeDecoration=W,ee.changeDecorationOptions=W,ee.removeDecoration=W,ee.deltaDecorations=W,le}deltaDecorations(j,Z,ee=0){if(this._assertNotDisposed(),j||(j=[]),j.length===0&&Z.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(ee,j,Z)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(j){return this.getDecorationRange(j)}_setTrackedRange(j,Z,ee){const le=j?this._decorations[j]:null;if(!le)return Z?this._deltaDecorationsImpl(0,[],[{range:Z,options:me[ee]}],!0)[0]:null;if(!Z)return this._decorationsTree.delete(le),delete this._decorations[le.id],null;const ue=this._validateRangeRelaxedNoAllocations(Z),ce=this._buffer.getOffsetAt(ue.startLineNumber,ue.startColumn),pe=this._buffer.getOffsetAt(ue.endLineNumber,ue.endColumn);return this._decorationsTree.delete(le),le.reset(this.getVersionId(),ce,pe,ue),le.setOptions(me[ee]),this._decorationsTree.insert(le),le.id}removeAllDecorationsWithOwnerId(j){if(this._isDisposed)return;const Z=this._decorationsTree.collectNodesFromOwner(j);for(let ee=0,le=Z.length;ee<le;ee++){const ue=Z[ee];this._decorationsTree.delete(ue),delete this._decorations[ue.id]}}getDecorationOptions(j){const Z=this._decorations[j];return Z?Z.options:null}getDecorationRange(j){const Z=this._decorations[j];return Z?this._decorationsTree.getNodeRange(this,Z):null}getLineDecorations(j,Z=0,ee=!1){return j<1||j>this.getLineCount()?[]:this.getLinesDecorations(j,j,Z,ee)}getLinesDecorations(j,Z,ee=0,le=!1,ue=!1){const ce=this.getLineCount(),pe=Math.min(ce,Math.max(1,j)),ve=Math.min(ce,Math.max(1,Z)),Ce=this.getLineMaxColumn(ve),Se=new n.Range(pe,1,ve,Ce),_e=this._getDecorationsInRange(Se,ee,le,ue);return(0,L.pushMany)(_e,this._decorationProvider.getDecorationsInRange(Se,ee,le)),_e}getDecorationsInRange(j,Z=0,ee=!1,le=!1,ue=!1){const ce=this.validateRange(j),pe=this._getDecorationsInRange(ce,Z,ee,ue);return(0,L.pushMany)(pe,this._decorationProvider.getDecorationsInRange(ce,Z,ee,le)),pe}getOverviewRulerDecorations(j=0,Z=!1){return this._decorationsTree.getAll(this,j,Z,!0,!1)}getInjectedTextDecorations(j=0){return this._decorationsTree.getAllInjectedText(this,j)}_getInjectedTextInLine(j){const Z=this._buffer.getOffsetAt(j,1),ee=Z+this._buffer.getLineLength(j),le=this._decorationsTree.getInjectedTextInInterval(this,Z,ee,0);return I.LineInjectedText.fromDecorations(le).filter(ue=>ue.lineNumber===j)}getAllDecorations(j=0,Z=!1){let ee=this._decorationsTree.getAll(this,j,Z,!1,!1);return ee=ee.concat(this._decorationProvider.getAllDecorations(j,Z)),ee}getAllMarginDecorations(j=0){return this._decorationsTree.getAll(this,j,!1,!1,!0)}_getDecorationsInRange(j,Z,ee,le){const ue=this._buffer.getOffsetAt(j.startLineNumber,j.startColumn),ce=this._buffer.getOffsetAt(j.endLineNumber,j.endColumn);return this._decorationsTree.getAllInInterval(this,ue,ce,Z,ee,le)}getRangeAt(j,Z){return this._buffer.getRangeAt(j,Z-j)}_changeDecorationImpl(j,Z){const ee=this._decorations[j];if(!ee)return;if(ee.options.after){const pe=this.getDecorationRange(j);this._onDidChangeDecorations.recordLineAffectedByInjectedText(pe.endLineNumber)}if(ee.options.before){const pe=this.getDecorationRange(j);this._onDidChangeDecorations.recordLineAffectedByInjectedText(pe.startLineNumber)}const le=this._validateRangeRelaxedNoAllocations(Z),ue=this._buffer.getOffsetAt(le.startLineNumber,le.startColumn),ce=this._buffer.getOffsetAt(le.endLineNumber,le.endColumn);this._decorationsTree.delete(ee),ee.reset(this.getVersionId(),ue,ce,le),this._decorationsTree.insert(ee),this._onDidChangeDecorations.checkAffectedAndFire(ee.options),ee.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(le.endLineNumber),ee.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(le.startLineNumber)}_changeDecorationOptionsImpl(j,Z){const ee=this._decorations[j];if(!ee)return;const le=!!(ee.options.overviewRuler&&ee.options.overviewRuler.color),ue=!!(Z.overviewRuler&&Z.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(ee.options),this._onDidChangeDecorations.checkAffectedAndFire(Z),ee.options.after||Z.after){const ve=this._decorationsTree.getNodeRange(this,ee);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.endLineNumber)}if(ee.options.before||Z.before){const ve=this._decorationsTree.getNodeRange(this,ee);this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.startLineNumber)}const ce=le!==ue,pe=q(Z)!==ie(ee);ce||pe?(this._decorationsTree.delete(ee),ee.setOptions(Z),this._decorationsTree.insert(ee)):ee.setOptions(Z)}_deltaDecorationsImpl(j,Z,ee,le=!1){const ue=this.getVersionId(),ce=Z.length;let pe=0;const ve=ee.length;let Ce=0;this._onDidChangeDecorations.beginDeferredEmit();try{const Se=new Array(ve);for(;pe<ce||Ce<ve;){let _e=null;if(pe<ce){do _e=this._decorations[Z[pe++]];while(!_e&&pe<ce);if(_e){if(_e.options.after){const Ee=this._decorationsTree.getNodeRange(this,_e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.endLineNumber)}if(_e.options.before){const Ee=this._decorationsTree.getNodeRange(this,_e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ee.startLineNumber)}this._decorationsTree.delete(_e),le||this._onDidChangeDecorations.checkAffectedAndFire(_e.options)}}if(Ce<ve){if(!_e){const Ie=++this._lastDecorationId,fe=`${this._instanceId};${Ie}`;_e=new h.IntervalNode(fe,0,0),this._decorations[fe]=_e}const Ee=ee[Ce],Ae=this._validateRangeRelaxedNoAllocations(Ee.range),xe=X(Ee.options),Be=this._buffer.getOffsetAt(Ae.startLineNumber,Ae.startColumn),De=this._buffer.getOffsetAt(Ae.endLineNumber,Ae.endColumn);_e.ownerId=j,_e.reset(ue,Be,De,Ae),_e.setOptions(xe),_e.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ae.endLineNumber),_e.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ae.startLineNumber),le||this._onDidChangeDecorations.checkAffectedAndFire(xe),this._decorationsTree.insert(_e),Se[Ce]=_e.id,Ce++}else _e&&delete this._decorations[_e.id]}return Se}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setLanguage(j,Z){typeof j=="string"?(this._languageSelectionListener.clear(),this._setLanguage(j,Z)):(this._languageSelectionListener.value=j.onDidChange(()=>this._setLanguage(j.languageId,Z)),this._setLanguage(j.languageId,Z))}_setLanguage(j,Z){this.tokenization.setLanguageId(j,Z),this._languageService.requestRichLanguageFeatures(j)}getLanguageIdAtPosition(j,Z){return this.tokenization.getLanguageIdAtPosition(j,Z)}getWordAtPosition(j){return this._tokenizationTextModelPart.getWordAtPosition(j)}getWordUntilPosition(j){return this._tokenizationTextModelPart.getWordUntilPosition(j)}normalizePosition(j,Z){return j}getLineIndentColumn(j){return K(this.getLineContent(j))+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:r.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:r.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:r.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:r.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:r.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:r.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},e.TextModel=V=A=ke([ge(4,T.IUndoRedoService),ge(5,u.ILanguageService),ge(6,f.ILanguageConfigurationService)],V);function K(Y){let j=0;for(const Z of Y)if(Z===" "||Z===" ")j++;else break;return j}function F(Y){return!!(Y.options.overviewRuler&&Y.options.overviewRuler.color)}function q(Y){return!!Y.after||!!Y.before}function ie(Y){return!!Y.options.after||!!Y.options.before}class ae{constructor(){this._decorationsTree0=new h.IntervalTree,this._decorationsTree1=new h.IntervalTree,this._injectedTextDecorationsTree=new h.IntervalTree}ensureAllNodesHaveRanges(j){this.getAll(j,0,!1,!1,!1)}_ensureNodesHaveRanges(j,Z){for(const ee of Z)ee.range===null&&(ee.range=j.getRangeAt(ee.cachedAbsoluteStart,ee.cachedAbsoluteEnd));return Z}getAllInInterval(j,Z,ee,le,ue,ce){const pe=j.getVersionId(),ve=this._intervalSearch(Z,ee,le,ue,pe,ce);return this._ensureNodesHaveRanges(j,ve)}_intervalSearch(j,Z,ee,le,ue,ce){const pe=this._decorationsTree0.intervalSearch(j,Z,ee,le,ue,ce),ve=this._decorationsTree1.intervalSearch(j,Z,ee,le,ue,ce),Ce=this._injectedTextDecorationsTree.intervalSearch(j,Z,ee,le,ue,ce);return pe.concat(ve).concat(Ce)}getInjectedTextInInterval(j,Z,ee,le){const ue=j.getVersionId(),ce=this._injectedTextDecorationsTree.intervalSearch(Z,ee,le,!1,ue,!1);return this._ensureNodesHaveRanges(j,ce).filter(pe=>pe.options.showIfCollapsed||!pe.range.isEmpty())}getAllInjectedText(j,Z){const ee=j.getVersionId(),le=this._injectedTextDecorationsTree.search(Z,!1,ee,!1);return this._ensureNodesHaveRanges(j,le).filter(ue=>ue.options.showIfCollapsed||!ue.range.isEmpty())}getAll(j,Z,ee,le,ue){const ce=j.getVersionId(),pe=this._search(Z,ee,le,ce,ue);return this._ensureNodesHaveRanges(j,pe)}_search(j,Z,ee,le,ue){if(ee)return this._decorationsTree1.search(j,Z,le,ue);{const ce=this._decorationsTree0.search(j,Z,le,ue),pe=this._decorationsTree1.search(j,Z,le,ue),ve=this._injectedTextDecorationsTree.search(j,Z,le,ue);return ce.concat(pe).concat(ve)}}collectNodesFromOwner(j){const Z=this._decorationsTree0.collectNodesFromOwner(j),ee=this._decorationsTree1.collectNodesFromOwner(j),le=this._injectedTextDecorationsTree.collectNodesFromOwner(j);return Z.concat(ee).concat(le)}collectNodesPostOrder(){const j=this._decorationsTree0.collectNodesPostOrder(),Z=this._decorationsTree1.collectNodesPostOrder(),ee=this._injectedTextDecorationsTree.collectNodesPostOrder();return j.concat(Z).concat(ee)}insert(j){ie(j)?this._injectedTextDecorationsTree.insert(j):F(j)?this._decorationsTree1.insert(j):this._decorationsTree0.insert(j)}delete(j){ie(j)?this._injectedTextDecorationsTree.delete(j):F(j)?this._decorationsTree1.delete(j):this._decorationsTree0.delete(j)}getNodeRange(j,Z){const ee=j.getVersionId();return Z.cachedVersionId!==ee&&this._resolveNode(Z,ee),Z.range===null&&(Z.range=j.getRangeAt(Z.cachedAbsoluteStart,Z.cachedAbsoluteEnd)),Z.range}_resolveNode(j,Z){ie(j)?this._injectedTextDecorationsTree.resolveNode(j,Z):F(j)?this._decorationsTree1.resolveNode(j,Z):this._decorationsTree0.resolveNode(j,Z)}acceptReplace(j,Z,ee,le){this._decorationsTree0.acceptReplace(j,Z,ee,le),this._decorationsTree1.acceptReplace(j,Z,ee,le),this._injectedTextDecorationsTree.acceptReplace(j,Z,ee,le)}}function ne(Y){return Y.replace(/[^a-z0-9\-_]/gi," ")}class ${constructor(j){this.color=j.color||"",this.darkColor=j.darkColor||""}}class J extends ${constructor(j){super(j),this._resolvedColor=null,this.position=typeof j.position=="number"?j.position:c.OverviewRulerLane.Center}getColor(j){return this._resolvedColor||(j.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,j):this._resolvedColor=this._resolveColor(this.color,j)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(j,Z){if(typeof j=="string")return j;const ee=j?Z.getColor(j.id):null;return ee?ee.toString():""}}e.ModelDecorationOverviewRulerOptions=J;class Q{constructor(j){var Z;this.position=(Z=j?.position)!==null&&Z!==void 0?Z:c.GlyphMarginLane.Center,this.persistLane=j?.persistLane}}e.ModelDecorationGlyphMarginOptions=Q;class re extends ${constructor(j){super(j),this.position=j.position}getColor(j){return this._resolvedColor||(j.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,j):this._resolvedColor=this._resolveColor(this.color,j)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(j,Z){return typeof j=="string"?k.Color.fromHex(j):Z.getColor(j.id)}}e.ModelDecorationMinimapOptions=re;class de{static from(j){return j instanceof de?j:new de(j)}constructor(j){this.content=j.content||"",this.inlineClassName=j.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=j.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=j.attachedData||null,this.cursorStops=j.cursorStops||null}}e.ModelDecorationInjectedTextOptions=de;class he{static register(j){return new he(j)}static createDynamic(j){return new he(j)}constructor(j){var Z,ee,le,ue,ce,pe;this.description=j.description,this.blockClassName=j.blockClassName?ne(j.blockClassName):null,this.blockDoesNotCollapse=(Z=j.blockDoesNotCollapse)!==null&&Z!==void 0?Z:null,this.blockIsAfterEnd=(ee=j.blockIsAfterEnd)!==null&&ee!==void 0?ee:null,this.blockPadding=(le=j.blockPadding)!==null&&le!==void 0?le:null,this.stickiness=j.stickiness||0,this.zIndex=j.zIndex||0,this.className=j.className?ne(j.className):null,this.shouldFillLineOnLineBreak=(ue=j.shouldFillLineOnLineBreak)!==null&&ue!==void 0?ue:null,this.hoverMessage=j.hoverMessage||null,this.glyphMarginHoverMessage=j.glyphMarginHoverMessage||null,this.lineNumberHoverMessage=j.lineNumberHoverMessage||null,this.isWholeLine=j.isWholeLine||!1,this.showIfCollapsed=j.showIfCollapsed||!1,this.collapseOnReplaceEdit=j.collapseOnReplaceEdit||!1,this.overviewRuler=j.overviewRuler?new J(j.overviewRuler):null,this.minimap=j.minimap?new re(j.minimap):null,this.glyphMargin=j.glyphMarginClassName?new Q(j.glyphMargin):null,this.glyphMarginClassName=j.glyphMarginClassName?ne(j.glyphMarginClassName):null,this.linesDecorationsClassName=j.linesDecorationsClassName?ne(j.linesDecorationsClassName):null,this.lineNumberClassName=j.lineNumberClassName?ne(j.lineNumberClassName):null,this.linesDecorationsTooltip=j.linesDecorationsTooltip?p.htmlAttributeEncodeValue(j.linesDecorationsTooltip):null,this.firstLineDecorationClassName=j.firstLineDecorationClassName?ne(j.firstLineDecorationClassName):null,this.marginClassName=j.marginClassName?ne(j.marginClassName):null,this.inlineClassName=j.inlineClassName?ne(j.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=j.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=j.beforeContentClassName?ne(j.beforeContentClassName):null,this.afterContentClassName=j.afterContentClassName?ne(j.afterContentClassName):null,this.after=j.after?de.from(j.after):null,this.before=j.before?de.from(j.before):null,this.hideInCommentTokens=(ce=j.hideInCommentTokens)!==null&&ce!==void 0?ce:!1,this.hideInStringTokens=(pe=j.hideInStringTokens)!==null&&pe!==void 0?pe:!1}}e.ModelDecorationOptions=he,he.EMPTY=he.register({description:"empty"});const me=[he.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),he.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),he.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),he.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function X(Y){return Y instanceof he?Y:he.createDynamic(Y)}class U extends S.Disposable{constructor(j){super(),this.handleBeforeFire=j,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,this._affectsLineNumber=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var j;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(j=this._affectedInjectedTextLines)===null||j===void 0||j.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(j){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(j)}checkAffectedAndFire(j){var Z,ee;this._affectsMinimap||(this._affectsMinimap=!!(!((Z=j.minimap)===null||Z===void 0)&&Z.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(!((ee=j.overviewRuler)===null||ee===void 0)&&ee.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!j.glyphMarginClassName),this._affectsLineNumber||(this._affectsLineNumber=!!j.lineNumberClassName),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 j={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin,affectsLineNumber:this._affectsLineNumber};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(j)}}class G extends S.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(j=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=j;const Z=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(Z),this._slowEmitter.fire(Z)}}fire(j){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(j):this._deferredEvent=j;return}this._fastEmitter.fire(j),this._slowEmitter.fire(j)}}class z{constructor(){this._onDidChangeVisibleRanges=new E.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const j=new H(Z=>{this._onDidChangeVisibleRanges.fire({view:j,state:Z})});return this._views.add(j),j}detachView(j){this._views.delete(j),this._onDidChangeVisibleRanges.fire({view:j,state:void 0})}}e.AttachedViews=z;class H{constructor(j){this.handleStateChange=j}setVisibleLines(j,Z){const ee=j.map(le=>new a.LineRange(le.startLineNumber,le.endLineNumber+1));this.handleStateChange({visibleLineRanges:ee,stabilized:Z})}}}),define(se[258],oe([1,0,26,28,38,631,29,82]),function(te,e,L,k,y,E,S,p){"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=e.diffEditorUnchangedRegionShadow=e.diffMoveBorderActive=e.diffMoveBorder=void 0,e.diffMoveBorder=(0,S.registerColor)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,E.localize)(0,null)),e.diffMoveBorderActive=(0,S.registerColor)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,E.localize)(1,null)),e.diffEditorUnchangedRegionShadow=(0,S.registerColor)("diffEditor.unchangedRegionShadow",{dark:"#000000",light:"#737373BF",hcDark:"#000000",hcLight:"#737373BF"},(0,E.localize)(2,null)),e.diffInsertIcon=(0,p.registerIcon)("diff-insert",L.Codicon.add,(0,E.localize)(3,null)),e.diffRemoveIcon=(0,p.registerIcon)("diff-remove",L.Codicon.remove,(0,E.localize)(4,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(se[881],oe([1,0,2,35,334,258,87]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorDecorations=void 0;class p extends L.Disposable{constructor(v,b,a,i){super(),this._editors=v,this._diffModel=b,this._options=a,this._decorations=(0,k.derived)(this,n=>{var t;const r=(t=this._diffModel.read(n))===null||t===void 0?void 0:t.diff.read(n);if(!r)return null;const u=this._diffModel.read(n).movedTextToCompare.read(n),f=this._options.renderIndicators.read(n),c=this._options.showEmptyDecorations.read(n),d=[],s=[];if(!u)for(const o of r.mappings)if(o.lineRangeMapping.original.isEmpty||d.push({range:o.lineRangeMapping.original.toInclusiveRange(),options:f?E.diffLineDeleteDecorationBackgroundWithIndicator:E.diffLineDeleteDecorationBackground}),o.lineRangeMapping.modified.isEmpty||s.push({range:o.lineRangeMapping.modified.toInclusiveRange(),options:f?E.diffLineAddDecorationBackgroundWithIndicator:E.diffLineAddDecorationBackground}),o.lineRangeMapping.modified.isEmpty||o.lineRangeMapping.original.isEmpty)o.lineRangeMapping.original.isEmpty||d.push({range:o.lineRangeMapping.original.toInclusiveRange(),options:E.diffWholeLineDeleteDecoration}),o.lineRangeMapping.modified.isEmpty||s.push({range:o.lineRangeMapping.modified.toInclusiveRange(),options:E.diffWholeLineAddDecoration});else for(const g of o.lineRangeMapping.innerChanges||[])o.lineRangeMapping.original.contains(g.originalRange.startLineNumber)&&d.push({range:g.originalRange,options:g.originalRange.isEmpty()&&c?E.diffDeleteDecorationEmpty:E.diffDeleteDecoration}),o.lineRangeMapping.modified.contains(g.modifiedRange.startLineNumber)&&s.push({range:g.modifiedRange,options:g.modifiedRange.isEmpty()&&c?E.diffAddDecorationEmpty:E.diffAddDecoration});if(u)for(const o of u.changes){const g=o.original.toInclusiveRange();g&&d.push({range:g,options:f?E.diffLineDeleteDecorationBackgroundWithIndicator:E.diffLineDeleteDecorationBackground});const h=o.modified.toInclusiveRange();h&&s.push({range:h,options:f?E.diffLineAddDecorationBackgroundWithIndicator:E.diffLineAddDecorationBackground});for(const m of o.innerChanges||[])d.push({range:m.originalRange,options:E.diffDeleteDecoration}),s.push({range:m.modifiedRange,options:E.diffAddDecoration})}const l=this._diffModel.read(n).activeMovedText.read(n);for(const o of r.movedTexts)d.push({range:o.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(o===l?" currentMove":""),blockPadding:[y.MovedBlocksLinesFeature.movedCodeBlockPadding,0,y.MovedBlocksLinesFeature.movedCodeBlockPadding,y.MovedBlocksLinesFeature.movedCodeBlockPadding]}}),s.push({range:o.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(o===l?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:d,modifiedDecorations:s}}),this._register((0,S.applyObservableDecorations)(this._editors.original,this._decorations.map(n=>n?.originalDecorations||[]))),this._register((0,S.applyObservableDecorations)(this._editors.modified,this._decorations.map(n=>n?.modifiedDecorations||[])))}}e.DiffEditorDecorations=p}),define(se[882],oe([1,0,7,13,14,26,2,35,28,20,72,258,359,625,648,87,62,10,86,103,59]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorViewZones=void 0;let l=class extends S.Disposable{constructor(m,C,w,D,I,T,A,P,N,M){super(),this._targetWindow=m,this._editors=C,this._diffModel=w,this._options=D,this._diffEditorWidget=I,this._canIgnoreViewZoneUpdateEvent=T,this._origViewZonesToIgnore=A,this._modViewZonesToIgnore=P,this._clipboardService=N,this._contextMenuService=M,this._originalTopPadding=(0,p.observableValue)(this,0),this._originalScrollOffset=(0,p.observableValue)(this,0),this._originalScrollOffsetAnimated=(0,r.animatedObservable)(this._targetWindow,this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,p.observableValue)(this,0),this._modifiedScrollOffset=(0,p.observableValue)(this,0),this._modifiedScrollOffsetAnimated=(0,r.animatedObservable)(this._targetWindow,this._modifiedScrollOffset,this._store);const R=(0,p.observableValue)("invalidateAlignmentsState",0),x=this._register(new y.RunOnceScheduler(()=>{R.set(R.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(q=>{this._canIgnoreViewZoneUpdateEvent()||x.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(q=>{this._canIgnoreViewZoneUpdateEvent()||x.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(q=>{(q.hasChanged(144)||q.hasChanged(66))&&x.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(q=>{(q.hasChanged(144)||q.hasChanged(66))&&x.schedule()}));const O=this._diffModel.map(q=>q?(0,p.observableFromEvent)(q.model.original.onDidChangeTokens,()=>q.model.original.tokenization.backgroundTokenizationState===2):void 0).map((q,ie)=>q?.read(ie)),B=(0,p.derived)(q=>{const ie=this._diffModel.read(q),ae=ie?.diff.read(q);if(!ie||!ae)return null;R.read(q);const $=this._options.renderSideBySide.read(q);return o(this._editors.original,this._editors.modified,ae.mappings,this._origViewZonesToIgnore,this._modViewZonesToIgnore,$)}),W=(0,p.derived)(q=>{var ie;const ae=(ie=this._diffModel.read(q))===null||ie===void 0?void 0:ie.movedTextToCompare.read(q);if(!ae)return null;R.read(q);const ne=ae.changes.map($=>new i.DiffMapping($));return o(this._editors.original,this._editors.modified,ne,this._origViewZonesToIgnore,this._modViewZonesToIgnore,!0)});function V(){const q=document.createElement("div");return q.className="diagonal-fill",q}const K=this._register(new S.DisposableStore);this.viewZones=(0,p.derivedWithStore)(this,(q,ie)=>{var ae,ne,$,J,Q,re,de,he;K.clear();const me=B.read(q)||[],X=[],U=[],G=this._modifiedTopPadding.read(q);G>0&&U.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:G,showInHiddenAreas:!0,suppressMouseDown:!0});const z=this._originalTopPadding.read(q);z>0&&X.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:z,showInHiddenAreas:!0,suppressMouseDown:!0});const H=this._options.renderSideBySide.read(q),Y=H||(ae=this._editors.modified._getViewModel())===null||ae===void 0?void 0:ae.createLineBreaksComputer();if(Y){const ve=this._editors.original.getModel();for(const Ce of me)if(Ce.diff)for(let Se=Ce.originalRange.startLineNumber;Se<Ce.originalRange.endLineNumberExclusive;Se++){if(Se>ve.getLineCount())return{orig:X,mod:U};Y?.addRequest(ve.getLineContent(Se),null,null)}}const j=(ne=Y?.finalize())!==null&&ne!==void 0?ne:[];let Z=0;const ee=this._editors.modified.getOption(66),le=($=this._diffModel.read(q))===null||$===void 0?void 0:$.movedTextToCompare.read(q),ue=(Q=(J=this._editors.original.getModel())===null||J===void 0?void 0:J.mightContainNonBasicASCII())!==null&&Q!==void 0?Q:!1,ce=(de=(re=this._editors.original.getModel())===null||re===void 0?void 0:re.mightContainRTL())!==null&&de!==void 0?de:!1,pe=t.RenderOptions.fromEditor(this._editors.modified);for(const ve of me)if(ve.diff&&!H){if(!ve.originalRange.isEmpty){O.read(q);const Se=document.createElement("div");Se.classList.add("view-lines","line-delete","monaco-mouse-cursor-text");const _e=this._editors.original.getModel();if(ve.originalRange.endLineNumberExclusive-1>_e.getLineCount())return{orig:X,mod:U};const Ee=new t.LineSource(ve.originalRange.mapToLineArray(Ie=>_e.tokenization.getLineTokens(Ie)),ve.originalRange.mapToLineArray(Ie=>j[Z++]),ue,ce),Ae=[];for(const Ie of ve.diff.innerChanges||[])Ae.push(new c.InlineDecoration(Ie.originalRange.delta(-(ve.diff.original.startLineNumber-1)),a.diffDeleteDecoration.className,0));const xe=(0,t.renderLines)(Ee,pe,Ae,Se),Be=document.createElement("div");if(Be.className="inline-deleted-margin-view-zone",(0,b.applyFontInfo)(Be,pe.fontInfo),this._options.renderIndicators.read(q))for(let Ie=0;Ie<xe.heightInLines;Ie++){const fe=document.createElement("div");fe.className=`delete-sign ${_.ThemeIcon.asClassName(a.diffRemoveIcon)}`,fe.setAttribute("style",`position:absolute;top:${Ie*ee}px;width:${pe.lineDecorationsWidth}px;height:${ee}px;right:0;`),Be.appendChild(fe)}let De;K.add(new n.InlineDiffDeletedCodeMargin(()=>(0,v.assertIsDefined)(De),Be,this._editors.modified,ve.diff,this._diffEditorWidget,xe.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let Ie=0;Ie<xe.viewLineCounts.length;Ie++){const fe=xe.viewLineCounts[Ie];fe>1&&X.push({afterLineNumber:ve.originalRange.startLineNumber+Ie,domNode:V(),heightInPx:(fe-1)*ee,showInHiddenAreas:!0,suppressMouseDown:!0})}U.push({afterLineNumber:ve.modifiedRange.startLineNumber-1,domNode:Se,heightInPx:xe.heightInLines*ee,minWidthInPx:xe.minWidthInPx,marginDomNode:Be,setZoneId(Ie){De=Ie},showInHiddenAreas:!0,suppressMouseDown:!0})}const Ce=document.createElement("div");Ce.className="gutter-delete",X.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(le?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(ve.originalRange.endLineNumberExclusive-1))continue;X.push({afterLineNumber:ve.originalRange.endLineNumberExclusive-1,domNode:V(),heightInPx:Ce,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Se=function(){const Ee=document.createElement("div");return Ee.className="arrow-revert-change "+_.ThemeIcon.asClassName(E.Codicon.arrowRight),ie.add((0,L.addDisposableListener)(Ee,"mousedown",Ae=>Ae.stopPropagation())),ie.add((0,L.addDisposableListener)(Ee,"click",Ae=>{Ae.stopPropagation(),I.revert(ve.diff)})),(0,L.$)("div",{},Ee)};if(le?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(ve.modifiedRange.endLineNumberExclusive-1))continue;let _e;ve.diff&&ve.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(q)&&(_e=Se()),U.push({afterLineNumber:ve.modifiedRange.endLineNumberExclusive-1,domNode:V(),heightInPx:-Ce,marginDomNode:_e,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const ve of(he=W.read(q))!==null&&he!==void 0?he:[]){if(!le?.lineRangeMapping.original.intersect(ve.originalRange)||!le?.lineRangeMapping.modified.intersect(ve.modifiedRange))continue;const Ce=ve.modifiedHeightInPx-ve.originalHeightInPx;Ce>0?X.push({afterLineNumber:ve.originalRange.endLineNumberExclusive-1,domNode:V(),heightInPx:Ce,showInHiddenAreas:!0,suppressMouseDown:!0}):U.push({afterLineNumber:ve.modifiedRange.endLineNumberExclusive-1,domNode:V(),heightInPx:-Ce,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:X,mod:U}});let F=!1;this._register(this._editors.original.onDidScrollChange(q=>{q.scrollLeftChanged&&!F&&(F=!0,this._editors.modified.setScrollLeft(q.scrollLeft),F=!1)})),this._register(this._editors.modified.onDidScrollChange(q=>{q.scrollLeftChanged&&!F&&(F=!0,this._editors.original.setScrollLeft(q.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)(q=>{const ie=this._originalScrollTop.read(q)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(q))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(q));ie!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(ie,1)})),this._register((0,p.autorun)(q=>{const ie=this._modifiedScrollTop.read(q)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(q))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(q));ie!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(ie,1)})),this._register((0,p.autorun)(q=>{var ie;const ae=(ie=this._diffModel.read(q))===null||ie===void 0?void 0:ie.movedTextToCompare.read(q);let ne=0;if(ae){const $=this._editors.original.getTopForLineNumber(ae.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();ne=this._editors.modified.getTopForLineNumber(ae.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-$}ne>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(ne,void 0)):ne<0?(this._modifiedTopPadding.set(-ne,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()-ne,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+ne,void 0,!0)}))}};e.DiffEditorViewZones=l,e.DiffEditorViewZones=l=ke([ge(8,d.IClipboardService),ge(9,s.IContextMenuService)],l);function o(h,m,C,w,D,I){const T=new k.ArrayQueue(g(h,w)),A=new k.ArrayQueue(g(m,D)),P=h.getOption(66),N=m.getOption(66),M=[];let R=0,x=0;function O(B,W){for(;;){let V=T.peek(),K=A.peek();if(V&&V.lineNumber>=B&&(V=void 0),K&&K.lineNumber>=W&&(K=void 0),!V&&!K)break;const F=V?V.lineNumber-R:Number.MAX_VALUE,q=K?K.lineNumber-x:Number.MAX_VALUE;F<q?(T.dequeue(),K={lineNumber:V.lineNumber-R+x,heightInPx:0}):F>q?(A.dequeue(),V={lineNumber:K.lineNumber-x+R,heightInPx:0}):(T.dequeue(),A.dequeue()),M.push({originalRange:u.LineRange.ofLength(V.lineNumber,1),modifiedRange:u.LineRange.ofLength(K.lineNumber,1),originalHeightInPx:P+V.heightInPx,modifiedHeightInPx:N+K.heightInPx,diff:void 0})}}for(const B of C){let q=function(ie,ae){var ne,$,J,Q;if(ie<F||ae<K)return;if(V)V=!1;else if(ie===F||ae===K)return;const re=new u.LineRange(F,ie),de=new u.LineRange(K,ae);if(re.isEmpty&&de.isEmpty)return;const he=($=(ne=T.takeWhile(X=>X.lineNumber<ie))===null||ne===void 0?void 0:ne.reduce((X,U)=>X+U.heightInPx,0))!==null&&$!==void 0?$:0,me=(Q=(J=A.takeWhile(X=>X.lineNumber<ae))===null||J===void 0?void 0:J.reduce((X,U)=>X+U.heightInPx,0))!==null&&Q!==void 0?Q:0;M.push({originalRange:re,modifiedRange:de,originalHeightInPx:re.length*P+he,modifiedHeightInPx:de.length*N+me,diff:B.lineRangeMapping}),F=ie,K=ae};const W=B.lineRangeMapping;O(W.original.startLineNumber,W.modified.startLineNumber);let V=!0,K=W.modified.startLineNumber,F=W.original.startLineNumber;if(I)for(const ie of W.innerChanges||[]){ie.originalRange.startColumn>1&&ie.modifiedRange.startColumn>1&&q(ie.originalRange.startLineNumber,ie.modifiedRange.startLineNumber);const ae=h.getModel(),ne=ie.originalRange.endLineNumber<=ae.getLineCount()?ae.getLineMaxColumn(ie.originalRange.endLineNumber):Number.MAX_SAFE_INTEGER;ie.originalRange.endColumn<ne&&q(ie.originalRange.endLineNumber,ie.modifiedRange.endLineNumber)}q(W.original.endLineNumberExclusive,W.modified.endLineNumberExclusive),R=W.original.endLineNumberExclusive,x=W.modified.endLineNumberExclusive}return O(Number.MAX_VALUE,Number.MAX_VALUE),M}function g(h,m){const C=[],w=[],D=h.getOption(144).wrappingColumn!==-1,I=h._getViewModel().coordinatesConverter,T=h.getOption(66);if(D)for(let P=1;P<=h.getModel().getLineCount();P++){const N=I.getModelLineViewLineCount(P);N>1&&w.push({lineNumber:P,heightInPx:T*(N-1)})}for(const P of h.getWhitespaces()){if(m.has(P.id))continue;const N=P.afterLineNumber===0?0:I.convertViewPositionToModelPosition(new f.Position(P.afterLineNumber,1)).lineNumber;C.push({lineNumber:N,heightInPx:P.height})}return(0,r.joinCombine)(C,w,P=>P.lineNumber,(P,N)=>({lineNumber:P.lineNumber,heightInPx:P.heightInPx+N.heightInPx}))}}),define(se[883],oe([1,0,6,2,17,38,179,80,43,189,27,193,111,340,47,55,32]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 s=y.isLinux||y.isMacintosh?1:2;class l{constructor(m,C,w,D,I,T,A,P){this.uri=m,this.initialUndoRedoSnapshot=C,this.time=w,this.sharesUndoRedoStack=D,this.heapSize=I,this.sha1=T,this.versionId=A,this.alternativeVersionId=P}}let o=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(T=>this._updateModelOptions(T))),this._updateModelOptions(void 0)}static _readModelOptions(m,C){var w;let D=S.EDITOR_MODEL_DEFAULTS.tabSize;if(m.editor&&typeof m.editor.tabSize<"u"){const O=parseInt(m.editor.tabSize,10);isNaN(O)||(D=O),D<1&&(D=1)}let I="tabSize";if(m.editor&&typeof m.editor.indentSize<"u"&&m.editor.indentSize!=="tabSize"){const O=parseInt(m.editor.indentSize,10);isNaN(O)||(I=Math.max(O,1))}let T=S.EDITOR_MODEL_DEFAULTS.insertSpaces;m.editor&&typeof m.editor.insertSpaces<"u"&&(T=m.editor.insertSpaces==="false"?!1:!!m.editor.insertSpaces);let A=s;const P=m.eol;P===`\r
|
||
`?A=2:P===`
|
||
`&&(A=1);let N=S.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;m.editor&&typeof m.editor.trimAutoWhitespace<"u"&&(N=m.editor.trimAutoWhitespace==="false"?!1:!!m.editor.trimAutoWhitespace);let M=S.EDITOR_MODEL_DEFAULTS.detectIndentation;m.editor&&typeof m.editor.detectIndentation<"u"&&(M=m.editor.detectIndentation==="false"?!1:!!m.editor.detectIndentation);let R=S.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;m.editor&&typeof m.editor.largeFileOptimizations<"u"&&(R=m.editor.largeFileOptimizations==="false"?!1:!!m.editor.largeFileOptimizations);let x=S.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:T,detectIndentation:M,defaultEOL:A,trimAutoWhitespace:N,largeFileOptimizations:R,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 T=this._configurationService.getValue("editor",{overrideIdentifier:D,resource:C}),A=this._getEOL(C,D);I=f._readModelOptions({editor:T,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;D<I;D++){const T=w[D],A=this._models[T],P=A.model.getLanguageId(),N=A.model.uri;if(m&&!m.affectsConfiguration("editor",{overrideIdentifier:P,resource:N})&&!m.affectsConfiguration("files.eol",{overrideIdentifier:P,resource:N}))continue;const M=C[P+N],R=this.getCreationOptions(P,N,A.model.isForSimpleWidget);f._setModelOptionsForModel(A.model,R,M)}}static _setModelOptionsForModel(m,C,w){w&&w.defaultEOL!==C.defaultEOL&&m.getLineCount()===1&&m.setEOL(C.defaultEOL===1?0:1),!(w&&w.detectIndentation===C.detectIndentation&&w.insertSpaces===C.insertSpaces&&w.tabSize===C.tabSize&&w.indentSize===C.indentSize&&w.trimAutoWhitespace===C.trimAutoWhitespace&&(0,r.equals)(w.bracketPairColorizationOptions,C.bracketPairColorizationOptions))&&(C.detectIndentation?(m.detectIndentation(C.insertSpaces,C.tabSize),m.updateOptions({trimAutoWhitespace:C.trimAutoWhitespace,bracketColorizationOptions:C.bracketPairColorizationOptions})):m.updateOptions({insertSpaces:C.insertSpaces,tabSize:C.tabSize,indentSize:C.indentSize,trimAutoWhitespace:C.trimAutoWhitespace,bracketColorizationOptions:C.bracketPairColorizationOptions}))}_insertDisposedModel(m){this._disposedModels.set(c(m.uri),m),this._disposedModelsHeapSize+=m.heapSize}_removeDisposedModel(m){const C=this._disposedModels.get(c(m));return C&&(this._disposedModelsHeapSize-=C.heapSize),this._disposedModels.delete(c(m)),C}_ensureDisposedModelsHeapSize(m){if(this._disposedModelsHeapSize>m){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),T=new E.TextModel(m,C,I,w,this._undoRedoService,this._languageService,this._languageConfigurationService);if(w&&this._disposedModels.has(c(w))){const N=this._removeDisposedModel(w),M=this._undoRedoService.getElements(w),R=this._getSHA1Computer(),x=R.canComputeSHA1(T)?R.computeSHA1(T)===N.sha1:!1;if(x||N.sharesUndoRedoStack){for(const O of M.past)(0,n.isEditStackElement)(O)&&O.matchesResource(w)&&O.setModel(T);for(const O of M.future)(0,n.isEditStackElement)(O)&&O.matchesResource(w)&&O.setModel(T);this._undoRedoService.setElementsValidFlag(w,!0,O=>(0,n.isEditStackElement)(O)&&O.matchesResource(w)),x&&(T._overwriteVersionId(N.versionId),T._overwriteAlternativeVersionId(N.alternativeVersionId),T._overwriteInitialUndoRedoSnapshot(N.initialUndoRedoSnapshot))}else N.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(N.initialUndoRedoSnapshot)}const A=c(T.uri);if(this._models[A])throw new Error("ModelService: Cannot add model because it already exists!");const P=new d(T,N=>this._onWillDispose(N),(N,M)=>this._onDidChangeLanguage(N,M));return this._models[A]=P,P}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;w<D;w++){const I=C[w];m.push(this._models[I].model)}return m}getModel(m){const C=c(m),w=this._models[C];return w?w.model:null}_schemaShouldMaintainUndoRedoElements(m){return m.scheme===t.Schemas.file||m.scheme===t.Schemas.vscodeRemote||m.scheme===t.Schemas.vscodeUserData||m.scheme===t.Schemas.vscodeNotebookCell||m.scheme==="fake-fs"}_onWillDispose(m){const C=c(m.uri),w=this._models[C],D=this._undoRedoService.getUriComparisonKey(m.uri)!==m.uri.toString();let I=!1,T=0;if(D||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(m.uri)){const N=this._undoRedoService.getElements(m.uri);if(N.past.length>0||N.future.length>0){for(const M of N.past)(0,n.isEditStackElement)(M)&&M.matchesResource(m.uri)&&(I=!0,T+=M.heapSize(m.uri),M.setModel(m.uri));for(const M of N.future)(0,n.isEditStackElement)(M)&&M.matchesResource(m.uri)&&(I=!0,T+=M.heapSize(m.uri),M.setModel(m.uri))}}const A=f.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,P=this._getSHA1Computer();if(I)if(!D&&(T>A||!P.canComputeSHA1(m))){const N=w.model.getInitialUndoRedoSnapshot();N!==null&&this._undoRedoService.restoreSnapshot(N)}else this._ensureDisposedModelsHeapSize(A-T),this._undoRedoService.setElementsValidFlag(m.uri,!1,N=>(0,n.isEditStackElement)(N)&&N.matchesResource(m.uri)),this._insertDisposedModel(new l(m.uri,w.model.getInitialUndoRedoSnapshot(),Date.now(),D,T,P.computeSHA1(m),m.getVersionId(),m.getAlternativeVersionId()));else if(!D){const N=w.model.getInitialUndoRedoSnapshot();N!==null&&this._undoRedoService.restoreSnapshot(N)}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),T=this.getCreationOptions(D,m.uri,m.isForSimpleWidget);f._setModelOptionsForModel(m,T,I),this._onModelModeChanged.fire({model:m,oldLanguageId:w})}_getSHA1Computer(){return new g}};e.ModelService=o,o.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,e.ModelService=o=f=ke([ge(0,b.IConfigurationService),ge(1,v.ITextResourcePropertiesService),ge(2,a.IUndoRedoService),ge(3,_.ILanguageService),ge(4,u.ILanguageConfigurationService)],o);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(se[884],oe([1,0,13,10,5,212,38,114,214,547,291,86]),function(te,e,L,k,y,E,S,p,_,v,b,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class i{constructor(s,l,o,g,h,m,C,w,D,I){this._editorId=s,this.model=l,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=o,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(s,l){this.modelLineProjections=[],s&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const o=this.model.getLinesContent(),g=this.model.getInjectedTextDecorations(this._editorId),h=o.length,m=this.createLineBreaksComputer(),C=new L.ArrayQueue(p.LineInjectedText.fromDecorations(g));for(let M=0;M<h;M++){const R=C.takeWhile(x=>x.lineNumber===M+1);m.addRequest(o[M],R,l?l[M]:null)}const w=m.finalize(),D=[],I=this.hiddenAreasDecorationIds.map(M=>this.model.getDecorationRange(M)).sort(y.Range.compareRangesUsingStarts);let T=1,A=0,P=-1,N=P+1<I.length?A+1:h+2;for(let M=0;M<h;M++){const R=M+1;R===N&&(P++,T=I[P].startLineNumber,A=I[P].endLineNumber,N=P+1<I.length?A+1:h+2);const x=R>=T&&R<=A,O=(0,v.createModelLineProjection)(w[M],!x);D[M]=O.getViewLineCount(),this.modelLineProjections[M]=O}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new b.ConstantTimePrefixSumComputer(D)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(s=>this.model.getDecorationRange(s))}setHiddenAreas(s){const l=s.map(A=>this.model.validateRange(A)),o=n(l),g=this.hiddenAreasDecorationIds.map(A=>this.model.getDecorationRange(A)).sort(y.Range.compareRangesUsingStarts);if(o.length===g.length){let A=!1;for(let P=0;P<o.length;P++)if(!o[P].equalsRange(g[P])){A=!0;break}if(!A)return!1}const h=o.map(A=>({range:A,options:S.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,h);const m=o;let C=1,w=0,D=-1,I=D+1<m.length?w+1:this.modelLineProjections.length+2,T=!1;for(let A=0;A<this.modelLineProjections.length;A++){const P=A+1;P===I&&(D++,C=m[D].startLineNumber,w=m[D].endLineNumber,I=D+1<m.length?w+1:this.modelLineProjections.length+2);let N=!1;if(P>=C&&P<=w?this.modelLineProjections[A].isVisible()&&(this.modelLineProjections[A]=this.modelLineProjections[A].setVisible(!1),N=!0):(T=!0,this.modelLineProjections[A].isVisible()||(this.modelLineProjections[A]=this.modelLineProjections[A].setVisible(!0),N=!0)),N){const M=this.modelLineProjections[A].getViewLineCount();this.projectedModelLineLineCounts.setValue(A,M)}}return T||this.setHiddenAreas([]),!0}modelPositionIsVisible(s,l){return s<1||s>this.modelLineProjections.length?!1:this.modelLineProjections[s-1].isVisible()}getModelLineViewLineCount(s){return s<1||s>this.modelLineProjections.length?1:this.modelLineProjections[s-1].getViewLineCount()}setTabSize(s){return this.tabSize===s?!1:(this.tabSize=s,this._constructLines(!1,null),!0)}setWrappingSettings(s,l,o,g,h){const m=this.fontInfo.equals(s),C=this.wrappingStrategy===l,w=this.wrappingColumn===o,D=this.wrappingIndent===g,I=this.wordBreak===h;if(m&&C&&w&&D&&I)return!1;const T=m&&C&&!w&&D&&I;this.fontInfo=s,this.wrappingStrategy=l,this.wrappingColumn=o,this.wrappingIndent=g,this.wordBreak=h;let A=null;if(T){A=[];for(let P=0,N=this.modelLineProjections.length;P<N;P++)A[P]=this.modelLineProjections[P].getProjectionData()}return this._constructLines(!1,A),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent,this.wordBreak)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(s,l,o){if(!s||s<=this._validModelVersionId)return null;const g=l===1?1:this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,h=this.projectedModelLineLineCounts.getPrefixSum(o);return this.modelLineProjections.splice(l-1,o-l+1),this.projectedModelLineLineCounts.removeValues(l-1,o-l+1),new _.ViewLinesDeletedEvent(g,h)}onModelLinesInserted(s,l,o,g){if(!s||s<=this._validModelVersionId)return null;const h=l>2&&!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,T=g.length;I<T;I++){const A=(0,v.createModelLineProjection)(g[I],!h);w.push(A);const P=A.getViewLineCount();C+=P,D[I]=P}return this.modelLineProjections=this.modelLineProjections.slice(0,l-1).concat(w).concat(this.modelLineProjections.slice(l-1)),this.projectedModelLineLineCounts.insertValues(l-1,D),new _.ViewLinesInsertedEvent(m,m+C-1)}onModelLineChanged(s,l,o){if(s!==null&&s<=this._validModelVersionId)return[!1,null,null,null];const g=l-1,h=this.modelLineProjections[g].getViewLineCount(),m=this.modelLineProjections[g].isVisible(),C=(0,v.createModelLineProjection)(o,m);this.modelLineProjections[g]=C;const w=this.modelLineProjections[g].getViewLineCount();let D=!1,I=0,T=-1,A=0,P=-1,N=0,M=-1;h>w?(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+w-1,N=T+1,M=N+(h-w)-1,D=!0):h<w?(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+h-1,A=T+1,P=A+(w-h)-1,D=!0):(I=this.projectedModelLineLineCounts.getPrefixSum(l-1)+1,T=I+w-1),this.projectedModelLineLineCounts.setValue(g,w);const R=I<=T?new _.ViewLinesChangedEvent(I,T-I+1):null,x=A<=P?new _.ViewLinesInsertedEvent(A,P):null,O=N<=M?new _.ViewLinesDeletedEvent(N,M):null;return[D,R,x,O]}acceptVersionId(s){this._validModelVersionId=s,this.modelLineProjections.length===1&&!this.modelLineProjections[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.projectedModelLineLineCounts.getTotalSum()}_toValidViewLineNumber(s){if(s<1)return 1;const l=this.getViewLineCount();return s>l?l:s|0}getActiveIndentGuide(s,l,o){s=this._toValidViewLineNumber(s),l=this._toValidViewLineNumber(l),o=this._toValidViewLineNumber(o);const g=this.convertViewPositionToModelPosition(s,this.getViewLineMinColumn(s)),h=this.convertViewPositionToModelPosition(l,this.getViewLineMinColumn(l)),m=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),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(s){s=this._toValidViewLineNumber(s);const l=this.projectedModelLineLineCounts.getIndexOf(s-1),o=l.index,g=l.remainder;return new t(o+1,g)}getMinColumnOfViewLine(s){return this.modelLineProjections[s.modelLineNumber-1].getViewLineMinColumn(this.model,s.modelLineNumber,s.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(s){return this.modelLineProjections[s.modelLineNumber-1].getViewLineMaxColumn(this.model,s.modelLineNumber,s.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(s){const l=this.modelLineProjections[s.modelLineNumber-1],o=l.getViewLineMinColumn(this.model,s.modelLineNumber,s.modelLineWrappedLineIdx),g=l.getModelColumnOfViewPosition(s.modelLineWrappedLineIdx,o);return new k.Position(s.modelLineNumber,g)}getModelEndPositionOfViewLine(s){const l=this.modelLineProjections[s.modelLineNumber-1],o=l.getViewLineMaxColumn(this.model,s.modelLineNumber,s.modelLineWrappedLineIdx),g=l.getModelColumnOfViewPosition(s.modelLineWrappedLineIdx,o);return new k.Position(s.modelLineNumber,g)}getViewLineInfosGroupedByModelRanges(s,l){const o=this.getViewLineInfo(s),g=this.getViewLineInfo(l),h=new Array;let m=this.getModelStartPositionOfViewLine(o),C=new Array;for(let w=o.modelLineNumber;w<=g.modelLineNumber;w++){const D=this.modelLineProjections[w-1];if(D.isVisible()){const I=w===o.modelLineNumber?o.modelLineWrappedLineIdx:0,T=w===g.modelLineNumber?g.modelLineWrappedLineIdx+1:D.getViewLineCount();for(let A=I;A<T;A++)C.push(new t(w,A))}if(!D.isVisible()&&m){const I=new k.Position(w-1,this.model.getLineMaxColumn(w-1)+1),T=y.Range.fromPositions(m,I);h.push(new r(T,C)),C=[],m=null}else D.isVisible()&&!m&&(m=new k.Position(w,1))}if(m){const w=y.Range.fromPositions(m,this.getModelEndPositionOfViewLine(g));h.push(new r(w,C))}return h}getViewLinesBracketGuides(s,l,o,g){const h=o?this.convertViewPositionToModelPosition(o.lineNumber,o.column):null,m=[];for(const C of this.getViewLineInfosGroupedByModelRanges(s,l)){const w=C.modelRange.startLineNumber,D=this.model.guides.getLinesBracketGuides(w,C.modelRange.endLineNumber,h,g);for(const I of C.viewLines){const A=D[I.modelLineNumber-w].map(P=>{if(P.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesAfterColumn).lineNumber>=I.modelLineWrappedLineIdx||P.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,P.forWrappedLinesBeforeOrAtColumn).lineNumber<I.modelLineWrappedLineIdx)return;if(!P.horizontalLine)return P;let N=-1;if(P.column!==-1){const x=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,P.column);if(x.lineNumber===I.modelLineWrappedLineIdx)N=x.column;else if(x.lineNumber<I.modelLineWrappedLineIdx)N=this.getMinColumnOfViewLine(I);else if(x.lineNumber>I.modelLineWrappedLineIdx)return}const M=this.convertModelPositionToViewPosition(I.modelLineNumber,P.horizontalLine.endColumn),R=this.modelLineProjections[I.modelLineNumber-1].getViewPositionOfModelPosition(0,P.horizontalLine.endColumn);return R.lineNumber===I.modelLineWrappedLineIdx?new E.IndentGuide(P.visibleColumn,N,P.className,new E.IndentGuideHorizontalLine(P.horizontalLine.top,M.column),-1,-1):R.lineNumber<I.modelLineWrappedLineIdx||P.visibleColumn!==-1?void 0:new E.IndentGuide(P.visibleColumn,N,P.className,new E.IndentGuideHorizontalLine(P.horizontalLine.top,this.getMaxColumnOfViewLine(I)),-1,-1)});m.push(A.filter(P=>!!P))}}return m}getViewLinesIndentGuides(s,l){s=this._toValidViewLineNumber(s),l=this._toValidViewLineNumber(l);const o=this.convertViewPositionToModelPosition(s,this.getViewLineMinColumn(s)),g=this.convertViewPositionToModelPosition(l,this.getViewLineMaxColumn(l));let h=[];const m=[],C=[],w=o.lineNumber-1,D=g.lineNumber-1;let I=null;for(let N=w;N<=D;N++){const M=this.modelLineProjections[N];if(M.isVisible()){const R=M.getViewLineNumberOfModelPosition(0,N===w?o.column:1),x=M.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(N+1)),O=x-R+1;let B=0;O>1&&M.getViewLineMinColumn(this.model,N+1,x)===1&&(B=R===0?1:2),m.push(O),C.push(B),I===null&&(I=new k.Position(N+1,0))}else I!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,N)),I=null)}I!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(I.lineNumber,g.lineNumber)),I=null);const T=l-s+1,A=new Array(T);let P=0;for(let N=0,M=h.length;N<M;N++){let R=h[N];const x=Math.min(T-P,m[N]),O=C[N];let B;O===2?B=0:O===1?B=1:B=x;for(let W=0;W<x;W++)W===B&&(R=0),A[P++]=R}return A}getViewLineContent(s){const l=this.getViewLineInfo(s);return this.modelLineProjections[l.modelLineNumber-1].getViewLineContent(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineLength(s){const l=this.getViewLineInfo(s);return this.modelLineProjections[l.modelLineNumber-1].getViewLineLength(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineMinColumn(s){const l=this.getViewLineInfo(s);return this.modelLineProjections[l.modelLineNumber-1].getViewLineMinColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineMaxColumn(s){const l=this.getViewLineInfo(s);return this.modelLineProjections[l.modelLineNumber-1].getViewLineMaxColumn(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLineData(s){const l=this.getViewLineInfo(s);return this.modelLineProjections[l.modelLineNumber-1].getViewLineData(this.model,l.modelLineNumber,l.modelLineWrappedLineIdx)}getViewLinesData(s,l,o){s=this._toValidViewLineNumber(s),l=this._toValidViewLineNumber(l);const g=this.projectedModelLineLineCounts.getIndexOf(s-1);let h=s;const m=g.index,C=g.remainder,w=[];for(let D=m,I=this.model.getLineCount();D<I;D++){const T=this.modelLineProjections[D];if(!T.isVisible())continue;const A=D===m?C:0;let P=T.getViewLineCount()-A,N=!1;if(h+P>l&&(N=!0,P=l-h+1),T.getViewLinesData(this.model,D+1,A,P,h-s,o,w),h+=P,N)break}return w}validateViewPosition(s,l,o){s=this._toValidViewLineNumber(s);const g=this.projectedModelLineLineCounts.getIndexOf(s-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);l<w&&(l=w),l>D&&(l=D);const I=C.getModelColumnOfViewPosition(m,l);return this.model.validatePosition(new k.Position(h+1,I)).equals(o)?new k.Position(s,l):this.convertModelPositionToViewPosition(o.lineNumber,o.column)}validateViewRange(s,l){const o=this.validateViewPosition(s.startLineNumber,s.startColumn,l.getStartPosition()),g=this.validateViewPosition(s.endLineNumber,s.endColumn,l.getEndPosition());return new y.Range(o.lineNumber,o.column,g.lineNumber,g.column)}convertViewPositionToModelPosition(s,l){const o=this.getViewLineInfo(s),g=this.modelLineProjections[o.modelLineNumber-1].getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,l);return this.model.validatePosition(new k.Position(o.modelLineNumber,g))}convertViewRangeToModelRange(s){const l=this.convertViewPositionToModelPosition(s.startLineNumber,s.startColumn),o=this.convertViewPositionToModelPosition(s.endLineNumber,s.endColumn);return new y.Range(l.lineNumber,l.column,o.lineNumber,o.column)}convertModelPositionToViewPosition(s,l,o=2,g=!1,h=!1){const m=this.model.validatePosition(new k.Position(s,l)),C=m.lineNumber,w=m.column;let D=C-1,I=!1;if(h)for(;D<this.modelLineProjections.length&&!this.modelLineProjections[D].isVisible();)D++,I=!0;else for(;D>0&&!this.modelLineProjections[D].isVisible();)D--,I=!0;if(D===0&&!this.modelLineProjections[D].isVisible())return new k.Position(g?0:1,1);const T=1+this.projectedModelLineLineCounts.getPrefixSum(D);let A;return I?h?A=this.modelLineProjections[D].getViewPositionOfModelPosition(T,1,o):A=this.modelLineProjections[D].getViewPositionOfModelPosition(T,this.model.getLineMaxColumn(D+1),o):A=this.modelLineProjections[C-1].getViewPositionOfModelPosition(T,w,o),A}convertModelRangeToViewRange(s,l=0){if(s.isEmpty()){const o=this.convertModelPositionToViewPosition(s.startLineNumber,s.startColumn,l);return y.Range.fromPositions(o)}else{const o=this.convertModelPositionToViewPosition(s.startLineNumber,s.startColumn,1),g=this.convertModelPositionToViewPosition(s.endLineNumber,s.endColumn,0);return new y.Range(o.lineNumber,o.column,g.lineNumber,g.column)}}getViewLineNumberOfModelPosition(s,l){let o=s-1;if(this.modelLineProjections[o].isVisible()){const h=1+this.projectedModelLineLineCounts.getPrefixSum(o);return this.modelLineProjections[o].getViewLineNumberOfModelPosition(h,l)}for(;o>0&&!this.modelLineProjections[o].isVisible();)o--;if(o===0&&!this.modelLineProjections[o].isVisible())return 1;const g=1+this.projectedModelLineLineCounts.getPrefixSum(o);return this.modelLineProjections[o].getViewLineNumberOfModelPosition(g,this.model.getLineMaxColumn(o+1))}getDecorationsInRange(s,l,o,g,h){const m=this.convertViewPositionToModelPosition(s.startLineNumber,s.startColumn),C=this.convertViewPositionToModelPosition(s.endLineNumber,s.endColumn);if(C.lineNumber-m.lineNumber<=s.endLineNumber-s.startLineNumber)return this.model.getDecorationsInRange(new y.Range(m.lineNumber,1,C.lineNumber,C.column),l,o,g,h);let w=[];const D=m.lineNumber-1,I=C.lineNumber-1;let T=null;for(let M=D;M<=I;M++)if(this.modelLineProjections[M].isVisible())T===null&&(T=new k.Position(M+1,M===D?m.column:1));else if(T!==null){const x=this.model.getLineMaxColumn(M);w=w.concat(this.model.getDecorationsInRange(new y.Range(T.lineNumber,T.column,M,x),l,o,g)),T=null}T!==null&&(w=w.concat(this.model.getDecorationsInRange(new y.Range(T.lineNumber,T.column,C.lineNumber,C.column),l,o,g)),T=null),w.sort((M,R)=>{const x=y.Range.compareRangesUsingStarts(M.range,R.range);return x===0?M.id<R.id?-1:M.id>R.id?1:0:x});const A=[];let P=0,N=null;for(const M of w){const R=M.id;N!==R&&(N=R,A[P++]=M)}return A}getInjectedTextAt(s){const l=this.getViewLineInfo(s.lineNumber);return this.modelLineProjections[l.modelLineNumber-1].getInjectedTextAt(l.modelLineWrappedLineIdx,s.column)}normalizePosition(s,l){const o=this.getViewLineInfo(s.lineNumber);return this.modelLineProjections[o.modelLineNumber-1].normalizePosition(o.modelLineWrappedLineIdx,s,l)}getLineIndentColumn(s){const l=this.getViewLineInfo(s);return l.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(l.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=i;function n(d){if(d.length===0)return[];const s=d.slice();s.sort(y.Range.compareRangesUsingStarts);const l=[];let o=s[0].startLineNumber,g=s[0].endLineNumber;for(let h=1,m=s.length;h<m;h++){const C=s[h];C.startLineNumber>g+1?(l.push(new y.Range(o,1,g,1)),o=C.startLineNumber,g=C.endLineNumber):C.endLineNumber>g&&(g=C.endLineNumber)}return l.push(new y.Range(o,1,g,1)),l}class t{constructor(s,l){this.modelLineNumber=s,this.modelLineWrappedLineIdx=l}}class r{constructor(s,l){this.modelRange=s,this.viewLines=l}}class u{constructor(s){this._lines=s}convertViewPositionToModelPosition(s){return this._lines.convertViewPositionToModelPosition(s.lineNumber,s.column)}convertViewRangeToModelRange(s){return this._lines.convertViewRangeToModelRange(s)}validateViewPosition(s,l){return this._lines.validateViewPosition(s.lineNumber,s.column,l)}validateViewRange(s,l){return this._lines.validateViewRange(s,l)}convertModelPositionToViewPosition(s,l,o,g){return this._lines.convertModelPositionToViewPosition(s.lineNumber,s.column,l,o,g)}convertModelRangeToViewRange(s,l){return this._lines.convertModelRangeToViewRange(s,l)}modelPositionIsVisible(s){return this._lines.modelPositionIsVisible(s.lineNumber,s.column)}getModelLineViewLineCount(s){return this._lines.getModelLineViewLineCount(s)}getViewLineNumberOfModelPosition(s,l){return this._lines.getViewLineNumberOfModelPosition(s,l)}}class f{constructor(s){this.model=s}dispose(){}createCoordinatesConverter(){return new c(this)}getHiddenAreas(){return[]}setHiddenAreas(s){return!1}setTabSize(s){return!1}setWrappingSettings(s,l,o,g){return!1}createLineBreaksComputer(){const s=[];return{addRequest:(l,o,g)=>{s.push(null)},finalize:()=>s}}onModelFlushed(){}onModelLinesDeleted(s,l,o){return new _.ViewLinesDeletedEvent(l,o)}onModelLinesInserted(s,l,o,g){return new _.ViewLinesInsertedEvent(l,o)}onModelLineChanged(s,l,o){return[!1,new _.ViewLinesChangedEvent(l,1),null,null]}acceptVersionId(s){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(s,l,o){return{startLineNumber:s,endLineNumber:s,indent:0}}getViewLinesBracketGuides(s,l,o){return new Array(l-s+1).fill([])}getViewLinesIndentGuides(s,l){const o=l-s+1,g=new Array(o);for(let h=0;h<o;h++)g[h]=0;return g}getViewLineContent(s){return this.model.getLineContent(s)}getViewLineLength(s){return this.model.getLineLength(s)}getViewLineMinColumn(s){return this.model.getLineMinColumn(s)}getViewLineMaxColumn(s){return this.model.getLineMaxColumn(s)}getViewLineData(s){const l=this.model.tokenization.getLineTokens(s),o=l.getLineContent();return new a.ViewLineData(o,!1,1,o.length+1,0,l.inflate(),null)}getViewLinesData(s,l,o){const g=this.model.getLineCount();s=Math.min(Math.max(1,s),g),l=Math.min(Math.max(1,l),g);const h=[];for(let m=s;m<=l;m++){const C=m-s;h[C]=o[C]?this.getViewLineData(m):null}return h}getDecorationsInRange(s,l,o,g,h){return this.model.getDecorationsInRange(s,l,o,g,h)}normalizePosition(s,l){return this.model.normalizePosition(s,l)}getLineIndentColumn(s){return this.model.getLineIndentColumn(s)}getInjectedTextAt(s){return null}}e.ViewModelLinesFromModelAsIs=f;class c{constructor(s){this._lines=s}_validPosition(s){return this._lines.model.validatePosition(s)}_validRange(s){return this._lines.model.validateRange(s)}convertViewPositionToModelPosition(s){return this._validPosition(s)}convertViewRangeToModelRange(s){return this._validRange(s)}validateViewPosition(s,l){return this._validPosition(l)}validateViewRange(s,l){return this._validRange(l)}convertModelPositionToViewPosition(s){return this._validPosition(s)}convertModelRangeToViewRange(s){return this._validRange(s)}modelPositionIsVisible(s){const l=this._lines.model.getLineCount();return!(s.lineNumber<1||s.lineNumber>l)}getModelLineViewLineCount(s){return 1}getViewLineNumberOfModelPosition(s,l){return s}}}),define(se[885],oe([1,0,13,14,39,2,17,11,36,791,75,10,5,114,31,80,337,214,551,339,86,336,215,884,546]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const m=!0;class C extends E.Disposable{constructor(M,R,x,O,B,W,V,K,F){if(super(),this.languageConfigurationService=V,this._themeService=K,this._attachedView=F,this.hiddenAreasModel=new I,this.previousHiddenAreas=[],this._editorId=M,this._configuration=R,this.model=x,this._eventDispatcher=new o.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=w.create(this.model),this.glyphLanes=new h.GlyphMarginLanesModel(0),m&&this.model.isTooLargeForTokenization())this._lines=new g.ViewModelLinesFromModelAsIs(this.model);else{const q=this._configuration.options,ie=q.get(50),ae=q.get(137),ne=q.get(144),$=q.get(136),J=q.get(128);this._lines=new g.ViewModelLinesFromProjectedModel(this._editorId,this.model,O,B,ie,this.model.getOptions().tabSize,ae,ne.wrappingColumn,$,J)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new v.CursorsController(x,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new c.ViewLayout(this._configuration,this.getLineCount(),W)),this._register(this.viewLayout.onDidScroll(q=>{q.scrollTopChanged&&this._handleVisibleLinesChanged(),q.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new f.ViewScrollChangedEvent(q)),this._eventDispatcher.emitOutgoingEvent(new o.ScrollChangedEvent(q.oldScrollWidth,q.oldScrollLeft,q.oldScrollHeight,q.oldScrollTop,q.scrollWidth,q.scrollLeft,q.scrollHeight,q.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(q=>{this._eventDispatcher.emitOutgoingEvent(q)})),this._decorations=new l.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(q=>{try{const ie=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(ie,q)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(d.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new f.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(q=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new f.ViewThemeChangedEvent(q))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(M){this._eventDispatcher.addViewEventHandler(M)}removeViewEventHandler(M){this._eventDispatcher.removeViewEventHandler(M)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const M=this.viewLayout.getLinesViewportData(),R=new i.Range(M.startLineNumber,this.getLineMinColumn(M.startLineNumber),M.endLineNumber,this.getLineMaxColumn(M.endLineNumber));return this._toModelVisibleRanges(R)}visibleLinesStabilized(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!0)}_handleVisibleLinesChanged(){const M=this.getModelVisibleRanges();this._attachedView.setVisibleLines(M,!1)}setHasFocus(M){this._hasFocus=M,this._cursor.setHasFocus(M),this._eventDispatcher.emitSingleViewEvent(new f.ViewFocusChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new o.FocusChangedEvent(!M,M))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const M=new a.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),R=this.coordinatesConverter.convertViewPositionToModelPosition(M);return new P(R,this._viewportStart.startLineDelta)}return new P(null,0)}_onConfigurationChanged(M,R){const x=this._captureStableViewport(),O=this._configuration.options,B=O.get(50),W=O.get(137),V=O.get(144),K=O.get(136),F=O.get(128);this._lines.setWrappingSettings(B,W,V.wrappingColumn,K,F)&&(M.emitViewEvent(new f.ViewFlushedEvent),M.emitViewEvent(new f.ViewLineMappingChangedEvent),M.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(M),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),R.hasChanged(90)&&(this._decorations.reset(),M.emitViewEvent(new f.ViewDecorationsChangedEvent(null))),R.hasChanged(97)&&(this._decorations.reset(),M.emitViewEvent(new f.ViewDecorationsChangedEvent(null))),M.emitViewEvent(new f.ViewConfigurationChangedEvent(R)),this.viewLayout.onConfigurationChanged(R),x.recoverViewportStart(this.coordinatesConverter,this.viewLayout),b.CursorConfiguration.shouldRecreate(R)&&(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(M=>{try{const x=this._eventDispatcher.beginEmitViewEvents();let O=!1,B=!1;const W=M instanceof n.InternalModelContentChangeEvent?M.rawContentChangedEvent.changes:M.changes,V=M instanceof n.InternalModelContentChangeEvent?M.rawContentChangedEvent.versionId:null,K=this._lines.createLineBreaksComputer();for(const ie of W)switch(ie.changeType){case 4:{for(let ae=0;ae<ie.detail.length;ae++){const ne=ie.detail[ae];let $=ie.injectedTexts[ae];$&&($=$.filter(J=>!J.ownerId||J.ownerId===this._editorId)),K.addRequest(ne,$,null)}break}case 2:{let ae=null;ie.injectedText&&(ae=ie.injectedText.filter(ne=>!ne.ownerId||ne.ownerId===this._editorId)),K.addRequest(ie.detail,ae,null);break}}const F=K.finalize(),q=new L.ArrayQueue(F);for(const ie of W)switch(ie.changeType){case 1:{this._lines.onModelFlushed(),x.emitViewEvent(new f.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),O=!0;break}case 3:{const ae=this._lines.onModelLinesDeleted(V,ie.fromLineNumber,ie.toLineNumber);ae!==null&&(x.emitViewEvent(ae),this.viewLayout.onLinesDeleted(ae.fromLineNumber,ae.toLineNumber)),O=!0;break}case 4:{const ae=q.takeCount(ie.detail.length),ne=this._lines.onModelLinesInserted(V,ie.fromLineNumber,ie.toLineNumber,ae);ne!==null&&(x.emitViewEvent(ne),this.viewLayout.onLinesInserted(ne.fromLineNumber,ne.toLineNumber)),O=!0;break}case 2:{const ae=q.dequeue(),[ne,$,J,Q]=this._lines.onModelLineChanged(V,ie.lineNumber,ae);B=ne,$&&x.emitViewEvent($),J&&(x.emitViewEvent(J),this.viewLayout.onLinesInserted(J.fromLineNumber,J.toLineNumber)),Q&&(x.emitViewEvent(Q),this.viewLayout.onLinesDeleted(Q.fromLineNumber,Q.toLineNumber));break}case 5:break}V!==null&&this._lines.acceptVersionId(V),this.viewLayout.onHeightMaybeChanged(),!O&&B&&(x.emitViewEvent(new f.ViewLineMappingChangedEvent),x.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(x),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const R=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&R){const x=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(x){const O=this.coordinatesConverter.convertModelPositionToViewPosition(x.getStartPosition()),B=this.viewLayout.getVerticalOffsetForLineNumber(O.lineNumber);this.viewLayout.setScrollPosition({scrollTop:B+this._viewportStart.startLineDelta},1)}}try{const x=this._eventDispatcher.beginEmitViewEvents();M instanceof n.InternalModelContentChangeEvent&&x.emitOutgoingEvent(new o.ModelContentChangedEvent(M.contentChangedEvent)),this._cursor.onModelContentChanged(x,M)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(M=>{const R=[];for(let x=0,O=M.ranges.length;x<O;x++){const B=M.ranges[x],W=this.coordinatesConverter.convertModelPositionToViewPosition(new a.Position(B.fromLineNumber,1)).lineNumber,V=this.coordinatesConverter.convertModelPositionToViewPosition(new a.Position(B.toLineNumber,this.model.getLineMaxColumn(B.toLineNumber))).lineNumber;R[x]={fromLineNumber:W,toLineNumber:V}}this._eventDispatcher.emitSingleViewEvent(new f.ViewTokensChangedEvent(R)),this._eventDispatcher.emitOutgoingEvent(new o.ModelTokensChangedEvent(M))})),this._register(this.model.onDidChangeLanguageConfiguration(M=>{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 o.ModelLanguageConfigurationChangedEvent(M))})),this._register(this.model.onDidChangeLanguage(M=>{this.cursorConfig=new b.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new o.ModelLanguageChangedEvent(M))})),this._register(this.model.onDidChangeOptions(M=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const R=this._eventDispatcher.beginEmitViewEvents();R.emitViewEvent(new f.ViewFlushedEvent),R.emitViewEvent(new f.ViewLineMappingChangedEvent),R.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(R),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 o.ModelOptionsChangedEvent(M))})),this._register(this.model.onDidChangeDecorations(M=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new f.ViewDecorationsChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new o.ModelDecorationsChangedEvent(M))}))}setHiddenAreas(M,R){var x;this.hiddenAreasModel.setHiddenAreas(R,M);const O=this.hiddenAreasModel.getMergedRanges();if(O===this.previousHiddenAreas)return;this.previousHiddenAreas=O;const B=this._captureStableViewport();let W=!1;try{const V=this._eventDispatcher.beginEmitViewEvents();W=this._lines.setHiddenAreas(O),W&&(V.emitViewEvent(new f.ViewFlushedEvent),V.emitViewEvent(new f.ViewLineMappingChangedEvent),V.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(V),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged());const K=(x=B.viewportStartModelPosition)===null||x===void 0?void 0:x.lineNumber;K&&O.some(q=>q.startLineNumber<=K&&K<=q.endLineNumber)||B.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),W&&this._eventDispatcher.emitOutgoingEvent(new o.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const M=this._configuration.options.get(143),R=this._configuration.options.get(66),x=Math.max(20,Math.round(M.height/R)),O=this.viewLayout.getLinesViewportData(),B=Math.max(1,O.completelyVisibleStartLineNumber-x),W=Math.min(this.getLineCount(),O.completelyVisibleEndLineNumber+x);return this._toModelVisibleRanges(new i.Range(B,this.getLineMinColumn(B),W,this.getLineMaxColumn(W)))}getVisibleRanges(){const M=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(M)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(M){const R=this.coordinatesConverter.convertViewRangeToModelRange(M),x=this._lines.getHiddenAreas();if(x.length===0)return[R];const O=[];let B=0,W=R.startLineNumber,V=R.startColumn;const K=R.endLineNumber,F=R.endColumn;for(let q=0,ie=x.length;q<ie;q++){const ae=x[q].startLineNumber,ne=x[q].endLineNumber;ne<W||ae>K||(W<ae&&(O[B++]=new i.Range(W,V,ae-1,this.model.getLineMaxColumn(ae-1))),W=ne+1,V=1)}return(W<K||W===K&&V<F)&&(O[B++]=new i.Range(W,V,K,F)),O}getCompletelyVisibleViewRange(){const M=this.viewLayout.getLinesViewportData(),R=M.completelyVisibleStartLineNumber,x=M.completelyVisibleEndLineNumber;return new i.Range(R,this.getLineMinColumn(R),x,this.getLineMaxColumn(x))}getCompletelyVisibleViewRangeAtScrollTop(M){const R=this.viewLayout.getLinesViewportDataAtScrollTop(M),x=R.completelyVisibleStartLineNumber,O=R.completelyVisibleEndLineNumber;return new i.Range(x,this.getLineMinColumn(x),O,this.getLineMaxColumn(O))}saveState(){const M=this.viewLayout.saveState(),R=M.scrollTop,x=this.viewLayout.getLineNumberAtVerticalOffset(R),O=this.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(x,this.getLineMinColumn(x))),B=this.viewLayout.getVerticalOffsetForLineNumber(x)-R;return{scrollLeft:M.scrollLeft,firstPosition:O,firstPositionDeltaTop:B}}reduceRestoreState(M){if(typeof M.firstPosition>"u")return this._reduceRestoreStateCompatibility(M);const R=this.model.validatePosition(M.firstPosition),x=this.coordinatesConverter.convertModelPositionToViewPosition(R),O=this.viewLayout.getVerticalOffsetForLineNumber(x.lineNumber)-M.firstPositionDeltaTop;return{scrollLeft:M.scrollLeft,scrollTop:O}}_reduceRestoreStateCompatibility(M){return{scrollLeft:M.scrollLeft,scrollTop:M.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(M,R,x){this._viewportStart.update(this,M)}getActiveIndentGuide(M,R,x){return this._lines.getActiveIndentGuide(M,R,x)}getLinesIndentGuides(M,R){return this._lines.getViewLinesIndentGuides(M,R)}getBracketGuidesInRangeByLine(M,R,x,O){return this._lines.getViewLinesBracketGuides(M,R,x,O)}getLineContent(M){return this._lines.getViewLineContent(M)}getLineLength(M){return this._lines.getViewLineLength(M)}getLineMinColumn(M){return this._lines.getViewLineMinColumn(M)}getLineMaxColumn(M){return this._lines.getViewLineMaxColumn(M)}getLineFirstNonWhitespaceColumn(M){const R=p.firstNonWhitespaceIndex(this.getLineContent(M));return R===-1?0:R+1}getLineLastNonWhitespaceColumn(M){const R=p.lastNonWhitespaceIndex(this.getLineContent(M));return R===-1?0:R+2}getMinimapDecorationsInRange(M){return this._decorations.getMinimapDecorationsInRange(M)}getDecorationsInViewport(M){return this._decorations.getDecorationsViewportData(M).decorations}getInjectedTextAt(M){return this._lines.getInjectedTextAt(M)}getViewportViewLineRenderingData(M,R){const O=this._decorations.getDecorationsViewportData(M).inlineDecorations[R-M.startLineNumber];return this._getViewLineRenderingData(R,O)}getViewLineRenderingData(M){const R=this._decorations.getInlineDecorationsOnLine(M);return this._getViewLineRenderingData(M,R)}_getViewLineRenderingData(M,R){const x=this.model.mightContainRTL(),O=this.model.mightContainNonBasicASCII(),B=this.getTabSize(),W=this._lines.getViewLineData(M);return W.inlineDecorations&&(R=[...R,...W.inlineDecorations.map(V=>V.toInlineDecoration(M))]),new s.ViewLineRenderingData(W.minColumn,W.maxColumn,W.content,W.continuesWithWrappedLine,x,O,W.tokens,R,B,W.startVisibleColumn)}getViewLineData(M){return this._lines.getViewLineData(M)}getMinimapLinesRenderingData(M,R,x){const O=this._lines.getViewLinesData(M,R,x);return new s.MinimapLinesRenderingData(this.getTabSize(),O)}getAllOverviewRulerDecorations(M){const R=this.model.getOverviewRulerDecorations(this._editorId,(0,_.filterValidationDecorations)(this._configuration.options)),x=new D;for(const O of R){const B=O.options,W=B.overviewRuler;if(!W)continue;const V=W.position;if(V===0)continue;const K=W.getColor(M.value),F=this.coordinatesConverter.getViewLineNumberOfModelPosition(O.range.startLineNumber,O.range.startColumn),q=this.coordinatesConverter.getViewLineNumberOfModelPosition(O.range.endLineNumber,O.range.endColumn);x.accept(K,B.zIndex,F,q,V)}return x.asArray}_invalidateDecorationsColorCache(){const M=this.model.getOverviewRulerDecorations();for(const R of M){const x=R.options.overviewRuler;x?.invalidateCachedColor();const O=R.options.minimap;O?.invalidateCachedColor()}}getValueInRange(M,R){const x=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueInRange(x,R)}getValueLengthInRange(M,R){const x=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueLengthInRange(x,R)}modifyPosition(M,R){const x=this.coordinatesConverter.convertViewPositionToModelPosition(M),O=this.model.modifyPosition(x,R);return this.coordinatesConverter.convertModelPositionToViewPosition(O)}deduceModelPositionRelativeToViewPosition(M,R,x){const O=this.coordinatesConverter.convertViewPositionToModelPosition(M);this.model.getEOL().length===2&&(R<0?R-=x:R+=x);const W=this.model.getOffsetAt(O)+R;return this.model.getPositionAt(W)}getPlainTextToCopy(M,R,x){const O=x?`\r
|
||
`:this.model.getEOL();M=M.slice(0),M.sort(i.Range.compareRangesUsingStarts);let B=!1,W=!1;for(const K of M)K.isEmpty()?B=!0:W=!0;if(!W){if(!R)return"";const K=M.map(q=>q.startLineNumber);let F="";for(let q=0;q<K.length;q++)q>0&&K[q-1]===K[q]||(F+=this.model.getLineContent(K[q])+O);return F}if(B&&R){const K=[];let F=0;for(const q of M){const ie=q.startLineNumber;q.isEmpty()?ie!==F&&K.push(this.model.getLineContent(ie)):K.push(this.model.getValueInRange(q,x?2:0)),F=ie}return K.length===1?K[0]:K}const V=[];for(const K of M)K.isEmpty()||V.push(this.model.getValueInRange(K,x?2:0));return V.length===1?V[0]:V}getRichTextToCopy(M,R){const x=this.model.getLanguageId();if(x===r.PLAINTEXT_LANGUAGE_ID||M.length!==1)return null;let O=M[0];if(O.isEmpty()){if(!R)return null;const q=O.startLineNumber;O=new i.Range(q,this.model.getLineMinColumn(q),q,this.model.getLineMaxColumn(q))}const B=this._configuration.options.get(50),W=this._getColorMap(),K=/[:;\\\/<>]/.test(B.fontFamily)||B.fontFamily===_.EDITOR_FONT_DEFAULTS.fontFamily;let F;return K?F=_.EDITOR_FONT_DEFAULTS.fontFamily:(F=B.fontFamily,F=F.replace(/"/g,"'"),/[,']/.test(F)||/[+ ]/.test(F)&&(F=`'${F}'`),F=`${F}, ${_.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:x,html:`<div style="color: ${W[1]};background-color: ${W[2]};font-family: ${F};font-weight: ${B.fontWeight};font-size: ${B.fontSize}px;line-height: ${B.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(O,W)+"</div>"}}_getHTMLToCopy(M,R){const x=M.startLineNumber,O=M.startColumn,B=M.endLineNumber,W=M.endColumn,V=this.getTabSize();let K="";for(let F=x;F<=B;F++){const q=this.model.tokenization.getLineTokens(F),ie=q.getLineContent(),ae=F===x?O-1:0,ne=F===B?W-1:ie.length;ie===""?K+="<br>":K+=(0,u.tokenizeLineToHTML)(ie,q.inflate(),R,ae,ne,V,S.isWindows)}return K}_getColorMap(){const M=t.TokenizationRegistry.getColorMap(),R=["#000000"];if(M)for(let x=1,O=M.length;x<O;x++)R[x]=y.Color.Format.CSS.formatHex(M[x]);return R}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(M,R,x){return this._withViewEventsCollector(O=>this._cursor.setStates(O,M,R,x))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(M){this._cursor.setCursorColumnSelectData(M)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(M){this._cursor.setPrevEditOperationType(M)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(M,R,x=0){this._withViewEventsCollector(O=>this._cursor.setSelections(O,M,R,x))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(M){this._withViewEventsCollector(R=>this._cursor.restoreState(R,M))}_executeCursorEdit(M){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new o.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(M)}executeEdits(M,R,x){this._executeCursorEdit(O=>this._cursor.executeEdits(O,M,R,x))}startComposition(){this._executeCursorEdit(M=>this._cursor.startComposition(M))}endComposition(M){this._executeCursorEdit(R=>this._cursor.endComposition(R,M))}type(M,R){this._executeCursorEdit(x=>this._cursor.type(x,M,R))}compositionType(M,R,x,O,B){this._executeCursorEdit(W=>this._cursor.compositionType(W,M,R,x,O,B))}paste(M,R,x,O){this._executeCursorEdit(B=>this._cursor.paste(B,M,R,x,O))}cut(M){this._executeCursorEdit(R=>this._cursor.cut(R,M))}executeCommand(M,R){this._executeCursorEdit(x=>this._cursor.executeCommand(x,M,R))}executeCommands(M,R){this._executeCursorEdit(x=>this._cursor.executeCommands(x,M,R))}revealPrimaryCursor(M,R,x=!1){this._withViewEventsCollector(O=>this._cursor.revealPrimary(O,M,x,0,R,0))}revealTopMostCursor(M){const R=this._cursor.getTopMostViewPosition(),x=new i.Range(R.lineNumber,R.column,R.lineNumber,R.column);this._withViewEventsCollector(O=>O.emitViewEvent(new f.ViewRevealRangeRequestEvent(M,!1,x,null,0,!0,0)))}revealBottomMostCursor(M){const R=this._cursor.getBottomMostViewPosition(),x=new i.Range(R.lineNumber,R.column,R.lineNumber,R.column);this._withViewEventsCollector(O=>O.emitViewEvent(new f.ViewRevealRangeRequestEvent(M,!1,x,null,0,!0,0)))}revealRange(M,R,x,O,B){this._withViewEventsCollector(W=>W.emitViewEvent(new f.ViewRevealRangeRequestEvent(M,!1,x,null,O,R,B)))}changeWhitespace(M){this.viewLayout.changeWhitespace(M)&&(this._eventDispatcher.emitSingleViewEvent(new f.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new o.ViewZonesChangedEvent))}_withViewEventsCollector(M){try{const R=this._eventDispatcher.beginEmitViewEvents();return M(R)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(M,R){return this._lines.normalizePosition(M,R)}getLineIndentColumn(M){return this._lines.getLineIndentColumn(M)}}e.ViewModel=C;class w{static create(M){const R=M._setTrackedRange(null,new i.Range(1,1,1,1),1);return new w(M,1,!1,R,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(M,R,x,O,B){this._model=M,this._viewLineNumber=R,this._isValid=x,this._modelTrackedRange=O,this._startLineDelta=B}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(M,R){const x=M.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(R,M.getLineMinColumn(R))),O=M.model._setTrackedRange(this._modelTrackedRange,new i.Range(x.lineNumber,x.column,x.lineNumber,x.column),1),B=M.viewLayout.getVerticalOffsetForLineNumber(R),W=M.viewLayout.getCurrentScrollTop();this._viewLineNumber=R,this._isValid=!0,this._modelTrackedRange=O,this._startLineDelta=W-B}invalidate(){this._isValid=!1}}class D{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(M,R,x,O,B){const W=this._asMap[M];if(W){const V=W.data,K=V[V.length-3],F=V[V.length-1];if(K===B&&F+1>=x){O>F&&(V[V.length-1]=O);return}V.push(B,x,O)}else{const V=new s.OverviewRulerDecorationsGroup(M,R,[B,x,O]);this._asMap[M]=V,this.asArray.push(V)}}}class I{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(M,R){const x=this.hiddenAreas.get(M);x&&A(x,R)||(this.hiddenAreas.set(M,R),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const M=Array.from(this.hiddenAreas.values()).reduce((R,x)=>T(R,x),[]);return A(this.ranges,M)?this.ranges:(this.ranges=M,this.ranges)}}function T(N,M){const R=[];let x=0,O=0;for(;x<N.length&&O<M.length;){const B=N[x],W=M[O];if(B.endLineNumber<W.startLineNumber-1)R.push(N[x++]);else if(W.endLineNumber<B.startLineNumber-1)R.push(M[O++]);else{const V=Math.min(B.startLineNumber,W.startLineNumber),K=Math.max(B.endLineNumber,W.endLineNumber);R.push(new i.Range(V,1,K,1)),x++,O++}}for(;x<N.length;)R.push(N[x++]);for(;O<M.length;)R.push(M[O++]);return R}function A(N,M){if(N.length!==M.length)return!1;for(let R=0;R<N.length;R++)if(!N[R].equalsRange(M[R]))return!1;return!0}class P{constructor(M,R){this.viewportStartModelPosition=M,this.startLineDelta=R}recoverViewportStart(M,R){if(!this.viewportStartModelPosition)return;const x=M.convertModelPositionToViewPosition(this.viewportStartModelPosition),O=R.getVerticalOffsetForLineNumber(x.lineNumber);R.setScrollPosition({scrollTop:O+this.startLineDelta},1)}}}),define(se[194],oe([1,0,621,7,12,6,2,47,771,16,33,862,279,36,85,10,5,24,287,180,21,38,83,29,885,25,15,8,163,50,23,69,548,609,181,32,72,18,607,202,807,451]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P,N,M,R,x,O,B,W){"use strict";var V;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let K=0;class F{constructor(z,H,Y,j,Z,ee){this.model=z,this.viewModel=H,this.view=Y,this.hasRealView=j,this.listenersToRemove=Z,this.attachedView=ee}dispose(){(0,S.dispose)(this.listenersToRemove),this.model.onBeforeDetached(this.attachedView),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let q=V=class extends S.Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(z,H,Y,j,Z,ee,le,ue,ce,pe,ve,Ce){var Se;super(),this.languageConfigurationService=ve,this._deliveryQueue=(0,E.createEventDeliveryQueue)(),this._contributions=this._register(new B.CodeEditorContributions),this._onDidDispose=this._register(new E.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeModel=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onWillChangeModel=this._onWillChangeModel.event,this._onDidChangeModel=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new ie({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new ae(this._contributions,this._deliveryQueue)),this.onWillType=this._onWillType.event,this._onDidType=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new ae(this._contributions,this._deliveryQueue)),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new ae(this._contributions,this._deliveryQueue)),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new ae(this._contributions,this._deliveryQueue)),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new ae(this._contributions,this._deliveryQueue)),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new ae(this._contributions,this._deliveryQueue)),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new E.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection(),Z.willCreateCodeEditor();const _e={...H};this._domElement=z,this._overflowWidgetsDomNode=_e.overflowWidgetsDomNode,delete _e.overflowWidgetsDomNode,this._id=++K,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=Y.telemetryData,this._configuration=this._register(this._createConfiguration(Y.isSimpleWidget||!1,_e,pe)),this._register(this._configuration.onDidChange(xe=>{this._onDidChangeConfiguration.fire(xe);const Be=this._configuration.options;if(xe.hasChanged(143)){const De=Be.get(143);this._onDidLayoutChange.fire(De)}})),this._contextKeyService=this._register(le.createScoped(this._domElement)),this._notificationService=ce,this._codeEditorService=Z,this._commandService=ee,this._themeService=ue,this._register(new ne(this,this._contextKeyService)),this._register(new $(this,this._contextKeyService,Ce)),this._instantiationService=j.createChild(new D.ServiceCollection([C.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new J(z,this._overflowWidgetsDomNode),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let Ee;Array.isArray(Y.contributions)?Ee=Y.contributions:Ee=v.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,Ee,this._instantiationService);for(const xe of v.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(xe.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${xe.id}`));continue}const Be=new c.InternalEditorAction(xe.id,xe.label,xe.alias,xe.metadata,(Se=xe.precondition)!==null&&Se!==void 0?Se:void 0,De=>this._instantiationService.invokeFunction(Ie=>Promise.resolve(xe.runEditorCommand(Ie,this,De))),this._contextKeyService);this._actions.set(Be.id,Be)}const Ae=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new k.DragAndDropObserver(this._domElement,{onDragOver:xe=>{if(!Ae())return;const Be=this.getTargetAtClientPoint(xe.clientX,xe.clientY);Be?.position&&this.showDropIndicatorAt(Be.position)},onDrop:async xe=>{if(!Ae()||(this.removeDropIndicator(),!xe.dataTransfer))return;const Be=this.getTargetAtClientPoint(xe.clientX,xe.clientY);Be?.position&&this._onDropIntoEditor.fire({position:Be.position,event:xe})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(z){var H;(H=this._modelData)===null||H===void 0||H.view.writeScreenReaderContent(z)}_createConfiguration(z,H,Y){return new _.EditorConfiguration(z,H,this._domElement,Y)}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(z){return this._instantiationService.invokeFunction(z)}updateOptions(z){this._configuration.updateOptions(z||{})}getOptions(){return this._configuration.options}getOption(z){return this._configuration.options.get(z)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(z){return this._modelData?M.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),z):null}getValue(z=null){if(!this._modelData)return"";const H=!!(z&&z.preserveBOM);let Y=0;return z&&z.lineEnding&&z.lineEnding===`
|
||
`?Y=1:z&&z.lineEnding&&z.lineEnding===`\r
|
||
`&&(Y=2),this._modelData.model.getValue(Y,H)}setValue(z){this._modelData&&this._modelData.model.setValue(z)}getModel(){return this._modelData?this._modelData.model:null}setModel(z=null){var H;const Y=z;if(this._modelData===null&&Y===null||this._modelData&&this._modelData.model===Y)return;const j={oldModelUrl:((H=this._modelData)===null||H===void 0?void 0:H.model.uri)||null,newModelUrl:Y?.uri||null};this._onWillChangeModel.fire(j);const Z=this.hasTextFocus(),ee=this._detachModel();this._attachModel(Y),Z&&this.hasModel()&&this.focus(),this._removeDecorationTypes(),this._onDidChangeModel.fire(j),this._postDetachModelCleanup(ee),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const z in this._decorationTypeSubtypes){const H=this._decorationTypeSubtypes[z];for(const Y in H)this._removeDecorationType(z+"-"+Y)}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(z,H,Y,j){const Z=z.model.validatePosition({lineNumber:H,column:Y}),ee=z.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Z);return z.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(ee.lineNumber,j)}getTopForLineNumber(z,H=!1){return this._modelData?V._getVerticalOffsetForPosition(this._modelData,z,1,H):-1}getTopForPosition(z,H){return this._modelData?V._getVerticalOffsetForPosition(this._modelData,z,H,!1):-1}static _getVerticalOffsetForPosition(z,H,Y,j=!1){const Z=z.model.validatePosition({lineNumber:H,column:Y}),ee=z.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Z);return z.viewModel.viewLayout.getVerticalOffsetForLineNumber(ee.lineNumber,j)}getBottomForLineNumber(z,H=!1){return this._modelData?V._getVerticalOffsetAfterPosition(this._modelData,z,1,H):-1}setHiddenAreas(z,H){var Y;(Y=this._modelData)===null||Y===void 0||Y.viewModel.setHiddenAreas(z.map(j=>u.Range.lift(j)),H)}getVisibleColumnFromPosition(z){if(!this._modelData)return z.column;const H=this._modelData.model.validatePosition(z),Y=this._modelData.model.getOptions().tabSize;return t.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(H.lineNumber),H.column,Y)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(z,H="api"){if(this._modelData){if(!r.Position.isIPosition(z))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(H,[{selectionStartLineNumber:z.lineNumber,selectionStartColumn:z.column,positionLineNumber:z.lineNumber,positionColumn:z.column}])}}_sendRevealRange(z,H,Y,j){if(!this._modelData)return;if(!u.Range.isIRange(z))throw new Error("Invalid arguments");const Z=this._modelData.model.validateRange(z),ee=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(Z);this._modelData.viewModel.revealRange("api",Y,ee,H,j)}revealLine(z,H=0){this._revealLine(z,0,H)}revealLineInCenter(z,H=0){this._revealLine(z,1,H)}revealLineInCenterIfOutsideViewport(z,H=0){this._revealLine(z,2,H)}revealLineNearTop(z,H=0){this._revealLine(z,5,H)}_revealLine(z,H,Y){if(typeof z!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(z,1,z,1),H,!1,Y)}revealPosition(z,H=0){this._revealPosition(z,0,!0,H)}revealPositionInCenter(z,H=0){this._revealPosition(z,1,!0,H)}revealPositionInCenterIfOutsideViewport(z,H=0){this._revealPosition(z,2,!0,H)}revealPositionNearTop(z,H=0){this._revealPosition(z,5,!0,H)}_revealPosition(z,H,Y,j){if(!r.Position.isIPosition(z))throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(z.lineNumber,z.column,z.lineNumber,z.column),H,Y,j)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(z,H="api"){const Y=f.Selection.isISelection(z),j=u.Range.isIRange(z);if(!Y&&!j)throw new Error("Invalid arguments");if(Y)this._setSelectionImpl(z,H);else if(j){const Z={selectionStartLineNumber:z.startLineNumber,selectionStartColumn:z.startColumn,positionLineNumber:z.endLineNumber,positionColumn:z.endColumn};this._setSelectionImpl(Z,H)}}_setSelectionImpl(z,H){if(!this._modelData)return;const Y=new f.Selection(z.selectionStartLineNumber,z.selectionStartColumn,z.positionLineNumber,z.positionColumn);this._modelData.viewModel.setSelections(H,[Y])}revealLines(z,H,Y=0){this._revealLines(z,H,0,Y)}revealLinesInCenter(z,H,Y=0){this._revealLines(z,H,1,Y)}revealLinesInCenterIfOutsideViewport(z,H,Y=0){this._revealLines(z,H,2,Y)}revealLinesNearTop(z,H,Y=0){this._revealLines(z,H,5,Y)}_revealLines(z,H,Y,j){if(typeof z!="number"||typeof H!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(z,1,H,1),Y,!1,j)}revealRange(z,H=0,Y=!1,j=!0){this._revealRange(z,Y?1:0,j,H)}revealRangeInCenter(z,H=0){this._revealRange(z,1,!0,H)}revealRangeInCenterIfOutsideViewport(z,H=0){this._revealRange(z,2,!0,H)}revealRangeNearTop(z,H=0){this._revealRange(z,5,!0,H)}revealRangeNearTopIfOutsideViewport(z,H=0){this._revealRange(z,6,!0,H)}revealRangeAtTop(z,H=0){this._revealRange(z,3,!0,H)}_revealRange(z,H,Y,j){if(!u.Range.isIRange(z))throw new Error("Invalid arguments");this._sendRevealRange(u.Range.lift(z),H,Y,j)}setSelections(z,H="api",Y=0){if(this._modelData){if(!z||z.length===0)throw new Error("Invalid arguments");for(let j=0,Z=z.length;j<Z;j++)if(!f.Selection.isISelection(z[j]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(H,z,Y)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(z,H=1){if(this._modelData){if(typeof z!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:z},H)}}setScrollTop(z,H=1){if(this._modelData){if(typeof z!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:z},H)}}setScrollPosition(z,H=1){this._modelData&&this._modelData.viewModel.viewLayout.setScrollPosition(z,H)}hasPendingScrollAnimation(){return this._modelData?this._modelData.viewModel.viewLayout.hasPendingScrollAnimation():!1}saveViewState(){if(!this._modelData)return null;const z=this._contributions.saveViewState(),H=this._modelData.viewModel.saveCursorState(),Y=this._modelData.viewModel.saveState();return{cursorState:H,viewState:Y,contributionsState:z}}restoreViewState(z){if(!this._modelData||!this._modelData.hasRealView)return;const H=z;if(H&&H.cursorState&&H.viewState){const Y=H.cursorState;Array.isArray(Y)?Y.length>0&&this._modelData.viewModel.restoreCursorState(Y):this._modelData.viewModel.restoreCursorState([Y]),this._contributions.restoreViewState(H.contributionsState||{});const j=this._modelData.viewModel.reduceRestoreState(H.viewState);this._modelData.view.restoreState(j)}}handleInitialized(){var z;(z=this._getViewModel())===null||z===void 0||z.visibleLinesStabilized()}getContribution(z){return this._contributions.get(z)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let z=this.getActions();return z=z.filter(H=>H.isSupported()),z}getAction(z){return this._actions.get(z)||null}trigger(z,H,Y){switch(Y=Y||{},H){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(z);return;case"type":{const Z=Y;this._type(z,Z.text||"");return}case"replacePreviousChar":{const Z=Y;this._compositionType(z,Z.text||"",Z.replaceCharCnt||0,0,0);return}case"compositionType":{const Z=Y;this._compositionType(z,Z.text||"",Z.replacePrevCharCnt||0,Z.replaceNextCharCnt||0,Z.positionDelta||0);return}case"paste":{const Z=Y;this._paste(z,Z.text||"",Z.pasteOnNewLine||!1,Z.multicursorText||null,Z.mode||null);return}case"cut":this._cut(z);return}const j=this.getAction(H);if(j){Promise.resolve(j.run(Y)).then(void 0,y.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(z,H,Y)||this._triggerCommand(H,Y))}_triggerCommand(z,H){this._commandService.executeCommand(z,H)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(z){this._modelData&&(this._modelData.viewModel.endComposition(z),this._onDidCompositionEnd.fire())}_type(z,H){!this._modelData||H.length===0||(z==="keyboard"&&this._onWillType.fire(H),this._modelData.viewModel.type(H,z),z==="keyboard"&&this._onDidType.fire(H))}_compositionType(z,H,Y,j,Z){this._modelData&&this._modelData.viewModel.compositionType(H,Y,j,Z,z)}_paste(z,H,Y,j,Z){if(!this._modelData||H.length===0)return;const ee=this._modelData.viewModel,le=ee.getSelection().getStartPosition();ee.paste(H,Y,j,z);const ue=ee.getSelection().getStartPosition();z==="keyboard"&&this._onDidPaste.fire({range:new u.Range(le.lineNumber,le.column,ue.lineNumber,ue.column),languageId:Z})}_cut(z){this._modelData&&this._modelData.viewModel.cut(z)}_triggerEditorCommand(z,H,Y){const j=v.EditorExtensionsRegistry.getEditorCommand(H);return j?(Y=Y||{},Y.source=z,this._instantiationService.invokeFunction(Z=>{Promise.resolve(j.runEditorCommand(Z,this,Y)).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(z,H,Y){if(!this._modelData||this._configuration.options.get(90))return!1;let j;return Y?Array.isArray(Y)?j=()=>Y:j=Y:j=()=>null,this._modelData.viewModel.executeEdits(z,H,j),!0}executeCommand(z,H){this._modelData&&this._modelData.viewModel.executeCommand(H,z)}executeCommands(z,H){this._modelData&&this._modelData.viewModel.executeCommands(H,z)}createDecorationsCollection(z){return new Q(this,z)}changeDecorations(z){return this._modelData?this._modelData.model.changeDecorations(z,this._id):null}getLineDecorations(z){return this._modelData?this._modelData.model.getLineDecorations(z,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(z){return this._modelData?this._modelData.model.getDecorationsInRange(z,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(z,H){return this._modelData?z.length===0&&H.length===0?z:this._modelData.model.deltaDecorations(z,H,this._id):[]}removeDecorations(z){!this._modelData||z.length===0||this._modelData.model.changeDecorations(H=>{H.deltaDecorations(z,[])})}removeDecorationsByType(z){const H=this._decorationTypeKeysToIds[z];H&&this.deltaDecorations(H,[]),this._decorationTypeKeysToIds.hasOwnProperty(z)&&delete this._decorationTypeKeysToIds[z],this._decorationTypeSubtypes.hasOwnProperty(z)&&delete this._decorationTypeSubtypes[z]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(z){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(z)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(z)}delegateScrollFromMouseWheelEvent(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(z)}layout(z,H=!1){this._configuration.observeContainer(z),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(z){const H={widget:z,position:z.getPosition()};this._contentWidgets.hasOwnProperty(z.getId())&&console.warn("Overwriting a content widget with the same id:"+z.getId()),this._contentWidgets[z.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(H)}layoutContentWidget(z){const H=z.getId();if(this._contentWidgets.hasOwnProperty(H)){const Y=this._contentWidgets[H];Y.position=z.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(Y)}}removeContentWidget(z){const H=z.getId();if(this._contentWidgets.hasOwnProperty(H)){const Y=this._contentWidgets[H];delete this._contentWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(Y)}}addOverlayWidget(z){const H={widget:z,position:z.getPosition()};this._overlayWidgets.hasOwnProperty(z.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[z.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(H)}layoutOverlayWidget(z){const H=z.getId();if(this._overlayWidgets.hasOwnProperty(H)){const Y=this._overlayWidgets[H];Y.position=z.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(Y)}}removeOverlayWidget(z){const H=z.getId();if(this._overlayWidgets.hasOwnProperty(H)){const Y=this._overlayWidgets[H];delete this._overlayWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(Y)}}addGlyphMarginWidget(z){const H={widget:z,position:z.getPosition()};this._glyphMarginWidgets.hasOwnProperty(z.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[z.getId()]=H,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(H)}layoutGlyphMarginWidget(z){const H=z.getId();if(this._glyphMarginWidgets.hasOwnProperty(H)){const Y=this._glyphMarginWidgets[H];Y.position=z.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(Y)}}removeGlyphMarginWidget(z){const H=z.getId();if(this._glyphMarginWidgets.hasOwnProperty(H)){const Y=this._glyphMarginWidgets[H];delete this._glyphMarginWidgets[H],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(Y)}}changeViewZones(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(z)}getTargetAtClientPoint(z,H){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(z,H)}getScrolledVisiblePosition(z){if(!this._modelData||!this._modelData.hasRealView)return null;const H=this._modelData.model.validatePosition(z),Y=this._configuration.options,j=Y.get(143),Z=V._getVerticalOffsetForPosition(this._modelData,H.lineNumber,H.column)-this.getScrollTop(),ee=this._modelData.view.getOffsetForColumn(H.lineNumber,H.column)+j.glyphMarginWidth+j.lineNumbersWidth+j.decorationsWidth-this.getScrollLeft();return{top:Z,left:ee,height:Y.get(66)}}getOffsetForColumn(z,H){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(z,H)}render(z=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,z)}setAriaOptions(z){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(z)}applyFontInfo(z){(0,x.applyFontInfo)(z,this._configuration.options.get(50))}setBanner(z,H){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=z,this._configuration.setReservedHeight(z?H:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(z){if(!z){this._modelData=null;return}const H=[];this._domElement.setAttribute("data-mode-id",z.getLanguageId()),this._configuration.setIsDominatedByLongLines(z.isDominatedByLongLines()),this._configuration.setModelLineCount(z.getLineCount());const Y=z.onBeforeAttached(),j=new h.ViewModel(this._id,this._configuration,z,N.DOMLineBreaksComputerFactory.create(k.getWindow(this._domElement)),P.MonospaceLineBreaksComputerFactory.create(this._configuration.options),le=>k.scheduleAtNextAnimationFrame(k.getWindow(this._domElement),le),this.languageConfigurationService,this._themeService,Y);H.push(z.onWillDispose(()=>this.setModel(null))),H.push(j.onEvent(le=>{switch(le.kind){case 0:this._onDidContentSizeChange.fire(le);break;case 1:this._editorTextFocus.setValue(le.hasFocus);break;case 2:this._onDidScrollChange.fire(le);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(le.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 ue=[];for(let ve=0,Ce=le.selections.length;ve<Ce;ve++)ue[ve]=le.selections[ve].getPosition();const ce={position:ue[0],secondaryPositions:ue.slice(1),reason:le.reason,source:le.source};this._onDidChangeCursorPosition.fire(ce);const pe={selection:le.selections[0],secondarySelections:le.selections.slice(1),modelVersionId:le.modelVersionId,oldSelections:le.oldSelections,oldModelVersionId:le.oldModelVersionId,source:le.source,reason:le.reason};this._onDidChangeCursorSelection.fire(pe);break}case 7:this._onDidChangeModelDecorations.fire(le.event);break;case 8:this._domElement.setAttribute("data-mode-id",z.getLanguageId()),this._onDidChangeModelLanguage.fire(le.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(le.event);break;case 10:this._onDidChangeModelContent.fire(le.event);break;case 11:this._onDidChangeModelOptions.fire(le.event);break;case 12:this._onDidChangeModelTokens.fire(le.event);break}}));const[Z,ee]=this._createView(j);if(ee){this._domElement.appendChild(Z.domNode.domNode);let le=Object.keys(this._contentWidgets);for(let ue=0,ce=le.length;ue<ce;ue++){const pe=le[ue];Z.addContentWidget(this._contentWidgets[pe])}le=Object.keys(this._overlayWidgets);for(let ue=0,ce=le.length;ue<ce;ue++){const pe=le[ue];Z.addOverlayWidget(this._overlayWidgets[pe])}le=Object.keys(this._glyphMarginWidgets);for(let ue=0,ce=le.length;ue<ce;ue++){const pe=le[ue];Z.addGlyphMarginWidget(this._glyphMarginWidgets[pe])}Z.render(!1,!0),Z.domNode.domNode.setAttribute("data-uri",z.uri.toString())}this._modelData=new F(z,j,Z,ee,H,Y)}_createView(z){let H;this.isSimpleWidget?H={paste:(Z,ee,le,ue)=>{this._paste("keyboard",Z,ee,le,ue)},type:Z=>{this._type("keyboard",Z)},compositionType:(Z,ee,le,ue)=>{this._compositionType("keyboard",Z,ee,le,ue)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:H={paste:(Z,ee,le,ue)=>{const ce={text:Z,pasteOnNewLine:ee,multicursorText:le,mode:ue};this._commandService.executeCommand("paste",ce)},type:Z=>{const ee={text:Z};this._commandService.executeCommand("type",ee)},compositionType:(Z,ee,le,ue)=>{if(le||ue){const ce={text:Z,replacePrevCharCnt:ee,replaceNextCharCnt:le,positionDelta:ue};this._commandService.executeCommand("compositionType",ce)}else{const ce={text:Z,replaceCharCnt:ee};this._commandService.executeCommand("replacePreviousChar",ce)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const Y=new i.ViewUserInputEvents(z.coordinatesConverter);return Y.onKeyDown=Z=>this._onKeyDown.fire(Z),Y.onKeyUp=Z=>this._onKeyUp.fire(Z),Y.onContextMenu=Z=>this._onContextMenu.fire(Z),Y.onMouseMove=Z=>this._onMouseMove.fire(Z),Y.onMouseLeave=Z=>this._onMouseLeave.fire(Z),Y.onMouseDown=Z=>this._onMouseDown.fire(Z),Y.onMouseUp=Z=>this._onMouseUp.fire(Z),Y.onMouseDrag=Z=>this._onMouseDrag.fire(Z),Y.onMouseDrop=Z=>this._onMouseDrop.fire(Z),Y.onMouseDropCanceled=Z=>this._onMouseDropCanceled.fire(Z),Y.onMouseWheel=Z=>this._onMouseWheel.fire(Z),[new a.View(H,this._configuration,this._themeService.getColorTheme(),z,Y,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(z){z?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const z=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),z}_removeDecorationType(z){this._codeEditorService.removeDecorationType(z)}hasModel(){return this._modelData!==null}showDropIndicatorAt(z){const H=[{range:new u.Range(z.lineNumber,z.column,z.lineNumber,z.column),options:V.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(H),this.revealPosition(z,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(z,H){this._contextKeyService.createKey(z,H)}};e.CodeEditorWidget=q,q.dropIntoEditorDecorationOptions=l.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),e.CodeEditorWidget=q=V=ke([ge(3,w.IInstantiationService),ge(4,b.ICodeEditorService),ge(5,m.ICommandService),ge(6,C.IContextKeyService),ge(7,T.IThemeService),ge(8,I.INotificationService),ge(9,A.IAccessibilityService),ge(10,R.ILanguageConfigurationService),ge(11,O.ILanguageFeaturesService)],q);class ie extends S.Disposable{constructor(z){super(),this._emitterOptions=z,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(z){const H=z?2:1;this._value!==H&&(this._value=H,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=ie;class ae extends E.Emitter{constructor(z,H){super({deliveryQueue:H}),this._contributions=z}fire(z){this._contributions.onBeforeInteractionEvent(),super.fire(z)}}class ne extends S.Disposable{constructor(z,H){super(),this._editor=z,H.createKey("editorId",z.getId()),this._editorSimpleInput=s.EditorContextKeys.editorSimpleInput.bindTo(H),this._editorFocus=s.EditorContextKeys.focus.bindTo(H),this._textInputFocus=s.EditorContextKeys.textInputFocus.bindTo(H),this._editorTextFocus=s.EditorContextKeys.editorTextFocus.bindTo(H),this._tabMovesFocus=s.EditorContextKeys.tabMovesFocus.bindTo(H),this._editorReadonly=s.EditorContextKeys.readOnly.bindTo(H),this._inDiffEditor=s.EditorContextKeys.inDiffEditor.bindTo(H),this._editorColumnSelection=s.EditorContextKeys.columnSelection.bindTo(H),this._hasMultipleSelections=s.EditorContextKeys.hasMultipleSelections.bindTo(H),this._hasNonEmptySelection=s.EditorContextKeys.hasNonEmptySelection.bindTo(H),this._canUndo=s.EditorContextKeys.canUndo.bindTo(H),this._canRedo=s.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(Y=>this._tabMovesFocus.set(Y))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const z=this._editor.getOptions();this._tabMovesFocus.set(W.TabFocus.getTabFocusMode()),this._editorReadonly.set(z.get(90)),this._inDiffEditor.set(z.get(61)),this._editorColumnSelection.set(z.get(22))}_updateFromSelection(){const z=this._editor.getSelections();z?(this._hasMultipleSelections.set(z.length>1),this._hasNonEmptySelection.set(z.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 z=this._editor.getModel();this._canUndo.set(!!(z&&z.canUndo())),this._canRedo.set(!!(z&&z.canRedo()))}}class $ extends S.Disposable{constructor(z,H,Y){super(),this._editor=z,this._contextKeyService=H,this._languageFeaturesService=Y,this._langId=s.EditorContextKeys.languageId.bindTo(H),this._hasCompletionItemProvider=s.EditorContextKeys.hasCompletionItemProvider.bindTo(H),this._hasCodeActionsProvider=s.EditorContextKeys.hasCodeActionsProvider.bindTo(H),this._hasCodeLensProvider=s.EditorContextKeys.hasCodeLensProvider.bindTo(H),this._hasDefinitionProvider=s.EditorContextKeys.hasDefinitionProvider.bindTo(H),this._hasDeclarationProvider=s.EditorContextKeys.hasDeclarationProvider.bindTo(H),this._hasImplementationProvider=s.EditorContextKeys.hasImplementationProvider.bindTo(H),this._hasTypeDefinitionProvider=s.EditorContextKeys.hasTypeDefinitionProvider.bindTo(H),this._hasHoverProvider=s.EditorContextKeys.hasHoverProvider.bindTo(H),this._hasDocumentHighlightProvider=s.EditorContextKeys.hasDocumentHighlightProvider.bindTo(H),this._hasDocumentSymbolProvider=s.EditorContextKeys.hasDocumentSymbolProvider.bindTo(H),this._hasReferenceProvider=s.EditorContextKeys.hasReferenceProvider.bindTo(H),this._hasRenameProvider=s.EditorContextKeys.hasRenameProvider.bindTo(H),this._hasSignatureHelpProvider=s.EditorContextKeys.hasSignatureHelpProvider.bindTo(H),this._hasInlayHintsProvider=s.EditorContextKeys.hasInlayHintsProvider.bindTo(H),this._hasDocumentFormattingProvider=s.EditorContextKeys.hasDocumentFormattingProvider.bindTo(H),this._hasDocumentSelectionFormattingProvider=s.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(H),this._hasMultipleDocumentFormattingProvider=s.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(H),this._hasMultipleDocumentSelectionFormattingProvider=s.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(H),this._isInWalkThrough=s.EditorContextKeys.isInWalkThroughSnippet.bindTo(H);const j=()=>this._update();this._register(z.onDidChangeModel(j)),this._register(z.onDidChangeModelLanguage(j)),this._register(Y.completionProvider.onDidChange(j)),this._register(Y.codeActionProvider.onDidChange(j)),this._register(Y.codeLensProvider.onDidChange(j)),this._register(Y.definitionProvider.onDidChange(j)),this._register(Y.declarationProvider.onDidChange(j)),this._register(Y.implementationProvider.onDidChange(j)),this._register(Y.typeDefinitionProvider.onDidChange(j)),this._register(Y.hoverProvider.onDidChange(j)),this._register(Y.documentHighlightProvider.onDidChange(j)),this._register(Y.documentSymbolProvider.onDidChange(j)),this._register(Y.referenceProvider.onDidChange(j)),this._register(Y.renameProvider.onDidChange(j)),this._register(Y.documentFormattingEditProvider.onDidChange(j)),this._register(Y.documentRangeFormattingEditProvider.onDidChange(j)),this._register(Y.signatureHelpProvider.onDidChange(j)),this._register(Y.inlayHintsProvider.onDidChange(j)),j()}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 z=this._editor.getModel();if(!z){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(z.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(z)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(z)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(z)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(z)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(z)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(z)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(z)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(z)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(z)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(z)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(z)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(z)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(z)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(z)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(z)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(z)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(z)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(z).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(z).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(z).length>1),this._isInWalkThrough.set(z.uri.scheme===p.Schemas.walkThroughSnippet)})}}e.EditorModeContext=$;class J extends S.Disposable{constructor(z,H){super(),this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._hadFocus=void 0,this._hasDomElementFocus=!1,this._domFocusTracker=this._register(k.trackFocus(z)),this._overflowWidgetsDomNodeHasFocus=!1,this._register(this._domFocusTracker.onDidFocus(()=>{this._hasDomElementFocus=!0,this._update()})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasDomElementFocus=!1,this._update()})),H&&(this._overflowWidgetsDomNode=this._register(k.trackFocus(H)),this._register(this._overflowWidgetsDomNode.onDidFocus(()=>{this._overflowWidgetsDomNodeHasFocus=!0,this._update()})),this._register(this._overflowWidgetsDomNode.onDidBlur(()=>{this._overflowWidgetsDomNodeHasFocus=!1,this._update()})))}_update(){const z=this._hasDomElementFocus||this._overflowWidgetsDomNodeHasFocus;this._hadFocus!==z&&(this._hadFocus=z,this._onChange.fire(void 0))}hasFocus(){var z;return(z=this._hadFocus)!==null&&z!==void 0?z:!1}}class Q{get length(){return this._decorationIds.length}constructor(z,H){this._editor=z,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(H)&&H.length>0&&this.set(H)}onDidChange(z,H,Y){return this._editor.onDidChangeModelDecorations(j=>{this._isChangingDecorations||z.call(H,j)},Y)}getRange(z){return!this._editor.hasModel()||z>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[z])}getRanges(){if(!this._editor.hasModel())return[];const z=this._editor.getModel(),H=[];for(const Y of this._decorationIds){const j=z.getDecorationRange(Y);j&&H.push(j)}return H}has(z){return this._decorationIds.includes(z.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(z){try{this._isChangingDecorations=!0,this._editor.changeDecorations(H=>{this._decorationIds=H.deltaDecorations(this._decorationIds,z)})}finally{this._isChangingDecorations=!1}return this._decorationIds}append(z){let H=[];try{this._isChangingDecorations=!0,this._editor.changeDecorations(Y=>{H=Y.deltaDecorations([],z),this._decorationIds=this._decorationIds.concat(H)})}finally{this._isChangingDecorations=!1}return H}}const re=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),de=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function he(G){return re+encodeURIComponent(G.toString())+de}const me=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),X=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function U(G){return me+encodeURIComponent(G.toString())+X}(0,T.registerThemingParticipant)((G,z)=>{const H=G.getColor(g.editorErrorForeground);H&&z.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${he(H)}") repeat-x bottom left; }`);const Y=G.getColor(g.editorWarningForeground);Y&&z.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${he(Y)}") repeat-x bottom left; }`);const j=G.getColor(g.editorInfoForeground);j&&z.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${he(j)}") repeat-x bottom left; }`);const Z=G.getColor(g.editorHintForeground);Z&&z.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${U(Z)}") no-repeat bottom left; }`);const ee=G.getColor(o.editorUnnecessaryCodeOpacity);ee&&z.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ee.rgba.a}; }`)})}),define(se[259],oe([1,0,7,60,12,6,2,35,171,16,33,127,194,841,881,608,342,882,334,368,87,10,5,180,21,122,15,8,163,88,498,855,637,359,630,448]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P,N,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;let R=class extends T.DelegatingEditor{get onDidContentSizeChange(){return this._editors.onDidContentSizeChange}constructor(B,W,V,K,F,q,ie,ae){var ne;super(),this._domElement=B,this._parentContextKeyService=K,this._parentInstantiationService=F,this._audioCueService=ie,this._editorProgressService=ae,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,z=>this._options.onlyShowAccessibleDiffViewer.read(z)?!0:this._accessibleDiffViewerShouldBeVisible.read(z)),this._movedBlocksLinesPart=(0,p.observableValue)(this,void 0),this._layoutInfo=(0,p.derived)(this,z=>{var H,Y,j,Z,ee;const le=this._rootSizeObserver.width.read(z),ue=this._rootSizeObserver.height.read(z),ce=(H=this._sash.read(z))===null||H===void 0?void 0:H.sashLeft.read(z),pe=ce??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),ve=le-pe-((j=(Y=this._overviewRulerPart.read(z))===null||Y===void 0?void 0:Y.width)!==null&&j!==void 0?j:0),Ce=(ee=(Z=this._movedBlocksLinesPart.read(z))===null||Z===void 0?void 0:Z.width.read(z))!==null&&ee!==void 0?ee:0,Se=pe-Ce;return this.elements.original.style.width=Se+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=ve+"px",this.elements.modified.style.left=pe+"px",this._editors.original.layout({width:Se,height:ue},!0),this._editors.modified.layout({width:ve,height:ue},!0),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((z,H)=>z?.diff.read(H)),this.onDidUpdateDiff=E.Event.fromObservableLight(this._diffValue),q.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,S.toDisposable)(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new s.ObservableElementSizeObserver(this.elements.root,W.dimension)),this._rootSizeObserver.setAutomaticLayout((ne=W.automaticLayout)!==null&&ne!==void 0?ne:!1),this._options=new P.DiffEditorOptions(W),this._register((0,p.autorun)(z=>{this._options.setWidth(this._rootSizeObserver.width.read(z))})),this._contextKeyService.createKey(h.EditorContextKeys.isEmbeddedDiffEditor.key,!1),this._register((0,s.bindContextKey)(h.EditorContextKeys.isEmbeddedDiffEditor,this._contextKeyService,z=>this._options.isInEmbeddedEditor.read(z))),this._register((0,s.bindContextKey)(h.EditorContextKeys.comparingMovedCode,this._contextKeyService,z=>{var H;return!!(!((H=this._diffModel.read(z))===null||H===void 0)&&H.movedTextToCompare.read(z))})),this._register((0,s.bindContextKey)(h.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,this._contextKeyService,z=>this._options.couldShowInlineViewBecauseOfSize.read(z))),this._register((0,s.bindContextKey)(h.EditorContextKeys.hasChanges,this._contextKeyService,z=>{var H,Y,j;return((j=(Y=(H=this._diffModel.read(z))===null||H===void 0?void 0:H.diff.read(z))===null||Y===void 0?void 0:Y.mappings.length)!==null&&j!==void 0?j:0)>0})),this._editors=this._register(this._instantiationService.createInstance(A.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,V,(z,H,Y,j)=>this._createInnerEditor(z,H,Y,j))),this._overviewRulerPart=(0,_.derivedDisposable)(this,z=>this._options.renderOverviewRuler.read(z)?this._instantiationService.createInstance((0,s.readHotReloadableExport)(d.OverviewRulerFeature,z),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(H=>H.modifiedEditor)):void 0).recomputeInitiallyAndOnChange(this._store),this._sash=(0,_.derivedDisposable)(this,z=>{const H=this._options.renderSideBySide.read(z);return this.elements.root.classList.toggle("side-by-side",H),H?new r.DiffEditorSash(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((Y,j)=>{var Z,ee;return Y-((ee=(Z=this._overviewRulerPart.read(j))===null||Z===void 0?void 0:Z.width)!==null&&ee!==void 0?ee:0)})},this._boundarySashes):void 0}).recomputeInitiallyAndOnChange(this._store);const $=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,s.readHotReloadableExport)(u.HideUnchangedRegionsFeature,z),this._editors,this._diffModel,this._options)).recomputeInitiallyAndOnChange(this._store);(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,s.readHotReloadableExport)(t.DiffEditorDecorations,z),this._editors,this._diffModel,this._options,this)).recomputeInitiallyAndOnChange(this._store);const J=new Set,Q=new Set;let re=!1;const de=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,s.readHotReloadableExport)(f.DiffEditorViewZones,z),(0,L.getWindow)(this._domElement),this._editors,this._diffModel,this._options,this,()=>re||$.get().isUpdatingHiddenAreas,J,Q)).recomputeInitiallyAndOnChange(this._store),he=(0,p.derived)(this,z=>{const H=de.read(z).viewZones.read(z).orig,Y=$.read(z).viewZones.read(z).origViewZones;return H.concat(Y)}),me=(0,p.derived)(this,z=>{const H=de.read(z).viewZones.read(z).mod,Y=$.read(z).viewZones.read(z).modViewZones;return H.concat(Y)});this._register((0,s.applyViewZones)(this._editors.original,he,z=>{re=z},J));let X;this._register((0,s.applyViewZones)(this._editors.modified,me,z=>{re=z,re?X=a.StableEditorScrollState.capture(this._editors.modified):(X?.restore(this._editors.modified),X=void 0)},Q)),this._accessibleDiffViewer=(0,_.derivedDisposable)(this,z=>this._instantiationService.createInstance((0,s.readHotReloadableExport)(n.AccessibleDiffViewer,z),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(H,Y)=>this._accessibleDiffViewerShouldBeVisible.set(H,Y),this._options.onlyShowAccessibleDiffViewer.map(H=>!H),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((H,Y)=>{var j;return(j=H?.diff.read(Y))===null||j===void 0?void 0:j.mappings.map(Z=>Z.lineRangeMapping)}),this._editors)).recomputeInitiallyAndOnChange(this._store);const U=this._accessibleDiffViewerVisible.map(z=>z?"hidden":"visible");this._register((0,s.applyStyle)(this.elements.modified,{visibility:U})),this._register((0,s.applyStyle)(this.elements.original,{visibility:U})),this._createDiffEditorContributions(),q.addDiffEditor(this),this._register((0,p.recomputeInitiallyAndOnChange)(this._layoutInfo)),(0,_.derivedDisposable)(this,z=>new((0,s.readHotReloadableExport)(c.MovedBlocksLinesFeature,z))(this.elements.root,this._diffModel,this._layoutInfo.map(H=>H.originalEditor),this._layoutInfo.map(H=>H.modifiedEditor),this._editors)).recomputeInitiallyAndOnChange(this._store,z=>{this._movedBlocksLinesPart.set(z,void 0)}),this._register((0,s.applyStyle)(this.elements.overlay,{width:this._layoutInfo.map((z,H)=>z.originalEditor.width+(this._options.renderSideBySide.read(H)?0:z.modifiedEditor.width)),visibility:(0,p.derived)(z=>{var H,Y;return this._options.hideUnchangedRegions.read(z)&&((Y=(H=this._diffModel.read(z))===null||H===void 0?void 0:H.diff.read(z))===null||Y===void 0?void 0:Y.mappings.length)===0?"visible":"hidden"})})),this._register(E.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,z=>{var H,Y;if(z?.reason===3){const j=(Y=(H=this._diffModel.get())===null||H===void 0?void 0:H.diff.get())===null||Y===void 0?void 0:Y.mappings.find(Z=>Z.lineRangeMapping.modified.contains(z.position.lineNumber));j?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):j?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):j&&this._audioCueService.playAudioCue(m.AudioCue.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const G=this._diffModel.map(this,(z,H)=>{if(z)return z.diff.read(H)===void 0&&!z.isDiffUpToDate.read(H)});this._register((0,p.autorunWithStore)((z,H)=>{if(G.read(z)===!0){const Y=this._editorProgressService.show(!0,1e3);H.add((0,S.toDisposable)(()=>Y.done()))}})),this._register((0,S.toDisposable)(()=>{var z;this._shouldDisposeDiffModel&&((z=this._diffModel.get())===null||z===void 0||z.dispose())})),this._register(new M.RevertButtonsFeature(this._editors,this._diffModel,this._options,this))}_createInnerEditor(B,W,V,K){return B.createInstance(i.CodeEditorWidget,W,V,K)}_createDiffEditorContributions(){const B=v.EditorExtensionsRegistry.getDiffEditorContributions();for(const W of B)try{this._register(this._instantiationService.createInstance(W.ctor,this))}catch(V){(0,y.onUnexpectedError)(V)}}get _targetEditor(){return this._editors.modified}getEditorType(){return g.EditorType.IDiffEditor}layout(B){this._rootSizeObserver.observe(B)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var B;const W=this._editors.original.saveViewState(),V=this._editors.modified.saveViewState();return{original:W,modified:V,modelState:(B=this._diffModel.get())===null||B===void 0?void 0:B.serializeState()}}restoreViewState(B){var W;if(B&&B.original&&B.modified){const V=B;this._editors.original.restoreViewState(V.original),this._editors.modified.restoreViewState(V.modified),V.modelState&&((W=this._diffModel.get())===null||W===void 0||W.restoreSerializedState(V.modelState))}}handleInitialized(){this._editors.original.handleInitialized(),this._editors.modified.handleInitialized()}createViewModel(B){return this._instantiationService.createInstance(N.DiffEditorViewModel,B,this._options)}getModel(){var B,W;return(W=(B=this._diffModel.get())===null||B===void 0?void 0:B.model)!==null&&W!==void 0?W:null}setModel(B,W){!B&&this._diffModel.get()&&this._accessibleDiffViewer.get().close();const V=B?"model"in B?{model:B,shouldDispose:!1}:{model:this.createViewModel(B),shouldDispose:!0}:void 0;this._diffModel.get()!==V?.model&&(0,p.subtransaction)(W,K=>{var F;p.observableFromEvent.batchEventsGlobally(K,()=>{this._editors.original.setModel(V?V.model.model.original:null),this._editors.modified.setModel(V?V.model.model.modified:null)});const q=this._diffModel.get(),ie=this._shouldDisposeDiffModel;this._shouldDisposeDiffModel=(F=V?.shouldDispose)!==null&&F!==void 0?F:!1,this._diffModel.set(V?.model,K),ie&&q?.dispose()})}updateOptions(B){this._options.updateOptions(B)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var B;const W=(B=this._diffModel.get())===null||B===void 0?void 0:B.diff.get();return W?x(W):null}revert(B){if(B.innerChanges){this.revertRangeMappings(B.innerChanges);return}const W=this._diffModel.get();!W||!W.isDiffUpToDate.get()||this._editors.modified.executeEdits("diffEditor",[{range:B.modified.toExclusiveRange(),text:W.model.original.getValueInRange(B.original.toExclusiveRange())}])}revertRangeMappings(B){const W=this._diffModel.get();if(!W||!W.isDiffUpToDate.get())return;const V=B.map(K=>({range:K.modifiedRange,text:W.model.original.getValueInRange(K.originalRange)}));this._editors.modified.executeEdits("diffEditor",V)}_goTo(B){this._editors.modified.setPosition(new l.Position(B.lineRangeMapping.modified.startLineNumber,1)),this._editors.modified.revealRangeInCenter(B.lineRangeMapping.modified.toExclusiveRange())}goToDiff(B){var W,V,K,F;const q=(V=(W=this._diffModel.get())===null||W===void 0?void 0:W.diff.get())===null||V===void 0?void 0:V.mappings;if(!q||q.length===0)return;const ie=this._editors.modified.getPosition().lineNumber;let ae;B==="next"?ae=(K=q.find(ne=>ne.lineRangeMapping.modified.startLineNumber>ie))!==null&&K!==void 0?K:q[0]:ae=(F=(0,k.findLast)(q,ne=>ne.lineRangeMapping.modified.startLineNumber<ie))!==null&&F!==void 0?F:q[q.length-1],this._goTo(ae),ae.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineDeleted,{source:"diffEditor.goToDiff"}):ae.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(m.AudioCue.diffLineInserted,{source:"diffEditor.goToDiff"}):ae&&this._audioCueService.playAudioCue(m.AudioCue.diffLineModified,{source:"diffEditor.goToDiff"})}revealFirstDiff(){const B=this._diffModel.get();B&&this.waitForDiff().then(()=>{var W;const V=(W=B.diff.get())===null||W===void 0?void 0:W.mappings;!V||V.length===0||this._goTo(V[0])})}accessibleDiffViewerNext(){this._accessibleDiffViewer.get().next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.get().prev()}async waitForDiff(){const B=this._diffModel.get();B&&await B.waitForDiff()}mapToOtherSide(){var B,W;const V=this._editors.modified.hasWidgetFocus(),K=V?this._editors.modified:this._editors.original,F=V?this._editors.original:this._editors.modified;let q;const ie=K.getSelection();if(ie){const ae=(W=(B=this._diffModel.get())===null||B===void 0?void 0:B.diff.get())===null||W===void 0?void 0:W.mappings.map(ne=>V?ne.lineRangeMapping.flip():ne.lineRangeMapping);if(ae){const ne=(0,s.translatePosition)(ie.getStartPosition(),ae),$=(0,s.translatePosition)(ie.getEndPosition(),ae);q=o.Range.plusRange(ne,$)}}return{destination:F,destinationSelection:q}}switchSide(){const{destination:B,destinationSelection:W}=this.mapToOtherSide();B.focus(),W&&B.setSelection(W)}exitCompareMove(){const B=this._diffModel.get();B&&B.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var B;const W=(B=this._diffModel.get())===null||B===void 0?void 0:B.unchangedRegions.get();W&&(0,p.transaction)(V=>{for(const K of W)K.collapseAll(V)})}showAllUnchangedRegions(){var B;const W=(B=this._diffModel.get())===null||B===void 0?void 0:B.unchangedRegions.get();W&&(0,p.transaction)(V=>{for(const K of W)K.showAll(V)})}};e.DiffEditorWidget=R,e.DiffEditorWidget=R=ke([ge(3,C.IContextKeyService),ge(4,w.IInstantiationService),ge(5,b.ICodeEditorService),ge(6,m.IAudioCueService),ge(7,I.IEditorProgressService)],R);function x(O){return O.mappings.map(B=>{const W=B.lineRangeMapping;let V,K,F,q,ie=W.innerChanges;return W.original.isEmpty?(V=W.original.startLineNumber-1,K=0,ie=void 0):(V=W.original.startLineNumber,K=W.original.endLineNumberExclusive-1),W.modified.isEmpty?(F=W.modified.startLineNumber-1,q=0,ie=void 0):(F=W.modified.startLineNumber,q=W.modified.endLineNumberExclusive-1),{originalStartLineNumber:V,originalEndLineNumber:K,modifiedStartLineNumber:F,modifiedEndLineNumber:q,charChanges:ie?.map(ae=>({originalStartLineNumber:ae.originalRange.startLineNumber,originalStartColumn:ae.originalRange.startColumn,originalEndLineNumber:ae.originalRange.endLineNumber,originalEndColumn:ae.originalRange.endColumn,modifiedStartLineNumber:ae.modifiedRange.startLineNumber,modifiedStartColumn:ae.modifiedRange.startColumn,modifiedEndLineNumber:ae.modifiedRange.endLineNumber,modifiedEndColumn:ae.modifiedRange.endColumn}))}})}}),define(se[886],oe([1,0,7,26,16,33,259,21,626,30,25,27,15,258]),function(te,e,L,k,y,E,S,p,_,v,b,a,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:(0,_.localize2)(5,"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(a.IConfigurationService),T=!I.getValue("diffEditor.hideUnchangedRegions.enabled");I.updateValue("diffEditor.hideUnchangedRegions.enabled",T)}}e.ToggleCollapseUnchangedRegions=n,(0,v.registerAction2)(n);class t extends v.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:(0,_.localize2)(6,"Toggle Show Moved Code Blocks"),precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...D){const I=w.get(a.IConfigurationService),T=!I.getValue("diffEditor.experimental.showMoves");I.updateValue("diffEditor.experimental.showMoves",T)}}e.ToggleShowMovedCodeBlocks=t,(0,v.registerAction2)(t);class r extends v.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:(0,_.localize2)(7,"Toggle Use Inline View When Space Is Limited"),precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...D){const I=w.get(a.IConfigurationService),T=!I.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");I.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",T)}}e.ToggleUseInlineViewWhenSpaceIsLimited=r,(0,v.registerAction2)(r),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new r().desc.id,title:(0,_.localize)(0,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,_.localize)(1,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,_.localize)(2,null),original:"Diff Editor"};class f extends y.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:(0,_.localize2)(8,"Switch Side"),icon:k.Codicon.arrowSwap,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,I){const T=h(w);if(T instanceof S.DiffEditorWidget){if(I&&I.dryRun)return{destinationSelection:T.mapToOtherSide().destinationSelection};T.switchSide()}}}e.SwitchSide=f,(0,v.registerAction2)(f);class c extends y.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:(0,_.localize2)(9,"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 T=h(w);T instanceof S.DiffEditorWidget&&T.exitCompareMove()}}e.ExitCompareMove=c,(0,v.registerAction2)(c);class d extends y.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:(0,_.localize2)(10,"Collapse All Unchanged Regions"),icon:k.Codicon.fold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,...I){const T=h(w);T instanceof S.DiffEditorWidget&&T.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=d,(0,v.registerAction2)(d);class s extends y.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:(0,_.localize2)(11,"Show All Unchanged Regions"),icon:k.Codicon.unfold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,D,...I){const T=h(w);T instanceof S.DiffEditorWidget&&T.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=s,(0,v.registerAction2)(s);const l={value:(0,_.localize)(3,null),original:"Accessible Diff Viewer"};class o extends v.Action2{constructor(){super({id:o.id,title:(0,_.localize2)(12,"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=o,o.id="editor.action.accessibleDiffViewer.next",v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:o.id,title:(0,_.localize)(4,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:(0,_.localize2)(13,"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){const D=C.get(E.ICodeEditorService).listDiffEditors(),I=(0,L.getActiveElement)();if(I)for(const T of D){const A=T.getContainerDomNode();if(m(A,I))return T}return null}e.findFocusedDiffEditor=h;function m(C,w){let D=w;for(;D;){if(D===C)return!0;D=D.parentElement}return!1}b.CommandsRegistry.registerCommandAlias("editor.action.diffReview.next",o.id),(0,v.registerAction2)(o),b.CommandsRegistry.registerCommandAlias("editor.action.diffReview.prev",g.id),(0,v.registerAction2)(g)}),define(se[168],oe([1,0,55,33,194,32,18,69,25,15,8,50,23]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedCodeEditorWidget=void 0;let n=class extends y.CodeEditorWidget{constructor(r,u,f,c,d,s,l,o,g,h,m,C,w){super(r,{...c.getRawOptions(),overflowWidgetsDomNode:c.getOverflowWidgetsDomNode()},f,d,s,l,o,g,h,m,C,w),this._parentEditor=c,this._overwriteOptions=u,super.updateOptions(this._overwriteOptions),this._register(c.onDidChangeConfiguration(D=>this._onParentConfigurationChanged(D)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(r){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(r){L.mixin(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=n,e.EmbeddedCodeEditorWidget=n=ke([ge(4,b.IInstantiationService),ge(5,k.ICodeEditorService),ge(6,_.ICommandService),ge(7,v.IContextKeyService),ge(8,i.IThemeService),ge(9,a.INotificationService),ge(10,p.IAccessibilityService),ge(11,E.ILanguageConfigurationService),ge(12,S.ILanguageFeaturesService)],n)}),define(se[374],oe([1,0,7,229,26,2,35,110,259,373,30,8,578]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,s){super(),this._container=f,this._overflowWidgetsDomNode=c,this._workbenchUIElementFactory=d,this._instantiationService=s,this._viewModel=(0,p.observableValue)(this,void 0),this._collapsed=(0,S.derived)(this,o=>{var g;return(g=this._viewModel.read(o))===null||g===void 0?void 0:g.collapsed.read(o)}),this._editorContentHeight=(0,p.observableValue)(this,500),this.contentHeight=(0,S.derived)(this,o=>(this._collapsed.read(o)?0:this._editorContentHeight.read(o))+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,S.derived)(this,o=>{const g=this._modifiedContentWidth.read(o)-this._modifiedWidth.read(o),h=this._originalContentWidth.read(o)-this._originalWidth.read(o);return g>h?{maxScroll:g,width:this._modifiedWidth.read(o)}:{maxScroll:h,width:this._originalWidth.read(o)}}),this._elements=(0,L.h)("div.multiDiffEntry",[(0,L.h)("div.header@header",[(0,L.h)("div.collapse-button@collapseButton"),(0,L.h)("div.file-path",[(0,L.h)("div.title.modified.show-file-icons@primaryPath",[]),(0,L.h)("div.status.deleted@status",["R"]),(0,L.h)("div.title.original.show-file-icons@secondaryPath",[])]),(0,L.h)("div.actions@actions")]),(0,L.h)("div.editorParent",[(0,L.h)("div.editorContainer@editor")])]),this.editor=this._register(this._instantiationService.createInstance(_.DiffEditorWidget,this._elements.editor,{overflowWidgetsDomNode:this._overflowWidgetsDomNode},{})),this.isModifedFocused=r(this.editor.getModifiedEditor()),this.isOriginalFocused=r(this.editor.getOriginalEditor()),this.isFocused=(0,S.derived)(this,o=>this.isModifedFocused.read(o)||this.isOriginalFocused.read(o)),this._resourceLabel=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.primaryPath)):void 0,this._resourceLabel2=this._workbenchUIElementFactory.createResourceLabel?this._register(this._workbenchUIElementFactory.createResourceLabel(this._elements.secondaryPath)):void 0,this._dataStore=new E.DisposableStore,this._headerHeight=38;const l=new k.Button(this._elements.collapseButton,{});this._register((0,S.autorun)(o=>{l.element.className="",l.icon=this._collapsed.read(o)?y.Codicon.chevronRight:y.Codicon.chevronDown})),this._register(l.onDidClick(()=>{var o;(o=this._viewModel.get())===null||o===void 0||o.collapsed.set(!this._collapsed.get(),void 0)})),this._register((0,S.autorun)(o=>{this._elements.editor.style.display=this._collapsed.read(o)?"none":"block"})),this.editor.getModifiedEditor().onDidLayoutChange(o=>{const g=this.editor.getModifiedEditor().getLayoutInfo().contentWidth;this._modifiedWidth.set(g,void 0)}),this.editor.getOriginalEditor().onDidLayoutChange(o=>{const g=this.editor.getOriginalEditor().getLayoutInfo().contentWidth;this._originalWidth.set(g,void 0)}),this._register(this.editor.onDidContentSizeChange(o=>{(0,p.globalTransaction)(g=>{this._editorContentHeight.set(o.contentHeight,g),this._modifiedContentWidth.set(this.editor.getModifiedEditor().getContentWidth(),g),this._originalContentWidth.set(this.editor.getOriginalEditor().getContentWidth(),g)})})),this._register((0,S.autorun)(o=>{const g=this.isFocused.read(o);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 o;return(o=this._viewModel.get())===null||o===void 0?void 0:o.modifiedUri})),menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:o=>o.startsWith("navigation")}}))}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(s){return{...s,scrollBeyondLastLine:!1,hideUnchangedRegions:{enabled:!0},scrollbar:{vertical:"hidden",horizontal:"hidden",handleMouseWheel:!1,useShadows:!1},renderOverviewRuler:!1,fixedOverflowWidgets:!0,overviewRulerBorder:!1}}const d=f.viewModel.entry.value;d.onOptionsDidChange&&this._dataStore.add(d.onOptionsDidChange(()=>{var s;this.editor.updateOptions(c((s=d.options)!==null&&s!==void 0?s:{}))})),(0,p.globalTransaction)(s=>{var l,o,g,h;(l=this._resourceLabel)===null||l===void 0||l.setUri((o=f.viewModel.modifiedUri)!==null&&o!==void 0?o:f.viewModel.originalUri,{strikethrough:f.viewModel.modifiedUri===void 0});let m=!1,C=!1,w=!1,D="";f.viewModel.modifiedUri&&f.viewModel.originalUri&&f.viewModel.modifiedUri.path!==f.viewModel.originalUri.path?(D="R",m=!0):f.viewModel.modifiedUri?f.viewModel.originalUri||(D="A",w=!0):(D="D",C=!0),this._elements.status.classList.toggle("renamed",m),this._elements.status.classList.toggle("deleted",C),this._elements.status.classList.toggle("added",w),this._elements.status.innerText=D,(g=this._resourceLabel2)===null||g===void 0||g.setUri(m?f.viewModel.originalUri:void 0,{strikethrough:!0}),this._dataStore.clear(),this._viewModel.set(f.viewModel,s),this.editor.setModel(f.viewModel.diffEditorViewModel,s),this.editor.updateOptions(c((h=d.options)!==null&&h!==void 0?h:{}))})}render(f,c,d,s){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,s.start-f.start));this._elements.header.style.transform=`translateY(${l}px)`,(0,p.globalTransaction)(o=>{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=ke([ge(3,a.IInstantiationService)],t);function r(u){return(0,S.observableFromEvent)(f=>{const c=new E.DisposableStore;return c.add(u.onDidFocusEditorWidget(()=>f(!0))),c.add(u.onDidBlurEditorWidget(()=>f(!1))),c},()=>u.hasWidgetFocus())}}),define(se[887],oe([1,0,7,77,60,2,35,110,147,87,73,8,374,499,15,163,21,24,452]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidgetImpl=void 0;let c=class extends E.Disposable{constructor(l,o,g,h,m,C){super(),this._element=l,this._dimension=o,this._viewModel=g,this._workbenchUIElementFactory=h,this._parentContextKeyService=m,this._parentInstantiationService=C,this._elements=(0,L.h)("div.monaco-component.multiDiffEditor",[(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(D=>{const I=this._instantiationService.createInstance(i.DiffEditorItemTemplate,this._elements.content,this._elements.overflowWidgetsDomNode,this._workbenchUIElementFactory);return I.setData(D),I})),this._scrollable=this._register(new _.Scrollable({forceIntegerValues:!1,scheduleAtNextAnimationFrame:D=>(0,L.scheduleAtNextAnimationFrame)((0,L.getWindow)(this._element),D),smoothScrollDuration:100})),this._scrollableElement=this._register(new k.SmoothScrollableElement(this._elements.root,{vertical:1,horizontal:1,useShadows:!1},this._scrollable)),this.scrollTop=(0,S.observableFromEvent)(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollTop),this.scrollLeft=(0,S.observableFromEvent)(this._scrollableElement.onScroll,()=>this._scrollableElement.getScrollPosition().scrollLeft),this._viewItems=(0,S.derivedWithStore)(this,(D,I)=>{const T=this._viewModel.read(D);return T?T.items.read(D).map(P=>{var N;const M=I.add(new d(P,this._objectPool,this.scrollLeft)),R=(N=this._lastDocStates)===null||N===void 0?void 0:N[M.getKey()];return R&&(0,p.transaction)(x=>{M.setViewState(R,x)}),M}):[]}),this._spaceBetweenPx=10,this._totalHeight=this._viewItems.map(this,(D,I)=>D.reduce((T,A)=>T+A.contentHeight.read(I)+this._spaceBetweenPx,0)),this.activeDiffItem=(0,S.derived)(this,D=>this._viewItems.read(D).find(I=>{var T;return(T=I.template.read(D))===null||T===void 0?void 0:T.isFocused.read(D)})),this.lastActiveDiffItem=(0,S.derivedObservableWithCache)((D,I)=>{var T;return(T=this.activeDiffItem.read(D))!==null&&T!==void 0?T:I}),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._element)),this._instantiationService=this._parentInstantiationService.createChild(new r.ServiceCollection([t.IContextKeyService,this._contextKeyService])),this._lastDocStates={},this._contextKeyService.createKey(u.EditorContextKeys.inMultiDiffEditor.key,!0),this._register((0,S.autorunWithStore)((D,I)=>{const T=this._viewModel.read(D);if(T&&T.contextKeys)for(const[A,P]of Object.entries(T.contextKeys)){const N=this._contextKeyService.createKey(A,void 0);N.set(P),I.add((0,E.toDisposable)(()=>N.reset()))}}));const w=this._parentContextKeyService.createKey(u.EditorContextKeys.multiDiffEditorAllCollapsed.key,!1);this._register((0,S.autorun)(D=>{const I=this._viewModel.read(D);if(I){const T=I.items.read(D).every(A=>A.collapsed.read(D));w.set(T)}})),this._register((0,S.autorun)(D=>{const I=this.lastActiveDiffItem.read(D);(0,p.transaction)(T=>{var A;(A=this._viewModel.read(D))===null||A===void 0||A.activeDiffItem.set(I?.viewModel,T)})})),this._register((0,S.autorun)(D=>{const I=this._dimension.read(D);this._sizeObserver.observe(I)})),this._elements.content.style.position="relative",this._register((0,S.autorun)(D=>{const I=this._sizeObserver.height.read(D);this._elements.root.style.height=`${I}px`;const T=this._totalHeight.read(D);this._elements.content.style.height=`${T}px`;const A=this._sizeObserver.width.read(D);let P=A;const N=this._viewItems.read(D),M=(0,y.findFirstMaxBy)(N,R=>R.maxScroll.read(D).maxScroll);if(M){const R=M.maxScroll.read(D);P=A+R.maxScroll}this._scrollableElement.setScrollDimensions({width:A,height:I,scrollHeight:T,scrollWidth:P})})),l.replaceChildren(this._scrollableElement.getDomNode()),this._register((0,E.toDisposable)(()=>{l.replaceChildren()})),this._register(this._register((0,S.autorun)(D=>{(0,p.globalTransaction)(I=>{this.render(D)})})))}render(l){const o=this.scrollTop.read(l);let g=0,h=0,m=0;const C=this._sizeObserver.height.read(l),w=b.OffsetRange.ofStartAndLength(o,C),D=this._sizeObserver.width.read(l);for(const I of this._viewItems.read(l)){const T=I.contentHeight.read(l),A=Math.min(T,C),P=b.OffsetRange.ofStartAndLength(h,A),N=b.OffsetRange.ofStartAndLength(m,T);if(N.isBefore(w))g-=T-A,I.hide();else if(N.isAfter(w))I.hide();else{const M=Math.max(0,Math.min(w.start-N.start,T-A));g-=M;const R=b.OffsetRange.ofStartAndLength(o+g,C);I.render(P,M,D,R)}h+=A+this._spaceBetweenPx,m+=T+this._spaceBetweenPx}this._elements.content.style.transform=`translateY(${-(o+g)}px)`}};e.MultiDiffEditorWidgetImpl=c,e.MultiDiffEditorWidgetImpl=c=ke([ge(4,t.IContextKeyService),ge(5,a.IInstantiationService)],c);class d extends E.Disposable{constructor(l,o,g){super(),this.viewModel=l,this._objectPool=o,this._scrollLeft=g,this._templateRef=this._register((0,p.disposableObservableValue)(this,void 0)),this.contentHeight=(0,S.derived)(this,h=>{var m,C,w;return(w=(C=(m=this._templateRef.read(h))===null||m===void 0?void 0:m.object.contentHeight)===null||C===void 0?void 0:C.read(h))!==null&&w!==void 0?w:this.viewModel.lastTemplateData.read(h).contentHeight}),this.maxScroll=(0,S.derived)(this,h=>{var m,C;return(C=(m=this._templateRef.read(h))===null||m===void 0?void 0:m.object.maxScroll.read(h))!==null&&C!==void 0?C:{maxScroll:0,scrollWidth:0}}),this.template=(0,S.derived)(this,h=>{var m;return(m=this._templateRef.read(h))===null||m===void 0?void 0:m.object}),this._isHidden=(0,S.observableValue)(this,!1),this._register((0,S.autorun)(h=>{var m;const C=this._scrollLeft.read(h);(m=this._templateRef.read(h))===null||m===void 0||m.object.setScrollLeft(C)})),this._register((0,S.autorun)(h=>{const m=this._templateRef.read(h);!m||!this._isHidden.read(h)||m.object.isFocused.read(h)||this._clear()}))}dispose(){this._clear(),super.dispose()}toString(){var l;return`VirtualViewItem(${(l=this.viewModel.entry.value.modified)===null||l===void 0?void 0:l.uri.toString()})`}getKey(){return this.viewModel.getKey()}setViewState(l,o){var g;this.viewModel.collapsed.set(l.collapsed,o),this._updateTemplateData(o);const h=this.viewModel.lastTemplateData.get(),m=(g=l.selections)===null||g===void 0?void 0:g.map(f.Selection.liftSelection);this.viewModel.lastTemplateData.set({...h,selections:m},o);const C=this._templateRef.get();C&&m&&C.object.editor.setSelections(m)}_updateTemplateData(l){var o;const g=this._templateRef.get();g&&this.viewModel.lastTemplateData.set({contentHeight:g.object.contentHeight.get(),selections:(o=g.object.editor.getSelections())!==null&&o!==void 0?o:void 0},l)}_clear(){const l=this._templateRef.get();l&&(0,p.transaction)(o=>{this._updateTemplateData(o),l.object.hide(),this._templateRef.set(void 0,o)})}hide(){this._isHidden.set(!0,void 0)}render(l,o,g,h){this._isHidden.set(!1,void 0);let m=this._templateRef.get();if(!m){m=this._objectPool.getUnusedObj(new i.TemplateData(this.viewModel)),this._templateRef.set(m,void 0);const C=this.viewModel.lastTemplateData.get().selections;C&&m.object.editor.setSelections(C)}m.object.render(l,g,o,h)}}}),define(se[888],oe([1,0,2,35,87,887,8,374,835]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiDiffEditorWidget=void 0;let _=class extends L.Disposable{constructor(b,a,i){super(),this._element=b,this._workbenchUIElementFactory=a,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=_,e.MultiDiffEditorWidget=_=ke([ge(2,S.IInstantiationService)],_)}),define(se[889],oe([1,0,14,2,16,10,5,24,21,41,38,650,30,29,23,454]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=(0,n.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},a.localize(0,null));class u extends y.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:a.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(o,g){var h;(h=s.get(g))===null||h===void 0||h.jumpToBracket()}}class f extends y.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:a.localize(2,null),alias:"Select to Bracket",precondition:void 0,metadata:{description:a.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(o,g,h){var m;let C=!0;h&&h.selectBrackets===!1&&(C=!1),(m=s.get(g))===null||m===void 0||m.selectToBracket(C)}}class c extends y.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:a.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(o,g){var h;(h=s.get(g))===null||h===void 0||h.removeBrackets(this.id)}}class d{constructor(o,g,h){this.position=o,this.brackets=g,this.options=h}}class s extends k.Disposable{static get(o){return o.getContribution(s.ID)}constructor(o){super(),this._editor=o,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(o.onDidChangeCursorPosition(g=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModelContent(g=>{this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModel(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModelLanguageConfiguration(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeConfiguration(g=>{g.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(o.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(o.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const o=this._editor.getModel(),g=this._editor.getSelections().map(h=>{const m=h.getStartPosition(),C=o.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=o.bracketPairs.findEnclosingBrackets(m);if(D)w=D[1].getStartPosition();else{const I=o.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(o){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 T=g.bracketPairs.findNextBracket(C);T&&T.range&&(w=g.bracketPairs.matchBracket(T.range.getStartPosition()))}let D=null,I=null;if(w){w.sort(S.Range.compareRangesUsingStarts);const[T,A]=w;if(D=o?T.getStartPosition():T.getEndPosition(),I=o?A.getEndPosition():A.getStartPosition(),A.containsPosition(C)){const P=D;D=I,I=P}}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(o){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(o,[{range:C[0],text:""},{range:C[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const o=[];let g=0;for(const h of this._lastBracketsData){const m=h.brackets;m&&(o[g++]={range:m[0],options:h.options},o[g++]={range:m[1],options:h.options})}this._decorations.set(o)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const o=this._editor.getSelections();if(o.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const g=this._editor.getModel(),h=g.getVersionId();let m=[];this._lastVersionId===h&&(m=this._lastBracketsData);const C=[];let w=0;for(let P=0,N=o.length;P<N;P++){const M=o[P];M.isEmpty()&&(C[w++]=M.getStartPosition())}C.length>1&&C.sort(E.Position.compare);const D=[];let I=0,T=0;const A=m.length;for(let P=0,N=C.length;P<N;P++){const M=C[P];for(;T<A&&m[T].position.isBefore(M);)T++;if(T<A&&m[T].position.equals(M))D[I++]=m[T];else{let R=g.bracketPairs.matchBracket(M,20),x=s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!R&&this._matchBrackets==="always"&&(R=g.bracketPairs.findEnclosingBrackets(M,20),x=s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),D[I++]=new d(M,R,x)}}this._lastBracketsData=D,this._lastVersionId=h}}e.BracketMatchingController=s,s.ID="editor.contrib.bracketMatchingController",s._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=b.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,t.themeColorFromId)(r),position:v.OverviewRulerLane.Center}}),s._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=b.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,y.registerEditorContribution)(s.ID,s,1),(0,y.registerEditorAction)(f),(0,y.registerEditorAction)(u),(0,y.registerEditorAction)(c),i.MenuRegistry.appendMenuItem(i.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:a.localize(4,null)},order:2})}),define(se[260],oe([1,0,7,48,12,99,2,10,38,18,140,816,836,361,166,657,839,25,27,15,8,97,88,29,89,23,116,360]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w){"use strict";var D;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionController=void 0;const I="quickfix-edit-highlight";let T=D=class extends S.Disposable{static get(P){return P.getContribution(D.ID)}constructor(P,N,M,R,x,O,B,W,V,K){super(),this._commandService=B,this._configurationService=W,this._actionWidgetService=V,this._instantiationService=K,this._activeCodeActions=this._register(new S.MutableDisposable),this._showDisabled=!1,this._disposed=!1,this._editor=P,this._model=this._register(new w.CodeActionModel(this._editor,x.codeActionProvider,N,M,O,W)),this._register(this._model.onDidChangeState(F=>this.update(F))),this._lightBulbWidget=new E.Lazy(()=>{const F=this._editor.getContribution(n.LightBulbWidget.ID);return F&&this._register(F.onClick(q=>this.showCodeActionsFromLightbulb(q.actions,q))),F}),this._resolver=R.createInstance(a.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}async showCodeActionsFromLightbulb(P,N){if(P.allAIFixes&&P.validActions.length===1){const M=P.validActions[0],R=M.action.command;R&&R.id==="inlineChat.start"&&R.arguments&&R.arguments.length>=1&&(R.arguments[0]={...R.arguments[0],autoSend:!1}),await this._applyCodeAction(M,!1,!1,b.ApplyCodeActionReason.FromAILightbulb);return}await this.showCodeActionList(P,N,{includeDisabledActions:!1,fromLightbulb:!0})}showCodeActions(P,N,M){return this.showCodeActionList(N,M,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(P,N,M,R){var x;if(!this._editor.hasModel())return;(x=t.MessageController.get(this._editor))===null||x===void 0||x.closeMessage();const O=this._editor.getPosition();this._trigger({type:1,triggerAction:N,filter:M,autoApply:R,context:{notAvailableMessage:P,position:O}})}_trigger(P){return this._model.trigger(P)}async _applyCodeAction(P,N,M,R){try{await this._instantiationService.invokeFunction(b.applyCodeAction,P,R,{preview:M,editor:this._editor})}finally{N&&this._trigger({type:2,triggerAction:C.CodeActionTriggerSource.QuickFix,filter:{}})}}async update(P){var N,M,R,x,O,B,W;if(P.type!==1){(N=this._lightBulbWidget.rawValue)===null||N===void 0||N.hide();return}let V;try{V=await P.actions}catch(K){(0,y.onUnexpectedError)(K);return}if(!this._disposed)if((M=this._lightBulbWidget.value)===null||M===void 0||M.update(V,P.trigger,P.position),P.trigger.type===1){if(!((R=P.trigger.filter)===null||R===void 0)&&R.include){const F=this.tryGetValidActionToApply(P.trigger,V);if(F){try{(x=this._lightBulbWidget.value)===null||x===void 0||x.hide(),await this._applyCodeAction(F,!1,!1,b.ApplyCodeActionReason.FromCodeActions)}finally{V.dispose()}return}if(P.trigger.context){const q=this.getInvalidActionThatWouldHaveBeenApplied(P.trigger,V);if(q&&q.action.disabled){(O=t.MessageController.get(this._editor))===null||O===void 0||O.showMessage(q.action.disabled,P.trigger.context.position),V.dispose();return}}}const K=!!(!((B=P.trigger.filter)===null||B===void 0)&&B.include);if(P.trigger.context&&(!V.allActions.length||!K&&!V.validActions.length)){(W=t.MessageController.get(this._editor))===null||W===void 0||W.showMessage(P.trigger.context.notAvailableMessage,P.trigger.context.position),this._activeCodeActions.value=V,V.dispose();return}this._activeCodeActions.value=V,this.showCodeActionList(V,this.toCoords(P.position),{includeDisabledActions:K,fromLightbulb:!1})}else this._actionWidgetService.isVisible?V.dispose():this._activeCodeActions.value=V}getInvalidActionThatWouldHaveBeenApplied(P,N){if(N.allActions.length&&(P.autoApply==="first"&&N.validActions.length===0||P.autoApply==="ifSingle"&&N.allActions.length===1))return N.allActions.find(({action:M})=>M.disabled)}tryGetValidActionToApply(P,N){if(N.validActions.length&&(P.autoApply==="first"&&N.validActions.length>0||P.autoApply==="ifSingle"&&N.validActions.length===1))return N.validActions[0]}async showCodeActionList(P,N,M){const R=this._editor.createDecorationsCollection(),x=this._editor.getDomNode();if(!x)return;const O=M.includeDisabledActions&&(this._showDisabled||P.validActions.length===0)?P.allActions:P.validActions;if(!O.length)return;const B=p.Position.isIPosition(N)?this.toCoords(N):N,W={onSelect:async(V,K)=>{this._applyCodeAction(V,!0,!!K,b.ApplyCodeActionReason.FromCodeActions),this._actionWidgetService.hide(),R.clear()},onHide:()=>{var V;(V=this._editor)===null||V===void 0||V.focus(),R.clear()},onHover:async(V,K)=>{var F;if(!K.isCancellationRequested)return{canPreview:!!(!((F=V.action.edit)===null||F===void 0)&&F.edits.length)}},onFocus:V=>{var K,F;if(V&&V.action){const q=V.action.ranges,ie=V.action.diagnostics;if(R.clear(),q&&q.length>0){const ae=q.map(ne=>({range:ne,options:D.DECORATION}));R.set(ae)}else if(ie&&ie.length>0){const ae=ie.map($=>({range:$,options:D.DECORATION}));R.set(ae);const ne=ie[0];if(ne.startLineNumber&&ne.startColumn){const $=(F=(K=this._editor.getModel())===null||K===void 0?void 0:K.getWordAtPosition({lineNumber:ne.startLineNumber,column:ne.startColumn}))===null||F===void 0?void 0:F.word;k.status((0,r.localize)(0,null,$,ne.startLineNumber,ne.startColumn))}}}else R.clear()}};this._actionWidgetService.show("codeActionWidget",!0,(0,i.toMenuItems)(O,this._shouldShowHeaders(),this._resolver.getResolver()),W,B,x,this._getActionBarActions(P,N,M))}toCoords(P){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(P,1),this._editor.render();const N=this._editor.getScrolledVisiblePosition(P),M=(0,L.getDomNodePagePosition)(this._editor.getDomNode()),R=M.left+N.left,x=M.top+N.top+N.height;return{x:R,y:x}}_shouldShowHeaders(){var P;const N=(P=this._editor)===null||P===void 0?void 0:P.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:N?.uri})}_getActionBarActions(P,N,M){if(M.fromLightbulb)return[];const R=P.documentation.map(x=>{var O;return{id:x.id,label:x.title,tooltip:(O=x.tooltip)!==null&&O!==void 0?O:"",class:void 0,enabled:!0,run:()=>{var B;return this._commandService.executeCommand(x.id,...(B=x.arguments)!==null&&B!==void 0?B:[])}}});return M.includeDisabledActions&&P.validActions.length>0&&P.allActions.length!==P.validActions.length&&R.push(this._showDisabled?{id:"hideMoreActions",label:(0,r.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(P,N,M))}:{id:"showMoreActions",label:(0,r.localize)(2,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(P,N,M))}),R}};e.CodeActionController=T,T.ID="editor.contrib.codeActionController",T.DECORATION=_.ModelDecorationOptions.register({description:"quickfix-highlight",className:I}),e.CodeActionController=T=D=ke([ge(1,l.IMarkerService),ge(2,d.IContextKeyService),ge(3,s.IInstantiationService),ge(4,v.ILanguageFeaturesService),ge(5,o.IEditorProgressService),ge(6,f.ICommandService),ge(7,c.IConfigurationService),ge(8,u.IActionWidgetService),ge(9,s.IInstantiationService)],T),(0,m.registerThemingParticipant)((A,P)=>{((R,x)=>{x&&P.addRule(`.monaco-editor ${R} { background-color: ${x}; }`)})(".quickfix-edit-highlight",A.getColor(g.editorFindMatchHighlight));const M=A.getColor(g.editorFindMatchHighlightBorder);M&&P.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,h.isHighContrast)(A.type)?"dotted":"solid"} ${M}; box-sizing: border-box; }`)})}),define(se[890],oe([1,0,11,16,21,140,655,15,116,260,360]),function(te,e,L,k,y,E,S,p,_,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 a(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:S.localize(0,null)},apply:{type:"string",description:S.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[S.localize(2,null),S.localize(3,null),S.localize(4,null)]},preferred:{type:"boolean",default:!1,description:S.localize(5,null)}}};function n(l,o,g,h,m=_.CodeActionTriggerSource.Default){if(l.hasModel()){const C=v.CodeActionController.get(l);C?.manualTriggerAtCurrentPosition(o,m,g,h)}}class t extends k.EditorAction{constructor(){super({id:E.quickFixCommandId,label:S.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(o,g){return n(g,S.localize(7,null),void 0,void 0,_.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=t;class r 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(o,g,h){const m=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Empty,apply:"ifSingle"});return n(g,typeof h?.kind=="string"?m.preferred?S.localize(8,null,h.kind):S.localize(9,null,h.kind):m.preferred?S.localize(10,null):S.localize(11,null),{include:m.kind,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply)}}e.CodeActionCommand=r;class u extends k.EditorAction{constructor(){super({id:E.refactorCommandId,label:S.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,a(_.CodeActionKind.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:i}]}})}run(o,g,h){const m=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Refactor,apply:"never"});return n(g,typeof h?.kind=="string"?m.preferred?S.localize(13,null,h.kind):S.localize(14,null,h.kind):m.preferred?S.localize(15,null):S.localize(16,null),{include:_.CodeActionKind.Refactor.contains(m.kind)?m.kind:_.CodeActionKind.None,onlyIncludePreferredActions:m.preferred},m.apply,_.CodeActionTriggerSource.Refactor)}}e.RefactorAction=u;class f extends k.EditorAction{constructor(){super({id:E.sourceActionCommandId,label:S.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,a(_.CodeActionKind.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:i}]}})}run(o,g,h){const m=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Source,apply:"never"});return n(g,typeof h?.kind=="string"?m.preferred?S.localize(18,null,h.kind):S.localize(19,null,h.kind):m.preferred?S.localize(20,null):S.localize(21,null),{include:_.CodeActionKind.Source.contains(m.kind)?m.kind:_.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:m.preferred},m.apply,_.CodeActionTriggerSource.SourceAction)}}e.SourceAction=f;class c extends k.EditorAction{constructor(){super({id:E.organizeImportsCommandId,label:S.localize(22,null),alias:"Organize Imports",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,a(_.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(o,g){return n(g,S.localize(23,null),{include:_.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=c;class d extends k.EditorAction{constructor(){super({id:E.fixAllCommandId,label:S.localize(24,null),alias:"Fix All",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,a(_.CodeActionKind.SourceFixAll))})}run(o,g){return n(g,S.localize(25,null),{include:_.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.FixAll)}}e.FixAllAction=d;class s extends k.EditorAction{constructor(){super({id:E.autoFixCommandId,label:S.localize(26,null),alias:"Auto Fix...",precondition:p.ContextKeyExpr.and(y.EditorContextKeys.writable,a(_.CodeActionKind.QuickFix)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(o,g){return n(g,S.localize(27,null),{include:_.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=s}),define(se[891],oe([1,0,16,246,890,260,361,656,98,37]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(E.CodeActionController.ID,E.CodeActionController,3),(0,L.registerEditorContribution)(S.LightBulbWidget.ID,S.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(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:p.localize(0,null),default:!0}}}),v.Registry.as(_.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:p.localize(1,null),default:!0}}})}),define(se[892],oe([1,0,7,118,5,38,456]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class S{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 r=!1;for(let u=0;u<i.length;u++){const f=i[u];if(f&&(r=!0,f.command)){const c=(0,k.renderLabelWithIcons)(f.command.title.trim());if(f.command.id){const d=`c${p._idPool++}`;t.push(L.$("a",{id:d,title:f.command.tooltip,role:"button"},...c)),this._commands.set(d,f.command)}else t.push(L.$("span",{title:f.command.tooltip},...c));u+1<i.length&&t.push(L.$("span",void 0,"\xA0|\xA0"))}}r?(L.reset(this._domNode,...t),this._isEmpty&&n&&this._domNode.classList.add("fadein"),this._isEmpty=!1):L.reset(this._domNode,L.$("span",void 0,"no commands"))}getCommand(i){return i.parentElement===this._domNode?this._commands.get(i.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(i){const n=this._editor.getModel().getLineFirstNonWhitespaceColumn(i);this._widgetPosition={position:{lineNumber:i,column:n},preference:[1]}}getPosition(){return this._widgetPosition||null}}p._idPool=0;class _{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(i,n){this._addDecorations.push(i),this._addDecorationsCallbacks.push(n)}removeDecoration(i){this._removeDecorations.push(i)}commit(i){const n=i.deltaDecorations(this._removeDecorations,this._addDecorations);for(let t=0,r=n.length;t<r;t++)this._addDecorationsCallbacks[t](n[t])}}e.CodeLensHelper=_;const v=E.ModelDecorationOptions.register({collapseOnReplaceEdit:!0,description:"codelens"});class b{constructor(i,n,t,r,u,f){this._isDisposed=!1,this._editor=n,this._data=i,this._decorationIds=[];let c;const d=[];this._data.forEach((s,l)=>{s.symbol.command&&d.push(s.symbol),t.addDecoration({range:s.symbol.range,options:v},o=>this._decorationIds[l]=o),c?c=y.Range.plusRange(c,s.symbol.range):c=y.Range.lift(s.symbol.range)}),this._viewZone=new S(c.startLineNumber-1,u,f),this._viewZoneId=r.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),r=this._data[n].symbol;return!!(t&&y.Range.isEmpty(r.range)===t.isEmpty())})}updateCodeLensSymbols(i,n){this._decorationIds.forEach(n.removeDecoration,n),this._decorationIds=[],this._data=i,this._data.forEach((t,r)=>{n.addDecoration({range:t.symbol.range,options:v},u=>this._decorationIds[r]=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;n<this._decorationIds.length;n++){const t=i.getDecorationRange(this._decorationIds[n]);t&&(this._data[n].symbol.range=t)}return this._data}updateCommands(i){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(i,!0);for(let n=0;n<this._data.length;n++){const t=i[n];if(t){const{symbol:r}=this._data[n];r.command=t.command||r.command}}}getCommand(i){var n;return(n=this._contentWidget)===null||n===void 0?void 0:n.getCommand(i)}getLineNumber(){const i=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return i?i.startLineNumber:-1}update(i){if(this.isValid()){const n=this._editor.getModel().getDecorationRange(this._decorationIds[0]);n&&(this._viewZone.afterLineNumber=n.startLineNumber-1,i.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(n.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}e.CodeLensWidget=b}),define(se[893],oe([1,0,14,12,2,127,16,36,21,343,805,892,660,25,50,70,79,18]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let c=class{constructor(s,l,o,g,h,m){this._editor=s,this._languageFeaturesService=l,this._commandService=g,this._notificationService=h,this._codeLensCache=m,this._disposables=new y.DisposableStore,this._localToDispose=new y.DisposableStore,this._lenses=[],this._oldCodeLensModels=new y.DisposableStore,this._provideCodeLensDebounce=o.for(l.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=o.for(l.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new L.RunOnceScheduler(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(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 s;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(s=this._currentCodeLensModel)===null||s===void 0||s.dispose()}_getLayoutInfo(){const s=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*s|0}}_updateLensStyle(){const{codeLensHeight:s,fontSize:l}=this._getLayoutInfo(),o=this._editor.getOption(18),g=this._editor.getOption(50),{style:h}=this._editor.getContainerDomNode();h.setProperty("--vscode-editorCodeLens-lineHeight",`${s}px`),h.setProperty("--vscode-editorCodeLens-fontSize",`${l}px`),h.setProperty("--vscode-editorCodeLens-fontFeatureSettings",g.fontFeatureSettings),o&&(h.setProperty("--vscode-editorCodeLens-fontFamily",o),h.setProperty("--vscode-editorCodeLens-fontFamilyDefault",p.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(m=>{for(const C of this._lenses)C.updateHeight(s,m)})}_localDispose(){var s,l,o;(s=this._getCodeLensModelPromise)===null||s===void 0||s.cancel(),this._getCodeLensModelPromise=void 0,(l=this._resolveCodeLensesPromise)===null||l===void 0||l.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(o=this._currentCodeLensModel)===null||o===void 0||o.dispose()}_onModelChange(){this._localDispose();const s=this._editor.getModel();if(!s||!this._editor.getOption(17)||s.isTooLargeForTokenization())return;const l=this._codeLensCache.get(s);if(l&&this._renderCodeLensSymbols(l),!this._languageFeaturesService.codeLensProvider.has(s)){l&&(0,L.disposableTimeout)(()=>{const g=this._codeLensCache.get(s);l===g&&(this._codeLensCache.delete(s),this._onModelChange())},30*1e3,this._localToDispose);return}for(const g of this._languageFeaturesService.codeLensProvider.all(s))if(typeof g.onDidChange=="function"){const h=g.onDidChange(()=>o.schedule());this._localToDispose.add(h)}const o=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,s,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(s,m);const C=this._provideCodeLensDebounce.update(s,Date.now()-h);o.delay=C,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},k.onUnexpectedError)},this._provideCodeLensDebounce.get(s));this._localToDispose.add(o),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 a.CodeLensHelper;C.forEach(I=>{I.dispose(D,m),this._lenses.splice(this._lenses.indexOf(I),1)}),D.commit(h)})}),o.schedule(),this._resolveCodeLensesScheduler.cancel(),(g=this._resolveCodeLensesPromise)===null||g===void 0||g.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{o.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{o.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}}})),o.schedule()}_disposeAllLenses(s,l){const o=new a.CodeLensHelper;for(const g of this._lenses)g.dispose(o,l);s&&o.commit(s),this._lenses.length=0}_renderCodeLensSymbols(s){if(!this._editor.hasModel())return;const l=this._editor.getModel().getLineCount(),o=[];let g;for(const C of s.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],o.push(g)))}if(!o.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 a.CodeLensHelper;let I=0,T=0;for(;T<o.length&&I<this._lenses.length;){const A=o[T][0].symbol.range.startLineNumber,P=this._lenses[I].getLineNumber();P<A?(this._lenses[I].dispose(D,w),this._lenses.splice(I,1)):P===A?(this._lenses[I].updateCodeLensSymbols(o[T],D),T++,I++):(this._lenses.splice(I,0,new a.CodeLensWidget(o[T],this._editor,D,w,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),I++,T++)}for(;I<this._lenses.length;)this._lenses[I].dispose(D,w),this._lenses.splice(I,1);for(;T<o.length;)this._lenses.push(new a.CodeLensWidget(o[T],this._editor,D,w,m.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),T++;D.commit(C)})}),h.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var s;(s=this._resolveCodeLensesPromise)===null||s===void 0||s.cancel(),this._resolveCodeLensesPromise=void 0;const l=this._editor.getModel();if(!l)return;const o=[],g=[];if(this._lenses.forEach(C=>{const w=C.computeIfNecessary(l);w&&(o.push(w),g.push(C))}),o.length===0)return;const h=Date.now(),m=(0,L.createCancelablePromise)(C=>{const w=o.map((D,I)=>{const T=new Array(D.length),A=D.map((P,N)=>!P.symbol.command&&typeof P.provider.resolveCodeLens=="function"?Promise.resolve(P.provider.resolveCodeLens(l,P.symbol,C)).then(M=>{T[N]=M},k.onUnexpectedExternalError):(T[N]=P.symbol,Promise.resolve(void 0)));return Promise.all(A).then(()=>{!C.isCancellationRequested&&!g[I].isDisposed()&&g[I].updateCommands(T)})});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 s;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((s=this._currentCodeLensModel)===null||s===void 0)&&s.isDisposed?void 0:this._currentCodeLensModel}};e.CodeLensContribution=c,c.ID="css.editor.codeLens",e.CodeLensContribution=c=ke([ge(1,f.ILanguageFeaturesService),ge(2,u.ILanguageFeatureDebounceService),ge(3,n.ICommandService),ge(4,t.INotificationService),ge(5,b.ICodeLensCache)],c),(0,S.registerEditorContribution)(c.ID,c,1),(0,S.registerEditorAction)(class extends S.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:_.EditorContextKeys.hasCodeLensProvider,label:(0,i.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}async run(s,l){if(!l.hasModel())return;const o=s.get(r.IQuickInputService),g=s.get(n.ICommandService),h=s.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 o.pick(D,{canPickMany:!1,placeHolder:(0,i.localize)(1,null)});if(!I)return;let T=I.command;if(w.isDisposed){const A=await C.getModel(),P=A?.lenses.find(N=>{var M;return N.symbol.range.startLineNumber===m&&((M=N.symbol.command)===null||M===void 0?void 0:M.title)===T.title});if(!P||!P.symbol.command)return;T=P.symbol.command}try{await g.executeCommand(T.id,...T.arguments||[])}catch(A){h.error(A)}}})}),define(se[375],oe([1,0,14,39,12,6,2,61,11,167,16,5,38,79,18,354,27]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 S.Disposable{constructor(l,o,g,h){super(),this._editor=l,this._configurationService=o,this._languageFeaturesService=g,this._localToDispose=this._register(new S.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 S.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 o=l.getLanguageId(),g=this._configurationService.getValue(o);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 o=this._editor.getModel();if(!o)return[];const g=new p.StopWatch(!1),h=await(0,r.getColors)(this._languageFeaturesService.colorProvider,o,l,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(o,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 o=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,o),this._colorDatas=new Map,this._decorationsIds.forEach((h,m)=>this._colorDatas.set(h,l[m]))})}updateColorDecorators(l){this._colorDecorationClassRefs.clear();const o=[],g=this._editor.getOption(21);for(let m=0;m<l.length&&o.length<g;m++){const{red:C,green:w,blue:D,alpha:I}=l[m].colorInfo.color,T=new k.RGBA(Math.round(C*255),Math.round(w*255),Math.round(D*255),I),A=`rgba(${T.r}, ${T.g}, ${T.b}, ${T.a})`,P=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:A}));o.push({range:{startLineNumber:l[m].colorInfo.range.startLineNumber,startColumn:l[m].colorInfo.range.startColumn,endLineNumber:l[m].colorInfo.range.endLineNumber,endColumn:l[m].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:_.noBreakWhitespace,inlineClassName:`${P.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}const h=g<l.length?g:!1;this._decoratorLimitReporter.update(l.length,h),this._colorDecoratorIds.set(o)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(l){const o=this._editor.getModel();if(!o)return null;const g=o.getDecorationsInRange(a.Range.fromPositions(l,l)).filter(h=>this._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=ke([ge(1,u.IConfigurationService),ge(2,t.ILanguageFeaturesService),ge(3,n.ILanguageFeatureDebounceService)],c);class d{constructor(){this._onDidChange=new E.Emitter,this._computed=0,this._limited=!1}update(l,o){(l!==this._computed||o!==this._limited)&&(this._computed=l,this._limited=o,this._onDidChange.fire())}}e.DecoratorLimitReporter=d,(0,b.registerEditorContribution)(c.ID,c,1)}),define(se[376],oe([1,0,14,19,39,2,5,354,375,553,842,23,7]),function(te,e,L,k,y,E,S,p,_,v,b,a,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class n{constructor(o,g,h,m){this.owner=o,this.range=g,this.model=h,this.provider=m,this.forceShowAtRange=!0}isValidForHoverAnchor(o){return o.type===1&&this.range.startColumn<=o.range.startColumn&&this.range.endColumn>=o.range.endColumn}}e.ColorHover=n;let t=class{constructor(o,g){this._editor=o,this._themeService=g,this.hoverOrdinal=2}computeSync(o,g){return[]}computeAsync(o,g,h){return L.AsyncIterableObject.fromPromise(this._computeAsync(o,g,h))}async _computeAsync(o,g,h){if(!this._editor.hasModel())return[];const m=_.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(o,g){return c(this,this._editor,this._themeService,g,o)}};e.ColorHoverParticipant=t,e.ColorHoverParticipant=t=ke([ge(1,a.IThemeService)],t);class r{constructor(o,g,h,m){this.owner=o,this.range=g,this.model=h,this.provider=m}}e.StandaloneColorPickerHover=r;let u=class{constructor(o,g){this._editor=o,this._themeService=g,this._color=null}async createColorHover(o,g,h){if(!this._editor.hasModel()||!_.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 P of C){const N=P.colorInfo;S.Range.containsRange(N.range,o.range)&&(w=N,D=P.provider)}const I=w??o,T=D??g,A=!!w;return{colorHover:await f(this,this._editor.getModel(),I,T),foundInEditor:A}}async updateEditorModel(o){if(!this._editor.hasModel())return;const g=o.model;let h=new S.Range(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);this._color&&(await s(this._editor.getModel(),g,this._color,h,o),h=d(this._editor,h,g))}renderHoverParts(o,g){return c(this,this._editor,this._themeService,g,o)}set color(o){this._color=o}get color(){return this._color}};e.StandaloneColorPickerParticipant=u,e.StandaloneColorPickerParticipant=u=ke([ge(1,a.IThemeService)],u);async function f(l,o,g,h){const m=o.getValueInRange(g.range),{red:C,green:w,blue:D,alpha:I}=g.color,T=new y.RGBA(Math.round(C*255),Math.round(w*255),Math.round(D*255),I),A=new y.Color(T),P=await(0,p.getColorPresentations)(o,g,h,k.CancellationToken.None),N=new v.ColorPickerModel(A,[],0);return N.colorPresentations=P||[],N.guessColorPresentation(A,m),l instanceof t?new n(l,S.Range.lift(g.range),N,h):new r(l,S.Range.lift(g.range),N,h)}function c(l,o,g,h,m){if(h.length===0||!o.hasModel())return E.Disposable.None;if(m.setMinimumDimensions){const N=o.getOption(66)+8;m.setMinimumDimensions(new i.Dimension(302,N))}const C=new E.DisposableStore,w=h[0],D=o.getModel(),I=w.model,T=C.add(new b.ColorPickerWidget(m.fragment,I,o.getOption(141),g,l instanceof u));m.setColorPicker(T);let A=!1,P=new S.Range(w.range.startLineNumber,w.range.startColumn,w.range.endLineNumber,w.range.endColumn);if(l instanceof u){const N=h[0].model.color;l.color=N,s(D,I,N,P,w),C.add(I.onColorFlushed(M=>{l.color=M}))}else C.add(I.onColorFlushed(async N=>{await s(D,I,N,P,w),A=!0,P=d(o,P,I)}));return C.add(I.onDidChangeColor(N=>{s(D,I,N,P,w)})),C.add(o.onDidChangeModelContent(N=>{A?A=!1:(m.hide(),o.focus())})),C}function d(l,o,g){var h,m;const C=[],w=(h=g.presentation.textEdit)!==null&&h!==void 0?h:{range:o,text:g.presentation.label,forceMoveMarkers:!1};C.push(w),g.presentation.additionalTextEdits&&C.push(...g.presentation.additionalTextEdits);const D=S.Range.lift(w.range),I=l.getModel()._setTrackedRange(null,D,3);return l.executeEdits("colorpicker",C),l.pushUndoStop(),(m=l.getModel()._getTrackedRange(I))!==null&&m!==void 0?m:D}async function s(l,o,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);o.colorPresentations=C||[]}}),define(se[894],oe([1,0,2,17,16,10,5,24,38,555,457]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function b(i){return k.isMacintosh?i.altKey:i.ctrlKey}class a 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===a.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 r=null;if(n.event.shiftKey){const u=this._editor.getSelection();if(u){const{selectionStartLineNumber:f,selectionStartColumn:c}=u;r=[new p.Selection(f,c,t.lineNumber,t.column)]}}else r=(this._editor.getSelections()||[]).map(u=>u.containsPosition(t)?new p.Selection(t.lineNumber,t.column,t.lineNumber,t.column):u);this._editor.setSelections(r||[],"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(a.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 S.Range(n.lineNumber,n.column,n.lineNumber,n.column),options:a._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=a,a.ID="editor.contrib.dragAndDrop",a.TRIGGER_KEY_VALUE=k.isMacintosh?6:5,a._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,y.registerEditorContribution)(a.ID,a,2)}),define(se[895],oe([1,0,5,41,38,29,23]),function(te,e,L,k,y,E,S){"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<this._decorations.length?this._decorations[v]:null;return b?this._editor.getModel().getDecorationRange(b):null}getCurrentMatchesPosition(v){const b=this._editor.getModel().getDecorationsInRange(v);for(const a of b){const i=a.options;if(i===p._FIND_MATCH_DECORATION||i===p._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(a.id)}return 0}setCurrentFindMatch(v){let b=null,a=0;if(v)for(let i=0,n=this._decorations.length;i<n;i++){const t=this._editor.getModel().getDecorationRange(this._decorations[i]);if(v.equalsRange(t)){b=this._decorations[i],a=i+1;break}}return(this._highlightedDecorationId!==null||b!==null)&&this._editor.changeDecorations(i=>{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,r=this._editor.getModel().getLineMaxColumn(t);n=new L.Range(n.startLineNumber,n.startColumn,t,r)}this._rangeHighlightDecorationId=i.addDecoration(n,p._RANGE_HIGHLIGHT_DECORATION)}}),a}set(v,b){this._editor.changeDecorations(a=>{let i=p._FIND_MATCH_DECORATION;const n=[];if(v.length>1e3){i=p._FIND_MATCH_NO_OVERVIEW_DECORATION;const r=this._editor.getModel().getLineCount(),f=this._editor.getLayoutInfo().height/r,c=Math.max(2,Math.ceil(3/f));let d=v[0].range.startLineNumber,s=v[0].range.endLineNumber;for(let l=1,o=v.length;l<o;l++){const g=v[l].range;s+c>=g.startLineNumber?g.endLineNumber>s&&(s=g.endLineNumber):(n.push({range:new L.Range(d,1,s,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,s=g.endLineNumber)}n.push({range:new L.Range(d,1,s,1),options:p._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const t=new Array(v.length);for(let r=0,u=v.length;r<u;r++)t[r]={range:v[r].range,options:i};this._decorations=a.deltaDecorations(this._decorations,t),this._overviewRulerApproximateDecorations=a.deltaDecorations(this._overviewRulerApproximateDecorations,n),this._rangeHighlightDecorationId&&(a.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(r=>a.removeDecoration(r)),this._findScopeDecorationIds=[]),b?.length&&(this._findScopeDecorationIds=b.map(r=>a.addDecoration(r,p._FIND_SCOPE_DECORATION)))})}matchBeforePosition(v){if(this._decorations.length===0)return null;for(let b=this._decorations.length-1;b>=0;b--){const a=this._decorations[b],i=this._editor.getModel().getDecorationRange(a);if(!(!i||i.endLineNumber>v.lineNumber)){if(i.endLineNumber<v.lineNumber)return i;if(!(i.endColumn>v.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,a=this._decorations.length;b<a;b++){const i=this._decorations[b],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.startLineNumber<v.lineNumber)){if(n.startLineNumber>v.lineNumber)return n;if(!(n.startColumn<v.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let v=[];return v=v.concat(this._decorations),v=v.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&v.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&v.push(this._rangeHighlightDecorationId),v}}e.FindDecorations=p,p._CURRENT_FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,S.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,S.themeColorFromId)(E.minimapFindMatch),position:k.MinimapPosition.Inline}}),p._FIND_MATCH_DECORATION=y.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,S.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center},minimap:{color:(0,S.themeColorFromId)(E.minimapFindMatch),position:k.MinimapPosition.Inline}}),p._FIND_MATCH_NO_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),p._FIND_MATCH_ONLY_OVERVIEW_DECORATION=y.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,S.themeColorFromId)(E.overviewRulerFindMatchForeground),position:k.OverviewRulerLane.Center}}),p._RANGE_HIGHLIGHT_DECORATION=y.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),p._FIND_SCOPE_DECORATION=y.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(se[195],oe([1,0,60,14,2,130,10,5,24,184,895,556,557,15]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModelBoundToEditorModel=e.MATCHES_LIMIT=e.FIND_IDS=e.TogglePreserveCaseKeybinding=e.ToggleSearchScopeKeybinding=e.ToggleRegexKeybinding=e.ToggleWholeWordKeybinding=e.ToggleCaseSensitiveKeybinding=e.CONTEXT_REPLACE_INPUT_FOCUSED=e.CONTEXT_FIND_INPUT_FOCUSED=e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE=void 0,e.CONTEXT_FIND_WIDGET_VISIBLE=new n.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new n.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new n.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},e.FIND_IDS={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",StartFindWithArgs:"editor.actions.findWithArgs",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",GoToMatchFindAction:"editor.action.goToMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},e.MATCHES_LIMIT=19999;const t=240;class r{constructor(f,c){this._toDispose=new y.DisposableStore,this._editor=f,this._state=c,this._isDisposed=!1,this._startSearchingTimer=new k.TimeoutTimer,this._decorations=new b.FindDecorations(f),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new k.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(d=>{(d.reason===3||d.reason===5||d.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(d=>{this._ignoreModelContentChanged||(d.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,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 s=this._findMatches(d,!1,e.MATCHES_LIMIT);this._decorations.set(s,d);const l=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(l);if(o===0&&s.length>0){const g=(0,L.findFirstIdxMonotonousOrArrLen)(s.map(h=>h.range),h=>p.Range.compareRangesUsingStarts(h,l)>=0);o=g>0?g-1+1:o}this._state.changeMatchInfo(o,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:s}=f;const l=this._editor.getModel();return c||s===1?(d===1?d=l.getLineCount():d--,s=l.getLineMaxColumn(d)):s--,new S.Position(d,s)}_moveToPrevMatch(f,c=!1){if(!this._state.canNavigateBack()){const C=this._decorations.matchAfterPosition(f);C&&this._setCurrentFindMatch(C);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let C=this._decorations.matchBeforePosition(f);C&&C.isEmpty()&&C.getStartPosition().equals(f)&&(f=this._prevSearchPosition(f),C=this._decorations.matchBeforePosition(f)),C&&this._setCurrentFindMatch(C);return}if(this._cannotFind())return;const d=this._decorations.getFindScope(),s=r._getSearchRange(this._editor.getModel(),d);s.getEndPosition().isBefore(f)&&(f=s.getEndPosition()),f.isBefore(s.getStartPosition())&&(f=s.getEndPosition());const{lineNumber:l,column:o}=f,g=this._editor.getModel();let h=new S.Position(l,o),m=g.findPreviousMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,!1);if(m&&m.range.isEmpty()&&m.range.getStartPosition().equals(h)&&(h=this._prevSearchPosition(h),m=g.findPreviousMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,!1)),!!m){if(!c&&!s.containsRange(m.range))return this._moveToPrevMatch(m.range.getStartPosition(),!0);this._setCurrentFindMatch(m.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(f){const c=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:d,column:s}=f;const l=this._editor.getModel();return c||s===l.getLineMaxColumn(d)?(d===l.getLineCount()?d=1:d++,s=1):s++,new S.Position(d,s)}_moveToNextMatch(f){if(!this._state.canNavigateForward()){const d=this._decorations.matchBeforePosition(f);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let d=this._decorations.matchAfterPosition(f);d&&d.isEmpty()&&d.getStartPosition().equals(f)&&(f=this._nextSearchPosition(f),d=this._decorations.matchAfterPosition(f)),d&&this._setCurrentFindMatch(d);return}const c=this._getNextMatch(f,!1,!0);c&&this._setCurrentFindMatch(c.range)}_getNextMatch(f,c,d,s=!1){if(this._cannotFind())return null;const l=this._decorations.getFindScope(),o=r._getSearchRange(this._editor.getModel(),l);o.getEndPosition().isBefore(f)&&(f=o.getStartPosition()),f.isBefore(o.getStartPosition())&&(f=o.getStartPosition());const{lineNumber:g,column:h}=f,m=this._editor.getModel();let C=new S.Position(g,h),w=m.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,c);return d&&w&&w.range.isEmpty()&&w.range.getStartPosition().equals(C)&&(C=this._nextSearchPosition(C),w=m.findNextMatch(this._state.searchString,C,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,c)),w?!s&&!o.containsRange(w.range)?this._getNextMatch(w.range.getEndPosition(),c,d,!0):w:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_moveToMatch(f){const c=this._decorations.getDecorationRangeAt(f);c&&this._setCurrentFindMatch(c)}moveToMatch(f){this._moveToMatch(f)}_getReplacePattern(){return this._state.isRegex?(0,i.parseReplaceString)(this._state.replaceString):i.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const f=this._getReplacePattern(),c=this._editor.getSelection(),d=this._getNextMatch(c.getStartPosition(),!0,!1);if(d)if(c.equalsRange(d.range)){const s=f.buildReplaceString(d.matches,this._state.preserveCase),l=new E.ReplaceCommand(c,s);this._executeEditorCommand("replace",l),this._decorations.setStartPosition(new S.Position(c.startLineNumber,c.startColumn+s.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(d.range)}_findMatches(f,c,d){const s=(f||[null]).map(l=>r._getSearchRange(this._editor.getModel(),l));return this._editor.getModel().findMatches(this._state.searchString,s,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 s=this._editor.getModel(),l=s.getValue(1),o=s.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(o,h,this._editor.getSelection());this._executeEditorCommand("replaceAll",C)}_regularReplaceAll(f){const c=this._getReplacePattern(),d=this._findMatches(f,c.hasReplacementPatterns||this._state.preserveCase,1073741824),s=[];for(let o=0,g=d.length;o<g;o++)s[o]=c.buildReplaceString(d[o].matches,this._state.preserveCase);const l=new a.ReplaceAllCommand(this._editor.getSelection(),d.map(o=>o.range),s);this._executeEditorCommand("replaceAll",l)}selectAllMatches(){if(!this._hasMatches())return;const f=this._decorations.getFindScopes();let d=this._findMatches(f,!1,1073741824).map(l=>new _.Selection(l.range.startLineNumber,l.range.startColumn,l.range.endLineNumber,l.range.endColumn));const s=this._editor.getSelection();for(let l=0,o=d.length;l<o;l++)if(d[l].equalsRange(s)){d=[s].concat(d.slice(0,l)).concat(d.slice(l+1));break}this._editor.setSelections(d)}_executeEditorCommand(f,c){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(f,c),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=r}),define(se[896],oe([1,0,7,323,76,14,195,29,459]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class _ extends y.Widget{constructor(b,a,i){super(),this._hideSoon=this._register(new E.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=b,this._state=a,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(S.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(S.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(S.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 r=!1;t.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),t.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),t.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&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 a=this._keybindingService.lookupKeybinding(b);return a?` (${a.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return _.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=_,_.ID="editor.contrib.findOptionsWidget"}),define(se[897],oe([1,0,6,2,5,195]),function(te,e,L,k,y,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function S(_,v){return _===1?!0:_===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 S(this._isRegexOverride,this._isRegex)}get wholeWord(){return S(this._wholeWordOverride,this._wholeWord)}get matchCase(){return S(this._matchCaseOverride,this._matchCase)}get preserveCase(){return S(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,a){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 a<"u"&&(y.Range.equalsRange(this._currentMatch,a)||(this._currentMatch=a,i.currentMatch=!0,n=!0)),n&&this._onFindReplaceStateChange.fire(i)}change(v,b,a=!0){var i;const n={moveCursor:b,updateHistory:a,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 r=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 s;return(s=this._searchScope)===null||s===void 0?void 0:s.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,r!==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<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=E.MATCHES_LIMIT}}e.FindReplaceState=p}),define(se[898],oe([1,0,7,48,159,158,76,14,26,12,2,17,11,5,195,673,357,761,29,82,23,28,89,20,106,460]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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",_.Codicon.selection,r.localize(0,null)),C=(0,d.registerIcon)("find-collapsed",_.Codicon.chevronRight,r.localize(1,null)),w=(0,d.registerIcon)("find-expanded",_.Codicon.chevronDown,r.localize(2,null));e.findReplaceIcon=(0,d.registerIcon)("find-replace",_.Codicon.replace,r.localize(3,null)),e.findReplaceAllIcon=(0,d.registerIcon)("find-replace-all",_.Codicon.replaceAll,r.localize(4,null)),e.findPreviousMatchIcon=(0,d.registerIcon)("find-previous-match",_.Codicon.arrowUp,r.localize(5,null)),e.findNextMatchIcon=(0,d.registerIcon)("find-next-match",_.Codicon.arrowDown,r.localize(6,null));const D=r.localize(7,null),I=r.localize(8,null),T=r.localize(9,null),A=r.localize(10,null),P=r.localize(11,null),N=r.localize(12,null),M=r.localize(13,null),R=r.localize(14,null),x=r.localize(15,null),O=r.localize(16,null),B=r.localize(17,null),W=r.localize(18,null),V=r.localize(19,null,t.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=r.localize(20,null),e.NLS_NO_RESULTS=r.localize(21,null);const K=419,q=275-54;let ie=69;const ae=33,ne="ctrlEnterReplaceAll.windows.donotask",$=a.isMacintosh?256:2048;class J{constructor(X){this.afterLineNumber=X,this.heightInPx=ae,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=J;function Q(me,X,U){const G=!!X.match(/\n/);if(U&&G&&U.selectionStart>0){me.stopPropagation();return}}function re(me,X,U){const G=!!X.match(/\n/);if(U&&G&&U.selectionEnd<U.value.length){me.stopPropagation();return}}class de extends S.Widget{constructor(X,U,G,z,H,Y,j,Z,ee){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=X,this._controller=U,this._state=G,this._contextViewProvider=z,this._keybindingService=H,this._contextKeyService=Y,this._storageService=Z,this._notificationService=ee,this._ctrlEnterReplaceAllWarningPrompted=!!Z.getBoolean(ne,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new p.Delayer(500),this._register((0,b.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(le=>this._onStateChanged(le))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(le=>{if(le.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),le.hasChanged(143)&&this._tryUpdateWidgetWidth(),le.hasChanged(2)&&this.updateAccessibilitySupport(),le.hasChanged(41)){const ue=this._codeEditor.getOption(41).loop;this._state.change({loop:ue},!1);const ce=this._codeEditor.getOption(41).addExtraSpaceOnTop;ce&&!this._viewZone&&(this._viewZone=new J(0),this._showViewZone()),!ce&&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 le=await this._controller.getGlobalBufferTerm();le&&le!==this._state.searchString&&(this._state.change({searchString:le},!1),this._findInput.select())}})),this._findInputFocused=t.CONTEXT_FIND_INPUT_FOCUSED.bindTo(Y),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(Y),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 J(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(le=>{if(le.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return de.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(X){if(X.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(X.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),X.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),X.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())),(X.isRevealed||X.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),X.isRegex&&this._findInput.setRegex(this._state.isRegex),X.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),X.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),X.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),X.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),X.searchString||X.matchesCount||X.matchesPosition){const U=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",U),this._updateMatchesCount(),this._updateButtons()}(X.searchString||X.currentMatch)&&this._layoutViewZone(),X.updateHistory&&this._delayedUpdateHistory(),X.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=ie+"px",this._state.matchesCount>=t.MATCHES_LIMIT?this._matchesCount.title=V:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let X;if(this._state.matchesCount>0){let U=String(this._state.matchesCount);this._state.matchesCount>=t.MATCHES_LIMIT&&(U+="+");let G=String(this._state.matchesPosition);G==="0"&&(G="?"),X=i.format(e.NLS_MATCHES_LOCATION,G,U)}else X=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(X)),(0,k.alert)(this._getAriaLabel(X,this._state.currentMatch,this._state.searchString)),ie=Math.max(ie,this._matchesCount.clientWidth)}_getAriaLabel(X,U,G){if(X===e.NLS_NO_RESULTS)return G===""?r.localize(22,null,X):r.localize(23,null,X,G);if(U){const z=r.localize(24,null,X,G,U.startLineNumber+":"+U.startColumn),H=this._codeEditor.getModel();return H&&U.startLineNumber<=H.getLineCount()&&U.startLineNumber>=1?`${H.getLineContent(U.startLineNumber)}, ${z}`:z}return r.localize(25,null,X,G)}_updateToggleSelectionFindButton(){const X=this._codeEditor.getSelection(),U=X?X.startLineNumber!==X.endLineNumber||X.startColumn!==X.endColumn:!1,G=this._toggleSelectionFind.checked;this._isVisible&&(G||U)?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 X=this._state.searchString.length>0,U=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&X&&U&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&X&&U&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&X),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&X),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const G=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&G)}_reveal(){if(this._revealTimeouts.forEach(X=>{clearTimeout(X)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const X=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 G=!!X&&X.startLineNumber!==X.endLineNumber;this._toggleSelectionFind.checked=G;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 U=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&X){const G=this._codeEditor.getDomNode();if(G){const z=L.getDomNodePagePosition(G),H=this._codeEditor.getScrolledVisiblePosition(X.getStartPosition()),Y=z.left+(H?H.left:0),j=H?H.top:0;if(this._viewZone&&j<this._viewZone.heightInPx){X.endLineNumber>X.startLineNumber&&(U=!1);const Z=L.getTopLeftOffset(this._domNode).left;Y>Z&&(U=!1);const ee=this._codeEditor.getScrolledVisiblePosition(X.getEndPosition());z.left+(ee?ee.left:0)>Z&&(U=!1)}}}this._showViewZone(U)}}_hide(X){this._revealTimeouts.forEach(U=>{clearTimeout(U)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),X&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(X){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const G=this._viewZone;this._viewZoneId!==void 0||!G||this._codeEditor.changeViewZones(z=>{G.heightInPx=this._getHeight(),this._viewZoneId=z.addZone(G),this._codeEditor.setScrollTop(X||this._codeEditor.getScrollTop()+G.heightInPx)})}_showViewZone(X=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new J(0));const G=this._viewZone;this._codeEditor.changeViewZones(z=>{if(this._viewZoneId!==void 0){const H=this._getHeight();if(H===G.heightInPx)return;const Y=H-G.heightInPx;G.heightInPx=H,z.layoutZone(this._viewZoneId),X&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+Y);return}else{let H=this._getHeight();if(H-=this._codeEditor.getOption(83).top,H<=0)return;G.heightInPx=H,this._viewZoneId=z.addZone(G),X&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+H)}})}_removeViewZone(){this._codeEditor.changeViewZones(X=>{this._viewZoneId!==void 0&&(X.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 X=this._codeEditor.getLayoutInfo();if(X.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const G=X.width,z=X.minimap.minimapWidth;let H=!1,Y=!1,j=!1;if(this._resized&&L.getTotalWidth(this._domNode)>K){this._domNode.style.maxWidth=`${G-28-z-15}px`,this._replaceInput.width=L.getTotalWidth(this._findInput.domNode);return}if(K+28+z>=G&&(Y=!0),K+28+z-ie>=G&&(j=!0),K+28+z-ie>=G+50&&(H=!0),this._domNode.classList.toggle("collapsed-find-widget",H),this._domNode.classList.toggle("narrow-find-widget",j),this._domNode.classList.toggle("reduced-find-widget",Y),!j&&!H&&(this._domNode.style.maxWidth=`${G-28-z-15}px`),this._findInput.layout({collapsedFindWidget:H,narrowFindWidget:j,reducedFindWidget:Y}),this._resized){const Z=this._findInput.inputBox.element.clientWidth;Z>0&&(this._replaceInput.width=Z)}else this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode))}_getHeight(){let X=0;return X+=4,X+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(X+=4,X+=this._replaceInput.inputBox.height+2),X+=4,X}_tryUpdateHeight(){const X=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===X?!1:(this._cachedHeight=X,this._domNode.style.height=`${X}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 X=this._codeEditor.getSelections();X.map(U=>{U.endColumn===1&&U.endLineNumber>U.startLineNumber&&(U=U.setEndPosition(U.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(U.endLineNumber-1)));const G=this._state.currentMatch;return U.startLineNumber!==U.endLineNumber&&!n.Range.equalsRange(U,G)?U:null}).filter(U=>!!U),X.length&&this._state.change({searchScope:X},!0)}}_onFindInputMouseDown(X){X.middleButton&&X.stopPropagation()}_onFindInputKeyDown(X){if(X.equals($|3))if(this._keybindingService.dispatchEvent(X,X.target)){X.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
||
`),X.preventDefault();return}if(X.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),X.preventDefault();return}if(X.equals(2066)){this._codeEditor.focus(),X.preventDefault();return}if(X.equals(16))return Q(X,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(X.equals(18))return re(X,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(X){if(X.equals($|3))if(this._keybindingService.dispatchEvent(X,X.target)){X.preventDefault();return}else{a.isWindows&&a.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(r.localize(26,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ne,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
||
`),X.preventDefault();return}if(X.equals(2)){this._findInput.focusOnCaseSensitive(),X.preventDefault();return}if(X.equals(1026)){this._findInput.focus(),X.preventDefault();return}if(X.equals(2066)){this._codeEditor.focus(),X.preventDefault();return}if(X.equals(16))return Q(X,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(X.equals(18))return re(X,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(X){return 0}_keybindingLabelFor(X){const U=this._keybindingService.lookupKeybinding(X);return U?` (${U.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new u.ContextScopedFindInput(null,this._contextViewProvider,{width:q,label:I,placeholder:T,appendCaseSensitiveLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleRegexCommand),validation:Z=>{if(Z.length===0||!this._findInput.getRegex())return null;try{return new RegExp(Z,"gu"),null}catch(ee){return{content:ee.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(Z=>this._onFindInputKeyDown(Z))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(Z=>{Z.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),Z.preventDefault())})),this._register(this._findInput.onRegexKeyDown(Z=>{Z.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),Z.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(Z=>{this._tryUpdateHeight()&&this._showViewZone()})),a.isLinux&&this._register(this._findInput.onMouseDown(Z=>this._onFindInputMouseDown(Z))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new he({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 he({label:P+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 G=document.createElement("div");G.className="find-part",G.appendChild(this._findInput.domNode);const z=document.createElement("div");z.className="find-actions",G.appendChild(z),z.appendChild(this._matchesCount),z.appendChild(this._prevBtn.domNode),z.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y.Toggle({icon:m,title:N+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 Z=this._codeEditor.getSelections();Z.map(ee=>(ee.endColumn===1&&ee.endLineNumber>ee.startLineNumber&&(ee=ee.setEndPosition(ee.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ee.endLineNumber-1))),ee.isEmpty()?null:ee)).filter(ee=>!!ee),Z.length&&this._state.change({searchScope:Z},!0)}}else this._state.change({searchScope:null},!0)})),z.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new he({label:M+this._keybindingLabelFor(t.FIND_IDS.CloseFindWidgetCommand),icon:d.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:Z=>{Z.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),Z.preventDefault())}})),this._replaceInput=this._register(new u.ContextScopedReplaceInput(null,void 0,{label:R,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(Z=>this._onReplaceInputKeyDown(Z))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(Z=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(Z=>{Z.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),Z.preventDefault())})),this._replaceBtn=this._register(new he({label:O+this._keybindingLabelFor(t.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:Z=>{Z.equals(1026)&&(this._closeBtn.focus(),Z.preventDefault())}})),this._replaceAllBtn=this._register(new he({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 Y=document.createElement("div");Y.className="replace-actions",H.appendChild(Y),Y.appendChild(this._replaceBtn.domNode),Y.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new he({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=`${K}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(G),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 j=K;this._register(this._resizeSash.onDidStart(()=>{j=L.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(Z=>{this._resized=!0;const ee=j+Z.startX-Z.currentX;if(ee<K)return;const le=parseFloat(L.getComputedStyle(this._domNode).maxWidth)||0;ee>le||(this._domNode.style.width=`${ee}px`,this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const Z=L.getTotalWidth(this._domNode);if(Z<K)return;let ee=K;if(!this._resized||Z===K){const le=this._codeEditor.getLayoutInfo();ee=le.width-28-le.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${ee}px`,this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const X=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(X!==2)}}e.FindWidget=de,de.ID="editor.contrib.findWidget";class he extends S.Widget{constructor(X){super(),this._opts=X;let U="button";this._opts.className&&(U=U+" "+this._opts.className),this._opts.icon&&(U=U+" "+l.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=U,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,G=>{this._opts.onTrigger(),G.preventDefault()}),this.onkeydown(this._domNode,G=>{var z,H;if(G.equals(10)||G.equals(3)){this._opts.onTrigger(),G.preventDefault();return}(H=(z=this._opts).onKeyDown)===null||H===void 0||H.call(z,G)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(X){this._domNode.classList.toggle("disabled",!X),this._domNode.setAttribute("aria-disabled",String(!X)),this._domNode.tabIndex=X?0:-1}setExpanded(X){this._domNode.setAttribute("aria-expanded",String(!!X)),X?(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=he,(0,s.registerThemingParticipant)((me,X)=>{const U=(Ce,Se)=>{Se&&X.addRule(`.monaco-editor ${Ce} { background-color: ${Se}; }`)};U(".findMatch",me.getColor(c.editorFindMatchHighlight)),U(".currentFindMatch",me.getColor(c.editorFindMatch)),U(".findScope",me.getColor(c.editorFindRangeHighlight));const G=me.getColor(c.editorWidgetBackground);U(".find-widget",G);const z=me.getColor(c.widgetShadow);z&&X.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${z}; }`);const H=me.getColor(c.widgetBorder);H&&X.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${H}; border-right: 1px solid ${H}; border-bottom: 1px solid ${H}; }`);const Y=me.getColor(c.editorFindMatchHighlightBorder);Y&&X.addRule(`.monaco-editor .findMatch { border: 1px ${(0,o.isHighContrast)(me.type)?"dotted":"solid"} ${Y}; box-sizing: border-box; }`);const j=me.getColor(c.editorFindMatchBorder);j&&X.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${j}; padding: 1px; box-sizing: border-box; }`);const Z=me.getColor(c.editorFindRangeHighlightBorder);Z&&X.addRule(`.monaco-editor .findScope { border: 1px ${(0,o.isHighContrast)(me.type)?"dashed":"solid"} ${Z}; }`);const ee=me.getColor(c.contrastBorder);ee&&X.addRule(`.monaco-editor .find-widget { border: 1px solid ${ee}; }`);const le=me.getColor(c.editorWidgetForeground);le&&X.addRule(`.monaco-editor .find-widget { color: ${le}; }`);const ue=me.getColor(c.errorForeground);ue&&X.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ue}; }`);const ce=me.getColor(c.editorWidgetResizeBorder);if(ce)X.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ce}; }`);else{const Ce=me.getColor(c.editorWidgetBorder);Ce&&X.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${Ce}; }`)}const pe=me.getColor(c.toolbarHoverBackground);pe&&X.addRule(`
|
||
.monaco-editor .find-widget .button:not(.disabled):hover,
|
||
.monaco-editor .find-widget .codicon-find-selection:hover {
|
||
background-color: ${pe} !important;
|
||
}
|
||
`);const ve=me.getColor(c.focusBorder);ve&&X.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${ve}; }`)})}),define(se[377],oe([1,0,14,2,11,16,83,21,41,195,896,897,898,672,30,103,15,59,34,50,70,92,23]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o){"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",K=!1){if(!W.hasModel())return null;const F=W.getSelection();if(V==="single"&&F.startLineNumber===F.endLineNumber||V==="multiple"){if(F.isEmpty()){const q=W.getConfiguredWordAtPosition(F.getStartPosition());if(q&&K===!1)return q.word}else if(W.getModel().getValueLengthInRange(F)<h)return W.getModel().getValueInRange(F)}return null}e.getSelectionSearchString=m;let C=g=class extends k.Disposable{get editor(){return this._editor}static get(V){return V.getContribution(g.ID)}constructor(V,K,F,q,ie){super(),this._editor=V,this._findWidgetVisible=v.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(K),this._contextKeyService=K,this._storageService=F,this._clipboardService=q,this._notificationService=ie,this._updateHistoryDelayer=new L.Delayer(500),this._state=this._register(new a.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(ae=>this._onStateChanged(ae))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const ae=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),ae&&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(K=>(K.endColumn===1&&K.endLineNumber>K.startLineNumber&&(K=K.setEndPosition(K.endLineNumber-1,this._editor.getModel().getLineMaxColumn(K.endLineNumber-1))),K.isEmpty()?null:K)).filter(K=>!!K),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,K){if(this.disposeModel(),!this._editor.hasModel())return;const F={...K,isRevealed:!0};if(V.seedSearchStringFromSelection==="single"){const q=m(this._editor,V.seedSearchStringFromSelection,V.seedSearchStringFromNonEmptySelection);q&&(this._state.isRegex?F.searchString=y.escapeRegExpCharacters(q):F.searchString=q)}else if(V.seedSearchStringFromSelection==="multiple"&&!V.updateSearchScope){const q=m(this._editor,V.seedSearchStringFromSelection);q&&(F.searchString=q)}if(!F.searchString&&V.seedSearchStringFromGlobalClipboard){const q=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;q&&(F.searchString=q)}if(V.forceRevealReplace||F.isReplaceRevealed?F.isReplaceRevealed=!0:this._findWidgetVisible.get()||(F.isReplaceRevealed=!1),V.updateSearchScope){const q=this._editor.getSelections();q.some(ie=>!ie.isEmpty())&&(F.searchScope=q)}F.loop=V.loop,this._state.change(F,!1),this._model||(this._model=new v.FindModelBoundToEditorModel(this._editor,this._state))}start(V,K){return this._start(V,K)}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=ke([ge(1,u.IContextKeyService),ge(2,l.IStorageService),ge(3,r.IClipboardService),ge(4,d.INotificationService)],C);let w=class extends C{constructor(V,K,F,q,ie,ae,ne,$){super(V,F,ne,$,ae),this._contextViewService=K,this._keybindingService=q,this._themeService=ie,this._widget=null,this._findOptionsWidget=null}async _start(V,K){this._widget||this._createFindWidget();const F=this._editor.getSelection();let q=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":q=!0;break;case"never":q=!1;break;case"multiline":{q=!!F&&F.startLineNumber!==F.endLineNumber;break}default:break}V.updateSearchScope=V.updateSearchScope||q,await super._start(V,K),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=ke([ge(1,f.IContextViewService),ge(2,u.IContextKeyService),ge(3,c.IKeybindingService),ge(4,o.IThemeService),ge(5,d.INotificationService),ge(6,l.IStorageService),ge(7,r.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,K)=>{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"},isRegex:{type:"boolean"},matchWholeWord:{type:"boolean"},isCaseSensitive:{type:"boolean"},preserveCase:{type:"boolean"},findInSelection:{type:"boolean"}}}}]};class I extends E.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithArgs,label:n.localize(3,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},metadata:D})}async run(V,K,F){const q=C.get(K);if(q){const ie=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 q.start({forceRevealReplace:!1,seedSearchStringFromSelection:q.getState().searchString.length===0&&K.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:F?.findInSelection||!1,loop:K.getOption(41).loop},ie),q.setGlobalBufferTerm(q.getState().searchString)}}}e.StartFindWithArgsAction=I;class T extends E.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithSelection,label:n.localize(4,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(V,K){const F=C.get(K);F&&(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),F.setGlobalBufferTerm(F.getState().searchString))}}e.StartFindWithSelectionAction=T;class A extends E.EditorAction{async run(V,K){const F=C.get(K);F&&!this._run(F)&&(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:F.getState().searchString.length===0&&K.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:K.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),this._run(F))}}e.MatchFindAction=A;class P extends A{constructor(){super({id:v.FIND_IDS.NextMatchFindAction,label:n.localize(5,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=P;class N extends A{constructor(){super({id:v.FIND_IDS.PreviousMatchFindAction,label:n.localize(6,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=N;class M extends E.EditorAction{constructor(){super({id:v.FIND_IDS.GoToMatchFindAction,label:n.localize(7,null),alias:"Go to Match...",precondition:v.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(V,K,F){const q=C.get(K);if(!q)return;const ie=q.getState().matchesCount;if(ie<1){V.get(d.INotificationService).notify({severity:d.Severity.Warning,message:n.localize(8,null)});return}const ne=V.get(s.IQuickInputService).createInputBox();ne.placeholder=n.localize(9,null,ie);const $=Q=>{const re=parseInt(Q);if(isNaN(re))return;const de=q.getState().matchesCount;if(re>0&&re<=de)return re-1;if(re<0&&re>=-de)return de+re},J=Q=>{const re=$(Q);if(typeof re=="number"){ne.validationMessage=void 0,q.goToMatch(re);const de=q.getState().currentMatch;de&&this.addDecorations(K,de)}else ne.validationMessage=n.localize(10,null,q.getState().matchesCount),this.clearDecorations(K)};ne.onDidChangeValue(Q=>{J(Q)}),ne.onDidAccept(()=>{const Q=$(ne.value);typeof Q=="number"?(q.goToMatch(Q),ne.hide()):ne.validationMessage=n.localize(11,null,q.getState().matchesCount)}),ne.onDidHide(()=>{this.clearDecorations(K),ne.dispose()}),ne.show()}clearDecorations(V){V.changeDecorations(K=>{this._highlightDecorations=K.deltaDecorations(this._highlightDecorations,[])})}addDecorations(V,K){V.changeDecorations(F=>{this._highlightDecorations=F.deltaDecorations(this._highlightDecorations,[{range:K,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:K,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,o.themeColorFromId)(S.overviewRulerRangeHighlight),position:_.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=M;class R extends E.EditorAction{async run(V,K){const F=C.get(K);if(!F)return;const q=m(K,"single",!1);q&&F.setSearchString(q),this._run(F)||(await F.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:K.getOption(41).loop}),this._run(F))}}e.SelectionMatchFindAction=R;class x extends R{constructor(){super({id:v.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(12,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 O extends R{constructor(){super({id:v.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(13,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3133,weight:100}})}_run(V){return V.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=O,e.StartFindReplaceAction=(0,E.registerMultiEditorAction)(new E.MultiEditorAction({id:v.FIND_IDS.StartFindReplaceAction,label:n.localize(14,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(15,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(W,V,K)=>{if(!V.hasModel()||V.getOption(90))return!1;const F=C.get(V);if(!F)return!1;const q=V.getSelection(),ie=F.isFindInputFocused(),ae=!q.isEmpty()&&q.startLineNumber===q.endLineNumber&&V.getOption(41).seedSearchStringFromSelection!=="never"&&!ie,ne=ie||ae?2:1;return F.start({forceRevealReplace:!0,seedSearchStringFromSelection:ae?"single":"none",seedSearchStringFromNonEmptySelection:V.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:V.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:ne,shouldAnimate:!0,updateSearchScope:!1,loop:V.getOption(41).loop})}),(0,E.registerEditorContribution)(C.ID,w,0),(0,E.registerEditorAction)(I),(0,E.registerEditorAction)(T),(0,E.registerEditorAction)(P),(0,E.registerEditorAction)(N),(0,E.registerEditorAction)(M),(0,E.registerEditorAction)(x),(0,E.registerEditorAction)(O);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(se[378],oe([1,0,26,41,38,675,29,82,23,28]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const b=(0,S.registerColor)("editor.foldBackground",{light:(0,S.transparent)(S.editorSelectionBackground,.3),dark:(0,S.transparent)(S.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,E.localize)(0,null),!0);(0,S.registerColor)("editorGutter.foldingControlForeground",{dark:S.iconForeground,light:S.iconForeground,hcDark:S.iconForeground,hcLight:S.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 a={color:(0,_.themeColorFromId)(b),position:k.MinimapPosition.Inline},i=(0,E.localize)(6,null),n=(0,E.localize)(7,null);class t{constructor(u){this.editor=u,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(u,f,c){return f?t.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?u?this.showFoldingHighlights?t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:t.NO_CONTROLS_EXPANDED_RANGE_DECORATION:u?c?this.showFoldingHighlights?t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:t.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?c?t.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:t.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:c?t.MANUALLY_EXPANDED_VISUAL_DECORATION:t.EXPANDED_VISUAL_DECORATION}changeDecorations(u){return this.editor.changeDecorations(u)}removeDecorations(u){this.editor.removeDecorations(u)}}e.FoldingDecorationProvider=t,t.COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:a,isWholeLine:!0,linesDecorationsTooltip:i,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),t.MANUALLY_COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:a,isWholeLine:!0,linesDecorationsTooltip:i,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),t.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,linesDecorationsTooltip:i}),t.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:a,isWholeLine:!0,linesDecorationsTooltip:i}),t.EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingExpandedIcon),linesDecorationsTooltip:n}),t.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),linesDecorationsTooltip:n}),t.MANUALLY_EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingManualExpandedIcon),linesDecorationsTooltip:n}),t.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),linesDecorationsTooltip:n}),t.NO_CONTROLS_EXPANDED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),t.HIDDEN_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(se[261],oe([1,0,14,19,12,65,2,11,20,127,16,21,31,32,302,558,303,674,15,378,185,304,50,79,61,18,6,25,22,51,27,461]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const P=new c.RawContextKey("foldingEnabled",!1);let N=A=class extends S.Disposable{static get(G){return G.getContribution(A.ID)}static getFoldingRangeProviders(G,z){var H,Y;const j=G.foldingRangeProvider.ordered(z);return(Y=(H=A._foldingRangeSelector)===null||H===void 0?void 0:H.call(A,j,z))!==null&&Y!==void 0?Y:j}constructor(G,z,H,Y,j,Z){super(),this.contextKeyService=z,this.languageConfigurationService=H,this.languageFeaturesService=Z,this.localToDispose=this._register(new S.DisposableStore),this.editor=G,this._foldingLimitReporter=new M(G);const ee=this.editor.getOptions();this._isEnabled=ee.get(43),this._useFoldingProviders=ee.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=ee.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=ee.get(46),this.updateDebounceInfo=j.for(Z.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(G),this.foldingDecorationProvider.showFoldingControls=ee.get(109),this.foldingDecorationProvider.showFoldingHighlights=ee.get(45),this.foldingEnabled=P.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(le=>{if(le.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),le.hasChanged(47)&&this.onModelChanged(),le.hasChanged(109)||le.hasChanged(45)){const ue=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ue.get(109),this.foldingDecorationProvider.showFoldingHighlights=ue.get(45),this.triggerFoldingModelChanged()}le.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),le.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),le.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const G=this.editor.getModel();if(!G||!this._isEnabled||G.isTooLargeForTokenization())return{};if(this.foldingModel){const z=this.foldingModel.getMemento(),H=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:z,lineCount:G.getLineCount(),provider:H,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(G){const z=this.editor.getModel();if(!(!z||!this._isEnabled||z.isTooLargeForTokenization()||!this.hiddenRangeModel)&&G&&(this._currentModelHasFoldedImports=!!G.foldedImports,G.collapsedRegions&&G.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(G.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const G=this.editor.getModel();!this._isEnabled||!G||G.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new t.FoldingModel(G,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new r.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(z=>this.onHiddenRangesChanges(z))),this.updateScheduler=new L.Delayer(this.updateDebounceInfo.get(G)),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(z=>this.onDidChangeModelContent(z))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(z=>this.onEditorMouseDown(z))),this.localToDispose.add(this.editor.onMouseUp(z=>this.onEditorMouseUp(z))),this.localToDispose.add({dispose:()=>{var z,H;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(z=this.updateScheduler)===null||z===void 0||z.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 G;(G=this.rangeProvider)===null||G===void 0||G.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(G){if(this.rangeProvider)return this.rangeProvider;const z=new u.IndentRangeProvider(G,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=z,this._useFoldingProviders&&this.foldingModel){const H=A.getFoldingRangeProviders(this.languageFeaturesService,G);H.length>0&&(this.rangeProvider=new l.SyntaxRangeProvider(G,H,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,z))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(G){var z;(z=this.hiddenRangeModel)===null||z===void 0||z.notifyChangeModelContent(G),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const G=this.foldingModel;if(!G)return null;const z=new h.StopWatch,H=this.getRangeProvider(G.textModel),Y=this.foldingRegionPromise=(0,L.createCancelablePromise)(j=>H.compute(j));return Y.then(j=>{if(j&&Y===this.foldingRegionPromise){let Z;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const ce=j.setCollapsedAllOfType(i.FoldingRangeKind.Imports.value,!0);ce&&(Z=v.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=ce)}const ee=this.editor.getSelections(),le=ee?ee.map(ce=>ce.startLineNumber):[];G.update(j,le),Z?.restore(this.editor);const ue=this.updateDebounceInfo.update(G.textModel,z.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ue)}return G})}).then(void 0,G=>((0,y.onUnexpectedError)(G),null)))}onHiddenRangesChanges(G){if(this.hiddenRangeModel&&G.length&&!this._restoringViewState){const z=this.editor.getSelections();z&&this.hiddenRangeModel.adjustSelections(z)&&this.editor.setSelections(z)}this.editor.setHiddenAreas(G,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const G=this.getFoldingModel();G&&G.then(z=>{if(z){const H=this.editor.getSelections();if(H&&H.length>0){const Y=[];for(const j of H){const Z=j.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(Z)&&Y.push(...z.getAllRegionsAtLine(Z,ee=>ee.isCollapsed&&Z>ee.startLineNumber))}Y.length&&(z.toggleCollapseState(Y),this.reveal(H[0].getPosition()))}}}).then(void 0,y.onUnexpectedError)}onEditorMouseDown(G){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!G.target||!G.target.range||!G.event.leftButton&&!G.event.middleButton)return;const z=G.target.range;let H=!1;switch(G.target.type){case 4:{const Y=G.target.detail,j=G.target.element.offsetLeft;if(Y.offsetX-j<4)return;H=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!G.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const Y=this.editor.getModel();if(Y&&z.startColumn===Y.getLineMaxColumn(z.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:z.startLineNumber,iconClicked:H}}onEditorMouseUp(G){const z=this.foldingModel;if(!z||!this.mouseDownInfo||!G.target)return;const H=this.mouseDownInfo.lineNumber,Y=this.mouseDownInfo.iconClicked,j=G.target.range;if(!j||j.startLineNumber!==H)return;if(Y){if(G.target.type!==4)return}else{const ee=this.editor.getModel();if(!ee||j.startColumn!==ee.getLineMaxColumn(H))return}const Z=z.getRegionAtLine(H);if(Z&&Z.startLineNumber===H){const ee=Z.isCollapsed;if(Y||ee){const le=G.event.altKey;let ue=[];if(le){const ce=ve=>!ve.containedBy(Z)&&!Z.containedBy(ve),pe=z.getRegionsInside(null,ce);for(const ve of pe)ve.isCollapsed&&ue.push(ve);ue.length===0&&(ue=pe)}else{const ce=G.event.middleButton||G.event.shiftKey;if(ce)for(const pe of z.getRegionsInside(Z))pe.isCollapsed===ee&&ue.push(pe);(ee||!ce||ue.length===0)&&ue.push(Z)}z.toggleCollapseState(ue),this.reveal({lineNumber:H,column:1})}}}reveal(G){this.editor.revealPositionInCenterIfOutsideViewport(G,0)}};e.FoldingController=N,N.ID="editor.contrib.folding",e.FoldingController=N=A=ke([ge(1,c.IContextKeyService),ge(2,n.ILanguageConfigurationService),ge(3,o.INotificationService),ge(4,g.ILanguageFeatureDebounceService),ge(5,m.ILanguageFeaturesService)],N);class M{constructor(G){this.editor=G,this._onDidChange=new C.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(G,z){(G!==this._computed||z!==this._limited)&&(this._computed=G,this._limited=z,this._onDidChange.fire())}}e.RangesLimitReporter=M;class R extends b.EditorAction{runEditorCommand(G,z,H){const Y=G.get(n.ILanguageConfigurationService),j=N.get(z);if(!j)return;const Z=j.getFoldingModel();if(Z)return this.reportTelemetry(G,z),Z.then(ee=>{if(ee){this.invoke(j,ee,z,H,Y);const le=z.getSelection();le&&j.reveal(le.getStartPosition())}})}getSelectedLines(G){const z=G.getSelections();return z?z.map(H=>H.startLineNumber):[]}getLineNumbers(G,z){return G&&G.selectionLines?G.selectionLines.map(H=>H+1):this.getSelectedLines(z)}run(G,z){}}function x(U){if(!_.isUndefined(U)){if(!_.isObject(U))return!1;const G=U;if(!_.isUndefined(G.levels)&&!_.isNumber(G.levels)||!_.isUndefined(G.direction)&&!_.isString(G.direction)||!_.isUndefined(G.selectionLines)&&(!Array.isArray(G.selectionLines)||!G.selectionLines.every(_.isNumber)))return!1}return!0}class O extends R{constructor(){super({id:"editor.unfold",label:f.localize(0,null),alias:"Unfold",precondition:P,kbOpts:{kbExpr:a.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(G,z,H,Y){const j=Y&&Y.levels||1,Z=this.getLineNumbers(Y,H);Y&&Y.direction==="up"?(0,t.setCollapseStateLevelsUp)(z,!1,j,Z):(0,t.setCollapseStateLevelsDown)(z,!1,j,Z)}}class B extends R{constructor(){super({id:"editor.unfoldRecursively",label:f.localize(1,null),alias:"Unfold Recursively",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2142),weight:100}})}invoke(G,z,H,Y){(0,t.setCollapseStateLevelsDown)(z,!1,Number.MAX_VALUE,this.getSelectedLines(H))}}class W extends R{constructor(){super({id:"editor.fold",label:f.localize(2,null),alias:"Fold",precondition:P,kbOpts:{kbExpr:a.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(G,z,H,Y){const j=this.getLineNumbers(Y,H),Z=Y&&Y.levels,ee=Y&&Y.direction;typeof Z!="number"&&typeof ee!="string"?(0,t.setCollapseStateUp)(z,!0,j):ee==="up"?(0,t.setCollapseStateLevelsUp)(z,!0,Z||1,j):(0,t.setCollapseStateLevelsDown)(z,!0,Z||1,j)}}class V extends R{constructor(){super({id:"editor.toggleFold",label:f.localize(3,null),alias:"Toggle Fold",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2090),weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);(0,t.toggleCollapseState)(z,1,Y)}}class K extends R{constructor(){super({id:"editor.foldRecursively",label:f.localize(4,null),alias:"Fold Recursively",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2140),weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);(0,t.setCollapseStateLevelsDown)(z,!0,Number.MAX_VALUE,Y)}}class F extends R{constructor(){super({id:"editor.foldAllBlockComments",label:f.localize(5,null),alias:"Fold All Block Comments",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2138),weight:100}})}invoke(G,z,H,Y,j){if(z.regions.hasTypes())(0,t.setCollapseStateForType)(z,i.FoldingRangeKind.Comment.value,!0);else{const Z=H.getModel();if(!Z)return;const ee=j.getLanguageConfiguration(Z.getLanguageId()).comments;if(ee&&ee.blockCommentStartToken){const le=new RegExp("^\\s*"+(0,p.escapeRegExpCharacters)(ee.blockCommentStartToken));(0,t.setCollapseStateForMatchingLines)(z,le,!0)}}}}class q extends R{constructor(){super({id:"editor.foldAllMarkerRegions",label:f.localize(6,null),alias:"Fold All Regions",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2077),weight:100}})}invoke(G,z,H,Y,j){if(z.regions.hasTypes())(0,t.setCollapseStateForType)(z,i.FoldingRangeKind.Region.value,!0);else{const Z=H.getModel();if(!Z)return;const ee=j.getLanguageConfiguration(Z.getLanguageId()).foldingRules;if(ee&&ee.markers&&ee.markers.start){const le=new RegExp(ee.markers.start);(0,t.setCollapseStateForMatchingLines)(z,le,!0)}}}}class ie extends R{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:f.localize(7,null),alias:"Unfold All Regions",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2078),weight:100}})}invoke(G,z,H,Y,j){if(z.regions.hasTypes())(0,t.setCollapseStateForType)(z,i.FoldingRangeKind.Region.value,!1);else{const Z=H.getModel();if(!Z)return;const ee=j.getLanguageConfiguration(Z.getLanguageId()).foldingRules;if(ee&&ee.markers&&ee.markers.start){const le=new RegExp(ee.markers.start);(0,t.setCollapseStateForMatchingLines)(z,le,!1)}}}}class ae extends R{constructor(){super({id:"editor.foldAllExcept",label:f.localize(8,null),alias:"Fold All Except Selected",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2136),weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);(0,t.setCollapseStateForRest)(z,!0,Y)}}class ne extends R{constructor(){super({id:"editor.unfoldAllExcept",label:f.localize(9,null),alias:"Unfold All Except Selected",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2134),weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);(0,t.setCollapseStateForRest)(z,!1,Y)}}class $ extends R{constructor(){super({id:"editor.foldAll",label:f.localize(10,null),alias:"Fold All",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2069),weight:100}})}invoke(G,z,H){(0,t.setCollapseStateLevelsDown)(z,!0)}}class J extends R{constructor(){super({id:"editor.unfoldAll",label:f.localize(11,null),alias:"Unfold All",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2088),weight:100}})}invoke(G,z,H){(0,t.setCollapseStateLevelsDown)(z,!1)}}class Q extends R{getFoldingLevel(){return parseInt(this.id.substr(Q.ID_PREFIX.length))}invoke(G,z,H){(0,t.setCollapseStateAtLevel)(z,this.getFoldingLevel(),!0,this.getSelectedLines(H))}}Q.ID_PREFIX="editor.foldLevel",Q.ID=U=>Q.ID_PREFIX+U;class re extends R{constructor(){super({id:"editor.gotoParentFold",label:f.localize(12,null),alias:"Go to Parent Fold",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);if(Y.length>0){const j=(0,t.getParentFoldLine)(Y[0],z);j!==null&&H.setSelection({startLineNumber:j,startColumn:1,endLineNumber:j,endColumn:1})}}}class de extends R{constructor(){super({id:"editor.gotoPreviousFold",label:f.localize(13,null),alias:"Go to Previous Folding Range",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);if(Y.length>0){const j=(0,t.getPreviousFoldLine)(Y[0],z);j!==null&&H.setSelection({startLineNumber:j,startColumn:1,endLineNumber:j,endColumn:1})}}}class he extends R{constructor(){super({id:"editor.gotoNextFold",label:f.localize(14,null),alias:"Go to Next Folding Range",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,weight:100}})}invoke(G,z,H){const Y=this.getSelectedLines(H);if(Y.length>0){const j=(0,t.getNextFoldLine)(Y[0],z);j!==null&&H.setSelection({startLineNumber:j,startColumn:1,endLineNumber:j,endColumn:1})}}}class me extends R{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:f.localize(15,null),alias:"Create Folding Range from Selection",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2135),weight:100}})}invoke(G,z,H){var Y;const j=[],Z=H.getSelections();if(Z){for(const ee of Z){let le=ee.endLineNumber;ee.endColumn===1&&--le,le>ee.startLineNumber&&(j.push({startLineNumber:ee.startLineNumber,endLineNumber:le,type:void 0,isCollapsed:!0,source:1}),H.setSelection({startLineNumber:ee.startLineNumber,startColumn:1,endLineNumber:ee.startLineNumber,endColumn:1}))}if(j.length>0){j.sort((le,ue)=>le.startLineNumber-ue.startLineNumber);const ee=s.FoldingRegions.sanitizeAndMerge(z.regions,j,(Y=H.getModel())===null||Y===void 0?void 0:Y.getLineCount());z.updatePost(s.FoldingRegions.fromFoldRanges(ee))}}}}class X extends R{constructor(){super({id:"editor.removeManualFoldingRanges",label:f.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2137),weight:100}})}invoke(G,z,H){const Y=H.getSelections();if(Y){const j=[];for(const Z of Y){const{startLineNumber:ee,endLineNumber:le}=Z;j.push(le>=ee?{startLineNumber:ee,endLineNumber:le}:{endLineNumber:le,startLineNumber:ee})}z.removeManualRanges(j),G.triggerFoldingModelChanged()}}}(0,b.registerEditorContribution)(N.ID,N,0),(0,b.registerEditorAction)(O),(0,b.registerEditorAction)(B),(0,b.registerEditorAction)(W),(0,b.registerEditorAction)(K),(0,b.registerEditorAction)($),(0,b.registerEditorAction)(J),(0,b.registerEditorAction)(F),(0,b.registerEditorAction)(q),(0,b.registerEditorAction)(ie),(0,b.registerEditorAction)(ae),(0,b.registerEditorAction)(ne),(0,b.registerEditorAction)(V),(0,b.registerEditorAction)(re),(0,b.registerEditorAction)(de),(0,b.registerEditorAction)(he),(0,b.registerEditorAction)(me),(0,b.registerEditorAction)(X);for(let U=1;U<=7;U++)(0,b.registerInstantiatedEditorAction)(new Q({id:Q.ID(U),label:f.localize(17,null,U),alias:`Fold Level ${U}`,precondition:P,kbOpts:{kbExpr:a.EditorContextKeys.editorTextFocus,primary:(0,E.KeyChord)(2089,2048|21+U),weight:100}}));w.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",async function(U,...G){const[z]=G;if(!(z instanceof D.URI))throw(0,y.illegalArgument)();const H=U.get(m.ILanguageFeaturesService),Y=U.get(I.IModelService).getModel(z);if(!Y)throw(0,y.illegalArgument)();const j=U.get(T.IConfigurationService);if(!j.getValue("editor.folding",{resource:z}))return[];const Z=U.get(n.ILanguageConfigurationService),ee=j.getValue("editor.foldingStrategy",{resource:z}),le={get limit(){return j.getValue("editor.foldingMaximumRegions",{resource:z})},update:(Ce,Se)=>{}},ue=new u.IndentRangeProvider(Y,Z,le);let ce=ue;if(ee!=="indentation"){const Ce=N.getFoldingRangeProviders(H,Y);Ce.length&&(ce=new l.SyntaxRangeProvider(Y,Ce,()=>{},le,ue))}const pe=await ce.compute(k.CancellationToken.None),ve=[];try{if(pe)for(let Ce=0;Ce<pe.length;Ce++){const Se=pe.getType(Ce);ve.push({start:pe.getStartLineNumber(Ce),end:pe.getEndLineNumber(Ce),kind:Se?i.FoldingRangeKind.fromValue(Se):void 0})}return ve}finally{ce.dispose()}})}),define(se[379],oe([1,0,7,227,13,2,10,5,38,31,332,101,8,34,14,21,15,616,27,69]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d){"use strict";var s,l;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorHoverStatusBar=e.ContentHoverWidget=e.ContentHoverController=void 0;const o=L.$;let g=s=class extends E.Disposable{constructor(R,x,O){super(),this._editor=R,this._instantiationService=x,this._keybindingService=O,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(T,this._editor)),this._participants=[];for(const B of a.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(B,this._editor));this._participants.sort((B,W)=>B.hoverOrdinal-W.hoverOrdinal),this._computer=new P(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)}))}_startShowingOrUpdateHover(R,x,O,B,W){return!this._widget.position||!this._currentResult?R?(this._startHoverOperationIfNecessary(R,x,O,B,!1),!0):!1:this._editor.getOption(60).sticky&&W&&this._widget.isMouseGettingCloser(W.event.posx,W.event.posy)?(R&&this._startHoverOperationIfNecessary(R,x,O,B,!0),!0):R?R&&this._currentResult.anchor.equals(R)?!0:R.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(R)),this._startHoverOperationIfNecessary(R,x,O,B,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(R,x,O,B,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(R,x,O,B,W){this._computer.anchor&&this._computer.anchor.equals(R)||(this._hoverOperation.cancel(),this._computer.anchor=R,this._computer.shouldFocus=B,this._computer.source=O,this._computer.insistOnKeepingHoverVisible=W,this._hoverOperation.start(x))}_setCurrentResult(R){this._currentResult!==R&&(R&&R.messages.length===0&&(R=null),this._currentResult=R,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_addLoadingMessage(R){if(this._computer.anchor){for(const x of this._participants)if(x.createLoadingMessage){const O=x.createLoadingMessage(this._computer.anchor);if(O)return R.slice(0).concat([O])}}return R}_withResult(R){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!R.isComplete||this._computer.insistOnKeepingHoverVisible&&R.messages.length===0)||this._setCurrentResult(R)}_renderMessages(R,x){const{showAtPosition:O,showAtSecondaryPosition:B,highlightRange:W}=s.computeHoverRanges(this._editor,R.range,x),V=new E.DisposableStore,K=V.add(new A(this._keybindingService)),F=document.createDocumentFragment();let q=null;const ie={fragment:F,statusBar:K,setColorPicker:ne=>q=ne,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:ne=>this._widget.setMinimumDimensions(ne),hide:()=>this.hide()};for(const ne of this._participants){const $=x.filter(J=>J.owner===ne);$.length>0&&V.add(ne.renderHoverParts(ie,$))}const ae=x.some(ne=>ne.isBeforeContent);if(K.hasContent&&F.appendChild(K.hoverElement),F.hasChildNodes()){if(W){const ne=this._editor.createDecorationsCollection();ne.set([{range:W,options:s._DECORATION_OPTIONS}]),V.add((0,E.toDisposable)(()=>{ne.clear()}))}this._widget.showAt(F,new C(R.initialMousePosX,R.initialMousePosY,q,O,B,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,ae,V))}else V.dispose()}static computeHoverRanges(R,x,O){let B=1;if(R.hasModel()){const ae=R._getViewModel(),ne=ae.coordinatesConverter,$=ne.convertModelRangeToViewRange(x),J=new S.Position($.startLineNumber,ae.getLineMinColumn($.startLineNumber));B=ne.convertViewPositionToModelPosition(J).column}const W=x.startLineNumber;let V=x.startColumn,K=O[0].range,F=null;for(const ae of O)K=p.Range.plusRange(K,ae.range),ae.range.startLineNumber===W&&ae.range.endLineNumber===W&&(V=Math.max(Math.min(V,ae.range.startColumn),B)),ae.forceShowAtRange&&(F=ae.range);const q=F?F.getStartPosition():new S.Position(W,x.startColumn),ie=F?F.getStartPosition():new S.Position(W,V);return{showAtPosition:q,showAtSecondaryPosition:ie,highlightRange:K}}showsOrWillShow(R){if(this._widget.isResizing)return!0;const x=[];for(const B of this._participants)if(B.suggestHoverAnchor){const W=B.suggestHoverAnchor(R);W&&x.push(W)}const O=R.target;if(O.type===6&&x.push(new a.HoverRangeAnchor(0,O.range,R.event.posx,R.event.posy)),O.type===7){const B=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!O.detail.isAfterLines&&typeof O.detail.horizontalDistanceToText=="number"&&O.detail.horizontalDistanceToText<B&&x.push(new a.HoverRangeAnchor(0,O.range,R.event.posx,R.event.posy))}return x.length===0?this._startShowingOrUpdateHover(null,0,0,!1,R):(x.sort((B,W)=>W.priority-B.priority),this._startShowingOrUpdateHover(x[0],0,0,!1,R))}startShowingAtRange(R,x,O,B){this._startShowingOrUpdateHover(new a.HoverRangeAnchor(0,R,void 0,void 0),x,O,B,null)}containsNode(R){return R?this._widget.getDomNode().contains(R):!1}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()}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}get widget(){return this._widget}};e.ContentHoverController=g,g._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),e.ContentHoverController=g=s=ke([ge(1,i.IInstantiationService),ge(2,n.IKeybindingService)],g);class h{constructor(R,x,O){this.anchor=R,this.messages=x,this.isComplete=O}filter(R){const x=this.messages.filter(O=>O.isValidForHoverAnchor(R));return x.length===this.messages.length?this:new m(this,this.anchor,x,this.isComplete)}}class m extends h{constructor(R,x,O,B){super(x,O,B),this.original=R}filter(R){return this.original.filter(R)}}class C{constructor(R,x,O,B,W,V,K,F,q,ie){this.initialMousePosX=R,this.initialMousePosY=x,this.colorPicker=O,this.showAtPosition=B,this.showAtSecondaryPosition=W,this.preferAbove=V,this.stoleFocus=K,this.source=F,this.isBeforeContent=q,this.disposables=ie,this.closestMouseDistance=void 0}}const w=30,D=10,I=6;let T=l=class extends f.ResizableContentWidget{get isColorPickerVisible(){var R;return!!(!((R=this._visibleData)===null||R===void 0)&&R.colorPicker)}get isVisibleFromKeyboard(){var R;return((R=this._visibleData)===null||R===void 0?void 0:R.source)===1}get isVisible(){var R;return(R=this._hoverVisibleKey.get())!==null&&R!==void 0?R:!1}get isFocused(){var R;return(R=this._hoverFocusedKey.get())!==null&&R!==void 0?R:!1}constructor(R,x,O,B,W){const V=R.getOption(66)+8,K=150,F=new L.Dimension(K,V);super(R,F),this._configurationService=O,this._accessibilityService=B,this._keybindingService=W,this._hover=this._register(new k.HoverWidget),this._minimumSize=F,this._hoverVisibleKey=r.EditorContextKeys.hoverVisible.bindTo(x),this._hoverFocusedKey=r.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(ie=>{ie.hasChanged(50)&&this._updateFont()}));const q=this._register(L.trackFocus(this._resizableNode.domNode));this._register(q.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(q.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var R;super.dispose(),(R=this._visibleData)===null||R===void 0||R.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return l.ID}static _applyDimensions(R,x,O){const B=typeof x=="number"?`${x}px`:x,W=typeof O=="number"?`${O}px`:O;R.style.width=B,R.style.height=W}_setContentsDomNodeDimensions(R,x){const O=this._hover.contentsDomNode;return l._applyDimensions(O,R,x)}_setContainerDomNodeDimensions(R,x){const O=this._hover.containerDomNode;return l._applyDimensions(O,R,x)}_setHoverWidgetDimensions(R,x){this._setContentsDomNodeDimensions(R,x),this._setContainerDomNodeDimensions(R,x),this._layoutContentWidget()}static _applyMaxDimensions(R,x,O){const B=typeof x=="number"?`${x}px`:x,W=typeof O=="number"?`${O}px`:O;R.style.maxWidth=B,R.style.maxHeight=W}_setHoverWidgetMaxDimensions(R,x){l._applyMaxDimensions(this._hover.contentsDomNode,R,x),l._applyMaxDimensions(this._hover.containerDomNode,R,x),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof R=="number"?`${R}px`:R),this._layoutContentWidget()}_hasHorizontalScrollbar(){const R=this._hover.scrollbar.getScrollDimensions();return R.scrollWidth>R.width}_adjustContentsBottomPadding(){const R=this._hover.contentsDomNode,x=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;R.style.paddingBottom!==x&&(R.style.paddingBottom=x)}_setAdjustedHoverWidgetDimensions(R){this._setHoverWidgetMaxDimensions("none","none");const x=R.width,O=R.height;this._setHoverWidgetDimensions(x,O),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(x,O-D))}_updateResizableNodeMaxDimensions(){var R,x;const O=(R=this._findMaximumRenderingWidth())!==null&&R!==void 0?R:1/0,B=(x=this._findMaximumRenderingHeight())!==null&&x!==void 0?x:1/0;this._resizableNode.maxSize=new L.Dimension(O,B),this._setHoverWidgetMaxDimensions(O,B)}_resize(R){var x,O;l._lastDimensions=new L.Dimension(R.width,R.height),this._setAdjustedHoverWidgetDimensions(R),this._resizableNode.layout(R.height,R.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(O=(x=this._visibleData)===null||x===void 0?void 0:x.colorPicker)===null||O===void 0||O.layout()}_findAvailableSpaceVertically(){var R;const x=(R=this._visibleData)===null||R===void 0?void 0:R.showAtPosition;if(x)return this._positionPreference===1?this._availableVerticalSpaceAbove(x):this._availableVerticalSpaceBelow(x)}_findMaximumRenderingHeight(){const R=this._findAvailableSpaceVertically();if(!R)return;let x=I;return Array.from(this._hover.contentsDomNode.children).forEach(O=>{x+=O.clientHeight}),this._hasHorizontalScrollbar()&&(x+=D),Math.min(R,x)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const R=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"),R}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const R=this._isHoverTextOverflowing(),x=typeof this._contentWidth>"u"?0:this._contentWidth-2;return R||this._hover.containerDomNode.clientWidth<x?L.getClientArea(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(R,x){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=R,this._visibleData.initialMousePosY=x,!1;const O=L.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=N(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,O.left,O.top,O.width,O.height));const B=N(R,x,O.left,O.top,O.width,O.height);return B>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,B),!0)}_setHoverData(R){var x;(x=this._visibleData)===null||x===void 0||x.disposables.dispose(),this._visibleData=R,this._hoverVisibleKey.set(!!R),this._hover.containerDomNode.classList.toggle("hidden",!R)}_updateFont(){const{fontSize:R,lineHeight:x}=this._editor.getOption(50),O=this._hover.contentsDomNode;O.style.fontSize=`${R}px`,O.style.lineHeight=`${x/R}`,Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(W=>this._editor.applyFontInfo(W))}_updateContent(R){const x=this._hover.contentsDomNode;x.style.paddingBottom="",x.textContent="",x.appendChild(R)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const R=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,R)}_render(R,x){this._setHoverData(x),this._updateFont(),this._updateContent(R),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var R;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(R=this._positionPreference)!==null&&R!==void 0?R:1]}:null}showAt(R,x){var O,B,W,V;if(!this._editor||!this._editor.hasModel())return;this._render(R,x);const K=L.getTotalHeight(this._hover.containerDomNode),F=x.showAtPosition;this._positionPreference=(O=this._findPositionPreference(K,F))!==null&&O!==void 0?O:1,this.onContentsChanged(),x.stoleFocus&&this._hover.containerDomNode.focus(),(B=x.colorPicker)===null||B===void 0||B.layout();const ie=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:"");ie&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+ie)}hide(){if(!this._visibleData)return;const R=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),R&&this._editor.focus()}_removeConstraintsRenderNormally(){const R=this._editor.getLayoutInfo();this._resizableNode.layout(R.height,R.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(R){var x;const O=this._hover.containerDomNode,B=this._hover.contentsDomNode,W=(x=this._findMaximumRenderingHeight())!==null&&x!==void 0?x:1/0;this._setContainerDomNodeDimensions(L.getTotalWidth(O),Math.min(W,R)),this._setContentsDomNodeDimensions(L.getTotalWidth(B),Math.min(W,R-D))}setMinimumDimensions(R){this._minimumSize=new L.Dimension(Math.max(this._minimumSize.width,R.width),Math.max(this._minimumSize.height,R.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const R=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new L.Dimension(R,this._minimumSize.height)}onContentsChanged(){var R;this._removeConstraintsRenderNormally();const x=this._hover.containerDomNode;let O=L.getTotalHeight(x),B=L.getTotalWidth(x);if(this._resizableNode.layout(O,B),this._setHoverWidgetDimensions(B,O),O=L.getTotalHeight(x),B=L.getTotalWidth(x),this._contentWidth=B,this._updateMinimumWidth(),this._resizableNode.layout(O,B),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(O)),!((R=this._visibleData)===null||R===void 0)&&R.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 R=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:R-x.lineHeight})}scrollDown(){const R=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:R+x.lineHeight})}scrollLeft(){const R=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:R-w})}scrollRight(){const R=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:R+w})}pageUp(){const R=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:R-x})}pageDown(){const R=this._hover.scrollbar.getScrollPosition().scrollTop,x=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:R+x})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};e.ContentHoverWidget=T,T.ID="editor.contrib.resizableContentHoverWidget",T._lastDimensions=new L.Dimension(0,0),e.ContentHoverWidget=T=l=ke([ge(1,u.IContextKeyService),ge(2,c.IConfigurationService),ge(3,d.IAccessibilityService),ge(4,n.IKeybindingService)],T);let A=class extends E.Disposable{get hasContent(){return this._hasContent}constructor(R){super(),this._keybindingService=R,this._hasContent=!1,this.hoverElement=o("div.hover-row.status-bar"),this.actionsElement=L.append(this.hoverElement,o("div.actions"))}addAction(R){const x=this._keybindingService.lookupKeybinding(R.commandId),O=x?x.getLabel():null;return this._hasContent=!0,this._register(k.HoverAction.render(this.actionsElement,R,O))}append(R){const x=L.append(this.actionsElement,R);return this._hasContent=!0,x}};e.EditorHoverStatusBar=A,e.EditorHoverStatusBar=A=ke([ge(0,n.IKeybindingService)],A);class P{get anchor(){return this._anchor}set anchor(R){this._anchor=R}get shouldFocus(){return this._shouldFocus}set shouldFocus(R){this._shouldFocus=R}get source(){return this._source}set source(R){this._source=R}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(R){this._insistOnKeepingHoverVisible=R}constructor(R,x){this._editor=R,this._participants=x,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(R,x){if(x.type!==1&&!x.supportsMarkerHover)return[];const O=R.getModel(),B=x.range.startLineNumber;if(B>O.getLineCount())return[];const W=O.getLineMaxColumn(B);return R.getLineDecorations(B).filter(V=>{if(V.options.isWholeLine)return!0;const K=V.range.startLineNumber===B?V.range.startColumn:1,F=V.range.endLineNumber===B?V.range.endColumn:W;if(V.options.showIfCollapsed){if(K>x.range.startColumn+1||x.range.endColumn-1>F)return!1}else if(K>x.range.startColumn||x.range.endColumn>F)return!1;return!0})}computeAsync(R){const x=this._anchor;if(!this._editor.hasModel()||!x)return t.AsyncIterableObject.EMPTY;const O=P._getLineDecorations(this._editor,x);return t.AsyncIterableObject.merge(this._participants.map(B=>B.computeAsync?B.computeAsync(x,O,R):t.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const R=P._getLineDecorations(this._editor,this._anchor);let x=[];for(const O of this._participants)x=x.concat(O.computeSync(this._anchor,R));return(0,y.coalesce)(x)}}function N(M,R,x,O,B,W){const V=x+B/2,K=O+W/2,F=Math.max(Math.abs(M-V)-B/2,0),q=Math.max(Math.abs(R-K)-W/2,0);return Math.sqrt(F*F+q*q)}}),define(se[899],oe([1,0,2,376,8,379,34,6,18,16,21,15,51,32,353,7,201]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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,T){super(),this._editor=h,this._modelService=C,this._keybindingService=w,this._instantiationService=D,this._languageFeatureService=I,this._languageConfigurationService=T,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=ke([ge(1,a.IContextKeyService),ge(2,i.IModelService),ge(3,S.IKeybindingService),ge(4,y.IInstantiationService),ge(5,_.ILanguageFeaturesService),ge(6,n.ILanguageConfigurationService)],c),(0,v.registerEditorContribution)(c.ID,c,1);const d=8,s=22;let l=f=class extends L.Disposable{constructor(h,m,C,w,D,I,T,A){var P;super(),this._editor=h,this._standaloneColorPickerVisible=m,this._standaloneColorPickerFocused=C,this._modelService=D,this._keybindingService=I,this._languageFeaturesService=T,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=(P=this._editor._getViewModel())===null||P===void 0?void 0:P.getPrimaryCursorState().modelState.position;const N=this._editor.getSelection(),M=N?{startLineNumber:N.startLineNumber,startColumn:N.startColumn,endLineNumber:N.endLineNumber,endColumn:N.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},R=this._register(r.trackFocus(this._body));this._register(R.onDidBlur(x=>{this.hide()})),this._register(R.onDidFocus(x=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(x=>{var O;const B=(O=x.target.element)===null||O===void 0?void 0:O.classList;B&&B.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(x=>{this._render(x.value,x.foundInEditor)})),this._start(M),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 o(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 T=D.body,A=T.saturationBox.domNode.clientWidth,P=T.domNode.clientWidth-A-s-d,N=D.body.enterButton;N?.onClicked(()=>{this.updateEditor(),this.hide()});const M=D.header,R=M.pickedColorNode;R.style.width=A+d+"px";const x=M.originalColorNode;x.style.width=P+"px";const O=D.header.closeButton;O?.onClicked(()=>{this.hide()}),m&&(N&&(N.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=ke([ge(3,y.IInstantiationService),ge(4,i.IModelService),ge(5,S.IKeybindingService),ge(6,_.ILanguageFeaturesService),ge(7,n.ILanguageConfigurationService)],l);class o{constructor(h,m){this.value=h,this.foundInEditor=m}}}),define(se[900],oe([1,0,16,662,899,21,30,201]),function(te,e,L,k,y,E,S){"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:S.MenuId.CommandPalette}]})}runEditorCommand(a,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=p;class _ 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(a,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(a,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.insertColor()}}(0,L.registerEditorAction)(_),(0,L.registerEditorAction)(v),(0,S.registerAction2)(p)}),define(se[901],oe([1,0,14,12,105,16,5,24,21,38,121,690,559,466]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 s;(s=this.currentRequest)===null||s===void 0||s.cancel();const l=this.editor.getSelection(),o=this.editor.getModel();if(!o||!l)return;let g=l;if(g.startLineNumber!==g.endLineNumber)return;const h=new y.EditorState(this.editor,5),m=o.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=S.Range.lift(C.range);let I=C.range;const T=C.value.length-(g.endColumn-g.startColumn);I={startLineNumber:I.startLineNumber,startColumn:I.startColumn,endLineNumber:I.endLineNumber,endColumn:I.startColumn+C.value.length},T>1&&(g=new p.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+T-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=ke([ge(1,b.IEditorWorkerService)],t);class r extends E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:a.localize(0,null),alias:"Replace with Previous Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(c,d){const s=t.get(d);return s?s.run(this.id,!1):Promise.resolve(void 0)}}class u extends E.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:a.localize(1,null),alias:"Replace with Next Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(c,d){const s=t.get(d);return s?s.run(this.id,!0):Promise.resolve(void 0)}}(0,E.registerEditorContribution)(t.ID,t,4),(0,E.registerEditorAction)(r),(0,E.registerEditorAction)(u)}),define(se[262],oe([1,0,7,14,26,2,11,28,5,38,8,469]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const a=v.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:S.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class i extends E.Disposable{constructor(r,u,f,c,d){super(),this.typeId=r,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(r){this.domNode=L.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=r;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(r,u,f){super(),this.id=r,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(r,u,f){const c=this._operationIdPool++;this._currentOperation=c,this.clear(),this._showPromise.value=(0,k.disposableTimeout)(()=>{const d=_.Range.fromPositions(r);this._currentDecorations.set([{range:d,options:a}]).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=ke([ge(2,b.IInstantiationService)],n)}),define(se[380],oe([1,0,7,13,14,176,2,109,17,175,190,352,136,5,18,239,105,262,667,103,15,8,88,70,346,166]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=e.pasteWidgetVisibleCtx=e.changePasteTypeCommandId=void 0,e.changePasteTypeCommandId="editor.changePasteType",e.pasteWidgetVisibleCtx=new s.RawContextKey("pasteWidgetVisible",!1,(0,c.localize)(0,null));const w="application/vnd.code.copyMetadata";let D=C=class extends S.Disposable{static get(A){return A.getContribution(C.ID)}constructor(A,P,N,M,R,x,O){super(),this._bulkEditService=N,this._clipboardService=M,this._languageFeaturesService=R,this._quickInputService=x,this._progressService=O,this._editor=A;const B=A.getContainerDomNode();this._register((0,L.addDisposableListener)(B,"copy",W=>this.handleCopy(W))),this._register((0,L.addDisposableListener)(B,"cut",W=>this.handleCopy(W))),this._register((0,L.addDisposableListener)(B,"paste",W=>this.handlePaste(W),!0)),this._pasteProgressManager=this._register(new f.InlineProgressManager("pasteIntoEditor",A,P)),this._postPasteWidgetManager=this._register(P.createInstance(h.PostEditWidgetManager,"pasteIntoEditor",A,e.pasteWidgetVisibleCtx,{id:e.changePasteTypeCommandId,label:(0,c.localize)(1,null)}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(A){this._editor.focus();try{this._pasteAsActionContext={preferredId:A},(0,L.getActiveDocument)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}async finishedPaste(){await this._currentPasteOperation}handleCopy(A){var P,N;if(!this._editor.hasTextFocus()||(_.isWeb&&this._clipboardService.writeResources([]),!A.clipboardData||!this.isPasteAsEnabled()))return;const M=this._editor.getModel(),R=this._editor.getSelections();if(!M||!R?.length)return;const x=this._editor.getOption(37);let O=R;const B=R.length===1&&R[0].isEmpty();if(B){if(!x)return;O=[new n.Range(O[0].startLineNumber,1,O[0].startLineNumber,1+M.getLineLength(O[0].startLineNumber))]}const W=(P=this._editor._getViewModel())===null||P===void 0?void 0:P.getPlainTextToCopy(R,x,_.isWindows),K={multicursorText:Array.isArray(W)?W:null,pasteOnNewLine:B,mode:null},F=this._languageFeaturesService.documentPasteEditProvider.ordered(M).filter($=>!!$.prepareDocumentPaste);if(!F.length){this.setCopyMetadata(A.clipboardData,{defaultPastePayload:K});return}const q=(0,a.toVSDataTransfer)(A.clipboardData),ie=F.flatMap($=>{var J;return(J=$.copyMimeTypes)!==null&&J!==void 0?J:[]}),ae=(0,v.generateUuid)();this.setCopyMetadata(A.clipboardData,{id:ae,providerCopyMimeTypes:ie,defaultPastePayload:K});const ne=(0,y.createCancelablePromise)(async $=>{const J=(0,k.coalesce)(await Promise.all(F.map(async Q=>{try{return await Q.prepareDocumentPaste(M,O,q,$)}catch(re){console.error(re);return}})));J.reverse();for(const Q of J)for(const[re,de]of Q)q.replace(re,de);return q});(N=this._currentCopyOperation)===null||N===void 0||N.dataTransferPromise.cancel(),this._currentCopyOperation={handle:ae,dataTransferPromise:ne}}async handlePaste(A){var P,N,M,R,x;if(!A.clipboardData||!this._editor.hasTextFocus())return;(P=m.MessageController.get(this._editor))===null||P===void 0||P.closeMessage(),(N=this._currentPasteOperation)===null||N===void 0||N.cancel(),this._currentPasteOperation=void 0;const O=this._editor.getModel(),B=this._editor.getSelections();if(!B?.length||!O||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const W=this.fetchCopyMetadata(A),V=(0,a.toExternalVSDataTransfer)(A.clipboardData);V.delete(w);const K=[...A.clipboardData.types,...(M=W?.providerCopyMimeTypes)!==null&&M!==void 0?M:[],p.Mimes.uriList],F=this._languageFeaturesService.documentPasteEditProvider.ordered(O).filter(q=>{var ie,ae;return!((ie=this._pasteAsActionContext)===null||ie===void 0)&&ie.preferredId&&this._pasteAsActionContext.preferredId!==q.id?!1:(ae=q.pasteMimeTypes)===null||ae===void 0?void 0:ae.some(ne=>(0,E.matchesMimeType)(ne,K))});if(!F.length){!((R=this._pasteAsActionContext)===null||R===void 0)&&R.preferredId&&this.showPasteAsNoEditMessage(B,(x=this._pasteAsActionContext)===null||x===void 0?void 0:x.preferredId);return}A.preventDefault(),A.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,F,B,V,W,{trigger:"explicit",only:this._pasteAsActionContext.preferredId}):this.doPasteInline(F,B,V,W,{trigger:"implicit"})}showPasteAsNoEditMessage(A,P){var N;(N=m.MessageController.get(this._editor))===null||N===void 0||N.showMessage((0,c.localize)(2,null,P),A[0].getStartPosition())}doPasteInline(A,P,N,M,R){const x=(0,y.createCancelablePromise)(async O=>{const B=this._editor;if(!B.hasModel())return;const W=B.getModel(),V=new u.EditorStateCancellationTokenSource(B,3,void 0,O);try{if(await this.mergeInDataFromCopy(N,M,V.token),V.token.isCancellationRequested)return;const K=A.filter(q=>I(q,N));if(!K.length||K.length===1&&K[0].id==="text"){await this.applyDefaultPasteHandler(N,M,V.token);return}const F=await this.getPasteEdits(K,N,W,P,R,V.token);if(V.token.isCancellationRequested)return;if(F.length===1&&F[0].providerId==="text"){await this.applyDefaultPasteHandler(N,M,V.token);return}if(F.length){const q=B.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(P,{activeEditIndex:0,allEdits:F},q,V.token)}await this.applyDefaultPasteHandler(N,M,V.token)}finally{V.dispose(),this._currentPasteOperation===x&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(P[0].getEndPosition(),(0,c.localize)(3,null),x),this._currentPasteOperation=x}showPasteAsPick(A,P,N,M,R,x){const O=(0,y.createCancelablePromise)(async B=>{const W=this._editor;if(!W.hasModel())return;const V=W.getModel(),K=new u.EditorStateCancellationTokenSource(W,3,void 0,B);try{if(await this.mergeInDataFromCopy(M,R,K.token),K.token.isCancellationRequested)return;let F=P.filter(ne=>I(ne,M));A&&(F=F.filter(ne=>ne.id===A));const q=await this.getPasteEdits(F,M,V,N,x,K.token);if(K.token.isCancellationRequested)return;if(!q.length){x.only&&this.showPasteAsNoEditMessage(N,x.only);return}let ie;if(A)ie=q.at(0);else{const ne=await this._quickInputService.pick(q.map($=>({label:$.label,description:$.providerId,detail:$.detail,edit:$})),{placeHolder:(0,c.localize)(4,null)});ie=ne?.edit}if(!ie)return;const ae=(0,r.createCombinedWorkspaceEdit)(V.uri,N,ie);await this._bulkEditService.apply(ae,{editor:this._editor})}finally{K.dispose(),this._currentPasteOperation===O&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:(0,c.localize)(5,null)},()=>O)}setCopyMetadata(A,P){A.setData(w,JSON.stringify(P))}fetchCopyMetadata(A){var P;if(!A.clipboardData)return;const N=A.clipboardData.getData(w);if(N)try{return JSON.parse(N)}catch{return}const[M,R]=b.ClipboardEventUtils.getTextData(A.clipboardData);if(R)return{defaultPastePayload:{mode:R.mode,multicursorText:(P=R.multicursorText)!==null&&P!==void 0?P:null,pasteOnNewLine:!!R.isFromEmptySelection}}}async mergeInDataFromCopy(A,P,N){var M;if(P?.id&&((M=this._currentCopyOperation)===null||M===void 0?void 0:M.handle)===P.id){const R=await this._currentCopyOperation.dataTransferPromise;if(N.isCancellationRequested)return;for(const[x,O]of R)A.replace(x,O)}if(!A.has(p.Mimes.uriList)){const R=await this._clipboardService.readResources();if(N.isCancellationRequested)return;R.length&&A.append(p.Mimes.uriList,(0,E.createStringDataTransferItem)(E.UriList.create(R)))}}async getPasteEdits(A,P,N,M,R,x){const O=await(0,y.raceCancellation)(Promise.all(A.map(async W=>{var V;try{const K=await((V=W.provideDocumentPasteEdits)===null||V===void 0?void 0:V.call(W,N,M,P,R,x));if(K)return{...K,providerId:W.id}}catch(K){console.error(K)}})),x),B=(0,k.coalesce)(O??[]);return(0,r.sortEditsByYieldTo)(B)}async applyDefaultPasteHandler(A,P,N){var M,R,x;const O=(M=A.get(p.Mimes.text))!==null&&M!==void 0?M:A.get("text");if(!O)return;const B=await O.asString();if(N.isCancellationRequested)return;const W={text:B,pasteOnNewLine:(R=P?.defaultPastePayload.pasteOnNewLine)!==null&&R!==void 0?R:!1,multicursorText:(x=P?.defaultPastePayload.multicursorText)!==null&&x!==void 0?x:null,mode:null};this._editor.trigger("keyboard","paste",W)}};e.CopyPasteController=D,D.ID="editor.contrib.copyPasteActionController",e.CopyPasteController=D=C=ke([ge(1,l.IInstantiationService),ge(2,i.IBulkEditService),ge(3,d.IClipboardService),ge(4,t.ILanguageFeaturesService),ge(5,g.IQuickInputService),ge(6,o.IProgressService)],D);function I(T,A){var P;return!!(!((P=T.pasteMimeTypes)===null||P===void 0)&&P.some(N=>A.matches(N)))}}),define(se[902],oe([1,0,54,7,17,190,16,33,21,380,653,30,103,15]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const t="9_cutcopypaste",r=y.isNative||document.queryCommandSupported("cut"),u=y.isNative||document.queryCommandSupported("copy"),f=typeof navigator.clipboard>"u"||L.isFirefox?document.queryCommandSupported("paste"):!0;function c(l){return l.register(),l}e.CutAction=r?c(new S.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:y.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:a.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(0,null),order:1},{menuId:a.MenuId.EditorContext,group:t,title:b.localize(1,null),when:_.EditorContextKeys.writable,order:1},{menuId:a.MenuId.CommandPalette,group:"",title:b.localize(2,null),order:1},{menuId:a.MenuId.SimpleEditorContext,group:t,title:b.localize(3,null),when:_.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=u?c(new S.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:y.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:a.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(4,null),order:2},{menuId:a.MenuId.EditorContext,group:t,title:b.localize(5,null),order:2},{menuId:a.MenuId.CommandPalette,group:"",title:b.localize(6,null),order:1},{menuId:a.MenuId.SimpleEditorContext,group:t,title:b.localize(7,null),order:2}]})):void 0,a.MenuRegistry.appendMenuItem(a.MenuId.MenubarEditMenu,{submenu:a.MenuId.MenubarCopy,title:{value:b.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),a.MenuRegistry.appendMenuItem(a.MenuId.EditorContext,{submenu:a.MenuId.EditorContextCopy,title:{value:b.localize(9,null),original:"Copy As"},group:t,order:3}),a.MenuRegistry.appendMenuItem(a.MenuId.EditorContext,{submenu:a.MenuId.EditorContextShare,title:{value:b.localize(10,null),original:"Share"},group:"11_share",order:-1,when:n.ContextKeyExpr.and(n.ContextKeyExpr.notEquals("resourceScheme","output"),_.EditorContextKeys.editorTextFocus)}),a.MenuRegistry.appendMenuItem(a.MenuId.EditorTitleContext,{submenu:a.MenuId.EditorTitleContextShare,title:{value:b.localize(11,null),original:"Share"},group:"11_share",order:-1}),a.MenuRegistry.appendMenuItem(a.MenuId.ExplorerContext,{submenu:a.MenuId.ExplorerContextShare,title:{value:b.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=f?c(new S.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:a.MenuId.MenubarEditMenu,group:"2_ccp",title:b.localize(13,null),order:4},{menuId:a.MenuId.EditorContext,group:t,title:b.localize(14,null),when:_.EditorContextKeys.writable,order:4},{menuId:a.MenuId.CommandPalette,group:"",title:b.localize(15,null),order:1},{menuId:a.MenuId.SimpleEditorContext,group:t,title:b.localize(16,null),when:_.EditorContextKeys.writable,order:4}]})):void 0;class d extends S.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:b.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(o,g){!g.hasModel()||!g.getOption(37)&&g.getSelection().isEmpty()||(E.CopyOptions.forceCopyWithSyntaxHighlighting=!0,g.focus(),g.getContainerDomNode().ownerDocument.execCommand("copy"),E.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function s(l,o){l&&(l.addImplementation(1e4,"code-editor",(g,h)=>{const m=g.get(p.ICodeEditorService).getFocusedCodeEditor();if(m&&m.hasTextFocus()){const C=m.getOption(37),w=m.getSelection();return w&&w.isEmpty()&&!C||m.getContainerDomNode().ownerDocument.execCommand(o),!0}return!1}),l.addImplementation(0,"generic-dom",(g,h)=>((0,k.getActiveDocument)().execCommand(o),!0)))}s(e.CutAction,"cut"),s(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(l,o)=>{var g,h;const m=l.get(p.ICodeEditorService),C=l.get(i.IClipboardService),w=m.getFocusedCodeEditor();return w&&w.hasTextFocus()?w.getContainerDomNode().ownerDocument.execCommand("paste")?(h=(g=v.CopyPasteController.get(w))===null||g===void 0?void 0:g.finishedPaste())!==null&&h!==void 0?h:Promise.resolve():y.isWeb?(async()=>{const I=await C.readText();if(I!==""){const T=E.InMemoryClipboardMetadataManager.INSTANCE.get(I);let A=!1,P=null,N=null;T&&(A=w.getOption(37)&&!!T.isFromEmptySelection,P=typeof T.multicursorText<"u"?T.multicursorText:null,N=T.mode),w.trigger("keyboard","paste",{text:I,pasteOnNewLine:A,multicursorText:P,mode:N})}})():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(l,o)=>((0,k.getActiveDocument)().execCommand("paste"),!0))),u&&(0,S.registerEditorAction)(d)}),define(se[903],oe([1,0,13,14,176,2,352,5,18,295,764,105,262,670,27,15,351,8,239,346]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d){"use strict";var s;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 r.RawContextKey("dropWidgetVisible",!1,(0,n.localize)(0,null));let l=s=class extends E.Disposable{static get(g){return g.getContribution(s.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 a.EditorStateCancellationTokenSource(g,1,void 0,D);try{const T=await this.extractDataTransferData(m);if(T.size===0||I.token.isCancellationRequested)return;const A=g.getModel();if(!A)return;const P=this._languageFeaturesService.documentOnDropEditProvider.ordered(A).filter(M=>M.dropMimeTypes?M.dropMimeTypes.some(R=>T.matches(R)):!0),N=await this.getDropEdits(P,A,h,T,I);if(I.token.isCancellationRequested)return;if(N.length){const M=this.getInitialActiveEditIndex(A,N),R=g.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([p.Range.fromPositions(h)],{activeEditIndex:M,allEdits:N},R,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 T=>{try{const A=await T.provideDocumentOnDropEdits(h,m,C,w.token);if(A)return{...A,providerId:T.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,S.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=s=ke([ge(1,f.IInstantiationService),ge(2,t.IConfigurationService),ge(3,_.ILanguageFeaturesService),ge(4,b.ITreeViewsDnDService)],l)}),define(se[904],oe([1,0,13,14,19,39,12,6,2,11,22,16,33,10,5,21,38,32,700,15,18,29,79,61,470]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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 _.Disposable{static get(A){return A.getContribution(h.ID)}constructor(A,P,N,M,R){super(),this.languageConfigurationService=M,this._syncRangesToken=0,this._localToDispose=this._register(new _.DisposableStore),this._editor=A,this._providers=N.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(P),this._debounceInformation=R.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 _.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequestCts=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 P=this._editor.getModel(),N=P!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(P);if(N===this._enabled&&!A||(this._enabled=N,this.clearRanges(),this._localToDispose.clear(),!N||P===null))return;this._localToDispose.add(p.Event.runAndSubscribe(P.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(P.getLanguageId()).getWordDefinition()}));const M=new k.Delayer(this._debounceInformation.get(P)),R=()=>{var B;this._rangeUpdateTriggerPromise=M.trigger(()=>this.updateRanges(),(B=this._debounceDuration)!==null&&B!==void 0?B:this._debounceInformation.get(P))},x=new k.Delayer(0),O=B=>{this._rangeSyncTriggerPromise=x.trigger(()=>this._syncRanges(B))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{R()})),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))){O(this._syncRangesToken);return}}R()})),this._localToDispose.add({dispose:()=>{M.dispose(),x.dispose()}}),this.updateRanges()}_syncRanges(A){if(!this._editor.hasModel()||A!==this._syncRangesToken||this._currentDecorations.length===0)return;const P=this._editor.getModel(),N=this._currentDecorations.getRange(0);if(!N||N.startLineNumber!==N.endLineNumber)return this.clearRanges();const M=P.getValueInRange(N);if(this._currentWordPattern){const x=M.match(this._currentWordPattern);if((x?x[0].length:0)!==M.length)return this.clearRanges()}const R=[];for(let x=1,O=this._currentDecorations.length;x<O;x++){const B=this._currentDecorations.getRange(x);if(B)if(B.startLineNumber!==B.endLineNumber)R.push({range:B,text:M});else{let W=P.getValueInRange(B),V=M,K=B.startColumn,F=B.endColumn;const q=v.commonPrefixLength(W,V);K+=q,W=W.substr(q),V=V.substr(q);const ie=v.commonSuffixLength(W,V);F-=ie,W=W.substr(0,W.length-ie),V=V.substr(0,V.length-ie),(K!==F||V.length!==0)&&R.push({range:new t.Range(B.startLineNumber,K,B.endLineNumber,F),text:V})}}if(R.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const x=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",R),this._editor._getViewModel().setPrevEditOperationType(x)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),this._currentRequestCts&&(this._currentRequestCts.cancel(),this._currentRequestCts=null,this._currentRequestPosition=null)}async updateRanges(A=!1){if(!this._editor.hasModel()){this.clearRanges();return}const P=this._editor.getPosition();if(!this._enabled&&!A||this._editor.getSelections().length>1){this.clearRanges();return}const N=this._editor.getModel(),M=N.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===M){if(P.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const x=this._currentDecorations.getRange(0);if(x&&x.containsPosition(P))return}}this.clearRanges(),this._currentRequestPosition=P,this._currentRequestModelVersion=M;const R=this._currentRequestCts=new y.CancellationTokenSource;try{const x=new g.StopWatch(!1),O=await I(this._providers,N,P,R.token);if(this._debounceInformation.update(N,x.elapsed()),R!==this._currentRequestCts||(this._currentRequestCts=null,M!==N.getVersionId()))return;let B=[];O?.ranges&&(B=O.ranges),this._currentWordPattern=O?.wordPattern||this._languageWordPattern;let W=!1;for(let K=0,F=B.length;K<F;K++)if(t.Range.containsPosition(B[K],P)){if(W=!0,K!==0){const q=B[K];B.splice(K,1),B.unshift(q)}break}if(!W){this.clearRanges();return}const V=B.map(K=>({range:K,options:h.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(V),this._syncRangesToken++}catch(x){(0,S.isCancellationError)(x)||(0,S.onUnexpectedError)(x),(this._currentRequestCts===R||!this._currentRequestCts)&&this.clearRanges()}}};e.LinkedEditingContribution=C,C.ID="editor.contrib.linkedEditing",C.DECORATION=u.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:m}),e.LinkedEditingContribution=C=h=ke([ge(1,d.IContextKeyService),ge(2,s.ILanguageFeaturesService),ge(3,f.ILanguageConfigurationService),ge(4,o.ILanguageFeatureDebounceService)],C);class w extends a.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:c.localize(0,null),alias:"Start Linked Editing",precondition:d.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(A,P){const N=A.get(i.ICodeEditorService),[M,R]=Array.isArray(P)&&P||[void 0,void 0];return b.URI.isUri(M)&&n.Position.isIPosition(R)?N.openCodeEditor({resource:M},N.getActiveCodeEditor()).then(x=>{x&&(x.setPosition(R),x.invokeWithinContext(O=>(this.reportTelemetry(O,x),this.run(O,x))))},S.onUnexpectedError):super.runCommand(A,P)}run(A,P){const N=C.get(P);return N?Promise.resolve(N.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=w;const D=a.EditorCommand.bindToContribution(C.get);(0,a.registerEditorCommand)(new D({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:T=>T.clearRanges(),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function I(T,A,P,N){const M=T.ordered(A);return(0,k.first)(M.map(R=>async()=>{try{return await R.provideLinkedEditingRanges(A,P,N)}catch(x){(0,S.onUnexpectedExternalError)(x);return}}),R=>!!R&&L.isNonEmptyArray(R?.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,a.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(T,A,P)=>{const{linkedEditingRangeProvider:N}=T.get(s.ILanguageFeaturesService);return I(N,A,P,y.CancellationToken.None)}),(0,a.registerEditorContribution)(C.ID,C,1),(0,a.registerEditorAction)(w)}),define(se[905],oe([1,0,14,19,12,58,2,47,17,49,61,22,16,38,79,18,188,766,701,50,57,471]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let o=l=class extends S.Disposable{static get(D){return D.getContribution(l.ID)}constructor(D,I,T,A,P){super(),this.editor=D,this.openerService=I,this.notificationService=T,this.languageFeaturesService=A,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=P.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 N=this._register(new u.ClickLinkGesture(D));this._register(N.onMouseMoveOrRelevantKeyDown(([M,R])=>{this._onEditorMouseMove(M,R)})),this._register(N.onExecute(M=>{this.onEditorMouseUp(M)})),this._register(N.onCancel(M=>{this.cleanUpActiveLinkDecoration()})),this._register(D.onDidChangeConfiguration(M=>{M.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(D.onDidChangeModelContent(M=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(D.onDidChangeModel(M=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(D.onDidChangeModelLanguage(M=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(M=>{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",T=[],A=Object.keys(this.currentOccurrences);for(const N of A){const M=this.currentOccurrences[N];T.push(M.decorationId)}const P=[];if(D)for(const N of D)P.push(h.decoration(N,I));this.editor.changeDecorations(N=>{const M=N.deltaDecorations(T,P);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let R=0,x=M.length;R<x;R++){const O=new h(D[R],M[R]);this.currentOccurrences[O.decorationId]=O}})}_onEditorMouseMove(D,I){const T=this.editor.getOption(77)==="altKey";if(this.isEnabled(D,I)){this.cleanUpActiveLinkDecoration();const A=this.getLinkOccurrence(D.target.position);A&&this.editor.changeDecorations(P=>{A.activate(P,T),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(T=>{I.deactivate(T,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,T=!1){if(!this.openerService)return;const{link:A}=D;A.resolve(k.CancellationToken.None).then(P=>{if(typeof P=="string"&&this.editor.hasModel()){const N=this.editor.getModel().uri;if(N.scheme===p.Schemas.file&&P.startsWith(`${p.Schemas.file}:`)){const M=a.URI.parse(P);if(M.scheme===p.Schemas.file){const R=v.originalFSPath(M);let x=null;R.startsWith("/./")?x=`.${R.substr(1)}`:R.startsWith("//./")&&(x=`.${R.substr(2)}`),x&&(P=v.joinPath(N,x))}}}return this.openerService.open(P,{openToSide:I,fromUserGesture:T,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},P=>{const N=P instanceof Error?P.message:P;N==="invalid"?this.notificationService.warn(c.localize(0,null,A.url.toString())):N==="missing"?this.notificationService.warn(c.localize(1,null)):(0,y.onUnexpectedError)(P)})}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 T of I){const A=this.currentOccurrences[T.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=o,o.ID="editor.linkDetector",e.LinkDetector=o=l=ke([ge(1,s.IOpenerService),ge(2,d.INotificationService),ge(3,r.ILanguageFeaturesService),ge(4,t.ILanguageFeatureDebounceService)],o);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,T){const A={...T?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()),T=w.tooltip?w.tooltip:I?c.localize(2,null):c.localize(3,null),A=D?_.isMacintosh?c.localize(4,null):c.localize(5,null):_.isMacintosh?c.localize(6,null):c.localize(7,null);if(w.url){let P="";if(/^command:/i.test(w.url.toString())){const M=w.url.toString().match(/^command:([^?#]+)/);if(M){const R=M[1];P=c.localize(8,null,R)}}return new E.MarkdownString("",!0).appendLink(w.url.toString(!0).replace(/ /g,"%20"),T,P).appendMarkdown(` (${A})`)}else return new E.MarkdownString().appendText(`${T} (${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 T=o.get(I);if(!T||!I.hasModel())return;const A=I.getSelections();for(const P of A){const N=T.getLinkOccurrence(P.getEndPosition());N&&T.openLinkOccurrence(N,!1)}}}(0,i.registerEditorContribution)(o.ID,o,1),(0,i.registerEditorAction)(C)}),define(se[906],oe([1,0,2,18,165,14,261,304,303,32,12,310,52]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 r=class extends L.Disposable{constructor(o,g,h,m){super(),this._editor=o,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 s(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(o,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(o,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=r,e.StickyModelProvider=r=ke([ge(1,v.ILanguageConfigurationService),ge(2,k.ILanguageFeaturesService)],r);class u{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,t.INVALID}computeStickyModel(o,g,h){if(h.isCancellationRequested||!this.isProviderValid(o))return{statusPromise:this._invalid(),modelPromise:null};const m=(0,E.createCancelablePromise)(C=>this.createModelFromProvider(o,g,C));return{statusPromise:m.then(C=>this.isModelValid(C)?h.isCancellationRequested?t.CANCELED:(this._stickyModel=this.createStickyModel(o,g,h,C),t.VALID):this._invalid()).then(void 0,C=>((0,b.onUnexpectedError)(C),t.CANCELED)),modelPromise:m}}isModelValid(o){return!0}isProviderValid(o){return!0}}let f=class extends u{constructor(o){super(),this._languageFeaturesService=o}createModelFromProvider(o,g,h){return y.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,o,h)}createStickyModel(o,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 a.StickyModel(o.uri,g,w,D)}isModelValid(o){return o&&o.children.size>0}_stickyModelFromOutlineModel(o,g){let h;if(i.Iterable.first(o.children.values())instanceof y.OutlineGroup){const D=i.Iterable.find(o.children.values(),I=>I.id===g);if(D)h=D.children;else{let I="",T=-1,A;for(const[P,N]of o.children.entries()){const M=this._findSumOfRangesOfGroup(N);M>T&&(A=N,T=M,I=N.id)}g=I,h=A.children}}else h=o.children;const m=[],C=Array.from(h.values()).sort((D,I)=>{const T=new a.StickyRange(D.symbol.range.startLineNumber,D.symbol.range.endLineNumber),A=new a.StickyRange(I.symbol.range.startLineNumber,I.symbol.range.endLineNumber);return this._comparator(T,A)});for(const D of C)m.push(this._stickyModelFromOutlineElement(D,D.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new a.StickyElement(void 0,m,void 0),providerID:g}}_stickyModelFromOutlineElement(o,g){const h=[];for(const C of o.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 a.StickyRange(o.symbol.selectionRange.startLineNumber,o.symbol.range.endLineNumber);return new a.StickyElement(m,h,void 0)}_comparator(o,g){return o.startLineNumber!==g.startLineNumber?o.startLineNumber-g.startLineNumber:g.endLineNumber-o.endLineNumber}_findSumOfRangesOfGroup(o){let g=0;for(const h of o.children.values())g+=this._findSumOfRangesOfGroup(h);return o instanceof y.OutlineElement?g+o.symbol.range.endLineNumber-o.symbol.selectionRange.startLineNumber:g}};f=ke([ge(0,k.ILanguageFeaturesService)],f);class c extends u{constructor(o){super(),this._foldingLimitReporter=new S.RangesLimitReporter(o)}createStickyModel(o,g,h,m){const C=this._fromFoldingRegions(m);return new a.StickyModel(o.uri,g,C,void 0)}isModelValid(o){return o!==null}_fromFoldingRegions(o){const g=o.length,h=[],m=new a.StickyElement(void 0,[],void 0);for(let C=0;C<g;C++){const w=o.getParentIndex(C);let D;w!==-1?D=h[w]:D=m;const I=new a.StickyElement(new a.StickyRange(o.getStartLineNumber(C),o.getEndLineNumber(C)+1),[],D);D.children.push(I),h.push(I)}return m}}let d=class extends c{constructor(o,g){super(o),this._languageConfigurationService=g}createModelFromProvider(o,g,h){return new _.IndentRangeProvider(o,this._languageConfigurationService,this._foldingLimitReporter).compute(h)}};d=ke([ge(1,v.ILanguageConfigurationService)],d);let s=class extends c{constructor(o,g){super(o),this._languageFeaturesService=g}isProviderValid(o){return S.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,o).length>0}createModelFromProvider(o,g,h){const m=S.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,o);return new p.SyntaxRangeProvider(o,m,()=>this.createModelFromProvider(o,g,h),this._foldingLimitReporter,void 0).compute(h)}};s=ke([ge(1,k.ILanguageFeaturesService)],s)}),define(se[907],oe([1,0,2,18,19,14,13,6,32,906]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class b{constructor(n,t,r){this.startLineNumber=n,this.endLineNumber=t,this.nestingDepth=r}}e.StickyLineCandidate=b;let a=class extends L.Disposable{constructor(n,t,r){super(),this._languageFeaturesService=t,this._languageConfigurationService=r,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(),r=t.getVersionId(),u=await this._stickyModelProvider.update(t,r,n);n.isCancellationRequested||(this._model=u)}updateIndex(n){return n===-1?n=0:n<0&&(n=-n-2),n}getCandidateStickyLinesIntersectingFromStickyModel(n,t,r,u,f){if(t.children.length===0)return;let c=f;const d=[];for(let o=0;o<t.children.length;o++){const g=t.children[o];g.range&&d.push(g.range.startLineNumber)}const s=this.updateIndex((0,S.binarySearch)(d,n.startLineNumber,(o,g)=>o-g)),l=this.updateIndex((0,S.binarySearch)(d,n.startLineNumber+u,(o,g)=>o-g));for(let o=s;o<=l;o++){const g=t.children[o];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,r.push(new b(h,m-1,u+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,r,u+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,r,u,f)}}getCandidateStickyLinesIntersecting(n){var t,r;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let u=[];this.getCandidateStickyLinesIntersectingFromStickyModel(n,this._model.element,u,0,-1);const f=(r=this._editor._getViewModel())===null||r===void 0?void 0:r.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=a,e.StickyLineCandidateProvider=a=ke([ge(1,k.ILanguageFeaturesService),ge(2,_.ILanguageConfigurationService)],a)}),define(se[908],oe([1,0,7,93,13,2,28,255,168,10,102,155,120,378,477]),function(te,e,L,k,y,E,S,p,_,v,b,a,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 r=(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 s 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._renderedStickyLines=[],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 _.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}getRenderedStickyLine(h){return this._renderedStickyLines.find(m=>m.lineNumber===h)}getCurrentLines(){return this._lineNumbers}setState(h,m,C){if(C===void 0&&(!this._previousState&&!h||this._previousState&&this._previousState.equals(h)))return;const w=this._isWidgetHeightZero(h),D=w?void 0:h,I=w?0:this._findLineToRebuildWidgetFrom(h,C);this._renderRootNode(D,m,I),this._previousState=h}_isWidgetHeightZero(h){if(!h)return!0;const m=h.startLineNumbers.length*this._lineHeight+h.lastLineRelativePosition;if(m>0){this._lastLineRelativePosition=h.lastLineRelativePosition;const C=[...h.startLineNumbers];h.showEndForLine!==null&&(C[h.showEndForLine]=h.endLineNumbers[h.showEndForLine]),this._lineNumbers=C}else this._lastLineRelativePosition=0,this._lineNumbers=[];return m===0}_findLineToRebuildWidgetFrom(h,m){if(!h||!this._previousState)return 0;if(m!==void 0)return m;const C=this._previousState,w=h.startLineNumbers.findIndex(D=>!C.startLineNumbers.includes(D));return w===-1?0:w}_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`}_clearStickyLinesFromLine(h){this._foldingIconStore.clear();for(let m=h;m<this._renderedStickyLines.length;m++){const C=this._renderedStickyLines[m];C.lineNumberDomNode.remove(),C.lineDomNode.remove()}this._renderedStickyLines=this._renderedStickyLines.slice(0,h),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._renderedStickyLines){const C=m.foldingIcon;C&&C.setVisible(h?!0:C.isCollapsed)}}async _renderRootNode(h,m,C){if(this._clearStickyLinesFromLine(C),!h)return;for(const T of this._renderedStickyLines)this._updateTopAndZIndexOfStickyLine(T);const w=this._editor.getLayoutInfo(),D=this._lineNumbers.slice(C);for(const[T,A]of D.entries()){const P=this._renderChildNode(T+C,A,m,w);P&&(this._linesDomNode.appendChild(P.lineDomNode),this._lineNumbersDomNode.appendChild(P.lineNumberDomNode),this._renderedStickyLines.push(P))}m&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const I=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${I}px`,this._linesDomNodeScrollable.style.height=`${I}px`,this._rootDomNode.style.height=`${I}px`,this._rootDomNode.style.marginLeft="0px",this._minContentWidthInPx=Math.max(...this._renderedStickyLines.map(T=>T.scrollWidth))+w.verticalScrollbarWidth,this._editor.layoutOverlayWidget(this)}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(L.addDisposableListener(this._lineNumbersDomNode,L.EventType.MOUSE_ENTER,()=>{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,T=D.getViewLineRenderingData(I),A=this._editor.getOption(67);let P;try{P=a.LineDecoration.filter(T.inlineDecorations,I,T.minColumn,T.maxColumn)}catch{P=[]}const N=new i.RenderLineInput(!0,!0,T.content,T.continuesWithWrappedLine,T.isBasicASCII,T.containsRTL,0,T.tokens,P,T.tabSize,T.startVisibleColumn,1,1,1,500,"none",!0,!0,null),M=new b.StringBuilder(2e3),R=(0,i.renderViewLine)(N,M);let x;r?x=r.createHTML(M.build()):x=M.build();const O=document.createElement("span");O.setAttribute(u,String(h)),O.setAttribute(f,""),O.setAttribute("role","listitem"),O.tabIndex=0,O.className="sticky-line-content",O.classList.add(`stickyLine${m}`),O.style.lineHeight=`${this._lineHeight}px`,O.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 K=this._renderFoldingIconForLine(C,m);K&&B.appendChild(K.domNode),this._editor.applyFontInfo(O),this._editor.applyFontInfo(V),B.style.lineHeight=`${this._lineHeight}px`,O.style.lineHeight=`${this._lineHeight}px`,B.style.height=`${this._lineHeight}px`,O.style.height=`${this._lineHeight}px`;const F=new l(h,m,O,B,K,R.characterMapping,O.scrollWidth);return this._updateTopAndZIndexOfStickyLine(F)}_updateTopAndZIndexOfStickyLine(h){var m;const C=h.index,w=h.lineDomNode,D=h.lineNumberDomNode,I=C===this._lineNumbers.length-1,T="0",A="1";w.style.zIndex=I?T:A,D.style.zIndex=I?T:A;const P=`${C*this._lineHeight+this._lastLineRelativePosition+(!((m=h.foldingIcon)===null||m===void 0)&&m.isCollapsed?1:0)}px`,N=`${C*this._lineHeight}px`;return w.style.top=I?P:N,D.style.top=I?P:N,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),P=new o(A,I,w.getEndLineNumber(D),this._lineHeight);return P.setVisible(this._isOnGlyphMargin?!0:A||C==="always"),P.domNode.setAttribute(d,""),P}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(h){0<=h&&h<this._renderedStickyLines.length&&this._renderedStickyLines[h].lineDomNode.focus()}getEditorPositionFromNode(h){if(!h||h.children.length>0)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._renderedStickyLines.length?null:this._renderedStickyLines[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=s;class l{constructor(h,m,C,w,D,I,T){this.index=h,this.lineNumber=m,this.lineDomNode=C,this.lineNumberDomNode=w,this.foldingIcon=D,this.characterMapping=I,this.scrollWidth=T}}class o{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=S.ThemeIcon.asClassName(h?n.foldingCollapsedIcon:n.foldingExpandedIcon)}setVisible(h){this.domNode.style.cursor=h?"pointer":"default",this.domNode.style.opacity=h?"1":"0"}}}),define(se[909],oe([1,0,7,119,14,12,6,2,145,11,168,877,718,15,8,92,29,89,23,225,138,355,872,106,48,177,478,254]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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,P){this._service=A,this._key=`suggestWidget.size/${P.getEditorType()}/${P instanceof b.EmbeddedCodeEditorWidget}`}restore(){var A;const P=(A=this._service.get(this._key,0))!==null&&A!==void 0?A:"";try{const N=JSON.parse(P);if(L.Dimension.is(N))return L.Dimension.lift(N)}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,P,N,M,R){this.editor=A,this._storageService=P,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 S.PauseableEmitter,this._onDidFocus=new S.PauseableEmitter,this._onDidHide=new S.Emitter,this._onDidShow=new S.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new S.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(P,A);class x{constructor(q,ie,ae=!1,ne=!1){this.persistedSize=q,this.currentSize=ie,this.persistHeight=ae,this.persistWidth=ne}}let O;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),O=new x(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(F=>{var q,ie,ae,ne;if(this._resize(F.dimension.width,F.dimension.height),O&&(O.persistHeight=O.persistHeight||!!F.north||!!F.south,O.persistWidth=O.persistWidth||!!F.east||!!F.west),!!F.done){if(O){const{itemHeight:$,defaultSize:J}=this.getLayoutInfo(),Q=Math.round($/2);let{width:re,height:de}=this.element.size;(!O.persistHeight||Math.abs(O.currentSize.height-de)<=Q)&&(de=(ie=(q=O.persistedSize)===null||q===void 0?void 0:q.height)!==null&&ie!==void 0?ie:J.height),(!O.persistWidth||Math.abs(O.currentSize.width-re)<=Q)&&(re=(ne=(ae=O.persistedSize)===null||ae===void 0?void 0:ae.width)!==null&&ne!==void 0?ne:J.width),this._persistedSize.store(new L.Dimension(re,de))}this._contentWidget.unlockPreference(),O=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(R.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=R.createInstance(o.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 q=F.textLabel;if(typeof F.completion.label!="string"){const{detail:$,description:J}=F.completion.label;$&&J?q=i.localize(12,null,q,$,J):$?q=i.localize(13,null,q,$):J&&(q=i.localize(14,null,q,J))}if(!F.isResolved||!this._isDetailsVisible())return q;const{documentation:ie,detail:ae}=F.completion,ne=v.format("{0}{1}",ae||"",ie?typeof ie=="string"?ie:ie.value:"");return i.localize(15,null,q,ne)}}}),this._list.style((0,g.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:u.activeContrastBorder})),this._status=R.createInstance(a.SuggestWidgetStatus,this.element.domNode,s.suggestWidgetStatusbarMenu);const K=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);K(),this._disposables.add(M.onDidColorThemeChange(F=>this._onThemeChange(F))),this._onThemeChange(M.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)&&(K(),W()),this._completionModel&&(F.hasChanged(50)||F.hasChanged(118)||F.hasChanged(119))&&this._list.splice(0,this._list.length,this._completionModel.items)})),this._ctxSuggestWidgetVisible=s.Context.Visible.bindTo(N),this._ctxSuggestWidgetDetailsVisible=s.Context.DetailsVisible.bindTo(N),this._ctxSuggestWidgetMultipleSuggestions=s.Context.MultipleSuggestions.bindTo(N),this._ctxSuggestWidgetHasFocusedSuggestion=s.Context.HasFocusedSuggestion.bindTo(N),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,P){const N=this._completionModel;N&&(this._onDidSelect.fire({item:A,index:P,model:N}),this.editor.focus())}_onThemeChange(A){this._details.widget.borderWidth=(0,f.isHighContrast)(A.type)?2:1}_onListFocus(A){var P;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 N=A.elements[0],M=A.indexes[0];N!==this._focusedItem&&((P=this._currentSuggestionDetails)===null||P===void 0||P.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=N,this._list.reveal(M),this._currentSuggestionDetails=(0,y.createCancelablePromise)(async R=>{const x=(0,y.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),O=R.onCancellationRequested(()=>x.dispose());try{return await N.resolve(R)}finally{x.dispose(),O.dispose()}}),this._currentSuggestionDetails.then(()=>{M>=this._list.length||N!==this._list.element(M)||(this._ignoreFocusEvents=!0,this._list.splice(M,1,[N]),this._list.setFocus([M]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,o.getAriaId)(M)}))}).catch(E.onUnexpectedError)),this._onDidFocus.fire({item:N,index:M,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,P){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!A,this._isAuto||(this._loadingTimeout=(0,y.disposableTimeout)(()=>this._setState(1),P)))}showSuggestions(A,P,N,M,R){var x,O;if(this._contentWidget.setPosition(this.editor.getPosition()),(x=this._loadingTimeout)===null||x===void 0||x.dispose(),(O=this._currentSuggestionDetails)===null||O===void 0||O.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==A&&(this._completionModel=A),N&&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(M?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(N?4:3),this._list.reveal(P,0),this._list.setFocus(R?[]:[P])}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._details.widget.isEmpty?this._details.hide():(this._positionDetails(),this.element.domNode.classList.add("shows-details")),this.editor.focus()})}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 P=this._persistedSize.restore(),N=Math.ceil(this.getLayoutInfo().itemHeight*4.3);P&&P.height<N&&this._persistedSize.store(P.with(void 0,N))}isFrozen(){return this._state===4}_afterRender(A){if(A===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&!this._details.widget.isEmpty&&this._details.show(),this._positionDetails())}_layout(A){var P,N,M;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const R=L.getClientArea(this.element.domNode.ownerDocument.body),x=this.getLayoutInfo();A||(A=x.defaultSize);let O=A.height,B=A.width;if(this._status.element.style.height=`${x.itemHeight}px`,this._state===2||this._state===1)O=x.itemHeight+x.borderHeight,B=x.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new L.Dimension(B,O),this._contentWidget.setPreference(2);else{const W=R.width-x.borderHeight-2*x.horizontalPadding;B>W&&(B=W);const V=this._completionModel?this._completionModel.stats.pLabelLen*x.typicalHalfwidthCharacterWidth:B,K=x.statusBarHeight+this._list.contentHeight+x.borderHeight,F=x.itemHeight+x.statusBarHeight,q=L.getDomNodePagePosition(this.editor.getDomNode()),ie=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),ae=q.top+ie.top+ie.height,ne=Math.min(R.height-ae-x.verticalPadding,K),$=q.top+ie.top-x.verticalPadding,J=Math.min($,K);let Q=Math.min(Math.max(J,ne)+x.borderHeight,K);O===((P=this._cappedHeight)===null||P===void 0?void 0:P.capped)&&(O=this._cappedHeight.wanted),O<F&&(O=F),O>Q&&(O=Q);const re=150;O>ne||this._forceRenderingAbove&&$>re?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),Q=J):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),Q=ne),this.element.preferredSize=new L.Dimension(V,x.defaultSize.height),this.element.maxSize=new L.Dimension(W,Q),this.element.minSize=new L.Dimension(220,F),this._cappedHeight=O===K?{wanted:(M=(N=this._cappedHeight)===null||N===void 0?void 0:N.wanted)!==null&&M!==void 0?M:A.height,capped:O}:void 0}this._resize(B,O)}_resize(A,P){const{width:N,height:M}=this.element.maxSize;A=Math.min(N,A),P=Math.min(M,P);const{statusBarHeight:R}=this.getLayoutInfo();this._list.layout(P-R,A),this._listElement.style.height=`${P-R}px`,this.element.layout(P,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),P=(0,_.clamp)(this.editor.getOption(119)||A.lineHeight,8,1e3),N=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:P,M=this._details.widget.borderWidth,R=2*M;return{itemHeight:P,statusBarHeight:N,borderWidth:M,borderHeight:R,typicalHalfwidthCharacterWidth:A.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new L.Dimension(430,N+12*P+R)}}_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=ke([ge(1,r.IStorageService),ge(2,n.IContextKeyService),ge(3,c.IThemeService),ge(4,t.IInstantiationService)],D);class I{constructor(A,P){this._widget=A,this._editor=P,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:P}=this._widget.element.size,{borderWidth:N,horizontalPadding:M}=this._widget.getLayoutInfo();return new L.Dimension(P+2*N+M,A+2*N)}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(se[381],oe([1,0,41,38,31,727,29,23,482]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const _=(0,S.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},E.localize(0,null),!0);(0,S.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},E.localize(1,null),!0),(0,S.registerColor)("editor.wordHighlightTextBackground",{light:_,dark:_,hcDark:_,hcLight:_},E.localize(2,null),!0);const v=(0,S.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:S.activeContrastBorder,hcLight:S.activeContrastBorder},E.localize(3,null));(0,S.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:S.activeContrastBorder,hcLight:S.activeContrastBorder},E.localize(4,null)),(0,S.registerColor)("editor.wordHighlightTextBorder",{light:v,dark:v,hcDark:v,hcLight:v},E.localize(5,null));const b=(0,S.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},E.localize(6,null),!0),a=(0,S.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},E.localize(7,null),!0),i=(0,S.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:S.overviewRulerSelectionHighlightForeground,light:S.overviewRulerSelectionHighlightForeground,hcDark:S.overviewRulerSelectionHighlightForeground,hcLight:S.overviewRulerSelectionHighlightForeground},E.localize(8,null),!0),n=k.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,p.themeColorFromId)(a),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(S.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)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),r=k.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,p.themeColorFromId)(S.overviewRulerSelectionHighlightForeground),position:L.OverviewRulerLane.Center},minimap:{color:(0,p.themeColorFromId)(S.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)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}});function c(s){return s===y.DocumentHighlightKind.Write?n:s===y.DocumentHighlightKind.Text?t:f}e.getHighlightDecorationOptions=c;function d(s){return s?u:r}e.getSelectionHighlightDecorationOptions=d,(0,p.registerThemingParticipant)((s,l)=>{const o=s.getColor(S.editorSelectionHighlight);o&&l.addRule(`.monaco-editor .selectionHighlight { background-color: ${o.transparent(.5)}; }`)})}),define(se[910],oe([1,0,48,14,65,2,16,208,5,24,21,377,703,30,15,18,381,8]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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(K,F){const q=F.filter(ie=>!K.find(ae=>ae.equals(ie)));if(q.length>=1){const ie=q.map(ne=>`line ${ne.viewState.position.lineNumber} column ${ne.viewState.position.column}`).join(", "),ae=q.length===1?i.localize(0,null,ie):i.localize(1,null,ie);(0,L.status)(ae)}}class s extends S.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,q,ie){if(!q.hasModel())return;let ae=!0;ie&&ie.logicalLine===!1&&(ae=!1);const ne=q._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const $=ne.getCursorStates();ne.setCursorStates(ie.source,3,p.CursorMoveCommands.addCursorUp(ne,$,ae)),ne.revealTopMostCursor(ie.source),d($,ne.getCursorStates())}}e.InsertCursorAbove=s;class l extends S.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,q,ie){if(!q.hasModel())return;let ae=!0;ie&&ie.logicalLine===!1&&(ae=!1);const ne=q._getViewModel();if(ne.cursorConfig.readOnly)return;ne.model.pushStackElement();const $=ne.getCursorStates();ne.setCursorStates(ie.source,3,p.CursorMoveCommands.addCursorDown(ne,$,ae)),ne.revealBottomMostCursor(ie.source),d($,ne.getCursorStates())}}e.InsertCursorBelow=l;class o extends S.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,q,ie){if(!F.isEmpty()){for(let ae=F.startLineNumber;ae<F.endLineNumber;ae++){const ne=q.getLineMaxColumn(ae);ie.push(new v.Selection(ae,ne,ae,ne))}F.endColumn>1&&ie.push(new v.Selection(F.endLineNumber,F.endColumn,F.endLineNumber,F.endColumn))}}run(F,q){if(!q.hasModel())return;const ie=q.getModel(),ae=q.getSelections(),ne=q._getViewModel(),$=ne.getCursorStates(),J=[];ae.forEach(Q=>this.getCursorsForSelection(Q,ie,J)),J.length>0&&q.setSelections(J),d($,ne.getCursorStates())}}class g extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(F,q){if(!q.hasModel())return;const ie=q.getSelections(),ae=q.getModel().getLineCount(),ne=[];for(let Q=ie[0].startLineNumber;Q<=ae;Q++)ne.push(new v.Selection(Q,ie[0].startColumn,Q,ie[0].endColumn));const $=q._getViewModel(),J=$.getCursorStates();ne.length>0&&q.setSelections(ne),d(J,$.getCursorStates())}}class h extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(F,q){if(!q.hasModel())return;const ie=q.getSelections(),ae=[];for(let J=ie[0].startLineNumber;J>=1;J--)ae.push(new v.Selection(J,ie[0].startColumn,J,ie[0].endColumn));const ne=q._getViewModel(),$=ne.getCursorStates();ae.length>0&&q.setSelections(ae),d($,ne.getCursorStates())}}class m{constructor(F,q,ie){this.selections=F,this.revealRange=q,this.revealScrollType=ie}}e.MultiCursorSessionResult=m;class C{static create(F,q){if(!F.hasModel())return null;const ie=q.getState();if(!F.hasTextFocus()&&ie.isRevealed&&ie.searchString.length>0)return new C(F,q,!1,ie.searchString,ie.wholeWord,ie.matchCase,null);let ae=!1,ne,$;const J=F.getSelections();J.length===1&&J[0].isEmpty()?(ae=!0,ne=!0,$=!0):(ne=ie.wholeWord,$=ie.matchCase);const Q=F.getSelection();let re,de=null;if(Q.isEmpty()){const he=F.getConfiguredWordAtPosition(Q.getStartPosition());if(!he)return null;re=he.word,de=new v.Selection(Q.startLineNumber,he.startColumn,Q.startLineNumber,he.endColumn)}else re=F.getModel().getValueInRange(Q).replace(/\r\n/g,`
|
||
`);return new C(F,q,ae,re,ne,$,de)}constructor(F,q,ie,ae,ne,$,J){this._editor=F,this.findController=q,this.isDisconnectedFromFindController=ie,this.searchText=ae,this.wholeWord=ne,this.matchCase=$,this.currentMatch=J}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const F=this._getNextMatch();if(!F)return null;const q=this._editor.getSelections();return new m(q.concat(F),F,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const F=this._getNextMatch();if(!F)return null;const q=this._editor.getSelections();return new m(q.slice(0,q.length-1).concat(F),F,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const ae=this.currentMatch;return this.currentMatch=null,ae}this.findController.highlightFindOptions();const F=this._editor.getSelections(),q=F[F.length-1],ie=this._editor.getModel().findNextMatch(this.searchText,q.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return ie?new v.Selection(ie.range.startLineNumber,ie.range.startColumn,ie.range.endLineNumber,ie.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const F=this._getPreviousMatch();if(!F)return null;const q=this._editor.getSelections();return new m(q.concat(F),F,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const F=this._getPreviousMatch();if(!F)return null;const q=this._editor.getSelections();return new m(q.slice(0,q.length-1).concat(F),F,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const ae=this.currentMatch;return this.currentMatch=null,ae}this.findController.highlightFindOptions();const F=this._editor.getSelections(),q=F[F.length-1],ie=this._editor.getModel().findPreviousMatch(this.searchText,q.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return ie?new v.Selection(ie.range.startLineNumber,ie.range.startColumn,ie.range.endLineNumber,ie.range.endColumn):null}selectAll(F){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const q=this._editor.getModel();return F?q.findMatches(this.searchText,F,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):q.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 q=C.create(this._editor,F);if(!q)return;this._session=q;const ie={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(ie.wholeWordOverride=1,ie.matchCaseOverride=1,ie.isRegexOverride=2),F.getState().change(ie,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(ae=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(F.getState().onFindReplaceStateChange(ae=>{(ae.matchCase||ae.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,q){if(!q.isEmpty())return q;const ie=this._editor.getConfiguredWordAtPosition(q.getStartPosition());return ie?new v.Selection(q.startLineNumber,ie.startColumn,q.startLineNumber,ie.endColumn):q}_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 q=this._editor.getSelections();if(q.length>1){const ae=F.getState().matchCase;if(!O(this._editor.getModel(),q,ae)){const $=this._editor.getModel(),J=[];for(let Q=0,re=q.length;Q<re;Q++)J[Q]=this._expandEmptyToWord($,q[Q]);this._editor.setSelections(J);return}}}this._beginSessionIfNeeded(F),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(F){this._beginSessionIfNeeded(F),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(F){this._beginSessionIfNeeded(F),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(F){this._beginSessionIfNeeded(F),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(F){if(!this._editor.hasModel())return;let q=null;const ie=F.getState();if(ie.isRevealed&&ie.searchString.length>0&&ie.isRegex){const ae=this._editor.getModel();ie.searchScope?q=ae.findMatches(ie.searchString,ie.searchScope,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(129):null,!1,1073741824):q=ae.findMatches(ie.searchString,!0,ie.isRegex,ie.matchCase,ie.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(F),!this._session)return;q=this._session.selectAll(ie.searchScope)}if(q.length>0){const ae=this._editor.getSelection();for(let ne=0,$=q.length;ne<$;ne++){const J=q[ne];if(J.range.intersectRanges(ae)){q[ne]=q[0],q[0]=J;break}}this._setSelections(q.map(ne=>new v.Selection(ne.range.startLineNumber,ne.range.startColumn,ne.range.endLineNumber,ne.range.endColumn)))}}}e.MultiCursorSelectionController=w,w.ID="editor.contrib.multiCursorController";class D extends S.EditorAction{run(F,q){const ie=w.get(q);if(!ie)return;const ae=q._getViewModel();if(ae){const ne=ae.getCursorStates(),$=a.CommonFindController.get(q);if($)this._run(ie,$);else{const J=F.get(f.IInstantiationService).createInstance(a.CommonFindController,q);this._run(ie,J),J.dispose()}d(ne,ae.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,q){F.addSelectionToNextFindMatch(q)}}e.AddSelectionToNextFindMatchAction=I;class T 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,q){F.addSelectionToPreviousFindMatch(q)}}e.AddSelectionToPreviousFindMatchAction=T;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,q){F.moveSelectionToNextFindMatch(q)}}e.MoveSelectionToNextFindMatchAction=A;class P 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,q){F.moveSelectionToPreviousFindMatch(q)}}e.MoveSelectionToPreviousFindMatchAction=P;class N 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,q){F.selectAll(q)}}e.SelectHighlightsAction=N;class M 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,q){F.selectAll(q)}}e.CompatChangeAll=M;class R{constructor(F,q,ie,ae,ne){this._model=F,this._searchText=q,this._matchCase=ie,this._wordSeparators=ae,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,ne&&this._model===ne._model&&this._searchText===ne._searchText&&this._matchCase===ne._matchCase&&this._wordSeparators===ne._wordSeparators&&this._modelVersionId===ne._modelVersionId&&(this._cachedFindMatches=ne._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(_.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let x=c=class extends E.Disposable{constructor(F,q){super(),this._languageFeaturesService=q,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(ae=>{this._isEnabled=F.getOption(107)})),this._register(F.onDidChangeCursorSelection(ae=>{this._isEnabled&&(ae.selection.isEmpty()?ae.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(F.onDidChangeModel(ae=>{this._setState(null)})),this._register(F.onDidChangeModelContent(ae=>{this._isEnabled&&this.updateSoon.schedule()}));const ie=a.CommonFindController.get(F);ie&&this._register(ie.getState().onFindReplaceStateChange(ae=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(c._createState(this.state,this._isEnabled,this.editor))}static _createState(F,q,ie){if(!q||!ie.hasModel())return null;const ae=ie.getSelection();if(ae.startLineNumber!==ae.endLineNumber)return null;const ne=w.get(ie);if(!ne)return null;const $=a.CommonFindController.get(ie);if(!$)return null;let J=ne.getSession($);if(!J){const de=ie.getSelections();if(de.length>1){const me=$.getState().matchCase;if(!O(ie.getModel(),de,me))return null}J=C.create(ie,$)}if(!J||J.currentMatch||/^[ \t]+$/.test(J.searchText)||J.searchText.length>200)return null;const Q=$.getState(),re=Q.matchCase;if(Q.isRevealed){let de=Q.searchString;re||(de=de.toLowerCase());let he=J.searchText;if(re||(he=he.toLowerCase()),de===he&&J.matchCase===Q.matchCase&&J.wholeWord===Q.wholeWord&&!Q.isRegex)return null}return new R(ie.getModel(),J.searchText,J.matchCase,J.wholeWord?ie.getOption(129):null,F)}_setState(F){if(this.state=F,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const q=this.editor.getModel();if(q.isTooLargeForTokenization())return;const ie=this.state.findMatches(),ae=this.editor.getSelections();ae.sort(_.Range.compareRangesUsingStarts);const ne=[];for(let re=0,de=0,he=ie.length,me=ae.length;re<he;){const X=ie[re];if(de>=me)ne.push(X),re++;else{const U=_.Range.compareRangesUsingStarts(X,ae[de]);U<0?((ae[de].isEmpty()||!_.Range.areIntersecting(X,ae[de]))&&ne.push(X),re++):(U>0||re++,de++)}}const $=this.editor.getOption(80)!=="off",J=this._languageFeaturesService.documentHighlightProvider.has(q)&&$,Q=ne.map(re=>({range:re,options:(0,u.getSelectionHighlightDecorationOptions)(J)}));this._decorations.set(Q)}dispose(){this._setState(null),super.dispose()}};e.SelectionHighlighter=x,x.ID="editor.contrib.selectionHighlighter",e.SelectionHighlighter=x=c=ke([ge(1,r.ILanguageFeaturesService)],x);function O(K,F,q){const ie=B(K,F[0],!q);for(let ae=1,ne=F.length;ae<ne;ae++){const $=F[ae];if($.isEmpty())return!1;const J=B(K,$,!q);if(ie!==J)return!1}return!0}function B(K,F,q){const ie=K.getValueInRange(F);return q?ie.toLowerCase():ie}class W extends S.EditorAction{constructor(){super({id:"editor.action.focusNextCursor",label:i.localize(19,null),metadata:{description:i.localize(20,null),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(F,q,ie){if(!q.hasModel())return;const ae=q._getViewModel();if(ae.cursorConfig.readOnly)return;ae.model.pushStackElement();const ne=Array.from(ae.getCursorStates()),$=ne.shift();$&&(ne.push($),ae.setCursorStates(ie.source,3,ne),ae.revealPrimaryCursor(ie.source,!0),d(ne,ae.getCursorStates()))}}e.FocusNextCursor=W;class V extends S.EditorAction{constructor(){super({id:"editor.action.focusPreviousCursor",label:i.localize(21,null),metadata:{description:i.localize(22,null),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(F,q,ie){if(!q.hasModel())return;const ae=q._getViewModel();if(ae.cursorConfig.readOnly)return;ae.model.pushStackElement();const ne=Array.from(ae.getCursorStates()),$=ne.pop();$&&(ne.unshift($),ae.setCursorStates(ie.source,3,ne),ae.revealPrimaryCursor(ie.source,!0),d(ne,ae.getCursorStates()))}}e.FocusPreviousCursor=V,(0,S.registerEditorContribution)(w.ID,w,4),(0,S.registerEditorContribution)(x.ID,x,1),(0,S.registerEditorAction)(s),(0,S.registerEditorAction)(l),(0,S.registerEditorAction)(o),(0,S.registerEditorAction)(I),(0,S.registerEditorAction)(T),(0,S.registerEditorAction)(A),(0,S.registerEditorAction)(P),(0,S.registerEditorAction)(N),(0,S.registerEditorAction)(M),(0,S.registerEditorAction)(g),(0,S.registerEditorAction)(h),(0,S.registerEditorAction)(W),(0,S.registerEditorAction)(V)}),define(se[911],oe([1,0,728,13,48,14,19,12,2,153,16,33,5,21,31,41,18,381,15,47,53,330]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l){"use strict";var o,g;Object.defineProperty(e,"__esModule",{value:!0}),e.WordHighlighterContribution=e.getOccurrencesAcrossMultipleModels=e.getOccurrencesAtPosition=void 0;const h=new c.RawContextKey("hasWordHighlights",!1);function m(W,V,K,F){const q=W.ordered(V);return(0,E.first)(q.map(ie=>()=>Promise.resolve(ie.provideDocumentHighlights(V,K,F)).then(void 0,p.onUnexpectedExternalError)),k.isNonEmptyArray).then(ie=>{if(ie){const ae=new s.ResourceMap;return ae.set(V.uri,ie),ae}return new s.ResourceMap})}e.getOccurrencesAtPosition=m;function C(W,V,K,F,q,ie){const ae=W.ordered(V);return(0,E.first)(ae.map(ne=>()=>{const $=ie.filter(J=>(0,r.shouldSynchronizeModel)(J)).filter(J=>(0,l.score)(ne.selector,J.uri,J.getLanguageId(),!0,void 0,void 0)>0);return Promise.resolve(ne.provideMultiDocumentHighlights(V,K,$,q)).then(void 0,p.onUnexpectedExternalError)}),ne=>ne instanceof s.ResourceMap&&ne.size>0)}e.getOccurrencesAcrossMultipleModels=C;class w{constructor(V,K,F){this._model=V,this._selection=K,this._wordSeparators=F,this._wordRange=this._getCurrentWordRange(V,K),this._result=null}get result(){return this._result||(this._result=(0,E.createCancelablePromise)(V=>this._compute(this._model,this._selection,this._wordSeparators,V))),this._result}_getCurrentWordRange(V,K){const F=V.getWordAtPosition(K.getPosition());return F?new i.Range(K.startLineNumber,F.startColumn,K.startLineNumber,F.endColumn):null}isValid(V,K,F){const q=K.startLineNumber,ie=K.startColumn,ae=K.endColumn,ne=this._getCurrentWordRange(V,K);let $=!!(this._wordRange&&this._wordRange.equalsRange(ne));for(let J=0,Q=F.length;!$&&J<Q;J++){const re=F.getRange(J);re&&re.startLineNumber===q&&re.startColumn<=ie&&re.endColumn>=ae&&($=!0)}return $}cancel(){this.result.cancel()}}class D extends w{constructor(V,K,F,q){super(V,K,F),this._providers=q}_compute(V,K,F,q){return m(this._providers,V,K.getPosition(),q).then(ie=>ie||new s.ResourceMap)}}class I extends w{constructor(V,K,F,q,ie){super(V,K,F),this._providers=q,this._otherModels=ie}_compute(V,K,F,q){return C(this._providers,V,K.getPosition(),F,q,this._otherModels).then(ie=>ie||new s.ResourceMap)}}class T extends w{constructor(V,K,F,q,ie){super(V,K,q),this._otherModels=ie,this._selectionIsEmpty=K.isEmpty(),this._word=F}_compute(V,K,F,q){return(0,E.timeout)(250,q).then(()=>{const ie=new s.ResourceMap;let ae;if(this._word?ae=this._word:ae=V.getWordAtPosition(K.getPosition()),!ae)return new s.ResourceMap;const ne=[V,...this._otherModels];for(const $ of ne){if($.isDisposed())continue;const Q=$.findMatches(ae.word,!0,!1,!0,F,!1).map(re=>({range:re.range,kind:t.DocumentHighlightKind.Text}));Q&&ie.set($.uri,Q)}return ie})}isValid(V,K,F){const q=K.isEmpty();return this._selectionIsEmpty!==q?!1:super.isValid(V,K,F)}}function A(W,V,K,F,q){return W.has(V)?new D(V,K,q,W):new T(V,K,F,q,[])}function P(W,V,K,F,q,ie){return W.has(V)?new I(V,K,q,W,ie):new T(V,K,F,q,ie)}(0,b.registerModelAndPositionCommand)("_executeDocumentHighlights",async(W,V,K)=>{const F=W.get(u.ILanguageFeaturesService),q=await m(F.documentHighlightProvider,V,K,S.CancellationToken.None);return q?.get(V.uri)});let N=o=class{constructor(V,K,F,q,ie){this.toUnhook=new _.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=new s.ResourceMap,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=V,this.providers=K,this.multiDocumentProviders=F,this.codeEditorService=ie,this._hasWordHighlights=h.bindTo(q),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(V.onDidChangeCursorPosition(ae=>{this._ignorePositionChangeEvent||this.occurrencesHighlight!=="off"&&this._onPositionChanged(ae)})),this.toUnhook.add(V.onDidChangeModelContent(ae=>{this._stopAll()})),this.toUnhook.add(V.onDidChangeModel(ae=>{!ae.newModelUrl&&ae.oldModelUrl?this._stopSingular():o.query&&this._run()})),this.toUnhook.add(V.onDidChangeConfiguration(ae=>{const ne=this.editor.getOption(80);this.occurrencesHighlight!==ne&&(this.occurrencesHighlight=ne,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,o.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 V=this._getSortedHighlights(),F=(V.findIndex(ie=>ie.containsPosition(this.editor.getPosition()))+1)%V.length,q=V[F];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(q.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(q);const ie=this._getWord();if(ie){const ae=this.editor.getModel().getLineContent(q.startLineNumber);(0,y.alert)(`${ae}, ${F+1} of ${V.length} for '${ie.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const V=this._getSortedHighlights(),F=(V.findIndex(ie=>ie.containsPosition(this.editor.getPosition()))-1+V.length)%V.length,q=V[F];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(q.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(q);const ie=this._getWord();if(ie){const ae=this.editor.getModel().getLineContent(q.startLineNumber);(0,y.alert)(`${ae}, ${F+1} of ${V.length} for '${ie.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeSingleDecorations(){if(!this.editor.hasModel())return;const V=o.storedDecorations.get(this.editor.getModel().uri);V&&(this.editor.removeDecorations(V),o.storedDecorations.delete(this.editor.getModel().uri),this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1)))}_removeAllDecorations(){const V=this.codeEditorService.listCodeEditors();for(const K of V){if(!K.hasModel())continue;const F=o.storedDecorations.get(K.getModel().uri);if(!F)continue;K.removeDecorations(F),o.storedDecorations.delete(K.getModel().uri);const q=M.get(K);q?.wordHighlighter&&q.wordHighlighter.decorations.length>0&&(q.wordHighlighter.decorations.clear(),q.wordHighlighter._hasWordHighlights.set(!1))}}_stopSingular(){var V,K,F,q;this._removeSingleDecorations(),this.editor.hasWidgetFocus()&&(((V=this.editor.getModel())===null||V===void 0?void 0:V.uri.scheme)!==d.Schemas.vscodeNotebookCell&&((F=(K=o.query)===null||K===void 0?void 0:K.modelInfo)===null||F===void 0?void 0:F.model.uri.scheme)!==d.Schemas.vscodeNotebookCell?(o.query=null,this._run()):!((q=o.query)===null||q===void 0)&&q.modelInfo&&(o.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(V){var K;if(this.occurrencesHighlight==="off"){this._stopAll();return}if(V.reason!==3&&((K=this.editor.getModel())===null||K===void 0?void 0:K.uri.scheme)!==d.Schemas.vscodeNotebookCell){this._stopAll();return}this._run()}_getWord(){const V=this.editor.getSelection(),K=V.startLineNumber,F=V.startColumn;return this.model.isDisposed()?null:this.model.getWordAtPosition({lineNumber:K,column:F})}getOtherModelsToHighlight(V){if(!V)return[];if(V.uri.scheme===d.Schemas.vscodeNotebookCell){const ie=[],ae=this.codeEditorService.listCodeEditors();for(const ne of ae){const $=ne.getModel();$&&$!==V&&$.uri.scheme===d.Schemas.vscodeNotebookCell&&ie.push($)}return ie}const F=[],q=this.codeEditorService.listCodeEditors();for(const ie of q){if(!(0,v.isDiffEditor)(ie))continue;const ae=ie.getModel();ae&&V===ae.modified&&F.push(ae.modified)}if(F.length)return F;if(this.occurrencesHighlight==="singleFile")return[];for(const ie of q){const ae=ie.getModel();ae&&ae!==V&&F.push(ae)}return F}_run(){var V,K;let F;if(this.editor.hasWidgetFocus()){const q=this.editor.getSelection();if(!q||q.startLineNumber!==q.endLineNumber){this._stopAll();return}const ie=q.startColumn,ae=q.endColumn,ne=this._getWord();if(!ne||ne.startColumn>ie||ne.endColumn<ae){o.query=null,this._stopAll();return}F=this.workerRequest&&this.workerRequest.isValid(this.model,q,this.decorations),o.query={modelInfo:{model:this.model,selection:q},word:ne}}else if(o.query===null)return;if(this.lastCursorPositionChangeTime=new Date().getTime(),F)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const q=++this.workerRequestTokenId;this.workerRequestCompleted=!1;const ie=this.getOtherModelsToHighlight(this.editor.getModel()),ae=!!(!o.query.modelInfo&&o.query.word||((V=o.query.modelInfo)===null||V===void 0?void 0:V.model.uri)!==this.model.uri);!o.query.modelInfo||o.query.modelInfo.model.uri!==this.model.uri?this.workerRequest=this.computeWithModel(this.model,this.editor.getSelection(),ae?o.query.word:null,ie):this.workerRequest=this.computeWithModel(o.query.modelInfo.model,o.query.modelInfo.selection,o.query.word,ie),(K=this.workerRequest)===null||K===void 0||K.result.then(ne=>{q===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=ne||[],this._beginRenderDecorations())},p.onUnexpectedError)}}computeWithModel(V,K,F,q){return q.length?P(this.multiDocumentProviders,V,K,F,this.editor.getOption(129),q):A(this.providers,V,K,F,this.editor.getOption(129))}_beginRenderDecorations(){const V=new Date().getTime(),K=this.lastCursorPositionChangeTime+250;V>=K?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},K-V)}renderDecorations(){var V,K,F;this.renderDecorationsTimer=-1;const q=this.codeEditorService.listCodeEditors();for(const ie of q){const ae=M.get(ie);if(!ae)continue;const ne=[],$=(V=ie.getModel())===null||V===void 0?void 0:V.uri;if($&&this.workerRequestValue.has($)){const J=o.storedDecorations.get($),Q=this.workerRequestValue.get($);if(Q)for(const de of Q)ne.push({range:de.range,options:(0,f.getHighlightDecorationOptions)(de.kind)});let re=[];ie.changeDecorations(de=>{re=de.deltaDecorations(J??[],ne)}),o.storedDecorations=o.storedDecorations.set($,re),ne.length>0&&((K=ae.wordHighlighter)===null||K===void 0||K.decorations.set(ne),(F=ae.wordHighlighter)===null||F===void 0||F._hasWordHighlights.set(!0))}}}dispose(){this._stopSingular(),this.toUnhook.dispose()}};N.storedDecorations=new s.ResourceMap,N.query=null,N=o=ke([ge(4,a.ICodeEditorService)],N);let M=g=class extends _.Disposable{static get(V){return V.getContribution(g.ID)}constructor(V,K,F,q){super(),this._wordHighlighter=null;const ie=()=>{V.hasModel()&&!V.getModel().isTooLargeForTokenization()&&(this._wordHighlighter=new N(V,F.documentHighlightProvider,F.multiDocumentHighlightProvider,K,q))};this._register(V.onDidChangeModel(ae=>{this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),ie()})),ie()}get wordHighlighter(){return this._wordHighlighter}saveViewState(){return!!(this._wordHighlighter&&this._wordHighlighter.hasDecorations())}moveNext(){var V;(V=this._wordHighlighter)===null||V===void 0||V.moveNext()}moveBack(){var V;(V=this._wordHighlighter)===null||V===void 0||V.moveBack()}restoreViewState(V){this._wordHighlighter&&V&&this._wordHighlighter.restore()}dispose(){this._wordHighlighter&&(this._wordHighlighter.dispose(),this._wordHighlighter=null),super.dispose()}};e.WordHighlighterContribution=M,M.ID="editor.contrib.wordHighlighter",e.WordHighlighterContribution=M=g=ke([ge(1,c.IContextKeyService),ge(2,u.ILanguageFeaturesService),ge(3,a.ICodeEditorService)],M);class R extends b.EditorAction{constructor(V,K){super(K),this._isNext=V}run(V,K){const F=M.get(K);F&&(this._isNext?F.moveNext():F.moveBack())}}class x extends R{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:L.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:h,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class O extends R{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:L.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:h,kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class B extends b.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:L.localize(2,null),alias:"Trigger Symbol Highlight",precondition:h.toNegated(),kbOpts:{kbExpr:n.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(V,K,F){const q=M.get(K);q&&q.restoreViewState(!0)}}(0,b.registerEditorContribution)(M.ID,M,0),(0,b.registerEditorAction)(x),(0,b.registerEditorAction)(O),(0,b.registerEditorAction)(B)}),define(se[912],oe([1,0,7,158,39,170,2,55,5,38,483]),function(te,e,L,k,y,E,S,p,_,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)),a={showArrow:!0,showFrame:!0,className:"",frameColor:b,arrowColor:b,keepEditorSelection:!1},i="vs.editor.contrib.zoneWidget";class n{constructor(c,d,s,l,o,g,h,m){this.id="",this.domNode=c,this.afterLineNumber=d,this.afterColumn=s,this.heightInLines=l,this.showInHiddenAreas=h,this.ordinal=m,this._onDomNodeTop=o,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 r{constructor(c){this._editor=c,this._ruleName=r._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:_.Range.fromPositions(c),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}r._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 S.DisposableStore,this.container=null,this._isShowing=!1,this.editor=c,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=p.deepClone(d),p.mixin(this.options,a,!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(s=>{const l=this._getWidth(s);this.domNode.style.width=l+"px",this.domNode.style.left=this._getLeft(s)+"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 r(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 s=c-this._decoratingElementsHeight();this.container.style.height=`${s}px`;const l=this.editor.getLayoutInfo();this._doLayout(s,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 s=_.Range.isIRange(c)?_.Range.lift(c):_.Range.fromPositions(c);this._isShowing=!0,this._showImpl(s,d),this._isShowing=!1,this._positionMarkerId.set([{range:s,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 s=Math.round(c/3);d+=2*s}if(this.options.showFrame){const s=Math.round(c/9);d+=2*s}return d}_showImpl(c,d){const s=c.getStartPosition(),l=this.editor.getLayoutInfo(),o=this._getWidth(l);this.domNode.style.width=`${o}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(s)),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,s.lineNumber,s.column,d,T=>this._onViewZoneTop(T),T=>this._onViewZoneHeight(T),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,o),this.options.keepEditorSelection||this.editor.setSelection(c);const D=this.editor.getModel();if(D){const I=D.validateRange(new _.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 s=(d.currentY-c.startY)/this.editor.getOption(66),l=s<0?Math.ceil(s):Math.floor(s),o=c.heightInLines+l;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const c=this.editor.getLayoutInfo();return c.width-c.minimap.minimapWidth}}e.ZoneWidget=u}),define(se[142],oe([1,0,7,78,42,26,28,39,6,55,16,33,168,912,706,141,15,45,8,29,474]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,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 s;(function(m){m.inPeekEditor=new u.RawContextKey("inReferenceSearchEditor",!0,t.localize(0,null)),m.notInPeekEditor=m.inPeekEditor.toNegated()})(s||(e.PeekContext=s={}));let l=class{constructor(C,w){C instanceof i.EmbeddedCodeEditorWidget&&s.inPeekEditor.bindTo(w)}dispose(){}};l.ID="editor.contrib.referenceController",l=ke([ge(1,u.IContextKeyService)],l),(0,b.registerEditorContribution)(l.ID,l,0);function o(m){const C=m.get(a.ICodeEditorService).getFocusedCodeEditor();return C instanceof i.EmbeddedCodeEditorWidget?C.getParentEditor():C}e.getOuterEditor=o;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 _.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",T=>this._onTitleClick(T))),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),S.ThemeIcon.asClassName(E.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(C){}_getActionBarOptions(){return{actionViewItemProvider:r.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=ke([ge(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(se[913],oe([1,0,7,77,13,39,6,2,49,11,5,142,679,141,30,15,8,164,97,57,804,29,23,462]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class h{constructor(O,B,W,V,K){this._openerService=V,this._labelService=K,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",q=>{q.preventDefault();const ie=this._relatedDiagnostics.get(q.target);ie&&W(ie)})),this._scrollable=new k.ScrollableElement(F,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),O.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(q=>{F.style.left=`-${q.scrollLeft}px`,F.style.top=`-${q.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,p.dispose)(this._disposables)}update(O){const{source:B,message:W,relatedInformation:V,code:K}=O;let F=(B?.length||0)+2;K&&(typeof K=="string"?F+=K.length:F+=K.value.length);const q=(0,v.splitLines)(W);this._lines=q.length,this._longestLineLength=0;for(const J of q)this._longestLineLength=Math.max(J.length+F,this._longestLineLength);L.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(O)),this._editor.applyFontInfo(this._messageBlock);let ie=this._messageBlock;for(const J of q)ie=document.createElement("div"),ie.innerText=J,J===""&&(ie.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(ie);if(B||K){const J=document.createElement("span");if(J.classList.add("details"),ie.appendChild(J),B){const Q=document.createElement("span");Q.innerText=B,Q.classList.add("source"),J.appendChild(Q)}if(K)if(typeof K=="string"){const Q=document.createElement("span");Q.innerText=`(${K})`,Q.classList.add("code"),J.appendChild(Q)}else{this._codeLink=L.$("a.code-link"),this._codeLink.setAttribute("href",`${K.target.toString()}`),this._codeLink.onclick=re=>{this._openerService.open(K.target,{allowCommands:!0}),re.preventDefault(),re.stopPropagation()};const Q=L.append(this._codeLink,L.$("span"));Q.innerText=K.value,J.appendChild(this._codeLink)}}if(L.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,y.isNonEmptyArray)(V)){const J=this._relatedBlock.appendChild(document.createElement("div"));J.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const Q of V){const re=document.createElement("div"),de=document.createElement("a");de.classList.add("filename"),de.innerText=`${this._labelService.getUriBasenameLabel(Q.resource)}(${Q.startLineNumber}, ${Q.startColumn}): `,de.title=this._labelService.getUriLabel(Q.resource),this._relatedDiagnostics.set(de,Q);const he=document.createElement("span");he.innerText=Q.message,re.appendChild(de),re.appendChild(he),this._lines+=1,J.appendChild(re)}}const ae=this._editor.getOption(50),ne=Math.ceil(ae.typicalFullwidthCharacterWidth*this._longestLineLength*.75),$=ae.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:ne,scrollHeight:$})}layout(O,B){this._scrollable.getDomNode().style.height=`${O}px`,this._scrollable.getDomNode().style.width=`${B}px`,this._scrollable.setScrollDimensions({width:B,height:O})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(O){let B="";switch(O.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,O.startLineNumber+":"+O.startColumn);const V=this._editor.getModel();return V&&O.startLineNumber<=V.getLineCount()&&O.startLineNumber>=1&&(W=`${V.getLineContent(O.startLineNumber)}, ${W}`),W}}let m=g=class extends a.PeekViewWidget{constructor(O,B,W,V,K,F,q){super(O,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},K),this._themeService=B,this._openerService=W,this._menuService=V,this._contextKeyService=F,this._labelService=q,this._callOnDispose=new p.DisposableStore,this._onDidSelectRelatedInformation=new S.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(O){this._backgroundColor=O.getColor(R);let B=I,W=T;this._severity===c.MarkerSeverity.Warning?(B=A,W=P):this._severity===c.MarkerSeverity.Info&&(B=N,W=M);const V=O.getColor(B),K=O.getColor(W);this.style({arrowColor:V,frameColor:V,headerBackgroundColor:K,primaryHeadingColor:O.getColor(a.peekViewTitleForeground),secondaryHeadingColor:O.getColor(a.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(O){super._fillHead(O),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(O){this._icon=L.append(O,L.$(""))}_fillBody(O){this._parentContainer=O,O.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),O.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(O,B,W){this._container.classList.remove("stale"),this._message.update(O),this._severity=O.severity,this._applyTheme(this._themeService.getColorTheme());const V=b.Range.lift(O),K=this.editor.getPosition(),F=K&&V.containsPosition(K)?K:V.getStartPosition();super.show(F,this.computeRequiredHeight());const q=this.editor.getModel();if(q){const ie=W>1?i.localize(5,null,B,W):i.localize(6,null,B,W);this.setTitle((0,_.basename)(q.uri),ie)}this._icon.className=`codicon ${s.SeverityIcon.className(c.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(F,0),this.editor.focus()}updateMarker(O){this._container.classList.remove("stale"),this._message.update(O)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(O,B){super._doLayoutBody(O,B),this._heightInPixel=O,this._message.layout(O,B),this._container.style.height=`${O}px`}_onWidth(O){this._message.layout(this._heightInPixel,O)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};e.MarkerNavigationWidget=m,m.TitleMenu=new t.MenuId("gotoErrorTitleMenu"),e.MarkerNavigationWidget=m=g=ke([ge(1,o.IThemeService),ge(2,d.IOpenerService),ge(3,t.IMenuService),ge(4,u.IInstantiationService),ge(5,r.IContextKeyService),ge(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)),T=(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)),P=(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)),N=(0,l.registerColor)("editorMarkerNavigationInfo.background",{dark:D,light:D,hcDark:l.contrastBorder,hcLight:l.contrastBorder},i.localize(11,null)),M=(0,l.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,l.transparent)(N,.1),light:(0,l.transparent)(N,.1),hcDark:null,hcLight:null},i.localize(12,null)),R=(0,l.registerColor)("editorMarkerNavigation.background",{dark:l.editorBackground,light:l.editorBackground,hcDark:l.editorBackground,hcLight:l.editorBackground},i.localize(13,null))}),define(se[382],oe([1,0,26,2,16,33,10,5,21,783,678,30,15,8,82,913]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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,T){this._markerNavigationService=w,this._contextKeyService=D,this._editorService=I,this._instantiationService=T,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(r.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,T,A;(!(!((I=this._model)===null||I===void 0)&&I.selected)||!p.Range.containsPosition((T=this._model)===null||T===void 0?void 0:T.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 S.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 T=this._getOrCreateModel(w?void 0:this._editor.getModel().uri);if(T.move(C,this._editor.getModel(),this._editor.getPosition()),!T.selected)return;if(T.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const A=await this._editorService.openCodeEditor({resource:T.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:T.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(T.selected.marker,T.selected.index,T.selected.total)}}};e.MarkerController=f,f.ID="editor.contrib.markerController",e.MarkerController=f=u=ke([ge(1,v.IMarkerNavigationService),ge(2,i.IContextKeyService),ge(3,E.ICodeEditorService),ge(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:_.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:r.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 s extends c{constructor(){super(!1,!1,{id:s.ID,label:s.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:s.LABEL,icon:(0,t.registerIcon)("marker-navigation-previous",L.Codicon.arrowUp,b.localize(3,null)),group:"navigation",order:2}})}}s.ID="editor.action.marker.prev",s.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:_.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:a.MenuId.MenubarGoMenu,title:b.localize(5,null),group:"6_problem_nav",order:1}})}}class o 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:_.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:a.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)(s),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(o);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:_.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(se[914],oe([1,0,7,322,39,6,2,47,49,168,5,38,32,80,43,68,837,142,684,8,34,164,192,23,193,161,464]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class C{constructor(A,P){this._editor=A,this._model=P,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new S.DisposableStore,this._callOnModelChange=new S.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 P of this._model.references)if(P.uri.toString()===A.uri.toString()){this._addDecorations(P.parent);return}}}_addDecorations(A){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const P=[],N=[];for(let M=0,R=A.children.length;M<R;M++){const x=A.children[M];this._decorationIgnoreSet.has(x.id)||x.uri.toString()===this._editor.getModel().uri.toString()&&(P.push({range:x.range,options:C.DecorationOptions}),N.push(M))}this._editor.changeDecorations(M=>{const R=M.deltaDecorations([],P);for(let x=0;x<R.length;x++)this._decorations.set(R[x],A.children[N[x]])})}_onDecorationChanged(){const A=[],P=this._editor.getModel();if(P){for(const[N,M]of this._decorations){const R=P.getDecorationRange(N);if(!R)continue;let x=!1;if(!b.Range.equalsRange(R,M.range)){if(b.Range.spansMultipleLines(R))x=!0;else{const O=M.range.endColumn-M.range.startColumn,B=R.endColumn-R.startColumn;O!==B&&(x=!0)}x?(this._decorationIgnoreSet.add(M.id),A.push(N)):M.range=R}}for(let N=0,M=A.length;N<M;N++)this._decorations.delete(A[N]);this._editor.removeDecorations(A)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}C.DecorationOptions=a.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class w{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(A){let P,N;try{const M=JSON.parse(A);P=M.ratio,N=M.heightInLines}catch{}return{ratio:P||.7,heightInLines:N||18}}}e.LayoutData=w;class D extends o.WorkbenchAsyncDataTree{}let I=class extends f.PeekViewWidget{constructor(A,P,N,M,R,x,O,B,W,V,K,F){super(A,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},x),this._defaultTreeKeyboardSupport=P,this.layoutData=N,this._textModelResolverService=R,this._instantiationService=x,this._peekViewService=O,this._uriLabel=B,this._undoRedoService=W,this._keybindingService=V,this._languageService=K,this._languageConfigurationService=F,this._disposeOnNewModel=new S.DisposableStore,this._callOnDispose=new S.DisposableStore,this._onDidSelectReference=new E.Emitter,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new L.Dimension(0,0),this._applyTheme(M.getColorTheme()),this._callOnDispose.add(M.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(A,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),(0,S.dispose)(this._preview),(0,S.dispose)(this._previewNotAvailableMessage),(0,S.dispose)(this._tree),(0,S.dispose)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(A){const P=A.getColor(f.peekViewBorder)||y.Color.transparent;this.style({arrowColor:P,frameColor:P,headerBackgroundColor:A.getColor(f.peekViewTitleBackground)||y.Color.transparent,primaryHeadingColor:A.getColor(f.peekViewTitleForeground),secondaryHeadingColor:A.getColor(f.peekViewTitleInfoForeground)})}show(A){super.show(A,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(A){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:A.ctrlKey||A.metaKey||A.altKey?"side":"open",source:"title"})}_fillBody(A){this.setCssClass("reference-zone-widget"),this._messageContainer=L.append(A,L.$("div.messages")),L.hide(this._messageContainer),this._splitView=new k.SplitView(A,{orientation:1}),this._previewContainer=L.append(A,L.$("div.preview.inline"));const P={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(v.EmbeddedCodeEditorWidget,this._previewContainer,P,{},this.editor),L.hide(this._previewContainer),this._previewNotAvailableMessage=new a.TextModel(c.localize(0,null),n.PLAINTEXT_LANGUAGE_ID,a.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=L.append(A,L.$("div.ref-tree.inline"));const N={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new u.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(u.StringRepresentationProvider),identityProvider:new u.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:f.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(L.addStandardDisposableListener(this._treeContainer,"keydown",R=>{R.equals(9)&&(this._keybindingService.dispatchEvent(R,R.target),R.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),N),this._splitView.addView({onDidChange:E.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:R=>{this._preview.layout({height:this._dim.height,width:R})}},k.Sizing.Distribute),this._splitView.addView({onDidChange:E.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:R=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${R}px`,this._tree.layout(this._dim.height,R)}},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 M=(R,x)=>{R instanceof m.OneReference&&(x==="show"&&this._revealReference(R,!1),this._onDidSelectReference.fire({element:R,kind:x,source:"tree"}))};this._tree.onDidOpen(R=>{R.sideBySide?M(R.element,"side"):R.editorOptions.pinned?M(R.element,"goto"):M(R.element,"show")}),L.hide(this._treeContainer)}_onWidth(A){this._dim&&this._doLayoutBody(this._dim.height,A)}_doLayoutBody(A,P){super._doLayoutBody(A,P),this._dim=new L.Dimension(P,A),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(P),this._splitView.resizeView(0,P*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:P,target:N}=A;if(P.detail!==2)return;const M=this._getFocusedReference();M&&this._onDidSelectReference.fire({element:{uri:M.uri,range:N.range},kind:P.ctrlKey||P.metaKey||P.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,P){if(this._revealedReference===A)return;this._revealedReference=A,A.uri.scheme!==p.Schemas.inMemory?this.setTitle((0,_.basenameOrAuthority)(A.uri),this._uriLabel.getUriLabel((0,_.dirname)(A.uri))):this.setTitle(c.localize(2,null));const N=this._textModelResolverService.createModelReference(A.uri);this._tree.getInput()===A.parent?this._tree.reveal(A):(P&&this._tree.reveal(A.parent),await this._tree.expand(A.parent),this._tree.reveal(A));const M=await N;if(!this._model){M.dispose();return}(0,S.dispose)(this._previewModelReference);const R=M.object;if(R){const x=this._preview.getModel()===R.textEditorModel?0:1,O=b.Range.lift(A.range).collapseToStart();this._previewModelReference=M,this._preview.setModel(R.textEditorModel),this._preview.setSelection(O),this._preview.revealRangeInCenter(O,x)}else this._preview.setModel(this._previewNotAvailableMessage),M.dispose()}};e.ReferenceWidget=I,e.ReferenceWidget=I=ke([ge(3,g.IThemeService),ge(4,r.ITextModelService),ge(5,d.IInstantiationService),ge(6,f.IPeekViewService),ge(7,l.ILabelService),ge(8,h.IUndoRedoService),ge(9,s.IKeybindingService),ge(10,t.ILanguageService),ge(11,i.ILanguageConfigurationService)],I)}),define(se[383],oe([1,0,14,12,65,2,33,10,5,142,682,25,27,15,8,124,192,50,92,161,914]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s){"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 o=l=class{static get(m){return m.getContribution(l.ID)}constructor(m,C,w,D,I,T,A,P){this._defaultTreeKeyboardSupport=m,this._editor=C,this._editorService=D,this._notificationService=I,this._instantiationService=T,this._storageService=A,this._configurationService=P,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",T=s.LayoutData.fromJSON(this._storageService.get(I,0,"{}"));this._widget=this._instantiationService.createInstance(s.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,T),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(P=>{const{element:N,kind:M}=P;if(N)switch(M){case"open":(P.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(N,!1,!1);break;case"side":this.openReference(N,!0,!1);break;case"goto":w?this._gotoReference(N,!0):this.openReference(N,!1,!0);break}}));const A=++this._requestIdPool;C.then(P=>{var N;if(A!==this._requestIdPool||!this._widget){P.dispose();return}return(N=this._model)===null||N===void 0||N.dispose(),this._model=P,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 M=this._editor.getModel().uri,R=new p.Position(m.startLineNumber,m.startColumn),x=this._model.nearestReference(M,R);if(x)return this._widget.setSelection(x).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},P=>{this._notificationService.error(P)})}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(),T=this._widget.isPreviewEditorFocused();await this._widget.setSelection(D),await this._gotoReference(D,!1),I?this._editor.focus():this._widget&&T&&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=_.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 T;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),P=this._model.clone();this.closeWidget(),I.focus(),A?.toggleWidget(D,(0,L.createCancelablePromise)(N=>Promise.resolve(P)),(T=this._peekMode)!==null&&T!==void 0?T:!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=o,o.ID="editor.contrib.referencesController",e.ReferencesController=o=l=ke([ge(2,n.IContextKeyService),ge(3,S.ICodeEditorService),ge(4,f.INotificationService),ge(5,t.IInstantiationService),ge(6,c.IStorageService),ge(7,i.IConfigurationService)],o);function g(h,m){const C=(0,v.getOuterEditor)(h);if(!C)return;const w=o.get(C);w&&m(w)}r.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()})}}),r.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)})}}),r.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)})}}),a.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),a.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),a.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),a.CommandsRegistry.registerCommand("closeReferenceSearch",h=>g(h,m=>m.closeWidget())),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(v.PeekContext.inPeekEditor,n.ContextKeyExpr.not("config.editor.stablePeek"))}),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,n.ContextKeyExpr.not("config.editor.stablePeek"))}),r.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]))}}),r.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))}}),a.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(se[263],oe([1,0,48,14,65,20,22,105,153,16,33,168,10,5,21,31,383,161,819,166,142,680,30,25,15,8,50,88,252,18,52,242]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A){"use strict";var P,N,M,R,x,O,B,W;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,o.MenuRegistry.appendMenuItem(o.MenuId.EditorContext,{submenu:o.MenuId.EditorContextPeek,title:l.localize(0,null),group:"navigation",order:100});class V{static is(Q){return!Q||typeof Q!="object"?!1:!!(Q instanceof V||i.Position.isIPosition(Q.position)&&Q.model)}constructor(Q,re){this.model=Q,this.position=re}}e.SymbolNavigationAnchor=V;class K extends v.EditorAction2{static all(){return K._allSymbolNavigationCommands.values()}static _patchConfig(Q){const re={...Q,f1:!0};if(re.menu)for(const de of T.Iterable.wrap(re.menu))(de.id===o.MenuId.EditorContext||de.id===o.MenuId.EditorContextPeek)&&(de.when=h.ContextKeyExpr.and(Q.precondition,de.when));return re}constructor(Q,re){super(K._patchConfig(re)),this.configuration=Q,K._allSymbolNavigationCommands.set(re.id,this)}runEditorCommand(Q,re,de,he){if(!re.hasModel())return Promise.resolve(void 0);const me=Q.get(C.INotificationService),X=Q.get(b.ICodeEditorService),U=Q.get(w.IEditorProgressService),G=Q.get(c.ISymbolNavigationService),z=Q.get(I.ILanguageFeaturesService),H=Q.get(m.IInstantiationService),Y=re.getModel(),j=re.getPosition(),Z=V.is(de)?de:new V(Y,j),ee=new p.EditorStateCancellationTokenSource(re,5),le=(0,k.raceCancellation)(this._getLocationModel(z,Z.model,Z.position,ee.token),ee.token).then(async ue=>{var ce;if(!ue||ee.token.isCancellationRequested)return;(0,L.alert)(ue.ariaMessage);let pe;if(ue.referenceAt(Y.uri,j)){const Ce=this._getAlternativeCommand(re);!K._activeAlternativeCommands.has(Ce)&&K._allSymbolNavigationCommands.has(Ce)&&(pe=K._allSymbolNavigationCommands.get(Ce))}const ve=ue.references.length;if(ve===0){if(!this.configuration.muteMessage){const Ce=Y.getWordAtPosition(j);(ce=d.MessageController.get(re))===null||ce===void 0||ce.showMessage(this._getNoResultFoundMessage(Ce),j)}}else if(ve===1&&pe)K._activeAlternativeCommands.add(this.desc.id),H.invokeFunction(Ce=>pe.runEditorCommand(Ce,re,de,he).finally(()=>{K._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(X,G,re,ue,he)},ue=>{me.error(ue)}).finally(()=>{ee.dispose()});return U.showWhile(le,250),le}async _onResult(Q,re,de,he,me){const X=this._getGoToPreference(de);if(!(de instanceof a.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||X==="peek"&&he.references.length>1))this._openInPeek(de,he,me);else{const U=he.firstReference(),G=he.references.length>1&&X==="gotoAndPeek",z=await this._openReference(de,Q,U,this.configuration.openToSide,!G);G&&z?this._openInPeek(z,he,me):he.dispose(),X==="goto"&&re.put(U)}}async _openReference(Q,re,de,he,me){let X;if((0,r.isLocationLink)(de)&&(X=de.targetSelectionRange),X||(X=de.range),!X)return;const U=await re.openCodeEditor({resource:de.uri,options:{selection:n.Range.collapseToStart(X),selectionRevealType:3,selectionSource:"code.jump"}},Q,he);if(U){if(me){const G=U.getModel(),z=U.createDecorationsCollection([{range:X,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{U.getModel()===G&&z.clear()},350)}return U}}_openInPeek(Q,re,de){const he=u.ReferencesController.get(Q);he&&Q.hasModel()?he.toggleWidget(de??Q.getSelection(),(0,k.createCancelablePromise)(me=>Promise.resolve(re)),this.configuration.openInPeek):re.dispose()}}e.SymbolNavigationAction=K,K._allSymbolNavigationCommands=new Map,K._activeAlternativeCommands=new Set;class F extends K{async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getDefinitionsAtPosition)(Q.definitionProvider,re,de,he),l.localize(1,null))}_getNoResultFoundMessage(Q){return Q&&Q.word?l.localize(2,null,Q.word):l.localize(3,null)}_getAlternativeCommand(Q){return Q.getOption(58).alternativeDefinitionCommand}_getGoToPreference(Q){return Q.getOption(58).multipleDefinitions}}e.DefinitionAction=F,(0,o.registerAction2)((P=class extends F{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:P.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:o.MenuId.EditorContext,group:"navigation",order:1.1},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),g.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",P.id)}},P.id="editor.action.revealDefinition",P)),(0,o.registerAction2)((N=class extends F{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:N.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",N.id)}},N.id="editor.action.revealDefinitionAside",N)),(0,o.registerAction2)((M=class extends F{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:M.id,title:{value:l.localize(7,null),original:"Peek Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:2}}),g.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",M.id)}},M.id="editor.action.peekDefinition",M));class q extends K{async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getDeclarationsAtPosition)(Q.declarationProvider,re,de,he),l.localize(8,null))}_getNoResultFoundMessage(Q){return Q&&Q.word?l.localize(9,null,Q.word):l.localize(10,null)}_getAlternativeCommand(Q){return Q.getOption(58).alternativeDeclarationCommand}_getGoToPreference(Q){return Q.getOption(58).multipleDeclarations}}(0,o.registerAction2)((R=class extends q{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:R.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:o.MenuId.EditorContext,group:"navigation",order:1.3},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(Q){return Q&&Q.word?l.localize(13,null,Q.word):l.localize(14,null)}},R.id="editor.action.revealDeclaration",R)),(0,o.registerAction2)(class extends q{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,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:3}})}});class ie extends K{async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getTypeDefinitionsAtPosition)(Q.typeDefinitionProvider,re,de,he),l.localize(16,null))}_getNoResultFoundMessage(Q){return Q&&Q.word?l.localize(17,null,Q.word):l.localize(18,null)}_getAlternativeCommand(Q){return Q.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(Q){return Q.getOption(58).multipleTypeDefinitions}}(0,o.registerAction2)((x=class extends ie{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:o.MenuId.EditorContext,group:"navigation",order:1.4},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},x.ID="editor.action.goToTypeDefinition",x)),(0,o.registerAction2)((O=class extends ie{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:O.ID,title:{value:l.localize(21,null),original:"Peek Type Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasTypeDefinitionProvider,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:4}})}},O.ID="editor.action.peekTypeDefinition",O));class ae extends K{async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getImplementationsAtPosition)(Q.implementationProvider,re,de,he),l.localize(22,null))}_getNoResultFoundMessage(Q){return Q&&Q.word?l.localize(23,null,Q.word):l.localize(24,null)}_getAlternativeCommand(Q){return Q.getOption(58).alternativeImplementationCommand}_getGoToPreference(Q){return Q.getOption(58).multipleImplementations}}(0,o.registerAction2)((B=class extends ae{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:o.MenuId.EditorContext,group:"navigation",order:1.45},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},B.ID="editor.action.goToImplementation",B)),(0,o.registerAction2)((W=class extends ae{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,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:5}})}},W.ID="editor.action.peekImplementation",W));class ne extends K{_getNoResultFoundMessage(Q){return Q?l.localize(28,null,Q.word):l.localize(29,null)}_getAlternativeCommand(Q){return Q.getOption(58).alternativeReferenceCommand}_getGoToPreference(Q){return Q.getOption(58).multipleReferences}}(0,o.registerAction2)(class extends ne{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,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:o.MenuId.EditorContext,group:"navigation",order:1.45},{id:o.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getReferencesAtPosition)(Q.referenceProvider,re,de,!0,he),l.localize(32,null))}}),(0,o.registerAction2)(class extends ne{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,s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:o.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(await(0,D.getReferencesAtPosition)(Q.referenceProvider,re,de,!1,he),l.localize(34,null))}});class $ extends K{constructor(Q,re,de){super(Q,{id:"editor.action.goToLocation",title:{value:l.localize(35,null),original:"Go to Any Symbol"},precondition:h.ContextKeyExpr.and(s.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=re,this._gotoMultipleBehaviour=de}async _getLocationModel(Q,re,de,he){return new f.ReferencesModel(this._references,l.localize(36,null))}_getNoResultFoundMessage(Q){return Q&&l.localize(37,null,Q.word)||""}_getGoToPreference(Q){var re;return(re=this._gotoMultipleBehaviour)!==null&&re!==void 0?re:Q.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:S.URI},{name:"position",description:"The position at which to start",constraint:i.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(J,Q,re,de,he,me,X)=>{(0,E.assertType)(S.URI.isUri(Q)),(0,E.assertType)(i.Position.isIPosition(re)),(0,E.assertType)(Array.isArray(de)),(0,E.assertType)(typeof he>"u"||typeof he=="string"),(0,E.assertType)(typeof X>"u"||typeof X=="boolean");const U=J.get(b.ICodeEditorService),G=await U.openCodeEditor({resource:Q},U.getFocusedCodeEditor());if((0,_.isCodeEditor)(G))return G.setPosition(re),G.revealPositionInCenterIfOutsideViewport(re,0),G.invokeWithinContext(z=>{const H=new class extends ${_getNoResultFoundMessage(Y){return me||super._getNoResultFoundMessage(Y)}}({muteMessage:!me,openInPeek:!!X,openToSide:!1},de,he);z.get(m.IInstantiationService).invokeFunction(H.run.bind(H),G)})}}),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:S.URI},{name:"position",description:"The position at which to start",constraint:i.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(J,Q,re,de,he)=>{J.get(g.ICommandService).executeCommand("editor.action.goToLocations",Q,re,de,he,void 0,!0)}}),g.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(J,Q,re)=>{(0,E.assertType)(S.URI.isUri(Q)),(0,E.assertType)(i.Position.isIPosition(re));const de=J.get(I.ILanguageFeaturesService),he=J.get(b.ICodeEditorService);return he.openCodeEditor({resource:Q},he.getFocusedCodeEditor()).then(me=>{if(!(0,_.isCodeEditor)(me)||!me.hasModel())return;const X=u.ReferencesController.get(me);if(!X)return;const U=(0,k.createCancelablePromise)(z=>(0,D.getReferencesAtPosition)(de.referenceProvider,me.getModel(),i.Position.lift(re),!1,z).then(H=>new f.ReferencesModel(H,l.localize(38,null)))),G=new n.Range(re.lineNumber,re.column,re.lineNumber,re.column);return Promise.resolve(X.toggleWidget(G,U,!1))})}}),g.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(se[384],oe([1,0,14,12,58,2,105,16,5,43,68,188,142,681,15,263,252,18,38,463]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let s=d=class{constructor(o,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=o,this.linkDecorations=this.editor.createDecorationsCollection();const C=new a.ClickLinkGesture(o);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(o){return o.getContribution(d.ID)}async startFindDefinitionFromCursor(o){await this.startFindDefinition(o),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(o,g){if(o.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(o,g)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const h=o.target.position;this.startFindDefinition(h)}async startFindDefinition(o){var g;this.toUnhookForKeyboard.clear();const h=o?(g=this.editor.getModel())===null||g===void 0?void 0:g.getWordAtPosition(o):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 S.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,L.createCancelablePromise)(D=>this.findDefinition(o,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?_.Range.lift(C[0].originSelectionRange):new _.Range(o.lineNumber,h.startColumn,o.lineNumber,h.endColumn);if(C.length>1){let D=w;for(const{originSelectionRange:I}of C)I&&(D=_.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:T}}=I,{startLineNumber:A}=D.range;if(A<1||A>T.getLineCount()){I.dispose();return}const P=this.getPreviewValue(T,A,D),N=this.languageService.guessLanguageIdByFilepathOrFirstLine(T.uri);this.addDecoration(w,P?new y.MarkdownString().appendCodeblock(N||"",P):void 0),I.dispose()})}}getPreviewValue(o,g,h){let m=h.range;return m.endLineNumber-m.startLineNumber>=d.MAX_SOURCE_PREVIEW_LINES&&(m=this.getPreviewRangeBasedOnIndentation(o,g)),this.stripIndentationFromPreviewRange(o,g,m)}stripIndentationFromPreviewRange(o,g,h){let C=o.getLineFirstNonWhitespaceColumn(g);for(let D=g+1;D<h.endLineNumber;D++){const I=o.getLineFirstNonWhitespaceColumn(D);C=Math.min(C,I)}return o.getValueInRange(h).replace(new RegExp(`^\\s{${C-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(o,g){const h=o.getLineFirstNonWhitespaceColumn(g),m=Math.min(o.getLineCount(),g+d.MAX_SOURCE_PREVIEW_LINES);let C=g+1;for(;C<m;C++){const w=o.getLineFirstNonWhitespaceColumn(C);if(h===w)break}return new _.Range(g,1,C+1,1)}addDecoration(o,g){const h={range:o,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:g}};this.linkDecorations.set([h])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(o,g){var h;return this.editor.hasModel()&&o.isLeftClick&&o.isNoneOrSingleMouseDown&&o.target.type===6&&!(((h=o.target.detail.injectedText)===null||h===void 0?void 0:h.options)instanceof c.ModelDecorationInjectedTextOptions)&&(o.hasTriggerModifier||(g?g.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(o,g){const h=this.editor.getModel();return h?(0,u.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,h,o,g):Promise.resolve(null)}gotoDefinition(o,g){return this.editor.setPosition(o),this.editor.invokeWithinContext(h=>{const m=!g&&this.editor.getOption(87)&&!this.isInPeekEditor(h);return new r.DefinitionAction({openToSide:g,openInPeek:m,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h)})}isInPeekEditor(o){const g=o.get(t.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(g)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};e.GotoDefinitionAtPositionEditorContribution=s,s.ID="editor.contrib.gotodefinitionatposition",s.MAX_SOURCE_PREVIEW_LINES=8,e.GotoDefinitionAtPositionEditorContribution=s=d=ke([ge(1,b.ITextModelService),ge(2,v.ILanguageService),ge(3,f.ILanguageFeaturesService)],s),(0,p.registerEditorContribution)(s.ID,s,2)}),define(se[915],oe([1,0,7,13,14,12,2,49,5,18,237,140,260,116,382,689,97,57,88]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const d=L.$;class s{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=s;const l={type:1,filter:{include:n.CodeActionKind.QuickFix},triggerAction:n.CodeActionTriggerSource.QuickFixHover};let o=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 T of m){const A=T.range.startLineNumber===w?T.range.startColumn:1,P=T.range.endLineNumber===w?T.range.endColumn:D,N=this._markerDecorationsService.getMarker(C.uri,T);if(!N)continue;const M=new _.Range(h.range.startLineNumber,A,h.range.startLineNumber,P);I.push(new s(this,M,N))}return I}renderHoverParts(h,m){if(!m.length)return S.Disposable.None;const C=new S.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:T,relatedInformation:A}=h.marker;this._editor.applyFontInfo(w);const P=L.append(w,d("span"));if(P.style.whiteSpace="pre-wrap",P.innerText=I,D||T)if(T&&typeof T!="string"){const N=d("span");if(D){const O=L.append(N,d("span"));O.innerText=D}const M=L.append(N,d("a.code-link"));M.setAttribute("href",T.target.toString()),m.add(L.addDisposableListener(M,"click",O=>{this._openerService.open(T.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()}));const R=L.append(M,d("span"));R.innerText=T.value;const x=L.append(w,N);x.style.opacity="0.6",x.style.paddingLeft="6px"}else{const N=L.append(w,d("span"));N.style.opacity="0.6",N.style.paddingLeft="6px",N.innerText=D&&T?`${D}(${T})`:D||`(${T})`}if((0,k.isNonEmptyArray)(A))for(const{message:N,resource:M,startLineNumber:R,startColumn:x}of A){const O=L.append(w,d("div"));O.style.marginTop="8px";const B=L.append(O,d("a"));B.innerText=`${(0,p.basename)(M)}(${R}, ${x}): `,B.style.cursor="pointer",m.add(L.addDisposableListener(B,"click",V=>{V.stopPropagation(),V.preventDefault(),this._openerService&&this._openerService.open(M,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:R,startColumn:x}}}).catch(E.onUnexpectedError)}));const W=L.append(O,d("span"));W.innerText=N,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:r.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=r.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const D=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?S.Disposable.None:(0,y.disposableTimeout)(()=>w.textContent=r.localize(2,null),200,C);w.textContent||(w.textContent=String.fromCharCode(160));const I=this.getCodeActions(m.marker);C.add((0,S.toDisposable)(()=>I.cancel())),I.then(T=>{if(D.dispose(),this.recentMarkerCodeActionsInfo={marker:m.marker,hasCodeActions:T.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){T.dispose(),w.textContent=r.localize(3,null);return}w.style.display="none";let A=!1;C.add((0,S.toDisposable)(()=>{A||T.dispose()})),h.statusBar.addAction({label:r.localize(4,null),commandId:a.quickFixCommandId,run:P=>{A=!0;const N=i.CodeActionController.get(this._editor),M=L.getDomNodePagePosition(P);h.hide(),N?.showCodeActions(l,T,{x:M.left,y:M.top,width:M.width,height:M.height})}})},E.onUnexpectedError)}}getCodeActions(h){return(0,y.createCancelablePromise)(m=>(0,a.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new _.Range(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn),l,c.Progress.None,m))}};e.MarkerHoverParticipant=o,e.MarkerHoverParticipant=o=ke([ge(1,b.IMarkerDecorationsService),ge(2,f.IOpenerService),ge(3,v.ILanguageFeaturesService)],o)}),define(se[385],oe([1,0,65,2,16,5,21,43,384,379,796,8,57,29,23,101,253,915,257,34,14,687,465]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.HoverController=void 0;const g=!1;let h=o=class extends k.Disposable{constructor(O,B,W,V,K){super(),this._editor=O,this._instantiationService=B,this._openerService=W,this._languageService=V,this._keybindingService=K,this._listenersStore=new k.DisposableStore,this._hoverState={mouseDown:!1,contentHoverFocused:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new s.RunOnceScheduler(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(F=>{F.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(O){return O.getContribution(o.ID)}_hookListeners(){const O=this._editor.getOption(60);this._hoverSettings={enabled:O.enabled,sticky:O.sticky,hidingDelay:O.delay},O.enabled?(this._listenersStore.add(this._editor.onMouseDown(B=>this._onEditorMouseDown(B))),this._listenersStore.add(this._editor.onMouseUp(()=>this._onEditorMouseUp())),this._listenersStore.add(this._editor.onMouseMove(B=>this._onEditorMouseMove(B))),this._listenersStore.add(this._editor.onKeyDown(B=>this._onKeyDown(B)))):(this._listenersStore.add(this._editor.onMouseMove(B=>this._onEditorMouseMove(B))),this._listenersStore.add(this._editor.onKeyDown(B=>this._onKeyDown(B)))),this._listenersStore.add(this._editor.onMouseLeave(B=>this._onEditorMouseLeave(B))),this._listenersStore.add(this._editor.onDidChangeModel(()=>{this._cancelScheduler(),this._hideWidgets()})),this._listenersStore.add(this._editor.onDidChangeModelContent(()=>this._cancelScheduler())),this._listenersStore.add(this._editor.onDidScrollChange(B=>this._onEditorScrollChanged(B)))}_unhookListeners(){this._listenersStore.clear()}_cancelScheduler(){this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}_onEditorScrollChanged(O){(O.scrollTopChanged||O.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(O){var B;this._hoverState.mouseDown=!0;const W=O.target;if(W.type===9&&W.detail===v.ContentHoverWidget.ID){this._hoverState.contentHoverFocused=!0;return}W.type===12&&W.detail===b.MarginHoverWidget.ID||(W.type!==12&&(this._hoverState.contentHoverFocused=!1),!(!((B=this._contentWidget)===null||B===void 0)&&B.widget.isResizing)&&this._hideWidgets())}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(O){var B,W;this._cancelScheduler();const V=O.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(O){var B,W,V,K,F;const q=O.target,ie=this._hoverSettings.sticky;return!!(ie&&q.type===9&&q.detail===v.ContentHoverWidget.ID||ie&&(!((B=this._contentWidget)===null||B===void 0)&&B.containsNode((W=O.event.browserEvent.view)===null||W===void 0?void 0:W.document.activeElement))&&!(!((K=(V=O.event.browserEvent.view)===null||V===void 0?void 0:V.getSelection())===null||K===void 0)&&K.isCollapsed)||!ie&&q.type===9&&q.detail===v.ContentHoverWidget.ID&&(!((F=this._contentWidget)===null||F===void 0)&&F.isColorPickerVisible)||ie&&q.type===12&&q.detail===b.MarginHoverWidget.ID)}_onEditorMouseMove(O){var B,W,V,K;if(this._mouseMoveEvent=O,!((B=this._contentWidget)===null||B===void 0)&&B.isFocused||!((W=this._contentWidget)===null||W===void 0)&&W.isResizing||this._hoverState.mouseDown&&this._hoverState.contentHoverFocused)return;const F=this._hoverSettings.sticky;if(F&&(!((V=this._contentWidget)===null||V===void 0)&&V.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(O)){this._reactToEditorMouseMoveRunner.cancel();return}const ie=this._hoverSettings.hidingDelay;if(!((K=this._contentWidget)===null||K===void 0)&&K.isVisible&&F&&ie>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(ie);return}this._reactToEditorMouseMove(O)}_reactToEditorMouseMove(O){var B,W,V,K;if(!O)return;const F=O.target,q=(B=F.element)===null||B===void 0?void 0:B.classList.contains("colorpicker-color-decoration"),ie=this._editor.getOption(146),ae=this._hoverSettings.enabled,ne=this._hoverState.activatedByDecoratorClick;if(q&&(ie==="click"&&!ne||ie==="hover"&&!ae&&!g||ie==="clickAndHover"&&!ae&&!ne)||!q&&!ae&&!ne){this._hideWidgets();return}if(this._getOrCreateContentWidget().showsOrWillShow(O)){(W=this._glyphWidget)===null||W===void 0||W.hide();return}if(F.type===2&&F.position&&F.detail.glyphMarginLane){(V=this._contentWidget)===null||V===void 0||V.hide(),this._getOrCreateGlyphWidget().startShowingAt(F.position.lineNumber,F.detail.glyphMarginLane);return}if(F.type===3&&F.position){(K=this._contentWidget)===null||K===void 0||K.hide(),this._getOrCreateGlyphWidget().startShowingAt(F.position.lineNumber,"lineNo");return}g||this._hideWidgets()}_onKeyDown(O){var B;if(!this._editor.hasModel())return;const W=this._keybindingService.softDispatch(O,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);O.keyCode===5||O.keyCode===6||O.keyCode===57||O.keyCode===4||V||this._hideWidgets()}_hideWidgets(){var O,B,W;g||this._hoverState.mouseDown&&this._hoverState.contentHoverFocused&&(!((O=this._contentWidget)===null||O===void 0)&&O.isColorPickerVisible)||c.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._hoverState.contentHoverFocused=!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}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=new b.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget}showContentHover(O,B,W,V,K=!1){this._hoverState.activatedByDecoratorClick=K,this._getOrCreateContentWidget().startShowingAtRange(O,B,W,V)}focus(){var O;(O=this._contentWidget)===null||O===void 0||O.focus()}scrollUp(){var O;(O=this._contentWidget)===null||O===void 0||O.scrollUp()}scrollDown(){var O;(O=this._contentWidget)===null||O===void 0||O.scrollDown()}scrollLeft(){var O;(O=this._contentWidget)===null||O===void 0||O.scrollLeft()}scrollRight(){var O;(O=this._contentWidget)===null||O===void 0||O.scrollRight()}pageUp(){var O;(O=this._contentWidget)===null||O===void 0||O.pageUp()}pageDown(){var O;(O=this._contentWidget)===null||O===void 0||O.pageDown()}goToTop(){var O;(O=this._contentWidget)===null||O===void 0||O.goToTop()}goToBottom(){var O;(O=this._contentWidget)===null||O===void 0||O.goToBottom()}get isColorPickerVisible(){var O;return(O=this._contentWidget)===null||O===void 0?void 0:O.isColorPickerVisible}get isHoverVisible(){var O;return(O=this._contentWidget)===null||O===void 0?void 0:O.isVisible}dispose(){var O,B;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(O=this._glyphWidget)===null||O===void 0||O.dispose(),(B=this._contentWidget)===null||B===void 0||B.dispose()}};e.HoverController=h,h.ID="editor.contrib.hover",e.HoverController=h=o=ke([ge(1,a.IInstantiationService),ge(2,i.IOpenerService),ge(3,p.ILanguageService),ge(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:l.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:[l.localize(1,null),l.localize(2,null),l.localize(3,null)],default:m.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2087),weight:100}})}run(O,B,W){if(!B.hasModel())return;const V=h.get(B);if(!V)return;const K=W?.focus;let F=m.FocusIfVisible;Object.values(m).includes(K)?F=K:typeof K=="boolean"&&K&&(F=m.AutoFocusImmediately);const q=ae=>{const ne=B.getPosition(),$=new E.Range(ne.lineNumber,ne.column,ne.lineNumber,ne.column);V.showContentHover($,1,1,ae)},ie=B.getOption(2)===2;V.isHoverVisible?F!==m.NoAutoFocus?V.focus():q(ie):q(ie||F===m.AutoFocusImmediately)}}class w extends y.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:l.localize(4,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(O,B){const W=h.get(B);if(!W)return;const V=B.getPosition();if(!V)return;const K=new E.Range(V.lineNumber,V.column,V.lineNumber,V.column),F=_.GotoDefinitionAtPositionEditorContribution.get(B);if(!F)return;F.startFindDefinitionFromCursor(V).then(()=>{W.showContentHover(K,1,1,!0)})}}class D extends y.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:l.localize(5,null),alias:"Scroll Up Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(O,B){const W=h.get(B);W&&W.scrollUp()}}class I extends y.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:l.localize(6,null),alias:"Scroll Down Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(O,B){const W=h.get(B);W&&W.scrollDown()}}class T extends y.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:l.localize(7,null),alias:"Scroll Left Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(O,B){const W=h.get(B);W&&W.scrollLeft()}}class A extends y.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:l.localize(8,null),alias:"Scroll Right Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(O,B){const W=h.get(B);W&&W.scrollRight()}}class P extends y.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:l.localize(9,null),alias:"Page Up Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(O,B){const W=h.get(B);W&&W.pageUp()}}class N extends y.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:l.localize(10,null),alias:"Page Down Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(O,B){const W=h.get(B);W&&W.pageDown()}}class M extends y.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:l.localize(11,null),alias:"Go To Bottom Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(O,B){const W=h.get(B);W&&W.goToTop()}}class R extends y.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:l.localize(12,null),alias:"Go To Bottom Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(O,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)(T),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(P),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(R),r.HoverParticipantRegistry.register(u.MarkdownHoverParticipant),r.HoverParticipantRegistry.register(f.MarkerHoverParticipant),(0,t.registerThemingParticipant)((x,O)=>{const B=x.getColor(n.editorHoverBorder);B&&(O.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${B.transparent(.5)}; }`),O.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${B.transparent(.5)}; }`),O.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${B.transparent(.5)}; }`))})}),define(se[916],oe([1,0,2,16,5,375,376,385,101]),function(te,e,L,k,y,E,S,p,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class v extends L.Disposable{constructor(a){super(),this._editor=a,this._register(a.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(a){const i=this._editor.getOption(146);if(i!=="click"&&i!=="clickAndHover")return;const n=a.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==E.ColorDecorationInjectedTextMarker||!n.range)return;const t=this._editor.getContribution(p.HoverController.ID);if(t&&!t.isColorPickerVisible){const r=new y.Range(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);t.showContentHover(r,1,0,!1,!0)}}}e.ColorContribution=v,v.ID="editor.contrib.colorContribution",(0,k.registerEditorContribution)(v.ID,v,2),_.HoverParticipantRegistry.register(S.ColorHoverParticipant)}),define(se[386],oe([1,0,7,42,19,175,5,68,263,142,30,25,15,59,8,50]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;async function u(c,d,s,l){var o;const g=c.get(p.ITextModelService),h=c.get(n.IContextMenuService),m=c.get(a.ICommandService),C=c.get(t.IInstantiationService),w=c.get(r.INotificationService);if(await l.item.resolve(y.CancellationToken.None),!l.part.location)return;const D=l.part.location,I=[],T=new Set(b.MenuRegistry.getMenuItems(b.MenuId.EditorContext).map(P=>(0,b.isIMenuItem)(P)?P.command.id:(0,E.generateUuid)()));for(const P of _.SymbolNavigationAction.all())T.has(P.desc.id)&&I.push(new k.Action(P.desc.id,b.MenuItemAction.label(P.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const N=await g.createModelReference(D.uri);try{const M=new _.SymbolNavigationAnchor(N.object.textEditorModel,S.Range.getStartPosition(D.range)),R=l.item.anchor.range;await C.invokeFunction(P.runEditorCommand.bind(P),d,M,R)}finally{N.dispose()}}));if(l.part.command){const{command:P}=l.part;I.push(new k.Separator),I.push(new k.Action(P.id,P.title,void 0,!0,async()=>{var N;try{await m.executeCommand(P.id,...(N=P.arguments)!==null&&N!==void 0?N:[])}catch(M){w.notify({severity:r.Severity.Error,source:l.item.provider.displayName,message:M})}}))}const A=d.getOption(126);h.showContextMenu({domForShadowRoot:A&&(o=d.getDomNode())!==null&&o!==void 0?o:void 0,getAnchor:()=>{const P=L.getDomNodePagePosition(s);return{x:P.left,y:P.top+P.height+8}},getActions:()=>I,onHide:()=>{d.focus()},autoSelectFirstItem:!0})}e.showGoToContextMenu=u;async function f(c,d,s,l){const g=await c.get(p.ITextModelService).createModelReference(l.uri);await s.invokeWithinContext(async h=>{const m=d.hasSideBySideModifier,C=h.get(i.IContextKeyService),w=v.PeekContext.inPeekEditor.getValue(C),D=!m&&s.getOption(87)&&!w;return new _.DefinitionAction({openToSide:m,openInPeek:D,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h,new _.SymbolNavigationAnchor(g.object.textEditorModel,S.Range.getStartPosition(l.range)),S.Range.lift(l.range))}),g.dispose()}e.goToDefinitionWithLocation=f}),define(se[387],oe([1,0,7,13,14,19,12,2,53,20,22,167,127,36,74,5,31,41,38,79,18,68,188,333,386,25,45,8,50,29,23]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T){"use strict";var A;Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class P{constructor(){this._entries=new _.LRUCache(50)}get(W){const V=P._key(W);return this._entries.get(V)}set(W,V){const K=P._key(W);this._entries.set(K,V)}static _key(W){return`${W.uri.toString()}/${W.getVersionId()}`}}const N=(0,w.createDecorator)("IInlayHintsCache");(0,C.registerSingleton)(N,P,1);class M{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=M;class R{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,K,F,q,ie,ae){this._editor=W,this._languageFeaturesService=V,this._inlayHintsCache=F,this._commandService=q,this._notificationService=ie,this._instaService=ae,this._disposables=new p.DisposableStore,this._sessionDisposables=new p.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new a.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=K.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(ne=>{ne.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;if(W.enabled==="on")this._activeRenderMode=0;else{let ae,ne;W.enabled==="onUnlessPressed"?(ae=0,ne=1):(ae=1,ne=0),this._activeRenderMode=ae,this._sessionDisposables.add(L.ModifierKeyEmitter.getInstance().event($=>{if(!this._editor.hasModel())return;const J=$.altKey&&$.ctrlKey&&!($.shiftKey||$.metaKey)?ne:ae;if(J!==this._activeRenderMode){this._activeRenderMode=J;const Q=this._editor.getModel(),re=this._copyInlayHintsWithCurrentAnchor(Q);this._updateHintsDecorators([Q.getFullModelRange()],re),ie.schedule(0)}}))}const K=this._inlayHintsCache.get(V);K&&this._updateHintsDecorators([V.getFullModelRange()],K),this._sessionDisposables.add((0,p.toDisposable)(()=>{V.isDisposed()||this._cacheHintsForFastRestore(V)}));let F;const q=new Set,ie=new y.RunOnceScheduler(async()=>{const ae=Date.now();F?.dispose(!0),F=new E.CancellationTokenSource;const ne=V.onWillDispose(()=>F?.cancel());try{const $=F.token,J=await g.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,V,this._getHintsRanges(),$);if(ie.delay=this._debounceInfo.update(V,Date.now()-ae),$.isCancellationRequested){J.dispose();return}for(const Q of J.provider)typeof Q.onDidChangeInlayHints=="function"&&!q.has(Q)&&(q.add(Q),this._sessionDisposables.add(Q.onDidChangeInlayHints(()=>{ie.isScheduled()||ie.schedule()})));this._sessionDisposables.add(J),this._updateHintsDecorators(J.ranges,J.items),this._cacheHintsForFastRestore(V)}catch($){(0,S.onUnexpectedError)($)}finally{F.dispose(),ne.dispose()}},this._debounceInfo.get(V));this._sessionDisposables.add(ie),this._sessionDisposables.add((0,p.toDisposable)(()=>F?.dispose(!0))),ie.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(ae=>{(ae.scrollTopChanged||!ie.isScheduled())&&ie.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(ae=>{F?.cancel();const ne=Math.max(ie.delay,1250);ie.schedule(ne)})),this._sessionDisposables.add(this._installDblClickGesture(()=>ie.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const W=new p.DisposableStore,V=W.add(new o.ClickLinkGesture(this._editor)),K=new p.DisposableStore;return W.add(K),W.add(V.onMouseMoveOrRelevantKeyDown(F=>{const[q]=F,ie=this._getInlayHintLabelPart(q),ae=this._editor.getModel();if(!ie||!ae){K.clear();return}const ne=new E.CancellationTokenSource;K.add((0,p.toDisposable)(()=>ne.dispose(!0))),ie.item.resolve(ne.token),this._activeInlayHintPart=ie.part.command||ie.part.location?new R(ie,q.hasTriggerModifier):void 0;const $=ae.validatePosition(ie.item.hint.position).lineNumber,J=new r.Range($,1,$,ae.getLineMaxColumn($)),Q=this._getInlineHintsForRange(J);this._updateHintsDecorators([J],Q),K.add((0,p.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([J],Q)}))})),W.add(V.onCancel(()=>K.clear())),W.add(V.onExecute(async F=>{const q=this._getInlayHintLabelPart(F);if(q){const ie=q.part;ie.location?this._instaService.invokeFunction(h.goToDefinitionWithLocation,F,this._editor,ie.location):u.Command.is(ie.command)&&await this._invokeCommand(ie.command,q.item)}})),W}_getInlineHintsForRange(W){const V=new Set;for(const K of this._decorationsMetadata.values())W.containsRange(K.item.anchor.range)&&V.add(K.item);return Array.from(V)}_installDblClickGesture(W){return this._editor.onMouseUp(async V=>{if(V.event.detail!==2)return;const K=this._getInlayHintLabelPart(V);if(K&&(V.event.preventDefault(),await K.item.resolve(E.CancellationToken.None),(0,k.isNonEmptyArray)(K.item.hint.textEdits))){const F=K.item.hint.textEdits.map(q=>t.EditOperation.replace(r.Range.lift(q.range),q.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 K=(V=W.target.detail.injectedText)===null||V===void 0?void 0:V.options;if(K instanceof c.ModelDecorationInjectedTextOptions&&K?.attachedData instanceof M)return K.attachedData}async _invokeCommand(W,V){var K;try{await this._commandService.executeCommand(W.id,...(K=W.arguments)!==null&&K!==void 0?K:[])}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[K,F]of this._decorationsMetadata){if(V.has(F.item))continue;const q=W.getDecorationRange(K);if(q){const ie=new g.InlayHintAnchor(q,F.item.anchor.direction),ae=F.item.with({anchor:ie});V.set(F.item,ae)}}return Array.from(V.values())}_getHintsRanges(){const V=this._editor.getModel(),K=this._editor.getVisibleRangesPlusViewportAboveBelow(),F=[];for(const q of K.sort(r.Range.compareRangesUsingStarts)){const ie=V.validateRange(new r.Range(q.startLineNumber-30,q.startColumn,q.endLineNumber+30,q.endColumn));F.length===0||!r.Range.areIntersectingOrTouching(F[F.length-1],ie)?F.push(ie):F[F.length-1]=r.Range.plusRange(F[F.length-1],ie)}return F}_updateHintsDecorators(W,V){var K,F;const q=[],ie=(X,U,G,z,H)=>{const Y={content:G,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:U.className,cursorStops:z,attachedData:H};q.push({item:X,classNameRef:U,decoration:{range:X.anchor.range,options:{description:"InlayHint",showIfCollapsed:X.anchor.range.isEmpty(),collapseOnReplaceEdit:!X.anchor.range.isEmpty(),stickiness:0,[X.anchor.direction]:this._activeRenderMode===0?Y:void 0}}})},ae=(X,U)=>{const G=this._ruleFactory.createClassNameRef({width:`${ne/3|0}px`,display:"inline-block"});ie(X,G,"\u200A",U?f.InjectedTextCursorStops.Right:f.InjectedTextCursorStops.None)},{fontSize:ne,fontFamily:$,padding:J,isUniform:Q}=this._getLayoutInfo(),re="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(re,$);let de={line:0,totalLen:0};for(const X of V){if(de.line!==X.anchor.range.startLineNumber&&(de={line:X.anchor.range.startLineNumber,totalLen:0}),de.totalLen>A._MAX_LABEL_LEN)continue;X.hint.paddingLeft&&ae(X,!1);const U=typeof X.hint.label=="string"?[{label:X.hint.label}]:X.hint.label;for(let G=0;G<U.length;G++){const z=U[G],H=G===0,Y=G===U.length-1,j={fontSize:`${ne}px`,fontFamily:`var(${re}), ${n.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:Q?"baseline":"middle",unicodeBidi:"isolate"};(0,k.isNonEmptyArray)(X.hint.textEdits)&&(j.cursor="default"),this._fillInColors(j,X.hint),(z.command||z.location)&&((K=this._activeInlayHintPart)===null||K===void 0?void 0:K.part.item)===X&&this._activeInlayHintPart.part.index===G&&(j.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(j.color=(0,T.themeColorFromId)(I.editorActiveLinkForeground),j.cursor="pointer")),J&&(H&&Y?(j.padding=`1px ${Math.max(1,ne/4)|0}px`,j.borderRadius=`${ne/4|0}px`):H?(j.padding=`1px 0 1px ${Math.max(1,ne/4)|0}px`,j.borderRadius=`${ne/4|0}px 0 0 ${ne/4|0}px`):Y?(j.padding=`1px ${Math.max(1,ne/4)|0}px 1px 0`,j.borderRadius=`0 ${ne/4|0}px ${ne/4|0}px 0`):j.padding="1px 0 1px 0");let Z=z.label;de.totalLen+=Z.length;let ee=!1;const le=de.totalLen-A._MAX_LABEL_LEN;if(le>0&&(Z=Z.slice(0,-le)+"\u2026",ee=!0),ie(X,this._ruleFactory.createClassNameRef(j),O(Z),Y&&!X.hint.paddingRight?f.InjectedTextCursorStops.Right:f.InjectedTextCursorStops.None,new M(X,G)),ee)break}if(X.hint.paddingRight&&ae(X,!0),q.length>A._MAX_DECORATORS)break}const he=[];for(const[X,U]of this._decorationsMetadata){const G=(F=this._editor.getModel())===null||F===void 0?void 0:F.getDecorationRange(X);G&&W.some(z=>z.containsRange(G))&&(he.push(X),U.classNameRef.dispose(),this._decorationsMetadata.delete(X))}const me=i.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(X=>{const U=X.deltaDecorations(he,q.map(G=>G.decoration));for(let G=0;G<U.length;G++){const z=q[G];this._decorationsMetadata.set(U[G],z)}}),me.restore(this._editor)}_fillInColors(W,V){V.kind===u.InlayHintKind.Parameter?(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintParameterBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintParameterForeground)):V.kind===u.InlayHintKind.Type?(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintTypeBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintTypeForeground)):(W.backgroundColor=(0,T.themeColorFromId)(I.editorInlayHintBackground),W.color=(0,T.themeColorFromId)(I.editorInlayHintForeground))}_getLayoutInfo(){const W=this._editor.getOption(139),V=W.padding,K=this._editor.getOption(52),F=this._editor.getOption(49);let q=W.fontSize;(!q||q<5||q>K)&&(q=K);const ie=W.fontFamily||F;return{fontSize:q,fontFamily:ie,padding:V,isUniform:!V&&ie===F&&q===K}}_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,x._MAX_LABEL_LEN=43,e.InlayHintsController=x=A=ke([ge(1,s.ILanguageFeaturesService),ge(2,d.ILanguageFeatureDebounceService),ge(3,N),ge(4,m.ICommandService),ge(5,D.INotificationService),ge(6,w.IInstantiationService)],x);function O(B){const W="\xA0";return B.replace(/[ \t]/g,W)}m.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(B,...W)=>{const[V,K]=W;(0,v.assertType)(b.URI.isUri(V)),(0,v.assertType)(r.Range.isIRange(K));const{inlayHintsProvider:F}=B.get(s.ILanguageFeaturesService),q=await B.get(l.ITextModelService).createModelReference(V);try{const ie=await g.InlayHintsFragments.create(F,q.object.textEditorModel,[r.Range.lift(K)],E.CancellationToken.None),ae=ie.items.map(ne=>ne.hint);return setTimeout(()=>ie.dispose(),0),ae}finally{q.dispose()}})}),define(se[917],oe([1,0,14,58,10,38,101,43,68,363,253,387,27,57,18,692,17,333,13]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class d extends S.HoverForeignElementAnchor{constructor(o,g,h,m){super(10,g,o.item.anchor.range,h,m,!0),this.part=o}}let s=class extends b.MarkdownHoverParticipant{constructor(o,g,h,m,C,w){super(o,g,h,m,w),this._resolverService=C,this.hoverOrdinal=6}suggestHoverAnchor(o){var g;if(!a.InlayHintsController.get(this._editor)||o.target.type!==6)return null;const m=(g=o.target.detail.injectedText)===null||g===void 0?void 0:g.options;return m instanceof E.ModelDecorationInjectedTextOptions&&m.attachedData instanceof a.RenderedInlayHintLabelPart?new d(m.attachedData,this,o.event.posx,o.event.posy):null}computeSync(){return[]}computeAsync(o,g,h){return o instanceof d?new L.AsyncIterableObject(async m=>{const{part:C}=o;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,o.range,[w],!1,0)),(0,c.isNonEmptyArray)(C.item.hint.textEdits)&&m.emitOne(new b.MarkdownHover(this,o.range,[new k.MarkdownString().appendText((0,r.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,o.range,[D],!1,1)),C.part.location||C.part.command){let T;const P=this._editor.getOption(77)==="altKey"?u.isMacintosh?(0,r.localize)(1,null):(0,r.localize)(2,null):u.isMacintosh?(0,r.localize)(3,null):(0,r.localize)(4,null);C.part.location&&C.part.command?T=new k.MarkdownString().appendText((0,r.localize)(5,null,P)):C.part.location?T=new k.MarkdownString().appendText((0,r.localize)(6,null,P)):C.part.command&&(T=new k.MarkdownString(`[${(0,r.localize)(7,null)}](${(0,f.asCommandLink)(C.part.command)} "${C.part.command.title}") (${P})`,{isTrusted:!0})),T&&m.emitOne(new b.MarkdownHover(this,o.range,[T],!1,1e4))}const I=await this._resolveInlayHintLabelPartHover(C,h);for await(const T of I)m.emitOne(T)}):L.AsyncIterableObject.EMPTY}async _resolveInlayHintLabelPartHover(o,g){if(!o.part.location)return L.AsyncIterableObject.EMPTY;const{uri:h,range:m}=o.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,o.item.anchor.range,D.hover.contents,!1,2+D.ordinal)):L.AsyncIterableObject.EMPTY}finally{C.dispose()}}};e.InlayHintsHover=s,e.InlayHintsHover=s=ke([ge(1,p.ILanguageService),ge(2,n.IOpenerService),ge(3,i.IConfigurationService),ge(4,_.ITextModelService),ge(5,t.ILanguageFeaturesService)],s)}),define(se[918],oe([1,0,16,101,387,917]),function(te,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(se[388],oe([1,0,2,18,908,907,8,59,30,15,21,188,5,252,386,10,19,32,79,7,310,67,261,302]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,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,T,A,P,N){super(),this._editor=w,this._contextMenuService=D,this._languageFeaturesService=I,this._instaService=T,this._contextKeyService=N,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 M=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(M,d.EventType.CONTEXT_MENU,async x=>{this._onContextMenu(d.getWindow(M),x)})),this._stickyScrollFocusedContextKey=b.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=b.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const R=this._register(d.trackFocus(M));this._register(R.onDidBlur(x=>{this._positionRevealed===!1&&M.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(R.onDidFocus(x=>{this.focus()})),this._registerMouseListeners(),this._register(d.addDisposableListener(M,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._focusedStickyElementIndex<this._stickyScrollWidget.lineNumberCount-1&&this._focusNav(!0)}focusPrevious(){this._focusedStickyElementIndex>0&&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 a.ClickLinkGesture(this._editor,{extractLineNumberFromMouseEvent:A=>{const P=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);return P?P.lineNumber:0}})),I=A=>{if(!this._editor.hasModel()||A.target.type!==12||A.target.detail!==this._stickyScrollWidget.getId())return null;const P=A.target.element;if(!P||P.innerText!==P.innerHTML)return null;const N=this._stickyScrollWidget.getEditorPositionFromNode(P);return N?{range:new i.Range(N.lineNumber,N.column,N.lineNumber,N.column+P.innerText.length),textElement:P}:null},T=this._stickyScrollWidget.getDomNode();this._register(d.addStandardDisposableListener(T,d.EventType.CLICK,A=>{if(A.ctrlKey||A.altKey||A.metaKey||!A.leftButton)return;if(A.shiftKey){const R=this._stickyScrollWidget.getLineIndexFromChildDomNode(A.target);if(R===null)return;const x=new r.Position(this._endLineNumbers[R],1);this._revealLineInCenterIfOutsideViewport(x);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(A.target)){const R=this._stickyScrollWidget.getLineNumberFromChildDomNode(A.target);this._toggleFoldingRegionForLine(R);return}if(!this._stickyScrollWidget.isInStickyLine(A.target))return;let M=this._stickyScrollWidget.getEditorPositionFromNode(A.target);if(!M){const R=this._stickyScrollWidget.getLineNumberFromChildDomNode(A.target);if(R===null)return;M=new r.Position(R,1)}this._revealPosition(M)})),this._register(d.addStandardDisposableListener(T,d.EventType.MOUSE_MOVE,A=>{if(A.shiftKey){const P=this._stickyScrollWidget.getLineIndexFromChildDomNode(A.target);if(P===null||this._showEndForLine!==null&&this._showEndForLine===P)return;this._showEndForLine=P,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(d.addDisposableListener(T,d.EventType.MOUSE_LEAVE,A=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(D.onMouseMoveOrRelevantKeyDown(([A,P])=>{const N=I(A);if(!N||!A.hasTriggerModifier||!this._editor.hasModel()){w.clear();return}const{range:M,textElement:R}=N;if(!M.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=M,w.clear();else if(R.style.textDecoration==="underline")return;const x=new u.CancellationTokenSource;w.add((0,L.toDisposable)(()=>x.dispose(!0)));let O;(0,n.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new r.Position(M.startLineNumber,M.startColumn+1),x.token).then(B=>{if(!x.token.isCancellationRequested)if(B.length!==0){this._candidateDefinitionsLength=B.length;const W=R;O!==W?(w.clear(),O=W,O.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{O.style.textDecoration="none"}))):O||(O=W,O.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{O.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 P=this._stickyScrollWidget.getEditorPositionFromNode(A.target.element);P&&(!this._editor.hasModel()||!this._stickyRangeProjectedOnEditor||(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:P.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:_.MenuId.StickyScrollContext,getAnchor:()=>I})}_toggleFoldingRegionForLine(w){if(!this._foldingModel||w===null)return;const D=this._stickyScrollWidget.getRenderedStickyLine(w),I=D?.foldingIcon;if(!I)return;(0,g.toggleCollapseState)(this._foldingModel,Number.MAX_VALUE,[w]),I.isCollapsed=!I.isCollapsed;const T=(I.isCollapsed?this._editor.getTopForLineNumber(I.foldingEndLine):this._editor.getTopForLineNumber(I.foldingStartLine))-this._editor.getOption(66)*D.index+1;this._editor.setScrollTop(T),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(0)}))}_needsUpdate(w){const D=this._stickyScrollWidget.getCurrentLines();for(const I of D)for(const T of w.ranges)if(I>=T.fromLineNumber&&I<=T.toLineNumber)return!0;return!1}_onTokensChange(w){this._needsUpdate(w)&&this._renderStickyScroll(0)}_onDidResize(){const D=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(D*.25)}async _renderStickyScroll(w){var D,I;const T=this._editor.getModel();if(!T||T.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null);return}const A=this._stickyLineCandidateProvider.getVersionId();if(A===void 0||A===T.getVersionId())if(this._foldingModel=(I=await((D=o.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 P=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(P)||(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 T=0;const A=[],P=[],N=this._editor.getVisibleRanges();if(N.length!==0){const M=new s.StickyRange(N[0].startLineNumber,N[N.length-1].endLineNumber),R=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(M);for(const x of R){const O=x.startLineNumber,B=x.endLineNumber,W=x.nestingDepth;if(B-O>0){const V=(W-1)*w,K=W*w,F=this._editor.getBottomForLineNumber(O)-I,q=this._editor.getTopForLineNumber(B)-I,ie=this._editor.getBottomForLineNumber(B)-I;if(V>q&&V<=ie){A.push(O),P.push(B+1),T=ie-K;break}else K>F&&K<=ie&&(A.push(O),P.push(B+1));if(A.length===D)break}}}return this._endLineNumbers=P,new y.StickyScrollWidgetState(A,P,T,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};e.StickyScrollController=m,m.ID="store.contrib.stickyScrollController",e.StickyScrollController=m=h=ke([ge(1,p.IContextMenuService),ge(2,k.ILanguageFeaturesService),ge(3,S.IInstantiationService),ge(4,f.ILanguageConfigurationService),ge(5,c.ILanguageFeatureDebounceService),ge(6,v.IContextKeyService)],m)}),define(se[919],oe([1,0,16,715,757,30,27,15,21,388]),function(te,e,L,k,y,E,S,p,_,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 Editor 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(S.IConfigurationService),s=!d.getValue("editor.stickyScroll.enabled");return d.updateValue("editor.stickyScroll.enabled",s)}}e.ToggleStickyScroll=b;const a=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"),_.EditorContextKeys.stickyScrollVisible),menu:[{id:E.MenuId.CommandPalette}]})}runEditorCommand(c,d){var s;(s=v.StickyScrollController.get(d))===null||s===void 0||s.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:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:a,primary:18}})}runEditorCommand(c,d){var s;(s=v.StickyScrollController.get(d))===null||s===void 0||s.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:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:a,primary:16}})}runEditorCommand(c,d){var s;(s=v.StickyScrollController.get(d))===null||s===void 0||s.focusPrevious()}}e.SelectPreviousStickyScrollLine=t;class r extends L.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,k.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:a,primary:3}})}runEditorCommand(c,d){var s;(s=v.StickyScrollController.get(d))===null||s===void 0||s.goToFocused()}}e.GoToStickyScrollLine=r;class u extends L.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,k.localize)(9,null),original:"Select Editor"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:a,primary:9}})}runEditorCommand(c,d){var s;(s=v.StickyScrollController.get(d))===null||s===void 0||s.selectEditor()}}e.SelectEditor=u}),define(se[920],oe([1,0,16,919,388,30]),function(te,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(se[921],oe([1,0,16,33,383,27,15,8,50,92]),function(te,e,L,k,y,E,S,p,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let b=class extends y.ReferencesController{constructor(i,n,t,r,u,f,c){super(!0,i,n,t,r,u,f,c)}};e.StandaloneReferencesController=b,e.StandaloneReferencesController=b=ke([ge(1,S.IContextKeyService),ge(2,k.ICodeEditorService),ge(3,_.INotificationService),ge(4,p.IInstantiationService),ge(5,v.IStorageService),ge(6,E.IConfigurationService)],b),(0,L.registerEditorContribution)(y.ReferencesController.ID,b,4)}),define(se[922],oe([1,0,12,2,47,100,754,162,45,50,193]),function(te,e,L,k,y,E,S,p,_,v,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const a=!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,T){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=T,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 r{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(S.localize(0,null,h.join(", "))),m.length>0&&C.push(S.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,T){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=T,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 r(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 r(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<this._past.length;m++)h.push(` * [UNDO] ${this._past[m]}`);for(let m=this._future.length-1;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<w;C++)m.push(this._past[C].id);for(let C=this._future.length-1;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 T=0,A=this._past.length;T<A;T++,w++){const P=this._past[T];C&&(w>=m||P.id!==h.elements[w])&&(C=!1,D=0),!C&&P.type===1&&P.removeResource(this.resourceLabel,this.strResource,0)}let I=-1;for(let T=this._future.length-1;T>=0;T--,w++){const A=this._future[T];C&&(w>=m||A.id!==h.elements[w])&&(C=!1,I=T),!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;m<C;m++)this._versionIds[m]=this.editStacks[m].versionId}isValid(){for(let h=0,m=this.editStacks.length;h<m;h++)if(this._versionIds[h]!==this.editStacks[h].versionId)return!1;return!0}}const s=new c("","");s.locked=!0;let l=class{constructor(h,m){this._dialogService=h,this._notificationService=m,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(h){for(const m of this._uriComparisonKeyComputers)if(m[0]===h.scheme)return m[1].getComparisonKey(h);return h.toString()}_print(h){console.log("------------------------------------"),console.log(`AFTER ${h}: `);const m=[];for(const C of this._editStacks)m.push(C[1].toString());console.log(m.join(`
|
||
`))}pushElement(h,m=b.UndoRedoGroup.None,C=b.UndoRedoSource.None){if(h.type===0){const w=i(h.resource),D=this.getUriComparisonKey(h.resource);this._pushElement(new t(h,w,D,m.id,m.nextOrder(),C.id,C.nextOrder()))}else{const w=new Set,D=[],I=[];for(const T of h.resources){const A=i(T),P=this.getUriComparisonKey(T);w.has(P)||(w.add(P),D.push(A),I.push(P))}D.length===1?this._pushElement(new t(h,D[0],I[0],m.id,m.nextOrder(),C.id,C.nextOrder())):this._pushElement(new f(h,D,I,m.id,m.nextOrder(),C.id,C.nextOrder()))}a&&this._print("pushElement")}_pushElement(h){for(let m=0,C=h.strResources.length;m<C;m++){const w=h.resourceLabels[m],D=h.strResources[m];let I;this._editStacks.has(D)?I=this._editStacks.get(D):(I=new c(w,D),this._editStacks.set(D,I)),I.pushElement(h)}}getLastElement(h){const m=this.getUriComparisonKey(h);if(this._editStacks.has(m)){const C=this._editStacks.get(m);if(C.hasFutureElements())return null;const w=C.getClosestPastElement();return w?w.actual:null}return null}_splitPastWorkspaceElement(h,m){const C=h.actual.split(),w=new Map;for(const D of C){const I=i(D.resource),T=this.getUriComparisonKey(D.resource),A=new t(D,I,T,0,0,0,0);w.set(A.strResource,A)}for(const D of h.strResources){if(m&&m.has(D))continue;this._editStacks.get(D).splitPastWorkspaceElement(h,w)}}_splitFutureWorkspaceElement(h,m){const C=h.actual.split(),w=new Map;for(const D of C){const I=i(D.resource),T=this.getUriComparisonKey(D.resource),A=new t(D,I,T,0,0,0,0);w.set(A.strResource,A)}for(const D of h.strResources){if(m&&m.has(D))continue;this._editStacks.get(D).splitFutureWorkspaceElement(h,w)}}removeElements(h){const m=typeof h=="string"?h:this.getUriComparisonKey(h);this._editStacks.has(m)&&(this._editStacks.get(m).dispose(),this._editStacks.delete(m)),a&&this._print("removeElements")}setElementsValidFlag(h,m,C){const w=this.getUriComparisonKey(h);this._editStacks.has(w)&&this._editStacks.get(w).setElementsValidFlag(m,C),a&&this._print("setElementsValidFlag")}createSnapshot(h){const m=this.getUriComparisonKey(h);return this._editStacks.has(m)?this._editStacks.get(m).createSnapshot(h):new b.ResourceEditStackSnapshot(h,[])}restoreSnapshot(h){const m=this.getUriComparisonKey(h.resource);if(this._editStacks.has(m)){const C=this._editStacks.get(m);C.restoreSnapshot(h),!C.hasPastElements()&&!C.hasFutureElements()&&(C.dispose(),this._editStacks.delete(m))}a&&this._print("restoreSnapshot")}getElements(h){const m=this.getUriComparisonKey(h);return this._editStacks.has(m)?this._editStacks.get(m).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(h){if(!h)return[null,null];let m=null,C=null;for(const[w,D]of this._editStacks){const I=D.getClosestPastElement();I&&I.sourceId===h&&(!m||I.sourceOrder>m.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 T;try{T=m()}catch(A){return I(),w.dispose(),this._onError(A,h)}return T?T.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)||s);return new d(m)}_tryToSplitAndUndo(h,m,C,w){if(m.canSplit())return this._splitPastWorkspaceElement(m,C),this._notificationService.warn(w),new o(this._undo(h,0,!0));for(const D of m.strResources)this.removeElements(D);return this._notificationService.warn(w),new o}_checkWorkspaceUndo(h,m,C,w){if(m.removedResources)return this._tryToSplitAndUndo(h,m,m.removedResources,S.localize(2,null,m.label,m.removedResources.createMessage()));if(w&&m.invalidatedResources)return this._tryToSplitAndUndo(h,m,m.invalidatedResources,S.localize(3,null,m.label,m.invalidatedResources.createMessage()));const D=[];for(const T of C.editStacks)T.getClosestPastElement()!==m&&D.push(T.resourceLabel);if(D.length>0)return this._tryToSplitAndUndo(h,m,null,S.localize(4,null,m.label,D.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndUndo(h,m,null,S.localize(5,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndUndo(h,m,null,S.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 T;(function(N){N[N.All=0]="All",N[N.This=1]="This",N[N.Cancel=2]="Cancel"})(T||(T={}));const{result:A}=await this._dialogService.prompt({type:E.default.Info,message:S.localize(7,null,m.label),buttons:[{label:S.localize(8,null,C.editStacks.length),run:()=>T.All},{label:S.localize(9,null),run:()=>T.This}],cancelButton:{run:()=>T.Cancel}});if(A===T.Cancel)return;if(A===T.This)return this._splitPastWorkspaceElement(m,null),this._undo(h,0,!0);const P=this._checkWorkspaceUndo(h,m,C,!1);if(P)return P.returnValue;w=!0}let D;try{D=await this._invokeWorkspacePrepare(m)}catch(T){return this._onError(T,m)}const I=this._checkWorkspaceUndo(h,m,C,!0);if(I)return D.dispose(),I.returnValue;for(const T of C.editStacks)T.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=S.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[T,A]=this._findClosestUndoElementInGroup(D.groupId);if(D!==T&&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{a&&this._print("undo")}}async _confirmAndContinueUndo(h,m,C){if((await this._dialogService.confirm({message:S.localize(11,null,C.label),primaryButton:S.localize(12,null),cancelButton:S.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.sourceOrder<m.sourceOrder)&&(m=I,C=w)}return[m,C]}canRedo(h){if(h instanceof b.UndoRedoSource){const[,C]=this._findClosestRedoElementWithSource(h.id);return!!C}const m=this.getUriComparisonKey(h);return this._editStacks.has(m)?this._editStacks.get(m).hasFutureElements():!1}_tryToSplitAndRedo(h,m,C,w){if(m.canSplit())return this._splitFutureWorkspaceElement(m,C),this._notificationService.warn(w),new o(this._redo(h));for(const D of m.strResources)this.removeElements(D);return this._notificationService.warn(w),new o}_checkWorkspaceRedo(h,m,C,w){if(m.removedResources)return this._tryToSplitAndRedo(h,m,m.removedResources,S.localize(14,null,m.label,m.removedResources.createMessage()));if(w&&m.invalidatedResources)return this._tryToSplitAndRedo(h,m,m.invalidatedResources,S.localize(15,null,m.label,m.invalidatedResources.createMessage()));const D=[];for(const T of C.editStacks)T.getClosestFutureElement()!==m&&D.push(T.resourceLabel);if(D.length>0)return this._tryToSplitAndRedo(h,m,null,S.localize(16,null,m.label,D.join(", ")));const I=[];for(const T of C.editStacks)T.locked&&I.push(T.resourceLabel);return I.length>0?this._tryToSplitAndRedo(h,m,null,S.localize(17,null,m.label,I.join(", "))):C.isValid()?null:this._tryToSplitAndRedo(h,m,null,S.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=S.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<m.groupOrder)&&(m=I,C=w)}return[m,C]}_continueRedoInGroup(h){if(!h)return;const[,m]=this._findClosestRedoElementInGroup(h);if(m)return this._redo(m)}redo(h){if(h instanceof b.UndoRedoSource){const[,m]=this._findClosestRedoElementWithSource(h.id);return m?this._redo(m):void 0}return typeof h=="string"?this._redo(h):this._redo(this.getUriComparisonKey(h))}_redo(h){if(!this._editStacks.has(h))return;const m=this._editStacks.get(h),C=m.getClosestFutureElement();if(C){if(C.groupId){const[w,D]=this._findClosestRedoElementInGroup(C.groupId);if(C!==w&&D)return this._redo(D)}try{return C.type===1?this._workspaceRedo(h,C):this._resourceRedo(m,C)}finally{a&&this._print("redo")}}}};e.UndoRedoService=l,e.UndoRedoService=l=ke([ge(0,p.IDialogService),ge(1,v.INotificationService)],l);class o{constructor(h){this.returnValue=h}}(0,_.registerSingleton)(b.IUndoRedoService,l,1)}),define(se[169],oe([1,0,755,95,199,22,8]),function(te,e,L,k,y,E,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandaloneEditorWorkspace=e.STANDALONE_EDITOR_WORKSPACE_ID=e.WORKSPACE_FILTER=e.WORKSPACE_EXTENSION=e.WorkspaceFolder=e.Workspace=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.UNKNOWN_EMPTY_WINDOW_WORKSPACE=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isEmptyWorkspaceIdentifier=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,S.createDecorator)("contextService");function p(t){const r=t;return typeof r?.id=="string"&&E.URI.isUri(r.uri)}e.isSingleFolderWorkspaceIdentifier=p;function _(t){const r=t;return typeof r?.id=="string"&&!p(t)&&!b(t)}e.isEmptyWorkspaceIdentifier=_,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"},e.UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};function v(t,r){if(typeof t=="string"||typeof t>"u")return typeof t=="string"?{id:(0,k.basename)(t)}:r?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 r=t;return typeof r?.id=="string"&&E.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=b;class a{constructor(r,u,f,c,d){this._id=r,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(r){this._folders=r,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(r){this._configuration=r}getFolder(r){return r&&this._foldersMap.findSubstr(r)||null}updateFoldersMap(){this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=a;class i{constructor(r,u){this.raw=u,this.uri=r.uri,this.index=r.index,this.name=r.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(se[923],oe([1,0,7,135,42,2,17,16,21,664,30,15,59,34,27,169]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let f=u=class{static get(s){return s.getContribution(u.ID)}constructor(s,l,o,g,h,m,C,w){this._contextMenuService=l,this._contextViewService=o,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=s,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(),T=D.srcElement;T.shadowRoot&&L.getShadowRoot(I)===T.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(s){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),s.target.position&&!this._editor.getSelection().containsPosition(s.target.position)&&this._editor.setPosition(s.target.position);return}if(s.target.type===12||s.target.type===6&&s.target.detail.injectedText)return;if(s.event.preventDefault(),s.event.stopPropagation(),s.target.type===11)return this._showScrollbarContextMenu(s.event);if(s.target.type!==6&&s.target.type!==7&&s.target.type!==1)return;if(this._editor.focus(),s.target.position){let o=!1;for(const g of this._editor.getSelections())if(g.containsPosition(s.target.position)){o=!0;break}o||this._editor.setPosition(s.target.position)}let l=null;s.target.type!==1&&(l=s.event),this.showContextMenu(l)}showContextMenu(s){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,s)}_getMenuActions(s,l){const o=[],g=this._menuService.createMenu(l,this._contextKeyService),h=g.getActions({arg:s.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(s,D.item.submenu);I.length>0&&(o.push(new y.SubmenuAction(D.id,D.label,I)),w++)}else o.push(D),w++;w&&o.push(new y.Separator)}return o.length&&o.pop(),o}_doShowContextMenu(s,l=null){if(!this._editor.hasModel())return;const o=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)&&!S.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:h?this._editor.getDomNode():void 0,getAnchor:()=>g,getActions:()=>s,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:o})}})}_showScrollbarContextMenu(s){if(!this._editor.hasModel()||(0,r.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const l=this._editor.getOption(72);let o=0;const g=D=>({id:`menu-action-${++o}`,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-${++o}`,D,I,void 0),m=(D,I,T,A,P)=>{if(!I)return g({label:D,enabled:I,run:()=>{}});const N=R=>()=>{this._configurationService.updateValue(T,R)},M=[];for(const R of P)M.push(g({label:R.label,checked:A===R.value,run:N(R.value)}));return h(D,M)},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)&&!S.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:w?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>C,onHide:D=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(s){return this._keybindingService.lookupKeybinding(s.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};e.ContextMenuController=f,f.ID="editor.contrib.contextmenu",e.ContextMenuController=f=u=ke([ge(1,i.IContextMenuService),ge(2,i.IContextViewService),ge(3,a.IContextKeyService),ge(4,n.IKeybindingService),ge(5,b.IMenuService),ge(6,t.IConfigurationService),ge(7,r.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:_.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(s,l){var o;(o=f.get(l))===null||o===void 0||o.showContextMenu()}}(0,p.registerEditorContribution)(f.ID,f,2),(0,p.registerEditorAction)(c)}),define(se[389],oe([1,0,13,176,2,109,47,49,22,18,668,169]),function(te,e,L,k,y,E,S,p,_,v,b,a){"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(o,g,h,m,C){const w=await this.getEdit(h,C);return w?{insertText:w.insertText,label:w.label,detail:w.detail,handledMimeType:w.handledMimeType,yieldTo:w.yieldTo}:void 0}async provideDocumentOnDropEdits(o,g,h,m){const C=await this.getEdit(h,m);return C?{insertText:C.insertText,label:C.label,handledMimeType:C.handledMimeType,yieldTo:C.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(o,g){const h=o.get(E.Mimes.text);if(!h||o.has(E.Mimes.uriList))return;const m=await h.asString();return{handledMimeType:E.Mimes.text,label:(0,b.localize)(1,null),detail:i,insertText:m}}}class r extends n{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[E.Mimes.uriList],this.pasteMimeTypes=[E.Mimes.uriList]}async getEdit(o,g){const h=await c(o);if(!h.length||g.isCancellationRequested)return;let m=0;const C=h.map(({uri:D,originalText:I})=>D.scheme===S.Schemas.file?D.fsPath:(m++,I)).join(" ");let w;return m>0?w=h.length>1?(0,b.localize)(2,null):(0,b.localize)(3,null):w=h.length>1?(0,b.localize)(4,null):(0,b.localize)(5,null),{handledMimeType:E.Mimes.uriList,insertText:C,label:w,detail:i}}}let u=class extends n{constructor(o){super(),this._workspaceContextService=o,this.id="relativePath",this.dropMimeTypes=[E.Mimes.uriList],this.pasteMimeTypes=[E.Mimes.uriList]}async getEdit(o,g){const h=await c(o);if(!h.length||g.isCancellationRequested)return;const m=(0,L.coalesce)(h.map(({uri:C})=>{const w=this._workspaceContextService.getWorkspaceFolder(C);return w?(0,p.relativePath)(w.uri,C):void 0}));if(m.length)return{handledMimeType:E.Mimes.uriList,insertText:m.join(" "),label:h.length>1?(0,b.localize)(6,null):(0,b.localize)(7,null),detail:i}}};u=ke([ge(0,a.IWorkspaceContextService)],u);class f{constructor(){this.id="html",this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:E.Mimes.text}]}async provideDocumentPasteEdits(o,g,h,m,C){if(m.trigger!=="explicit"&&m.only!==this.id)return;const w=h.get("text/html"),D=await w?.asString();if(!(!D||C.isCancellationRequested))return{insertText:D,yieldTo:this._yieldTo,label:(0,b.localize)(8,null),detail:i}}}async function c(l){const o=l.get(E.Mimes.uriList);if(!o)return[];const g=await o.asString(),h=[];for(const m of k.UriList.parse(g))try{h.push({uri:_.URI.parse(m),originalText:m})}catch{}return h}let d=class extends y.Disposable{constructor(o,g){super(),this._register(o.documentOnDropEditProvider.register("*",new t)),this._register(o.documentOnDropEditProvider.register("*",new r)),this._register(o.documentOnDropEditProvider.register("*",new u(g)))}};e.DefaultDropProvidersFeature=d,e.DefaultDropProvidersFeature=d=ke([ge(0,v.ILanguageFeaturesService),ge(1,a.IWorkspaceContextService)],d);let s=class extends y.Disposable{constructor(o,g){super(),this._register(o.documentPasteEditProvider.register("*",new t)),this._register(o.documentPasteEditProvider.register("*",new r)),this._register(o.documentPasteEditProvider.register("*",new u(g))),this._register(o.documentPasteEditProvider.register("*",new f))}};e.DefaultPasteProvidersFeature=s,e.DefaultPasteProvidersFeature=s=ke([ge(0,v.ILanguageFeaturesService),ge(1,a.IWorkspaceContextService)],s)}),define(se[924],oe([1,0,16,21,131,380,389,666]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(E.CopyPasteController.ID,E.CopyPasteController,0),(0,y.registerEditorFeature)(S.DefaultPasteProvidersFeature),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:E.changePasteTypeCommandId,precondition:E.pasteWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(_,v,b){var a;return(a=E.CopyPasteController.get(v))===null||a===void 0?void 0:a.changePasteType()}}),(0,L.registerEditorAction)(class extends L.EditorAction{constructor(){super({id:"editor.action.pasteAs",label:p.localize(0,null),alias:"Paste As...",precondition:k.EditorContextKeys.writable,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:p.localize(1,null)}}}}]}})}run(_,v,b){var a;const i=typeof b?.id=="string"?b.id:void 0;return(a=E.CopyPasteController.get(v))===null||a===void 0?void 0:a.pasteAs(i)}}),(0,L.registerEditorAction)(class extends L.EditorAction{constructor(){super({id:"editor.action.pasteAsText",label:p.localize(2,null),alias:"Paste as Text",precondition:k.EditorContextKeys.writable})}run(_,v,b){var a;return(a=E.CopyPasteController.get(v))===null||a===void 0?void 0:a.pasteAs("text")}})}),define(se[925],oe([1,0,16,246,131,389,669,98,37,903]),function(te,e,L,k,y,E,S,p,_,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,a,i){var n;(n=v.DropIntoEditorController.get(a))===null||n===void 0||n.changeDropType()}}),(0,y.registerEditorFeature)(E.DefaultDropProvidersFeature),_.Registry.as(p.Extensions.Configuration).registerConfiguration({...k.editorConfigurationBaseNode,properties:{[v.defaultProviderConfig]:{type:"object",scope:5,description:S.localize(0,null),default:{},additionalProperties:{type:"string"}}}})}),define(se[926],oe([1,0,587,95,49,11,175,32,117,714,169]),function(te,e,L,k,y,E,S,p,_,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 a{constructor(s){this._delegates=s}resolve(s){for(const l of this._delegates){const o=l.resolve(s);if(o!==void 0)return o}}}e.CompositeSnippetVariableResolver=a;class i{constructor(s,l,o,g){this._model=s,this._selection=l,this._selectionIdx=o,this._overtypingCapturer=g}resolve(s){const{name:l}=s;if(l==="SELECTION"||l==="TM_SELECTED_TEXT"){let o=this._model.getValueInRange(this._selection)||void 0,g=this._selection.startLineNumber!==this._selection.endLineNumber;if(!o&&this._overtypingCapturer){const h=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);h&&(o=h.value,g=h.multiline)}if(o&&g&&s.snippet){const h=this._model.getLineContent(this._selection.startLineNumber),m=(0,E.getLeadingWhitespace)(h,0,this._selection.startColumn-1);let C=m;s.snippet.walk(D=>D===s?!1:(D instanceof _.Text&&(C=(0,E.getLeadingWhitespace)((0,E.splitLines)(D.value).pop())),!0));const w=(0,E.commonPrefixLength)(C,m);o=o.replace(/(\r\n|\r|\n)(.*)/g,(D,I,T)=>`${I}${C.substr(w)}${T}`)}return o}else{if(l==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(l==="TM_CURRENT_WORD"){const o=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return o&&o.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(s,l){this._labelService=s,this._model=l}resolve(s){const{name:l}=s;if(l==="TM_FILENAME")return k.basename(this._model.uri.fsPath);if(l==="TM_FILENAME_BASE"){const o=k.basename(this._model.uri.fsPath),g=o.lastIndexOf(".");return g<=0?o:o.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(s,l,o,g){this._readClipboardText=s,this._selectionIdx=l,this._selectionCount=o,this._spread=g}resolve(s){if(s.name!=="CLIPBOARD")return;const l=this._readClipboardText();if(l){if(this._spread){const o=l.split(/\r\n|\n|\r/).filter(g=>!(0,E.isFalsyOrWhitespace)(g));if(o.length===this._selectionCount)return o[this._selectionIdx]}return l}}}e.ClipboardBasedVariableResolver=t;let r=class{constructor(s,l,o){this._model=s,this._selection=l,this._languageConfigurationService=o}resolve(s){const{name:l}=s,o=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),g=this._languageConfigurationService.getLanguageConfiguration(o).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=r,e.CommentBasedVariableResolver=r=ke([ge(2,p.ILanguageConfigurationService)],r);class u{constructor(){this._date=new Date}resolve(s){const{name:l}=s;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 o=this._date.getTimezoneOffset(),g=o>0?"-":"+",h=Math.trunc(Math.abs(o/60)),m=h<10?"0"+h:h,C=Math.abs(o)-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(s){this._workspaceService=s}resolve(s){if(!this._workspaceService)return;const l=(0,b.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,b.isEmptyWorkspaceIdentifier)(l)){if(s.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(l);if(s.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(l)}}_resolveWorkspaceName(s){if((0,b.isSingleFolderWorkspaceIdentifier)(s))return k.basename(s.uri.path);let l=k.basename(s.configPath.path);return l.endsWith(b.WORKSPACE_EXTENSION)&&(l=l.substr(0,l.length-b.WORKSPACE_EXTENSION.length-1)),l}_resoveWorkspacePath(s){if((0,b.isSingleFolderWorkspaceIdentifier)(s))return(0,L.normalizeDriveLetter)(s.uri.fsPath);const l=k.basename(s.configPath.path);let o=s.configPath.fsPath;return o.endsWith(l)&&(o=o.substr(0,o.length-l.length-1)),o?(0,L.normalizeDriveLetter)(o):"/"}}e.WorkspaceBasedVariableResolver=f;class c{resolve(s){const{name:l}=s;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,S.generateUuid)()}}e.RandomBasedVariableResolver=c}),define(se[390],oe([1,0,13,2,11,74,5,24,32,38,164,169,117,926,476]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class r{constructor(d,s,l){this._editor=d,this._snippet=s,this._snippetLineLeadingWhitespace=l,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,L.groupBy)(s.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(s=>{for(const l of this._snippet.placeholders){const o=this._snippet.offset(l),g=this._snippet.fullLen(l),h=S.Range.fromPositions(d.getPositionAt(this._offset+o),d.getPositionAt(this._offset+o+g)),m=l.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive,C=s.addDecoration(h,m);this._placeholderDecorations.set(l,C)}})}move(d){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const o=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx])if(g.transform){const h=this._placeholderDecorations.get(g),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;D<w.length;D++)w[D]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+w[D]);o.push(E.EditOperation.replace(m,w.join(this._editor.getModel().getEOL())))}o.length>0&&this._editor.executeEdits("snippet.placeholderTransform",o)}let s=!1;d===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,s=!0):d===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,s=!0);const l=this._editor.getModel().changeDecorations(o=>{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)),s=s&&this._hasPlaceholderBeenCollapsed(m),o.changeDecorationOptions(C,m.isFinalTabstop?r._decor.activeFinal:r._decor.active),g.add(m);for(const D of this._snippet.enclosingPlaceholders(m)){const I=this._placeholderDecorations.get(D);o.changeDecorationOptions(I,D.isFinalTabstop?r._decor.activeFinal:r._decor.active),g.add(D)}}for(const[m,C]of this._placeholderDecorations)g.has(m)||o.changeDecorationOptions(C,m.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive);return h});return s?this.move(d):l??[]}_hasPlaceholderBeenCollapsed(d){let s=d;for(;s;){if(s instanceof i.Placeholder){const l=this._placeholderDecorations.get(s);if(this._editor.getModel().getDecorationRange(l).isEmpty()&&s.toString().length>0)return!0}s=s.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 s of this._placeholderGroups){let l;for(const o of s){if(o.isFinalTabstop)break;l||(l=[],d.set(o.index,l));const g=this._placeholderDecorations.get(o),h=this._editor.getModel().getDecorationRange(g);if(!h){d.delete(o.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 s=this._placeholderDecorations.get(d);if(!s)return;const l=this._editor.getModel().getDecorationRange(s);if(l)return{range:l,choice:d.choice}}get hasChoice(){let d=!1;return this._snippet.walk(s=>(d=s instanceof i.Choice,!d)),d}merge(d){const s=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(l=>{for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const g=d.shift();console.assert(g._offset!==-1),console.assert(!g._placeholderDecorations);const h=g._snippet.placeholderInfo.last.index;for(const C of g._snippet.placeholderInfo.all)C.isFinalTabstop?C.index=o.index+(h+1)/this._nestingLevel:C.index=o.index+C.index/this._nestingLevel;this._snippet.replace(o,g._snippet.children);const m=this._placeholderDecorations.get(o);l.removeDecoration(m),this._placeholderDecorations.delete(o);for(const C of g._snippet.placeholders){const w=g._snippet.offset(C),D=g._snippet.fullLen(C),I=S.Range.fromPositions(s.getPositionAt(g._offset+w),s.getPositionAt(g._offset+w+D)),T=l.addDecoration(I,r._decor.inactive);this._placeholderDecorations.set(C,T)}}this._placeholderGroups=(0,L.groupBy)(this._snippet.placeholders,i.Placeholder.compareByIndex)})}}e.OneSnippet=r,r._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,s,l,o,g){const h=d.getLineContent(s.lineNumber),m=(0,y.getLeadingWhitespace)(h,0,s.column-1);let C;return o.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 T=o.offset(w);if(T===0)D[0]=d.normalizeIndentation(D[0]);else{C=C??o.toString();const A=C.charCodeAt(T-1);(A===10||A===13)&&(D[0]=d.normalizeIndentation(m+D[0]))}for(let A=1;A<D.length;A++)D[A]=d.normalizeIndentation(m+D[A])}const I=D.join(d.getEOL());return I!==w.value&&(w.parent.replace(w,[new i.Text(I)]),C=void 0),!0}),m}static adjustSelection(d,s,l,o){if(l!==0||o!==0){const{positionLineNumber:g,positionColumn:h}=s,m=h-l,C=h+o,w=d.validateRange({startLineNumber:g,startColumn:m,endLineNumber:g,endColumn:C});s=p.Selection.createWithDirection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn,s.getDirection())}return s}static createEditsAndSnippetsFromSelections(d,s,l,o,g,h,m,C,w){const D=[],I=[];if(!d.hasModel())return{edits:D,snippets:I};const T=d.getModel(),A=d.invokeWithinContext(B=>B.get(a.IWorkspaceContextService)),P=d.invokeWithinContext(B=>new n.ModelBasedVariableResolver(B.get(b.ILabelService),T)),N=()=>m,M=T.getValueInRange(t.adjustSelection(T,d.getSelection(),l,0)),R=T.getValueInRange(t.adjustSelection(T,d.getSelection(),0,o)),x=T.getLineFirstNonWhitespaceColumn(d.getSelection().positionLineNumber),O=d.getSelections().map((B,W)=>({selection:B,idx:W})).sort((B,W)=>S.Range.compareRangesUsingStarts(B.selection,W.selection));for(const{selection:B,idx:W}of O){let V=t.adjustSelection(T,B,l,0),K=t.adjustSelection(T,B,0,o);M!==T.getValueInRange(V)&&(V=B),R!==T.getValueInRange(K)&&(K=B);const F=B.setStartPosition(V.startLineNumber,V.startColumn).setEndPosition(K.endLineNumber,K.endColumn),q=new i.SnippetParser().parse(s,!0,g),ie=F.getStartPosition(),ae=t.adjustWhitespace(T,ie,h||W>0&&x!==T.getLineFirstNonWhitespaceColumn(B.positionLineNumber),q);q.resolveVariables(new n.CompositeSnippetVariableResolver([P,new n.ClipboardBasedVariableResolver(N,W,O.length,d.getOption(78)==="spread"),new n.SelectionBasedVariableResolver(T,B,W,C),new n.CommentBasedVariableResolver(T,B,w),new n.TimeBasedVariableResolver,new n.WorkspaceBasedVariableResolver(A),new n.RandomBasedVariableResolver])),D[W]=E.EditOperation.replace(F,q.toString()),D[W].identifier={major:W,minor:0},D[W]._isTracked=!0,I[W]=new r(d,q,ae)}return{edits:D,snippets:I}}static createEditsAndSnippetsFromEdits(d,s,l,o,g,h,m){if(!d.hasModel()||s.length===0)return{edits:[],snippets:[]};const C=[],w=d.getModel(),D=new i.SnippetParser,I=new i.TextmateSnippet,T=new n.CompositeSnippetVariableResolver([d.invokeWithinContext(P=>new n.ModelBasedVariableResolver(P.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(P=>P.get(a.IWorkspaceContextService))),new n.RandomBasedVariableResolver]);s=s.sort((P,N)=>S.Range.compareRangesUsingStarts(P.range,N.range));let A=0;for(let P=0;P<s.length;P++){const{range:N,template:M}=s[P];if(P>0){const W=s[P-1].range,V=S.Range.fromPositions(W.getEndPosition(),N.getStartPosition()),K=new i.Text(w.getValueInRange(V));I.appendChild(K),A+=K.value.length}const R=D.parseFragment(M,I);t.adjustWhitespace(w,N.getStartPosition(),!0,I,new Set(R)),I.resolveVariables(T);const x=I.toString(),O=x.slice(A);A=x.length;const B=E.EditOperation.replace(N,O);B.identifier={major:P,minor:0},B._isTracked=!0,C.push(B)}return D.ensureFinalTabstop(I,l,!0),{edits:C,snippets:[new r(d,I,"")]}}constructor(d,s,l=u,o){this._editor=d,this._template=s,this._options=l,this._languageConfigurationService=o,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:s}=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=s,this._editor.executeEdits("snippet",d,l=>{const o=l.filter(g=>!!g.identifier);for(let g=0;g<s.length;g++)s[g].initialize(o[g].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):o.map(g=>p.Selection.fromPositions(g.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(d,s=u){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,d]);const{edits:l,snippets:o}=t.createEditsAndSnippetsFromSelections(this._editor,d,s.overwriteBefore,s.overwriteAfter,!0,s.adjustWhitespace,s.clipboardText,s.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",l,g=>{const h=g.filter(C=>!!C.identifier);for(let C=0;C<o.length;C++)o[C].initialize(h[C].textChange);const m=o[0].isTrivialSnippet;if(!m){for(const C of this._snippets)C.merge(o);console.assert(o.length===0)}return this._snippets[0].hasPlaceholder&&!m?this._move(void 0):h.map(C=>p.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 s=[];for(const l of this._snippets){const o=l.move(d);s.push(...o)}return s}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const d=this._editor.getSelections();if(d.length<this._snippets.length)return!1;const s=new Map;for(const l of this._snippets){const o=l.computePossibleSelections();if(s.size===0)for(const[g,h]of o){h.sort(S.Range.compareRangesUsingStarts);for(const m of d)if(h[0].containsRange(m)){s.set(g,[]);break}}if(s.size===0)return!1;s.forEach((g,h)=>{g.push(...o.get(h))})}d.sort(S.Range.compareRangesUsingStarts);for(const[l,o]of s){if(o.length!==d.length){s.delete(l);continue}o.sort(S.Range.compareRangesUsingStarts);for(let g=0;g<o.length;g++)if(!o[g].containsRange(d[g])){s.delete(l);continue}}return s.size>0}};e.SnippetSession=f,e.SnippetSession=f=t=ke([ge(3,_.ILanguageConfigurationService)],f)}),define(se[196],oe([1,0,2,20,16,10,21,32,18,138,713,15,64,390]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const r={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,s,l,o,g){this._editor=d,this._logService=s,this._languageFeaturesService=l,this._languageConfigurationService=g,this._snippetListener=new L.DisposableStore,this._modelVersionId=-1,this._inSnippet=t.InSnippetMode.bindTo(o),this._hasNextTabstop=t.HasNextTabstop.bindTo(o),this._hasPrevTabstop=t.HasPrevTabstop.bindTo(o)}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,s){try{this._doInsert(d,typeof s>"u"?r:{...r,...s})}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():"<no_session>")}}_doInsert(d,s){var l;if(this._editor.hasModel()){if(this._snippetListener.clear(),s.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof d!="string"&&this.cancel(),this._session?((0,k.assertType)(typeof d=="string"),this._session.merge(d,s)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new n.SnippetSession(this._editor,d,s,this._languageConfigurationService),this._session.insert()),s.undoStopAfter&&this._editor.getModel().pushStackElement(),!((l=this._session)===null||l===void 0)&&l.hasChoice){const o={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(D,I)=>{if(!this._session||D!==this._editor.getModel()||!E.Position.equals(this._editor.getPosition(),I))return;const{activeChoice:T}=this._session;if(!T||T.choice.options.length===0)return;const A=D.getValueInRange(T.range),P=!!T.choice.options.find(M=>M.value===A),N=[];for(let M=0;M<T.choice.options.length;M++){const R=T.choice.options[M];N.push({kind:13,label:R.value,insertText:R.value,sortText:"a".repeat(M+1),range:T.range,filterText:P?`${A}_${R.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,b.localize)(3,null)}})}return{suggestions:N}}},g=this._editor.getModel();let h,m=!1;const C=()=>{h?.dispose(),m=!1},w=()=>{m||(h=this._languageFeaturesService.completionProvider.register({language:g.getLanguageId(),pattern:g.uri.fsPath,scheme:g.uri.scheme,exclusive:!0},o),this._snippetListener.add(h),m=!0)};this._choiceCompletions={provider:o,enable:w,disable:C}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(o=>o.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:s}=this._session;if(!s||!this._choiceCompletions){(d=this._choiceCompletions)===null||d===void 0||d.disable(),this._currentChoice=void 0;return}this._currentChoice!==s.choice&&(this._currentChoice=s.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{(0,v.showSimpleSuggestions)(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(d=!1){var s;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(s=this._session)===null||s===void 0||s.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 a.RawContextKey("inSnippetMode",!1,(0,b.localize)(0,null)),u.HasNextTabstop=new a.RawContextKey("hasNextTabstop",!1,(0,b.localize)(1,null)),u.HasPrevTabstop=new a.RawContextKey("hasPrevTabstop",!1,(0,b.localize)(2,null)),e.SnippetController2=u=t=ke([ge(1,i.ILogService),ge(2,_.ILanguageFeaturesService),ge(3,a.IContextKeyService),ge(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:a.ContextKeyExpr.and(u.InSnippetMode,u.HasNextTabstop),handler:c=>c.next(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:2}})),(0,y.registerEditorCommand)(new f({id:"jumpToPrevSnippetPlaceholder",precondition:a.ContextKeyExpr.and(u.InSnippetMode,u.HasPrevTabstop),handler:c=>c.prev(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:1026}})),(0,y.registerEditorCommand)(new f({id:"leaveSnippet",precondition:u.InSnippetMode,handler:c=>c.cancel(!0),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new f({id:"acceptSnippet",precondition:u.InSnippetMode,handler:c=>c.finish()}))}),define(se[927],oe([1,0,60,12,2,35,20,74,10,5,31,32,217,797,156,196,25,8]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var c;(function(s){s[s.Undo=0]="Undo",s[s.Redo=1]="Redo",s[s.AcceptWord=2]="AcceptWord",s[s.Other=3]="Other"})(c||(e.VersionIdChangeReason=c={}));let d=class extends y.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(l,o,g,h,m,C,w,D,I,T,A,P){super(),this.textModel=l,this.selectedSuggestItem=o,this.cursorPosition=g,this.textModelVersionId=h,this._debounceValue=m,this._suggestPreviewEnabled=C,this._suggestPreviewMode=w,this._inlineSuggestMode=D,this._enabled=I,this._instantiationService=T,this._commandService=A,this._languageConfigurationService=P,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:(M,R)=>(M.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(M.change)?R.preserveCurrentCompletion=!0:M.didChange(this._forceUpdateSignal)&&(R.inlineCompletionTriggerKind=M.change),!0)},(M,R)=>{if(this._forceUpdateSignal.read(M),!(this._enabled.read(M)&&this.selectedSuggestItem.read(M)||this._isActive.read(M))){this._source.cancelUpdate();return}this.textModelVersionId.read(M);const O=this.selectedInlineCompletion.get(),B=R.preserveCurrentCompletion||O?.forwardStable?O:void 0,W=this._source.suggestWidgetInlineCompletions.get(),V=this.selectedSuggestItem.read(M);if(W&&!V){const q=this._source.inlineCompletions.get();(0,E.transaction)(ie=>{(!q||W.request.versionId>q.request.versionId)&&this._source.inlineCompletions.set(W.clone(),ie),this._source.clearSuggestWidgetInlineCompletions(ie)})}const K=this.cursorPosition.read(M),F={triggerKind:R.inlineCompletionTriggerKind,selectedSuggestionInfo:V?.toSelectedSuggestionInfo()};return this._source.fetch(K,F,B)}),this._filteredInlineCompletionItems=(0,E.derived)(this,M=>{const R=this._source.inlineCompletions.read(M);if(!R)return[];const x=this.cursorPosition.read(M);return R.inlineCompletions.filter(B=>B.isVisible(this.textModel,x,M))}),this.selectedInlineCompletionIndex=(0,E.derived)(this,M=>{const R=this._selectedInlineCompletionId.read(M),x=this._filteredInlineCompletionItems.read(M),O=this._selectedInlineCompletionId===void 0?-1:x.findIndex(B=>B.semanticId===R);return O===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):O}),this.selectedInlineCompletion=(0,E.derived)(this,M=>{const R=this._filteredInlineCompletionItems.read(M),x=this.selectedInlineCompletionIndex.read(M);return R[x]}),this.lastTriggerKind=this._source.inlineCompletions.map(this,M=>M?.request.context.triggerKind),this.inlineCompletionsCount=(0,E.derived)(this,M=>{if(this.lastTriggerKind.read(M)===b.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(M).length}),this.state=(0,E.derivedOpts)({owner:this,equalityComparer:(M,R)=>!M||!R?M===R:(0,i.ghostTextOrReplacementEquals)(M.ghostText,R.ghostText)&&M.inlineCompletion===R.inlineCompletion&&M.suggestItem===R.suggestItem},M=>{var R;const x=this.textModel,O=this.selectedSuggestItem.read(M);if(O){const B=O.toSingleTextEdit().removeCommonPrefix(x),W=this._computeAugmentedCompletion(B,M);if(!this._suggestPreviewEnabled.read(M)&&!W)return;const K=(R=W?.edit)!==null&&R!==void 0?R:B,F=W?W.edit.text.length-B.text.length:0,q=this._suggestPreviewMode.read(M),ie=this.cursorPosition.read(M),ae=K.computeGhostText(x,q,ie,F);return{ghostText:ae??new i.GhostText(K.range.endLineNumber,[]),inlineCompletion:W?.completion,suggestItem:O}}else{if(!this._isActive.read(M))return;const B=this.selectedInlineCompletion.read(M);if(!B)return;const W=B.toSingleTextEdit(M),V=this._inlineSuggestMode.read(M),K=this.cursorPosition.read(M),F=W.computeGhostText(x,V,K);return F?{ghostText:F,inlineCompletion:B,suggestItem:void 0}:void 0}}),this.ghostText=(0,E.derivedOpts)({owner:this,equalityComparer:i.ghostTextOrReplacementEquals},M=>{const R=this.state.read(M);if(R)return R.ghostText}),this._register((0,E.recomputeInitiallyAndOnChange)(this._fetchInlineCompletions));let N;this._register((0,E.autorun)(M=>{var R,x;const O=this.state.read(M),B=O?.inlineCompletion;if(B?.semanticId!==N?.semanticId&&(N=B,B)){const W=B.inlineCompletion,V=W.source;(x=(R=V.provider).handleItemDidShow)===null||x===void 0||x.call(R,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,o=>{this._isActive.set(!0,o),this._forceUpdateSignal.trigger(o,b.InlineCompletionTriggerKind.Explicit)}),await this._fetchInlineCompletions.get()}stop(l){(0,E.subtransaction)(l,o=>{this._isActive.set(!1,o),this._source.clear(o)})}_computeAugmentedCompletion(l,o){const g=this.textModel,h=this._source.suggestWidgetInlineCompletions.read(o),m=h?h.inlineCompletions:[this.selectedInlineCompletion.read(o)].filter(S.isDefined);return(0,L.mapFindFirst)(m,w=>{let D=w.toSingleTextEdit(o);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 o=this._filteredInlineCompletionItems.get()||[];if(o.length>0){const g=(this.selectedInlineCompletionIndex.get()+l+o.length)%o.length;this._selectedInlineCompletionId.set(o[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 o;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(),"inlineCompletionAccept"),(o=r.SnippetController2.get(l))===null||o===void 0||o.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,(o,g)=>{const h=this.textModel.getLanguageIdAtPosition(o.lineNumber,o.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 T=/\s+/g.exec(g);return T&&T.index!==void 0&&T.index+T[0].length<D&&(D=T.index+T[0].length),D})}async acceptNextLine(l){await this._acceptNext(l,(o,g)=>{const h=g.match(/\n/);return h&&h.index!==void 0?h.index+1:g.length})}async _acceptNext(l,o){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 _.Position(h.lineNumber,C.column),D=C.lines.join(`
|
||
`),I=o(w,D);if(I===D.length&&h.parts.length===1){this.accept(l);return}const T=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),T)]);const A=(0,t.lengthOfText)(T);l.setPosition((0,t.addPositions)(w,A),"inlineCompletionPartialAccept")}finally{this._isAcceptingPartially=!1}if(m.source.provider.handlePartialAccept){const A=v.Range.fromPositions(m.range.getStartPosition(),(0,t.addPositions)(w,(0,t.lengthOfText)(T))),P=l.getModel().getValueInRange(A,1);m.source.provider.handlePartialAccept(m.source.inlineCompletions,m.sourceInlineCompletion,P.length)}}finally{m.source.removeRef()}}handleSuggestAccepted(l){var o,g;const h=l.toSingleTextEdit().removeCommonPrefix(this.textModel),m=this._computeAugmentedCompletion(h,void 0);if(!m)return;const C=m.completion.inlineCompletion;(g=(o=C.source.provider).handlePartialAccept)===null||g===void 0||g.call(o,C.source.inlineCompletions,C.sourceInlineCompletion,h.text.length)}};e.InlineCompletionsModel=d,e.InlineCompletionsModel=d=ke([ge(9,f.IInstantiationService),ge(10,u.ICommandService),ge(11,a.ILanguageConfigurationService)],d)}),define(se[391],oe([1,0,14,19,12,6,2,11,24,121,312,103,27,15,64,81,311,138,18,71,20,240,196,243]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class m{static shouldAutoTrigger(T){if(!T.hasModel())return!1;const A=T.getModel(),P=T.getPosition();A.tokenization.tokenizeIfCheap(P.lineNumber);const N=A.getWordAtPosition(P);return!(!N||N.endColumn!==P.column&&N.startColumn+1!==P.column||!isNaN(Number(N.word)))}constructor(T,A,P){this.leadingLineContent=T.getLineContent(A.lineNumber).substr(0,A.column-1),this.leadingWord=T.getWordUntilPosition(A),this.lineNumber=A.lineNumber,this.column=A.column,this.triggerOptions=P}}e.LineContext=m;function C(I,T,A){if(!T.getContextKeyValue(l.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const P=T.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return P!==void 0?!P:!I.getOption(62).suppressSuggestions}function w(I,T,A){if(!T.getContextKeyValue("inlineSuggestionVisible"))return!0;const P=T.getContextKeyValue(l.InlineCompletionContextKeys.suppressSuggestions.key);return P!==void 0?!P:!I.getOption(62).suppressSuggestions}let D=h=class{constructor(T,A,P,N,M,R,x,O,B){this._editor=T,this._editorWorkerService=A,this._clipboardService=P,this._telemetryService=N,this._logService=M,this._contextKeyService=R,this._configurationService=x,this._languageFeaturesService=O,this._envService=B,this._toDispose=new S.DisposableStore,this._triggerCharacterListener=new S.DisposableStore,this._triggerQuickSuggest=new L.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new S.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 _.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,S.dispose)(this._triggerCharacterListener),(0,S.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 T=new Map;for(const P of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const N of P.triggerCharacters||[]){let M=T.get(N);M||(M=new Set,M.add((0,f.getSnippetSuggestSupport)()),T.set(N,M)),M.add(P)}const A=P=>{var N;if(!w(this._editor,this._contextKeyService,this._configurationService)||m.shouldAutoTrigger(this._editor))return;if(!P){const x=this._editor.getPosition();P=this._editor.getModel().getLineContent(x.lineNumber).substr(0,x.column-1)}let M="";(0,p.isLowSurrogate)(P.charCodeAt(P.length-1))?(0,p.isHighSurrogate)(P.charCodeAt(P.length-2))&&(M=P.substr(P.length-2)):M=P.charAt(P.length-1);const R=T.get(M);if(R){const x=new Map;if(this._completionModel)for(const[O,B]of this._completionModel.getItemsByProvider())R.has(O)||x.set(O,B);this.trigger({auto:!0,triggerKind:1,triggerCharacter:M,retrigger:!!this._completionModel,clipboardText:(N=this._completionModel)===null||N===void 0?void 0:N.clipboardText,completionOptions:{providerFilter:R,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(T=!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:T}))}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(T){if(!this._editor.hasModel())return;const A=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!T.selection.isEmpty()||T.reason!==0&&T.reason!==3||T.source!=="keyboard"&&T.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&T.reason===0?(A.containsRange(this._currentSelection)||A.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&T.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var T;f.QuickSuggestionsOptions.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((T=o.SnippetController2.get(this._editor))===null||T===void 0)&&T.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(),P=this._editor.getPosition(),N=this._editor.getOption(88);if(!f.QuickSuggestionsOptions.isAllOff(N)){if(!f.QuickSuggestionsOptions.isAllOn(N)){A.tokenization.tokenizeIfCheap(P.lineNumber);const M=A.tokenization.getLineTokens(P.lineNumber),R=M.getStandardTokenType(M.findTokenIndexAtOffset(Math.max(P.column-1-1,0)));if(f.QuickSuggestionsOptions.valueFor(N,R)!=="on")return}C(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(A)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){(0,s.assertType)(this._editor.hasModel()),(0,s.assertType)(this._triggerState!==void 0);const T=this._editor.getModel(),A=this._editor.getPosition(),P=new m(T,A,{...this._triggerState,refilter:!0});this._onNewContext(P)}trigger(T){var A,P,N,M,R,x;if(!this._editor.hasModel())return;const O=this._editor.getModel(),B=new m(O,this._editor.getPosition(),T);this.cancel(T.retrigger),this._triggerState=T,this._onDidTrigger.fire({auto:T.auto,shy:(A=T.shy)!==null&&A!==void 0?A:!1,position:this._editor.getPosition()}),this._context=B;let W={triggerKind:(P=T.triggerKind)!==null&&P!==void 0?P:0};T.triggerCharacter&&(W={triggerKind:1,triggerCharacter:T.triggerCharacter}),this._requestToken=new k.CancellationTokenSource;const V=this._editor.getOption(111);let K=1;switch(V){case"top":K=0;break;case"bottom":K=2;break}const{itemKind:F,showDeprecated:q}=h.createSuggestFilter(this._editor),ie=new f.CompletionOptions(K,(M=(N=T.completionOptions)===null||N===void 0?void 0:N.kindFilter)!==null&&M!==void 0?M:F,(R=T.completionOptions)===null||R===void 0?void 0:R.providerFilter,(x=T.completionOptions)===null||x===void 0?void 0:x.providerItemsToReuse,q),ae=b.WordDistance.create(this._editorWorkerService,this._editor),ne=(0,f.provideSuggestionItems)(this._languageFeaturesService.completionProvider,O,this._editor.getPosition(),ie,W,this._requestToken.token);Promise.all([ne,ae]).then(async([$,J])=>{var Q;if((Q=this._requestToken)===null||Q===void 0||Q.dispose(),!this._editor.hasModel())return;let re=T?.clipboardText;if(!re&&$.needsClipboard&&(re=await this._clipboardService.readText()),this._triggerState===void 0)return;const de=this._editor.getModel(),he=new m(de,this._editor.getPosition(),T),me={...d.FuzzyScoreOptions.default,firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly};if(this._completionModel=new u.CompletionModel($.items,this._context.column,{leadingLineContent:he.leadingLineContent,characterCountDelta:he.column-this._context.column},J,this._editor.getOption(117),this._editor.getOption(111),me,re),this._completionDisposables.add($.disposable),this._onNewContext(he),this._reportDurationsTelemetry($.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const X of $.items)X.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${X.provider._debugDisplayName}`,X.completion)}).catch(y.onUnexpectedError)}_reportDurationsTelemetry(T){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(T)}),this._logService.debug("suggest.durations.json",T)})}static createSuggestFilter(T){const A=new Set;T.getOption(111)==="none"&&A.add(27);const N=T.getOption(117);return N.showMethods||A.add(0),N.showFunctions||A.add(1),N.showConstructors||A.add(2),N.showFields||A.add(3),N.showVariables||A.add(4),N.showClasses||A.add(5),N.showStructs||A.add(6),N.showInterfaces||A.add(7),N.showModules||A.add(8),N.showProperties||A.add(9),N.showEvents||A.add(10),N.showOperators||A.add(11),N.showUnits||A.add(12),N.showValues||A.add(13),N.showConstants||A.add(14),N.showEnums||A.add(15),N.showEnumMembers||A.add(16),N.showKeywords||A.add(17),N.showWords||A.add(18),N.showColors||A.add(19),N.showFiles||A.add(20),N.showReferences||A.add(21),N.showColors||A.add(22),N.showFolders||A.add(23),N.showTypeParameters||A.add(24),N.showSnippets||A.add(27),N.showUsers||A.add(25),N.showIssues||A.add(26),{itemKind:A,showDeprecated:N.showDeprecated}}_onNewContext(T){if(this._context){if(T.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,p.getLeadingWhitespace)(T.leadingLineContent)!==(0,p.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(T.column<this._context.column){T.leadingWord.word?this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0}):this.cancel();return}if(this._completionModel){if(T.leadingWord.word.length!==0&&T.leadingWord.startColumn>this._context.leadingWord.startColumn){if(m.shouldAutoTrigger(this._editor)&&this._context){const P=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:P}})}return}if(T.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&T.leadingWord.word.length!==0){const A=new Map,P=new Set;for(const[N,M]of this._completionModel.getItemsByProvider())M.length>0&&M[0].container.incomplete?P.add(N):A.set(N,M);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:P,providerItemsToReuse:A}})}else{const A=this._completionModel.lineContext;let P=!1;if(this._completionModel.lineContext={leadingLineContent:T.leadingLineContent,characterCountDelta:T.column-this._context.column},this._completionModel.items.length===0){const N=m.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(N&&this._context.leadingWord.endColumn<T.leadingWord.startColumn){this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0});return}if(this._context.triggerOptions.auto){this.cancel();return}else if(this._completionModel.lineContext=A,P=this._completionModel.items.length>0,P&&T.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:T.triggerOptions,isFrozen:P})}}}}};e.SuggestModel=D,e.SuggestModel=D=h=ke([ge(1,v.IEditorWorkerService),ge(2,a.IClipboardService),ge(3,r.ITelemetryService),ge(4,t.ILogService),ge(5,n.IContextKeyService),ge(6,i.IConfigurationService),ge(7,c.ILanguageFeaturesService),ge(8,g.IEnvironmentService)],D)}),define(se[392],oe([1,0,48,13,19,12,6,125,2,17,61,20,127,16,74,10,5,21,196,117,358,770,717,25,15,8,64,138,769,563,391,564,909,81,49,111,7,38]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P,N,M,R,x,O){"use strict";var B;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const W=!1;class V{constructor($,J){if(this._model=$,this._position=J,this._decorationOptions=O.ModelDecorationOptions.register({description:"suggest-line-suffix",stickiness:1}),$.getLineMaxColumn(J.lineNumber)!==J.column){const re=$.getOffsetAt(J),de=$.getPositionAt(re+1);$.changeDecorations(he=>{this._marker&&he.removeDecoration(this._marker),this._marker=he.addDecoration(u.Range.fromPositions(J,de),this._decorationOptions)})}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.changeDecorations($=>{$.removeDecoration(this._marker),this._marker=void 0})}delta($){if(this._model.isDisposed()||this._position.lineNumber!==$.lineNumber)return 0;if(this._marker){const J=this._model.getDecorationRange(this._marker);return this._model.getOffsetAt(J.getStartPosition())-this._model.getOffsetAt($)}else return this._model.getLineMaxColumn($.lineNumber)-$.column}}let K=B=class{static get($){return $.getContribution(B.ID)}constructor($,J,Q,re,de,he,me){this._memoryService=J,this._commandService=Q,this._contextKeyService=re,this._instantiationService=de,this._logService=he,this._telemetryService=me,this._lineSuffix=new _.MutableDisposable,this._toDispose=new _.DisposableStore,this._selectors=new F(z=>z.priority),this._onWillInsertSuggestItem=new S.Emitter,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=$,this.model=de.createInstance(T.SuggestModel,this.editor),this._selectors.register({priority:0,select:(z,H,Y)=>this._memoryService.select(z,H,Y)});const X=w.Context.InsertMode.bindTo(re);X.set($.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>X.set($.getOption(117).insertMode))),this.widget=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)($.getDomNode()),()=>{const z=this._instantiationService.createInstance(P.SuggestWidget,this.editor);this._toDispose.add(z),this._toDispose.add(z.onDidSelect(ee=>this._insertSuggestion(ee,0),this));const H=new I.CommitCharacterController(this.editor,z,this.model,ee=>this._insertSuggestion(ee,2));this._toDispose.add(H);const Y=w.Context.MakesTextEdit.bindTo(this._contextKeyService),j=w.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),Z=w.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,_.toDisposable)(()=>{Y.reset(),j.reset(),Z.reset()})),this._toDispose.add(z.onDidFocus(({item:ee})=>{const le=this.editor.getPosition(),ue=ee.editStart.column,ce=le.column;let pe=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!ee.completion.additionalTextEdits&&!(ee.completion.insertTextRules&4)&&ce-ue===ee.completion.insertText.length&&(pe=this.editor.getModel().getValueInRange({startLineNumber:le.lineNumber,startColumn:ue,endLineNumber:le.lineNumber,endColumn:ce})!==ee.completion.insertText),Y.set(pe),j.set(!r.Position.equals(ee.editInsertEnd,ee.editReplaceEnd)),Z.set(!!ee.provider.resolveCompletionItem||!!ee.completion.documentation||ee.completion.detail!==ee.completion.label)})),this._toDispose.add(z.onDetailsKeyDown(ee=>{if(ee.toKeyCodeChord().equals(new p.KeyCodeChord(!0,!1,!1,!1,33))||v.isMacintosh&&ee.toKeyCodeChord().equals(new p.KeyCodeChord(!1,!1,!1,!0,33))){ee.stopPropagation();return}ee.toKeyCodeChord().isModifierKey()||this.editor.focus()})),z})),this._overtypingCapturer=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)($.getDomNode()),()=>this._toDispose.add(new A.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new x.WindowIdleValue((0,x.getWindow)($.getDomNode()),()=>this._toDispose.add(new D.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(de.createInstance(l.WordContextKey,$)),this._toDispose.add(this.model.onDidTrigger(z=>{this.widget.value.showTriggered(z.auto,z.shy?250:50),this._lineSuffix.value=new V(this.editor.getModel(),z.position)})),this._toDispose.add(this.model.onDidSuggest(z=>{if(z.triggerOptions.shy)return;let H=-1;for(const j of this._selectors.itemsOrderedByPriorityDesc)if(H=j.select(this.editor.getModel(),this.editor.getPosition(),z.completionModel.items),H!==-1)break;if(H===-1&&(H=0),this.model.state===0)return;let Y=!1;if(z.triggerOptions.auto){const j=this.editor.getOption(117);j.selectionMode==="never"||j.selectionMode==="always"?Y=j.selectionMode==="never":j.selectionMode==="whenTriggerCharacter"?Y=z.triggerOptions.triggerKind!==1:j.selectionMode==="whenQuickSuggestion"&&(Y=z.triggerOptions.triggerKind===1&&!z.triggerOptions.refilter)}this.widget.value.showSuggestions(z.completionModel,H,z.isFrozen,z.triggerOptions.auto,Y)})),this._toDispose.add(this.model.onDidCancel(z=>{z.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{W||(this.model.cancel(),this.model.clear())}));const U=w.Context.AcceptSuggestionsOnEnter.bindTo(re),G=()=>{const z=this.editor.getOption(1);U.set(z==="on"||z==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>G())),G()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion($,J){if(!$||!$.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const Q=c.SnippetController2.get(this.editor);if(!Q)return;this._onWillInsertSuggestItem.fire({item:$.item});const re=this.editor.getModel(),de=re.getAlternativeVersionId(),{item:he}=$,me=[],X=new y.CancellationTokenSource;J&1||this.editor.pushUndoStop();const U=this.getOverwriteInfo(he,!!(J&8));this._memoryService.memorize(re,this.editor.getPosition(),he);const G=he.isResolved;let z=-1,H=-1;if(Array.isArray(he.completion.additionalTextEdits)){this.model.cancel();const j=i.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",he.completion.additionalTextEdits.map(Z=>{let ee=u.Range.lift(Z.range);if(ee.startLineNumber===he.position.lineNumber&&ee.startColumn>he.position.column){const le=this.editor.getPosition().column-he.position.column,ue=le,ce=u.Range.spansMultipleLines(ee)?0:le;ee=new u.Range(ee.startLineNumber,ee.startColumn+ue,ee.endLineNumber,ee.endColumn+ce)}return t.EditOperation.replaceMove(ee,Z.text)})),j.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!G){const j=new b.StopWatch;let Z;const ee=re.onDidChangeContent(pe=>{if(pe.isFlush){X.cancel(),ee.dispose();return}for(const ve of pe.changes){const Ce=u.Range.getEndPosition(ve.range);(!Z||r.Position.isBefore(Ce,Z))&&(Z=Ce)}}),le=J;J|=2;let ue=!1;const ce=this.editor.onWillType(()=>{ce.dispose(),ue=!0,le&2||this.editor.pushUndoStop()});me.push(he.resolve(X.token).then(()=>{if(!he.completion.additionalTextEdits||X.token.isCancellationRequested)return;if(Z&&he.completion.additionalTextEdits.some(ve=>r.Position.isBefore(Z,u.Range.getStartPosition(ve.range))))return!1;ue&&this.editor.pushUndoStop();const pe=i.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",he.completion.additionalTextEdits.map(ve=>t.EditOperation.replaceMove(u.Range.lift(ve.range),ve.text))),pe.restoreRelativeVerticalPositionOfCursor(this.editor),(ue||!(le&2))&&this.editor.pushUndoStop(),!0}).then(pe=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",j.elapsed(),pe),H=pe===!0?1:pe===!1?0:-2}).finally(()=>{ee.dispose(),ce.dispose()}))}let{insertText:Y}=he.completion;if(he.completion.insertTextRules&4||(Y=d.SnippetParser.escape(Y)),this.model.cancel(),Q.insert(Y,{overwriteBefore:U.overwriteBefore,overwriteAfter:U.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(he.completion.insertTextRules&1),clipboardText:$.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),J&2||this.editor.pushUndoStop(),he.completion.command)if(he.completion.command.id===q.id)this.model.trigger({auto:!0,retrigger:!0});else{const j=new b.StopWatch;me.push(this._commandService.executeCommand(he.completion.command.id,...he.completion.command.arguments?[...he.completion.command.arguments]:[]).catch(Z=>{he.completion.extensionId?(0,E.onUnexpectedExternalError)(Z):(0,E.onUnexpectedError)(Z)}).finally(()=>{z=j.elapsed()}))}J&4&&this._alternatives.value.set($,j=>{for(X.cancel();re.canUndo();){de!==re.getAlternativeVersionId()&&re.undo(),this._insertSuggestion(j,3|(J&8?8:0));break}}),this._alertCompletionItem(he),Promise.all(me).finally(()=>{this._reportSuggestionAcceptedTelemetry(he,re,G,z,H),this.model.clear(),X.dispose()})}_reportSuggestionAcceptedTelemetry($,J,Q,re,de){var he,me,X;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(me=(he=$.extensionId)===null||he===void 0?void 0:he.value)!==null&&me!==void 0?me:"unknown",providerId:(X=$.provider._debugDisplayName)!==null&&X!==void 0?X:"unknown",kind:$.completion.kind,basenameHash:(0,R.hash)((0,M.basename)(J.uri)).toString(16),languageId:J.getLanguageId(),fileExtension:(0,M.extname)(J.uri),resolveInfo:$.provider.resolveCompletionItem?Q?1:0:-1,resolveDuration:$.resolveDuration,commandDuration:re,additionalEditsAsync:de})}getOverwriteInfo($,J){(0,a.assertType)(this.editor.hasModel());let Q=this.editor.getOption(117).insertMode==="replace";J&&(Q=!Q);const re=$.position.column-$.editStart.column,de=(Q?$.editReplaceEnd.column:$.editInsertEnd.column)-$.position.column,he=this.editor.getPosition().column-$.position.column,me=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:re+he,overwriteAfter:de+me}}_alertCompletionItem($){if((0,k.isNonEmptyArray)($.completion.additionalTextEdits)){const J=o.localize(0,null,$.textLabel,$.completion.additionalTextEdits.length);(0,L.alert)(J)}}triggerSuggest($,J,Q){this.editor.hasModel()&&(this.model.trigger({auto:J??!1,completionOptions:{providerFilter:$,kindFilter:Q?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest($){if(!this.editor.hasModel())return;const J=this.editor.getPosition(),Q=()=>{J.equals(this.editor.getPosition())&&this._commandService.executeCommand($.fallback)},re=de=>{if(de.completion.insertTextRules&4||de.completion.additionalTextEdits)return!0;const he=this.editor.getPosition(),me=de.editStart.column,X=he.column;return X-me!==de.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:he.lineNumber,startColumn:me,endLineNumber:he.lineNumber,endColumn:X})!==de.completion.insertText};S.Event.once(this.model.onDidTrigger)(de=>{const he=[];S.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,_.dispose)(he),Q()},void 0,he),this.model.onDidSuggest(({completionModel:me})=>{if((0,_.dispose)(he),me.items.length===0){Q();return}const X=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),me.items),U=me.items[X];if(!re(U)){Q();return}this.editor.pushUndoStop(),this._insertSuggestion({index:X,item:U,model:me},7)},void 0,he)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(J,0),this.editor.focus()}acceptSelectedSuggestion($,J){const Q=this.widget.value.getFocusedItem();let re=0;$&&(re|=4),J&&(re|=8),this._insertSuggestion(Q,re)}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($){return this._selectors.register($)}};e.SuggestController=K,K.ID="editor.contrib.suggestController",e.SuggestController=K=B=ke([ge(1,s.ISuggestMemoryService),ge(2,g.ICommandService),ge(3,h.IContextKeyService),ge(4,m.IInstantiationService),ge(5,C.ILogService),ge(6,N.ITelemetryService)],K);class F{constructor($){this.prioritySelector=$,this._items=new Array}register($){if(this._items.indexOf($)!==-1)throw new Error("Value is already registered");return this._items.push($),this._items.sort((J,Q)=>this.prioritySelector(Q)-this.prioritySelector(J)),{dispose:()=>{const J=this._items.indexOf($);J>=0&&this._items.splice(J,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class q extends n.EditorAction{constructor(){super({id:q.id,label:o.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($,J,Q){const re=K.get(J);if(!re)return;let de;Q&&typeof Q=="object"&&Q.auto===!0&&(de=!0),re.triggerSuggest(void 0,de,void 0)}}e.TriggerSuggestAction=q,q.id="editor.action.triggerSuggest",(0,n.registerEditorContribution)(K.ID,K,2),(0,n.registerEditorAction)(q);const ie=100+90,ae=n.EditorCommand.bindToContribution(K.get);(0,n.registerEditorCommand)(new ae({id:"acceptSelectedSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion),handler(ne){ne.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus),weight:ie},{primary:3,kbExpr:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus,w.Context.AcceptSuggestionsOnEnter,w.Context.MakesTextEdit),weight:ie}],menuOpts:[{menuId:w.suggestWidgetStatusbarMenu,title:o.localize(2,null),group:"left",order:1,when:w.Context.HasInsertAndReplaceRange.toNegated()},{menuId:w.suggestWidgetStatusbarMenu,title:o.localize(3,null),group:"left",order:1,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("insert"))},{menuId:w.suggestWidgetStatusbarMenu,title:o.localize(4,null),group:"left",order:1,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("replace"))}]})),(0,n.registerEditorCommand)(new ae({id:"acceptAlternativeSelectedSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,f.EditorContextKeys.textInputFocus,w.Context.HasFocusedSuggestion),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(ne){ne.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:w.suggestWidgetStatusbarMenu,group:"left",order:2,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("insert")),title:o.localize(5,null)},{menuId:w.suggestWidgetStatusbarMenu,group:"left",order:2,when:h.ContextKeyExpr.and(w.Context.HasInsertAndReplaceRange,w.Context.InsertMode.isEqualTo("replace")),title:o.localize(6,null)}]})),g.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,n.registerEditorCommand)(new ae({id:"hideSuggestWidget",precondition:w.Context.Visible,handler:ne=>ne.cancelSuggestWidget(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,n.registerEditorCommand)(new ae({id:"selectNextSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectNextSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,n.registerEditorCommand)(new ae({id:"selectNextPageSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectNextPageSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,n.registerEditorCommand)(new ae({id:"selectLastSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectLastSuggestion()})),(0,n.registerEditorCommand)(new ae({id:"selectPrevSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectPrevSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,n.registerEditorCommand)(new ae({id:"selectPrevPageSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectPrevPageSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,n.registerEditorCommand)(new ae({id:"selectFirstSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,h.ContextKeyExpr.or(w.Context.MultipleSuggestions,w.Context.HasFocusedSuggestion.negate())),handler:ne=>ne.selectFirstSuggestion()})),(0,n.registerEditorCommand)(new ae({id:"focusSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion.negate()),handler:ne=>ne.focusSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,n.registerEditorCommand)(new ae({id:"focusAndAcceptSuggestion",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion.negate()),handler:ne=>{ne.focusSuggestion(),ne.acceptSelectedSuggestion(!0,!1)}})),(0,n.registerEditorCommand)(new ae({id:"toggleSuggestionDetails",precondition:h.ContextKeyExpr.and(w.Context.Visible,w.Context.HasFocusedSuggestion),handler:ne=>ne.toggleSuggestionDetails(),kbOpts:{weight:ie,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:o.localize(7,null)},{menuId:w.suggestWidgetStatusbarMenu,group:"right",order:1,when:h.ContextKeyExpr.and(w.Context.DetailsVisible.toNegated(),w.Context.CanResolve),title:o.localize(8,null)}]})),(0,n.registerEditorCommand)(new ae({id:"toggleExplainMode",precondition:w.Context.Visible,handler:ne=>ne.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,n.registerEditorCommand)(new ae({id:"toggleSuggestionFocus",precondition:w.Context.Visible,handler:ne=>ne.toggleSuggestionFocus(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,n.registerEditorCommand)(new ae({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:(ne,$)=>{ne.triggerSuggestAndAcceptBest((0,a.isObject)($)?{fallback:"tab",...$}:{fallback:"tab"})},kbOpts:{weight:ie,primary:2}})),(0,n.registerEditorCommand)(new ae({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:ne=>ne.acceptNextSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:2}})),(0,n.registerEditorCommand)(new ae({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:ne=>ne.acceptPrevSuggestion(),kbOpts:{weight:ie,kbExpr:f.EditorContextKeys.textInputFocus,primary:1026}})),(0,n.registerEditorAction)(class extends n.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:o.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(ne,$){var J;(J=K.get($))===null||J===void 0||J.resetWidgetSize()}})}),define(se[928],oe([1,0,6,2,10,5,31,117,390,392,35,307,13,60]),function(te,e,L,k,y,E,S,p,_,v,b,a,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,s,l){super(),this.editor=c,this.suggestControllerPreselector=d,this.checkModelVersion=s,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 o=v.SuggestController.get(this.editor);if(o){this._register(o.registerSelector({priority:100,select:(m,C,w)=>{var D;(0,b.transaction)(M=>this.checkModelVersion(M));const I=this.editor.getModel();if(!I)return-1;const T=(D=this.suggestControllerPreselector())===null||D===void 0?void 0:D.removeCommonPrefix(I);if(!T)return-1;const A=y.Position.lift(C),P=w.map((M,R)=>{const O=r.fromSuggestion(o,I,A,M,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(I),B=T.augments(O);return{index:R,valid:B,prefixLength:O.text.length,suggestItem:M}}).filter(M=>M&&M.valid&&M.prefixLength>0),N=(0,n.findFirstMaxBy)(P,(0,i.compareBy)(M=>M.prefixLength,i.numberComparator));return N?N.index:-1}}));let g=!1;const h=()=>{g||(g=!0,this._register(o.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(o.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(o.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(L.Event.once(o.model.onDidTrigger)(m=>{h()})),this._register(o.onWillInsertSuggestItem(m=>{const C=this.editor.getPosition(),w=this.editor.getModel();if(!C||!w)return;const D=r.fromSuggestion(o,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)(s=>{this.checkModelVersion(s),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,s)}))}getSuggestItemInfo(){const c=v.SuggestController.get(this.editor);if(!c||!this.isSuggestWidgetVisible)return;const d=c.widget.value.getFocusedItem(),s=this.editor.getPosition(),l=this.editor.getModel();if(!(!d||!s||!l))return r.fromSuggestion(c,l,s,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 r{static fromSuggestion(c,d,s,l,o){let{insertText:g}=l.completion,h=!1;if(l.completion.insertTextRules&4){const C=new p.SnippetParser().parse(g);C.children.length<100&&_.SnippetSession.adjustWhitespace(d,s,!0,C),g=C.toString(),h=!0}const m=c.getOverwriteInfo(l,o);return new r(E.Range.fromPositions(s.delta(0,-m.overwriteBefore),s.delta(0,Math.max(m.overwriteAfter,0))),g,l.completion.kind,h)}constructor(c,d,s,l){this.range=c,this.insertText=d,this.completionItemKind=s,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 S.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new a.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=r;function u(f,c){return f===c?!0:!f||!c?!1:f.equals(c)}}),define(se[264],oe([1,0,7,48,2,35,191,10,79,18,216,765,240,257,927,928,696,122,25,27,15,8,34]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let h=g=class extends y.Disposable{static get(C){return C.getContribution(g.ID)}constructor(C,w,D,I,T,A,P,N,M){super(),this.editor=C,this._instantiationService=w,this._contextKeyService=D,this._configurationService=I,this._commandService=T,this._debounceService=A,this._languageFeaturesService=P,this._audioCueService=N,this._keybindingService=M,this.model=(0,E.disposableObservableValue)("inlineCompletionModel",void 0),this._textModelVersionId=(0,E.observableValue)(this,-1),this._cursorPosition=(0,E.observableValue)(this,new p.Position(1,1)),this._suggestWidgetAdaptor=this._register(new r.SuggestWidgetAdaptor(this.editor,()=>{var B,W;return(W=(B=this.model.get())===null||B===void 0?void 0:B.selectedInlineCompletion.get())===null||W===void 0?void 0:W.toSingleTextEdit(void 0)},B=>this.updateObservables(B,t.VersionIdChangeReason.Other),B=>{(0,E.transaction)(W=>{var V;this.updateObservables(W,t.VersionIdChangeReason.Other),(V=this.model.get())===null||V===void 0||V.handleSuggestAccepted(B)})})),this._enabled=(0,E.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this._fontFamily=(0,E.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).fontFamily),this._ghostTextWidget=this._register(this._instantiationService.createInstance(a.GhostTextWidget,this.editor,{ghostText:this.model.map((B,W)=>B?.ghostText.read(W)),minReservedLineCount:(0,E.constObservable)(0),targetTextModel:this.model.map(B=>B?.textModel)})),this._debounceValue=this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._playAudioCueSignal=(0,E.observableSignal)(this),this._isReadonly=(0,E.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(90)),this._textModel=(0,E.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this._textModelIfWritable=(0,E.derived)(B=>this._isReadonly.read(B)?void 0:this._textModel.read(B)),this._register(new i.InlineCompletionContextKeys(this._contextKeyService,this.model)),this._register((0,E.autorun)(B=>{const W=this._textModelIfWritable.read(B);(0,E.transaction)(V=>{if(this.model.set(void 0,V),this.updateObservables(V,t.VersionIdChangeReason.Other),W){const K=w.createInstance(t.InlineCompletionsModel,W,this._suggestWidgetAdaptor.selectedItem,this._cursorPosition,this._textModelVersionId,this._debounceValue,(0,E.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(117).preview),(0,E.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(117).previewMode),(0,E.observableFromEvent)(C.onDidChangeConfiguration,()=>C.getOption(62).mode),this._enabled);this.model.set(K,V)}})}));const R=this._register((0,L.createStyleSheet2)());this._register((0,E.autorun)(B=>{const W=this._fontFamily.read(B);R.setStyle(W===""||W==="default"?"":`
|
||
.monaco-editor .ghost-text-decoration,
|
||
.monaco-editor .ghost-text-decoration-preview,
|
||
.monaco-editor .ghost-text {
|
||
font-family: ${W};
|
||
}`)}));const x=B=>{var W;return B.isUndoing?t.VersionIdChangeReason.Undo:B.isRedoing?t.VersionIdChangeReason.Redo:!((W=this.model.get())===null||W===void 0)&&W.isAcceptingPartially?t.VersionIdChangeReason.AcceptWord:t.VersionIdChangeReason.Other};this._register(C.onDidChangeModelContent(B=>(0,E.transaction)(W=>this.updateObservables(W,x(B))))),this._register(C.onDidChangeCursorPosition(B=>(0,E.transaction)(W=>{var V;this.updateObservables(W,t.VersionIdChangeReason.Other),(B.reason===3||B.source==="api")&&((V=this.model.get())===null||V===void 0||V.stop(W))}))),this._register(C.onDidType(()=>(0,E.transaction)(B=>{var W;this.updateObservables(B,t.VersionIdChangeReason.Other),this._enabled.get()&&((W=this.model.get())===null||W===void 0||W.trigger(B))}))),this._register(this._commandService.onDidExecuteCommand(B=>{new Set([S.CoreEditingCommands.Tab.id,S.CoreEditingCommands.DeleteLeft.id,S.CoreEditingCommands.DeleteRight.id,b.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(B.commandId)&&C.hasTextFocus()&&this._enabled.get()&&(0,E.transaction)(V=>{var K;(K=this.model.get())===null||K===void 0||K.trigger(V)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this._contextKeyService.getContextKeyValue("accessibleViewIsShown")||this._configurationService.getValue("editor.inlineSuggest.keepOnBlur")||C.getOption(62).keepOnBlur||n.InlineSuggestionHintsContentWidget.dropDownVisible||(0,E.transaction)(B=>{var W;(W=this.model.get())===null||W===void 0||W.stop(B)})})),this._register((0,E.autorun)(B=>{var W;const V=(W=this.model.read(B))===null||W===void 0?void 0:W.state.read(B);V?.suggestItem?V.ghostText.lineCount>=2&&this._suggestWidgetAdaptor.forceRenderingAbove():this._suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,y.toDisposable)(()=>{this._suggestWidgetAdaptor.stopForceRenderingAbove()}));let O;this._register((0,E.autorunHandleChanges)({handleChange:(B,W)=>(B.didChange(this._playAudioCueSignal)&&(O=void 0),!0)},async B=>{this._playAudioCueSignal.read(B);const W=this.model.read(B),V=W?.state.read(B);if(!W||!V||!V.inlineCompletion){O=void 0;return}if(V.inlineCompletion.semanticId!==O){O=V.inlineCompletion.semanticId;const K=W.textModel.getLineContent(V.ghostText.lineNumber);this._audioCueService.playAudioCue(f.AudioCue.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(V.ghostText.renderForScreenReader(K))})}})),this._register(new n.InlineCompletionsHintsWidget(this.editor,this.model,this._instantiationService)),this._register(this._configurationService.onDidChangeConfiguration(B=>{B.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(C){this._playAudioCueSignal.trigger(C)}provideScreenReaderUpdate(C){const w=this._contextKeyService.getContextKeyValue("accessibleViewIsShown"),D=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let I;!w&&D&&this.editor.getOption(147)&&(I=(0,u.localize)(0,null,D.getAriaLabel())),I?(0,k.alert)(C+", "+I):(0,k.alert)(C)}updateObservables(C,w){var D,I;const T=this.editor.getModel();this._textModelVersionId.set((D=T?.getVersionId())!==null&&D!==void 0?D:-1,C,w),this._cursorPosition.set((I=this.editor.getPosition())!==null&&I!==void 0?I:new p.Position(1,1),C)}shouldShowHoverAt(C){var w;const D=(w=this.model.get())===null||w===void 0?void 0:w.ghostText.get();return D?D.parts.some(I=>C.containsPosition(new p.Position(D.lineNumber,I.column))):!1}shouldShowHoverAtViewZone(C){return this._ghostTextWidget.ownsViewZone(C)}};e.InlineCompletionsController=h,h.ID="editor.contrib.inlineCompletionsController",e.InlineCompletionsController=h=g=ke([ge(1,l.IInstantiationService),ge(2,s.IContextKeyService),ge(3,d.IConfigurationService),ge(4,c.ICommandService),ge(5,_.ILanguageFeatureDebounceService),ge(6,v.ILanguageFeaturesService),ge(7,f.IAudioCueService),ge(8,o.IKeybindingService)],h)}),define(se[929],oe([1,0,35,110,16,21,216,240,264,138,693,30,27,15]),function(te,e,L,k,y,E,S,p,_,v,b,a,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=_.InlineCompletionsController.get(h);(m=C?.model.get())===null||m===void 0||m.next()}}e.ShowNextInlineSuggestionAction=t,t.ID=S.showNextInlineSuggestionActionId;class r extends y.EditorAction{constructor(){super({id:r.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=_.InlineCompletionsController.get(h);(m=C?.model.get())===null||m===void 0||m.previous()}}e.ShowPreviousInlineSuggestionAction=r,r.ID=S.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=_.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:a.MenuId.InlineSuggestionToolbar,title:b.localize(4,null),group:"primary",order:2}]})}async run(g,h){var m;const C=_.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:a.MenuId.InlineSuggestionToolbar,title:b.localize(6,null),group:"secondary",order:2}]})}async run(g,h){var m;const C=_.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:S.inlineSuggestCommitId,label:b.localize(7,null),alias:"Accept Inline Suggestion",precondition:p.InlineCompletionContextKeys.inlineSuggestionVisible,menuOpts:[{menuId:a.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=_.InlineCompletionsController.get(h);C&&((m=C.model.get())===null||m===void 0||m.accept(C.editor),C.editor.focus())}}e.AcceptInlineCompletion=d;class s extends y.EditorAction{constructor(){super({id:s.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=_.InlineCompletionsController.get(h);(0,L.transaction)(C=>{var w;(w=m?.model.get())===null||w===void 0||w.stop(C)})}}e.HideInlineCompletion=s,s.ID="editor.action.inlineSuggest.hide";class l extends a.Action2{constructor(){super({id:l.ID,title:b.localize(10,null),f1:!1,precondition:void 0,menu:[{id:a.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(se[930],oe([1,0,7,58,2,35,5,43,101,264,257,104,694,69,8,57,81]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class f{constructor(s,l,o){this.owner=s,this.range=l,this.controller=o}isValidForHoverAnchor(s){return s.type===1&&this.range.startColumn<=s.range.startColumn&&this.range.endColumn>=s.range.endColumn}}e.InlineCompletionsHover=f;let c=class{constructor(s,l,o,g,h,m){this._editor=s,this._languageService=l,this._openerService=o,this.accessibilityService=g,this._instantiationService=h,this._telemetryService=m,this.hoverOrdinal=4}suggestHoverAnchor(s){const l=v.InlineCompletionsController.get(this._editor);if(!l)return null;const o=s.target;if(o.type===8){const g=o.detail;if(l.shouldShowHoverAtViewZone(g.viewZoneId))return new _.HoverForeignElementAnchor(1e3,this,S.Range.fromPositions(this._editor.getModel().validatePosition(g.positionBefore||g.position)),s.event.posx,s.event.posy,!1)}return o.type===7&&l.shouldShowHoverAt(o.range)?new _.HoverForeignElementAnchor(1e3,this,o.range,s.event.posx,s.event.posy,!1):o.type===6&&o.detail.mightBeForeignElement&&l.shouldShowHoverAt(o.range)?new _.HoverForeignElementAnchor(1e3,this,o.range,s.event.posx,s.event.posy,!1):null}computeSync(s,l){if(this._editor.getOption(62).showToolbar!=="onHover")return[];const o=v.InlineCompletionsController.get(this._editor);return o&&o.shouldShowHoverAt(s.range)?[new f(this,s.range,o)]:[]}renderHoverParts(s,l){const o=new y.DisposableStore,g=l[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(s,g,o);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 s.fragment.appendChild(m.getDomNode()),h.triggerExplicitly(),o.add(m),o}renderScreenReaderText(s,l,o){const g=L.$,h=g("div.hover-row.markdown-hover"),m=L.append(h,g("div.hover-contents",{["aria-live"]:"assertive"})),C=o.add(new a.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),w=D=>{o.add(C.onDidRenderAsync(()=>{m.className="hover-contents code-hover-contents",s.onContentsChanged()}));const I=i.localize(0,null),T=o.add(C.render(new k.MarkdownString().appendText(I).appendCodeblock("text",D)));m.replaceChildren(T.element)};o.add((0,E.autorun)(D=>{var I;const T=(I=l.controller.model.read(D))===null||I===void 0?void 0:I.ghostText.read(D);if(T){const A=this._editor.getModel().getLineContent(T.lineNumber);w(T.renderForScreenReader(A))}else L.reset(m)})),s.fragment.appendChild(h)}};e.InlineCompletionsHoverParticipant=c,e.InlineCompletionsHoverParticipant=c=ke([ge(1,p.ILanguageService),ge(2,r.IOpenerService),ge(3,n.IAccessibilityService),ge(4,t.IInstantiationService),ge(5,u.ITelemetryService)],c)}),define(se[931],oe([1,0,16,101,929,930,264,30]),function(te,e,L,k,y,E,S,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(S.InlineCompletionsController.ID,S.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(se[932],oe([1,0,19,71,52,2,33,5,131,18,311,138,358,391,312,103]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class u{constructor(s,l,o,g,h,m){this.range=s,this.insertText=l,this.filterText=o,this.additionalTextEdits=g,this.command=h,this.completion=m}}let f=class extends E.RefCountedDisposable{constructor(s,l,o,g,h,m){super(h.disposable),this.model=s,this.line=l,this.word=o,this.completionModel=g,this._suggestMemoryService=m}canBeReused(s,l,o){return this.model===s&&this.line===l&&this.word.word.length>0&&this.word.startColumn===o.startColumn&&this.word.endColumn<o.endColumn&&this.completionModel.getIncompleteProvider().size===0}get items(){var s;const l=[],{items:o}=this.completionModel,g=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},o),h=y.Iterable.slice(o,g),m=y.Iterable.slice(o,0,g);let C=5;for(const w of y.Iterable.concat(h,m)){if(w.score===k.FuzzyScore.Default)continue;const D=new p.Range(w.editStart.lineNumber,w.editStart.column,w.editInsertEnd.lineNumber,w.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),I=w.completion.insertTextRules&&w.completion.insertTextRules&4?{snippet:w.completion.insertText}:w.completion.insertText;l.push(new u(D,I,(s=w.filterTextLow)!==null&&s!==void 0?s:w.labelLow,w.completion.additionalTextEdits,w.completion.command,w)),C-->=0&&w.resolve(L.CancellationToken.None)}return l}};f=ke([ge(5,i.ISuggestMemoryService)],f);let c=class extends E.Disposable{constructor(s,l,o,g){super(),this._languageFeatureService=s,this._clipboardService=l,this._suggestMemoryService=o,this._editorService=g,this._store.add(s.inlineCompletionsProvider.register("*",this))}async provideInlineCompletions(s,l,o,g){var h;if(o.selectedSuggestionInfo)return;let m;for(const N of this._editorService.listCodeEditors())if(N.getModel()===s){m=N;break}if(!m)return;const C=m.getOption(88);if(a.QuickSuggestionsOptions.isAllOff(C))return;s.tokenization.tokenizeIfCheap(l.lineNumber);const w=s.tokenization.getLineTokens(l.lineNumber),D=w.getStandardTokenType(w.findTokenIndexAtOffset(Math.max(l.column-1-1,0)));if(a.QuickSuggestionsOptions.valueFor(C,D)!=="inline")return;let I=s.getWordAtPosition(l),T;if(I?.word||(T=this._getTriggerCharacterInfo(s,l)),!I?.word&&!T||(I||(I=s.getWordUntilPosition(l)),I.endColumn!==l.column))return;let A;const P=s.getValueInRange(new p.Range(l.lineNumber,1,l.lineNumber,l.column));if(!T&&(!((h=this._lastResult)===null||h===void 0)&&h.canBeReused(s,l.lineNumber,I))){const N=new b.LineContext(P,l.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=N,this._lastResult.acquire(),A=this._lastResult}else{const N=await(0,a.provideSuggestionItems)(this._languageFeatureService.completionProvider,s,l,new a.CompletionOptions(void 0,n.SuggestModel.createSuggestFilter(m).itemKind,T?.providers),T&&{triggerKind:1,triggerCharacter:T.ch},g);let M;N.needsClipboard&&(M=await this._clipboardService.readText());const R=new b.CompletionModel(N.items,l.column,new b.LineContext(P,0),t.WordDistance.None,m.getOption(117),m.getOption(111),{boostFullMatch:!1,firstMatchCanBeWeak:!1},M);A=new f(s,l.lineNumber,I,R,N,this._suggestMemoryService)}return this._lastResult=A,A}handleItemDidShow(s,l){l.completion.resolve(L.CancellationToken.None)}freeInlineCompletions(s){s.release()}_getTriggerCharacterInfo(s,l){var o;const g=s.getValueInRange(p.Range.fromPositions({lineNumber:l.lineNumber,column:l.column-1},l)),h=new Set;for(const m of this._languageFeatureService.completionProvider.all(s))!((o=m.triggerCharacters)===null||o===void 0)&&o.includes(g)&&h.add(m);if(h.size!==0)return{providers:h,ch:g}}};e.SuggestInlineCompletions=c,e.SuggestInlineCompletions=c=ke([ge(0,v.ILanguageFeaturesService),ge(1,r.IClipboardService),ge(2,i.ISuggestMemoryService),ge(3,S.ICodeEditorService)],c),(0,_.registerEditorFeature)(c)}),define(se[393],oe([1,0,8]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,L.createDecorator)("workspaceTrustManagementService")}),define(se[933],oe([1,0,14,26,58,2,17,11,16,36,38,296,121,43,336,101,253,845,725,27,8,57,70,82,393,481]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.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(ne,$,J,Q){super(),this._editor=ne,this._editorWorkerService=$,this._workspaceTrustService=J,this._highlighter=null,this._bannerClosed=!1,this._updateState=re=>{if(re&&re.hasMore){if(this._bannerClosed)return;const de=Math.max(re.ambiguousCharacterCount,re.nonBasicAsciiCharacterCount,re.invisibleCharacterCount);let he;if(re.nonBasicAsciiCharacterCount>=de)he={message:c.localize(1,null),command:new V};else if(re.ambiguousCharacterCount>=de)he={message:c.localize(2,null),command:new B};else if(re.invisibleCharacterCount>=de)he={message:c.localize(3,null),command:new W};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:he.message,icon:e.warningIcon,actions:[{label:he.command.shortLabel,href:`command:${he.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(Q.createInstance(f.BannerController,ne)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=ne.getOption(124),this._register(J.onDidChangeTrust(re=>{this._updateHighlighter()})),this._register(ne.onDidChangeConfiguration(re=>{re.hasChanged(124)&&(this._options=ne.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 ne=C(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([ne.nonBasicASCII,ne.ambiguousCharacters,ne.invisibleCharacters].every(J=>J===!1))return;const $={nonBasicASCII:ne.nonBasicASCII,ambiguousCharacters:ne.ambiguousCharacters,invisibleCharacters:ne.invisibleCharacters,includeComments:ne.includeComments,includeStrings:ne.includeStrings,allowedCodePoints:Object.keys(ne.allowedCharacters).map(J=>J.codePointAt(0)),allowedLocales:Object.keys(ne.allowedLocales).map(J=>J==="_os"?new Intl.NumberFormat().resolvedOptions().locale:J==="_vscode"?S.language:J)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new w(this._editor,$,this._updateState,this._editorWorkerService):this._highlighter=new D(this._editor,$,this._updateState)}getDecorationInfo(ne){return this._highlighter?this._highlighter.getDecorationInfo(ne):null}};e.UnicodeHighlighter=m,m.ID="editor.contrib.unicodeHighlighter",e.UnicodeHighlighter=m=ke([ge(1,i.IEditorWorkerService),ge(2,h.IWorkspaceTrustManagementService),ge(3,s.IInstantiationService)],m);function C(ae,ne){return{nonBasicASCII:ne.nonBasicASCII===v.inUntrustedWorkspace?!ae:ne.nonBasicASCII,ambiguousCharacters:ne.ambiguousCharacters,invisibleCharacters:ne.invisibleCharacters,includeComments:ne.includeComments===v.inUntrustedWorkspace?!ae:ne.includeComments,includeStrings:ne.includeStrings===v.inUntrustedWorkspace?!ae:ne.includeStrings,allowedCharacters:ne.allowedCharacters,allowedLocales:ne.allowedLocales}}let w=class extends E.Disposable{constructor(ne,$,J,Q){super(),this._editor=ne,this._options=$,this._updateState=J,this._editorWorkerService=Q,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 ne=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then($=>{if(this._model.isDisposed()||this._model.getVersionId()!==ne)return;this._updateState($);const J=[];if(!$.hasMore)for(const Q of $.ranges)J.push({range:Q,options:R.instance.getDecorationFromOptions(this._options)});this._decorations.set(J)})}getDecorationInfo(ne){if(!this._decorations.has(ne))return null;const $=this._editor.getModel();if(!(0,t.isModelDecorationVisible)($,ne))return null;const J=$.getValueInRange(ne.range);return{reason:M(J,this._options),inComment:(0,t.isModelDecorationInComment)($,ne),inString:(0,t.isModelDecorationInString)($,ne)}}};w=ke([ge(3,i.IEditorWorkerService)],w);class D extends E.Disposable{constructor(ne,$,J){super(),this._editor=ne,this._options=$,this._updateState=J,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 ne=this._editor.getVisibleRanges(),$=[],J={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const Q of ne){const re=a.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,Q);for(const de of re.ranges)J.ranges.push(de);J.ambiguousCharacterCount+=J.ambiguousCharacterCount,J.invisibleCharacterCount+=J.invisibleCharacterCount,J.nonBasicAsciiCharacterCount+=J.nonBasicAsciiCharacterCount,J.hasMore=J.hasMore||re.hasMore}if(!J.hasMore)for(const Q of J.ranges)$.push({range:Q,options:R.instance.getDecorationFromOptions(this._options)});this._updateState(J),this._decorations.set($)}getDecorationInfo(ne){if(!this._decorations.has(ne))return null;const $=this._editor.getModel(),J=$.getValueInRange(ne.range);return(0,t.isModelDecorationVisible)($,ne)?{reason:M(J,this._options),inComment:(0,t.isModelDecorationInComment)($,ne),inString:(0,t.isModelDecorationInString)($,ne)}:null}}const I=c.localize(4,null);let T=class{constructor(ne,$,J){this._editor=ne,this._languageService=$,this._openerService=J,this.hoverOrdinal=5}computeSync(ne,$){if(!this._editor.hasModel()||ne.type!==1)return[];const J=this._editor.getModel(),Q=this._editor.getContribution(m.ID);if(!Q)return[];const re=[],de=new Set;let he=300;for(const me of $){const X=Q.getDecorationInfo(me);if(!X)continue;const G=J.getValueInRange(me.range).codePointAt(0),z=P(G);let H;switch(X.reason.kind){case 0:{(0,p.isBasicASCII)(X.reason.confusableWith)?H=c.localize(5,null,z,P(X.reason.confusableWith.codePointAt(0))):H=c.localize(6,null,z,P(X.reason.confusableWith.codePointAt(0)));break}case 1:H=c.localize(7,null,z);break;case 2:H=c.localize(8,null,z);break}if(de.has(H))continue;de.add(H);const Y={codePoint:G,reason:X.reason,inComment:X.inComment,inString:X.inString},j=c.localize(9,null),Z=`command:${K.ID}?${encodeURIComponent(JSON.stringify(Y))}`,ee=new y.MarkdownString("",!0).appendMarkdown(H).appendText(" ").appendLink(Z,j,I);re.push(new u.MarkdownHover(this,me.range,[ee],!1,he++))}return re}renderHoverParts(ne,$){return(0,u.renderMarkdownHovers)(ne,$,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=T,e.UnicodeHighlighterHoverParticipant=T=ke([ge(1,n.ILanguageService),ge(2,l.IOpenerService)],T);function A(ae){return`U+${ae.toString(16).padStart(4,"0")}`}function P(ae){let ne=`\`${A(ae)}\``;return p.InvisibleCharacters.isInvisibleCharacter(ae)||(ne+=` "${`${N(ae)}`}"`),ne}function N(ae){return ae===96?"`` ` ``":"`"+String.fromCodePoint(ae)+"`"}function M(ae,ne){return a.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(ae,ne)}class R{constructor(){this.map=new Map}getDecorationFromOptions(ne){return this.getDecoration(!ne.includeComments,!ne.includeStrings)}getDecoration(ne,$){const J=`${ne}${$}`;let Q=this.map.get(J);return Q||(Q=b.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:ne,hideInStringTokens:$}),this.map.set(J,Q)),Q}}R.instance=new R;class x extends _.EditorAction{constructor(){super({id:B.ID,label:c.localize(11,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=c.localize(10,null)}async run(ne,$,J){const Q=ne?.get(d.IConfigurationService);Q&&this.runAction(Q)}async runAction(ne){await ne.updateValue(v.unicodeHighlightConfigKeys.includeComments,!1,2)}}e.DisableHighlightingInCommentsAction=x;class O extends _.EditorAction{constructor(){super({id:B.ID,label:c.localize(13,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=c.localize(12,null)}async run(ne,$,J){const Q=ne?.get(d.IConfigurationService);Q&&this.runAction(Q)}async runAction(ne){await ne.updateValue(v.unicodeHighlightConfigKeys.includeStrings,!1,2)}}e.DisableHighlightingInStringsAction=O;class B extends _.EditorAction{constructor(){super({id:B.ID,label:c.localize(15,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=c.localize(14,null)}async run(ne,$,J){const Q=ne?.get(d.IConfigurationService);Q&&this.runAction(Q)}async runAction(ne){await ne.updateValue(v.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)}}e.DisableHighlightingOfAmbiguousCharactersAction=B,B.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class W extends _.EditorAction{constructor(){super({id:W.ID,label:c.localize(17,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=c.localize(16,null)}async run(ne,$,J){const Q=ne?.get(d.IConfigurationService);Q&&this.runAction(Q)}async runAction(ne){await ne.updateValue(v.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)}}e.DisableHighlightingOfInvisibleCharactersAction=W,W.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class V extends _.EditorAction{constructor(){super({id:V.ID,label:c.localize(19,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=c.localize(18,null)}async run(ne,$,J){const Q=ne?.get(d.IConfigurationService);Q&&this.runAction(Q)}async runAction(ne){await ne.updateValue(v.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=V,V.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class K extends _.EditorAction{constructor(){super({id:K.ID,label:c.localize(20,null),alias:"Show Exclude Options",precondition:void 0})}async run(ne,$,J){const{codePoint:Q,reason:re,inString:de,inComment:he}=J,me=String.fromCodePoint(Q),X=ne.get(o.IQuickInputService),U=ne.get(d.IConfigurationService);function G(Y){return p.InvisibleCharacters.isInvisibleCharacter(Y)?c.localize(21,null,A(Y)):c.localize(22,null,`${A(Y)} "${me}"`)}const z=[];if(re.kind===0)for(const Y of re.notAmbiguousInLocales)z.push({label:c.localize(23,null,Y),run:async()=>{q(U,[Y])}});if(z.push({label:G(Q),run:()=>F(U,[Q])}),he){const Y=new x;z.push({label:Y.label,run:async()=>Y.runAction(U)})}else if(de){const Y=new O;z.push({label:Y.label,run:async()=>Y.runAction(U)})}if(re.kind===0){const Y=new B;z.push({label:Y.label,run:async()=>Y.runAction(U)})}else if(re.kind===1){const Y=new W;z.push({label:Y.label,run:async()=>Y.runAction(U)})}else if(re.kind===2){const Y=new V;z.push({label:Y.label,run:async()=>Y.runAction(U)})}else ie(re);const H=await X.pick(z,{title:I});H&&await H.run()}}e.ShowExcludeOptions=K,K.ID="editor.action.unicodeHighlight.showExcludeOptions";async function F(ae,ne){const $=ae.getValue(v.unicodeHighlightConfigKeys.allowedCharacters);let J;typeof $=="object"&&$?J=$:J={};for(const Q of ne)J[String.fromCodePoint(Q)]=!0;await ae.updateValue(v.unicodeHighlightConfigKeys.allowedCharacters,J,2)}async function q(ae,ne){var $;const J=($=ae.inspect(v.unicodeHighlightConfigKeys.allowedLocales).user)===null||$===void 0?void 0:$.value;let Q;typeof J=="object"&&J?Q=Object.assign({},J):Q={};for(const re of ne)Q[re]=!0;await ae.updateValue(v.unicodeHighlightConfigKeys.allowedLocales,Q,2)}function ie(ae){throw new Error(`Unexpected value: ${ae}`)}(0,_.registerEditorAction)(B),(0,_.registerEditorAction)(W),(0,_.registerEditorAction)(V),(0,_.registerEditorAction)(K),(0,_.registerEditorContribution)(m.ID,m,1),r.HoverParticipantRegistry.register(T)}),define(se[934],oe([1,0,191,194,886,810,889,811,812,902,891,893,916,900,813,923,814,894,924,925,377,261,817,818,780,931,262,263,384,382,385,820,918,901,821,822,904,905,823,910,844,869,870,871,825,196,920,392,932,826,800,933,827,911,364,828,824,779,96,177]),function(te,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(se[265],oe([1,0,11,7,46,6,125,2,17,100,22,136,246,74,10,5,51,68,189,25,27,356,15,162,8,775,34,347,124,348,776,164,50,88,81,169,123,96,49,33,64,393,59,778,795,878,45,785,121,247,43,864,237,883,880,372,137,777,69,30,806,781,103,772,236,773,163,192,97,784,57,70,92,799,122,782,131,12,243,44,32,371,349,922,79,865,763,852]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P,N,M,R,x,O,B,W,V,K,F,q,ie,ae,ne,$,J,Q,re,de,he,me,X,U,G,z,H,Y,j,Z,ee,le,ue,ce,pe,ve,Ce,Se,_e,Ee,Ae,xe,Be,De,Ie,fe,be,Ne){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class Pe{constructor(Fe){this.disposed=!1,this.model=Fe,this._onWillDispose=new E.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let ze=class{constructor(Fe){this.modelService=Fe}createModelReference(Fe){const We=this.modelService.getModel(Fe);return We?Promise.resolve(new p.ImmortalReference(new Pe(We))):Promise.reject(new Error("Model not found"))}};ze=ke([ge(0,u.IModelService)],ze);class Ke{show(){return Ke.NULL_PROGRESS_RUNNER}async showWhile(Fe,We){await Fe}}Ke.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class je{withProgress(Fe,We,He){return We({report:()=>{}})}}class Je{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class rt{async confirm(Fe){return{confirmed:this.doConfirm(Fe.message,Fe.detail),checkboxChecked:!1}}doConfirm(Fe,We){let He=Fe;return We&&(He=He+`
|
||
|
||
`+We),Ne.mainWindow.confirm(He)}async prompt(Fe){var We,He;let Ue;if(this.doConfirm(Fe.message,Fe.detail)){const Xe=[...(We=Fe.buttons)!==null&&We!==void 0?We:[]];Fe.cancelButton&&typeof Fe.cancelButton!="string"&&typeof Fe.cancelButton!="boolean"&&Xe.push(Fe.cancelButton),Ue=await((He=Xe[0])===null||He===void 0?void 0:He.run({checkboxChecked:!1}))}return{result:Ue}}async error(Fe,We){await this.prompt({type:v.default.Error,message:Fe,detail:We})}}class et{info(Fe){return this.notify({severity:v.default.Info,message:Fe})}warn(Fe){return this.notify({severity:v.default.Warning,message:Fe})}error(Fe){return this.notify({severity:v.default.Error,message:Fe})}notify(Fe){switch(Fe.severity){case v.default.Error:console.error(Fe.message);break;case v.default.Warning:console.warn(Fe.message);break;default:console.log(Fe.message);break}return et.NO_OP}prompt(Fe,We,He,Ue){return et.NO_OP}status(Fe,We){return p.Disposable.None}}e.StandaloneNotificationService=et,et.NO_OP=new P.NoOpNotification;let st=class{constructor(Fe){this._onWillExecuteCommand=new E.Emitter,this._onDidExecuteCommand=new E.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Fe}executeCommand(Fe,...We){const He=d.CommandsRegistry.getCommand(Fe);if(!He)return Promise.reject(new Error(`command '${Fe}' not found`));try{this._onWillExecuteCommand.fire({commandId:Fe,args:We});const Ue=this._instantiationService.invokeFunction.apply(this._instantiationService,[He.handler,...We]);return this._onDidExecuteCommand.fire({commandId:Fe,args:We}),Promise.resolve(Ue)}catch(Ue){return Promise.reject(Ue)}}};e.StandaloneCommandService=st,e.StandaloneCommandService=st=ke([ge(0,h.IInstantiationService)],st);let Qe=class extends m.AbstractKeybindingService{constructor(Fe,We,He,Ue,tt,Xe){super(Fe,We,He,Ue,tt),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const dt=ut=>{const wt=new p.DisposableStore;wt.add(k.addDisposableListener(ut,k.EventType.KEY_DOWN,Dt=>{const yt=new y.StandardKeyboardEvent(Dt);this._dispatch(yt,yt.target)&&(yt.preventDefault(),yt.stopPropagation())})),wt.add(k.addDisposableListener(ut,k.EventType.KEY_UP,Dt=>{const yt=new y.StandardKeyboardEvent(Dt);this._singleModifierDispatch(yt,yt.target)&&yt.preventDefault()})),this._domNodeListeners.push(new ft(ut,wt))},it=ut=>{for(let wt=0;wt<this._domNodeListeners.length;wt++){const Dt=this._domNodeListeners[wt];Dt.domNode===ut&&(this._domNodeListeners.splice(wt,1),Dt.dispose())}},nt=ut=>{ut.getOption(61)||dt(ut.getContainerDomNode())},ot=ut=>{ut.getOption(61)||it(ut.getContainerDomNode())};this._register(Xe.onCodeEditorAdd(nt)),this._register(Xe.onCodeEditorRemove(ot)),Xe.listCodeEditors().forEach(nt);const ht=ut=>{dt(ut.getContainerDomNode())},St=ut=>{it(ut.getContainerDomNode())};this._register(Xe.onDiffEditorAdd(ht)),this._register(Xe.onDiffEditorRemove(St)),Xe.listDiffEditors().forEach(ht)}addDynamicKeybinding(Fe,We,He,Ue){return(0,p.combinedDisposable)(d.CommandsRegistry.registerCommand(Fe,He),this.addDynamicKeybindings([{keybinding:We,command:Fe,when:Ue}]))}addDynamicKeybindings(Fe){const We=Fe.map(He=>{var Ue;return{keybinding:(0,S.decodeKeybinding)(He.keybinding,_.OS),command:(Ue=He.command)!==null&&Ue!==void 0?Ue:null,commandArgs:He.commandArgs,when:He.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(We),this.updateResolver(),(0,p.toDisposable)(()=>{for(let He=0;He<this._dynamicKeybindings.length;He++)if(this._dynamicKeybindings[He]===We[0]){this._dynamicKeybindings.splice(He,We.length),this.updateResolver();return}})}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const Fe=this._toNormalizedKeybindingItems(D.KeybindingsRegistry.getDefaultKeybindings(),!0),We=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new w.KeybindingResolver(Fe,We,He=>this._log(He))}return this._cachedResolver}_documentHasFocus(){return Ne.mainWindow.document.hasFocus()}_toNormalizedKeybindingItems(Fe,We){const He=[];let Ue=0;for(const tt of Fe){const Xe=tt.when||void 0,dt=tt.keybinding;if(!dt)He[Ue++]=new I.ResolvedKeybindingItem(void 0,tt.command,tt.commandArgs,Xe,We,null,!1);else{const it=T.USLayoutResolvedKeybinding.resolveKeybinding(dt,_.OS);for(const nt of it)He[Ue++]=new I.ResolvedKeybindingItem(nt,tt.command,tt.commandArgs,Xe,We,null,!1)}}return He}resolveKeyboardEvent(Fe){const We=new S.KeyCodeChord(Fe.ctrlKey,Fe.shiftKey,Fe.altKey,Fe.metaKey,Fe.keyCode);return new T.USLayoutResolvedKeybinding([We],_.OS)}};e.StandaloneKeybindingService=Qe,e.StandaloneKeybindingService=Qe=ke([ge(0,o.IContextKeyService),ge(1,d.ICommandService),ge(2,M.ITelemetryService),ge(3,P.INotificationService),ge(4,V.ILogService),ge(5,W.ICodeEditorService)],Qe);class ft extends p.Disposable{constructor(Fe,We){super(),this.domNode=Fe,this._register(We)}}function at(qe){return qe&&typeof qe=="object"&&(!qe.overrideIdentifier||typeof qe.overrideIdentifier=="string")&&(!qe.resource||qe.resource instanceof b.URI)}class ct{constructor(){this._onDidChangeConfiguration=new E.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Fe=new xe.DefaultConfiguration;this._configuration=new l.Configuration(Fe.reload(),new l.ConfigurationModel,new l.ConfigurationModel,new l.ConfigurationModel),Fe.dispose()}getValue(Fe,We){const He=typeof Fe=="string"?Fe:void 0,Ue=at(Fe)?Fe:at(We)?We:{};return this._configuration.getValue(He,Ue,void 0)}updateValues(Fe){const We={data:this._configuration.toData()},He=[];for(const Ue of Fe){const[tt,Xe]=Ue;this.getValue(tt)!==Xe&&(this._configuration.updateValue(tt,Xe),He.push(tt))}if(He.length>0){const Ue=new l.ConfigurationChangeEvent({keys:He,overrides:[]},We,this._configuration);Ue.source=8,this._onDidChangeConfiguration.fire(Ue)}return Promise.resolve()}updateValue(Fe,We,He,Ue){return this.updateValues([[Fe,We]])}inspect(Fe,We={}){return this._configuration.inspect(Fe,We,void 0)}}e.StandaloneConfigurationService=ct;let lt=class{constructor(Fe,We,He){this.configurationService=Fe,this.modelService=We,this.languageService=He,this._onDidChangeConfiguration=new E.Emitter,this.configurationService.onDidChangeConfiguration(Ue=>{this._onDidChangeConfiguration.fire({affectedKeys:Ue.affectedKeys,affectsConfiguration:(tt,Xe)=>Ue.affectsConfiguration(Xe)})})}getValue(Fe,We,He){const Ue=t.Position.isIPosition(We)?We:null,tt=Ue?typeof He=="string"?He:void 0:typeof We=="string"?We:void 0,Xe=Fe?this.getLanguage(Fe,Ue):void 0;return typeof tt>"u"?this.configurationService.getValue({resource:Fe,overrideIdentifier:Xe}):this.configurationService.getValue(tt,{resource:Fe,overrideIdentifier:Xe})}getLanguage(Fe,We){const He=this.modelService.getModel(Fe);return He?We?He.getLanguageIdAtPosition(We.lineNumber,We.column):He.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Fe)}};lt=ke([ge(0,s.IConfigurationService),ge(1,u.IModelService),ge(2,re.ILanguageService)],lt);let mt=class{constructor(Fe){this.configurationService=Fe}getEOL(Fe,We){const He=this.configurationService.getValue("files.eol",{overrideIdentifier:We,resource:Fe});return He&&typeof He=="string"&&He!=="auto"?He:_.isLinux||_.isMacintosh?`
|
||
`:`\r
|
||
`}};mt=ke([ge(0,s.IConfigurationService)],mt);class pt{publicLog2(){}}class Le{constructor(){const Fe=b.URI.from({scheme:Le.SCHEME,authority:"model",path:"/"});this.workspace={id:R.STANDALONE_EDITOR_WORKSPACE_ID,folders:[new R.WorkspaceFolder({uri:Fe,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(Fe){return Fe&&Fe.scheme===Le.SCHEME?this.workspace.folders[0]:null}}Le.SCHEME="inmemory";function ye(qe,Fe,We){if(!Fe||!(qe instanceof ct))return;const He=[];Object.keys(Fe).forEach(Ue=>{(0,i.isEditorConfigurationKey)(Ue)&&He.push([`editor.${Ue}`,Fe[Ue]]),We&&(0,i.isDiffEditorConfigurationKey)(Ue)&&He.push([`diffEditor.${Ue}`,Fe[Ue]])}),He.length>0&&qe.updateValues(He)}e.updateConfigurationService=ye;let Me=class{constructor(Fe){this._modelService=Fe}hasPreviewHandler(){return!1}async apply(Fe,We){const He=Array.isArray(Fe)?Fe:a.ResourceEdit.convert(Fe),Ue=new Map;for(const dt of He){if(!(dt instanceof a.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const it=this._modelService.getModel(dt.resource);if(!it)throw new Error("bad edit - model not found");if(typeof dt.versionId=="number"&&it.getVersionId()!==dt.versionId)throw new Error("bad state - model changed in the meantime");let nt=Ue.get(it);nt||(nt=[],Ue.set(it,nt)),nt.push(n.EditOperation.replaceMove(r.Range.lift(dt.textEdit.range),dt.textEdit.text))}let tt=0,Xe=0;for(const[dt,it]of Ue)dt.pushStackElement(),dt.pushEditOperations([],it,()=>[]),dt.pushStackElement(),Xe+=1,tt+=it.length;return{ariaSummary:L.format(O.StandaloneServicesNLS.bulkEditServiceSummary,tt,Xe),isApplied:tt>0}}};Me=ke([ge(0,u.IModelService)],Me);class Te{getUriLabel(Fe,We){return Fe.scheme==="file"?Fe.fsPath:Fe.path}getUriBasenameLabel(Fe){return(0,B.basename)(Fe)}}let we=class extends q.ContextViewService{constructor(Fe,We){super(Fe),this._codeEditorService=We}showContextView(Fe,We,He){if(!We){const Ue=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();Ue&&(We=Ue.getContainerDomNode())}return super.showContextView(Fe,We,He)}};we=ke([ge(0,x.ILayoutService),ge(1,W.ICodeEditorService)],we);class Re{constructor(){this._neverEmitter=new E.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Oe extends ie.LanguageService{constructor(){super()}}class Ve extends De.LogService{constructor(){super(new V.ConsoleLogger)}}let $e=class extends ae.ContextMenuService{constructor(Fe,We,He,Ue,tt,Xe){super(Fe,We,He,Ue,tt,Xe),this.configure({blockMouse:!1})}};$e=ke([ge(0,M.ITelemetryService),ge(1,P.INotificationService),ge(2,F.IContextViewService),ge(3,C.IKeybindingService),ge(4,Y.IMenuService),ge(5,o.IContextKeyService)],$e);class Ze{async playAudioCue(Fe,We){}}(0,ne.registerSingleton)(s.IConfigurationService,ct,0),(0,ne.registerSingleton)(c.ITextResourceConfigurationService,lt,0),(0,ne.registerSingleton)(c.ITextResourcePropertiesService,mt,0),(0,ne.registerSingleton)(R.IWorkspaceContextService,Le,0),(0,ne.registerSingleton)(A.ILabelService,Te,0),(0,ne.registerSingleton)(M.ITelemetryService,pt,0),(0,ne.registerSingleton)(g.IDialogService,rt,0),(0,ne.registerSingleton)(be.IEnvironmentService,Je,0),(0,ne.registerSingleton)(P.INotificationService,et,0),(0,ne.registerSingleton)(Ce.IMarkerService,Se.MarkerService,0),(0,ne.registerSingleton)(re.ILanguageService,Oe,0),(0,ne.registerSingleton)(G.IStandaloneThemeService,U.StandaloneThemeService,0),(0,ne.registerSingleton)(V.ILogService,Ve,0),(0,ne.registerSingleton)(u.IModelService,me.ModelService,0),(0,ne.registerSingleton)(he.IMarkerDecorationsService,de.MarkerDecorationsService,0),(0,ne.registerSingleton)(o.IContextKeyService,le.ContextKeyService,0),(0,ne.registerSingleton)(N.IProgressService,je,0),(0,ne.registerSingleton)(N.IEditorProgressService,Ke,0),(0,ne.registerSingleton)(Ae.IStorageService,Ae.InMemoryStorageService,0),(0,ne.registerSingleton)(J.IEditorWorkerService,Q.EditorWorkerService,0),(0,ne.registerSingleton)(a.IBulkEditService,Me,0),(0,ne.registerSingleton)(K.IWorkspaceTrustManagementService,Re,0),(0,ne.registerSingleton)(f.ITextModelService,ze,0),(0,ne.registerSingleton)(H.IAccessibilityService,z.AccessibilityService,0),(0,ne.registerSingleton)(ve.IListService,ve.ListService,0),(0,ne.registerSingleton)(d.ICommandService,st,0),(0,ne.registerSingleton)(C.IKeybindingService,Qe,0),(0,ne.registerSingleton)(Ee.IQuickInputService,X.StandaloneQuickInputService,0),(0,ne.registerSingleton)(F.IContextViewService,we,0),(0,ne.registerSingleton)(_e.IOpenerService,$.OpenerService,0),(0,ne.registerSingleton)(ee.IClipboardService,Z.BrowserClipboardService,0),(0,ne.registerSingleton)(F.IContextMenuService,$e,0),(0,ne.registerSingleton)(Y.IMenuService,j.MenuService,0),(0,ne.registerSingleton)(Be.IAudioCueService,Ze,0);var Ge;(function(qe){const Fe=new pe.ServiceCollection;for(const[it,nt]of(0,ne.getSingletonServiceDescriptors)())Fe.set(it,nt);const We=new ce.InstantiationService(Fe,!0);Fe.set(h.IInstantiationService,We);function He(it){Ue||Xe({});const nt=Fe.get(it);if(!nt)throw new Error("Missing service "+it);return nt instanceof ue.SyncDescriptor?We.invokeFunction(ot=>ot.get(it)):nt}qe.get=He;let Ue=!1;const tt=new E.Emitter;function Xe(it){if(Ue)return We;Ue=!0;for(const[ot,ht]of(0,ne.getSingletonServiceDescriptors)())Fe.get(ot)||Fe.set(ot,ht);for(const ot in it)if(it.hasOwnProperty(ot)){const ht=(0,h.createDecorator)(ot);Fe.get(ht)instanceof ue.SyncDescriptor&&Fe.set(ht,it[ot])}const nt=(0,Ie.getEditorFeatures)();for(const ot of nt)try{We.createInstance(ot)}catch(ht){(0,fe.onUnexpectedError)(ht)}return tt.fire(),We}qe.initialize=Xe;function dt(it){if(Ue)return it();const nt=new p.DisposableStore,ot=nt.add(tt.event(()=>{ot.dispose(),nt.add(it())}));return nt}qe.withServices=dt})(Ge||(e.StandaloneServices=Ge={}))}),define(se[935],oe([1,0,48,2,33,194,287,265,137,30,25,27,15,59,8,34,50,23,69,96,103,88,51,43,371,80,32,18,259,122,44]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor2=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let A=0,P=!1;function N(W){if(!W){if(P)return;P=!0}L.setARIAContainer(W||T.mainWindow.document.body)}let M=class extends E.CodeEditorWidget{constructor(V,K,F,q,ie,ae,ne,$,J,Q,re,de){const he={...K};he.ariaLabel=he.ariaLabel||d.StandaloneCodeEditorNLS.editorViewAccessibleLabel,he.ariaLabel=he.ariaLabel+";"+d.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(V,he,{},F,q,ie,ae,$,J,Q,re,de),ne instanceof p.StandaloneKeybindingService?this._standaloneKeybindingService=ne:this._standaloneKeybindingService=null,N(he.ariaContainerElement)}addCommand(V,K,F){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const q="DYNAMIC_"+ ++A,ie=i.ContextKeyExpr.deserialize(F);return this._standaloneKeybindingService.addDynamicKeybinding(q,V,K,ie),q}createContextKey(V,K){return this._contextKeyService.createKey(V,K)}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 K=V.id,F=V.label,q=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(V.precondition)),ie=V.keybindings,ae=i.ContextKeyExpr.and(q,i.ContextKeyExpr.deserialize(V.keybindingContext)),ne=V.contextMenuGroupId||null,$=V.contextMenuOrder||0,J=(he,...me)=>Promise.resolve(V.run(this,...me)),Q=new k.DisposableStore,re=this.getId()+":"+K;if(Q.add(b.CommandsRegistry.registerCommand(re,J)),ne){const he={command:{id:re,title:F},when:q,group:ne,order:$};Q.add(v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,he))}if(Array.isArray(ie))for(const he of ie)Q.add(this._standaloneKeybindingService.addDynamicKeybinding(re,he,J,ae));const de=new S.InternalEditorAction(re,F,F,void 0,q,(...he)=>Promise.resolve(V.run(this,...he)),this._contextKeyService);return this._actions.set(K,de),Q.add((0,k.toDisposable)(()=>{this._actions.delete(K)})),Q}_triggerCommand(V,K){if(this._codeEditorService instanceof h.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(V,K)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(V,K)}};e.StandaloneCodeEditor=M,e.StandaloneCodeEditor=M=ke([ge(2,t.IInstantiationService),ge(3,y.ICodeEditorService),ge(4,b.ICommandService),ge(5,i.IContextKeyService),ge(6,r.IKeybindingService),ge(7,f.IThemeService),ge(8,u.INotificationService),ge(9,c.IAccessibilityService),ge(10,C.ILanguageConfigurationService),ge(11,w.ILanguageFeaturesService)],M);let R=class extends M{constructor(V,K,F,q,ie,ae,ne,$,J,Q,re,de,he,me,X){const U={...K};(0,p.updateConfigurationService)(Q,U,!1);const G=$.registerEditorContainer(V);typeof U.theme=="string"&&$.setTheme(U.theme),typeof U.autoDetectHighContrast<"u"&&$.setAutoDetectHighContrast(!!U.autoDetectHighContrast);const z=U.model;delete U.model,super(V,U,F,q,ie,ae,ne,$,J,re,me,X),this._configurationService=Q,this._standaloneThemeService=$,this._register(G);let H;if(typeof z>"u"){const Y=he.getLanguageIdByMimeType(U.language)||U.language||m.PLAINTEXT_LANGUAGE_ID;H=O(de,he,U.value||"",Y,void 0),this._ownsModel=!0}else H=z,this._ownsModel=!1;if(this._attachModel(H),H){const Y={oldModelUrl:null,newModelUrl:H.uri};this._onDidChangeModel.fire(Y)}}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=R,e.StandaloneEditor=R=ke([ge(2,t.IInstantiationService),ge(3,y.ICodeEditorService),ge(4,b.ICommandService),ge(5,i.IContextKeyService),ge(6,r.IKeybindingService),ge(7,_.IStandaloneThemeService),ge(8,u.INotificationService),ge(9,a.IConfigurationService),ge(10,c.IAccessibilityService),ge(11,o.IModelService),ge(12,g.ILanguageService),ge(13,C.ILanguageConfigurationService),ge(14,w.ILanguageFeaturesService)],R);let x=class extends D.DiffEditorWidget{constructor(V,K,F,q,ie,ae,ne,$,J,Q,re,de){const he={...K};(0,p.updateConfigurationService)($,he,!0);const me=ae.registerEditorContainer(V);typeof he.theme=="string"&&ae.setTheme(he.theme),typeof he.autoDetectHighContrast<"u"&&ae.setAutoDetectHighContrast(!!he.autoDetectHighContrast),super(V,he,{},q,F,ie,de,Q),this._configurationService=$,this._standaloneThemeService=ae,this._register(me)}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,K,F){return V.createInstance(M,K,F)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(V,K,F){return this.getModifiedEditor().addCommand(V,K,F)}createContextKey(V,K){return this.getModifiedEditor().createContextKey(V,K)}addAction(V){return this.getModifiedEditor().addAction(V)}};e.StandaloneDiffEditor2=x,e.StandaloneDiffEditor2=x=ke([ge(2,t.IInstantiationService),ge(3,i.IContextKeyService),ge(4,y.ICodeEditorService),ge(5,_.IStandaloneThemeService),ge(6,u.INotificationService),ge(7,a.IConfigurationService),ge(8,n.IContextMenuService),ge(9,l.IEditorProgressService),ge(10,s.IClipboardService),ge(11,I.IAudioCueService)],x);function O(W,V,K,F,q){if(K=K||"",!F){const ie=K.indexOf(`
|
||
`);let ae=K;return ie!==-1&&(ae=K.substring(0,ie)),B(W,K,V.createByFilepathOrFirstLine(q||null,ae),q)}return B(W,K,V.createById(F),q)}e.createTextModel=O;function B(W,V,K,F){return W.createModel(V,K,F)}}),define(se[936],oe([1,0,44,2,11,22,335,16,33,790,36,149,235,180,31,43,32,80,160,41,51,211,767,935,265,137,30,25,15,34,97,57,888,487]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r,u,f,c,d,s,l,o,g,h,m,C,w,D,I,T,A,P){"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 N(Ce,Se,_e){return h.StandaloneServices.initialize(_e||{}).createInstance(g.StandaloneEditor,Ce,Se)}e.create=N;function M(Ce){return h.StandaloneServices.get(_.ICodeEditorService).onCodeEditorAdd(_e=>{Ce(_e)})}e.onDidCreateEditor=M;function R(Ce){return h.StandaloneServices.get(_.ICodeEditorService).onDiffEditorAdd(_e=>{Ce(_e)})}e.onDidCreateDiffEditor=R;function x(){return h.StandaloneServices.get(_.ICodeEditorService).listCodeEditors()}e.getEditors=x;function O(){return h.StandaloneServices.get(_.ICodeEditorService).listDiffEditors()}e.getDiffEditors=O;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 P.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 K(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=(Ae,...xe)=>p.EditorCommand.runEditorCommand(Ae,xe,Se,(Be,De,Ie)=>Promise.resolve(Ce.run(De,...Ie))),Ee=new k.DisposableStore;if(Ee.add(w.CommandsRegistry.registerCommand(Ce.id,_e)),Ce.contextMenuGroupId){const Ae={command:{id:Ce.id,title:Ce.label},when:Se,group:Ce.contextMenuGroupId,order:Ce.contextMenuOrder||0};Ee.add(C.MenuRegistry.appendMenuItem(C.MenuId.EditorContext,Ae))}if(Array.isArray(Ce.keybindings)){const Ae=h.StandaloneServices.get(I.IKeybindingService);if(!(Ae instanceof h.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const xe=D.ContextKeyExpr.and(Se,D.ContextKeyExpr.deserialize(Ce.keybindingContext));Ee.add(Ae.addDynamicKeybindings(Ce.keybindings.map(Be=>({keybinding:Be,command:Ce.id,when:xe}))))}}return Ee}e.addEditorAction=K;function F(Ce){return q([Ce])}e.addKeybindingRule=F;function q(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=q;function ie(Ce,Se,_e){const Ee=h.StandaloneServices.get(r.ILanguageService),Ae=Ee.getLanguageIdByMimeType(Se)||Se;return(0,g.createTextModel)(h.StandaloneServices.get(s.IModelService),Ee,Ce,Ae,_e)}e.createModel=ie;function ae(Ce,Se){const _e=h.StandaloneServices.get(r.ILanguageService),Ee=_e.getLanguageIdByMimeType(Se)||Se||f.PLAINTEXT_LANGUAGE_ID;Ce.setLanguage(_e.createById(Ee))}e.setModelLanguage=ae;function ne(Ce,Se,_e){Ce&&h.StandaloneServices.get(T.IMarkerService).changeOne(Se,Ce.uri,_e)}e.setModelMarkers=ne;function $(Ce){h.StandaloneServices.get(T.IMarkerService).changeAll(Ce,[])}e.removeAllMarkers=$;function J(Ce){return h.StandaloneServices.get(T.IMarkerService).read(Ce)}e.getModelMarkers=J;function Q(Ce){return h.StandaloneServices.get(T.IMarkerService).onMarkerChanged(Ce)}e.onDidChangeMarkers=Q;function re(Ce){return h.StandaloneServices.get(s.IModelService).getModel(Ce)}e.getModel=re;function de(){return h.StandaloneServices.get(s.IModelService).getModels()}e.getModels=de;function he(Ce){return h.StandaloneServices.get(s.IModelService).onModelAdded(Ce)}e.onDidCreateModel=he;function me(Ce){return h.StandaloneServices.get(s.IModelService).onModelRemoved(Ce)}e.onWillDisposeModel=me;function X(Ce){return h.StandaloneServices.get(s.IModelService).onModelLanguageChanged(_e=>{Ce({model:_e.model,oldLanguage:_e.oldLanguageId})})}e.onDidChangeModelLanguage=X;function U(Ce){return(0,v.createWebWorker)(h.StandaloneServices.get(s.IModelService),h.StandaloneServices.get(u.ILanguageConfigurationService),Ce)}e.createWebWorker=U;function G(Ce,Se){const _e=h.StandaloneServices.get(r.ILanguageService),Ee=h.StandaloneServices.get(m.IStandaloneThemeService);return o.Colorizer.colorizeElement(Ee,_e,Ce,Se).then(()=>{Ee.registerEditorContainer(Ce)})}e.colorizeElement=G;function z(Ce,Se,_e){const Ee=h.StandaloneServices.get(r.ILanguageService);return h.StandaloneServices.get(m.IStandaloneThemeService).registerEditorContainer(L.mainWindow.document.body),o.Colorizer.colorize(Ee,Ce,Se,_e)}e.colorize=z;function H(Ce,Se,_e=4){return h.StandaloneServices.get(m.IStandaloneThemeService).registerEditorContainer(L.mainWindow.document.body),o.Colorizer.colorizeModelLine(Ce,Se,_e)}e.colorizeModelLine=H;function Y(Ce){const Se=t.TokenizationRegistry.get(Ce);return Se||{getInitialState:()=>c.NullState,tokenize:(_e,Ee,Ae)=>(0,c.nullTokenize)(Ce,Ae)}}function j(Ce,Se){t.TokenizationRegistry.getOrCreate(Se);const _e=Y(Se),Ee=(0,y.splitLines)(Ce),Ae=[];let xe=_e.getInitialState();for(let Be=0,De=Ee.length;Be<De;Be++){const Ie=Ee[Be],fe=_e.tokenize(Ie,!0,xe);Ae[Be]=fe.tokens,xe=fe.endState}return Ae}e.tokenize=j;function Z(Ce,Se){h.StandaloneServices.get(m.IStandaloneThemeService).defineTheme(Ce,Se)}e.defineTheme=Z;function ee(Ce){h.StandaloneServices.get(m.IStandaloneThemeService).setTheme(Ce)}e.setTheme=ee;function le(){S.FontMeasurements.clearAllFontInfos()}e.remeasureFonts=le;function ue(Ce,Se){return w.CommandsRegistry.registerCommand({id:Ce,handler:Se})}e.registerCommand=ue;function ce(Ce){return h.StandaloneServices.get(A.IOpenerService).registerOpener({async open(_e){return typeof _e=="string"&&(_e=E.URI.parse(_e)),Ce.open(_e)}})}e.registerLinkOpener=ce;function pe(Ce){return h.StandaloneServices.get(_.ICodeEditorService).registerCodeEditorOpenHandler(async(_e,Ee,Ae)=>{var xe;if(!Ee)return null;const Be=(xe=_e.options)===null||xe===void 0?void 0:xe.selection;let De;return Be&&typeof Be.endLineNumber=="number"&&typeof Be.endColumn=="number"?De=Be:Be&&(De={lineNumber:Be.startLineNumber,column:Be.startColumn}),await Ce.openCodeEditor(Ee,_e.resource,De)?Ee:null})}e.registerEditorOpener=pe;function ve(){return{create:N,getEditors:x,getDiffEditors:O,onDidCreateEditor:M,onDidCreateDiffEditor:R,createDiffEditor:B,addCommand:V,addEditorAction:K,addKeybindingRule:F,addKeybindingRules:q,createModel:ie,setModelLanguage:ae,setModelMarkers:ne,getModelMarkers:J,removeAllMarkers:$,onDidChangeMarkers:Q,getModels:de,getModel:re,onDidCreateModel:he,onWillDisposeModel:me,onDidChangeModelLanguage:X,createWebWorker:U,colorizeElement:G,colorize:z,colorizeModelLine:H,tokenize:j,defineTheme:Z,setTheme:ee,remeasureFonts:le,registerCommand:ue,registerLinkOpener:ce,registerEditorOpener:pe,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,ShowLightbulbIconMode:l.ShowLightbulbIconMode,ConfigurationChangedEvent:b.ConfigurationChangedEvent,BareFontInfo:i.BareFontInfo,FontInfo:i.FontInfo,TextModelResolvedOptions:d.TextModelResolvedOptions,FindMatch:d.FindMatch,ApplyUpdateResult:b.ApplyUpdateResult,EditorZoom:a.EditorZoom,createMultiFileDiffEditor:W,EditorType:n.EditorType,EditorOptions:b.EditorOptions}}e.createMonacoEditorAPI=ve}),define(se[937],oe([1,0,39,5,31,32,80,43,211,265,565,345,137,97,18,27]),function(te,e,L,k,y,E,S,p,_,v,b,a,i,n,t,r){"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){S.ModesRegistry.registerLanguage(H)}e.register=u;function f(){let H=[];return H=H.concat(S.ModesRegistry.getLanguages()),H}e.getLanguages=f;function c(H){return v.StandaloneServices.get(p.ILanguageService).languageIdCodec.encodeLanguageId(H)}e.getEncodedLanguageId=c;function d(H,Y){return v.StandaloneServices.withServices(()=>{const Z=v.StandaloneServices.get(p.ILanguageService).onDidRequestRichLanguageFeatures(ee=>{ee===H&&(Z.dispose(),Y())});return Z})}e.onLanguage=d;function s(H,Y){return v.StandaloneServices.withServices(()=>{const Z=v.StandaloneServices.get(p.ILanguageService).onDidRequestBasicLanguageFeatures(ee=>{ee===H&&(Z.dispose(),Y())});return Z})}e.onLanguageEncountered=s;function l(H,Y){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,Y,100)}e.setLanguageConfiguration=l;class o{constructor(Y,j){this._languageId=Y,this._actual=j}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(Y,j,Z){if(typeof this._actual.tokenize=="function")return g.adaptTokenize(this._languageId,this._actual,Y,Z);throw new Error("Not supported!")}tokenizeEncoded(Y,j,Z){const ee=this._actual.tokenizeEncoded(Y,Z);return new y.EncodedTokenizationResult(ee.tokens,ee.endState)}}e.EncodedTokenizationSupportAdapter=o;class g{constructor(Y,j,Z,ee){this._languageId=Y,this._actual=j,this._languageService=Z,this._standaloneThemeService=ee}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(Y,j){const Z=[];let ee=0;for(let le=0,ue=Y.length;le<ue;le++){const ce=Y[le];let pe=ce.startIndex;le===0?pe=0:pe<ee&&(pe=ee),Z[le]=new y.Token(pe,ce.scopes,j),ee=pe}return Z}static adaptTokenize(Y,j,Z,ee){const le=j.tokenize(Z,ee),ue=g._toClassicTokens(le.tokens,Y);let ce;return le.endState.equals(ee)?ce=ee:ce=le.endState,new y.TokenizationResult(ue,ce)}tokenize(Y,j,Z){return g.adaptTokenize(this._languageId,this._actual,Y,Z)}_toBinaryTokens(Y,j){const Z=Y.encodeLanguageId(this._languageId),ee=this._standaloneThemeService.getColorTheme().tokenTheme,le=[];let ue=0,ce=0;for(let ve=0,Ce=j.length;ve<Ce;ve++){const Se=j[ve],_e=ee.match(Z,Se.scopes)|1024;if(ue>0&&le[ue-1]===_e)continue;let Ee=Se.startIndex;ve===0?Ee=0:Ee<ce&&(Ee=ce),le[ue++]=Ee,le[ue++]=_e,ce=Ee}const pe=new Uint32Array(ue);for(let ve=0;ve<ue;ve++)pe[ve]=le[ve];return pe}tokenizeEncoded(Y,j,Z){const ee=this._actual.tokenize(Y,Z),le=this._toBinaryTokens(this._languageService.languageIdCodec,ee.tokens);let ue;return ee.endState.equals(Z)?ue=Z:ue=ee.endState,new y.EncodedTokenizationResult(le,ue)}}e.TokenizationSupportAdapter=g;function h(H){return typeof H.getInitialState=="function"}function m(H){return"tokenizeEncoded"in H}function C(H){return H&&typeof H.then=="function"}function w(H){const Y=v.StandaloneServices.get(i.IStandaloneThemeService);if(H){const j=[null];for(let Z=1,ee=H.length;Z<ee;Z++)j[Z]=L.Color.fromHex(H[Z]);Y.setColorMapOverride(j)}else Y.setColorMapOverride(null)}e.setColorMap=w;function D(H,Y){return m(Y)?new o(H,Y):new g(H,Y,v.StandaloneServices.get(p.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService))}function I(H,Y){const j=new y.LazyTokenizationSupport(async()=>{const Z=await Promise.resolve(Y.create());return Z?h(Z)?D(H,Z):new a.MonarchTokenizer(v.StandaloneServices.get(p.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),H,(0,b.compile)(H,Z),v.StandaloneServices.get(r.IConfigurationService)):null});return y.TokenizationRegistry.registerFactory(H,j)}e.registerTokensProviderFactory=I;function T(H,Y){if(!v.StandaloneServices.get(p.ILanguageService).isRegisteredLanguageId(H))throw new Error(`Cannot set tokens provider for unknown language ${H}`);return C(Y)?I(H,{create:()=>Y}):y.TokenizationRegistry.register(H,D(H,Y))}e.setTokensProvider=T;function A(H,Y){const j=Z=>new a.MonarchTokenizer(v.StandaloneServices.get(p.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),H,(0,b.compile)(H,Z),v.StandaloneServices.get(r.IConfigurationService));return C(Y)?I(H,{create:()=>Y}):y.TokenizationRegistry.register(H,j(Y))}e.setMonarchTokensProvider=A;function P(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).referenceProvider.register(H,Y)}e.registerReferenceProvider=P;function N(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).renameProvider.register(H,Y)}e.registerRenameProvider=N;function M(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).signatureHelpProvider.register(H,Y)}e.registerSignatureHelpProvider=M;function R(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).hoverProvider.register(H,{provideHover:(Z,ee,le)=>{const ue=Z.getWordAtPosition(ee);return Promise.resolve(Y.provideHover(Z,ee,le)).then(ce=>{if(ce)return!ce.range&&ue&&(ce.range=new k.Range(ee.lineNumber,ue.startColumn,ee.lineNumber,ue.endColumn)),ce.range||(ce.range=new k.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column)),ce})}})}e.registerHoverProvider=R;function x(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSymbolProvider.register(H,Y)}e.registerDocumentSymbolProvider=x;function O(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentHighlightProvider.register(H,Y)}e.registerDocumentHighlightProvider=O;function B(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkedEditingRangeProvider.register(H,Y)}e.registerLinkedEditingRangeProvider=B;function W(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).definitionProvider.register(H,Y)}e.registerDefinitionProvider=W;function V(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).implementationProvider.register(H,Y)}e.registerImplementationProvider=V;function K(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).typeDefinitionProvider.register(H,Y)}e.registerTypeDefinitionProvider=K;function F(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeLensProvider.register(H,Y)}e.registerCodeLensProvider=F;function q(H,Y,j){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeActionProvider.register(H,{providedCodeActionKinds:j?.providedCodeActionKinds,documentation:j?.documentation,provideCodeActions:(ee,le,ue,ce)=>{const ve=v.StandaloneServices.get(n.IMarkerService).read({resource:ee.uri}).filter(Ce=>k.Range.areIntersectingOrTouching(Ce,le));return Y.provideCodeActions(ee,le,{markers:ve,only:ue.only,trigger:ue.trigger},ce)},resolveCodeAction:Y.resolveCodeAction})}e.registerCodeActionProvider=q;function ie(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentFormattingEditProvider.register(H,Y)}e.registerDocumentFormattingEditProvider=ie;function ae(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(H,Y)}e.registerDocumentRangeFormattingEditProvider=ae;function ne(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).onTypeFormattingEditProvider.register(H,Y)}e.registerOnTypeFormattingEditProvider=ne;function $(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkProvider.register(H,Y)}e.registerLinkProvider=$;function J(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).completionProvider.register(H,Y)}e.registerCompletionItemProvider=J;function Q(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).colorProvider.register(H,Y)}e.registerColorProvider=Q;function re(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).foldingRangeProvider.register(H,Y)}e.registerFoldingRangeProvider=re;function de(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).declarationProvider.register(H,Y)}e.registerDeclarationProvider=de;function he(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).selectionRangeProvider.register(H,Y)}e.registerSelectionRangeProvider=he;function me(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSemanticTokensProvider.register(H,Y)}e.registerDocumentSemanticTokensProvider=me;function X(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(H,Y)}e.registerDocumentRangeSemanticTokensProvider=X;function U(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlineCompletionsProvider.register(H,Y)}e.registerInlineCompletionsProvider=U;function G(H,Y){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlayHintsProvider.register(H,Y)}e.registerInlayHintsProvider=G;function z(){return{register:u,getLanguages:f,onLanguage:d,onLanguageEncountered:s,getEncodedLanguageId:c,setLanguageConfiguration:l,setColorMap:w,registerTokensProviderFactory:I,setTokensProvider:T,setMonarchTokensProvider:A,registerReferenceProvider:P,registerRenameProvider:N,registerCompletionItemProvider:J,registerSignatureHelpProvider:M,registerHoverProvider:R,registerDocumentSymbolProvider:x,registerDocumentHighlightProvider:O,registerLinkedEditingRangeProvider:B,registerDefinitionProvider:W,registerImplementationProvider:V,registerTypeDefinitionProvider:K,registerCodeLensProvider:F,registerCodeActionProvider:q,registerDocumentFormattingEditProvider:ie,registerDocumentRangeFormattingEditProvider:ae,registerOnTypeFormattingEditProvider:ne,registerLinkProvider:$,registerColorProvider:Q,registerFoldingRangeProvider:re,registerDeclarationProvider:de,registerSelectionRangeProvider:he,registerDocumentSemanticTokensProvider:me,registerDocumentRangeSemanticTokensProvider:X,registerInlineCompletionsProvider:U,registerInlayHintsProvider:G,DocumentHighlightKind:_.DocumentHighlightKind,CompletionItemKind:_.CompletionItemKind,CompletionItemTag:_.CompletionItemTag,CompletionItemInsertTextRule:_.CompletionItemInsertTextRule,SymbolKind:_.SymbolKind,SymbolTag:_.SymbolTag,IndentAction:_.IndentAction,CompletionTriggerKind:_.CompletionTriggerKind,SignatureHelpTriggerKind:_.SignatureHelpTriggerKind,InlayHintKind:_.InlayHintKind,InlineCompletionTriggerKind:_.InlineCompletionTriggerKind,CodeActionTriggerType:_.CodeActionTriggerType,FoldingRangeKind:y.FoldingRangeKind,SelectedSuggestionInfo:y.SelectedSuggestionInfo}}e.createMonacoLanguagesAPI=z}),define(se[938],oe([1,0,36,338,936,937,362]),function(te,e,L,k,y,E,S){"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,S.FormattingConflicts.setFormatterSelector((v,b,a)=>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 _=globalThis.MonacoEnvironment;(_?.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 pi=this&&this.__createBinding||(Object.create?function(te,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(te,k,y)}:function(te,e,L,k){k===void 0&&(k=L),te[k]=e[L]}),vi=this&&this.__exportStar||function(te,e){for(var L in te)L!=="default"&&!Object.prototype.hasOwnProperty.call(e,L)&&pi(e,te,L)};define(se[940],oe([1,0,938,934,829,830,802,873,874,833,921,876]),function(te,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),vi(L,e)})}).call(this);
|
||
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* 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)=>{
|
||
"use strict";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<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,s)=>(typeof require<"u"?require:r)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var D=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var l=(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)=>(l(e,r,"default"),s&&l(s,r,"default")),c=(e,r,s)=>(s=e!=null?y(A(e)):{},l(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={},m={},u=class e{static getOrCreate(r){return m[r]||(m[r]=new e(r)),m[r]}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=u.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.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:()=>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;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* 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)=>{
|
||
"use strict";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<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,r)=>(typeof require<"u"?require:n)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw 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{constructor(n,r,a){this._onDidChange=new o.Emitter;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;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* 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)=>{
|
||
"use strict";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<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw 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{constructor(n,t,r){this._onDidChange=new a.Emitter;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;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* 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)=>{
|
||
"use strict";var moduleExports=(()=>{var y=Object.create;var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,o)=>(typeof require<"u"?require:n)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),v=(e,n)=>{for(var o in n)i(e,o,{get:n[o],enumerable:!0})},g=(e,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of h(n))!b.call(e,r)&&r!==o&&i(e,r,{get:()=>n[r],enumerable:!(a=f(n,r))||a.enumerable});return e};var m=(e,n,o)=>(o=e!=null?y(N(e)):{},g(n||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),x=e=>g(i({},"__esModule",{value:!0}),e);var u=O((J,c)=>{var A=m(s("vs/editor/editor.api"));c.exports=A});var C={};v(C,{getWorker:()=>S,jsonDefaults:()=>l});var t=m(u());var d=class{constructor(n,o,a){this._onDidChange=new t.Emitter;this._languageId=n,this.setDiagnosticsOptions(o),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(n){this._diagnosticsOptions=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},T={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},D={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},l=new d("json",T,D),S=()=>p().then(e=>e.getWorker());t.languages.json={jsonDefaults:l,getWorker:S};function p(){return new Promise((e,n)=>{s(["vs/language/json/jsonMode"],e,n)})}t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});t.languages.onLanguage("json",()=>{p().then(e=>e.setupMode(l))});return x(C);})();
|
||
return moduleExports;
|
||
});
|
||
|
||
/*!-----------------------------------------------------------------------------
|
||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
* Version: 0.46.0(21007360cad28648bdf46282a2592cb47c3a7a6f)
|
||
* 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)=>{
|
||
"use strict";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<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw 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{constructor(e,t,i,r,p){this._onDidChange=new l.Emitter;this._onDidExtraLibsChange=new l.Emitter;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 |