@dao42/d42paas-front 0.8.4 → 0.8.5

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.
@@ -185600,7 +185600,7 @@ function Console(_c2, ref) {
185600
185600
  return new xterm.exports.Terminal(__spreadProps(__spreadValues({}, defaultOptions2), {
185601
185601
  fontSize: 14,
185602
185602
  lineHeight: 1.5,
185603
- fontFamily: "UbuntuMono, Ubuntu Mono, courier-new, courier, monospace"
185603
+ fontFamily: "Monaco, Menlo, monospace"
185604
185604
  }));
185605
185605
  }, [defaultOptions2]);
185606
185606
  react.exports.useImperativeHandle(ref, () => {
@@ -185853,7 +185853,7 @@ const TerminalComponent = (_g2) => {
185853
185853
  return new xterm.exports.Terminal(__spreadProps(__spreadValues({}, defaultOptions2), {
185854
185854
  fontSize: 14,
185855
185855
  lineHeight: 1.5,
185856
- fontFamily: "UbuntuMono, Ubuntu Mono, courier-new, courier, monospace"
185856
+ fontFamily: "Monaco, Menlo, monospace"
185857
185857
  }));
185858
185858
  });
185859
185859
  const {
@@ -1867,7 +1867,7 @@ ${JSON.stringify(p,void 0,4)}`)});else if(h.changes)for(const p of Object.keys(h
1867
1867
  `,_)},m.prototype.paste=function(p){this._core.paste(p)},m.prototype.getOption=function(p){return this._core.optionsService.getOption(p)},m.prototype.setOption=function(p,_){this._checkReadonlyOptions(p),this._core.optionsService.setOption(p,_)},m.prototype.refresh=function(p,_){this._verifyIntegers(p,_),this._core.refresh(p,_)},m.prototype.reset=function(){this._core.reset()},m.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},m.prototype.loadAddon=function(p){return this._addonManager.loadAddon(this,p)},Object.defineProperty(m,"strings",{get:function(){return c},enumerable:!1,configurable:!0}),m.prototype._verifyIntegers=function(){for(var p=[],_=0;_<arguments.length;_++)p[_]=arguments[_];for(var b=0,y=p;b<y.length;b++){var w=y[b];if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}},m.prototype._verifyPositiveIntegers=function(){for(var p=[],_=0;_<arguments.length;_++)p[_]=arguments[_];for(var b=0,y=p;b<y.length;b++){var w=y[b];if(w&&(w===1/0||isNaN(w)||w%1!=0||w<0))throw new Error("This API only accepts positive integers")}},m}();o.Terminal=v},1546:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var a=s(643),l=s(8803),c=s(1420),u=s(3734),d=s(1752),f=s(4774),h=s(9631),g=s(8978),v=function(){function m(p,_,b,y,w,k,x,T){this._container=p,this._alpha=y,this._colors=w,this._rendererId=k,this._bufferService=x,this._optionsService=T,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,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-"+_+"-layer"),this._canvas.style.zIndex=b.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return m.prototype.dispose=function(){var p;(0,h.removeElementFromParent)(this._canvas),(p=this._charAtlas)===null||p===void 0||p.dispose()},m.prototype._initCanvas=function(){this._ctx=(0,d.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},m.prototype.onOptionsChanged=function(){},m.prototype.onBlur=function(){},m.prototype.onFocus=function(){},m.prototype.onCursorMove=function(){},m.prototype.onGridChanged=function(p,_){},m.prototype.onSelectionChanged=function(p,_,b){},m.prototype.setColors=function(p){this._refreshCharAtlas(p)},m.prototype._setTransparency=function(p){if(p!==this._alpha){var _=this._canvas;this._alpha=p,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,_),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},m.prototype._refreshCharAtlas=function(p){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,c.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,p,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},m.prototype.resize=function(p){this._scaledCellWidth=p.scaledCellWidth,this._scaledCellHeight=p.scaledCellHeight,this._scaledCharWidth=p.scaledCharWidth,this._scaledCharHeight=p.scaledCharHeight,this._scaledCharLeft=p.scaledCharLeft,this._scaledCharTop=p.scaledCharTop,this._canvas.width=p.scaledCanvasWidth,this._canvas.height=p.scaledCanvasHeight,this._canvas.style.width=p.canvasWidth+"px",this._canvas.style.height=p.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},m.prototype.clearTextureAtlas=function(){var p;(p=this._charAtlas)===null||p===void 0||p.clear()},m.prototype._fillCells=function(p,_,b,y){this._ctx.fillRect(p*this._scaledCellWidth,_*this._scaledCellHeight,b*this._scaledCellWidth,y*this._scaledCellHeight)},m.prototype._fillMiddleLineAtCells=function(p,_,b){b===void 0&&(b=1);var y=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(p*this._scaledCellWidth,(_+1)*this._scaledCellHeight-y-window.devicePixelRatio,b*this._scaledCellWidth,window.devicePixelRatio)},m.prototype._fillBottomLineAtCells=function(p,_,b){b===void 0&&(b=1),this._ctx.fillRect(p*this._scaledCellWidth,(_+1)*this._scaledCellHeight-window.devicePixelRatio-1,b*this._scaledCellWidth,window.devicePixelRatio)},m.prototype._fillLeftLineAtCell=function(p,_,b){this._ctx.fillRect(p*this._scaledCellWidth,_*this._scaledCellHeight,window.devicePixelRatio*b,this._scaledCellHeight)},m.prototype._strokeRectAtCell=function(p,_,b,y){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(p*this._scaledCellWidth+window.devicePixelRatio/2,_*this._scaledCellHeight+window.devicePixelRatio/2,b*this._scaledCellWidth-window.devicePixelRatio,y*this._scaledCellHeight-window.devicePixelRatio)},m.prototype._clearAll=function(){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))},m.prototype._clearCells=function(p,_,b,y){this._alpha?this._ctx.clearRect(p*this._scaledCellWidth,_*this._scaledCellHeight,b*this._scaledCellWidth,y*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(p*this._scaledCellWidth,_*this._scaledCellHeight,b*this._scaledCellWidth,y*this._scaledCellHeight))},m.prototype._fillCharTrueColor=function(p,_,b){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=l.TEXT_BASELINE,this._clipRow(b);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,g.tryDrawCustomChar)(this._ctx,p.getChars(),_*this._scaledCellWidth,b*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(p.getChars(),_*this._scaledCellWidth+this._scaledCharLeft,b*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},m.prototype._drawChars=function(p,_,b){var y,w,k,x=this._getContrastColor(p);x||p.isFgRGB()||p.isBgRGB()?this._drawUncachedChars(p,_,b,x):(p.isInverse()?(w=p.isBgDefault()?l.INVERTED_DEFAULT_COLOR:p.getBgColor(),k=p.isFgDefault()?l.INVERTED_DEFAULT_COLOR:p.getFgColor()):(k=p.isBgDefault()?a.DEFAULT_COLOR:p.getBgColor(),w=p.isFgDefault()?a.DEFAULT_COLOR:p.getFgColor()),w+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&p.isBold()&&w<8?8:0,this._currentGlyphIdentifier.chars=p.getChars()||a.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=p.getCode()||a.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=k,this._currentGlyphIdentifier.fg=w,this._currentGlyphIdentifier.bold=!!p.isBold(),this._currentGlyphIdentifier.dim=!!p.isDim(),this._currentGlyphIdentifier.italic=!!p.isItalic(),!((y=this._charAtlas)===null||y===void 0)&&y.draw(this._ctx,this._currentGlyphIdentifier,_*this._scaledCellWidth+this._scaledCharLeft,b*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(p,_,b))},m.prototype._drawUncachedChars=function(p,_,b,y){if(this._ctx.save(),this._ctx.font=this._getFont(!!p.isBold(),!!p.isItalic()),this._ctx.textBaseline=l.TEXT_BASELINE,p.isInverse())if(y)this._ctx.fillStyle=y.css;else if(p.isBgDefault())this._ctx.fillStyle=f.color.opaque(this._colors.background).css;else if(p.isBgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(p.getBgColor()).join(",")+")";else{var w=p.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&p.isBold()&&w<8&&(w+=8),this._ctx.fillStyle=this._colors.ansi[w].css}else if(y)this._ctx.fillStyle=y.css;else if(p.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(p.isFgRGB())this._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(p.getFgColor()).join(",")+")";else{var k=p.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&p.isBold()&&k<8&&(k+=8),this._ctx.fillStyle=this._colors.ansi[k].css}this._clipRow(b),p.isDim()&&(this._ctx.globalAlpha=l.DIM_OPACITY);var x=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(x=(0,g.tryDrawCustomChar)(this._ctx,p.getChars(),_*this._scaledCellWidth,b*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),x||this._ctx.fillText(p.getChars(),_*this._scaledCellWidth+this._scaledCharLeft,b*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},m.prototype._clipRow=function(p){this._ctx.beginPath(),this._ctx.rect(0,p*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},m.prototype._getFont=function(p,_){return(_?"italic":"")+" "+(p?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},m.prototype._getContrastColor=function(p){if(this._optionsService.rawOptions.minimumContrastRatio!==1){var _=this._colors.contrastCache.getColor(p.bg,p.fg);if(_!==void 0)return _||void 0;var b=p.getFgColor(),y=p.getFgColorMode(),w=p.getBgColor(),k=p.getBgColorMode(),x=!!p.isInverse(),T=!!p.isInverse();if(x){var L=b;b=w,w=L;var D=y;y=k,k=D}var R=this._resolveBackgroundRgba(k,w,x),M=this._resolveForegroundRgba(y,b,x,T),A=f.rgba.ensureContrastRatio(R,M,this._optionsService.rawOptions.minimumContrastRatio);if(A){var X={css:f.channels.toCss(A>>24&255,A>>16&255,A>>8&255),rgba:A};return this._colors.contrastCache.setColor(p.bg,p.fg,X),X}this._colors.contrastCache.setColor(p.bg,p.fg,null)}},m.prototype._resolveBackgroundRgba=function(p,_,b){switch(p){case 16777216:case 33554432:return this._colors.ansi[_].rgba;case 50331648:return _<<8;default:return b?this._colors.foreground.rgba:this._colors.background.rgba}},m.prototype._resolveForegroundRgba=function(p,_,b,y){switch(p){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&y&&_<8&&(_+=8),this._colors.ansi[_].rgba;case 50331648:return _<<8;default:return b?this._colors.background.rgba:this._colors.foreground.rgba}},m}();o.BaseRenderLayer=v},2512:function(r,o,s){var a,l=this&&this.__extends||(a=function(_,b){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,w){y.__proto__=w}||function(y,w){for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(y[k]=w[k])},a(_,b)},function(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function y(){this.constructor=_}a(_,b),_.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}),c=this&&this.__decorate||function(_,b,y,w){var k,x=arguments.length,T=x<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,b,y,w);else for(var L=_.length-1;L>=0;L--)(k=_[L])&&(T=(x<3?k(T):x>3?k(b,y,T):k(b,y))||T);return x>3&&T&&Object.defineProperty(b,y,T),T},u=this&&this.__param||function(_,b){return function(y,w){b(y,w,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var d=s(1546),f=s(511),h=s(2585),g=s(4725),v=600,m=function(_){function b(y,w,k,x,T,L,D,R,M){var A=_.call(this,y,"cursor",w,!0,k,x,L,D)||this;return A._onRequestRedraw=T,A._coreService=R,A._coreBrowserService=M,A._cell=new f.CellData,A._state={x:0,y:0,isFocused:!1,style:"",width:0},A._cursorRenderers={bar:A._renderBarCursor.bind(A),block:A._renderBlockCursor.bind(A),underline:A._renderUnderlineCursor.bind(A)},A}return l(b,_),b.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),_.prototype.dispose.call(this)},b.prototype.resize=function(y){_.prototype.resize.call(this,y),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},b.prototype.reset=function(){var y;this._clearCursor(),(y=this._cursorBlinkStateManager)===null||y===void 0||y.restartBlinkAnimation(),this.onOptionsChanged()},b.prototype.onBlur=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},b.prototype.onFocus=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},b.prototype.onOptionsChanged=function(){var y,w=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new p(this._coreBrowserService.isFocused,function(){w._render(!0)})):((y=this._cursorBlinkStateManager)===null||y===void 0||y.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},b.prototype.onCursorMove=function(){var y;(y=this._cursorBlinkStateManager)===null||y===void 0||y.restartBlinkAnimation()},b.prototype.onGridChanged=function(y,w){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},b.prototype._render=function(y){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var w=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=w-this._bufferService.buffer.ydisp;if(k<0||k>=this._bufferService.rows)this._clearCursor();else{var x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(w).loadCell(x,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var T=this._optionsService.rawOptions.cursorStyle;return T&&T!=="block"?this._cursorRenderers[T](x,k,this._cell):this._renderBlurCursor(x,k,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=k,this._state.isFocused=!1,this._state.style=T,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===x&&this._state.y===k&&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"](x,k,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=k,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},b.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<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})},b.prototype._renderBarCursor=function(y,w,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(y,w,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},b.prototype._renderBlockCursor=function(y,w,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(y,w,k.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(k,y,w),this._ctx.restore()},b.prototype._renderUnderlineCursor=function(y,w,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(y,w),this._ctx.restore()},b.prototype._renderBlurCursor=function(y,w,k){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(y,w,k.getWidth(),1),this._ctx.restore()},c([u(5,h.IBufferService),u(6,h.IOptionsService),u(7,h.ICoreService),u(8,g.ICoreBrowserService)],b)}(d.BaseRenderLayer);o.CursorRenderLayer=m;var p=function(){function _(b,y){this._renderCallback=y,this.isCursorVisible=!0,b&&this._restartInterval()}return Object.defineProperty(_.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),_.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},_.prototype.restartBlinkAnimation=function(){var b=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){b._renderCallback(),b._animationFrame=void 0})))},_.prototype._restartInterval=function(b){var y=this;b===void 0&&(b=v),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(y._animationTimeRestarted){var w=v-(Date.now()-y._animationTimeRestarted);if(y._animationTimeRestarted=void 0,w>0)return void y._restartInterval(w)}y.isCursorVisible=!1,y._animationFrame=window.requestAnimationFrame(function(){y._renderCallback(),y._animationFrame=void 0}),y._blinkInterval=window.setInterval(function(){if(y._animationTimeRestarted){var k=v-(Date.now()-y._animationTimeRestarted);return y._animationTimeRestarted=void 0,void y._restartInterval(k)}y.isCursorVisible=!y.isCursorVisible,y._animationFrame=window.requestAnimationFrame(function(){y._renderCallback(),y._animationFrame=void 0})},v)},b)},_.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},_.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},_}()},8978:(r,o,s)=>{var a,l,c,u,d,f,h,g,v,m,p,_,b,y,w,k,x,T,L,D,R,M,A,X,H,O,W,V,G,pe,q,ne,he,De,j,ge,J,oe,te,lt,ve,ke,Se,Me,Pe,$e,Be,P,K,ee,Te,xe,ye,Ue,ze,mt,It,Vt,pn,bn,de,We,Et,Wt,Kn,no,gs,ia,io,xr,ra,kr,Fo,oa,sa,Zt,Bo,B,$,se,U,Q,ae,Y,me,Fe,Oe,st,ft,yt,Dt,Ht,St,Gi,xn,ro,ec,Er,Ba,Uf,Wa,yh,jf,qf,tb,nb,ib,wy,Sy,xy,ky,rb,Ey,Ty,ob,ST,Ly,lm,Dy,xT,Iy,Ry,sb,kT,Ny,ab,lb,wh;Object.defineProperty(o,"__esModule",{value:!0}),o.tryDrawCustomChar=o.boxDrawingDefinitions=o.blockElementDefinitions=void 0;var ET=s(1752);o.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:9,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{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}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{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}],"\u{1FB96}":[{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}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var yP={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};o.boxDrawingDefinitions={"\u2500":(a={},a[1]="M0,.5 L1,.5",a),"\u2501":(l={},l[3]="M0,.5 L1,.5",l),"\u2502":(c={},c[1]="M.5,0 L.5,1",c),"\u2503":(u={},u[3]="M.5,0 L.5,1",u),"\u250C":(d={},d[1]="M0.5,1 L.5,.5 L1,.5",d),"\u250F":(f={},f[3]="M0.5,1 L.5,.5 L1,.5",f),"\u2510":(h={},h[1]="M0,.5 L.5,.5 L.5,1",h),"\u2513":(g={},g[3]="M0,.5 L.5,.5 L.5,1",g),"\u2514":(v={},v[1]="M.5,0 L.5,.5 L1,.5",v),"\u2517":(m={},m[3]="M.5,0 L.5,.5 L1,.5",m),"\u2518":(p={},p[1]="M.5,0 L.5,.5 L0,.5",p),"\u251B":(_={},_[3]="M.5,0 L.5,.5 L0,.5",_),"\u251C":(b={},b[1]="M.5,0 L.5,1 M.5,.5 L1,.5",b),"\u2523":(y={},y[3]="M.5,0 L.5,1 M.5,.5 L1,.5",y),"\u2524":(w={},w[1]="M.5,0 L.5,1 M.5,.5 L0,.5",w),"\u252B":(k={},k[3]="M.5,0 L.5,1 M.5,.5 L0,.5",k),"\u252C":(x={},x[1]="M0,.5 L1,.5 M.5,.5 L.5,1",x),"\u2533":(T={},T[3]="M0,.5 L1,.5 M.5,.5 L.5,1",T),"\u2534":(L={},L[1]="M0,.5 L1,.5 M.5,.5 L.5,0",L),"\u253B":(D={},D[3]="M0,.5 L1,.5 M.5,.5 L.5,0",D),"\u253C":(R={},R[1]="M0,.5 L1,.5 M.5,0 L.5,1",R),"\u254B":(M={},M[3]="M0,.5 L1,.5 M.5,0 L.5,1",M),"\u2574":(A={},A[1]="M.5,.5 L0,.5",A),"\u2578":(X={},X[3]="M.5,.5 L0,.5",X),"\u2575":(H={},H[1]="M.5,.5 L.5,0",H),"\u2579":(O={},O[3]="M.5,.5 L.5,0",O),"\u2576":(W={},W[1]="M.5,.5 L1,.5",W),"\u257A":(V={},V[3]="M.5,.5 L1,.5",V),"\u2577":(G={},G[1]="M.5,.5 L.5,1",G),"\u257B":(pe={},pe[3]="M.5,.5 L.5,1",pe),"\u2550":(q={},q[1]=function(tt,Ge){return"M0,"+(.5-Ge)+" L1,"+(.5-Ge)+" M0,"+(.5+Ge)+" L1,"+(.5+Ge)},q),"\u2551":(ne={},ne[1]=function(tt,Ge){return"M"+(.5-tt)+",0 L"+(.5-tt)+",1 M"+(.5+tt)+",0 L"+(.5+tt)+",1"},ne),"\u2552":(he={},he[1]=function(tt,Ge){return"M.5,1 L.5,"+(.5-Ge)+" L1,"+(.5-Ge)+" M.5,"+(.5+Ge)+" L1,"+(.5+Ge)},he),"\u2553":(De={},De[1]=function(tt,Ge){return"M"+(.5-tt)+",1 L"+(.5-tt)+",.5 L1,.5 M"+(.5+tt)+",.5 L"+(.5+tt)+",1"},De),"\u2554":(j={},j[1]=function(tt,Ge){return"M1,"+(.5-Ge)+" L"+(.5-tt)+","+(.5-Ge)+" L"+(.5-tt)+",1 M1,"+(.5+Ge)+" L"+(.5+tt)+","+(.5+Ge)+" L"+(.5+tt)+",1"},j),"\u2555":(ge={},ge[1]=function(tt,Ge){return"M0,"+(.5-Ge)+" L.5,"+(.5-Ge)+" L.5,1 M0,"+(.5+Ge)+" L.5,"+(.5+Ge)},ge),"\u2556":(J={},J[1]=function(tt,Ge){return"M"+(.5+tt)+",1 L"+(.5+tt)+",.5 L0,.5 M"+(.5-tt)+",.5 L"+(.5-tt)+",1"},J),"\u2557":(oe={},oe[1]=function(tt,Ge){return"M0,"+(.5+Ge)+" L"+(.5-tt)+","+(.5+Ge)+" L"+(.5-tt)+",1 M0,"+(.5-Ge)+" L"+(.5+tt)+","+(.5-Ge)+" L"+(.5+tt)+",1"},oe),"\u2558":(te={},te[1]=function(tt,Ge){return"M.5,0 L.5,"+(.5+Ge)+" L1,"+(.5+Ge)+" M.5,"+(.5-Ge)+" L1,"+(.5-Ge)},te),"\u2559":(lt={},lt[1]=function(tt,Ge){return"M1,.5 L"+(.5-tt)+",.5 L"+(.5-tt)+",0 M"+(.5+tt)+",.5 L"+(.5+tt)+",0"},lt),"\u255A":(ve={},ve[1]=function(tt,Ge){return"M1,"+(.5-Ge)+" L"+(.5+tt)+","+(.5-Ge)+" L"+(.5+tt)+",0 M1,"+(.5+Ge)+" L"+(.5-tt)+","+(.5+Ge)+" L"+(.5-tt)+",0"},ve),"\u255B":(ke={},ke[1]=function(tt,Ge){return"M0,"+(.5+Ge)+" L.5,"+(.5+Ge)+" L.5,0 M0,"+(.5-Ge)+" L.5,"+(.5-Ge)},ke),"\u255C":(Se={},Se[1]=function(tt,Ge){return"M0,.5 L"+(.5+tt)+",.5 L"+(.5+tt)+",0 M"+(.5-tt)+",.5 L"+(.5-tt)+",0"},Se),"\u255D":(Me={},Me[1]=function(tt,Ge){return"M0,"+(.5-Ge)+" L"+(.5-tt)+","+(.5-Ge)+" L"+(.5-tt)+",0 M0,"+(.5+Ge)+" L"+(.5+tt)+","+(.5+Ge)+" L"+(.5+tt)+",0"},Me),"\u255E":(Pe={},Pe[1]=function(tt,Ge){return"M.5,0 L.5,1 M.5,"+(.5-Ge)+" L1,"+(.5-Ge)+" M.5,"+(.5+Ge)+" L1,"+(.5+Ge)},Pe),"\u255F":($e={},$e[1]=function(tt,Ge){return"M"+(.5-tt)+",0 L"+(.5-tt)+",1 M"+(.5+tt)+",0 L"+(.5+tt)+",1 M"+(.5+tt)+",.5 L1,.5"},$e),"\u2560":(Be={},Be[1]=function(tt,Ge){return"M"+(.5-tt)+",0 L"+(.5-tt)+",1 M1,"+(.5+Ge)+" L"+(.5+tt)+","+(.5+Ge)+" L"+(.5+tt)+",1 M1,"+(.5-Ge)+" L"+(.5+tt)+","+(.5-Ge)+" L"+(.5+tt)+",0"},Be),"\u2561":(P={},P[1]=function(tt,Ge){return"M.5,0 L.5,1 M0,"+(.5-Ge)+" L.5,"+(.5-Ge)+" M0,"+(.5+Ge)+" L.5,"+(.5+Ge)},P),"\u2562":(K={},K[1]=function(tt,Ge){return"M0,.5 L"+(.5-tt)+",.5 M"+(.5-tt)+",0 L"+(.5-tt)+",1 M"+(.5+tt)+",0 L"+(.5+tt)+",1"},K),"\u2563":(ee={},ee[1]=function(tt,Ge){return"M"+(.5+tt)+",0 L"+(.5+tt)+",1 M0,"+(.5+Ge)+" L"+(.5-tt)+","+(.5+Ge)+" L"+(.5-tt)+",1 M0,"+(.5-Ge)+" L"+(.5-tt)+","+(.5-Ge)+" L"+(.5-tt)+",0"},ee),"\u2564":(Te={},Te[1]=function(tt,Ge){return"M0,"+(.5-Ge)+" L1,"+(.5-Ge)+" M0,"+(.5+Ge)+" L1,"+(.5+Ge)+" M.5,"+(.5+Ge)+" L.5,1"},Te),"\u2565":(xe={},xe[1]=function(tt,Ge){return"M0,.5 L1,.5 M"+(.5-tt)+",.5 L"+(.5-tt)+",1 M"+(.5+tt)+",.5 L"+(.5+tt)+",1"},xe),"\u2566":(ye={},ye[1]=function(tt,Ge){return"M0,"+(.5-Ge)+" L1,"+(.5-Ge)+" M0,"+(.5+Ge)+" L"+(.5-tt)+","+(.5+Ge)+" L"+(.5-tt)+",1 M1,"+(.5+Ge)+" L"+(.5+tt)+","+(.5+Ge)+" L"+(.5+tt)+",1"},ye),"\u2567":(Ue={},Ue[1]=function(tt,Ge){return"M.5,0 L.5,"+(.5-Ge)+" M0,"+(.5-Ge)+" L1,"+(.5-Ge)+" M0,"+(.5+Ge)+" L1,"+(.5+Ge)},Ue),"\u2568":(ze={},ze[1]=function(tt,Ge){return"M0,.5 L1,.5 M"+(.5-tt)+",.5 L"+(.5-tt)+",0 M"+(.5+tt)+",.5 L"+(.5+tt)+",0"},ze),"\u2569":(mt={},mt[1]=function(tt,Ge){return"M0,"+(.5+Ge)+" L1,"+(.5+Ge)+" M0,"+(.5-Ge)+" L"+(.5-tt)+","+(.5-Ge)+" L"+(.5-tt)+",0 M1,"+(.5-Ge)+" L"+(.5+tt)+","+(.5-Ge)+" L"+(.5+tt)+",0"},mt),"\u256A":(It={},It[1]=function(tt,Ge){return"M.5,0 L.5,1 M0,"+(.5-Ge)+" L1,"+(.5-Ge)+" M0,"+(.5+Ge)+" L1,"+(.5+Ge)},It),"\u256B":(Vt={},Vt[1]=function(tt,Ge){return"M0,.5 L1,.5 M"+(.5-tt)+",0 L"+(.5-tt)+",1 M"+(.5+tt)+",0 L"+(.5+tt)+",1"},Vt),"\u256C":(pn={},pn[1]=function(tt,Ge){return"M0,"+(.5+Ge)+" L"+(.5-tt)+","+(.5+Ge)+" L"+(.5-tt)+",1 M1,"+(.5+Ge)+" L"+(.5+tt)+","+(.5+Ge)+" L"+(.5+tt)+",1 M0,"+(.5-Ge)+" L"+(.5-tt)+","+(.5-Ge)+" L"+(.5-tt)+",0 M1,"+(.5-Ge)+" L"+(.5+tt)+","+(.5-Ge)+" L"+(.5+tt)+",0"},pn),"\u2571":(bn={},bn[1]="M1,0 L0,1",bn),"\u2572":(de={},de[1]="M0,0 L1,1",de),"\u2573":(We={},We[1]="M1,0 L0,1 M0,0 L1,1",We),"\u257C":(Et={},Et[1]="M.5,.5 L0,.5",Et[3]="M.5,.5 L1,.5",Et),"\u257D":(Wt={},Wt[1]="M.5,.5 L.5,0",Wt[3]="M.5,.5 L.5,1",Wt),"\u257E":(Kn={},Kn[1]="M.5,.5 L1,.5",Kn[3]="M.5,.5 L0,.5",Kn),"\u257F":(no={},no[1]="M.5,.5 L.5,1",no[3]="M.5,.5 L.5,0",no),"\u250D":(gs={},gs[1]="M.5,.5 L.5,1",gs[3]="M.5,.5 L1,.5",gs),"\u250E":(ia={},ia[1]="M.5,.5 L1,.5",ia[3]="M.5,.5 L.5,1",ia),"\u2511":(io={},io[1]="M.5,.5 L.5,1",io[3]="M.5,.5 L0,.5",io),"\u2512":(xr={},xr[1]="M.5,.5 L0,.5",xr[3]="M.5,.5 L.5,1",xr),"\u2515":(ra={},ra[1]="M.5,.5 L.5,0",ra[3]="M.5,.5 L1,.5",ra),"\u2516":(kr={},kr[1]="M.5,.5 L1,.5",kr[3]="M.5,.5 L.5,0",kr),"\u2519":(Fo={},Fo[1]="M.5,.5 L.5,0",Fo[3]="M.5,.5 L0,.5",Fo),"\u251A":(oa={},oa[1]="M.5,.5 L0,.5",oa[3]="M.5,.5 L.5,0",oa),"\u251D":(sa={},sa[1]="M.5,0 L.5,1",sa[3]="M.5,.5 L1,.5",sa),"\u251E":(Zt={},Zt[1]="M0.5,1 L.5,.5 L1,.5",Zt[3]="M.5,.5 L.5,0",Zt),"\u251F":(Bo={},Bo[1]="M.5,0 L.5,.5 L1,.5",Bo[3]="M.5,.5 L.5,1",Bo),"\u2520":(B={},B[1]="M.5,.5 L1,.5",B[3]="M.5,0 L.5,1",B),"\u2521":($={},$[1]="M.5,.5 L.5,1",$[3]="M.5,0 L.5,.5 L1,.5",$),"\u2522":(se={},se[1]="M.5,.5 L.5,0",se[3]="M0.5,1 L.5,.5 L1,.5",se),"\u2525":(U={},U[1]="M.5,0 L.5,1",U[3]="M.5,.5 L0,.5",U),"\u2526":(Q={},Q[1]="M0,.5 L.5,.5 L.5,1",Q[3]="M.5,.5 L.5,0",Q),"\u2527":(ae={},ae[1]="M.5,0 L.5,.5 L0,.5",ae[3]="M.5,.5 L.5,1",ae),"\u2528":(Y={},Y[1]="M.5,.5 L0,.5",Y[3]="M.5,0 L.5,1",Y),"\u2529":(me={},me[1]="M.5,.5 L.5,1",me[3]="M.5,0 L.5,.5 L0,.5",me),"\u252A":(Fe={},Fe[1]="M.5,.5 L.5,0",Fe[3]="M0,.5 L.5,.5 L.5,1",Fe),"\u252D":(Oe={},Oe[1]="M0.5,1 L.5,.5 L1,.5",Oe[3]="M.5,.5 L0,.5",Oe),"\u252E":(st={},st[1]="M0,.5 L.5,.5 L.5,1",st[3]="M.5,.5 L1,.5",st),"\u252F":(ft={},ft[1]="M.5,.5 L.5,1",ft[3]="M0,.5 L1,.5",ft),"\u2530":(yt={},yt[1]="M0,.5 L1,.5",yt[3]="M.5,.5 L.5,1",yt),"\u2531":(Dt={},Dt[1]="M.5,.5 L1,.5",Dt[3]="M0,.5 L.5,.5 L.5,1",Dt),"\u2532":(Ht={},Ht[1]="M.5,.5 L0,.5",Ht[3]="M0.5,1 L.5,.5 L1,.5",Ht),"\u2535":(St={},St[1]="M.5,0 L.5,.5 L1,.5",St[3]="M.5,.5 L0,.5",St),"\u2536":(Gi={},Gi[1]="M.5,0 L.5,.5 L0,.5",Gi[3]="M.5,.5 L1,.5",Gi),"\u2537":(xn={},xn[1]="M.5,.5 L.5,0",xn[3]="M0,.5 L1,.5",xn),"\u2538":(ro={},ro[1]="M0,.5 L1,.5",ro[3]="M.5,.5 L.5,0",ro),"\u2539":(ec={},ec[1]="M.5,.5 L1,.5",ec[3]="M.5,0 L.5,.5 L0,.5",ec),"\u253A":(Er={},Er[1]="M.5,.5 L0,.5",Er[3]="M.5,0 L.5,.5 L1,.5",Er),"\u253D":(Ba={},Ba[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Ba[3]="M.5,.5 L0,.5",Ba),"\u253E":(Uf={},Uf[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Uf[3]="M.5,.5 L1,.5",Uf),"\u253F":(Wa={},Wa[1]="M.5,0 L.5,1",Wa[3]="M0,.5 L1,.5",Wa),"\u2540":(yh={},yh[1]="M0,.5 L1,.5 M.5,.5 L.5,1",yh[3]="M.5,.5 L.5,0",yh),"\u2541":(jf={},jf[1]="M.5,.5 L.5,0 M0,.5 L1,.5",jf[3]="M.5,.5 L.5,1",jf),"\u2542":(qf={},qf[1]="M0,.5 L1,.5",qf[3]="M.5,0 L.5,1",qf),"\u2543":(tb={},tb[1]="M0.5,1 L.5,.5 L1,.5",tb[3]="M.5,0 L.5,.5 L0,.5",tb),"\u2544":(nb={},nb[1]="M0,.5 L.5,.5 L.5,1",nb[3]="M.5,0 L.5,.5 L1,.5",nb),"\u2545":(ib={},ib[1]="M.5,0 L.5,.5 L1,.5",ib[3]="M0,.5 L.5,.5 L.5,1",ib),"\u2546":(wy={},wy[1]="M.5,0 L.5,.5 L0,.5",wy[3]="M0.5,1 L.5,.5 L1,.5",wy),"\u2547":(Sy={},Sy[1]="M.5,.5 L.5,1",Sy[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Sy),"\u2548":(xy={},xy[1]="M.5,.5 L.5,0",xy[3]="M0,.5 L1,.5 M.5,.5 L.5,1",xy),"\u2549":(ky={},ky[1]="M.5,.5 L1,.5",ky[3]="M.5,0 L.5,1 M.5,.5 L0,.5",ky),"\u254A":(rb={},rb[1]="M.5,.5 L0,.5",rb[3]="M.5,0 L.5,1 M.5,.5 L1,.5",rb),"\u254C":(Ey={},Ey[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Ey),"\u254D":(Ty={},Ty[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Ty),"\u2504":(ob={},ob[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",ob),"\u2505":(ST={},ST[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",ST),"\u2508":(Ly={},Ly[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",Ly),"\u2509":(lm={},lm[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",lm),"\u254E":(Dy={},Dy[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Dy),"\u254F":(xT={},xT[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",xT),"\u2506":(Iy={},Iy[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Iy),"\u2507":(Ry={},Ry[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Ry),"\u250A":(sb={},sb[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",sb),"\u250B":(kT={},kT[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",kT),"\u256D":(Ny={},Ny[1]="C.5,1,.5,.5,1,.5",Ny),"\u256E":(ab={},ab[1]="C.5,1,.5,.5,0,.5",ab),"\u256F":(lb={},lb[1]="C.5,0,.5,.5,0,.5",lb),"\u2570":(wh={},wh[1]="C.5,0,.5,.5,1,.5",wh)},o.tryDrawCustomChar=function(tt,Ge,Vc,cb,cm,Wo){var zc=o.blockElementDefinitions[Ge];if(zc)return function(ps,jc,db,hb,um,dm){for(var Gn=0;Gn<jc.length;Gn++){var Bn=jc[Gn],oo=um/8,Uu=dm/8;ps.fillRect(db+Bn.x*oo,hb+Bn.y*Uu,Bn.w*oo,Bn.h*Uu)}}(tt,zc,Vc,cb,cm,Wo),!0;var Uc=yP[Ge];if(Uc)return function(ps,jc,db,hb,um,dm){var Gn,Bn=wP.get(jc);Bn||(Bn=new Map,wP.set(jc,Bn));var oo=ps.fillStyle;if(typeof oo!="string")throw new Error('Unexpected fillStyle type "'+oo+'"');var Uu=Bn.get(oo);if(!Uu){var tc=jc[0].length,Kf=jc.length,Gf=document.createElement("canvas");Gf.width=tc,Gf.height=Kf;var Ay=(0,ET.throwIfFalsy)(Gf.getContext("2d")),ju=new ImageData(tc,Kf),hm=void 0,vr=void 0,fb=void 0,qu=void 0;if(oo.startsWith("#"))hm=parseInt(oo.substr(1,2),16),vr=parseInt(oo.substr(3,2),16),fb=parseInt(oo.substr(5,2),16),qu=oo.length>7&&parseInt(oo.substr(7,2),16)||1;else{if(!oo.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+oo+'" when drawing pattern glyph');hm=(Gn=oo.substring(5,oo.length-1).split(",").map(function(ml){return parseFloat(ml)}))[0],vr=Gn[1],fb=Gn[2],qu=Gn[3]}for(var Sh=0;Sh<Kf;Sh++)for(var Ku=0;Ku<tc;Ku++)ju.data[4*(Sh*tc+Ku)]=hm,ju.data[4*(Sh*tc+Ku)+1]=vr,ju.data[4*(Sh*tc+Ku)+2]=fb,ju.data[4*(Sh*tc+Ku)+3]=jc[Sh][Ku]*(255*qu);Ay.putImageData(ju,0,0),Uu=(0,ET.throwIfFalsy)(ps.createPattern(Gf,null)),Bn.set(oo,Uu)}ps.fillStyle=Uu,ps.fillRect(db,hb,um,dm)}(tt,Uc,Vc,cb,cm,Wo),!0;var ub=o.boxDrawingDefinitions[Ge];return!!ub&&(function(ps,jc,db,hb,um,dm){ps.strokeStyle=ps.fillStyle;for(var Gn=0,Bn=Object.entries(jc);Gn<Bn.length;Gn++){var oo=Bn[Gn],Uu=oo[0],tc=oo[1];ps.beginPath(),ps.lineWidth=window.devicePixelRatio*Number.parseInt(Uu);for(var Kf=0,Gf=(typeof tc=="function"?tc(.15,.15/dm*um):tc).split(" ");Kf<Gf.length;Kf++){var Ay=Gf[Kf],ju=Ay[0],hm=SP[ju];if(hm){var vr=Ay.substring(1).split(",");vr[0]&&vr[1]&&hm(ps,xP(vr,um,dm,db,hb))}else console.error('Could not find drawing instructions for "'+ju+'"')}ps.stroke(),ps.closePath()}}(tt,ub,Vc,cb,cm,Wo),!0)};var wP=new Map;function TT(tt,Ge,Vc){return Vc===void 0&&(Vc=0),Math.max(Math.min(tt,Ge),Vc)}var SP={C:function(tt,Ge){return tt.bezierCurveTo(Ge[0],Ge[1],Ge[2],Ge[3],Ge[4],Ge[5])},L:function(tt,Ge){return tt.lineTo(Ge[0],Ge[1])},M:function(tt,Ge){return tt.moveTo(Ge[0],Ge[1])}};function xP(tt,Ge,Vc,cb,cm){var Wo=tt.map(function(ub){return parseFloat(ub)||parseInt(ub)});if(Wo.length<2)throw new Error("Too few arguments for instruction");for(var zc=0;zc<Wo.length;zc+=2)Wo[zc]*=Ge,Wo[zc]!==0&&(Wo[zc]=TT(Math.round(Wo[zc]+.5)-.5,Ge,0)),Wo[zc]+=cb;for(var Uc=1;Uc<Wo.length;Uc+=2)Wo[Uc]*=Vc,Wo[Uc]!==0&&(Wo[Uc]=TT(Math.round(Wo[Uc]+.5)-.5,Vc,0)),Wo[Uc]+=cm;return Wo}},3700:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var s=function(){function a(){this.cache=[]}return a.prototype.resize=function(l,c){for(var u=0;u<l;u++){this.cache.length<=u&&this.cache.push([]);for(var d=this.cache[u].length;d<c;d++)this.cache[u].push(void 0);this.cache[u].length=c}this.cache.length=l},a.prototype.clear=function(){for(var l=0;l<this.cache.length;l++)for(var c=0;c<this.cache[l].length;c++)this.cache[l][c]=void 0},a}();o.GridCache=s},5098:function(r,o,s){var a,l=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,b){_.__proto__=b}||function(_,b){for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(_[y]=b[y])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function _(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(_.prototype=p.prototype,new _)}),c=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},u=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var d=s(1546),f=s(8803),h=s(2040),g=s(2585),v=function(m){function p(_,b,y,w,k,x,T,L){var D=m.call(this,_,"link",b,!0,y,w,T,L)||this;return k.onShowLinkUnderline(function(R){return D._onShowLinkUnderline(R)}),k.onHideLinkUnderline(function(R){return D._onHideLinkUnderline(R)}),x.onShowLinkUnderline(function(R){return D._onShowLinkUnderline(R)}),x.onHideLinkUnderline(function(R){return D._onHideLinkUnderline(R)}),D}return l(p,m),p.prototype.resize=function(_){m.prototype.resize.call(this,_),this._state=void 0},p.prototype.reset=function(){this._clearCurrentLink()},p.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var _=this._state.y2-this._state.y1-1;_>0&&this._clearCells(0,this._state.y1+1,this._state.cols,_),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},p.prototype._onShowLinkUnderline=function(_){if(_.fg===f.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:_.fg&&(0,h.is256Color)(_.fg)?this._ctx.fillStyle=this._colors.ansi[_.fg].css:this._ctx.fillStyle=this._colors.foreground.css,_.y1===_.y2)this._fillBottomLineAtCells(_.x1,_.y1,_.x2-_.x1);else{this._fillBottomLineAtCells(_.x1,_.y1,_.cols-_.x1);for(var b=_.y1+1;b<_.y2;b++)this._fillBottomLineAtCells(0,b,_.cols);this._fillBottomLineAtCells(0,_.y2,_.x2)}this._state=_},p.prototype._onHideLinkUnderline=function(_){this._clearCurrentLink()},c([u(6,g.IBufferService),u(7,g.IOptionsService)],p)}(d.BaseRenderLayer);o.LinkRenderLayer=v},3525:function(r,o,s){var a,l=this&&this.__extends||(a=function(k,x){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,L){T.__proto__=L}||function(T,L){for(var D in L)Object.prototype.hasOwnProperty.call(L,D)&&(T[D]=L[D])},a(k,x)},function(k,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function T(){this.constructor=k}a(k,x),k.prototype=x===null?Object.create(x):(T.prototype=x.prototype,new T)}),c=this&&this.__decorate||function(k,x,T,L){var D,R=arguments.length,M=R<3?x:L===null?L=Object.getOwnPropertyDescriptor(x,T):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(k,x,T,L);else for(var A=k.length-1;A>=0;A--)(D=k[A])&&(M=(R<3?D(M):R>3?D(x,T,M):D(x,T))||M);return R>3&&M&&Object.defineProperty(x,T,M),M},u=this&&this.__param||function(k,x){return function(T,L){x(T,L,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var d=s(9596),f=s(4149),h=s(2512),g=s(5098),v=s(844),m=s(4725),p=s(2585),_=s(1420),b=s(8460),y=1,w=function(k){function x(T,L,D,R,M,A,X,H){var O=k.call(this)||this;O._colors=T,O._screenElement=L,O._bufferService=A,O._charSizeService=X,O._optionsService=H,O._id=y++,O._onRequestRedraw=new b.EventEmitter;var W=O._optionsService.rawOptions.allowTransparency;return O._renderLayers=[M.createInstance(d.TextRenderLayer,O._screenElement,0,O._colors,W,O._id),M.createInstance(f.SelectionRenderLayer,O._screenElement,1,O._colors,O._id),M.createInstance(g.LinkRenderLayer,O._screenElement,2,O._colors,O._id,D,R),M.createInstance(h.CursorRenderLayer,O._screenElement,3,O._colors,O._id,O._onRequestRedraw)],O.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},O._devicePixelRatio=window.devicePixelRatio,O._updateDimensions(),O.onOptionsChanged(),O}return l(x,k),Object.defineProperty(x.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){for(var T=0,L=this._renderLayers;T<L.length;T++)L[T].dispose();k.prototype.dispose.call(this),(0,_.removeTerminalFromCache)(this._id)},x.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},x.prototype.setColors=function(T){this._colors=T;for(var L=0,D=this._renderLayers;L<D.length;L++){var R=D[L];R.setColors(this._colors),R.reset()}},x.prototype.onResize=function(T,L){this._updateDimensions();for(var D=0,R=this._renderLayers;D<R.length;D++)R[D].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},x.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},x.prototype.onBlur=function(){this._runOperation(function(T){return T.onBlur()})},x.prototype.onFocus=function(){this._runOperation(function(T){return T.onFocus()})},x.prototype.onSelectionChanged=function(T,L,D){D===void 0&&(D=!1),this._runOperation(function(R){return R.onSelectionChanged(T,L,D)})},x.prototype.onCursorMove=function(){this._runOperation(function(T){return T.onCursorMove()})},x.prototype.onOptionsChanged=function(){this._runOperation(function(T){return T.onOptionsChanged()})},x.prototype.clear=function(){this._runOperation(function(T){return T.reset()})},x.prototype._runOperation=function(T){for(var L=0,D=this._renderLayers;L<D.length;L++)T(D[L])},x.prototype.renderRows=function(T,L){for(var D=0,R=this._renderLayers;D<R.length;D++)R[D].onGridChanged(T,L)},x.prototype.clearTextureAtlas=function(){for(var T=0,L=this._renderLayers;T<L.length;T++)L[T].clearTextureAtlas()},x.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?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/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},c([u(4,p.IInstantiationService),u(5,p.IBufferService),u(6,m.ICharSizeService),u(7,p.IOptionsService)],x)}(v.Disposable);o.Renderer=w},1752:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.throwIfFalsy=void 0,o.throwIfFalsy=function(s){if(!s)throw new Error("value must not be falsy");return s}},4149:function(r,o,s){var a,l=this&&this.__extends||(a=function(g,v){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,p){m.__proto__=p}||function(m,p){for(var _ in p)Object.prototype.hasOwnProperty.call(p,_)&&(m[_]=p[_])},a(g,v)},function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function m(){this.constructor=g}a(g,v),g.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}),c=this&&this.__decorate||function(g,v,m,p){var _,b=arguments.length,y=b<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,m):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,v,m,p);else for(var w=g.length-1;w>=0;w--)(_=g[w])&&(y=(b<3?_(y):b>3?_(v,m,y):_(v,m))||y);return b>3&&y&&Object.defineProperty(v,m,y),y},u=this&&this.__param||function(g,v){return function(m,p){v(m,p,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var d=s(1546),f=s(2585),h=function(g){function v(m,p,_,b,y,w){var k=g.call(this,m,"selection",p,!0,_,b,y,w)||this;return k._clearState(),k}return l(v,g),v.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},v.prototype.resize=function(m){g.prototype.resize.call(this,m),this._clearState()},v.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},v.prototype.onSelectionChanged=function(m,p,_){if(this._didStateChange(m,p,_,this._bufferService.buffer.ydisp))if(this._clearAll(),m&&p){var b=m[1]-this._bufferService.buffer.ydisp,y=p[1]-this._bufferService.buffer.ydisp,w=Math.max(b,0),k=Math.min(y,this._bufferService.rows-1);if(w>=this._bufferService.rows||k<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,_){var x=m[0],T=p[0]-x,L=k-w+1;this._fillCells(x,w,T,L)}else{x=b===w?m[0]:0;var D=w===y?p[0]:this._bufferService.cols;this._fillCells(x,w,D-x,1);var R=Math.max(k-w-1,0);if(this._fillCells(0,w+1,this._bufferService.cols,R),w!==k){var M=y===k?p[0]:this._bufferService.cols;this._fillCells(0,k,M,1)}}this._state.start=[m[0],m[1]],this._state.end=[p[0],p[1]],this._state.columnSelectMode=_,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},v.prototype._didStateChange=function(m,p,_,b){return!this._areCoordinatesEqual(m,this._state.start)||!this._areCoordinatesEqual(p,this._state.end)||_!==this._state.columnSelectMode||b!==this._state.ydisp},v.prototype._areCoordinatesEqual=function(m,p){return!(!m||!p)&&m[0]===p[0]&&m[1]===p[1]},c([u(4,f.IBufferService),u(5,f.IOptionsService)],v)}(d.BaseRenderLayer);o.SelectionRenderLayer=h},9596:function(r,o,s){var a,l=this&&this.__extends||(a=function(y,w){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,x){k.__proto__=x}||function(k,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(k[T]=x[T])},a(y,w)},function(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function k(){this.constructor=y}a(y,w),y.prototype=w===null?Object.create(w):(k.prototype=w.prototype,new k)}),c=this&&this.__decorate||function(y,w,k,x){var T,L=arguments.length,D=L<3?w:x===null?x=Object.getOwnPropertyDescriptor(w,k):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,w,k,x);else for(var R=y.length-1;R>=0;R--)(T=y[R])&&(D=(L<3?T(D):L>3?T(w,k,D):T(w,k))||D);return L>3&&D&&Object.defineProperty(w,k,D),D},u=this&&this.__param||function(y,w){return function(k,x){w(k,x,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var d=s(3700),f=s(1546),h=s(3734),g=s(643),v=s(511),m=s(2585),p=s(4725),_=s(4269),b=function(y){function w(k,x,T,L,D,R,M,A){var X=y.call(this,k,"text",x,L,T,D,R,M)||this;return X._characterJoinerService=A,X._characterWidth=0,X._characterFont="",X._characterOverlapCache={},X._workCell=new v.CellData,X._state=new d.GridCache,X}return l(w,y),w.prototype.resize=function(k){y.prototype.resize.call(this,k);var x=this._getFont(!1,!1);this._characterWidth===k.scaledCharWidth&&this._characterFont===x||(this._characterWidth=k.scaledCharWidth,this._characterFont=x,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},w.prototype.reset=function(){this._state.clear(),this._clearAll()},w.prototype._forEachCell=function(k,x,T){for(var L=k;L<=x;L++)for(var D=L+this._bufferService.buffer.ydisp,R=this._bufferService.buffer.lines.get(D),M=this._characterJoinerService.getJoinedCharacters(D),A=0;A<this._bufferService.cols;A++){R.loadCell(A,this._workCell);var X=this._workCell,H=!1,O=A;if(X.getWidth()!==0){if(M.length>0&&A===M[0][0]){H=!0;var W=M.shift();X=new _.JoinedCellData(this._workCell,R.translateToString(!0,W[0],W[1]),W[1]-W[0]),O=W[1]-1}!H&&this._isOverlapping(X)&&O<R.length-1&&R.getCodePoint(O+1)===g.NULL_CELL_CODE&&(X.content&=-12582913,X.content|=2<<22),T(X,A,L),A=O}}},w.prototype._drawBackground=function(k,x){var T=this,L=this._ctx,D=this._bufferService.cols,R=0,M=0,A=null;L.save(),this._forEachCell(k,x,function(X,H,O){var W=null;X.isInverse()?W=X.isFgDefault()?T._colors.foreground.css:X.isFgRGB()?"rgb("+h.AttributeData.toColorRGB(X.getFgColor()).join(",")+")":T._colors.ansi[X.getFgColor()].css:X.isBgRGB()?W="rgb("+h.AttributeData.toColorRGB(X.getBgColor()).join(",")+")":X.isBgPalette()&&(W=T._colors.ansi[X.getBgColor()].css),A===null&&(R=H,M=O),O!==M?(L.fillStyle=A||"",T._fillCells(R,M,D-R,1),R=H,M=O):A!==W&&(L.fillStyle=A||"",T._fillCells(R,M,H-R,1),R=H,M=O),A=W}),A!==null&&(L.fillStyle=A,this._fillCells(R,M,D-R,1)),L.restore()},w.prototype._drawForeground=function(k,x){var T=this;this._forEachCell(k,x,function(L,D,R){if(!L.isInvisible()&&(T._drawChars(L,D,R),L.isUnderline()||L.isStrikethrough())){if(T._ctx.save(),L.isInverse())if(L.isBgDefault())T._ctx.fillStyle=T._colors.background.css;else if(L.isBgRGB())T._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(L.getBgColor()).join(",")+")";else{var M=L.getBgColor();T._optionsService.rawOptions.drawBoldTextInBrightColors&&L.isBold()&&M<8&&(M+=8),T._ctx.fillStyle=T._colors.ansi[M].css}else if(L.isFgDefault())T._ctx.fillStyle=T._colors.foreground.css;else if(L.isFgRGB())T._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(L.getFgColor()).join(",")+")";else{var A=L.getFgColor();T._optionsService.rawOptions.drawBoldTextInBrightColors&&L.isBold()&&A<8&&(A+=8),T._ctx.fillStyle=T._colors.ansi[A].css}L.isStrikethrough()&&T._fillMiddleLineAtCells(D,R,L.getWidth()),L.isUnderline()&&T._fillBottomLineAtCells(D,R,L.getWidth()),T._ctx.restore()}})},w.prototype.onGridChanged=function(k,x){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,k,this._bufferService.cols,x-k+1),this._drawBackground(k,x),this._drawForeground(k,x))},w.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},w.prototype._isOverlapping=function(k){if(k.getWidth()!==1||k.getCode()<256)return!1;var x=k.getChars();if(this._characterOverlapCache.hasOwnProperty(x))return this._characterOverlapCache[x];this._ctx.save(),this._ctx.font=this._characterFont;var T=Math.floor(this._ctx.measureText(x).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[x]=T,T},c([u(5,m.IBufferService),u(6,m.IOptionsService),u(7,p.ICharacterJoinerService)],w)}(f.BaseRenderLayer);o.TextRenderLayer=b},9616:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var s=function(){function a(){this._didWarmUp=!1}return a.prototype.dispose=function(){},a.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},a.prototype._doWarmUp=function(){},a.prototype.clear=function(){},a.prototype.beginFrame=function(){},a}();o.BaseCharAtlas=s},1420:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var a=s(2040),l=s(1906),c=[];o.acquireCharAtlas=function(u,d,f,h,g){for(var v=(0,a.generateConfig)(h,g,u,f),m=0;m<c.length;m++){var p=(_=c[m]).ownedBy.indexOf(d);if(p>=0){if((0,a.configEquals)(_.config,v))return _.atlas;_.ownedBy.length===1?(_.atlas.dispose(),c.splice(m,1)):_.ownedBy.splice(p,1);break}}for(m=0;m<c.length;m++){var _=c[m];if((0,a.configEquals)(_.config,v))return _.ownedBy.push(d),_.atlas}var b={atlas:new l.DynamicCharAtlas(document,v),config:v,ownedBy:[d]};return c.push(b),b.atlas},o.removeTerminalFromCache=function(u){for(var d=0;d<c.length;d++){var f=c[d].ownedBy.indexOf(u);if(f!==-1){c[d].ownedBy.length===1?(c[d].atlas.dispose(),c.splice(d,1)):c[d].ownedBy.splice(f,1);break}}}},2040:function(r,o,s){var a=this&&this.__spreadArray||function(c,u,d){if(d||arguments.length===2)for(var f,h=0,g=u.length;h<g;h++)!f&&h in u||(f||(f=Array.prototype.slice.call(u,0,h)),f[h]=u[h]);return c.concat(f||Array.prototype.slice.call(u))};Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var l=s(643);o.generateConfig=function(c,u,d,f){var h={foreground:f.foreground,background:f.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:a([],f.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:c,scaledCharHeight:u,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,colors:h}},o.configEquals=function(c,u){for(var d=0;d<c.colors.ansi.length;d++)if(c.colors.ansi[d].rgba!==u.colors.ansi[d].rgba)return!1;return c.devicePixelRatio===u.devicePixelRatio&&c.fontFamily===u.fontFamily&&c.fontSize===u.fontSize&&c.fontWeight===u.fontWeight&&c.fontWeightBold===u.fontWeightBold&&c.allowTransparency===u.allowTransparency&&c.scaledCharWidth===u.scaledCharWidth&&c.scaledCharHeight===u.scaledCharHeight&&c.colors.foreground===u.colors.foreground&&c.colors.background===u.colors.background},o.is256Color=function(c){return c<l.DEFAULT_COLOR}},8803:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;var a=s(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=a.isFirefox||a.isLegacyEdge?"bottom":"ideographic",o.CHAR_ATLAS_CELL_SPACING=1},1906:function(r,o,s){var a,l=this&&this.__extends||(a=function(x,T){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,D){L.__proto__=D}||function(L,D){for(var R in D)Object.prototype.hasOwnProperty.call(D,R)&&(L[R]=D[R])},a(x,T)},function(x,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function L(){this.constructor=x}a(x,T),x.prototype=T===null?Object.create(T):(L.prototype=T.prototype,new L)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var c=s(8803),u=s(9616),d=s(5680),f=s(7001),h=s(6114),g=s(1752),v=s(4774),m=1024,p=1024,_={css:"rgba(0, 0, 0, 0)",rgba:0};function b(x){return x.code<<21|x.bg<<12|x.fg<<3|(x.bold?0:4)+(x.dim?0:2)+(x.italic?0:1)}o.getGlyphCacheKey=b;var y=function(x){function T(L,D){var R=x.call(this)||this;R._config=D,R._drawToCacheCount=0,R._glyphsWaitingOnBitmap=[],R._bitmapCommitTimeout=null,R._bitmap=null,R._cacheCanvas=L.createElement("canvas"),R._cacheCanvas.width=m,R._cacheCanvas.height=p,R._cacheCtx=(0,g.throwIfFalsy)(R._cacheCanvas.getContext("2d",{alpha:!0}));var M=L.createElement("canvas");M.width=R._config.scaledCharWidth,M.height=R._config.scaledCharHeight,R._tmpCtx=(0,g.throwIfFalsy)(M.getContext("2d",{alpha:R._config.allowTransparency})),R._width=Math.floor(m/R._config.scaledCharWidth),R._height=Math.floor(p/R._config.scaledCharHeight);var A=R._width*R._height;return R._cacheMap=new f.LRUMap(A),R._cacheMap.prealloc(A),R}return l(T,x),T.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},T.prototype.beginFrame=function(){this._drawToCacheCount=0},T.prototype.clear=function(){if(this._cacheMap.size>0){var L=this._width*this._height;this._cacheMap=new f.LRUMap(L),this._cacheMap.prealloc(L)}this._cacheCtx.clearRect(0,0,m,p),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},T.prototype.draw=function(L,D,R,M){if(D.code===32)return!0;if(!this._canCache(D))return!1;var A=b(D),X=this._cacheMap.get(A);if(X!=null)return this._drawFromCache(L,X,R,M),!0;if(this._drawToCacheCount<100){var H;H=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var O=this._drawToCache(D,H);return this._cacheMap.set(A,O),this._drawFromCache(L,O,R,M),!0}return!1},T.prototype._canCache=function(L){return L.code<256},T.prototype._toCoordinateX=function(L){return L%this._width*this._config.scaledCharWidth},T.prototype._toCoordinateY=function(L){return Math.floor(L/this._width)*this._config.scaledCharHeight},T.prototype._drawFromCache=function(L,D,R,M){if(!D.isEmpty){var A=this._toCoordinateX(D.index),X=this._toCoordinateY(D.index);L.drawImage(D.inBitmap?this._bitmap:this._cacheCanvas,A,X,this._config.scaledCharWidth,this._config.scaledCharHeight,R,M,this._config.scaledCharWidth,this._config.scaledCharHeight)}},T.prototype._getColorFromAnsiIndex=function(L){return L<this._config.colors.ansi.length?this._config.colors.ansi[L]:d.DEFAULT_ANSI_COLORS[L]},T.prototype._getBackgroundColor=function(L){return this._config.allowTransparency?_:L.bg===c.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:L.bg<256?this._getColorFromAnsiIndex(L.bg):this._config.colors.background},T.prototype._getForegroundColor=function(L){return L.fg===c.INVERTED_DEFAULT_COLOR?v.color.opaque(this._config.colors.background):L.fg<256?this._getColorFromAnsiIndex(L.fg):this._config.colors.foreground},T.prototype._drawToCache=function(L,D){this._drawToCacheCount++,this._tmpCtx.save();var R=this._getBackgroundColor(L);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=R.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var M=L.bold?this._config.fontWeightBold:this._config.fontWeight,A=L.italic?"italic":"";this._tmpCtx.font=A+" "+M+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=c.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(L).css,L.dim&&(this._tmpCtx.globalAlpha=c.DIM_OPACITY),this._tmpCtx.fillText(L.chars,0,this._config.scaledCharHeight);var X=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),H=!1;if(this._config.allowTransparency||(H=k(X,R)),H&&L.chars==="_"&&!this._config.allowTransparency)for(var O=1;O<=5&&(this._tmpCtx.fillText(L.chars,0,this._config.scaledCharHeight-O),H=k(X=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),R));O++);this._tmpCtx.restore();var W=this._toCoordinateX(D),V=this._toCoordinateY(D);this._cacheCtx.putImageData(X,W,V);var G={index:D,isEmpty:H,inBitmap:!1};return this._addGlyphToBitmap(G),G},T.prototype._addGlyphToBitmap=function(L){var D=this;!("createImageBitmap"in window)||h.isFirefox||h.isSafari||(this._glyphsWaitingOnBitmap.push(L),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return D._generateBitmap()},100)))},T.prototype._generateBitmap=function(){var L=this,D=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(R){L._bitmap=R;for(var M=0;M<D.length;M++)D[M].inBitmap=!0}),this._bitmapCommitTimeout=null},T}(u.BaseCharAtlas);o.DynamicCharAtlas=y;var w=function(x){function T(L,D){return x.call(this)||this}return l(T,x),T.prototype.draw=function(L,D,R,M){return!1},T}(u.BaseCharAtlas);function k(x,T){for(var L=!0,D=T.rgba>>>24,R=T.rgba>>>16&255,M=T.rgba>>>8&255,A=0;A<x.data.length;A+=4)x.data[A]===D&&x.data[A+1]===R&&x.data[A+2]===M?x.data[A+3]=0:L=!1;return L}o.NoneCharAtlas=w},7001:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var s=function(){function a(l){this.capacity=l,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return a.prototype._unlinkNode=function(l){var c=l.prev,u=l.next;l===this._head&&(this._head=u),l===this._tail&&(this._tail=c),c!==null&&(c.next=u),u!==null&&(u.prev=c)},a.prototype._appendNode=function(l){var c=this._tail;c!==null&&(c.next=l),l.prev=c,l.next=null,this._tail=l,this._head===null&&(this._head=l)},a.prototype.prealloc=function(l){for(var c=this._nodePool,u=0;u<l;u++)c.push({prev:null,next:null,key:null,value:null})},a.prototype.get=function(l){var c=this._map[l];return c!==void 0?(this._unlinkNode(c),this._appendNode(c),c.value):null},a.prototype.peekValue=function(l){var c=this._map[l];return c!==void 0?c.value:null},a.prototype.peek=function(){var l=this._head;return l===null?null:l.value},a.prototype.set=function(l,c){var u=this._map[l];if(u!==void 0)u=this._map[l],this._unlinkNode(u),u.value=c;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=l,u.value=c,this._map[l]=u;else{var d=this._nodePool;d.length>0?((u=d.pop()).key=l,u.value=c):u={prev:null,next:null,key:l,value:c},this._map[l]=u,this.size++}this._appendNode(u)},a}();o.LRUMap=s},1296:function(r,o,s){var a,l=this&&this.__extends||(a=function(L,D){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,M){R.__proto__=M}||function(R,M){for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(R[A]=M[A])},a(L,D)},function(L,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");function R(){this.constructor=L}a(L,D),L.prototype=D===null?Object.create(D):(R.prototype=D.prototype,new R)}),c=this&&this.__decorate||function(L,D,R,M){var A,X=arguments.length,H=X<3?D:M===null?M=Object.getOwnPropertyDescriptor(D,R):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(L,D,R,M);else for(var O=L.length-1;O>=0;O--)(A=L[O])&&(H=(X<3?A(H):X>3?A(D,R,H):A(D,R))||H);return X>3&&H&&Object.defineProperty(D,R,H),H},u=this&&this.__param||function(L,D){return function(R,M){D(R,M,L)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var d=s(3787),f=s(8803),h=s(844),g=s(4725),v=s(2585),m=s(8460),p=s(4774),_=s(9631),b="xterm-dom-renderer-owner-",y="xterm-fg-",w="xterm-bg-",k="xterm-focus",x=1,T=function(L){function D(R,M,A,X,H,O,W,V,G,pe){var q=L.call(this)||this;return q._colors=R,q._element=M,q._screenElement=A,q._viewportElement=X,q._linkifier=H,q._linkifier2=O,q._charSizeService=V,q._optionsService=G,q._bufferService=pe,q._terminalClass=x++,q._rowElements=[],q._rowContainer=document.createElement("div"),q._rowContainer.classList.add("xterm-rows"),q._rowContainer.style.lineHeight="normal",q._rowContainer.setAttribute("aria-hidden","true"),q._refreshRowElements(q._bufferService.cols,q._bufferService.rows),q._selectionContainer=document.createElement("div"),q._selectionContainer.classList.add("xterm-selection"),q._selectionContainer.setAttribute("aria-hidden","true"),q.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},q._updateDimensions(),q._injectCss(),q._rowFactory=W.createInstance(d.DomRendererRowFactory,document,q._colors),q._element.classList.add(b+q._terminalClass),q._screenElement.appendChild(q._rowContainer),q._screenElement.appendChild(q._selectionContainer),q._linkifier.onShowLinkUnderline(function(ne){return q._onLinkHover(ne)}),q._linkifier.onHideLinkUnderline(function(ne){return q._onLinkLeave(ne)}),q._linkifier2.onShowLinkUnderline(function(ne){return q._onLinkHover(ne)}),q._linkifier2.onHideLinkUnderline(function(ne){return q._onLinkLeave(ne)}),q}return l(D,L),Object.defineProperty(D.prototype,"onRequestRedraw",{get:function(){return new m.EventEmitter().event},enumerable:!1,configurable:!0}),D.prototype.dispose=function(){this._element.classList.remove(b+this._terminalClass),(0,_.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),L.prototype.dispose.call(this)},D.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var R=0,M=this._rowElements;R<M.length;R++){var A=M[R];A.style.width=this.dimensions.canvasWidth+"px",A.style.height=this.dimensions.actualCellHeight+"px",A.style.lineHeight=this.dimensions.actualCellHeight+"px",A.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var X=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=X,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},D.prototype.setColors=function(R){this._colors=R,this._injectCss()},D.prototype._injectCss=function(){var R=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var M=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";M+=this._terminalSelector+" span:not(."+d.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+d.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+d.ITALIC_CLASS+" { font-style: italic;}",M+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",M+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",M+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+d.CURSOR_CLASS+"."+d.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+d.CURSOR_CLASS+"."+d.CURSOR_BLINK_CLASS+":not(."+d.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+d.CURSOR_CLASS+"."+d.CURSOR_BLINK_CLASS+"."+d.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+d.CURSOR_CLASS+"."+d.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+d.CURSOR_CLASS+"."+d.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+d.CURSOR_CLASS+"."+d.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",M+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(A,X){M+=R._terminalSelector+" ."+y+X+" { color: "+A.css+"; }"+R._terminalSelector+" ."+w+X+" { background-color: "+A.css+"; }"}),M+=this._terminalSelector+" ."+y+f.INVERTED_DEFAULT_COLOR+" { color: "+p.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+w+f.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=M},D.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},D.prototype._refreshRowElements=function(R,M){for(var A=this._rowElements.length;A<=M;A++){var X=document.createElement("div");this._rowContainer.appendChild(X),this._rowElements.push(X)}for(;this._rowElements.length>M;)this._rowContainer.removeChild(this._rowElements.pop())},D.prototype.onResize=function(R,M){this._refreshRowElements(R,M),this._updateDimensions()},D.prototype.onCharSizeChanged=function(){this._updateDimensions()},D.prototype.onBlur=function(){this._rowContainer.classList.remove(k)},D.prototype.onFocus=function(){this._rowContainer.classList.add(k)},D.prototype.onSelectionChanged=function(R,M,A){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(R&&M){var X=R[1]-this._bufferService.buffer.ydisp,H=M[1]-this._bufferService.buffer.ydisp,O=Math.max(X,0),W=Math.min(H,this._bufferService.rows-1);if(!(O>=this._bufferService.rows||W<0)){var V=document.createDocumentFragment();if(A)V.appendChild(this._createSelectionElement(O,R[0],M[0],W-O+1));else{var G=X===O?R[0]:0,pe=O===H?M[0]:this._bufferService.cols;V.appendChild(this._createSelectionElement(O,G,pe));var q=W-O-1;if(V.appendChild(this._createSelectionElement(O+1,0,this._bufferService.cols,q)),O!==W){var ne=H===W?M[0]:this._bufferService.cols;V.appendChild(this._createSelectionElement(W,0,ne))}}this._selectionContainer.appendChild(V)}}},D.prototype._createSelectionElement=function(R,M,A,X){X===void 0&&(X=1);var H=document.createElement("div");return H.style.height=X*this.dimensions.actualCellHeight+"px",H.style.top=R*this.dimensions.actualCellHeight+"px",H.style.left=M*this.dimensions.actualCellWidth+"px",H.style.width=this.dimensions.actualCellWidth*(A-M)+"px",H},D.prototype.onCursorMove=function(){},D.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},D.prototype.clear=function(){for(var R=0,M=this._rowElements;R<M.length;R++)M[R].innerText=""},D.prototype.renderRows=function(R,M){for(var A=this._bufferService.buffer.ybase+this._bufferService.buffer.y,X=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),H=this._optionsService.rawOptions.cursorBlink,O=R;O<=M;O++){var W=this._rowElements[O];W.innerText="";var V=O+this._bufferService.buffer.ydisp,G=this._bufferService.buffer.lines.get(V),pe=this._optionsService.rawOptions.cursorStyle;W.appendChild(this._rowFactory.createRow(G,V,V===A,pe,X,H,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(D.prototype,"_terminalSelector",{get:function(){return"."+b+this._terminalClass},enumerable:!1,configurable:!0}),D.prototype._onLinkHover=function(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!0)},D.prototype._onLinkLeave=function(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!1)},D.prototype._setCellUnderline=function(R,M,A,X,H,O){for(;R!==M||A!==X;){var W=this._rowElements[A];if(!W)return;var V=W.children[R];V&&(V.style.textDecoration=O?"underline":"none"),++R>=H&&(R=0,A++)}},c([u(6,v.IInstantiationService),u(7,g.ICharSizeService),u(8,v.IOptionsService),u(9,v.IBufferService)],D)}(h.Disposable);o.DomRenderer=T},3787:function(r,o,s){var a=this&&this.__decorate||function(_,b,y,w){var k,x=arguments.length,T=x<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,b,y,w);else for(var L=_.length-1;L>=0;L--)(k=_[L])&&(T=(x<3?k(T):x>3?k(b,y,T):k(b,y))||T);return x>3&&T&&Object.defineProperty(b,y,T),T},l=this&&this.__param||function(_,b){return function(y,w){b(y,w,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.STRIKETHROUGH_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var c=s(8803),u=s(643),d=s(511),f=s(2585),h=s(4774),g=s(4725),v=s(4269);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.STRIKETHROUGH_CLASS="xterm-strikethrough",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var m=function(){function _(b,y,w,k,x){this._document=b,this._colors=y,this._characterJoinerService=w,this._optionsService=k,this._coreService=x,this._workCell=new d.CellData}return _.prototype.setColors=function(b){this._colors=b},_.prototype.createRow=function(b,y,w,k,x,T,L,D){for(var R=this._document.createDocumentFragment(),M=this._characterJoinerService.getJoinedCharacters(y),A=0,X=Math.min(b.length,D)-1;X>=0;X--)if(b.loadCell(X,this._workCell).getCode()!==u.NULL_CELL_CODE||w&&X===x){A=X+1;break}for(X=0;X<A;X++){b.loadCell(X,this._workCell);var H=this._workCell.getWidth();if(H!==0){var O=!1,W=X,V=this._workCell;if(M.length>0&&X===M[0][0]){O=!0;var G=M.shift();V=new v.JoinedCellData(this._workCell,b.translateToString(!0,G[0],G[1]),G[1]-G[0]),W=G[1]-1,H=V.getWidth()}var pe=this._document.createElement("span");if(H>1&&(pe.style.width=L*H+"px"),O&&(pe.style.display="inline",x>=X&&x<=W&&(x=X)),!this._coreService.isCursorHidden&&w&&X===x)switch(pe.classList.add(o.CURSOR_CLASS),T&&pe.classList.add(o.CURSOR_BLINK_CLASS),k){case"bar":pe.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":pe.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:pe.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}V.isBold()&&pe.classList.add(o.BOLD_CLASS),V.isItalic()&&pe.classList.add(o.ITALIC_CLASS),V.isDim()&&pe.classList.add(o.DIM_CLASS),V.isUnderline()&&pe.classList.add(o.UNDERLINE_CLASS),V.isInvisible()?pe.textContent=u.WHITESPACE_CELL_CHAR:pe.textContent=V.getChars()||u.WHITESPACE_CELL_CHAR,V.isStrikethrough()&&pe.classList.add(o.STRIKETHROUGH_CLASS);var q=V.getFgColor(),ne=V.getFgColorMode(),he=V.getBgColor(),De=V.getBgColorMode(),j=!!V.isInverse();if(j){var ge=q;q=he,he=ge;var J=ne;ne=De,De=J}switch(ne){case 16777216:case 33554432:V.isBold()&&q<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(q+=8),this._applyMinimumContrast(pe,this._colors.background,this._colors.ansi[q])||pe.classList.add("xterm-fg-"+q);break;case 50331648:var oe=h.rgba.toColor(q>>16&255,q>>8&255,255&q);this._applyMinimumContrast(pe,this._colors.background,oe)||this._addStyle(pe,"color:#"+p(q.toString(16),"0",6));break;default:this._applyMinimumContrast(pe,this._colors.background,this._colors.foreground)||j&&pe.classList.add("xterm-fg-"+c.INVERTED_DEFAULT_COLOR)}switch(De){case 16777216:case 33554432:pe.classList.add("xterm-bg-"+he);break;case 50331648:this._addStyle(pe,"background-color:#"+p(he.toString(16),"0",6));break;default:j&&pe.classList.add("xterm-bg-"+c.INVERTED_DEFAULT_COLOR)}R.appendChild(pe),X=W}}return R},_.prototype._applyMinimumContrast=function(b,y,w){if(this._optionsService.rawOptions.minimumContrastRatio===1)return!1;var k=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return k===void 0&&(k=h.color.ensureContrastRatio(y,w,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,k!=null?k:null)),!!k&&(this._addStyle(b,"color:"+k.css),!0)},_.prototype._addStyle=function(b,y){b.setAttribute("style",""+(b.getAttribute("style")||"")+y+";")},a([l(2,g.ICharacterJoinerService),l(3,f.IOptionsService),l(4,f.ICoreService)],_)}();function p(_,b,y){for(;_.length<y;)_=b+_;return _}o.DomRendererRowFactory=m},456:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var s=function(){function a(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}return a.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(a.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),a.prototype.areSelectionValuesReversed=function(){var l=this.selectionStart,c=this.selectionEnd;return!(!l||!c)&&(l[1]>c[1]||l[1]===c[1]&&l[0]>c[0])},a.prototype.onTrim=function(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},a}();o.SelectionModel=s},428:function(r,o,s){var a=this&&this.__decorate||function(h,g,v,m){var p,_=arguments.length,b=_<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,g,v,m);else for(var y=h.length-1;y>=0;y--)(p=h[y])&&(b=(_<3?p(b):_>3?p(g,v,b):p(g,v))||b);return _>3&&b&&Object.defineProperty(g,v,b),b},l=this&&this.__param||function(h,g){return function(v,m){g(v,m,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var c=s(2585),u=s(8460),d=function(){function h(g,v,m){this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=new u.EventEmitter,this._measureStrategy=new f(g,v,this._optionsService)}return Object.defineProperty(h.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),h.prototype.measure=function(){var g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())},a([l(2,c.IOptionsService)],h)}();o.CharSizeService=d;var f=function(){function h(g,v,m){this._document=g,this._parentElement=v,this._optionsService=m,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return h.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var g=this._measureElement.getBoundingClientRect();return g.width!==0&&g.height!==0&&(this._result.width=g.width,this._result.height=Math.ceil(g.height)),this._result},h}()},4269:function(r,o,s){var a,l=this&&this.__extends||(a=function(p,_){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,y){b.__proto__=y}||function(b,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(b[w]=y[w])},a(p,_)},function(p,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function b(){this.constructor=p}a(p,_),p.prototype=_===null?Object.create(_):(b.prototype=_.prototype,new b)}),c=this&&this.__decorate||function(p,_,b,y){var w,k=arguments.length,x=k<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(p,_,b,y);else for(var T=p.length-1;T>=0;T--)(w=p[T])&&(x=(k<3?w(x):k>3?w(_,b,x):w(_,b))||x);return k>3&&x&&Object.defineProperty(_,b,x),x},u=this&&this.__param||function(p,_){return function(b,y){_(b,y,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;var d=s(3734),f=s(643),h=s(511),g=s(2585),v=function(p){function _(b,y,w){var k=p.call(this)||this;return k.content=0,k.combinedData="",k.fg=b.fg,k.bg=b.bg,k.combinedData=y,k._width=w,k}return l(_,p),_.prototype.isCombined=function(){return 2097152},_.prototype.getWidth=function(){return this._width},_.prototype.getChars=function(){return this.combinedData},_.prototype.getCode=function(){return 2097151},_.prototype.setFromCharData=function(b){throw new Error("not implemented")},_.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},_}(d.AttributeData);o.JoinedCellData=v;var m=function(){function p(_){this._bufferService=_,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new h.CellData}return p.prototype.register=function(_){var b={id:this._nextCharacterJoinerId++,handler:_};return this._characterJoiners.push(b),b.id},p.prototype.deregister=function(_){for(var b=0;b<this._characterJoiners.length;b++)if(this._characterJoiners[b].id===_)return this._characterJoiners.splice(b,1),!0;return!1},p.prototype.getJoinedCharacters=function(_){if(this._characterJoiners.length===0)return[];var b=this._bufferService.buffer.lines.get(_);if(!b||b.length===0)return[];for(var y=[],w=b.translateToString(!0),k=0,x=0,T=0,L=b.getFg(0),D=b.getBg(0),R=0;R<b.getTrimmedLength();R++)if(b.loadCell(R,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==D){if(R-k>1)for(var M=this._getJoinedRanges(w,T,x,b,k),A=0;A<M.length;A++)y.push(M[A]);k=R,T=x,L=this._workCell.fg,D=this._workCell.bg}x+=this._workCell.getChars().length||f.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1)for(M=this._getJoinedRanges(w,T,x,b,k),A=0;A<M.length;A++)y.push(M[A]);return y},p.prototype._getJoinedRanges=function(_,b,y,w,k){var x=_.substring(b,y),T=[];try{T=this._characterJoiners[0].handler(x)}catch(M){console.error(M)}for(var L=1;L<this._characterJoiners.length;L++)try{for(var D=this._characterJoiners[L].handler(x),R=0;R<D.length;R++)p._mergeRanges(T,D[R])}catch(M){console.error(M)}return this._stringRangesToCellRanges(T,w,k),T},p.prototype._stringRangesToCellRanges=function(_,b,y){var w=0,k=!1,x=0,T=_[w];if(T){for(var L=y;L<this._bufferService.cols;L++){var D=b.getWidth(L),R=b.getString(L).length||f.WHITESPACE_CELL_CHAR.length;if(D!==0){if(!k&&T[0]<=x&&(T[0]=L,k=!0),T[1]<=x){if(T[1]=L,!(T=_[++w]))break;T[0]<=x?(T[0]=L,k=!0):k=!1}x+=R}}T&&(T[1]=this._bufferService.cols)}},p._mergeRanges=function(_,b){for(var y=!1,w=0;w<_.length;w++){var k=_[w];if(y){if(b[1]<=k[0])return _[w-1][1]=b[1],_;if(b[1]<=k[1])return _[w-1][1]=Math.max(b[1],k[1]),_.splice(w,1),_;_.splice(w,1),w--}else{if(b[1]<=k[0])return _.splice(w,0,b),_;if(b[1]<=k[1])return k[0]=Math.min(b[0],k[0]),_;b[0]<k[1]&&(k[0]=Math.min(b[0],k[0]),y=!0)}}return y?_[_.length-1][1]=b[1]:_.push(b),_},p=c([u(0,g.IBufferService)],p)}();o.CharacterJoinerService=m},5114:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var s=function(){function a(l){this._textarea=l}return Object.defineProperty(a.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),a}();o.CoreBrowserService=s},7641:function(r,o,s){var a,l=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,b){_.__proto__=b}||function(_,b){for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(_[y]=b[y])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function _(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(_.prototype=p.prototype,new _)}),c=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},u=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Decoration=o.DecorationService=void 0;var d=s(8460),f=s(844),h=s(2585),g=function(m){function p(_){var b=m.call(this)||this;return b._instantiationService=_,b._decorations=[],b}return l(p,m),p.prototype.attachToDom=function(_,b){var y=this;this._renderService=b,this._screenElement=_,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),_.appendChild(this._container),this.register(this._renderService.onRenderedBufferChange(function(){return y.refresh()})),this.register(this._renderService.onDimensionsChange(function(){return y.refresh(!0)}))},p.prototype.registerDecoration=function(_){var b=this;if(!_.marker.isDisposed&&this._container){var y=this._instantiationService.createInstance(v,_,this._container);return this._decorations.push(y),y.onDispose(function(){return b._decorations.splice(b._decorations.indexOf(y),1)}),this._queueRefresh(),y}},p.prototype._queueRefresh=function(){var _=this;this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){_.refresh(),_._animationFrame=void 0}))},p.prototype.refresh=function(_){if(this._renderService)for(var b=0,y=this._decorations;b<y.length;b++)y[b].render(this._renderService,_)},p.prototype.dispose=function(){for(var _=0,b=this._decorations;_<b.length;_++)b[_].dispose();this._screenElement&&this._container&&this._screenElement.contains(this._container)&&this._screenElement.removeChild(this._container)},c([u(0,h.IInstantiationService)],p)}(f.Disposable);o.DecorationService=g;var v=function(m){function p(_,b,y){var w,k=m.call(this)||this;return k._container=b,k._bufferService=y,k.isDisposed=!1,k._onDispose=new d.EventEmitter,k._onRender=new d.EventEmitter,k.x=(w=_.x)!==null&&w!==void 0?w:0,k._marker=_.marker,k._marker.onDispose(function(){return k.dispose()}),k.anchor=_.anchor||"left",k.width=_.width||1,k.height=_.height||1,k}return l(p,m),Object.defineProperty(p.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"marker",{get:function(){return this._marker},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),p.prototype.render=function(_,b){this._element&&!b||this._createElement(_,b),this._container&&this._element&&!this._container.contains(this._element)&&this._container.append(this._element),this._refreshStyle(_),this._element&&this._onRender.fire(this._element)},p.prototype._createElement=function(_,b){b&&this._element&&this._container.contains(this._element)&&this._container.removeChild(this._element),this._element=document.createElement("div"),this._element.classList.add("xterm-decoration"),this._element.style.width=this.width*_.dimensions.actualCellWidth+"px",this._element.style.height=this.height*_.dimensions.actualCellHeight+"px",this._element.style.top=(this.marker.line-this._bufferService.buffers.active.ydisp)*_.dimensions.actualCellHeight+"px",this._element.style.lineHeight=_.dimensions.actualCellHeight+"px",this.x&&this.x>this._bufferService.cols&&(this._element.style.display="none"),this.anchor==="right"?this._element.style.right=this.x?this.x*_.dimensions.actualCellWidth+"px":"":this._element.style.left=this.x?this.x*_.dimensions.actualCellWidth+"px":""},p.prototype._refreshStyle=function(_){if(this._element){var b=this.marker.line-this._bufferService.buffers.active.ydisp;b<0||b>this._bufferService.rows?this._element.style.display="none":(this._element.style.top=b*_.dimensions.actualCellHeight+"px",this._element.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block")}},p.prototype.dispose=function(){this.isDisposed||(this._element&&this._container.contains(this._element)&&this._container.removeChild(this._element),this.isDisposed=!0,this._onDispose.fire())},c([u(2,h.IBufferService)],p)}(f.Disposable);o.Decoration=v},8934:function(r,o,s){var a=this&&this.__decorate||function(f,h,g,v){var m,p=arguments.length,_=p<3?h:v===null?v=Object.getOwnPropertyDescriptor(h,g):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(f,h,g,v);else for(var b=f.length-1;b>=0;b--)(m=f[b])&&(_=(p<3?m(_):p>3?m(h,g,_):m(h,g))||_);return p>3&&_&&Object.defineProperty(h,g,_),_},l=this&&this.__param||function(f,h){return function(g,v){h(g,v,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var c=s(4725),u=s(9806),d=function(){function f(h,g){this._renderService=h,this._charSizeService=g}return f.prototype.getCoords=function(h,g,v,m,p){return(0,u.getCoords)(h,g,v,m,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,p)},f.prototype.getRawByteCoords=function(h,g,v,m){var p=this.getCoords(h,g,v,m);return(0,u.getRawByteCoords)(p)},a([l(0,c.IRenderService),l(1,c.ICharSizeService)],f)}();o.MouseService=d},3230:function(r,o,s){var a,l=this&&this.__extends||(a=function(b,y){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var x in k)Object.prototype.hasOwnProperty.call(k,x)&&(w[x]=k[x])},a(b,y)},function(b,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function w(){this.constructor=b}a(b,y),b.prototype=y===null?Object.create(y):(w.prototype=y.prototype,new w)}),c=this&&this.__decorate||function(b,y,w,k){var x,T=arguments.length,L=T<3?y:k===null?k=Object.getOwnPropertyDescriptor(y,w):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(b,y,w,k);else for(var D=b.length-1;D>=0;D--)(x=b[D])&&(L=(T<3?x(L):T>3?x(y,w,L):x(y,w))||L);return T>3&&L&&Object.defineProperty(y,w,L),L},u=this&&this.__param||function(b,y){return function(w,k){y(w,k,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var d=s(6193),f=s(8460),h=s(844),g=s(5596),v=s(3656),m=s(2585),p=s(4725),_=function(b){function y(w,k,x,T,L,D){var R=b.call(this)||this;if(R._renderer=w,R._rowCount=k,R._charSizeService=L,R._isPaused=!1,R._needsFullRefresh=!1,R._isNextRenderRedrawOnly=!0,R._needsSelectionRefresh=!1,R._canvasWidth=0,R._canvasHeight=0,R._selectionState={start:void 0,end:void 0,columnSelectMode:!1},R._onDimensionsChange=new f.EventEmitter,R._onRender=new f.EventEmitter,R._onRefreshRequest=new f.EventEmitter,R.register({dispose:function(){return R._renderer.dispose()}}),R._renderDebouncer=new d.RenderDebouncer(function(A,X){return R._renderRows(A,X)}),R.register(R._renderDebouncer),R._screenDprMonitor=new g.ScreenDprMonitor,R._screenDprMonitor.setListener(function(){return R.onDevicePixelRatioChange()}),R.register(R._screenDprMonitor),R.register(D.onResize(function(){return R._fullRefresh()})),R.register(D.buffers.onBufferActivate(function(){var A;return(A=R._renderer)===null||A===void 0?void 0:A.clear()})),R.register(T.onOptionChange(function(){return R._renderer.onOptionsChanged()})),R.register(R._charSizeService.onCharSizeChange(function(){return R.onCharSizeChanged()})),R._renderer.onRequestRedraw(function(A){return R.refreshRows(A.start,A.end,!0)}),R.register((0,v.addDisposableDomListener)(window,"resize",function(){return R.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var M=new IntersectionObserver(function(A){return R._onIntersectionChange(A[A.length-1])},{threshold:0});M.observe(x),R.register({dispose:function(){return M.disconnect()}})}return R}return l(y,b),Object.defineProperty(y.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),y.prototype._onIntersectionChange=function(w){this._isPaused=w.isIntersecting===void 0?w.intersectionRatio===0:!w.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},y.prototype.refreshRows=function(w,k,x){x===void 0&&(x=!1),this._isPaused?this._needsFullRefresh=!0:(x||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(w,k,this._rowCount))},y.prototype._renderRows=function(w,k){this._renderer.renderRows(w,k),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:w,end:k}),this._isNextRenderRedrawOnly=!0},y.prototype.resize=function(w,k){this._rowCount=k,this._fireOnCanvasResize()},y.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},y.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},y.prototype.dispose=function(){b.prototype.dispose.call(this)},y.prototype.setRenderer=function(w){var k=this;this._renderer.dispose(),this._renderer=w,this._renderer.onRequestRedraw(function(x){return k.refreshRows(x.start,x.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},y.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},y.prototype.clearTextureAtlas=function(){var w,k;(k=(w=this._renderer)===null||w===void 0?void 0:w.clearTextureAtlas)===null||k===void 0||k.call(w),this._fullRefresh()},y.prototype.setColors=function(w){this._renderer.setColors(w),this._fullRefresh()},y.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},y.prototype.onResize=function(w,k){this._renderer.onResize(w,k),this._fullRefresh()},y.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},y.prototype.onBlur=function(){this._renderer.onBlur()},y.prototype.onFocus=function(){this._renderer.onFocus()},y.prototype.onSelectionChanged=function(w,k,x){this._selectionState.start=w,this._selectionState.end=k,this._selectionState.columnSelectMode=x,this._renderer.onSelectionChanged(w,k,x)},y.prototype.onCursorMove=function(){this._renderer.onCursorMove()},y.prototype.clear=function(){this._renderer.clear()},c([u(3,m.IOptionsService),u(4,p.ICharSizeService),u(5,m.IBufferService)],y)}(h.Disposable);o.RenderService=_},9312:function(r,o,s){var a,l=this&&this.__extends||(a=function(T,L){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,R){D.__proto__=R}||function(D,R){for(var M in R)Object.prototype.hasOwnProperty.call(R,M)&&(D[M]=R[M])},a(T,L)},function(T,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function D(){this.constructor=T}a(T,L),T.prototype=L===null?Object.create(L):(D.prototype=L.prototype,new D)}),c=this&&this.__decorate||function(T,L,D,R){var M,A=arguments.length,X=A<3?L:R===null?R=Object.getOwnPropertyDescriptor(L,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(T,L,D,R);else for(var H=T.length-1;H>=0;H--)(M=T[H])&&(X=(A<3?M(X):A>3?M(L,D,X):M(L,D))||X);return A>3&&X&&Object.defineProperty(L,D,X),X},u=this&&this.__param||function(T,L){return function(D,R){L(D,R,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var d=s(6114),f=s(456),h=s(511),g=s(8460),v=s(4725),m=s(2585),p=s(9806),_=s(9504),b=s(844),y=s(4841),w=String.fromCharCode(160),k=new RegExp(w,"g"),x=function(T){function L(D,R,M,A,X,H,O,W){var V=T.call(this)||this;return V._element=D,V._screenElement=R,V._linkifier=M,V._bufferService=A,V._coreService=X,V._mouseService=H,V._optionsService=O,V._renderService=W,V._dragScrollAmount=0,V._enabled=!0,V._workCell=new h.CellData,V._mouseDownTimeStamp=0,V._oldHasSelection=!1,V._oldSelectionStart=void 0,V._oldSelectionEnd=void 0,V._onLinuxMouseSelection=V.register(new g.EventEmitter),V._onRedrawRequest=V.register(new g.EventEmitter),V._onSelectionChange=V.register(new g.EventEmitter),V._onRequestScrollLines=V.register(new g.EventEmitter),V._mouseMoveListener=function(G){return V._onMouseMove(G)},V._mouseUpListener=function(G){return V._onMouseUp(G)},V._coreService.onUserInput(function(){V.hasSelection&&V.clearSelection()}),V._trimListener=V._bufferService.buffer.lines.onTrim(function(G){return V._onTrim(G)}),V.register(V._bufferService.buffers.onBufferActivate(function(G){return V._onBufferActivate(G)})),V.enable(),V._model=new f.SelectionModel(V._bufferService),V._activeSelectionMode=0,V}return l(L,T),Object.defineProperty(L.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){this._removeMouseDownListeners()},L.prototype.reset=function(){this.clearSelection()},L.prototype.disable=function(){this.clearSelection(),this._enabled=!1},L.prototype.enable=function(){this._enabled=!0},Object.defineProperty(L.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"hasSelection",{get:function(){var D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!D||!R||D[0]===R[0]&&D[1]===R[1])},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"selectionText",{get:function(){var D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!D||!R)return"";var M=this._bufferService.buffer,A=[];if(this._activeSelectionMode===3){if(D[0]===R[0])return"";for(var X=D[1];X<=R[1];X++){var H=M.translateBufferLineToString(X,!0,D[0],R[0]);A.push(H)}}else{var O=D[1]===R[1]?R[0]:void 0;for(A.push(M.translateBufferLineToString(D[1],!0,D[0],O)),X=D[1]+1;X<=R[1]-1;X++){var W=M.lines.get(X);H=M.translateBufferLineToString(X,!0),W!=null&&W.isWrapped?A[A.length-1]+=H:A.push(H)}D[1]!==R[1]&&(W=M.lines.get(R[1]),H=M.translateBufferLineToString(R[1],!0,0,R[0]),W&&W.isWrapped?A[A.length-1]+=H:A.push(H))}return A.map(function(V){return V.replace(k," ")}).join(d.isWindows?`\r
1868
1868
  `:`
1869
1869
  `)},enumerable:!1,configurable:!0}),L.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},L.prototype.refresh=function(D){var R=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return R._refresh()})),d.isLinux&&D&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},L.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},L.prototype._isClickInSelection=function(D){var R=this._getMouseBufferCoords(D),M=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!!(M&&A&&R)&&this._areCoordsInSelection(R,M,A)},L.prototype._areCoordsInSelection=function(D,R,M){return D[1]>R[1]&&D[1]<M[1]||R[1]===M[1]&&D[1]===R[1]&&D[0]>=R[0]&&D[0]<M[0]||R[1]<M[1]&&D[1]===M[1]&&D[0]<M[0]||R[1]<M[1]&&D[1]===R[1]&&D[0]>=R[0]},L.prototype._selectWordAtCursor=function(D,R){var M,A,X=(A=(M=this._linkifier.currentLink)===null||M===void 0?void 0:M.link)===null||A===void 0?void 0:A.range;if(X)return this._model.selectionStart=[X.start.x-1,X.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(X,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var H=this._getMouseBufferCoords(D);return!!H&&(this._selectWordAt(H,R),this._model.selectionEnd=void 0,!0)},L.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},L.prototype.selectLines=function(D,R){this._model.clearSelection(),D=Math.max(D,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,D],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()},L.prototype._onTrim=function(D){this._model.onTrim(D)&&this.refresh()},L.prototype._getMouseBufferCoords=function(D){var R=this._mouseService.getCoords(D,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R},L.prototype._getMouseEventScrollAmount=function(D){var R=(0,p.getCoordsRelativeToElement)(D,this._screenElement)[1],M=this._renderService.dimensions.canvasHeight;return R>=0&&R<=M?0:(R>M&&(R-=M),R=Math.min(Math.max(R,-50),50),(R/=50)/Math.abs(R)+Math.round(14*R))},L.prototype.shouldForceSelection=function(D){return d.isMac?D.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:D.shiftKey},L.prototype.onMouseDown=function(D){if(this._mouseDownTimeStamp=D.timeStamp,(D.button!==2||!this.hasSelection)&&D.button===0){if(!this._enabled){if(!this.shouldForceSelection(D))return;D.stopPropagation()}D.preventDefault(),this._dragScrollAmount=0,this._enabled&&D.shiftKey?this._onIncrementalClick(D):D.detail===1?this._onSingleClick(D):D.detail===2?this._onDoubleClick(D):D.detail===3&&this._onTripleClick(D),this._addMouseDownListeners(),this.refresh(!0)}},L.prototype._addMouseDownListeners=function(){var D=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return D._dragScroll()},50)},L.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},L.prototype._onIncrementalClick=function(D){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(D))},L.prototype._onSingleClick=function(D){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(D)?3:0,this._model.selectionStart=this._getMouseBufferCoords(D),this._model.selectionStart){this._model.selectionEnd=void 0;var R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},L.prototype._onDoubleClick=function(D){this._selectWordAtCursor(D,!0)&&(this._activeSelectionMode=1)},L.prototype._onTripleClick=function(D){var R=this._getMouseBufferCoords(D);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))},L.prototype.shouldColumnSelect=function(D){return D.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},L.prototype._onMouseMove=function(D){if(D.stopImmediatePropagation(),this._model.selectionStart){var R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(D),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(D),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var M=this._bufferService.buffer;if(this._model.selectionEnd[1]<M.lines.length){var A=M.lines.get(this._model.selectionEnd[1]);A&&A.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},L.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var D=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(D.ydisp+this._bufferService.rows,D.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=D.ydisp),this.refresh()}},L.prototype._onMouseUp=function(D){var R=D.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&D.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var M=this._mouseService.getCoords(D,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(M&&M[0]!==void 0&&M[1]!==void 0){var A=(0,_.moveToCellSequence)(M[0]-1,M[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(A,!0)}}}else this._fireEventIfSelectionChanged()},L.prototype._fireEventIfSelectionChanged=function(){var D=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,M=!(!D||!R||D[0]===R[0]&&D[1]===R[1]);M?D&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&D[0]===this._oldSelectionStart[0]&&D[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(D,R,M)):this._oldHasSelection&&this._fireOnSelectionChange(D,R,M)},L.prototype._fireOnSelectionChange=function(D,R,M){this._oldSelectionStart=D,this._oldSelectionEnd=R,this._oldHasSelection=M,this._onSelectionChange.fire()},L.prototype._onBufferActivate=function(D){var R=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=D.activeBuffer.lines.onTrim(function(M){return R._onTrim(M)})},L.prototype._convertViewportColToCharacterIndex=function(D,R){for(var M=R[0],A=0;R[0]>=A;A++){var X=D.loadCell(A,this._workCell).getChars().length;this._workCell.getWidth()===0?M--:X>1&&R[0]!==A&&(M+=X-1)}return M},L.prototype.setSelection=function(D,R,M){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[D,R],this._model.selectionStartLength=M,this.refresh()},L.prototype.rightClickSelect=function(D){this._isClickInSelection(D)||(this._selectWordAtCursor(D,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},L.prototype._getWordAt=function(D,R,M,A){if(M===void 0&&(M=!0),A===void 0&&(A=!0),!(D[0]>=this._bufferService.cols)){var X=this._bufferService.buffer,H=X.lines.get(D[1]);if(H){var O=X.translateBufferLineToString(D[1],!1),W=this._convertViewportColToCharacterIndex(H,D),V=W,G=D[0]-W,pe=0,q=0,ne=0,he=0;if(O.charAt(W)===" "){for(;W>0&&O.charAt(W-1)===" ";)W--;for(;V<O.length&&O.charAt(V+1)===" ";)V++}else{var De=D[0],j=D[0];H.getWidth(De)===0&&(pe++,De--),H.getWidth(j)===2&&(q++,j++);var ge=H.getString(j).length;for(ge>1&&(he+=ge-1,V+=ge-1);De>0&&W>0&&!this._isCharWordSeparator(H.loadCell(De-1,this._workCell));){H.loadCell(De-1,this._workCell);var J=this._workCell.getChars().length;this._workCell.getWidth()===0?(pe++,De--):J>1&&(ne+=J-1,W-=J-1),W--,De--}for(;j<H.length&&V+1<O.length&&!this._isCharWordSeparator(H.loadCell(j+1,this._workCell));){H.loadCell(j+1,this._workCell);var oe=this._workCell.getChars().length;this._workCell.getWidth()===2?(q++,j++):oe>1&&(he+=oe-1,V+=oe-1),V++,j++}}V++;var te=W+G-pe+ne,lt=Math.min(this._bufferService.cols,V-W+pe+q-ne-he);if(R||O.slice(W,V).trim()!==""){if(M&&te===0&&H.getCodePoint(0)!==32){var ve=X.lines.get(D[1]-1);if(ve&&H.isWrapped&&ve.getCodePoint(this._bufferService.cols-1)!==32){var ke=this._getWordAt([this._bufferService.cols-1,D[1]-1],!1,!0,!1);if(ke){var Se=this._bufferService.cols-ke.start;te-=Se,lt+=Se}}}if(A&&te+lt===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){var Me=X.lines.get(D[1]+1);if((Me==null?void 0:Me.isWrapped)&&Me.getCodePoint(0)!==32){var Pe=this._getWordAt([0,D[1]+1],!1,!1,!0);Pe&&(lt+=Pe.length)}}return{start:te,length:lt}}}}},L.prototype._selectWordAt=function(D,R){var M=this._getWordAt(D,R);if(M){for(;M.start<0;)M.start+=this._bufferService.cols,D[1]--;this._model.selectionStart=[M.start,D[1]],this._model.selectionStartLength=M.length}},L.prototype._selectToWordAt=function(D){var R=this._getWordAt(D,!0);if(R){for(var M=D[1];R.start<0;)R.start+=this._bufferService.cols,M--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,M++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,M]}},L.prototype._isCharWordSeparator=function(D){return D.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(D.getChars())>=0},L.prototype._selectLineAt=function(D){var R=this._bufferService.buffer.getWrappedRangeForLine(D);this._model.selectionStart=[0,R.first],this._model.selectionEnd=[this._bufferService.cols,R.last],this._model.selectionStartLength=0},c([u(3,m.IBufferService),u(4,m.ICoreService),u(5,v.IMouseService),u(6,m.IOptionsService),u(7,v.IRenderService)],L)}(b.Disposable);o.SelectionService=x},4725:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.ICharacterJoinerService=o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var a=s(8343);o.ICharSizeService=(0,a.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,a.createDecorator)("CoreBrowserService"),o.IMouseService=(0,a.createDecorator)("MouseService"),o.IRenderService=(0,a.createDecorator)("RenderService"),o.ISelectionService=(0,a.createDecorator)("SelectionService"),o.ISoundService=(0,a.createDecorator)("SoundService"),o.ICharacterJoinerService=(0,a.createDecorator)("CharacterJoinerService"),o.IDecorationService=(0,a.createDecorator)("DecorationService")},357:function(r,o,s){var a=this&&this.__decorate||function(d,f,h,g){var v,m=arguments.length,p=m<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,h):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(d,f,h,g);else for(var _=d.length-1;_>=0;_--)(v=d[_])&&(p=(m<3?v(p):m>3?v(f,h,p):v(f,h))||p);return m>3&&p&&Object.defineProperty(f,h,p),p},l=this&&this.__param||function(d,f){return function(h,g){f(h,g,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var c=s(2585),u=function(){function d(f){this._optionsService=f}return Object.defineProperty(d,"audioContext",{get:function(){if(!d._audioContext){var f=window.AudioContext||window.webkitAudioContext;if(!f)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;d._audioContext=new f}return d._audioContext},enumerable:!1,configurable:!0}),d.prototype.playBellSound=function(){var f=d.audioContext;if(f){var h=f.createBufferSource();f.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(g){h.buffer=g,h.connect(f.destination),h.start(0)})}},d.prototype._base64ToArrayBuffer=function(f){for(var h=window.atob(f),g=h.length,v=new Uint8Array(g),m=0;m<g;m++)v[m]=h.charCodeAt(m);return v.buffer},d.prototype._removeMimeType=function(f){return f.split(",")[1]},d=a([l(0,c.IOptionsService)],d)}();o.SoundService=u},6349:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var a=s(8460),l=function(){function c(u){this._maxLength=u,this.onDeleteEmitter=new a.EventEmitter,this.onInsertEmitter=new a.EventEmitter,this.onTrimEmitter=new a.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(c.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"maxLength",{get:function(){return this._maxLength},set:function(u){if(this._maxLength!==u){for(var d=new Array(u),f=0;f<Math.min(u,this.length);f++)d[f]=this._array[this._getCyclicIndex(f)];this._array=d,this._maxLength=u,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){return this._length},set:function(u){if(u>this._length)for(var d=this._length;d<u;d++)this._array[d]=void 0;this._length=u},enumerable:!1,configurable:!0}),c.prototype.get=function(u){return this._array[this._getCyclicIndex(u)]},c.prototype.set=function(u,d){this._array[this._getCyclicIndex(u)]=d},c.prototype.push=function(u){this._array[this._getCyclicIndex(this._length)]=u,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},c.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(c.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),c.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},c.prototype.splice=function(u,d){for(var f=[],h=2;h<arguments.length;h++)f[h-2]=arguments[h];if(d){for(var g=u;g<this._length-d;g++)this._array[this._getCyclicIndex(g)]=this._array[this._getCyclicIndex(g+d)];this._length-=d,this.onDeleteEmitter.fire({index:u,amount:d})}for(g=this._length-1;g>=u;g--)this._array[this._getCyclicIndex(g+f.length)]=this._array[this._getCyclicIndex(g)];for(g=0;g<f.length;g++)this._array[this._getCyclicIndex(u+g)]=f[g];if(f.length&&this.onInsertEmitter.fire({index:u,amount:f.length}),this._length+f.length>this._maxLength){var v=this._length+f.length-this._maxLength;this._startIndex+=v,this._length=this._maxLength,this.onTrimEmitter.fire(v)}else this._length+=f.length},c.prototype.trimStart=function(u){u>this._length&&(u=this._length),this._startIndex+=u,this._length-=u,this.onTrimEmitter.fire(u)},c.prototype.shiftElements=function(u,d,f){if(!(d<=0)){if(u<0||u>=this._length)throw new Error("start argument out of range");if(u+f<0)throw new Error("Cannot shift elements in list beyond index 0");if(f>0){for(var h=d-1;h>=0;h--)this.set(u+h+f,this.get(u+h));var g=u+d+f-this._length;if(g>0)for(this._length+=g;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(h=0;h<d;h++)this.set(u+h+f,this.get(u+h))}},c.prototype._getCyclicIndex=function(u){return(this._startIndex+u)%this._maxLength},c}();o.CircularList=l},1439:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function s(a,l){if(l===void 0&&(l=5),typeof a!="object")return a;var c=Array.isArray(a)?[]:{};for(var u in a)c[u]=l<=1?a[u]:a[u]&&s(a[u],l-1);return c}},8969:function(r,o,s){var a,l=this&&this.__extends||(a=function(D,R){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,A){M.__proto__=A}||function(M,A){for(var X in A)Object.prototype.hasOwnProperty.call(A,X)&&(M[X]=A[X])},a(D,R)},function(D,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function M(){this.constructor=D}a(D,R),D.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M)});Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var c=s(844),u=s(2585),d=s(4348),f=s(7866),h=s(744),g=s(7302),v=s(6975),m=s(8460),p=s(1753),_=s(3730),b=s(1480),y=s(7994),w=s(9282),k=s(5435),x=s(5981),T=!1,L=function(D){function R(M){var A=D.call(this)||this;return A._onBinary=new m.EventEmitter,A._onData=new m.EventEmitter,A._onLineFeed=new m.EventEmitter,A._onResize=new m.EventEmitter,A._onScroll=new m.EventEmitter,A._instantiationService=new d.InstantiationService,A.optionsService=new g.OptionsService(M),A._instantiationService.setService(u.IOptionsService,A.optionsService),A._bufferService=A.register(A._instantiationService.createInstance(h.BufferService)),A._instantiationService.setService(u.IBufferService,A._bufferService),A._logService=A._instantiationService.createInstance(f.LogService),A._instantiationService.setService(u.ILogService,A._logService),A.coreService=A.register(A._instantiationService.createInstance(v.CoreService,function(){return A.scrollToBottom()})),A._instantiationService.setService(u.ICoreService,A.coreService),A.coreMouseService=A._instantiationService.createInstance(p.CoreMouseService),A._instantiationService.setService(u.ICoreMouseService,A.coreMouseService),A._dirtyRowService=A._instantiationService.createInstance(_.DirtyRowService),A._instantiationService.setService(u.IDirtyRowService,A._dirtyRowService),A.unicodeService=A._instantiationService.createInstance(b.UnicodeService),A._instantiationService.setService(u.IUnicodeService,A.unicodeService),A._charsetService=A._instantiationService.createInstance(y.CharsetService),A._instantiationService.setService(u.ICharsetService,A._charsetService),A._inputHandler=new k.InputHandler(A._bufferService,A._charsetService,A.coreService,A._dirtyRowService,A._logService,A.optionsService,A.coreMouseService,A.unicodeService),A.register((0,m.forwardEvent)(A._inputHandler.onLineFeed,A._onLineFeed)),A.register(A._inputHandler),A.register((0,m.forwardEvent)(A._bufferService.onResize,A._onResize)),A.register((0,m.forwardEvent)(A.coreService.onData,A._onData)),A.register((0,m.forwardEvent)(A.coreService.onBinary,A._onBinary)),A.register(A.optionsService.onOptionChange(function(X){return A._updateOptions(X)})),A.register(A._bufferService.onScroll(function(X){A._onScroll.fire({position:A._bufferService.buffer.ydisp,source:0}),A._dirtyRowService.markRangeDirty(A._bufferService.buffer.scrollTop,A._bufferService.buffer.scrollBottom)})),A.register(A._inputHandler.onScroll(function(X){A._onScroll.fire({position:A._bufferService.buffer.ydisp,source:0}),A._dirtyRowService.markRangeDirty(A._bufferService.buffer.scrollTop,A._bufferService.buffer.scrollBottom)})),A._writeBuffer=new x.WriteBuffer(function(X,H){return A._inputHandler.parse(X,H)}),A}return l(R,D),Object.defineProperty(R.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onScroll",{get:function(){var M=this;return this._onScrollApi||(this._onScrollApi=new m.EventEmitter,this.register(this._onScroll.event(function(A){var X;(X=M._onScrollApi)===null||X===void 0||X.fire(A.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"options",{get:function(){return this.optionsService.options},set:function(M){for(var A in M)this.optionsService.options[A]=M[A]},enumerable:!1,configurable:!0}),R.prototype.dispose=function(){var M;this._isDisposed||(D.prototype.dispose.call(this),(M=this._windowsMode)===null||M===void 0||M.dispose(),this._windowsMode=void 0)},R.prototype.write=function(M,A){this._writeBuffer.write(M,A)},R.prototype.writeSync=function(M,A){this._logService.logLevel<=u.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(M,A)},R.prototype.resize=function(M,A){isNaN(M)||isNaN(A)||(M=Math.max(M,h.MINIMUM_COLS),A=Math.max(A,h.MINIMUM_ROWS),this._bufferService.resize(M,A))},R.prototype.scroll=function(M,A){A===void 0&&(A=!1),this._bufferService.scroll(M,A)},R.prototype.scrollLines=function(M,A,X){this._bufferService.scrollLines(M,A,X)},R.prototype.scrollPages=function(M){this._bufferService.scrollPages(M)},R.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},R.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},R.prototype.scrollToLine=function(M){this._bufferService.scrollToLine(M)},R.prototype.registerEscHandler=function(M,A){return this._inputHandler.registerEscHandler(M,A)},R.prototype.registerDcsHandler=function(M,A){return this._inputHandler.registerDcsHandler(M,A)},R.prototype.registerCsiHandler=function(M,A){return this._inputHandler.registerCsiHandler(M,A)},R.prototype.registerOscHandler=function(M,A){return this._inputHandler.registerOscHandler(M,A)},R.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},R.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},R.prototype._updateOptions=function(M){var A;switch(M){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((A=this._windowsMode)===null||A===void 0||A.dispose(),this._windowsMode=void 0)}},R.prototype._enableWindowsMode=function(){var M=this;if(!this._windowsMode){var A=[];A.push(this.onLineFeed(w.updateWindowsModeWrappedState.bind(null,this._bufferService))),A.push(this.registerCsiHandler({final:"H"},function(){return(0,w.updateWindowsModeWrappedState)(M._bufferService),!1})),this._windowsMode={dispose:function(){for(var X=0,H=A;X<H.length;X++)H[X].dispose()}}}},R}(c.Disposable);o.CoreTerminal=L},8460:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var s=function(){function a(){this._listeners=[],this._disposed=!1}return Object.defineProperty(a.prototype,"event",{get:function(){var l=this;return this._event||(this._event=function(c){return l._listeners.push(c),{dispose:function(){if(!l._disposed){for(var u=0;u<l._listeners.length;u++)if(l._listeners[u]===c)return void l._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),a.prototype.fire=function(l,c){for(var u=[],d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(d=0;d<u.length;d++)u[d].call(void 0,l,c)},a.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},a}();o.EventEmitter=s,o.forwardEvent=function(a,l){return a(function(c){return l.fire(c)})}},5435:function(r,o,s){var a,l=this&&this.__extends||(a=function(X,H){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,W){O.__proto__=W}||function(O,W){for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(O[V]=W[V])},a(X,H)},function(X,H){if(typeof H!="function"&&H!==null)throw new TypeError("Class extends value "+String(H)+" is not a constructor or null");function O(){this.constructor=X}a(X,H),X.prototype=H===null?Object.create(H):(O.prototype=H.prototype,new O)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var c,u=s(2584),d=s(7116),f=s(2015),h=s(844),g=s(8273),v=s(482),m=s(8437),p=s(8460),_=s(643),b=s(511),y=s(3734),w=s(2585),k=s(6242),x=s(6351),T=s(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},D=131072;function R(X,H){if(X>24)return H.setWinLines||!1;switch(X){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}(function(X){X[X.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",X[X.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(c=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var M=function(){function X(H,O,W,V){this._bufferService=H,this._coreService=O,this._logService=W,this._optionsService=V,this._data=new Uint32Array(0)}return X.prototype.hook=function(H){this._data=new Uint32Array(0)},X.prototype.put=function(H,O,W){this._data=(0,g.concat)(this._data,H.subarray(O,W))},X.prototype.unhook=function(H){if(!H)return this._data=new Uint32Array(0),!0;var O=(0,v.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),O){case'"q':this._coreService.triggerDataEvent(u.C0.ESC+'P1$r0"q'+u.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(u.C0.ESC+'P1$r61;1"p'+u.C0.ESC+"\\");break;case"r":var W=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+W+u.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(u.C0.ESC+"P1$r0m"+u.C0.ESC+"\\");break;case" q":var V={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];V-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(u.C0.ESC+"P1$r"+V+" q"+u.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",O),this._coreService.triggerDataEvent(u.C0.ESC+"P0$r"+u.C0.ESC+"\\")}return!0},X}(),A=function(X){function H(O,W,V,G,pe,q,ne,he,De){De===void 0&&(De=new f.EscapeSequenceParser);var j=X.call(this)||this;j._bufferService=O,j._charsetService=W,j._coreService=V,j._dirtyRowService=G,j._logService=pe,j._optionsService=q,j._coreMouseService=ne,j._unicodeService=he,j._parser=De,j._parseBuffer=new Uint32Array(4096),j._stringDecoder=new v.StringToUtf32,j._utf8Decoder=new v.Utf8ToUtf32,j._workCell=new b.CellData,j._windowTitle="",j._iconName="",j._windowTitleStack=[],j._iconNameStack=[],j._curAttrData=m.DEFAULT_ATTR_DATA.clone(),j._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone(),j._onRequestBell=new p.EventEmitter,j._onRequestRefreshRows=new p.EventEmitter,j._onRequestReset=new p.EventEmitter,j._onRequestSendFocus=new p.EventEmitter,j._onRequestSyncScrollBar=new p.EventEmitter,j._onRequestWindowsOptionsReport=new p.EventEmitter,j._onA11yChar=new p.EventEmitter,j._onA11yTab=new p.EventEmitter,j._onCursorMove=new p.EventEmitter,j._onLineFeed=new p.EventEmitter,j._onScroll=new p.EventEmitter,j._onTitleChange=new p.EventEmitter,j._onColor=new p.EventEmitter,j._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},j._specialColors=[256,257,258],j.register(j._parser),j._activeBuffer=j._bufferService.buffer,j.register(j._bufferService.buffers.onBufferActivate(function(te){return j._activeBuffer=te.activeBuffer})),j._parser.setCsiHandlerFallback(function(te,lt){j._logService.debug("Unknown CSI code: ",{identifier:j._parser.identToString(te),params:lt.toArray()})}),j._parser.setEscHandlerFallback(function(te){j._logService.debug("Unknown ESC code: ",{identifier:j._parser.identToString(te)})}),j._parser.setExecuteHandlerFallback(function(te){j._logService.debug("Unknown EXECUTE code: ",{code:te})}),j._parser.setOscHandlerFallback(function(te,lt,ve){j._logService.debug("Unknown OSC code: ",{identifier:te,action:lt,data:ve})}),j._parser.setDcsHandlerFallback(function(te,lt,ve){lt==="HOOK"&&(ve=ve.toArray()),j._logService.debug("Unknown DCS code: ",{identifier:j._parser.identToString(te),action:lt,payload:ve})}),j._parser.setPrintHandler(function(te,lt,ve){return j.print(te,lt,ve)}),j._parser.registerCsiHandler({final:"@"},function(te){return j.insertChars(te)}),j._parser.registerCsiHandler({intermediates:" ",final:"@"},function(te){return j.scrollLeft(te)}),j._parser.registerCsiHandler({final:"A"},function(te){return j.cursorUp(te)}),j._parser.registerCsiHandler({intermediates:" ",final:"A"},function(te){return j.scrollRight(te)}),j._parser.registerCsiHandler({final:"B"},function(te){return j.cursorDown(te)}),j._parser.registerCsiHandler({final:"C"},function(te){return j.cursorForward(te)}),j._parser.registerCsiHandler({final:"D"},function(te){return j.cursorBackward(te)}),j._parser.registerCsiHandler({final:"E"},function(te){return j.cursorNextLine(te)}),j._parser.registerCsiHandler({final:"F"},function(te){return j.cursorPrecedingLine(te)}),j._parser.registerCsiHandler({final:"G"},function(te){return j.cursorCharAbsolute(te)}),j._parser.registerCsiHandler({final:"H"},function(te){return j.cursorPosition(te)}),j._parser.registerCsiHandler({final:"I"},function(te){return j.cursorForwardTab(te)}),j._parser.registerCsiHandler({final:"J"},function(te){return j.eraseInDisplay(te)}),j._parser.registerCsiHandler({prefix:"?",final:"J"},function(te){return j.eraseInDisplay(te)}),j._parser.registerCsiHandler({final:"K"},function(te){return j.eraseInLine(te)}),j._parser.registerCsiHandler({prefix:"?",final:"K"},function(te){return j.eraseInLine(te)}),j._parser.registerCsiHandler({final:"L"},function(te){return j.insertLines(te)}),j._parser.registerCsiHandler({final:"M"},function(te){return j.deleteLines(te)}),j._parser.registerCsiHandler({final:"P"},function(te){return j.deleteChars(te)}),j._parser.registerCsiHandler({final:"S"},function(te){return j.scrollUp(te)}),j._parser.registerCsiHandler({final:"T"},function(te){return j.scrollDown(te)}),j._parser.registerCsiHandler({final:"X"},function(te){return j.eraseChars(te)}),j._parser.registerCsiHandler({final:"Z"},function(te){return j.cursorBackwardTab(te)}),j._parser.registerCsiHandler({final:"`"},function(te){return j.charPosAbsolute(te)}),j._parser.registerCsiHandler({final:"a"},function(te){return j.hPositionRelative(te)}),j._parser.registerCsiHandler({final:"b"},function(te){return j.repeatPrecedingCharacter(te)}),j._parser.registerCsiHandler({final:"c"},function(te){return j.sendDeviceAttributesPrimary(te)}),j._parser.registerCsiHandler({prefix:">",final:"c"},function(te){return j.sendDeviceAttributesSecondary(te)}),j._parser.registerCsiHandler({final:"d"},function(te){return j.linePosAbsolute(te)}),j._parser.registerCsiHandler({final:"e"},function(te){return j.vPositionRelative(te)}),j._parser.registerCsiHandler({final:"f"},function(te){return j.hVPosition(te)}),j._parser.registerCsiHandler({final:"g"},function(te){return j.tabClear(te)}),j._parser.registerCsiHandler({final:"h"},function(te){return j.setMode(te)}),j._parser.registerCsiHandler({prefix:"?",final:"h"},function(te){return j.setModePrivate(te)}),j._parser.registerCsiHandler({final:"l"},function(te){return j.resetMode(te)}),j._parser.registerCsiHandler({prefix:"?",final:"l"},function(te){return j.resetModePrivate(te)}),j._parser.registerCsiHandler({final:"m"},function(te){return j.charAttributes(te)}),j._parser.registerCsiHandler({final:"n"},function(te){return j.deviceStatus(te)}),j._parser.registerCsiHandler({prefix:"?",final:"n"},function(te){return j.deviceStatusPrivate(te)}),j._parser.registerCsiHandler({intermediates:"!",final:"p"},function(te){return j.softReset(te)}),j._parser.registerCsiHandler({intermediates:" ",final:"q"},function(te){return j.setCursorStyle(te)}),j._parser.registerCsiHandler({final:"r"},function(te){return j.setScrollRegion(te)}),j._parser.registerCsiHandler({final:"s"},function(te){return j.saveCursor(te)}),j._parser.registerCsiHandler({final:"t"},function(te){return j.windowOptions(te)}),j._parser.registerCsiHandler({final:"u"},function(te){return j.restoreCursor(te)}),j._parser.registerCsiHandler({intermediates:"'",final:"}"},function(te){return j.insertColumns(te)}),j._parser.registerCsiHandler({intermediates:"'",final:"~"},function(te){return j.deleteColumns(te)}),j._parser.setExecuteHandler(u.C0.BEL,function(){return j.bell()}),j._parser.setExecuteHandler(u.C0.LF,function(){return j.lineFeed()}),j._parser.setExecuteHandler(u.C0.VT,function(){return j.lineFeed()}),j._parser.setExecuteHandler(u.C0.FF,function(){return j.lineFeed()}),j._parser.setExecuteHandler(u.C0.CR,function(){return j.carriageReturn()}),j._parser.setExecuteHandler(u.C0.BS,function(){return j.backspace()}),j._parser.setExecuteHandler(u.C0.HT,function(){return j.tab()}),j._parser.setExecuteHandler(u.C0.SO,function(){return j.shiftOut()}),j._parser.setExecuteHandler(u.C0.SI,function(){return j.shiftIn()}),j._parser.setExecuteHandler(u.C1.IND,function(){return j.index()}),j._parser.setExecuteHandler(u.C1.NEL,function(){return j.nextLine()}),j._parser.setExecuteHandler(u.C1.HTS,function(){return j.tabSet()}),j._parser.registerOscHandler(0,new k.OscHandler(function(te){return j.setTitle(te),j.setIconName(te),!0})),j._parser.registerOscHandler(1,new k.OscHandler(function(te){return j.setIconName(te)})),j._parser.registerOscHandler(2,new k.OscHandler(function(te){return j.setTitle(te)})),j._parser.registerOscHandler(4,new k.OscHandler(function(te){return j.setOrReportIndexedColor(te)})),j._parser.registerOscHandler(10,new k.OscHandler(function(te){return j.setOrReportFgColor(te)})),j._parser.registerOscHandler(11,new k.OscHandler(function(te){return j.setOrReportBgColor(te)})),j._parser.registerOscHandler(12,new k.OscHandler(function(te){return j.setOrReportCursorColor(te)})),j._parser.registerOscHandler(104,new k.OscHandler(function(te){return j.restoreIndexedColor(te)})),j._parser.registerOscHandler(110,new k.OscHandler(function(te){return j.restoreFgColor(te)})),j._parser.registerOscHandler(111,new k.OscHandler(function(te){return j.restoreBgColor(te)})),j._parser.registerOscHandler(112,new k.OscHandler(function(te){return j.restoreCursorColor(te)})),j._parser.registerEscHandler({final:"7"},function(){return j.saveCursor()}),j._parser.registerEscHandler({final:"8"},function(){return j.restoreCursor()}),j._parser.registerEscHandler({final:"D"},function(){return j.index()}),j._parser.registerEscHandler({final:"E"},function(){return j.nextLine()}),j._parser.registerEscHandler({final:"H"},function(){return j.tabSet()}),j._parser.registerEscHandler({final:"M"},function(){return j.reverseIndex()}),j._parser.registerEscHandler({final:"="},function(){return j.keypadApplicationMode()}),j._parser.registerEscHandler({final:">"},function(){return j.keypadNumericMode()}),j._parser.registerEscHandler({final:"c"},function(){return j.fullReset()}),j._parser.registerEscHandler({final:"n"},function(){return j.setgLevel(2)}),j._parser.registerEscHandler({final:"o"},function(){return j.setgLevel(3)}),j._parser.registerEscHandler({final:"|"},function(){return j.setgLevel(3)}),j._parser.registerEscHandler({final:"}"},function(){return j.setgLevel(2)}),j._parser.registerEscHandler({final:"~"},function(){return j.setgLevel(1)}),j._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return j.selectDefaultCharset()}),j._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return j.selectDefaultCharset()});var ge=function(te){J._parser.registerEscHandler({intermediates:"(",final:te},function(){return j.selectCharset("("+te)}),J._parser.registerEscHandler({intermediates:")",final:te},function(){return j.selectCharset(")"+te)}),J._parser.registerEscHandler({intermediates:"*",final:te},function(){return j.selectCharset("*"+te)}),J._parser.registerEscHandler({intermediates:"+",final:te},function(){return j.selectCharset("+"+te)}),J._parser.registerEscHandler({intermediates:"-",final:te},function(){return j.selectCharset("-"+te)}),J._parser.registerEscHandler({intermediates:".",final:te},function(){return j.selectCharset("."+te)}),J._parser.registerEscHandler({intermediates:"/",final:te},function(){return j.selectCharset("/"+te)})},J=this;for(var oe in d.CHARSETS)ge(oe);return j._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return j.screenAlignmentPattern()}),j._parser.setErrorHandler(function(te){return j._logService.error("Parsing error: ",te),te}),j._parser.registerDcsHandler({intermediates:"$",final:"q"},new M(j._bufferService,j._coreService,j._logService,j._optionsService)),j}return l(H,X),Object.defineProperty(H.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),H.prototype.dispose=function(){X.prototype.dispose.call(this)},H.prototype._preserveStack=function(O,W,V,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=O,this._parseStack.cursorStartY=W,this._parseStack.decodedLength=V,this._parseStack.position=G},H.prototype._logSlowResolvingAsync=function(O){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([O,new Promise(function(W,V){return setTimeout(function(){return V("#SLOW_TIMEOUT")},5e3)})]).catch(function(W){if(W!=="#SLOW_TIMEOUT")throw W;console.warn("async parser handler taking longer than 5000 ms")})},H.prototype.parse=function(O,W){var V,G=this._activeBuffer.x,pe=this._activeBuffer.y,q=0,ne=this._parseStack.paused;if(ne){if(V=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,W))return this._logSlowResolvingAsync(V),V;G=this._parseStack.cursorStartX,pe=this._parseStack.cursorStartY,this._parseStack.paused=!1,O.length>D&&(q=this._parseStack.position+D)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof O=="string"?' "'+O+'"':' "'+Array.prototype.map.call(O,function(ge){return String.fromCharCode(ge)}).join("")+'"'),typeof O=="string"?O.split("").map(function(ge){return ge.charCodeAt(0)}):O),this._parseBuffer.length<O.length&&this._parseBuffer.length<D&&(this._parseBuffer=new Uint32Array(Math.min(O.length,D))),ne||this._dirtyRowService.clearRange(),O.length>D)for(var he=q;he<O.length;he+=D){var De=he+D<O.length?he+D:O.length,j=typeof O=="string"?this._stringDecoder.decode(O.substring(he,De),this._parseBuffer):this._utf8Decoder.decode(O.subarray(he,De),this._parseBuffer);if(V=this._parser.parse(this._parseBuffer,j))return this._preserveStack(G,pe,j,he),this._logSlowResolvingAsync(V),V}else if(!ne&&(j=typeof O=="string"?this._stringDecoder.decode(O,this._parseBuffer):this._utf8Decoder.decode(O,this._parseBuffer),V=this._parser.parse(this._parseBuffer,j)))return this._preserveStack(G,pe,j,0),this._logSlowResolvingAsync(V),V;this._activeBuffer.x===G&&this._activeBuffer.y===pe||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},H.prototype.print=function(O,W,V){var G,pe,q=this._charsetService.charset,ne=this._optionsService.rawOptions.screenReaderMode,he=this._bufferService.cols,De=this._coreService.decPrivateModes.wraparound,j=this._coreService.modes.insertMode,ge=this._curAttrData,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&V-W>0&&J.getWidth(this._activeBuffer.x-1)===2&&J.setCellFromCodePoint(this._activeBuffer.x-1,0,1,ge.fg,ge.bg,ge.extended);for(var oe=W;oe<V;++oe){if(G=O[oe],pe=this._unicodeService.wcwidth(G),G<127&&q){var te=q[String.fromCharCode(G)];te&&(G=te.charCodeAt(0))}if(ne&&this._onA11yChar.fire((0,v.stringFromCodePoint)(G)),pe||!this._activeBuffer.x){if(this._activeBuffer.x+pe-1>=he){if(De){for(;this._activeBuffer.x<he;)J.setCellFromCodePoint(this._activeBuffer.x++,0,1,ge.fg,ge.bg,ge.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=he-1,pe===2)continue}if(j&&(J.insertCells(this._activeBuffer.x,pe,this._activeBuffer.getNullCell(ge),ge),J.getWidth(he-1)===2&&J.setCellFromCodePoint(he-1,_.NULL_CELL_CODE,_.NULL_CELL_WIDTH,ge.fg,ge.bg,ge.extended)),J.setCellFromCodePoint(this._activeBuffer.x++,G,pe,ge.fg,ge.bg,ge.extended),pe>0)for(;--pe;)J.setCellFromCodePoint(this._activeBuffer.x++,0,0,ge.fg,ge.bg,ge.extended)}else J.getWidth(this._activeBuffer.x-1)?J.addCodepointToCell(this._activeBuffer.x-1,G):J.addCodepointToCell(this._activeBuffer.x-2,G)}V-W>0&&(J.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<he&&V-W>0&&J.getWidth(this._activeBuffer.x)===0&&!J.hasContent(this._activeBuffer.x)&&J.setCellFromCodePoint(this._activeBuffer.x,0,1,ge.fg,ge.bg,ge.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},H.prototype.registerCsiHandler=function(O,W){var V=this;return O.final!=="t"||O.prefix||O.intermediates?this._parser.registerCsiHandler(O,W):this._parser.registerCsiHandler(O,function(G){return!R(G.params[0],V._optionsService.rawOptions.windowOptions)||W(G)})},H.prototype.registerDcsHandler=function(O,W){return this._parser.registerDcsHandler(O,new x.DcsHandler(W))},H.prototype.registerEscHandler=function(O,W){return this._parser.registerEscHandler(O,W)},H.prototype.registerOscHandler=function(O,W){return this._parser.registerOscHandler(O,new k.OscHandler(W))},H.prototype.bell=function(){return this._onRequestBell.fire(),!0},H.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},H.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},H.prototype.backspace=function(){var O;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||O===void 0?void 0:O.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);W.hasWidth(this._activeBuffer.x)&&!W.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},H.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var O=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-O),!0},H.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},H.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},H.prototype._restrictCursor=function(O){O===void 0&&(O=this._bufferService.cols-1),this._activeBuffer.x=Math.min(O,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},H.prototype._setCursor=function(O,W){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=O,this._activeBuffer.y=this._activeBuffer.scrollTop+W):(this._activeBuffer.x=O,this._activeBuffer.y=W),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},H.prototype._moveCursor=function(O,W){this._restrictCursor(),this._setCursor(this._activeBuffer.x+O,this._activeBuffer.y+W)},H.prototype.cursorUp=function(O){var W=this._activeBuffer.y-this._activeBuffer.scrollTop;return W>=0?this._moveCursor(0,-Math.min(W,O.params[0]||1)):this._moveCursor(0,-(O.params[0]||1)),!0},H.prototype.cursorDown=function(O){var W=this._activeBuffer.scrollBottom-this._activeBuffer.y;return W>=0?this._moveCursor(0,Math.min(W,O.params[0]||1)):this._moveCursor(0,O.params[0]||1),!0},H.prototype.cursorForward=function(O){return this._moveCursor(O.params[0]||1,0),!0},H.prototype.cursorBackward=function(O){return this._moveCursor(-(O.params[0]||1),0),!0},H.prototype.cursorNextLine=function(O){return this.cursorDown(O),this._activeBuffer.x=0,!0},H.prototype.cursorPrecedingLine=function(O){return this.cursorUp(O),this._activeBuffer.x=0,!0},H.prototype.cursorCharAbsolute=function(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0},H.prototype.cursorPosition=function(O){return this._setCursor(O.length>=2?(O.params[1]||1)-1:0,(O.params[0]||1)-1),!0},H.prototype.charPosAbsolute=function(O){return this._setCursor((O.params[0]||1)-1,this._activeBuffer.y),!0},H.prototype.hPositionRelative=function(O){return this._moveCursor(O.params[0]||1,0),!0},H.prototype.linePosAbsolute=function(O){return this._setCursor(this._activeBuffer.x,(O.params[0]||1)-1),!0},H.prototype.vPositionRelative=function(O){return this._moveCursor(0,O.params[0]||1),!0},H.prototype.hVPosition=function(O){return this.cursorPosition(O),!0},H.prototype.tabClear=function(O){var W=O.params[0];return W===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:W===3&&(this._activeBuffer.tabs={}),!0},H.prototype.cursorForwardTab=function(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var W=O.params[0]||1;W--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},H.prototype.cursorBackwardTab=function(O){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var W=O.params[0]||1;W--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},H.prototype._eraseInBufferLine=function(O,W,V,G){G===void 0&&(G=!1);var pe=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);pe.replaceCells(W,V,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),G&&(pe.isWrapped=!1)},H.prototype._resetBufferLine=function(O){var W=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);W.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+O),W.isWrapped=!1},H.prototype.eraseInDisplay=function(O){var W;switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:for(W=this._activeBuffer.y,this._dirtyRowService.markDirty(W),this._eraseInBufferLine(W++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);W<this._bufferService.rows;W++)this._resetBufferLine(W);this._dirtyRowService.markDirty(W);break;case 1:for(W=this._activeBuffer.y,this._dirtyRowService.markDirty(W),this._eraseInBufferLine(W,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(W+1).isWrapped=!1);W--;)this._resetBufferLine(W);this._dirtyRowService.markDirty(0);break;case 2:for(W=this._bufferService.rows,this._dirtyRowService.markDirty(W-1);W--;)this._resetBufferLine(W);this._dirtyRowService.markDirty(0);break;case 3:var V=this._activeBuffer.lines.length-this._bufferService.rows;V>0&&(this._activeBuffer.lines.trimStart(V),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-V,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-V,0),this._onScroll.fire(0))}return!0},H.prototype.eraseInLine=function(O){switch(this._restrictCursor(this._bufferService.cols),O.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},H.prototype.insertLines=function(O){this._restrictCursor();var W=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var V=this._activeBuffer.ybase+this._activeBuffer.y,G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,pe=this._bufferService.rows-1+this._activeBuffer.ybase-G+1;W--;)this._activeBuffer.lines.splice(pe-1,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},H.prototype.deleteLines=function(O){this._restrictCursor();var W=O.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var V,G=this._activeBuffer.ybase+this._activeBuffer.y;for(V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-V;W--;)this._activeBuffer.lines.splice(G,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},H.prototype.insertChars=function(O){this._restrictCursor();var W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.insertCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},H.prototype.deleteChars=function(O){this._restrictCursor();var W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.deleteCells(this._activeBuffer.x,O.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},H.prototype.scrollUp=function(O){for(var W=O.params[0]||1;W--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.scrollDown=function(O){for(var W=O.params[0]||1;W--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(m.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.scrollLeft=function(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var W=O.params[0]||1,V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.deleteCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),G.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.scrollRight=function(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var W=O.params[0]||1,V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.insertCells(0,W,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),G.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.insertColumns=function(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var W=O.params[0]||1,V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.insertCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),G.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.deleteColumns=function(O){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var W=O.params[0]||1,V=this._activeBuffer.scrollTop;V<=this._activeBuffer.scrollBottom;++V){var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+V);G.deleteCells(this._activeBuffer.x,W,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),G.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},H.prototype.eraseChars=function(O){this._restrictCursor();var W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return W&&(W.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(O.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},H.prototype.repeatPrecedingCharacter=function(O){if(!this._parser.precedingCodepoint)return!0;for(var W=O.params[0]||1,V=new Uint32Array(W),G=0;G<W;++G)V[G]=this._parser.precedingCodepoint;return this.print(V,0,V.length),!0},H.prototype.sendDeviceAttributesPrimary=function(O){return O.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0},H.prototype.sendDeviceAttributesSecondary=function(O){return O.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(O.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0},H.prototype._is=function(O){return(this._optionsService.rawOptions.termName+"").indexOf(O)===0},H.prototype.setMode=function(O){for(var W=0;W<O.length;W++)O.params[W]===4&&(this._coreService.modes.insertMode=!0);return!0},H.prototype.setModePrivate=function(O){for(var W=0;W<O.length;W++)switch(O.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,d.DEFAULT_CHARSET),this._charsetService.setgCharset(1,d.DEFAULT_CHARSET),this._charsetService.setgCharset(2,d.DEFAULT_CHARSET),this._charsetService.setgCharset(3,d.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},H.prototype.resetMode=function(O){for(var W=0;W<O.length;W++)O.params[W]===4&&(this._coreService.modes.insertMode=!1);return!0},H.prototype.resetModePrivate=function(O){for(var W=0;W<O.length;W++)switch(O.params[W]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),O.params[W]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},H.prototype._updateAttrColor=function(O,W,V,G,pe){return W===2?(O|=50331648,O&=-16777216,O|=y.AttributeData.fromColorRGB([V,G,pe])):W===5&&(O&=-50331904,O|=33554432|255&V),O},H.prototype._extractColor=function(O,W,V){var G=[0,0,-1,0,0,0],pe=0,q=0;do{if(G[q+pe]=O.params[W+q],O.hasSubParams(W+q)){var ne=O.getSubParams(W+q),he=0;do G[1]===5&&(pe=1),G[q+he+1+pe]=ne[he];while(++he<ne.length&&he+q+1+pe<G.length);break}if(G[1]===5&&q+pe>=2||G[1]===2&&q+pe>=5)break;G[1]&&(pe=1)}while(++q+W<O.length&&q+pe<G.length);for(he=2;he<G.length;++he)G[he]===-1&&(G[he]=0);switch(G[0]){case 38:V.fg=this._updateAttrColor(V.fg,G[1],G[3],G[4],G[5]);break;case 48:V.bg=this._updateAttrColor(V.bg,G[1],G[3],G[4],G[5]);break;case 58:V.extended=V.extended.clone(),V.extended.underlineColor=this._updateAttrColor(V.extended.underlineColor,G[1],G[3],G[4],G[5])}return q},H.prototype._processUnderline=function(O,W){W.extended=W.extended.clone(),(!~O||O>5)&&(O=1),W.extended.underlineStyle=O,W.fg|=268435456,O===0&&(W.fg&=-268435457),W.updateExtended()},H.prototype.charAttributes=function(O){if(O.length===1&&O.params[0]===0)return this._curAttrData.fg=m.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=m.DEFAULT_ATTR_DATA.bg,!0;for(var W,V=O.length,G=this._curAttrData,pe=0;pe<V;pe++)(W=O.params[pe])>=30&&W<=37?(G.fg&=-50331904,G.fg|=16777216|W-30):W>=40&&W<=47?(G.bg&=-50331904,G.bg|=16777216|W-40):W>=90&&W<=97?(G.fg&=-50331904,G.fg|=16777224|W-90):W>=100&&W<=107?(G.bg&=-50331904,G.bg|=16777224|W-100):W===0?(G.fg=m.DEFAULT_ATTR_DATA.fg,G.bg=m.DEFAULT_ATTR_DATA.bg):W===1?G.fg|=134217728:W===3?G.bg|=67108864:W===4?(G.fg|=268435456,this._processUnderline(O.hasSubParams(pe)?O.getSubParams(pe)[0]:1,G)):W===5?G.fg|=536870912:W===7?G.fg|=67108864:W===8?G.fg|=1073741824:W===9?G.fg|=2147483648:W===2?G.bg|=134217728:W===21?this._processUnderline(2,G):W===22?(G.fg&=-134217729,G.bg&=-134217729):W===23?G.bg&=-67108865:W===24?G.fg&=-268435457:W===25?G.fg&=-536870913:W===27?G.fg&=-67108865:W===28?G.fg&=-1073741825:W===29?G.fg&=2147483647:W===39?(G.fg&=-67108864,G.fg|=16777215&m.DEFAULT_ATTR_DATA.fg):W===49?(G.bg&=-67108864,G.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):W===38||W===48||W===58?pe+=this._extractColor(O,pe,G):W===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):W===100?(G.fg&=-67108864,G.fg|=16777215&m.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&m.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",W);return!0},H.prototype.deviceStatus=function(O){switch(O.params[0]){case 5:this._coreService.triggerDataEvent(u.C0.ESC+"[0n");break;case 6:var W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"["+W+";"+V+"R")}return!0},H.prototype.deviceStatusPrivate=function(O){if(O.params[0]===6){var W=this._activeBuffer.y+1,V=this._activeBuffer.x+1;this._coreService.triggerDataEvent(u.C0.ESC+"[?"+W+";"+V+"R")}return!0},H.prototype.softReset=function(O){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},H.prototype.setCursorStyle=function(O){var W=O.params[0]||1;switch(W){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var V=W%2==1;return this._optionsService.options.cursorBlink=V,!0},H.prototype.setScrollRegion=function(O){var W,V=O.params[0]||1;return(O.length<2||(W=O.params[1])>this._bufferService.rows||W===0)&&(W=this._bufferService.rows),W>V&&(this._activeBuffer.scrollTop=V-1,this._activeBuffer.scrollBottom=W-1,this._setCursor(0,0)),!0},H.prototype.windowOptions=function(O){if(!R(O.params[0],this._optionsService.rawOptions.windowOptions))return!0;var W=O.length>1?O.params[1]:0;switch(O.params[0]){case 14:W!==2&&this._onRequestWindowsOptionsReport.fire(c.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(c.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(u.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:W!==0&&W!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),W!==0&&W!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:W!==0&&W!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),W!==0&&W!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},H.prototype.saveCursor=function(O){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},H.prototype.restoreCursor=function(O){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},H.prototype.setTitle=function(O){return this._windowTitle=O,this._onTitleChange.fire(O),!0},H.prototype.setIconName=function(O){return this._iconName=O,!0},H.prototype.setOrReportIndexedColor=function(O){for(var W=[],V=O.split(";");V.length>1;){var G=V.shift(),pe=V.shift();if(/^\d+$/.exec(G)){var q=parseInt(G);if(0<=q&&q<256)if(pe==="?")W.push({type:0,index:q});else{var ne=(0,T.parseColor)(pe);ne&&W.push({type:1,index:q,color:ne})}}}return W.length&&this._onColor.fire(W),!0},H.prototype._setOrReportSpecialColor=function(O,W){for(var V=O.split(";"),G=0;G<V.length&&!(W>=this._specialColors.length);++G,++W)if(V[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[W]}]);else{var pe=(0,T.parseColor)(V[G]);pe&&this._onColor.fire([{type:1,index:this._specialColors[W],color:pe}])}return!0},H.prototype.setOrReportFgColor=function(O){return this._setOrReportSpecialColor(O,0)},H.prototype.setOrReportBgColor=function(O){return this._setOrReportSpecialColor(O,1)},H.prototype.setOrReportCursorColor=function(O){return this._setOrReportSpecialColor(O,2)},H.prototype.restoreIndexedColor=function(O){if(!O)return this._onColor.fire([{type:2}]),!0;for(var W=[],V=O.split(";"),G=0;G<V.length;++G)if(/^\d+$/.exec(V[G])){var pe=parseInt(V[G]);0<=pe&&pe<256&&W.push({type:2,index:pe})}return W.length&&this._onColor.fire(W),!0},H.prototype.restoreFgColor=function(O){return this._onColor.fire([{type:2,index:256}]),!0},H.prototype.restoreBgColor=function(O){return this._onColor.fire([{type:2,index:257}]),!0},H.prototype.restoreCursorColor=function(O){return this._onColor.fire([{type:2,index:258}]),!0},H.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},H.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},H.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},H.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,d.DEFAULT_CHARSET),!0},H.prototype.selectCharset=function(O){return O.length!==2?(this.selectDefaultCharset(),!0):(O[0]==="/"||this._charsetService.setgCharset(L[O[0]],d.CHARSETS[O[1]]||d.DEFAULT_CHARSET),!0)},H.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},H.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},H.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var O=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,O,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},H.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},H.prototype.reset=function(){this._curAttrData=m.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=m.DEFAULT_ATTR_DATA.clone()},H.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},H.prototype.setgLevel=function(O){return this._charsetService.setgLevel(O),!0},H.prototype.screenAlignmentPattern=function(){var O=new b.CellData;O.content=1<<22|"E".charCodeAt(0),O.fg=this._curAttrData.fg,O.bg=this._curAttrData.bg,this._setCursor(0,0);for(var W=0;W<this._bufferService.rows;++W){var V=this._activeBuffer.ybase+this._activeBuffer.y+W,G=this._activeBuffer.lines.get(V);G&&(G.fill(O),G.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},H}(h.Disposable);o.InputHandler=A},844:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var s=function(){function l(){this._disposables=[],this._isDisposed=!1}return l.prototype.dispose=function(){this._isDisposed=!0;for(var c=0,u=this._disposables;c<u.length;c++)u[c].dispose();this._disposables.length=0},l.prototype.register=function(c){return this._disposables.push(c),c},l.prototype.unregister=function(c){var u=this._disposables.indexOf(c);u!==-1&&this._disposables.splice(u,1)},l}();function a(l){for(var c=0,u=l;c<u.length;c++)u[c].dispose();l.length=0}o.Disposable=s,o.disposeArray=a,o.getDisposeArrayDisposable=function(l){return{dispose:function(){return a(l)}}}},6114:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isLegacyEdge=o.isFirefox=void 0;var s=typeof navigator=="undefined",a=s?"node":navigator.userAgent,l=s?"node":navigator.platform;o.isFirefox=a.includes("Firefox"),o.isLegacyEdge=a.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(a),o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),o.isIpad=l==="iPad",o.isIphone=l==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),o.isLinux=l.indexOf("Linux")>=0},8273:(r,o)=>{function s(a,l,c,u){if(c===void 0&&(c=0),u===void 0&&(u=a.length),c>=a.length)return a;c=(a.length+c)%a.length,u=u>=a.length?a.length:(a.length+u)%a.length;for(var d=c;d<u;++d)a[d]=l;return a}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(a,l,c,u){return a.fill?a.fill(l,c,u):s(a,l,c,u)},o.fillFallback=s,o.concat=function(a,l){var c=new a.constructor(a.length+l.length);return c.set(a),c.set(l,a.length),c}},9282:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var a=s(643);o.updateWindowsModeWrappedState=function(l){var c=l.buffer.lines.get(l.buffer.ybase+l.buffer.y-1),u=c==null?void 0:c.get(l.cols-1),d=l.buffer.lines.get(l.buffer.ybase+l.buffer.y);d&&u&&(d.isWrapped=u[a.CHAR_DATA_CODE_INDEX]!==a.NULL_CELL_CODE&&u[a.CHAR_DATA_CODE_INDEX]!==a.WHITESPACE_CELL_CODE)}},3734:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var s=function(){function l(){this.fg=0,this.bg=0,this.extended=new a}return l.toColorRGB=function(c){return[c>>>16&255,c>>>8&255,255&c]},l.fromColorRGB=function(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]},l.prototype.clone=function(){var c=new l;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c},l.prototype.isInverse=function(){return 67108864&this.fg},l.prototype.isBold=function(){return 134217728&this.fg},l.prototype.isUnderline=function(){return 268435456&this.fg},l.prototype.isBlink=function(){return 536870912&this.fg},l.prototype.isInvisible=function(){return 1073741824&this.fg},l.prototype.isItalic=function(){return 67108864&this.bg},l.prototype.isDim=function(){return 134217728&this.bg},l.prototype.isStrikethrough=function(){return 2147483648&this.fg},l.prototype.getFgColorMode=function(){return 50331648&this.fg},l.prototype.getBgColorMode=function(){return 50331648&this.bg},l.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},l.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},l.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},l.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},l.prototype.isFgDefault=function(){return(50331648&this.fg)==0},l.prototype.isBgDefault=function(){return(50331648&this.bg)==0},l.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},l.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},l.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},l.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},l.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},l.prototype.getUnderlineColor=function(){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()},l.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},l.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},l.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},l.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},l.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},l}();o.AttributeData=s;var a=function(){function l(c,u){c===void 0&&(c=0),u===void 0&&(u=-1),this.underlineStyle=c,this.underlineColor=u}return l.prototype.clone=function(){return new l(this.underlineStyle,this.underlineColor)},l.prototype.isEmpty=function(){return this.underlineStyle===0},l}();o.ExtendedAttrs=a},9092:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var a=s(6349),l=s(8437),c=s(511),u=s(643),d=s(4634),f=s(4863),h=s(7116),g=s(3734);o.MAX_BUFFER_SIZE=4294967295;var v=function(){function p(_,b,y){this._hasScrollback=_,this._optionsService=b,this._bufferService=y,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=l.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=c.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=c.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return p.prototype.getNullCell=function(_){return _?(this._nullCell.fg=_.fg,this._nullCell.bg=_.bg,this._nullCell.extended=_.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new g.ExtendedAttrs),this._nullCell},p.prototype.getWhitespaceCell=function(_){return _?(this._whitespaceCell.fg=_.fg,this._whitespaceCell.bg=_.bg,this._whitespaceCell.extended=_.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new g.ExtendedAttrs),this._whitespaceCell},p.prototype.getBlankLine=function(_,b){return new l.BufferLine(this._bufferService.cols,this.getNullCell(_),b)},Object.defineProperty(p.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"isCursorInViewport",{get:function(){var _=this.ybase+this.y-this.ydisp;return _>=0&&_<this._rows},enumerable:!1,configurable:!0}),p.prototype._getCorrectBufferLength=function(_){if(!this._hasScrollback)return _;var b=_+this._optionsService.rawOptions.scrollback;return b>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:b},p.prototype.fillViewportRows=function(_){if(this.lines.length===0){_===void 0&&(_=l.DEFAULT_ATTR_DATA);for(var b=this._rows;b--;)this.lines.push(this.getBlankLine(_))}},p.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new a.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},p.prototype.resize=function(_,b){var y=this.getNullCell(l.DEFAULT_ATTR_DATA),w=this._getCorrectBufferLength(b);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<_)for(var k=0;k<this.lines.length;k++)this.lines.get(k).resize(_,y);var x=0;if(this._rows<b)for(var T=this._rows;T<b;T++)this.lines.length<b+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new l.BufferLine(_,y)):this.ybase>0&&this.lines.length<=this.ybase+this.y+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new l.BufferLine(_,y)));else for(T=this._rows;T>b;T--)this.lines.length>b+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){var L=this.lines.length-w;L>0&&(this.lines.trimStart(L),this.ybase=Math.max(this.ybase-L,0),this.ydisp=Math.max(this.ydisp-L,0),this.savedY=Math.max(this.savedY-L,0)),this.lines.maxLength=w}this.x=Math.min(this.x,_-1),this.y=Math.min(this.y,b-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,_-1),this.scrollTop=0}if(this.scrollBottom=b-1,this._isReflowEnabled&&(this._reflow(_,b),this._cols>_))for(k=0;k<this.lines.length;k++)this.lines.get(k).resize(_,y);this._cols=_,this._rows=b},Object.defineProperty(p.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),p.prototype._reflow=function(_,b){this._cols!==_&&(_>this._cols?this._reflowLarger(_,b):this._reflowSmaller(_,b))},p.prototype._reflowLarger=function(_,b){var y=(0,d.reflowLargerGetLinesToRemove)(this.lines,this._cols,_,this.ybase+this.y,this.getNullCell(l.DEFAULT_ATTR_DATA));if(y.length>0){var w=(0,d.reflowLargerCreateNewLayout)(this.lines,y);(0,d.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(_,b,w.countRemoved)}},p.prototype._reflowLargerAdjustViewport=function(_,b,y){for(var w=this.getNullCell(l.DEFAULT_ATTR_DATA),k=y;k-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<b&&this.lines.push(new l.BufferLine(_,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-y,0)},p.prototype._reflowSmaller=function(_,b){for(var y=this.getNullCell(l.DEFAULT_ATTR_DATA),w=[],k=0,x=this.lines.length-1;x>=0;x--){var T=this.lines.get(x);if(!(!T||!T.isWrapped&&T.getTrimmedLength()<=_)){for(var L=[T];T.isWrapped&&x>0;)T=this.lines.get(--x),L.unshift(T);var D=this.ybase+this.y;if(!(D>=x&&D<x+L.length)){var R,M=L[L.length-1].getTrimmedLength(),A=(0,d.reflowSmallerGetNewLineLengths)(L,this._cols,_),X=A.length-L.length;R=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+X):Math.max(0,this.lines.length-this.lines.maxLength+X);for(var H=[],O=0;O<X;O++){var W=this.getBlankLine(l.DEFAULT_ATTR_DATA,!0);H.push(W)}H.length>0&&(w.push({start:x+L.length+k,newLines:H}),k+=H.length),L.push.apply(L,H);var V=A.length-1,G=A[V];G===0&&(G=A[--V]);for(var pe=L.length-X-1,q=M;pe>=0;){var ne=Math.min(q,G);if(L[V]===void 0)break;if(L[V].copyCellsFrom(L[pe],q-ne,G-ne,ne,!0),(G-=ne)==0&&(G=A[--V]),(q-=ne)==0){pe--;var he=Math.max(pe,0);q=(0,d.getWrappedLineTrimmedLength)(L,he,this._cols)}}for(O=0;O<L.length;O++)A[O]<_&&L[O].setCell(A[O],y);for(var De=X-R;De-- >0;)this.ybase===0?this.y<b-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+k)-b&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+X,this.ybase+b-1)}}}if(w.length>0){var j=[],ge=[];for(O=0;O<this.lines.length;O++)ge.push(this.lines.get(O));var J=this.lines.length,oe=J-1,te=0,lt=w[te];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+k);var ve=0;for(O=Math.min(this.lines.maxLength-1,J+k-1);O>=0;O--)if(lt&&lt.start>oe+ve){for(var ke=lt.newLines.length-1;ke>=0;ke--)this.lines.set(O--,lt.newLines[ke]);O++,j.push({index:oe+1,amount:lt.newLines.length}),ve+=lt.newLines.length,lt=w[++te]}else this.lines.set(O,ge[oe--]);var Se=0;for(O=j.length-1;O>=0;O--)j[O].index+=Se,this.lines.onInsertEmitter.fire(j[O]),Se+=j[O].amount;var Me=Math.max(0,J+k-this.lines.maxLength);Me>0&&this.lines.onTrimEmitter.fire(Me)}},p.prototype.stringIndexToBufferIndex=function(_,b,y){for(y===void 0&&(y=!1);b;){var w=this.lines.get(_);if(!w)return[-1,-1];for(var k=y?w.getTrimmedLength():w.length,x=0;x<k;++x)if(w.get(x)[u.CHAR_DATA_WIDTH_INDEX]&&(b-=w.get(x)[u.CHAR_DATA_CHAR_INDEX].length||1),b<0)return[_,x];_++}return[_,0]},p.prototype.translateBufferLineToString=function(_,b,y,w){y===void 0&&(y=0);var k=this.lines.get(_);return k?k.translateToString(b,y,w):""},p.prototype.getWrappedRangeForLine=function(_){for(var b=_,y=_;b>0&&this.lines.get(b).isWrapped;)b--;for(;y+1<this.lines.length&&this.lines.get(y+1).isWrapped;)y++;return{first:b,last:y}},p.prototype.setupTabStops=function(_){for(_!=null?this.tabs[_]||(_=this.prevStop(_)):(this.tabs={},_=0);_<this._cols;_+=this._optionsService.rawOptions.tabStopWidth)this.tabs[_]=!0},p.prototype.prevStop=function(_){for(_==null&&(_=this.x);!this.tabs[--_]&&_>0;);return _>=this._cols?this._cols-1:_<0?0:_},p.prototype.nextStop=function(_){for(_==null&&(_=this.x);!this.tabs[++_]&&_<this._cols;);return _>=this._cols?this._cols-1:_<0?0:_},p.prototype.clearMarkers=function(_){if(this._isClearing=!0,_!==void 0)for(var b=0;b<this.markers.length;b++)this.markers[b].line===_&&(this.markers[b].dispose(),this.markers.splice(b--,1));else{for(var y=0,w=this.markers;y<w.length;y++)w[y].dispose();this.markers=[]}this._isClearing=!1},p.prototype.addMarker=function(_){var b=this,y=new f.Marker(_);return this.markers.push(y),y.register(this.lines.onTrim(function(w){y.line-=w,y.line<0&&y.dispose()})),y.register(this.lines.onInsert(function(w){y.line>=w.index&&(y.line+=w.amount)})),y.register(this.lines.onDelete(function(w){y.line>=w.index&&y.line<w.index+w.amount&&y.dispose(),y.line>w.index&&(y.line-=w.amount)})),y.register(y.onDispose(function(){return b._removeMarker(y)})),y},p.prototype._removeMarker=function(_){this._isClearing||this.markers.splice(this.markers.indexOf(_),1)},p.prototype.iterator=function(_,b,y,w,k){return new m(this,_,b,y,w,k)},p}();o.Buffer=v;var m=function(){function p(_,b,y,w,k,x){y===void 0&&(y=0),w===void 0&&(w=_.lines.length),k===void 0&&(k=0),x===void 0&&(x=0),this._buffer=_,this._trimRight=b,this._startIndex=y,this._endIndex=w,this._startOverscan=k,this._endOverscan=x,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return p.prototype.hasNext=function(){return this._current<this._endIndex},p.prototype.next=function(){var _=this._buffer.getWrappedRangeForLine(this._current);_.first<this._startIndex-this._startOverscan&&(_.first=this._startIndex-this._startOverscan),_.last>this._endIndex+this._endOverscan&&(_.last=this._endIndex+this._endOverscan),_.first=Math.max(_.first,0),_.last=Math.min(_.last,this._buffer.lines.length);for(var b="",y=_.first;y<=_.last;++y)b+=this._buffer.translateBufferLineToString(y,this._trimRight);return this._current=_.last+1,{range:_,content:b}},p}();o.BufferStringIterator=m},8437:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var a=s(482),l=s(643),c=s(511),u=s(3734);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);var d=function(){function f(h,g,v){v===void 0&&(v=!1),this.isWrapped=v,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*h);for(var m=g||c.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]),p=0;p<h;++p)this.setCell(p,m);this.length=h}return f.prototype.get=function(h){var g=this._data[3*h+0],v=2097151&g;return[this._data[3*h+1],2097152&g?this._combined[h]:v?(0,a.stringFromCodePoint)(v):"",g>>22,2097152&g?this._combined[h].charCodeAt(this._combined[h].length-1):v]},f.prototype.set=function(h,g){this._data[3*h+1]=g[l.CHAR_DATA_ATTR_INDEX],g[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[h]=g[1],this._data[3*h+0]=2097152|h|g[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*h+0]=g[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|g[l.CHAR_DATA_WIDTH_INDEX]<<22},f.prototype.getWidth=function(h){return this._data[3*h+0]>>22},f.prototype.hasWidth=function(h){return 12582912&this._data[3*h+0]},f.prototype.getFg=function(h){return this._data[3*h+1]},f.prototype.getBg=function(h){return this._data[3*h+2]},f.prototype.hasContent=function(h){return 4194303&this._data[3*h+0]},f.prototype.getCodePoint=function(h){var g=this._data[3*h+0];return 2097152&g?this._combined[h].charCodeAt(this._combined[h].length-1):2097151&g},f.prototype.isCombined=function(h){return 2097152&this._data[3*h+0]},f.prototype.getString=function(h){var g=this._data[3*h+0];return 2097152&g?this._combined[h]:2097151&g?(0,a.stringFromCodePoint)(2097151&g):""},f.prototype.loadCell=function(h,g){var v=3*h;return g.content=this._data[v+0],g.fg=this._data[v+1],g.bg=this._data[v+2],2097152&g.content&&(g.combinedData=this._combined[h]),268435456&g.bg&&(g.extended=this._extendedAttrs[h]),g},f.prototype.setCell=function(h,g){2097152&g.content&&(this._combined[h]=g.combinedData),268435456&g.bg&&(this._extendedAttrs[h]=g.extended),this._data[3*h+0]=g.content,this._data[3*h+1]=g.fg,this._data[3*h+2]=g.bg},f.prototype.setCellFromCodePoint=function(h,g,v,m,p,_){268435456&p&&(this._extendedAttrs[h]=_),this._data[3*h+0]=g|v<<22,this._data[3*h+1]=m,this._data[3*h+2]=p},f.prototype.addCodepointToCell=function(h,g){var v=this._data[3*h+0];2097152&v?this._combined[h]+=(0,a.stringFromCodePoint)(g):(2097151&v?(this._combined[h]=(0,a.stringFromCodePoint)(2097151&v)+(0,a.stringFromCodePoint)(g),v&=-2097152,v|=2097152):v=g|1<<22,this._data[3*h+0]=v)},f.prototype.insertCells=function(h,g,v,m){if((h%=this.length)&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs),g<this.length-h){for(var p=new c.CellData,_=this.length-h-g-1;_>=0;--_)this.setCell(h+g+_,this.loadCell(h+_,p));for(_=0;_<g;++_)this.setCell(h+_,v)}else for(_=h;_<this.length;++_)this.setCell(_,v);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs)},f.prototype.deleteCells=function(h,g,v,m){if(h%=this.length,g<this.length-h){for(var p=new c.CellData,_=0;_<this.length-h-g;++_)this.setCell(h+_,this.loadCell(h+g+_,p));for(_=this.length-g;_<this.length;++_)this.setCell(_,v)}else for(_=h;_<this.length;++_)this.setCell(_,v);h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs),this.getWidth(h)!==0||this.hasContent(h)||this.setCellFromCodePoint(h,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs)},f.prototype.replaceCells=function(h,g,v,m){for(h&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h-1,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs),g<this.length&&this.getWidth(g-1)===2&&this.setCellFromCodePoint(g,0,1,(m==null?void 0:m.fg)||0,(m==null?void 0:m.bg)||0,(m==null?void 0:m.extended)||new u.ExtendedAttrs);h<g&&h<this.length;)this.setCell(h++,v)},f.prototype.resize=function(h,g){if(h!==this.length){if(h>this.length){var v=new Uint32Array(3*h);this.length&&(3*h<this._data.length?v.set(this._data.subarray(0,3*h)):v.set(this._data)),this._data=v;for(var m=this.length;m<h;++m)this.setCell(m,g)}else if(h){(v=new Uint32Array(3*h)).set(this._data.subarray(0,3*h)),this._data=v;var p=Object.keys(this._combined);for(m=0;m<p.length;m++){var _=parseInt(p[m],10);_>=h&&delete this._combined[_]}}else this._data=new Uint32Array(0),this._combined={};this.length=h}},f.prototype.fill=function(h){this._combined={},this._extendedAttrs={};for(var g=0;g<this.length;++g)this.setCell(g,h)},f.prototype.copyFrom=function(h){for(var g in this.length!==h.length?this._data=new Uint32Array(h._data):this._data.set(h._data),this.length=h.length,this._combined={},h._combined)this._combined[g]=h._combined[g];for(var g in this._extendedAttrs={},h._extendedAttrs)this._extendedAttrs[g]=h._extendedAttrs[g];this.isWrapped=h.isWrapped},f.prototype.clone=function(){var h=new f(0);for(var g in h._data=new Uint32Array(this._data),h.length=this.length,this._combined)h._combined[g]=this._combined[g];for(var g in this._extendedAttrs)h._extendedAttrs[g]=this._extendedAttrs[g];return h.isWrapped=this.isWrapped,h},f.prototype.getTrimmedLength=function(){for(var h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0])return h+(this._data[3*h+0]>>22);return 0},f.prototype.copyCellsFrom=function(h,g,v,m,p){var _=h._data;if(p)for(var b=m-1;b>=0;b--)for(var y=0;y<3;y++)this._data[3*(v+b)+y]=_[3*(g+b)+y];else for(b=0;b<m;b++)for(y=0;y<3;y++)this._data[3*(v+b)+y]=_[3*(g+b)+y];var w=Object.keys(h._combined);for(y=0;y<w.length;y++){var k=parseInt(w[y],10);k>=g&&(this._combined[k-g+v]=h._combined[k])}},f.prototype.translateToString=function(h,g,v){h===void 0&&(h=!1),g===void 0&&(g=0),v===void 0&&(v=this.length),h&&(v=Math.min(v,this.getTrimmedLength()));for(var m="";g<v;){var p=this._data[3*g+0],_=2097151&p;m+=2097152&p?this._combined[g]:_?(0,a.stringFromCodePoint)(_):l.WHITESPACE_CELL_CHAR,g+=p>>22||1}return m},f}();o.BufferLine=d},4841:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(s,a){if(s.start.y>s.end.y)throw new Error("Buffer range end ("+s.end.x+", "+s.end.y+") cannot be before start ("+s.start.x+", "+s.start.y+")");return a*(s.end.y-s.start.y)+(s.end.x-s.start.x+1)}},4634:(r,o)=>{function s(a,l,c){if(l===a.length-1)return a[l].getTrimmedLength();var u=!a[l].hasContent(c-1)&&a[l].getWidth(c-1)===1,d=a[l+1].getWidth(0)===2;return u&&d?c-1:c}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(a,l,c,u,d){for(var f=[],h=0;h<a.length-1;h++){var g=h,v=a.get(++g);if(v.isWrapped){for(var m=[a.get(h)];g<a.length&&v.isWrapped;)m.push(v),v=a.get(++g);if(u>=h&&u<g)h+=m.length-1;else{for(var p=0,_=s(m,p,l),b=1,y=0;b<m.length;){var w=s(m,b,l),k=w-y,x=c-_,T=Math.min(k,x);m[p].copyCellsFrom(m[b],y,_,T,!1),(_+=T)===c&&(p++,_=0),(y+=T)===w&&(b++,y=0),_===0&&p!==0&&m[p-1].getWidth(c-1)===2&&(m[p].copyCellsFrom(m[p-1],c-1,_++,1,!1),m[p-1].setCell(c-1,d))}m[p].replaceCells(_,c,d);for(var L=0,D=m.length-1;D>0&&(D>p||m[D].getTrimmedLength()===0);D--)L++;L>0&&(f.push(h+m.length-L),f.push(L)),h+=m.length-1}}}return f},o.reflowLargerCreateNewLayout=function(a,l){for(var c=[],u=0,d=l[u],f=0,h=0;h<a.length;h++)if(d===h){var g=l[++u];a.onDeleteEmitter.fire({index:h-f,amount:g}),h+=g-1,f+=g,d=l[++u]}else c.push(h);return{layout:c,countRemoved:f}},o.reflowLargerApplyNewLayout=function(a,l){for(var c=[],u=0;u<l.length;u++)c.push(a.get(l[u]));for(u=0;u<c.length;u++)a.set(u,c[u]);a.length=l.length},o.reflowSmallerGetNewLineLengths=function(a,l,c){for(var u=[],d=a.map(function(_,b){return s(a,b,l)}).reduce(function(_,b){return _+b}),f=0,h=0,g=0;g<d;){if(d-g<c){u.push(d-g);break}f+=c;var v=s(a,h,l);f>v&&(f-=v,h++);var m=a[h].getWidth(f-1)===2;m&&f--;var p=m?c-1:c;u.push(p),g+=p}return u},o.getWrappedLineTrimmedLength=s},5295:function(r,o,s){var a,l=this&&this.__extends||(a=function(f,h){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var m in v)Object.prototype.hasOwnProperty.call(v,m)&&(g[m]=v[m])},a(f,h)},function(f,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function g(){this.constructor=f}a(f,h),f.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var c=s(9092),u=s(8460),d=function(f){function h(g,v){var m=f.call(this)||this;return m._optionsService=g,m._bufferService=v,m._onBufferActivate=m.register(new u.EventEmitter),m.reset(),m}return l(h,f),Object.defineProperty(h.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),h.prototype.reset=function(){this._normal=new c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(h.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),h.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},h.prototype.activateAltBuffer=function(g){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(g),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},h.prototype.resize=function(g,v){this._normal.resize(g,v),this._alt.resize(g,v)},h.prototype.setupTabStops=function(g){this._normal.setupTabStops(g),this._alt.setupTabStops(g)},h}(s(844).Disposable);o.BufferSet=d},511:function(r,o,s){var a,l=this&&this.__extends||(a=function(h,g){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,m){v.__proto__=m}||function(v,m){for(var p in m)Object.prototype.hasOwnProperty.call(m,p)&&(v[p]=m[p])},a(h,g)},function(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function v(){this.constructor=h}a(h,g),h.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var c=s(482),u=s(643),d=s(3734),f=function(h){function g(){var v=h!==null&&h.apply(this,arguments)||this;return v.content=0,v.fg=0,v.bg=0,v.extended=new d.ExtendedAttrs,v.combinedData="",v}return l(g,h),g.fromCharData=function(v){var m=new g;return m.setFromCharData(v),m},g.prototype.isCombined=function(){return 2097152&this.content},g.prototype.getWidth=function(){return this.content>>22},g.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,c.stringFromCodePoint)(2097151&this.content):""},g.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},g.prototype.setFromCharData=function(v){this.fg=v[u.CHAR_DATA_ATTR_INDEX],this.bg=0;var m=!1;if(v[u.CHAR_DATA_CHAR_INDEX].length>2)m=!0;else if(v[u.CHAR_DATA_CHAR_INDEX].length===2){var p=v[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=p&&p<=56319){var _=v[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(p-55296)+_-56320+65536|v[u.CHAR_DATA_WIDTH_INDEX]<<22:m=!0}else m=!0}else this.content=v[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[u.CHAR_DATA_WIDTH_INDEX]<<22;m&&(this.combinedData=v[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|v[u.CHAR_DATA_WIDTH_INDEX]<<22)},g.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},g}(d.AttributeData);o.CellData=f},643:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:function(r,o,s){var a,l=this&&this.__extends||(a=function(d,f){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(h[v]=g[v])},a(d,f)},function(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function h(){this.constructor=d}a(d,f),d.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var c=s(8460),u=function(d){function f(h){var g=d.call(this)||this;return g.line=h,g._id=f._nextId++,g.isDisposed=!1,g._onDispose=new c.EventEmitter,g}return l(f,d),Object.defineProperty(f.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),d.prototype.dispose.call(this))},f._nextId=1,f}(s(844).Disposable);o.Marker=u},7116:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},o.CHARSETS.A={"#":"\xA3"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},o.CHARSETS.C=o.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},o.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},o.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},o.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},o.CHARSETS.E=o.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},o.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},o.CHARSETS.H=o.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(r,o)=>{var s,a;Object.defineProperty(o,"__esModule",{value:!0}),o.C1=o.C0=void 0,(a=o.C0||(o.C0={})).NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
1870
- `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL="\x7F",(s=o.C1||(o.C1={})).PAD="\x80",s.HOP="\x81",s.BPH="\x82",s.NBH="\x83",s.IND="\x84",s.NEL="\x85",s.SSA="\x86",s.ESA="\x87",s.HTS="\x88",s.HTJ="\x89",s.VTS="\x8A",s.PLD="\x8B",s.PLU="\x8C",s.RI="\x8D",s.SS2="\x8E",s.SS3="\x8F",s.DCS="\x90",s.PU1="\x91",s.PU2="\x92",s.STS="\x93",s.CCH="\x94",s.MW="\x95",s.SPA="\x96",s.EPA="\x97",s.SOS="\x98",s.SGCI="\x99",s.SCI="\x9A",s.CSI="\x9B",s.ST="\x9C",s.OSC="\x9D",s.PM="\x9E",s.APC="\x9F"},7399:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var a=s(2584),l={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(c,u,d,f){var h={type:0,cancel:!1,key:void 0},g=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?h.key=u?a.C0.ESC+"OA":a.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?h.key=u?a.C0.ESC+"OD":a.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?h.key=u?a.C0.ESC+"OC":a.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(h.key=u?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(c.shiftKey){h.key=a.C0.BS;break}if(c.altKey){h.key=a.C0.ESC+a.C0.DEL;break}h.key=a.C0.DEL;break;case 9:if(c.shiftKey){h.key=a.C0.ESC+"[Z";break}h.key=a.C0.HT,h.cancel=!0;break;case 13:h.key=c.altKey?a.C0.ESC+a.C0.CR:a.C0.CR,h.cancel=!0;break;case 27:h.key=a.C0.ESC,c.altKey&&(h.key=a.C0.ESC+a.C0.ESC),h.cancel=!0;break;case 37:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"D",h.key===a.C0.ESC+"[1;3D"&&(h.key=a.C0.ESC+(d?"b":"[1;5D"))):h.key=u?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"C",h.key===a.C0.ESC+"[1;3C"&&(h.key=a.C0.ESC+(d?"f":"[1;5C"))):h.key=u?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"A",d||h.key!==a.C0.ESC+"[1;3A"||(h.key=a.C0.ESC+"[1;5A")):h.key=u?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"B",d||h.key!==a.C0.ESC+"[1;3B"||(h.key=a.C0.ESC+"[1;5B")):h.key=u?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:c.shiftKey||c.ctrlKey||(h.key=a.C0.ESC+"[2~");break;case 46:h.key=g?a.C0.ESC+"[3;"+(g+1)+"~":a.C0.ESC+"[3~";break;case 36:h.key=g?a.C0.ESC+"[1;"+(g+1)+"H":u?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:h.key=g?a.C0.ESC+"[1;"+(g+1)+"F":u?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:c.shiftKey?h.type=2:h.key=a.C0.ESC+"[5~";break;case 34:c.shiftKey?h.type=3:h.key=a.C0.ESC+"[6~";break;case 112:h.key=g?a.C0.ESC+"[1;"+(g+1)+"P":a.C0.ESC+"OP";break;case 113:h.key=g?a.C0.ESC+"[1;"+(g+1)+"Q":a.C0.ESC+"OQ";break;case 114:h.key=g?a.C0.ESC+"[1;"+(g+1)+"R":a.C0.ESC+"OR";break;case 115:h.key=g?a.C0.ESC+"[1;"+(g+1)+"S":a.C0.ESC+"OS";break;case 116:h.key=g?a.C0.ESC+"[15;"+(g+1)+"~":a.C0.ESC+"[15~";break;case 117:h.key=g?a.C0.ESC+"[17;"+(g+1)+"~":a.C0.ESC+"[17~";break;case 118:h.key=g?a.C0.ESC+"[18;"+(g+1)+"~":a.C0.ESC+"[18~";break;case 119:h.key=g?a.C0.ESC+"[19;"+(g+1)+"~":a.C0.ESC+"[19~";break;case 120:h.key=g?a.C0.ESC+"[20;"+(g+1)+"~":a.C0.ESC+"[20~";break;case 121:h.key=g?a.C0.ESC+"[21;"+(g+1)+"~":a.C0.ESC+"[21~";break;case 122:h.key=g?a.C0.ESC+"[23;"+(g+1)+"~":a.C0.ESC+"[23~";break;case 123:h.key=g?a.C0.ESC+"[24;"+(g+1)+"~":a.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(d&&!f||!c.altKey||c.metaKey)!d||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?h.key=c.key:c.key&&c.ctrlKey&&c.key==="_"&&(h.key=a.C0.US):c.keyCode===65&&(h.type=1);else{var v=l[c.keyCode],m=v==null?void 0:v[c.shiftKey?1:0];if(m)h.key=a.C0.ESC+m;else if(c.keyCode>=65&&c.keyCode<=90){var p=c.ctrlKey?c.keyCode-64:c.keyCode+32;h.key=a.C0.ESC+String.fromCharCode(p)}}else c.keyCode>=65&&c.keyCode<=90?h.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?h.key=a.C0.NUL:c.keyCode>=51&&c.keyCode<=55?h.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?h.key=a.C0.DEL:c.keyCode===219?h.key=a.C0.ESC:c.keyCode===220?h.key=a.C0.FS:c.keyCode===221&&(h.key=a.C0.GS)}return h}},482:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c,u){c===void 0&&(c=0),u===void 0&&(u=l.length);for(var d="",f=c;f<u;++f){var h=l[f];h>65535?(h-=65536,d+=String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):d+=String.fromCharCode(h)}return d};var s=function(){function l(){this._interim=0}return l.prototype.clear=function(){this._interim=0},l.prototype.decode=function(c,u){var d=c.length;if(!d)return 0;var f=0,h=0;this._interim&&(56320<=(m=c.charCodeAt(h++))&&m<=57343?u[f++]=1024*(this._interim-55296)+m-56320+65536:(u[f++]=this._interim,u[f++]=m),this._interim=0);for(var g=h;g<d;++g){var v=c.charCodeAt(g);if(55296<=v&&v<=56319){if(++g>=d)return this._interim=v,f;var m;56320<=(m=c.charCodeAt(g))&&m<=57343?u[f++]=1024*(v-55296)+m-56320+65536:(u[f++]=v,u[f++]=m)}else v!==65279&&(u[f++]=v)}return f},l}();o.StringToUtf32=s;var a=function(){function l(){this.interim=new Uint8Array(3)}return l.prototype.clear=function(){this.interim.fill(0)},l.prototype.decode=function(c,u){var d=c.length;if(!d)return 0;var f,h,g,v,m=0,p=0,_=0;if(this.interim[0]){var b=!1,y=this.interim[0];y&=(224&y)==192?31:(240&y)==224?15:7;for(var w=0,k=void 0;(k=63&this.interim[++w])&&w<4;)y<<=6,y|=k;for(var x=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,T=x-w;_<T;){if(_>=d)return 0;if((192&(k=c[_++]))!=128){_--,b=!0;break}this.interim[w++]=k,y<<=6,y|=63&k}b||(x===2?y<128?_--:u[m++]=y:x===3?y<2048||y>=55296&&y<=57343||y===65279||(u[m++]=y):y<65536||y>1114111||(u[m++]=y)),this.interim.fill(0)}for(var L=d-4,D=_;D<d;){for(;!(!(D<L)||128&(f=c[D])||128&(h=c[D+1])||128&(g=c[D+2])||128&(v=c[D+3]));)u[m++]=f,u[m++]=h,u[m++]=g,u[m++]=v,D+=4;if((f=c[D++])<128)u[m++]=f;else if((224&f)==192){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if((p=(31&f)<<6|63&h)<128){D--;continue}u[m++]=p}else if((240&f)==224){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,m;if((192&(g=c[D++]))!=128){D--;continue}if((p=(15&f)<<12|(63&h)<<6|63&g)<2048||p>=55296&&p<=57343||p===65279)continue;u[m++]=p}else if((248&f)==240){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,m;if((192&(g=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,this.interim[2]=g,m;if((192&(v=c[D++]))!=128){D--;continue}if((p=(7&f)<<18|(63&h)<<12|(63&g)<<6|63&v)<65536||p>1114111)continue;u[m++]=p}}return m},l}();o.Utf8ToUtf32=a},225:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var a,l=s(8273),c=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],d=function(){function f(){if(this.version="6",!a){a=new Uint8Array(65536),(0,l.fill)(a,1),a[0]=0,(0,l.fill)(a,0,1,32),(0,l.fill)(a,0,127,160),(0,l.fill)(a,2,4352,4448),a[9001]=2,a[9002]=2,(0,l.fill)(a,2,11904,42192),a[12351]=1,(0,l.fill)(a,2,44032,55204),(0,l.fill)(a,2,63744,64256),(0,l.fill)(a,2,65040,65050),(0,l.fill)(a,2,65072,65136),(0,l.fill)(a,2,65280,65377),(0,l.fill)(a,2,65504,65511);for(var h=0;h<c.length;++h)(0,l.fill)(a,0,c[h][0],c[h][1]+1)}}return f.prototype.wcwidth=function(h){return h<32?0:h<127?1:h<65536?a[h]:function(g,v){var m,p=0,_=v.length-1;if(g<v[0][0]||g>v[_][1])return!1;for(;_>=p;)if(g>v[m=p+_>>1][1])p=m+1;else{if(!(g<v[m][0]))return!0;_=m-1}return!1}(h,u)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1},f}();o.UnicodeV6=d},5981:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var s=typeof queueMicrotask=="undefined"?function(l){Promise.resolve().then(l)}:queueMicrotask,a=function(){function l(c){this._action=c,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return l.prototype.writeSync=function(c,u){if(u!==void 0&&this._syncCalls>u)this._syncCalls=0;else if(this._pendingData+=c.length,this._writeBuffer.push(c),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var d;for(this._isSyncWriting=!0;d=this._writeBuffer.shift();){this._action(d);var f=this._callbacks.shift();f&&f()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},l.prototype.write=function(c,u){var d=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return d._innerWrite()})),this._pendingData+=c.length,this._writeBuffer.push(c),this._callbacks.push(u)},l.prototype._innerWrite=function(c,u){var d=this;c===void 0&&(c=0),u===void 0&&(u=!0);for(var f=c||Date.now();this._writeBuffer.length>this._bufferOffset;){var h=this._writeBuffer[this._bufferOffset],g=this._action(h,u);if(g)return void g.catch(function(m){return s(function(){throw m}),Promise.resolve(!1)}).then(function(m){return Date.now()-f>=12?setTimeout(function(){return d._innerWrite(0,m)}):d._innerWrite(f,m)});var v=this._callbacks[this._bufferOffset];if(v&&v(),this._bufferOffset++,this._pendingData-=h.length,Date.now()-f>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return d._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},l}();o.WriteBuffer=a},5941:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;var s=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,a=/^[\da-f]+$/;function l(c,u){var d=c.toString(16),f=d.length<2?"0"+d:d;switch(u){case 4:return d[0];case 8:return f;case 12:return(f+f).slice(0,3);default:return f+f}}o.parseColor=function(c){if(c){var u=c.toLowerCase();if(u.indexOf("rgb:")===0){u=u.slice(4);var d=s.exec(u);if(d){var f=d[1]?15:d[4]?255:d[7]?4095:65535;return[Math.round(parseInt(d[1]||d[4]||d[7]||d[10],16)/f*255),Math.round(parseInt(d[2]||d[5]||d[8]||d[11],16)/f*255),Math.round(parseInt(d[3]||d[6]||d[9]||d[12],16)/f*255)]}}else if(u.indexOf("#")===0&&(u=u.slice(1),a.exec(u)&&[3,6,9,12].includes(u.length))){for(var h=u.length/3,g=[0,0,0],v=0;v<3;++v){var m=parseInt(u.slice(h*v,h*v+h),16);g[v]=h===1?m<<4:h===2?m:h===3?m>>4:m>>8}return g}}},o.toRgbString=function(c,u){u===void 0&&(u=16);var d=c[0],f=c[1],h=c[2];return"rgb:"+l(d,u)+"/"+l(f,u)+"/"+l(h,u)}},5770:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var a=s(482),l=s(8742),c=s(5770),u=[],d=function(){function g(){this._handlers=Object.create(null),this._active=u,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return g.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=u},g.prototype.registerHandler=function(v,m){this._handlers[v]===void 0&&(this._handlers[v]=[]);var p=this._handlers[v];return p.push(m),{dispose:function(){var _=p.indexOf(m);_!==-1&&p.splice(_,1)}}},g.prototype.clearHandler=function(v){this._handlers[v]&&delete this._handlers[v]},g.prototype.setHandlerFallback=function(v){this._handlerFb=v},g.prototype.reset=function(){if(this._active.length)for(var v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].unhook(!1);this._stack.paused=!1,this._active=u,this._ident=0},g.prototype.hook=function(v,m){if(this.reset(),this._ident=v,this._active=this._handlers[v]||u,this._active.length)for(var p=this._active.length-1;p>=0;p--)this._active[p].hook(m);else this._handlerFb(this._ident,"HOOK",m)},g.prototype.put=function(v,m,p){if(this._active.length)for(var _=this._active.length-1;_>=0;_--)this._active[_].put(v,m,p);else this._handlerFb(this._ident,"PUT",(0,a.utf32ToString)(v,m,p))},g.prototype.unhook=function(v,m){if(m===void 0&&(m=!0),this._active.length){var p=!1,_=this._active.length-1,b=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,p=m,b=this._stack.fallThrough,this._stack.paused=!1),!b&&p===!1){for(;_>=0&&(p=this._active[_].unhook(v))!==!0;_--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,p;_--}for(;_>=0;_--)if((p=this._active[_].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",v);this._active=u,this._ident=0},g}();o.DcsParser=d;var f=new l.Params;f.addParam(0);var h=function(){function g(v){this._handler=v,this._data="",this._params=f,this._hitLimit=!1}return g.prototype.hook=function(v){this._params=v.length>1||v.params[0]?v.clone():f,this._data="",this._hitLimit=!1},g.prototype.put=function(v,m,p){this._hitLimit||(this._data+=(0,a.utf32ToString)(v,m,p),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},g.prototype.unhook=function(v){var m=this,p=!1;if(this._hitLimit)p=!1;else if(v&&(p=this._handler(this._data,this._params))instanceof Promise)return p.then(function(_){return m._params=f,m._data="",m._hitLimit=!1,_});return this._params=f,this._data="",this._hitLimit=!1,p},g}();o.DcsHandler=h},2015:function(r,o,s){var a,l=this&&this.__extends||(a=function(p,_){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,y){b.__proto__=y}||function(b,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(b[w]=y[w])},a(p,_)},function(p,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function b(){this.constructor=p}a(p,_),p.prototype=_===null?Object.create(_):(b.prototype=_.prototype,new b)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var c=s(844),u=s(8273),d=s(8742),f=s(6242),h=s(6351),g=function(){function p(_){this.table=new Uint8Array(_)}return p.prototype.setDefault=function(_,b){(0,u.fill)(this.table,_<<4|b)},p.prototype.add=function(_,b,y,w){this.table[b<<8|_]=y<<4|w},p.prototype.addMany=function(_,b,y,w){for(var k=0;k<_.length;k++)this.table[b<<8|_[k]]=y<<4|w},p}();o.TransitionTable=g;var v=160;o.VT500_TRANSITION_TABLE=function(){var p=new g(4095),_=Array.apply(null,Array(256)).map(function(T,L){return L}),b=function(T,L){return _.slice(T,L)},y=b(32,127),w=b(0,24);w.push(25),w.push.apply(w,b(28,32));var k,x=b(0,14);for(k in p.setDefault(1,0),p.addMany(y,0,2,0),x)p.addMany([24,26,153,154],k,3,0),p.addMany(b(128,144),k,3,0),p.addMany(b(144,152),k,3,0),p.add(156,k,0,0),p.add(27,k,11,1),p.add(157,k,4,8),p.addMany([152,158,159],k,0,7),p.add(155,k,11,3),p.add(144,k,11,9);return p.addMany(w,0,3,0),p.addMany(w,1,3,1),p.add(127,1,0,1),p.addMany(w,8,0,8),p.addMany(w,3,3,3),p.add(127,3,0,3),p.addMany(w,4,3,4),p.add(127,4,0,4),p.addMany(w,6,3,6),p.addMany(w,5,3,5),p.add(127,5,0,5),p.addMany(w,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(y,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(b(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(y,7,0,7),p.addMany(w,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(b(64,127),3,7,0),p.addMany(b(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(b(48,60),4,8,4),p.addMany(b(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(b(32,64),6,0,6),p.add(127,6,0,6),p.addMany(b(64,127),6,0,0),p.addMany(b(32,48),3,9,5),p.addMany(b(32,48),5,9,5),p.addMany(b(48,64),5,0,6),p.addMany(b(64,127),5,7,0),p.addMany(b(32,48),4,9,5),p.addMany(b(32,48),1,9,2),p.addMany(b(32,48),2,9,2),p.addMany(b(48,127),2,10,0),p.addMany(b(48,80),1,10,0),p.addMany(b(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(b(96,127),1,10,0),p.add(80,1,11,9),p.addMany(w,9,0,9),p.add(127,9,0,9),p.addMany(b(28,32),9,0,9),p.addMany(b(32,48),9,9,12),p.addMany(b(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(w,11,0,11),p.addMany(b(32,128),11,0,11),p.addMany(b(28,32),11,0,11),p.addMany(w,10,0,10),p.add(127,10,0,10),p.addMany(b(28,32),10,0,10),p.addMany(b(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(b(32,48),10,9,12),p.addMany(w,12,0,12),p.add(127,12,0,12),p.addMany(b(28,32),12,0,12),p.addMany(b(32,48),12,9,12),p.addMany(b(48,64),12,0,11),p.addMany(b(64,127),12,12,13),p.addMany(b(64,127),10,12,13),p.addMany(b(64,127),9,12,13),p.addMany(w,13,13,13),p.addMany(y,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(v,0,2,0),p.add(v,8,5,8),p.add(v,6,0,6),p.add(v,11,0,11),p.add(v,13,13,13),p}();var m=function(p){function _(b){b===void 0&&(b=o.VT500_TRANSITION_TABLE);var y=p.call(this)||this;return y._transitions=b,y._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},y.initialState=0,y.currentState=y.initialState,y._params=new d.Params,y._params.addParam(0),y._collect=0,y.precedingCodepoint=0,y._printHandlerFb=function(w,k,x){},y._executeHandlerFb=function(w){},y._csiHandlerFb=function(w,k){},y._escHandlerFb=function(w){},y._errorHandlerFb=function(w){return w},y._printHandler=y._printHandlerFb,y._executeHandlers=Object.create(null),y._csiHandlers=Object.create(null),y._escHandlers=Object.create(null),y._oscParser=new f.OscParser,y._dcsParser=new h.DcsParser,y._errorHandler=y._errorHandlerFb,y.registerEscHandler({final:"\\"},function(){return!0}),y}return l(_,p),_.prototype._identifier=function(b,y){y===void 0&&(y=[64,126]);var w=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if((w=b.prefix.charCodeAt(0))&&60>w||w>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var k=0;k<b.intermediates.length;++k){var x=b.intermediates.charCodeAt(k);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");w<<=8,w|=x}}if(b.final.length!==1)throw new Error("final must be a single byte");var T=b.final.charCodeAt(0);if(y[0]>T||T>y[1])throw new Error("final must be in range "+y[0]+" .. "+y[1]);return(w<<=8)|T},_.prototype.identToString=function(b){for(var y=[];b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")},_.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},_.prototype.setPrintHandler=function(b){this._printHandler=b},_.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},_.prototype.registerEscHandler=function(b,y){var w=this._identifier(b,[48,126]);this._escHandlers[w]===void 0&&(this._escHandlers[w]=[]);var k=this._escHandlers[w];return k.push(y),{dispose:function(){var x=k.indexOf(y);x!==-1&&k.splice(x,1)}}},_.prototype.clearEscHandler=function(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]},_.prototype.setEscHandlerFallback=function(b){this._escHandlerFb=b},_.prototype.setExecuteHandler=function(b,y){this._executeHandlers[b.charCodeAt(0)]=y},_.prototype.clearExecuteHandler=function(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]},_.prototype.setExecuteHandlerFallback=function(b){this._executeHandlerFb=b},_.prototype.registerCsiHandler=function(b,y){var w=this._identifier(b);this._csiHandlers[w]===void 0&&(this._csiHandlers[w]=[]);var k=this._csiHandlers[w];return k.push(y),{dispose:function(){var x=k.indexOf(y);x!==-1&&k.splice(x,1)}}},_.prototype.clearCsiHandler=function(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]},_.prototype.setCsiHandlerFallback=function(b){this._csiHandlerFb=b},_.prototype.registerDcsHandler=function(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)},_.prototype.clearDcsHandler=function(b){this._dcsParser.clearHandler(this._identifier(b))},_.prototype.setDcsHandlerFallback=function(b){this._dcsParser.setHandlerFallback(b)},_.prototype.registerOscHandler=function(b,y){return this._oscParser.registerHandler(b,y)},_.prototype.clearOscHandler=function(b){this._oscParser.clearHandler(b)},_.prototype.setOscHandlerFallback=function(b){this._oscParser.setHandlerFallback(b)},_.prototype.setErrorHandler=function(b){this._errorHandler=b},_.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},_.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},_.prototype._preserveStack=function(b,y,w,k,x){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=w,this._parseStack.transition=k,this._parseStack.chunkPos=x},_.prototype.parse=function(b,y,w){var k,x=0,T=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(w===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var D=this._parseStack.handlers,R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(w===!1&&R>-1){for(;R>=0&&(k=D[R](this._params))!==!0;R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 4:if(w===!1&&R>-1){for(;R>=0&&(k=D[R]())!==!0;R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 6:if(x=b[this._parseStack.chunkPos],k=this._dcsParser.unhook(x!==24&&x!==26,w))return k;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=b[this._parseStack.chunkPos],k=this._oscParser.end(x!==24&&x!==26,w))return k;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var M=L;M<y;++M){switch(x=b[M],(T=this._transitions.table[this.currentState<<8|(x<160?x:v)])>>4){case 2:for(var A=M+1;;++A){if(A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:M,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var X=(D=this._csiHandlers[this._collect<<8|x])?D.length-1:-1;X>=0&&(k=D[X](this._params))!==!0;X--)if(k instanceof Promise)return this._preserveStack(3,D,X,T,M),k;X<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingCodepoint=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++M<y&&(x=b[M])>47&&x<60);M--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:for(var H=this._escHandlers[this._collect<<8|x],O=H?H.length-1:-1;O>=0&&(k=H[O]())!==!0;O--)if(k instanceof Promise)return this._preserveStack(4,H,O,T,M),k;O<0&&this._escHandlerFb(this._collect<<8|x),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|x,this._params);break;case 13:for(var W=M+1;;++W)if(W>=y||(x=b[W])===24||x===26||x===27||x>127&&x<v){this._dcsParser.put(b,M,W),M=W-1;break}break;case 14:if(k=this._dcsParser.unhook(x!==24&&x!==26))return this._preserveStack(6,[],0,T,M),k;x===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var V=M+1;;V++)if(V>=y||(x=b[V])<32||x>127&&x<v){this._oscParser.put(b,M,V),M=V-1;break}break;case 6:if(k=this._oscParser.end(x!==24&&x!==26))return this._preserveStack(5,[],0,T,M),k;x===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&T}},_}(c.Disposable);o.EscapeSequenceParser=m},6242:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var a=s(5770),l=s(482),c=[],u=function(){function f(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return f.prototype.registerHandler=function(h,g){this._handlers[h]===void 0&&(this._handlers[h]=[]);var v=this._handlers[h];return v.push(g),{dispose:function(){var m=v.indexOf(g);m!==-1&&v.splice(m,1)}}},f.prototype.clearHandler=function(h){this._handlers[h]&&delete this._handlers[h]},f.prototype.setHandlerFallback=function(h){this._handlerFb=h},f.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=c},f.prototype.reset=function(){if(this._state===2)for(var h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0},f.prototype._start=function(){if(this._active=this._handlers[this._id]||c,this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")},f.prototype._put=function(h,g,v){if(this._active.length)for(var m=this._active.length-1;m>=0;m--)this._active[m].put(h,g,v);else this._handlerFb(this._id,"PUT",(0,l.utf32ToString)(h,g,v))},f.prototype.start=function(){this.reset(),this._state=1},f.prototype.put=function(h,g,v){if(this._state!==3){if(this._state===1)for(;g<v;){var m=h[g++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&v-g>0&&this._put(h,g,v)}},f.prototype.end=function(h,g){if(g===void 0&&(g=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var v=!1,m=this._active.length-1,p=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,v=g,p=this._stack.fallThrough,this._stack.paused=!1),!p&&v===!1){for(;m>=0&&(v=this._active[m].end(h))!==!0;m--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,v;m--}for(;m>=0;m--)if((v=this._active[m].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,v}else this._handlerFb(this._id,"END",h);this._active=c,this._id=-1,this._state=0}},f}();o.OscParser=u;var d=function(){function f(h){this._handler=h,this._data="",this._hitLimit=!1}return f.prototype.start=function(){this._data="",this._hitLimit=!1},f.prototype.put=function(h,g,v){this._hitLimit||(this._data+=(0,l.utf32ToString)(h,g,v),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},f.prototype.end=function(h){var g=this,v=!1;if(this._hitLimit)v=!1;else if(h&&(v=this._handler(this._data))instanceof Promise)return v.then(function(m){return g._data="",g._hitLimit=!1,m});return this._data="",this._hitLimit=!1,v},f}();o.OscHandler=d},8742:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var s=2147483647,a=function(){function l(c,u){if(c===void 0&&(c=32),u===void 0&&(u=32),this.maxLength=c,this.maxSubParamsLength=u,u>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(u),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return l.fromArray=function(c){var u=new l;if(!c.length)return u;for(var d=Array.isArray(c[0])?1:0;d<c.length;++d){var f=c[d];if(Array.isArray(f))for(var h=0;h<f.length;++h)u.addSubParam(f[h]);else u.addParam(f)}return u},l.prototype.clone=function(){var c=new l(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c},l.prototype.toArray=function(){for(var c=[],u=0;u<this.length;++u){c.push(this.params[u]);var d=this._subParamsIdx[u]>>8,f=255&this._subParamsIdx[u];f-d>0&&c.push(Array.prototype.slice.call(this._subParams,d,f))}return c},l.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},l.prototype.addParam=function(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>s?s:c}},l.prototype.addSubParam=function(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>s?s:c,this._subParamsIdx[this.length-1]++}},l.prototype.hasSubParams=function(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0},l.prototype.getSubParams=function(c){var u=this._subParamsIdx[c]>>8,d=255&this._subParamsIdx[c];return d-u>0?this._subParams.subarray(u,d):null},l.prototype.getSubParamsAll=function(){for(var c={},u=0;u<this.length;++u){var d=this._subParamsIdx[u]>>8,f=255&this._subParamsIdx[u];f-d>0&&(c[u]=this._subParams.slice(d,f))}return c},l.prototype.addDigit=function(c){var u;if(!(this._rejectDigits||!(u=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var d=this._digitIsSub?this._subParams:this.params,f=d[u-1];d[u-1]=~f?Math.min(10*f+c,s):c}},l}();o.Params=a},5741:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var s=function(){function a(){this._addons=[]}return a.prototype.dispose=function(){for(var l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()},a.prototype.loadAddon=function(l,c){var u=this,d={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(d),c.dispose=function(){return u._wrappedAddonDispose(d)},c.activate(l)},a.prototype._wrappedAddonDispose=function(l){if(!l.isDisposed){for(var c=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===l){c=u;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}},a}();o.AddonManager=s},8771:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;var a=s(3785),l=s(511),c=function(){function u(d,f){this._buffer=d,this.type=f}return u.prototype.init=function(d){return this._buffer=d,this},Object.defineProperty(u.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),u.prototype.getLine=function(d){var f=this._buffer.lines.get(d);if(f)return new a.BufferLineApiView(f)},u.prototype.getNullCell=function(){return new l.CellData},u}();o.BufferApiView=c},3785:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;var a=s(511),l=function(){function c(u){this._line=u}return Object.defineProperty(c.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),c.prototype.getCell=function(u,d){if(!(u<0||u>=this._line.length))return d?(this._line.loadCell(u,d),d):this._line.loadCell(u,new a.CellData)},c.prototype.translateToString=function(u,d,f){return this._line.translateToString(u,d,f)},c}();o.BufferLineApiView=l},8285:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;var a=s(8771),l=s(8460),c=function(){function u(d){var f=this;this._core=d,this._onBufferChange=new l.EventEmitter,this._normal=new a.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new a.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return f._onBufferChange.fire(f.active)})}return Object.defineProperty(u.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),u}();o.BufferNamespaceApi=c},7975:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.registerCsiHandler=function(l,c){return this._core.registerCsiHandler(l,function(u){return c(u.toArray())})},a.prototype.addCsiHandler=function(l,c){return this.registerCsiHandler(l,c)},a.prototype.registerDcsHandler=function(l,c){return this._core.registerDcsHandler(l,function(u,d){return c(u,d.toArray())})},a.prototype.addDcsHandler=function(l,c){return this.registerDcsHandler(l,c)},a.prototype.registerEscHandler=function(l,c){return this._core.registerEscHandler(l,c)},a.prototype.addEscHandler=function(l,c){return this.registerEscHandler(l,c)},a.prototype.registerOscHandler=function(l,c){return this._core.registerOscHandler(l,c)},a.prototype.addOscHandler=function(l,c){return this.registerOscHandler(l,c)},a}();o.ParserApi=s},7090:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.register=function(l){this._core.unicodeService.register(l)},Object.defineProperty(a.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(l){this._core.unicodeService.activeVersion=l},enumerable:!1,configurable:!0}),a}();o.UnicodeApi=s},744:function(r,o,s){var a,l=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,b){_.__proto__=b}||function(_,b){for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(_[y]=b[y])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function _(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(_.prototype=p.prototype,new _)}),c=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},u=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var d=s(2585),f=s(5295),h=s(8460),g=s(844);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var v=function(m){function p(_){var b=m.call(this)||this;return b._optionsService=_,b.isUserScrolling=!1,b._onResize=new h.EventEmitter,b._onScroll=new h.EventEmitter,b.cols=Math.max(_.rawOptions.cols||0,o.MINIMUM_COLS),b.rows=Math.max(_.rawOptions.rows||0,o.MINIMUM_ROWS),b.buffers=new f.BufferSet(_,b),b}return l(p,m),Object.defineProperty(p.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){m.prototype.dispose.call(this),this.buffers.dispose()},p.prototype.resize=function(_,b){this.cols=_,this.rows=b,this.buffers.resize(_,b),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:_,rows:b})},p.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},p.prototype.scroll=function(_,b){b===void 0&&(b=!1);var y,w=this.buffer;(y=this._cachedBlankLine)&&y.length===this.cols&&y.getFg(0)===_.fg&&y.getBg(0)===_.bg||(y=w.getBlankLine(_,b),this._cachedBlankLine=y),y.isWrapped=b;var k=w.ybase+w.scrollTop,x=w.ybase+w.scrollBottom;if(w.scrollTop===0){var T=w.lines.isFull;x===w.lines.length-1?T?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(x+1,0,y.clone()),T?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{var L=x-k+1;w.lines.shiftElements(k+1,L-1,-1),w.lines.set(x,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)},p.prototype.scrollLines=function(_,b,y){var w=this.buffer;if(_<0){if(w.ydisp===0)return;this.isUserScrolling=!0}else _+w.ydisp>=w.ybase&&(this.isUserScrolling=!1);var k=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+_,w.ybase),0),k!==w.ydisp&&(b||this._onScroll.fire(w.ydisp))},p.prototype.scrollPages=function(_){this.scrollLines(_*(this.rows-1))},p.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},p.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},p.prototype.scrollToLine=function(_){var b=_-this.buffer.ydisp;b!==0&&this.scrollLines(b)},c([u(0,d.IOptionsService)],p)}(g.Disposable);o.BufferService=v},7994:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var s=function(){function a(){this.glevel=0,this._charsets=[]}return a.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},a.prototype.setgLevel=function(l){this.glevel=l,this.charset=this._charsets[l]},a.prototype.setgCharset=function(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)},a}();o.CharsetService=s},1753:function(r,o,s){var a=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},l=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var c=s(2585),u=s(8460),d={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(m){return m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)}},VT200:{events:19,restrict:function(m){return m.action!==32}},DRAG:{events:23,restrict:function(m){return m.action!==32||m.button!==3}},ANY:{events:31,restrict:function(m){return!0}}};function f(m,p){var _=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(_|=64,_|=m.action):(_|=3&m.button,4&m.button&&(_|=64),8&m.button&&(_|=128),m.action===32?_|=32:m.action!==0||p||(_|=3)),_}var h=String.fromCharCode,g={DEFAULT:function(m){var p=[f(m,!1)+32,m.col+32,m.row+32];return p[0]>255||p[1]>255||p[2]>255?"":"\x1B[M"+h(p[0])+h(p[1])+h(p[2])},SGR:function(m){var p=m.action===0&&m.button!==4?"m":"M";return"\x1B[<"+f(m,!0)+";"+m.col+";"+m.row+p}},v=function(){function m(p,_){this._bufferService=p,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new u.EventEmitter,this._lastEvent=null;for(var b=0,y=Object.keys(d);b<y.length;b++){var w=y[b];this.addProtocol(w,d[w])}for(var k=0,x=Object.keys(g);k<x.length;k++){var T=x[k];this.addEncoding(T,g[T])}this.reset()}return m.prototype.addProtocol=function(p,_){this._protocols[p]=_},m.prototype.addEncoding=function(p,_){this._encodings[p]=_},Object.defineProperty(m.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(p){if(!this._protocols[p])throw new Error('unknown protocol "'+p+'"');this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(p){if(!this._encodings[p])throw new Error('unknown encoding "'+p+'"');this._activeEncoding=p},enumerable:!1,configurable:!0}),m.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(m.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),m.prototype.triggerMouseEvent=function(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,p))||!this._protocols[this._activeProtocol].restrict(p))return!1;var _=this._encodings[this._activeEncoding](p);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=p,!0},m.prototype.explainEvents=function(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}},m.prototype._compareEvents=function(p,_){return p.col===_.col&&p.row===_.row&&p.button===_.button&&p.action===_.action&&p.ctrl===_.ctrl&&p.alt===_.alt&&p.shift===_.shift},a([l(0,c.IBufferService),l(1,c.ICoreService)],m)}();o.CoreMouseService=v},6975:function(r,o,s){var a,l=this&&this.__extends||(a=function(_,b){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,w){y.__proto__=w}||function(y,w){for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(y[k]=w[k])},a(_,b)},function(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function y(){this.constructor=_}a(_,b),_.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}),c=this&&this.__decorate||function(_,b,y,w){var k,x=arguments.length,T=x<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,b,y,w);else for(var L=_.length-1;L>=0;L--)(k=_[L])&&(T=(x<3?k(T):x>3?k(b,y,T):k(b,y))||T);return x>3&&T&&Object.defineProperty(b,y,T),T},u=this&&this.__param||function(_,b){return function(y,w){b(y,w,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var d=s(2585),f=s(8460),h=s(1439),g=s(844),v=Object.freeze({insertMode:!1}),m=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),p=function(_){function b(y,w,k,x){var T=_.call(this)||this;return T._bufferService=w,T._logService=k,T._optionsService=x,T.isCursorInitialized=!1,T.isCursorHidden=!1,T._onData=T.register(new f.EventEmitter),T._onUserInput=T.register(new f.EventEmitter),T._onBinary=T.register(new f.EventEmitter),T._scrollToBottom=y,T.register({dispose:function(){return T._scrollToBottom=void 0}}),T.modes=(0,h.clone)(v),T.decPrivateModes=(0,h.clone)(m),T}return l(b,_),Object.defineProperty(b.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),b.prototype.reset=function(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(m)},b.prototype.triggerDataEvent=function(y,w){if(w===void 0&&(w=!1),!this._optionsService.rawOptions.disableStdin){var k=this._bufferService.buffer;k.ybase!==k.ydisp&&this._scrollToBottom(),w&&this._onUserInput.fire(),this._logService.debug('sending data "'+y+'"',function(){return y.split("").map(function(x){return x.charCodeAt(0)})}),this._onData.fire(y)}},b.prototype.triggerBinaryEvent=function(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+y+'"',function(){return y.split("").map(function(w){return w.charCodeAt(0)})}),this._onBinary.fire(y))},c([u(1,d.IBufferService),u(2,d.ILogService),u(3,d.IOptionsService)],b)}(g.Disposable);o.CoreService=p},3730:function(r,o,s){var a=this&&this.__decorate||function(d,f,h,g){var v,m=arguments.length,p=m<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,h):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(d,f,h,g);else for(var _=d.length-1;_>=0;_--)(v=d[_])&&(p=(m<3?v(p):m>3?v(f,h,p):v(f,h))||p);return m>3&&p&&Object.defineProperty(f,h,p),p},l=this&&this.__param||function(d,f){return function(h,g){f(h,g,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var c=s(2585),u=function(){function d(f){this._bufferService=f,this.clearRange()}return Object.defineProperty(d.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),d.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},d.prototype.markDirty=function(f){f<this._start?this._start=f:f>this._end&&(this._end=f)},d.prototype.markRangeDirty=function(f,h){if(f>h){var g=f;f=h,h=g}f<this._start&&(this._start=f),h>this._end&&(this._end=h)},d.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},a([l(0,c.IBufferService)],d)}();o.DirtyRowService=u},4348:function(r,o,s){var a=this&&this.__spreadArray||function(f,h,g){if(g||arguments.length===2)for(var v,m=0,p=h.length;m<p;m++)!v&&m in h||(v||(v=Array.prototype.slice.call(h,0,m)),v[m]=h[m]);return f.concat(v||Array.prototype.slice.call(h))};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var l=s(2585),c=s(8343),u=function(){function f(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];this._entries=new Map;for(var v=0,m=h;v<m.length;v++){var p=m[v],_=p[0],b=p[1];this.set(_,b)}}return f.prototype.set=function(h,g){var v=this._entries.get(h);return this._entries.set(h,g),v},f.prototype.forEach=function(h){this._entries.forEach(function(g,v){return h(v,g)})},f.prototype.has=function(h){return this._entries.has(h)},f.prototype.get=function(h){return this._entries.get(h)},f}();o.ServiceCollection=u;var d=function(){function f(){this._services=new u,this._services.set(l.IInstantiationService,this)}return f.prototype.setService=function(h,g){this._services.set(h,g)},f.prototype.getService=function(h){return this._services.get(h)},f.prototype.createInstance=function(h){for(var g=[],v=1;v<arguments.length;v++)g[v-1]=arguments[v];for(var m=(0,c.getServiceDependencies)(h).sort(function(x,T){return x.index-T.index}),p=[],_=0,b=m;_<b.length;_++){var y=b[_],w=this._services.get(y.id);if(!w)throw new Error("[createInstance] "+h.name+" depends on UNKNOWN service "+y.id+".");p.push(w)}var k=m.length>0?m[0].index:g.length;if(g.length!==k)throw new Error("[createInstance] First service dependency of "+h.name+" at position "+(k+1)+" conflicts with "+g.length+" static arguments");return new(h.bind.apply(h,a([void 0],a(a([],g,!0),p,!0),!1)))},f}();o.InstantiationService=d},7866:function(r,o,s){var a=this&&this.__decorate||function(h,g,v,m){var p,_=arguments.length,b=_<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,g,v,m);else for(var y=h.length-1;y>=0;y--)(p=h[y])&&(b=(_<3?p(b):_>3?p(g,v,b):p(g,v))||b);return _>3&&b&&Object.defineProperty(g,v,b),b},l=this&&this.__param||function(h,g){return function(v,m){g(v,m,h)}},c=this&&this.__spreadArray||function(h,g,v){if(v||arguments.length===2)for(var m,p=0,_=g.length;p<_;p++)!m&&p in g||(m||(m=Array.prototype.slice.call(g,0,p)),m[p]=g[p]);return h.concat(m||Array.prototype.slice.call(g))};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=void 0;var u=s(2585),d={debug:u.LogLevelEnum.DEBUG,info:u.LogLevelEnum.INFO,warn:u.LogLevelEnum.WARN,error:u.LogLevelEnum.ERROR,off:u.LogLevelEnum.OFF},f=function(){function h(g){var v=this;this._optionsService=g,this.logLevel=u.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(m){m==="logLevel"&&v._updateLogLevel()})}return h.prototype._updateLogLevel=function(){this.logLevel=d[this._optionsService.rawOptions.logLevel]},h.prototype._evalLazyOptionalParams=function(g){for(var v=0;v<g.length;v++)typeof g[v]=="function"&&(g[v]=g[v]())},h.prototype._log=function(g,v,m){this._evalLazyOptionalParams(m),g.call.apply(g,c([console,"xterm.js: "+v],m,!1))},h.prototype.debug=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.DEBUG&&this._log(console.log,g,v)},h.prototype.info=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.INFO&&this._log(console.info,g,v)},h.prototype.warn=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.WARN&&this._log(console.warn,g,v)},h.prototype.error=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.ERROR&&this._log(console.error,g,v)},a([l(0,u.IOptionsService)],h)}();o.LogService=f},7302:function(r,o,s){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var h,g=1,v=arguments.length;g<v;g++)for(var m in h=arguments[g])Object.prototype.hasOwnProperty.call(h,m)&&(f[m]=h[m]);return f},a.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var l=s(8460),c=s(6114);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:c.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var u=["normal","bold","100","200","300","400","500","600","700","800","900"],d=function(){function f(h){this._onOptionChange=new l.EventEmitter;var g=a({},o.DEFAULT_OPTIONS);for(var v in h)if(v in g)try{var m=h[v];g[v]=this._sanitizeAndValidateOption(v,m)}catch(p){console.error(p)}this.rawOptions=g,this.options=a({},g),this._setupOptions()}return Object.defineProperty(f.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),f.prototype._setupOptions=function(){var h=this,g=function(_){if(!(_ in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+_+'"');return h.rawOptions[_]},v=function(_,b){if(!(_ in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+_+'"');b=h._sanitizeAndValidateOption(_,b),h.rawOptions[_]!==b&&(h.rawOptions[_]=b,h._onOptionChange.fire(_))};for(var m in this.rawOptions){var p={get:g.bind(this,m),set:v.bind(this,m)};Object.defineProperty(this.options,m,p)}},f.prototype.setOption=function(h,g){this.options[h]=g},f.prototype._sanitizeAndValidateOption=function(h,g){switch(h){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":g||(g=o.DEFAULT_OPTIONS[h]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=u.includes(g)?g:o.DEFAULT_OPTIONS[h];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(h+" cannot be less than 1, value: "+g);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(h+" cannot be less than 0, value: "+g);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(h+" cannot be less than or equal to 0, value: "+g);case"rows":case"cols":if(!g&&g!==0)throw new Error(h+" must be numeric, value: "+g)}return g},f.prototype.getOption=function(h){return this.options[h]},f}();o.OptionsService=d},8343:(r,o)=>{function s(a,l,c){l.di$target===l?l.di$dependencies.push({id:a,index:c}):(l.di$dependencies=[{id:a,index:c}],l.di$target=l)}Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0,o.serviceRegistry=new Map,o.getServiceDependencies=function(a){return a.di$dependencies||[]},o.createDecorator=function(a){if(o.serviceRegistry.has(a))return o.serviceRegistry.get(a);var l=function(c,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(l,c,d)};return l.toString=function(){return a},o.serviceRegistry.set(a,l),l}},2585:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IUnicodeService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var a,l=s(8343);o.IBufferService=(0,l.createDecorator)("BufferService"),o.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),o.ICoreService=(0,l.createDecorator)("CoreService"),o.ICharsetService=(0,l.createDecorator)("CharsetService"),o.IDirtyRowService=(0,l.createDecorator)("DirtyRowService"),o.IInstantiationService=(0,l.createDecorator)("InstantiationService"),(a=o.LogLevelEnum||(o.LogLevelEnum={}))[a.DEBUG=0]="DEBUG",a[a.INFO=1]="INFO",a[a.WARN=2]="WARN",a[a.ERROR=3]="ERROR",a[a.OFF=4]="OFF",o.ILogService=(0,l.createDecorator)("LogService"),o.IOptionsService=(0,l.createDecorator)("OptionsService"),o.IUnicodeService=(0,l.createDecorator)("UnicodeService")},1480:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var a=s(8460),l=s(225),c=function(){function u(){this._providers=Object.create(null),this._active="",this._onChange=new a.EventEmitter;var d=new l.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}return Object.defineProperty(u.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"activeVersion",{get:function(){return this._active},set:function(d){if(!this._providers[d])throw new Error('unknown Unicode version "'+d+'"');this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)},enumerable:!1,configurable:!0}),u.prototype.register=function(d){this._providers[d.version]=d},u.prototype.wcwidth=function(d){return this._activeProvider.wcwidth(d)},u.prototype.getStringCellWidth=function(d){for(var f=0,h=d.length,g=0;g<h;++g){var v=d.charCodeAt(g);if(55296<=v&&v<=56319){if(++g>=h)return f+this.wcwidth(v);var m=d.charCodeAt(g);56320<=m&&m<=57343?v=1024*(v-55296)+m-56320+65536:f+=this.wcwidth(m)}f+=this.wcwidth(v)}return f},u}();o.UnicodeService=c}},i={};return function r(o){var s=i[o];if(s!==void 0)return s.exports;var a=i[o]={exports:{}};return t[o].call(a.exports,a,a.exports,r),a.exports}(4389)})()})})(vj);function ame(n,e){if(n===e)return!0;for(var t=0;t<n.length;t++)if(!Object.is(n[t],e[t]))return!1;return!0}function jbt(n){var e=N.exports.useRef(n);return e.current=n,e}var qbt=function(e){var t=jbt(e);N.exports.useEffect(function(){return function(){t.current()}},[])},lme=qbt,Kbt=!!(typeof window!="undefined"&&window.document&&window.document.createElement),cme=Kbt;function ume(n,e){if(!!cme){if(!n)return e;var t;return typeof n=="function"?t=n():"current"in n?t=n.current:t=n,t}}var Gbt=function(e){var t=function(r,o,s){var a=N.exports.useRef(!1),l=N.exports.useRef([]),c=N.exports.useRef([]),u=N.exports.useRef();e(function(){var d,f=Array.isArray(s)?s:[s],h=f.map(function(g){return ume(g)});if(!a.current){a.current=!0,l.current=h,c.current=o,u.current=r();return}(h.length!==l.current.length||!ame(h,l.current)||!ame(o,c.current))&&((d=u.current)===null||d===void 0||d.call(u),l.current=h,c.current=o,u.current=r())}),lme(function(){var d;(d=u.current)===null||d===void 0||d.call(u),a.current=!1})};return t},dme=Gbt,Ybt=dme(N.exports.useEffect),Zbt=Ybt,Xbt=globalThis&&globalThis.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return o};function Qbt(n){var e=N.exports.useRef(0),t=Xbt(N.exports.useState(n),2),i=t[0],r=t[1],o=N.exports.useCallback(function(s){cancelAnimationFrame(e.current),e.current=requestAnimationFrame(function(){r(s)})},[]);return lme(function(){cancelAnimationFrame(e.current)}),[i,o]}var hme=function(){if(typeof Map!="undefined")return Map;function n(e,t){var i=-1;return e.some(function(r,o){return r[0]===t?(i=o,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var i=n(this.__entries__,t),r=this.__entries__[i];return r&&r[1]},e.prototype.set=function(t,i){var r=n(this.__entries__,t);~r?this.__entries__[r][1]=i:this.__entries__.push([t,i])},e.prototype.delete=function(t){var i=this.__entries__,r=n(i,t);~r&&i.splice(r,1)},e.prototype.has=function(t){return!!~n(this.__entries__,t)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,i){i===void 0&&(i=null);for(var r=0,o=this.__entries__;r<o.length;r++){var s=o[r];t.call(i,s[1],s[0])}},e}()}(),bj=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,zM=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Jbt=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(zM):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),e0t=2;function t0t(n,e){var t=!1,i=!1,r=0;function o(){t&&(t=!1,n()),i&&a()}function s(){Jbt(o)}function a(){var l=Date.now();if(t){if(l-r<e0t)return;i=!0}else t=!0,i=!1,setTimeout(s,e);r=l}return a}var n0t=20,i0t=["top","right","bottom","left","width","height","size","weight"],r0t=typeof MutationObserver!="undefined",o0t=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=t0t(this.refresh.bind(this),n0t)}return n.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},n.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},n.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},n.prototype.connect_=function(){!bj||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),r0t?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!bj||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=t===void 0?"":t,r=i0t.some(function(o){return!!~i.indexOf(o)});r&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),fme=function(n,e){for(var t=0,i=Object.keys(e);t<i.length;t++){var r=i[t];Object.defineProperty(n,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return n},uy=function(n){var e=n&&n.ownerDocument&&n.ownerDocument.defaultView;return e||zM},gme=jM(0,0,0,0);function UM(n){return parseFloat(n)||0}function pme(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(i,r){var o=n["border-"+r+"-width"];return i+UM(o)},0)}function s0t(n){for(var e=["top","right","bottom","left"],t={},i=0,r=e;i<r.length;i++){var o=r[i],s=n["padding-"+o];t[o]=UM(s)}return t}function a0t(n){var e=n.getBBox();return jM(0,0,e.width,e.height)}function l0t(n){var e=n.clientWidth,t=n.clientHeight;if(!e&&!t)return gme;var i=uy(n).getComputedStyle(n),r=s0t(i),o=r.left+r.right,s=r.top+r.bottom,a=UM(i.width),l=UM(i.height);if(i.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=pme(i,"left","right")+o),Math.round(l+s)!==t&&(l-=pme(i,"top","bottom")+s)),!u0t(n)){var c=Math.round(a+o)-e,u=Math.round(l+s)-t;Math.abs(c)!==1&&(a-=c),Math.abs(u)!==1&&(l-=u)}return jM(r.left,r.top,a,l)}var c0t=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof uy(n).SVGGraphicsElement}:function(n){return n instanceof uy(n).SVGElement&&typeof n.getBBox=="function"}}();function u0t(n){return n===uy(n).document.documentElement}function d0t(n){return bj?c0t(n)?a0t(n):l0t(n):gme}function h0t(n){var e=n.x,t=n.y,i=n.width,r=n.height,o=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return fme(s,{x:e,y:t,width:i,height:r,top:t,right:e+i,bottom:r+t,left:e}),s}function jM(n,e,t,i){return{x:n,y:e,width:t,height:i}}var f0t=function(){function n(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=jM(0,0,0,0),this.target=e}return n.prototype.isActive=function(){var e=d0t(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},n}(),g0t=function(){function n(e,t){var i=h0t(t);fme(this,{target:e,contentRect:i})}return n}(),p0t=function(){function n(e,t,i){if(this.activeObservations_=[],this.observations_=new hme,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return n.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof uy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new f0t(e)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof uy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;!t.has(e)||(t.delete(e),t.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},n.prototype.broadcastActive=function(){if(!!this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(i){return new g0t(i.target,i.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),mme=typeof WeakMap!="undefined"?new WeakMap:new hme,_me=function(){function n(e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=o0t.getInstance(),i=new p0t(e,t,this);mme.set(this,i)}return n}();["observe","unobserve","disconnect"].forEach(function(n){_me.prototype[n]=function(){var e;return(e=mme.get(this))[n].apply(e,arguments)}});var m0t=function(){return typeof zM.ResizeObserver!="undefined"?zM.ResizeObserver:_me}(),_0t=dme(N.exports.useLayoutEffect),v0t=_0t,b0t=cme?v0t:Zbt,C0t=b0t,y0t=globalThis&&globalThis.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return o};function w0t(n){var e=y0t(Qbt(),2),t=e[0],i=e[1];return C0t(function(){var r=ume(n);if(!!r){var o=new m0t(function(s){s.forEach(function(a){var l=a.target,c=l.clientWidth,u=l.clientHeight;i({width:c,height:u})})});return o.observe(r),function(){o.disconnect()}}},[],n),t}var vme={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={775:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0;var s=function(){function a(){}return a.prototype.activate=function(l){this._terminal=l},a.prototype.dispose=function(){},a.prototype.fit=function(){var l=this.proposeDimensions();if(l&&this._terminal){var c=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(c._renderService.clear(),this._terminal.resize(l.cols,l.rows))}},a.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var l=this._terminal._core;if(l._renderService.dimensions.actualCellWidth!==0&&l._renderService.dimensions.actualCellHeight!==0){var c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),d=Math.max(0,parseInt(c.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),h=u-(parseInt(f.getPropertyValue("padding-top"))+parseInt(f.getPropertyValue("padding-bottom"))),g=d-(parseInt(f.getPropertyValue("padding-right"))+parseInt(f.getPropertyValue("padding-left")))-l.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(g/l._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(h/l._renderService.dimensions.actualCellHeight))}}}},a}();o.FitAddon=s}},i={};return function r(o){if(i[o])return i[o].exports;var s=i[o]={exports:{}};return t[o](s,s.exports,r),s.exports}(775)})()})})(vme);const bme=new vme.exports.FitAddon,Cme=r=>{var o=r,{terminal:n,onKey:e,fitHook:t}=o,i=Br(o,["terminal","onKey","fitHook"]);const s=Ee({height:"100%",width:"100%",padding:"5px 5px"},i),a=N.exports.useRef(null),{fitTerminal:l}=c();u(),N.exports.useEffect(()=>{l()},[t]);function c(){const d=N.exports.useCallback(g=>{g!=null&&g.parentElement&&(n.loadAddon(bme),f(n),n.open(g),h())},[]),f=g=>{g.onKey(({key:v,domEvent:m})=>{let p=v;switch(v.charCodeAt(0)){case 13:break;case 27:switch(m.key){case"ArrowLeft":if(g.buffer.active.cursorX<=2)return;break}break;case 8:case 127:g.buffer.active.cursorX>2&&(p="\b");break}e==null||e(p)}),g.attachCustomKeyEventHandler(v=>{var p,_;const m=v.metaKey||v.ctrlKey;return v.type==="keyup"?!1:v.key==="v"&&m?((p=v.view)!=null&&p.navigator.clipboard?(_=v.view)==null||_.navigator.clipboard.readText().then(b=>e==null?void 0:e(b)):e==null||e(v.target.value),!1):!(v.key==="r"&&m)})},h=()=>{bme.fit()};return N.exports.useEffect(()=>{d(a.current)},[a]),{fitTerminal:h}}function u(){const d=w0t(a);N.exports.useEffect(()=>{l()},[d])}return be("div",{ref:a,style:s})};function S0t(i,t){var r=i,{options:n}=r,e=Br(r,["options"]);const o=N.exports.useMemo(()=>rt(Ee({convertEol:!0,fontSize:12,fontFamily:"Monaco, Menlo, monospace",lineHeight:1,cursorBlink:!0,cursorWidth:1,cursorStyle:"block",rightClickSelectsWord:!0},n),{theme:{background:Gp.extend.colors["dao-light-green"]}}),[n]),s=N.exports.useRef(!1),a=jt(d=>d.playgroundInfo.dockerInfo),l=Xt(d=>d.socket),c=AE("Console"),u=N.exports.useMemo(()=>new vj.exports.Terminal(rt(Ee({},o),{fontSize:14,lineHeight:1.5,fontFamily:"UbuntuMono, Ubuntu Mono, courier-new, courier, monospace"})),[o]);return N.exports.useImperativeHandle(t,()=>({clear:()=>{u&&u.clear()}})),N.exports.useEffect(()=>(l==null||l.on("console",d=>{const h=d.console;h&&u.write(h.value||"")}),()=>{l==null||l.off("terminal")}),[u,l]),N.exports.useEffect(()=>{console.log("dockerInfo",a),u&&a.consoleHistory&&!s.current&&u.write(a.consoleHistory),s.current=!0},[a,u]),be(uS,{children:be("div",{className:`console-container ${c?"component-focus":""}`,style:{height:"100%",width:"100%"},onClick:()=>{Kw("Console")},children:be(Cme,Ee({terminal:u},e))})})}var yme=N.exports.forwardRef(S0t),x0t=Object.freeze(Object.defineProperty({__proto__:null,default:yme},Symbol.toStringTag,{value:"Module"}));const k0t=Lr.div``,E0t=Lr.div`
1870
+ `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL="\x7F",(s=o.C1||(o.C1={})).PAD="\x80",s.HOP="\x81",s.BPH="\x82",s.NBH="\x83",s.IND="\x84",s.NEL="\x85",s.SSA="\x86",s.ESA="\x87",s.HTS="\x88",s.HTJ="\x89",s.VTS="\x8A",s.PLD="\x8B",s.PLU="\x8C",s.RI="\x8D",s.SS2="\x8E",s.SS3="\x8F",s.DCS="\x90",s.PU1="\x91",s.PU2="\x92",s.STS="\x93",s.CCH="\x94",s.MW="\x95",s.SPA="\x96",s.EPA="\x97",s.SOS="\x98",s.SGCI="\x99",s.SCI="\x9A",s.CSI="\x9B",s.ST="\x9C",s.OSC="\x9D",s.PM="\x9E",s.APC="\x9F"},7399:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var a=s(2584),l={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(c,u,d,f){var h={type:0,cancel:!1,key:void 0},g=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?h.key=u?a.C0.ESC+"OA":a.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?h.key=u?a.C0.ESC+"OD":a.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?h.key=u?a.C0.ESC+"OC":a.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(h.key=u?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(c.shiftKey){h.key=a.C0.BS;break}if(c.altKey){h.key=a.C0.ESC+a.C0.DEL;break}h.key=a.C0.DEL;break;case 9:if(c.shiftKey){h.key=a.C0.ESC+"[Z";break}h.key=a.C0.HT,h.cancel=!0;break;case 13:h.key=c.altKey?a.C0.ESC+a.C0.CR:a.C0.CR,h.cancel=!0;break;case 27:h.key=a.C0.ESC,c.altKey&&(h.key=a.C0.ESC+a.C0.ESC),h.cancel=!0;break;case 37:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"D",h.key===a.C0.ESC+"[1;3D"&&(h.key=a.C0.ESC+(d?"b":"[1;5D"))):h.key=u?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"C",h.key===a.C0.ESC+"[1;3C"&&(h.key=a.C0.ESC+(d?"f":"[1;5C"))):h.key=u?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"A",d||h.key!==a.C0.ESC+"[1;3A"||(h.key=a.C0.ESC+"[1;5A")):h.key=u?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(c.metaKey)break;g?(h.key=a.C0.ESC+"[1;"+(g+1)+"B",d||h.key!==a.C0.ESC+"[1;3B"||(h.key=a.C0.ESC+"[1;5B")):h.key=u?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:c.shiftKey||c.ctrlKey||(h.key=a.C0.ESC+"[2~");break;case 46:h.key=g?a.C0.ESC+"[3;"+(g+1)+"~":a.C0.ESC+"[3~";break;case 36:h.key=g?a.C0.ESC+"[1;"+(g+1)+"H":u?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:h.key=g?a.C0.ESC+"[1;"+(g+1)+"F":u?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:c.shiftKey?h.type=2:h.key=a.C0.ESC+"[5~";break;case 34:c.shiftKey?h.type=3:h.key=a.C0.ESC+"[6~";break;case 112:h.key=g?a.C0.ESC+"[1;"+(g+1)+"P":a.C0.ESC+"OP";break;case 113:h.key=g?a.C0.ESC+"[1;"+(g+1)+"Q":a.C0.ESC+"OQ";break;case 114:h.key=g?a.C0.ESC+"[1;"+(g+1)+"R":a.C0.ESC+"OR";break;case 115:h.key=g?a.C0.ESC+"[1;"+(g+1)+"S":a.C0.ESC+"OS";break;case 116:h.key=g?a.C0.ESC+"[15;"+(g+1)+"~":a.C0.ESC+"[15~";break;case 117:h.key=g?a.C0.ESC+"[17;"+(g+1)+"~":a.C0.ESC+"[17~";break;case 118:h.key=g?a.C0.ESC+"[18;"+(g+1)+"~":a.C0.ESC+"[18~";break;case 119:h.key=g?a.C0.ESC+"[19;"+(g+1)+"~":a.C0.ESC+"[19~";break;case 120:h.key=g?a.C0.ESC+"[20;"+(g+1)+"~":a.C0.ESC+"[20~";break;case 121:h.key=g?a.C0.ESC+"[21;"+(g+1)+"~":a.C0.ESC+"[21~";break;case 122:h.key=g?a.C0.ESC+"[23;"+(g+1)+"~":a.C0.ESC+"[23~";break;case 123:h.key=g?a.C0.ESC+"[24;"+(g+1)+"~":a.C0.ESC+"[24~";break;default:if(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(d&&!f||!c.altKey||c.metaKey)!d||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?h.key=c.key:c.key&&c.ctrlKey&&c.key==="_"&&(h.key=a.C0.US):c.keyCode===65&&(h.type=1);else{var v=l[c.keyCode],m=v==null?void 0:v[c.shiftKey?1:0];if(m)h.key=a.C0.ESC+m;else if(c.keyCode>=65&&c.keyCode<=90){var p=c.ctrlKey?c.keyCode-64:c.keyCode+32;h.key=a.C0.ESC+String.fromCharCode(p)}}else c.keyCode>=65&&c.keyCode<=90?h.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?h.key=a.C0.NUL:c.keyCode>=51&&c.keyCode<=55?h.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?h.key=a.C0.DEL:c.keyCode===219?h.key=a.C0.ESC:c.keyCode===220?h.key=a.C0.FS:c.keyCode===221&&(h.key=a.C0.GS)}return h}},482:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,c,u){c===void 0&&(c=0),u===void 0&&(u=l.length);for(var d="",f=c;f<u;++f){var h=l[f];h>65535?(h-=65536,d+=String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):d+=String.fromCharCode(h)}return d};var s=function(){function l(){this._interim=0}return l.prototype.clear=function(){this._interim=0},l.prototype.decode=function(c,u){var d=c.length;if(!d)return 0;var f=0,h=0;this._interim&&(56320<=(m=c.charCodeAt(h++))&&m<=57343?u[f++]=1024*(this._interim-55296)+m-56320+65536:(u[f++]=this._interim,u[f++]=m),this._interim=0);for(var g=h;g<d;++g){var v=c.charCodeAt(g);if(55296<=v&&v<=56319){if(++g>=d)return this._interim=v,f;var m;56320<=(m=c.charCodeAt(g))&&m<=57343?u[f++]=1024*(v-55296)+m-56320+65536:(u[f++]=v,u[f++]=m)}else v!==65279&&(u[f++]=v)}return f},l}();o.StringToUtf32=s;var a=function(){function l(){this.interim=new Uint8Array(3)}return l.prototype.clear=function(){this.interim.fill(0)},l.prototype.decode=function(c,u){var d=c.length;if(!d)return 0;var f,h,g,v,m=0,p=0,_=0;if(this.interim[0]){var b=!1,y=this.interim[0];y&=(224&y)==192?31:(240&y)==224?15:7;for(var w=0,k=void 0;(k=63&this.interim[++w])&&w<4;)y<<=6,y|=k;for(var x=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,T=x-w;_<T;){if(_>=d)return 0;if((192&(k=c[_++]))!=128){_--,b=!0;break}this.interim[w++]=k,y<<=6,y|=63&k}b||(x===2?y<128?_--:u[m++]=y:x===3?y<2048||y>=55296&&y<=57343||y===65279||(u[m++]=y):y<65536||y>1114111||(u[m++]=y)),this.interim.fill(0)}for(var L=d-4,D=_;D<d;){for(;!(!(D<L)||128&(f=c[D])||128&(h=c[D+1])||128&(g=c[D+2])||128&(v=c[D+3]));)u[m++]=f,u[m++]=h,u[m++]=g,u[m++]=v,D+=4;if((f=c[D++])<128)u[m++]=f;else if((224&f)==192){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if((p=(31&f)<<6|63&h)<128){D--;continue}u[m++]=p}else if((240&f)==224){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,m;if((192&(g=c[D++]))!=128){D--;continue}if((p=(15&f)<<12|(63&h)<<6|63&g)<2048||p>=55296&&p<=57343||p===65279)continue;u[m++]=p}else if((248&f)==240){if(D>=d)return this.interim[0]=f,m;if((192&(h=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,m;if((192&(g=c[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=f,this.interim[1]=h,this.interim[2]=g,m;if((192&(v=c[D++]))!=128){D--;continue}if((p=(7&f)<<18|(63&h)<<12|(63&g)<<6|63&v)<65536||p>1114111)continue;u[m++]=p}}return m},l}();o.Utf8ToUtf32=a},225:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var a,l=s(8273),c=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],d=function(){function f(){if(this.version="6",!a){a=new Uint8Array(65536),(0,l.fill)(a,1),a[0]=0,(0,l.fill)(a,0,1,32),(0,l.fill)(a,0,127,160),(0,l.fill)(a,2,4352,4448),a[9001]=2,a[9002]=2,(0,l.fill)(a,2,11904,42192),a[12351]=1,(0,l.fill)(a,2,44032,55204),(0,l.fill)(a,2,63744,64256),(0,l.fill)(a,2,65040,65050),(0,l.fill)(a,2,65072,65136),(0,l.fill)(a,2,65280,65377),(0,l.fill)(a,2,65504,65511);for(var h=0;h<c.length;++h)(0,l.fill)(a,0,c[h][0],c[h][1]+1)}}return f.prototype.wcwidth=function(h){return h<32?0:h<127?1:h<65536?a[h]:function(g,v){var m,p=0,_=v.length-1;if(g<v[0][0]||g>v[_][1])return!1;for(;_>=p;)if(g>v[m=p+_>>1][1])p=m+1;else{if(!(g<v[m][0]))return!0;_=m-1}return!1}(h,u)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1},f}();o.UnicodeV6=d},5981:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var s=typeof queueMicrotask=="undefined"?function(l){Promise.resolve().then(l)}:queueMicrotask,a=function(){function l(c){this._action=c,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return l.prototype.writeSync=function(c,u){if(u!==void 0&&this._syncCalls>u)this._syncCalls=0;else if(this._pendingData+=c.length,this._writeBuffer.push(c),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var d;for(this._isSyncWriting=!0;d=this._writeBuffer.shift();){this._action(d);var f=this._callbacks.shift();f&&f()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},l.prototype.write=function(c,u){var d=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return d._innerWrite()})),this._pendingData+=c.length,this._writeBuffer.push(c),this._callbacks.push(u)},l.prototype._innerWrite=function(c,u){var d=this;c===void 0&&(c=0),u===void 0&&(u=!0);for(var f=c||Date.now();this._writeBuffer.length>this._bufferOffset;){var h=this._writeBuffer[this._bufferOffset],g=this._action(h,u);if(g)return void g.catch(function(m){return s(function(){throw m}),Promise.resolve(!1)}).then(function(m){return Date.now()-f>=12?setTimeout(function(){return d._innerWrite(0,m)}):d._innerWrite(f,m)});var v=this._callbacks[this._bufferOffset];if(v&&v(),this._bufferOffset++,this._pendingData-=h.length,Date.now()-f>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return d._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},l}();o.WriteBuffer=a},5941:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;var s=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,a=/^[\da-f]+$/;function l(c,u){var d=c.toString(16),f=d.length<2?"0"+d:d;switch(u){case 4:return d[0];case 8:return f;case 12:return(f+f).slice(0,3);default:return f+f}}o.parseColor=function(c){if(c){var u=c.toLowerCase();if(u.indexOf("rgb:")===0){u=u.slice(4);var d=s.exec(u);if(d){var f=d[1]?15:d[4]?255:d[7]?4095:65535;return[Math.round(parseInt(d[1]||d[4]||d[7]||d[10],16)/f*255),Math.round(parseInt(d[2]||d[5]||d[8]||d[11],16)/f*255),Math.round(parseInt(d[3]||d[6]||d[9]||d[12],16)/f*255)]}}else if(u.indexOf("#")===0&&(u=u.slice(1),a.exec(u)&&[3,6,9,12].includes(u.length))){for(var h=u.length/3,g=[0,0,0],v=0;v<3;++v){var m=parseInt(u.slice(h*v,h*v+h),16);g[v]=h===1?m<<4:h===2?m:h===3?m>>4:m>>8}return g}}},o.toRgbString=function(c,u){u===void 0&&(u=16);var d=c[0],f=c[1],h=c[2];return"rgb:"+l(d,u)+"/"+l(f,u)+"/"+l(h,u)}},5770:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var a=s(482),l=s(8742),c=s(5770),u=[],d=function(){function g(){this._handlers=Object.create(null),this._active=u,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return g.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=u},g.prototype.registerHandler=function(v,m){this._handlers[v]===void 0&&(this._handlers[v]=[]);var p=this._handlers[v];return p.push(m),{dispose:function(){var _=p.indexOf(m);_!==-1&&p.splice(_,1)}}},g.prototype.clearHandler=function(v){this._handlers[v]&&delete this._handlers[v]},g.prototype.setHandlerFallback=function(v){this._handlerFb=v},g.prototype.reset=function(){if(this._active.length)for(var v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].unhook(!1);this._stack.paused=!1,this._active=u,this._ident=0},g.prototype.hook=function(v,m){if(this.reset(),this._ident=v,this._active=this._handlers[v]||u,this._active.length)for(var p=this._active.length-1;p>=0;p--)this._active[p].hook(m);else this._handlerFb(this._ident,"HOOK",m)},g.prototype.put=function(v,m,p){if(this._active.length)for(var _=this._active.length-1;_>=0;_--)this._active[_].put(v,m,p);else this._handlerFb(this._ident,"PUT",(0,a.utf32ToString)(v,m,p))},g.prototype.unhook=function(v,m){if(m===void 0&&(m=!0),this._active.length){var p=!1,_=this._active.length-1,b=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,p=m,b=this._stack.fallThrough,this._stack.paused=!1),!b&&p===!1){for(;_>=0&&(p=this._active[_].unhook(v))!==!0;_--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,p;_--}for(;_>=0;_--)if((p=this._active[_].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,p}else this._handlerFb(this._ident,"UNHOOK",v);this._active=u,this._ident=0},g}();o.DcsParser=d;var f=new l.Params;f.addParam(0);var h=function(){function g(v){this._handler=v,this._data="",this._params=f,this._hitLimit=!1}return g.prototype.hook=function(v){this._params=v.length>1||v.params[0]?v.clone():f,this._data="",this._hitLimit=!1},g.prototype.put=function(v,m,p){this._hitLimit||(this._data+=(0,a.utf32ToString)(v,m,p),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},g.prototype.unhook=function(v){var m=this,p=!1;if(this._hitLimit)p=!1;else if(v&&(p=this._handler(this._data,this._params))instanceof Promise)return p.then(function(_){return m._params=f,m._data="",m._hitLimit=!1,_});return this._params=f,this._data="",this._hitLimit=!1,p},g}();o.DcsHandler=h},2015:function(r,o,s){var a,l=this&&this.__extends||(a=function(p,_){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,y){b.__proto__=y}||function(b,y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(b[w]=y[w])},a(p,_)},function(p,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function b(){this.constructor=p}a(p,_),p.prototype=_===null?Object.create(_):(b.prototype=_.prototype,new b)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var c=s(844),u=s(8273),d=s(8742),f=s(6242),h=s(6351),g=function(){function p(_){this.table=new Uint8Array(_)}return p.prototype.setDefault=function(_,b){(0,u.fill)(this.table,_<<4|b)},p.prototype.add=function(_,b,y,w){this.table[b<<8|_]=y<<4|w},p.prototype.addMany=function(_,b,y,w){for(var k=0;k<_.length;k++)this.table[b<<8|_[k]]=y<<4|w},p}();o.TransitionTable=g;var v=160;o.VT500_TRANSITION_TABLE=function(){var p=new g(4095),_=Array.apply(null,Array(256)).map(function(T,L){return L}),b=function(T,L){return _.slice(T,L)},y=b(32,127),w=b(0,24);w.push(25),w.push.apply(w,b(28,32));var k,x=b(0,14);for(k in p.setDefault(1,0),p.addMany(y,0,2,0),x)p.addMany([24,26,153,154],k,3,0),p.addMany(b(128,144),k,3,0),p.addMany(b(144,152),k,3,0),p.add(156,k,0,0),p.add(27,k,11,1),p.add(157,k,4,8),p.addMany([152,158,159],k,0,7),p.add(155,k,11,3),p.add(144,k,11,9);return p.addMany(w,0,3,0),p.addMany(w,1,3,1),p.add(127,1,0,1),p.addMany(w,8,0,8),p.addMany(w,3,3,3),p.add(127,3,0,3),p.addMany(w,4,3,4),p.add(127,4,0,4),p.addMany(w,6,3,6),p.addMany(w,5,3,5),p.add(127,5,0,5),p.addMany(w,2,3,2),p.add(127,2,0,2),p.add(93,1,4,8),p.addMany(y,8,5,8),p.add(127,8,5,8),p.addMany([156,27,24,26,7],8,6,0),p.addMany(b(28,32),8,0,8),p.addMany([88,94,95],1,0,7),p.addMany(y,7,0,7),p.addMany(w,7,0,7),p.add(156,7,0,0),p.add(127,7,0,7),p.add(91,1,11,3),p.addMany(b(64,127),3,7,0),p.addMany(b(48,60),3,8,4),p.addMany([60,61,62,63],3,9,4),p.addMany(b(48,60),4,8,4),p.addMany(b(64,127),4,7,0),p.addMany([60,61,62,63],4,0,6),p.addMany(b(32,64),6,0,6),p.add(127,6,0,6),p.addMany(b(64,127),6,0,0),p.addMany(b(32,48),3,9,5),p.addMany(b(32,48),5,9,5),p.addMany(b(48,64),5,0,6),p.addMany(b(64,127),5,7,0),p.addMany(b(32,48),4,9,5),p.addMany(b(32,48),1,9,2),p.addMany(b(32,48),2,9,2),p.addMany(b(48,127),2,10,0),p.addMany(b(48,80),1,10,0),p.addMany(b(81,88),1,10,0),p.addMany([89,90,92],1,10,0),p.addMany(b(96,127),1,10,0),p.add(80,1,11,9),p.addMany(w,9,0,9),p.add(127,9,0,9),p.addMany(b(28,32),9,0,9),p.addMany(b(32,48),9,9,12),p.addMany(b(48,60),9,8,10),p.addMany([60,61,62,63],9,9,10),p.addMany(w,11,0,11),p.addMany(b(32,128),11,0,11),p.addMany(b(28,32),11,0,11),p.addMany(w,10,0,10),p.add(127,10,0,10),p.addMany(b(28,32),10,0,10),p.addMany(b(48,60),10,8,10),p.addMany([60,61,62,63],10,0,11),p.addMany(b(32,48),10,9,12),p.addMany(w,12,0,12),p.add(127,12,0,12),p.addMany(b(28,32),12,0,12),p.addMany(b(32,48),12,9,12),p.addMany(b(48,64),12,0,11),p.addMany(b(64,127),12,12,13),p.addMany(b(64,127),10,12,13),p.addMany(b(64,127),9,12,13),p.addMany(w,13,13,13),p.addMany(y,13,13,13),p.add(127,13,0,13),p.addMany([27,156,24,26],13,14,0),p.add(v,0,2,0),p.add(v,8,5,8),p.add(v,6,0,6),p.add(v,11,0,11),p.add(v,13,13,13),p}();var m=function(p){function _(b){b===void 0&&(b=o.VT500_TRANSITION_TABLE);var y=p.call(this)||this;return y._transitions=b,y._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},y.initialState=0,y.currentState=y.initialState,y._params=new d.Params,y._params.addParam(0),y._collect=0,y.precedingCodepoint=0,y._printHandlerFb=function(w,k,x){},y._executeHandlerFb=function(w){},y._csiHandlerFb=function(w,k){},y._escHandlerFb=function(w){},y._errorHandlerFb=function(w){return w},y._printHandler=y._printHandlerFb,y._executeHandlers=Object.create(null),y._csiHandlers=Object.create(null),y._escHandlers=Object.create(null),y._oscParser=new f.OscParser,y._dcsParser=new h.DcsParser,y._errorHandler=y._errorHandlerFb,y.registerEscHandler({final:"\\"},function(){return!0}),y}return l(_,p),_.prototype._identifier=function(b,y){y===void 0&&(y=[64,126]);var w=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if((w=b.prefix.charCodeAt(0))&&60>w||w>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var k=0;k<b.intermediates.length;++k){var x=b.intermediates.charCodeAt(k);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");w<<=8,w|=x}}if(b.final.length!==1)throw new Error("final must be a single byte");var T=b.final.charCodeAt(0);if(y[0]>T||T>y[1])throw new Error("final must be in range "+y[0]+" .. "+y[1]);return(w<<=8)|T},_.prototype.identToString=function(b){for(var y=[];b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")},_.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},_.prototype.setPrintHandler=function(b){this._printHandler=b},_.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},_.prototype.registerEscHandler=function(b,y){var w=this._identifier(b,[48,126]);this._escHandlers[w]===void 0&&(this._escHandlers[w]=[]);var k=this._escHandlers[w];return k.push(y),{dispose:function(){var x=k.indexOf(y);x!==-1&&k.splice(x,1)}}},_.prototype.clearEscHandler=function(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]},_.prototype.setEscHandlerFallback=function(b){this._escHandlerFb=b},_.prototype.setExecuteHandler=function(b,y){this._executeHandlers[b.charCodeAt(0)]=y},_.prototype.clearExecuteHandler=function(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]},_.prototype.setExecuteHandlerFallback=function(b){this._executeHandlerFb=b},_.prototype.registerCsiHandler=function(b,y){var w=this._identifier(b);this._csiHandlers[w]===void 0&&(this._csiHandlers[w]=[]);var k=this._csiHandlers[w];return k.push(y),{dispose:function(){var x=k.indexOf(y);x!==-1&&k.splice(x,1)}}},_.prototype.clearCsiHandler=function(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]},_.prototype.setCsiHandlerFallback=function(b){this._csiHandlerFb=b},_.prototype.registerDcsHandler=function(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)},_.prototype.clearDcsHandler=function(b){this._dcsParser.clearHandler(this._identifier(b))},_.prototype.setDcsHandlerFallback=function(b){this._dcsParser.setHandlerFallback(b)},_.prototype.registerOscHandler=function(b,y){return this._oscParser.registerHandler(b,y)},_.prototype.clearOscHandler=function(b){this._oscParser.clearHandler(b)},_.prototype.setOscHandlerFallback=function(b){this._oscParser.setHandlerFallback(b)},_.prototype.setErrorHandler=function(b){this._errorHandler=b},_.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},_.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},_.prototype._preserveStack=function(b,y,w,k,x){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=w,this._parseStack.transition=k,this._parseStack.chunkPos=x},_.prototype.parse=function(b,y,w){var k,x=0,T=0,L=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,L=this._parseStack.chunkPos+1;else{if(w===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var D=this._parseStack.handlers,R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(w===!1&&R>-1){for(;R>=0&&(k=D[R](this._params))!==!0;R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 4:if(w===!1&&R>-1){for(;R>=0&&(k=D[R]())!==!0;R--)if(k instanceof Promise)return this._parseStack.handlerPos=R,k}this._parseStack.handlers=[];break;case 6:if(x=b[this._parseStack.chunkPos],k=this._dcsParser.unhook(x!==24&&x!==26,w))return k;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=b[this._parseStack.chunkPos],k=this._oscParser.end(x!==24&&x!==26,w))return k;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,L=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var M=L;M<y;++M){switch(x=b[M],(T=this._transitions.table[this.currentState<<8|(x<160?x:v)])>>4){case 2:for(var A=M+1;;++A){if(A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}if(++A>=y||(x=b[A])<32||x>126&&x<v){this._printHandler(b,M,A),M=A-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:M,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var X=(D=this._csiHandlers[this._collect<<8|x])?D.length-1:-1;X>=0&&(k=D[X](this._params))!==!0;X--)if(k instanceof Promise)return this._preserveStack(3,D,X,T,M),k;X<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingCodepoint=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++M<y&&(x=b[M])>47&&x<60);M--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:for(var H=this._escHandlers[this._collect<<8|x],O=H?H.length-1:-1;O>=0&&(k=H[O]())!==!0;O--)if(k instanceof Promise)return this._preserveStack(4,H,O,T,M),k;O<0&&this._escHandlerFb(this._collect<<8|x),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|x,this._params);break;case 13:for(var W=M+1;;++W)if(W>=y||(x=b[W])===24||x===26||x===27||x>127&&x<v){this._dcsParser.put(b,M,W),M=W-1;break}break;case 14:if(k=this._dcsParser.unhook(x!==24&&x!==26))return this._preserveStack(6,[],0,T,M),k;x===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var V=M+1;;V++)if(V>=y||(x=b[V])<32||x>127&&x<v){this._oscParser.put(b,M,V),M=V-1;break}break;case 6:if(k=this._oscParser.end(x!==24&&x!==26))return this._preserveStack(5,[],0,T,M),k;x===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&T}},_}(c.Disposable);o.EscapeSequenceParser=m},6242:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var a=s(5770),l=s(482),c=[],u=function(){function f(){this._state=0,this._active=c,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return f.prototype.registerHandler=function(h,g){this._handlers[h]===void 0&&(this._handlers[h]=[]);var v=this._handlers[h];return v.push(g),{dispose:function(){var m=v.indexOf(g);m!==-1&&v.splice(m,1)}}},f.prototype.clearHandler=function(h){this._handlers[h]&&delete this._handlers[h]},f.prototype.setHandlerFallback=function(h){this._handlerFb=h},f.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=c},f.prototype.reset=function(){if(this._state===2)for(var h=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;h>=0;--h)this._active[h].end(!1);this._stack.paused=!1,this._active=c,this._id=-1,this._state=0},f.prototype._start=function(){if(this._active=this._handlers[this._id]||c,this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].start();else this._handlerFb(this._id,"START")},f.prototype._put=function(h,g,v){if(this._active.length)for(var m=this._active.length-1;m>=0;m--)this._active[m].put(h,g,v);else this._handlerFb(this._id,"PUT",(0,l.utf32ToString)(h,g,v))},f.prototype.start=function(){this.reset(),this._state=1},f.prototype.put=function(h,g,v){if(this._state!==3){if(this._state===1)for(;g<v;){var m=h[g++];if(m===59){this._state=2,this._start();break}if(m<48||57<m)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+m-48}this._state===2&&v-g>0&&this._put(h,g,v)}},f.prototype.end=function(h,g){if(g===void 0&&(g=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var v=!1,m=this._active.length-1,p=!1;if(this._stack.paused&&(m=this._stack.loopPosition-1,v=g,p=this._stack.fallThrough,this._stack.paused=!1),!p&&v===!1){for(;m>=0&&(v=this._active[m].end(h))!==!0;m--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!1,v;m--}for(;m>=0;m--)if((v=this._active[m].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=m,this._stack.fallThrough=!0,v}else this._handlerFb(this._id,"END",h);this._active=c,this._id=-1,this._state=0}},f}();o.OscParser=u;var d=function(){function f(h){this._handler=h,this._data="",this._hitLimit=!1}return f.prototype.start=function(){this._data="",this._hitLimit=!1},f.prototype.put=function(h,g,v){this._hitLimit||(this._data+=(0,l.utf32ToString)(h,g,v),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},f.prototype.end=function(h){var g=this,v=!1;if(this._hitLimit)v=!1;else if(h&&(v=this._handler(this._data))instanceof Promise)return v.then(function(m){return g._data="",g._hitLimit=!1,m});return this._data="",this._hitLimit=!1,v},f}();o.OscHandler=d},8742:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var s=2147483647,a=function(){function l(c,u){if(c===void 0&&(c=32),u===void 0&&(u=32),this.maxLength=c,this.maxSubParamsLength=u,u>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(u),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return l.fromArray=function(c){var u=new l;if(!c.length)return u;for(var d=Array.isArray(c[0])?1:0;d<c.length;++d){var f=c[d];if(Array.isArray(f))for(var h=0;h<f.length;++h)u.addSubParam(f[h]);else u.addParam(f)}return u},l.prototype.clone=function(){var c=new l(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c},l.prototype.toArray=function(){for(var c=[],u=0;u<this.length;++u){c.push(this.params[u]);var d=this._subParamsIdx[u]>>8,f=255&this._subParamsIdx[u];f-d>0&&c.push(Array.prototype.slice.call(this._subParams,d,f))}return c},l.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},l.prototype.addParam=function(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>s?s:c}},l.prototype.addSubParam=function(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>s?s:c,this._subParamsIdx[this.length-1]++}},l.prototype.hasSubParams=function(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0},l.prototype.getSubParams=function(c){var u=this._subParamsIdx[c]>>8,d=255&this._subParamsIdx[c];return d-u>0?this._subParams.subarray(u,d):null},l.prototype.getSubParamsAll=function(){for(var c={},u=0;u<this.length;++u){var d=this._subParamsIdx[u]>>8,f=255&this._subParamsIdx[u];f-d>0&&(c[u]=this._subParams.slice(d,f))}return c},l.prototype.addDigit=function(c){var u;if(!(this._rejectDigits||!(u=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var d=this._digitIsSub?this._subParams:this.params,f=d[u-1];d[u-1]=~f?Math.min(10*f+c,s):c}},l}();o.Params=a},5741:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var s=function(){function a(){this._addons=[]}return a.prototype.dispose=function(){for(var l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()},a.prototype.loadAddon=function(l,c){var u=this,d={instance:c,dispose:c.dispose,isDisposed:!1};this._addons.push(d),c.dispose=function(){return u._wrappedAddonDispose(d)},c.activate(l)},a.prototype._wrappedAddonDispose=function(l){if(!l.isDisposed){for(var c=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===l){c=u;break}if(c===-1)throw new Error("Could not dispose an addon that has not been loaded");l.isDisposed=!0,l.dispose.apply(l.instance),this._addons.splice(c,1)}},a}();o.AddonManager=s},8771:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;var a=s(3785),l=s(511),c=function(){function u(d,f){this._buffer=d,this.type=f}return u.prototype.init=function(d){return this._buffer=d,this},Object.defineProperty(u.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),u.prototype.getLine=function(d){var f=this._buffer.lines.get(d);if(f)return new a.BufferLineApiView(f)},u.prototype.getNullCell=function(){return new l.CellData},u}();o.BufferApiView=c},3785:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;var a=s(511),l=function(){function c(u){this._line=u}return Object.defineProperty(c.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),c.prototype.getCell=function(u,d){if(!(u<0||u>=this._line.length))return d?(this._line.loadCell(u,d),d):this._line.loadCell(u,new a.CellData)},c.prototype.translateToString=function(u,d,f){return this._line.translateToString(u,d,f)},c}();o.BufferLineApiView=l},8285:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;var a=s(8771),l=s(8460),c=function(){function u(d){var f=this;this._core=d,this._onBufferChange=new l.EventEmitter,this._normal=new a.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new a.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return f._onBufferChange.fire(f.active)})}return Object.defineProperty(u.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),u}();o.BufferNamespaceApi=c},7975:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.registerCsiHandler=function(l,c){return this._core.registerCsiHandler(l,function(u){return c(u.toArray())})},a.prototype.addCsiHandler=function(l,c){return this.registerCsiHandler(l,c)},a.prototype.registerDcsHandler=function(l,c){return this._core.registerDcsHandler(l,function(u,d){return c(u,d.toArray())})},a.prototype.addDcsHandler=function(l,c){return this.registerDcsHandler(l,c)},a.prototype.registerEscHandler=function(l,c){return this._core.registerEscHandler(l,c)},a.prototype.addEscHandler=function(l,c){return this.registerEscHandler(l,c)},a.prototype.registerOscHandler=function(l,c){return this._core.registerOscHandler(l,c)},a.prototype.addOscHandler=function(l,c){return this.registerOscHandler(l,c)},a}();o.ParserApi=s},7090:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0;var s=function(){function a(l){this._core=l}return a.prototype.register=function(l){this._core.unicodeService.register(l)},Object.defineProperty(a.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(l){this._core.unicodeService.activeVersion=l},enumerable:!1,configurable:!0}),a}();o.UnicodeApi=s},744:function(r,o,s){var a,l=this&&this.__extends||(a=function(m,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,b){_.__proto__=b}||function(_,b){for(var y in b)Object.prototype.hasOwnProperty.call(b,y)&&(_[y]=b[y])},a(m,p)},function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function _(){this.constructor=m}a(m,p),m.prototype=p===null?Object.create(p):(_.prototype=p.prototype,new _)}),c=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},u=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var d=s(2585),f=s(5295),h=s(8460),g=s(844);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var v=function(m){function p(_){var b=m.call(this)||this;return b._optionsService=_,b.isUserScrolling=!1,b._onResize=new h.EventEmitter,b._onScroll=new h.EventEmitter,b.cols=Math.max(_.rawOptions.cols||0,o.MINIMUM_COLS),b.rows=Math.max(_.rawOptions.rows||0,o.MINIMUM_ROWS),b.buffers=new f.BufferSet(_,b),b}return l(p,m),Object.defineProperty(p.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){m.prototype.dispose.call(this),this.buffers.dispose()},p.prototype.resize=function(_,b){this.cols=_,this.rows=b,this.buffers.resize(_,b),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:_,rows:b})},p.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},p.prototype.scroll=function(_,b){b===void 0&&(b=!1);var y,w=this.buffer;(y=this._cachedBlankLine)&&y.length===this.cols&&y.getFg(0)===_.fg&&y.getBg(0)===_.bg||(y=w.getBlankLine(_,b),this._cachedBlankLine=y),y.isWrapped=b;var k=w.ybase+w.scrollTop,x=w.ybase+w.scrollBottom;if(w.scrollTop===0){var T=w.lines.isFull;x===w.lines.length-1?T?w.lines.recycle().copyFrom(y):w.lines.push(y.clone()):w.lines.splice(x+1,0,y.clone()),T?this.isUserScrolling&&(w.ydisp=Math.max(w.ydisp-1,0)):(w.ybase++,this.isUserScrolling||w.ydisp++)}else{var L=x-k+1;w.lines.shiftElements(k+1,L-1,-1),w.lines.set(x,y.clone())}this.isUserScrolling||(w.ydisp=w.ybase),this._onScroll.fire(w.ydisp)},p.prototype.scrollLines=function(_,b,y){var w=this.buffer;if(_<0){if(w.ydisp===0)return;this.isUserScrolling=!0}else _+w.ydisp>=w.ybase&&(this.isUserScrolling=!1);var k=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+_,w.ybase),0),k!==w.ydisp&&(b||this._onScroll.fire(w.ydisp))},p.prototype.scrollPages=function(_){this.scrollLines(_*(this.rows-1))},p.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},p.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},p.prototype.scrollToLine=function(_){var b=_-this.buffer.ydisp;b!==0&&this.scrollLines(b)},c([u(0,d.IOptionsService)],p)}(g.Disposable);o.BufferService=v},7994:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var s=function(){function a(){this.glevel=0,this._charsets=[]}return a.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},a.prototype.setgLevel=function(l){this.glevel=l,this.charset=this._charsets[l]},a.prototype.setgCharset=function(l,c){this._charsets[l]=c,this.glevel===l&&(this.charset=c)},a}();o.CharsetService=s},1753:function(r,o,s){var a=this&&this.__decorate||function(m,p,_,b){var y,w=arguments.length,k=w<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,_):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(m,p,_,b);else for(var x=m.length-1;x>=0;x--)(y=m[x])&&(k=(w<3?y(k):w>3?y(p,_,k):y(p,_))||k);return w>3&&k&&Object.defineProperty(p,_,k),k},l=this&&this.__param||function(m,p){return function(_,b){p(_,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var c=s(2585),u=s(8460),d={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(m){return m.button!==4&&m.action===1&&(m.ctrl=!1,m.alt=!1,m.shift=!1,!0)}},VT200:{events:19,restrict:function(m){return m.action!==32}},DRAG:{events:23,restrict:function(m){return m.action!==32||m.button!==3}},ANY:{events:31,restrict:function(m){return!0}}};function f(m,p){var _=(m.ctrl?16:0)|(m.shift?4:0)|(m.alt?8:0);return m.button===4?(_|=64,_|=m.action):(_|=3&m.button,4&m.button&&(_|=64),8&m.button&&(_|=128),m.action===32?_|=32:m.action!==0||p||(_|=3)),_}var h=String.fromCharCode,g={DEFAULT:function(m){var p=[f(m,!1)+32,m.col+32,m.row+32];return p[0]>255||p[1]>255||p[2]>255?"":"\x1B[M"+h(p[0])+h(p[1])+h(p[2])},SGR:function(m){var p=m.action===0&&m.button!==4?"m":"M";return"\x1B[<"+f(m,!0)+";"+m.col+";"+m.row+p}},v=function(){function m(p,_){this._bufferService=p,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new u.EventEmitter,this._lastEvent=null;for(var b=0,y=Object.keys(d);b<y.length;b++){var w=y[b];this.addProtocol(w,d[w])}for(var k=0,x=Object.keys(g);k<x.length;k++){var T=x[k];this.addEncoding(T,g[T])}this.reset()}return m.prototype.addProtocol=function(p,_){this._protocols[p]=_},m.prototype.addEncoding=function(p,_){this._encodings[p]=_},Object.defineProperty(m.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(p){if(!this._protocols[p])throw new Error('unknown protocol "'+p+'"');this._activeProtocol=p,this._onProtocolChange.fire(this._protocols[p].events)},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(p){if(!this._encodings[p])throw new Error('unknown encoding "'+p+'"');this._activeEncoding=p},enumerable:!1,configurable:!0}),m.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(m.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),m.prototype.triggerMouseEvent=function(p){if(p.col<0||p.col>=this._bufferService.cols||p.row<0||p.row>=this._bufferService.rows||p.button===4&&p.action===32||p.button===3&&p.action!==32||p.button!==4&&(p.action===2||p.action===3)||(p.col++,p.row++,p.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,p))||!this._protocols[this._activeProtocol].restrict(p))return!1;var _=this._encodings[this._activeEncoding](p);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=p,!0},m.prototype.explainEvents=function(p){return{down:!!(1&p),up:!!(2&p),drag:!!(4&p),move:!!(8&p),wheel:!!(16&p)}},m.prototype._compareEvents=function(p,_){return p.col===_.col&&p.row===_.row&&p.button===_.button&&p.action===_.action&&p.ctrl===_.ctrl&&p.alt===_.alt&&p.shift===_.shift},a([l(0,c.IBufferService),l(1,c.ICoreService)],m)}();o.CoreMouseService=v},6975:function(r,o,s){var a,l=this&&this.__extends||(a=function(_,b){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,w){y.__proto__=w}||function(y,w){for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(y[k]=w[k])},a(_,b)},function(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function y(){this.constructor=_}a(_,b),_.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}),c=this&&this.__decorate||function(_,b,y,w){var k,x=arguments.length,T=x<3?b:w===null?w=Object.getOwnPropertyDescriptor(b,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,b,y,w);else for(var L=_.length-1;L>=0;L--)(k=_[L])&&(T=(x<3?k(T):x>3?k(b,y,T):k(b,y))||T);return x>3&&T&&Object.defineProperty(b,y,T),T},u=this&&this.__param||function(_,b){return function(y,w){b(y,w,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var d=s(2585),f=s(8460),h=s(1439),g=s(844),v=Object.freeze({insertMode:!1}),m=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),p=function(_){function b(y,w,k,x){var T=_.call(this)||this;return T._bufferService=w,T._logService=k,T._optionsService=x,T.isCursorInitialized=!1,T.isCursorHidden=!1,T._onData=T.register(new f.EventEmitter),T._onUserInput=T.register(new f.EventEmitter),T._onBinary=T.register(new f.EventEmitter),T._scrollToBottom=y,T.register({dispose:function(){return T._scrollToBottom=void 0}}),T.modes=(0,h.clone)(v),T.decPrivateModes=(0,h.clone)(m),T}return l(b,_),Object.defineProperty(b.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),b.prototype.reset=function(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(m)},b.prototype.triggerDataEvent=function(y,w){if(w===void 0&&(w=!1),!this._optionsService.rawOptions.disableStdin){var k=this._bufferService.buffer;k.ybase!==k.ydisp&&this._scrollToBottom(),w&&this._onUserInput.fire(),this._logService.debug('sending data "'+y+'"',function(){return y.split("").map(function(x){return x.charCodeAt(0)})}),this._onData.fire(y)}},b.prototype.triggerBinaryEvent=function(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+y+'"',function(){return y.split("").map(function(w){return w.charCodeAt(0)})}),this._onBinary.fire(y))},c([u(1,d.IBufferService),u(2,d.ILogService),u(3,d.IOptionsService)],b)}(g.Disposable);o.CoreService=p},3730:function(r,o,s){var a=this&&this.__decorate||function(d,f,h,g){var v,m=arguments.length,p=m<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,h):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(d,f,h,g);else for(var _=d.length-1;_>=0;_--)(v=d[_])&&(p=(m<3?v(p):m>3?v(f,h,p):v(f,h))||p);return m>3&&p&&Object.defineProperty(f,h,p),p},l=this&&this.__param||function(d,f){return function(h,g){f(h,g,d)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var c=s(2585),u=function(){function d(f){this._bufferService=f,this.clearRange()}return Object.defineProperty(d.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),d.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},d.prototype.markDirty=function(f){f<this._start?this._start=f:f>this._end&&(this._end=f)},d.prototype.markRangeDirty=function(f,h){if(f>h){var g=f;f=h,h=g}f<this._start&&(this._start=f),h>this._end&&(this._end=h)},d.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},a([l(0,c.IBufferService)],d)}();o.DirtyRowService=u},4348:function(r,o,s){var a=this&&this.__spreadArray||function(f,h,g){if(g||arguments.length===2)for(var v,m=0,p=h.length;m<p;m++)!v&&m in h||(v||(v=Array.prototype.slice.call(h,0,m)),v[m]=h[m]);return f.concat(v||Array.prototype.slice.call(h))};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var l=s(2585),c=s(8343),u=function(){function f(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];this._entries=new Map;for(var v=0,m=h;v<m.length;v++){var p=m[v],_=p[0],b=p[1];this.set(_,b)}}return f.prototype.set=function(h,g){var v=this._entries.get(h);return this._entries.set(h,g),v},f.prototype.forEach=function(h){this._entries.forEach(function(g,v){return h(v,g)})},f.prototype.has=function(h){return this._entries.has(h)},f.prototype.get=function(h){return this._entries.get(h)},f}();o.ServiceCollection=u;var d=function(){function f(){this._services=new u,this._services.set(l.IInstantiationService,this)}return f.prototype.setService=function(h,g){this._services.set(h,g)},f.prototype.getService=function(h){return this._services.get(h)},f.prototype.createInstance=function(h){for(var g=[],v=1;v<arguments.length;v++)g[v-1]=arguments[v];for(var m=(0,c.getServiceDependencies)(h).sort(function(x,T){return x.index-T.index}),p=[],_=0,b=m;_<b.length;_++){var y=b[_],w=this._services.get(y.id);if(!w)throw new Error("[createInstance] "+h.name+" depends on UNKNOWN service "+y.id+".");p.push(w)}var k=m.length>0?m[0].index:g.length;if(g.length!==k)throw new Error("[createInstance] First service dependency of "+h.name+" at position "+(k+1)+" conflicts with "+g.length+" static arguments");return new(h.bind.apply(h,a([void 0],a(a([],g,!0),p,!0),!1)))},f}();o.InstantiationService=d},7866:function(r,o,s){var a=this&&this.__decorate||function(h,g,v,m){var p,_=arguments.length,b=_<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,v):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,g,v,m);else for(var y=h.length-1;y>=0;y--)(p=h[y])&&(b=(_<3?p(b):_>3?p(g,v,b):p(g,v))||b);return _>3&&b&&Object.defineProperty(g,v,b),b},l=this&&this.__param||function(h,g){return function(v,m){g(v,m,h)}},c=this&&this.__spreadArray||function(h,g,v){if(v||arguments.length===2)for(var m,p=0,_=g.length;p<_;p++)!m&&p in g||(m||(m=Array.prototype.slice.call(g,0,p)),m[p]=g[p]);return h.concat(m||Array.prototype.slice.call(g))};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=void 0;var u=s(2585),d={debug:u.LogLevelEnum.DEBUG,info:u.LogLevelEnum.INFO,warn:u.LogLevelEnum.WARN,error:u.LogLevelEnum.ERROR,off:u.LogLevelEnum.OFF},f=function(){function h(g){var v=this;this._optionsService=g,this.logLevel=u.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(m){m==="logLevel"&&v._updateLogLevel()})}return h.prototype._updateLogLevel=function(){this.logLevel=d[this._optionsService.rawOptions.logLevel]},h.prototype._evalLazyOptionalParams=function(g){for(var v=0;v<g.length;v++)typeof g[v]=="function"&&(g[v]=g[v]())},h.prototype._log=function(g,v,m){this._evalLazyOptionalParams(m),g.call.apply(g,c([console,"xterm.js: "+v],m,!1))},h.prototype.debug=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.DEBUG&&this._log(console.log,g,v)},h.prototype.info=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.INFO&&this._log(console.info,g,v)},h.prototype.warn=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.WARN&&this._log(console.warn,g,v)},h.prototype.error=function(g){for(var v=[],m=1;m<arguments.length;m++)v[m-1]=arguments[m];this.logLevel<=u.LogLevelEnum.ERROR&&this._log(console.error,g,v)},a([l(0,u.IOptionsService)],h)}();o.LogService=f},7302:function(r,o,s){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var h,g=1,v=arguments.length;g<v;g++)for(var m in h=arguments[g])Object.prototype.hasOwnProperty.call(h,m)&&(f[m]=h[m]);return f},a.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var l=s(8460),c=s(6114);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:c.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var u=["normal","bold","100","200","300","400","500","600","700","800","900"],d=function(){function f(h){this._onOptionChange=new l.EventEmitter;var g=a({},o.DEFAULT_OPTIONS);for(var v in h)if(v in g)try{var m=h[v];g[v]=this._sanitizeAndValidateOption(v,m)}catch(p){console.error(p)}this.rawOptions=g,this.options=a({},g),this._setupOptions()}return Object.defineProperty(f.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),f.prototype._setupOptions=function(){var h=this,g=function(_){if(!(_ in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+_+'"');return h.rawOptions[_]},v=function(_,b){if(!(_ in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+_+'"');b=h._sanitizeAndValidateOption(_,b),h.rawOptions[_]!==b&&(h.rawOptions[_]=b,h._onOptionChange.fire(_))};for(var m in this.rawOptions){var p={get:g.bind(this,m),set:v.bind(this,m)};Object.defineProperty(this.options,m,p)}},f.prototype.setOption=function(h,g){this.options[h]=g},f.prototype._sanitizeAndValidateOption=function(h,g){switch(h){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":g||(g=o.DEFAULT_OPTIONS[h]);break;case"fontWeight":case"fontWeightBold":if(typeof g=="number"&&1<=g&&g<=1e3)break;g=u.includes(g)?g:o.DEFAULT_OPTIONS[h];break;case"cursorWidth":g=Math.floor(g);case"lineHeight":case"tabStopWidth":if(g<1)throw new Error(h+" cannot be less than 1, value: "+g);break;case"minimumContrastRatio":g=Math.max(1,Math.min(21,Math.round(10*g)/10));break;case"scrollback":if((g=Math.min(g,4294967295))<0)throw new Error(h+" cannot be less than 0, value: "+g);break;case"fastScrollSensitivity":case"scrollSensitivity":if(g<=0)throw new Error(h+" cannot be less than or equal to 0, value: "+g);case"rows":case"cols":if(!g&&g!==0)throw new Error(h+" must be numeric, value: "+g)}return g},f.prototype.getOption=function(h){return this.options[h]},f}();o.OptionsService=d},8343:(r,o)=>{function s(a,l,c){l.di$target===l?l.di$dependencies.push({id:a,index:c}):(l.di$dependencies=[{id:a,index:c}],l.di$target=l)}Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0,o.serviceRegistry=new Map,o.getServiceDependencies=function(a){return a.di$dependencies||[]},o.createDecorator=function(a){if(o.serviceRegistry.has(a))return o.serviceRegistry.get(a);var l=function(c,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");s(l,c,d)};return l.toString=function(){return a},o.serviceRegistry.set(a,l),l}},2585:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IUnicodeService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var a,l=s(8343);o.IBufferService=(0,l.createDecorator)("BufferService"),o.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),o.ICoreService=(0,l.createDecorator)("CoreService"),o.ICharsetService=(0,l.createDecorator)("CharsetService"),o.IDirtyRowService=(0,l.createDecorator)("DirtyRowService"),o.IInstantiationService=(0,l.createDecorator)("InstantiationService"),(a=o.LogLevelEnum||(o.LogLevelEnum={}))[a.DEBUG=0]="DEBUG",a[a.INFO=1]="INFO",a[a.WARN=2]="WARN",a[a.ERROR=3]="ERROR",a[a.OFF=4]="OFF",o.ILogService=(0,l.createDecorator)("LogService"),o.IOptionsService=(0,l.createDecorator)("OptionsService"),o.IUnicodeService=(0,l.createDecorator)("UnicodeService")},1480:(r,o,s)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var a=s(8460),l=s(225),c=function(){function u(){this._providers=Object.create(null),this._active="",this._onChange=new a.EventEmitter;var d=new l.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}return Object.defineProperty(u.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"activeVersion",{get:function(){return this._active},set:function(d){if(!this._providers[d])throw new Error('unknown Unicode version "'+d+'"');this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)},enumerable:!1,configurable:!0}),u.prototype.register=function(d){this._providers[d.version]=d},u.prototype.wcwidth=function(d){return this._activeProvider.wcwidth(d)},u.prototype.getStringCellWidth=function(d){for(var f=0,h=d.length,g=0;g<h;++g){var v=d.charCodeAt(g);if(55296<=v&&v<=56319){if(++g>=h)return f+this.wcwidth(v);var m=d.charCodeAt(g);56320<=m&&m<=57343?v=1024*(v-55296)+m-56320+65536:f+=this.wcwidth(m)}f+=this.wcwidth(v)}return f},u}();o.UnicodeService=c}},i={};return function r(o){var s=i[o];if(s!==void 0)return s.exports;var a=i[o]={exports:{}};return t[o].call(a.exports,a,a.exports,r),a.exports}(4389)})()})})(vj);function ame(n,e){if(n===e)return!0;for(var t=0;t<n.length;t++)if(!Object.is(n[t],e[t]))return!1;return!0}function jbt(n){var e=N.exports.useRef(n);return e.current=n,e}var qbt=function(e){var t=jbt(e);N.exports.useEffect(function(){return function(){t.current()}},[])},lme=qbt,Kbt=!!(typeof window!="undefined"&&window.document&&window.document.createElement),cme=Kbt;function ume(n,e){if(!!cme){if(!n)return e;var t;return typeof n=="function"?t=n():"current"in n?t=n.current:t=n,t}}var Gbt=function(e){var t=function(r,o,s){var a=N.exports.useRef(!1),l=N.exports.useRef([]),c=N.exports.useRef([]),u=N.exports.useRef();e(function(){var d,f=Array.isArray(s)?s:[s],h=f.map(function(g){return ume(g)});if(!a.current){a.current=!0,l.current=h,c.current=o,u.current=r();return}(h.length!==l.current.length||!ame(h,l.current)||!ame(o,c.current))&&((d=u.current)===null||d===void 0||d.call(u),l.current=h,c.current=o,u.current=r())}),lme(function(){var d;(d=u.current)===null||d===void 0||d.call(u),a.current=!1})};return t},dme=Gbt,Ybt=dme(N.exports.useEffect),Zbt=Ybt,Xbt=globalThis&&globalThis.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return o};function Qbt(n){var e=N.exports.useRef(0),t=Xbt(N.exports.useState(n),2),i=t[0],r=t[1],o=N.exports.useCallback(function(s){cancelAnimationFrame(e.current),e.current=requestAnimationFrame(function(){r(s)})},[]);return lme(function(){cancelAnimationFrame(e.current)}),[i,o]}var hme=function(){if(typeof Map!="undefined")return Map;function n(e,t){var i=-1;return e.some(function(r,o){return r[0]===t?(i=o,!0):!1}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var i=n(this.__entries__,t),r=this.__entries__[i];return r&&r[1]},e.prototype.set=function(t,i){var r=n(this.__entries__,t);~r?this.__entries__[r][1]=i:this.__entries__.push([t,i])},e.prototype.delete=function(t){var i=this.__entries__,r=n(i,t);~r&&i.splice(r,1)},e.prototype.has=function(t){return!!~n(this.__entries__,t)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,i){i===void 0&&(i=null);for(var r=0,o=this.__entries__;r<o.length;r++){var s=o[r];t.call(i,s[1],s[0])}},e}()}(),bj=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,zM=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Jbt=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(zM):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),e0t=2;function t0t(n,e){var t=!1,i=!1,r=0;function o(){t&&(t=!1,n()),i&&a()}function s(){Jbt(o)}function a(){var l=Date.now();if(t){if(l-r<e0t)return;i=!0}else t=!0,i=!1,setTimeout(s,e);r=l}return a}var n0t=20,i0t=["top","right","bottom","left","width","height","size","weight"],r0t=typeof MutationObserver!="undefined",o0t=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=t0t(this.refresh.bind(this),n0t)}return n.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},n.prototype.removeObserver=function(e){var t=this.observers_,i=t.indexOf(e);~i&&t.splice(i,1),!t.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},n.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},n.prototype.connect_=function(){!bj||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),r0t?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!bj||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(e){var t=e.propertyName,i=t===void 0?"":t,r=i0t.some(function(o){return!!~i.indexOf(o)});r&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),fme=function(n,e){for(var t=0,i=Object.keys(e);t<i.length;t++){var r=i[t];Object.defineProperty(n,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return n},uy=function(n){var e=n&&n.ownerDocument&&n.ownerDocument.defaultView;return e||zM},gme=jM(0,0,0,0);function UM(n){return parseFloat(n)||0}function pme(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(i,r){var o=n["border-"+r+"-width"];return i+UM(o)},0)}function s0t(n){for(var e=["top","right","bottom","left"],t={},i=0,r=e;i<r.length;i++){var o=r[i],s=n["padding-"+o];t[o]=UM(s)}return t}function a0t(n){var e=n.getBBox();return jM(0,0,e.width,e.height)}function l0t(n){var e=n.clientWidth,t=n.clientHeight;if(!e&&!t)return gme;var i=uy(n).getComputedStyle(n),r=s0t(i),o=r.left+r.right,s=r.top+r.bottom,a=UM(i.width),l=UM(i.height);if(i.boxSizing==="border-box"&&(Math.round(a+o)!==e&&(a-=pme(i,"left","right")+o),Math.round(l+s)!==t&&(l-=pme(i,"top","bottom")+s)),!u0t(n)){var c=Math.round(a+o)-e,u=Math.round(l+s)-t;Math.abs(c)!==1&&(a-=c),Math.abs(u)!==1&&(l-=u)}return jM(r.left,r.top,a,l)}var c0t=function(){return typeof SVGGraphicsElement!="undefined"?function(n){return n instanceof uy(n).SVGGraphicsElement}:function(n){return n instanceof uy(n).SVGElement&&typeof n.getBBox=="function"}}();function u0t(n){return n===uy(n).document.documentElement}function d0t(n){return bj?c0t(n)?a0t(n):l0t(n):gme}function h0t(n){var e=n.x,t=n.y,i=n.width,r=n.height,o=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return fme(s,{x:e,y:t,width:i,height:r,top:t,right:e+i,bottom:r+t,left:e}),s}function jM(n,e,t,i){return{x:n,y:e,width:t,height:i}}var f0t=function(){function n(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=jM(0,0,0,0),this.target=e}return n.prototype.isActive=function(){var e=d0t(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},n}(),g0t=function(){function n(e,t){var i=h0t(t);fme(this,{target:e,contentRect:i})}return n}(),p0t=function(){function n(e,t,i){if(this.activeObservations_=[],this.observations_=new hme,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=i}return n.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof uy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new f0t(e)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof uy(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;!t.has(e)||(t.delete(e),t.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},n.prototype.broadcastActive=function(){if(!!this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(i){return new g0t(i.target,i.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),mme=typeof WeakMap!="undefined"?new WeakMap:new hme,_me=function(){function n(e){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=o0t.getInstance(),i=new p0t(e,t,this);mme.set(this,i)}return n}();["observe","unobserve","disconnect"].forEach(function(n){_me.prototype[n]=function(){var e;return(e=mme.get(this))[n].apply(e,arguments)}});var m0t=function(){return typeof zM.ResizeObserver!="undefined"?zM.ResizeObserver:_me}(),_0t=dme(N.exports.useLayoutEffect),v0t=_0t,b0t=cme?v0t:Zbt,C0t=b0t,y0t=globalThis&&globalThis.__read||function(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i=t.call(n),r,o=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(s)throw s.error}}return o};function w0t(n){var e=y0t(Qbt(),2),t=e[0],i=e[1];return C0t(function(){var r=ume(n);if(!!r){var o=new m0t(function(s){s.forEach(function(a){var l=a.target,c=l.clientWidth,u=l.clientHeight;i({width:c,height:u})})});return o.observe(r),function(){o.disconnect()}}},[],n),t}var vme={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={775:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0;var s=function(){function a(){}return a.prototype.activate=function(l){this._terminal=l},a.prototype.dispose=function(){},a.prototype.fit=function(){var l=this.proposeDimensions();if(l&&this._terminal){var c=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(c._renderService.clear(),this._terminal.resize(l.cols,l.rows))}},a.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var l=this._terminal._core;if(l._renderService.dimensions.actualCellWidth!==0&&l._renderService.dimensions.actualCellHeight!==0){var c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),d=Math.max(0,parseInt(c.getPropertyValue("width"))),f=window.getComputedStyle(this._terminal.element),h=u-(parseInt(f.getPropertyValue("padding-top"))+parseInt(f.getPropertyValue("padding-bottom"))),g=d-(parseInt(f.getPropertyValue("padding-right"))+parseInt(f.getPropertyValue("padding-left")))-l.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(g/l._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(h/l._renderService.dimensions.actualCellHeight))}}}},a}();o.FitAddon=s}},i={};return function r(o){if(i[o])return i[o].exports;var s=i[o]={exports:{}};return t[o](s,s.exports,r),s.exports}(775)})()})})(vme);const bme=new vme.exports.FitAddon,Cme=r=>{var o=r,{terminal:n,onKey:e,fitHook:t}=o,i=Br(o,["terminal","onKey","fitHook"]);const s=Ee({height:"100%",width:"100%",padding:"5px 5px"},i),a=N.exports.useRef(null),{fitTerminal:l}=c();u(),N.exports.useEffect(()=>{l()},[t]);function c(){const d=N.exports.useCallback(g=>{g!=null&&g.parentElement&&(n.loadAddon(bme),f(n),n.open(g),h())},[]),f=g=>{g.onKey(({key:v,domEvent:m})=>{let p=v;switch(v.charCodeAt(0)){case 13:break;case 27:switch(m.key){case"ArrowLeft":if(g.buffer.active.cursorX<=2)return;break}break;case 8:case 127:g.buffer.active.cursorX>2&&(p="\b");break}e==null||e(p)}),g.attachCustomKeyEventHandler(v=>{var p,_;const m=v.metaKey||v.ctrlKey;return v.type==="keyup"?!1:v.key==="v"&&m?((p=v.view)!=null&&p.navigator.clipboard?(_=v.view)==null||_.navigator.clipboard.readText().then(b=>e==null?void 0:e(b)):e==null||e(v.target.value),!1):!(v.key==="r"&&m)})},h=()=>{bme.fit()};return N.exports.useEffect(()=>{d(a.current)},[a]),{fitTerminal:h}}function u(){const d=w0t(a);N.exports.useEffect(()=>{l()},[d])}return be("div",{ref:a,style:s})};function S0t(i,t){var r=i,{options:n}=r,e=Br(r,["options"]);const o=N.exports.useMemo(()=>rt(Ee({convertEol:!0,fontSize:12,fontFamily:"Monaco, Menlo, monospace",lineHeight:1,cursorBlink:!0,cursorWidth:1,cursorStyle:"block",rightClickSelectsWord:!0},n),{theme:{background:Gp.extend.colors["dao-light-green"]}}),[n]),s=N.exports.useRef(!1),a=jt(d=>d.playgroundInfo.dockerInfo),l=Xt(d=>d.socket),c=AE("Console"),u=N.exports.useMemo(()=>new vj.exports.Terminal(rt(Ee({},o),{fontSize:14,lineHeight:1.5,fontFamily:"Monaco, Menlo, monospace"})),[o]);return N.exports.useImperativeHandle(t,()=>({clear:()=>{u&&u.clear()}})),N.exports.useEffect(()=>(l==null||l.on("console",d=>{const h=d.console;h&&u.write(h.value||"")}),()=>{l==null||l.off("terminal")}),[u,l]),N.exports.useEffect(()=>{console.log("dockerInfo",a),u&&a.consoleHistory&&!s.current&&u.write(a.consoleHistory),s.current=!0},[a,u]),be(uS,{children:be("div",{className:`console-container ${c?"component-focus":""}`,style:{height:"100%",width:"100%"},onClick:()=>{Kw("Console")},children:be(Cme,Ee({terminal:u},e))})})}var yme=N.exports.forwardRef(S0t),x0t=Object.freeze(Object.defineProperty({__proto__:null,default:yme},Symbol.toStringTag,{value:"Module"}));const k0t=Lr.div``,E0t=Lr.div`
1871
1871
  background-color: white;
1872
1872
  height: 30px;
1873
1873
  padding: 8px 12px;
@@ -1929,7 +1929,7 @@ ${JSON.stringify(p,void 0,4)}`)});else if(h.changes)for(const p of Object.keys(h
1929
1929
  color: #ffffff;
1930
1930
  background-color: #5a5a5a;
1931
1931
  opacity: 0.6;
1932
- `,wme=({freshIconColor:n="#6B6D6C",inputTextColor:e="#6B6D6C",openIconColor:t="#6B6D6C",inputBgColor:i=(s=>(s=Gp.extend)==null?void 0:s.colors["codezone-black"])(),navBgColor:r=(a=>(a=Gp.extend)==null?void 0:a.colors["codezone-black"])(),navBorder:o="0 solid transparent"})=>{const l=jt(w=>{var k;return(k=w.playgroundInfo.dockerInfo)==null?void 0:k.runStatus}),c=jt(w=>{var k;return(k=w.playgroundInfo.dockerInfo)==null?void 0:k.url}),u=Xt(w=>w.socket),d=N.exports.useRef(null),[f,h]=N.exports.useState(""),g=N.exports.useRef(null),v=AE("Browser"),m=w=>{w.keyCode===13&&b(w.target.value)},p=()=>{b(f)},_=()=>l!=="STOP",b=w=>{!w||w==="about:blank"||w==="undefined"?w="about:blank":!w.startsWith("https")&&!w.startsWith("http")&&(w=`https://${w}`),f!=w&&h(w),g.current.value=w,d.current.contentWindow.location.replace("about:blank"),setTimeout(()=>{d.current.contentWindow.location.replace(w)},10)},y=()=>{window.open(f)};return N.exports.useEffect(()=>{b(c)},[c]),N.exports.useEffect(()=>(u==null||u.on("portOpen",()=>{b(c)}),()=>{u==null||u.off("portOpen")})),be(uS,{name:"browser",children:Jt(k0t,{className:`browser-container w-full h-full flex flex-col ${v?"component-focus":""}`,children:[Jt(E0t,{navBgColor:r,freshIconColor:n,inputTextColor:e,inputBgColor:i,openIconColor:t,navBorder:o,onClick:w=>{w.nativeEvent.stopPropagation(),Kw("Browser")},children:[be("i",{className:"d42 text-xl reload cursor-pointer",onClick:p}),be("input",{type:"text",defaultValue:f,disabled:!_(),ref:g,onKeyDown:m}),be("i",{className:"d42 text-xl file-copy cursor-pointer",onClick:y})]}),Jt("div",{className:"flex-1 relative",children:[!_()&&be(T0t,{className:"h-full w-full",children:be("span",{children:"\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"})}),be("iframe",{className:"h-full w-full",ref:d,src:f,style:{backgroundColor:"#bdbdbd"}})]})]})})};var L0t=Object.freeze(Object.defineProperty({__proto__:null,default:wme},Symbol.toStringTag,{value:"Module"}));const Sme=t=>{var i=t,{options:n}=i,e=Br(i,["options"]);const r=N.exports.useMemo(()=>rt(Ee(Ee({},n),e),{theme:{background:Gp.extend.colors["dao-light-green"]}}),[n,e]),o=document.createElement("div");o.classList.add("xterm-helper-user-label");const s=AE("Terminal"),{agentUserId:a,agentUsers:l}=jt(m=>m.playgroundInfo),[c]=N.exports.useState(()=>new vj.exports.Terminal(rt(Ee({},r),{fontSize:14,lineHeight:1.5,fontFamily:"UbuntuMono, Ubuntu Mono, courier-new, courier, monospace"}))),{CRDTInfo:u}=jt(m=>m),d=jt(m=>m.playgroundInfo.dockerInfo),f=Xt(m=>m.socket),h=N.exports.useCallback((m,p)=>{m.write(`\r
1932
+ `,wme=({freshIconColor:n="#6B6D6C",inputTextColor:e="#6B6D6C",openIconColor:t="#6B6D6C",inputBgColor:i=(s=>(s=Gp.extend)==null?void 0:s.colors["codezone-black"])(),navBgColor:r=(a=>(a=Gp.extend)==null?void 0:a.colors["codezone-black"])(),navBorder:o="0 solid transparent"})=>{const l=jt(w=>{var k;return(k=w.playgroundInfo.dockerInfo)==null?void 0:k.runStatus}),c=jt(w=>{var k;return(k=w.playgroundInfo.dockerInfo)==null?void 0:k.url}),u=Xt(w=>w.socket),d=N.exports.useRef(null),[f,h]=N.exports.useState(""),g=N.exports.useRef(null),v=AE("Browser"),m=w=>{w.keyCode===13&&b(w.target.value)},p=()=>{b(f)},_=()=>l!=="STOP",b=w=>{!w||w==="about:blank"||w==="undefined"?w="about:blank":!w.startsWith("https")&&!w.startsWith("http")&&(w=`https://${w}`),f!=w&&h(w),g.current.value=w,d.current.contentWindow.location.replace("about:blank"),setTimeout(()=>{d.current.contentWindow.location.replace(w)},10)},y=()=>{window.open(f)};return N.exports.useEffect(()=>{b(c)},[c]),N.exports.useEffect(()=>(u==null||u.on("portOpen",()=>{b(c)}),()=>{u==null||u.off("portOpen")})),be(uS,{name:"browser",children:Jt(k0t,{className:`browser-container w-full h-full flex flex-col ${v?"component-focus":""}`,children:[Jt(E0t,{navBgColor:r,freshIconColor:n,inputTextColor:e,inputBgColor:i,openIconColor:t,navBorder:o,onClick:w=>{w.nativeEvent.stopPropagation(),Kw("Browser")},children:[be("i",{className:"d42 text-xl reload cursor-pointer",onClick:p}),be("input",{type:"text",defaultValue:f,disabled:!_(),ref:g,onKeyDown:m}),be("i",{className:"d42 text-xl file-copy cursor-pointer",onClick:y})]}),Jt("div",{className:"flex-1 relative",children:[!_()&&be(T0t,{className:"h-full w-full",children:be("span",{children:"\u70B9\u51FB\u201C\u8FD0\u884C\u201D\uFF0C\u542F\u52A8\u5E94\u7528"})}),be("iframe",{className:"h-full w-full",ref:d,src:f,style:{backgroundColor:"#bdbdbd"}})]})]})})};var L0t=Object.freeze(Object.defineProperty({__proto__:null,default:wme},Symbol.toStringTag,{value:"Module"}));const Sme=t=>{var i=t,{options:n}=i,e=Br(i,["options"]);const r=N.exports.useMemo(()=>rt(Ee(Ee({},n),e),{theme:{background:Gp.extend.colors["dao-light-green"]}}),[n,e]),o=document.createElement("div");o.classList.add("xterm-helper-user-label");const s=AE("Terminal"),{agentUserId:a,agentUsers:l}=jt(m=>m.playgroundInfo),[c]=N.exports.useState(()=>new vj.exports.Terminal(rt(Ee({},r),{fontSize:14,lineHeight:1.5,fontFamily:"Monaco, Menlo, monospace"}))),{CRDTInfo:u}=jt(m=>m),d=jt(m=>m.playgroundInfo.dockerInfo),f=Xt(m=>m.socket),h=N.exports.useCallback((m,p)=>{m.write(`\r
1933
1933
  `),m.clear(),g(m,p)},[]),g=(m,p)=>{m.write(p)},v=m=>{var _,b;if(jt.getState().amDoing==="replaying")return;const p={timestamp:Date.now(),agentUserId:a,terminal:{action:"Edit",value:m}};(b=(_=Xt.getState())==null?void 0:_.socket)==null||b.emit("terminal",p)};return N.exports.useEffect(()=>{var m,p,_;!c||u.terminal&&h(c,((_=(p=(m=jt.getState())==null?void 0:m.CRDTInfo)==null?void 0:p.terminal)==null?void 0:_.value)||"")},[u.terminal,h,c]),N.exports.useEffect(()=>{var p;const m=u.terminal;if(c&&m){if((m==null?void 0:m.action)==="Get"){h(c,m.value||"");return}if(g(c,m.value||""),!u.agentUserId)return;const _=l.find(({agentUserId:b})=>b===u.agentUserId);if(_&&!Eg(u.agentUserId)){const b=(p=c==null?void 0:c._core)==null?void 0:p._helperContainer,y=b==null?void 0:b.firstChild;o.innerText=_.userInfo.username,o.style.backgroundColor=_.userInfo.color,o.style.top=y.style.top,o.style.left=y.style.left,b==null||b.appendChild(o),c.setOption("theme",rt(Ee({},c.getOption("theme")),{cursor:_.userInfo.cursor}));const w=setTimeout(()=>{b==null||b.removeChild(o),c.setOption("theme",rt(Ee({},c.getOption("theme")),{cursor:"#ffffff"}))},6e3);return()=>{try{b==null||b.removeChild(o)}catch{}c.setOption("theme",rt(Ee({},c.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(w)}}}},[u.agentUserId,u.terminal,l,h,c,o]),N.exports.useEffect(()=>(f==null||f.on("terminal",m=>{var b;const _=m.terminal;if(_){if((_==null?void 0:_.action)==="Get"){h(c,_.value||"");return}g(c,_.value||"");const y=(b=c==null?void 0:c._core)==null?void 0:b._helperContainer,w=y==null?void 0:y.firstChild;o.style.top=w.style.top,o.style.left=w.style.left,y==null||y.appendChild(o)}}),()=>{f==null||f.off("terminal")}),[c,f]),N.exports.useEffect(()=>{if(c&&d.terminalHistory){h(c,d.terminalHistory);return}},[d,h,c]),be(uS,{name:"terminal",children:be("div",{className:`terminal-container shell-container ${s?"component-focus":""}`,id:"terminal",style:{height:"100%",width:"100%"},onClick:()=>Kw("Terminal"),children:be(Cme,Ee({terminal:c,onKey:v},e))})})};var D0t=Object.freeze(Object.defineProperty({__proto__:null,default:Sme},Symbol.toStringTag,{value:"Module"}));const I0t=r=>{var o=r,{activeKey:n,onSelect:e,tabItems:t}=o,i=Br(o,["activeKey","onSelect","tabItems"]);return be(Age,rt(Ee({},i),{activeKey:n,appearance:"subtle",onSelect:e,children:t==null?void 0:t.map(s=>be(Age.Item,{eventKey:s.eventKey,children:s.itemName},s.eventKey))}))},R0t=Lr.div`
1934
1934
  border-color: ${n=>n.user.color};
1935
1935
  color: ${n=>n.user.color};
package/package.json CHANGED
@@ -1,28 +1,10 @@
1
1
  {
2
2
  "name": "@dao42/d42paas-front",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "d42paas front",
5
5
  "author": "dao42 paas team",
6
6
  "homepage": "https://github.com/dao42/d42paas_frontend#readme",
7
7
  "license": "UNLICENSED",
8
- "main": "./dist/DaoPaaS.umd.js",
9
- "module": "./dist/DaoPaaS.es.js",
10
- "types": "./dist/DaoPaaS.d.ts",
11
- "exports": {
12
- ".": {
13
- "import": "./dist/DaoPaaS.es.js",
14
- "require": "./dist/DaoPaaS.umd.js"
15
- },
16
- "./style.css": {
17
- "import": "./dist/style.css",
18
- "require": "./dist/style.css"
19
- },
20
- "./assets/": "./dist/assets/"
21
- },
22
- "directories": {
23
- "lib": "lib",
24
- "src": "src"
25
- },
26
8
  "scripts": {
27
9
  "prebuild": "rimraf dist",
28
10
  "build": "yarn tsc && yarn vite && yarn workNameSpaceToFix && yarn typedoc",