@dao42/d42paas-front 0.6.12 → 0.6.13
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/DaoPaaS.es.js +2 -1
- package/dist/DaoPaaS.umd.js +1 -1
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -188340,7 +188340,8 @@ const Editor = ({
|
|
|
188340
188340
|
}
|
|
188341
188341
|
}, [file == null ? void 0 : file.path]);
|
|
188342
188342
|
react.exports.useEffect(() => {
|
|
188343
|
-
|
|
188343
|
+
lspServerInject("", useLsp);
|
|
188344
|
+
}, [useLsp]);
|
|
188344
188345
|
react.exports.useEffect(() => {
|
|
188345
188346
|
const {
|
|
188346
188347
|
usersDelta,
|
package/dist/DaoPaaS.umd.js
CHANGED
|
@@ -2167,7 +2167,7 @@ ${JSON.stringify(_,void 0,4)}`)});else if(f.changes)for(const _ of Object.keys(f
|
|
|
2167
2167
|
${n=>n.userList.map(e=>"."+e.role+"{background:"+e.color+";width: 2px !important;}")}
|
|
2168
2168
|
${n=>n.userList.map(e=>"."+e.role+"-selection{background:"+e.color+"a6;color: #fff;width: 2px !important;}")}
|
|
2169
2169
|
`,EG="/home/runner/app";var ZIt="ruby";const LG=new Map,Dw=Tu(n=>({delta:"",selectionOp:null,usersDelta:[],versionId:0,position:[],selectionAcks:[],setSelectionAck:e=>n(t=>({selectionAcks:[...t.selectionAcks,e]})),clearSelectionAcks:()=>n(()=>({selectionAcks:[]})),setVersionId:e=>n(({versionId:t})=>({versionId:e||e===0?e:t+1})),setDelta:e=>n(()=>({delta:e})),setUsersDelta:e=>n(()=>({usersDelta:e})),setPosition:e=>n(()=>({position:e})),value:"",setValue:e=>n(()=>({value:e})),setSelectionOp:e=>n(()=>({selectionOp:e}))}));let Ti;const xCe=({doc:n,containerStyle:e,menuStyle:t,editorStyle:i,serviceWorkerOrigin:r,useLsp:o})=>{const s=M.exports.useRef(null),a=Gt(k=>k.doc),l=Gt(k=>k.setFromServer),[c,u]=M.exports.useState(new Zl(0)),d=Gt(k=>k),h=dl(k=>k),f=Dw(k=>k.setPosition),g=Dw(k=>k.setValue);Dw(k=>k.setDelta);const[p,m]=M.exports.useState([]),_=ql.exports.debounce(k=>{k()},300),v=(k,T,D)=>(c.receiveOperation=T,{operation:T}),y=()=>{Ti.onKeyDown(k=>{l(!1),k.keyCode===49&&(k.ctrlKey||k.metaKey)&&k.preventDefault()}),Ti.onDidChangeCursorSelection(k=>{Gt.getState()}),Ti.onDidChangeModelContent(k=>{const{appStatus:T,fromServer:D,doc:I}=Gt.getState();if(T==="replay"||D)return;const N=Ti.getValue(),{isFlush:A,changes:$}=k;if(A)g($[0].text);else{f(Ti.getPosition());let P=0;const U=N.length-$.reduce((O,W,X)=>O-W.rangeLength+W.text.length,0),B=new Ou;$.sort((O,W)=>O.rangeOffset-W.rangeOffset).forEach((O,W,X)=>{B.retain(W===0?O.rangeOffset:O.rangeOffset-P).delete(O.rangeLength).insert(O.text),W+1===X.length&&B.retain(U-O.rangeLength-O.rangeOffset),P=O.rangeOffset+O.rangeLength}),c.applyClient(B),R8((I==null?void 0:I.path)?I==null?void 0:I.path:"singleFile",{value:Ti.getValue(),revision:c.revision})}}),Ti.onDidScrollChange(k=>{var A,$;if(!k.scrollLeftChanged&&!k.scrollTopChanged)return;const{userInfo:T}=Od.getState(),D=k.scrollTopChanged?(k.scrollTop/k.scrollHeight).toFixed(2):1,I=k.scrollLeftChanged?(k.scrollLeft/k.scrollWidth).toFixed(2):1,N={timestamp:Date.now(),userInfo:ql.exports.pick(T,"uuid","role"),extend:{type:"editor-scroll",topPercent:D,leftPercent:I}};($=(A=jl.getState())==null?void 0:A.socket)==null||$.emit("extraSync",JSON.stringify(N))}),Ti.createContextKey("save",!0),Ti.addCommand($U.CtrlCmd|BU.KeyS,()=>{var D,I;const{doc:k,setFileSaved:T}=Gt.getState();(I=(D=jl.getState())==null?void 0:D.socket)==null||I.emit("saveFile",k==null?void 0:k.path),P_.message({type:"success",content:"\u4FDD\u5B58\u6210\u529F~~\u{1F918} \u2191\u2191\u2193\u2193\u2190\u2192\u2190\u2192ABAB",placement:"topCenter"})},"save"),c.sendOperation=function(k,T){if(Gt.getState().appStatus==="replay")return;const{userInfo:D}=Od.getState(),{doc:I}=Gt.getState(),N={timestamp:Date.now(),userInfo:ql.exports.pick(D,["role","uuid"]),editor:{operation:T,revision:k,evtType:"Editor"},file:{action:"Update",path:I==null?void 0:I.path}};_(()=>{var A,$;($=(A=jl.getState())==null?void 0:A.socket)==null||$.emit("editFile",JSON.stringify(N))})}},b=({value:k,path:T,language:D,CRDTInfo:I,doc:N})=>{var $;let A=su.getModels().find(P=>new RegExp(T).test(P.uri.path));A||(A=su.createModel(k,D,WU.parse(`file://${EG}${T}`)),m([...p,{label:T,path:T,model:A}])),c.revision=(($=I.editor)==null?void 0:$.revision)?I.editor.revision:0,Ti.setModel(A),a&&(LG.set(a.path,{operation:[],revision:c.revision,value:a.value}),Gt.getState().appStatus!=="replay"&&R8(N==null?void 0:N.path,{value:a.value,revision:c.revision}))},w=(k,T=!0)=>{if(b0.register({id:"ruby",extensions:[".rb"],aliases:["ruby","RUBY"]}),b0.register({id:"go",extensions:[".go"],aliases:["go","GO"]}),b0.register({id:"python",extensions:[".py"],aliases:["python","PYTHON"]}),b0.register({id:"java",extensions:[".java"],aliases:["java","JAVA"]}),b0.register({id:"typescript",extensions:[".ts"],aliases:["TypeScript","ts","TS","typescript"]}),!T)return;vw.MonacoServices.install(mTt);const{lspUrl:D,ticket:I}=Gt.getState().dockerInfo;if(!D)return;const N=new eDt(`wss://${D}/${I}`,[],{maxReconnectionDelay:1e4,minReconnectionDelay:1e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:1e4,maxRetries:1/0,debug:!1});yye.listen({webSocket:N,onConnection:A=>{console.log("lsp inited");const P=new vw.MonacoLanguageClient({name:"Language Client",clientOptions:{documentSelector:["java","ruby","python","go"],errorHandler:{error:()=>vw.ErrorAction.Continue,closed:()=>vw.CloseAction.DoNotRestart}},connectionProvider:{get:(U,B)=>Promise.resolve(vw.createConnection(A,U,B))}}).start();A.onClose(()=>P.dispose())}})},x=k=>{const{CRDTInfo:T,setCRDTInfo:D}=Gt.getState();D(ot(De({},T),{file:{action:"Get",value:k.getValue(),path:k.uri.path.replace(EG,"")}})),d.switchDoc({value:k.getValue(),path:k.uri.path.replace(EG,"")})},S=()=>{if(s.current){su.defineTheme("myCoolTheme",{base:"vs-dark",inherit:!1,rules:[{token:"green",background:"FF0000",foreground:"00FF00",fontStyle:"italic"},{token:"red",foreground:"FF0000",fontStyle:"bold underline"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#000000"}}),Ti=su.create(s.current,{theme:"vs-dark",automaticLayout:!0,glyphMargin:!0,lightbulb:{enabled:!0}}),y(),w(ZIt,o);const k=Ti._codeEditorService,T=k.openCodeEditor.bind(k);k.openCodeEditor=async(D,I,N)=>{const A=await T(D,I);if(A===null){const $=su.getModels().find(P=>new RegExp(D.resource.path).test(P.uri.path));x($)}return A},window.ot=ot(De({},RKe),{oTStore:Gt,editor:Ti})}};return M.exports.useEffect(()=>(r?self.MonacoEnvironment={globalAPI:!0,getWorkerUrl(k,T){return T==="json"?"./json.worker.bundle.js":T==="css"||T==="scss"||T==="less"?"./css.worker.bundle.js":T==="html"||T==="handlebars"||T==="razor"?"./html.worker.bundle.js":T==="typescript"||T==="javascript"?"./ts.worker.bundle.js":`data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
2170
|
-
importScripts('${r}/assets/editor.worker.43309ac9.js');`)}`}}:self.MonacoEnvironment={globalAPI:!0,getWorker(k,T){return T==="json"?new UIt:T==="css"||T==="scss"||T==="less"?new jIt:T==="html"||T==="handlebars"||T==="razor"?new qIt:T==="typescript"||T==="javascript"?new KIt:new zIt}},S(),()=>{Ti.dispose()}),[]),M.exports.useEffect(()=>{var N,A,$;const{CRDTInfo:k,doc:T,serverAck:D,appStatus:I}=Gt.getState();if(Dw.getState(),!(!k.editor||k.editor.evtType!=="Editor")&&!(Gt.getState().appStatus==="replay"&&F_.getState().ignoreReplayers.some(P=>P==="editor"))&&Ti&&((T==null?void 0:T.path)===((N=k==null?void 0:k.file)==null?void 0:N.path)||((A=k==null?void 0:k.file)==null?void 0:A.path)==="singleFile")){const P=k.editor.operation,U=v(k.editor.revision,Ou.fromJSON(P),($=k==null?void 0:k.file)==null?void 0:$.path);c.applyServer(U.operation);const{ops:B}=c.receiveOperation,O=Ti.getModel();let W=0;const X=[];B.forEach(z=>{if(Ou.isRetain(z)&&(W+=z),Ou.isInsert(z)){const te=O==null?void 0:O.getPositionAt(W),re={forceMoveMarkers:!0,range:new EL(te.lineNumber,te.column,te.lineNumber,te.column),text:z};X.push(re)}if(Ou.isDelete(z)){const te=O==null?void 0:O.getPositionAt(W),re=O==null?void 0:O.getPositionAt(W-z);X.push({forceMoveMarkers:!1,range:new EL(te.lineNumber,te.column,re.lineNumber,re.column),text:null}),W-=z}}),O==null||O.pushEditOperations([],X,null)}},[d.CRDTInfo]),M.exports.useEffect(()=>{var D;const{CRDTInfo:k}=Gt.getState(),{shadowUser:T}=hp.getState();((D=k==null?void 0:k.extend)==null?void 0:D.type)==="editor-scroll"&&Ti&&T.uuid&&(Ti.setScrollTop(Ti.getScrollHeight()*Number(k.extend.topPercent)),Ti.setScrollLeft(-(Ti.getScrollWidth()*Number(k.extend.leftPercent))))},[d.CRDTInfo.extend]),M.exports.useEffect(()=>{var $,P;if(!Ti)return;const{CRDTInfo:k,doc:T,serverAck:D,appStatus:I}=Gt.getState(),{usersDelta:N,setUsersDelta:A}=Dw.getState();Ti.getModel(),(T==null?void 0:T.path)===(($=k==null?void 0:k.file)==null?void 0:$.path)&&(k.selection&&(N.forEach(U=>{let B;const O=document.querySelector(`.${U.role}-label`);B&&clearTimeout(B),O.classList.contains("label-visible")||O.classList.add("label-visible"),B=setTimeout(()=>{O.classList.remove("label-visible")},8e3),Ti.layoutContentWidget(ot(De({},U.label),{getPosition:function(){return{position:{lineNumber:k.selection[0][7],column:k.selection[0][6]},preference:[su.ContentWidgetPositionPreference.ABOVE,su.ContentWidgetPositionPreference.BELOW]}}}))}),A(N.map(U=>U.uuid===k.userInfo.uuid?ot(De({},U),{delta:Ti.deltaDecorations(U.delta?U.delta:"",(k==null?void 0:k.selection).map(B=>({range:new EL(B[0],B[1],B[2],B[3]),options:{isWholeLine:!1,className:B[5]===B[6]?U.role:"",inlineClassName:U.role+"-selection"}})))}):U))),((P=k==null?void 0:k.editor)==null?void 0:P.evtType)==="Editor")},[d.CRDTInfo.selection]),M.exports.useEffect(()=>{},[d.fileSaved]),M.exports.useEffect(()=>{!Ti||fp(d.CRDTInfo.userInfo)&&(su.getModels().forEach(k=>k.dispose()),m([]))},[d.dockerInfo]),M.exports.useEffect(()=>{!Ti||!a||(d.serverAck&&c.serverAck(),LG.set(a.path,ot(De({},LG.get(a.path)),{operation:c.operation})))},[d.serverAck]),M.exports.useEffect(()=>{if((a==null?void 0:a.value)!==null&&(a==null?void 0:a.path)&&Ti){let k=/\.(\w+$)/gim.exec(a.path);k=k||["",a.path.substring(1)];const{CRDTInfo:T,doc:D,appStatus:I,setAppStatus:N}=Gt.getState(),{shadowUser:A}=hp.getState();if(a.path&&k&&I==="replay"&&!F_.getState().ignoreReplayers.some($=>$==="editor")){b({value:a.value,path:a.path,language:YM[k[1]],CRDTInfo:T,doc:D});return}I!=="replay"&&(A.uuid||a.path&&k&&fp(T.userInfo))&&b({value:a.value,path:a.path,language:YM[k[1]],CRDTInfo:T,doc:D})}},[a==null?void 0:a.path]),M.exports.useEffect(()=>{},[
|
|
2170
|
+
importScripts('${r}/assets/editor.worker.43309ac9.js');`)}`}}:self.MonacoEnvironment={globalAPI:!0,getWorker(k,T){return T==="json"?new UIt:T==="css"||T==="scss"||T==="less"?new jIt:T==="html"||T==="handlebars"||T==="razor"?new qIt:T==="typescript"||T==="javascript"?new KIt:new zIt}},S(),()=>{Ti.dispose()}),[]),M.exports.useEffect(()=>{var N,A,$;const{CRDTInfo:k,doc:T,serverAck:D,appStatus:I}=Gt.getState();if(Dw.getState(),!(!k.editor||k.editor.evtType!=="Editor")&&!(Gt.getState().appStatus==="replay"&&F_.getState().ignoreReplayers.some(P=>P==="editor"))&&Ti&&((T==null?void 0:T.path)===((N=k==null?void 0:k.file)==null?void 0:N.path)||((A=k==null?void 0:k.file)==null?void 0:A.path)==="singleFile")){const P=k.editor.operation,U=v(k.editor.revision,Ou.fromJSON(P),($=k==null?void 0:k.file)==null?void 0:$.path);c.applyServer(U.operation);const{ops:B}=c.receiveOperation,O=Ti.getModel();let W=0;const X=[];B.forEach(z=>{if(Ou.isRetain(z)&&(W+=z),Ou.isInsert(z)){const te=O==null?void 0:O.getPositionAt(W),re={forceMoveMarkers:!0,range:new EL(te.lineNumber,te.column,te.lineNumber,te.column),text:z};X.push(re)}if(Ou.isDelete(z)){const te=O==null?void 0:O.getPositionAt(W),re=O==null?void 0:O.getPositionAt(W-z);X.push({forceMoveMarkers:!1,range:new EL(te.lineNumber,te.column,re.lineNumber,re.column),text:null}),W-=z}}),O==null||O.pushEditOperations([],X,null)}},[d.CRDTInfo]),M.exports.useEffect(()=>{var D;const{CRDTInfo:k}=Gt.getState(),{shadowUser:T}=hp.getState();((D=k==null?void 0:k.extend)==null?void 0:D.type)==="editor-scroll"&&Ti&&T.uuid&&(Ti.setScrollTop(Ti.getScrollHeight()*Number(k.extend.topPercent)),Ti.setScrollLeft(-(Ti.getScrollWidth()*Number(k.extend.leftPercent))))},[d.CRDTInfo.extend]),M.exports.useEffect(()=>{var $,P;if(!Ti)return;const{CRDTInfo:k,doc:T,serverAck:D,appStatus:I}=Gt.getState(),{usersDelta:N,setUsersDelta:A}=Dw.getState();Ti.getModel(),(T==null?void 0:T.path)===(($=k==null?void 0:k.file)==null?void 0:$.path)&&(k.selection&&(N.forEach(U=>{let B;const O=document.querySelector(`.${U.role}-label`);B&&clearTimeout(B),O.classList.contains("label-visible")||O.classList.add("label-visible"),B=setTimeout(()=>{O.classList.remove("label-visible")},8e3),Ti.layoutContentWidget(ot(De({},U.label),{getPosition:function(){return{position:{lineNumber:k.selection[0][7],column:k.selection[0][6]},preference:[su.ContentWidgetPositionPreference.ABOVE,su.ContentWidgetPositionPreference.BELOW]}}}))}),A(N.map(U=>U.uuid===k.userInfo.uuid?ot(De({},U),{delta:Ti.deltaDecorations(U.delta?U.delta:"",(k==null?void 0:k.selection).map(B=>({range:new EL(B[0],B[1],B[2],B[3]),options:{isWholeLine:!1,className:B[5]===B[6]?U.role:"",inlineClassName:U.role+"-selection"}})))}):U))),((P=k==null?void 0:k.editor)==null?void 0:P.evtType)==="Editor")},[d.CRDTInfo.selection]),M.exports.useEffect(()=>{},[d.fileSaved]),M.exports.useEffect(()=>{!Ti||fp(d.CRDTInfo.userInfo)&&(su.getModels().forEach(k=>k.dispose()),m([]))},[d.dockerInfo]),M.exports.useEffect(()=>{!Ti||!a||(d.serverAck&&c.serverAck(),LG.set(a.path,ot(De({},LG.get(a.path)),{operation:c.operation})))},[d.serverAck]),M.exports.useEffect(()=>{if((a==null?void 0:a.value)!==null&&(a==null?void 0:a.path)&&Ti){let k=/\.(\w+$)/gim.exec(a.path);k=k||["",a.path.substring(1)];const{CRDTInfo:T,doc:D,appStatus:I,setAppStatus:N}=Gt.getState(),{shadowUser:A}=hp.getState();if(a.path&&k&&I==="replay"&&!F_.getState().ignoreReplayers.some($=>$==="editor")){b({value:a.value,path:a.path,language:YM[k[1]],CRDTInfo:T,doc:D});return}I!=="replay"&&(A.uuid||a.path&&k&&fp(T.userInfo))&&b({value:a.value,path:a.path,language:YM[k[1]],CRDTInfo:T,doc:D})}},[a==null?void 0:a.path]),M.exports.useEffect(()=>{w("",o)},[o]),M.exports.useEffect(()=>{const{usersDelta:k,setUsersDelta:T}=Dw.getState();T(h.userList.filter(D=>!fp(D)).map(D=>ot(De({},D),{label:{domNode:null,getId:function(){return`label-${D.uuid}`},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.className=`monaco-label ${D.role}-label`,this.domNode.innerHTML=D.username,this.domNode.style.background=D.color,this.domNode.style.visibility="hidden"),this.domNode},getPosition:function(){return{position:{lineNumber:1,column:2},preference:[su.ContentWidgetPositionPreference.ABOVE,su.ContentWidgetPositionPreference.BELOW]}}}}))),Ti&&k.forEach(D=>{document.querySelector(`.${D.role}-label`)||Ti.addContentWidget(D.label)})},[h.userList,a==null?void 0:a.path]),ne(vk,{name:"editor",children:ft(GIt,{style:e,className:"editor-layout flex flex-col",children:[p.length>0?ne("ul",{style:t,className:"bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",children:p.map((k,T)=>ne("li",{className:`flex flex-row justify-center items-center cursor-pointer flex-grow-0 flex-shrink-0 ${k.path===(a==null?void 0:a.path)?"active":""}`,onClick:()=>{x(k.model)},children:k.label.substring(1)},T))}):null,ne(YIt,{ref:s,userList:dl.getState().userList,className:"editor-content flex-1",style:i})]})})};var XIt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",Editor:xCe}),TG={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={4567:function(s,a,l){var c,u=this&&this.__extends||(c=function(y,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},c(y,b)},function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=y}c(y,b),y.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var d=l(9042),h=l(6114),f=l(9924),g=l(3656),p=l(844),m=l(5596),_=l(9631),v=function(y){function b(w,x){var S=y.call(this)||this;S._terminal=w,S._renderService=x,S._liveRegionLineCount=0,S._charsToConsume=[],S._charsToAnnounce="",S._accessibilityTreeRoot=document.createElement("div"),S._accessibilityTreeRoot.setAttribute("role","document"),S._accessibilityTreeRoot.classList.add("xterm-accessibility"),S._accessibilityTreeRoot.tabIndex=0,S._rowContainer=document.createElement("div"),S._rowContainer.setAttribute("role","list"),S._rowContainer.classList.add("xterm-accessibility-tree"),S._rowElements=[];for(var k=0;k<S._terminal.rows;k++)S._rowElements[k]=S._createAccessibilityTreeNode(),S._rowContainer.appendChild(S._rowElements[k]);if(S._topBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,0)},S._bottomBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,1)},S._rowElements[0].addEventListener("focus",S._topBoundaryFocusListener),S._rowElements[S._rowElements.length-1].addEventListener("focus",S._bottomBoundaryFocusListener),S._refreshRowsDimensions(),S._accessibilityTreeRoot.appendChild(S._rowContainer),S._renderRowsDebouncer=new f.TimeBasedDebouncer(S._renderRows.bind(S)),S._refreshRows(),S._liveRegion=document.createElement("div"),S._liveRegion.classList.add("live-region"),S._liveRegion.setAttribute("aria-live","assertive"),S._accessibilityTreeRoot.appendChild(S._liveRegion),!S._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return S._terminal.element.insertAdjacentElement("afterbegin",S._accessibilityTreeRoot),S.register(S._renderRowsDebouncer),S.register(S._terminal.onResize(function(T){return S._onResize(T.rows)})),S.register(S._terminal.onRender(function(T){return S._refreshRows(T.start,T.end)})),S.register(S._terminal.onScroll(function(){return S._refreshRows()})),S.register(S._terminal.onA11yChar(function(T){return S._onChar(T)})),S.register(S._terminal.onLineFeed(function(){return S._onChar(`
|
|
2171
2171
|
`)})),S.register(S._terminal.onA11yTab(function(T){return S._onTab(T)})),S.register(S._terminal.onKey(function(T){return S._onKey(T.key)})),S.register(S._terminal.onBlur(function(){return S._clearLiveRegion()})),S.register(S._renderService.onDimensionsChange(function(){return S._refreshRowsDimensions()})),S._screenDprMonitor=new m.ScreenDprMonitor,S.register(S._screenDprMonitor),S._screenDprMonitor.setListener(function(){return S._refreshRowsDimensions()}),S.register((0,g.addDisposableDomListener)(window,"resize",function(){return S._refreshRowsDimensions()})),S}return u(b,y),b.prototype.dispose=function(){y.prototype.dispose.call(this),(0,_.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},b.prototype._onBoundaryFocus=function(w,x){var S=w.target,k=this._rowElements[x===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")!==(x===0?"1":""+this._terminal.buffer.lines.length)&&w.relatedTarget===k){var T,D;if(x===0?(T=S,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(T=this._rowElements.shift(),D=S,this._rowContainer.removeChild(T)),T.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){var I=this._createAccessibilityTreeNode();this._rowElements.unshift(I),this._rowContainer.insertAdjacentElement("afterbegin",I)}else I=this._createAccessibilityTreeNode(),this._rowElements.push(I),this._rowContainer.appendChild(I);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}},b.prototype._onResize=function(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>w;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},b.prototype._createAccessibilityTreeNode=function(){var w=document.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w},b.prototype._onTab=function(w){for(var x=0;x<w;x++)this._onChar(" ")},b.prototype._onChar=function(w){var x=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===`
|
|
2172
2172
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),h.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){x._accessibilityTreeRoot.appendChild(x._liveRegion)},0))},b.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,h.isMac&&(0,_.removeElementFromParent)(this._liveRegion)},b.prototype._onKey=function(w){this._clearLiveRegion(),this._charsToConsume.push(w)},b.prototype._refreshRows=function(w,x){this._renderRowsDebouncer.refresh(w,x,this._terminal.rows)},b.prototype._renderRows=function(w,x){for(var S=this._terminal.buffer,k=S.lines.length.toString(),T=w;T<=x;T++){var D=S.translateBufferLineToString(S.ydisp+T,!0),I=(S.ydisp+T+1).toString(),N=this._rowElements[T];N&&(D.length===0?N.innerText="\xA0":N.textContent=D,N.setAttribute("aria-posinset",I),N.setAttribute("aria-setsize",k))}this._announceCharacters()},b.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var w=0;w<this._terminal.rows;w++)this._refreshRowDimensions(this._rowElements[w])}},b.prototype._refreshRowDimensions=function(w){w.style.height=this._renderService.dimensions.actualCellHeight+"px"},b.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},b}(p.Disposable);a.AccessibilityManager=v},3614:(s,a)=>{function l(h){return h.replace(/\r?\n/g,"\r")}function c(h,f){return f?"[200~"+h+"[201~":h}function u(h,f,g){h=c(h=l(h),g.decPrivateModes.bracketedPasteMode),g.triggerDataEvent(h,!0),f.value=""}function d(h,f,g){var p=g.getBoundingClientRect(),m=h.clientX-p.left-10,_=h.clientY-p.top-10;f.style.width="20px",f.style.height="20px",f.style.left=m+"px",f.style.top=_+"px",f.style.zIndex="1000",f.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=l,a.bracketTextForPaste=c,a.copyHandler=function(h,f){h.clipboardData&&h.clipboardData.setData("text/plain",f.selectionText),h.preventDefault()},a.handlePasteEvent=function(h,f,g){h.stopPropagation(),h.clipboardData&&u(h.clipboardData.getData("text/plain"),f,g)},a.paste=u,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(h,f,g,p,m){d(h,f,g),m&&p.rightClickSelect(h),f.value=p.selectionText,f.select()}},4774:(s,a)=>{var l,c,u,d;function h(g){var p=g.toString(16);return p.length<2?"0"+p:p}function f(g,p){return g<p?(p+.05)/(g+.05):(g+.05)/(p+.05)}Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=void 0,function(g){g.toCss=function(p,m,_,v){return v!==void 0?"#"+h(p)+h(m)+h(_)+h(v):"#"+h(p)+h(m)+h(_)},g.toRgba=function(p,m,_,v){return v===void 0&&(v=255),(p<<24|m<<16|_<<8|v)>>>0}}(l=a.channels||(a.channels={})),(c=a.color||(a.color={})).blend=function(g,p){var m=(255&p.rgba)/255;if(m===1)return{css:p.css,rgba:p.rgba};var _=p.rgba>>24&255,v=p.rgba>>16&255,y=p.rgba>>8&255,b=g.rgba>>24&255,w=g.rgba>>16&255,x=g.rgba>>8&255,S=b+Math.round((_-b)*m),k=w+Math.round((v-w)*m),T=x+Math.round((y-x)*m);return{css:l.toCss(S,k,T),rgba:l.toRgba(S,k,T)}},c.isOpaque=function(g){return(255&g.rgba)==255},c.ensureContrastRatio=function(g,p,m){var _=d.ensureContrastRatio(g.rgba,p.rgba,m);if(_)return d.toColor(_>>24&255,_>>16&255,_>>8&255)},c.opaque=function(g){var p=(255|g.rgba)>>>0,m=d.toChannels(p),_=m[0],v=m[1],y=m[2];return{css:l.toCss(_,v,y),rgba:p}},c.opacity=function(g,p){var m=Math.round(255*p),_=d.toChannels(g.rgba),v=_[0],y=_[1],b=_[2];return{css:l.toCss(v,y,b,m),rgba:l.toRgba(v,y,b,m)}},c.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]},(a.css||(a.css={})).toColor=function(g){switch(g.length){case 7:return{css:g,rgba:(parseInt(g.slice(1),16)<<8|255)>>>0};case 9:return{css:g,rgba:parseInt(g.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(g){function p(m,_,v){var y=m/255,b=_/255,w=v/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.0722*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))}g.relativeLuminance=function(m){return p(m>>16&255,m>>8&255,255&m)},g.relativeLuminance2=p}(u=a.rgb||(a.rgb={})),function(g){function p(_,v,y){for(var b=_>>24&255,w=_>>16&255,x=_>>8&255,S=v>>24&255,k=v>>16&255,T=v>>8&255,D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));D<y&&(S>0||k>0||T>0);)S-=Math.max(0,Math.ceil(.1*S)),k-=Math.max(0,Math.ceil(.1*k)),T-=Math.max(0,Math.ceil(.1*T)),D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));return(S<<24|k<<16|T<<8|255)>>>0}function m(_,v,y){for(var b=_>>24&255,w=_>>16&255,x=_>>8&255,S=v>>24&255,k=v>>16&255,T=v>>8&255,D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));D<y&&(S<255||k<255||T<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),k=Math.min(255,k+Math.ceil(.1*(255-k))),T=Math.min(255,T+Math.ceil(.1*(255-T))),D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));return(S<<24|k<<16|T<<8|255)>>>0}g.ensureContrastRatio=function(_,v,y){var b=u.relativeLuminance(_>>8),w=u.relativeLuminance(v>>8);if(f(b,w)<y)return w<b?p(_,v,y):m(_,v,y)},g.reduceLuminance=p,g.increaseLuminance=m,g.toChannels=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]},g.toColor=function(_,v,y){return{css:l.toCss(_,v,y),rgba:l.toRgba(_,v,y)}}}(d=a.rgba||(a.rgba={})),a.toPaddedHex=h,a.contrastRatio=f},7239:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;var l=function(){function c(){this._color={},this._rgba={}}return c.prototype.clear=function(){this._color={},this._rgba={}},c.prototype.setCss=function(u,d,h){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][d]=h},c.prototype.getCss=function(u,d){return this._rgba[u]?this._rgba[u][d]:void 0},c.prototype.setColor=function(u,d,h){this._color[u]||(this._color[u]={}),this._color[u][d]=h},c.prototype.getColor=function(u,d){return this._color[u]?this._color[u][d]:void 0},c}();a.ColorContrastCache=l},5680:function(s,a,l){var c=this&&this.__spreadArray||function(v,y,b){if(b||arguments.length===2)for(var w,x=0,S=y.length;x<S;x++)!w&&x in y||(w||(w=Array.prototype.slice.call(y,0,x)),w[x]=y[x]);return v.concat(w||Array.prototype.slice.call(y))};Object.defineProperty(a,"__esModule",{value:!0}),a.ColorManager=a.DEFAULT_ANSI_COLORS=void 0;var u=l(4774),d=l(7239),h=u.css.toColor("#ffffff"),f=u.css.toColor("#000000"),g=u.css.toColor("#ffffff"),p=u.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var v=[u.css.toColor("#2e3436"),u.css.toColor("#cc0000"),u.css.toColor("#4e9a06"),u.css.toColor("#c4a000"),u.css.toColor("#3465a4"),u.css.toColor("#75507b"),u.css.toColor("#06989a"),u.css.toColor("#d3d7cf"),u.css.toColor("#555753"),u.css.toColor("#ef2929"),u.css.toColor("#8ae234"),u.css.toColor("#fce94f"),u.css.toColor("#729fcf"),u.css.toColor("#ad7fa8"),u.css.toColor("#34e2e2"),u.css.toColor("#eeeeec")],y=[0,95,135,175,215,255],b=0;b<216;b++){var w=y[b/36%6|0],x=y[b/6%6|0],S=y[b%6];v.push({css:u.channels.toCss(w,x,S),rgba:u.channels.toRgba(w,x,S)})}for(b=0;b<24;b++){var k=8+10*b;v.push({css:u.channels.toCss(k,k,k),rgba:u.channels.toRgba(k,k,k)})}return v}());var _=function(){function v(y,b){this.allowTransparency=b;var w=y.createElement("canvas");w.width=1,w.height=1;var x=w.getContext("2d");if(!x)throw new Error("Could not get rendering context");this._ctx=x,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new d.ColorContrastCache,this.colors={foreground:h,background:f,cursor:g,cursorAccent:p,selectionTransparent:m,selectionOpaque:u.color.blend(f,m),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return v.prototype.onOptionsChange=function(y){y==="minimumContrastRatio"&&this._contrastCache.clear()},v.prototype.setTheme=function(y){y===void 0&&(y={}),this.colors.foreground=this._parseColor(y.foreground,h),this.colors.background=this._parseColor(y.background,f),this.colors.cursor=this._parseColor(y.cursor,g,!0),this.colors.cursorAccent=this._parseColor(y.cursorAccent,p,!0),this.colors.selectionTransparent=this._parseColor(y.selection,m,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(y.black,a.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(y.red,a.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(y.green,a.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(y.yellow,a.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(y.blue,a.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(y.magenta,a.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(y.cyan,a.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(y.white,a.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(y.brightBlack,a.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(y.brightRed,a.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(y.brightGreen,a.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(y.brightYellow,a.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(y.brightBlue,a.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(y.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(y.brightCyan,a.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(y.brightWhite,a.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},v.prototype.restoreColor=function(y){if(y!==void 0)switch(y){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[y]=this._restoreColors.ansi[y]}else for(var b=0;b<this._restoreColors.ansi.length;++b)this.colors.ansi[b]=this._restoreColors.ansi[b]},v.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:c([],this.colors.ansi,!0)}},v.prototype._parseColor=function(y,b,w){if(w===void 0&&(w=this.allowTransparency),y===void 0)return b;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=y,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+y+" is invalid using fallback "+b.css),b;this._ctx.fillRect(0,0,1,1);var x=this._ctx.getImageData(0,0,1,1).data;if(x[3]!==255){if(!w)return console.warn("Color: "+y+" is using transparency, but allowTransparency is false. Using fallback "+b.css+"."),b;var S=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(A){return Number(A)}),k=S[0],T=S[1],D=S[2],I=S[3],N=Math.round(255*I);return{rgba:u.channels.toRgba(k,T,D,N),css:y}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(x[0],x[1],x[2],x[3])}},v}();a.ColorManager=_},9631:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeElementFromParent=void 0,a.removeElementFromParent=function(){for(var l,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];for(var d=0,h=c;d<h.length;d++){var f=h[d];(l=f==null?void 0:f.parentElement)===null||l===void 0||l.removeChild(f)}}},3656:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(l,c,u,d){l.addEventListener(c,u,d);var h=!1;return{dispose:function(){h||(h=!0,l.removeEventListener(c,u,d))}}}},3551:function(s,a,l){var c=this&&this.__decorate||function(p,m,_,v){var y,b=arguments.length,w=b<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,m,_,v);else for(var x=p.length-1;x>=0;x--)(y=p[x])&&(w=(b<3?y(w):b>3?y(m,_,w):y(m,_))||w);return b>3&&w&&Object.defineProperty(m,_,w),w},u=this&&this.__param||function(p,m){return function(_,v){m(_,v,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZone=a.Linkifier=void 0;var d=l(8460),h=l(2585),f=function(){function p(m,_,v){this._bufferService=m,this._logService=_,this._unicodeService=v,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new d.EventEmitter,this._onHideLinkUnderline=new d.EventEmitter,this._onLinkTooltip=new d.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(p.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),p.prototype.attachToDom=function(m,_){this._element=m,this._mouseZoneManager=_},p.prototype.linkifyRows=function(m,_){var v=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=m,this._rowsToLinkify.end=_):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,m),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,_)),this._mouseZoneManager.clearAll(m,_),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return v._linkifyRows()},p._timeBeforeLatency))},p.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var m=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var _=m.ydisp+this._rowsToLinkify.start;if(!(_>=m.lines.length)){for(var v=m.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,y=Math.ceil(2e3/this._bufferService.cols),b=this._bufferService.buffer.iterator(!1,_,v,y,y);b.hasNext();)for(var w=b.next(),x=0;x<this._linkMatchers.length;x++)this._doLinkifyRow(w.range.first,w.content,this._linkMatchers[x]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},p.prototype.registerLinkMatcher=function(m,_,v){if(v===void 0&&(v={}),!_)throw new Error("handler must be defined");var y={id:this._nextLinkMatcherId++,regex:m,handler:_,matchIndex:v.matchIndex,validationCallback:v.validationCallback,hoverTooltipCallback:v.tooltipCallback,hoverLeaveCallback:v.leaveCallback,willLinkActivate:v.willLinkActivate,priority:v.priority||0};return this._addLinkMatcherToList(y),y.id},p.prototype._addLinkMatcherToList=function(m){if(this._linkMatchers.length!==0){for(var _=this._linkMatchers.length-1;_>=0;_--)if(m.priority<=this._linkMatchers[_].priority)return void this._linkMatchers.splice(_+1,0,m);this._linkMatchers.splice(0,0,m)}else this._linkMatchers.push(m)},p.prototype.deregisterLinkMatcher=function(m){for(var _=0;_<this._linkMatchers.length;_++)if(this._linkMatchers[_].id===m)return this._linkMatchers.splice(_,1),!0;return!1},p.prototype._doLinkifyRow=function(m,_,v){for(var y,b=this,w=new RegExp(v.regex.source,(v.regex.flags||"")+"g"),x=-1,S=function(){var T=y[typeof v.matchIndex!="number"?0:v.matchIndex];if(!T)return k._logService.debug("match found without corresponding matchIndex",y,v),"break";if(x=_.indexOf(T,x+1),w.lastIndex=x+T.length,x<0)return"break";var D=k._bufferService.buffer.stringIndexToBufferIndex(m,x);if(D[0]<0)return"break";var I=k._bufferService.buffer.lines.get(D[0]);if(!I)return"break";var N=I.getFg(D[1]),A=N?N>>9&511:void 0;v.validationCallback?v.validationCallback(T,function($){b._rowsTimeoutId||$&&b._addLink(D[1],D[0]-b._bufferService.buffer.ydisp,T,v,A)}):k._addLink(D[1],D[0]-k._bufferService.buffer.ydisp,T,v,A)},k=this;(y=w.exec(_))!==null&&S()!=="break";);},p.prototype._addLink=function(m,_,v,y,b){var w=this;if(this._mouseZoneManager&&this._element){var x=this._unicodeService.getStringCellWidth(v),S=m%this._bufferService.cols,k=_+Math.floor(m/this._bufferService.cols),T=(S+x)%this._bufferService.cols,D=k+Math.floor((S+x)/this._bufferService.cols);T===0&&(T=this._bufferService.cols,D--),this._mouseZoneManager.add(new g(S+1,k+1,T+1,D+1,function(I){if(y.handler)return y.handler(I,v);var N=window.open();N?(N.opener=null,N.location.href=v):console.warn("Opening link blocked as opener could not be cleared")},function(){w._onShowLinkUnderline.fire(w._createLinkHoverEvent(S,k,T,D,b)),w._element.classList.add("xterm-cursor-pointer")},function(I){w._onLinkTooltip.fire(w._createLinkHoverEvent(S,k,T,D,b)),y.hoverTooltipCallback&&y.hoverTooltipCallback(I,v,{start:{x:S,y:k},end:{x:T,y:D}})},function(){w._onHideLinkUnderline.fire(w._createLinkHoverEvent(S,k,T,D,b)),w._element.classList.remove("xterm-cursor-pointer"),y.hoverLeaveCallback&&y.hoverLeaveCallback()},function(I){return!y.willLinkActivate||y.willLinkActivate(I,v)}))}},p.prototype._createLinkHoverEvent=function(m,_,v,y,b){return{x1:m,y1:_,x2:v,y2:y,cols:this._bufferService.cols,fg:b}},p._timeBeforeLatency=200,p=c([u(0,h.IBufferService),u(1,h.ILogService),u(2,h.IUnicodeService)],p)}();a.Linkifier=f;var g=function(p,m,_,v,y,b,w,x,S){this.x1=p,this.y1=m,this.x2=_,this.y2=v,this.clickCallback=y,this.hoverCallback=b,this.tooltipCallback=w,this.leaveCallback=x,this.willLinkActivate=S};a.MouseZone=g},6465:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(v,y)},function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=v}c(v,y),v.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(v,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,y,b,w);else for(var T=v.length-1;T>=0;T--)(x=v[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(v,y){return function(b,w){y(b,w,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier2=void 0;var f=l(2585),g=l(8460),p=l(844),m=l(3656),_=function(v){function y(b){var w=v.call(this)||this;return w._bufferService=b,w._linkProviders=[],w._linkCacheDisposables=[],w._isMouseOut=!0,w._activeLine=-1,w._onShowLinkUnderline=w.register(new g.EventEmitter),w._onHideLinkUnderline=w.register(new g.EventEmitter),w.register((0,p.getDisposeArrayDisposable)(w._linkCacheDisposables)),w}return u(y,v),Object.defineProperty(y.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),y.prototype.registerLinkProvider=function(b){var w=this;return this._linkProviders.push(b),{dispose:function(){var x=w._linkProviders.indexOf(b);x!==-1&&w._linkProviders.splice(x,1)}}},y.prototype.attachToDom=function(b,w,x){var S=this;this._element=b,this._mouseService=w,this._renderService=x,this.register((0,m.addDisposableDomListener)(this._element,"mouseleave",function(){S._isMouseOut=!0,S._clearCurrentLink()})),this.register((0,m.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,m.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},y.prototype._onMouseMove=function(b){if(this._lastMouseEvent=b,this._element&&this._mouseService){var w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(w){this._isMouseOut=!1;for(var x=b.composedPath(),S=0;S<x.length;S++){var k=x[S];if(k.classList.contains("xterm"))break;if(k.classList.contains("xterm-hover"))return}this._lastBufferCell&&w.x===this._lastBufferCell.x&&w.y===this._lastBufferCell.y||(this._onHover(w),this._lastBufferCell=w)}}},y.prototype._onHover=function(b){if(this._activeLine!==b.y)return this._clearCurrentLink(),void this._askForLink(b,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))},y.prototype._askForLink=function(b,w){var x,S=this;this._activeProviderReplies&&w||((x=this._activeProviderReplies)===null||x===void 0||x.forEach(function(T){T==null||T.forEach(function(D){D.link.dispose&&D.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=b.y);var k=!1;this._linkProviders.forEach(function(T,D){var I;w?((I=S._activeProviderReplies)===null||I===void 0?void 0:I.get(D))&&(k=S._checkLinkProviderResult(D,b,k)):T.provideLinks(b.y,function(N){var A,$;if(!S._isMouseOut){var P=N==null?void 0:N.map(function(U){return{link:U}});(A=S._activeProviderReplies)===null||A===void 0||A.set(D,P),k=S._checkLinkProviderResult(D,b,k),(($=S._activeProviderReplies)===null||$===void 0?void 0:$.size)===S._linkProviders.length&&S._removeIntersectingLinks(b.y,S._activeProviderReplies)}})})},y.prototype._removeIntersectingLinks=function(b,w){for(var x=new Set,S=0;S<w.size;S++){var k=w.get(S);if(k)for(var T=0;T<k.length;T++)for(var D=k[T],I=D.link.range.start.y<b?0:D.link.range.start.x,N=D.link.range.end.y>b?this._bufferService.cols:D.link.range.end.x,A=I;A<=N;A++){if(x.has(A)){k.splice(T--,1);break}x.add(A)}}},y.prototype._checkLinkProviderResult=function(b,w,x){var S,k=this;if(!this._activeProviderReplies)return x;for(var T=this._activeProviderReplies.get(b),D=!1,I=0;I<b;I++)this._activeProviderReplies.has(I)&&!this._activeProviderReplies.get(I)||(D=!0);if(!D&&T){var N=T.find(function($){return k._linkAtPosition($.link,w)});N&&(x=!0,this._handleNewLink(N))}if(this._activeProviderReplies.size===this._linkProviders.length&&!x)for(I=0;I<this._activeProviderReplies.size;I++){var A=(S=this._activeProviderReplies.get(I))===null||S===void 0?void 0:S.find(function($){return k._linkAtPosition($.link,w)});if(A){x=!0,this._handleNewLink(A);break}}return x},y.prototype._onClick=function(b){if(this._element&&this._mouseService&&this._currentLink){var w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}},y.prototype._clearCurrentLink=function(b,w){this._element&&this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},y.prototype._handleNewLink=function(b){var w=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(b.link,x)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:function(){var S,k;return(k=(S=w._currentLink)===null||S===void 0?void 0:S.state)===null||k===void 0?void 0:k.decorations.pointerCursor},set:function(S){var k,T;((k=w._currentLink)===null||k===void 0?void 0:k.state)&&w._currentLink.state.decorations.pointerCursor!==S&&(w._currentLink.state.decorations.pointerCursor=S,w._currentLink.state.isHovered&&((T=w._element)===null||T===void 0||T.classList.toggle("xterm-cursor-pointer",S)))}},underline:{get:function(){var S,k;return(k=(S=w._currentLink)===null||S===void 0?void 0:S.state)===null||k===void 0?void 0:k.decorations.underline},set:function(S){var k,T,D;((k=w._currentLink)===null||k===void 0?void 0:k.state)&&((D=(T=w._currentLink)===null||T===void 0?void 0:T.state)===null||D===void 0?void 0:D.decorations.underline)!==S&&(w._currentLink.state.decorations.underline=S,w._currentLink.state.isHovered&&w._fireUnderlineEvent(b.link,S))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(S){var k=S.start===0?0:S.start+1+w._bufferService.buffer.ydisp;w._clearCurrentLink(k,S.end+1+w._bufferService.buffer.ydisp)})))}},y.prototype._linkHover=function(b,w,x){var S;((S=this._currentLink)===null||S===void 0?void 0:S.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(x,w.text)},y.prototype._fireUnderlineEvent=function(b,w){var x=b.range,S=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-S-1,x.end.x,x.end.y-S-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)},y.prototype._linkLeave=function(b,w,x){var S;((S=this._currentLink)===null||S===void 0?void 0:S.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(x,w.text)},y.prototype._linkAtPosition=function(b,w){var x=b.range.start.y===b.range.end.y,S=b.range.start.y<w.y,k=b.range.end.y>w.y;return(x&&b.range.start.x<=w.x&&b.range.end.x>=w.x||S&&b.range.end.x>=w.x||k&&b.range.start.x<=w.x||S&&k)&&b.range.start.y<=w.y&&b.range.end.y>=w.y},y.prototype._positionFromMouseEvent=function(b,w,x){var S=x.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}},y.prototype._createLinkUnderlineEvent=function(b,w,x,S,k){return{x1:b,y1:w,x2:x,y2:S,cols:this._bufferService.cols,fg:k}},d([h(0,f.IBufferService)],y)}(p.Disposable);a.Linkifier2=_},9042:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(v,y)},function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=v}c(v,y),v.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(v,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,y,b,w);else for(var T=v.length-1;T>=0;T--)(x=v[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(v,y){return function(b,w){y(b,w,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZoneManager=void 0;var f=l(844),g=l(3656),p=l(4725),m=l(2585),_=function(v){function y(b,w,x,S,k,T){var D=v.call(this)||this;return D._element=b,D._screenElement=w,D._bufferService=x,D._mouseService=S,D._selectionService=k,D._optionsService=T,D._zones=[],D._areZonesActive=!1,D._lastHoverCoords=[void 0,void 0],D._initialSelectionLength=0,D.register((0,g.addDisposableDomListener)(D._element,"mousedown",function(I){return D._onMouseDown(I)})),D._mouseMoveListener=function(I){return D._onMouseMove(I)},D._mouseLeaveListener=function(I){return D._onMouseLeave(I)},D._clickListener=function(I){return D._onClick(I)},D}return u(y,v),y.prototype.dispose=function(){v.prototype.dispose.call(this),this._deactivate()},y.prototype.add=function(b){this._zones.push(b),this._zones.length===1&&this._activate()},y.prototype.clearAll=function(b,w){if(this._zones.length!==0){b&&w||(b=0,w=this._bufferService.rows-1);for(var x=0;x<this._zones.length;x++){var S=this._zones[x];(S.y1>b&&S.y1<=w+1||S.y2>b&&S.y2<=w+1||S.y1<b&&S.y2>w+1)&&(this._currentZone&&this._currentZone===S&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(x--,1))}this._zones.length===0&&this._deactivate()}},y.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},y.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},y.prototype._onMouseMove=function(b){this._lastHoverCoords[0]===b.pageX&&this._lastHoverCoords[1]===b.pageY||(this._onHover(b),this._lastHoverCoords=[b.pageX,b.pageY])},y.prototype._onHover=function(b){var w=this,x=this._findZoneEventAt(b);x!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),x&&(this._currentZone=x,x.hoverCallback&&x.hoverCallback(b),this._tooltipTimeout=window.setTimeout(function(){return w._onTooltip(b)},this._optionsService.options.linkTooltipHoverDuration)))},y.prototype._onTooltip=function(b){this._tooltipTimeout=void 0;var w=this._findZoneEventAt(b);w==null||w.tooltipCallback(b)},y.prototype._onMouseDown=function(b){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var w=this._findZoneEventAt(b);(w==null?void 0:w.willLinkActivate(b))&&(b.preventDefault(),b.stopImmediatePropagation())}},y.prototype._onMouseLeave=function(b){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},y.prototype._onClick=function(b){var w=this._findZoneEventAt(b),x=this._getSelectionLength();w&&x===this._initialSelectionLength&&(w.clickCallback(b),b.preventDefault(),b.stopImmediatePropagation())},y.prototype._getSelectionLength=function(){var b=this._selectionService.selectionText;return b?b.length:0},y.prototype._findZoneEventAt=function(b){var w=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(w)for(var x=w[0],S=w[1],k=0;k<this._zones.length;k++){var T=this._zones[k];if(T.y1===T.y2){if(S===T.y1&&x>=T.x1&&x<T.x2)return T}else if(S===T.y1&&x>=T.x1||S===T.y2&&x<T.x2||S>T.y1&&S<T.y2)return T}},d([h(2,m.IBufferService),h(3,p.IMouseService),h(4,p.ISelectionService),h(5,m.IOptionsService)],y)}(f.Disposable);a.MouseZoneManager=_},6193:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0;var l=function(){function c(u){this._renderCallback=u}return c.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},c.prototype.refresh=function(u,d,h){var f=this;this._rowCount=h,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return f._innerRefresh()}))},c.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(u,d)}},c}();a.RenderDebouncer=l},5596:function(s,a,l){var c,u=this&&this.__extends||(c=function(h,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(g[m]=p[m])},c(h,f)},function(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function g(){this.constructor=h}c(h,f),h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)});Object.defineProperty(a,"__esModule",{value:!0}),a.ScreenDprMonitor=void 0;var d=function(h){function f(){var g=h!==null&&h.apply(this,arguments)||this;return g._currentDevicePixelRatio=window.devicePixelRatio,g}return u(f,h),f.prototype.setListener=function(g){var p=this;this._listener&&this.clearListener(),this._listener=g,this._outerListener=function(){p._listener&&(p._listener(window.devicePixelRatio,p._currentDevicePixelRatio),p._updateDpr())},this._updateDpr()},f.prototype.dispose=function(){h.prototype.dispose.call(this),this.clearListener()},f.prototype._updateDpr=function(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)===null||g===void 0||g.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},f.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},f}(l(844).Disposable);a.ScreenDprMonitor=d},3236:function(s,a,l){var c,u=this&&this.__extends||(c=function(Me,q){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,oe){se.__proto__=oe}||function(se,oe){for(var Re in oe)Object.prototype.hasOwnProperty.call(oe,Re)&&(se[Re]=oe[Re])},c(Me,q)},function(Me,q){if(typeof q!="function"&&q!==null)throw new TypeError("Class extends value "+String(q)+" is not a constructor or null");function se(){this.constructor=Me}c(Me,q),Me.prototype=q===null?Object.create(q):(se.prototype=q.prototype,new se)});Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var d=l(2950),h=l(1680),f=l(3614),g=l(2584),p=l(5435),m=l(3525),_=l(3551),v=l(9312),y=l(6114),b=l(3656),w=l(9042),x=l(357),S=l(6954),k=l(4567),T=l(1296),D=l(7399),I=l(8460),N=l(8437),A=l(5680),$=l(3230),P=l(4725),U=l(428),B=l(8934),O=l(6465),W=l(5114),X=l(8969),z=l(4774),te=l(4269),re=l(5941),pe=typeof window!="undefined"?window.document:null,xe=function(Me){function q(se){se===void 0&&(se={});var oe=Me.call(this,se)||this;return oe.browser=y,oe._keyDownHandled=!1,oe._keyPressHandled=!1,oe._unprocessedDeadKey=!1,oe._onCursorMove=new I.EventEmitter,oe._onKey=new I.EventEmitter,oe._onRender=new I.EventEmitter,oe._onSelectionChange=new I.EventEmitter,oe._onTitleChange=new I.EventEmitter,oe._onBell=new I.EventEmitter,oe._onFocus=new I.EventEmitter,oe._onBlur=new I.EventEmitter,oe._onA11yCharEmitter=new I.EventEmitter,oe._onA11yTabEmitter=new I.EventEmitter,oe._setup(),oe.linkifier=oe._instantiationService.createInstance(_.Linkifier),oe.linkifier2=oe.register(oe._instantiationService.createInstance(O.Linkifier2)),oe.register(oe._inputHandler.onRequestBell(function(){return oe.bell()})),oe.register(oe._inputHandler.onRequestRefreshRows(function(Re,ge){return oe.refresh(Re,ge)})),oe.register(oe._inputHandler.onRequestSendFocus(function(){return oe._reportFocus()})),oe.register(oe._inputHandler.onRequestReset(function(){return oe.reset()})),oe.register(oe._inputHandler.onRequestWindowsOptionsReport(function(Re){return oe._reportWindowsOptions(Re)})),oe.register(oe._inputHandler.onColor(function(Re){return oe._handleColorEvent(Re)})),oe.register((0,I.forwardEvent)(oe._inputHandler.onCursorMove,oe._onCursorMove)),oe.register((0,I.forwardEvent)(oe._inputHandler.onTitleChange,oe._onTitleChange)),oe.register((0,I.forwardEvent)(oe._inputHandler.onA11yChar,oe._onA11yCharEmitter)),oe.register((0,I.forwardEvent)(oe._inputHandler.onA11yTab,oe._onA11yTabEmitter)),oe.register(oe._bufferService.onResize(function(Re){return oe._afterResize(Re.cols,Re.rows)})),oe}return u(q,Me),Object.defineProperty(q.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),q.prototype._handleColorEvent=function(se){var oe,Re;if(this._colorManager){for(var ge=0,Pe=se;ge<Pe.length;ge++){var at=Pe[ge],_t=void 0,qe="";switch(at.index){case 256:_t="foreground",qe="10";break;case 257:_t="background",qe="11";break;case 258:_t="cursor",qe="12";break;default:_t="ansi",qe="4;"+at.index}if(_t)switch(at.type){case 0:var Et=z.color.toColorRGB(_t==="ansi"?this._colorManager.colors.ansi[at.index]:this._colorManager.colors[_t]);this.coreService.triggerDataEvent(g.C0.ESC+"]"+qe+";"+(0,re.toRgbString)(Et)+g.C0.BEL);break;case 1:_t==="ansi"?this._colorManager.colors.ansi[at.index]=z.rgba.toColor.apply(z.rgba,at.color):this._colorManager.colors[_t]=z.rgba.toColor.apply(z.rgba,at.color);break;case 2:this._colorManager.restoreColor(at.index)}}(oe=this._renderService)===null||oe===void 0||oe.setColors(this._colorManager.colors),(Re=this.viewport)===null||Re===void 0||Re.onThemeChange(this._colorManager.colors)}},q.prototype.dispose=function(){var se,oe,Re;this._isDisposed||(Me.prototype.dispose.call(this),(se=this._renderService)===null||se===void 0||se.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Re=(oe=this.element)===null||oe===void 0?void 0:oe.parentNode)===null||Re===void 0||Re.removeChild(this.element))},q.prototype._setup=function(){Me.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(q.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),q.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},q.prototype._updateOptions=function(se){var oe,Re,ge,Pe;switch(Me.prototype._updateOptions.call(this,se),se){case"fontFamily":case"fontSize":(oe=this._renderService)===null||oe===void 0||oe.clear(),(Re=this._charSizeService)===null||Re===void 0||Re.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(ge=this.viewport)===null||ge===void 0||ge.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new k.AccessibilityManager(this,this._renderService)):((Pe=this._accessibilityManager)===null||Pe===void 0||Pe.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},q.prototype._onTextAreaFocus=function(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[I"),this.updateCursorStyle(se),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},q.prototype.blur=function(){var se;return(se=this.textarea)===null||se===void 0?void 0:se.blur()},q.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},q.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var se=this.buffer.ybase+this.buffer.y,oe=this.buffer.lines.get(se);if(oe){var Re=Math.min(this.buffer.x,this.cols-1),ge=this._renderService.dimensions.actualCellHeight,Pe=oe.getWidth(Re),at=this._renderService.dimensions.actualCellWidth*Pe,_t=this.buffer.y*this._renderService.dimensions.actualCellHeight,qe=Re*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=qe+"px",this.textarea.style.top=_t+"px",this.textarea.style.width=at+"px",this.textarea.style.height=ge+"px",this.textarea.style.lineHeight=ge+"px",this.textarea.style.zIndex="-5"}}},q.prototype._initGlobal=function(){var se=this;this._bindKeys(),this.register((0,b.addDisposableDomListener)(this.element,"copy",function(Re){se.hasSelection()&&(0,f.copyHandler)(Re,se._selectionService)}));var oe=function(Re){return(0,f.handlePasteEvent)(Re,se.textarea,se.coreService)};this.register((0,b.addDisposableDomListener)(this.textarea,"paste",oe)),this.register((0,b.addDisposableDomListener)(this.element,"paste",oe)),y.isFirefox?this.register((0,b.addDisposableDomListener)(this.element,"mousedown",function(Re){Re.button===2&&(0,f.rightClickHandler)(Re,se.textarea,se.screenElement,se._selectionService,se.options.rightClickSelectsWord)})):this.register((0,b.addDisposableDomListener)(this.element,"contextmenu",function(Re){(0,f.rightClickHandler)(Re,se.textarea,se.screenElement,se._selectionService,se.options.rightClickSelectsWord)})),y.isLinux&&this.register((0,b.addDisposableDomListener)(this.element,"auxclick",function(Re){Re.button===1&&(0,f.moveTextAreaUnderMouseCursor)(Re,se.textarea,se.screenElement)}))},q.prototype._bindKeys=function(){var se=this;this.register((0,b.addDisposableDomListener)(this.textarea,"keyup",function(oe){return se._keyUp(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keydown",function(oe){return se._keyDown(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keypress",function(oe){return se._keyPress(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionstart",function(){return se._compositionHelper.compositionstart()})),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionupdate",function(oe){return se._compositionHelper.compositionupdate(oe)})),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionend",function(){return se._compositionHelper.compositionend()})),this.register((0,b.addDisposableDomListener)(this.textarea,"input",function(oe){return se._inputEvent(oe)},!0)),this.register(this.onRender(function(){return se._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(oe){return se._queueLinkification(oe.start,oe.end)}))},q.prototype.open=function(se){var oe=this;if(!se)throw new Error("Terminal requires a parent element.");se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=se.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),se.appendChild(this.element);var Re=pe.createDocumentFragment();this._viewportElement=pe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Re.appendChild(this._viewportElement),this._viewportScrollArea=pe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=pe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=pe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Re.appendChild(this.screenElement),this.textarea=pe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,b.addDisposableDomListener)(this.textarea,"focus",function(at){return oe._onTextAreaFocus(at)})),this.register((0,b.addDisposableDomListener)(this.textarea,"blur",function(){return oe._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var ge=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(P.ICoreBrowserService,ge),this._charSizeService=this._instantiationService.createInstance(U.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(P.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new A.ColorManager(pe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(at){return oe._colorManager.onOptionsChange(at)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(te.CharacterJoinerService),this._instantiationService.setService(P.ICharacterJoinerService,this._characterJoinerService);var Pe=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance($.RenderService,Pe,this.rows,this.screenElement)),this._instantiationService.setService(P.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(at){return oe._onRender.fire(at)})),this.onResize(function(at){return oe._renderService.resize(at.cols,at.rows)}),this._compositionView=pe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Re),this._soundService=this._instantiationService.createInstance(x.SoundService),this._instantiationService.setService(P.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(B.MouseService),this._instantiationService.setService(P.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(h.Viewport,function(at){return oe.scrollLines(at,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return oe.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){oe._renderService.onCursorMove(),oe._syncTextArea()})),this.register(this.onResize(function(){return oe._renderService.onResize(oe.cols,oe.rows)})),this.register(this.onBlur(function(){return oe._renderService.onBlur()})),this.register(this.onFocus(function(){return oe._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return oe.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(P.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(at){return oe.scrollLines(at.amount,at.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return oe._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(at){return oe._renderService.onSelectionChanged(at.start,at.end,at.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(at){oe.textarea.value=at,oe.textarea.focus(),oe.textarea.select()})),this.register(this._onScroll.event(function(at){oe.viewport.syncScrollArea(),oe._selectionService.refresh()})),this.register((0,b.addDisposableDomListener)(this._viewportElement,"scroll",function(){return oe._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(S.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return oe._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register((0,b.addDisposableDomListener)(this.element,"mousedown",function(at){return oe._selectionService.onMouseDown(at)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new k.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},q.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(m.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(T.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},q.prototype._setTheme=function(se){var oe,Re,ge;this._theme=se,(oe=this._colorManager)===null||oe===void 0||oe.setTheme(se),(Re=this._renderService)===null||Re===void 0||Re.setColors(this._colorManager.colors),(ge=this.viewport)===null||ge===void 0||ge.onThemeChange(this._colorManager.colors)},q.prototype.bindMouse=function(){var se=this,oe=this,Re=this.element;function ge(_e){var F,K,J=oe._mouseService.getRawByteCoords(_e,oe.screenElement,oe.cols,oe.rows);if(!J)return!1;switch(_e.overrideType||_e.type){case"mousemove":K=32,_e.buttons===void 0?(F=3,_e.button!==void 0&&(F=_e.button<3?_e.button:3)):F=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":K=0,F=_e.button<3?_e.button:3;break;case"mousedown":K=1,F=_e.button<3?_e.button:3;break;case"wheel":_e.deltaY!==0&&(K=_e.deltaY<0?0:1),F=4;break;default:return!1}return!(K===void 0||F===void 0||F>4)&&oe.coreMouseService.triggerMouseEvent({col:J.x-33,row:J.y-33,button:F,action:K,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}var Pe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},at=function(_e){return ge(_e),_e.buttons||(se._document.removeEventListener("mouseup",Pe.mouseup),Pe.mousedrag&&se._document.removeEventListener("mousemove",Pe.mousedrag)),se.cancel(_e)},_t=function(_e){return ge(_e),se.cancel(_e,!0)},qe=function(_e){_e.buttons&&ge(_e)},Et=function(_e){_e.buttons||ge(_e)};this.register(this.coreMouseService.onProtocolChange(function(_e){_e?(se.optionsService.options.logLevel==="debug"&&se._logService.debug("Binding to mouse events:",se.coreMouseService.explainEvents(_e)),se.element.classList.add("enable-mouse-events"),se._selectionService.disable()):(se._logService.debug("Unbinding from mouse events."),se.element.classList.remove("enable-mouse-events"),se._selectionService.enable()),8&_e?Pe.mousemove||(Re.addEventListener("mousemove",Et),Pe.mousemove=Et):(Re.removeEventListener("mousemove",Pe.mousemove),Pe.mousemove=null),16&_e?Pe.wheel||(Re.addEventListener("wheel",_t,{passive:!1}),Pe.wheel=_t):(Re.removeEventListener("wheel",Pe.wheel),Pe.wheel=null),2&_e?Pe.mouseup||(Pe.mouseup=at):(se._document.removeEventListener("mouseup",Pe.mouseup),Pe.mouseup=null),4&_e?Pe.mousedrag||(Pe.mousedrag=qe):(se._document.removeEventListener("mousemove",Pe.mousedrag),Pe.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,b.addDisposableDomListener)(Re,"mousedown",function(_e){if(_e.preventDefault(),se.focus(),se.coreMouseService.areMouseEventsActive&&!se._selectionService.shouldForceSelection(_e))return ge(_e),Pe.mouseup&&se._document.addEventListener("mouseup",Pe.mouseup),Pe.mousedrag&&se._document.addEventListener("mousemove",Pe.mousedrag),se.cancel(_e)})),this.register((0,b.addDisposableDomListener)(Re,"wheel",function(_e){if(!Pe.wheel){if(!se.buffer.hasScrollback){var F=se.viewport.getLinesScrolled(_e);if(F===0)return;for(var K=g.C0.ESC+(se.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B"),J="",we=0;we<Math.abs(F);we++)J+=K;return se.coreService.triggerDataEvent(J,!0),se.cancel(_e,!0)}return se.viewport.onWheel(_e)?se.cancel(_e):void 0}},{passive:!1})),this.register((0,b.addDisposableDomListener)(Re,"touchstart",function(_e){if(!se.coreMouseService.areMouseEventsActive)return se.viewport.onTouchStart(_e),se.cancel(_e)},{passive:!0})),this.register((0,b.addDisposableDomListener)(Re,"touchmove",function(_e){if(!se.coreMouseService.areMouseEventsActive)return se.viewport.onTouchMove(_e)?void 0:se.cancel(_e)},{passive:!1}))},q.prototype.refresh=function(se,oe){var Re;(Re=this._renderService)===null||Re===void 0||Re.refreshRows(se,oe)},q.prototype._queueLinkification=function(se,oe){var Re;(Re=this.linkifier)===null||Re===void 0||Re.linkifyRows(se,oe)},q.prototype.updateCursorStyle=function(se){var oe;((oe=this._selectionService)===null||oe===void 0?void 0:oe.shouldColumnSelect(se))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},q.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},q.prototype.scrollLines=function(se,oe,Re){Re===void 0&&(Re=0),Me.prototype.scrollLines.call(this,se,oe,Re),this.refresh(0,this.rows-1)},q.prototype.paste=function(se){(0,f.paste)(se,this.textarea,this.coreService)},q.prototype.attachCustomKeyEventHandler=function(se){this._customKeyEventHandler=se},q.prototype.registerLinkMatcher=function(se,oe,Re){var ge=this.linkifier.registerLinkMatcher(se,oe,Re);return this.refresh(0,this.rows-1),ge},q.prototype.deregisterLinkMatcher=function(se){this.linkifier.deregisterLinkMatcher(se)&&this.refresh(0,this.rows-1)},q.prototype.registerLinkProvider=function(se){return this.linkifier2.registerLinkProvider(se)},q.prototype.registerCharacterJoiner=function(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var oe=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),oe},q.prototype.deregisterCharacterJoiner=function(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)},Object.defineProperty(q.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),q.prototype.addMarker=function(se){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)},q.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},q.prototype.select=function(se,oe,Re){this._selectionService.setSelection(se,oe,Re)},q.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},q.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},q.prototype.clearSelection=function(){var se;(se=this._selectionService)===null||se===void 0||se.clearSelection()},q.prototype.selectAll=function(){var se;(se=this._selectionService)===null||se===void 0||se.selectAll()},q.prototype.selectLines=function(se,oe){var Re;(Re=this._selectionService)===null||Re===void 0||Re.selectLines(se,oe)},q.prototype._keyDown=function(se){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(!this._compositionHelper.keydown(se))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var oe=(0,D.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){var Re=this.rows-1;return this.scrollLines(oe.type===2?-Re:Re),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==g.C0.ETX&&oe.key!==g.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(se,!0))))},q.prototype._isThirdLevelShift=function(se,oe){var Re=se.isMac&&!this.options.macOptionIsMeta&&oe.altKey&&!oe.ctrlKey&&!oe.metaKey||se.isWindows&&oe.altKey&&oe.ctrlKey&&!oe.metaKey||se.isWindows&&oe.getModifierState("AltGraph");return oe.type==="keypress"?Re:Re&&(!oe.keyCode||oe.keyCode>47)},q.prototype._keyUp=function(se){this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||(function(oe){return oe.keyCode===16||oe.keyCode===17||oe.keyCode===18}(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)},q.prototype._keyPress=function(se){var oe;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)oe=se.charCode;else if(se.which===null||se.which===void 0)oe=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;oe=se.which}return!(!oe||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(oe=String.fromCharCode(oe),this._onKey.fire({key:oe,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},q.prototype._inputEvent=function(se){if(se.data&&se.inputType==="insertText"&&!se.composed&&!this.optionsService.options.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var oe=se.data;return this.coreService.triggerDataEvent(oe,!0),this.cancel(se),!0}return!1},q.prototype.bell=function(){var se;this._soundBell()&&((se=this._soundService)===null||se===void 0||se.playBellSound()),this._onBell.fire()},q.prototype.resize=function(se,oe){se!==this.cols||oe!==this.rows?Me.prototype.resize.call(this,se,oe):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},q.prototype._afterResize=function(se,oe){var Re,ge;(Re=this._charSizeService)===null||Re===void 0||Re.measure(),(ge=this.viewport)===null||ge===void 0||ge.syncScrollArea(!0)},q.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var se=1;se<this.rows;se++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},q.prototype.reset=function(){var se,oe;this.options.rows=this.rows,this.options.cols=this.cols;var Re=this._customKeyEventHandler;this._setup(),Me.prototype.reset.call(this),(se=this._selectionService)===null||se===void 0||se.reset(),this._customKeyEventHandler=Re,this.refresh(0,this.rows-1),(oe=this.viewport)===null||oe===void 0||oe.syncScrollArea()},q.prototype.clearTextureAtlas=function(){var se;(se=this._renderService)===null||se===void 0||se.clearTextureAtlas()},q.prototype._reportFocus=function(){var se;((se=this.element)===null||se===void 0?void 0:se.classList.contains("focus"))?this.coreService.triggerDataEvent(g.C0.ESC+"[I"):this.coreService.triggerDataEvent(g.C0.ESC+"[O")},q.prototype._reportWindowsOptions=function(se){if(this._renderService)switch(se){case p.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var oe=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Re=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[4;"+Re+";"+oe+"t");break;case p.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var ge=this._renderService.dimensions.scaledCellWidth.toFixed(0),Pe=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[6;"+Pe+";"+ge+"t")}},q.prototype.cancel=function(se,oe){if(this.options.cancelEvents||oe)return se.preventDefault(),se.stopPropagation(),!1},q.prototype._visualBell=function(){return!1},q.prototype._soundBell=function(){return this.options.bellStyle==="sound"},q}(X.CoreTerminal);a.Terminal=xe},9924:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0;var l=function(){function c(u,d){d===void 0&&(d=1e3),this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return c.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},c.prototype.refresh=function(u,d,h){var f=this;this._rowCount=h,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;var g=Date.now();if(g-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=g,this._innerRefresh();else if(!this._additionalRefreshRequested){var p=g-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){f._lastRefreshMs=Date.now(),f._innerRefresh(),f._additionalRefreshRequested=!1,f._refreshTimeoutID=void 0},m)}},c.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}},c}();a.TimeBasedDebouncer=l},1680:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(v,y)},function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=v}c(v,y),v.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(v,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,y,b,w);else for(var T=v.length-1;T>=0;T--)(x=v[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(v,y){return function(b,w){y(b,w,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;var f=l(844),g=l(3656),p=l(4725),m=l(2585),_=function(v){function y(b,w,x,S,k,T,D,I){var N=v.call(this)||this;return N._scrollLines=b,N._viewportElement=w,N._scrollArea=x,N._element=S,N._bufferService=k,N._optionsService=T,N._charSizeService=D,N._renderService=I,N.scrollBarWidth=0,N._currentRowHeight=0,N._currentScaledCellHeight=0,N._lastRecordedBufferLength=0,N._lastRecordedViewportHeight=0,N._lastRecordedBufferHeight=0,N._lastTouchY=0,N._lastScrollTop=0,N._lastHadScrollBar=!1,N._wheelPartialScroll=0,N._refreshAnimationFrame=null,N._ignoreNextScrollEvent=!1,N.scrollBarWidth=N._viewportElement.offsetWidth-N._scrollArea.offsetWidth||15,N._lastHadScrollBar=!0,N.register((0,g.addDisposableDomListener)(N._viewportElement,"scroll",N._onScroll.bind(N))),N._activeBuffer=N._bufferService.buffer,N.register(N._bufferService.buffers.onBufferActivate(function(A){return N._activeBuffer=A.activeBuffer})),N._renderDimensions=N._renderService.dimensions,N.register(N._renderService.onDimensionsChange(function(A){return N._renderDimensions=A})),setTimeout(function(){return N.syncScrollArea()},0),N}return u(y,v),y.prototype.onThemeChange=function(b){this._viewportElement.style.backgroundColor=b.background.css},y.prototype._refresh=function(b){var w=this;if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return w._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var b=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==b&&(this._lastRecordedBufferHeight=b,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var w=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==w&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=w),this._optionsService.options.scrollback===0?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var x=window.getComputedStyle(this._element),S=parseInt(x.paddingLeft)+parseInt(x.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?S:0)).toString()+"px",this._refreshAnimationFrame=null},y.prototype.syncScrollArea=function(b){if(b===void 0&&(b=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.options.scrollback>0&&this._refresh(b):this._refresh(b)},y.prototype._onScroll=function(b){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(w)}},y.prototype._bubbleScroll=function(b,w){var x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)},y.prototype.onWheel=function(b){var w=this._getPixelsScrolled(b);return w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))},y.prototype._getPixelsScrolled=function(b){if(b.deltaY===0||b.shiftKey)return 0;var w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?w*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._currentRowHeight*this._bufferService.rows),w},y.prototype.getLinesScrolled=function(b){if(b.deltaY===0||b.shiftKey)return 0;var w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w},y.prototype._applyScrollModifier=function(b,w){var x=this._optionsService.options.fastScrollModifier;return x==="alt"&&w.altKey||x==="ctrl"&&w.ctrlKey||x==="shift"&&w.shiftKey?b*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:b*this._optionsService.options.scrollSensitivity},y.prototype.onTouchStart=function(b){this._lastTouchY=b.touches[0].pageY},y.prototype.onTouchMove=function(b){var w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))},d([h(4,m.IBufferService),h(5,m.IOptionsService),h(6,p.ICharSizeService),h(7,p.IRenderService)],y)}(f.Disposable);a.Viewport=_},2950:function(s,a,l){var c=this&&this.__decorate||function(g,p,m,_){var v,y=arguments.length,b=y<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,m):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,p,m,_);else for(var w=g.length-1;w>=0;w--)(v=g[w])&&(b=(y<3?v(b):y>3?v(p,m,b):v(p,m))||b);return y>3&&b&&Object.defineProperty(p,m,b),b},u=this&&this.__param||function(g,p){return function(m,_){p(m,_,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;var d=l(4725),h=l(2585),f=function(){function g(p,m,_,v,y,b){this._textarea=p,this._compositionView=m,this._bufferService=_,this._optionsService=v,this._coreService=y,this._renderService=b,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(g.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),g.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},g.prototype.compositionupdate=function(p){var m=this;this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout(function(){m._compositionPosition.end=m._textarea.value.length},0)},g.prototype.compositionend=function(){this._finalizeComposition(!0)},g.prototype.keydown=function(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},g.prototype._finalizeComposition=function(p){var m=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){var _={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(m._isSendingComposition){m._isSendingComposition=!1;var y;_.start+=m._dataAlreadySent.length,(y=m._isComposing?m._textarea.value.substring(_.start,_.end):m._textarea.value.substring(_.start)).length>0&&m._coreService.triggerDataEvent(y,!0)}},0)}else{this._isSendingComposition=!1;var v=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(v,!0)}},g.prototype._handleAnyTextareaChanges=function(){var p=this,m=this._textarea.value;setTimeout(function(){if(!p._isComposing){var _=p._textarea.value.replace(m,"");_.length>0&&(p._dataAlreadySent=_,p._coreService.triggerDataEvent(_,!0))}},0)},g.prototype.updateCompositionElements=function(p){var m=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var _=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),v=this._renderService.dimensions.actualCellHeight,y=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,b=_*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=b+"px",this._compositionView.style.top=y+"px",this._compositionView.style.height=v+"px",this._compositionView.style.lineHeight=v+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var w=this._compositionView.getBoundingClientRect();this._textarea.style.left=b+"px",this._textarea.style.top=y+"px",this._textarea.style.width=Math.max(w.width,1)+"px",this._textarea.style.height=Math.max(w.height,1)+"px",this._textarea.style.lineHeight=w.height+"px"}p||setTimeout(function(){return m.updateCompositionElements(!0)},0)}},c([u(2,h.IBufferService),u(3,h.IOptionsService),u(4,h.ICoreService),u(5,d.IRenderService)],g)}();a.CompositionHelper=f},9806:(s,a)=>{function l(c,u){var d=u.getBoundingClientRect();return[c.clientX-d.left,c.clientY-d.top]}Object.defineProperty(a,"__esModule",{value:!0}),a.getRawByteCoords=a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=l,a.getCoords=function(c,u,d,h,f,g,p,m){if(f){var _=l(c,u);if(_)return _[0]=Math.ceil((_[0]+(m?g/2:0))/g),_[1]=Math.ceil(_[1]/p),_[0]=Math.min(Math.max(_[0],1),d+(m?1:0)),_[1]=Math.min(Math.max(_[1],1),h),_}},a.getRawByteCoords=function(c){if(c)return{x:c[0]+32,y:c[1]+32}}},9504:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;var c=l(2584);function u(m,_,v,y){var b=m-d(v,m),w=_-d(v,_),x=Math.abs(b-w)-function(S,k,T){for(var D=0,I=S-d(T,S),N=k-d(T,k),A=0;A<Math.abs(I-N);A++){var $=h(S,k)==="A"?-1:1,P=T.buffer.lines.get(I+$*A);(P==null?void 0:P.isWrapped)&&D++}return D}(m,_,v);return p(x,g(h(m,_),y))}function d(m,_){for(var v=0,y=m.buffer.lines.get(_),b=y==null?void 0:y.isWrapped;b&&_>=0&&_<m.rows;)v++,b=(y=m.buffer.lines.get(--_))==null?void 0:y.isWrapped;return v}function h(m,_){return m>_?"A":"B"}function f(m,_,v,y,b,w){for(var x=m,S=_,k="";x!==v||S!==y;)x+=b?1:-1,b&&x>w.cols-1?(k+=w.buffer.translateBufferLineToString(S,!1,m,x),x=0,m=0,S++):!b&&x<0&&(k+=w.buffer.translateBufferLineToString(S,!1,0,m+1),m=x=w.cols-1,S--);return k+w.buffer.translateBufferLineToString(S,!1,m,x)}function g(m,_){var v=_?"O":"[";return c.C0.ESC+v+m}function p(m,_){m=Math.floor(m);for(var v="",y=0;y<m;y++)v+=_;return v}a.moveToCellSequence=function(m,_,v,y){var b,w=v.buffer.x,x=v.buffer.y;if(!v.buffer.hasScrollback)return function(k,T,D,I,N,A){return u(T,I,N,A).length===0?"":p(f(k,T,k,T-d(N,T),!1,N).length,g("D",A))}(w,x,0,_,v,y)+u(x,_,v,y)+function(k,T,D,I,N,A){var $;$=u(T,I,N,A).length>0?I-d(N,I):T;var P=I,U=function(B,O,W,X,z,te){var re;return re=u(W,X,z,te).length>0?X-d(z,X):O,B<W&&re<=X||B>=W&&re<X?"C":"D"}(k,T,D,I,N,A);return p(f(k,$,D,P,U==="C",N).length,g(U,A))}(w,x,m,_,v,y);if(x===_)return b=w>m?"D":"C",p(Math.abs(w-m),g(b,y));b=x>_?"D":"C";var S=Math.abs(x-_);return p(function(k,T){return T.cols-k}(x>_?m:w,v)+(S-1)*v.cols+1+((x>_?w:m)-1),g(b,y))}},1546:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;var c=l(643),u=l(8803),d=l(1420),h=l(3734),f=l(1752),g=l(4774),p=l(9631),m=l(8978),_=function(){function v(y,b,w,x,S,k,T,D){this._container=y,this._alpha=x,this._colors=S,this._rendererId=k,this._bufferService=T,this._optionsService=D,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+b+"-layer"),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return v.prototype.dispose=function(){var y;(0,p.removeElementFromParent)(this._canvas),(y=this._charAtlas)===null||y===void 0||y.dispose()},v.prototype._initCanvas=function(){this._ctx=(0,f.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},v.prototype.onOptionsChanged=function(){},v.prototype.onBlur=function(){},v.prototype.onFocus=function(){},v.prototype.onCursorMove=function(){},v.prototype.onGridChanged=function(y,b){},v.prototype.onSelectionChanged=function(y,b,w){},v.prototype.setColors=function(y){this._refreshCharAtlas(y)},v.prototype._setTransparency=function(y){if(y!==this._alpha){var b=this._canvas;this._alpha=y,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,b),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},v.prototype._refreshCharAtlas=function(y){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,d.acquireCharAtlas)(this._optionsService.options,this._rendererId,y,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},v.prototype.resize=function(y){this._scaledCellWidth=y.scaledCellWidth,this._scaledCellHeight=y.scaledCellHeight,this._scaledCharWidth=y.scaledCharWidth,this._scaledCharHeight=y.scaledCharHeight,this._scaledCharLeft=y.scaledCharLeft,this._scaledCharTop=y.scaledCharTop,this._canvas.width=y.scaledCanvasWidth,this._canvas.height=y.scaledCanvasHeight,this._canvas.style.width=y.canvasWidth+"px",this._canvas.style.height=y.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},v.prototype.clearTextureAtlas=function(){var y;(y=this._charAtlas)===null||y===void 0||y.clear()},v.prototype._fillCells=function(y,b,w,x){this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight)},v.prototype._fillMiddleLineAtCells=function(y,b,w){w===void 0&&(w=1);var x=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(y*this._scaledCellWidth,(b+1)*this._scaledCellHeight-x-window.devicePixelRatio,w*this._scaledCellWidth,window.devicePixelRatio)},v.prototype._fillBottomLineAtCells=function(y,b,w){w===void 0&&(w=1),this._ctx.fillRect(y*this._scaledCellWidth,(b+1)*this._scaledCellHeight-window.devicePixelRatio-1,w*this._scaledCellWidth,window.devicePixelRatio)},v.prototype._fillLeftLineAtCell=function(y,b,w){this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,window.devicePixelRatio*w,this._scaledCellHeight)},v.prototype._strokeRectAtCell=function(y,b,w,x){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(y*this._scaledCellWidth+window.devicePixelRatio/2,b*this._scaledCellHeight+window.devicePixelRatio/2,w*this._scaledCellWidth-window.devicePixelRatio,x*this._scaledCellHeight-window.devicePixelRatio)},v.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},v.prototype._clearCells=function(y,b,w,x){this._alpha?this._ctx.clearRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight))},v.prototype._fillCharTrueColor=function(y,b,w){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(w);var x=!1;this._optionsService.options.customGlyphs!==!1&&(x=(0,m.tryDrawCustomChar)(this._ctx,y.getChars(),b*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),x||this._ctx.fillText(y.getChars(),b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},v.prototype._drawChars=function(y,b,w){var x,S,k,T=this._getContrastColor(y);T||y.isFgRGB()||y.isBgRGB()?this._drawUncachedChars(y,b,w,T):(y.isInverse()?(S=y.isBgDefault()?u.INVERTED_DEFAULT_COLOR:y.getBgColor(),k=y.isFgDefault()?u.INVERTED_DEFAULT_COLOR:y.getFgColor()):(k=y.isBgDefault()?c.DEFAULT_COLOR:y.getBgColor(),S=y.isFgDefault()?c.DEFAULT_COLOR:y.getFgColor()),S+=this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&S<8?8:0,this._currentGlyphIdentifier.chars=y.getChars()||c.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=y.getCode()||c.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=k,this._currentGlyphIdentifier.fg=S,this._currentGlyphIdentifier.bold=!!y.isBold(),this._currentGlyphIdentifier.dim=!!y.isDim(),this._currentGlyphIdentifier.italic=!!y.isItalic(),((x=this._charAtlas)===null||x===void 0?void 0:x.draw(this._ctx,this._currentGlyphIdentifier,b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(y,b,w))},v.prototype._drawUncachedChars=function(y,b,w,x){if(this._ctx.save(),this._ctx.font=this._getFont(!!y.isBold(),!!y.isItalic()),this._ctx.textBaseline=u.TEXT_BASELINE,y.isInverse())if(x)this._ctx.fillStyle=x.css;else if(y.isBgDefault())this._ctx.fillStyle=g.color.opaque(this._colors.background).css;else if(y.isBgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(y.getBgColor()).join(",")+")";else{var S=y.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&S<8&&(S+=8),this._ctx.fillStyle=this._colors.ansi[S].css}else if(x)this._ctx.fillStyle=x.css;else if(y.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(y.isFgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(y.getFgColor()).join(",")+")";else{var k=y.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&k<8&&(k+=8),this._ctx.fillStyle=this._colors.ansi[k].css}this._clipRow(w),y.isDim()&&(this._ctx.globalAlpha=u.DIM_OPACITY);var T=!1;this._optionsService.options.customGlyphs!==!1&&(T=(0,m.tryDrawCustomChar)(this._ctx,y.getChars(),b*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),T||this._ctx.fillText(y.getChars(),b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},v.prototype._clipRow=function(y){this._ctx.beginPath(),this._ctx.rect(0,y*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},v.prototype._getFont=function(y,b){return(b?"italic":"")+" "+(y?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},v.prototype._getContrastColor=function(y){if(this._optionsService.options.minimumContrastRatio!==1){var b=this._colors.contrastCache.getColor(y.bg,y.fg);if(b!==void 0)return b||void 0;var w=y.getFgColor(),x=y.getFgColorMode(),S=y.getBgColor(),k=y.getBgColorMode(),T=!!y.isInverse(),D=!!y.isInverse();if(T){var I=w;w=S,S=I;var N=x;x=k,k=N}var A=this._resolveBackgroundRgba(k,S,T),$=this._resolveForegroundRgba(x,w,T,D),P=g.rgba.ensureContrastRatio(A,$,this._optionsService.options.minimumContrastRatio);if(P){var U={css:g.channels.toCss(P>>24&255,P>>16&255,P>>8&255),rgba:P};return this._colors.contrastCache.setColor(y.bg,y.fg,U),U}this._colors.contrastCache.setColor(y.bg,y.fg,null)}},v.prototype._resolveBackgroundRgba=function(y,b,w){switch(y){case 16777216:case 33554432:return this._colors.ansi[b].rgba;case 50331648:return b<<8;default:return w?this._colors.foreground.rgba:this._colors.background.rgba}},v.prototype._resolveForegroundRgba=function(y,b,w,x){switch(y){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&x&&b<8&&(b+=8),this._colors.ansi[b].rgba;case 50331648:return b<<8;default:return w?this._colors.background.rgba:this._colors.foreground.rgba}},v}();a.BaseRenderLayer=_},2512:function(s,a,l){var c,u=this&&this.__extends||(c=function(b,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&(x[k]=S[k])},c(b,w)},function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function x(){this.constructor=b}c(b,w),b.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}),d=this&&this.__decorate||function(b,w,x,S){var k,T=arguments.length,D=T<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,w,x,S);else for(var I=b.length-1;I>=0;I--)(k=b[I])&&(D=(T<3?k(D):T>3?k(w,x,D):k(w,x))||D);return T>3&&D&&Object.defineProperty(w,x,D),D},h=this&&this.__param||function(b,w){return function(x,S){w(x,S,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;var f=l(1546),g=l(511),p=l(2585),m=l(4725),_=600,v=function(b){function w(x,S,k,T,D,I,N,A,$){var P=b.call(this,x,"cursor",S,!0,k,T,I,N)||this;return P._onRequestRedraw=D,P._coreService=A,P._coreBrowserService=$,P._cell=new g.CellData,P._state={x:0,y:0,isFocused:!1,style:"",width:0},P._cursorRenderers={bar:P._renderBarCursor.bind(P),block:P._renderBlockCursor.bind(P),underline:P._renderUnderlineCursor.bind(P)},P}return u(w,b),w.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),b.prototype.dispose.call(this)},w.prototype.resize=function(x){b.prototype.resize.call(this,x),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},w.prototype.reset=function(){var x;this._clearCursor(),(x=this._cursorBlinkStateManager)===null||x===void 0||x.restartBlinkAnimation(),this.onOptionsChanged()},w.prototype.onBlur=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onFocus=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onOptionsChanged=function(){var x,S=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new y(this._coreBrowserService.isFocused,function(){S._render(!0)})):((x=this._cursorBlinkStateManager)===null||x===void 0||x.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onCursorMove=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.restartBlinkAnimation()},w.prototype.onGridChanged=function(x,S){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},w.prototype._render=function(x){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var S=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=S-this._bufferService.buffer.ydisp;if(k<0||k>=this._bufferService.rows)this._clearCursor();else{var T=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(S).loadCell(T,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var D=this._optionsService.options.cursorStyle;return D&&D!=="block"?this._cursorRenderers[D](T,k,this._cell):this._renderBlurCursor(T,k,this._cell),this._ctx.restore(),this._state.x=T,this._state.y=k,this._state.isFocused=!1,this._state.style=D,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===T&&this._state.y===k&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](T,k,this._cell),this._ctx.restore(),this._state.x=T,this._state.y=k,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},w.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},w.prototype._renderBarCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(x,S,this._optionsService.options.cursorWidth),this._ctx.restore()},w.prototype._renderBlockCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(x,S,k.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(k,x,S),this._ctx.restore()},w.prototype._renderUnderlineCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(x,S),this._ctx.restore()},w.prototype._renderBlurCursor=function(x,S,k){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(x,S,k.getWidth(),1),this._ctx.restore()},d([h(5,p.IBufferService),h(6,p.IOptionsService),h(7,p.ICoreService),h(8,m.ICoreBrowserService)],w)}(f.BaseRenderLayer);a.CursorRenderLayer=v;var y=function(){function b(w,x){this._renderCallback=x,this.isCursorVisible=!0,w&&this._restartInterval()}return Object.defineProperty(b.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.restartBlinkAnimation=function(){var w=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){w._renderCallback(),w._animationFrame=void 0})))},b.prototype._restartInterval=function(w){var x=this;w===void 0&&(w=_),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(x._animationTimeRestarted){var S=_-(Date.now()-x._animationTimeRestarted);if(x._animationTimeRestarted=void 0,S>0)return void x._restartInterval(S)}x.isCursorVisible=!1,x._animationFrame=window.requestAnimationFrame(function(){x._renderCallback(),x._animationFrame=void 0}),x._blinkInterval=window.setInterval(function(){if(x._animationTimeRestarted){var k=_-(Date.now()-x._animationTimeRestarted);return x._animationTimeRestarted=void 0,void x._restartInterval(k)}x.isCursorVisible=!x.isCursorVisible,x._animationFrame=window.requestAnimationFrame(function(){x._renderCallback(),x._animationFrame=void 0})},_)},w)},b.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},b}()},8978:(s,a,l)=>{var c,u,d,h,f,g,p,m,_,v,y,b,w,x,S,k,T,D,I,N,A,$,P,U,B,O,W,X,z,te,re,pe,xe,Me,q,se,oe,Re,ge,Pe,at,_t,qe,Et,_e,F,K,J,we,ke,ye,He,We,dt,Tt,$t,pn,ln,fe,Be,It,jt,Yn,lo,Es,_a,co,Tr,va,Dr,qo,ba,ya,en,Ko,V,j,le,Y,ie,ce,Q,ve,Fe,Oe,it,ht,wt,Nt,Ut,xt,Xi,Ln,uo,kc,Ir,el,Ig,tl,Xh,Rg,Ng,ib,rb,ob,$w,Ww,Hw,Vw,sb,ab,lb,cb,iD,zw,Xm,Uw,rD,jw,qw,ub,oD,Kw,db,hb,Qh,Gw,Yw;Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;var c5=l(1752);a.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:9,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var u5={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"\u2500":(c={},c[1]="M0,.5 L1,.5",c),"\u2501":(u={},u[3]="M0,.5 L1,.5",u),"\u2502":(d={},d[1]="M.5,0 L.5,1",d),"\u2503":(h={},h[3]="M.5,0 L.5,1",h),"\u250C":(f={},f[1]="M0.5,1 L.5,.5 L1,.5",f),"\u250F":(g={},g[3]="M0.5,1 L.5,.5 L1,.5",g),"\u2510":(p={},p[1]="M0,.5 L.5,.5 L.5,1",p),"\u2513":(m={},m[3]="M0,.5 L.5,.5 L.5,1",m),"\u2514":(_={},_[1]="M.5,0 L.5,.5 L1,.5",_),"\u2517":(v={},v[3]="M.5,0 L.5,.5 L1,.5",v),"\u2518":(y={},y[1]="M.5,0 L.5,.5 L0,.5",y),"\u251B":(b={},b[3]="M.5,0 L.5,.5 L0,.5",b),"\u251C":(w={},w[1]="M.5,0 L.5,1 M.5,.5 L1,.5",w),"\u2523":(x={},x[3]="M.5,0 L.5,1 M.5,.5 L1,.5",x),"\u2524":(S={},S[1]="M.5,0 L.5,1 M.5,.5 L0,.5",S),"\u252B":(k={},k[3]="M.5,0 L.5,1 M.5,.5 L0,.5",k),"\u252C":(T={},T[1]="M0,.5 L1,.5 M.5,.5 L.5,1",T),"\u2533":(D={},D[3]="M0,.5 L1,.5 M.5,.5 L.5,1",D),"\u2534":(I={},I[1]="M0,.5 L1,.5 M.5,.5 L.5,0",I),"\u253B":(N={},N[3]="M0,.5 L1,.5 M.5,.5 L.5,0",N),"\u253C":(A={},A[1]="M0,.5 L1,.5 M.5,0 L.5,1",A),"\u254B":($={},$[3]="M0,.5 L1,.5 M.5,0 L.5,1",$),"\u2574":(P={},P[1]="M.5,.5 L0,.5",P),"\u2578":(U={},U[3]="M.5,.5 L0,.5",U),"\u2575":(B={},B[1]="M.5,.5 L.5,0",B),"\u2579":(O={},O[3]="M.5,.5 L.5,0",O),"\u2576":(W={},W[1]="M.5,.5 L1,.5",W),"\u257A":(X={},X[3]="M.5,.5 L1,.5",X),"\u2577":(z={},z[1]="M.5,.5 L.5,1",z),"\u257B":(te={},te[3]="M.5,.5 L.5,1",te),"\u2550":(re={},re[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},re),"\u2551":(pe={},pe[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},pe),"\u2552":(xe={},xe[1]=function(et,je){return"M.5,1 L.5,"+(.5-je)+" L1,"+(.5-je)+" M.5,"+(.5+je)+" L1,"+(.5+je)},xe),"\u2553":(Me={},Me[1]=function(et,je){return"M"+(.5-et)+",1 L"+(.5-et)+",.5 L1,.5 M"+(.5+et)+",.5 L"+(.5+et)+",1"},Me),"\u2554":(q={},q[1]=function(et,je){return"M1,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1"},q),"\u2555":(se={},se[1]=function(et,je){return"M0,"+(.5-je)+" L.5,"+(.5-je)+" L.5,1 M0,"+(.5+je)+" L.5,"+(.5+je)},se),"\u2556":(oe={},oe[1]=function(et,je){return"M"+(.5+et)+",1 L"+(.5+et)+",.5 L0,.5 M"+(.5-et)+",.5 L"+(.5-et)+",1"},oe),"\u2557":(Re={},Re[1]=function(et,je){return"M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M0,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",1"},Re),"\u2558":(ge={},ge[1]=function(et,je){return"M.5,0 L.5,"+(.5+je)+" L1,"+(.5+je)+" M.5,"+(.5-je)+" L1,"+(.5-je)},ge),"\u2559":(Pe={},Pe[1]=function(et,je){return"M1,.5 L"+(.5-et)+",.5 L"+(.5-et)+",0 M"+(.5+et)+",.5 L"+(.5+et)+",0"},Pe),"\u255A":(at={},at[1]=function(et,je){return"M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0 M1,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",0"},at),"\u255B":(_t={},_t[1]=function(et,je){return"M0,"+(.5+je)+" L.5,"+(.5+je)+" L.5,0 M0,"+(.5-je)+" L.5,"+(.5-je)},_t),"\u255C":(qe={},qe[1]=function(et,je){return"M0,.5 L"+(.5+et)+",.5 L"+(.5+et)+",0 M"+(.5-et)+",.5 L"+(.5-et)+",0"},qe),"\u255D":(Et={},Et[1]=function(et,je){return"M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M0,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",0"},Et),"\u255E":(_e={},_e[1]=function(et,je){return"M.5,0 L.5,1 M.5,"+(.5-je)+" L1,"+(.5-je)+" M.5,"+(.5+je)+" L1,"+(.5+je)},_e),"\u255F":(F={},F[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1 M"+(.5+et)+",.5 L1,.5"},F),"\u2560":(K={},K[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},K),"\u2561":(J={},J[1]=function(et,je){return"M.5,0 L.5,1 M0,"+(.5-je)+" L.5,"+(.5-je)+" M0,"+(.5+je)+" L.5,"+(.5+je)},J),"\u2562":(we={},we[1]=function(et,je){return"M0,.5 L"+(.5-et)+",.5 M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},we),"\u2563":(ke={},ke[1]=function(et,je){return"M"+(.5+et)+",0 L"+(.5+et)+",1 M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0"},ke),"\u2564":(ye={},ye[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)+" M.5,"+(.5+je)+" L.5,1"},ye),"\u2565":(He={},He[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",.5 L"+(.5-et)+",1 M"+(.5+et)+",.5 L"+(.5+et)+",1"},He),"\u2566":(We={},We[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1"},We),"\u2567":(dt={},dt[1]=function(et,je){return"M.5,0 L.5,"+(.5-je)+" M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},dt),"\u2568":(Tt={},Tt[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",.5 L"+(.5-et)+",0 M"+(.5+et)+",.5 L"+(.5+et)+",0"},Tt),"\u2569":($t={},$t[1]=function(et,je){return"M0,"+(.5+je)+" L1,"+(.5+je)+" M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},$t),"\u256A":(pn={},pn[1]=function(et,je){return"M.5,0 L.5,1 M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},pn),"\u256B":(ln={},ln[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},ln),"\u256C":(fe={},fe[1]=function(et,je){return"M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1 M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},fe),"\u2571":(Be={},Be[1]="M1,0 L0,1",Be),"\u2572":(It={},It[1]="M0,0 L1,1",It),"\u2573":(jt={},jt[1]="M1,0 L0,1 M0,0 L1,1",jt),"\u257C":(Yn={},Yn[1]="M.5,.5 L0,.5",Yn[3]="M.5,.5 L1,.5",Yn),"\u257D":(lo={},lo[1]="M.5,.5 L.5,0",lo[3]="M.5,.5 L.5,1",lo),"\u257E":(Es={},Es[1]="M.5,.5 L1,.5",Es[3]="M.5,.5 L0,.5",Es),"\u257F":(_a={},_a[1]="M.5,.5 L.5,1",_a[3]="M.5,.5 L.5,0",_a),"\u250D":(co={},co[1]="M.5,.5 L.5,1",co[3]="M.5,.5 L1,.5",co),"\u250E":(Tr={},Tr[1]="M.5,.5 L1,.5",Tr[3]="M.5,.5 L.5,1",Tr),"\u2511":(va={},va[1]="M.5,.5 L.5,1",va[3]="M.5,.5 L0,.5",va),"\u2512":(Dr={},Dr[1]="M.5,.5 L0,.5",Dr[3]="M.5,.5 L.5,1",Dr),"\u2515":(qo={},qo[1]="M.5,.5 L.5,0",qo[3]="M.5,.5 L1,.5",qo),"\u2516":(ba={},ba[1]="M.5,.5 L1,.5",ba[3]="M.5,.5 L.5,0",ba),"\u2519":(ya={},ya[1]="M.5,.5 L.5,0",ya[3]="M.5,.5 L0,.5",ya),"\u251A":(en={},en[1]="M.5,.5 L0,.5",en[3]="M.5,.5 L.5,0",en),"\u251D":(Ko={},Ko[1]="M.5,0 L.5,1",Ko[3]="M.5,.5 L1,.5",Ko),"\u251E":(V={},V[1]="M0.5,1 L.5,.5 L1,.5",V[3]="M.5,.5 L.5,0",V),"\u251F":(j={},j[1]="M.5,0 L.5,.5 L1,.5",j[3]="M.5,.5 L.5,1",j),"\u2520":(le={},le[1]="M.5,.5 L1,.5",le[3]="M.5,0 L.5,1",le),"\u2521":(Y={},Y[1]="M.5,.5 L.5,1",Y[3]="M.5,0 L.5,.5 L1,.5",Y),"\u2522":(ie={},ie[1]="M.5,.5 L.5,0",ie[3]="M0.5,1 L.5,.5 L1,.5",ie),"\u2525":(ce={},ce[1]="M.5,0 L.5,1",ce[3]="M.5,.5 L0,.5",ce),"\u2526":(Q={},Q[1]="M0,.5 L.5,.5 L.5,1",Q[3]="M.5,.5 L.5,0",Q),"\u2527":(ve={},ve[1]="M.5,0 L.5,.5 L0,.5",ve[3]="M.5,.5 L.5,1",ve),"\u2528":(Fe={},Fe[1]="M.5,.5 L0,.5",Fe[3]="M.5,0 L.5,1",Fe),"\u2529":(Oe={},Oe[1]="M.5,.5 L.5,1",Oe[3]="M.5,0 L.5,.5 L0,.5",Oe),"\u252A":(it={},it[1]="M.5,.5 L.5,0",it[3]="M0,.5 L.5,.5 L.5,1",it),"\u252D":(ht={},ht[1]="M0.5,1 L.5,.5 L1,.5",ht[3]="M.5,.5 L0,.5",ht),"\u252E":(wt={},wt[1]="M0,.5 L.5,.5 L.5,1",wt[3]="M.5,.5 L1,.5",wt),"\u252F":(Nt={},Nt[1]="M.5,.5 L.5,1",Nt[3]="M0,.5 L1,.5",Nt),"\u2530":(Ut={},Ut[1]="M0,.5 L1,.5",Ut[3]="M.5,.5 L.5,1",Ut),"\u2531":(xt={},xt[1]="M.5,.5 L1,.5",xt[3]="M0,.5 L.5,.5 L.5,1",xt),"\u2532":(Xi={},Xi[1]="M.5,.5 L0,.5",Xi[3]="M0.5,1 L.5,.5 L1,.5",Xi),"\u2535":(Ln={},Ln[1]="M.5,0 L.5,.5 L1,.5",Ln[3]="M.5,.5 L0,.5",Ln),"\u2536":(uo={},uo[1]="M.5,0 L.5,.5 L0,.5",uo[3]="M.5,.5 L1,.5",uo),"\u2537":(kc={},kc[1]="M.5,.5 L.5,0",kc[3]="M0,.5 L1,.5",kc),"\u2538":(Ir={},Ir[1]="M0,.5 L1,.5",Ir[3]="M.5,.5 L.5,0",Ir),"\u2539":(el={},el[1]="M.5,.5 L1,.5",el[3]="M.5,0 L.5,.5 L0,.5",el),"\u253A":(Ig={},Ig[1]="M.5,.5 L0,.5",Ig[3]="M.5,0 L.5,.5 L1,.5",Ig),"\u253D":(tl={},tl[1]="M.5,0 L.5,1 M.5,.5 L1,.5",tl[3]="M.5,.5 L0,.5",tl),"\u253E":(Xh={},Xh[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Xh[3]="M.5,.5 L1,.5",Xh),"\u253F":(Rg={},Rg[1]="M.5,0 L.5,1",Rg[3]="M0,.5 L1,.5",Rg),"\u2540":(Ng={},Ng[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ng[3]="M.5,.5 L.5,0",Ng),"\u2541":(ib={},ib[1]="M.5,.5 L.5,0 M0,.5 L1,.5",ib[3]="M.5,.5 L.5,1",ib),"\u2542":(rb={},rb[1]="M0,.5 L1,.5",rb[3]="M.5,0 L.5,1",rb),"\u2543":(ob={},ob[1]="M0.5,1 L.5,.5 L1,.5",ob[3]="M.5,0 L.5,.5 L0,.5",ob),"\u2544":($w={},$w[1]="M0,.5 L.5,.5 L.5,1",$w[3]="M.5,0 L.5,.5 L1,.5",$w),"\u2545":(Ww={},Ww[1]="M.5,0 L.5,.5 L1,.5",Ww[3]="M0,.5 L.5,.5 L.5,1",Ww),"\u2546":(Hw={},Hw[1]="M.5,0 L.5,.5 L0,.5",Hw[3]="M0.5,1 L.5,.5 L1,.5",Hw),"\u2547":(Vw={},Vw[1]="M.5,.5 L.5,1",Vw[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Vw),"\u2548":(sb={},sb[1]="M.5,.5 L.5,0",sb[3]="M0,.5 L1,.5 M.5,.5 L.5,1",sb),"\u2549":(ab={},ab[1]="M.5,.5 L1,.5",ab[3]="M.5,0 L.5,1 M.5,.5 L0,.5",ab),"\u254A":(lb={},lb[1]="M.5,.5 L0,.5",lb[3]="M.5,0 L.5,1 M.5,.5 L1,.5",lb),"\u254C":(cb={},cb[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",cb),"\u254D":(iD={},iD[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",iD),"\u2504":(zw={},zw[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",zw),"\u2505":(Xm={},Xm[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Xm),"\u2508":(Uw={},Uw[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",Uw),"\u2509":(rD={},rD[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",rD),"\u254E":(jw={},jw[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",jw),"\u254F":(qw={},qw[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",qw),"\u2506":(ub={},ub[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",ub),"\u2507":(oD={},oD[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",oD),"\u250A":(Kw={},Kw[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Kw),"\u250B":(db={},db[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",db),"\u256D":(hb={},hb[1]="C.5,1,.5,.5,1,.5",hb),"\u256E":(Qh={},Qh[1]="C.5,1,.5,.5,0,.5",Qh),"\u256F":(Gw={},Gw[1]="C.5,0,.5,.5,0,.5",Gw),"\u2570":(Yw={},Yw[1]="C.5,0,.5,.5,1,.5",Yw)},a.tryDrawCustomChar=function(et,je,Ec,fb,gb,Go){var pu=a.blockElementDefinitions[je];if(pu)return function(Ca,mu,mb,_b,Si,vi){for(var Bl=0;Bl<mu.length;Bl++){var nl=mu[Bl],ho=Si/8,Cd=vi/8;Ca.fillRect(mb+nl.x*ho,_b+nl.y*Cd,nl.w*ho,nl.h*Cd)}}(et,pu,Ec,fb,gb,Go),!0;var Fl=u5[je];if(Fl)return function(Ca,mu,mb,_b,Si,vi){var Bl,nl=sD.get(mu);nl||(nl=new Map,sD.set(mu,nl));var ho=Ca.fillStyle;if(typeof ho!="string")throw new Error('Unexpected fillStyle type "'+ho+'"');var Cd=nl.get(ho);if(!Cd){var Lc=mu[0].length,Ag=mu.length,Jh=document.createElement("canvas");Jh.width=Lc,Jh.height=Ag;var Zw=(0,c5.throwIfFalsy)(Jh.getContext("2d")),hr=new ImageData(Lc,Ag),ef=void 0,il=void 0,Xw=void 0,vb=void 0;if(ho.startsWith("#"))ef=parseInt(ho.substr(1,2),16),il=parseInt(ho.substr(3,2),16),Xw=parseInt(ho.substr(5,2),16),vb=ho.length>7&&parseInt(ho.substr(7,2),16)||1;else{if(!ho.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+ho+'" when drawing pattern glyph');ef=(Bl=ho.substring(5,ho.length-1).split(",").map(function(h5){return parseFloat(h5)}))[0],il=Bl[1],Xw=Bl[2],vb=Bl[3]}for(var Yo=0;Yo<Ag;Yo++)for(var tf=0;tf<Lc;tf++)hr.data[4*(Yo*Lc+tf)]=ef,hr.data[4*(Yo*Lc+tf)+1]=il,hr.data[4*(Yo*Lc+tf)+2]=Xw,hr.data[4*(Yo*Lc+tf)+3]=mu[Yo][tf]*(255*vb);Zw.putImageData(hr,0,0),Cd=(0,c5.throwIfFalsy)(Ca.createPattern(Jh,null)),nl.set(ho,Cd)}Ca.fillStyle=Cd,Ca.fillRect(mb,_b,Si,vi)}(et,Fl,Ec,fb,gb,Go),!0;var pb=a.boxDrawingDefinitions[je];return!!pb&&(function(Ca,mu,mb,_b,Si,vi){Ca.strokeStyle=Ca.fillStyle;for(var Bl=0,nl=Object.entries(mu);Bl<nl.length;Bl++){var ho=nl[Bl],Cd=ho[0],Lc=ho[1];Ca.beginPath(),Ca.lineWidth=window.devicePixelRatio*Number.parseInt(Cd);for(var Ag=0,Jh=(typeof Lc=="function"?Lc(.15,.15/vi*Si):Lc).split(" ");Ag<Jh.length;Ag++){var Zw=Jh[Ag],hr=Zw[0],ef=d5[hr];if(ef){var il=Zw.substring(1).split(",");il[0]&&il[1]&&ef(Ca,dY(il,Si,vi,mb,_b))}else console.error('Could not find drawing instructions for "'+hr+'"')}Ca.stroke(),Ca.closePath()}}(et,pb,Ec,fb,gb,Go),!0)};var sD=new Map;function aD(et,je,Ec){return Ec===void 0&&(Ec=0),Math.max(Math.min(et,je),Ec)}var d5={C:function(et,je){return et.bezierCurveTo(je[0],je[1],je[2],je[3],je[4],je[5])},L:function(et,je){return et.lineTo(je[0],je[1])},M:function(et,je){return et.moveTo(je[0],je[1])}};function dY(et,je,Ec,fb,gb){var Go=et.map(function(pb){return parseFloat(pb)||parseInt(pb)});if(Go.length<2)throw new Error("Too few arguments for instruction");for(var pu=0;pu<Go.length;pu+=2)Go[pu]*=je,Go[pu]!==0&&(Go[pu]=aD(Math.round(Go[pu]+.5)-.5,je,0)),Go[pu]+=fb;for(var Fl=1;Fl<Go.length;Fl+=2)Go[Fl]*=Ec,Go[Fl]!==0&&(Go[Fl]=aD(Math.round(Go[Fl]+.5)-.5,Ec,0)),Go[Fl]+=gb;return Go}},3700:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0;var l=function(){function c(){this.cache=[]}return c.prototype.resize=function(u,d){for(var h=0;h<u;h++){this.cache.length<=h&&this.cache.push([]);for(var f=this.cache[h].length;f<d;f++)this.cache[h].push(void 0);this.cache[h].length=d}this.cache.length=u},c.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0},c}();a.GridCache=l},5098:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(v,y)},function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=v}c(v,y),v.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(v,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(v,y,b,w);else for(var T=v.length-1;T>=0;T--)(x=v[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(v,y){return function(b,w){y(b,w,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;var f=l(1546),g=l(8803),p=l(2040),m=l(2585),_=function(v){function y(b,w,x,S,k,T,D,I){var N=v.call(this,b,"link",w,!0,x,S,D,I)||this;return k.onShowLinkUnderline(function(A){return N._onShowLinkUnderline(A)}),k.onHideLinkUnderline(function(A){return N._onHideLinkUnderline(A)}),T.onShowLinkUnderline(function(A){return N._onShowLinkUnderline(A)}),T.onHideLinkUnderline(function(A){return N._onHideLinkUnderline(A)}),N}return u(y,v),y.prototype.resize=function(b){v.prototype.resize.call(this,b),this._state=void 0},y.prototype.reset=function(){this._clearCurrentLink()},y.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},y.prototype._onShowLinkUnderline=function(b){if(b.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:b.fg&&(0,p.is256Color)(b.fg)?this._ctx.fillStyle=this._colors.ansi[b.fg].css:this._ctx.fillStyle=this._colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(var w=b.y1+1;w<b.y2;w++)this._fillBottomLineAtCells(0,w,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b},y.prototype._onHideLinkUnderline=function(b){this._clearCurrentLink()},d([h(6,m.IBufferService),h(7,m.IOptionsService)],y)}(f.BaseRenderLayer);a.LinkRenderLayer=_},3525:function(s,a,l){var c,u=this&&this.__extends||(c=function(k,T){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,I){D.__proto__=I}||function(D,I){for(var N in I)Object.prototype.hasOwnProperty.call(I,N)&&(D[N]=I[N])},c(k,T)},function(k,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function D(){this.constructor=k}c(k,T),k.prototype=T===null?Object.create(T):(D.prototype=T.prototype,new D)}),d=this&&this.__decorate||function(k,T,D,I){var N,A=arguments.length,$=A<3?T:I===null?I=Object.getOwnPropertyDescriptor(T,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(k,T,D,I);else for(var P=k.length-1;P>=0;P--)(N=k[P])&&($=(A<3?N($):A>3?N(T,D,$):N(T,D))||$);return A>3&&$&&Object.defineProperty(T,D,$),$},h=this&&this.__param||function(k,T){return function(D,I){T(D,I,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Renderer=void 0;var f=l(9596),g=l(4149),p=l(2512),m=l(5098),_=l(844),v=l(4725),y=l(2585),b=l(1420),w=l(8460),x=1,S=function(k){function T(D,I,N,A,$,P,U,B){var O=k.call(this)||this;O._colors=D,O._screenElement=I,O._bufferService=P,O._charSizeService=U,O._optionsService=B,O._id=x++,O._onRequestRedraw=new w.EventEmitter;var W=O._optionsService.options.allowTransparency;return O._renderLayers=[$.createInstance(f.TextRenderLayer,O._screenElement,0,O._colors,W,O._id),$.createInstance(g.SelectionRenderLayer,O._screenElement,1,O._colors,O._id),$.createInstance(m.LinkRenderLayer,O._screenElement,2,O._colors,O._id,N,A),$.createInstance(p.CursorRenderLayer,O._screenElement,3,O._colors,O._id,O._onRequestRedraw)],O.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},O._devicePixelRatio=window.devicePixelRatio,O._updateDimensions(),O.onOptionsChanged(),O}return u(T,k),Object.defineProperty(T.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),T.prototype.dispose=function(){for(var D=0,I=this._renderLayers;D<I.length;D++)I[D].dispose();k.prototype.dispose.call(this),(0,b.removeTerminalFromCache)(this._id)},T.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},T.prototype.setColors=function(D){this._colors=D;for(var I=0,N=this._renderLayers;I<N.length;I++){var A=N[I];A.setColors(this._colors),A.reset()}},T.prototype.onResize=function(D,I){this._updateDimensions();for(var N=0,A=this._renderLayers;N<A.length;N++)A[N].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},T.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},T.prototype.onBlur=function(){this._runOperation(function(D){return D.onBlur()})},T.prototype.onFocus=function(){this._runOperation(function(D){return D.onFocus()})},T.prototype.onSelectionChanged=function(D,I,N){N===void 0&&(N=!1),this._runOperation(function(A){return A.onSelectionChanged(D,I,N)})},T.prototype.onCursorMove=function(){this._runOperation(function(D){return D.onCursorMove()})},T.prototype.onOptionsChanged=function(){this._runOperation(function(D){return D.onOptionsChanged()})},T.prototype.clear=function(){this._runOperation(function(D){return D.reset()})},T.prototype._runOperation=function(D){for(var I=0,N=this._renderLayers;I<N.length;I++)D(N[I])},T.prototype.renderRows=function(D,I){for(var N=0,A=this._renderLayers;N<A.length;N++)A[N].onGridChanged(D,I)},T.prototype.clearTextureAtlas=function(){for(var D=0,I=this._renderLayers;D<I.length;D++)I[D].clearTextureAtlas()},T.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},d([h(4,y.IInstantiationService),h(5,y.IBufferService),h(6,v.ICharSizeService),h(7,y.IOptionsService)],T)}(_.Disposable);a.Renderer=S},1752:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.throwIfFalsy=void 0,a.throwIfFalsy=function(l){if(!l)throw new Error("value must not be falsy");return l}},4149:function(s,a,l){var c,u=this&&this.__extends||(c=function(m,_){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(v[b]=y[b])},c(m,_)},function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function v(){this.constructor=m}c(m,_),m.prototype=_===null?Object.create(_):(v.prototype=_.prototype,new v)}),d=this&&this.__decorate||function(m,_,v,y){var b,w=arguments.length,x=w<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,_,v,y);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(x=(w<3?b(x):w>3?b(_,v,x):b(_,v))||x);return w>3&&x&&Object.defineProperty(_,v,x),x},h=this&&this.__param||function(m,_){return function(v,y){_(v,y,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;var f=l(1546),g=l(2585),p=function(m){function _(v,y,b,w,x,S){var k=m.call(this,v,"selection",y,!0,b,w,x,S)||this;return k._clearState(),k}return u(_,m),_.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},_.prototype.resize=function(v){m.prototype.resize.call(this,v),this._clearState()},_.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},_.prototype.onSelectionChanged=function(v,y,b){if(this._didStateChange(v,y,b,this._bufferService.buffer.ydisp))if(this._clearAll(),v&&y){var w=v[1]-this._bufferService.buffer.ydisp,x=y[1]-this._bufferService.buffer.ydisp,S=Math.max(w,0),k=Math.min(x,this._bufferService.rows-1);if(S>=this._bufferService.rows||k<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,b){var T=v[0],D=y[0]-T,I=k-S+1;this._fillCells(T,S,D,I)}else{T=w===S?v[0]:0;var N=S===x?y[0]:this._bufferService.cols;this._fillCells(T,S,N-T,1);var A=Math.max(k-S-1,0);if(this._fillCells(0,S+1,this._bufferService.cols,A),S!==k){var $=x===k?y[0]:this._bufferService.cols;this._fillCells(0,k,$,1)}}this._state.start=[v[0],v[1]],this._state.end=[y[0],y[1]],this._state.columnSelectMode=b,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},_.prototype._didStateChange=function(v,y,b,w){return!this._areCoordinatesEqual(v,this._state.start)||!this._areCoordinatesEqual(y,this._state.end)||b!==this._state.columnSelectMode||w!==this._state.ydisp},_.prototype._areCoordinatesEqual=function(v,y){return!(!v||!y)&&v[0]===y[0]&&v[1]===y[1]},d([h(4,g.IBufferService),h(5,g.IOptionsService)],_)}(f.BaseRenderLayer);a.SelectionRenderLayer=p},9596:function(s,a,l){var c,u=this&&this.__extends||(c=function(x,S){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,T){k.__proto__=T}||function(k,T){for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(k[D]=T[D])},c(x,S)},function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function k(){this.constructor=x}c(x,S),x.prototype=S===null?Object.create(S):(k.prototype=S.prototype,new k)}),d=this&&this.__decorate||function(x,S,k,T){var D,I=arguments.length,N=I<3?S:T===null?T=Object.getOwnPropertyDescriptor(S,k):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,S,k,T);else for(var A=x.length-1;A>=0;A--)(D=x[A])&&(N=(I<3?D(N):I>3?D(S,k,N):D(S,k))||N);return I>3&&N&&Object.defineProperty(S,k,N),N},h=this&&this.__param||function(x,S){return function(k,T){S(k,T,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;var f=l(3700),g=l(1546),p=l(3734),m=l(643),_=l(511),v=l(2585),y=l(4725),b=l(4269),w=function(x){function S(k,T,D,I,N,A,$,P){var U=x.call(this,k,"text",T,I,D,N,A,$)||this;return U._characterJoinerService=P,U._characterWidth=0,U._characterFont="",U._characterOverlapCache={},U._workCell=new _.CellData,U._state=new f.GridCache,U}return u(S,x),S.prototype.resize=function(k){x.prototype.resize.call(this,k);var T=this._getFont(!1,!1);this._characterWidth===k.scaledCharWidth&&this._characterFont===T||(this._characterWidth=k.scaledCharWidth,this._characterFont=T,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},S.prototype.reset=function(){this._state.clear(),this._clearAll()},S.prototype._forEachCell=function(k,T,D){for(var I=k;I<=T;I++)for(var N=I+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.lines.get(N),$=this._characterJoinerService.getJoinedCharacters(N),P=0;P<this._bufferService.cols;P++){A.loadCell(P,this._workCell);var U=this._workCell,B=!1,O=P;if(U.getWidth()!==0){if($.length>0&&P===$[0][0]){B=!0;var W=$.shift();U=new b.JoinedCellData(this._workCell,A.translateToString(!0,W[0],W[1]),W[1]-W[0]),O=W[1]-1}!B&&this._isOverlapping(U)&&O<A.length-1&&A.getCodePoint(O+1)===m.NULL_CELL_CODE&&(U.content&=-12582913,U.content|=2<<22),D(U,P,I),P=O}}},S.prototype._drawBackground=function(k,T){var D=this,I=this._ctx,N=this._bufferService.cols,A=0,$=0,P=null;I.save(),this._forEachCell(k,T,function(U,B,O){var W=null;U.isInverse()?W=U.isFgDefault()?D._colors.foreground.css:U.isFgRGB()?"rgb("+p.AttributeData.toColorRGB(U.getFgColor()).join(",")+")":D._colors.ansi[U.getFgColor()].css:U.isBgRGB()?W="rgb("+p.AttributeData.toColorRGB(U.getBgColor()).join(",")+")":U.isBgPalette()&&(W=D._colors.ansi[U.getBgColor()].css),P===null&&(A=B,$=O),O!==$?(I.fillStyle=P||"",D._fillCells(A,$,N-A,1),A=B,$=O):P!==W&&(I.fillStyle=P||"",D._fillCells(A,$,B-A,1),A=B,$=O),P=W}),P!==null&&(I.fillStyle=P,this._fillCells(A,$,N-A,1)),I.restore()},S.prototype._drawForeground=function(k,T){var D=this;this._forEachCell(k,T,function(I,N,A){if(!I.isInvisible()&&(D._drawChars(I,N,A),I.isUnderline()||I.isStrikethrough())){if(D._ctx.save(),I.isInverse())if(I.isBgDefault())D._ctx.fillStyle=D._colors.background.css;else if(I.isBgRGB())D._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(I.getBgColor()).join(",")+")";else{var $=I.getBgColor();D._optionsService.options.drawBoldTextInBrightColors&&I.isBold()&&$<8&&($+=8),D._ctx.fillStyle=D._colors.ansi[$].css}else if(I.isFgDefault())D._ctx.fillStyle=D._colors.foreground.css;else if(I.isFgRGB())D._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(I.getFgColor()).join(",")+")";else{var P=I.getFgColor();D._optionsService.options.drawBoldTextInBrightColors&&I.isBold()&&P<8&&(P+=8),D._ctx.fillStyle=D._colors.ansi[P].css}I.isStrikethrough()&&D._fillMiddleLineAtCells(N,A,I.getWidth()),I.isUnderline()&&D._fillBottomLineAtCells(N,A,I.getWidth()),D._ctx.restore()}})},S.prototype.onGridChanged=function(k,T){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,k,this._bufferService.cols,T-k+1),this._drawBackground(k,T),this._drawForeground(k,T))},S.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},S.prototype._isOverlapping=function(k){if(k.getWidth()!==1||k.getCode()<256)return!1;var T=k.getChars();if(this._characterOverlapCache.hasOwnProperty(T))return this._characterOverlapCache[T];this._ctx.save(),this._ctx.font=this._characterFont;var D=Math.floor(this._ctx.measureText(T).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[T]=D,D},d([h(5,v.IBufferService),h(6,v.IOptionsService),h(7,y.ICharacterJoinerService)],S)}(g.BaseRenderLayer);a.TextRenderLayer=w},9616:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseCharAtlas=void 0;var l=function(){function c(){this._didWarmUp=!1}return c.prototype.dispose=function(){},c.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},c.prototype._doWarmUp=function(){},c.prototype.clear=function(){},c.prototype.beginFrame=function(){},c}();a.BaseCharAtlas=l},1420:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireCharAtlas=void 0;var c=l(2040),u=l(1906),d=[];a.acquireCharAtlas=function(h,f,g,p,m){for(var _=(0,c.generateConfig)(p,m,h,g),v=0;v<d.length;v++){var y=(b=d[v]).ownedBy.indexOf(f);if(y>=0){if((0,c.configEquals)(b.config,_))return b.atlas;b.ownedBy.length===1?(b.atlas.dispose(),d.splice(v,1)):b.ownedBy.splice(y,1);break}}for(v=0;v<d.length;v++){var b=d[v];if((0,c.configEquals)(b.config,_))return b.ownedBy.push(f),b.atlas}var w={atlas:new u.DynamicCharAtlas(document,_),config:_,ownedBy:[f]};return d.push(w),w.atlas},a.removeTerminalFromCache=function(h){for(var f=0;f<d.length;f++){var g=d[f].ownedBy.indexOf(h);if(g!==-1){d[f].ownedBy.length===1?(d[f].atlas.dispose(),d.splice(f,1)):d[f].ownedBy.splice(g,1);break}}}},2040:function(s,a,l){var c=this&&this.__spreadArray||function(d,h,f){if(f||arguments.length===2)for(var g,p=0,m=h.length;p<m;p++)!g&&p in h||(g||(g=Array.prototype.slice.call(h,0,p)),g[p]=h[p]);return d.concat(g||Array.prototype.slice.call(h))};Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;var u=l(643);a.generateConfig=function(d,h,f,g){var p={foreground:g.foreground,background:g.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:c([],g.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:d,scaledCharHeight:h,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,colors:p}},a.configEquals=function(d,h){for(var f=0;f<d.colors.ansi.length;f++)if(d.colors.ansi[f].rgba!==h.colors.ansi[f].rgba)return!1;return d.devicePixelRatio===h.devicePixelRatio&&d.fontFamily===h.fontFamily&&d.fontSize===h.fontSize&&d.fontWeight===h.fontWeight&&d.fontWeightBold===h.fontWeightBold&&d.allowTransparency===h.allowTransparency&&d.scaledCharWidth===h.scaledCharWidth&&d.scaledCharHeight===h.scaledCharHeight&&d.colors.foreground===h.colors.foreground&&d.colors.background===h.colors.background},a.is256Color=function(d){return d<u.DEFAULT_COLOR}},8803:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CHAR_ATLAS_CELL_SPACING=a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;var c=l(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=c.isFirefox?"bottom":"ideographic",a.CHAR_ATLAS_CELL_SPACING=1},1906:function(s,a,l){var c,u=this&&this.__extends||(c=function(T,D){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,N){I.__proto__=N}||function(I,N){for(var A in N)Object.prototype.hasOwnProperty.call(N,A)&&(I[A]=N[A])},c(T,D)},function(T,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");function I(){this.constructor=T}c(T,D),T.prototype=D===null?Object.create(D):(I.prototype=D.prototype,new I)});Object.defineProperty(a,"__esModule",{value:!0}),a.NoneCharAtlas=a.DynamicCharAtlas=a.getGlyphCacheKey=void 0;var d=l(8803),h=l(9616),f=l(5680),g=l(7001),p=l(6114),m=l(1752),_=l(4774),v=1024,y=1024,b={css:"rgba(0, 0, 0, 0)",rgba:0};function w(T){return T.code<<21|T.bg<<12|T.fg<<3|(T.bold?0:4)+(T.dim?0:2)+(T.italic?0:1)}a.getGlyphCacheKey=w;var x=function(T){function D(I,N){var A=T.call(this)||this;A._config=N,A._drawToCacheCount=0,A._glyphsWaitingOnBitmap=[],A._bitmapCommitTimeout=null,A._bitmap=null,A._cacheCanvas=I.createElement("canvas"),A._cacheCanvas.width=v,A._cacheCanvas.height=y,A._cacheCtx=(0,m.throwIfFalsy)(A._cacheCanvas.getContext("2d",{alpha:!0}));var $=I.createElement("canvas");$.width=A._config.scaledCharWidth,$.height=A._config.scaledCharHeight,A._tmpCtx=(0,m.throwIfFalsy)($.getContext("2d",{alpha:A._config.allowTransparency})),A._width=Math.floor(v/A._config.scaledCharWidth),A._height=Math.floor(y/A._config.scaledCharHeight);var P=A._width*A._height;return A._cacheMap=new g.LRUMap(P),A._cacheMap.prealloc(P),A}return u(D,T),D.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},D.prototype.beginFrame=function(){this._drawToCacheCount=0},D.prototype.clear=function(){if(this._cacheMap.size>0){var I=this._width*this._height;this._cacheMap=new g.LRUMap(I),this._cacheMap.prealloc(I)}this._cacheCtx.clearRect(0,0,v,y),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},D.prototype.draw=function(I,N,A,$){if(N.code===32)return!0;if(!this._canCache(N))return!1;var P=w(N),U=this._cacheMap.get(P);if(U!=null)return this._drawFromCache(I,U,A,$),!0;if(this._drawToCacheCount<100){var B;B=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var O=this._drawToCache(N,B);return this._cacheMap.set(P,O),this._drawFromCache(I,O,A,$),!0}return!1},D.prototype._canCache=function(I){return I.code<256},D.prototype._toCoordinateX=function(I){return I%this._width*this._config.scaledCharWidth},D.prototype._toCoordinateY=function(I){return Math.floor(I/this._width)*this._config.scaledCharHeight},D.prototype._drawFromCache=function(I,N,A,$){if(!N.isEmpty){var P=this._toCoordinateX(N.index),U=this._toCoordinateY(N.index);I.drawImage(N.inBitmap?this._bitmap:this._cacheCanvas,P,U,this._config.scaledCharWidth,this._config.scaledCharHeight,A,$,this._config.scaledCharWidth,this._config.scaledCharHeight)}},D.prototype._getColorFromAnsiIndex=function(I){return I<this._config.colors.ansi.length?this._config.colors.ansi[I]:f.DEFAULT_ANSI_COLORS[I]},D.prototype._getBackgroundColor=function(I){return this._config.allowTransparency?b:I.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:I.bg<256?this._getColorFromAnsiIndex(I.bg):this._config.colors.background},D.prototype._getForegroundColor=function(I){return I.fg===d.INVERTED_DEFAULT_COLOR?_.color.opaque(this._config.colors.background):I.fg<256?this._getColorFromAnsiIndex(I.fg):this._config.colors.foreground},D.prototype._drawToCache=function(I,N){this._drawToCacheCount++,this._tmpCtx.save();var A=this._getBackgroundColor(I);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=A.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var $=I.bold?this._config.fontWeightBold:this._config.fontWeight,P=I.italic?"italic":"";this._tmpCtx.font=P+" "+$+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=d.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(I).css,I.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(I.chars,0,this._config.scaledCharHeight);var U=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),B=!1;if(this._config.allowTransparency||(B=k(U,A)),B&&I.chars==="_"&&!this._config.allowTransparency)for(var O=1;O<=5&&(this._tmpCtx.fillText(I.chars,0,this._config.scaledCharHeight-O),B=k(U=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),A));O++);this._tmpCtx.restore();var W=this._toCoordinateX(N),X=this._toCoordinateY(N);this._cacheCtx.putImageData(U,W,X);var z={index:N,isEmpty:B,inBitmap:!1};return this._addGlyphToBitmap(z),z},D.prototype._addGlyphToBitmap=function(I){var N=this;!("createImageBitmap"in window)||p.isFirefox||p.isSafari||(this._glyphsWaitingOnBitmap.push(I),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return N._generateBitmap()},100)))},D.prototype._generateBitmap=function(){var I=this,N=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(A){I._bitmap=A;for(var $=0;$<N.length;$++)N[$].inBitmap=!0}),this._bitmapCommitTimeout=null},D}(h.BaseCharAtlas);a.DynamicCharAtlas=x;var S=function(T){function D(I,N){return T.call(this)||this}return u(D,T),D.prototype.draw=function(I,N,A,$){return!1},D}(h.BaseCharAtlas);function k(T,D){for(var I=!0,N=D.rgba>>>24,A=D.rgba>>>16&255,$=D.rgba>>>8&255,P=0;P<T.data.length;P+=4)T.data[P]===N&&T.data[P+1]===A&&T.data[P+2]===$?T.data[P+3]=0:I=!1;return I}a.NoneCharAtlas=S},7001:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LRUMap=void 0;var l=function(){function c(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return c.prototype._unlinkNode=function(u){var d=u.prev,h=u.next;u===this._head&&(this._head=h),u===this._tail&&(this._tail=d),d!==null&&(d.next=h),h!==null&&(h.prev=d)},c.prototype._appendNode=function(u){var d=this._tail;d!==null&&(d.next=u),u.prev=d,u.next=null,this._tail=u,this._head===null&&(this._head=u)},c.prototype.prealloc=function(u){for(var d=this._nodePool,h=0;h<u;h++)d.push({prev:null,next:null,key:null,value:null})},c.prototype.get=function(u){var d=this._map[u];return d!==void 0?(this._unlinkNode(d),this._appendNode(d),d.value):null},c.prototype.peekValue=function(u){var d=this._map[u];return d!==void 0?d.value:null},c.prototype.peek=function(){var u=this._head;return u===null?null:u.value},c.prototype.set=function(u,d){var h=this._map[u];if(h!==void 0)h=this._map[u],this._unlinkNode(h),h.value=d;else if(this.size>=this.capacity)h=this._head,this._unlinkNode(h),delete this._map[h.key],h.key=u,h.value=d,this._map[u]=h;else{var f=this._nodePool;f.length>0?((h=f.pop()).key=u,h.value=d):h={prev:null,next:null,key:u,value:d},this._map[u]=h,this.size++}this._appendNode(h)},c}();a.LRUMap=l},1296:function(s,a,l){var c,u=this&&this.__extends||(c=function(I,N){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,$){A.__proto__=$}||function(A,$){for(var P in $)Object.prototype.hasOwnProperty.call($,P)&&(A[P]=$[P])},c(I,N)},function(I,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function A(){this.constructor=I}c(I,N),I.prototype=N===null?Object.create(N):(A.prototype=N.prototype,new A)}),d=this&&this.__decorate||function(I,N,A,$){var P,U=arguments.length,B=U<3?N:$===null?$=Object.getOwnPropertyDescriptor(N,A):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(I,N,A,$);else for(var O=I.length-1;O>=0;O--)(P=I[O])&&(B=(U<3?P(B):U>3?P(N,A,B):P(N,A))||B);return U>3&&B&&Object.defineProperty(N,A,B),B},h=this&&this.__param||function(I,N){return function(A,$){N(A,$,I)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;var f=l(3787),g=l(8803),p=l(844),m=l(4725),_=l(2585),v=l(8460),y=l(4774),b=l(9631),w="xterm-dom-renderer-owner-",x="xterm-fg-",S="xterm-bg-",k="xterm-focus",T=1,D=function(I){function N(A,$,P,U,B,O,W,X,z,te){var re=I.call(this)||this;return re._colors=A,re._element=$,re._screenElement=P,re._viewportElement=U,re._linkifier=B,re._linkifier2=O,re._charSizeService=X,re._optionsService=z,re._bufferService=te,re._terminalClass=T++,re._rowElements=[],re._rowContainer=document.createElement("div"),re._rowContainer.classList.add("xterm-rows"),re._rowContainer.style.lineHeight="normal",re._rowContainer.setAttribute("aria-hidden","true"),re._refreshRowElements(re._bufferService.cols,re._bufferService.rows),re._selectionContainer=document.createElement("div"),re._selectionContainer.classList.add("xterm-selection"),re._selectionContainer.setAttribute("aria-hidden","true"),re.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},re._updateDimensions(),re._injectCss(),re._rowFactory=W.createInstance(f.DomRendererRowFactory,document,re._colors),re._element.classList.add(w+re._terminalClass),re._screenElement.appendChild(re._rowContainer),re._screenElement.appendChild(re._selectionContainer),re._linkifier.onShowLinkUnderline(function(pe){return re._onLinkHover(pe)}),re._linkifier.onHideLinkUnderline(function(pe){return re._onLinkLeave(pe)}),re._linkifier2.onShowLinkUnderline(function(pe){return re._onLinkHover(pe)}),re._linkifier2.onHideLinkUnderline(function(pe){return re._onLinkLeave(pe)}),re}return u(N,I),Object.defineProperty(N.prototype,"onRequestRedraw",{get:function(){return new v.EventEmitter().event},enumerable:!1,configurable:!0}),N.prototype.dispose=function(){this._element.classList.remove(w+this._terminalClass),(0,b.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),I.prototype.dispose.call(this)},N.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var A=0,$=this._rowElements;A<$.length;A++){var P=$[A];P.style.width=this.dimensions.canvasWidth+"px",P.style.height=this.dimensions.actualCellHeight+"px",P.style.lineHeight=this.dimensions.actualCellHeight+"px",P.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var U=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=U,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},N.prototype.setColors=function(A){this._colors=A,this._injectCss()},N.prototype._injectCss=function(){var A=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var $=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";$+=this._terminalSelector+" span:not(."+f.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+f.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+f.ITALIC_CLASS+" { font-style: italic;}",$+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",$+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",$+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+":not(."+f.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",$+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(P,U){$+=A._terminalSelector+" ."+x+U+" { color: "+P.css+"; }"+A._terminalSelector+" ."+S+U+" { background-color: "+P.css+"; }"}),$+=this._terminalSelector+" ."+x+g.INVERTED_DEFAULT_COLOR+" { color: "+y.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+S+g.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=$},N.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},N.prototype._refreshRowElements=function(A,$){for(var P=this._rowElements.length;P<=$;P++){var U=document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>$;)this._rowContainer.removeChild(this._rowElements.pop())},N.prototype.onResize=function(A,$){this._refreshRowElements(A,$),this._updateDimensions()},N.prototype.onCharSizeChanged=function(){this._updateDimensions()},N.prototype.onBlur=function(){this._rowContainer.classList.remove(k)},N.prototype.onFocus=function(){this._rowContainer.classList.add(k)},N.prototype.onSelectionChanged=function(A,$,P){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(A&&$){var U=A[1]-this._bufferService.buffer.ydisp,B=$[1]-this._bufferService.buffer.ydisp,O=Math.max(U,0),W=Math.min(B,this._bufferService.rows-1);if(!(O>=this._bufferService.rows||W<0)){var X=document.createDocumentFragment();if(P)X.appendChild(this._createSelectionElement(O,A[0],$[0],W-O+1));else{var z=U===O?A[0]:0,te=O===B?$[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(O,z,te));var re=W-O-1;if(X.appendChild(this._createSelectionElement(O+1,0,this._bufferService.cols,re)),O!==W){var pe=B===W?$[0]:this._bufferService.cols;X.appendChild(this._createSelectionElement(W,0,pe))}}this._selectionContainer.appendChild(X)}}},N.prototype._createSelectionElement=function(A,$,P,U){U===void 0&&(U=1);var B=document.createElement("div");return B.style.height=U*this.dimensions.actualCellHeight+"px",B.style.top=A*this.dimensions.actualCellHeight+"px",B.style.left=$*this.dimensions.actualCellWidth+"px",B.style.width=this.dimensions.actualCellWidth*(P-$)+"px",B},N.prototype.onCursorMove=function(){},N.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},N.prototype.clear=function(){for(var A=0,$=this._rowElements;A<$.length;A++)$[A].innerText=""},N.prototype.renderRows=function(A,$){for(var P=this._bufferService.buffer.ybase+this._bufferService.buffer.y,U=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),B=this._optionsService.options.cursorBlink,O=A;O<=$;O++){var W=this._rowElements[O];W.innerText="";var X=O+this._bufferService.buffer.ydisp,z=this._bufferService.buffer.lines.get(X),te=this._optionsService.options.cursorStyle;W.appendChild(this._rowFactory.createRow(z,X,X===P,te,U,B,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(N.prototype,"_terminalSelector",{get:function(){return"."+w+this._terminalClass},enumerable:!1,configurable:!0}),N.prototype._onLinkHover=function(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)},N.prototype._onLinkLeave=function(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)},N.prototype._setCellUnderline=function(A,$,P,U,B,O){for(;A!==$||P!==U;){var W=this._rowElements[P];if(!W)return;var X=W.children[A];X&&(X.style.textDecoration=O?"underline":"none"),++A>=B&&(A=0,P++)}},d([h(6,_.IInstantiationService),h(7,m.ICharSizeService),h(8,_.IOptionsService),h(9,_.IBufferService)],N)}(p.Disposable);a.DomRenderer=D},3787:function(s,a,l){var c=this&&this.__decorate||function(b,w,x,S){var k,T=arguments.length,D=T<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,w,x,S);else for(var I=b.length-1;I>=0;I--)(k=b[I])&&(D=(T<3?k(D):T>3?k(w,x,D):k(w,x))||D);return T>3&&D&&Object.defineProperty(w,x,D),D},u=this&&this.__param||function(b,w){return function(x,S){w(x,S,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=a.CURSOR_STYLE_UNDERLINE_CLASS=a.CURSOR_STYLE_BAR_CLASS=a.CURSOR_STYLE_BLOCK_CLASS=a.CURSOR_BLINK_CLASS=a.CURSOR_CLASS=a.STRIKETHROUGH_CLASS=a.UNDERLINE_CLASS=a.ITALIC_CLASS=a.DIM_CLASS=a.BOLD_CLASS=void 0;var d=l(8803),h=l(643),f=l(511),g=l(2585),p=l(4774),m=l(4725),_=l(4269);a.BOLD_CLASS="xterm-bold",a.DIM_CLASS="xterm-dim",a.ITALIC_CLASS="xterm-italic",a.UNDERLINE_CLASS="xterm-underline",a.STRIKETHROUGH_CLASS="xterm-strikethrough",a.CURSOR_CLASS="xterm-cursor",a.CURSOR_BLINK_CLASS="xterm-cursor-blink",a.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",a.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",a.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var v=function(){function b(w,x,S,k,T){this._document=w,this._colors=x,this._characterJoinerService=S,this._optionsService=k,this._coreService=T,this._workCell=new f.CellData}return b.prototype.setColors=function(w){this._colors=w},b.prototype.createRow=function(w,x,S,k,T,D,I,N){for(var A=this._document.createDocumentFragment(),$=this._characterJoinerService.getJoinedCharacters(x),P=0,U=Math.min(w.length,N)-1;U>=0;U--)if(w.loadCell(U,this._workCell).getCode()!==h.NULL_CELL_CODE||S&&U===T){P=U+1;break}for(U=0;U<P;U++){w.loadCell(U,this._workCell);var B=this._workCell.getWidth();if(B!==0){var O=!1,W=U,X=this._workCell;if($.length>0&&U===$[0][0]){O=!0;var z=$.shift();X=new _.JoinedCellData(this._workCell,w.translateToString(!0,z[0],z[1]),z[1]-z[0]),W=z[1]-1,B=X.getWidth()}var te=this._document.createElement("span");if(B>1&&(te.style.width=I*B+"px"),O&&(te.style.display="inline",T>=U&&T<=W&&(T=U)),!this._coreService.isCursorHidden&&S&&U===T)switch(te.classList.add(a.CURSOR_CLASS),D&&te.classList.add(a.CURSOR_BLINK_CLASS),k){case"bar":te.classList.add(a.CURSOR_STYLE_BAR_CLASS);break;case"underline":te.classList.add(a.CURSOR_STYLE_UNDERLINE_CLASS);break;default:te.classList.add(a.CURSOR_STYLE_BLOCK_CLASS)}X.isBold()&&te.classList.add(a.BOLD_CLASS),X.isItalic()&&te.classList.add(a.ITALIC_CLASS),X.isDim()&&te.classList.add(a.DIM_CLASS),X.isUnderline()&&te.classList.add(a.UNDERLINE_CLASS),X.isInvisible()?te.textContent=h.WHITESPACE_CELL_CHAR:te.textContent=X.getChars()||h.WHITESPACE_CELL_CHAR,X.isStrikethrough()&&te.classList.add(a.STRIKETHROUGH_CLASS);var re=X.getFgColor(),pe=X.getFgColorMode(),xe=X.getBgColor(),Me=X.getBgColorMode(),q=!!X.isInverse();if(q){var se=re;re=xe,xe=se;var oe=pe;pe=Me,Me=oe}switch(pe){case 16777216:case 33554432:X.isBold()&&re<8&&this._optionsService.options.drawBoldTextInBrightColors&&(re+=8),this._applyMinimumContrast(te,this._colors.background,this._colors.ansi[re])||te.classList.add("xterm-fg-"+re);break;case 50331648:var Re=p.rgba.toColor(re>>16&255,re>>8&255,255&re);this._applyMinimumContrast(te,this._colors.background,Re)||this._addStyle(te,"color:#"+y(re.toString(16),"0",6));break;default:this._applyMinimumContrast(te,this._colors.background,this._colors.foreground)||q&&te.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}switch(Me){case 16777216:case 33554432:te.classList.add("xterm-bg-"+xe);break;case 50331648:this._addStyle(te,"background-color:#"+y(xe.toString(16),"0",6));break;default:q&&te.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)}A.appendChild(te),U=W}}return A},b.prototype._applyMinimumContrast=function(w,x,S){if(this._optionsService.options.minimumContrastRatio===1)return!1;var k=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return k===void 0&&(k=p.color.ensureContrastRatio(x,S,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,k!=null?k:null)),!!k&&(this._addStyle(w,"color:"+k.css),!0)},b.prototype._addStyle=function(w,x){w.setAttribute("style",""+(w.getAttribute("style")||"")+x+";")},c([u(2,m.ICharacterJoinerService),u(3,g.IOptionsService),u(4,g.ICoreService)],b)}();function y(b,w,x){for(;b.length<x;)b=w+b;return b}a.DomRendererRowFactory=v},456:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0;var l=function(){function c(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return c.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(c.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),c.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])},c.prototype.onTrim=function(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},c}();a.SelectionModel=l},428:function(s,a,l){var c=this&&this.__decorate||function(p,m,_,v){var y,b=arguments.length,w=b<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,m,_,v);else for(var x=p.length-1;x>=0;x--)(y=p[x])&&(w=(b<3?y(w):b>3?y(m,_,w):y(m,_))||w);return b>3&&w&&Object.defineProperty(m,_,w),w},u=this&&this.__param||function(p,m){return function(_,v){m(_,v,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;var d=l(2585),h=l(8460),f=function(){function p(m,_,v){this._optionsService=v,this.width=0,this.height=0,this._onCharSizeChange=new h.EventEmitter,this._measureStrategy=new g(m,_,this._optionsService)}return Object.defineProperty(p.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),p.prototype.measure=function(){var m=this._measureStrategy.measure();m.width===this.width&&m.height===this.height||(this.width=m.width,this.height=m.height,this._onCharSizeChange.fire())},c([u(2,d.IOptionsService)],p)}();a.CharSizeService=f;var g=function(){function p(m,_,v){this._document=m,this._parentElement=_,this._optionsService=v,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return p.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var m=this._measureElement.getBoundingClientRect();return m.width!==0&&m.height!==0&&(this._result.width=m.width,this._result.height=Math.ceil(m.height)),this._result},p}()},4269:function(s,a,l){var c,u=this&&this.__extends||(c=function(y,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},c(y,b)},function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=y}c(y,b),y.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)}),d=this&&this.__decorate||function(y,b,w,x){var S,k=arguments.length,T=k<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,b,w,x);else for(var D=y.length-1;D>=0;D--)(S=y[D])&&(T=(k<3?S(T):k>3?S(b,w,T):S(b,w))||T);return k>3&&T&&Object.defineProperty(b,w,T),T},h=this&&this.__param||function(y,b){return function(w,x){b(w,x,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;var f=l(3734),g=l(643),p=l(511),m=l(2585),_=function(y){function b(w,x,S){var k=y.call(this)||this;return k.content=0,k.combinedData="",k.fg=w.fg,k.bg=w.bg,k.combinedData=x,k._width=S,k}return u(b,y),b.prototype.isCombined=function(){return 2097152},b.prototype.getWidth=function(){return this._width},b.prototype.getChars=function(){return this.combinedData},b.prototype.getCode=function(){return 2097151},b.prototype.setFromCharData=function(w){throw new Error("not implemented")},b.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},b}(f.AttributeData);a.JoinedCellData=_;var v=function(){function y(b){this._bufferService=b,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}return y.prototype.register=function(b){var w={id:this._nextCharacterJoinerId++,handler:b};return this._characterJoiners.push(w),w.id},y.prototype.deregister=function(b){for(var w=0;w<this._characterJoiners.length;w++)if(this._characterJoiners[w].id===b)return this._characterJoiners.splice(w,1),!0;return!1},y.prototype.getJoinedCharacters=function(b){if(this._characterJoiners.length===0)return[];var w=this._bufferService.buffer.lines.get(b);if(!w||w.length===0)return[];for(var x=[],S=w.translateToString(!0),k=0,T=0,D=0,I=w.getFg(0),N=w.getBg(0),A=0;A<w.getTrimmedLength();A++)if(w.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==I||this._workCell.bg!==N){if(A-k>1)for(var $=this._getJoinedRanges(S,D,T,w,k),P=0;P<$.length;P++)x.push($[P]);k=A,D=T,I=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1)for($=this._getJoinedRanges(S,D,T,w,k),P=0;P<$.length;P++)x.push($[P]);return x},y.prototype._getJoinedRanges=function(b,w,x,S,k){var T=b.substring(w,x),D=[];try{D=this._characterJoiners[0].handler(T)}catch($){console.error($)}for(var I=1;I<this._characterJoiners.length;I++)try{for(var N=this._characterJoiners[I].handler(T),A=0;A<N.length;A++)y._mergeRanges(D,N[A])}catch($){console.error($)}return this._stringRangesToCellRanges(D,S,k),D},y.prototype._stringRangesToCellRanges=function(b,w,x){var S=0,k=!1,T=0,D=b[S];if(D){for(var I=x;I<this._bufferService.cols;I++){var N=w.getWidth(I),A=w.getString(I).length||g.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!k&&D[0]<=T&&(D[0]=I,k=!0),D[1]<=T){if(D[1]=I,!(D=b[++S]))break;D[0]<=T?(D[0]=I,k=!0):k=!1}T+=A}}D&&(D[1]=this._bufferService.cols)}},y._mergeRanges=function(b,w){for(var x=!1,S=0;S<b.length;S++){var k=b[S];if(x){if(w[1]<=k[0])return b[S-1][1]=w[1],b;if(w[1]<=k[1])return b[S-1][1]=Math.max(w[1],k[1]),b.splice(S,1),b;b.splice(S,1),S--}else{if(w[1]<=k[0])return b.splice(S,0,w),b;if(w[1]<=k[1])return k[0]=Math.min(w[0],k[0]),b;w[0]<k[1]&&(k[0]=Math.min(w[0],k[0]),x=!0)}}return x?b[b.length-1][1]=w[1]:b.push(w),b},y=d([h(0,m.IBufferService)],y)}();a.CharacterJoinerService=v},5114:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;var l=function(){function c(u){this._textarea=u}return Object.defineProperty(c.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),c}();a.CoreBrowserService=l},8934:function(s,a,l){var c=this&&this.__decorate||function(g,p,m,_){var v,y=arguments.length,b=y<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,m):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,p,m,_);else for(var w=g.length-1;w>=0;w--)(v=g[w])&&(b=(y<3?v(b):y>3?v(p,m,b):v(p,m))||b);return y>3&&b&&Object.defineProperty(p,m,b),b},u=this&&this.__param||function(g,p){return function(m,_){p(m,_,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;var d=l(4725),h=l(9806),f=function(){function g(p,m){this._renderService=p,this._charSizeService=m}return g.prototype.getCoords=function(p,m,_,v,y){return(0,h.getCoords)(p,m,_,v,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,y)},g.prototype.getRawByteCoords=function(p,m,_,v){var y=this.getCoords(p,m,_,v);return(0,h.getRawByteCoords)(y)},c([u(0,d.IRenderService),u(1,d.ICharSizeService)],g)}();a.MouseService=f},3230:function(s,a,l){var c,u=this&&this.__extends||(c=function(w,x){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(S[T]=k[T])},c(w,x)},function(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function S(){this.constructor=w}c(w,x),w.prototype=x===null?Object.create(x):(S.prototype=x.prototype,new S)}),d=this&&this.__decorate||function(w,x,S,k){var T,D=arguments.length,I=D<3?x:k===null?k=Object.getOwnPropertyDescriptor(x,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(w,x,S,k);else for(var N=w.length-1;N>=0;N--)(T=w[N])&&(I=(D<3?T(I):D>3?T(x,S,I):T(x,S))||I);return D>3&&I&&Object.defineProperty(x,S,I),I},h=this&&this.__param||function(w,x){return function(S,k){x(S,k,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;var f=l(6193),g=l(8460),p=l(844),m=l(5596),_=l(3656),v=l(2585),y=l(4725),b=function(w){function x(S,k,T,D,I,N){var A=w.call(this)||this;if(A._renderer=S,A._rowCount=k,A._charSizeService=I,A._isPaused=!1,A._needsFullRefresh=!1,A._isNextRenderRedrawOnly=!0,A._needsSelectionRefresh=!1,A._canvasWidth=0,A._canvasHeight=0,A._selectionState={start:void 0,end:void 0,columnSelectMode:!1},A._onDimensionsChange=new g.EventEmitter,A._onRender=new g.EventEmitter,A._onRefreshRequest=new g.EventEmitter,A.register({dispose:function(){return A._renderer.dispose()}}),A._renderDebouncer=new f.RenderDebouncer(function(P,U){return A._renderRows(P,U)}),A.register(A._renderDebouncer),A._screenDprMonitor=new m.ScreenDprMonitor,A._screenDprMonitor.setListener(function(){return A.onDevicePixelRatioChange()}),A.register(A._screenDprMonitor),A.register(N.onResize(function(P){return A._fullRefresh()})),A.register(D.onOptionChange(function(){return A._renderer.onOptionsChanged()})),A.register(A._charSizeService.onCharSizeChange(function(){return A.onCharSizeChanged()})),A._renderer.onRequestRedraw(function(P){return A.refreshRows(P.start,P.end,!0)}),A.register((0,_.addDisposableDomListener)(window,"resize",function(){return A.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var $=new IntersectionObserver(function(P){return A._onIntersectionChange(P[P.length-1])},{threshold:0});$.observe(T),A.register({dispose:function(){return $.disconnect()}})}return A}return u(x,w),Object.defineProperty(x.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),x.prototype._onIntersectionChange=function(S){this._isPaused=S.isIntersecting===void 0?S.intersectionRatio===0:!S.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},x.prototype.refreshRows=function(S,k,T){T===void 0&&(T=!1),this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(S,k,this._rowCount))},x.prototype._renderRows=function(S,k){this._renderer.renderRows(S,k),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:S,end:k}),this._isNextRenderRedrawOnly=!0},x.prototype.resize=function(S,k){this._rowCount=k,this._fireOnCanvasResize()},x.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},x.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},x.prototype.dispose=function(){w.prototype.dispose.call(this)},x.prototype.setRenderer=function(S){var k=this;this._renderer.dispose(),this._renderer=S,this._renderer.onRequestRedraw(function(T){return k.refreshRows(T.start,T.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},x.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},x.prototype.clearTextureAtlas=function(){var S,k;(k=(S=this._renderer)===null||S===void 0?void 0:S.clearTextureAtlas)===null||k===void 0||k.call(S),this._fullRefresh()},x.prototype.setColors=function(S){this._renderer.setColors(S),this._fullRefresh()},x.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},x.prototype.onResize=function(S,k){this._renderer.onResize(S,k),this._fullRefresh()},x.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},x.prototype.onBlur=function(){this._renderer.onBlur()},x.prototype.onFocus=function(){this._renderer.onFocus()},x.prototype.onSelectionChanged=function(S,k,T){this._selectionState.start=S,this._selectionState.end=k,this._selectionState.columnSelectMode=T,this._renderer.onSelectionChanged(S,k,T)},x.prototype.onCursorMove=function(){this._renderer.onCursorMove()},x.prototype.clear=function(){this._renderer.clear()},d([h(3,v.IOptionsService),h(4,y.ICharSizeService),h(5,v.IBufferService)],x)}(p.Disposable);a.RenderService=b},9312:function(s,a,l){var c,u=this&&this.__extends||(c=function(D,I){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,A){N.__proto__=A}||function(N,A){for(var $ in A)Object.prototype.hasOwnProperty.call(A,$)&&(N[$]=A[$])},c(D,I)},function(D,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function N(){this.constructor=D}c(D,I),D.prototype=I===null?Object.create(I):(N.prototype=I.prototype,new N)}),d=this&&this.__decorate||function(D,I,N,A){var $,P=arguments.length,U=P<3?I:A===null?A=Object.getOwnPropertyDescriptor(I,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(D,I,N,A);else for(var B=D.length-1;B>=0;B--)($=D[B])&&(U=(P<3?$(U):P>3?$(I,N,U):$(I,N))||U);return P>3&&U&&Object.defineProperty(I,N,U),U},h=this&&this.__param||function(D,I){return function(N,A){I(N,A,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;var f=l(6114),g=l(456),p=l(511),m=l(8460),_=l(4725),v=l(2585),y=l(9806),b=l(9504),w=l(844),x=l(4841),S=String.fromCharCode(160),k=new RegExp(S,"g"),T=function(D){function I(N,A,$,P,U,B,O,W){var X=D.call(this)||this;return X._element=N,X._screenElement=A,X._linkifier=$,X._bufferService=P,X._coreService=U,X._mouseService=B,X._optionsService=O,X._renderService=W,X._dragScrollAmount=0,X._enabled=!0,X._workCell=new p.CellData,X._mouseDownTimeStamp=0,X._oldHasSelection=!1,X._oldSelectionStart=void 0,X._oldSelectionEnd=void 0,X._onLinuxMouseSelection=X.register(new m.EventEmitter),X._onRedrawRequest=X.register(new m.EventEmitter),X._onSelectionChange=X.register(new m.EventEmitter),X._onRequestScrollLines=X.register(new m.EventEmitter),X._mouseMoveListener=function(z){return X._onMouseMove(z)},X._mouseUpListener=function(z){return X._onMouseUp(z)},X._coreService.onUserInput(function(){X.hasSelection&&X.clearSelection()}),X._trimListener=X._bufferService.buffer.lines.onTrim(function(z){return X._onTrim(z)}),X.register(X._bufferService.buffers.onBufferActivate(function(z){return X._onBufferActivate(z)})),X.enable(),X._model=new g.SelectionModel(X._bufferService),X._activeSelectionMode=0,X}return u(I,D),Object.defineProperty(I.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),I.prototype.dispose=function(){this._removeMouseDownListeners()},I.prototype.reset=function(){this.clearSelection()},I.prototype.disable=function(){this.clearSelection(),this._enabled=!1},I.prototype.enable=function(){this._enabled=!0},Object.defineProperty(I.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"hasSelection",{get:function(){var N=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!N||!A||N[0]===A[0]&&N[1]===A[1])},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"selectionText",{get:function(){var N=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!N||!A)return"";var $=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(N[0]===A[0])return"";for(var U=N[1];U<=A[1];U++){var B=$.translateBufferLineToString(U,!0,N[0],A[0]);P.push(B)}}else{var O=N[1]===A[1]?A[0]:void 0;for(P.push($.translateBufferLineToString(N[1],!0,N[0],O)),U=N[1]+1;U<=A[1]-1;U++){var W=$.lines.get(U);B=$.translateBufferLineToString(U,!0),(W==null?void 0:W.isWrapped)?P[P.length-1]+=B:P.push(B)}N[1]!==A[1]&&(W=$.lines.get(A[1]),B=$.translateBufferLineToString(A[1],!0,0,A[0]),W&&W.isWrapped?P[P.length-1]+=B:P.push(B))}return P.map(function(X){return X.replace(k," ")}).join(f.isWindows?`\r
|
|
2173
2173
|
`:`
|