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AAmB,IAC3C7H,KAAK4H,UAAUC,EAEvB,KAER,CACA,qBAAAkB,GACI,OAAO,CACX,CACA,oBAAAC,GACI,OAAsC,OAA9BhJ,KAAKR,QAAQ+D,MAAMlD,OAAkB,EAAI4I,SAASjJ,KAAKR,QAAQ+D,MAAMlD,SAAYL,KAAKiF,4BAA8B,CAChI,CACA,sBAAAiE,GACI,MAAMhE,EAAalF,KAAKqC,OAAO8C,gBAC/B,OAAOD,EAAW7B,MAAQ6B,EAAWT,QAAQC,YACjD,E,gUCxXJ,iCAA4C,EAC5C,+BAAyC,EACzC,6BAAwC,EACxC,qCAAgD,EAGhD,2BAAyC,CAACyE,EAAWrG,EAAUsG,IAASC,QAAQC,QAAQH,EAAU,MAClG,MAAMI,GAAM,SACZA,EAAIlH,QAAS,UACbkH,EAAIC,WAAY,UACT,MAAMC,EAA0BF,EAAIE,wBAC9BC,EAAUH,EAAIG,QACdC,EAAUJ,EAAII,QACdC,EAASL,EAAIK,OACbC,EAAWN,EAAIM,SACfC,EAAQP,EAAIO,MACZC,EAAYR,EAAIQ,UAChBC,EAAqBT,EAAIS,mBACzBC,EAAiBV,EAAIU,eACrBC,EAAYX,EAAIW,UAChBC,EAAMZ,EAAIY,IACVC,EAAQb,EAAIa,MACZ/H,EAASkH,EAAIlH,OACbmH,EAAYD,EAAIC,UACvBa,EAAoBC,WAAWC,oBAChCF,aAA6D,EAASA,EAAkBG,YAAiC,mBAAXC,QAAyB,UACxIH,WAAWI,OAASnB,QAEU,IAAvBe,WAAWK,SAAgE,mBAA9BL,WAAWK,QAAQC,QACvEN,WAAWK,QAAQC,OAAO,CACtBC,uBAAwB,CACpB,8BACA,mCACA,qCACA,0CACA,aACA,wBACA,eACA,oBACA,aACA,mBACA,6C","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/contrib/zoneWidget/browser/zoneWidget.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/editor.api.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../../../base/browser/dom.js';\nimport { Sash } from '../../../../base/browser/ui/sash/sash.js';\nimport { Color, RGBA } from '../../../../base/common/color.js';\nimport { IdGenerator } from '../../../../base/common/idGenerator.js';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport * as objects from '../../../../base/common/objects.js';\nimport './zoneWidget.css';\nimport { Range } from '../../../common/core/range.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nconst defaultColor = new Color(new RGBA(0, 122, 204));\nconst defaultOptions = {\n showArrow: true,\n showFrame: true,\n className: '',\n frameColor: defaultColor,\n arrowColor: defaultColor,\n keepEditorSelection: false\n};\nconst WIDGET_ID = 'vs.editor.contrib.zoneWidget';\nclass ViewZoneDelegate {\n constructor(domNode, afterLineNumber, afterColumn, heightInLines, onDomNodeTop, onComputedHeight, showInHiddenAreas, ordinal) {\n this.id = ''; // A valid zone id should be greater than 0\n this.domNode = domNode;\n this.afterLineNumber = afterLineNumber;\n this.afterColumn = afterColumn;\n this.heightInLines = heightInLines;\n this.showInHiddenAreas = showInHiddenAreas;\n this.ordinal = ordinal;\n this._onDomNodeTop = onDomNodeTop;\n this._onComputedHeight = onComputedHeight;\n }\n onDomNodeTop(top) {\n this._onDomNodeTop(top);\n }\n onComputedHeight(height) {\n this._onComputedHeight(height);\n }\n}\nexport class OverlayWidgetDelegate {\n constructor(id, domNode) {\n this._id = id;\n this._domNode = domNode;\n }\n getId() {\n return this._id;\n }\n getDomNode() {\n return this._domNode;\n }\n getPosition() {\n return null;\n }\n}\nclass Arrow {\n constructor(_editor) {\n this._editor = _editor;\n this._ruleName = Arrow._IdGenerator.nextId();\n this._decorations = this._editor.createDecorationsCollection();\n this._color = null;\n this._height = -1;\n }\n dispose() {\n this.hide();\n dom.removeCSSRulesContainingSelector(this._ruleName);\n }\n set color(value) {\n if (this._color !== value) {\n this._color = value;\n this._updateStyle();\n }\n }\n set height(value) {\n if (this._height !== value) {\n this._height = value;\n this._updateStyle();\n }\n }\n _updateStyle() {\n dom.removeCSSRulesContainingSelector(this._ruleName);\n dom.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 !important; margin-left: -${this._height}px; `);\n }\n show(where) {\n if (where.column === 1) {\n // the arrow isn't pretty at column 1 and we need to push it out a little\n where = { lineNumber: where.lineNumber, column: 2 };\n }\n this._decorations.set([{\n range: Range.fromPositions(where),\n options: {\n description: 'zone-widget-arrow',\n className: this._ruleName,\n stickiness: 1 /* TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */\n }\n }]);\n }\n hide() {\n this._decorations.clear();\n }\n}\nArrow._IdGenerator = new IdGenerator('.arrow-decoration-');\nexport class ZoneWidget {\n constructor(editor, options = {}) {\n this._arrow = null;\n this._overlayWidget = null;\n this._resizeSash = null;\n this._viewZone = null;\n this._disposables = new DisposableStore();\n this.container = null;\n this._isShowing = false;\n this.editor = editor;\n this._positionMarkerId = this.editor.createDecorationsCollection();\n this.options = objects.deepClone(options);\n objects.mixin(this.options, defaultOptions, false);\n this.domNode = document.createElement('div');\n if (!this.options.isAccessible) {\n this.domNode.setAttribute('aria-hidden', 'true');\n this.domNode.setAttribute('role', 'presentation');\n }\n this._disposables.add(this.editor.onDidLayoutChange((info) => {\n const width = this._getWidth(info);\n this.domNode.style.width = width + 'px';\n this.domNode.style.left = this._getLeft(info) + 'px';\n this._onWidth(width);\n }));\n }\n dispose() {\n if (this._overlayWidget) {\n this.editor.removeOverlayWidget(this._overlayWidget);\n this._overlayWidget = null;\n }\n if (this._viewZone) {\n this.editor.changeViewZones(accessor => {\n if (this._viewZone) {\n accessor.removeZone(this._viewZone.id);\n }\n this._viewZone = null;\n });\n }\n this._positionMarkerId.clear();\n this._disposables.dispose();\n }\n create() {\n this.domNode.classList.add('zone-widget');\n if (this.options.className) {\n this.domNode.classList.add(this.options.className);\n }\n this.container = document.createElement('div');\n this.container.classList.add('zone-widget-container');\n this.domNode.appendChild(this.container);\n if (this.options.showArrow) {\n this._arrow = new Arrow(this.editor);\n this._disposables.add(this._arrow);\n }\n this._fillContainer(this.container);\n this._initSash();\n this._applyStyles();\n }\n style(styles) {\n if (styles.frameColor) {\n this.options.frameColor = styles.frameColor;\n }\n if (styles.arrowColor) {\n this.options.arrowColor = styles.arrowColor;\n }\n this._applyStyles();\n }\n _applyStyles() {\n if (this.container && this.options.frameColor) {\n const frameColor = this.options.frameColor.toString();\n this.container.style.borderTopColor = frameColor;\n this.container.style.borderBottomColor = frameColor;\n }\n if (this._arrow && this.options.arrowColor) {\n const arrowColor = this.options.arrowColor.toString();\n this._arrow.color = arrowColor;\n }\n }\n _getWidth(info) {\n return info.width - info.minimap.minimapWidth - info.verticalScrollbarWidth;\n }\n _getLeft(info) {\n // If minimap is to the left, we move beyond it\n if (info.minimap.minimapWidth > 0 && info.minimap.minimapLeft === 0) {\n return info.minimap.minimapWidth;\n }\n return 0;\n }\n _onViewZoneTop(top) {\n this.domNode.style.top = top + 'px';\n }\n _onViewZoneHeight(height) {\n var _a;\n this.domNode.style.height = `${height}px`;\n if (this.container) {\n const containerHeight = height - this._decoratingElementsHeight();\n this.container.style.height = `${containerHeight}px`;\n const layoutInfo = this.editor.getLayoutInfo();\n this._doLayout(containerHeight, this._getWidth(layoutInfo));\n }\n (_a = this._resizeSash) === null || _a === void 0 ? void 0 : _a.layout();\n }\n get position() {\n const range = this._positionMarkerId.getRange(0);\n if (!range) {\n return undefined;\n }\n return range.getStartPosition();\n }\n show(rangeOrPos, heightInLines) {\n const range = Range.isIRange(rangeOrPos) ? Range.lift(rangeOrPos) : Range.fromPositions(rangeOrPos);\n this._isShowing = true;\n this._showImpl(range, heightInLines);\n this._isShowing = false;\n this._positionMarkerId.set([{ range, options: ModelDecorationOptions.EMPTY }]);\n }\n hide() {\n var _a;\n if (this._viewZone) {\n this.editor.changeViewZones(accessor => {\n if (this._viewZone) {\n accessor.removeZone(this._viewZone.id);\n }\n });\n this._viewZone = null;\n }\n if (this._overlayWidget) {\n this.editor.removeOverlayWidget(this._overlayWidget);\n this._overlayWidget = null;\n }\n (_a = this._arrow) === null || _a === void 0 ? void 0 : _a.hide();\n this._positionMarkerId.clear();\n }\n _decoratingElementsHeight() {\n const lineHeight = this.editor.getOption(67 /* EditorOption.lineHeight */);\n let result = 0;\n if (this.options.showArrow) {\n const arrowHeight = Math.round(lineHeight / 3);\n result += 2 * arrowHeight;\n }\n if (this.options.showFrame) {\n const frameThickness = Math.round(lineHeight / 9);\n result += 2 * frameThickness;\n }\n return result;\n }\n _showImpl(where, heightInLines) {\n const position = where.getStartPosition();\n const layoutInfo = this.editor.getLayoutInfo();\n const width = this._getWidth(layoutInfo);\n this.domNode.style.width = `${width}px`;\n this.domNode.style.left = this._getLeft(layoutInfo) + 'px';\n // Render the widget as zone (rendering) and widget (lifecycle)\n const viewZoneDomNode = document.createElement('div');\n viewZoneDomNode.style.overflow = 'hidden';\n const lineHeight = this.editor.getOption(67 /* EditorOption.lineHeight */);\n // adjust heightInLines to viewport\n if (!this.options.allowUnlimitedHeight) {\n const maxHeightInLines = Math.max(12, (this.editor.getLayoutInfo().height / lineHeight) * 0.8);\n heightInLines = Math.min(heightInLines, maxHeightInLines);\n }\n let arrowHeight = 0;\n let frameThickness = 0;\n // Render the arrow one 1/3 of an editor line height\n if (this._arrow && this.options.showArrow) {\n arrowHeight = Math.round(lineHeight / 3);\n this._arrow.height = arrowHeight;\n this._arrow.show(position);\n }\n // Render the frame as 1/9 of an editor line height\n if (this.options.showFrame) {\n frameThickness = Math.round(lineHeight / 9);\n }\n // insert zone widget\n this.editor.changeViewZones((accessor) => {\n if (this._viewZone) {\n accessor.removeZone(this._viewZone.id);\n }\n if (this._overlayWidget) {\n this.editor.removeOverlayWidget(this._overlayWidget);\n this._overlayWidget = null;\n }\n this.domNode.style.top = '-1000px';\n this._viewZone = new ViewZoneDelegate(viewZoneDomNode, position.lineNumber, position.column, heightInLines, (top) => this._onViewZoneTop(top), (height) => this._onViewZoneHeight(height), this.options.showInHiddenAreas, this.options.ordinal);\n this._viewZone.id = accessor.addZone(this._viewZone);\n this._overlayWidget = new OverlayWidgetDelegate(WIDGET_ID + this._viewZone.id, this.domNode);\n this.editor.addOverlayWidget(this._overlayWidget);\n });\n if (this.container && this.options.showFrame) {\n const width = this.options.frameWidth ? this.options.frameWidth : frameThickness;\n this.container.style.borderTopWidth = width + 'px';\n this.container.style.borderBottomWidth = width + 'px';\n }\n const containerHeight = heightInLines * lineHeight - this._decoratingElementsHeight();\n if (this.container) {\n this.container.style.top = arrowHeight + 'px';\n this.container.style.height = containerHeight + 'px';\n this.container.style.overflow = 'hidden';\n }\n this._doLayout(containerHeight, width);\n if (!this.options.keepEditorSelection) {\n this.editor.setSelection(where);\n }\n const model = this.editor.getModel();\n if (model) {\n const range = model.validateRange(new Range(where.startLineNumber, 1, where.endLineNumber + 1, 1));\n this.revealRange(range, range.startLineNumber === model.getLineCount());\n }\n }\n revealRange(range, isLastLine) {\n if (isLastLine) {\n this.editor.revealLineNearTop(range.endLineNumber, 0 /* ScrollType.Smooth */);\n }\n else {\n this.editor.revealRange(range, 0 /* ScrollType.Smooth */);\n }\n }\n setCssClass(className, classToReplace) {\n if (!this.container) {\n return;\n }\n if (classToReplace) {\n this.container.classList.remove(classToReplace);\n }\n this.container.classList.add(className);\n }\n _onWidth(widthInPixel) {\n // implement in subclass\n }\n _doLayout(heightInPixel, widthInPixel) {\n // implement in subclass\n }\n _relayout(newHeightInLines) {\n if (this._viewZone && this._viewZone.heightInLines !== newHeightInLines) {\n this.editor.changeViewZones(accessor => {\n if (this._viewZone) {\n this._viewZone.heightInLines = newHeightInLines;\n accessor.layoutZone(this._viewZone.id);\n }\n });\n }\n }\n // --- sash\n _initSash() {\n if (this._resizeSash) {\n return;\n }\n this._resizeSash = this._disposables.add(new Sash(this.domNode, this, { orientation: 1 /* Orientation.HORIZONTAL */ }));\n if (!this.options.isResizeable) {\n this._resizeSash.state = 0 /* SashState.Disabled */;\n }\n let data;\n this._disposables.add(this._resizeSash.onDidStart((e) => {\n if (this._viewZone) {\n data = {\n startY: e.startY,\n heightInLines: this._viewZone.heightInLines,\n };\n }\n }));\n this._disposables.add(this._resizeSash.onDidEnd(() => {\n data = undefined;\n }));\n this._disposables.add(this._resizeSash.onDidChange((evt) => {\n if (data) {\n const lineDelta = (evt.currentY - data.startY) / this.editor.getOption(67 /* EditorOption.lineHeight */);\n const roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta);\n const newHeightInLines = data.heightInLines + roundedLineDelta;\n if (newHeightInLines > 5 && newHeightInLines < 35) {\n this._relayout(newHeightInLines);\n }\n }\n }));\n }\n getHorizontalSashLeft() {\n return 0;\n }\n getHorizontalSashTop() {\n return (this.domNode.style.height === null ? 0 : parseInt(this.domNode.style.height)) - (this._decoratingElementsHeight() / 2);\n }\n getHorizontalSashWidth() {\n const layoutInfo = this.editor.getLayoutInfo();\n return layoutInfo.width - layoutInfo.minimap.minimapWidth;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { EditorOptions } from './common/config/editorOptions.js';\nimport { createMonacoBaseAPI } from './common/services/editorBaseApi.js';\nimport { createMonacoEditorAPI } from './standalone/browser/standaloneEditor.js';\nimport { createMonacoLanguagesAPI } from './standalone/browser/standaloneLanguages.js';\nimport { FormattingConflicts } from './contrib/format/browser/format.js';\n// Set defaults for standalone editor\nEditorOptions.wrappingIndent.defaultValue = 0 /* WrappingIndent.None */;\nEditorOptions.glyphMargin.defaultValue = false;\nEditorOptions.autoIndent.defaultValue = 3 /* EditorAutoIndentStrategy.Advanced */;\nEditorOptions.overviewRulerLanes.defaultValue = 2;\n// We need to register a formatter selector which simply picks the first available formatter.\n// See https://github.com/microsoft/monaco-editor/issues/2327\nFormattingConflicts.setFormatterSelector((formatter, document, mode) => Promise.resolve(formatter[0]));\nconst api = createMonacoBaseAPI();\napi.editor = createMonacoEditorAPI();\napi.languages = createMonacoLanguagesAPI();\nexport const CancellationTokenSource = api.CancellationTokenSource;\nexport const Emitter = api.Emitter;\nexport const KeyCode = api.KeyCode;\nexport const KeyMod = api.KeyMod;\nexport const Position = api.Position;\nexport const Range = api.Range;\nexport const Selection = api.Selection;\nexport const SelectionDirection = api.SelectionDirection;\nexport const MarkerSeverity = api.MarkerSeverity;\nexport const MarkerTag = api.MarkerTag;\nexport const Uri = api.Uri;\nexport const Token = api.Token;\nexport const editor = api.editor;\nexport const languages = api.languages;\nconst monacoEnvironment = globalThis.MonacoEnvironment;\nif ((monacoEnvironment === null || monacoEnvironment === void 0 ? void 0 : monacoEnvironment.globalAPI) || (typeof define === 'function' && define.amd)) {\n globalThis.monaco = api;\n}\nif (typeof globalThis.require !== 'undefined' && typeof globalThis.require.config === 'function') {\n globalThis.require.config({\n ignoreDuplicateModules: [\n 'vscode-languageserver-types',\n 'vscode-languageserver-types/main',\n 'vscode-languageserver-textdocument',\n 'vscode-languageserver-textdocument/main',\n 'vscode-nls',\n 'vscode-nls/vscode-nls',\n 'jsonc-parser',\n 'jsonc-parser/main',\n 'vscode-uri',\n 'vscode-uri/index',\n 'vs/basic-languages/typescript/typescript'\n ]\n });\n}\n"],"names":["defaultColor","defaultOptions","showArrow","showFrame","className","frameColor","arrowColor","keepEditorSelection","ViewZoneDelegate","constructor","domNode","afterLineNumber","afterColumn","heightInLines","onDomNodeTop","onComputedHeight","showInHiddenAreas","ordinal","this","id","_onDomNodeTop","_onComputedHeight","top","height","OverlayWidgetDelegate","_id","_domNode","getId","getDomNode","getPosition","Arrow","_editor","_ruleName","_IdGenerator","nextId","_decorations","createDecorationsCollection","_color","_height","dispose","hide","color","value","_updateStyle","show","where","column","lineNumber","set","range","options","description","stickiness","clear","ZoneWidget","editor","_arrow","_overlayWidget","_resizeSash","_viewZone","_disposables","container","_isShowing","_positionMarkerId","document","createElement","isAccessible","setAttribute","add","onDidLayoutChange","info","width","_getWidth","style","left","_getLeft","_onWidth","removeOverlayWidget","changeViewZones","accessor","removeZone","create","classList","appendChild","_fillContainer","_initSash","_applyStyles","styles","toString","borderTopColor","borderBottomColor","minimap","minimapWidth","verticalScrollbarWidth","minimapLeft","_onViewZoneTop","_onViewZoneHeight","_a","containerHeight","_decoratingElementsHeight","layoutInfo","getLayoutInfo","_doLayout","layout","position","getRange","getStartPosition","rangeOrPos","_showImpl","lineHeight","getOption","result","Math","round","viewZoneDomNode","overflow","allowUnlimitedHeight","maxHeightInLines","max","min","arrowHeight","frameThickness","addZone","addOverlayWidget","frameWidth","borderTopWidth","borderBottomWidth","setSelection","model","getModel","validateRange","startLineNumber","endLineNumber","revealRange","getLineCount","isLastLine","revealLineNearTop","setCssClass","classToReplace","remove","widthInPixel","heightInPixel","_relayout","newHeightInLines","layoutZone","data","orientation","isResizeable","state","onDidStart","e","startY","onDidEnd","undefined","onDidChange","evt","lineDelta","currentY","roundedLineDelta","ceil","floor","getHorizontalSashLeft","getHorizontalSashTop","parseInt","getHorizontalSashWidth","formatter","mode","Promise","resolve","api","languages","CancellationTokenSource","Emitter","KeyCode","KeyMod","Position","Range","Selection","SelectionDirection","MarkerSeverity","MarkerTag","Uri","Token","monacoEnvironment","globalThis","MonacoEnvironment","globalAPI","define","monaco","require","config","ignoreDuplicateModules"],"sourceRoot":""}