@nuxt/devtools 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +29 -19
- package/dist/chunks/plugin-metrics.mjs +8 -1
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/Badge.f2e9b29c.js +1 -0
- package/dist/client/_nuxt/{CodeDiff.vue.1975732c.js → CodeDiff.vue.9b0b0885.js} +1 -1
- package/dist/client/_nuxt/ComposableItem.vue.3f961e9e.js +1 -0
- package/dist/client/_nuxt/DataSchemaButton.vue.a6df5cb8.js +1 -0
- package/dist/client/_nuxt/DataSchemaDrawer.be265d1e.js +998 -0
- package/dist/client/_nuxt/DrawerRight.vue.92472251.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.383d5eee.js → DurationDisplay.vue.ebef3eee.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.a967b383.js +1 -0
- package/dist/client/_nuxt/HelpFab.vue.4d768974.js +1 -0
- package/dist/client/_nuxt/LaunchPage.vue.c2e514b2.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.78fd8d82.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.cf3ce05b.css → NCodeBlock.6994516c.css} +1 -1
- package/dist/client/_nuxt/NCodeBlock.vue.c7ed33b1.js +2 -0
- package/dist/client/_nuxt/NDropdown.vue.c7f63cd6.js +1 -0
- package/dist/client/_nuxt/NIconTitle.vue.2f7c2128.js +1 -0
- package/dist/client/_nuxt/NLink.vue.3fcc5a37.js +1 -0
- package/dist/client/_nuxt/{NMarkdown.vue.b23e4e5a.js → NMarkdown.vue.e4405095.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.9c411590.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.7a8edc85.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.defcd586.js +1 -0
- package/dist/client/_nuxt/NTip.vue.04791b31.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.3fbf7ca0.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.01c203b9.js +1 -0
- package/dist/client/_nuxt/__blank.3dddd973.js +1 -0
- package/dist/client/_nuxt/analyze-build.3db956f4.js +1 -0
- package/dist/client/_nuxt/assets.634c950e.js +16 -0
- package/dist/client/_nuxt/{client.c408b851.js → client.d5aff798.js} +1 -1
- package/dist/client/_nuxt/{components.9c49e7de.js → components.e360f866.js} +28 -28
- package/dist/client/_nuxt/custom-_name_.95236ea5.js +1 -0
- package/dist/client/_nuxt/default.8f859e18.js +1 -0
- package/dist/client/_nuxt/entry.2ee3a83f.css +1 -0
- package/dist/client/_nuxt/entry.b81bf245.js +21 -0
- package/dist/client/_nuxt/{error-404.d45671ef.js → error-404.50ed5273.js} +1 -1
- package/dist/client/_nuxt/{error-500.ea2fb4de.js → error-500.3f0ba72e.js} +1 -1
- package/dist/client/_nuxt/full.778b4958.js +1 -0
- package/dist/client/_nuxt/hooks.22b55b1c.js +1 -0
- package/dist/client/_nuxt/{imports.7adc12e3.js → imports.2a0fb129.js} +1 -1
- package/dist/client/_nuxt/index.622264a3.js +1 -0
- package/dist/client/_nuxt/{index.3f214d8c.js → index.76729ecb.js} +2 -2
- package/dist/client/_nuxt/{json-editor-vue.eeb71636.js → json-editor-vue.58ea58a4.js} +1 -1
- package/dist/client/_nuxt/middleware.f7a35d95.js +1 -0
- package/dist/client/_nuxt/modules.15421639.js +2 -0
- package/dist/client/_nuxt/none.3d88124b.js +1 -0
- package/dist/client/_nuxt/open-graph.73aa4a70.js +3 -0
- package/dist/client/_nuxt/overview.0aabd2ca.js +1 -0
- package/dist/client/_nuxt/pages.7e22d9e3.js +1 -0
- package/dist/client/_nuxt/payload.cc8ba563.js +1 -0
- package/dist/client/_nuxt/plugins.b4d83e48.js +1 -0
- package/dist/client/_nuxt/runtime-configs.15955414.js +1 -0
- package/dist/client/_nuxt/server-routes.10f98ec2.js +9 -0
- package/dist/client/_nuxt/settings.b2b35d44.js +1 -0
- package/dist/client/_nuxt/{state-components.fb35f357.js → state-components.c65acb0d.js} +1 -1
- package/dist/client/_nuxt/state-modules.e0b57d1b.js +1 -0
- package/dist/client/_nuxt/storage-options.f095012b.js +1 -0
- package/dist/client/_nuxt/storage.81e195cf.js +1 -0
- package/dist/client/_nuxt/{terminals.38d91ba1.js → terminals.57b44373.js} +2 -2
- package/dist/client/_nuxt/timeline.e3f428d4.js +57 -0
- package/dist/client/_nuxt/{unocss-runtime.6378a150.js → unocss-runtime.2f2f07ae.js} +1 -1
- package/dist/client/_nuxt/virtual-files.02aedd29.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/timeline/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/function-metrics-helpers.mjs +17 -12
- package/dist/runtime/plugins/devtools.client.mjs +6 -1
- package/dist/runtime/plugins/view/Main.vue +107 -10
- package/dist/runtime/plugins/view/client.mjs +3 -2
- package/dist/runtime/plugins/view/state.mjs +2 -1
- package/dist/shared/{devtools.d198e7a9.mjs → devtools.6d7e3a3a.mjs} +4 -0
- package/dist/types.d.ts +1 -11
- package/package.json +20 -19
- package/dist/client/_nuxt/AuthRequiredPanel.vue.373351c6.js +0 -1
- package/dist/client/_nuxt/Badge.5dedc481.js +0 -1
- package/dist/client/_nuxt/CodeSnippets.vue.c208c49e.js +0 -1
- package/dist/client/_nuxt/ComposableItem.vue.3b5d164d.js +0 -1
- package/dist/client/_nuxt/DrawerRight.vue.3eebe7ce.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.2c8f962b.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.5669a6ef.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.8830d946.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.c7e6efe4.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.5349dcfa.js +0 -2
- package/dist/client/_nuxt/NIconTitle.vue.d1cbff70.js +0 -1
- package/dist/client/_nuxt/NLink.vue.97d72812.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.d7e62056.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.3d6e8c84.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.998f2032.js +0 -1
- package/dist/client/_nuxt/NTip.vue.7456cfb7.js +0 -1
- package/dist/client/_nuxt/Navbar.vue.7ff60442.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.876e93dc.js +0 -1
- package/dist/client/_nuxt/__blank.09a1fa28.js +0 -1
- package/dist/client/_nuxt/analyze-build.c8285851.js +0 -1
- package/dist/client/_nuxt/assets.f1991486.js +0 -16
- package/dist/client/_nuxt/custom-_name_.d5995810.js +0 -1
- package/dist/client/_nuxt/default.baee4bce.js +0 -1
- package/dist/client/_nuxt/entry.74a1b1ba.js +0 -21
- package/dist/client/_nuxt/entry.b258ed6f.css +0 -1
- package/dist/client/_nuxt/full.cc98eb50.js +0 -1
- package/dist/client/_nuxt/hooks.07e855f0.js +0 -1
- package/dist/client/_nuxt/index.449a0025.js +0 -1
- package/dist/client/_nuxt/middleware.eb2b75b5.js +0 -1
- package/dist/client/_nuxt/modules.307b3d94.js +0 -2
- package/dist/client/_nuxt/none.c4d2ccfb.js +0 -1
- package/dist/client/_nuxt/open-graph.169f1c7d.js +0 -3
- package/dist/client/_nuxt/overview.4d55b1fb.js +0 -1
- package/dist/client/_nuxt/pages.7d288900.js +0 -1
- package/dist/client/_nuxt/payload.d64a004a.js +0 -1
- package/dist/client/_nuxt/plugins.a291917b.js +0 -1
- package/dist/client/_nuxt/runtime-configs.78dcb02a.js +0 -1
- package/dist/client/_nuxt/server-routes.c8bbbccf.js +0 -9
- package/dist/client/_nuxt/settings.dd6b6fef.js +0 -1
- package/dist/client/_nuxt/state-modules.b209a976.js +0 -1
- package/dist/client/_nuxt/storage.16132b2d.js +0 -1
- package/dist/client/_nuxt/timeline.da7dc20f.js +0 -57
- package/dist/client/_nuxt/virtual-files.b72a117a.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as ae,r as he,ai as Se,W as me,J as re,K as Ce,o as Q,m as ie,k as te,i as de,f as J,h as se,p as oe,t as ne,F as _e,bo as be,_ as ue,bq as ye,P as we,a as Ee,at as Le,n as ke,E as ce,b5 as Re,v as le,a0 as De,j as Ae,az as xe}from"./entry.b81bf245.js";var fe={exports:{}};(function(ee,Z){(function(X,q){ee.exports=q()})(self,()=>(()=>{var X={4567:function(M,s,a){var h=this&&this.__decorate||function(t,n,c,v){var g,o=arguments.length,S=o<3?n:v===null?v=Object.getOwnPropertyDescriptor(n,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(t,n,c,v);else for(var C=t.length-1;C>=0;C--)(g=t[C])&&(S=(o<3?g(S):o>3?g(n,c,S):g(n,c))||S);return o>3&&S&&Object.defineProperty(n,c,S),S},u=this&&this.__param||function(t,n){return function(c,v){n(c,v,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const d=a(9042),_=a(6114),p=a(9924),f=a(844),l=a(5596),e=a(4725),r=a(3656);let i=class extends f.Disposable{constructor(t,n){super(),this._terminal=t,this._renderService=n,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);if(this._topBoundaryFocusListener=c=>this._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._announceCharacters.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._liveRegionDebouncer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(c=>this._handleTab(c))),this.register(this._terminal.onKey(c=>this._handleKey(c.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new l.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,r.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,f.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(t){for(let n=0;n<t;n++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&this._liveRegion.remove()}_handleKey(t){this._clearLiveRegion(),/\p{Control}/u.test(t)||this._charsToConsume.push(t)}_refreshRows(t,n){this._liveRegionDebouncer.refresh(t,n,this._terminal.rows)}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,n){const c=t.target,v=this._rowElements[n===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||t.relatedTarget!==v)return;let g,o;if(n===0?(g=c,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(g=this._rowElements.shift(),o=c,this._rowContainer.removeChild(g)),g.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i=h([u(1,e.IRenderService)],i),s.AccessibilityManager=i},3614:(M,s)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function h(_,p){return p?"\x1B[200~"+_+"\x1B[201~":_}function u(_,p,f){_=h(_=a(_),f.decPrivateModes.bracketedPasteMode),f.triggerDataEvent(_,!0),p.value=""}function d(_,p,f){const l=f.getBoundingClientRect(),e=_.clientX-l.left-10,r=_.clientY-l.top-10;p.style.width="20px",p.style.height="20px",p.style.left=`${e}px`,p.style.top=`${r}px`,p.style.zIndex="1000",p.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=a,s.bracketTextForPaste=h,s.copyHandler=function(_,p){_.clipboardData&&_.clipboardData.setData("text/plain",p.selectionText),_.preventDefault()},s.handlePasteEvent=function(_,p,f){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),p,f)},s.paste=u,s.moveTextAreaUnderMouseCursor=d,s.rightClickHandler=function(_,p,f,l,e){d(_,p,f),e&&l.rightClickSelect(_),p.value=l.selectionText,p.select()}},7239:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=a(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(u,d,_){this._css.set(u,d,_)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,_){this._color.set(u,d,_)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(a,h,u,d){a.addEventListener(h,u,d);let _=!1;return{dispose:()=>{_||(_=!0,a.removeEventListener(h,u,d))}}}},6465:function(M,s,a){var h=this&&this.__decorate||function(e,r,i,t){var n,c=arguments.length,v=c<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,i):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,r,i,t);else for(var g=e.length-1;g>=0;g--)(n=e[g])&&(v=(c<3?n(v):c>3?n(r,i,v):n(r,i))||v);return c>3&&v&&Object.defineProperty(r,i,v),v},u=this&&this.__param||function(e,r){return function(i,t){r(i,t,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier2=void 0;const d=a(2585),_=a(8460),p=a(844),f=a(3656);let l=class extends p.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,p.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,p.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}get currentLink(){return this._currentLink}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const r=this._linkProviders.indexOf(e);r!==-1&&this._linkProviders.splice(r,1)}}}attachToDom(e,r,i){this._element=e,this._mouseService=r,this._renderService=i,this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!r)return;this._isMouseOut=!1;const i=e.composedPath();for(let t=0;t<i.length;t++){const n=i[t];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._handleHover(r),this._lastBufferCell=r)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,r){var i,t;this._activeProviderReplies&&r||((i=this._activeProviderReplies)===null||i===void 0||i.forEach(c=>{c?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(const[c,v]of this._linkProviders.entries())r?!((t=this._activeProviderReplies)===null||t===void 0)&&t.get(c)&&(n=this._checkLinkProviderResult(c,e,n)):v.provideLinks(e.y,g=>{var o,S;if(this._isMouseOut)return;const C=g?.map(w=>({link:w}));(o=this._activeProviderReplies)===null||o===void 0||o.set(c,C),n=this._checkLinkProviderResult(c,e,n),((S=this._activeProviderReplies)===null||S===void 0?void 0:S.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,r){const i=new Set;for(let t=0;t<r.size;t++){const n=r.get(t);if(n)for(let c=0;c<n.length;c++){const v=n[c],g=v.link.range.start.y<e?0:v.link.range.start.x,o=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let S=g;S<=o;S++){if(i.has(S)){n.splice(c--,1);break}i.add(S)}}}}_checkLinkProviderResult(e,r,i){var t;if(!this._activeProviderReplies)return i;const n=this._activeProviderReplies.get(e);let c=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(c=!0);if(!c&&n){const v=n.find(g=>this._linkAtPosition(g.link,r));v&&(i=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!i)for(let v=0;v<this._activeProviderReplies.size;v++){const g=(t=this._activeProviderReplies.get(v))===null||t===void 0?void 0:t.find(o=>this._linkAtPosition(o.link,r));if(g){i=!0,this._handleNewLink(g);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(e.link,r)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.pointerCursor},set:i=>{var t,n;!((t=this._currentLink)===null||t===void 0)&&t.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&((n=this._element)===null||n===void 0||n.classList.toggle("xterm-cursor-pointer",i)))}},underline:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.underline},set:i=>{var t,n,c;!((t=this._currentLink)===null||t===void 0)&&t.state&&((c=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||c===void 0?void 0:c.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;const t=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent&&this._element)){const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(i,r.text)}_fireUnderlineEvent(e,r){const i=e.range,t=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-t-1,i.end.x,i.end.y-t-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)}_linkLeave(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(i,r.text)}_linkAtPosition(e,r){const i=e.range.start.y*this._bufferService.cols+e.range.start.x,t=e.range.end.y*this._bufferService.cols+e.range.end.x,n=r.y*this._bufferService.cols+r.x;return i<=n&&n<=t}_positionFromMouseEvent(e,r,i){const t=i.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(t)return{x:t[0],y:t[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,r,i,t,n){return{x1:e,y1:r,x2:i,y2:t,cols:this._bufferService.cols,fg:n}}};l=h([u(0,d.IBufferService)],l),s.Linkifier2=l},9042:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,s,a){var h=this&&this.__decorate||function(l,e,r,i){var t,n=arguments.length,c=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,r,i);else for(var v=l.length-1;v>=0;v--)(t=l[v])&&(c=(n<3?t(c):n>3?t(e,r,c):t(e,r))||c);return n>3&&c&&Object.defineProperty(e,r,c),c},u=this&&this.__param||function(l,e){return function(r,i){e(r,i,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const d=a(511),_=a(2585);let p=class{constructor(l,e,r){this._bufferService=l,this._optionsService=e,this._oscLinkService=r}provideLinks(l,e){var r;const i=this._bufferService.buffer.lines.get(l-1);if(!i)return void e(void 0);const t=[],n=this._optionsService.rawOptions.linkHandler,c=new d.CellData,v=i.getTrimmedLength();let g=-1,o=-1,S=!1;for(let C=0;C<v;C++)if(o!==-1||i.hasContent(C)){if(i.loadCell(C,c),c.hasExtendedAttrs()&&c.extended.urlId){if(o===-1){o=C,g=c.extended.urlId;continue}S=c.extended.urlId!==g}else o!==-1&&(S=!0);if(S||o!==-1&&C===v-1){const w=(r=this._oscLinkService.getLinkData(g))===null||r===void 0?void 0:r.uri;if(w){const y={start:{x:o+1,y:l},end:{x:C+(S||C!==v-1?0:1),y:l}};let D=!1;if(!n?.allowNonHttpProtocols)try{const B=new URL(w);["http:","https:"].includes(B.protocol)||(D=!0)}catch{D=!0}D||t.push({text:w,range:y,activate:(B,H)=>n?n.activate(B,H,y):f(0,H),hover:(B,H)=>{var O;return(O=n?.hover)===null||O===void 0?void 0:O.call(n,B,H,y)},leave:(B,H)=>{var O;return(O=n?.leave)===null||O===void 0?void 0:O.call(n,B,H,y)}})}S=!1,c.hasExtendedAttrs()&&c.extended.urlId?(o=C,g=c.extended.urlId):(o=-1,g=-1)}}e(t)}};function f(l,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -6,4 +6,4 @@ WARNING: This link could potentially be dangerous`)){const r=window.open();if(r)
|
|
|
6
6
|
`:`
|
|
7
7
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(o){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),d.isLinux&&o&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(o){const S=this._getMouseBufferCoords(o),C=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!!(C&&w&&S)&&this._areCoordsInSelection(S,C,w)}isCellInSelection(o,S){const C=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!(!C||!w)&&this._areCoordsInSelection([o,S],C,w)}_areCoordsInSelection(o,S,C){return o[1]>S[1]&&o[1]<C[1]||S[1]===C[1]&&o[1]===S[1]&&o[0]>=S[0]&&o[0]<C[0]||S[1]<C[1]&&o[1]===C[1]&&o[0]<C[0]||S[1]<C[1]&&o[1]===S[1]&&o[0]>=S[0]}_selectWordAtCursor(o,S){var C,w;const y=(w=(C=this._linkifier.currentLink)===null||C===void 0?void 0:C.link)===null||w===void 0?void 0:w.range;if(y)return this._model.selectionStart=[y.start.x-1,y.start.y-1],this._model.selectionStartLength=(0,n.getRangeLength)(y,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const D=this._getMouseBufferCoords(o);return!!D&&(this._selectWordAt(D,S),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(o,S){this._model.clearSelection(),o=Math.max(o,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,o],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()}_handleTrim(o){this._model.handleTrim(o)&&this.refresh()}_getMouseBufferCoords(o){const S=this._mouseService.getCoords(o,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S}_getMouseEventScrollAmount(o){let S=(0,r.getCoordsRelativeToElement)(this._coreBrowserService.window,o,this._screenElement)[1];const C=this._renderService.dimensions.css.canvas.height;return S>=0&&S<=C?0:(S>C&&(S-=C),S=Math.min(Math.max(S,-50),50),S/=50,S/Math.abs(S)+Math.round(14*S))}shouldForceSelection(o){return d.isMac?o.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:o.shiftKey}handleMouseDown(o){if(this._mouseDownTimeStamp=o.timeStamp,(o.button!==2||!this.hasSelection)&&o.button===0){if(!this._enabled){if(!this.shouldForceSelection(o))return;o.stopPropagation()}o.preventDefault(),this._dragScrollAmount=0,this._enabled&&o.shiftKey?this._handleIncrementalClick(o):o.detail===1?this._handleSingleClick(o):o.detail===2?this._handleDoubleClick(o):o.detail===3&&this._handleTripleClick(o),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(o){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(o))}_handleSingleClick(o){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(o)?3:0,this._model.selectionStart=this._getMouseBufferCoords(o),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(o){this._selectWordAtCursor(o,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(o){const S=this._getMouseBufferCoords(o);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))}shouldColumnSelect(o){return o.altKey&&!(d.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(o){if(o.stopImmediatePropagation(),!this._model.selectionStart)return;const S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(o),!this._model.selectionEnd)return void this.refresh(!0);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(o),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){const w=C.lines.get(this._model.selectionEnd[1]);w&&w.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const o=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(o.ydisp+this._bufferService.rows,o.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=o.ydisp),this.refresh()}}_handleMouseUp(o){const S=o.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&o.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const C=this._mouseService.getCoords(o,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){const w=(0,i.moveToCellSequence)(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(w,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const o=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,C=!(!o||!S||o[0]===S[0]&&o[1]===S[1]);C?o&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&o[0]===this._oldSelectionStart[0]&&o[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(o,S,C)):this._oldHasSelection&&this._fireOnSelectionChange(o,S,C)}_fireOnSelectionChange(o,S,C){this._oldSelectionStart=o,this._oldSelectionEnd=S,this._oldHasSelection=C,this._onSelectionChange.fire()}_handleBufferActivate(o){this.clearSelection(),this._trimListener.dispose(),this._trimListener=o.activeBuffer.lines.onTrim(S=>this._handleTrim(S))}_convertViewportColToCharacterIndex(o,S){let C=S;for(let w=0;S>=w;w++){const y=o.loadCell(w,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:y>1&&S!==w&&(C+=y-1)}return C}setSelection(o,S,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[o,S],this._model.selectionStartLength=C,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(o){this._isClickInSelection(o)||(this._selectWordAtCursor(o,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(o,S,C=!0,w=!0){if(o[0]>=this._bufferService.cols)return;const y=this._bufferService.buffer,D=y.lines.get(o[1]);if(!D)return;const B=y.translateBufferLineToString(o[1],!1);let H=this._convertViewportColToCharacterIndex(D,o[0]),O=H;const m=o[0]-H;let b=0,L=0,R=0,T=0;if(B.charAt(H)===" "){for(;H>0&&B.charAt(H-1)===" ";)H--;for(;O<B.length&&B.charAt(O+1)===" ";)O++}else{let I=o[0],W=o[0];D.getWidth(I)===0&&(b++,I--),D.getWidth(W)===2&&(L++,W++);const k=D.getString(W).length;for(k>1&&(T+=k-1,O+=k-1);I>0&&H>0&&!this._isCharWordSeparator(D.loadCell(I-1,this._workCell));){D.loadCell(I-1,this._workCell);const E=this._workCell.getChars().length;this._workCell.getWidth()===0?(b++,I--):E>1&&(R+=E-1,H-=E-1),H--,I--}for(;W<D.length&&O+1<B.length&&!this._isCharWordSeparator(D.loadCell(W+1,this._workCell));){D.loadCell(W+1,this._workCell);const E=this._workCell.getChars().length;this._workCell.getWidth()===2?(L++,W++):E>1&&(T+=E-1,O+=E-1),O++,W++}}O++;let U=H+m-b+R,N=Math.min(this._bufferService.cols,O-H+b+L-R-T);if(S||B.slice(H,O).trim()!==""){if(C&&U===0&&D.getCodePoint(0)!==32){const I=y.lines.get(o[1]-1);if(I&&D.isWrapped&&I.getCodePoint(this._bufferService.cols-1)!==32){const W=this._getWordAt([this._bufferService.cols-1,o[1]-1],!1,!0,!1);if(W){const k=this._bufferService.cols-W.start;U-=k,N+=k}}}if(w&&U+N===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const I=y.lines.get(o[1]+1);if(I?.isWrapped&&I.getCodePoint(0)!==32){const W=this._getWordAt([0,o[1]+1],!1,!1,!0);W&&(N+=W.length)}}return{start:U,length:N}}}_selectWordAt(o,S){const C=this._getWordAt(o,S);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,o[1]--;this._model.selectionStart=[C.start,o[1]],this._model.selectionStartLength=C.length}}_selectToWordAt(o){const S=this._getWordAt(o,!0);if(S){let C=o[1];for(;S.start<0;)S.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,C]}}_isCharWordSeparator(o){return o.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(o.getChars())>=0}_selectLineAt(o){const S=this._bufferService.buffer.getWrappedRangeForLine(o),C={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,n.getRangeLength)(C,this._bufferService.cols)}};g=h([u(3,e.IBufferService),u(4,e.ICoreService),u(5,l.IMouseService),u(6,e.IOptionsService),u(7,l.IRenderService),u(8,l.ICoreBrowserService)],g),s.SelectionService=g},4725:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IThemeService=s.ICharacterJoinerService=s.ISelectionService=s.IRenderService=s.IMouseService=s.ICoreBrowserService=s.ICharSizeService=void 0;const h=a(8343);s.ICharSizeService=(0,h.createDecorator)("CharSizeService"),s.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),s.IMouseService=(0,h.createDecorator)("MouseService"),s.IRenderService=(0,h.createDecorator)("RenderService"),s.ISelectionService=(0,h.createDecorator)("SelectionService"),s.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),s.IThemeService=(0,h.createDecorator)("ThemeService")},6731:function(M,s,a){var h=this&&this.__decorate||function(g,o,S,C){var w,y=arguments.length,D=y<3?o:C===null?C=Object.getOwnPropertyDescriptor(o,S):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(g,o,S,C);else for(var B=g.length-1;B>=0;B--)(w=g[B])&&(D=(y<3?w(D):y>3?w(o,S,D):w(o,S))||D);return y>3&&D&&Object.defineProperty(o,S,D),D},u=this&&this.__param||function(g,o){return function(S,C){o(S,C,g)}};Object.defineProperty(s,"__esModule",{value:!0}),s.ThemeService=s.DEFAULT_ANSI_COLORS=void 0;const d=a(7239),_=a(8055),p=a(8460),f=a(844),l=a(2585),e=_.css.toColor("#ffffff"),r=_.css.toColor("#000000"),i=_.css.toColor("#ffffff"),t=_.css.toColor("#000000"),n={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};s.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const g=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],o=[0,95,135,175,215,255];for(let S=0;S<216;S++){const C=o[S/36%6|0],w=o[S/6%6|0],y=o[S%6];g.push({css:_.channels.toCss(C,w,y),rgba:_.channels.toRgba(C,w,y)})}for(let S=0;S<24;S++){const C=8+10*S;g.push({css:_.channels.toCss(C,C,C),rgba:_.channels.toRgba(C,C,C)})}return g})());let c=class extends f.Disposable{constructor(g){super(),this._optionsService=g,this._onChangeColors=this.register(new p.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._contrastCache=new d.ColorContrastCache,this._colors={foreground:e,background:r,cursor:i,cursorAccent:t,selectionForeground:void 0,selectionBackgroundTransparent:n,selectionBackgroundOpaque:_.color.blend(r,n),selectionInactiveBackgroundTransparent:n,selectionInactiveBackgroundOpaque:_.color.blend(r,n),ansi:s.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this.register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(g={}){const o=this._colors;if(o.foreground=v(g.foreground,e),o.background=v(g.background,r),o.cursor=v(g.cursor,i),o.cursorAccent=v(g.cursorAccent,t),o.selectionBackgroundTransparent=v(g.selectionBackground,n),o.selectionBackgroundOpaque=_.color.blend(o.background,o.selectionBackgroundTransparent),o.selectionInactiveBackgroundTransparent=v(g.selectionInactiveBackground,o.selectionBackgroundTransparent),o.selectionInactiveBackgroundOpaque=_.color.blend(o.background,o.selectionInactiveBackgroundTransparent),o.selectionForeground=g.selectionForeground?v(g.selectionForeground,_.NULL_COLOR):void 0,o.selectionForeground===_.NULL_COLOR&&(o.selectionForeground=void 0),_.color.isOpaque(o.selectionBackgroundTransparent)&&(o.selectionBackgroundTransparent=_.color.opacity(o.selectionBackgroundTransparent,.3)),_.color.isOpaque(o.selectionInactiveBackgroundTransparent)&&(o.selectionInactiveBackgroundTransparent=_.color.opacity(o.selectionInactiveBackgroundTransparent,.3)),o.ansi=s.DEFAULT_ANSI_COLORS.slice(),o.ansi[0]=v(g.black,s.DEFAULT_ANSI_COLORS[0]),o.ansi[1]=v(g.red,s.DEFAULT_ANSI_COLORS[1]),o.ansi[2]=v(g.green,s.DEFAULT_ANSI_COLORS[2]),o.ansi[3]=v(g.yellow,s.DEFAULT_ANSI_COLORS[3]),o.ansi[4]=v(g.blue,s.DEFAULT_ANSI_COLORS[4]),o.ansi[5]=v(g.magenta,s.DEFAULT_ANSI_COLORS[5]),o.ansi[6]=v(g.cyan,s.DEFAULT_ANSI_COLORS[6]),o.ansi[7]=v(g.white,s.DEFAULT_ANSI_COLORS[7]),o.ansi[8]=v(g.brightBlack,s.DEFAULT_ANSI_COLORS[8]),o.ansi[9]=v(g.brightRed,s.DEFAULT_ANSI_COLORS[9]),o.ansi[10]=v(g.brightGreen,s.DEFAULT_ANSI_COLORS[10]),o.ansi[11]=v(g.brightYellow,s.DEFAULT_ANSI_COLORS[11]),o.ansi[12]=v(g.brightBlue,s.DEFAULT_ANSI_COLORS[12]),o.ansi[13]=v(g.brightMagenta,s.DEFAULT_ANSI_COLORS[13]),o.ansi[14]=v(g.brightCyan,s.DEFAULT_ANSI_COLORS[14]),o.ansi[15]=v(g.brightWhite,s.DEFAULT_ANSI_COLORS[15]),g.extendedAnsi){const S=Math.min(o.ansi.length-16,g.extendedAnsi.length);for(let C=0;C<S;C++)o.ansi[C+16]=v(g.extendedAnsi[C],s.DEFAULT_ANSI_COLORS[C+16])}this._contrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(g){this._restoreColor(g),this._onChangeColors.fire(this.colors)}_restoreColor(g){if(g!==void 0)switch(g){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[g]=this._restoreColors.ansi[g]}else for(let o=0;o<this._restoreColors.ansi.length;++o)this._colors.ansi[o]=this._restoreColors.ansi[o]}modifyColors(g){g(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function v(g,o){if(g!==void 0)try{return _.css.toColor(g)}catch{}return o}c=h([u(0,l.IOptionsService)],c),s.ThemeService=c},6349:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CircularList=void 0;const h=a(8460),u=a(844);class d extends u.Disposable{constructor(p){super(),this._maxLength=p,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(p){if(this._maxLength===p)return;const f=new Array(p);for(let l=0;l<Math.min(p,this.length);l++)f[l]=this._array[this._getCyclicIndex(l)];this._array=f,this._maxLength=p,this._startIndex=0}get length(){return this._length}set length(p){if(p>this._length)for(let f=this._length;f<p;f++)this._array[f]=void 0;this._length=p}get(p){return this._array[this._getCyclicIndex(p)]}set(p,f){this._array[this._getCyclicIndex(p)]=f}push(p){this._array[this._getCyclicIndex(this._length)]=p,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){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)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(p,f,...l){if(f){for(let e=p;e<this._length-f;e++)this._array[this._getCyclicIndex(e)]=this._array[this._getCyclicIndex(e+f)];this._length-=f,this.onDeleteEmitter.fire({index:p,amount:f})}for(let e=this._length-1;e>=p;e--)this._array[this._getCyclicIndex(e+l.length)]=this._array[this._getCyclicIndex(e)];for(let e=0;e<l.length;e++)this._array[this._getCyclicIndex(p+e)]=l[e];if(l.length&&this.onInsertEmitter.fire({index:p,amount:l.length}),this._length+l.length>this._maxLength){const e=this._length+l.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=l.length}trimStart(p){p>this._length&&(p=this._length),this._startIndex+=p,this._length-=p,this.onTrimEmitter.fire(p)}shiftElements(p,f,l){if(!(f<=0)){if(p<0||p>=this._length)throw new Error("start argument out of range");if(p+l<0)throw new Error("Cannot shift elements in list beyond index 0");if(l>0){for(let r=f-1;r>=0;r--)this.set(p+r+l,this.get(p+r));const e=p+f+l-this._length;if(e>0)for(this._length+=e;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let e=0;e<f;e++)this.set(p+e+l,this.get(p+e))}}_getCyclicIndex(p){return(this._startIndex+p)%this._maxLength}}s.CircularList=d},1439:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.clone=void 0,s.clone=function a(h,u=5){if(typeof h!="object")return h;const d=Array.isArray(h)?[]:{};for(const _ in h)d[_]=u<=1?h[_]:h[_]&&a(h[_],u-1);return d}},8055:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=s.NULL_COLOR=void 0;const h=a(6114);let u=0,d=0,_=0,p=0;var f,l,e;function r(t){const n=t.toString(16);return n.length<2?"0"+n:n}function i(t,n){return t<n?(n+.05)/(t+.05):(t+.05)/(n+.05)}s.NULL_COLOR={css:"#00000000",rgba:0},function(t){t.toCss=function(n,c,v,g){return g!==void 0?`#${r(n)}${r(c)}${r(v)}${r(g)}`:`#${r(n)}${r(c)}${r(v)}`},t.toRgba=function(n,c,v,g=255){return(n<<24|c<<16|v<<8|g)>>>0}}(f=s.channels||(s.channels={})),function(t){function n(c,v){return p=Math.round(255*v),[u,d,_]=e.toChannels(c.rgba),{css:f.toCss(u,d,_,p),rgba:f.toRgba(u,d,_,p)}}t.blend=function(c,v){if(p=(255&v.rgba)/255,p===1)return{css:v.css,rgba:v.rgba};const g=v.rgba>>24&255,o=v.rgba>>16&255,S=v.rgba>>8&255,C=c.rgba>>24&255,w=c.rgba>>16&255,y=c.rgba>>8&255;return u=C+Math.round((g-C)*p),d=w+Math.round((o-w)*p),_=y+Math.round((S-y)*p),{css:f.toCss(u,d,_),rgba:f.toRgba(u,d,_)}},t.isOpaque=function(c){return(255&c.rgba)==255},t.ensureContrastRatio=function(c,v,g){const o=e.ensureContrastRatio(c.rgba,v.rgba,g);if(o)return e.toColor(o>>24&255,o>>16&255,o>>8&255)},t.opaque=function(c){const v=(255|c.rgba)>>>0;return[u,d,_]=e.toChannels(v),{css:f.toCss(u,d,_),rgba:v}},t.opacity=n,t.multiplyOpacity=function(c,v){return p=255&c.rgba,n(c,p*v/255)},t.toColorRGB=function(c){return[c.rgba>>24&255,c.rgba>>16&255,c.rgba>>8&255]}}(s.color||(s.color={})),function(t){let n,c;if(!h.isNode){const v=document.createElement("canvas");v.width=1,v.height=1;const g=v.getContext("2d",{willReadFrequently:!0});g&&(n=g,n.globalCompositeOperation="copy",c=n.createLinearGradient(0,0,1,1))}t.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),e.toColor(u,d,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),d=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p=parseInt(v.slice(4,5).repeat(2),16),e.toColor(u,d,_,p);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const g=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(g)return u=parseInt(g[1]),d=parseInt(g[2]),_=parseInt(g[3]),p=Math.round(255*(g[5]===void 0?1:parseFloat(g[5]))),e.toColor(u,d,_,p);if(!n||!c)throw new Error("css.toColor: Unsupported css format");if(n.fillStyle=c,n.fillStyle=v,typeof n.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(n.fillRect(0,0,1,1),[u,d,_,p]=n.getImageData(0,0,1,1).data,p!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:f.toRgba(u,d,_,p),css:v}}}(s.css||(s.css={})),function(t){function n(c,v,g){const o=c/255,S=v/255,C=g/255;return .2126*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.7152*(S<=.03928?S/12.92:Math.pow((S+.055)/1.055,2.4))+.0722*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))}t.relativeLuminance=function(c){return n(c>>16&255,c>>8&255,255&c)},t.relativeLuminance2=n}(l=s.rgb||(s.rgb={})),function(t){function n(v,g,o){const S=v>>24&255,C=v>>16&255,w=v>>8&255;let y=g>>24&255,D=g>>16&255,B=g>>8&255,H=i(l.relativeLuminance2(y,D,B),l.relativeLuminance2(S,C,w));for(;H<o&&(y>0||D>0||B>0);)y-=Math.max(0,Math.ceil(.1*y)),D-=Math.max(0,Math.ceil(.1*D)),B-=Math.max(0,Math.ceil(.1*B)),H=i(l.relativeLuminance2(y,D,B),l.relativeLuminance2(S,C,w));return(y<<24|D<<16|B<<8|255)>>>0}function c(v,g,o){const S=v>>24&255,C=v>>16&255,w=v>>8&255;let y=g>>24&255,D=g>>16&255,B=g>>8&255,H=i(l.relativeLuminance2(y,D,B),l.relativeLuminance2(S,C,w));for(;H<o&&(y<255||D<255||B<255);)y=Math.min(255,y+Math.ceil(.1*(255-y))),D=Math.min(255,D+Math.ceil(.1*(255-D))),B=Math.min(255,B+Math.ceil(.1*(255-B))),H=i(l.relativeLuminance2(y,D,B),l.relativeLuminance2(S,C,w));return(y<<24|D<<16|B<<8|255)>>>0}t.ensureContrastRatio=function(v,g,o){const S=l.relativeLuminance(v>>8),C=l.relativeLuminance(g>>8);if(i(S,C)<o){if(C<S){const D=n(v,g,o),B=i(S,l.relativeLuminance(D>>8));if(B<o){const H=c(v,g,o);return B>i(S,l.relativeLuminance(H>>8))?D:H}return D}const w=c(v,g,o),y=i(S,l.relativeLuminance(w>>8));if(y<o){const D=n(v,g,o);return y>i(S,l.relativeLuminance(D>>8))?w:D}return w}},t.reduceLuminance=n,t.increaseLuminance=c,t.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},t.toColor=function(v,g,o,S){return{css:f.toCss(v,g,o,S),rgba:f.toRgba(v,g,o,S)}}}(e=s.rgba||(s.rgba={})),s.toPaddedHex=r,s.contrastRatio=i},8969:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CoreTerminal=void 0;const h=a(844),u=a(2585),d=a(4348),_=a(7866),p=a(744),f=a(7302),l=a(6975),e=a(8460),r=a(1753),i=a(1480),t=a(7994),n=a(9282),c=a(5435),v=a(5981),g=a(2660);let o=!1;class S extends h.Disposable{constructor(w){super(),this._onBinary=this.register(new e.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new e.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new e.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new e.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new e.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new e.EventEmitter),this._instantiationService=new d.InstantiationService,this.optionsService=this.register(new f.OptionsService(w)),this._instantiationService.setService(u.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(p.BufferService)),this._instantiationService.setService(u.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(u.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(l.CoreService)),this._instantiationService.setService(u.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(r.CoreMouseService)),this._instantiationService.setService(u.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(i.UnicodeService)),this._instantiationService.setService(u.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(t.CharsetService),this._instantiationService.setService(u.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(g.OscLinkService),this._instantiationService.setService(u.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new c.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,e.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,e.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,e.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,e.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom())),this.register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this.register(this._bufferService.onScroll(y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this.register(this._inputHandler.onScroll(y=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this.register(new v.WriteBuffer((y,D)=>this._inputHandler.parse(y,D))),this.register((0,e.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed)),this.register((0,h.toDisposable)(()=>{var y;(y=this._windowsWrappingHeuristics)===null||y===void 0||y.dispose(),this._windowsWrappingHeuristics=void 0}))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new e.EventEmitter),this._onScroll.event(w=>{var y;(y=this._onScrollApi)===null||y===void 0||y.fire(w.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(w){for(const y in w)this.optionsService.options[y]=w[y]}write(w,y){this._writeBuffer.write(w,y)}writeSync(w,y){this._logService.logLevel<=u.LogLevelEnum.WARN&&!o&&(this._logService.warn("writeSync is unreliable and will be removed soon."),o=!0),this._writeBuffer.writeSync(w,y)}resize(w,y){isNaN(w)||isNaN(y)||(w=Math.max(w,p.MINIMUM_COLS),y=Math.max(y,p.MINIMUM_ROWS),this._bufferService.resize(w,y))}scroll(w,y=!1){this._bufferService.scroll(w,y)}scrollLines(w,y,D){this._bufferService.scrollLines(w,y,D)}scrollPages(w){this._bufferService.scrollPages(w)}scrollToTop(){this._bufferService.scrollToTop()}scrollToBottom(){this._bufferService.scrollToBottom()}scrollToLine(w){this._bufferService.scrollToLine(w)}registerEscHandler(w,y){return this._inputHandler.registerEscHandler(w,y)}registerDcsHandler(w,y){return this._inputHandler.registerDcsHandler(w,y)}registerCsiHandler(w,y){return this._inputHandler.registerCsiHandler(w,y)}registerOscHandler(w,y){return this._inputHandler.registerOscHandler(w,y)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){var w;let y=!1;const D=this.optionsService.rawOptions.windowsPty;D&&D.buildNumber!==void 0&&D.buildNumber!==void 0?y=D.backend==="conpty"&&D.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(y=!0),y?this._enableWindowsWrappingHeuristics():((w=this._windowsWrappingHeuristics)===null||w===void 0||w.dispose(),this._windowsWrappingHeuristics=void 0)}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics){const w=[];w.push(this.onLineFeed(n.updateWindowsModeWrappedState.bind(null,this._bufferService))),w.push(this.registerCsiHandler({final:"H"},()=>((0,n.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics=(0,h.toDisposable)(()=>{for(const y of w)y.dispose()})}}}s.CoreTerminal=S},8460:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.forwardEvent=s.EventEmitter=void 0,s.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=a=>(this._listeners.push(a),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===a)return void this._listeners.splice(h,1)}}})),this._event}fire(a,h){const u=[];for(let d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(let d=0;d<u.length;d++)u[d].call(void 0,a,h)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},s.forwardEvent=function(a,h){return a(u=>h.fire(u))}},5435:function(M,s,a){var h=this&&this.__decorate||function(O,m,b,L){var R,T=arguments.length,U=T<3?m:L===null?L=Object.getOwnPropertyDescriptor(m,b):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(O,m,b,L);else for(var N=O.length-1;N>=0;N--)(R=O[N])&&(U=(T<3?R(U):T>3?R(m,b,U):R(m,b))||U);return T>3&&U&&Object.defineProperty(m,b,U),U},u=this&&this.__param||function(O,m){return function(b,L){m(b,L,O)}};Object.defineProperty(s,"__esModule",{value:!0}),s.InputHandler=s.WindowsOptionsReportType=void 0;const d=a(2584),_=a(7116),p=a(2015),f=a(844),l=a(482),e=a(8437),r=a(8460),i=a(643),t=a(511),n=a(3734),c=a(2585),v=a(6242),g=a(6351),o=a(5941),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2},C=131072;function w(O,m){if(O>24)return m.setWinLines||!1;switch(O){case 1:return!!m.restoreWin;case 2:return!!m.minimizeWin;case 3:return!!m.setWinPosition;case 4:return!!m.setWinSizePixels;case 5:return!!m.raiseWin;case 6:return!!m.lowerWin;case 7:return!!m.refreshWin;case 8:return!!m.setWinSizeChars;case 9:return!!m.maximizeWin;case 10:return!!m.fullscreenWin;case 11:return!!m.getWinState;case 13:return!!m.getWinPosition;case 14:return!!m.getWinSizePixels;case 15:return!!m.getScreenSizePixels;case 16:return!!m.getCellSizePixels;case 18:return!!m.getWinSizeChars;case 19:return!!m.getScreenSizeChars;case 20:return!!m.getIconTitle;case 21:return!!m.getWinTitle;case 22:return!!m.pushTitle;case 23:return!!m.popTitle;case 24:return!!m.setWinLines}return!1}var y;(function(O){O[O.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",O[O.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(y=s.WindowsOptionsReportType||(s.WindowsOptionsReportType={}));let D=0;class B extends f.Disposable{constructor(m,b,L,R,T,U,N,I,W=new p.EscapeSequenceParser){super(),this._bufferService=m,this._charsetService=b,this._coreService=L,this._logService=R,this._optionsService=T,this._oscLinkService=U,this._coreMouseService=N,this._unicodeService=I,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new l.StringToUtf32,this._utf8Decoder=new l.Utf8ToUtf32,this._workCell=new t.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new r.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new r.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new r.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new r.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new r.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new r.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new r.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new r.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new r.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new r.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new r.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new r.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new H(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(k=>this._activeBuffer=k.activeBuffer)),this._parser.setCsiHandlerFallback((k,E)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(k),params:E.toArray()})}),this._parser.setEscHandlerFallback(k=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(k)})}),this._parser.setExecuteHandlerFallback(k=>{this._logService.debug("Unknown EXECUTE code: ",{code:k})}),this._parser.setOscHandlerFallback((k,E,A)=>{this._logService.debug("Unknown OSC code: ",{identifier:k,action:E,data:A})}),this._parser.setDcsHandlerFallback((k,E,A)=>{E==="HOOK"&&(A=A.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(k),action:E,payload:A})}),this._parser.setPrintHandler((k,E,A)=>this.print(k,E,A)),this._parser.registerCsiHandler({final:"@"},k=>this.insertChars(k)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},k=>this.scrollLeft(k)),this._parser.registerCsiHandler({final:"A"},k=>this.cursorUp(k)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},k=>this.scrollRight(k)),this._parser.registerCsiHandler({final:"B"},k=>this.cursorDown(k)),this._parser.registerCsiHandler({final:"C"},k=>this.cursorForward(k)),this._parser.registerCsiHandler({final:"D"},k=>this.cursorBackward(k)),this._parser.registerCsiHandler({final:"E"},k=>this.cursorNextLine(k)),this._parser.registerCsiHandler({final:"F"},k=>this.cursorPrecedingLine(k)),this._parser.registerCsiHandler({final:"G"},k=>this.cursorCharAbsolute(k)),this._parser.registerCsiHandler({final:"H"},k=>this.cursorPosition(k)),this._parser.registerCsiHandler({final:"I"},k=>this.cursorForwardTab(k)),this._parser.registerCsiHandler({final:"J"},k=>this.eraseInDisplay(k,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},k=>this.eraseInDisplay(k,!0)),this._parser.registerCsiHandler({final:"K"},k=>this.eraseInLine(k,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},k=>this.eraseInLine(k,!0)),this._parser.registerCsiHandler({final:"L"},k=>this.insertLines(k)),this._parser.registerCsiHandler({final:"M"},k=>this.deleteLines(k)),this._parser.registerCsiHandler({final:"P"},k=>this.deleteChars(k)),this._parser.registerCsiHandler({final:"S"},k=>this.scrollUp(k)),this._parser.registerCsiHandler({final:"T"},k=>this.scrollDown(k)),this._parser.registerCsiHandler({final:"X"},k=>this.eraseChars(k)),this._parser.registerCsiHandler({final:"Z"},k=>this.cursorBackwardTab(k)),this._parser.registerCsiHandler({final:"`"},k=>this.charPosAbsolute(k)),this._parser.registerCsiHandler({final:"a"},k=>this.hPositionRelative(k)),this._parser.registerCsiHandler({final:"b"},k=>this.repeatPrecedingCharacter(k)),this._parser.registerCsiHandler({final:"c"},k=>this.sendDeviceAttributesPrimary(k)),this._parser.registerCsiHandler({prefix:">",final:"c"},k=>this.sendDeviceAttributesSecondary(k)),this._parser.registerCsiHandler({final:"d"},k=>this.linePosAbsolute(k)),this._parser.registerCsiHandler({final:"e"},k=>this.vPositionRelative(k)),this._parser.registerCsiHandler({final:"f"},k=>this.hVPosition(k)),this._parser.registerCsiHandler({final:"g"},k=>this.tabClear(k)),this._parser.registerCsiHandler({final:"h"},k=>this.setMode(k)),this._parser.registerCsiHandler({prefix:"?",final:"h"},k=>this.setModePrivate(k)),this._parser.registerCsiHandler({final:"l"},k=>this.resetMode(k)),this._parser.registerCsiHandler({prefix:"?",final:"l"},k=>this.resetModePrivate(k)),this._parser.registerCsiHandler({final:"m"},k=>this.charAttributes(k)),this._parser.registerCsiHandler({final:"n"},k=>this.deviceStatus(k)),this._parser.registerCsiHandler({prefix:"?",final:"n"},k=>this.deviceStatusPrivate(k)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},k=>this.softReset(k)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},k=>this.setCursorStyle(k)),this._parser.registerCsiHandler({final:"r"},k=>this.setScrollRegion(k)),this._parser.registerCsiHandler({final:"s"},k=>this.saveCursor(k)),this._parser.registerCsiHandler({final:"t"},k=>this.windowOptions(k)),this._parser.registerCsiHandler({final:"u"},k=>this.restoreCursor(k)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},k=>this.insertColumns(k)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},k=>this.deleteColumns(k)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},k=>this.selectProtected(k)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},k=>this.requestMode(k,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},k=>this.requestMode(k,!1)),this._parser.setExecuteHandler(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new v.OscHandler(k=>(this.setTitle(k),this.setIconName(k),!0))),this._parser.registerOscHandler(1,new v.OscHandler(k=>this.setIconName(k))),this._parser.registerOscHandler(2,new v.OscHandler(k=>this.setTitle(k))),this._parser.registerOscHandler(4,new v.OscHandler(k=>this.setOrReportIndexedColor(k))),this._parser.registerOscHandler(8,new v.OscHandler(k=>this.setHyperlink(k))),this._parser.registerOscHandler(10,new v.OscHandler(k=>this.setOrReportFgColor(k))),this._parser.registerOscHandler(11,new v.OscHandler(k=>this.setOrReportBgColor(k))),this._parser.registerOscHandler(12,new v.OscHandler(k=>this.setOrReportCursorColor(k))),this._parser.registerOscHandler(104,new v.OscHandler(k=>this.restoreIndexedColor(k))),this._parser.registerOscHandler(110,new v.OscHandler(k=>this.restoreFgColor(k))),this._parser.registerOscHandler(111,new v.OscHandler(k=>this.restoreBgColor(k))),this._parser.registerOscHandler(112,new v.OscHandler(k=>this.restoreCursorColor(k))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const k in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:k},()=>this.selectCharset("("+k)),this._parser.registerEscHandler({intermediates:")",final:k},()=>this.selectCharset(")"+k)),this._parser.registerEscHandler({intermediates:"*",final:k},()=>this.selectCharset("*"+k)),this._parser.registerEscHandler({intermediates:"+",final:k},()=>this.selectCharset("+"+k)),this._parser.registerEscHandler({intermediates:"-",final:k},()=>this.selectCharset("-"+k)),this._parser.registerEscHandler({intermediates:".",final:k},()=>this.selectCharset("."+k)),this._parser.registerEscHandler({intermediates:"/",final:k},()=>this.selectCharset("/"+k));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(k=>(this._logService.error("Parsing error: ",k),k)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new g.DcsHandler((k,E)=>this.requestStatusString(k,E)))}getAttrData(){return this._curAttrData}_preserveStack(m,b,L,R){this._parseStack.paused=!0,this._parseStack.cursorStartX=m,this._parseStack.cursorStartY=b,this._parseStack.decodedLength=L,this._parseStack.position=R}_logSlowResolvingAsync(m){this._logService.logLevel<=c.LogLevelEnum.WARN&&Promise.race([m,new Promise((b,L)=>setTimeout(()=>L("#SLOW_TIMEOUT"),5e3))]).catch(b=>{if(b!=="#SLOW_TIMEOUT")throw b;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(m,b){let L,R=this._activeBuffer.x,T=this._activeBuffer.y,U=0;const N=this._parseStack.paused;if(N){if(L=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,b))return this._logSlowResolvingAsync(L),L;R=this._parseStack.cursorStartX,T=this._parseStack.cursorStartY,this._parseStack.paused=!1,m.length>C&&(U=this._parseStack.position+C)}if(this._logService.logLevel<=c.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof m=="string"?` "${m}"`:` "${Array.prototype.map.call(m,I=>String.fromCharCode(I)).join("")}"`),typeof m=="string"?m.split("").map(I=>I.charCodeAt(0)):m),this._parseBuffer.length<m.length&&this._parseBuffer.length<C&&(this._parseBuffer=new Uint32Array(Math.min(m.length,C))),N||this._dirtyRowTracker.clearRange(),m.length>C)for(let I=U;I<m.length;I+=C){const W=I+C<m.length?I+C:m.length,k=typeof m=="string"?this._stringDecoder.decode(m.substring(I,W),this._parseBuffer):this._utf8Decoder.decode(m.subarray(I,W),this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,k))return this._preserveStack(R,T,k,I),this._logSlowResolvingAsync(L),L}else if(!N){const I=typeof m=="string"?this._stringDecoder.decode(m,this._parseBuffer):this._utf8Decoder.decode(m,this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,I))return this._preserveStack(R,T,I,0),this._logSlowResolvingAsync(L),L}this._activeBuffer.x===R&&this._activeBuffer.y===T||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(m,b,L){let R,T;const U=this._charsetService.charset,N=this._optionsService.rawOptions.screenReaderMode,I=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,k=this._coreService.modes.insertMode,E=this._curAttrData;let A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&L-b>0&&A.getWidth(this._activeBuffer.x-1)===2&&A.setCellFromCodePoint(this._activeBuffer.x-1,0,1,E.fg,E.bg,E.extended);for(let x=b;x<L;++x){if(R=m[x],T=this._unicodeService.wcwidth(R),R<127&&U){const P=U[String.fromCharCode(R)];P&&(R=P.charCodeAt(0))}if(N&&this._onA11yChar.fire((0,l.stringFromCodePoint)(R)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),T||!this._activeBuffer.x){if(this._activeBuffer.x+T-1>=I){if(W){for(;this._activeBuffer.x<I;)A.setCellFromCodePoint(this._activeBuffer.x++,0,1,E.fg,E.bg,E.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),A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=I-1,T===2)continue}if(k&&(A.insertCells(this._activeBuffer.x,T,this._activeBuffer.getNullCell(E),E),A.getWidth(I-1)===2&&A.setCellFromCodePoint(I-1,i.NULL_CELL_CODE,i.NULL_CELL_WIDTH,E.fg,E.bg,E.extended)),A.setCellFromCodePoint(this._activeBuffer.x++,R,T,E.fg,E.bg,E.extended),T>0)for(;--T;)A.setCellFromCodePoint(this._activeBuffer.x++,0,0,E.fg,E.bg,E.extended)}else A.getWidth(this._activeBuffer.x-1)?A.addCodepointToCell(this._activeBuffer.x-1,R):A.addCodepointToCell(this._activeBuffer.x-2,R)}L-b>0&&(A.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<I&&L-b>0&&A.getWidth(this._activeBuffer.x)===0&&!A.hasContent(this._activeBuffer.x)&&A.setCellFromCodePoint(this._activeBuffer.x,0,1,E.fg,E.bg,E.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(m,b){return m.final!=="t"||m.prefix||m.intermediates?this._parser.registerCsiHandler(m,b):this._parser.registerCsiHandler(m,L=>!w(L.params[0],this._optionsService.rawOptions.windowOptions)||b(L))}registerDcsHandler(m,b){return this._parser.registerDcsHandler(m,new g.DcsHandler(b))}registerEscHandler(m,b){return this._parser.registerEscHandler(m,b)}registerOscHandler(m,b){return this._parser.registerOscHandler(m,new v.OscHandler(b))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.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.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var m;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&&(!((m=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||m===void 0)&&m.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);b.hasWidth(this._activeBuffer.x)&&!b.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const m=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-m),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(m=this._bufferService.cols-1){this._activeBuffer.x=Math.min(m,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._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(m,b){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=m,this._activeBuffer.y=this._activeBuffer.scrollTop+b):(this._activeBuffer.x=m,this._activeBuffer.y=b),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(m,b){this._restrictCursor(),this._setCursor(this._activeBuffer.x+m,this._activeBuffer.y+b)}cursorUp(m){const b=this._activeBuffer.y-this._activeBuffer.scrollTop;return b>=0?this._moveCursor(0,-Math.min(b,m.params[0]||1)):this._moveCursor(0,-(m.params[0]||1)),!0}cursorDown(m){const b=this._activeBuffer.scrollBottom-this._activeBuffer.y;return b>=0?this._moveCursor(0,Math.min(b,m.params[0]||1)):this._moveCursor(0,m.params[0]||1),!0}cursorForward(m){return this._moveCursor(m.params[0]||1,0),!0}cursorBackward(m){return this._moveCursor(-(m.params[0]||1),0),!0}cursorNextLine(m){return this.cursorDown(m),this._activeBuffer.x=0,!0}cursorPrecedingLine(m){return this.cursorUp(m),this._activeBuffer.x=0,!0}cursorCharAbsolute(m){return this._setCursor((m.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(m){return this._setCursor(m.length>=2?(m.params[1]||1)-1:0,(m.params[0]||1)-1),!0}charPosAbsolute(m){return this._setCursor((m.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(m){return this._moveCursor(m.params[0]||1,0),!0}linePosAbsolute(m){return this._setCursor(this._activeBuffer.x,(m.params[0]||1)-1),!0}vPositionRelative(m){return this._moveCursor(0,m.params[0]||1),!0}hVPosition(m){return this.cursorPosition(m),!0}tabClear(m){const b=m.params[0];return b===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:b===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(m){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let b=m.params[0]||1;for(;b--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(m){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let b=m.params[0]||1;for(;b--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(m){const b=m.params[0];return b===1&&(this._curAttrData.bg|=536870912),b!==2&&b!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(m,b,L,R=!1,T=!1){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+m);U.replaceCells(b,L,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),T),R&&(U.isWrapped=!1)}_resetBufferLine(m,b=!1){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+m);L&&(L.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),b),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+m),L.isWrapped=!1)}eraseInDisplay(m,b=!1){let L;switch(this._restrictCursor(this._bufferService.cols),m.params[0]){case 0:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,b);L<this._bufferService.rows;L++)this._resetBufferLine(L,b);this._dirtyRowTracker.markDirty(L);break;case 1:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L,0,this._activeBuffer.x+1,!0,b),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(L+1).isWrapped=!1);L--;)this._resetBufferLine(L,b);this._dirtyRowTracker.markDirty(0);break;case 2:for(L=this._bufferService.rows,this._dirtyRowTracker.markDirty(L-1);L--;)this._resetBufferLine(L,b);this._dirtyRowTracker.markDirty(0);break;case 3:const R=this._activeBuffer.lines.length-this._bufferService.rows;R>0&&(this._activeBuffer.lines.trimStart(R),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-R,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-R,0),this._onScroll.fire(0))}return!0}eraseInLine(m,b=!1){switch(this._restrictCursor(this._bufferService.cols),m.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,b);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,b);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,b)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(m){this._restrictCursor();let b=m.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y,R=this._bufferService.rows-1-this._activeBuffer.scrollBottom,T=this._bufferService.rows-1+this._activeBuffer.ybase-R+1;for(;b--;)this._activeBuffer.lines.splice(T-1,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(m){this._restrictCursor();let b=m.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y;let R;for(R=this._bufferService.rows-1-this._activeBuffer.scrollBottom,R=this._bufferService.rows-1+this._activeBuffer.ybase-R;b--;)this._activeBuffer.lines.splice(L,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(m){this._restrictCursor();const b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.insertCells(this._activeBuffer.x,m.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(m){this._restrictCursor();const b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.deleteCells(this._activeBuffer.x,m.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(m){let b=m.params[0]||1;for(;b--;)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._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(m){let b=m.params[0]||1;for(;b--;)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(e.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(m){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=m.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);R.deleteCells(0,b,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(m){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=m.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);R.insertCells(0,b,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(m){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=m.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);R.insertCells(this._activeBuffer.x,b,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(m){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=m.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);R.deleteCells(this._activeBuffer.x,b,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(m){this._restrictCursor();const b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return b&&(b.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(m.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(m){if(!this._parser.precedingCodepoint)return!0;const b=m.params[0]||1,L=new Uint32Array(b);for(let R=0;R<b;++R)L[R]=this._parser.precedingCodepoint;return this.print(L,0,L.length),!0}sendDeviceAttributesPrimary(m){return m.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(m){return m.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(m.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(m){return(this._optionsService.rawOptions.termName+"").indexOf(m)===0}setMode(m){for(let b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(m){for(let b=0;b<m.length;b++)switch(m.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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:this._optionsService.options.cursorBlink=!0;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 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";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}resetMode(m){for(let b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(m){for(let b=0;b<m.length;b++)switch(m.params[b]){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:this._optionsService.options.cursorBlink=!1;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:case 1016: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(),m.params[b]===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}requestMode(m,b){const L=this._coreService.decPrivateModes,{activeProtocol:R,activeEncoding:T}=this._coreMouseService,U=this._coreService,{buffers:N,cols:I}=this._bufferService,{active:W,alt:k}=N,E=this._optionsService.rawOptions,A=F=>F?1:2,x=m.params[0];return P=x,z=b?x===2?4:x===4?A(U.modes.insertMode):x===12?3:x===20?A(E.convertEol):0:x===1?A(L.applicationCursorKeys):x===3?E.windowOptions.setWinLines?I===80?2:I===132?1:0:0:x===6?A(L.origin):x===7?A(L.wraparound):x===8?3:x===9?A(R==="X10"):x===12?A(E.cursorBlink):x===25?A(!U.isCursorHidden):x===45?A(L.reverseWraparound):x===66?A(L.applicationKeypad):x===67?4:x===1e3?A(R==="VT200"):x===1002?A(R==="DRAG"):x===1003?A(R==="ANY"):x===1004?A(L.sendFocus):x===1005?4:x===1006?A(T==="SGR"):x===1015?4:x===1016?A(T==="SGR_PIXELS"):x===1048?1:x===47||x===1047||x===1049?A(W===k):x===2004?A(L.bracketedPasteMode):0,U.triggerDataEvent(`${d.C0.ESC}[${b?"":"?"}${P};${z}$y`),!0;var P,z}_updateAttrColor(m,b,L,R,T){return b===2?(m|=50331648,m&=-16777216,m|=n.AttributeData.fromColorRGB([L,R,T])):b===5&&(m&=-50331904,m|=33554432|255&L),m}_extractColor(m,b,L){const R=[0,0,-1,0,0,0];let T=0,U=0;do{if(R[U+T]=m.params[b+U],m.hasSubParams(b+U)){const N=m.getSubParams(b+U);let I=0;do R[1]===5&&(T=1),R[U+I+1+T]=N[I];while(++I<N.length&&I+U+1+T<R.length);break}if(R[1]===5&&U+T>=2||R[1]===2&&U+T>=5)break;R[1]&&(T=1)}while(++U+b<m.length&&U+T<R.length);for(let N=2;N<R.length;++N)R[N]===-1&&(R[N]=0);switch(R[0]){case 38:L.fg=this._updateAttrColor(L.fg,R[1],R[3],R[4],R[5]);break;case 48:L.bg=this._updateAttrColor(L.bg,R[1],R[3],R[4],R[5]);break;case 58:L.extended=L.extended.clone(),L.extended.underlineColor=this._updateAttrColor(L.extended.underlineColor,R[1],R[3],R[4],R[5])}return U}_processUnderline(m,b){b.extended=b.extended.clone(),(!~m||m>5)&&(m=1),b.extended.underlineStyle=m,b.fg|=268435456,m===0&&(b.fg&=-268435457),b.updateExtended()}_processSGR0(m){m.fg=e.DEFAULT_ATTR_DATA.fg,m.bg=e.DEFAULT_ATTR_DATA.bg,m.extended=m.extended.clone(),m.extended.underlineStyle=0,m.extended.underlineColor&=-67108864,m.updateExtended()}charAttributes(m){if(m.length===1&&m.params[0]===0)return this._processSGR0(this._curAttrData),!0;const b=m.length;let L;const R=this._curAttrData;for(let T=0;T<b;T++)L=m.params[T],L>=30&&L<=37?(R.fg&=-50331904,R.fg|=16777216|L-30):L>=40&&L<=47?(R.bg&=-50331904,R.bg|=16777216|L-40):L>=90&&L<=97?(R.fg&=-50331904,R.fg|=16777224|L-90):L>=100&&L<=107?(R.bg&=-50331904,R.bg|=16777224|L-100):L===0?this._processSGR0(R):L===1?R.fg|=134217728:L===3?R.bg|=67108864:L===4?(R.fg|=268435456,this._processUnderline(m.hasSubParams(T)?m.getSubParams(T)[0]:1,R)):L===5?R.fg|=536870912:L===7?R.fg|=67108864:L===8?R.fg|=1073741824:L===9?R.fg|=2147483648:L===2?R.bg|=134217728:L===21?this._processUnderline(2,R):L===22?(R.fg&=-134217729,R.bg&=-134217729):L===23?R.bg&=-67108865:L===24?(R.fg&=-268435457,this._processUnderline(0,R)):L===25?R.fg&=-536870913:L===27?R.fg&=-67108865:L===28?R.fg&=-1073741825:L===29?R.fg&=2147483647:L===39?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):L===49?(R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):L===38||L===48||L===58?T+=this._extractColor(m,T,R):L===53?R.bg|=1073741824:L===55?R.bg&=-1073741825:L===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):L===100?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",L);return!0}deviceStatus(m){switch(m.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const b=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${b};${L}R`)}return!0}deviceStatusPrivate(m){if(m.params[0]===6){const b=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${b};${L}R`)}return!0}softReset(m){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.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}setCursorStyle(m){const b=m.params[0]||1;switch(b){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"}const L=b%2==1;return this._optionsService.options.cursorBlink=L,!0}setScrollRegion(m){const b=m.params[0]||1;let L;return(m.length<2||(L=m.params[1])>this._bufferService.rows||L===0)&&(L=this._bufferService.rows),L>b&&(this._activeBuffer.scrollTop=b-1,this._activeBuffer.scrollBottom=L-1,this._setCursor(0,0)),!0}windowOptions(m){if(!w(m.params[0],this._optionsService.rawOptions.windowOptions))return!0;const b=m.length>1?m.params[1]:0;switch(m.params[0]){case 14:b!==2&&this._onRequestWindowsOptionsReport.fire(y.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(y.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:b!==0&&b!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),b!==0&&b!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:b!==0&&b!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),b!==0&&b!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(m){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}restoreCursor(m){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}setTitle(m){return this._windowTitle=m,this._onTitleChange.fire(m),!0}setIconName(m){return this._iconName=m,!0}setOrReportIndexedColor(m){const b=[],L=m.split(";");for(;L.length>1;){const R=L.shift(),T=L.shift();if(/^\d+$/.exec(R)){const U=parseInt(R);if(0<=U&&U<256)if(T==="?")b.push({type:0,index:U});else{const N=(0,o.parseColor)(T);N&&b.push({type:1,index:U,color:N})}}}return b.length&&this._onColor.fire(b),!0}setHyperlink(m){const b=m.split(";");return!(b.length<2)&&(b[1]?this._createHyperlink(b[0],b[1]):!b[0]&&this._finishHyperlink())}_createHyperlink(m,b){this._getCurrentLinkId()&&this._finishHyperlink();const L=m.split(":");let R;const T=L.findIndex(U=>U.startsWith("id="));return T!==-1&&(R=L[T].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:R,uri:b}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(m,b){const L=m.split(";");for(let R=0;R<L.length&&!(b>=this._specialColors.length);++R,++b)if(L[R]==="?")this._onColor.fire([{type:0,index:this._specialColors[b]}]);else{const T=(0,o.parseColor)(L[R]);T&&this._onColor.fire([{type:1,index:this._specialColors[b],color:T}])}return!0}setOrReportFgColor(m){return this._setOrReportSpecialColor(m,0)}setOrReportBgColor(m){return this._setOrReportSpecialColor(m,1)}setOrReportCursorColor(m){return this._setOrReportSpecialColor(m,2)}restoreIndexedColor(m){if(!m)return this._onColor.fire([{type:2}]),!0;const b=[],L=m.split(";");for(let R=0;R<L.length;++R)if(/^\d+$/.exec(L[R])){const T=parseInt(L[R]);0<=T&&T<256&&b.push({type:2,index:T})}return b.length&&this._onColor.fire(b),!0}restoreFgColor(m){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(m){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(m){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),!0}selectCharset(m){return m.length!==2?(this.selectDefaultCharset(),!0):(m[0]==="/"||this._charsetService.setgCharset(S[m[0]],_.CHARSETS[m[1]]||_.DEFAULT_CHARSET),!0)}index(){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}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const m=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,m,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(m){return this._charsetService.setgLevel(m),!0}screenAlignmentPattern(){const m=new t.CellData;m.content=4194304|"E".charCodeAt(0),m.fg=this._curAttrData.fg,m.bg=this._curAttrData.bg,this._setCursor(0,0);for(let b=0;b<this._bufferService.rows;++b){const L=this._activeBuffer.ybase+this._activeBuffer.y+b,R=this._activeBuffer.lines.get(L);R&&(R.fill(m),R.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(m,b){const L=this._bufferService.buffer,R=this._optionsService.rawOptions;return(T=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${T}${d.C0.ESC}\\`),!0))(m==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:m==='"p'?'P1$r61;1"p':m==="r"?`P1$r${L.scrollTop+1};${L.scrollBottom+1}r`:m==="m"?"P1$r0m":m===" q"?`P1$r${{block:2,underline:4,bar:6}[R.cursorStyle]-(R.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(m,b){this._dirtyRowTracker.markRangeDirty(m,b)}}s.InputHandler=B;let H=class{constructor(O){this._bufferService=O,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(O){O<this.start?this.start=O:O>this.end&&(this.end=O)}markRangeDirty(O,m){O>m&&(D=O,O=m,m=D),O<this.start&&(this.start=O),m>this.end&&(this.end=m)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};H=h([u(0,c.IBufferService)],H)},844:(M,s)=>{function a(h){for(const u of h)u.dispose();h.length=0}Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.toDisposable=s.Disposable=void 0,s.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const u=this._disposables.indexOf(h);u!==-1&&this._disposables.splice(u,1)}},s.toDisposable=function(h){return{dispose:h}},s.disposeArray=a,s.getDisposeArrayDisposable=function(h){return{dispose:()=>a(h)}}},1505:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.FourKeyMap=s.TwoKeyMap=void 0;class a{constructor(){this._data={}}set(u,d,_){this._data[u]||(this._data[u]={}),this._data[u][d]=_}get(u,d){return this._data[u]?this._data[u][d]:void 0}clear(){this._data={}}}s.TwoKeyMap=a,s.FourKeyMap=class{constructor(){this._data=new a}set(h,u,d,_,p){this._data.get(h,u)||this._data.set(h,u,new a),this._data.get(h,u).set(d,_,p)}get(h,u,d,_){var p;return(p=this._data.get(h,u))===null||p===void 0?void 0:p.get(d,_)}clear(){this._data.clear()}}},6114:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.isChromeOS=s.isLinux=s.isWindows=s.isIphone=s.isIpad=s.isMac=s.getSafariVersion=s.isSafari=s.isLegacyEdge=s.isFirefox=s.isNode=void 0,s.isNode=typeof navigator>"u";const a=s.isNode?"node":navigator.userAgent,h=s.isNode?"node":navigator.platform;s.isFirefox=a.includes("Firefox"),s.isLegacyEdge=a.includes("Edge"),s.isSafari=/^((?!chrome|android).)*safari/i.test(a),s.getSafariVersion=function(){if(!s.isSafari)return 0;const u=a.match(/Version\/(\d+)/);return u===null||u.length<2?0:parseInt(u[1])},s.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),s.isIpad=h==="iPad",s.isIphone=h==="iPhone",s.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),s.isLinux=h.indexOf("Linux")>=0,s.isChromeOS=/\bCrOS\b/.test(a)},6106:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.SortedList=void 0;let a=0;s.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(a=this._search(this._getKey(h),0,this._array.length-1),this._array.splice(a,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const u=this._getKey(h);if(u===void 0||(a=this._search(u,0,this._array.length-1),a===-1)||this._getKey(this._array[a])!==u)return!1;do if(this._array[a]===h)return this._array.splice(a,1),!0;while(++a<this._array.length&&this._getKey(this._array[a])===u);return!1}*getKeyIterator(h){if(this._array.length!==0&&(a=this._search(h,0,this._array.length-1),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===h))do yield this._array[a];while(++a<this._array.length&&this._getKey(this._array[a])===h)}forEachByKey(h,u){if(this._array.length!==0&&(a=this._search(h,0,this._array.length-1),!(a<0||a>=this._array.length)&&this._getKey(this._array[a])===h))do u(this._array[a]);while(++a<this._array.length&&this._getKey(this._array[a])===h)}values(){return this._array.values()}_search(h,u,d){if(d<u)return u;let _=Math.floor((u+d)/2);const p=this._getKey(this._array[_]);if(p>h)return this._search(h,u,_-1);if(p<h)return this._search(h,_+1,d);for(;_>0&&this._getKey(this._array[_-1])===h;)_--;return _}}},7226:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DebouncedIdleTask=s.IdleTaskQueue=s.PriorityTaskQueue=void 0;const h=a(6114);class u{constructor(){this._tasks=[],this._i=0}enqueue(p){this._tasks.push(p),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(p){this._idleCallback=void 0;let f=0,l=0,e=p.timeRemaining(),r=0;for(;this._i<this._tasks.length;){if(f=Date.now(),this._tasks[this._i]()||this._i++,f=Math.max(1,Date.now()-f),l=Math.max(f,l),r=p.timeRemaining(),1.5*l>r)return e-f<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e-f))}ms`),void this._start();e=r}this.clear()}}class d extends u{_requestCallback(p){return setTimeout(()=>p(this._createDeadline(16)))}_cancelCallback(p){clearTimeout(p)}_createDeadline(p){const f=Date.now()+p;return{timeRemaining:()=>Math.max(0,f-Date.now())}}}s.PriorityTaskQueue=d,s.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends u{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:d,s.DebouncedIdleTask=class{constructor(){this._queue=new s.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.updateWindowsModeWrappedState=void 0;const h=a(643);s.updateWindowsModeWrappedState=function(u){const d=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),_=d?.get(u.cols-1),p=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);p&&_&&(p.isWrapped=_[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&_[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExtendedAttrs=s.AttributeData=void 0;class a{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new a;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}s.AttributeData=a;class h{constructor(d=0,_=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=_}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}s.ExtendedAttrs=h},9092:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Buffer=s.MAX_BUFFER_SIZE=void 0;const h=a(6349),u=a(8437),d=a(511),_=a(643),p=a(4634),f=a(4863),l=a(7116),e=a(3734),r=a(7226);s.MAX_BUFFER_SIZE=4294967295,s.Buffer=class{constructor(i,t,n){this._hasScrollback=i,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=u.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=d.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=d.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new r.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(i){return i?(this._nullCell.fg=i.fg,this._nullCell.bg=i.bg,this._nullCell.extended=i.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new e.ExtendedAttrs),this._nullCell}getWhitespaceCell(i){return i?(this._whitespaceCell.fg=i.fg,this._whitespaceCell.bg=i.bg,this._whitespaceCell.extended=i.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new e.ExtendedAttrs),this._whitespaceCell}getBlankLine(i,t){return new u.BufferLine(this._bufferService.cols,this.getNullCell(i),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const i=this.ybase+this.y-this.ydisp;return i>=0&&i<this._rows}_getCorrectBufferLength(i){if(!this._hasScrollback)return i;const t=i+this._optionsService.rawOptions.scrollback;return t>s.MAX_BUFFER_SIZE?s.MAX_BUFFER_SIZE:t}fillViewportRows(i){if(this.lines.length===0){i===void 0&&(i=u.DEFAULT_ATTR_DATA);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(i))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(i,t){const n=this.getNullCell(u.DEFAULT_ATTR_DATA);let c=0;const v=this._getCorrectBufferLength(t);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<i)for(let o=0;o<this.lines.length;o++)c+=+this.lines.get(o).resize(i,n);let g=0;if(this._rows<t)for(let o=this._rows;o<t;o++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new u.BufferLine(i,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+g+1?(this.ybase--,g++,this.ydisp>0&&this.ydisp--):this.lines.push(new u.BufferLine(i,n)));else for(let o=this._rows;o>t;o--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const o=this.lines.length-v;o>0&&(this.lines.trimStart(o),this.ybase=Math.max(this.ybase-o,0),this.ydisp=Math.max(this.ydisp-o,0),this.savedY=Math.max(this.savedY-o,0)),this.lines.maxLength=v}this.x=Math.min(this.x,i-1),this.y=Math.min(this.y,t-1),g&&(this.y+=g),this.savedX=Math.min(this.savedX,i-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(i,t),this._cols>i))for(let g=0;g<this.lines.length;g++)c+=+this.lines.get(g).resize(i,n);this._cols=i,this._rows=t,this._memoryCleanupQueue.clear(),c>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let i=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,i=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return i}get _isReflowEnabled(){const i=this._optionsService.rawOptions.windowsPty;return i&&i.buildNumber?this._hasScrollback&&i.backend==="conpty"&&i.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(i,t){this._cols!==i&&(i>this._cols?this._reflowLarger(i,t):this._reflowSmaller(i,t))}_reflowLarger(i,t){const n=(0,p.reflowLargerGetLinesToRemove)(this.lines,this._cols,i,this.ybase+this.y,this.getNullCell(u.DEFAULT_ATTR_DATA));if(n.length>0){const c=(0,p.reflowLargerCreateNewLayout)(this.lines,n);(0,p.reflowLargerApplyNewLayout)(this.lines,c.layout),this._reflowLargerAdjustViewport(i,t,c.countRemoved)}}_reflowLargerAdjustViewport(i,t,n){const c=this.getNullCell(u.DEFAULT_ATTR_DATA);let v=n;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new u.BufferLine(i,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)}_reflowSmaller(i,t){const n=this.getNullCell(u.DEFAULT_ATTR_DATA),c=[];let v=0;for(let g=this.lines.length-1;g>=0;g--){let o=this.lines.get(g);if(!o||!o.isWrapped&&o.getTrimmedLength()<=i)continue;const S=[o];for(;o.isWrapped&&g>0;)o=this.lines.get(--g),S.unshift(o);const C=this.ybase+this.y;if(C>=g&&C<g+S.length)continue;const w=S[S.length-1].getTrimmedLength(),y=(0,p.reflowSmallerGetNewLineLengths)(S,this._cols,i),D=y.length-S.length;let B;B=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+D):Math.max(0,this.lines.length-this.lines.maxLength+D);const H=[];for(let T=0;T<D;T++){const U=this.getBlankLine(u.DEFAULT_ATTR_DATA,!0);H.push(U)}H.length>0&&(c.push({start:g+S.length+v,newLines:H}),v+=H.length),S.push(...H);let O=y.length-1,m=y[O];m===0&&(O--,m=y[O]);let b=S.length-D-1,L=w;for(;b>=0;){const T=Math.min(L,m);if(S[O]===void 0)break;if(S[O].copyCellsFrom(S[b],L-T,m-T,T,!0),m-=T,m===0&&(O--,m=y[O]),L-=T,L===0){b--;const U=Math.max(b,0);L=(0,p.getWrappedLineTrimmedLength)(S,U,this._cols)}}for(let T=0;T<S.length;T++)y[T]<i&&S[T].setCell(y[T],n);let R=D-B;for(;R-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+t-1)}if(c.length>0){const g=[],o=[];for(let O=0;O<this.lines.length;O++)o.push(this.lines.get(O));const S=this.lines.length;let C=S-1,w=0,y=c[w];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let D=0;for(let O=Math.min(this.lines.maxLength-1,S+v-1);O>=0;O--)if(y&&y.start>C+D){for(let m=y.newLines.length-1;m>=0;m--)this.lines.set(O--,y.newLines[m]);O++,g.push({index:C+1,amount:y.newLines.length}),D+=y.newLines.length,y=c[++w]}else this.lines.set(O,o[C--]);let B=0;for(let O=g.length-1;O>=0;O--)g[O].index+=B,this.lines.onInsertEmitter.fire(g[O]),B+=g[O].amount;const H=Math.max(0,S+v-this.lines.maxLength);H>0&&this.lines.onTrimEmitter.fire(H)}}translateBufferLineToString(i,t,n=0,c){const v=this.lines.get(i);return v?v.translateToString(t,n,c):""}getWrappedRangeForLine(i){let t=i,n=i;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}}setupTabStops(i){for(i!=null?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);i<this._cols;i+=this._optionsService.rawOptions.tabStopWidth)this.tabs[i]=!0}prevStop(i){for(i==null&&(i=this.x);!this.tabs[--i]&&i>0;);return i>=this._cols?this._cols-1:i<0?0:i}nextStop(i){for(i==null&&(i=this.x);!this.tabs[++i]&&i<this._cols;);return i>=this._cols?this._cols-1:i<0?0:i}clearMarkers(i){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===i&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let i=0;i<this.markers.length;i++)this.markers[i].dispose(),this.markers.splice(i--,1);this._isClearing=!1}addMarker(i){const t=new f.Marker(i);return this.markers.push(t),t.register(this.lines.onTrim(n=>{t.line-=n,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(n=>{t.line>=n.index&&(t.line+=n.amount)})),t.register(this.lines.onDelete(n=>{t.line>=n.index&&t.line<n.index+n.amount&&t.dispose(),t.line>n.index&&(t.line-=n.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(i){this._isClearing||this.markers.splice(this.markers.indexOf(i),1)}}},8437:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLine=s.DEFAULT_ATTR_DATA=void 0;const h=a(482),u=a(643),d=a(511),_=a(3734);s.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let p=0;class f{constructor(e,r,i=!1){this.isWrapped=i,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const t=r||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let n=0;n<e;++n)this.setCell(n,t);this.length=e}get(e){const r=this._data[3*e+0],i=2097151&r;return[this._data[3*e+1],2097152&r?this._combined[e]:i?(0,h.stringFromCodePoint)(i):"",r>>22,2097152&r?this._combined[e].charCodeAt(this._combined[e].length-1):i]}set(e,r){this._data[3*e+1]=r[u.CHAR_DATA_ATTR_INDEX],r[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=r[1],this._data[3*e+0]=2097152|e|r[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=r[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|r[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const r=this._data[3*e+0];return 2097152&r?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&r}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const r=this._data[3*e+0];return 2097152&r?this._combined[e]:2097151&r?(0,h.stringFromCodePoint)(2097151&r):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,r){return p=3*e,r.content=this._data[p+0],r.fg=this._data[p+1],r.bg=this._data[p+2],2097152&r.content&&(r.combinedData=this._combined[e]),268435456&r.bg&&(r.extended=this._extendedAttrs[e]),r}setCell(e,r){2097152&r.content&&(this._combined[e]=r.combinedData),268435456&r.bg&&(this._extendedAttrs[e]=r.extended),this._data[3*e+0]=r.content,this._data[3*e+1]=r.fg,this._data[3*e+2]=r.bg}setCellFromCodePoint(e,r,i,t,n,c){268435456&n&&(this._extendedAttrs[e]=c),this._data[3*e+0]=r|i<<22,this._data[3*e+1]=t,this._data[3*e+2]=n}addCodepointToCell(e,r){let i=this._data[3*e+0];2097152&i?this._combined[e]+=(0,h.stringFromCodePoint)(r):(2097151&i?(this._combined[e]=(0,h.stringFromCodePoint)(2097151&i)+(0,h.stringFromCodePoint)(r),i&=-2097152,i|=2097152):i=r|4194304,this._data[3*e+0]=i)}insertCells(e,r,i,t){if((e%=this.length)&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs),r<this.length-e){const n=new d.CellData;for(let c=this.length-e-r-1;c>=0;--c)this.setCell(e+r+c,this.loadCell(e+c,n));for(let c=0;c<r;++c)this.setCell(e+c,i)}else for(let n=e;n<this.length;++n)this.setCell(n,i);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs)}deleteCells(e,r,i,t){if(e%=this.length,r<this.length-e){const n=new d.CellData;for(let c=0;c<this.length-e-r;++c)this.setCell(e+c,this.loadCell(e+r+c,n));for(let c=this.length-r;c<this.length;++c)this.setCell(c,i)}else for(let n=e;n<this.length;++n)this.setCell(n,i);e&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs),this.getWidth(e)!==0||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs)}replaceCells(e,r,i,t,n=!1){if(n)for(e&&this.getWidth(e-1)===2&&!this.isProtected(e-1)&&this.setCellFromCodePoint(e-1,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodePoint(r,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs);e<r&&e<this.length;)this.isProtected(e)||this.setCell(e,i),e++;else for(e&&this.getWidth(e-1)===2&&this.setCellFromCodePoint(e-1,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r,0,1,t?.fg||0,t?.bg||0,t?.extended||new _.ExtendedAttrs);e<r&&e<this.length;)this.setCell(e++,i)}resize(e,r){if(e===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const i=3*e;if(e>this.length){if(this._data.buffer.byteLength>=4*i)this._data=new Uint32Array(this._data.buffer,0,i);else{const t=new Uint32Array(i);t.set(this._data),this._data=t}for(let t=this.length;t<e;++t)this.setCell(t,r)}else{this._data=this._data.subarray(0,i);const t=Object.keys(this._combined);for(let c=0;c<t.length;c++){const v=parseInt(t[c],10);v>=e&&delete this._combined[v]}const n=Object.keys(this._extendedAttrs);for(let c=0;c<n.length;c++){const v=parseInt(n[c],10);v>=e&&delete this._extendedAttrs[v]}}return this.length=e,4*i*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const e=new Uint32Array(this._data.length);return e.set(this._data),this._data=e,1}return 0}fill(e,r=!1){if(r)for(let i=0;i<this.length;++i)this.isProtected(i)||this.setCell(i,e);else{this._combined={},this._extendedAttrs={};for(let i=0;i<this.length;++i)this.setCell(i,e)}}copyFrom(e){this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={};for(const r in e._combined)this._combined[r]=e._combined[r];this._extendedAttrs={};for(const r in e._extendedAttrs)this._extendedAttrs[r]=e._extendedAttrs[r];this.isWrapped=e.isWrapped}clone(){const e=new f(0);e._data=new Uint32Array(this._data),e.length=this.length;for(const r in this._combined)e._combined[r]=this._combined[r];for(const r in this._extendedAttrs)e._extendedAttrs[r]=this._extendedAttrs[r];return e.isWrapped=this.isWrapped,e}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,r,i,t,n){const c=e._data;if(n)for(let g=t-1;g>=0;g--){for(let o=0;o<3;o++)this._data[3*(i+g)+o]=c[3*(r+g)+o];268435456&c[3*(r+g)+2]&&(this._extendedAttrs[i+g]=e._extendedAttrs[r+g])}else for(let g=0;g<t;g++){for(let o=0;o<3;o++)this._data[3*(i+g)+o]=c[3*(r+g)+o];268435456&c[3*(r+g)+2]&&(this._extendedAttrs[i+g]=e._extendedAttrs[r+g])}const v=Object.keys(e._combined);for(let g=0;g<v.length;g++){const o=parseInt(v[g],10);o>=r&&(this._combined[o-r+i]=e._combined[o])}}translateToString(e=!1,r=0,i=this.length){e&&(i=Math.min(i,this.getTrimmedLength()));let t="";for(;r<i;){const n=this._data[3*r+0],c=2097151&n;t+=2097152&n?this._combined[r]:c?(0,h.stringFromCodePoint)(c):u.WHITESPACE_CELL_CHAR,r+=n>>22||1}return t}}s.BufferLine=f},4841:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.getRangeLength=void 0,s.getRangeLength=function(a,h){if(a.start.y>a.end.y)throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);return h*(a.end.y-a.start.y)+(a.end.x-a.start.x+1)}},4634:(M,s)=>{function a(h,u,d){if(u===h.length-1)return h[u].getTrimmedLength();const _=!h[u].hasContent(d-1)&&h[u].getWidth(d-1)===1,p=h[u+1].getWidth(0)===2;return _&&p?d-1:d}Object.defineProperty(s,"__esModule",{value:!0}),s.getWrappedLineTrimmedLength=s.reflowSmallerGetNewLineLengths=s.reflowLargerApplyNewLayout=s.reflowLargerCreateNewLayout=s.reflowLargerGetLinesToRemove=void 0,s.reflowLargerGetLinesToRemove=function(h,u,d,_,p){const f=[];for(let l=0;l<h.length-1;l++){let e=l,r=h.get(++e);if(!r.isWrapped)continue;const i=[h.get(l)];for(;e<h.length&&r.isWrapped;)i.push(r),r=h.get(++e);if(_>=l&&_<e){l+=i.length-1;continue}let t=0,n=a(i,t,u),c=1,v=0;for(;c<i.length;){const o=a(i,c,u),S=o-v,C=d-n,w=Math.min(S,C);i[t].copyCellsFrom(i[c],v,n,w,!1),n+=w,n===d&&(t++,n=0),v+=w,v===o&&(c++,v=0),n===0&&t!==0&&i[t-1].getWidth(d-1)===2&&(i[t].copyCellsFrom(i[t-1],d-1,n++,1,!1),i[t-1].setCell(d-1,p))}i[t].replaceCells(n,d,p);let g=0;for(let o=i.length-1;o>0&&(o>t||i[o].getTrimmedLength()===0);o--)g++;g>0&&(f.push(l+i.length-g),f.push(g)),l+=i.length-1}return f},s.reflowLargerCreateNewLayout=function(h,u){const d=[];let _=0,p=u[_],f=0;for(let l=0;l<h.length;l++)if(p===l){const e=u[++_];h.onDeleteEmitter.fire({index:l-f,amount:e}),l+=e-1,f+=e,p=u[++_]}else d.push(l);return{layout:d,countRemoved:f}},s.reflowLargerApplyNewLayout=function(h,u){const d=[];for(let _=0;_<u.length;_++)d.push(h.get(u[_]));for(let _=0;_<d.length;_++)h.set(_,d[_]);h.length=u.length},s.reflowSmallerGetNewLineLengths=function(h,u,d){const _=[],p=h.map((r,i)=>a(h,i,u)).reduce((r,i)=>r+i);let f=0,l=0,e=0;for(;e<p;){if(p-e<d){_.push(p-e);break}f+=d;const r=a(h,l,u);f>r&&(f-=r,l++);const i=h[l].getWidth(f-1)===2;i&&f--;const t=i?d-1:d;_.push(t),e+=t}return _},s.getWrappedLineTrimmedLength=a},5295:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferSet=void 0;const h=a(9092),u=a(8460),d=a(844);class _ extends d.Disposable{constructor(f,l){super(),this._optionsService=f,this._bufferService=l,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(f){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(f),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}))}resize(f,l){this._normal.resize(f,l),this._alt.resize(f,l),this.setupTabStops(f)}setupTabStops(f){this._normal.setupTabStops(f),this._alt.setupTabStops(f)}}s.BufferSet=_},511:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CellData=void 0;const h=a(482),u=a(643),d=a(3734);class _ extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(f){const l=new _;return l.setFromCharData(f),l}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(f){this.fg=f[u.CHAR_DATA_ATTR_INDEX],this.bg=0;let l=!1;if(f[u.CHAR_DATA_CHAR_INDEX].length>2)l=!0;else if(f[u.CHAR_DATA_CHAR_INDEX].length===2){const e=f[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=e&&e<=56319){const r=f[u.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(e-55296)+r-56320+65536|f[u.CHAR_DATA_WIDTH_INDEX]<<22:l=!0}else l=!0}else this.content=f[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|f[u.CHAR_DATA_WIDTH_INDEX]<<22;l&&(this.combinedData=f[u.CHAR_DATA_CHAR_INDEX],this.content=2097152|f[u.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}s.CellData=_},643:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WHITESPACE_CELL_CODE=s.WHITESPACE_CELL_WIDTH=s.WHITESPACE_CELL_CHAR=s.NULL_CELL_CODE=s.NULL_CELL_WIDTH=s.NULL_CELL_CHAR=s.CHAR_DATA_CODE_INDEX=s.CHAR_DATA_WIDTH_INDEX=s.CHAR_DATA_CHAR_INDEX=s.CHAR_DATA_ATTR_INDEX=s.DEFAULT_EXT=s.DEFAULT_ATTR=s.DEFAULT_COLOR=void 0,s.DEFAULT_COLOR=0,s.DEFAULT_ATTR=256|s.DEFAULT_COLOR<<9,s.DEFAULT_EXT=0,s.CHAR_DATA_ATTR_INDEX=0,s.CHAR_DATA_CHAR_INDEX=1,s.CHAR_DATA_WIDTH_INDEX=2,s.CHAR_DATA_CODE_INDEX=3,s.NULL_CELL_CHAR="",s.NULL_CELL_WIDTH=1,s.NULL_CELL_CODE=0,s.WHITESPACE_CELL_CHAR=" ",s.WHITESPACE_CELL_WIDTH=1,s.WHITESPACE_CELL_CODE=32},4863:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Marker=void 0;const h=a(8460),u=a(844);class d{constructor(p){this.line=p,this.isDisposed=!1,this._disposables=[],this._id=d._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,u.disposeArray)(this._disposables),this._disposables.length=0)}register(p){return this._disposables.push(p),p}}s.Marker=d,d._nextId=1},7116:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CHARSET=s.CHARSETS=void 0,s.CHARSETS={},s.DEFAULT_CHARSET=s.CHARSETS.B,s.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},s.CHARSETS.A={"#":"£"},s.CHARSETS.B=void 0,s.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},s.CHARSETS.C=s.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},s.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},s.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},s.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},s.CHARSETS.E=s.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},s.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},s.CHARSETS.H=s.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},s.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(M,s)=>{var a,h;Object.defineProperty(s,"__esModule",{value:!0}),s.C1_ESCAPED=s.C1=s.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
8
8
|
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""}(a=s.C0||(s.C0={})),(h=s.C1||(s.C1={})).PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC="",(s.C1_ESCAPED||(s.C1_ESCAPED={})).ST=`${a.ESC}\\`},7399:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.evaluateKeyboardEvent=void 0;const h=a(2584),u={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:["'",'"']};s.evaluateKeyboardEvent=function(d,_,p,f){const l={type:0,cancel:!1,key:void 0},e=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?l.key=_?h.C0.ESC+"OA":h.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?l.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?l.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(l.key=_?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:if(d.altKey){l.key=h.C0.ESC+h.C0.DEL;break}l.key=h.C0.DEL;break;case 9:if(d.shiftKey){l.key=h.C0.ESC+"[Z";break}l.key=h.C0.HT,l.cancel=!0;break;case 13:l.key=d.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,l.cancel=!0;break;case 27:l.key=h.C0.ESC,d.altKey&&(l.key=h.C0.ESC+h.C0.ESC),l.cancel=!0;break;case 37:if(d.metaKey)break;e?(l.key=h.C0.ESC+"[1;"+(e+1)+"D",l.key===h.C0.ESC+"[1;3D"&&(l.key=h.C0.ESC+(p?"b":"[1;5D"))):l.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(d.metaKey)break;e?(l.key=h.C0.ESC+"[1;"+(e+1)+"C",l.key===h.C0.ESC+"[1;3C"&&(l.key=h.C0.ESC+(p?"f":"[1;5C"))):l.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(d.metaKey)break;e?(l.key=h.C0.ESC+"[1;"+(e+1)+"A",p||l.key!==h.C0.ESC+"[1;3A"||(l.key=h.C0.ESC+"[1;5A")):l.key=_?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(d.metaKey)break;e?(l.key=h.C0.ESC+"[1;"+(e+1)+"B",p||l.key!==h.C0.ESC+"[1;3B"||(l.key=h.C0.ESC+"[1;5B")):l.key=_?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(l.key=h.C0.ESC+"[2~");break;case 46:l.key=e?h.C0.ESC+"[3;"+(e+1)+"~":h.C0.ESC+"[3~";break;case 36:l.key=e?h.C0.ESC+"[1;"+(e+1)+"H":_?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:l.key=e?h.C0.ESC+"[1;"+(e+1)+"F":_?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:d.shiftKey?l.type=2:d.ctrlKey?l.key=h.C0.ESC+"[5;"+(e+1)+"~":l.key=h.C0.ESC+"[5~";break;case 34:d.shiftKey?l.type=3:d.ctrlKey?l.key=h.C0.ESC+"[6;"+(e+1)+"~":l.key=h.C0.ESC+"[6~";break;case 112:l.key=e?h.C0.ESC+"[1;"+(e+1)+"P":h.C0.ESC+"OP";break;case 113:l.key=e?h.C0.ESC+"[1;"+(e+1)+"Q":h.C0.ESC+"OQ";break;case 114:l.key=e?h.C0.ESC+"[1;"+(e+1)+"R":h.C0.ESC+"OR";break;case 115:l.key=e?h.C0.ESC+"[1;"+(e+1)+"S":h.C0.ESC+"OS";break;case 116:l.key=e?h.C0.ESC+"[15;"+(e+1)+"~":h.C0.ESC+"[15~";break;case 117:l.key=e?h.C0.ESC+"[17;"+(e+1)+"~":h.C0.ESC+"[17~";break;case 118:l.key=e?h.C0.ESC+"[18;"+(e+1)+"~":h.C0.ESC+"[18~";break;case 119:l.key=e?h.C0.ESC+"[19;"+(e+1)+"~":h.C0.ESC+"[19~";break;case 120:l.key=e?h.C0.ESC+"[20;"+(e+1)+"~":h.C0.ESC+"[20~";break;case 121:l.key=e?h.C0.ESC+"[21;"+(e+1)+"~":h.C0.ESC+"[21~";break;case 122:l.key=e?h.C0.ESC+"[23;"+(e+1)+"~":h.C0.ESC+"[23~";break;case 123:l.key=e?h.C0.ESC+"[24;"+(e+1)+"~":h.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(p&&!f||!d.altKey||d.metaKey)!p||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?l.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(l.key=h.C0.US),d.key==="@"&&(l.key=h.C0.NUL)):d.keyCode===65&&(l.type=1);else{const r=u[d.keyCode],i=r?.[d.shiftKey?1:0];if(i)l.key=h.C0.ESC+i;else if(d.keyCode>=65&&d.keyCode<=90){const t=d.ctrlKey?d.keyCode-64:d.keyCode+32;let n=String.fromCharCode(t);d.shiftKey&&(n=n.toUpperCase()),l.key=h.C0.ESC+n}else if(d.keyCode===32)l.key=h.C0.ESC+(d.ctrlKey?h.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let t=d.code.slice(3,4);d.shiftKey||(t=t.toLowerCase()),l.key=h.C0.ESC+t,l.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?l.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?l.key=h.C0.NUL:d.keyCode>=51&&d.keyCode<=55?l.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?l.key=h.C0.DEL:d.keyCode===219?l.key=h.C0.ESC:d.keyCode===220?l.key=h.C0.FS:d.keyCode===221&&(l.key=h.C0.GS)}return l}},482:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):String.fromCharCode(a)},s.utf32ToString=function(a,h=0,u=a.length){let d="";for(let _=h;_<u;++_){let p=a[_];p>65535?(p-=65536,d+=String.fromCharCode(55296+(p>>10))+String.fromCharCode(p%1024+56320)):d+=String.fromCharCode(p)}return d},s.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(a,h){const u=a.length;if(!u)return 0;let d=0,_=0;if(this._interim){const p=a.charCodeAt(_++);56320<=p&&p<=57343?h[d++]=1024*(this._interim-55296)+p-56320+65536:(h[d++]=this._interim,h[d++]=p),this._interim=0}for(let p=_;p<u;++p){const f=a.charCodeAt(p);if(55296<=f&&f<=56319){if(++p>=u)return this._interim=f,d;const l=a.charCodeAt(p);56320<=l&&l<=57343?h[d++]=1024*(f-55296)+l-56320+65536:(h[d++]=f,h[d++]=l)}else f!==65279&&(h[d++]=f)}return d}},s.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(a,h){const u=a.length;if(!u)return 0;let d,_,p,f,l=0,e=0,r=0;if(this.interim[0]){let n=!1,c=this.interim[0];c&=(224&c)==192?31:(240&c)==224?15:7;let v,g=0;for(;(v=63&this.interim[++g])&&g<4;)c<<=6,c|=v;const o=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,S=o-g;for(;r<S;){if(r>=u)return 0;if(v=a[r++],(192&v)!=128){r--,n=!0;break}this.interim[g++]=v,c<<=6,c|=63&v}n||(o===2?c<128?r--:h[l++]=c:o===3?c<2048||c>=55296&&c<=57343||c===65279||(h[l++]=c):c<65536||c>1114111||(h[l++]=c)),this.interim.fill(0)}const i=u-4;let t=r;for(;t<u;){for(;!(!(t<i)||128&(d=a[t])||128&(_=a[t+1])||128&(p=a[t+2])||128&(f=a[t+3]));)h[l++]=d,h[l++]=_,h[l++]=p,h[l++]=f,t+=4;if(d=a[t++],d<128)h[l++]=d;else if((224&d)==192){if(t>=u)return this.interim[0]=d,l;if(_=a[t++],(192&_)!=128){t--;continue}if(e=(31&d)<<6|63&_,e<128){t--;continue}h[l++]=e}else if((240&d)==224){if(t>=u)return this.interim[0]=d,l;if(_=a[t++],(192&_)!=128){t--;continue}if(t>=u)return this.interim[0]=d,this.interim[1]=_,l;if(p=a[t++],(192&p)!=128){t--;continue}if(e=(15&d)<<12|(63&_)<<6|63&p,e<2048||e>=55296&&e<=57343||e===65279)continue;h[l++]=e}else if((248&d)==240){if(t>=u)return this.interim[0]=d,l;if(_=a[t++],(192&_)!=128){t--;continue}if(t>=u)return this.interim[0]=d,this.interim[1]=_,l;if(p=a[t++],(192&p)!=128){t--;continue}if(t>=u)return this.interim[0]=d,this.interim[1]=_,this.interim[2]=p,l;if(f=a[t++],(192&f)!=128){t--;continue}if(e=(7&d)<<18|(63&_)<<12|(63&p)<<6|63&f,e<65536||e>1114111)continue;h[l++]=e}}return l}}},225:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeV6=void 0;const a=[[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]],h=[[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]];let u;s.UnicodeV6=class{constructor(){if(this.version="6",!u){u=new Uint8Array(65536),u.fill(1),u[0]=0,u.fill(0,1,32),u.fill(0,127,160),u.fill(2,4352,4448),u[9001]=2,u[9002]=2,u.fill(2,11904,42192),u[12351]=1,u.fill(2,44032,55204),u.fill(2,63744,64256),u.fill(2,65040,65050),u.fill(2,65072,65136),u.fill(2,65280,65377),u.fill(2,65504,65511);for(let d=0;d<a.length;++d)u.fill(0,a[d][0],a[d][1]+1)}}wcwidth(d){return d<32?0:d<127?1:d<65536?u[d]:function(_,p){let f,l=0,e=p.length-1;if(_<p[0][0]||_>p[e][1])return!1;for(;e>=l;)if(f=l+e>>1,_>p[f][1])l=f+1;else{if(!(_<p[f][0]))return!0;e=f-1}return!1}(d,h)?0:d>=131072&&d<=196605||d>=196608&&d<=262141?2:1}}},5981:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.WriteBuffer=void 0;const h=a(8460),u=a(844);class d extends u.Disposable{constructor(p){super(),this._action=p,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(p,f){if(f!==void 0&&this._syncCalls>f)return void(this._syncCalls=0);if(this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let l;for(this._isSyncWriting=!0;l=this._writeBuffer.shift();){this._action(l);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(p,f){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(f),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=p.length,this._writeBuffer.push(p),this._callbacks.push(f)}_innerWrite(p=0,f=!0){const l=p||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],r=this._action(e,f);if(r){const t=n=>Date.now()-l>=12?setTimeout(()=>this._innerWrite(0,n)):this._innerWrite(l,n);return void r.catch(n=>(queueMicrotask(()=>{throw n}),Promise.resolve(!1))).then(t)}const i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-l>=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(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}s.WriteBuffer=d},5941:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.toRgbString=s.parseColor=void 0;const a=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\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})$/,h=/^[\da-f]+$/;function u(d,_){const p=d.toString(16),f=p.length<2?"0"+p:p;switch(_){case 4:return p[0];case 8:return f;case 12:return(f+f).slice(0,3);default:return f+f}}s.parseColor=function(d){if(!d)return;let _=d.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const p=a.exec(_);if(p){const f=p[1]?15:p[4]?255:p[7]?4095:65535;return[Math.round(parseInt(p[1]||p[4]||p[7]||p[10],16)/f*255),Math.round(parseInt(p[2]||p[5]||p[8]||p[11],16)/f*255),Math.round(parseInt(p[3]||p[6]||p[9]||p[12],16)/f*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),h.exec(_)&&[3,6,9,12].includes(_.length))){const p=_.length/3,f=[0,0,0];for(let l=0;l<3;++l){const e=parseInt(_.slice(p*l,p*l+p),16);f[l]=p===1?e<<4:p===2?e:p===3?e>>4:e>>8}return f}},s.toRgbString=function(d,_=16){const[p,f,l]=d;return`rgb:${u(p,_)}/${u(f,_)}/${u(l,_)}`}},5770:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.PAYLOAD_LIMIT=void 0,s.PAYLOAD_LIMIT=1e7},6351:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DcsHandler=s.DcsParser=void 0;const h=a(482),u=a(8742),d=a(5770),_=[];s.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(f,l){this._handlers[f]===void 0&&(this._handlers[f]=[]);const e=this._handlers[f];return e.push(l),{dispose:()=>{const r=e.indexOf(l);r!==-1&&e.splice(r,1)}}}clearHandler(f){this._handlers[f]&&delete this._handlers[f]}setHandlerFallback(f){this._handlerFb=f}reset(){if(this._active.length)for(let f=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;f>=0;--f)this._active[f].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(f,l){if(this.reset(),this._ident=f,this._active=this._handlers[f]||_,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(l);else this._handlerFb(this._ident,"HOOK",l)}put(f,l,e){if(this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].put(f,l,e);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(f,l,e))}unhook(f,l=!0){if(this._active.length){let e=!1,r=this._active.length-1,i=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,e=l,i=this._stack.fallThrough,this._stack.paused=!1),!i&&e===!1){for(;r>=0&&(e=this._active[r].unhook(f),e!==!0);r--)if(e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,e;r--}for(;r>=0;r--)if(e=this._active[r].unhook(!1),e instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,e}else this._handlerFb(this._ident,"UNHOOK",f);this._active=_,this._ident=0}};const p=new u.Params;p.addParam(0),s.DcsHandler=class{constructor(f){this._handler=f,this._data="",this._params=p,this._hitLimit=!1}hook(f){this._params=f.length>1||f.params[0]?f.clone():p,this._data="",this._hitLimit=!1}put(f,l,e){this._hitLimit||(this._data+=(0,h.utf32ToString)(f,l,e),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(f){let l=!1;if(this._hitLimit)l=!1;else if(f&&(l=this._handler(this._data,this._params),l instanceof Promise))return l.then(e=>(this._params=p,this._data="",this._hitLimit=!1,e));return this._params=p,this._data="",this._hitLimit=!1,l}}},2015:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.EscapeSequenceParser=s.VT500_TRANSITION_TABLE=s.TransitionTable=void 0;const h=a(844),u=a(8742),d=a(6242),_=a(6351);class p{constructor(r){this.table=new Uint8Array(r)}setDefault(r,i){this.table.fill(r<<4|i)}add(r,i,t,n){this.table[i<<8|r]=t<<4|n}addMany(r,i,t,n){for(let c=0;c<r.length;c++)this.table[i<<8|r[c]]=t<<4|n}}s.TransitionTable=p;const f=160;s.VT500_TRANSITION_TABLE=function(){const e=new p(4095),r=Array.apply(null,Array(256)).map((g,o)=>o),i=(g,o)=>r.slice(g,o),t=i(32,127),n=i(0,24);n.push(25),n.push.apply(n,i(28,32));const c=i(0,14);let v;for(v in e.setDefault(1,0),e.addMany(t,0,2,0),c)e.addMany([24,26,153,154],v,3,0),e.addMany(i(128,144),v,3,0),e.addMany(i(144,152),v,3,0),e.add(156,v,0,0),e.add(27,v,11,1),e.add(157,v,4,8),e.addMany([152,158,159],v,0,7),e.add(155,v,11,3),e.add(144,v,11,9);return e.addMany(n,0,3,0),e.addMany(n,1,3,1),e.add(127,1,0,1),e.addMany(n,8,0,8),e.addMany(n,3,3,3),e.add(127,3,0,3),e.addMany(n,4,3,4),e.add(127,4,0,4),e.addMany(n,6,3,6),e.addMany(n,5,3,5),e.add(127,5,0,5),e.addMany(n,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(t,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(t,7,0,7),e.addMany(n,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(n,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(n,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(n,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(n,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(n,13,13,13),e.addMany(t,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(f,0,2,0),e.add(f,8,5,8),e.add(f,6,0,6),e.add(f,11,0,11),e.add(f,13,13,13),e}();class l extends h.Disposable{constructor(r=s.VT500_TRANSITION_TABLE){super(),this._transitions=r,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new u.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(i,t,n)=>{},this._executeHandlerFb=i=>{},this._csiHandlerFb=(i,t)=>{},this._escHandlerFb=i=>{},this._errorHandlerFb=i=>i,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new d.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(r,i=[64,126]){let t=0;if(r.prefix){if(r.prefix.length>1)throw new Error("only one byte as prefix supported");if(t=r.prefix.charCodeAt(0),t&&60>t||t>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(r.intermediates){if(r.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let c=0;c<r.intermediates.length;++c){const v=r.intermediates.charCodeAt(c);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");t<<=8,t|=v}}if(r.final.length!==1)throw new Error("final must be a single byte");const n=r.final.charCodeAt(0);if(i[0]>n||n>i[1])throw new Error(`final must be in range ${i[0]} .. ${i[1]}`);return t<<=8,t|=n,t}identToString(r){const i=[];for(;r;)i.push(String.fromCharCode(255&r)),r>>=8;return i.reverse().join("")}setPrintHandler(r){this._printHandler=r}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(r,i){const t=this._identifier(r,[48,126]);this._escHandlers[t]===void 0&&(this._escHandlers[t]=[]);const n=this._escHandlers[t];return n.push(i),{dispose:()=>{const c=n.indexOf(i);c!==-1&&n.splice(c,1)}}}clearEscHandler(r){this._escHandlers[this._identifier(r,[48,126])]&&delete this._escHandlers[this._identifier(r,[48,126])]}setEscHandlerFallback(r){this._escHandlerFb=r}setExecuteHandler(r,i){this._executeHandlers[r.charCodeAt(0)]=i}clearExecuteHandler(r){this._executeHandlers[r.charCodeAt(0)]&&delete this._executeHandlers[r.charCodeAt(0)]}setExecuteHandlerFallback(r){this._executeHandlerFb=r}registerCsiHandler(r,i){const t=this._identifier(r);this._csiHandlers[t]===void 0&&(this._csiHandlers[t]=[]);const n=this._csiHandlers[t];return n.push(i),{dispose:()=>{const c=n.indexOf(i);c!==-1&&n.splice(c,1)}}}clearCsiHandler(r){this._csiHandlers[this._identifier(r)]&&delete this._csiHandlers[this._identifier(r)]}setCsiHandlerFallback(r){this._csiHandlerFb=r}registerDcsHandler(r,i){return this._dcsParser.registerHandler(this._identifier(r),i)}clearDcsHandler(r){this._dcsParser.clearHandler(this._identifier(r))}setDcsHandlerFallback(r){this._dcsParser.setHandlerFallback(r)}registerOscHandler(r,i){return this._oscParser.registerHandler(r,i)}clearOscHandler(r){this._oscParser.clearHandler(r)}setOscHandlerFallback(r){this._oscParser.setHandlerFallback(r)}setErrorHandler(r){this._errorHandler=r}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){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=[])}_preserveStack(r,i,t,n,c){this._parseStack.state=r,this._parseStack.handlers=i,this._parseStack.handlerPos=t,this._parseStack.transition=n,this._parseStack.chunkPos=c}parse(r,i,t){let n,c=0,v=0,g=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,g=this._parseStack.chunkPos+1;else{if(t===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const o=this._parseStack.handlers;let S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(t===!1&&S>-1){for(;S>=0&&(n=o[S](this._params),n!==!0);S--)if(n instanceof Promise)return this._parseStack.handlerPos=S,n}this._parseStack.handlers=[];break;case 4:if(t===!1&&S>-1){for(;S>=0&&(n=o[S](),n!==!0);S--)if(n instanceof Promise)return this._parseStack.handlerPos=S,n}this._parseStack.handlers=[];break;case 6:if(c=r[this._parseStack.chunkPos],n=this._dcsParser.unhook(c!==24&&c!==26,t),n)return n;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(c=r[this._parseStack.chunkPos],n=this._oscParser.end(c!==24&&c!==26,t),n)return n;c===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,g=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let o=g;o<i;++o){switch(c=r[o],v=this._transitions.table[this.currentState<<8|(c<160?c:f)],v>>4){case 2:for(let D=o+1;;++D){if(D>=i||(c=r[D])<32||c>126&&c<f){this._printHandler(r,o,D),o=D-1;break}if(++D>=i||(c=r[D])<32||c>126&&c<f){this._printHandler(r,o,D),o=D-1;break}if(++D>=i||(c=r[D])<32||c>126&&c<f){this._printHandler(r,o,D),o=D-1;break}if(++D>=i||(c=r[D])<32||c>126&&c<f){this._printHandler(r,o,D),o=D-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:o,code:c,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const S=this._csiHandlers[this._collect<<8|c];let C=S?S.length-1:-1;for(;C>=0&&(n=S[C](this._params),n!==!0);C--)if(n instanceof Promise)return this._preserveStack(3,S,C,v,o),n;C<0&&this._csiHandlerFb(this._collect<<8|c,this._params),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(c-48)}while(++o<i&&(c=r[o])>47&&c<60);o--;break;case 9:this._collect<<=8,this._collect|=c;break;case 10:const w=this._escHandlers[this._collect<<8|c];let y=w?w.length-1:-1;for(;y>=0&&(n=w[y](),n!==!0);y--)if(n instanceof Promise)return this._preserveStack(4,w,y,v,o),n;y<0&&this._escHandlerFb(this._collect<<8|c),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|c,this._params);break;case 13:for(let D=o+1;;++D)if(D>=i||(c=r[D])===24||c===26||c===27||c>127&&c<f){this._dcsParser.put(r,o,D),o=D-1;break}break;case 14:if(n=this._dcsParser.unhook(c!==24&&c!==26),n)return this._preserveStack(6,[],0,v,o),n;c===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let D=o+1;;D++)if(D>=i||(c=r[D])<32||c>127&&c<f){this._oscParser.put(r,o,D),o=D-1;break}break;case 6:if(n=this._oscParser.end(c!==24&&c!==26),n)return this._preserveStack(5,[],0,v,o),n;c===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&v}}}s.EscapeSequenceParser=l},6242:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OscHandler=s.OscParser=void 0;const h=a(5770),u=a(482),d=[];s.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,p){this._handlers[_]===void 0&&(this._handlers[_]=[]);const f=this._handlers[_];return f.push(p),{dispose:()=>{const l=f.indexOf(p);l!==-1&&f.splice(l,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,p,f){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(_,p,f);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(_,p,f))}start(){this.reset(),this._state=1}put(_,p,f){if(this._state!==3){if(this._state===1)for(;p<f;){const l=_[p++];if(l===59){this._state=2,this._start();break}if(l<48||57<l)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+l-48}this._state===2&&f-p>0&&this._put(_,p,f)}}end(_,p=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let f=!1,l=this._active.length-1,e=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,f=p,e=this._stack.fallThrough,this._stack.paused=!1),!e&&f===!1){for(;l>=0&&(f=this._active[l].end(_),f!==!0);l--)if(f instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,f;l--}for(;l>=0;l--)if(f=this._active[l].end(!1),f instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,f}else this._handlerFb(this._id,"END",_);this._active=d,this._id=-1,this._state=0}}},s.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,p,f){this._hitLimit||(this._data+=(0,u.utf32ToString)(_,p,f),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let p=!1;if(this._hitLimit)p=!1;else if(_&&(p=this._handler(this._data),p instanceof Promise))return p.then(f=>(this._data="",this._hitLimit=!1,f));return this._data="",this._hitLimit=!1,p}}},8742:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Params=void 0;const a=2147483647;class h{constructor(d=32,_=32){if(this.maxLength=d,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(d){const _=new h;if(!d.length)return _;for(let p=Array.isArray(d[0])?1:0;p<d.length;++p){const f=d[p];if(Array.isArray(f))for(let l=0;l<f.length;++l)_.addSubParam(f[l]);else _.addParam(f)}return _}clone(){const d=new h(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let _=0;_<this.length;++_){d.push(this.params[_]);const p=this._subParamsIdx[_]>>8,f=255&this._subParamsIdx[_];f-p>0&&d.push(Array.prototype.slice.call(this._subParams,p,f))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>a?a:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>a?a:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const _=this._subParamsIdx[d]>>8,p=255&this._subParamsIdx[d];return p-_>0?this._subParams.subarray(_,p):null}getSubParamsAll(){const d={};for(let _=0;_<this.length;++_){const p=this._subParamsIdx[_]>>8,f=255&this._subParamsIdx[_];f-p>0&&(d[_]=this._subParams.slice(p,f))}return d}addDigit(d){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const p=this._digitIsSub?this._subParams:this.params,f=p[_-1];p[_-1]=~f?Math.min(10*f+d,a):d}}s.Params=h},5741:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.AddonManager=void 0,s.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let a=this._addons.length-1;a>=0;a--)this._addons[a].instance.dispose()}loadAddon(a,h){const u={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(u),h.dispose=()=>this._wrappedAddonDispose(u),h.activate(a)}_wrappedAddonDispose(a){if(a.isDisposed)return;let h=-1;for(let u=0;u<this._addons.length;u++)if(this._addons[u]===a){h=u;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");a.isDisposed=!0,a.dispose.apply(a.instance),this._addons.splice(h,1)}}},8771:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferApiView=void 0;const h=a(3785),u=a(511);s.BufferApiView=class{constructor(d,_){this._buffer=d,this.type=_}init(d){return this._buffer=d,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(d){const _=this._buffer.lines.get(d);if(_)return new h.BufferLineApiView(_)}getNullCell(){return new u.CellData}}},3785:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLineApiView=void 0;const h=a(511);s.BufferLineApiView=class{constructor(u){this._line=u}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(u,d){if(!(u<0||u>=this._line.length))return d?(this._line.loadCell(u,d),d):this._line.loadCell(u,new h.CellData)}translateToString(u,d,_){return this._line.translateToString(u,d,_)}}},8285:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BufferNamespaceApi=void 0;const h=a(8771),u=a(8460);s.BufferNamespaceApi=class{constructor(d){this._core=d,this._onBufferChange=new u.EventEmitter,this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){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")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}},7975:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ParserApi=void 0,s.ParserApi=class{constructor(a){this._core=a}registerCsiHandler(a,h){return this._core.registerCsiHandler(a,u=>h(u.toArray()))}addCsiHandler(a,h){return this.registerCsiHandler(a,h)}registerDcsHandler(a,h){return this._core.registerDcsHandler(a,(u,d)=>h(u,d.toArray()))}addDcsHandler(a,h){return this.registerDcsHandler(a,h)}registerEscHandler(a,h){return this._core.registerEscHandler(a,h)}addEscHandler(a,h){return this.registerEscHandler(a,h)}registerOscHandler(a,h){return this._core.registerOscHandler(a,h)}addOscHandler(a,h){return this.registerOscHandler(a,h)}}},7090:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeApi=void 0,s.UnicodeApi=class{constructor(a){this._core=a}register(a){this._core.unicodeService.register(a)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(a){this._core.unicodeService.activeVersion=a}}},744:function(M,s,a){var h=this&&this.__decorate||function(e,r,i,t){var n,c=arguments.length,v=c<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,i):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,r,i,t);else for(var g=e.length-1;g>=0;g--)(n=e[g])&&(v=(c<3?n(v):c>3?n(r,i,v):n(r,i))||v);return c>3&&v&&Object.defineProperty(r,i,v),v},u=this&&this.__param||function(e,r){return function(i,t){r(i,t,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferService=s.MINIMUM_ROWS=s.MINIMUM_COLS=void 0;const d=a(2585),_=a(5295),p=a(8460),f=a(844);s.MINIMUM_COLS=2,s.MINIMUM_ROWS=1;let l=class extends f.Disposable{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this.register(new p.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new p.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,s.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,s.MINIMUM_ROWS),this.buffers=this.register(new _.BufferSet(e,this))}get buffer(){return this.buffers.active}resize(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this._onResize.fire({cols:e,rows:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,r=!1){const i=this.buffer;let t;t=this._cachedBlankLine,t&&t.length===this.cols&&t.getFg(0)===e.fg&&t.getBg(0)===e.bg||(t=i.getBlankLine(e,r),this._cachedBlankLine=t),t.isWrapped=r;const n=i.ybase+i.scrollTop,c=i.ybase+i.scrollBottom;if(i.scrollTop===0){const v=i.lines.isFull;c===i.lines.length-1?v?i.lines.recycle().copyFrom(t):i.lines.push(t.clone()):i.lines.splice(c+1,0,t.clone()),v?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{const v=c-n+1;i.lines.shiftElements(n+1,v-1,-1),i.lines.set(c,t.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,r,i){const t=this.buffer;if(e<0){if(t.ydisp===0)return;this.isUserScrolling=!0}else e+t.ydisp>=t.ybase&&(this.isUserScrolling=!1);const n=t.ydisp;t.ydisp=Math.max(Math.min(t.ydisp+e,t.ybase),0),n!==t.ydisp&&(r||this._onScroll.fire(t.ydisp))}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this.buffer.ydisp)}scrollToBottom(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)}scrollToLine(e){const r=e-this.buffer.ydisp;r!==0&&this.scrollLines(r)}};l=h([u(0,d.IOptionsService)],l),s.BufferService=l},7994:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CharsetService=void 0,s.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(a){this.glevel=a,this.charset=this._charsets[a]}setgCharset(a,h){this._charsets[a]=h,this.glevel===a&&(this.charset=h)}}},1753:function(M,s,a){var h=this&&this.__decorate||function(t,n,c,v){var g,o=arguments.length,S=o<3?n:v===null?v=Object.getOwnPropertyDescriptor(n,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(t,n,c,v);else for(var C=t.length-1;C>=0;C--)(g=t[C])&&(S=(o<3?g(S):o>3?g(n,c,S):g(n,c))||S);return o>3&&S&&Object.defineProperty(n,c,S),S},u=this&&this.__param||function(t,n){return function(c,v){n(c,v,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreMouseService=void 0;const d=a(2585),_=a(8460),p=a(844),f={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:t=>t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)},VT200:{events:19,restrict:t=>t.action!==32},DRAG:{events:23,restrict:t=>t.action!==32||t.button!==3},ANY:{events:31,restrict:t=>!0}};function l(t,n){let c=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(c|=64,c|=t.action):(c|=3&t.button,4&t.button&&(c|=64),8&t.button&&(c|=128),t.action===32?c|=32:t.action!==0||n||(c|=3)),c}const e=String.fromCharCode,r={DEFAULT:t=>{const n=[l(t,!1)+32,t.col+32,t.row+32];return n[0]>255||n[1]>255||n[2]>255?"":`\x1B[M${e(n[0])}${e(n[1])}${e(n[2])}`},SGR:t=>{const n=t.action===0&&t.button!==4?"m":"M";return`\x1B[<${l(t,!0)};${t.col};${t.row}${n}`},SGR_PIXELS:t=>{const n=t.action===0&&t.button!==4?"m":"M";return`\x1B[<${l(t,!0)};${t.x};${t.y}${n}`}};let i=class extends p.Disposable{constructor(t,n){super(),this._bufferService=t,this._coreService=n,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const c of Object.keys(f))this.addProtocol(c,f[c]);for(const c of Object.keys(r))this.addEncoding(c,r[c]);this.reset()}addProtocol(t,n){this._protocols[t]=n}addEncoding(t,n){this._encodings[t]=n}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(t){if(!this._protocols[t])throw new Error(`unknown protocol "${t}"`);this._activeProtocol=t,this._onProtocolChange.fire(this._protocols[t].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(t){if(!this._encodings[t])throw new Error(`unknown encoding "${t}"`);this._activeEncoding=t}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(t){if(t.col<0||t.col>=this._bufferService.cols||t.row<0||t.row>=this._bufferService.rows||t.button===4&&t.action===32||t.button===3&&t.action!==32||t.button!==4&&(t.action===2||t.action===3)||(t.col++,t.row++,t.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,t,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(t))return!1;const n=this._encodings[this._activeEncoding](t);return n&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(n):this._coreService.triggerDataEvent(n,!0)),this._lastEvent=t,!0}explainEvents(t){return{down:!!(1&t),up:!!(2&t),drag:!!(4&t),move:!!(8&t),wheel:!!(16&t)}}_equalEvents(t,n,c){if(c){if(t.x!==n.x||t.y!==n.y)return!1}else if(t.col!==n.col||t.row!==n.row)return!1;return t.button===n.button&&t.action===n.action&&t.ctrl===n.ctrl&&t.alt===n.alt&&t.shift===n.shift}};i=h([u(0,d.IBufferService),u(1,d.ICoreService)],i),s.CoreMouseService=i},6975:function(M,s,a){var h=this&&this.__decorate||function(i,t,n,c){var v,g=arguments.length,o=g<3?t:c===null?c=Object.getOwnPropertyDescriptor(t,n):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(i,t,n,c);else for(var S=i.length-1;S>=0;S--)(v=i[S])&&(o=(g<3?v(o):g>3?v(t,n,o):v(t,n))||o);return g>3&&o&&Object.defineProperty(t,n,o),o},u=this&&this.__param||function(i,t){return function(n,c){t(n,c,i)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreService=void 0;const d=a(2585),_=a(8460),p=a(1439),f=a(844),l=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let r=class extends f.Disposable{constructor(i,t,n){super(),this._bufferService=i,this._logService=t,this._optionsService=n,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,p.clone)(l),this.decPrivateModes=(0,p.clone)(e)}reset(){this.modes=(0,p.clone)(l),this.decPrivateModes=(0,p.clone)(e)}triggerDataEvent(i,t=!1){if(this._optionsService.rawOptions.disableStdin)return;const n=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&n.ybase!==n.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${i}"`,()=>i.split("").map(c=>c.charCodeAt(0))),this._onData.fire(i)}triggerBinaryEvent(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${i}"`,()=>i.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(i))}};r=h([u(0,d.IBufferService),u(1,d.ILogService),u(2,d.IOptionsService)],r),s.CoreService=r},9074:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.DecorationService=void 0;const h=a(8055),u=a(8460),d=a(844),_=a(6106);let p=0,f=0;class l extends d.Disposable{constructor(){super(),this._decorations=new _.SortedList(i=>i?.marker.line),this._onDecorationRegistered=this.register(new u.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new u.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>{for(const i of this._decorations.values())this._onDecorationRemoved.fire(i);this.reset()}))}get decorations(){return this._decorations.values()}registerDecoration(i){if(i.marker.isDisposed)return;const t=new e(i);if(t){const n=t.marker.onDispose(()=>t.dispose());t.onDispose(()=>{t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),n.dispose())}),this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(const i of this._decorations.values())i.dispose();this._decorations.clear()}*getDecorationsAtCell(i,t,n){var c,v,g;let o=0,S=0;for(const C of this._decorations.getKeyIterator(t))o=(c=C.options.x)!==null&&c!==void 0?c:0,S=o+((v=C.options.width)!==null&&v!==void 0?v:1),i>=o&&i<S&&(!n||((g=C.options.layer)!==null&&g!==void 0?g:"bottom")===n)&&(yield C)}forEachDecorationAtCell(i,t,n,c){this._decorations.forEachByKey(t,v=>{var g,o,S;p=(g=v.options.x)!==null&&g!==void 0?g:0,f=p+((o=v.options.width)!==null&&o!==void 0?o:1),i>=p&&i<f&&(!n||((S=v.options.layer)!==null&&S!==void 0?S:"bottom")===n)&&c(v)})}dispose(){for(const i of this._decorations.values())this._onDecorationRemoved.fire(i);this.reset()}}s.DecorationService=l;class e extends d.Disposable{constructor(i){super(),this.options=i,this.onRenderEmitter=this.register(new u.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=i.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.InstantiationService=s.ServiceCollection=void 0;const h=a(2585),u=a(8343);class d{constructor(...p){this._entries=new Map;for(const[f,l]of p)this.set(f,l)}set(p,f){const l=this._entries.get(p);return this._entries.set(p,f),l}forEach(p){for(const[f,l]of this._entries.entries())p(f,l)}has(p){return this._entries.has(p)}get(p){return this._entries.get(p)}}s.ServiceCollection=d,s.InstantiationService=class{constructor(){this._services=new d,this._services.set(h.IInstantiationService,this)}setService(_,p){this._services.set(_,p)}getService(_){return this._services.get(_)}createInstance(_,...p){const f=(0,u.getServiceDependencies)(_).sort((r,i)=>r.index-i.index),l=[];for(const r of f){const i=this._services.get(r.id);if(!i)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${r.id}.`);l.push(i)}const e=f.length>0?f[0].index:p.length;if(p.length!==e)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${e+1} conflicts with ${p.length} static arguments`);return new _(...p,...l)}}},7866:function(M,s,a){var h=this&&this.__decorate||function(l,e,r,i){var t,n=arguments.length,c=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,r,i);else for(var v=l.length-1;v>=0;v--)(t=l[v])&&(c=(n<3?t(c):n>3?t(e,r,c):t(e,r))||c);return n>3&&c&&Object.defineProperty(e,r,c),c},u=this&&this.__param||function(l,e){return function(r,i){e(r,i,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.LogService=void 0;const d=a(844),_=a(2585),p={debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let f=class extends d.Disposable{constructor(l){super(),this._optionsService=l,this.logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}_updateLogLevel(){this.logLevel=p[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let e=0;e<l.length;e++)typeof l[e]=="function"&&(l[e]=l[e]())}_log(l,e,r){this._evalLazyOptionalParams(r),l.call(console,"xterm.js: "+e,...r)}debug(l,...e){this.logLevel<=_.LogLevelEnum.DEBUG&&this._log(console.log,l,e)}info(l,...e){this.logLevel<=_.LogLevelEnum.INFO&&this._log(console.info,l,e)}warn(l,...e){this.logLevel<=_.LogLevelEnum.WARN&&this._log(console.warn,l,e)}error(l,...e){this.logLevel<=_.LogLevelEnum.ERROR&&this._log(console.error,l,e)}};f=h([u(0,_.IOptionsService)],f),s.LogService=f},7302:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.OptionsService=s.DEFAULT_OPTIONS=void 0;const h=a(8460),u=a(6114),d=a(844);s.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class p extends d.Disposable{constructor(l){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const e=Object.assign({},s.DEFAULT_OPTIONS);for(const r in l)if(r in e)try{const i=l[r];e[r]=this._sanitizeAndValidateOption(r,i)}catch(i){console.error(i)}this.rawOptions=e,this.options=Object.assign({},e),this._setupOptions()}onSpecificOptionChange(l,e){return this.onOptionChange(r=>{r===l&&e(this.rawOptions[l])})}onMultipleOptionChange(l,e){return this.onOptionChange(r=>{l.indexOf(r)!==-1&&e()})}_setupOptions(){const l=r=>{if(!(r in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},e=(r,i)=>{if(!(r in s.DEFAULT_OPTIONS))throw new Error(`No option with key "${r}"`);i=this._sanitizeAndValidateOption(r,i),this.rawOptions[r]!==i&&(this.rawOptions[r]=i,this._onOptionChange.fire(r))};for(const r in this.rawOptions){const i={get:l.bind(this,r),set:e.bind(this,r)};Object.defineProperty(this.options,r,i)}}_sanitizeAndValidateOption(l,e){switch(l){case"cursorStyle":if(e||(e=s.DEFAULT_OPTIONS[l]),!function(r){return r==="block"||r==="underline"||r==="bar"}(e))throw new Error(`"${e}" is not a valid value for ${l}`);break;case"wordSeparator":e||(e=s.DEFAULT_OPTIONS[l]);break;case"fontWeight":case"fontWeightBold":if(typeof e=="number"&&1<=e&&e<=1e3)break;e=_.includes(e)?e:s.DEFAULT_OPTIONS[l];break;case"cursorWidth":e=Math.floor(e);case"lineHeight":case"tabStopWidth":if(e<1)throw new Error(`${l} cannot be less than 1, value: ${e}`);break;case"minimumContrastRatio":e=Math.max(1,Math.min(21,Math.round(10*e)/10));break;case"scrollback":if((e=Math.min(e,4294967295))<0)throw new Error(`${l} cannot be less than 0, value: ${e}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(e<=0)throw new Error(`${l} cannot be less than or equal to 0, value: ${e}`);break;case"rows":case"cols":if(!e&&e!==0)throw new Error(`${l} must be numeric, value: ${e}`);break;case"windowsPty":e=e??{}}return e}}s.OptionsService=p},2660:function(M,s,a){var h=this&&this.__decorate||function(p,f,l,e){var r,i=arguments.length,t=i<3?f:e===null?e=Object.getOwnPropertyDescriptor(f,l):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(p,f,l,e);else for(var n=p.length-1;n>=0;n--)(r=p[n])&&(t=(i<3?r(t):i>3?r(f,l,t):r(f,l))||t);return i>3&&t&&Object.defineProperty(f,l,t),t},u=this&&this.__param||function(p,f){return function(l,e){f(l,e,p)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkService=void 0;const d=a(2585);let _=class{constructor(p){this._bufferService=p,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(p){const f=this._bufferService.buffer;if(p.id===void 0){const n=f.addMarker(f.ybase+f.y),c={data:p,id:this._nextId++,lines:[n]};return n.onDispose(()=>this._removeMarkerFromLink(c,n)),this._dataByLinkId.set(c.id,c),c.id}const l=p,e=this._getEntryIdKey(l),r=this._entriesWithId.get(e);if(r)return this.addLineToLink(r.id,f.ybase+f.y),r.id;const i=f.addMarker(f.ybase+f.y),t={id:this._nextId++,key:this._getEntryIdKey(l),data:l,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(t,i)),this._entriesWithId.set(t.key,t),this._dataByLinkId.set(t.id,t),t.id}addLineToLink(p,f){const l=this._dataByLinkId.get(p);if(l&&l.lines.every(e=>e.line!==f)){const e=this._bufferService.buffer.addMarker(f);l.lines.push(e),e.onDispose(()=>this._removeMarkerFromLink(l,e))}}getLinkData(p){var f;return(f=this._dataByLinkId.get(p))===null||f===void 0?void 0:f.data}_getEntryIdKey(p){return`${p.id};;${p.uri}`}_removeMarkerFromLink(p,f){const l=p.lines.indexOf(f);l!==-1&&(p.lines.splice(l,1),p.lines.length===0&&(p.data.id!==void 0&&this._entriesWithId.delete(p.key),this._dataByLinkId.delete(p.id)))}};_=h([u(0,d.IBufferService)],_),s.OscLinkService=_},8343:(M,s)=>{function a(h,u,d){u.di$target===u?u.di$dependencies.push({id:h,index:d}):(u.di$dependencies=[{id:h,index:d}],u.di$target=u)}Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0,s.serviceRegistry=new Map,s.getServiceDependencies=function(h){return h.di$dependencies||[]},s.createDecorator=function(h){if(s.serviceRegistry.has(h))return s.serviceRegistry.get(h);const u=function(d,_,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");a(u,d,p)};return u.toString=()=>h,s.serviceRegistry.set(h,u),u}},2585:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.IDecorationService=s.IUnicodeService=s.IOscLinkService=s.IOptionsService=s.ILogService=s.LogLevelEnum=s.IInstantiationService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;const h=a(8343);var u;s.IBufferService=(0,h.createDecorator)("BufferService"),s.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),s.ICoreService=(0,h.createDecorator)("CoreService"),s.ICharsetService=(0,h.createDecorator)("CharsetService"),s.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(u=s.LogLevelEnum||(s.LogLevelEnum={}))[u.DEBUG=0]="DEBUG",u[u.INFO=1]="INFO",u[u.WARN=2]="WARN",u[u.ERROR=3]="ERROR",u[u.OFF=4]="OFF",s.ILogService=(0,h.createDecorator)("LogService"),s.IOptionsService=(0,h.createDecorator)("OptionsService"),s.IOscLinkService=(0,h.createDecorator)("OscLinkService"),s.IUnicodeService=(0,h.createDecorator)("UnicodeService"),s.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeService=void 0;const h=a(8460),u=a(225);s.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const d=new u.UnicodeV6;this.register(d),this._active=d.version,this._activeProvider=d}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(d){if(!this._providers[d])throw new Error(`unknown Unicode version "${d}"`);this._active=d,this._activeProvider=this._providers[d],this._onChange.fire(d)}register(d){this._providers[d.version]=d}wcwidth(d){return this._activeProvider.wcwidth(d)}getStringCellWidth(d){let _=0;const p=d.length;for(let f=0;f<p;++f){let l=d.charCodeAt(f);if(55296<=l&&l<=56319){if(++f>=p)return _+this.wcwidth(l);const e=d.charCodeAt(f);56320<=e&&e<=57343?l=1024*(l-55296)+e-56320+65536:_+=this.wcwidth(e)}_+=this.wcwidth(l)}return _}}}},q={};function $(M){var s=q[M];if(s!==void 0)return s.exports;var a=q[M]={exports:{}};return X[M].call(a.exports,a,a.exports,$),a.exports}var K={};return(()=>{var M=K;Object.defineProperty(M,"__esModule",{value:!0}),M.Terminal=void 0;const s=$(3236),a=$(9042),h=$(7975),u=$(7090),d=$(5741),_=$(8285),p=["cols","rows"];M.Terminal=class{constructor(f){this._core=new s.Terminal(f),this._addonManager=new d.AddonManager,this._publicOptions=Object.assign({},this._core.options);const l=r=>this._core.options[r],e=(r,i)=>{this._checkReadonlyOptions(r),this._core.options[r]=i};for(const r in this._core.options){const i={get:l.bind(this,r),set:e.bind(this,r)};Object.defineProperty(this._publicOptions,r,i)}}_checkReadonlyOptions(f){if(p.includes(f))throw new Error(`Option "${f}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new h.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new u.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=new _.BufferNamespaceApi(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const f=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:f.applicationCursorKeys,applicationKeypadMode:f.applicationKeypad,bracketedPasteMode:f.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:f.origin,reverseWraparoundMode:f.reverseWraparound,sendFocusMode:f.sendFocus,wraparoundMode:f.wraparound}}get options(){return this._publicOptions}set options(f){for(const l in f)this._publicOptions[l]=f[l]}blur(){this._core.blur()}focus(){this._core.focus()}resize(f,l){this._verifyIntegers(f,l),this._core.resize(f,l)}open(f){this._core.open(f)}attachCustomKeyEventHandler(f){this._core.attachCustomKeyEventHandler(f)}registerLinkProvider(f){return this._core.registerLinkProvider(f)}registerCharacterJoiner(f){return this._checkProposedApi(),this._core.registerCharacterJoiner(f)}deregisterCharacterJoiner(f){this._checkProposedApi(),this._core.deregisterCharacterJoiner(f)}registerMarker(f=0){return this._verifyIntegers(f),this._core.addMarker(f)}registerDecoration(f){var l,e,r;return this._checkProposedApi(),this._verifyPositiveIntegers((l=f.x)!==null&&l!==void 0?l:0,(e=f.width)!==null&&e!==void 0?e:0,(r=f.height)!==null&&r!==void 0?r:0),this._core.registerDecoration(f)}hasSelection(){return this._core.hasSelection()}select(f,l,e){this._verifyIntegers(f,l,e),this._core.select(f,l,e)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(f,l){this._verifyIntegers(f,l),this._core.selectLines(f,l)}dispose(){this._addonManager.dispose(),this._core.dispose()}scrollLines(f){this._verifyIntegers(f),this._core.scrollLines(f)}scrollPages(f){this._verifyIntegers(f),this._core.scrollPages(f)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(f){this._verifyIntegers(f),this._core.scrollToLine(f)}clear(){this._core.clear()}write(f,l){this._core.write(f,l)}writeln(f,l){this._core.write(f),this._core.write(`\r
|
|
9
|
-
`,l)}paste(f){this._core.paste(f)}refresh(f,l){this._verifyIntegers(f,l),this._core.refresh(f,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(f){return this._addonManager.loadAddon(this,f)}static get strings(){return a}_verifyIntegers(...f){for(const l of f)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...f){for(const l of f)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}})(),K})())})(fe);var Be=fe.exports,ge={exports:{}};(function(ee,Z){(function(X,q){ee.exports=q()})(self,function(){return(()=>{var X={};return(()=>{var q=X;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{constructor(){}activate($){this._terminal=$}dispose(){}fit(){const $=this.proposeDimensions();if(!$||!this._terminal||isNaN($.cols)||isNaN($.rows))return;const K=this._terminal._core;this._terminal.rows===$.rows&&this._terminal.cols===$.cols||(K._renderService.clear(),this._terminal.resize($.cols,$.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const $=this._terminal._core,K=$._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const M=this._terminal.options.scrollback===0?0:$.viewport.scrollBarWidth,s=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(s.getPropertyValue("height")),h=Math.max(0,parseInt(s.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),d=a-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),_=h-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-M;return{cols:Math.max(2,Math.floor(_/K.css.cell.width)),rows:Math.max(1,Math.floor(d/K.css.cell.height))}}}})(),X})()})})(ge);var Te=ge.exports;const Me={border:"t base",flex:"~ gap-2","items-center":"",p2:""},Oe={"text-sm":"",op50:""},Ie=ae({__name:"TerminalView",props:{id:{}},setup(ee){const Z=ee,X=he(),q=be(),$=he();let K;Se(async()=>{K=new Be.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const s=new Te.FitAddon;K.loadAddon(s),K.open(X.value),s.fit(),me(window,"resize",()=>{s.fit()}),$.value=await re.getTerminalDetail(await Ce(),Z.id),$.value?.buffer&&K.write($.value.buffer),q.hook("devtools:terminal:data",({id:a,data:h})=>{a===Z.id&&K.write(h)})});function M(){re.runTerminalAction(Z.id,"clear"),K?.clear()}return(s,a)=>{const h=ue;return Q(),ie(_e,null,[te("div",{ref_key:"container",ref:X,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),te("div",Me,[de(h,{title:"Clear",icon:"i-carbon-clean",onClick:a[0]||(a[0]=u=>M())}),J($)?.restartable?(Q(),se(h,{key:0,title:"Restart",icon:"carbon-renew",onClick:a[1]||(a[1]=u=>("rpc"in s?s.rpc:J(re)).runTerminalAction(s.id,"restart"))})):oe("",!0),J($)?.terminatable?(Q(),se(h,{key:1,title:"Terminate",icon:"carbon-delete",onClick:a[2]||(a[2]=u=>("rpc"in s?s.rpc:J(re)).runTerminalAction(s.id,"terminate"))})):oe("",!0),te("span",Oe,ne(J($)?.description),1)])],64)}}}),Pe={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},He={flex:"~",border:"b base","flex-1":"","items-center":"","navbar-glass":""},Fe=["onClick"],Ue={key:1,p10:""},We={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},Ne=te("em",{op50:""},"No terminal attached",-1),$e=[Ne],je=ae({__name:"TerminalPage",setup(ee){const Z=ye(),X=we(),q=Ee(()=>Z.value?.find(K=>K.id===X.value));function $(K){re.runTerminalAction(K,"remove")}return Le(()=>{!X.value&&Z.value?.length&&(X.value=Z.value[0].id)}),(K,M)=>{const s=De,a=ue,h=Ie;return J(Z)?.length?(Q(),ie("div",Pe,[te("div",He,[(Q(!0),ie(_e,null,ke(J(Z),u=>(Q(),ie("button",{key:u.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:ce(u.id===J(q)?.id?"bg-active":""),onClick:d=>X.value=u.id},[u.icon?(Q(),se(s,{key:0,icon:u.icon},null,8,["icon"])):oe("",!0),te("span",{class:ce(u.id===J(q)?.id?"":"op50")},ne(u.name)+ne(u.isTerminated?" (terminated)":""),3),u.isTerminated?(Q(),se(a,{key:1,icon:"carbon-close","mx--2":"",onClick:Re(d=>$(u.id),["stop"])},null,8,["onClick"])):oe("",!0)],10,Fe))),128))]),J(q)?(Q(),se(h,{id:J(q).id,key:J(q).id},null,8,["id"])):(Q(),ie("div",Ue,[le(" Terminal "),te("code",null,ne(J(X)),1),le(" not found ")]))])):(Q(),ie("div",We,$e))}}});const
|
|
9
|
+
`,l)}paste(f){this._core.paste(f)}refresh(f,l){this._verifyIntegers(f,l),this._core.refresh(f,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(f){return this._addonManager.loadAddon(this,f)}static get strings(){return a}_verifyIntegers(...f){for(const l of f)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...f){for(const l of f)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}})(),K})())})(fe);var Be=fe.exports,ge={exports:{}};(function(ee,Z){(function(X,q){ee.exports=q()})(self,function(){return(()=>{var X={};return(()=>{var q=X;Object.defineProperty(q,"__esModule",{value:!0}),q.FitAddon=void 0,q.FitAddon=class{constructor(){}activate($){this._terminal=$}dispose(){}fit(){const $=this.proposeDimensions();if(!$||!this._terminal||isNaN($.cols)||isNaN($.rows))return;const K=this._terminal._core;this._terminal.rows===$.rows&&this._terminal.cols===$.cols||(K._renderService.clear(),this._terminal.resize($.cols,$.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const $=this._terminal._core,K=$._renderService.dimensions;if(K.css.cell.width===0||K.css.cell.height===0)return;const M=this._terminal.options.scrollback===0?0:$.viewport.scrollBarWidth,s=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(s.getPropertyValue("height")),h=Math.max(0,parseInt(s.getPropertyValue("width"))),u=window.getComputedStyle(this._terminal.element),d=a-(parseInt(u.getPropertyValue("padding-top"))+parseInt(u.getPropertyValue("padding-bottom"))),_=h-(parseInt(u.getPropertyValue("padding-right"))+parseInt(u.getPropertyValue("padding-left")))-M;return{cols:Math.max(2,Math.floor(_/K.css.cell.width)),rows:Math.max(1,Math.floor(d/K.css.cell.height))}}}})(),X})()})})(ge);var Te=ge.exports;const Me={border:"t base",flex:"~ gap-2","items-center":"",p2:""},Oe={"text-sm":"",op50:""},Ie=ae({__name:"TerminalView",props:{id:{}},setup(ee){const Z=ee,X=he(),q=be(),$=he();let K;Se(async()=>{K=new Be.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const s=new Te.FitAddon;K.loadAddon(s),K.open(X.value),s.fit(),me(window,"resize",()=>{s.fit()}),$.value=await re.getTerminalDetail(await Ce(),Z.id),$.value?.buffer&&K.write($.value.buffer),q.hook("devtools:terminal:data",({id:a,data:h})=>{a===Z.id&&K.write(h)})});function M(){re.runTerminalAction(Z.id,"clear"),K?.clear()}return(s,a)=>{const h=ue;return Q(),ie(_e,null,[te("div",{ref_key:"container",ref:X,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),te("div",Me,[de(h,{title:"Clear",icon:"i-carbon-clean",onClick:a[0]||(a[0]=u=>M())}),J($)?.restartable?(Q(),se(h,{key:0,title:"Restart",icon:"carbon-renew",onClick:a[1]||(a[1]=u=>("rpc"in s?s.rpc:J(re)).runTerminalAction(s.id,"restart"))})):oe("",!0),J($)?.terminatable?(Q(),se(h,{key:1,title:"Terminate",icon:"carbon-delete",onClick:a[2]||(a[2]=u=>("rpc"in s?s.rpc:J(re)).runTerminalAction(s.id,"terminate"))})):oe("",!0),te("span",Oe,ne(J($)?.description),1)])],64)}}}),Pe={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},He={flex:"~",border:"b base","flex-1":"","items-center":"","navbar-glass":""},Fe=["onClick"],Ue={key:1,p10:""},We={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},Ne=te("em",{op50:""},"No terminal attached",-1),$e=[Ne],je=ae({__name:"TerminalPage",setup(ee){const Z=ye(),X=we(),q=Ee(()=>Z.value?.find(K=>K.id===X.value));function $(K){re.runTerminalAction(K,"remove")}return Le(()=>{!X.value&&Z.value?.length&&(X.value=Z.value[0].id)}),(K,M)=>{const s=De,a=ue,h=Ie;return J(Z)?.length?(Q(),ie("div",Pe,[te("div",He,[(Q(!0),ie(_e,null,ke(J(Z),u=>(Q(),ie("button",{key:u.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:ce(u.id===J(q)?.id?"bg-active":""),onClick:d=>X.value=u.id},[u.icon?(Q(),se(s,{key:0,icon:u.icon},null,8,["icon"])):oe("",!0),te("span",{class:ce(u.id===J(q)?.id?"":"op50")},ne(u.name)+ne(u.isTerminated?" (terminated)":""),3),u.isTerminated?(Q(),se(a,{key:1,icon:"carbon-close","mx--2":"",onClick:Re(d=>$(u.id),["stop"])},null,8,["onClick"])):oe("",!0)],10,Fe))),128))]),J(q)?(Q(),se(h,{id:J(q).id,key:J(q).id},null,8,["id"])):(Q(),ie("div",Ue,[le(" Terminal "),te("code",null,ne(J(X)),1),le(" not found ")]))])):(Q(),ie("div",We,$e))}}});const Ke=ae({__name:"terminals",setup(ee){return(Z,X)=>{const q=je,$=xe;return Q(),se($,null,{default:Ae(()=>[de(q)]),_:1})}}});export{Ke as default};
|