@opensumi/cli-engine 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/lib/browser/1.browser.js +1 -0
- package/lib/browser/1.worker-host.js +1 -0
- package/lib/browser/2.browser.js +1 -0
- package/lib/browser/3.browser.js +1 -0
- package/lib/browser/assets.json +79 -0
- package/lib/browser/browser.js +2 -0
- package/lib/browser/browser.js.LICENSE.txt +98 -0
- package/lib/browser/fonts/boolean-dark.svg +3 -0
- package/lib/browser/fonts/boolean-light.svg +3 -0
- package/lib/browser/fonts/breakpoint-conditional-disabled.svg +4 -0
- package/lib/browser/fonts/breakpoint-conditional-unverified.svg +4 -0
- package/lib/browser/fonts/breakpoint-conditional.svg +4 -0
- package/lib/browser/fonts/breakpoint-disabled.svg +4 -0
- package/lib/browser/fonts/breakpoint-hint.svg +4 -0
- package/lib/browser/fonts/breakpoint-log-disabled.svg +4 -0
- package/lib/browser/fonts/breakpoint-log-unverified.svg +4 -0
- package/lib/browser/fonts/breakpoint-log.svg +4 -0
- package/lib/browser/fonts/breakpoint-unsupported.svg +4 -0
- package/lib/browser/fonts/breakpoint-unverified.svg +4 -0
- package/lib/browser/fonts/breakpoint.svg +4 -0
- package/lib/browser/fonts/class-dark.svg +3 -0
- package/lib/browser/fonts/class-light.svg +3 -0
- package/lib/browser/fonts/codicon.ttf +0 -0
- package/lib/browser/fonts/constant-dark.svg +4 -0
- package/lib/browser/fonts/constant-light.svg +4 -0
- package/lib/browser/fonts/current-and-breakpoint.svg +4 -0
- package/lib/browser/fonts/current-arrow.svg +4 -0
- package/lib/browser/fonts/enumerator-dark.svg +3 -0
- package/lib/browser/fonts/enumerator-item-dark.svg +3 -0
- package/lib/browser/fonts/enumerator-item-light.svg +3 -0
- package/lib/browser/fonts/enumerator-light.svg +3 -0
- package/lib/browser/fonts/event-dark.svg +3 -0
- package/lib/browser/fonts/event-light.svg +3 -0
- package/lib/browser/fonts/field-dark.svg +3 -0
- package/lib/browser/fonts/field-light.svg +3 -0
- package/lib/browser/fonts/file-dark.svg +3 -0
- package/lib/browser/fonts/file-light.svg +3 -0
- package/lib/browser/fonts/indexer-dark.svg +3 -0
- package/lib/browser/fonts/indexer-light.svg +3 -0
- package/lib/browser/fonts/interface-dark.svg +3 -0
- package/lib/browser/fonts/interface-light.svg +3 -0
- package/lib/browser/fonts/keyword-dark.svg +3 -0
- package/lib/browser/fonts/keyword-light.svg +3 -0
- package/lib/browser/fonts/loading-dark.svg +52 -0
- package/lib/browser/fonts/loading-hc.svg +52 -0
- package/lib/browser/fonts/loading.svg +52 -0
- package/lib/browser/fonts/method-dark.svg +3 -0
- package/lib/browser/fonts/method-light.svg +3 -0
- package/lib/browser/fonts/namespace-dark.svg +3 -0
- package/lib/browser/fonts/namespace-light.svg +3 -0
- package/lib/browser/fonts/numeric-dark.svg +3 -0
- package/lib/browser/fonts/numeric-light.svg +3 -0
- package/lib/browser/fonts/operator-dark.svg +3 -0
- package/lib/browser/fonts/operator-light.svg +3 -0
- package/lib/browser/fonts/property-dark.svg +3 -0
- package/lib/browser/fonts/property-light.svg +3 -0
- package/lib/browser/fonts/snippet-dark.svg +3 -0
- package/lib/browser/fonts/snippet-light.svg +3 -0
- package/lib/browser/fonts/stackframe-and-breakpoint.svg +4 -0
- package/lib/browser/fonts/stackframe-arrow.svg +4 -0
- package/lib/browser/fonts/string-dark.svg +3 -0
- package/lib/browser/fonts/string-light.svg +3 -0
- package/lib/browser/fonts/structure-dark.svg +3 -0
- package/lib/browser/fonts/structure-light.svg +3 -0
- package/lib/browser/fonts/template-dark.svg +3 -0
- package/lib/browser/fonts/template-light.svg +3 -0
- package/lib/browser/fonts/variable-dark.svg +3 -0
- package/lib/browser/fonts/variable-light.svg +3 -0
- package/lib/browser/index.html +42 -0
- package/lib/browser/loader.js +1747 -0
- package/lib/browser/main.css +1 -0
- package/lib/browser/worker-host.js +40 -0
- package/lib/hosted/1.ext.process.js +1 -0
- package/lib/hosted/ext.process.js +37 -0
- package/lib/node/env.d.ts +2 -0
- package/lib/node/env.js +35 -0
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.js +45 -0
- package/lib/node/modules.d.ts +2 -0
- package/lib/node/modules.js +6 -0
- package/lib/node/openBrowser.d.ts +5 -0
- package/lib/node/openBrowser.js +116 -0
- package/lib/node/server.d.ts +18 -0
- package/lib/node/server.js +171 -0
- package/lib/node/webview/index.html +12 -0
- package/lib/node/webview/webview.js +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{3137:function(e,t,i){self,e.exports=(()=>{"use strict";var e={903:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;const s=i(855),r=i(302),o=i(713),n=i(147),a=i(634),l=i(160),h=i(503),c=i(14);t.BaseRenderLayer=class{constructor(e,t,i,s,r,o,n,a,l,h){this._container=e,this._alpha=s,this._colors=r,this._rendererId=o,this._bufferService=n,this._optionsService=a,this._decorationService=l,this._coreBrowserService=h,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${t}-layer`),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}get canvas(){return this._canvas}dispose(){var e;(0,h.removeElementFromParent)(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}onOptionsChanged(){}onBlur(){}onFocus(){}onCursorMove(){}onGridChanged(e,t){}onSelectionChanged(e,t,i=!1){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}setColors(e){this._refreshCharAtlas(e)}_setTransparency(e){if(e===this._alpha)return;const t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,o.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)}clearTextureAtlas(){var e;null===(e=this._charAtlas)||void 0===e||e.clear()}_fillCells(e,t,i,s){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight)}_fillMiddleLineAtCells(e,t,i=1){const s=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-s-this._coreBrowserService.dpr,i*this._scaledCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(e,t,i=1,s=0){this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight+s-this._coreBrowserService.dpr-1,i*this._scaledCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(e,t,i=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const s=this._coreBrowserService.dpr;this._ctx.lineWidth=s;for(let r=0;r<i;r++){const i=(e+r)*this._scaledCellWidth,o=(e+r+.5)*this._scaledCellWidth,n=(e+r+1)*this._scaledCellWidth,a=(t+1)*this._scaledCellHeight-s-1,l=a-s,h=a+s;this._ctx.moveTo(i,a),this._ctx.bezierCurveTo(i,l,o,l,o,a),this._ctx.bezierCurveTo(o,h,n,h,n,a)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(e,t,i=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const s=this._coreBrowserService.dpr;this._ctx.lineWidth=s,this._ctx.setLineDash([2*s,s]);const r=e*this._scaledCellWidth,o=(t+1)*this._scaledCellHeight-s-1;this._ctx.moveTo(r,o);for(let t=0;t<i;t++){const s=(e+i+t)*this._scaledCellWidth;this._ctx.lineTo(s,o)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(e,t,i=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const s=this._coreBrowserService.dpr;this._ctx.lineWidth=s,this._ctx.setLineDash([4*s,3*s]);const r=e*this._scaledCellWidth,o=(e+i)*this._scaledCellWidth,n=(t+1)*this._scaledCellHeight-s-1;this._ctx.moveTo(r,n),this._ctx.lineTo(o,n),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,this._coreBrowserService.dpr*i,this._scaledCellHeight)}_strokeRectAtCell(e,t,i,s){const r=this._coreBrowserService.dpr;this._ctx.lineWidth=r,this._ctx.strokeRect(e*this._scaledCellWidth+r/2,t*this._scaledCellHeight+r/2,i*this._scaledCellWidth-r,s*this._scaledCellHeight-r)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,i,s){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight))}_fillCharTrueColor(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=r.TEXT_BASELINE,this._clipRow(i);let s=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(s=(0,c.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),s||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)}_drawChars(e,t,i){var o;const n=this._getContrastColor(e,t,i);if(n||e.isFgRGB()||e.isBgRGB())return void this._drawUncachedChars(e,t,i,n);let a,l;e.isInverse()?(a=e.isBgDefault()?r.INVERTED_DEFAULT_COLOR:e.getBgColor(),l=e.isFgDefault()?r.INVERTED_DEFAULT_COLOR:e.getFgColor()):(l=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),a=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),a+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&a<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=l,this._currentGlyphIdentifier.fg=a,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();let h=!1;this._decorationService.forEachDecorationAtCell(t,i,void 0,e=>{(e.backgroundColorRGB||e.foregroundColorRGB)&&(h=!0)}),!h&&(null===(o=this._charAtlas)||void 0===o?void 0:o.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,i)}_drawUncachedChars(e,t,i,s){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=r.TEXT_BASELINE,e.isInverse())if(s)this._ctx.fillStyle=s.css;else if(e.isBgDefault())this._ctx.fillStyle=l.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle=`rgb(${n.AttributeData.toColorRGB(e.getBgColor()).join(",")})`;else{let t=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&t<8&&(t+=8),this._ctx.fillStyle=this._colors.ansi[t].css}else if(s)this._ctx.fillStyle=s.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle=`rgb(${n.AttributeData.toColorRGB(e.getFgColor()).join(",")})`;else{let t=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&t<8&&(t+=8),this._ctx.fillStyle=this._colors.ansi[t].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=r.DIM_OPACITY);let o=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(o=(0,c.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),o||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()}_clipRow(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()}_getFont(e,t){return`${t?"italic":""} ${e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}_getContrastColor(e,t,i){let s,r,o=!1;if(this._decorationService.forEachDecorationAtCell(t,i,void 0,e=>{"top"!==e.options.layer&&o||(e.backgroundColorRGB&&(s=e.backgroundColorRGB.rgba),e.foregroundColorRGB&&(r=e.foregroundColorRGB.rgba),o="top"===e.options.layer)}),o||this._colors.selectionForeground&&this._isCellInSelection(t,i)&&(r=this._colors.selectionForeground.rgba),!s&&!r&&(1===this._optionsService.rawOptions.minimumContrastRatio||(0,a.excludeFromContrastRatioDemands)(e.getCode())))return;if(!s&&!r){const t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0}let n=e.getFgColor(),h=e.getFgColorMode(),c=e.getBgColor(),d=e.getBgColorMode();const _=!!e.isInverse(),u=!!e.isInverse();if(_){const e=n;n=c,c=e;const t=h;h=d,d=t}const f=this._resolveBackgroundRgba(void 0!==s?50331648:d,null!=s?s:c,_),g=this._resolveForegroundRgba(h,n,_,u);let C=l.rgba.ensureContrastRatio(null!=s?s:f,null!=r?r:g,this._optionsService.rawOptions.minimumContrastRatio);if(!C){if(!r)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);C=r}const p={css:l.channels.toCss(C>>24&255,C>>16&255,C>>8&255),rgba:C};return s||r||this._colors.contrastCache.setColor(e.bg,e.fg,p),p}_resolveBackgroundRgba(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}}_resolveForegroundRgba(e,t,i,s){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&s&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}}_isCellInSelection(e,t){const i=this._selectionStart,s=this._selectionEnd;return!(!i||!s)&&(this._columnSelectMode?e>=i[0]&&t>=i[1]&&e<s[0]&&t<s[1]:t>i[1]&&t<s[1]||i[1]===s[1]&&t===i[1]&&e>=i[0]&&e<s[0]||i[1]<s[1]&&t===s[1]&&e<s[0]||i[1]<s[1]&&t===i[1]&&e>=i[0])}}},949:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasRenderer=void 0;const s=i(744),r=i(630),o=i(873),n=i(43),a=i(859),l=i(713),h=i(345),c=i(476);let d=1;class _ extends a.Disposable{constructor(e,t,i,a,l,_,u,f,g,C){super(),this._colors=e,this._screenElement=t,this._bufferService=a,this._charSizeService=l,this._optionsService=_,this._coreBrowserService=g,this._id=d++,this._onRequestRedraw=new h.EventEmitter;const p=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new s.TextRenderLayer(this._screenElement,0,this._colors,p,this._id,this._bufferService,this._optionsService,u,C,this._coreBrowserService),new r.SelectionRenderLayer(this._screenElement,1,this._colors,this._id,this._bufferService,this._coreBrowserService,C,this._optionsService),new n.LinkRenderLayer(this._screenElement,2,this._colors,this._id,i,this._bufferService,this._optionsService,C,this._coreBrowserService),new o.CursorRenderLayer(this._screenElement,3,this._colors,this._id,this._onRequestRedraw,this._bufferService,this._optionsService,f,this._coreBrowserService,C)],this.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this.register((0,c.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))),this.onOptionsChanged()}get onRequestRedraw(){return this._onRequestRedraw.event}dispose(){for(const e of this._renderLayers)e.dispose();super.dispose(),(0,l.removeTerminalFromCache)(this._id)}onDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.onResize(this._bufferService.cols,this._bufferService.rows))}setColors(e){this._colors=e;for(const e of this._renderLayers)e.setColors(this._colors),e.reset()}onResize(e,t){this._updateDimensions();for(const e of this._renderLayers)e.resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"}onCharSizeChanged(){this.onResize(this._bufferService.cols,this._bufferService.rows)}onBlur(){this._runOperation(e=>e.onBlur())}onFocus(){this._runOperation(e=>e.onFocus())}onSelectionChanged(e,t,i=!1){this._runOperation(s=>s.onSelectionChanged(e,t,i)),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}onCursorMove(){this._runOperation(e=>e.onCursorMove())}onOptionsChanged(){this._runOperation(e=>e.onOptionsChanged())}clear(){this._runOperation(e=>e.reset())}_runOperation(e){for(const t of this._renderLayers)e(t)}renderRows(e,t){for(const i of this._renderLayers)i.onGridChanged(e,t)}clearTextureAtlas(){for(const e of this._renderLayers)e.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const e=this._coreBrowserService.dpr;this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*e),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*e),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/e),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/e),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols}_setCanvasDevicePixelDimensions(e,t){this.dimensions.scaledCanvasHeight=t,this.dimensions.scaledCanvasWidth=e;for(const e of this._renderLayers)e.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}t.CanvasRenderer=_},873:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;const s=i(903),r=i(782);class o extends s.BaseRenderLayer{constructor(e,t,i,s,o,n,a,l,h,c){super(e,"cursor",t,!0,i,s,n,a,c,h),this._onRequestRedraw=o,this._coreService=l,this._cell=new r.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this)}}dispose(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),super.dispose()}resize(e){super.resize(e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(),this.onOptionsChanged()}onBlur(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}onFocus(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}onOptionsChanged(){var e;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new n(this._coreBrowserService.isFocused,()=>{this._render(!0)},this._coreBrowserService)):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}onCursorMove(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation()}onGridChanged(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()}_render(e){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)return void this._clearCursor();const s=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(s,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;const e=this._optionsService.rawOptions.cursorStyle;return e&&"block"!==e?this._cursorRenderers[e](s,i,this._cell):this._renderBlurCursor(s,i,this._cell),this._ctx.restore(),this._state.x=s,this._state.y=i,this._state.isFocused=!1,this._state.style=e,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===s&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](s,i,this._cell),this._ctx.restore(),this._state.x=s,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,e,t),this._ctx.restore()}_renderUnderlineCursor(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()}_renderBlurCursor(e,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,i.getWidth(),1),this._ctx.restore()}}t.CursorRenderLayer=o;class n{constructor(e,t,i){this._renderCallback=t,this._coreBrowserService=i,this.isCursorVisible=!0,e&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(e=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const e=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,e>0)return void this._restartInterval(e)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const e=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(e)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},e)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0,t.GridCache=class{constructor(){this.cache=[]}resize(e,t){for(let i=0;i<e;i++){this.cache.length<=i&&this.cache.push([]);for(let e=this.cache[i].length;e<t;e++)this.cache[i].push(void 0);this.cache[i].length=t}this.cache.length=e}clear(){for(let e=0;e<this.cache.length;e++)for(let t=0;t<this.cache[e].length;t++)this.cache[e][t]=void 0}}},43:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;const s=i(903),r=i(302),o=i(433);class n extends s.BaseRenderLayer{constructor(e,t,i,s,r,o,n,a,l){super(e,"link",t,!0,i,s,o,n,a,l),r.onShowLinkUnderline(e=>this._onShowLinkUnderline(e)),r.onHideLinkUnderline(e=>this._onHideLinkUnderline(e))}resize(e){super.resize(e),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_onShowLinkUnderline(e){if(e.fg===r.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,o.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_onHideLinkUnderline(e){this._clearCurrentLink()}}t.LinkRenderLayer=n},630:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;const s=i(903);class r extends s.BaseRenderLayer{constructor(e,t,i,s,r,o,n,a){super(e,"selection",t,!0,i,s,r,a,n,o),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(e){super.resize(e),this._selectionStart&&this._selectionEnd&&this._redrawSelection(this._selectionStart,this._selectionEnd,this._columnSelectMode)}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}onBlur(){this.reset(),this._redrawSelection(this._selectionStart,this._selectionEnd,this._columnSelectMode)}onFocus(){this.reset(),this._redrawSelection(this._selectionStart,this._selectionEnd,this._columnSelectMode)}onSelectionChanged(e,t,i){super.onSelectionChanged(e,t,i),this._redrawSelection(e,t,i)}_redrawSelection(e,t,i){if(!this._didStateChange(e,t,i,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!e||!t)return void this._clearState();const s=e[1]-this._bufferService.buffer.ydisp,r=t[1]-this._bufferService.buffer.ydisp,o=Math.max(s,0),n=Math.min(r,this._bufferService.rows-1);if(o>=this._bufferService.rows||n<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._colors.selectionBackgroundTransparent:this._colors.selectionInactiveBackgroundTransparent).css,i){const i=e[0],s=t[0]-i,r=n-o+1;this._fillCells(i,o,s,r)}else{const i=s===o?e[0]:0,a=o===r?t[0]:this._bufferService.cols;this._fillCells(i,o,a-i,1);const l=Math.max(n-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,l),o!==n){const e=r===n?t[0]:this._bufferService.cols;this._fillCells(0,n,e,1)}}this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(e,t,i,s){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||s!==this._state.ydisp}_areCoordinatesEqual(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]}}t.SelectionRenderLayer=r},744:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;const s=i(574),r=i(903),o=i(147),n=i(855),a=i(782),l=i(577),h=i(160);class c extends r.BaseRenderLayer{constructor(e,t,i,r,o,n,l,h,c,d){super(e,"text",t,r,i,o,n,l,c,d),this._characterJoinerService=h,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new s.GridCache}resize(e){super.resize(e);const t=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===t||(this._characterWidth=e.scaledCharWidth,this._characterFont=t,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(e,t,i){for(let s=e;s<=t;s++){const e=s+this._bufferService.buffer.ydisp,t=this._bufferService.buffer.lines.get(e),r=this._characterJoinerService.getJoinedCharacters(e);for(let e=0;e<this._bufferService.cols;e++){t.loadCell(e,this._workCell);let o=this._workCell,a=!1,h=e;if(0!==o.getWidth()){if(r.length>0&&e===r[0][0]){a=!0;const e=r.shift();o=new l.JoinedCellData(this._workCell,t.translateToString(!0,e[0],e[1]),e[1]-e[0]),h=e[1]-1}!a&&this._isOverlapping(o)&&h<t.length-1&&t.getCodePoint(h+1)===n.NULL_CELL_CODE&&(o.content&=-12582913,o.content|=2<<22),i(o,e,s),e=h}}}}_drawBackground(e,t){const i=this._ctx,s=this._bufferService.cols;let r=0,n=0,a=null;i.save(),this._forEachCell(e,t,(e,t,l)=>{let c=null;e.isInverse()?c=e.isFgDefault()?this._colors.foreground.css:e.isFgRGB()?`rgb(${o.AttributeData.toColorRGB(e.getFgColor()).join(",")})`:this._colors.ansi[e.getFgColor()].css:e.isBgRGB()?c=`rgb(${o.AttributeData.toColorRGB(e.getBgColor()).join(",")})`:e.isBgPalette()&&(c=this._colors.ansi[e.getBgColor()].css),c&&e.isDim()&&(c=h.color.multiplyOpacity(h.css.toColor(c),.5).css);let d=!1;this._decorationService.forEachDecorationAtCell(t,this._bufferService.buffer.ydisp+l,void 0,e=>{"top"!==e.options.layer&&d||(e.backgroundColorRGB&&(c=e.backgroundColorRGB.css),d="top"===e.options.layer)}),null===a&&(r=t,n=l),l!==n?(i.fillStyle=a||"",this._fillCells(r,n,s-r,1),r=t,n=l):a!==c&&(i.fillStyle=a||"",this._fillCells(r,n,t-r,1),r=t,n=l),a=c}),null!==a&&(i.fillStyle=a,this._fillCells(r,n,s-r,1)),i.restore()}_drawForeground(e,t){this._forEachCell(e,t,(e,t,i)=>{if(!e.isInvisible()&&(this._drawChars(e,t,i),e.isUnderline()||e.isStrikethrough())){if(this._ctx.save(),e.isInverse())if(e.isBgDefault())this._ctx.fillStyle=this._colors.background.css;else if(e.isBgRGB())this._ctx.fillStyle=`rgb(${o.AttributeData.toColorRGB(e.getBgColor()).join(",")})`;else{let t=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&t<8&&(t+=8),this._ctx.fillStyle=this._colors.ansi[t].css}else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle=`rgb(${o.AttributeData.toColorRGB(e.getFgColor()).join(",")})`;else{let t=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&t<8&&(t+=8),this._ctx.fillStyle=this._colors.ansi[t].css}if(e.isStrikethrough()&&this._fillMiddleLineAtCells(t,i,e.getWidth()),e.isUnderline()){if(!e.isUnderlineColorDefault())if(e.isUnderlineColorRGB())this._ctx.fillStyle=`rgb(${o.AttributeData.toColorRGB(e.getUnderlineColor()).join(",")})`;else{let t=e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&t<8&&(t+=8),this._ctx.fillStyle=this._colors.ansi[t].css}switch(e.extended.underlineStyle){case 2:this._fillBottomLineAtCells(t,i,e.getWidth(),-this._coreBrowserService.dpr),this._fillBottomLineAtCells(t,i,e.getWidth(),this._coreBrowserService.dpr);break;case 3:this._curlyUnderlineAtCell(t,i,e.getWidth());break;case 4:this._dottedUnderlineAtCell(t,i,e.getWidth());break;case 5:this._dashedUnderlineAtCell(t,i,e.getWidth());break;default:this._fillBottomLineAtCells(t,i,e.getWidth())}}this._ctx.restore()}})}onGridChanged(e,t){0!==this._state.cache.length&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,t-e+1),this._drawBackground(e,t),this._drawForeground(e,t))}onOptionsChanged(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)}_isOverlapping(e){if(1!==e.getWidth())return!1;if(e.getCode()<256)return!1;const t=e.getChars();if(this._characterOverlapCache.hasOwnProperty(t))return this._characterOverlapCache[t];this._ctx.save(),this._ctx.font=this._characterFont;const i=Math.floor(this._ctx.measureText(t).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=i,i}}t.TextRenderLayer=c},13:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCharAtlas=void 0,t.BaseCharAtlas=class{constructor(){this._didWarmUp=!1}dispose(){}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){}clear(){}beginFrame(){}}},713:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireCharAtlas=void 0;const s=i(433),r=i(389),o=[];t.acquireCharAtlas=function(e,t,i,n,a,l){const h=(0,s.generateConfig)(n,a,e,i,l);for(let e=0;e<o.length;e++){const i=o[e],r=i.ownedBy.indexOf(t);if(r>=0){if((0,s.configEquals)(i.config,h))return i.atlas;1===i.ownedBy.length?(i.atlas.dispose(),o.splice(e,1)):i.ownedBy.splice(r,1);break}}for(let e=0;e<o.length;e++){const i=o[e];if((0,s.configEquals)(i.config,h))return i.ownedBy.push(t),i.atlas}const c={atlas:new r.DynamicCharAtlas(document,h),config:h,ownedBy:[t]};return o.push(c),c.atlas},t.removeTerminalFromCache=function(e){for(let t=0;t<o.length;t++){const i=o[t].ownedBy.indexOf(e);if(-1!==i){1===o[t].ownedBy.length?(o[t].atlas.dispose(),o.splice(t,1)):o[t].ownedBy.splice(i,1);break}}}},433:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;const s=i(855);t.generateConfig=function(e,t,i,s,r){const o={foreground:s.foreground,background:s.background,cursor:void 0,cursorAccent:void 0,selectionBackground:void 0,ansi:s.ansi.slice()};return{devicePixelRatio:r,scaledCharWidth:e,scaledCharHeight:t,fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight,fontWeightBold:i.fontWeightBold,allowTransparency:i.allowTransparency,colors:o}},t.configEquals=function(e,t){for(let i=0;i<e.colors.ansi.length;i++)if(e.colors.ansi[i].rgba!==t.colors.ansi[i].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.scaledCharWidth===t.scaledCharWidth&&e.scaledCharHeight===t.scaledCharHeight&&e.colors.foreground===t.colors.foreground&&e.colors.background===t.colors.background},t.is256Color=function(e){return e<s.DEFAULT_COLOR}},389:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCharAtlas=t.DynamicCharAtlas=t.getGlyphCacheKey=void 0;const s=i(302),r=i(13),o=i(434),n=i(279),a=i(399),l=i(634),h=i(160),c=1024,d=1024,_={css:"rgba(0, 0, 0, 0)",rgba:0};function u(e){return e.code<<21|e.bg<<12|e.fg<<3|(e.bold?0:4)+(e.dim?0:2)+(e.italic?0:1)}t.getGlyphCacheKey=u;class f extends r.BaseCharAtlas{constructor(e,t){super(),this._config=t,this._drawToCacheCount=0,this._glyphsWaitingOnBitmap=[],this._bitmapCommitTimeout=null,this._bitmap=null,this._cacheCanvas=e.createElement("canvas"),this._cacheCanvas.width=c,this._cacheCanvas.height=d,this._cacheCtx=(0,l.throwIfFalsy)(this._cacheCanvas.getContext("2d",{alpha:!0}));const i=e.createElement("canvas");i.width=this._config.scaledCharWidth,i.height=this._config.scaledCharHeight,this._tmpCtx=(0,l.throwIfFalsy)(i.getContext("2d",{alpha:this._config.allowTransparency})),this._width=Math.floor(c/this._config.scaledCharWidth),this._height=Math.floor(d/this._config.scaledCharHeight);const s=this._width*this._height;this._cacheMap=new n.LRUMap(s),this._cacheMap.prealloc(s)}dispose(){null!==this._bitmapCommitTimeout&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)}beginFrame(){this._drawToCacheCount=0}clear(){if(this._cacheMap.size>0){const e=this._width*this._height;this._cacheMap=new n.LRUMap(e),this._cacheMap.prealloc(e)}this._cacheCtx.clearRect(0,0,c,d),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)}draw(e,t,i,s){if(32===t.code)return!0;if(!this._canCache(t))return!1;const r=u(t),o=this._cacheMap.get(r);if(null!=o)return this._drawFromCache(e,o,i,s),!0;if(this._drawToCacheCount<100){let o;o=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;const n=this._drawToCache(t,o);return this._cacheMap.set(r,n),this._drawFromCache(e,n,i,s),!0}return!1}_canCache(e){return e.code<256}_toCoordinateX(e){return e%this._width*this._config.scaledCharWidth}_toCoordinateY(e){return Math.floor(e/this._width)*this._config.scaledCharHeight}_drawFromCache(e,t,i,s){if(t.isEmpty)return;const r=this._toCoordinateX(t.index),o=this._toCoordinateY(t.index);e.drawImage(t.inBitmap?this._bitmap:this._cacheCanvas,r,o,this._config.scaledCharWidth,this._config.scaledCharHeight,i,s,this._config.scaledCharWidth,this._config.scaledCharHeight)}_getColorFromAnsiIndex(e){return e<this._config.colors.ansi.length?this._config.colors.ansi[e]:o.DEFAULT_ANSI_COLORS[e]}_getBackgroundColor(e){if(this._config.allowTransparency)return _;let t;return t=e.bg===s.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:e.bg<256?this._getColorFromAnsiIndex(e.bg):this._config.colors.background,e.dim&&(t=h.color.blend(this._config.colors.background,h.color.multiplyOpacity(t,.5))),t}_getForegroundColor(e){return e.fg===s.INVERTED_DEFAULT_COLOR?h.color.opaque(this._config.colors.background):e.fg<256?this._getColorFromAnsiIndex(e.fg):this._config.colors.foreground}_drawToCache(e,t){this._drawToCacheCount++,this._tmpCtx.save();const i=this._getBackgroundColor(e);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=i.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";const r=e.bold?this._config.fontWeightBold:this._config.fontWeight,o=e.italic?"italic":"";this._tmpCtx.font=`${o} ${r} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=s.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(e).css,e.dim&&(this._tmpCtx.globalAlpha=s.DIM_OPACITY),this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight);let n=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),a=!1;if(this._config.allowTransparency||(a=C(n,i)),a&&"_"===e.chars&&!this._config.allowTransparency)for(let t=1;t<=5&&(this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight-t),n=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),a=C(n,i),a);t++);this._tmpCtx.restore();const l=this._toCoordinateX(t),h=this._toCoordinateY(t);this._cacheCtx.putImageData(n,l,h);const c={index:t,isEmpty:a,inBitmap:!1};return this._addGlyphToBitmap(c),c}_addGlyphToBitmap(e){!("createImageBitmap"in window)||a.isFirefox||a.isSafari||(this._glyphsWaitingOnBitmap.push(e),null===this._bitmapCommitTimeout&&(this._bitmapCommitTimeout=window.setTimeout(()=>this._generateBitmap(),100)))}_generateBitmap(){const e=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(t=>{this._bitmap=t;for(let t=0;t<e.length;t++)e[t].inBitmap=!0}),this._bitmapCommitTimeout=null}}t.DynamicCharAtlas=f;class g extends r.BaseCharAtlas{constructor(e,t){super()}draw(e,t,i,s){return!1}}function C(e,t){let i=!0;const s=t.rgba>>>24,r=t.rgba>>>16&255,o=t.rgba>>>8&255;for(let t=0;t<e.data.length;t+=4)Math.abs(e.data[t]-s)+Math.abs(e.data[t+1]-r)+Math.abs(e.data[t+2]-o)<35?e.data[t+3]=0:i=!1;return i}t.NoneCharAtlas=g},279:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LRUMap=void 0,t.LRUMap=class{constructor(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}_unlinkNode(e){const t=e.prev,i=e.next;e===this._head&&(this._head=i),e===this._tail&&(this._tail=t),null!==t&&(t.next=i),null!==i&&(i.prev=t)}_appendNode(e){const t=this._tail;null!==t&&(t.next=e),e.prev=t,e.next=null,this._tail=e,null===this._head&&(this._head=e)}prealloc(e){const t=this._nodePool;for(let i=0;i<e;i++)t.push({prev:null,next:null,key:null,value:null})}get(e){const t=this._map[e];return void 0!==t?(this._unlinkNode(t),this._appendNode(t),t.value):null}peekValue(e){const t=this._map[e];return void 0!==t?t.value:null}peek(){const e=this._head;return null===e?null:e.value}set(e,t){let i=this._map[e];if(void 0!==i)i=this._map[e],this._unlinkNode(i),i.value=t;else if(this.size>=this.capacity)i=this._head,this._unlinkNode(i),delete this._map[i.key],i.key=e,i.value=t,this._map[e]=i;else{const s=this._nodePool;s.length>0?(i=s.pop(),i.key=e,i.value=t):i={prev:null,next:null,key:e,value:t},this._map[e]=i,this.size++}this._appendNode(i)}}},930:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const s=i(485);t.ColorContrastCache=class{constructor(){this._color=new s.TwoKeyMap,this._css=new s.TwoKeyMap}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},434:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorManager=t.DEFAULT_ANSI_COLORS=void 0;const s=i(160),r=i(930),o=s.css.toColor("#ffffff"),n=s.css.toColor("#000000"),a=s.css.toColor("#ffffff"),l=s.css.toColor("#000000"),h={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const e=[s.css.toColor("#2e3436"),s.css.toColor("#cc0000"),s.css.toColor("#4e9a06"),s.css.toColor("#c4a000"),s.css.toColor("#3465a4"),s.css.toColor("#75507b"),s.css.toColor("#06989a"),s.css.toColor("#d3d7cf"),s.css.toColor("#555753"),s.css.toColor("#ef2929"),s.css.toColor("#8ae234"),s.css.toColor("#fce94f"),s.css.toColor("#729fcf"),s.css.toColor("#ad7fa8"),s.css.toColor("#34e2e2"),s.css.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){const r=t[i/36%6|0],o=t[i/6%6|0],n=t[i%6];e.push({css:s.channels.toCss(r,o,n),rgba:s.channels.toRgba(r,o,n)})}for(let t=0;t<24;t++){const i=8+10*t;e.push({css:s.channels.toCss(i,i,i),rgba:s.channels.toRgba(i,i,i)})}return e})()),t.ColorManager=class{constructor(e,i){this.allowTransparency=i;const c=e.createElement("canvas");c.width=1,c.height=1;const d=c.getContext("2d");if(!d)throw new Error("Could not get rendering context");this._ctx=d,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new r.ColorContrastCache,this.colors={foreground:o,background:n,cursor:a,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:h,selectionBackgroundOpaque:s.color.blend(n,h),selectionInactiveBackgroundTransparent:h,selectionInactiveBackgroundOpaque:s.color.blend(n,h),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}onOptionsChange(e,t){switch(e){case"minimumContrastRatio":this._contrastCache.clear();break;case"allowTransparency":this.allowTransparency=t}}setTheme(e={}){this.colors.foreground=this._parseColor(e.foreground,o),this.colors.background=this._parseColor(e.background,n),this.colors.cursor=this._parseColor(e.cursor,a,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selectionBackgroundTransparent=this._parseColor(e.selectionBackground,h,!0),this.colors.selectionBackgroundOpaque=s.color.blend(this.colors.background,this.colors.selectionBackgroundTransparent),this.colors.selectionInactiveBackgroundTransparent=this._parseColor(e.selectionInactiveBackground,this.colors.selectionBackgroundTransparent,!0),this.colors.selectionInactiveBackgroundOpaque=s.color.blend(this.colors.background,this.colors.selectionInactiveBackgroundTransparent);const i={css:"",rgba:0};if(this.colors.selectionForeground=e.selectionForeground?this._parseColor(e.selectionForeground,i):void 0,this.colors.selectionForeground===i&&(this.colors.selectionForeground=void 0),s.color.isOpaque(this.colors.selectionBackgroundTransparent)){const e=.3;this.colors.selectionBackgroundTransparent=s.color.opacity(this.colors.selectionBackgroundTransparent,e)}if(s.color.isOpaque(this.colors.selectionInactiveBackgroundTransparent)){const e=.3;this.colors.selectionInactiveBackgroundTransparent=s.color.opacity(this.colors.selectionInactiveBackgroundTransparent,e)}if(this.colors.ansi=t.DEFAULT_ANSI_COLORS.slice(),this.colors.ansi[0]=this._parseColor(e.black,t.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,t.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,t.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,t.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,t.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,t.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,t.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,t.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),e.extendedAnsi){const i=Math.min(this.colors.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<i;s++)this.colors.ansi[s+16]=this._parseColor(e.extendedAnsi[s],t.DEFAULT_ANSI_COLORS[s+16])}this._contrastCache.clear(),this._updateRestoreColors()}restoreColor(e){if(void 0!==e)switch(e){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[e]=this._restoreColors.ansi[e]}else for(let e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]}_updateRestoreColors(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}}_parseColor(e,t,i=this.allowTransparency){if(void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn(`Color: ${e} is invalid using fallback ${t.css}`),t;this._ctx.fillRect(0,0,1,1);const r=this._ctx.getImageData(0,0,1,1).data;if(255!==r[3]){if(!i)return console.warn(`Color: ${e} is using transparency, but allowTransparency is false. Using fallback ${t.css}.`),t;const[r,o,n,a]=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(e=>Number(e)),l=Math.round(255*a);return{rgba:s.channels.toRgba(r,o,n,l),css:e}}return{css:this._ctx.fillStyle,rgba:s.channels.toRgba(r[0],r[1],r[2],r[3])}}}},503:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementFromParent=void 0,t.removeElementFromParent=function(...e){var t;for(const i of e)null===(t=null==i?void 0:i.parentElement)||void 0===t||t.removeChild(i)}},302:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const s=i(399);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=s.isFirefox||s.isLegacyEdge?"bottom":"ideographic"},14:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.powerlineDefinitions=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;const s=i(634);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const r={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"║":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╒":{1:(e,t)=>`M.5,1 L.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╓":{1:(e,t)=>`M${.5-e},1 L${.5-e},.5 L1,.5 M${.5+e},.5 L${.5+e},1`},"╔":{1:(e,t)=>`M1,${.5-t} L${.5-e},${.5-t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╕":{1:(e,t)=>`M0,${.5-t} L.5,${.5-t} L.5,1 M0,${.5+t} L.5,${.5+t}`},"╖":{1:(e,t)=>`M${.5+e},1 L${.5+e},.5 L0,.5 M${.5-e},.5 L${.5-e},1`},"╗":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5+e},${.5-t} L${.5+e},1`},"╘":{1:(e,t)=>`M.5,0 L.5,${.5+t} L1,${.5+t} M.5,${.5-t} L1,${.5-t}`},"╙":{1:(e,t)=>`M1,.5 L${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╚":{1:(e,t)=>`M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0 M1,${.5+t} L${.5-e},${.5+t} L${.5-e},0`},"╛":{1:(e,t)=>`M0,${.5+t} L.5,${.5+t} L.5,0 M0,${.5-t} L.5,${.5-t}`},"╜":{1:(e,t)=>`M0,.5 L${.5+e},.5 L${.5+e},0 M${.5-e},.5 L${.5-e},0`},"╝":{1:(e,t)=>`M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M0,${.5+t} L${.5+e},${.5+t} L${.5+e},0`},"╞":{1:(e,t)=>`M.5,0 L.5,1 M.5,${.5-t} L1,${.5-t} M.5,${.5+t} L1,${.5+t}`},"╟":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1 M${.5+e},.5 L1,.5`},"╠":{1:(e,t)=>`M${.5-e},0 L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╡":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L.5,${.5-t} M0,${.5+t} L.5,${.5+t}`},"╢":{1:(e,t)=>`M0,.5 L${.5-e},.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╣":{1:(e,t)=>`M${.5+e},0 L${.5+e},1 M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0`},"╤":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t} M.5,${.5+t} L.5,1`},"╥":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},1 M${.5+e},.5 L${.5+e},1`},"╦":{1:(e,t)=>`M0,${.5-t} L1,${.5-t} M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1`},"╧":{1:(e,t)=>`M.5,0 L.5,${.5-t} M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╨":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},.5 L${.5-e},0 M${.5+e},.5 L${.5+e},0`},"╩":{1:(e,t)=>`M0,${.5+t} L1,${.5+t} M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╪":{1:(e,t)=>`M.5,0 L.5,1 M0,${.5-t} L1,${.5-t} M0,${.5+t} L1,${.5+t}`},"╫":{1:(e,t)=>`M0,.5 L1,.5 M${.5-e},0 L${.5-e},1 M${.5+e},0 L${.5+e},1`},"╬":{1:(e,t)=>`M0,${.5+t} L${.5-e},${.5+t} L${.5-e},1 M1,${.5+t} L${.5+e},${.5+t} L${.5+e},1 M0,${.5-t} L${.5-e},${.5-t} L${.5-e},0 M1,${.5-t} L${.5+e},${.5-t} L${.5+e},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,1,.5`},"╮":{1:(e,t)=>`M.5,1 L.5,${.5+t/.15*.5} C.5,${.5+t/.15*.5},.5,.5,0,.5`},"╯":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,0,.5`},"╰":{1:(e,t)=>`M.5,0 L.5,${.5-t/.15*.5} C.5,${.5-t/.15*.5},.5,.5,1,.5`}},t.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:1,leftPadding:1}},t.tryDrawCustomChar=function(e,i,n,h,c,d,_,u){const f=t.blockElementDefinitions[i];if(f)return function(e,t,i,s,r,o){for(let n=0;n<t.length;n++){const a=t[n],l=r/8,h=o/8;e.fillRect(i+a.x*l,s+a.y*h,a.w*l,a.h*h)}}(e,f,n,h,c,d),!0;const g=r[i];if(g)return function(e,t,i,r,n,a){let l=o.get(t);l||(l=new Map,o.set(t,l));const h=e.fillStyle;if("string"!=typeof h)throw new Error(`Unexpected fillStyle type "${h}"`);let c=l.get(h);if(!c){const i=t[0].length,r=t.length,o=document.createElement("canvas");o.width=i,o.height=r;const n=(0,s.throwIfFalsy)(o.getContext("2d")),a=new ImageData(i,r);let d,_,u,f;if(h.startsWith("#"))d=parseInt(h.slice(1,3),16),_=parseInt(h.slice(3,5),16),u=parseInt(h.slice(5,7),16),f=h.length>7&&parseInt(h.slice(7,9),16)||1;else{if(!h.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${h}" when drawing pattern glyph`);[d,_,u,f]=h.substring(5,h.length-1).split(",").map(e=>parseFloat(e))}for(let e=0;e<r;e++)for(let s=0;s<i;s++)a.data[4*(e*i+s)]=d,a.data[4*(e*i+s)+1]=_,a.data[4*(e*i+s)+2]=u,a.data[4*(e*i+s)+3]=t[e][s]*(255*f);n.putImageData(a,0,0),c=(0,s.throwIfFalsy)(e.createPattern(o,null)),l.set(h,c)}e.fillStyle=c,e.fillRect(i,r,n,a)}(e,g,n,h,c,d),!0;const C=t.boxDrawingDefinitions[i];if(C)return function(e,t,i,s,r,o,n){e.strokeStyle=e.fillStyle;for(const[h,c]of Object.entries(t)){let t;e.beginPath(),e.lineWidth=n*Number.parseInt(h),t="function"==typeof c?c(.15,.15/o*r):c;for(const h of t.split(" ")){const t=h[0],c=a[t];if(!c){console.error(`Could not find drawing instructions for "${t}"`);continue}const d=h.substring(1).split(",");d[0]&&d[1]&&c(e,l(d,r,o,i,s,!0,n))}e.stroke(),e.closePath()}}(e,C,n,h,c,d,u),!0;const p=t.powerlineDefinitions[i];return!!p&&(function(e,t,i,s,r,o,n,h){var c,d;e.beginPath();const _=n/12;e.lineWidth=h*_;for(const n of t.d.split(" ")){const h=n[0],u=a[h];if(!u){console.error(`Could not find drawing instructions for "${h}"`);continue}const f=n.substring(1).split(",");f[0]&&f[1]&&u(e,l(f,r,o,i,s,!1,(null!==(c=t.leftPadding)&&void 0!==c?c:0)*(_/2),(null!==(d=t.rightPadding)&&void 0!==d?d:0)*(_/2)))}1===t.type?(e.strokeStyle=e.fillStyle,e.stroke()):e.fill(),e.closePath()}(e,p,n,h,c,d,_,u),!0)};const o=new Map;function n(e,t,i=0){return Math.max(Math.min(e,t),i)}const a={C:(e,t)=>e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]),L:(e,t)=>e.lineTo(t[0],t[1]),M:(e,t)=>e.moveTo(t[0],t[1])};function l(e,t,i,s,r,o,a,l=0,h=0){const c=e.map(e=>parseFloat(e)||parseInt(e));if(c.length<2)throw new Error("Too few arguments for instruction");for(let e=0;e<c.length;e+=2)c[e]*=t-l*a-h*a,o&&0!==c[e]&&(c[e]=n(Math.round(c[e]+.5)-.5,t,0)),c[e]+=s+l*a;for(let e=1;e<c.length;e+=2)c[e]*=i,o&&0!==c[e]&&(c[e]=n(Math.round(c[e]+.5)-.5,i,0)),c[e]+=r;return c}},476:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.observeDevicePixelDimensions=void 0;const s=i(859);t.observeDevicePixelDimensions=function(e,t,i){let r=new t.ResizeObserver(t=>{const s=t.find(t=>t.target===e);if(!s)return;if(!("devicePixelContentBoxSize"in s))return null==r||r.disconnect(),void(r=void 0);const o=s.devicePixelContentBoxSize[0].inlineSize,n=s.devicePixelContentBoxSize[0].blockSize;o>0&&n>0&&i(o,n)});try{r.observe(e,{box:["device-pixel-content-box"]})}catch(e){r.disconnect(),r=void 0}return(0,s.toDisposable)(()=>null==r?void 0:r.disconnect())}},634:(e,t)=>{function i(e){return 57508<=e&&e<=57558}Object.defineProperty(t,"__esModule",{value:!0}),t.excludeFromContrastRatioDemands=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e},t.isPowerlineGlyph=i,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.excludeFromContrastRatioDemands=function(e){return i(e)||function(e){return 9472<=e&&e<=9631}(e)}},577:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const o=i(147),n=i(855),a=i(782),l=i(97);class h extends o.AttributeData{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=h;let c=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}register(e){const t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(0===this._characterJoiners.length)return[];const t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];const i=[],s=t.translateToString(!0);let r=0,o=0,a=0,l=t.getFg(0),h=t.getBg(0);for(let e=0;e<t.getTrimmedLength();e++)if(t.loadCell(e,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==l||this._workCell.bg!==h){if(e-r>1){const e=this._getJoinedRanges(s,a,o,t,r);for(let t=0;t<e.length;t++)i.push(e[t])}r=e,a=o,l=this._workCell.fg,h=this._workCell.bg}o+=this._workCell.getChars().length||n.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1){const e=this._getJoinedRanges(s,a,o,t,r);for(let t=0;t<e.length;t++)i.push(e[t])}return i}_getJoinedRanges(t,i,s,r,o){const n=t.substring(i,s);let a=[];try{a=this._characterJoiners[0].handler(n)}catch(e){console.error(e)}for(let t=1;t<this._characterJoiners.length;t++)try{const i=this._characterJoiners[t].handler(n);for(let t=0;t<i.length;t++)e._mergeRanges(a,i[t])}catch(e){console.error(e)}return this._stringRangesToCellRanges(a,r,o),a}_stringRangesToCellRanges(e,t,i){let s=0,r=!1,o=0,a=e[s];if(a){for(let l=i;l<this._bufferService.cols;l++){const i=t.getWidth(l),h=t.getString(l).length||n.WHITESPACE_CELL_CHAR.length;if(0!==i){if(!r&&a[0]<=o&&(a[0]=l,r=!0),a[1]<=o){if(a[1]=l,a=e[++s],!a)break;a[0]<=o?(a[0]=l,r=!0):r=!1}o+=h}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let s=0;s<e.length;s++){const r=e[s];if(i){if(t[1]<=r[0])return e[s-1][1]=t[1],e;if(t[1]<=r[1])return e[s-1][1]=Math.max(t[1],r[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=r[0])return e.splice(s,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};c=s([r(0,l.IBufferService)],c),t.CharacterJoinerService=c},160:(e,t)=>{var i,s,r;function o(e){const t=e.toString(16);return t.length<2?"0"+t:t}function n(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=void 0,function(e){e.toCss=function(e,t,i,s){return void 0!==s?`#${o(e)}${o(t)}${o(i)}${o(s)}`:`#${o(e)}${o(t)}${o(i)}`},e.toRgba=function(e,t,i,s=255){return(e<<24|t<<16|i<<8|s)>>>0}}(i=t.channels||(t.channels={})),function(e){function t(e,t){const s=Math.round(255*t),[o,n,a]=r.toChannels(e.rgba);return{css:i.toCss(o,n,a,s),rgba:i.toRgba(o,n,a,s)}}e.blend=function(e,t){const s=(255&t.rgba)/255;if(1===s)return{css:t.css,rgba:t.rgba};const r=t.rgba>>24&255,o=t.rgba>>16&255,n=t.rgba>>8&255,a=e.rgba>>24&255,l=e.rgba>>16&255,h=e.rgba>>8&255,c=a+Math.round((r-a)*s),d=l+Math.round((o-l)*s),_=h+Math.round((n-h)*s);return{css:i.toCss(c,d,_),rgba:i.toRgba(c,d,_)}},e.isOpaque=function(e){return 255==(255&e.rgba)},e.ensureContrastRatio=function(e,t,i){const s=r.ensureContrastRatio(e.rgba,t.rgba,i);if(s)return r.toColor(s>>24&255,s>>16&255,s>>8&255)},e.opaque=function(e){const t=(255|e.rgba)>>>0,[s,o,n]=r.toChannels(t);return{css:i.toCss(s,o,n),rgba:t}},e.opacity=t,e.multiplyOpacity=function(e,i){return t(e,(255&e.rgba)*i/255)},e.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}}(t.color||(t.color={})),(t.css||(t.css={})).toColor=function(e){if(e.match(/#[0-9a-f]{3,8}/i))switch(e.length){case 4:{const t=parseInt(e.slice(1,2).repeat(2),16),i=parseInt(e.slice(2,3).repeat(2),16),s=parseInt(e.slice(3,4).repeat(2),16);return r.toColor(t,i,s)}case 5:{const t=parseInt(e.slice(1,2).repeat(2),16),i=parseInt(e.slice(2,3).repeat(2),16),s=parseInt(e.slice(3,4).repeat(2),16),o=parseInt(e.slice(4,5).repeat(2),16);return r.toColor(t,i,s,o)}case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}const t=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(t){const e=parseInt(t[1]),i=parseInt(t[2]),s=parseInt(t[3]),o=Math.round(255*(void 0===t[5]?1:parseFloat(t[5])));return r.toColor(e,i,s,o)}throw new Error("css.toColor: Unsupported css format")},function(e){function t(e,t,i){const s=e/255,r=t/255,o=i/255;return.2126*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(s=t.rgb||(t.rgb={})),function(e){function t(e,t,i){const r=e>>24&255,o=e>>16&255,a=e>>8&255;let l=t>>24&255,h=t>>16&255,c=t>>8&255,d=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;d<i&&(l>0||h>0||c>0);)l-=Math.max(0,Math.ceil(.1*l)),h-=Math.max(0,Math.ceil(.1*h)),c-=Math.max(0,Math.ceil(.1*c)),d=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}function r(e,t,i){const r=e>>24&255,o=e>>16&255,a=e>>8&255;let l=t>>24&255,h=t>>16&255,c=t>>8&255,d=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;d<i&&(l<255||h<255||c<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),h=Math.min(255,h+Math.ceil(.1*(255-h))),c=Math.min(255,c+Math.ceil(.1*(255-c))),d=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}e.ensureContrastRatio=function(e,i,o){const a=s.relativeLuminance(e>>8),l=s.relativeLuminance(i>>8);if(n(a,l)<o){if(l<a){const l=t(e,i,o),h=n(a,s.relativeLuminance(l>>8));if(h<o){const t=r(e,i,o);return h>n(a,s.relativeLuminance(t>>8))?l:t}return l}const h=r(e,i,o),c=n(a,s.relativeLuminance(h>>8));if(c<o){const r=t(e,i,o);return c>n(a,s.relativeLuminance(r>>8))?h:r}return h}},e.reduceLuminance=t,e.increaseLuminance=r,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},e.toColor=function(e,t,s,r){return{css:i.toCss(e,t,s,r),rgba:i.toRgba(e,t,s,r)}}}(r=t.rgba||(t.rgba={})),t.toPaddedHex=o,t.contrastRatio=n},345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)}})),this._event}fire(e,t){const i=[];for(let e=0;e<this._listeners.length;e++)i.push(this._listeners[e]);for(let s=0;s<i.length;s++)i[s].call(void 0,e,t)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},t.forwardEvent=function(e,t){return e(e=>t.fire(e))}},859:(e,t)=>{function i(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=i,t.getDisposeArrayDisposable=function(e){return{dispose:()=>i(e)}}},485:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class i{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}}t.TwoKeyMap=i,t.FourKeyMap=class{constructor(){this._data=new i}set(e,t,s,r,o){this._data.get(e,t)||this._data.set(e,t,new i),this._data.get(e,t).set(s,r,o)}get(e,t,i,s){var r;return null===(r=this._data.get(e,t))||void 0===r?void 0:r.get(i,s)}clear(){this._data.clear()}}},399:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.isSafari=t.isLegacyEdge=t.isFirefox=void 0;const i="undefined"==typeof navigator,s=i?"node":navigator.userAgent,r=i?"node":navigator.platform;t.isFirefox=s.includes("Firefox"),t.isLegacyEdge=s.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(s),t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),t.isLinux=r.indexOf("Linux")>=0},147:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class i{constructor(){this.fg=0,this.bg=0,this.extended=new s}static toColorRGB(e){return[e>>>16&255,e>>>8&255,255&e]}static fromColorRGB(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]}clone(){const e=new i;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}t.AttributeData=i;class s{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(e){this._ext&=-67108864,this._ext|=67108863&e}get urlId(){return this._urlId}set urlId(e){this._urlId=e}clone(){return new s(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}t.ExtendedAttrs=s},782:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const s=i(133),r=i(855),o=i(147);class n extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(e){const t=new n;return t.setFromCharData(e),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,s.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(e){this.fg=e[r.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(e[r.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[r.CHAR_DATA_CHAR_INDEX].length){const i=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){const s=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(i-55296)+s-56320+65536|e[r.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[r.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[r.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[r.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=n},855:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},133:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let t=e[r];t>65535?(t-=65536,s+=String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):s+=String.fromCharCode(t)}return s},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){const i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){const i=e.charCodeAt(r++);56320<=i&&i<=57343?t[s++]=1024*(this._interim-55296)+i-56320+65536:(t[s++]=this._interim,t[s++]=i),this._interim=0}for(let o=r;o<i;++o){const r=e.charCodeAt(o);if(55296<=r&&r<=56319){if(++o>=i)return this._interim=r,s;const n=e.charCodeAt(o);56320<=n&&n<=57343?t[s++]=1024*(r-55296)+n-56320+65536:(t[s++]=r,t[s++]=n)}else 65279!==r&&(t[s++]=r)}return s}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){const i=e.length;if(!i)return 0;let s,r,o,n,a=0,l=0,h=0;if(this.interim[0]){let s=!1,r=this.interim[0];r&=192==(224&r)?31:224==(240&r)?15:7;let o,n=0;for(;(o=63&this.interim[++n])&&n<4;)r<<=6,r|=o;const l=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,c=l-n;for(;h<c;){if(h>=i)return 0;if(o=e[h++],128!=(192&o)){h--,s=!0;break}this.interim[n++]=o,r<<=6,r|=63&o}s||(2===l?r<128?h--:t[a++]=r:3===l?r<2048||r>=55296&&r<=57343||65279===r||(t[a++]=r):r<65536||r>1114111||(t[a++]=r)),this.interim.fill(0)}const c=i-4;let d=h;for(;d<i;){for(;!(!(d<c)||128&(s=e[d])||128&(r=e[d+1])||128&(o=e[d+2])||128&(n=e[d+3]));)t[a++]=s,t[a++]=r,t[a++]=o,t[a++]=n,d+=4;if(s=e[d++],s<128)t[a++]=s;else if(192==(224&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(l=(31&s)<<6|63&r,l<128){d--;continue}t[a++]=l}else if(224==(240&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=e[d++],128!=(192&o)){d--;continue}if(l=(15&s)<<12|(63&r)<<6|63&o,l<2048||l>=55296&&l<=57343||65279===l)continue;t[a++]=l}else if(240==(248&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=e[d++],128!=(192&o)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,this.interim[2]=o,a;if(n=e[d++],128!=(192&n)){d--;continue}if(l=(7&s)<<18|(63&r)<<12|(63&o)<<6|63&n,l<65536||l>1114111)continue;t[a++]=l}}return a}}},726:(e,t)=>{function i(e,t,i){t.di$target===t?t.di$dependencies.push({id:e,index:i}):(t.di$dependencies=[{id:e,index:i}],t.di$target=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0,t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e.di$dependencies||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);const s=function(e,t,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");i(s,e,r)};return s.toString=()=>e,t.serviceRegistry.set(e,s),s}},97:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.IDirtyRowService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const s=i(726);var r;t.IBufferService=(0,s.createDecorator)("BufferService"),t.ICoreMouseService=(0,s.createDecorator)("CoreMouseService"),t.ICoreService=(0,s.createDecorator)("CoreService"),t.ICharsetService=(0,s.createDecorator)("CharsetService"),t.IDirtyRowService=(0,s.createDecorator)("DirtyRowService"),t.IInstantiationService=(0,s.createDecorator)("InstantiationService"),(r=t.LogLevelEnum||(t.LogLevelEnum={}))[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.OFF=4]="OFF",t.ILogService=(0,s.createDecorator)("LogService"),t.IOptionsService=(0,s.createDecorator)("OptionsService"),t.IOscLinkService=(0,s.createDecorator)("OscLinkService"),t.IUnicodeService=(0,s.createDecorator)("UnicodeService"),t.IDecorationService=(0,s.createDecorator)("DecorationService")}},t={};function i(s){var r=t[s];if(void 0!==r)return r.exports;var o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,i),o.exports}var s={};return(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasAddon=void 0;const t=i(949);e.CanvasAddon=class{activate(e){if(!e.element)throw new Error("Cannot activate CanvasAddon before Terminal.open");this._terminal=e;const i=e._core._bufferService,s=e._core._renderService,r=e._core._characterJoinerService,o=e._core._charSizeService,n=e._core.coreService,a=e._core._coreBrowserService,l=e._core._decorationService,h=e._core.optionsService,c=e._core._colorManager.colors,d=e._core.screenElement,_=e._core.linkifier2;this._renderer=new t.CanvasRenderer(c,d,_,i,o,h,r,n,a,l),s.setRenderer(this._renderer),s.onResize(i.cols,i.rows)}dispose(){var e;if(!this._terminal)throw new Error("Cannot dispose CanvasAddon because it is activated");const t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.onResize(this._terminal.cols,this._terminal.rows),null===(e=this._renderer)||void 0===e||e.dispose(),this._renderer=void 0}}})(),s})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{3138:function(t,e,i){self,t.exports=(()=>{"use strict";var t={965:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;const s=i(381),r=i(455),o=i(855),n=i(859),a=10,l=a*Float32Array.BYTES_PER_ELEMENT,h={i:0,glyph:void 0,leftCellPadding:0,clippedPixels:0};class c extends n.Disposable{constructor(t,e,i,r){super(),this._terminal=t,this._colors=e,this._gl=i,this._dimensions=r,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const o=this._gl;this._program=(0,s.throwIfFalsy)((0,s.createProgram)(o,"#version 300 es\nlayout (location = 0) in vec2 a_unitquad;\nlayout (location = 1) in vec2 a_cellpos;\nlayout (location = 2) in vec2 a_offset;\nlayout (location = 3) in vec2 a_size;\nlayout (location = 4) in vec2 a_texcoord;\nlayout (location = 5) in vec2 a_texsize;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec2 v_texcoord;\n\nvoid main() {\n vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);\n gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n v_texcoord = a_texcoord + a_unitquad * a_texsize;\n}","#version 300 es\nprecision lowp float;\n\nin vec2 v_texcoord;\n\nuniform sampler2D u_texture;\n\nout vec4 outColor;\n\nvoid main() {\n outColor = texture(u_texture, v_texcoord);\n}")),this.register((0,n.toDisposable)(()=>o.deleteProgram(this._program))),this._projectionLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,s.throwIfFalsy)(o.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=o.createVertexArray(),o.bindVertexArray(this._vertexArrayObject);const a=new Float32Array([0,0,1,0,0,1,1,1]),h=o.createBuffer();this.register((0,n.toDisposable)(()=>o.deleteBuffer(h))),o.bindBuffer(o.ARRAY_BUFFER,h),o.bufferData(o.ARRAY_BUFFER,a,o.STATIC_DRAW),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const c=new Uint8Array([0,1,3,0,2,3]),_=o.createBuffer();this.register((0,n.toDisposable)(()=>o.deleteBuffer(_))),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,_),o.bufferData(o.ELEMENT_ARRAY_BUFFER,c,o.STATIC_DRAW),this._attributesBuffer=(0,s.throwIfFalsy)(o.createBuffer()),this.register((0,n.toDisposable)(()=>o.deleteBuffer(this._attributesBuffer))),o.bindBuffer(o.ARRAY_BUFFER,this._attributesBuffer),o.enableVertexAttribArray(2),o.vertexAttribPointer(2,2,o.FLOAT,!1,l,0),o.vertexAttribDivisor(2,1),o.enableVertexAttribArray(3),o.vertexAttribPointer(3,2,o.FLOAT,!1,l,2*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(3,1),o.enableVertexAttribArray(4),o.vertexAttribPointer(4,2,o.FLOAT,!1,l,4*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(4,1),o.enableVertexAttribArray(5),o.vertexAttribPointer(5,2,o.FLOAT,!1,l,6*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(5,1),o.enableVertexAttribArray(1),o.vertexAttribPointer(1,2,o.FLOAT,!1,l,8*Float32Array.BYTES_PER_ELEMENT),o.vertexAttribDivisor(1,1),this._atlasTexture=(0,s.throwIfFalsy)(o.createTexture()),this.register((0,n.toDisposable)(()=>o.deleteTexture(this._atlasTexture))),o.bindTexture(o.TEXTURE_2D,this._atlasTexture),o.texImage2D(o.TEXTURE_2D,0,o.RGBA,1,1,0,o.RGBA,o.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.enable(o.BLEND),o.blendFunc(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),this.onResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(t,e,i,s,r,o,n,a){this._updateCell(this._vertices.attributes,t,e,i,s,r,o,n,a)}_updateCell(t,e,i,s,n,l,c,_,d){h.i=(i*this._terminal.cols+e)*a,s!==o.NULL_CELL_CODE&&void 0!==s?this._atlas&&(_&&_.length>1?h.glyph=this._atlas.getRasterizedGlyphCombinedChar(_,n,l,c):h.glyph=this._atlas.getRasterizedGlyph(s,n,l,c),h.leftCellPadding=Math.floor((this._dimensions.scaledCellWidth-this._dimensions.scaledCharWidth)/2),n!==d&&h.glyph.offset.x>h.leftCellPadding?(h.clippedPixels=h.glyph.offset.x-h.leftCellPadding,t[h.i]=-(h.glyph.offset.x-h.clippedPixels)+this._dimensions.scaledCharLeft,t[h.i+1]=-h.glyph.offset.y+this._dimensions.scaledCharTop,t[h.i+2]=(h.glyph.size.x-h.clippedPixels)/this._dimensions.scaledCanvasWidth,t[h.i+3]=h.glyph.size.y/this._dimensions.scaledCanvasHeight,t[h.i+4]=h.glyph.texturePositionClipSpace.x+h.clippedPixels/this._atlas.cacheCanvas.width,t[h.i+5]=h.glyph.texturePositionClipSpace.y,t[h.i+6]=h.glyph.sizeClipSpace.x-h.clippedPixels/this._atlas.cacheCanvas.width,t[h.i+7]=h.glyph.sizeClipSpace.y):(t[h.i]=-h.glyph.offset.x+this._dimensions.scaledCharLeft,t[h.i+1]=-h.glyph.offset.y+this._dimensions.scaledCharTop,t[h.i+2]=h.glyph.size.x/this._dimensions.scaledCanvasWidth,t[h.i+3]=h.glyph.size.y/this._dimensions.scaledCanvasHeight,t[h.i+4]=h.glyph.texturePositionClipSpace.x,t[h.i+5]=h.glyph.texturePositionClipSpace.y,t[h.i+6]=h.glyph.sizeClipSpace.x,t[h.i+7]=h.glyph.sizeClipSpace.y)):(0,r.fill)(t,0,h.i,h.i+a-1-2)}clear(){const t=this._terminal,e=t.cols*t.rows*a;this._vertices.count!==e?this._vertices.attributes=new Float32Array(e):this._vertices.attributes.fill(0);for(let t=0;t<this._vertices.attributesBuffers.length;t++)this._vertices.count!==e?this._vertices.attributesBuffers[t]=new Float32Array(e):this._vertices.attributesBuffers[t].fill(0);this._vertices.count=e;let i=0;for(let e=0;e<t.rows;e++)for(let s=0;s<t.cols;s++)this._vertices.attributes[i+8]=s/t.cols,this._vertices.attributes[i+9]=e/t.rows,i+=a}onResize(){const t=this._gl;t.viewport(0,0,t.canvas.width,t.canvas.height),this.clear()}render(t){if(!this._atlas)return;const e=this._gl;e.useProgram(this._program),e.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const i=this._vertices.attributesBuffers[this._activeBuffer];let r=0;for(let e=0;e<t.lineLengths.length;e++){const s=e*this._terminal.cols*a,o=this._vertices.attributes.subarray(s,s+t.lineLengths[e]*a);i.set(o,r),r+=o.length}e.bindBuffer(e.ARRAY_BUFFER,this._attributesBuffer),e.bufferData(e.ARRAY_BUFFER,i.subarray(0,r),e.STREAM_DRAW),this._atlas.hasCanvasChanged&&(this._atlas.hasCanvasChanged=!1,e.uniform1i(this._textureLocation,0),e.activeTexture(e.TEXTURE0+0),e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._atlas.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)),e.uniformMatrix4fv(this._projectionLocation,!1,s.PROJECTION_MATRIX),e.uniform2f(this._resolutionLocation,e.canvas.width,e.canvas.height),e.drawElementsInstanced(e.TRIANGLES,6,e.UNSIGNED_BYTE,0,r/a)}setAtlas(t){const e=this._gl;this._atlas=t,e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)}setDimensions(t){this._dimensions=t}}e.GlyphRenderer=c},742:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;const s=i(381),r=i(310),o=i(859),n=i(302),a=8*Float32Array.BYTES_PER_ELEMENT,l={rgba:0,isDefault:!1,x1:0,y1:0,r:0,g:0,b:0,a:0};class h extends o.Disposable{constructor(t,e,i,r){super(),this._terminal=t,this._colors=e,this._gl=i,this._dimensions=r,this._vertices={count:0,attributes:new Float32Array(160)};const n=this._gl;this._program=(0,s.throwIfFalsy)((0,s.createProgram)(n,"#version 300 es\nlayout (location = 0) in vec2 a_position;\nlayout (location = 1) in vec2 a_size;\nlayout (location = 2) in vec4 a_color;\nlayout (location = 3) in vec2 a_unitquad;\n\nuniform mat4 u_projection;\n\nout vec4 v_color;\n\nvoid main() {\n vec2 zeroToOne = a_position + (a_unitquad * a_size);\n gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n v_color = a_color;\n}","#version 300 es\nprecision lowp float;\n\nin vec4 v_color;\n\nout vec4 outColor;\n\nvoid main() {\n outColor = v_color;\n}")),this.register((0,o.toDisposable)(()=>n.deleteProgram(this._program))),this._projectionLocation=(0,s.throwIfFalsy)(n.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);const l=new Float32Array([0,0,1,0,0,1,1,1]),h=n.createBuffer();this.register((0,o.toDisposable)(()=>n.deleteBuffer(h))),n.bindBuffer(n.ARRAY_BUFFER,h),n.bufferData(n.ARRAY_BUFFER,l,n.STATIC_DRAW),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const c=new Uint8Array([0,1,3,0,2,3]),_=n.createBuffer();this.register((0,o.toDisposable)(()=>n.deleteBuffer(_))),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,_),n.bufferData(n.ELEMENT_ARRAY_BUFFER,c,n.STATIC_DRAW),this._attributesBuffer=(0,s.throwIfFalsy)(n.createBuffer()),this.register((0,o.toDisposable)(()=>n.deleteBuffer(this._attributesBuffer))),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,a,0),n.vertexAttribDivisor(0,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,a,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,4,n.FLOAT,!1,a,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(2,1),this._updateCachedColors()}render(){const t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,s.PROJECTION_MATRIX),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,this._vertices.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLES,6,t.UNSIGNED_BYTE,0,this._vertices.count)}onResize(){this._updateViewportRectangle()}setColors(){this._updateCachedColors(),this._updateViewportRectangle()}setDimensions(t){this._dimensions=t}_updateCachedColors(){this._bgFloat=this._colorToFloat32Array(this._colors.background)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.scaledCellWidth,this._terminal.rows*this._dimensions.scaledCellHeight,this._bgFloat)}updateBackgrounds(t){const e=this._terminal,i=this._vertices;let s,o,n,a,l,h,c,_,d,u,g,f=1;for(s=0;s<e.rows;s++){for(n=-1,a=0,l=0,h=!1,o=0;o<e.cols;o++)c=(s*e.cols+o)*r.RENDER_MODEL_INDICIES_PER_CELL,_=t.cells[c+r.RENDER_MODEL_BG_OFFSET],d=t.cells[c+r.RENDER_MODEL_FG_OFFSET],u=!!(67108864&d),(_!==a||d!==l&&(h||u))&&((0!==a||h&&0!==l)&&(g=8*f++,this._updateRectangle(i,g,l,a,n,o,s)),n=o,a=_,l=d,h=u);(0!==a||h&&0!==l)&&(g=8*f++,this._updateRectangle(i,g,l,a,n,e.cols,s))}i.count=f}_updateRectangle(t,e,i,r,o,a,h){if(l.isDefault=!1,67108864&i)switch(50331648&i){case 16777216:case 33554432:l.rgba=this._colors.ansi[255&i].rgba;break;case 50331648:l.rgba=(16777215&i)<<8;break;default:l.rgba=this._colors.foreground.rgba}else switch(50331648&r){case 16777216:case 33554432:l.rgba=this._colors.ansi[255&r].rgba;break;case 50331648:l.rgba=(16777215&r)<<8;break;default:l.rgba=this._colors.background.rgba,l.isDefault=!0}t.attributes.length<e+4&&(t.attributes=(0,s.expandFloat32Array)(t.attributes,this._terminal.rows*this._terminal.cols*8)),l.x1=o*this._dimensions.scaledCellWidth,l.y1=h*this._dimensions.scaledCellHeight,l.r=(l.rgba>>24&255)/255,l.g=(l.rgba>>16&255)/255,l.b=(l.rgba>>8&255)/255,l.a=!l.isDefault&&134217728&r?n.DIM_OPACITY:1,this._addRectangle(t.attributes,e,l.x1,l.y1,(a-o)*this._dimensions.scaledCellWidth,this._dimensions.scaledCellHeight,l.r,l.g,l.b,l.a)}_addRectangle(t,e,i,s,r,o,n,a,l,h){t[e]=i/this._dimensions.scaledCanvasWidth,t[e+1]=s/this._dimensions.scaledCanvasHeight,t[e+2]=r/this._dimensions.scaledCanvasWidth,t[e+3]=o/this._dimensions.scaledCanvasHeight,t[e+4]=n,t[e+5]=a,t[e+6]=l,t[e+7]=h}_addRectangleFloat(t,e,i,s,r,o,n){t[e]=i/this._dimensions.scaledCanvasWidth,t[e+1]=s/this._dimensions.scaledCanvasHeight,t[e+2]=r/this._dimensions.scaledCanvasWidth,t[e+3]=o/this._dimensions.scaledCanvasHeight,t[e+4]=n[0],t[e+5]=n[1],t[e+6]=n[2],t[e+7]=n[3]}_colorToFloat32Array(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(255&t.rgba)/255])}}e.RectangleRenderer=h},310:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_EXT_OFFSET=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;const s=i(455);e.RENDER_MODEL_INDICIES_PER_CELL=4,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.RENDER_MODEL_EXT_OFFSET=3,e.COMBINED_CHAR_BIT_MASK=2147483648,e.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection={hasSelection:!1,columnSelectMode:!1,viewportStartRow:0,viewportEndRow:0,viewportCappedStartRow:0,viewportCappedEndRow:0,startCol:0,endCol:0}}resize(t,i){const s=t*i*e.RENDER_MODEL_INDICIES_PER_CELL;s!==this.cells.length&&(this.cells=new Uint32Array(s),this.lineLengths=new Uint32Array(i))}clear(){(0,s.fill)(this.cells,0,0),(0,s.fill)(this.lineLengths,0,0)}clearSelection(){this.selection.hasSelection=!1,this.selection.viewportStartRow=0,this.selection.viewportEndRow=0,this.selection.viewportCappedStartRow=0,this.selection.viewportCappedEndRow=0,this.selection.startCol=0,this.selection.endCol=0}}},666:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;const s=i(965),r=i(733),o=i(461),n=i(713),a=i(742),l=i(310),h=i(859),c=i(855),_=i(476),d=i(345),u=i(782),g=i(820),f=i(147),C={fg:0,bg:0,hasFg:!1,hasBg:!1,isSelected:!1};class p extends h.Disposable{constructor(t,e,i,s,a,h,c){super(),this._terminal=t,this._colors=e,this._characterJoinerService=i,this._coreBrowserService=s,this._decorationService=h,this._model=new l.RenderModel,this._workCell=new u.CellData,this._workColors={fg:0,bg:0,ext:0},this._onChangeTextureAtlas=new d.EventEmitter,this._onRequestRedraw=new d.EventEmitter,this._onContextLoss=new d.EventEmitter,this._core=this._terminal._core,this._renderLayers=[new r.LinkRenderLayer(this._core.screenElement,2,this._colors,this._core,this._coreBrowserService),new o.CursorRenderLayer(t,this._core.screenElement,3,this._colors,this._onRequestRedraw,this._coreBrowserService,a)],this.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._canvas=document.createElement("canvas");const f={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext("webgl2",f),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextlost",t=>{console.log("webglcontextlost event received"),t.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(t)},3e3)})),this.register((0,g.addDisposableDomListener)(this._canvas,"webglcontextrestored",t=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,n.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this.register((0,_.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,(t,e)=>this._setCanvasDevicePixelDimensions(t,e))),this._core.screenElement.appendChild(this._canvas),this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement)}get onChangeTextureAtlas(){return this._onChangeTextureAtlas.event}get onRequestRedraw(){return this._onRequestRedraw.event}get onContextLoss(){return this._onContextLoss.event}dispose(){var t;for(const t of this._renderLayers)t.dispose();null===(t=this._canvas.parentElement)||void 0===t||t.removeChild(this._canvas),(0,n.removeTerminalFromCache)(this._terminal),super.dispose()}get textureAtlas(){var t;return null===(t=this._charAtlas)||void 0===t?void 0:t.cacheCanvas}setColors(t){this._colors=t;for(const t of this._renderLayers)t.setColors(this._terminal,this._colors),t.reset(this._terminal);this._rectangleRenderer.setColors(),this._refreshCharAtlas(),this._clearModel(!0)}onDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.onResize(this._terminal.cols,this._terminal.rows))}onResize(t,e){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const t of this._renderLayers)t.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.scaledCanvasWidth,this._canvas.height=this.dimensions.scaledCanvasHeight,this._canvas.style.width=this.dimensions.canvasWidth+"px",this._canvas.style.height=this.dimensions.canvasHeight+"px",this._core.screenElement.style.width=this.dimensions.canvasWidth+"px",this._core.screenElement.style.height=this.dimensions.canvasHeight+"px",this._rectangleRenderer.setDimensions(this.dimensions),this._rectangleRenderer.onResize(),this._glyphRenderer.setDimensions(this.dimensions),this._glyphRenderer.onResize(),this._refreshCharAtlas(),this._clearModel(!1)}onCharSizeChanged(){this.onResize(this._terminal.cols,this._terminal.rows)}onBlur(){for(const t of this._renderLayers)t.onBlur(this._terminal);this._requestRedrawViewport()}onFocus(){for(const t of this._renderLayers)t.onFocus(this._terminal);this._requestRedrawViewport()}onSelectionChanged(t,e,i){for(const s of this._renderLayers)s.onSelectionChanged(this._terminal,t,e,i);this._updateSelectionModel(t,e,i),this._requestRedrawViewport()}onCursorMove(){for(const t of this._renderLayers)t.onCursorMove(this._terminal)}onOptionsChanged(){for(const t of this._renderLayers)t.onOptionsChanged(this._terminal);this._updateDimensions(),this._refreshCharAtlas()}_initializeWebGLState(){var t,e;null===(t=this._rectangleRenderer)||void 0===t||t.dispose(),null===(e=this._glyphRenderer)||void 0===e||e.dispose(),this._rectangleRenderer=new a.RectangleRenderer(this._terminal,this._colors,this._gl,this.dimensions),this._glyphRenderer=new s.GlyphRenderer(this._terminal,this._colors,this._gl,this.dimensions),this.onCharSizeChanged()}_refreshCharAtlas(){if(this.dimensions.scaledCharWidth<=0&&this.dimensions.scaledCharHeight<=0)return void(this._isAttached=!1);const t=(0,n.acquireCharAtlas)(this._terminal,this._colors,this.dimensions.scaledCellWidth,this.dimensions.scaledCellHeight,this.dimensions.scaledCharWidth,this.dimensions.scaledCharHeight,this._coreBrowserService.dpr);if(!("getRasterizedGlyph"in t))throw new Error("The webgl renderer only works with the webgl char atlas");this._charAtlas!==t&&this._onChangeTextureAtlas.fire(t.cacheCanvas),this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.setAtlas(this._charAtlas)}_clearModel(t){this._model.clear(),t&&this._glyphRenderer.clear()}clearCharAtlas(){var t;null===(t=this._charAtlas)||void 0===t||t.clearTexture(),this._clearModel(!0),this._updateModel(0,this._terminal.rows-1),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(const t of this._renderLayers)t.reset(this._terminal)}registerCharacterJoiner(t){return-1}deregisterCharacterJoiner(t){return!1}renderRows(t,e){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._core._charSizeService.width&&this._core._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const i of this._renderLayers)i.onGridChanged(this._terminal,t,e);this._glyphRenderer.beginFrame()&&(this._clearModel(!0),this._updateSelectionModel(void 0,void 0)),this._updateModel(t,e),this._rectangleRenderer.render(),this._glyphRenderer.render(this._model)}_updateModel(t,e){const i=this._core;let s,r,o,n,a,h,_,d,u,g,f,C,p,v=this._workCell;for(r=t;r<=e;r++)for(o=r+i.buffer.ydisp,n=i.buffer.lines.get(o),this._model.lineLengths[r]=0,a=this._characterJoinerService.getJoinedCharacters(o),C=0;C<i.cols;C++)if(s=this._workColors.bg,n.loadCell(C,v),0===C&&(s=this._workColors.bg),h=!1,_=C,a.length>0&&C===a[0][0]&&(h=!0,d=a.shift(),v=new m(v,n.translateToString(!0,d[0],d[1]),d[1]-d[0]),_=d[1]-1),u=v.getChars(),g=v.getCode(),f=(r*i.cols+C)*l.RENDER_MODEL_INDICIES_PER_CELL,this._loadColorsForCell(C,o),g!==c.NULL_CELL_CODE&&(this._model.lineLengths[r]=C+1),(this._model.cells[f]!==g||this._model.cells[f+l.RENDER_MODEL_BG_OFFSET]!==this._workColors.bg||this._model.cells[f+l.RENDER_MODEL_FG_OFFSET]!==this._workColors.fg||this._model.cells[f+l.RENDER_MODEL_EXT_OFFSET]!==this._workColors.ext)&&(u.length>1&&(g|=l.COMBINED_CHAR_BIT_MASK),this._model.cells[f]=g,this._model.cells[f+l.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[f+l.RENDER_MODEL_FG_OFFSET]=this._workColors.fg,this._model.cells[f+l.RENDER_MODEL_EXT_OFFSET]=this._workColors.ext,this._glyphRenderer.updateCell(C,r,g,this._workColors.bg,this._workColors.fg,this._workColors.ext,u,s),h))for(v=this._workCell,C++;C<_;C++)p=(r*i.cols+C)*l.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.updateCell(C,r,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0),this._model.cells[p]=c.NULL_CELL_CODE,this._model.cells[p+l.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[p+l.RENDER_MODEL_FG_OFFSET]=this._workColors.fg,this._model.cells[p+l.RENDER_MODEL_EXT_OFFSET]=this._workColors.ext;this._rectangleRenderer.updateBackgrounds(this._model)}_loadColorsForCell(t,e){this._workColors.bg=this._workCell.bg,this._workColors.fg=this._workCell.fg,this._workColors.ext=268435456&this._workCell.bg?this._workCell.extended.ext:0,C.bg=0,C.fg=0,C.hasBg=!1,C.hasFg=!1,C.isSelected=!1,this._decorationService.forEachDecorationAtCell(t,e,"bottom",t=>{t.backgroundColorRGB&&(C.bg=t.backgroundColorRGB.rgba>>8&16777215,C.hasBg=!0),t.foregroundColorRGB&&(C.fg=t.foregroundColorRGB.rgba>>8&16777215,C.hasFg=!0)}),C.isSelected=this._isCellSelected(t,e),C.isSelected&&(C.bg=(this._coreBrowserService.isFocused?this._colors.selectionBackgroundOpaque:this._colors.selectionInactiveBackgroundOpaque).rgba>>8&16777215,C.hasBg=!0,this._colors.selectionForeground&&(C.fg=this._colors.selectionForeground.rgba>>8&16777215,C.hasFg=!0)),this._decorationService.forEachDecorationAtCell(t,e,"top",t=>{t.backgroundColorRGB&&(C.bg=t.backgroundColorRGB.rgba>>8&16777215,C.hasBg=!0),t.foregroundColorRGB&&(C.fg=t.foregroundColorRGB.rgba>>8&16777215,C.hasFg=!0)}),C.hasBg&&(C.isSelected?C.bg=-16777216&this._workCell.bg&-134217729|C.bg|50331648:C.bg=-16777216&this._workCell.bg|C.bg|50331648),C.hasFg&&(C.fg=-16777216&this._workCell.fg&-67108865|C.fg|50331648),67108864&this._workColors.fg&&(C.hasBg&&!C.hasFg&&(0==(50331648&this._workColors.bg)?C.fg=-134217728&this._workColors.fg|16777215&this._colors.background.rgba>>8|50331648:C.fg=-134217728&this._workColors.fg|67108863&this._workColors.bg,C.hasFg=!0),!C.hasBg&&C.hasFg&&(0==(50331648&this._workColors.fg)?C.bg=-67108864&this._workColors.bg|16777215&this._colors.foreground.rgba>>8|50331648:C.bg=-67108864&this._workColors.bg|67108863&this._workColors.fg,C.hasBg=!0)),this._workColors.bg=C.hasBg?C.bg:this._workColors.bg,this._workColors.fg=C.hasFg?C.fg:this._workColors.fg}_isCellSelected(t,e){return!!this._model.selection.hasSelection&&(e-=this._terminal.buffer.active.viewportY,this._model.selection.columnSelectMode?this._model.selection.startCol<=this._model.selection.endCol?t>=this._model.selection.startCol&&e>=this._model.selection.viewportCappedStartRow&&t<this._model.selection.endCol&&e<=this._model.selection.viewportCappedEndRow:t<this._model.selection.startCol&&e>=this._model.selection.viewportCappedStartRow&&t>=this._model.selection.endCol&&e<=this._model.selection.viewportCappedEndRow:e>this._model.selection.viewportStartRow&&e<this._model.selection.viewportEndRow||this._model.selection.viewportStartRow===this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportEndRow&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol)}_updateSelectionModel(t,e,i=!1){const s=this._terminal;if(!t||!e||t[0]===e[0]&&t[1]===e[1])return void this._model.clearSelection();const r=t[1]-s.buffer.active.viewportY,o=e[1]-s.buffer.active.viewportY,n=Math.max(r,0),a=Math.min(o,s.rows-1);n>=s.rows||a<0?this._model.clearSelection():(this._model.selection.hasSelection=!0,this._model.selection.columnSelectMode=i,this._model.selection.viewportStartRow=r,this._model.selection.viewportEndRow=o,this._model.selection.viewportCappedStartRow=n,this._model.selection.viewportCappedEndRow=a,this._model.selection.startCol=t[0],this._model.selection.endCol=e[0])}_updateDimensions(){this._core._charSizeService.width&&this._core._charSizeService.height&&(this.dimensions.scaledCharWidth=Math.floor(this._core._charSizeService.width*this._devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._core._charSizeService.height*this._devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/this._devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/this._devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.scaledCellHeight/this._devicePixelRatio,this.dimensions.actualCellWidth=this.dimensions.scaledCellWidth/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(t,e){this._canvas.width===t&&this._canvas.height===e||(this._canvas.width=t,this._canvas.height=e,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}}e.WebglRenderer=p;class m extends f.AttributeData{constructor(t,e,i){super(),this.content=0,this.combinedData="",this.fg=t.fg,this.bg=t.bg,this.combinedData=e,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(t){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.JoinedCellData=m},381:(t,e)=>{function i(t,e,i){const r=s(t.createShader(e));if(t.shaderSource(r,i),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS))return r;console.error(t.getShaderInfoLog(r)),t.deleteShader(r)}function s(t){if(!t)throw new Error("value must not be falsy");return t}Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfFalsy=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0,e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(t,e,r){const o=s(t.createProgram());if(t.attachShader(o,s(i(t,t.VERTEX_SHADER,e))),t.attachShader(o,s(i(t,t.FRAGMENT_SHADER,r))),t.linkProgram(o),t.getProgramParameter(o,t.LINK_STATUS))return o;console.error(t.getProgramInfoLog(o)),t.deleteProgram(o)},e.createShader=i,e.expandFloat32Array=function(t,e){const i=Math.min(2*t.length,e),s=new Float32Array(i);for(let e=0;e<t.length;e++)s[e]=t[e];return s},e.throwIfFalsy=s},713:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireCharAtlas=void 0;const s=i(433),r=i(167),o=[];e.acquireCharAtlas=function(t,e,i,n,a,l,h){const c=(0,s.generateConfig)(i,n,a,l,t,e,h);for(let e=0;e<o.length;e++){const i=o[e],r=i.ownedBy.indexOf(t);if(r>=0){if((0,s.configEquals)(i.config,c))return i.atlas;1===i.ownedBy.length?(i.atlas.dispose(),o.splice(e,1)):i.ownedBy.splice(r,1);break}}for(let e=0;e<o.length;e++){const i=o[e];if((0,s.configEquals)(i.config,c))return i.ownedBy.push(t),i.atlas}const _=t._core,d={atlas:new r.WebglCharAtlas(document,c,_.unicodeService),config:c,ownedBy:[t]};return o.push(d),d.atlas},e.removeTerminalFromCache=function(t){for(let e=0;e<o.length;e++){const i=o[e].ownedBy.indexOf(t);if(-1!==i){1===o[e].ownedBy.length?(o[e].atlas.dispose(),o.splice(e,1)):o[e].ownedBy.splice(i,1);break}}}},433:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;const i={css:"",rgba:0};e.generateConfig=function(t,e,s,r,o,n,a){const l={foreground:n.foreground,background:n.background,cursor:i,cursorAccent:i,selectionForeground:i,selectionBackgroundTransparent:i,selectionBackgroundOpaque:i,selectionInactiveBackgroundTransparent:i,selectionInactiveBackgroundOpaque:i,ansi:n.ansi.slice(),contrastCache:n.contrastCache};return{customGlyphs:o.options.customGlyphs,devicePixelRatio:a,letterSpacing:o.options.letterSpacing,lineHeight:o.options.lineHeight,scaledCellWidth:t,scaledCellHeight:e,scaledCharWidth:s,scaledCharHeight:r,fontFamily:o.options.fontFamily,fontSize:o.options.fontSize,fontWeight:o.options.fontWeight,fontWeightBold:o.options.fontWeightBold,allowTransparency:o.options.allowTransparency,drawBoldTextInBrightColors:o.options.drawBoldTextInBrightColors,minimumContrastRatio:o.options.minimumContrastRatio,colors:l}},e.configEquals=function(t,e){for(let i=0;i<t.colors.ansi.length;i++)if(t.colors.ansi[i].rgba!==e.colors.ansi[i].rgba)return!1;return t.devicePixelRatio===e.devicePixelRatio&&t.customGlyphs===e.customGlyphs&&t.lineHeight===e.lineHeight&&t.letterSpacing===e.letterSpacing&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.fontWeight===e.fontWeight&&t.fontWeightBold===e.fontWeightBold&&t.allowTransparency===e.allowTransparency&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.drawBoldTextInBrightColors===e.drawBoldTextInBrightColors&&t.minimumContrastRatio===e.minimumContrastRatio&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background},e.is256Color=function(t){return 16777216==(50331648&t)||33554432==(50331648&t)}},167:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebglCharAtlas=void 0;const s=i(302),r=i(855),o=i(381),n=i(147),a=i(160),l=i(14),h=i(634),c=i(485),_=1024,d=1024,u=Math.floor(819.2),g={css:"rgba(0, 0, 0, 0)",rgba:0},f={offset:{x:0,y:0},texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},C={glyph:void 0};function p(t,e,i,s){const r=e.rgba>>>24,o=e.rgba>>>16&255,n=e.rgba>>>8&255,a=i.rgba>>>24,l=i.rgba>>>16&255,h=i.rgba>>>8&255,c=Math.floor((Math.abs(r-a)+Math.abs(o-l)+Math.abs(n-h))/12);let _=!0;for(let e=0;e<t.data.length;e+=4)t.data[e]===r&&t.data[e+1]===o&&t.data[e+2]===n||s&&Math.abs(t.data[e]-r)+Math.abs(t.data[e+1]-o)+Math.abs(t.data[e+2]-n)<c?t.data[e+3]=0:_=!1;return _}e.WebglCharAtlas=class{constructor(t,e,i){this._config=e,this._unicodeService=i,this._didWarmUp=!1,this._cacheMap=new c.FourKeyMap,this._cacheMapCombined=new c.FourKeyMap,this._currentRow={x:0,y:0,height:0},this._fixedRows=[],this.hasCanvasChanged=!1,this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new n.AttributeData,this.cacheCanvas=t.createElement("canvas"),this.cacheCanvas.width=_,this.cacheCanvas.height=d,this._cacheCtx=(0,o.throwIfFalsy)(this.cacheCanvas.getContext("2d",{alpha:!0})),this._tmpCanvas=t.createElement("canvas"),this._tmpCanvas.width=4*this._config.scaledCellWidth+4,this._tmpCanvas.height=this._config.scaledCellHeight+4,this._tmpCtx=(0,o.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency}))}dispose(){this.cacheCanvas.parentElement&&this.cacheCanvas.parentElement.removeChild(this.cacheCanvas)}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){for(let t=33;t<126;t++){const e=this._drawToCache(t,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT);this._cacheMap.set(t,r.DEFAULT_COLOR,r.DEFAULT_COLOR,r.DEFAULT_EXT,e)}}beginFrame(){return this._currentRow.y>u&&(this.clearTexture(),this.warmUp(),!0)}clearTexture(){0===this._currentRow.x&&0===this._currentRow.y||(this._cacheCtx.clearRect(0,0,_,d),this._cacheMap.clear(),this._cacheMapCombined.clear(),this._currentRow.x=0,this._currentRow.y=0,this._currentRow.height=0,this._fixedRows.length=0,this._didWarmUp=!1)}getRasterizedGlyphCombinedChar(t,e,i,s){return this._getFromCacheMap(this._cacheMapCombined,t,e,i,s)}getRasterizedGlyph(t,e,i,s){return this._getFromCacheMap(this._cacheMap,t,e,i,s)}_getFromCacheMap(t,e,i,s,r){return C.glyph=t.get(e,i,s,r),C.glyph||(C.glyph=this._drawToCache(e,i,s,r),t.set(e,i,s,r,C.glyph)),C.glyph}_getColorFromAnsiIndex(t){if(t>=this._config.colors.ansi.length)throw new Error("No color found for idx "+t);return this._config.colors.ansi[t]}_getBackgroundColor(t,e,i,r){if(this._config.allowTransparency)return g;let o;switch(t){case 16777216:case 33554432:o=this._getColorFromAnsiIndex(e);break;case 50331648:const t=n.AttributeData.toColorRGB(e);o=a.rgba.toColor(t[0],t[1],t[2]);break;default:o=i?this._config.colors.foreground:this._config.colors.background}return r&&(o=a.color.blend(this._config.colors.background,a.color.multiplyOpacity(o,s.DIM_OPACITY))),o}_getForegroundColor(t,e,i,r,o,l,h,c,_,d){const u=this._getMinimumContrastColor(t,e,i,r,o,l,!1,_,d);if(u)return u;let g;switch(o){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&_&&l<8&&(l+=8),g=this._getColorFromAnsiIndex(l);break;case 50331648:const t=n.AttributeData.toColorRGB(l);g=a.rgba.toColor(t[0],t[1],t[2]);break;default:g=h?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(g=a.color.opaque(g)),c&&(g=a.color.multiplyOpacity(g,s.DIM_OPACITY)),g}_resolveBackgroundRgba(t,e,i){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return i?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(t,e,i,s){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&s&&e<8&&(e+=8),this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return i?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(t,e,i,s,r,o,n,l,h){if(1===this._config.minimumContrastRatio||h)return;const c=this._config.colors.contrastCache.getColor(t,s);if(void 0!==c)return c||void 0;const _=this._resolveBackgroundRgba(e,i,n),d=this._resolveForegroundRgba(r,o,n,l),u=a.rgba.ensureContrastRatio(_,d,this._config.minimumContrastRatio);if(!u)return void this._config.colors.contrastCache.setColor(t,s,null);const g=a.rgba.toColor(u>>24&255,u>>16&255,u>>8&255);return this._config.colors.contrastCache.setColor(t,s,g),g}_drawToCache(t,e,i,r){const o="number"==typeof t?String.fromCharCode(t):t;this.hasCanvasChanged=!0;const a=this._config.scaledCellWidth*Math.max(o.length,2)+4;this._tmpCanvas.width<a&&(this._tmpCanvas.width=a);const c=this._config.scaledCellHeight+8;if(this._tmpCanvas.height<c&&(this._tmpCanvas.height=c),this._tmpCtx.save(),this._workAttributeData.fg=i,this._workAttributeData.bg=e,this._workAttributeData.extended.ext=r,this._workAttributeData.isInvisible())return f;const u=!!this._workAttributeData.isBold(),g=!!this._workAttributeData.isInverse(),C=!!this._workAttributeData.isDim(),m=!!this._workAttributeData.isItalic(),v=!!this._workAttributeData.isUnderline(),L=!!this._workAttributeData.isStrikethrough();let w=this._workAttributeData.getFgColor(),x=this._workAttributeData.getFgColorMode(),b=this._workAttributeData.getBgColor(),M=this._workAttributeData.getBgColorMode();if(g){const t=w;w=b,b=t;const e=x;x=M,M=e}const y=this._getBackgroundColor(M,b,g,C);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const R=u?this._config.fontWeightBold:this._config.fontWeight,E=m?"italic":"";this._tmpCtx.font=`${E} ${R} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=s.TEXT_BASELINE;const A=1===o.length&&(0,h.isPowerlineGlyph)(o.charCodeAt(0)),D=1===o.length&&(0,h.isRestrictedPowerlineGlyph)(o.charCodeAt(0)),T=this._getForegroundColor(e,M,b,i,x,w,g,C,u,(0,h.excludeFromContrastRatioDemands)(o.charCodeAt(0)));this._tmpCtx.fillStyle=T.css;const S=D?0:4;let B=!1;!1!==this._config.customGlyphs&&(B=(0,l.tryDrawCustomChar)(this._tmpCtx,o,S,S,this._config.scaledCellWidth,this._config.scaledCellHeight,this._config.fontSize,this._config.devicePixelRatio));let F,k=!A;if(F="number"==typeof t?this._unicodeService.wcwidth(t):this._unicodeService.getStringCellWidth(t),v){this._tmpCtx.save();const t=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),e=t%2==1?.5:0;if(this._tmpCtx.lineWidth=t,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())k=!1,this._tmpCtx.strokeStyle=`rgb(${n.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{k=!1;let t=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&t<8&&(t+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(t).css}this._tmpCtx.beginPath();const i=S,s=Math.ceil(S+this._config.scaledCharHeight)-e,r=S+this._config.scaledCharHeight+t-e,a=Math.ceil(S+this._config.scaledCharHeight+2*t)-e;for(let o=0;o<F;o++){this._tmpCtx.save();const n=i+o*this._config.scaledCellWidth,l=i+(o+1)*this._config.scaledCellWidth,h=n+this._config.scaledCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(n,s),this._tmpCtx.lineTo(l,s),this._tmpCtx.moveTo(n,a),this._tmpCtx.lineTo(l,a);break;case 3:const i=t<=1?a:Math.ceil(S+this._config.scaledCharHeight-t/2)-e,o=t<=1?s:Math.ceil(S+this._config.scaledCharHeight+t/2)-e,c=new Path2D;c.rect(n,s,this._config.scaledCellWidth,a-s),this._tmpCtx.clip(c),this._tmpCtx.moveTo(n-this._config.scaledCellWidth/2,r),this._tmpCtx.bezierCurveTo(n-this._config.scaledCellWidth/2,o,n,o,n,r),this._tmpCtx.bezierCurveTo(n,i,h,i,h,r),this._tmpCtx.bezierCurveTo(h,o,l,o,l,r),this._tmpCtx.bezierCurveTo(l,i,l+this._config.scaledCellWidth/2,i,l+this._config.scaledCellWidth/2,r);break;case 4:this._tmpCtx.setLineDash([2*this._config.devicePixelRatio,this._config.devicePixelRatio]),this._tmpCtx.moveTo(n,s),this._tmpCtx.lineTo(l,s);break;case 5:this._tmpCtx.setLineDash([4*this._config.devicePixelRatio,3*this._config.devicePixelRatio]),this._tmpCtx.moveTo(n,s),this._tmpCtx.lineTo(l,s);break;default:this._tmpCtx.moveTo(n,s),this._tmpCtx.lineTo(l,s)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!B&&this._config.fontSize>=12&&!this._config.allowTransparency&&" "!==o){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const e=this._tmpCtx.measureText(o);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in e&&e.actualBoundingBoxDescent>0){this._tmpCtx.save();const e=new Path2D;e.rect(i,s-Math.ceil(t/2),this._config.scaledCellWidth,a-s+Math.ceil(t/2)),this._tmpCtx.clip(e),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=y.css,this._tmpCtx.strokeText(o,S,S+this._config.scaledCharHeight),this._tmpCtx.restore()}}}if(B||this._tmpCtx.fillText(o,S,S+this._config.scaledCharHeight),"_"===o&&!this._config.allowTransparency){let t=p(this._tmpCtx.getImageData(S,S,this._config.scaledCellWidth,this._config.scaledCellHeight),y,T,k);if(t)for(let e=1;e<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=y.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(o,S,S+this._config.scaledCharHeight-e),t=p(this._tmpCtx.getImageData(S,S,this._config.scaledCellWidth,this._config.scaledCellHeight),y,T,k),t);e++);}if(L){const t=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),e=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=t,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(S,S+Math.floor(this._config.scaledCharHeight/2)-e),this._tmpCtx.lineTo(S+this._config.scaledCharWidth*F,S+Math.floor(this._config.scaledCharHeight/2)-e),this._tmpCtx.stroke()}this._tmpCtx.restore();const I=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let $;if($=this._config.allowTransparency?function(t){for(let e=0;e<t.data.length;e+=4)if(t.data[e+3]>0)return!1;return!0}(I):p(I,y,T,k),$)return f;const P=this._findGlyphBoundingBox(I,this._workBoundingBox,a,D,B,S),W=this._clipImageData(I,this._workBoundingBox);let O;for(;;){O=this._currentRow;for(const t of this._fixedRows)(O===this._currentRow||t.height<O.height)&&P.size.y<=t.height&&(O=t);if(O.height>2*P.size.y&&(this._currentRow.height>0&&this._fixedRows.push(this._currentRow),O={x:0,y:this._currentRow.y+this._currentRow.height,height:P.size.y},this._fixedRows.push(O),this._currentRow={x:0,y:O.y+O.height,height:0}),O.x+P.size.x<=_)break;O===this._currentRow?(O.x=0,O.y+=O.height,O.height=0):this._fixedRows.splice(this._fixedRows.indexOf(O),1)}return P.texturePosition.x=O.x,P.texturePosition.y=O.y,P.texturePositionClipSpace.x=O.x/_,P.texturePositionClipSpace.y=O.y/d,O.height=Math.max(O.height,P.size.y),O.x+=P.size.x,this._cacheCtx.putImageData(W,P.texturePosition.x,P.texturePosition.y),P}_findGlyphBoundingBox(t,e,i,s,r,o){e.top=0;const n=s?this._config.scaledCellHeight:this._tmpCanvas.height,a=s?this._config.scaledCellWidth:i;let l=!1;for(let i=0;i<n;i++){for(let s=0;s<a;s++){const r=i*this._tmpCanvas.width*4+4*s+3;if(0!==t.data[r]){e.top=i,l=!0;break}}if(l)break}e.left=0,l=!1;for(let i=0;i<a;i++){for(let s=0;s<n;s++){const r=s*this._tmpCanvas.width*4+4*i+3;if(0!==t.data[r]){e.left=i,l=!0;break}}if(l)break}e.right=a,l=!1;for(let i=a-1;i>=0;i--){for(let s=0;s<n;s++){const r=s*this._tmpCanvas.width*4+4*i+3;if(0!==t.data[r]){e.right=i,l=!0;break}}if(l)break}e.bottom=n,l=!1;for(let i=n-1;i>=0;i--){for(let s=0;s<a;s++){const r=i*this._tmpCanvas.width*4+4*s+3;if(0!==t.data[r]){e.bottom=i,l=!0;break}}if(l)break}return{texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:e.right-e.left+1,y:e.bottom-e.top+1},sizeClipSpace:{x:(e.right-e.left+1)/_,y:(e.bottom-e.top+1)/d},offset:{x:-e.left+o+(s||r?Math.floor((this._config.scaledCellWidth-this._config.scaledCharWidth)/2):0),y:-e.top+o+(s||r?1===this._config.lineHeight?0:Math.round((this._config.scaledCellHeight-this._config.scaledCharHeight)/2):0)}}}_clipImageData(t,e){const i=e.right-e.left+1,s=e.bottom-e.top+1,r=new Uint8ClampedArray(i*s*4);for(let s=e.top;s<=e.bottom;s++)for(let o=e.left;o<=e.right;o++){const n=s*this._tmpCanvas.width*4+4*o,a=(s-e.top)*i*4+4*(o-e.left);r[a]=t.data[n],r[a+1]=t.data[n+1],r[a+2]=t.data[n+2],r[a+3]=t.data[n+3]}return new ImageData(r,i,s)}}},592:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;const s=i(713),r=i(302),o=i(381);e.BaseRenderLayer=class{constructor(t,e,i,s,r,o){this._container=t,this._alpha=s,this._colors=r,this._coreBrowserService=o,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add(`xterm-${e}-layer`),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}dispose(){this._canvas.remove(),this._charAtlas&&this._charAtlas.dispose()}_initCanvas(){this._ctx=(0,o.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}onOptionsChanged(t){}onBlur(t){}onFocus(t){}onCursorMove(t){}onGridChanged(t,e,i){}onSelectionChanged(t,e,i,s=!1){}setColors(t,e){this._refreshCharAtlas(t,e)}_setTransparency(t,e){if(e===this._alpha)return;const i=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(t,this._colors),this.onGridChanged(t,0,t.rows-1)}_refreshCharAtlas(t,e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,s.acquireCharAtlas)(t,e,this._scaledCellWidth,this._scaledCellHeight,this._scaledCharWidth,this._scaledCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(t,e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._colors)}_fillCells(t,e,i,s){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight)}_fillBottomLineAtCells(t,e,i=1){this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-this._coreBrowserService.dpr-1,i*this._scaledCellWidth,this._coreBrowserService.dpr)}_fillLeftLineAtCell(t,e,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,this._coreBrowserService.dpr*i,this._scaledCellHeight)}_strokeRectAtCell(t,e,i,s){this._ctx.lineWidth=this._coreBrowserService.dpr,this._ctx.strokeRect(t*this._scaledCellWidth+this._coreBrowserService.dpr/2,e*this._scaledCellHeight+this._coreBrowserService.dpr/2,i*this._scaledCellWidth-this._coreBrowserService.dpr,s*this._scaledCellHeight-this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(t,e,i,s){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,s*this._scaledCellHeight))}_fillCharTrueColor(t,e,i,s){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=r.TEXT_BASELINE,this._clipCell(i,s,e.getWidth()),this._ctx.fillText(e.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,s*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)}_clipCell(t,e,i){this._ctx.beginPath(),this._ctx.rect(t*this._scaledCellWidth,e*this._scaledCellHeight,i*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()}_getFont(t,e,i){return`${i?"italic":""} ${e?t.options.fontWeightBold:t.options.fontWeight} ${t.options.fontSize*this._coreBrowserService.dpr}px ${t.options.fontFamily}`}}},461:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;const s=i(592),r=i(782);class o extends s.BaseRenderLayer{constructor(t,e,i,s,o,n,a){super(e,"cursor",i,!0,s,n),this._onRequestRefreshRowsEvent=o,this._coreService=a,this._cell=new r.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this)},this.onOptionsChanged(t)}dispose(){var t;null===(t=this._cursorBlinkStateManager)||void 0===t||t.dispose(),this._cursorBlinkStateManager=void 0,super.dispose()}resize(t,e){super.resize(t,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(t){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t),this.onOptionsChanged(t)}onBlur(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onFocus(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(t),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onOptionsChanged(t){var e;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new n(()=>{this._render(t,!0)},this._coreBrowserService)):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})}onCursorMove(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t)}onGridChanged(t,e,i){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(t,!1):this._cursorBlinkStateManager.restartBlinkAnimation(t)}_render(t,e){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const i=t.buffer.active.baseY+t.buffer.active.cursorY,s=i-t.buffer.active.viewportY,r=Math.min(t.buffer.active.cursorX,t.cols-1);if(s<0||s>=t.rows)this._clearCursor();else if(t._core.buffer.lines.get(i).loadCell(r,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;const e=t.options.cursorStyle;return e&&"block"!==e?this._cursorRenderers[e](t,r,s,this._cell):this._renderBlurCursor(t,r,s,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=s,this._state.isFocused=!1,this._state.style=e,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===r&&this._state.y===s&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===t.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,r,s,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=s,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,i,t.options.cursorWidth),this._ctx.restore()}_renderBlockCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,i,s.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(t,s,e,i),this._ctx.restore()}_renderUnderlineCursor(t,e,i,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,i),this._ctx.restore()}_renderBlurCursor(t,e,i,s){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,i,s.getWidth(),1),this._ctx.restore()}}e.CursorRenderLayer=o;class n{constructor(t,e){this._renderCallback=t,this._coreBrowserService=e,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(t){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(t=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const t=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,t>0)return void this._restartInterval(t)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const t=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(t)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},t)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(t){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation(t)}}},733:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;const s=i(592),r=i(302),o=i(433);class n extends s.BaseRenderLayer{constructor(t,e,i,s,r){super(t,"link",e,!0,i,r),s.linkifier2.onShowLinkUnderline(t=>this._onShowLinkUnderline(t)),s.linkifier2.onHideLinkUnderline(t=>this._onHideLinkUnderline(t))}resize(t,e){super.resize(t,e),this._state=void 0}reset(t){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const t=this._state.y2-this._state.y1-1;t>0&&this._clearCells(0,this._state.y1+1,this._state.cols,t),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_onShowLinkUnderline(t){if(t.fg===r.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:void 0!==t.fg&&(0,o.is256Color)(t.fg)?this._ctx.fillStyle=this._colors.ansi[t.fg].css:this._ctx.fillStyle=this._colors.foreground.css,t.y1===t.y2)this._fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this._fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(let e=t.y1+1;e<t.y2;e++)this._fillBottomLineAtCells(0,e,t.cols);this._fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t}_onHideLinkUnderline(t){this._clearCurrentLink()}}e.LinkRenderLayer=n},820:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(t,e,i,s){t.addEventListener(e,i,s);let r=!1;return{dispose:()=>{r||(r=!0,t.removeEventListener(e,i,s))}}}},302:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;const s=i(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=s.isFirefox||s.isLegacyEdge?"bottom":"ideographic"},14:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.powerlineDefinitions=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;const s=i(634);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const r={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"║":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╒":{1:(t,e)=>`M.5,1 L.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╓":{1:(t,e)=>`M${.5-t},1 L${.5-t},.5 L1,.5 M${.5+t},.5 L${.5+t},1`},"╔":{1:(t,e)=>`M1,${.5-e} L${.5-t},${.5-e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"╕":{1:(t,e)=>`M0,${.5-e} L.5,${.5-e} L.5,1 M0,${.5+e} L.5,${.5+e}`},"╖":{1:(t,e)=>`M${.5+t},1 L${.5+t},.5 L0,.5 M${.5-t},.5 L${.5-t},1`},"╗":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5+t},${.5-e} L${.5+t},1`},"╘":{1:(t,e)=>`M.5,0 L.5,${.5+e} L1,${.5+e} M.5,${.5-e} L1,${.5-e}`},"╙":{1:(t,e)=>`M1,.5 L${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╚":{1:(t,e)=>`M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0 M1,${.5+e} L${.5-t},${.5+e} L${.5-t},0`},"╛":{1:(t,e)=>`M0,${.5+e} L.5,${.5+e} L.5,0 M0,${.5-e} L.5,${.5-e}`},"╜":{1:(t,e)=>`M0,.5 L${.5+t},.5 L${.5+t},0 M${.5-t},.5 L${.5-t},0`},"╝":{1:(t,e)=>`M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M0,${.5+e} L${.5+t},${.5+e} L${.5+t},0`},"╞":{1:(t,e)=>`M.5,0 L.5,1 M.5,${.5-e} L1,${.5-e} M.5,${.5+e} L1,${.5+e}`},"╟":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1 M${.5+t},.5 L1,.5`},"╠":{1:(t,e)=>`M${.5-t},0 L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╡":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L.5,${.5-e} M0,${.5+e} L.5,${.5+e}`},"╢":{1:(t,e)=>`M0,.5 L${.5-t},.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╣":{1:(t,e)=>`M${.5+t},0 L${.5+t},1 M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0`},"╤":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e} M.5,${.5+e} L.5,1`},"╥":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},1 M${.5+t},.5 L${.5+t},1`},"╦":{1:(t,e)=>`M0,${.5-e} L1,${.5-e} M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1`},"╧":{1:(t,e)=>`M.5,0 L.5,${.5-e} M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╨":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},.5 L${.5-t},0 M${.5+t},.5 L${.5+t},0`},"╩":{1:(t,e)=>`M0,${.5+e} L1,${.5+e} M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╪":{1:(t,e)=>`M.5,0 L.5,1 M0,${.5-e} L1,${.5-e} M0,${.5+e} L1,${.5+e}`},"╫":{1:(t,e)=>`M0,.5 L1,.5 M${.5-t},0 L${.5-t},1 M${.5+t},0 L${.5+t},1`},"╬":{1:(t,e)=>`M0,${.5+e} L${.5-t},${.5+e} L${.5-t},1 M1,${.5+e} L${.5+t},${.5+e} L${.5+t},1 M0,${.5-e} L${.5-t},${.5-e} L${.5-t},0 M1,${.5-e} L${.5+t},${.5-e} L${.5+t},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,1,.5`},"╮":{1:(t,e)=>`M.5,1 L.5,${.5+e/.15*.5} C.5,${.5+e/.15*.5},.5,.5,0,.5`},"╯":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,0,.5`},"╰":{1:(t,e)=>`M.5,0 L.5,${.5-e/.15*.5} C.5,${.5-e/.15*.5},.5,.5,1,.5`}},e.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:1,leftPadding:1}},e.tryDrawCustomChar=function(t,i,n,h,c,_,d,u){const g=e.blockElementDefinitions[i];if(g)return function(t,e,i,s,r,o){for(let n=0;n<e.length;n++){const a=e[n],l=r/8,h=o/8;t.fillRect(i+a.x*l,s+a.y*h,a.w*l,a.h*h)}}(t,g,n,h,c,_),!0;const f=r[i];if(f)return function(t,e,i,r,n,a){let l=o.get(e);l||(l=new Map,o.set(e,l));const h=t.fillStyle;if("string"!=typeof h)throw new Error(`Unexpected fillStyle type "${h}"`);let c=l.get(h);if(!c){const i=e[0].length,r=e.length,o=document.createElement("canvas");o.width=i,o.height=r;const n=(0,s.throwIfFalsy)(o.getContext("2d")),a=new ImageData(i,r);let _,d,u,g;if(h.startsWith("#"))_=parseInt(h.slice(1,3),16),d=parseInt(h.slice(3,5),16),u=parseInt(h.slice(5,7),16),g=h.length>7&&parseInt(h.slice(7,9),16)||1;else{if(!h.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${h}" when drawing pattern glyph`);[_,d,u,g]=h.substring(5,h.length-1).split(",").map(t=>parseFloat(t))}for(let t=0;t<r;t++)for(let s=0;s<i;s++)a.data[4*(t*i+s)]=_,a.data[4*(t*i+s)+1]=d,a.data[4*(t*i+s)+2]=u,a.data[4*(t*i+s)+3]=e[t][s]*(255*g);n.putImageData(a,0,0),c=(0,s.throwIfFalsy)(t.createPattern(o,null)),l.set(h,c)}t.fillStyle=c,t.fillRect(i,r,n,a)}(t,f,n,h,c,_),!0;const C=e.boxDrawingDefinitions[i];if(C)return function(t,e,i,s,r,o,n){t.strokeStyle=t.fillStyle;for(const[h,c]of Object.entries(e)){let e;t.beginPath(),t.lineWidth=n*Number.parseInt(h),e="function"==typeof c?c(.15,.15/o*r):c;for(const h of e.split(" ")){const e=h[0],c=a[e];if(!c){console.error(`Could not find drawing instructions for "${e}"`);continue}const _=h.substring(1).split(",");_[0]&&_[1]&&c(t,l(_,r,o,i,s,!0,n))}t.stroke(),t.closePath()}}(t,C,n,h,c,_,u),!0;const p=e.powerlineDefinitions[i];return!!p&&(function(t,e,i,s,r,o,n,h){var c,_;t.beginPath();const d=n/12;t.lineWidth=h*d;for(const n of e.d.split(" ")){const h=n[0],u=a[h];if(!u){console.error(`Could not find drawing instructions for "${h}"`);continue}const g=n.substring(1).split(",");g[0]&&g[1]&&u(t,l(g,r,o,i,s,!1,(null!==(c=e.leftPadding)&&void 0!==c?c:0)*(d/2),(null!==(_=e.rightPadding)&&void 0!==_?_:0)*(d/2)))}1===e.type?(t.strokeStyle=t.fillStyle,t.stroke()):t.fill(),t.closePath()}(t,p,n,h,c,_,d,u),!0)};const o=new Map;function n(t,e,i=0){return Math.max(Math.min(t,e),i)}const a={C:(t,e)=>t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]),L:(t,e)=>t.lineTo(e[0],e[1]),M:(t,e)=>t.moveTo(e[0],e[1])};function l(t,e,i,s,r,o,a,l=0,h=0){const c=t.map(t=>parseFloat(t)||parseInt(t));if(c.length<2)throw new Error("Too few arguments for instruction");for(let t=0;t<c.length;t+=2)c[t]*=e-l*a-h*a,o&&0!==c[t]&&(c[t]=n(Math.round(c[t]+.5)-.5,e,0)),c[t]+=s+l*a;for(let t=1;t<c.length;t+=2)c[t]*=i,o&&0!==c[t]&&(c[t]=n(Math.round(c[t]+.5)-.5,i,0)),c[t]+=r;return c}},476:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.observeDevicePixelDimensions=void 0;const s=i(859);e.observeDevicePixelDimensions=function(t,e,i){let r=new e.ResizeObserver(e=>{const s=e.find(e=>e.target===t);if(!s)return;if(!("devicePixelContentBoxSize"in s))return null==r||r.disconnect(),void(r=void 0);const o=s.devicePixelContentBoxSize[0].inlineSize,n=s.devicePixelContentBoxSize[0].blockSize;o>0&&n>0&&i(o,n)});try{r.observe(t,{box:["device-pixel-content-box"]})}catch(t){r.disconnect(),r=void 0}return(0,s.toDisposable)(()=>null==r?void 0:r.disconnect())}},634:(t,e)=>{function i(t){return 57508<=t&&t<=57558}Object.defineProperty(e,"__esModule",{value:!0}),e.excludeFromContrastRatioDemands=e.isRestrictedPowerlineGlyph=e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(t){if(!t)throw new Error("value must not be falsy");return t},e.isPowerlineGlyph=i,e.isRestrictedPowerlineGlyph=function(t){return 57520<=t&&t<=57527},e.excludeFromContrastRatioDemands=function(t){return i(t)||function(t){return 9472<=t&&t<=9631}(t)}},160:(t,e)=>{var i,s,r;function o(t){const e=t.toString(16);return e.length<2?"0"+e:e}function n(t,e){return t<e?(e+.05)/(t+.05):(t+.05)/(e+.05)}Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=void 0,function(t){t.toCss=function(t,e,i,s){return void 0!==s?`#${o(t)}${o(e)}${o(i)}${o(s)}`:`#${o(t)}${o(e)}${o(i)}`},t.toRgba=function(t,e,i,s=255){return(t<<24|e<<16|i<<8|s)>>>0}}(i=e.channels||(e.channels={})),function(t){function e(t,e){const s=Math.round(255*e),[o,n,a]=r.toChannels(t.rgba);return{css:i.toCss(o,n,a,s),rgba:i.toRgba(o,n,a,s)}}t.blend=function(t,e){const s=(255&e.rgba)/255;if(1===s)return{css:e.css,rgba:e.rgba};const r=e.rgba>>24&255,o=e.rgba>>16&255,n=e.rgba>>8&255,a=t.rgba>>24&255,l=t.rgba>>16&255,h=t.rgba>>8&255,c=a+Math.round((r-a)*s),_=l+Math.round((o-l)*s),d=h+Math.round((n-h)*s);return{css:i.toCss(c,_,d),rgba:i.toRgba(c,_,d)}},t.isOpaque=function(t){return 255==(255&t.rgba)},t.ensureContrastRatio=function(t,e,i){const s=r.ensureContrastRatio(t.rgba,e.rgba,i);if(s)return r.toColor(s>>24&255,s>>16&255,s>>8&255)},t.opaque=function(t){const e=(255|t.rgba)>>>0,[s,o,n]=r.toChannels(e);return{css:i.toCss(s,o,n),rgba:e}},t.opacity=e,t.multiplyOpacity=function(t,i){return e(t,(255&t.rgba)*i/255)},t.toColorRGB=function(t){return[t.rgba>>24&255,t.rgba>>16&255,t.rgba>>8&255]}}(e.color||(e.color={})),(e.css||(e.css={})).toColor=function(t){if(t.match(/#[0-9a-f]{3,8}/i))switch(t.length){case 4:{const e=parseInt(t.slice(1,2).repeat(2),16),i=parseInt(t.slice(2,3).repeat(2),16),s=parseInt(t.slice(3,4).repeat(2),16);return r.toColor(e,i,s)}case 5:{const e=parseInt(t.slice(1,2).repeat(2),16),i=parseInt(t.slice(2,3).repeat(2),16),s=parseInt(t.slice(3,4).repeat(2),16),o=parseInt(t.slice(4,5).repeat(2),16);return r.toColor(e,i,s,o)}case 7:return{css:t,rgba:(parseInt(t.slice(1),16)<<8|255)>>>0};case 9:return{css:t,rgba:parseInt(t.slice(1),16)>>>0}}const e=t.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e){const t=parseInt(e[1]),i=parseInt(e[2]),s=parseInt(e[3]),o=Math.round(255*(void 0===e[5]?1:parseFloat(e[5])));return r.toColor(t,i,s,o)}throw new Error("css.toColor: Unsupported css format")},function(t){function e(t,e,i){const s=t/255,r=e/255,o=i/255;return.2126*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}t.relativeLuminance=function(t){return e(t>>16&255,t>>8&255,255&t)},t.relativeLuminance2=e}(s=e.rgb||(e.rgb={})),function(t){function e(t,e,i){const r=t>>24&255,o=t>>16&255,a=t>>8&255;let l=e>>24&255,h=e>>16&255,c=e>>8&255,_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;_<i&&(l>0||h>0||c>0);)l-=Math.max(0,Math.ceil(.1*l)),h-=Math.max(0,Math.ceil(.1*h)),c-=Math.max(0,Math.ceil(.1*c)),_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}function r(t,e,i){const r=t>>24&255,o=t>>16&255,a=t>>8&255;let l=e>>24&255,h=e>>16&255,c=e>>8&255,_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));for(;_<i&&(l<255||h<255||c<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),h=Math.min(255,h+Math.ceil(.1*(255-h))),c=Math.min(255,c+Math.ceil(.1*(255-c))),_=n(s.relativeLuminance2(l,h,c),s.relativeLuminance2(r,o,a));return(l<<24|h<<16|c<<8|255)>>>0}t.ensureContrastRatio=function(t,i,o){const a=s.relativeLuminance(t>>8),l=s.relativeLuminance(i>>8);if(n(a,l)<o){if(l<a){const l=e(t,i,o),h=n(a,s.relativeLuminance(l>>8));if(h<o){const e=r(t,i,o);return h>n(a,s.relativeLuminance(e>>8))?l:e}return l}const h=r(t,i,o),c=n(a,s.relativeLuminance(h>>8));if(c<o){const r=e(t,i,o);return c>n(a,s.relativeLuminance(r>>8))?h:r}return h}},t.reduceLuminance=e,t.increaseLuminance=r,t.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},t.toColor=function(t,e,s,r){return{css:i.toCss(t,e,s,r),rgba:i.toRgba(t,e,s,r)}}}(r=e.rgba||(e.rgba={})),e.toPaddedHex=o,e.contrastRatio=n},345:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.forwardEvent=e.EventEmitter=void 0,e.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=t=>(this._listeners.push(t),{dispose:()=>{if(!this._disposed)for(let e=0;e<this._listeners.length;e++)if(this._listeners[e]===t)return void this._listeners.splice(e,1)}})),this._event}fire(t,e){const i=[];for(let t=0;t<this._listeners.length;t++)i.push(this._listeners[t]);for(let s=0;s<i.length;s++)i[s].call(void 0,t,e)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},e.forwardEvent=function(t,e){return t(t=>e.fire(t))}},859:(t,e)=>{function i(t){for(const e of t)e.dispose();t.length=0}Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.toDisposable=e.Disposable=void 0,e.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const t of this._disposables)t.dispose();this._disposables.length=0}register(t){return this._disposables.push(t),t}unregister(t){const e=this._disposables.indexOf(t);-1!==e&&this._disposables.splice(e,1)}},e.toDisposable=function(t){return{dispose:t}},e.disposeArray=i,e.getDisposeArrayDisposable=function(t){return{dispose:()=>i(t)}}},485:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FourKeyMap=e.TwoKeyMap=void 0;class i{constructor(){this._data={}}set(t,e,i){this._data[t]||(this._data[t]={}),this._data[t][e]=i}get(t,e){return this._data[t]?this._data[t][e]:void 0}clear(){this._data={}}}e.TwoKeyMap=i,e.FourKeyMap=class{constructor(){this._data=new i}set(t,e,s,r,o){this._data.get(t,e)||this._data.set(t,e,new i),this._data.get(t,e).set(s,r,o)}get(t,e,i,s){var r;return null===(r=this._data.get(t,e))||void 0===r?void 0:r.get(i,s)}clear(){this._data.clear()}}},399:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.isSafari=e.isLegacyEdge=e.isFirefox=void 0;const i="undefined"==typeof navigator,s=i?"node":navigator.userAgent,r=i?"node":navigator.platform;e.isFirefox=s.includes("Firefox"),e.isLegacyEdge=s.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(s),e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),e.isIpad="iPad"===r,e.isIphone="iPhone"===r,e.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),e.isLinux=r.indexOf("Linux")>=0},455:(t,e)=>{function i(t,e,i=0,s=t.length){if(i>=t.length)return t;i=(t.length+i)%t.length,s=s>=t.length?t.length:(t.length+s)%t.length;for(let r=i;r<s;++r)t[r]=e;return t}Object.defineProperty(e,"__esModule",{value:!0}),e.concat=e.fillFallback=e.fill=void 0,e.fill=function(t,e,s,r){return t.fill?t.fill(e,s,r):i(t,e,s,r)},e.fillFallback=i,e.concat=function(t,e){const i=new t.constructor(t.length+e.length);return i.set(t),i.set(e,t.length),i}},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;class i{constructor(){this.fg=0,this.bg=0,this.extended=new s}static toColorRGB(t){return[t>>>16&255,t>>>8&255,255&t]}static fromColorRGB(t){return(255&t[0])<<16|(255&t[1])<<8|255&t[2]}clone(){const t=new i;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}e.AttributeData=i;class s{constructor(t=0,e=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=e}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(t){this._ext&=-67108864,this._ext|=67108863&t}get urlId(){return this._urlId}set urlId(t){this._urlId=t}clone(){return new s(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}e.ExtendedAttrs=s},782:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;const s=i(133),r=i(855),o=i(147);class n extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(t){const e=new n;return e.setFromCharData(t),e}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,s.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(t){this.fg=t[r.CHAR_DATA_ATTR_INDEX],this.bg=0;let e=!1;if(t[r.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(2===t[r.CHAR_DATA_CHAR_INDEX].length){const i=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){const s=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(i-55296)+s-56320+65536|t[r.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[r.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=t[r.CHAR_DATA_CHAR_INDEX],this.content=2097152|t[r.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}e.CellData=n},855:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_EXT=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=256,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.DEFAULT_EXT=0,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(t){return t>65535?(t-=65536,String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)},e.utf32ToString=function(t,e=0,i=t.length){let s="";for(let r=e;r<i;++r){let e=t[r];e>65535?(e-=65536,s+=String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):s+=String.fromCharCode(e)}return s},e.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(t,e){const i=t.length;if(!i)return 0;let s=0,r=0;if(this._interim){const i=t.charCodeAt(r++);56320<=i&&i<=57343?e[s++]=1024*(this._interim-55296)+i-56320+65536:(e[s++]=this._interim,e[s++]=i),this._interim=0}for(let o=r;o<i;++o){const r=t.charCodeAt(o);if(55296<=r&&r<=56319){if(++o>=i)return this._interim=r,s;const n=t.charCodeAt(o);56320<=n&&n<=57343?e[s++]=1024*(r-55296)+n-56320+65536:(e[s++]=r,e[s++]=n)}else 65279!==r&&(e[s++]=r)}return s}},e.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(t,e){const i=t.length;if(!i)return 0;let s,r,o,n,a=0,l=0,h=0;if(this.interim[0]){let s=!1,r=this.interim[0];r&=192==(224&r)?31:224==(240&r)?15:7;let o,n=0;for(;(o=63&this.interim[++n])&&n<4;)r<<=6,r|=o;const l=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,c=l-n;for(;h<c;){if(h>=i)return 0;if(o=t[h++],128!=(192&o)){h--,s=!0;break}this.interim[n++]=o,r<<=6,r|=63&o}s||(2===l?r<128?h--:e[a++]=r:3===l?r<2048||r>=55296&&r<=57343||65279===r||(e[a++]=r):r<65536||r>1114111||(e[a++]=r)),this.interim.fill(0)}const c=i-4;let _=h;for(;_<i;){for(;!(!(_<c)||128&(s=t[_])||128&(r=t[_+1])||128&(o=t[_+2])||128&(n=t[_+3]));)e[a++]=s,e[a++]=r,e[a++]=o,e[a++]=n,_+=4;if(s=t[_++],s<128)e[a++]=s;else if(192==(224&s)){if(_>=i)return this.interim[0]=s,a;if(r=t[_++],128!=(192&r)){_--;continue}if(l=(31&s)<<6|63&r,l<128){_--;continue}e[a++]=l}else if(224==(240&s)){if(_>=i)return this.interim[0]=s,a;if(r=t[_++],128!=(192&r)){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=t[_++],128!=(192&o)){_--;continue}if(l=(15&s)<<12|(63&r)<<6|63&o,l<2048||l>=55296&&l<=57343||65279===l)continue;e[a++]=l}else if(240==(248&s)){if(_>=i)return this.interim[0]=s,a;if(r=t[_++],128!=(192&r)){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=t[_++],128!=(192&o)){_--;continue}if(_>=i)return this.interim[0]=s,this.interim[1]=r,this.interim[2]=o,a;if(n=t[_++],128!=(192&n)){_--;continue}if(l=(7&s)<<18|(63&r)<<12|(63&o)<<6|63&n,l<65536||l>1114111)continue;e[a++]=l}}return a}}}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s](o,o.exports,i),o.exports}var s={};return(()=>{var t=s;Object.defineProperty(t,"__esModule",{value:!0}),t.WebglAddon=void 0;const e=i(666),r=i(345),o=i(399);t.WebglAddon=class{constructor(t){this._preserveDrawingBuffer=t,this._onChangeTextureAtlas=new r.EventEmitter,this._onContextLoss=new r.EventEmitter}get onChangeTextureAtlas(){return this._onChangeTextureAtlas.event}get onContextLoss(){return this._onContextLoss.event}activate(t){if(!t.element)throw new Error("Cannot activate WebglAddon before Terminal.open");if(o.isSafari)throw new Error("Webgl is not currently supported on Safari");this._terminal=t;const i=t._core._renderService,s=t._core._characterJoinerService,n=t._core._coreBrowserService,a=t._core.coreService,l=t._core._decorationService,h=t._core._colorManager.colors;this._renderer=new e.WebglRenderer(t,h,s,n,a,l,this._preserveDrawingBuffer),(0,r.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss),(0,r.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas),i.setRenderer(this._renderer)}dispose(){var t;if(!this._terminal)throw new Error("Cannot dispose WebglAddon because it is activated");const e=this._terminal._core._renderService;e.setRenderer(this._terminal._core._createRenderer()),e.onResize(this._terminal.cols,this._terminal.rows),null===(t=this._renderer)||void 0===t||t.dispose(),this._renderer=void 0}get textureAtlas(){var t;return null===(t=this._renderer)||void 0===t?void 0:t.textureAtlas}clearTextureAtlas(){var t;null===(t=this._renderer)||void 0===t||t.clearCharAtlas()}}})(),s})()}}]);
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"main": {
|
|
3
|
+
"css": "main.css",
|
|
4
|
+
"js": "browser.js"
|
|
5
|
+
},
|
|
6
|
+
"": {
|
|
7
|
+
"js": [
|
|
8
|
+
"1.browser.js",
|
|
9
|
+
"2.browser.js",
|
|
10
|
+
"3.browser.js",
|
|
11
|
+
"loader.js"
|
|
12
|
+
],
|
|
13
|
+
"txt": "browser.js.LICENSE.txt",
|
|
14
|
+
"svg": [
|
|
15
|
+
"fonts/boolean-dark.svg",
|
|
16
|
+
"fonts/boolean-light.svg",
|
|
17
|
+
"fonts/breakpoint-conditional-disabled.svg",
|
|
18
|
+
"fonts/breakpoint-conditional-unverified.svg",
|
|
19
|
+
"fonts/breakpoint-conditional.svg",
|
|
20
|
+
"fonts/breakpoint-disabled.svg",
|
|
21
|
+
"fonts/breakpoint-hint.svg",
|
|
22
|
+
"fonts/breakpoint-log-disabled.svg",
|
|
23
|
+
"fonts/breakpoint-log-unverified.svg",
|
|
24
|
+
"fonts/breakpoint-log.svg",
|
|
25
|
+
"fonts/breakpoint-unsupported.svg",
|
|
26
|
+
"fonts/breakpoint-unverified.svg",
|
|
27
|
+
"fonts/breakpoint.svg",
|
|
28
|
+
"fonts/class-dark.svg",
|
|
29
|
+
"fonts/class-light.svg",
|
|
30
|
+
"fonts/constant-dark.svg",
|
|
31
|
+
"fonts/constant-light.svg",
|
|
32
|
+
"fonts/current-and-breakpoint.svg",
|
|
33
|
+
"fonts/current-arrow.svg",
|
|
34
|
+
"fonts/enumerator-dark.svg",
|
|
35
|
+
"fonts/enumerator-item-dark.svg",
|
|
36
|
+
"fonts/enumerator-item-light.svg",
|
|
37
|
+
"fonts/enumerator-light.svg",
|
|
38
|
+
"fonts/event-dark.svg",
|
|
39
|
+
"fonts/event-light.svg",
|
|
40
|
+
"fonts/field-dark.svg",
|
|
41
|
+
"fonts/field-light.svg",
|
|
42
|
+
"fonts/file-dark.svg",
|
|
43
|
+
"fonts/file-light.svg",
|
|
44
|
+
"fonts/indexer-dark.svg",
|
|
45
|
+
"fonts/indexer-light.svg",
|
|
46
|
+
"fonts/interface-dark.svg",
|
|
47
|
+
"fonts/interface-light.svg",
|
|
48
|
+
"fonts/keyword-dark.svg",
|
|
49
|
+
"fonts/keyword-light.svg",
|
|
50
|
+
"fonts/loading-dark.svg",
|
|
51
|
+
"fonts/loading-hc.svg",
|
|
52
|
+
"fonts/loading.svg",
|
|
53
|
+
"fonts/method-dark.svg",
|
|
54
|
+
"fonts/method-light.svg",
|
|
55
|
+
"fonts/namespace-dark.svg",
|
|
56
|
+
"fonts/namespace-light.svg",
|
|
57
|
+
"fonts/numeric-dark.svg",
|
|
58
|
+
"fonts/numeric-light.svg",
|
|
59
|
+
"fonts/operator-dark.svg",
|
|
60
|
+
"fonts/operator-light.svg",
|
|
61
|
+
"fonts/property-dark.svg",
|
|
62
|
+
"fonts/property-light.svg",
|
|
63
|
+
"fonts/snippet-dark.svg",
|
|
64
|
+
"fonts/snippet-light.svg",
|
|
65
|
+
"fonts/stackframe-and-breakpoint.svg",
|
|
66
|
+
"fonts/stackframe-arrow.svg",
|
|
67
|
+
"fonts/string-dark.svg",
|
|
68
|
+
"fonts/string-light.svg",
|
|
69
|
+
"fonts/structure-dark.svg",
|
|
70
|
+
"fonts/structure-light.svg",
|
|
71
|
+
"fonts/template-dark.svg",
|
|
72
|
+
"fonts/template-light.svg",
|
|
73
|
+
"fonts/variable-dark.svg",
|
|
74
|
+
"fonts/variable-light.svg"
|
|
75
|
+
],
|
|
76
|
+
"ttf": "fonts/codicon.ttf",
|
|
77
|
+
"html": "index.html"
|
|
78
|
+
}
|
|
79
|
+
}
|