.001){y=!1;break}}let I=!0;return y&&C.width!==D&&(I=!1),C.width>v.width&&(I=!1),new Fy({pixelRatio:Xu.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:I,spaceWidth:r.width,middotWidth:w.width,wsmiddotWidth:S.width,maxDigitWidth:x},!0)}}class WT{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}const By=new iH;class Kl{constructor(e,t){this.key=e,this.migrate=t}apply(e){const t=Kl._read(e,this.key),i=s=>Kl._read(e,s),n=(s,r)=>Kl._write(e,s,r);this.migrate(t,i,n)}static _read(e,t){if(typeof e=="undefined")return;const i=t.indexOf(".");if(i>=0){const n=t.substring(0,i);return this._read(e[n],t.substring(i+1))}return e[t]}static _write(e,t,i){const n=t.indexOf(".");if(n>=0){const s=t.substring(0,n);e[s]=e[s]||{},this._write(e[s],t.substring(n+1),i);return}e[t]=i}}Kl.items=[];function Wg(o,e){Kl.items.push(new Kl(o,e))}function er(o,e){Wg(o,(t,i,n)=>{if(typeof t!="undefined"){for(const[s,r]of e)if(t===s){n(o,r);return}}})}function nH(o){Kl.items.forEach(e=>e.apply(o))}er("wordWrap",[[!0,"on"],[!1,"off"]]);er("lineNumbers",[[!0,"on"],[!1,"off"]]);er("cursorBlinking",[["visible","solid"]]);er("renderWhitespace",[[!0,"boundary"],[!1,"none"]]);er("renderLineHighlight",[[!0,"line"],[!1,"none"]]);er("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]);er("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]);er("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);er("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]);er("autoIndent",[[!1,"advanced"],[!0,"full"]]);er("matchBrackets",[[!0,"always"],[!1,"never"]]);Wg("autoClosingBrackets",(o,e,t)=>{o===!1&&(t("autoClosingBrackets","never"),typeof e("autoClosingQuotes")=="undefined"&&t("autoClosingQuotes","never"),typeof e("autoSurround")=="undefined"&&t("autoSurround","never"))});Wg("renderIndentGuides",(o,e,t)=>{typeof o!="undefined"&&(t("renderIndentGuides",void 0),typeof e("guides.indentation")=="undefined"&&t("guides.indentation",!!o))});Wg("highlightActiveIndentGuide",(o,e,t)=>{typeof o!="undefined"&&(t("highlightActiveIndentGuide",void 0),typeof e("guides.highlightActiveIndentation")=="undefined"&&t("guides.highlightActiveIndentation",!!o))});const sH={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"};Wg("suggest.filteredTypes",(o,e,t)=>{if(o&&typeof o=="object"){for(const i of Object.entries(sH))o[i[0]]===!1&&typeof e(`suggest.${i[1]}`)=="undefined"&&t(`suggest.${i[1]}`,!1);t("suggest.filteredTypes",void 0)}});Wg("quickSuggestions",(o,e,t)=>{if(typeof o=="boolean"){const i=o?"on":"off";t("quickSuggestions",{comments:i,strings:i,other:i})}});class oH{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new O,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}}const Z0=new oH,ll=qe("accessibilityService"),Km=new ce("accessibilityModeEnabled",!1);var rH=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aH=globalThis&&globalThis.__param||function(o,e){return function(t,i){e(t,i,o)}};let Wy=class extends z{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new O),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new O),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new HP,this.isSimpleWidget=e,this._containerObserver=this._register(new BP(i,t.dimension)),this._rawOptions=VT(t),this._validatedOptions=Il.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(tl.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(Z0.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(By.onDidChange(()=>this._recomputeOptions())),this._register(Xu.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const e=this._computeOptions(),t=Il.checkEquals(this.options,e);t!==null&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=bd.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:Z0.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Il.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:cH(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:$l||Ls,pixelRatio:Xu.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return By.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=VT(e);!Il.applyUpdate(this._rawOptions,t)||(this._validatedOptions=Il.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=lH(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}};Wy=rH([aH(3,ll)],Wy);function lH(o){let e=0;for(;o;)o=Math.floor(o/10),e++;return e||1}function cH(){let o="";return!Qa&&!Rx&&(o+="no-user-select "),Qa&&(o+="no-minimap-shadow ",o+="enable-user-select "),Ze&&(o+="mac "),o}class dH{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class hH{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class Il{static validateOptions(e){const t=new dH;for(const i of cu){const n=i.name==="_never_"?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new hH;for(const n of cu)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object"||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?ys(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Il._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of cu){const r=!Il._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=r,r&&(n=!0)}return n?new VP(i):null}static applyUpdate(e,t){let i=!1;for(const n of cu)if(t.hasOwnProperty(n.name)){const s=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=s.newValue,i=i||s.didChange}return i}}function VT(o){const e=ya(o);return nH(e),e}function ui(o,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");const s=`$memoize$${e}`;t[i]=function(...r){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,r)}),this[s]}}var uH=globalThis&&globalThis.__decorate||function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kt;(function(o){o.Tap="-monaco-gesturetap",o.Change="-monaco-gesturechange",o.Start="-monaco-gesturestart",o.End="-monaco-gesturesend",o.Contextmenu="-monaco-gesturecontextmenu"})(kt||(kt={}));class ut extends z{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(q(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(q(document,"touchend",e=>this.onTouchEnd(e))),this._register(q(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return ut.isTouchDevice()?(ut.INSTANCE||(ut.INSTANCE=new ut),ut.INSTANCE.targets.push(e),{dispose:()=>{ut.INSTANCE.targets=ut.INSTANCE.targets.filter(t=>t!==e)}}):z.None}static ignoreTarget(e){return ut.isTouchDevice()?(ut.INSTANCE||(ut.INSTANCE=new ut),ut.INSTANCE.ignoreTargets.push(e),{dispose:()=>{ut.INSTANCE.ignoreTargets=ut.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):z.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){const t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i 1?e.write1(8594):e.write1(65515);for(let mt=2;mt<=St;mt++)e.write1(160)}else Me=2,St=1,e.write1(f),e.write1(8204);k+=Me,x+=St,w>=c&&(S+=St)}}else for(e.appendASCII(62);w =c&&(S+=Me)}de?y++:y=0,w>=r&&!C&&R.isPseudoAfter()&&(C=!0,v.setColumnInfo(w+1,D,k,x)),e.appendASCIIString("'):e.appendASCIIString("");for(let D=0,I=l.length;D=c&&(Me+=mt)}}for(ae&&(e.appendASCIIString(' style="width:'),e.appendASCIIString(String(g*we)),e.appendASCIIString('px"')),e.appendASCII(62);w=b,w=d+n<=h.height-v;return this._fixedOverflowWidgets?{fitsAbove:C,aboveTop:Math.max(c,b),aboveLeft:g,fitsBelow:w,belowTop:d,belowLeft:_}:{fitsAbove:C,aboveTop:r,aboveLeft:u,fitsBelow:w,belowTop:a,belowLeft:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new gf(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const h of t)h.lineNumbere.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&Fw(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+e.scrollTop-e.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"&&Fw(this._actual.afterRender,this._actual,this._renderData.position)}}function Fw(o,e,...t){try{return o.call(e,...t)}catch(i){return null}}class y4 extends zg{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(133);this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new oe(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map(n=>n.positionLineNumber);t.sort((n,s)=>n-s),ys(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every(n=>n.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(133);return this._lineHeight=t.get(61),this._renderLineHighlight=t.get(87),this._renderLineHighlightOnlyWhenFocus=t.get(88),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return this._renderLineHighlightOnlyWhenFocus?(this._focused=e.isFocused,!0):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let r=0;const a=[];for(let l=i;l<=n;l++){const c=l-i;for(;r=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class C$ extends y4{_renderOne(e){return``}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class w$ extends y4{_renderOne(e){return``}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}Rt((o,e)=>{const t=o.getColor(d4);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||o.defines(t2)){const i=o.getColor(t2);i&&(e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),yn(o.type)&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class S$ extends zg{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(61),this._typicalHalfwidthCharacterWidth=t.get(46).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let l=0,c=t.length;lr)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const l=this._context.viewModel.getLineMinColumn(n);return ae.width||i+f>e.height){console.warn("bad render request outside image data");return}const _=d?this.charDataLight:this.charDataNormal,b=q$(n,c),v=e.width*4,C=a.r,w=a.g,S=a.b,k=s.r-C,x=s.g-w,y=s.b-S,D=Math.max(r,l),I=e.data;let R=b*u*g,P=i*v+t*4;for(let H=0;H1){for(let S=0,k=a-1;Sthis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return et&&(x=t-f);const y=x-f,D=y+g;y>C+1?(w!==0&&d.fillRect(_,v,b,C-v),v=y,C=D):D>C&&(C=D)}d.fillRect(_,v,b,C-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,t),d.stroke(),d.moveTo(0,0),d.lineTo(e,0),d.stroke())}}class h2{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class Zp{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.color{this._isVisible?this._hide():this._show()},Yp.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},Yp.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Bi.Line:e+=" cursor-line-style";break;case Bi.Block:e+=" cursor-block-style";break;case Bi.Underline:e+=" cursor-underline-style";break;case Bi.LineThin:e+=" cursor-line-thin-style";break;case Bi.BlockOutline:e+=" cursor-block-outline-style";break;case Bi.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e