homebridge-config-ui-x 5.0.0-beta.99 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/CHANGELOG.md +122 -5
  2. package/config.schema.json +1 -1
  3. package/dist/core/auth/auth.controller.d.ts +4 -0
  4. package/dist/core/config/config.service.d.ts +8 -0
  5. package/dist/core/config/config.service.js +2 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/main.js +1 -0
  8. package/dist/main.js.map +1 -1
  9. package/dist/modules/backup/backup.controller.d.ts +1 -0
  10. package/dist/modules/backup/backup.controller.js +11 -0
  11. package/dist/modules/backup/backup.controller.js.map +1 -1
  12. package/dist/modules/backup/backup.service.d.ts +1 -0
  13. package/dist/modules/backup/backup.service.js +19 -5
  14. package/dist/modules/backup/backup.service.js.map +1 -1
  15. package/dist/modules/config-editor/config-editor.service.js +2 -1
  16. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  17. package/dist/modules/platform-tools/docker/docker.service.js +8 -2
  18. package/dist/modules/platform-tools/docker/docker.service.js.map +1 -1
  19. package/dist/modules/plugins/plugins.controller.d.ts +2 -0
  20. package/dist/modules/plugins/plugins.controller.js +1 -1
  21. package/dist/modules/plugins/plugins.controller.js.map +1 -1
  22. package/dist/modules/plugins/plugins.service.d.ts +3 -0
  23. package/dist/modules/plugins/plugins.service.js +81 -47
  24. package/dist/modules/plugins/plugins.service.js.map +1 -1
  25. package/dist/modules/server/server.controller.d.ts +5 -0
  26. package/dist/modules/server/server.controller.js +25 -0
  27. package/dist/modules/server/server.controller.js.map +1 -1
  28. package/dist/modules/server/server.service.d.ts +9 -1
  29. package/dist/modules/server/server.service.js +97 -21
  30. package/dist/modules/server/server.service.js.map +1 -1
  31. package/dist/modules/status/status.gateway.d.ts +6 -0
  32. package/dist/modules/status/status.gateway.js +14 -0
  33. package/dist/modules/status/status.gateway.js.map +1 -1
  34. package/dist/modules/status/status.service.d.ts +26 -0
  35. package/dist/modules/status/status.service.js +112 -0
  36. package/dist/modules/status/status.service.js.map +1 -1
  37. package/package.json +11 -11
  38. package/public/3rdpartylicenses.txt +214 -187
  39. package/public/assets/hap-icons/{airpurifier.svg → air-purifier.svg} +11 -11
  40. package/public/assets/hap-icons/doorbell.svg +17 -0
  41. package/public/assets/hap-icons/filter-maintenance.svg +26 -0
  42. package/public/assets/hap-icons/microphone.svg +22 -0
  43. package/public/assets/hap-icons/security-system-active.svg +103 -0
  44. package/public/assets/hap-icons/{smokesensor.svg → smoke-sensor.svg} +15 -2
  45. package/public/assets/hap-icons/speaker.svg +27 -12
  46. package/public/assets/hap-icons/vacuum-off.svg +34 -0
  47. package/public/assets/hap-icons/vacuum-on.svg +73 -0
  48. package/public/chunk-2RH7XRJB.js +1 -0
  49. package/public/chunk-2V6GVJIK.js +1 -0
  50. package/public/chunk-3UCLNJIE.js +1 -0
  51. package/public/chunk-4J2HTHMW.js +1 -0
  52. package/public/chunk-4NQG4OIB.js +1 -0
  53. package/public/chunk-52HWZQJT.js +1 -0
  54. package/public/chunk-56R3JRVX.js +1 -0
  55. package/public/chunk-65A2CLMB.js +1 -0
  56. package/public/chunk-6LPAR6QB.js +1 -0
  57. package/public/chunk-6VMMFEEB.js +1 -0
  58. package/public/chunk-7RQP64IZ.js +12 -0
  59. package/public/{chunk-GMY5QOXR.js → chunk-BG5MCCBU.js} +6 -6
  60. package/public/chunk-C3HWKB2Q.js +5 -0
  61. package/public/{chunk-YJXHSHNO.js → chunk-CEVLFYVV.js} +1 -1
  62. package/public/chunk-CHYWVK3W.js +1 -0
  63. package/public/chunk-CR7NFTHI.js +4 -0
  64. package/public/{chunk-BRW7C4BZ.js → chunk-CXP6VKNZ.js} +1 -1
  65. package/public/chunk-CY3O5ACI.js +1 -0
  66. package/public/chunk-D5MSFLIQ.js +1 -0
  67. package/public/chunk-DVQU3KHF.js +1 -0
  68. package/public/chunk-EGPBTPS6.js +1 -0
  69. package/public/chunk-EI76KND2.js +2 -0
  70. package/public/chunk-EP7NNPU2.js +1 -0
  71. package/public/chunk-ESCMWFTR.js +1 -0
  72. package/public/chunk-FDBWBMB3.js +1 -0
  73. package/public/chunk-FO44GZVZ.js +5 -0
  74. package/public/chunk-FWNSHSUQ.js +1 -0
  75. package/public/chunk-G4DWZG7U.js +1 -0
  76. package/public/{chunk-2G7GNBIF.js → chunk-GEIS2BWE.js} +1 -1
  77. package/public/chunk-GPZM245P.js +1 -0
  78. package/public/chunk-H2VHR6F4.js +1 -0
  79. package/public/chunk-H5PKL3FP.js +2 -0
  80. package/public/chunk-HFVA7EOG.js +23 -0
  81. package/public/chunk-HU7QTSUZ.js +1 -0
  82. package/public/{chunk-IOWBVW62.js → chunk-HUAADM2I.js} +1 -1
  83. package/public/{chunk-WAA5KWIN.js → chunk-J7Q5BUJW.js} +1 -1
  84. package/public/chunk-KDVPFRHN.js +1 -0
  85. package/public/chunk-KOHQYRVP.js +20 -0
  86. package/public/chunk-MWGI7ZLY.js +28 -0
  87. package/public/chunk-NEZ6TZYE.js +1 -0
  88. package/public/chunk-OLDRUBZS.js +1 -0
  89. package/public/chunk-OYH4UIAH.js +1 -0
  90. package/public/chunk-Q4CZ7LVK.js +2 -0
  91. package/public/{chunk-RNHMRKPJ.js → chunk-QIOCGI3G.js} +5 -5
  92. package/public/chunk-QTTC6A7P.js +1 -0
  93. package/public/chunk-QUD3RGWL.js +1 -0
  94. package/public/{chunk-QMB5XE4Y.js → chunk-R3563DDE.js} +1 -1
  95. package/public/{chunk-B3LZRDAG.js → chunk-S42WFQ2L.js} +1 -1
  96. package/public/{chunk-UVOJ3BF7.js → chunk-THGDS273.js} +1 -1
  97. package/public/chunk-TSAWRS7P.js +8 -0
  98. package/public/chunk-U4GBERFR.js +1 -0
  99. package/public/chunk-UB4DU2JC.js +1 -0
  100. package/public/chunk-UJNEXGXC.js +1 -0
  101. package/public/chunk-ULJPS3WS.js +7 -0
  102. package/public/{chunk-XHI7IAUN.js → chunk-W4PQWIYG.js} +1 -1
  103. package/public/chunk-W542IB6H.js +1 -0
  104. package/public/{chunk-UTAVUGTT.js → chunk-WDFAWIMZ.js} +7 -7
  105. package/public/chunk-WF776GWR.js +1 -0
  106. package/public/chunk-WFYBML4S.js +1 -0
  107. package/public/chunk-XFFCMC6L.js +4 -0
  108. package/public/chunk-XIYHNDRN.js +1 -0
  109. package/public/chunk-YJ2Q2RAD.js +1 -0
  110. package/public/chunk-YYDFCQK6.js +3 -0
  111. package/public/chunk-YZN5MPV3.js +1 -0
  112. package/public/chunk-ZR6LFO7Q.js +1 -0
  113. package/public/index.html +2 -2
  114. package/public/main-I6NBG3JJ.js +1 -0
  115. package/public/{styles-PKR3EGHP.css → styles-ZKWHTEN5.css} +1 -1
  116. package/scripts/upgrade-install-plugin.sh +6 -1
  117. package/public/chunk-2CDSAOHD.js +0 -1
  118. package/public/chunk-2OUR67N4.js +0 -1
  119. package/public/chunk-3CYHPVRJ.js +0 -1
  120. package/public/chunk-3DF7CHZW.js +0 -1
  121. package/public/chunk-5F327T7H.js +0 -1
  122. package/public/chunk-6CNQKPV4.js +0 -1
  123. package/public/chunk-AF2VUIEE.js +0 -1
  124. package/public/chunk-ALG7CIS3.js +0 -5
  125. package/public/chunk-BGDBPFZN.js +0 -1
  126. package/public/chunk-BIRWL4X3.js +0 -1
  127. package/public/chunk-BMCQHGMB.js +0 -1
  128. package/public/chunk-BSGFKU4J.js +0 -4
  129. package/public/chunk-C6A3CFIK.js +0 -1
  130. package/public/chunk-C6LXQBT3.js +0 -1
  131. package/public/chunk-CG7LPZUJ.js +0 -1
  132. package/public/chunk-CLQDCNVA.js +0 -2
  133. package/public/chunk-CMO7ESK6.js +0 -8
  134. package/public/chunk-DDFZVHUO.js +0 -1
  135. package/public/chunk-DGIKPYZP.js +0 -8
  136. package/public/chunk-DNW5N3YO.js +0 -1
  137. package/public/chunk-EGELGD5H.js +0 -1
  138. package/public/chunk-EJBJOBK4.js +0 -1
  139. package/public/chunk-F4KGCHEZ.js +0 -1
  140. package/public/chunk-FATD52DV.js +0 -1
  141. package/public/chunk-FXS45ML3.js +0 -1
  142. package/public/chunk-G6KG4MKA.js +0 -1
  143. package/public/chunk-GTAHH5HN.js +0 -1
  144. package/public/chunk-HLTIIGIP.js +0 -1
  145. package/public/chunk-HLTWQSH5.js +0 -1
  146. package/public/chunk-IORHLUIJ.js +0 -1
  147. package/public/chunk-JADR4A63.js +0 -1
  148. package/public/chunk-KAUSPTCQ.js +0 -23
  149. package/public/chunk-KCQQTZKO.js +0 -5
  150. package/public/chunk-L3HD45SY.js +0 -6
  151. package/public/chunk-LDLWF7GI.js +0 -1
  152. package/public/chunk-LHL5TI6S.js +0 -1
  153. package/public/chunk-LX47K6J2.js +0 -1
  154. package/public/chunk-M2H64FFG.js +0 -1
  155. package/public/chunk-OAQSXFHE.js +0 -1
  156. package/public/chunk-ODU3K7H7.js +0 -1
  157. package/public/chunk-P3KVHPZJ.js +0 -1
  158. package/public/chunk-P64V4GHS.js +0 -29
  159. package/public/chunk-PI76B7WZ.js +0 -1
  160. package/public/chunk-PNSPASX3.js +0 -1
  161. package/public/chunk-PODF4FUD.js +0 -1
  162. package/public/chunk-PUIKXI6O.js +0 -1
  163. package/public/chunk-QIH36FRX.js +0 -1
  164. package/public/chunk-QMAGO5VD.js +0 -20
  165. package/public/chunk-R3VPSO5X.js +0 -7
  166. package/public/chunk-RFFIRBUY.js +0 -1
  167. package/public/chunk-RLGSRK2P.js +0 -1
  168. package/public/chunk-RN4NDBWE.js +0 -1
  169. package/public/chunk-U2HZ2JFO.js +0 -1
  170. package/public/chunk-VA5XNGEK.js +0 -1
  171. package/public/chunk-VHTQTL2S.js +0 -1
  172. package/public/chunk-VJEUBTTK.js +0 -1
  173. package/public/chunk-VLX322GM.js +0 -1
  174. package/public/chunk-VUYAK52W.js +0 -2
  175. package/public/chunk-X6PEPNG4.js +0 -1
  176. package/public/chunk-XP6B4WXR.js +0 -1
  177. package/public/chunk-XUH357B7.js +0 -1
  178. package/public/chunk-Y4QFUO3K.js +0 -1
  179. package/public/chunk-YZCEDH6X.js +0 -1
  180. package/public/chunk-YZWIZGAQ.js +0 -1
  181. package/public/chunk-ZF22CBM2.js +0 -1
  182. package/public/chunk-ZIBK7SYP.js +0 -1
  183. package/public/chunk-ZLCELPBH.js +0 -1
  184. package/public/chunk-ZMYR3JWC.js +0 -1
  185. package/public/main-AS7ULDAC.js +0 -1
  186. /package/public/assets/hap-icons/{airquality.svg → air-quality-sensor.svg} +0 -0
  187. /package/public/assets/hap-icons/{co2-sensor.svg → carbon-dioxide-sensor.svg} +0 -0
  188. /package/public/assets/hap-icons/{co-sensor.svg → carbon-monoxide-sensor.svg} +0 -0
  189. /package/public/assets/hap-icons/{contactsensor-closed.svg → contact-sensor-closed.svg} +0 -0
  190. /package/public/assets/hap-icons/{contactsensor-open.svg → contact-sensor-open.svg} +0 -0
  191. /package/public/assets/hap-icons/{garagedoor.svg → garage-door.svg} +0 -0
  192. /package/public/assets/hap-icons/{humidity.svg → humidity-sensor.svg} +0 -0
  193. /package/public/assets/hap-icons/{leaksensor.svg → leak-sensor.svg} +0 -0
  194. /package/public/assets/hap-icons/{lightbulb.svg → light-bulb.svg} +0 -0
  195. /package/public/assets/hap-icons/{light.svg → light-sensor.svg} +0 -0
  196. /package/public/assets/hap-icons/{motionsensor.svg → motion-sensor.svg} +0 -0
  197. /package/public/assets/hap-icons/{occupancysensor.svg → occupancy-sensor.svg} +0 -0
  198. /package/public/assets/hap-icons/{securitysystem-off.svg → security-system-off.svg} +0 -0
  199. /package/public/assets/hap-icons/{securitysystem-active.svg → security-system-triggered.svg} +0 -0
  200. /package/public/assets/hap-icons/{statelessprogrammableswitch.svg → stateless-programmable-switch.svg} +0 -0
  201. /package/public/assets/hap-icons/{valve-waterfaucet.svg → valve-faucet.svg} +0 -0
  202. /package/public/assets/hap-icons/{valve-showerhead.svg → valve-shower-head.svg} +0 -0
  203. /package/public/assets/hap-icons/{windowcovering-closed.svg → window-covering-closed.svg} +0 -0
  204. /package/public/assets/hap-icons/{windowcovering-open.svg → window-covering-open.svg} +0 -0
  205. /package/public/{polyfills-GCAZ7JAV.js → polyfills-WE4HA5DL.js} +0 -0
@@ -1,7 +1,7 @@
1
- import{e as pr}from"./chunk-R3VPSO5X.js";var yr=pr((Pt,ar)=>{(function(Ae,ue){if(typeof Pt=="object"&&typeof ar=="object")ar.exports=ue();else if(typeof define=="function"&&define.amd)define([],ue);else{var W=ue();for(var c in W)(typeof Pt=="object"?Pt:Ae)[c]=W[c]}})(self,function(){return(()=>{"use strict";var Ae={4567:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var f=w(9042),d=w(6114),m=w(9924),v=w(3656),a=w(844),s=w(5596),p=w(9631),h=function(r){function e(t,i){var n=r.call(this)||this;n._terminal=t,n._renderService=i,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(o){return n._onBoundaryFocus(o,0)},n._bottomBoundaryFocusListener=function(o){return n._onBoundaryFocus(o,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(o){return n._onResize(o.rows)})),n.register(n._terminal.onRender(function(o){return n._refreshRows(o.start,o.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(o){return n._onChar(o)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
2
- `)})),n.register(n._terminal.onA11yTab(function(o){return n._onTab(o)})),n.register(n._terminal.onKey(function(o){return n._onKey(o.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new s.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return u(e,r),e.prototype.dispose=function(){r.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,i){var n=t.target,l=this._rowElements[i===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(i===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var o,y;if(i===0?(o=n,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(o=this._rowElements.shift(),y=n,this._rowContainer.removeChild(o)),o.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){var b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else b=this._createAccessibilityTreeNode(),this._rowElements.push(b),this._rowContainer.appendChild(b);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var i=0;i<t;i++)this._onChar(" ")},e.prototype._onChar=function(t){var i=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
3
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){i._accessibilityTreeRoot.appendChild(i._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,i){this._renderRowsDebouncer.refresh(t,i,this._terminal.rows)},e.prototype._renderRows=function(t,i){for(var n=this._terminal.buffer,l=n.lines.length.toString(),o=t;o<=i;o++){var y=n.translateBufferLineToString(n.ydisp+o,!0),b=(n.ydisp+o+1).toString(),g=this._rowElements[o];g&&(y.length===0?g.innerText="\xA0":g.textContent=y,g.setAttribute("aria-posinset",b),g.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(a.Disposable);c.AccessibilityManager=h},3614:(W,c)=>{function w(d){return d.replace(/\r?\n/g,"\r")}function _(d,m){return m?"\x1B[200~"+d+"\x1B[201~":d}function u(d,m,v){d=_(d=w(d),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(d,!0),m.value=""}function f(d,m,v){var a=v.getBoundingClientRect(),s=d.clientX-a.left-10,p=d.clientY-a.top-10;m.style.width="20px",m.style.height="20px",m.style.left=s+"px",m.style.top=p+"px",m.style.zIndex="1000",m.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=w,c.bracketTextForPaste=_,c.copyHandler=function(d,m){d.clipboardData&&d.clipboardData.setData("text/plain",m.selectionText),d.preventDefault()},c.handlePasteEvent=function(d,m,v){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),m,v)},c.paste=u,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(d,m,v,a,s){f(d,m,v),s&&a.rightClickSelect(d),m.value=a.selectionText,m.select()}},7239:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var w=function(){function _(){this._color={},this._rgba={}}return _.prototype.clear=function(){this._color={},this._rgba={}},_.prototype.setCss=function(u,f,d){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][f]=d},_.prototype.getCss=function(u,f){return this._rgba[u]?this._rgba[u][f]:void 0},_.prototype.setColor=function(u,f,d){this._color[u]||(this._color[u]={}),this._color[u][f]=d},_.prototype.getColor=function(u,f){return this._color[u]?this._color[u][f]:void 0},_}();c.ColorContrastCache=w},5680:function(W,c,w){var _=this&&this.__read||function(h,r){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,i,n=e.call(h),l=[];try{for(;(r===void 0||r-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(o){i={error:o}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return l};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var u=w(8055),f=w(7239),d=u.css.toColor("#ffffff"),m=u.css.toColor("#000000"),v=u.css.toColor("#ffffff"),a=u.css.toColor("#000000"),s={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[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")],r=[0,95,135,175,215,255],e=0;e<216;e++){var t=r[e/36%6|0],i=r[e/6%6|0],n=r[e%6];h.push({css:u.channels.toCss(t,i,n),rgba:u.channels.toRgba(t,i,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:u.channels.toCss(l,l,l),rgba:u.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(r,e){this.allowTransparency=e;var t=r.createElement("canvas");t.width=1,t.height=1;var i=t.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new f.ColorContrastCache,this.colors={foreground:d,background:m,cursor:v,cursorAccent:a,selectionTransparent:s,selectionOpaque:u.color.blend(m,s),selectionForeground:void 0,ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(r){r==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(r){r===void 0&&(r={}),this.colors.foreground=this._parseColor(r.foreground,d),this.colors.background=this._parseColor(r.background,m),this.colors.cursor=this._parseColor(r.cursor,v,!0),this.colors.cursorAccent=this._parseColor(r.cursorAccent,a,!0),this.colors.selectionTransparent=this._parseColor(r.selection,s,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=r.selectionForeground?this._parseColor(r.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(r.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(r.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(r.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(r.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(r.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(r.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(r.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(r.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(r.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(r.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(r.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(r.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(r.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(r.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(r.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(r.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(r){if(r!==void 0)switch(r){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[r]=this._restoreColors.ansi[r]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(r,e,t){if(t===void 0&&(t=this.allowTransparency),r===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=r,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+r+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+r+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=_(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),4),l=n[0],o=n[1],y=n[2],b=n[3],g=Math.round(255*b);return{rgba:u.channels.toRgba(l,o,y,g),css:r}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(i[0],i[1],i[2],i[3])}},h}();c.ColorManager=p},9631:function(W,c){var w=this&&this.__values||function(_){var u=typeof Symbol=="function"&&Symbol.iterator,f=u&&_[u],d=0;if(f)return f.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&d>=_.length&&(_=void 0),{value:_&&_[d++],done:!_}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var _,u,f,d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];try{for(var v=w(d),a=v.next();!a.done;a=v.next()){var s=a.value;(f=s?.parentElement)===null||f===void 0||f.removeChild(s)}}catch(p){_={error:p}}finally{try{a&&!a.done&&(u=v.return)&&u.call(v)}finally{if(_)throw _.error}}}},3656:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(w,_,u,f){w.addEventListener(_,u,f);var d=!1;return{dispose:function(){d||(d=!0,w.removeEventListener(_,u,f))}}}},3551:function(W,c,w){var _=this&&this.__decorate||function(a,s,p,h){var r,e=arguments.length,t=e<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(a,s,p,h);else for(var i=a.length-1;i>=0;i--)(r=a[i])&&(t=(e<3?r(t):e>3?r(s,p,t):r(s,p))||t);return e>3&&t&&Object.defineProperty(s,p,t),t},u=this&&this.__param||function(a,s){return function(p,h){s(p,h,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var f=w(8460),d=w(2585),m=function(){function a(s,p,h){this._bufferService=s,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new f.EventEmitter,this._onHideLinkUnderline=new f.EventEmitter,this._onLinkTooltip=new f.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(a.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),a.prototype.attachToDom=function(s,p){this._element=s,this._mouseZoneManager=p},a.prototype.linkifyRows=function(s,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=s,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,s),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(s,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},a._timeBeforeLatency))},a.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var s=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=s.ydisp+this._rowsToLinkify.start;if(!(p>=s.lines.length)){for(var h=s.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,r,r);e.hasNext();)for(var t=e.next(),i=0;i<this._linkMatchers.length;i++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[i]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},a.prototype.registerLinkMatcher=function(s,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:s,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(r),r.id},a.prototype._addLinkMatcherToList=function(s){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(s.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,s);this._linkMatchers.splice(0,0,s)}else this._linkMatchers.push(s)},a.prototype.deregisterLinkMatcher=function(s){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===s)return this._linkMatchers.splice(p,1),!0;return!1},a.prototype._doLinkifyRow=function(s,p,h){for(var r,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),i=-1,n=function(){var o=r[typeof h.matchIndex!="number"?0:h.matchIndex];if(!o)return l._logService.debug("match found without corresponding matchIndex",r,h),"break";if(i=p.indexOf(o,i+1),t.lastIndex=i+o.length,i<0)return"break";var y=l._bufferService.buffer.stringIndexToBufferIndex(s,i);if(y[0]<0)return"break";var b=l._bufferService.buffer.lines.get(y[0]);if(!b)return"break";var g=b.getFg(y[1]),S=g?g>>9&511:void 0;h.validationCallback?h.validationCallback(o,function(C){e._rowsTimeoutId||C&&e._addLink(y[1],y[0]-e._bufferService.buffer.ydisp,o,h,S)}):l._addLink(y[1],y[0]-l._bufferService.buffer.ydisp,o,h,S)},l=this;(r=t.exec(p))!==null&&n()!=="break";);},a.prototype._addLink=function(s,p,h,r,e){var t=this;if(this._mouseZoneManager&&this._element){var i=this._unicodeService.getStringCellWidth(h),n=s%this._bufferService.cols,l=p+Math.floor(s/this._bufferService.cols),o=(n+i)%this._bufferService.cols,y=l+Math.floor((n+i)/this._bufferService.cols);o===0&&(o=this._bufferService.cols,y--),this._mouseZoneManager.add(new v(n+1,l+1,o+1,y+1,function(b){if(r.handler)return r.handler(b,h);var g=window.open();g?(g.opener=null,g.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,o,y,e)),t._element.classList.add("xterm-cursor-pointer")},function(b){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,o,y,e)),r.hoverTooltipCallback&&r.hoverTooltipCallback(b,h,{start:{x:n,y:l},end:{x:o,y}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,o,y,e)),t._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(b){return!r.willLinkActivate||r.willLinkActivate(b,h)}))}},a.prototype._createLinkHoverEvent=function(s,p,h,r,e){return{x1:s,y1:p,x2:h,y2:r,cols:this._bufferService.cols,fg:e}},a._timeBeforeLatency=200,a=_([u(0,d.IBufferService),u(1,d.ILogService),u(2,d.IUnicodeService)],a)}();c.Linkifier=m;var v=function(a,s,p,h,r,e,t,i,n){this.x1=a,this.y1=s,this.x2=p,this.y2=h,this.clickCallback=r,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=i,this.willLinkActivate=n};c.MouseZone=v},6465:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),f=this&&this.__decorate||function(e,t,i,n){var l,o=arguments.length,y=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var b=e.length-1;b>=0;b--)(l=e[b])&&(y=(o<3?l(y):o>3?l(t,i,y):l(t,i))||y);return o>3&&y&&Object.defineProperty(t,i,y),y},d=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}},m=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var i=typeof Symbol=="function"&&e[Symbol.iterator];if(!i)return e;var n,l,o=i.call(e),y=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)y.push(n.value)}catch(b){l={error:b}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(l)throw l.error}}return y};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var a=w(2585),s=w(8460),p=w(844),h=w(3656),r=function(e){function t(i){var n=e.call(this)||this;return n._bufferService=i,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new s.EventEmitter),n._onHideLinkUnderline=n.register(new s.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return u(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(i){var n=this;return this._linkProviders.push(i),{dispose:function(){var l=n._linkProviders.indexOf(i);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(i,n,l){var o=this;this._element=i,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){o._isMouseOut=!0,o._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(i){if(this._lastMouseEvent=i,this._element&&this._mouseService){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=i.composedPath(),o=0;o<l.length;o++){var y=l[o];if(y.classList.contains("xterm"))break;if(y.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(i){if(this._activeLine!==i.y)return this._clearCurrentLink(),void this._askForLink(i,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,i)||(this._clearCurrentLink(),this._askForLink(i,!0))},t.prototype._askForLink=function(i,n){var l,o,y,b,g=this;this._activeProviderReplies&&n||((y=this._activeProviderReplies)===null||y===void 0||y.forEach(function(E){E?.forEach(function(A){A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=i.y);var S=!1,C=function(E,A){n?!((b=k._activeProviderReplies)===null||b===void 0)&&b.get(E)&&(S=k._checkLinkProviderResult(E,i,S)):A.provideLinks(i.y,function(T){var U,q;if(!g._isMouseOut){var j=T?.map(function(z){return{link:z}});(U=g._activeProviderReplies)===null||U===void 0||U.set(E,j),S=g._checkLinkProviderResult(E,i,S),((q=g._activeProviderReplies)===null||q===void 0?void 0:q.size)===g._linkProviders.length&&g._removeIntersectingLinks(i.y,g._activeProviderReplies)}})},k=this;try{for(var L=m(this._linkProviders.entries()),R=L.next();!R.done;R=L.next()){var x=v(R.value,2);C(x[0],x[1])}}catch(E){l={error:E}}finally{try{R&&!R.done&&(o=L.return)&&o.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(i,n){for(var l=new Set,o=0;o<n.size;o++){var y=n.get(o);if(y)for(var b=0;b<y.length;b++)for(var g=y[b],S=g.link.range.start.y<i?0:g.link.range.start.x,C=g.link.range.end.y>i?this._bufferService.cols:g.link.range.end.x,k=S;k<=C;k++){if(l.has(k)){y.splice(b--,1);break}l.add(k)}}},t.prototype._checkLinkProviderResult=function(i,n,l){var o,y=this;if(!this._activeProviderReplies)return l;for(var b=this._activeProviderReplies.get(i),g=!1,S=0;S<i;S++)this._activeProviderReplies.has(S)&&!this._activeProviderReplies.get(S)||(g=!0);if(!g&&b){var C=b.find(function(L){return y._linkAtPosition(L.link,n)});C&&(l=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(S=0;S<this._activeProviderReplies.size;S++){var k=(o=this._activeProviderReplies.get(S))===null||o===void 0?void 0:o.find(function(L){return y._linkAtPosition(L.link,n)});if(k){l=!0,this._handleNewLink(k);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(i){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(i,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(i,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(i,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!i||!n||this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(i){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(i.link,l)&&(this._currentLink=i,this._currentLink.state={decorations:{underline:i.link.decorations===void 0||i.link.decorations.underline,pointerCursor:i.link.decorations===void 0||i.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,i.link,this._lastMouseEvent),i.link.decorations={},Object.defineProperties(i.link.decorations,{pointerCursor:{get:function(){var o,y;return(y=(o=n._currentLink)===null||o===void 0?void 0:o.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:function(o){var y,b;!((y=n._currentLink)===null||y===void 0)&&y.state&&n._currentLink.state.decorations.pointerCursor!==o&&(n._currentLink.state.decorations.pointerCursor=o,n._currentLink.state.isHovered&&((b=n._element)===null||b===void 0||b.classList.toggle("xterm-cursor-pointer",o)))}},underline:{get:function(){var o,y;return(y=(o=n._currentLink)===null||o===void 0?void 0:o.state)===null||y===void 0?void 0:y.decorations.underline},set:function(o){var y,b,g;!((y=n._currentLink)===null||y===void 0)&&y.state&&((g=(b=n._currentLink)===null||b===void 0?void 0:b.state)===null||g===void 0?void 0:g.decorations.underline)!==o&&(n._currentLink.state.decorations.underline=o,n._currentLink.state.isHovered&&n._fireUnderlineEvent(i.link,o))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(o){var y=o.start===0?0:o.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(y,o.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(i,n,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&i.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(i,n){var l=i.range,o=this._bufferService.buffer.ydisp,y=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-o-1,l.end.x,l.end.y-o-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(y)},t.prototype._linkLeave=function(i,n,l){var o;!((o=this._currentLink)===null||o===void 0)&&o.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&i.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(i,n){var l=i.range.start.y===i.range.end.y,o=i.range.start.y<n.y,y=i.range.end.y>n.y;return(l&&i.range.start.x<=n.x&&i.range.end.x>=n.x||o&&i.range.end.x>=n.x||y&&i.range.start.x<=n.x||o&&y)&&i.range.start.y<=n.y&&i.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(i,n,l){var o=l.getCoords(i,n,this._bufferService.cols,this._bufferService.rows);if(o)return{x:o[0],y:o[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(i,n,l,o,y){return{x1:i,y1:n,x2:l,y2:o,cols:this._bufferService.cols,fg:y}},f([d(0,a.IBufferService)],t)}(p.Disposable);c.Linkifier2=r},9042:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},_(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}_(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),f=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var o=h.length-1;o>=0;o--)(i=h[o])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},d=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var m=w(844),v=w(3656),a=w(4725),s=w(2585),p=function(h){function r(e,t,i,n,l,o){var y=h.call(this)||this;return y._element=e,y._screenElement=t,y._bufferService=i,y._mouseService=n,y._selectionService=l,y._optionsService=o,y._zones=[],y._areZonesActive=!1,y._lastHoverCoords=[void 0,void 0],y._initialSelectionLength=0,y.register((0,v.addDisposableDomListener)(y._element,"mousedown",function(b){return y._onMouseDown(b)})),y._mouseMoveListener=function(b){return y._onMouseMove(b)},y._mouseLeaveListener=function(b){return y._onMouseLeave(b)},y._clickListener=function(b){return y._onClick(b)},y}return u(r,h),r.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},r.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},r.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var i=0;i<this._zones.length;i++){var n=this._zones[i];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}this._zones.length===0&&this._deactivate()}},r.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))},r.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))},r.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},r.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&(this._currentZone=i,i.hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},r.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t?.tooltipCallback(e)},r.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t?.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},r.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},r.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},r.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},r.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],n=t[1],l=0;l<this._zones.length;l++){var o=this._zones[l];if(o.y1===o.y2){if(n===o.y1&&i>=o.x1&&i<o.x2)return o}else if(n===o.y1&&i>=o.x1||n===o.y2&&i<o.x2||n>o.y1&&n<o.y2)return o}},f([d(2,s.IBufferService),d(3,a.IMouseService),d(4,a.ISelectionService),d(5,s.IOptionsService)],r)}(m.Disposable);c.MouseZoneManager=p},6193:function(W,c){var w=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&u[f],m=0;if(d)return d.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var _=function(){function u(f){this._renderCallback=f,this._refreshCallbacks=[]}return u.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},u.prototype.addRefreshCallback=function(f){var d=this;return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()})),this._animationFrame},u.prototype.refresh=function(f,d,m){var v=this;this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},u.prototype._runRefreshCallbacks=function(){var f,d;try{for(var m=w(this._refreshCallbacks),v=m.next();!v.done;v=m.next())(0,v.value)(0)}catch(a){f={error:a}}finally{try{v&&!v.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}this._refreshCallbacks=[]},u}();c.RenderDebouncer=_},5596:function(W,c,w){var _,u=this&&this.__extends||(_=function(d,m){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,a){v.__proto__=a}||function(v,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(v[s]=a[s])},_(d,m)},function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function v(){this.constructor=d}_(d,m),d.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var f=function(d){function m(){var v=d!==null&&d.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return u(m,d),m.prototype.setListener=function(v){var a=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){a._listener&&(a._listener(window.devicePixelRatio,a._currentDevicePixelRatio),a._updateDpr())},this._updateDpr()},m.prototype.dispose=function(){d.prototype.dispose.call(this),this.clearListener()},m.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},m.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)},m}(w(844).Disposable);c.ScreenDprMonitor=f},3236:function(W,c,w){var _,u=this&&this.__extends||(_=function(X,F){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(O[H]=D[H])},_(X,F)},function(X,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function O(){this.constructor=X}_(X,F),X.prototype=F===null?Object.create(F):(O.prototype=F.prototype,new O)}),f=this&&this.__values||function(X){var F=typeof Symbol=="function"&&Symbol.iterator,O=F&&X[F],D=0;if(O)return O.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&D>=X.length&&(X=void 0),{value:X&&X[D++],done:!X}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(X,F){var O=typeof Symbol=="function"&&X[Symbol.iterator];if(!O)return X;var D,H,G=O.call(X),V=[];try{for(;(F===void 0||F-- >0)&&!(D=G.next()).done;)V.push(D.value)}catch(J){H={error:J}}finally{try{D&&!D.done&&(O=G.return)&&O.call(G)}finally{if(H)throw H.error}}return V},m=this&&this.__spreadArray||function(X,F,O){if(O||arguments.length===2)for(var D,H=0,G=F.length;H<G;H++)!D&&H in F||(D||(D=Array.prototype.slice.call(F,0,H)),D[H]=F[H]);return X.concat(D||Array.prototype.slice.call(F))};Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var v=w(2950),a=w(1680),s=w(3614),p=w(2584),h=w(5435),r=w(3525),e=w(3551),t=w(9312),i=w(6114),n=w(3656),l=w(9042),o=w(357),y=w(6954),b=w(4567),g=w(1296),S=w(7399),C=w(8460),k=w(8437),L=w(5680),R=w(3230),x=w(4725),E=w(428),A=w(8934),T=w(6465),U=w(5114),q=w(8969),j=w(8055),z=w(4269),N=w(5941),M=w(3107),Y=w(5744),Z=w(9074),ee=w(2585),B=typeof window<"u"?window.document:null,Q=function(X){function F(O){O===void 0&&(O={});var D=X.call(this,O)||this;return D.browser=i,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new C.EventEmitter,D._onKey=new C.EventEmitter,D._onRender=new C.EventEmitter,D._onSelectionChange=new C.EventEmitter,D._onTitleChange=new C.EventEmitter,D._onBell=new C.EventEmitter,D._onFocus=new C.EventEmitter,D._onBlur=new C.EventEmitter,D._onA11yCharEmitter=new C.EventEmitter,D._onA11yTabEmitter=new C.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance(Z.DecorationService),D._instantiationService.setService(ee.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(H,G){return D.refresh(H,G)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(H){return D._reportWindowsOptions(H)})),D.register(D._inputHandler.onColor(function(H){return D._handleColorEvent(H)})),D.register((0,C.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,C.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(H){return D._afterResize(H.cols,H.rows)})),D}return u(F,X),Object.defineProperty(F.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),F.prototype._handleColorEvent=function(O){var D,H,G,V;if(this._colorManager){try{for(var J=f(O),re=J.next();!re.done;re=J.next()){var oe=re.value,se=void 0,K="";switch(oe.index){case 256:se="foreground",K="10";break;case 257:se="background",K="11";break;case 258:se="cursor",K="12";break;default:se="ansi",K="4;"+oe.index}if(se)switch(oe.type){case 0:var ae=j.color.toColorRGB(se==="ansi"?this._colorManager.colors.ansi[oe.index]:this._colorManager.colors[se]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(ae)+p.C1_ESCAPED.ST);break;case 1:se==="ansi"?this._colorManager.colors.ansi[oe.index]=j.rgba.toColor.apply(j.rgba,m([],d(oe.color),!1)):this._colorManager.colors[se]=j.rgba.toColor.apply(j.rgba,m([],d(oe.color),!1));break;case 2:this._colorManager.restoreColor(oe.index)}}}catch(de){D={error:de}}finally{try{re&&!re.done&&(H=J.return)&&H.call(J)}finally{if(D)throw D.error}}(G=this._renderService)===null||G===void 0||G.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)}},F.prototype.dispose=function(){var O,D,H;this._isDisposed||(X.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(H=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||H===void 0||H.removeChild(this.element))},F.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(F.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),F.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},F.prototype._updateOptions=function(O){var D,H,G,V;switch(X.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(H=this._charSizeService)===null||H===void 0||H.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":(G=this.viewport)===null||G===void 0||G.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)):((V=this._accessibilityManager)===null||V===void 0||V.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},F.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},F.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},F.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},F.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var H=Math.min(this.buffer.x,this.cols-1),G=this._renderService.dimensions.actualCellHeight,V=D.getWidth(H),J=this._renderService.dimensions.actualCellWidth*V,re=this.buffer.y*this._renderService.dimensions.actualCellHeight,oe=H*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=oe+"px",this.textarea.style.top=re+"px",this.textarea.style.width=J+"px",this.textarea.style.height=G+"px",this.textarea.style.lineHeight=G+"px",this.textarea.style.zIndex="-5"}}},F.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(H){O.hasSelection()&&(0,s.copyHandler)(H,O._selectionService)}));var D=function(H){return(0,s.handlePasteEvent)(H,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),i.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(H){H.button===2&&(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(H){(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),i.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(H){H.button===1&&(0,s.moveTextAreaUnderMouseCursor)(H,O.textarea,O.screenElement)}))},F.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._compositionHelper.compositionupdate(D)})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register((0,n.addDisposableDomListener)(this.textarea,"input",function(D){return O._inputEvent(D)},!0)),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(D){return O._queueLinkification(D.start,D.end)}))},F.prototype.open=function(O){var D=this;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.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"),O.appendChild(this.element);var H=B.createDocumentFragment();this._viewportElement=B.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),H.appendChild(this._viewportElement),this._viewportScrollArea=B.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=B.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=B.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),H.appendChild(this.screenElement),this.textarea=B.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.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,n.addDisposableDomListener)(this.textarea,"focus",function(J){return D._onTextAreaFocus(J)})),this.register((0,n.addDisposableDomListener)(this.textarea,"blur",function(){return D._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var G=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(x.ICoreBrowserService,G),this._charSizeService=this._instantiationService.createInstance(E.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new L.ColorManager(B,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(J){return D._colorManager.onOptionsChange(J)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(z.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService);var V=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(R.RenderService,V,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(function(J){return D._onRender.fire(J)})),this.onResize(function(J){return D._renderService.resize(J.cols,J.rows)}),this._compositionView=B.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(H),this._soundService=this._instantiationService.createInstance(o.SoundService),this._instantiationService.setService(x.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(J){return D.scrollLines(J,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return D.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){D._renderService.onCursorMove(),D._syncTextArea()})),this.register(this.onResize(function(){return D._renderService.onResize(D.cols,D.rows)})),this.register(this.onBlur(function(){return D._renderService.onBlur()})),this.register(this.onFocus(function(){return D._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return D.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(J){return D.scrollLines(J.amount,J.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return D._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(J){return D._renderService.onSelectionChanged(J.start,J.end,J.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(J){D.textarea.value=J,D.textarea.focus(),D.textarea.select()})),this.register(this._onScroll.event(function(J){D.viewport.syncScrollArea(),D._selectionService.refresh()})),this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",function(){return D._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return D._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(M.BufferDecorationRenderer,this.screenElement)),this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(J){return D._selectionService.onMouseDown(J)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance(Y.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange(function(){!D._overviewRulerRenderer&&D.options.overviewRulerWidth&&D._viewportElement&&D.screenElement&&(D._overviewRulerRenderer=D._instantiationService.createInstance(Y.OverviewRulerRenderer,D._viewportElement,D.screenElement))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},F.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(r.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(g.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},F.prototype._setTheme=function(O){var D,H,G;this._theme=O,(D=this._colorManager)===null||D===void 0||D.setTheme(O),(H=this._renderService)===null||H===void 0||H.setColors(this._colorManager.colors),(G=this.viewport)===null||G===void 0||G.onThemeChange(this._colorManager.colors)},F.prototype.bindMouse=function(){var O=this,D=this,H=this.element;function G(K){var ae,de,Se=D._mouseService.getRawByteCoords(K,D.screenElement,D.cols,D.rows);if(!Se)return!1;switch(K.overrideType||K.type){case"mousemove":de=32,K.buttons===void 0?(ae=3,K.button!==void 0&&(ae=K.button<3?K.button:3)):ae=1&K.buttons?0:4&K.buttons?1:2&K.buttons?2:3;break;case"mouseup":de=0,ae=K.button<3?K.button:3;break;case"mousedown":de=1,ae=K.button<3?K.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(K)===0)return!1;de=K.deltaY<0?0:1,ae=4;break;default:return!1}return!(de===void 0||ae===void 0||ae>4)&&D.coreMouseService.triggerMouseEvent({col:Se.x-33,row:Se.y-33,button:ae,action:de,ctrl:K.ctrlKey,alt:K.altKey,shift:K.shiftKey})}var V={mouseup:null,wheel:null,mousedrag:null,mousemove:null},J=function(K){return G(K),K.buttons||(O._document.removeEventListener("mouseup",V.mouseup),V.mousedrag&&O._document.removeEventListener("mousemove",V.mousedrag)),O.cancel(K)},re=function(K){return G(K),O.cancel(K,!0)},oe=function(K){K.buttons&&G(K)},se=function(K){K.buttons||G(K)};this.register(this.coreMouseService.onProtocolChange(function(K){K?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(K)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&K?V.mousemove||(H.addEventListener("mousemove",se),V.mousemove=se):(H.removeEventListener("mousemove",V.mousemove),V.mousemove=null),16&K?V.wheel||(H.addEventListener("wheel",re,{passive:!1}),V.wheel=re):(H.removeEventListener("wheel",V.wheel),V.wheel=null),2&K?V.mouseup||(V.mouseup=J):(O._document.removeEventListener("mouseup",V.mouseup),V.mouseup=null),4&K?V.mousedrag||(V.mousedrag=oe):(O._document.removeEventListener("mousemove",V.mousedrag),V.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,n.addDisposableDomListener)(H,"mousedown",function(K){if(K.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(K))return G(K),V.mouseup&&O._document.addEventListener("mouseup",V.mouseup),V.mousedrag&&O._document.addEventListener("mousemove",V.mousedrag),O.cancel(K)})),this.register((0,n.addDisposableDomListener)(H,"wheel",function(K){if(!V.wheel){if(!O.buffer.hasScrollback){var ae=O.viewport.getLinesScrolled(K);if(ae===0)return;for(var de=p.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(K.deltaY<0?"A":"B"),Se="",Be=0;Be<Math.abs(ae);Be++)Se+=de;return O.coreService.triggerDataEvent(Se,!0),O.cancel(K,!0)}return O.viewport.onWheel(K)?O.cancel(K):void 0}},{passive:!1})),this.register((0,n.addDisposableDomListener)(H,"touchstart",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(K),O.cancel(K)},{passive:!0})),this.register((0,n.addDisposableDomListener)(H,"touchmove",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(K)?void 0:O.cancel(K)},{passive:!1}))},F.prototype.refresh=function(O,D){var H;(H=this._renderService)===null||H===void 0||H.refreshRows(O,D)},F.prototype._queueLinkification=function(O,D){var H;(H=this.linkifier)===null||H===void 0||H.linkifyRows(O,D)},F.prototype.updateCursorStyle=function(O){var D;!((D=this._selectionService)===null||D===void 0)&&D.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},F.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},F.prototype.scrollLines=function(O,D,H){H===void 0&&(H=0),X.prototype.scrollLines.call(this,O,D,H),this.refresh(0,this.rows-1)},F.prototype.paste=function(O){(0,s.paste)(O,this.textarea,this.coreService)},F.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},F.prototype.registerLinkMatcher=function(O,D,H){var G=this.linkifier.registerLinkMatcher(O,D,H);return this.refresh(0,this.rows-1),G},F.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},F.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},F.prototype.registerCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var D=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),D},F.prototype.deregisterCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(F.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),F.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},F.prototype.registerDecoration=function(O){return this._decorationService.registerDecoration(O)},F.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},F.prototype.select=function(O,D,H){this._selectionService.setSelection(O,D,H)},F.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},F.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]}},F.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},F.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},F.prototype.selectLines=function(O,D){var H;(H=this._selectionService)===null||H===void 0||H.selectLines(O,D)},F.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;var D=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!D&&!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;D||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var H=(0,S.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),H.type===3||H.type===2){var G=this.rows-1;return this.scrollLines(H.type===2?-G:G),this.cancel(O,!0)}return H.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(H.cancel&&this.cancel(O,!0),!H.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(H.key!==p.C0.ETX&&H.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:H.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(H.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0))))},F.prototype._isThirdLevelShift=function(O,D){var H=O.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||O.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||O.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?H:H&&(!D.keyCode||D.keyCode>47)},F.prototype._keyUp=function(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},F.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},F.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},F.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},F.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?X.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},F.prototype._afterResize=function(O,D){var H,G;(H=this._charSizeService)===null||H===void 0||H.measure(),(G=this.viewport)===null||G===void 0||G.syncScrollArea(!0)},F.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),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 O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(k.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},F.prototype.reset=function(){var O,D;this.options.rows=this.rows,this.options.cols=this.cols;var H=this._customKeyEventHandler;this._setup(),X.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),this._customKeyEventHandler=H,this.refresh(0,this.rows-1),(D=this.viewport)===null||D===void 0||D.syncScrollArea()},F.prototype.clearTextureAtlas=function(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()},F.prototype._reportFocus=function(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},F.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case h.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),H=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+H+";"+D+"t");break;case h.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var G=this._renderService.dimensions.scaledCellWidth.toFixed(0),V=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+V+";"+G+"t")}},F.prototype.cancel=function(O,D){if(this.options.cancelEvents||D)return O.preventDefault(),O.stopPropagation(),!1},F.prototype._visualBell=function(){return!1},F.prototype._soundBell=function(){return this.options.bellStyle==="sound"},F}(q.CoreTerminal);c.Terminal=Q},9924:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0;var w=function(){function _(u,f){f===void 0&&(f=1e3),this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return _.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},_.prototype.refresh=function(u,f,d){var m=this;this._rowCount=d,u=u!==void 0?u:0,f=f!==void 0?f: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,f):f;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var a=v-this._lastRefreshMs,s=this._debounceThresholdMS-a;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){m._lastRefreshMs=Date.now(),m._innerRefresh(),m._additionalRefreshRequested=!1,m._refreshTimeoutID=void 0},s)}},_.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}},_}();c.TimeBasedDebouncer=w},1680:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},_(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}_(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),f=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var o=h.length-1;o>=0;o--)(i=h[o])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},d=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;var m=w(844),v=w(3656),a=w(4725),s=w(2585),p=function(h){function r(e,t,i,n,l,o,y,b){var g=h.call(this)||this;return g._scrollLines=e,g._viewportElement=t,g._scrollArea=i,g._element=n,g._bufferService=l,g._optionsService=o,g._charSizeService=y,g._renderService=b,g.scrollBarWidth=0,g._currentRowHeight=0,g._currentScaledCellHeight=0,g._lastRecordedBufferLength=0,g._lastRecordedViewportHeight=0,g._lastRecordedBufferHeight=0,g._lastTouchY=0,g._lastScrollTop=0,g._wheelPartialScroll=0,g._refreshAnimationFrame=null,g._ignoreNextScrollEvent=!1,g.scrollBarWidth=g._viewportElement.offsetWidth-g._scrollArea.offsetWidth||15,g.register((0,v.addDisposableDomListener)(g._viewportElement,"scroll",g._onScroll.bind(g))),g._activeBuffer=g._bufferService.buffer,g.register(g._bufferService.buffers.onBufferActivate(function(S){return g._activeBuffer=S.activeBuffer})),g._renderDimensions=g._renderService.dimensions,g.register(g._renderService.onDimensionsChange(function(S){return g._renderDimensions=S})),setTimeout(function(){return g.syncScrollArea()},0),g}return u(r,h),r.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},r.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return t._innerRefresh()}))},r.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 e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},r.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},r.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},r.prototype._bubbleScroll=function(e,t){var i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&i<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},r.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},r.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},r.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},r.prototype._applyScrollModifier=function(e,t){var i=this._optionsService.rawOptions.fastScrollModifier;return i==="alt"&&t.altKey||i==="ctrl"&&t.ctrlKey||i==="shift"&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},r.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},r.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},f([d(4,s.IBufferService),d(5,s.IOptionsService),d(6,a.ICharSizeService),d(7,a.IRenderService)],r)}(m.Disposable);c.Viewport=p},3107:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,o=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(o=(l<3?n(o):l>3?n(e,t,o):n(e,t))||o);return l>3&&o&&Object.defineProperty(e,t,o),o},d=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},m=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;var v=w(3656),a=w(4725),s=w(844),p=w(2585),h=function(r){function e(t,i,n,l){var o=r.call(this)||this;return o._screenElement=t,o._bufferService=i,o._decorationService=n,o._renderService=l,o._decorationElements=new Map,o._altBufferIsActive=!1,o._dimensionsChanged=!1,o._container=document.createElement("div"),o._container.classList.add("xterm-decoration-container"),o._screenElement.appendChild(o._container),o.register(o._renderService.onRenderedViewportChange(function(){return o._queueRefresh()})),o.register(o._renderService.onDimensionsChange(function(){o._dimensionsChanged=!0,o._queueRefresh()})),o.register((0,v.addDisposableDomListener)(window,"resize",function(){return o._queueRefresh()})),o.register(o._bufferService.buffers.onBufferActivate(function(){o._altBufferIsActive=o._bufferService.buffer===o._bufferService.buffers.alt})),o.register(o._decorationService.onDecorationRegistered(function(){return o._queueRefresh()})),o.register(o._decorationService.onDecorationRemoved(function(y){return o._removeDecoration(y)})),o}return u(e,r),e.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),r.prototype.dispose.call(this)},e.prototype._queueRefresh=function(){var t=this;this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(function(){t.refreshDecorations(),t._animationFrame=void 0}))},e.prototype.refreshDecorations=function(){var t,i;try{for(var n=m(this._decorationService.decorations),l=n.next();!l.done;l=n.next()){var o=l.value;this._renderDecoration(o)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._dimensionsChanged=!1},e.prototype._renderDecoration=function(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)},e.prototype._createElement=function(t){var i,n=document.createElement("div");n.classList.add("xterm-decoration"),n.style.width=Math.round((t.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",n.style.height=(t.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",n.style.top=(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",n.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var l=(i=t.options.x)!==null&&i!==void 0?i:0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(t,n),n},e.prototype._refreshStyle=function(t){var i=this,n=t.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{var l=this._decorationElements.get(t);l||(t.onDispose(function(){return i._removeDecoration(t)}),l=this._createElement(t),t.element=l,this._decorationElements.set(t,l),this._container.appendChild(l)),l.style.top=n*this._renderService.dimensions.actualCellHeight+"px",l.style.display=this._altBufferIsActive?"none":"block",t.onRenderEmitter.fire(l)}},e.prototype._refreshXPosition=function(t,i){var n;if(i===void 0&&(i=t.element),i){var l=(n=t.options.x)!==null&&n!==void 0?n:0;(t.options.anchor||"left")==="right"?i.style.right=l?l*this._renderService.dimensions.actualCellWidth+"px":"":i.style.left=l?l*this._renderService.dimensions.actualCellWidth+"px":""}},e.prototype._removeDecoration=function(t){var i;(i=this._decorationElements.get(t))===null||i===void 0||i.remove(),this._decorationElements.delete(t)},f([d(1,p.IBufferService),d(2,p.IDecorationService),d(3,a.IRenderService)],e)}(s.Disposable);c.BufferDecorationRenderer=h},5871:function(W,c){var w=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&u[f],m=0;if(d)return d.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0;var _=function(){function u(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(u.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),u.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},u.prototype.addDecoration=function(f){var d,m;if(f.options.overviewRulerOptions){try{for(var v=w(this._zones),a=v.next();!a.done;a=v.next()){var s=a.value;if(s.color===f.options.overviewRulerOptions.color&&s.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(s,f.marker.line))return;if(this._lineAdjacentToZone(s,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(s,f.marker.line)}}}catch(p){d={error:p}}finally{try{a&&!a.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},u.prototype.setPadding=function(f){this._linePadding=f},u.prototype._lineIntersectsZone=function(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine},u.prototype._lineAdjacentToZone=function(f,d,m){return d>=f.startBufferLine-this._linePadding[m||"full"]&&d<=f.endBufferLine+this._linePadding[m||"full"]},u.prototype._addLineToZone=function(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)},u}();c.ColorZoneStore=_},5744:function(W,c,w){var _,u=this&&this.__extends||(_=function(n,l){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,y){o.__proto__=y}||function(o,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(o[b]=y[b])},_(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function o(){this.constructor=n}_(n,l),n.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}),f=this&&this.__decorate||function(n,l,o,y){var b,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,o):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,o,y);else for(var C=n.length-1;C>=0;C--)(b=n[C])&&(S=(g<3?b(S):g>3?b(l,o,S):b(l,o))||S);return g>3&&S&&Object.defineProperty(l,o,S),S},d=this&&this.__param||function(n,l){return function(o,y){l(o,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,o=l&&n[l],y=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;var v=w(5871),a=w(3656),s=w(4725),p=w(844),h=w(2585),r={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},t={full:0,left:0,center:0,right:0},i=function(n){function l(o,y,b,g,S,C){var k,L=n.call(this)||this;L._viewportElement=o,L._screenElement=y,L._bufferService=b,L._decorationService=g,L._renderService=S,L._optionsService=C,L._colorZoneStore=new v.ColorZoneStore,L._shouldUpdateDimensions=!0,L._shouldUpdateAnchor=!0,L._lastKnownBufferLength=0,L._canvas=document.createElement("canvas"),L._canvas.classList.add("xterm-decoration-overview-ruler"),L._refreshCanvasDimensions(),(k=L._viewportElement.parentElement)===null||k===void 0||k.insertBefore(L._canvas,L._viewportElement);var R=L._canvas.getContext("2d");if(!R)throw new Error("Ctx cannot be null");return L._ctx=R,L._registerDecorationListeners(),L._registerBufferChangeListeners(),L._registerDimensionChangeListeners(),L}return u(l,n),Object.defineProperty(l.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),l.prototype._registerDecorationListeners=function(){var o=this;this.register(this._decorationService.onDecorationRegistered(function(){return o._queueRefresh(void 0,!0)})),this.register(this._decorationService.onDecorationRemoved(function(){return o._queueRefresh(void 0,!0)}))},l.prototype._registerBufferChangeListeners=function(){var o=this;this.register(this._renderService.onRenderedViewportChange(function(){return o._queueRefresh()})),this.register(this._bufferService.buffers.onBufferActivate(function(){o._canvas.style.display=o._bufferService.buffer===o._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(function(){o._lastKnownBufferLength!==o._bufferService.buffers.normal.lines.length&&(o._refreshDrawHeightConstants(),o._refreshColorZonePadding())}))},l.prototype._registerDimensionChangeListeners=function(){var o=this;this.register(this._renderService.onRender(function(){o._containerHeight&&o._containerHeight===o._screenElement.clientHeight||(o._queueRefresh(!0),o._containerHeight=o._screenElement.clientHeight)})),this.register(this._optionsService.onOptionChange(function(y){y==="overviewRulerWidth"&&o._queueRefresh(!0)})),this.register((0,a.addDisposableDomListener)(window,"resize",function(){o._queueRefresh(!0)})),this._queueRefresh(!0)},l.prototype.dispose=function(){var o;(o=this._canvas)===null||o===void 0||o.remove(),n.prototype.dispose.call(this)},l.prototype._refreshDrawConstants=function(){var o=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=o,e.center=y,e.right=o,this._refreshDrawHeightConstants(),t.full=0,t.left=0,t.center=e.left,t.right=e.left+e.center},l.prototype._refreshDrawHeightConstants=function(){r.full=Math.round(2*window.devicePixelRatio);var o=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(o,12),6)*window.devicePixelRatio);r.left=y,r.center=y,r.right=y},l.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*r.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},l.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},l.prototype._refreshDecorations=function(){var o,y,b,g,S,C;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var k=m(this._decorationService.decorations),L=k.next();!L.done;L=k.next()){var R=L.value;this._colorZoneStore.addDecoration(R)}}catch(j){o={error:j}}finally{try{L&&!L.done&&(y=k.return)&&y.call(k)}finally{if(o)throw o.error}}this._ctx.lineWidth=1;var x=this._colorZoneStore.zones;try{for(var E=m(x),A=E.next();!A.done;A=E.next())(q=A.value).position!=="full"&&this._renderColorZone(q)}catch(j){b={error:j}}finally{try{A&&!A.done&&(g=E.return)&&g.call(E)}finally{if(b)throw b.error}}try{for(var T=m(x),U=T.next();!U.done;U=T.next()){var q;(q=U.value).position==="full"&&this._renderColorZone(q)}}catch(j){S={error:j}}finally{try{U&&!U.done&&(C=T.return)&&C.call(T)}finally{if(S)throw S.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},l.prototype._renderColorZone=function(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(t[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-r[o.position||"full"]/2),e[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+r[o.position||"full"]))},l.prototype._queueRefresh=function(o,y){var b=this;this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){b._refreshDecorations(),b._animationFrame=void 0}))},f([d(2,h.IBufferService),d(3,h.IDecorationService),d(4,s.IRenderService),d(5,h.IOptionsService)],l)}(p.Disposable);c.OverviewRulerRenderer=i},2950:function(W,c,w){var _=this&&this.__decorate||function(v,a,s,p){var h,r=arguments.length,e=r<3?a:p===null?p=Object.getOwnPropertyDescriptor(a,s):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,a,s,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(a,s,e):h(a,s))||e);return r>3&&e&&Object.defineProperty(a,s,e),e},u=this&&this.__param||function(v,a){return function(s,p){a(s,p,v)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;var f=w(4725),d=w(2585),m=function(){function v(a,s,p,h,r,e){this._textarea=a,this._compositionView=s,this._bufferService=p,this._optionsService=h,this._coreService=r,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(a){var s=this;this._compositionView.textContent=a.data,this.updateCompositionElements(),setTimeout(function(){s._compositionPosition.end=s._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(a){if(this._isComposing||this._isSendingComposition){if(a.keyCode===229||a.keyCode===16||a.keyCode===17||a.keyCode===18)return!1;this._finalizeComposition(!1)}return a.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(a){var s=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,a){var p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(s._isSendingComposition){s._isSendingComposition=!1;var r;p.start+=s._dataAlreadySent.length,(r=s._isComposing?s._textarea.value.substring(p.start,p.end):s._textarea.value.substring(p.start)).length>0&&s._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;var h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}},v.prototype._handleAnyTextareaChanges=function(){var a=this,s=this._textarea.value;setTimeout(function(){if(!a._isComposing){var p=a._textarea.value.replace(s,"");p.length>0&&(a._dataAlreadySent=p,a._coreService.triggerDataEvent(p,!0))}},0)},v.prototype.updateCompositionElements=function(a){var s=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.actualCellHeight,r=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=p*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(t.width,1)+"px",this._textarea.style.height=Math.max(t.height,1)+"px",this._textarea.style.lineHeight=t.height+"px"}a||setTimeout(function(){return s.updateCompositionElements(!0)},0)}},_([u(2,d.IBufferService),u(3,d.IOptionsService),u(4,d.ICoreService),u(5,f.IRenderService)],v)}();c.CompositionHelper=m},9806:(W,c)=>{function w(_,u,f){var d=f.getBoundingClientRect(),m=_.getComputedStyle(f),v=parseInt(m.getPropertyValue("padding-left")),a=parseInt(m.getPropertyValue("padding-top"));return[u.clientX-d.left-v,u.clientY-d.top-a]}Object.defineProperty(c,"__esModule",{value:!0}),c.getRawByteCoords=c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=w,c.getCoords=function(_,u,f,d,m,v,a,s,p){if(v){var h=w(_,u,f);if(h)return h[0]=Math.ceil((h[0]+(p?a/2:0))/a),h[1]=Math.ceil(h[1]/s),h[0]=Math.min(Math.max(h[0],1),d+(p?1:0)),h[1]=Math.min(Math.max(h[1],1),m),h}},c.getRawByteCoords=function(_){if(_)return{x:_[0]+32,y:_[1]+32}}},9504:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;var _=w(2584);function u(s,p,h,r){var e=s-f(h,s),t=p-f(h,p),i=Math.abs(e-t)-function(n,l,o){for(var y=0,b=n-f(o,n),g=l-f(o,l),S=0;S<Math.abs(b-g);S++){var C=d(n,l)==="A"?-1:1,k=o.buffer.lines.get(b+C*S);k?.isWrapped&&y++}return y}(s,p,h);return a(i,v(d(s,p),r))}function f(s,p){for(var h=0,r=s.buffer.lines.get(p),e=r?.isWrapped;e&&p>=0&&p<s.rows;)h++,e=(r=s.buffer.lines.get(--p))==null?void 0:r.isWrapped;return h}function d(s,p){return s>p?"A":"B"}function m(s,p,h,r,e,t){for(var i=s,n=p,l="";i!==h||n!==r;)i+=e?1:-1,e&&i>t.cols-1?(l+=t.buffer.translateBufferLineToString(n,!1,s,i),i=0,s=0,n++):!e&&i<0&&(l+=t.buffer.translateBufferLineToString(n,!1,0,s+1),s=i=t.cols-1,n--);return l+t.buffer.translateBufferLineToString(n,!1,s,i)}function v(s,p){var h=p?"O":"[";return _.C0.ESC+h+s}function a(s,p){s=Math.floor(s);for(var h="",r=0;r<s;r++)h+=p;return h}c.moveToCellSequence=function(s,p,h,r){var e,t=h.buffer.x,i=h.buffer.y;if(!h.buffer.hasScrollback)return function(l,o,y,b,g,S){return u(o,b,g,S).length===0?"":a(m(l,o,l,o-f(g,o),!1,g).length,v("D",S))}(t,i,0,p,h,r)+u(i,p,h,r)+function(l,o,y,b,g,S){var C;C=u(o,b,g,S).length>0?b-f(g,b):o;var k=b,L=function(R,x,E,A,T,U){var q;return q=u(E,A,T,U).length>0?A-f(T,A):x,R<E&&q<=A||R>=E&&q<A?"C":"D"}(l,o,y,b,g,S);return a(m(l,C,y,k,L==="C",g).length,v(L,S))}(t,i,s,p,h,r);if(i===p)return e=t>s?"D":"C",a(Math.abs(t-s),v(e,r));e=i>p?"D":"C";var n=Math.abs(i-p);return a(function(l,o){return o.cols-l}(i>p?s:t,h)+(n-1)*h.cols+1+((i>p?t:s)-1),v(e,r))}},4389:function(W,c,w){var _=this&&this.__assign||function(){return _=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_.apply(this,arguments)},u=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var f=w(3236),d=w(9042),m=w(7975),v=w(7090),a=w(5741),s=w(8285),p=["cols","rows"],h=function(){function r(e){var t=this;this._core=new f.Terminal(e),this._addonManager=new a.AddonManager,this._publicOptions=_({},this._core.options);var i=function(y){return t._core.options[y]},n=function(y,b){t._checkReadonlyOptions(y),t._core.options[y]=b};for(var l in this._core.options){var o={get:i.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this._publicOptions,l,o)}}return r.prototype._checkReadonlyOptions=function(e){if(p.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},r.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(r.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new m.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"unicode",{get:function(){return this._checkProposedApi(),new v.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new s.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),r.prototype.blur=function(){this._core.blur()},r.prototype.focus=function(){this._core.focus()},r.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},r.prototype.open=function(e){this._core.open(e)},r.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},r.prototype.registerLinkMatcher=function(e,t,i){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,i)},r.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},r.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},r.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},r.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},r.prototype.registerMarker=function(e){return e===void 0&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},r.prototype.registerDecoration=function(e){var t,i,n;return this._checkProposedApi(),this._verifyPositiveIntegers((t=e.x)!==null&&t!==void 0?t:0,(i=e.width)!==null&&i!==void 0?i:0,(n=e.height)!==null&&n!==void 0?n:0),this._core.registerDecoration(e)},r.prototype.addMarker=function(e){return this.registerMarker(e)},r.prototype.hasSelection=function(){return this._core.hasSelection()},r.prototype.select=function(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)},r.prototype.getSelection=function(){return this._core.getSelection()},r.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},r.prototype.clearSelection=function(){this._core.clearSelection()},r.prototype.selectAll=function(){this._core.selectAll()},r.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},r.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},r.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},r.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},r.prototype.scrollToTop=function(){this._core.scrollToTop()},r.prototype.scrollToBottom=function(){this._core.scrollToBottom()},r.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},r.prototype.clear=function(){this._core.clear()},r.prototype.write=function(e,t){this._core.write(e,t)},r.prototype.writeUtf8=function(e,t){this._core.write(e,t)},r.prototype.writeln=function(e,t){this._core.write(e),this._core.write(`\r
4
- `,t)},r.prototype.paste=function(e){this._core.paste(e)},r.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},r.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},r.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},r.prototype.reset=function(){this._core.reset()},r.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},r.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(r,"strings",{get:function(){return d},enumerable:!1,configurable:!0}),r.prototype._verifyIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),o=l.next();!o.done;o=l.next()){var y=o.value;if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}}catch(b){e={error:b}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r.prototype._verifyPositiveIntegers=function(){for(var e,t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];try{for(var l=u(i),o=l.next();!o.done;o=l.next()){var y=o.value;if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}catch(b){e={error:b}}finally{try{o&&!o.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},r}();c.Terminal=h},1546:function(W,c,w){var _=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.BaseRenderLayer=void 0;var u=w(643),f=w(8803),d=w(1420),m=w(3734),v=w(1752),a=w(8055),s=w(9631),p=w(8978),h=function(){function r(e,t,i,n,l,o,y,b,g){this._container=e,this._alpha=n,this._colors=l,this._rendererId=o,this._bufferService=y,this._optionsService=b,this._decorationService=g,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return r.prototype.dispose=function(){var e;(0,s.removeElementFromParent)(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},r.prototype._initCanvas=function(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},r.prototype.onOptionsChanged=function(){},r.prototype.onBlur=function(){},r.prototype.onFocus=function(){},r.prototype.onCursorMove=function(){},r.prototype.onGridChanged=function(e,t){},r.prototype.onSelectionChanged=function(e,t,i){i===void 0&&(i=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i},r.prototype.setColors=function(e){this._refreshCharAtlas(e)},r.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},r.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,d.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},r.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},r.prototype.clearTextureAtlas=function(){var e;(e=this._charAtlas)===null||e===void 0||e.clear()},r.prototype._fillCells=function(e,t,i,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight)},r.prototype._fillMiddleLineAtCells=function(e,t,i){i===void 0&&(i=1);var n=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-n-window.devicePixelRatio,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillBottomLineAtCells=function(e,t,i){i===void 0&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},r.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},r.prototype._strokeRectAtCell=function(e,t,i,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},r.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))},r.prototype._clearCells=function(e,t,i,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,n*this._scaledCellHeight))},r.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=f.TEXT_BASELINE,this._clipRow(i);var n=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(n=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),n||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},r.prototype._drawChars=function(e,t,i){var n,l,o,y=this._getContrastColor(e,t,i);if(y||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,i,y);else{var b,g;e.isInverse()?(b=e.isBgDefault()?f.INVERTED_DEFAULT_COLOR:e.getBgColor(),g=e.isFgDefault()?f.INVERTED_DEFAULT_COLOR:e.getFgColor()):(g=e.isBgDefault()?u.DEFAULT_COLOR:e.getBgColor(),b=e.isFgDefault()?u.DEFAULT_COLOR:e.getFgColor()),b+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&b<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||u.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||u.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=g,this._currentGlyphIdentifier.fg=b,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var S=!1;try{for(var C=_(this._decorationService.getDecorationsAtCell(t,i)),k=C.next();!k.done;k=C.next()){var L=k.value;if(L.backgroundColorRGB||L.foregroundColorRGB){S=!0;break}}}catch(R){n={error:R}}finally{try{k&&!k.done&&(l=C.return)&&l.call(C)}finally{if(n)throw n.error}}!S&&(!((o=this._charAtlas)===null||o===void 0)&&o.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,i)}},r.prototype._drawUncachedChars=function(e,t,i,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=f.TEXT_BASELINE,e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=a.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=f.DIM_OPACITY);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,i*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},r.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},r.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},r.prototype._getContrastColor=function(e,t,i){var n,l,o,y,b=!1;try{for(var g=_(this._decorationService.getDecorationsAtCell(t,i)),S=g.next();!S.done;S=g.next()){var C=S.value;C.options.layer!=="top"&&b||(C.backgroundColorRGB&&(o=C.backgroundColorRGB.rgba),C.foregroundColorRGB&&(y=C.foregroundColorRGB.rgba),b=C.options.layer==="top")}}catch(Y){n={error:Y}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(n)throw n.error}}if(b||this._colors.selectionForeground&&this._isCellInSelection(t,i)&&(y=this._colors.selectionForeground.rgba),o||y||this._optionsService.rawOptions.minimumContrastRatio!==1&&!(0,v.excludeFromContrastRatioDemands)(e.getCode())){if(!o&&!y){var k=this._colors.contrastCache.getColor(e.bg,e.fg);if(k!==void 0)return k||void 0}var L=e.getFgColor(),R=e.getFgColorMode(),x=e.getBgColor(),E=e.getBgColorMode(),A=!!e.isInverse(),T=!!e.isInverse();if(A){var U=L;L=x,x=U;var q=R;R=E,E=q}var j=this._resolveBackgroundRgba(o!==void 0?50331648:E,o??x,A),z=this._resolveForegroundRgba(R,L,A,T),N=a.rgba.ensureContrastRatio(o??j,y??z,this._optionsService.rawOptions.minimumContrastRatio);if(!N){if(!y)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);N=y}var M={css:a.channels.toCss(N>>24&255,N>>16&255,N>>8&255),rgba:N};return o||y||this._colors.contrastCache.setColor(e.bg,e.fg,M),M}},r.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},r.prototype._resolveForegroundRgba=function(e,t,i,n){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&n&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},r.prototype._isCellInSelection=function(e,t){var i=this._selectionStart,n=this._selectionEnd;return!(!i||!n)&&(this._columnSelectMode?e>=i[0]&&t>=i[1]&&e<n[0]&&t<n[1]:t>i[1]&&t<n[1]||i[1]===n[1]&&t===i[1]&&e>=i[0]&&e<n[0]||i[1]<n[1]&&t===n[1]&&e<n[0]||i[1]<n[1]&&t===i[1]&&e>=i[0])},r}();c.BaseRenderLayer=h},2512:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),f=this&&this.__decorate||function(e,t,i,n){var l,o=arguments.length,y=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var b=e.length-1;b>=0;b--)(l=e[b])&&(y=(o<3?l(y):o>3?l(t,i,y):l(t,i))||y);return o>3&&y&&Object.defineProperty(t,i,y),y},d=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CursorRenderLayer=void 0;var m=w(1546),v=w(511),a=w(2585),s=w(4725),p=600,h=function(e){function t(i,n,l,o,y,b,g,S,C,k){var L=e.call(this,i,"cursor",n,!0,l,o,b,g,k)||this;return L._onRequestRedraw=y,L._coreService=S,L._coreBrowserService=C,L._cell=new v.CellData,L._state={x:0,y:0,isFocused:!1,style:"",width:0},L._cursorRenderers={bar:L._renderBarCursor.bind(L),block:L._renderBlockCursor.bind(L),underline:L._renderUnderlineCursor.bind(L)},L}return u(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(i){e.prototype.resize.call(this,i),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var i;this._clearCursor(),(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var i,n=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new r(this._coreBrowserService.isFocused,function(){n._render(!0)})):((i=this._cursorBlinkStateManager)===null||i===void 0||i.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var i;(i=this._cursorBlinkStateManager)===null||i===void 0||i.restartBlinkAnimation()},t.prototype.onGridChanged=function(i,n){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(i){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=n-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)this._clearCursor();else{var o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(n).loadCell(o,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var y=this._optionsService.rawOptions.cursorStyle;return y&&y!=="block"?this._cursorRenderers[y](o,l,this._cell):this._renderBlurCursor(o,l,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=l,this._state.isFocused=!1,this._state.style=y,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===o&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](o,l,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.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})},t.prototype._renderBarCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(i,n,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(i,n,l.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(l,i,n),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(i,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(i,n),this._ctx.restore()},t.prototype._renderBlurCursor=function(i,n,l){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(i,n,l.getWidth(),1),this._ctx.restore()},f([d(5,a.IBufferService),d(6,a.IOptionsService),d(7,a.ICoreService),d(8,s.ICoreBrowserService),d(9,a.IDecorationService)],t)}(m.BaseRenderLayer);c.CursorRenderLayer=h;var r=function(){function e(t,i){this._renderCallback=i,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.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)},e.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=void 0})))},e.prototype._restartInterval=function(t){var i=this;t===void 0&&(t=p),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(i._animationTimeRestarted){var n=p-(Date.now()-i._animationTimeRestarted);if(i._animationTimeRestarted=void 0,n>0)return void i._restartInterval(n)}i.isCursorVisible=!1,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0}),i._blinkInterval=window.setInterval(function(){if(i._animationTimeRestarted){var l=p-(Date.now()-i._animationTimeRestarted);return i._animationTimeRestarted=void 0,void i._restartInterval(l)}i.isCursorVisible=!i.isCursorVisible,i._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})},p)},t)},e.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)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(W,c,w){var _,u,f,d,m,v,a,s,p,h,r,e,t,i,n,l,o,y,b,g,S,C,k,L,R,x,E,A,T,U,q,j,z,N,M,Y,Z,ee,B,Q,X,F,O,D,H,G,V,J,re,oe,se,K,ae,de,Se,Be,Ht,jt,Ft,Wt,Ut,qt,Fe,We,Ue,qe,Ne,ze,Ke,Ge,Ve,Xe,Ze,Ye,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,dt,_t,pt,vt,yt,gt,mt,St,bt,Ct,wt,Lt,Et,xt,Rt,kt,Mt,At,Ot,Dt,Tt,Bt,Nt,zt,Kt,Gt,Vt,Xt,Zt,Yt,Jt,$t,Qt,er,tr,rr,ir,nr,lr=this&&this.__read||function(P,I){var ne=typeof Symbol=="function"&&P[Symbol.iterator];if(!ne)return P;var _e,be,ve=ne.call(P),ie=[];try{for(;(I===void 0||I-- >0)&&!(_e=ve.next()).done;)ie.push(_e.value)}catch(ye){be={error:ye}}finally{try{_e&&!_e.done&&(ne=ve.return)&&ne.call(ve)}finally{if(be)throw be.error}}return ie},or=this&&this.__values||function(P){var I=typeof Symbol=="function"&&Symbol.iterator,ne=I&&P[I],_e=0;if(ne)return ne.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&_e>=P.length&&(P=void 0),{value:P&&P[_e++],done:!P}}};throw new TypeError(I?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.tryDrawCustomChar=c.powerlineDefinitions=c.boxDrawingDefinitions=c.blockElementDefinitions=void 0;var hr=w(1752);c.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 vr={"\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]]};c.boxDrawingDefinitions={"\u2500":(_={},_[1]="M0,.5 L1,.5",_),"\u2501":(u={},u[3]="M0,.5 L1,.5",u),"\u2502":(f={},f[1]="M.5,0 L.5,1",f),"\u2503":(d={},d[3]="M.5,0 L.5,1",d),"\u250C":(m={},m[1]="M0.5,1 L.5,.5 L1,.5",m),"\u250F":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"\u2510":(a={},a[1]="M0,.5 L.5,.5 L.5,1",a),"\u2513":(s={},s[3]="M0,.5 L.5,.5 L.5,1",s),"\u2514":(p={},p[1]="M.5,0 L.5,.5 L1,.5",p),"\u2517":(h={},h[3]="M.5,0 L.5,.5 L1,.5",h),"\u2518":(r={},r[1]="M.5,0 L.5,.5 L0,.5",r),"\u251B":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"\u251C":(t={},t[1]="M.5,0 L.5,1 M.5,.5 L1,.5",t),"\u2523":(i={},i[3]="M.5,0 L.5,1 M.5,.5 L1,.5",i),"\u2524":(n={},n[1]="M.5,0 L.5,1 M.5,.5 L0,.5",n),"\u252B":(l={},l[3]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"\u252C":(o={},o[1]="M0,.5 L1,.5 M.5,.5 L.5,1",o),"\u2533":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,1",y),"\u2534":(b={},b[1]="M0,.5 L1,.5 M.5,.5 L.5,0",b),"\u253B":(g={},g[3]="M0,.5 L1,.5 M.5,.5 L.5,0",g),"\u253C":(S={},S[1]="M0,.5 L1,.5 M.5,0 L.5,1",S),"\u254B":(C={},C[3]="M0,.5 L1,.5 M.5,0 L.5,1",C),"\u2574":(k={},k[1]="M.5,.5 L0,.5",k),"\u2578":(L={},L[3]="M.5,.5 L0,.5",L),"\u2575":(R={},R[1]="M.5,.5 L.5,0",R),"\u2579":(x={},x[3]="M.5,.5 L.5,0",x),"\u2576":(E={},E[1]="M.5,.5 L1,.5",E),"\u257A":(A={},A[3]="M.5,.5 L1,.5",A),"\u2577":(T={},T[1]="M.5,.5 L.5,1",T),"\u257B":(U={},U[3]="M.5,.5 L.5,1",U),"\u2550":(q={},q[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},q),"\u2551":(j={},j[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},j),"\u2552":(z={},z[1]=function(P,I){return"M.5,1 L.5,"+(.5-I)+" L1,"+(.5-I)+" M.5,"+(.5+I)+" L1,"+(.5+I)},z),"\u2553":(N={},N[1]=function(P,I){return"M"+(.5-P)+",1 L"+(.5-P)+",.5 L1,.5 M"+(.5+P)+",.5 L"+(.5+P)+",1"},N),"\u2554":(M={},M[1]=function(P,I){return"M1,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1"},M),"\u2555":(Y={},Y[1]=function(P,I){return"M0,"+(.5-I)+" L.5,"+(.5-I)+" L.5,1 M0,"+(.5+I)+" L.5,"+(.5+I)},Y),"\u2556":(Z={},Z[1]=function(P,I){return"M"+(.5+P)+",1 L"+(.5+P)+",.5 L0,.5 M"+(.5-P)+",.5 L"+(.5-P)+",1"},Z),"\u2557":(ee={},ee[1]=function(P,I){return"M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M0,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",1"},ee),"\u2558":(B={},B[1]=function(P,I){return"M.5,0 L.5,"+(.5+I)+" L1,"+(.5+I)+" M.5,"+(.5-I)+" L1,"+(.5-I)},B),"\u2559":(Q={},Q[1]=function(P,I){return"M1,.5 L"+(.5-P)+",.5 L"+(.5-P)+",0 M"+(.5+P)+",.5 L"+(.5+P)+",0"},Q),"\u255A":(X={},X[1]=function(P,I){return"M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0 M1,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",0"},X),"\u255B":(F={},F[1]=function(P,I){return"M0,"+(.5+I)+" L.5,"+(.5+I)+" L.5,0 M0,"+(.5-I)+" L.5,"+(.5-I)},F),"\u255C":(O={},O[1]=function(P,I){return"M0,.5 L"+(.5+P)+",.5 L"+(.5+P)+",0 M"+(.5-P)+",.5 L"+(.5-P)+",0"},O),"\u255D":(D={},D[1]=function(P,I){return"M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M0,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",0"},D),"\u255E":(H={},H[1]=function(P,I){return"M.5,0 L.5,1 M.5,"+(.5-I)+" L1,"+(.5-I)+" M.5,"+(.5+I)+" L1,"+(.5+I)},H),"\u255F":(G={},G[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1 M"+(.5+P)+",.5 L1,.5"},G),"\u2560":(V={},V[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},V),"\u2561":(J={},J[1]=function(P,I){return"M.5,0 L.5,1 M0,"+(.5-I)+" L.5,"+(.5-I)+" M0,"+(.5+I)+" L.5,"+(.5+I)},J),"\u2562":(re={},re[1]=function(P,I){return"M0,.5 L"+(.5-P)+",.5 M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},re),"\u2563":(oe={},oe[1]=function(P,I){return"M"+(.5+P)+",0 L"+(.5+P)+",1 M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0"},oe),"\u2564":(se={},se[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)+" M.5,"+(.5+I)+" L.5,1"},se),"\u2565":(K={},K[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",.5 L"+(.5-P)+",1 M"+(.5+P)+",.5 L"+(.5+P)+",1"},K),"\u2566":(ae={},ae[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1"},ae),"\u2567":(de={},de[1]=function(P,I){return"M.5,0 L.5,"+(.5-I)+" M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},de),"\u2568":(Se={},Se[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",.5 L"+(.5-P)+",0 M"+(.5+P)+",.5 L"+(.5+P)+",0"},Se),"\u2569":(Be={},Be[1]=function(P,I){return"M0,"+(.5+I)+" L1,"+(.5+I)+" M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},Be),"\u256A":(Ht={},Ht[1]=function(P,I){return"M.5,0 L.5,1 M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},Ht),"\u256B":(jt={},jt[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},jt),"\u256C":(Ft={},Ft[1]=function(P,I){return"M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1 M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},Ft),"\u2571":(Wt={},Wt[1]="M1,0 L0,1",Wt),"\u2572":(Ut={},Ut[1]="M0,0 L1,1",Ut),"\u2573":(qt={},qt[1]="M1,0 L0,1 M0,0 L1,1",qt),"\u257C":(Fe={},Fe[1]="M.5,.5 L0,.5",Fe[3]="M.5,.5 L1,.5",Fe),"\u257D":(We={},We[1]="M.5,.5 L.5,0",We[3]="M.5,.5 L.5,1",We),"\u257E":(Ue={},Ue[1]="M.5,.5 L1,.5",Ue[3]="M.5,.5 L0,.5",Ue),"\u257F":(qe={},qe[1]="M.5,.5 L.5,1",qe[3]="M.5,.5 L.5,0",qe),"\u250D":(Ne={},Ne[1]="M.5,.5 L.5,1",Ne[3]="M.5,.5 L1,.5",Ne),"\u250E":(ze={},ze[1]="M.5,.5 L1,.5",ze[3]="M.5,.5 L.5,1",ze),"\u2511":(Ke={},Ke[1]="M.5,.5 L.5,1",Ke[3]="M.5,.5 L0,.5",Ke),"\u2512":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,.5 L.5,1",Ge),"\u2515":(Ve={},Ve[1]="M.5,.5 L.5,0",Ve[3]="M.5,.5 L1,.5",Ve),"\u2516":(Xe={},Xe[1]="M.5,.5 L1,.5",Xe[3]="M.5,.5 L.5,0",Xe),"\u2519":(Ze={},Ze[1]="M.5,.5 L.5,0",Ze[3]="M.5,.5 L0,.5",Ze),"\u251A":(Ye={},Ye[1]="M.5,.5 L0,.5",Ye[3]="M.5,.5 L.5,0",Ye),"\u251D":(Je={},Je[1]="M.5,0 L.5,1",Je[3]="M.5,.5 L1,.5",Je),"\u251E":($e={},$e[1]="M0.5,1 L.5,.5 L1,.5",$e[3]="M.5,.5 L.5,0",$e),"\u251F":(Qe={},Qe[1]="M.5,0 L.5,.5 L1,.5",Qe[3]="M.5,.5 L.5,1",Qe),"\u2520":(et={},et[1]="M.5,.5 L1,.5",et[3]="M.5,0 L.5,1",et),"\u2521":(tt={},tt[1]="M.5,.5 L.5,1",tt[3]="M.5,0 L.5,.5 L1,.5",tt),"\u2522":(rt={},rt[1]="M.5,.5 L.5,0",rt[3]="M0.5,1 L.5,.5 L1,.5",rt),"\u2525":(it={},it[1]="M.5,0 L.5,1",it[3]="M.5,.5 L0,.5",it),"\u2526":(nt={},nt[1]="M0,.5 L.5,.5 L.5,1",nt[3]="M.5,.5 L.5,0",nt),"\u2527":(ot={},ot[1]="M.5,0 L.5,.5 L0,.5",ot[3]="M.5,.5 L.5,1",ot),"\u2528":(st={},st[1]="M.5,.5 L0,.5",st[3]="M.5,0 L.5,1",st),"\u2529":(at={},at[1]="M.5,.5 L.5,1",at[3]="M.5,0 L.5,.5 L0,.5",at),"\u252A":(ct={},ct[1]="M.5,.5 L.5,0",ct[3]="M0,.5 L.5,.5 L.5,1",ct),"\u252D":(lt={},lt[1]="M0.5,1 L.5,.5 L1,.5",lt[3]="M.5,.5 L0,.5",lt),"\u252E":(ht={},ht[1]="M0,.5 L.5,.5 L.5,1",ht[3]="M.5,.5 L1,.5",ht),"\u252F":(ut={},ut[1]="M.5,.5 L.5,1",ut[3]="M0,.5 L1,.5",ut),"\u2530":(ft={},ft[1]="M0,.5 L1,.5",ft[3]="M.5,.5 L.5,1",ft),"\u2531":(dt={},dt[1]="M.5,.5 L1,.5",dt[3]="M0,.5 L.5,.5 L.5,1",dt),"\u2532":(_t={},_t[1]="M.5,.5 L0,.5",_t[3]="M0.5,1 L.5,.5 L1,.5",_t),"\u2535":(pt={},pt[1]="M.5,0 L.5,.5 L1,.5",pt[3]="M.5,.5 L0,.5",pt),"\u2536":(vt={},vt[1]="M.5,0 L.5,.5 L0,.5",vt[3]="M.5,.5 L1,.5",vt),"\u2537":(yt={},yt[1]="M.5,.5 L.5,0",yt[3]="M0,.5 L1,.5",yt),"\u2538":(gt={},gt[1]="M0,.5 L1,.5",gt[3]="M.5,.5 L.5,0",gt),"\u2539":(mt={},mt[1]="M.5,.5 L1,.5",mt[3]="M.5,0 L.5,.5 L0,.5",mt),"\u253A":(St={},St[1]="M.5,.5 L0,.5",St[3]="M.5,0 L.5,.5 L1,.5",St),"\u253D":(bt={},bt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",bt[3]="M.5,.5 L0,.5",bt),"\u253E":(Ct={},Ct[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Ct[3]="M.5,.5 L1,.5",Ct),"\u253F":(wt={},wt[1]="M.5,0 L.5,1",wt[3]="M0,.5 L1,.5",wt),"\u2540":(Lt={},Lt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Lt[3]="M.5,.5 L.5,0",Lt),"\u2541":(Et={},Et[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Et[3]="M.5,.5 L.5,1",Et),"\u2542":(xt={},xt[1]="M0,.5 L1,.5",xt[3]="M.5,0 L.5,1",xt),"\u2543":(Rt={},Rt[1]="M0.5,1 L.5,.5 L1,.5",Rt[3]="M.5,0 L.5,.5 L0,.5",Rt),"\u2544":(kt={},kt[1]="M0,.5 L.5,.5 L.5,1",kt[3]="M.5,0 L.5,.5 L1,.5",kt),"\u2545":(Mt={},Mt[1]="M.5,0 L.5,.5 L1,.5",Mt[3]="M0,.5 L.5,.5 L.5,1",Mt),"\u2546":(At={},At[1]="M.5,0 L.5,.5 L0,.5",At[3]="M0.5,1 L.5,.5 L1,.5",At),"\u2547":(Ot={},Ot[1]="M.5,.5 L.5,1",Ot[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ot),"\u2548":(Dt={},Dt[1]="M.5,.5 L.5,0",Dt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",Dt),"\u2549":(Tt={},Tt[1]="M.5,.5 L1,.5",Tt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Tt),"\u254A":(Bt={},Bt[1]="M.5,.5 L0,.5",Bt[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Bt),"\u254C":(Nt={},Nt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Nt),"\u254D":(zt={},zt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",zt),"\u2504":(Kt={},Kt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Kt),"\u2505":(Gt={},Gt[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Gt),"\u2508":(Vt={},Vt[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",Vt),"\u2509":(Xt={},Xt[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",Xt),"\u254E":(Zt={},Zt[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Zt),"\u254F":(Yt={},Yt[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Yt),"\u2506":(Jt={},Jt[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Jt),"\u2507":($t={},$t[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",$t),"\u250A":(Qt={},Qt[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Qt),"\u250B":(er={},er[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",er),"\u256D":(tr={},tr[1]="C.5,1,.5,.5,1,.5",tr),"\u256E":(rr={},rr[1]="C.5,1,.5,.5,0,.5",rr),"\u256F":(ir={},ir[1]="C.5,0,.5,.5,0,.5",ir),"\u2570":(nr={},nr[1]="C.5,0,.5,.5,1,.5",nr)},c.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0},"\uE0B1":{d:"M0,0 L1,.5 L0,1",type:1,horizontalPadding:.5},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0},"\uE0B3":{d:"M1,0 L0,.5 L1,1",type:1,horizontalPadding:.5}},c.tryDrawCustomChar=function(P,I,ne,_e,be,ve){var ie=c.blockElementDefinitions[I];if(ie)return function(te,pe,Oe,De,Re,ke){for(var ce=0;ce<pe.length;ce++){var le=pe[ce],$=Re/8,he=ke/8;te.fillRect(Oe+le.x*$,De+le.y*he,le.w*$,le.h*he)}}(P,ie,ne,_e,be,ve),!0;var ye=vr[I];if(ye)return function(te,pe,Oe,De,Re,ke){var ce,le=ur.get(pe);le||(le=new Map,ur.set(pe,le));var $=te.fillStyle;if(typeof $!="string")throw new Error('Unexpected fillStyle type "'+$+'"');var he=le.get($);if(!he){var fe=pe[0].length,ge=pe.length,we=document.createElement("canvas");we.width=fe,we.height=ge;var Te=(0,hr.throwIfFalsy)(we.getContext("2d")),me=new ImageData(fe,ge),Pe=void 0,Me=void 0,xe=void 0,Ie=void 0;if($.startsWith("#"))Pe=parseInt($.slice(1,3),16),Me=parseInt($.slice(3,5),16),xe=parseInt($.slice(5,7),16),Ie=$.length>7&&parseInt($.slice(7,9),16)||1;else{if(!$.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+$+'" when drawing pattern glyph');Pe=(ce=lr($.substring(5,$.length-1).split(",").map(function(je){return parseFloat(je)}),4))[0],Me=ce[1],xe=ce[2],Ie=ce[3]}for(var Le=0;Le<ge;Le++)for(var Ee=0;Ee<fe;Ee++)me.data[4*(Le*fe+Ee)]=Pe,me.data[4*(Le*fe+Ee)+1]=Me,me.data[4*(Le*fe+Ee)+2]=xe,me.data[4*(Le*fe+Ee)+3]=pe[Le][Ee]*(255*Ie);Te.putImageData(me,0,0),he=(0,hr.throwIfFalsy)(te.createPattern(we,null)),le.set($,he)}te.fillStyle=he,te.fillRect(Oe,De,Re,ke)}(P,ye,ne,_e,be,ve),!0;var Ce=c.boxDrawingDefinitions[I];if(Ce)return function(te,pe,Oe,De,Re,ke){var ce,le,$,he;te.strokeStyle=te.fillStyle;try{for(var fe=or(Object.entries(pe)),ge=fe.next();!ge.done;ge=fe.next()){var we=lr(ge.value,2),Te=we[0],me=we[1];te.beginPath(),te.lineWidth=window.devicePixelRatio*Number.parseInt(Te);var Pe=void 0;Pe=typeof me=="function"?me(.15,.15/ke*Re):me;try{for(var Me=($=void 0,or(Pe.split(" "))),xe=Me.next();!xe.done;xe=Me.next()){var Ie=xe.value,Le=Ie[0],Ee=dr[Le];if(Ee){var je=Ie.substring(1).split(",");je[0]&&je[1]&&Ee(te,_r(je,Re,ke,Oe,De))}else console.error('Could not find drawing instructions for "'+Le+'"')}}catch(sr){$={error:sr}}finally{try{xe&&!xe.done&&(he=Me.return)&&he.call(Me)}finally{if($)throw $.error}}te.stroke(),te.closePath()}}catch(sr){ce={error:sr}}finally{try{ge&&!ge.done&&(le=fe.return)&&le.call(fe)}finally{if(ce)throw ce.error}}}(P,Ce,ne,_e,be,ve),!0;var He=c.powerlineDefinitions[I];return!!He&&(function(te,pe,Oe,De,Re,ke){var ce,le;te.beginPath(),te.lineWidth=window.devicePixelRatio;try{for(var $=or(pe.d.split(" ")),he=$.next();!he.done;he=$.next()){var fe=he.value,ge=fe[0],we=dr[ge];if(we){var Te=fe.substring(1).split(",");Te[0]&&Te[1]&&we(te,_r(Te,Re,ke,Oe,De,pe.horizontalPadding))}else console.error('Could not find drawing instructions for "'+ge+'"')}}catch(me){ce={error:me}}finally{try{he&&!he.done&&(le=$.return)&&le.call($)}finally{if(ce)throw ce.error}}pe.type===1?(te.strokeStyle=te.fillStyle,te.stroke()):te.fill(),te.closePath()}(P,He,ne,_e,be,ve),!0)};var ur=new Map;function fr(P,I,ne){return ne===void 0&&(ne=0),Math.max(Math.min(P,I),ne)}var dr={C:function(P,I){return P.bezierCurveTo(I[0],I[1],I[2],I[3],I[4],I[5])},L:function(P,I){return P.lineTo(I[0],I[1])},M:function(P,I){return P.moveTo(I[0],I[1])}};function _r(P,I,ne,_e,be,ve){ve===void 0&&(ve=0);var ie=P.map(function(He){return parseFloat(He)||parseInt(He)});if(ie.length<2)throw new Error("Too few arguments for instruction");for(var ye=0;ye<ie.length;ye+=2)ie[ye]*=I-2*ve*window.devicePixelRatio,ie[ye]!==0&&(ie[ye]=fr(Math.round(ie[ye]+.5)-.5,I,0)),ie[ye]+=_e+ve*window.devicePixelRatio;for(var Ce=1;Ce<ie.length;Ce+=2)ie[Ce]*=ne,ie[Ce]!==0&&(ie[Ce]=fr(Math.round(ie[Ce]+.5)-.5,ne,0)),ie[Ce]+=be;return ie}},3700:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.GridCache=void 0;var w=function(){function _(){this.cache=[]}return _.prototype.resize=function(u,f){for(var d=0;d<u;d++){this.cache.length<=d&&this.cache.push([]);for(var m=this.cache[d].length;m<f;m++)this.cache[d].push(void 0);this.cache[d].length=f}this.cache.length=u},_.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0},_}();c.GridCache=w},5098:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},_(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}_(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),f=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var o=h.length-1;o>=0;o--)(i=h[o])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},d=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.LinkRenderLayer=void 0;var m=w(1546),v=w(8803),a=w(2040),s=w(2585),p=function(h){function r(e,t,i,n,l,o,y,b,g){var S=h.call(this,e,"link",t,!0,i,n,y,b,g)||this;return l.onShowLinkUnderline(function(C){return S._onShowLinkUnderline(C)}),l.onHideLinkUnderline(function(C){return S._onHideLinkUnderline(C)}),o.onShowLinkUnderline(function(C){return S._onShowLinkUnderline(C)}),o.onHideLinkUnderline(function(C){return S._onHideLinkUnderline(C)}),S}return u(r,h),r.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state=void 0},r.prototype.reset=function(){this._clearCurrentLink()},r.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},r.prototype._onShowLinkUnderline=function(e){if(e.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,a.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},r.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},f([d(6,s.IBufferService),d(7,s.IOptionsService),d(8,s.IDecorationService)],r)}(m.BaseRenderLayer);c.LinkRenderLayer=p},3525:function(W,c,w){var _,u=this&&this.__extends||(_=function(o,y){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,g){b.__proto__=g}||function(b,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(b[S]=g[S])},_(o,y)},function(o,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=o}_(o,y),o.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),f=this&&this.__decorate||function(o,y,b,g){var S,C=arguments.length,k=C<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,b):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,y,b,g);else for(var L=o.length-1;L>=0;L--)(S=o[L])&&(k=(C<3?S(k):C>3?S(y,b,k):S(y,b))||k);return C>3&&k&&Object.defineProperty(y,b,k),k},d=this&&this.__param||function(o,y){return function(b,g){y(b,g,o)}},m=this&&this.__values||function(o){var y=typeof Symbol=="function"&&Symbol.iterator,b=y&&o[y],g=0;if(b)return b.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&g>=o.length&&(o=void 0),{value:o&&o[g++],done:!o}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.Renderer=void 0;var v=w(9596),a=w(4149),s=w(2512),p=w(5098),h=w(844),r=w(4725),e=w(2585),t=w(1420),i=w(8460),n=1,l=function(o){function y(b,g,S,C,k,L,R,x){var E=o.call(this)||this;E._colors=b,E._screenElement=g,E._bufferService=L,E._charSizeService=R,E._optionsService=x,E._id=n++,E._onRequestRedraw=new i.EventEmitter;var A=E._optionsService.rawOptions.allowTransparency;return E._renderLayers=[k.createInstance(v.TextRenderLayer,E._screenElement,0,E._colors,A,E._id),k.createInstance(a.SelectionRenderLayer,E._screenElement,1,E._colors,E._id),k.createInstance(p.LinkRenderLayer,E._screenElement,2,E._colors,E._id,S,C),k.createInstance(s.CursorRenderLayer,E._screenElement,3,E._colors,E._id,E._onRequestRedraw)],E.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},E._devicePixelRatio=window.devicePixelRatio,E._updateDimensions(),E.onOptionsChanged(),E}return u(y,o),Object.defineProperty(y.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){var b,g;try{for(var S=m(this._renderLayers),C=S.next();!C.done;C=S.next())C.value.dispose()}catch(k){b={error:k}}finally{try{C&&!C.done&&(g=S.return)&&g.call(S)}finally{if(b)throw b.error}}o.prototype.dispose.call(this),(0,t.removeTerminalFromCache)(this._id)},y.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},y.prototype.setColors=function(b){var g,S;this._colors=b;try{for(var C=m(this._renderLayers),k=C.next();!k.done;k=C.next()){var L=k.value;L.setColors(this._colors),L.reset()}}catch(R){g={error:R}}finally{try{k&&!k.done&&(S=C.return)&&S.call(C)}finally{if(g)throw g.error}}},y.prototype.onResize=function(b,g){var S,C;this._updateDimensions();try{for(var k=m(this._renderLayers),L=k.next();!L.done;L=k.next())L.value.resize(this.dimensions)}catch(R){S={error:R}}finally{try{L&&!L.done&&(C=k.return)&&C.call(k)}finally{if(S)throw S.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},y.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},y.prototype.onBlur=function(){this._runOperation(function(b){return b.onBlur()})},y.prototype.onFocus=function(){this._runOperation(function(b){return b.onFocus()})},y.prototype.onSelectionChanged=function(b,g,S){S===void 0&&(S=!1),this._runOperation(function(C){return C.onSelectionChanged(b,g,S)}),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},y.prototype.onCursorMove=function(){this._runOperation(function(b){return b.onCursorMove()})},y.prototype.onOptionsChanged=function(){this._runOperation(function(b){return b.onOptionsChanged()})},y.prototype.clear=function(){this._runOperation(function(b){return b.reset()})},y.prototype._runOperation=function(b){var g,S;try{for(var C=m(this._renderLayers),k=C.next();!k.done;k=C.next())b(k.value)}catch(L){g={error:L}}finally{try{k&&!k.done&&(S=C.return)&&S.call(C)}finally{if(g)throw g.error}}},y.prototype.renderRows=function(b,g){var S,C;try{for(var k=m(this._renderLayers),L=k.next();!L.done;L=k.next())L.value.onGridChanged(b,g)}catch(R){S={error:R}}finally{try{L&&!L.done&&(C=k.return)&&C.call(k)}finally{if(S)throw S.error}}},y.prototype.clearTextureAtlas=function(){var b,g;try{for(var S=m(this._renderLayers),C=S.next();!C.done;C=S.next())C.value.clearTextureAtlas()}catch(k){b={error:k}}finally{try{C&&!C.done&&(g=S.return)&&g.call(S)}finally{if(b)throw b.error}}},y.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},f([d(4,e.IInstantiationService),d(5,e.IBufferService),d(6,r.ICharSizeService),d(7,e.IOptionsService)],y)}(h.Disposable);c.Renderer=l},1752:(W,c)=>{function w(_){return 57508<=_&&_<=57558}Object.defineProperty(c,"__esModule",{value:!0}),c.excludeFromContrastRatioDemands=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},c.isPowerlineGlyph=w,c.excludeFromContrastRatioDemands=function(_){return w(_)||function(u){return 9472<=u&&u<=9631}(_)}},4149:function(W,c,w){var _,u=this&&this.__extends||(_=function(s,p){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(h[e]=r[e])},_(s,p)},function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function h(){this.constructor=s}_(s,p),s.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}),f=this&&this.__decorate||function(s,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(s,p,h,r);else for(var n=s.length-1;n>=0;n--)(e=s[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},d=this&&this.__param||function(s,p){return function(h,r){p(h,r,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionRenderLayer=void 0;var m=w(1546),v=w(2585),a=function(s){function p(h,r,e,t,i,n,l){var o=s.call(this,h,"selection",r,!0,e,t,i,n,l)||this;return o._clearState(),o}return u(p,s),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(h){s.prototype.resize.call(this,h),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(h,r,e){if(s.prototype.onSelectionChanged.call(this,h,r,e),this._didStateChange(h,r,e,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var t=h[1]-this._bufferService.buffer.ydisp,i=r[1]-this._bufferService.buffer.ydisp,n=Math.max(t,0),l=Math.min(i,this._bufferService.rows-1);if(n>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var o=h[0],y=r[0]-o,b=l-n+1;this._fillCells(o,n,y,b)}else{o=t===n?h[0]:0;var g=n===i?r[0]:this._bufferService.cols;this._fillCells(o,n,g-o,1);var S=Math.max(l-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,S),n!==l){var C=i===l?r[0]:this._bufferService.cols;this._fillCells(0,l,C,1)}}this._state.start=[h[0],h[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(h,r,e,t){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||e!==this._state.columnSelectMode||t!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},f([d(4,v.IBufferService),d(5,v.IOptionsService),d(6,v.IDecorationService)],p)}(m.BaseRenderLayer);c.SelectionRenderLayer=a},9596:function(W,c,w){var _,u=this&&this.__extends||(_=function(n,l){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,y){o.__proto__=y}||function(o,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(o[b]=y[b])},_(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function o(){this.constructor=n}_(n,l),n.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}),f=this&&this.__decorate||function(n,l,o,y){var b,g=arguments.length,S=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,o):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(n,l,o,y);else for(var C=n.length-1;C>=0;C--)(b=n[C])&&(S=(g<3?b(S):g>3?b(l,o,S):b(l,o))||S);return g>3&&S&&Object.defineProperty(l,o,S),S},d=this&&this.__param||function(n,l){return function(o,y){l(o,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,o=l&&n[l],y=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.TextRenderLayer=void 0;var v=w(3700),a=w(1546),s=w(3734),p=w(643),h=w(511),r=w(2585),e=w(4725),t=w(4269),i=function(n){function l(o,y,b,g,S,C,k,L,R){var x=n.call(this,o,"text",y,g,b,S,C,k,R)||this;return x._characterJoinerService=L,x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new h.CellData,x._state=new v.GridCache,x}return u(l,n),l.prototype.resize=function(o){n.prototype.resize.call(this,o);var y=this._getFont(!1,!1);this._characterWidth===o.scaledCharWidth&&this._characterFont===y||(this._characterWidth=o.scaledCharWidth,this._characterFont=y,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(o,y,b){for(var g=o;g<=y;g++)for(var S=g+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.lines.get(S),k=this._characterJoinerService.getJoinedCharacters(S),L=0;L<this._bufferService.cols;L++){C.loadCell(L,this._workCell);var R=this._workCell,x=!1,E=L;if(R.getWidth()!==0){if(k.length>0&&L===k[0][0]){x=!0;var A=k.shift();R=new t.JoinedCellData(this._workCell,C.translateToString(!0,A[0],A[1]),A[1]-A[0]),E=A[1]-1}!x&&this._isOverlapping(R)&&E<C.length-1&&C.getCodePoint(E+1)===p.NULL_CELL_CODE&&(R.content&=-12582913,R.content|=2<<22),b(R,L,g),L=E}}},l.prototype._drawBackground=function(o,y){var b=this,g=this._ctx,S=this._bufferService.cols,C=0,k=0,L=null;g.save(),this._forEachCell(o,y,function(R,x,E){var A,T,U=null;R.isInverse()?U=R.isFgDefault()?b._colors.foreground.css:R.isFgRGB()?"rgb("+s.AttributeData.toColorRGB(R.getFgColor()).join(",")+")":b._colors.ansi[R.getFgColor()].css:R.isBgRGB()?U="rgb("+s.AttributeData.toColorRGB(R.getBgColor()).join(",")+")":R.isBgPalette()&&(U=b._colors.ansi[R.getBgColor()].css);var q=!1;try{for(var j=m(b._decorationService.getDecorationsAtCell(x,b._bufferService.buffer.ydisp+E)),z=j.next();!z.done;z=j.next()){var N=z.value;N.options.layer!=="top"&&q||(N.backgroundColorRGB&&(U=N.backgroundColorRGB.css),q=N.options.layer==="top")}}catch(M){A={error:M}}finally{try{z&&!z.done&&(T=j.return)&&T.call(j)}finally{if(A)throw A.error}}L===null&&(C=x,k=E),E!==k?(g.fillStyle=L||"",b._fillCells(C,k,S-C,1),C=x,k=E):L!==U&&(g.fillStyle=L||"",b._fillCells(C,k,x-C,1),C=x,k=E),L=U}),L!==null&&(g.fillStyle=L,this._fillCells(C,k,S-C,1)),g.restore()},l.prototype._drawForeground=function(o,y){var b=this;this._forEachCell(o,y,function(g,S,C){if(!g.isInvisible()&&(b._drawChars(g,S,C),g.isUnderline()||g.isStrikethrough())){if(b._ctx.save(),g.isInverse())if(g.isBgDefault())b._ctx.fillStyle=b._colors.background.css;else if(g.isBgRGB())b._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(g.getBgColor()).join(",")+")";else{var k=g.getBgColor();b._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&k<8&&(k+=8),b._ctx.fillStyle=b._colors.ansi[k].css}else if(g.isFgDefault())b._ctx.fillStyle=b._colors.foreground.css;else if(g.isFgRGB())b._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(g.getFgColor()).join(",")+")";else{var L=g.getFgColor();b._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&L<8&&(L+=8),b._ctx.fillStyle=b._colors.ansi[L].css}g.isStrikethrough()&&b._fillMiddleLineAtCells(S,C,g.getWidth()),g.isUnderline()&&b._fillBottomLineAtCells(S,C,g.getWidth()),b._ctx.restore()}})},l.prototype.onGridChanged=function(o,y){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,o,this._bufferService.cols,y-o+1),this._drawBackground(o,y),this._drawForeground(o,y))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},l.prototype._isOverlapping=function(o){if(o.getWidth()!==1||o.getCode()<256)return!1;var y=o.getChars();if(this._characterOverlapCache.hasOwnProperty(y))return this._characterOverlapCache[y];this._ctx.save(),this._ctx.font=this._characterFont;var b=Math.floor(this._ctx.measureText(y).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[y]=b,b},f([d(5,r.IBufferService),d(6,r.IOptionsService),d(7,e.ICharacterJoinerService),d(8,r.IDecorationService)],l)}(a.BaseRenderLayer);c.TextRenderLayer=i},9616:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BaseCharAtlas=void 0;var w=function(){function _(){this._didWarmUp=!1}return _.prototype.dispose=function(){},_.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},_.prototype._doWarmUp=function(){},_.prototype.clear=function(){},_.prototype.beginFrame=function(){},_}();c.BaseCharAtlas=w},1420:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.removeTerminalFromCache=c.acquireCharAtlas=void 0;var _=w(2040),u=w(1906),f=[];c.acquireCharAtlas=function(d,m,v,a,s){for(var p=(0,_.generateConfig)(a,s,d,v),h=0;h<f.length;h++){var r=(e=f[h]).ownedBy.indexOf(m);if(r>=0){if((0,_.configEquals)(e.config,p))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),f.splice(h,1)):e.ownedBy.splice(r,1);break}}for(h=0;h<f.length;h++){var e=f[h];if((0,_.configEquals)(e.config,p))return e.ownedBy.push(m),e.atlas}var t={atlas:new u.DynamicCharAtlas(document,p),config:p,ownedBy:[m]};return f.push(t),t.atlas},c.removeTerminalFromCache=function(d){for(var m=0;m<f.length;m++){var v=f[m].ownedBy.indexOf(d);if(v!==-1){f[m].ownedBy.length===1?(f[m].atlas.dispose(),f.splice(m,1)):f[m].ownedBy.splice(v,1);break}}}},2040:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.is256Color=c.configEquals=c.generateConfig=void 0;var _=w(643);c.generateConfig=function(u,f,d,m){var v={foreground:m.foreground,background:m.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:m.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:u,scaledCharHeight:f,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,colors:v}},c.configEquals=function(u,f){for(var d=0;d<u.colors.ansi.length;d++)if(u.colors.ansi[d].rgba!==f.colors.ansi[d].rgba)return!1;return u.devicePixelRatio===f.devicePixelRatio&&u.fontFamily===f.fontFamily&&u.fontSize===f.fontSize&&u.fontWeight===f.fontWeight&&u.fontWeightBold===f.fontWeightBold&&u.allowTransparency===f.allowTransparency&&u.scaledCharWidth===f.scaledCharWidth&&u.scaledCharHeight===f.scaledCharHeight&&u.colors.foreground===f.colors.foreground&&u.colors.background===f.colors.background},c.is256Color=function(u){return u<_.DEFAULT_COLOR}},8803:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR_ATLAS_CELL_SPACING=c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;var _=w(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic",c.CHAR_ATLAS_CELL_SPACING=1},1906:function(W,c,w){var _,u=this&&this.__extends||(_=function(o,y){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,g){b.__proto__=g}||function(b,g){for(var S in g)Object.prototype.hasOwnProperty.call(g,S)&&(b[S]=g[S])},_(o,y)},function(o,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=o}_(o,y),o.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)});Object.defineProperty(c,"__esModule",{value:!0}),c.NoneCharAtlas=c.DynamicCharAtlas=c.getGlyphCacheKey=void 0;var f=w(8803),d=w(9616),m=w(5680),v=w(7001),a=w(6114),s=w(1752),p=w(8055),h=1024,r=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function t(o){return o.code<<21|o.bg<<12|o.fg<<3|(o.bold?0:4)+(o.dim?0:2)+(o.italic?0:1)}c.getGlyphCacheKey=t;var i=function(o){function y(b,g){var S=o.call(this)||this;S._config=g,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=b.createElement("canvas"),S._cacheCanvas.width=h,S._cacheCanvas.height=r,S._cacheCtx=(0,s.throwIfFalsy)(S._cacheCanvas.getContext("2d",{alpha:!0}));var C=b.createElement("canvas");C.width=S._config.scaledCharWidth,C.height=S._config.scaledCharHeight,S._tmpCtx=(0,s.throwIfFalsy)(C.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(h/S._config.scaledCharWidth),S._height=Math.floor(r/S._config.scaledCharHeight);var k=S._width*S._height;return S._cacheMap=new v.LRUMap(k),S._cacheMap.prealloc(k),S}return u(y,o),y.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},y.prototype.beginFrame=function(){this._drawToCacheCount=0},y.prototype.clear=function(){if(this._cacheMap.size>0){var b=this._width*this._height;this._cacheMap=new v.LRUMap(b),this._cacheMap.prealloc(b)}this._cacheCtx.clearRect(0,0,h,r),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},y.prototype.draw=function(b,g,S,C){if(g.code===32)return!0;if(!this._canCache(g))return!1;var k=t(g),L=this._cacheMap.get(k);if(L!=null)return this._drawFromCache(b,L,S,C),!0;if(this._drawToCacheCount<100){var R;R=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var x=this._drawToCache(g,R);return this._cacheMap.set(k,x),this._drawFromCache(b,x,S,C),!0}return!1},y.prototype._canCache=function(b){return b.code<256},y.prototype._toCoordinateX=function(b){return b%this._width*this._config.scaledCharWidth},y.prototype._toCoordinateY=function(b){return Math.floor(b/this._width)*this._config.scaledCharHeight},y.prototype._drawFromCache=function(b,g,S,C){if(!g.isEmpty){var k=this._toCoordinateX(g.index),L=this._toCoordinateY(g.index);b.drawImage(g.inBitmap?this._bitmap:this._cacheCanvas,k,L,this._config.scaledCharWidth,this._config.scaledCharHeight,S,C,this._config.scaledCharWidth,this._config.scaledCharHeight)}},y.prototype._getColorFromAnsiIndex=function(b){return b<this._config.colors.ansi.length?this._config.colors.ansi[b]:m.DEFAULT_ANSI_COLORS[b]},y.prototype._getBackgroundColor=function(b){return this._config.allowTransparency?e:b.bg===f.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:b.bg<256?this._getColorFromAnsiIndex(b.bg):this._config.colors.background},y.prototype._getForegroundColor=function(b){return b.fg===f.INVERTED_DEFAULT_COLOR?p.color.opaque(this._config.colors.background):b.fg<256?this._getColorFromAnsiIndex(b.fg):this._config.colors.foreground},y.prototype._drawToCache=function(b,g){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(b);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var C=b.bold?this._config.fontWeightBold:this._config.fontWeight,k=b.italic?"italic":"";this._tmpCtx.font=k+" "+C+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=f.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(b).css,b.dim&&(this._tmpCtx.globalAlpha=f.DIM_OPACITY),this._tmpCtx.fillText(b.chars,0,this._config.scaledCharHeight);var L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),R=!1;if(this._config.allowTransparency||(R=l(L,S)),R&&b.chars==="_"&&!this._config.allowTransparency)for(var x=1;x<=5&&(this._tmpCtx.fillText(b.chars,0,this._config.scaledCharHeight-x),R=l(L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),S));x++);this._tmpCtx.restore();var E=this._toCoordinateX(g),A=this._toCoordinateY(g);this._cacheCtx.putImageData(L,E,A);var T={index:g,isEmpty:R,inBitmap:!1};return this._addGlyphToBitmap(T),T},y.prototype._addGlyphToBitmap=function(b){var g=this;!("createImageBitmap"in window)||a.isFirefox||a.isSafari||(this._glyphsWaitingOnBitmap.push(b),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return g._generateBitmap()},100)))},y.prototype._generateBitmap=function(){var b=this,g=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){b._bitmap=S;for(var C=0;C<g.length;C++)g[C].inBitmap=!0}),this._bitmapCommitTimeout=null},y}(d.BaseCharAtlas);c.DynamicCharAtlas=i;var n=function(o){function y(b,g){return o.call(this)||this}return u(y,o),y.prototype.draw=function(b,g,S,C){return!1},y}(d.BaseCharAtlas);function l(o,y){for(var b=!0,g=y.rgba>>>24,S=y.rgba>>>16&255,C=y.rgba>>>8&255,k=0;k<o.data.length;k+=4)o.data[k]===g&&o.data[k+1]===S&&o.data[k+2]===C?o.data[k+3]=0:b=!1;return b}c.NoneCharAtlas=n},7001:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LRUMap=void 0;var w=function(){function _(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return _.prototype._unlinkNode=function(u){var f=u.prev,d=u.next;u===this._head&&(this._head=d),u===this._tail&&(this._tail=f),f!==null&&(f.next=d),d!==null&&(d.prev=f)},_.prototype._appendNode=function(u){var f=this._tail;f!==null&&(f.next=u),u.prev=f,u.next=null,this._tail=u,this._head===null&&(this._head=u)},_.prototype.prealloc=function(u){for(var f=this._nodePool,d=0;d<u;d++)f.push({prev:null,next:null,key:null,value:null})},_.prototype.get=function(u){var f=this._map[u];return f!==void 0?(this._unlinkNode(f),this._appendNode(f),f.value):null},_.prototype.peekValue=function(u){var f=this._map[u];return f!==void 0?f.value:null},_.prototype.peek=function(){var u=this._head;return u===null?null:u.value},_.prototype.set=function(u,f){var d=this._map[u];if(d!==void 0)d=this._map[u],this._unlinkNode(d),d.value=f;else if(this.size>=this.capacity)d=this._head,this._unlinkNode(d),delete this._map[d.key],d.key=u,d.value=f,this._map[u]=d;else{var m=this._nodePool;m.length>0?((d=m.pop()).key=u,d.value=f):d={prev:null,next:null,key:u,value:f},this._map[u]=d,this.size++}this._appendNode(d)},_}();c.LRUMap=w},1296:function(W,c,w){var _,u=this&&this.__extends||(_=function(g,S){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,k){C.__proto__=k}||function(C,k){for(var L in k)Object.prototype.hasOwnProperty.call(k,L)&&(C[L]=k[L])},_(g,S)},function(g,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function C(){this.constructor=g}_(g,S),g.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}),f=this&&this.__decorate||function(g,S,C,k){var L,R=arguments.length,x=R<3?S:k===null?k=Object.getOwnPropertyDescriptor(S,C):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(g,S,C,k);else for(var E=g.length-1;E>=0;E--)(L=g[E])&&(x=(R<3?L(x):R>3?L(S,C,x):L(S,C))||x);return R>3&&x&&Object.defineProperty(S,C,x),x},d=this&&this.__param||function(g,S){return function(C,k){S(C,k,g)}},m=this&&this.__values||function(g){var S=typeof Symbol=="function"&&Symbol.iterator,C=S&&g[S],k=0;if(C)return C.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&k>=g.length&&(g=void 0),{value:g&&g[k++],done:!g}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;var v=w(3787),a=w(8803),s=w(844),p=w(4725),h=w(2585),r=w(8460),e=w(8055),t=w(9631),i="xterm-dom-renderer-owner-",n="xterm-fg-",l="xterm-bg-",o="xterm-focus",y=1,b=function(g){function S(C,k,L,R,x,E,A,T,U,q){var j=g.call(this)||this;return j._colors=C,j._element=k,j._screenElement=L,j._viewportElement=R,j._linkifier=x,j._linkifier2=E,j._charSizeService=T,j._optionsService=U,j._bufferService=q,j._terminalClass=y++,j._rowElements=[],j._rowContainer=document.createElement("div"),j._rowContainer.classList.add("xterm-rows"),j._rowContainer.style.lineHeight="normal",j._rowContainer.setAttribute("aria-hidden","true"),j._refreshRowElements(j._bufferService.cols,j._bufferService.rows),j._selectionContainer=document.createElement("div"),j._selectionContainer.classList.add("xterm-selection"),j._selectionContainer.setAttribute("aria-hidden","true"),j.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},j._updateDimensions(),j._injectCss(),j._rowFactory=A.createInstance(v.DomRendererRowFactory,document,j._colors),j._element.classList.add(i+j._terminalClass),j._screenElement.appendChild(j._rowContainer),j._screenElement.appendChild(j._selectionContainer),j.register(j._linkifier.onShowLinkUnderline(function(z){return j._onLinkHover(z)})),j.register(j._linkifier.onHideLinkUnderline(function(z){return j._onLinkLeave(z)})),j.register(j._linkifier2.onShowLinkUnderline(function(z){return j._onLinkHover(z)})),j.register(j._linkifier2.onHideLinkUnderline(function(z){return j._onLinkLeave(z)})),j}return u(S,g),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return new r.EventEmitter().event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._element.classList.remove(i+this._terminalClass),(0,t.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),g.prototype.dispose.call(this)},S.prototype._updateDimensions=function(){var C,k;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var L=m(this._rowElements),R=L.next();!R.done;R=L.next()){var x=R.value;x.style.width=this.dimensions.canvasWidth+"px",x.style.height=this.dimensions.actualCellHeight+"px",x.style.lineHeight=this.dimensions.actualCellHeight+"px",x.style.overflow="hidden"}}catch(A){C={error:A}}finally{try{R&&!R.done&&(k=L.return)&&k.call(L)}finally{if(C)throw C.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var E=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=E,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.setColors=function(C){this._colors=C,this._injectCss()},S.prototype._injectCss=function(){var C=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var k=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";k+=this._terminalSelector+" span:not(."+v.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+v.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+v.ITALIC_CLASS+" { font-style: italic;}",k+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",k+="@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+"; }}",k+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+":not(."+v.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",k+=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.selectionOpaque.css+";}",this._colors.ansi.forEach(function(L,R){k+=C._terminalSelector+" ."+n+R+" { color: "+L.css+"; }"+C._terminalSelector+" ."+l+R+" { background-color: "+L.css+"; }"}),k+=this._terminalSelector+" ."+n+a.INVERTED_DEFAULT_COLOR+" { color: "+e.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+a.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=k},S.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},S.prototype._refreshRowElements=function(C,k){for(var L=this._rowElements.length;L<=k;L++){var R=document.createElement("div");this._rowContainer.appendChild(R),this._rowElements.push(R)}for(;this._rowElements.length>k;)this._rowContainer.removeChild(this._rowElements.pop())},S.prototype.onResize=function(C,k){this._refreshRowElements(C,k),this._updateDimensions()},S.prototype.onCharSizeChanged=function(){this._updateDimensions()},S.prototype.onBlur=function(){this._rowContainer.classList.remove(o)},S.prototype.onFocus=function(){this._rowContainer.classList.add(o)},S.prototype.onSelectionChanged=function(C,k,L){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(C,k,L),this.renderRows(0,this._bufferService.rows-1),C&&k){var R=C[1]-this._bufferService.buffer.ydisp,x=k[1]-this._bufferService.buffer.ydisp,E=Math.max(R,0),A=Math.min(x,this._bufferService.rows-1);if(!(E>=this._bufferService.rows||A<0)){var T=document.createDocumentFragment();if(L){var U=C[0]>k[0];T.appendChild(this._createSelectionElement(E,U?k[0]:C[0],U?C[0]:k[0],A-E+1))}else{var q=R===E?C[0]:0,j=E===x?k[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(E,q,j));var z=A-E-1;if(T.appendChild(this._createSelectionElement(E+1,0,this._bufferService.cols,z)),E!==A){var N=x===A?k[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(A,0,N))}}this._selectionContainer.appendChild(T)}}},S.prototype._createSelectionElement=function(C,k,L,R){R===void 0&&(R=1);var x=document.createElement("div");return x.style.height=R*this.dimensions.actualCellHeight+"px",x.style.top=C*this.dimensions.actualCellHeight+"px",x.style.left=k*this.dimensions.actualCellWidth+"px",x.style.width=this.dimensions.actualCellWidth*(L-k)+"px",x},S.prototype.onCursorMove=function(){},S.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},S.prototype.clear=function(){var C,k;try{for(var L=m(this._rowElements),R=L.next();!R.done;R=L.next())R.value.innerText=""}catch(x){C={error:x}}finally{try{R&&!R.done&&(k=L.return)&&k.call(L)}finally{if(C)throw C.error}}},S.prototype.renderRows=function(C,k){for(var L=this._bufferService.buffer.ybase+this._bufferService.buffer.y,R=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),x=this._optionsService.rawOptions.cursorBlink,E=C;E<=k;E++){var A=this._rowElements[E];A.innerText="";var T=E+this._bufferService.buffer.ydisp,U=this._bufferService.buffer.lines.get(T),q=this._optionsService.rawOptions.cursorStyle;A.appendChild(this._rowFactory.createRow(U,T,T===L,q,R,x,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(S.prototype,"_terminalSelector",{get:function(){return"."+i+this._terminalClass},enumerable:!1,configurable:!0}),S.prototype._onLinkHover=function(C){this._setCellUnderline(C.x1,C.x2,C.y1,C.y2,C.cols,!0)},S.prototype._onLinkLeave=function(C){this._setCellUnderline(C.x1,C.x2,C.y1,C.y2,C.cols,!1)},S.prototype._setCellUnderline=function(C,k,L,R,x,E){for(;C!==k||L!==R;){var A=this._rowElements[L];if(!A)return;var T=A.children[C];T&&(T.style.textDecoration=E?"underline":"none"),++C>=x&&(C=0,L++)}},f([d(6,h.IInstantiationService),d(7,p.ICharSizeService),d(8,h.IOptionsService),d(9,h.IBufferService)],S)}(s.Disposable);c.DomRenderer=b},3787:function(W,c,w){var _=this&&this.__decorate||function(i,n,l,o){var y,b=arguments.length,g=b<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(i,n,l,o);else for(var S=i.length-1;S>=0;S--)(y=i[S])&&(g=(b<3?y(g):b>3?y(n,l,g):y(n,l))||g);return b>3&&g&&Object.defineProperty(n,l,g),g},u=this&&this.__param||function(i,n){return function(l,o){n(l,o,i)}},f=this&&this.__values||function(i){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&i[n],o=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&o>=i.length&&(i=void 0),{value:i&&i[o++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=c.CURSOR_STYLE_UNDERLINE_CLASS=c.CURSOR_STYLE_BAR_CLASS=c.CURSOR_STYLE_BLOCK_CLASS=c.CURSOR_BLINK_CLASS=c.CURSOR_CLASS=c.STRIKETHROUGH_CLASS=c.UNDERLINE_CLASS=c.ITALIC_CLASS=c.DIM_CLASS=c.BOLD_CLASS=void 0;var d=w(8803),m=w(643),v=w(511),a=w(2585),s=w(8055),p=w(4725),h=w(4269),r=w(1752);c.BOLD_CLASS="xterm-bold",c.DIM_CLASS="xterm-dim",c.ITALIC_CLASS="xterm-italic",c.UNDERLINE_CLASS="xterm-underline",c.STRIKETHROUGH_CLASS="xterm-strikethrough",c.CURSOR_CLASS="xterm-cursor",c.CURSOR_BLINK_CLASS="xterm-cursor-blink",c.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",c.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",c.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var e=function(){function i(n,l,o,y,b,g){this._document=n,this._colors=l,this._characterJoinerService=o,this._optionsService=y,this._coreService=b,this._decorationService=g,this._workCell=new v.CellData,this._columnSelectMode=!1}return i.prototype.setColors=function(n){this._colors=n},i.prototype.onSelectionChanged=function(n,l,o){this._selectionStart=n,this._selectionEnd=l,this._columnSelectMode=o},i.prototype.createRow=function(n,l,o,y,b,g,S,C){for(var k,L,R=this._document.createDocumentFragment(),x=this._characterJoinerService.getJoinedCharacters(l),E=0,A=Math.min(n.length,C)-1;A>=0;A--)if(n.loadCell(A,this._workCell).getCode()!==m.NULL_CELL_CODE||o&&A===b){E=A+1;break}for(A=0;A<E;A++){n.loadCell(A,this._workCell);var T=this._workCell.getWidth();if(T!==0){var U=!1,q=A,j=this._workCell;if(x.length>0&&A===x[0][0]){U=!0;var z=x.shift();j=new h.JoinedCellData(this._workCell,n.translateToString(!0,z[0],z[1]),z[1]-z[0]),q=z[1]-1,T=j.getWidth()}var N=this._document.createElement("span");if(T>1&&(N.style.width=S*T+"px"),U&&(N.style.display="inline",b>=A&&b<=q&&(b=A)),!this._coreService.isCursorHidden&&o&&A===b)switch(N.classList.add(c.CURSOR_CLASS),g&&N.classList.add(c.CURSOR_BLINK_CLASS),y){case"bar":N.classList.add(c.CURSOR_STYLE_BAR_CLASS);break;case"underline":N.classList.add(c.CURSOR_STYLE_UNDERLINE_CLASS);break;default:N.classList.add(c.CURSOR_STYLE_BLOCK_CLASS)}j.isBold()&&N.classList.add(c.BOLD_CLASS),j.isItalic()&&N.classList.add(c.ITALIC_CLASS),j.isDim()&&N.classList.add(c.DIM_CLASS),j.isUnderline()&&N.classList.add(c.UNDERLINE_CLASS),j.isInvisible()?N.textContent=m.WHITESPACE_CELL_CHAR:N.textContent=j.getChars()||m.WHITESPACE_CELL_CHAR,j.isStrikethrough()&&N.classList.add(c.STRIKETHROUGH_CLASS);var M=j.getFgColor(),Y=j.getFgColorMode(),Z=j.getBgColor(),ee=j.getBgColorMode(),B=!!j.isInverse();if(B){var Q=M;M=Z,Z=Q;var X=Y;Y=ee,ee=X}var F=void 0,O=void 0,D=!1;try{for(var H=(k=void 0,f(this._decorationService.getDecorationsAtCell(A,l))),G=H.next();!G.done;G=H.next()){var V=G.value;V.options.layer!=="top"&&D||(V.backgroundColorRGB&&(ee=50331648,Z=V.backgroundColorRGB.rgba>>8&16777215,F=V.backgroundColorRGB),V.foregroundColorRGB&&(Y=50331648,M=V.foregroundColorRGB.rgba>>8&16777215,O=V.foregroundColorRGB),D=V.options.layer==="top")}}catch(se){k={error:se}}finally{try{G&&!G.done&&(L=H.return)&&L.call(H)}finally{if(k)throw k.error}}var J=this._isCellInSelection(A,l);D||this._colors.selectionForeground&&J&&(Y=50331648,M=this._colors.selectionForeground.rgba>>8&16777215,O=this._colors.selectionForeground),J&&(F=this._colors.selectionOpaque,D=!0),D&&N.classList.add("xterm-decoration-top");var re=void 0;switch(ee){case 16777216:case 33554432:re=this._colors.ansi[Z],N.classList.add("xterm-bg-"+Z);break;case 50331648:re=s.rgba.toColor(Z>>16,Z>>8&255,255&Z),this._addStyle(N,"background-color:#"+t((Z>>>0).toString(16),"0",6));break;default:B?(re=this._colors.foreground,N.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)):re=this._colors.background}switch(Y){case 16777216:case 33554432:j.isBold()&&M<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(M+=8),this._applyMinimumContrast(N,re,this._colors.ansi[M],j,F,void 0)||N.classList.add("xterm-fg-"+M);break;case 50331648:var oe=s.rgba.toColor(M>>16&255,M>>8&255,255&M);this._applyMinimumContrast(N,re,oe,j,F,O)||this._addStyle(N,"color:#"+t(M.toString(16),"0",6));break;default:this._applyMinimumContrast(N,re,this._colors.foreground,j,F,void 0)||B&&N.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}R.appendChild(N),A=q}}return R},i.prototype._applyMinimumContrast=function(n,l,o,y,b,g){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,r.excludeFromContrastRatioDemands)(y.getCode()))return!1;var S=void 0;return b||g||(S=this._colors.contrastCache.getColor(l.rgba,o.rgba)),S===void 0&&(S=s.color.ensureContrastRatio(b||l,g||o,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((b||l).rgba,(g||o).rgba,S??null)),!!S&&(this._addStyle(n,"color:"+S.css),!0)},i.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},i.prototype._isCellInSelection=function(n,l){var o=this._selectionStart,y=this._selectionEnd;return!(!o||!y)&&(this._columnSelectMode?o[0]<=y[0]?n>=o[0]&&l>=o[1]&&n<y[0]&&l<=y[1]:n<o[0]&&l>=o[1]&&n>=y[0]&&l<=y[1]:l>o[1]&&l<y[1]||o[1]===y[1]&&l===o[1]&&n>=o[0]&&n<y[0]||o[1]<y[1]&&l===y[1]&&n<y[0]||o[1]<y[1]&&l===o[1]&&n>=o[0])},_([u(2,p.ICharacterJoinerService),u(3,a.IOptionsService),u(4,a.ICoreService),u(5,a.IDecorationService)],i)}();function t(i,n,l){for(;i.length<l;)i=n+i;return i}c.DomRendererRowFactory=e},456:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0;var w=function(){function _(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return _.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(_.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(_.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(u=this.selectionStart[0]+this.selectionStartLength)>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]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(u=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:void 0;var u},enumerable:!1,configurable:!0}),_.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])},_.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.SelectionModel=w},428:function(W,c,w){var _=this&&this.__decorate||function(a,s,p,h){var r,e=arguments.length,t=e<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(a,s,p,h);else for(var i=a.length-1;i>=0;i--)(r=a[i])&&(t=(e<3?r(t):e>3?r(s,p,t):r(s,p))||t);return e>3&&t&&Object.defineProperty(s,p,t),t},u=this&&this.__param||function(a,s){return function(p,h){s(p,h,a)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;var f=w(2585),d=w(8460),m=function(){function a(s,p,h){this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=new d.EventEmitter,this._measureStrategy=new v(s,p,this._optionsService)}return Object.defineProperty(a.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),a.prototype.measure=function(){var s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())},_([u(2,f.IOptionsService)],a)}();c.CharSizeService=m;var v=function(){function a(s,p,h){this._document=s,this._parentElement=p,this._optionsService=h,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 a.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var s=this._measureElement.getBoundingClientRect();return s.width!==0&&s.height!==0&&(this._result.width=s.width,this._result.height=Math.ceil(s.height)),this._result},a}()},4269:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,o=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(o=(l<3?n(o):l>3?n(e,t,o):n(e,t))||o);return l>3&&o&&Object.defineProperty(e,t,o),o},d=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;var m=w(3734),v=w(643),a=w(511),s=w(2585),p=function(r){function e(t,i,n){var l=r.call(this)||this;return l.content=0,l.combinedData="",l.fg=t.fg,l.bg=t.bg,l.combinedData=i,l._width=n,l}return u(e,r),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(m.AttributeData);c.JoinedCellData=p;var h=function(){function r(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}return r.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},r.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},r.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];for(var i=[],n=t.translateToString(!0),l=0,o=0,y=0,b=t.getFg(0),g=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==b||this._workCell.bg!==g){if(S-l>1)for(var C=this._getJoinedRanges(n,y,o,t,l),k=0;k<C.length;k++)i.push(C[k]);l=S,y=o,b=this._workCell.fg,g=this._workCell.bg}o+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-l>1)for(C=this._getJoinedRanges(n,y,o,t,l),k=0;k<C.length;k++)i.push(C[k]);return i},r.prototype._getJoinedRanges=function(e,t,i,n,l){var o=e.substring(t,i),y=[];try{y=this._characterJoiners[0].handler(o)}catch(C){console.error(C)}for(var b=1;b<this._characterJoiners.length;b++)try{for(var g=this._characterJoiners[b].handler(o),S=0;S<g.length;S++)r._mergeRanges(y,g[S])}catch(C){console.error(C)}return this._stringRangesToCellRanges(y,n,l),y},r.prototype._stringRangesToCellRanges=function(e,t,i){var n=0,l=!1,o=0,y=e[n];if(y){for(var b=i;b<this._bufferService.cols;b++){var g=t.getWidth(b),S=t.getString(b).length||v.WHITESPACE_CELL_CHAR.length;if(g!==0){if(!l&&y[0]<=o&&(y[0]=b,l=!0),y[1]<=o){if(y[1]=b,!(y=e[++n]))break;y[0]<=o?(y[0]=b,l=!0):l=!1}o+=S}}y&&(y[1]=this._bufferService.cols)}},r._mergeRanges=function(e,t){for(var i=!1,n=0;n<e.length;n++){var l=e[n];if(i){if(t[1]<=l[0])return e[n-1][1]=t[1],e;if(t[1]<=l[1])return e[n-1][1]=Math.max(t[1],l[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=l[0])return e.splice(n,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e},r=f([d(0,s.IBufferService)],r)}();c.CharacterJoinerService=h},5114:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;var w=function(){function _(u){this._textarea=u}return Object.defineProperty(_.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),_}();c.CoreBrowserService=w},8934:function(W,c,w){var _=this&&this.__decorate||function(v,a,s,p){var h,r=arguments.length,e=r<3?a:p===null?p=Object.getOwnPropertyDescriptor(a,s):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,a,s,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(r<3?h(e):r>3?h(a,s,e):h(a,s))||e);return r>3&&e&&Object.defineProperty(a,s,e),e},u=this&&this.__param||function(v,a){return function(s,p){a(s,p,v)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;var f=w(4725),d=w(9806),m=function(){function v(a,s){this._renderService=a,this._charSizeService=s}return v.prototype.getCoords=function(a,s,p,h,r){return(0,d.getCoords)(window,a,s,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)},v.prototype.getRawByteCoords=function(a,s,p,h){var r=this.getCoords(a,s,p,h);return(0,d.getRawByteCoords)(r)},_([u(0,f.IRenderService),u(1,f.ICharSizeService)],v)}();c.MouseService=m},3230:function(W,c,w){var _,u=this&&this.__extends||(_=function(t,i){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(n[o]=l[o])},_(t,i)},function(t,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=t}_(t,i),t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}),f=this&&this.__decorate||function(t,i,n,l){var o,y=arguments.length,b=y<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(t,i,n,l);else for(var g=t.length-1;g>=0;g--)(o=t[g])&&(b=(y<3?o(b):y>3?o(i,n,b):o(i,n))||b);return y>3&&b&&Object.defineProperty(i,n,b),b},d=this&&this.__param||function(t,i){return function(n,l){i(n,l,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;var m=w(6193),v=w(8460),a=w(844),s=w(5596),p=w(3656),h=w(2585),r=w(4725),e=function(t){function i(n,l,o,y,b,g,S){var C=t.call(this)||this;if(C._renderer=n,C._rowCount=l,C._charSizeService=b,C._isPaused=!1,C._needsFullRefresh=!1,C._isNextRenderRedrawOnly=!0,C._needsSelectionRefresh=!1,C._canvasWidth=0,C._canvasHeight=0,C._selectionState={start:void 0,end:void 0,columnSelectMode:!1},C._onDimensionsChange=new v.EventEmitter,C._onRenderedViewportChange=new v.EventEmitter,C._onRender=new v.EventEmitter,C._onRefreshRequest=new v.EventEmitter,C.register({dispose:function(){return C._renderer.dispose()}}),C._renderDebouncer=new m.RenderDebouncer(function(L,R){return C._renderRows(L,R)}),C.register(C._renderDebouncer),C._screenDprMonitor=new s.ScreenDprMonitor,C._screenDprMonitor.setListener(function(){return C.onDevicePixelRatioChange()}),C.register(C._screenDprMonitor),C.register(S.onResize(function(){return C._fullRefresh()})),C.register(S.buffers.onBufferActivate(function(){var L;return(L=C._renderer)===null||L===void 0?void 0:L.clear()})),C.register(y.onOptionChange(function(){return C._handleOptionsChanged()})),C.register(C._charSizeService.onCharSizeChange(function(){return C.onCharSizeChanged()})),C.register(g.onDecorationRegistered(function(){return C._fullRefresh()})),C.register(g.onDecorationRemoved(function(){return C._fullRefresh()})),C._renderer.onRequestRedraw(function(L){return C.refreshRows(L.start,L.end,!0)}),C.register((0,p.addDisposableDomListener)(window,"resize",function(){return C.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var k=new IntersectionObserver(function(L){return C._onIntersectionChange(L[L.length-1])},{threshold:0});k.observe(o),C.register({dispose:function(){return k.disconnect()}})}return C}return u(i,t),Object.defineProperty(i.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),i.prototype._onIntersectionChange=function(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},i.prototype.refreshRows=function(n,l,o){o===void 0&&(o=!1),this._isPaused?this._needsFullRefresh=!0:(o||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))},i.prototype._renderRows=function(n,l){this._renderer.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0},i.prototype.resize=function(n,l){this._rowCount=l,this._fireOnCanvasResize()},i.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},i.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},i.prototype.dispose=function(){t.prototype.dispose.call(this)},i.prototype.setRenderer=function(n){var l=this;this._renderer.dispose(),this._renderer=n,this._renderer.onRequestRedraw(function(o){return l.refreshRows(o.start,o.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},i.prototype.addRefreshCallback=function(n){return this._renderDebouncer.addRefreshCallback(n)},i.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},i.prototype.clearTextureAtlas=function(){var n,l;(l=(n=this._renderer)===null||n===void 0?void 0:n.clearTextureAtlas)===null||l===void 0||l.call(n),this._fullRefresh()},i.prototype.setColors=function(n){this._renderer.setColors(n),this._fullRefresh()},i.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},i.prototype.onResize=function(n,l){this._renderer.onResize(n,l),this._fullRefresh()},i.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},i.prototype.onBlur=function(){this._renderer.onBlur()},i.prototype.onFocus=function(){this._renderer.onFocus()},i.prototype.onSelectionChanged=function(n,l,o){this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=o,this._renderer.onSelectionChanged(n,l,o)},i.prototype.onCursorMove=function(){this._renderer.onCursorMove()},i.prototype.clear=function(){this._renderer.clear()},f([d(3,h.IOptionsService),d(4,r.ICharSizeService),d(5,h.IDecorationService),d(6,h.IBufferService)],i)}(a.Disposable);c.RenderService=e},9312:function(W,c,w){var _,u=this&&this.__extends||(_=function(y,b){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,S){g.__proto__=S}||function(g,S){for(var C in S)Object.prototype.hasOwnProperty.call(S,C)&&(g[C]=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 g(){this.constructor=y}_(y,b),y.prototype=b===null?Object.create(b):(g.prototype=b.prototype,new g)}),f=this&&this.__decorate||function(y,b,g,S){var C,k=arguments.length,L=k<3?b:S===null?S=Object.getOwnPropertyDescriptor(b,g):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,b,g,S);else for(var R=y.length-1;R>=0;R--)(C=y[R])&&(L=(k<3?C(L):k>3?C(b,g,L):C(b,g))||L);return k>3&&L&&Object.defineProperty(b,g,L),L},d=this&&this.__param||function(y,b){return function(g,S){b(g,S,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;var m=w(6114),v=w(456),a=w(511),s=w(8460),p=w(4725),h=w(2585),r=w(9806),e=w(9504),t=w(844),i=w(4841),n="\xA0",l=new RegExp(n,"g"),o=function(y){function b(g,S,C,k,L,R,x,E){var A=y.call(this)||this;return A._element=g,A._screenElement=S,A._linkifier=C,A._bufferService=k,A._coreService=L,A._mouseService=R,A._optionsService=x,A._renderService=E,A._dragScrollAmount=0,A._enabled=!0,A._workCell=new a.CellData,A._mouseDownTimeStamp=0,A._oldHasSelection=!1,A._oldSelectionStart=void 0,A._oldSelectionEnd=void 0,A._onLinuxMouseSelection=A.register(new s.EventEmitter),A._onRedrawRequest=A.register(new s.EventEmitter),A._onSelectionChange=A.register(new s.EventEmitter),A._onRequestScrollLines=A.register(new s.EventEmitter),A._mouseMoveListener=function(T){return A._onMouseMove(T)},A._mouseUpListener=function(T){return A._onMouseUp(T)},A._coreService.onUserInput(function(){A.hasSelection&&A.clearSelection()}),A._trimListener=A._bufferService.buffer.lines.onTrim(function(T){return A._onTrim(T)}),A.register(A._bufferService.buffers.onBufferActivate(function(T){return A._onBufferActivate(T)})),A.enable(),A._model=new v.SelectionModel(A._bufferService),A._activeSelectionMode=0,A}return u(b,y),Object.defineProperty(b.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._removeMouseDownListeners()},b.prototype.reset=function(){this.clearSelection()},b.prototype.disable=function(){this.clearSelection(),this._enabled=!1},b.prototype.enable=function(){this._enabled=!0},Object.defineProperty(b.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"hasSelection",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!g||!S||g[0]===S[0]&&g[1]===S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionText",{get:function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!g||!S)return"";var C=this._bufferService.buffer,k=[];if(this._activeSelectionMode===3){if(g[0]===S[0])return"";for(var L=g[0]<S[0]?g[0]:S[0],R=g[0]<S[0]?S[0]:g[0],x=g[1];x<=S[1];x++){var E=C.translateBufferLineToString(x,!0,L,R);k.push(E)}}else{var A=g[1]===S[1]?S[0]:void 0;for(k.push(C.translateBufferLineToString(g[1],!0,g[0],A)),x=g[1]+1;x<=S[1]-1;x++){var T=C.lines.get(x);E=C.translateBufferLineToString(x,!0),T?.isWrapped?k[k.length-1]+=E:k.push(E)}g[1]!==S[1]&&(T=C.lines.get(S[1]),E=C.translateBufferLineToString(S[1],!0,0,S[0]),T&&T.isWrapped?k[k.length-1]+=E:k.push(E))}return k.map(function(U){return U.replace(l," ")}).join(m.isWindows?`\r
1
+ import{e as cr}from"./chunk-ULJPS3WS.js";var mr=cr((Pt,lr)=>{(function(me,ee){if(typeof Pt=="object"&&typeof lr=="object")lr.exports=ee();else if(typeof define=="function"&&define.amd)define([],ee);else{var W=ee();for(var c in W)(typeof Pt=="object"?Pt:me)[c]=W[c]}})(self,function(){return(()=>{"use strict";var me={4567:function(W,c,w){var _,u=this&&this.__extends||(_=function(i,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},_(i,e)},function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}_(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var f=w(9042),d=w(6114),m=w(9924),v=w(3656),o=w(844),s=w(5596),p=w(9631),h=function(i){function e(t,r){var n=i.call(this)||this;n._terminal=t,n._renderService=r,n._liveRegionLineCount=0,n._charsToConsume=[],n._charsToAnnounce="",n._accessibilityTreeRoot=document.createElement("div"),n._accessibilityTreeRoot.classList.add("xterm-accessibility"),n._accessibilityTreeRoot.tabIndex=0,n._rowContainer=document.createElement("div"),n._rowContainer.setAttribute("role","list"),n._rowContainer.classList.add("xterm-accessibility-tree"),n._rowElements=[];for(var l=0;l<n._terminal.rows;l++)n._rowElements[l]=n._createAccessibilityTreeNode(),n._rowContainer.appendChild(n._rowElements[l]);if(n._topBoundaryFocusListener=function(a){return n._onBoundaryFocus(a,0)},n._bottomBoundaryFocusListener=function(a){return n._onBoundaryFocus(a,1)},n._rowElements[0].addEventListener("focus",n._topBoundaryFocusListener),n._rowElements[n._rowElements.length-1].addEventListener("focus",n._bottomBoundaryFocusListener),n._refreshRowsDimensions(),n._accessibilityTreeRoot.appendChild(n._rowContainer),n._renderRowsDebouncer=new m.TimeBasedDebouncer(n._renderRows.bind(n)),n._refreshRows(),n._liveRegion=document.createElement("div"),n._liveRegion.classList.add("live-region"),n._liveRegion.setAttribute("aria-live","assertive"),n._accessibilityTreeRoot.appendChild(n._liveRegion),!n._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return n._terminal.element.insertAdjacentElement("afterbegin",n._accessibilityTreeRoot),n.register(n._renderRowsDebouncer),n.register(n._terminal.onResize(function(a){return n._onResize(a.rows)})),n.register(n._terminal.onRender(function(a){return n._refreshRows(a.start,a.end)})),n.register(n._terminal.onScroll(function(){return n._refreshRows()})),n.register(n._terminal.onA11yChar(function(a){return n._onChar(a)})),n.register(n._terminal.onLineFeed(function(){return n._onChar(`
2
+ `)})),n.register(n._terminal.onA11yTab(function(a){return n._onTab(a)})),n.register(n._terminal.onKey(function(a){return n._onKey(a.key)})),n.register(n._terminal.onBlur(function(){return n._clearLiveRegion()})),n.register(n._renderService.onDimensionsChange(function(){return n._refreshRowsDimensions()})),n._screenDprMonitor=new s.ScreenDprMonitor,n.register(n._screenDprMonitor),n._screenDprMonitor.setListener(function(){return n._refreshRowsDimensions()}),n.register((0,v.addDisposableDomListener)(window,"resize",function(){return n._refreshRowsDimensions()})),n}return u(e,i),e.prototype.dispose=function(){i.prototype.dispose.call(this),(0,p.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(t,r){var n=t.target,l=this._rowElements[r===0?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(r===0?"1":""+this._terminal.buffer.lines.length)&&t.relatedTarget===l){var a,y;if(r===0?(a=n,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(a=this._rowElements.shift(),y=n,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),r===0){var S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else S=this._createAccessibilityTreeNode(),this._rowElements.push(S),this._rowContainer.appendChild(S);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(r===0?-1:1),this._rowElements[r===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}},e.prototype._onResize=function(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var r=this._rowContainer.children.length;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t},e.prototype._onTab=function(t){for(var r=0;r<t;r++)this._onChar(" ")},e.prototype._onChar=function(t){var r=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
3
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){r._accessibilityTreeRoot.appendChild(r._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&(0,p.removeElementFromParent)(this._liveRegion)},e.prototype._onKey=function(t){this._clearLiveRegion(),this._charsToConsume.push(t)},e.prototype._refreshRows=function(t,r){this._renderRowsDebouncer.refresh(t,r,this._terminal.rows)},e.prototype._renderRows=function(t,r){for(var n=this._terminal.buffer,l=n.lines.length.toString(),a=t;a<=r;a++){var y=n.translateBufferLineToString(n.ydisp+a,!0),S=(n.ydisp+a+1).toString(),g=this._rowElements[a];g&&(y.length===0?g.innerText="\xA0":g.textContent=y,g.setAttribute("aria-posinset",S),g.setAttribute("aria-setsize",l))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}},e.prototype._refreshRowDimensions=function(t){t.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(o.Disposable);c.AccessibilityManager=h},3614:(W,c)=>{function w(d){return d.replace(/\r?\n/g,"\r")}function _(d,m){return m?"\x1B[200~"+d+"\x1B[201~":d}function u(d,m,v){d=_(d=w(d),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(d,!0),m.value=""}function f(d,m,v){var o=v.getBoundingClientRect(),s=d.clientX-o.left-10,p=d.clientY-o.top-10;m.style.width="20px",m.style.height="20px",m.style.left=s+"px",m.style.top=p+"px",m.style.zIndex="1000",m.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=w,c.bracketTextForPaste=_,c.copyHandler=function(d,m){d.clipboardData&&d.clipboardData.setData("text/plain",m.selectionText),d.preventDefault()},c.handlePasteEvent=function(d,m,v){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),m,v)},c.paste=u,c.moveTextAreaUnderMouseCursor=f,c.rightClickHandler=function(d,m,v,o,s){f(d,m,v),s&&o.rightClickSelect(d),m.value=o.selectionText,m.select()}},7239:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var w=function(){function _(){this._color={},this._rgba={}}return _.prototype.clear=function(){this._color={},this._rgba={}},_.prototype.setCss=function(u,f,d){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][f]=d},_.prototype.getCss=function(u,f){return this._rgba[u]?this._rgba[u][f]:void 0},_.prototype.setColor=function(u,f,d){this._color[u]||(this._color[u]={}),this._color[u][f]=d},_.prototype.getColor=function(u,f){return this._color[u]?this._color[u][f]:void 0},_}();c.ColorContrastCache=w},5680:function(W,c,w){var _=this&&this.__read||function(h,i){var e=typeof Symbol=="function"&&h[Symbol.iterator];if(!e)return h;var t,r,n=e.call(h),l=[];try{for(;(i===void 0||i-- >0)&&!(t=n.next()).done;)l.push(t.value)}catch(a){r={error:a}}finally{try{t&&!t.done&&(e=n.return)&&e.call(n)}finally{if(r)throw r.error}}return l};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var u=w(8055),f=w(7239),d=u.css.toColor("#ffffff"),m=u.css.toColor("#000000"),v=u.css.toColor("#ffffff"),o=u.css.toColor("#000000"),s={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var h=[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")],i=[0,95,135,175,215,255],e=0;e<216;e++){var t=i[e/36%6|0],r=i[e/6%6|0],n=i[e%6];h.push({css:u.channels.toCss(t,r,n),rgba:u.channels.toRgba(t,r,n)})}for(e=0;e<24;e++){var l=8+10*e;h.push({css:u.channels.toCss(l,l,l),rgba:u.channels.toRgba(l,l,l)})}return h}());var p=function(){function h(i,e){this.allowTransparency=e;var t=i.createElement("canvas");t.width=1,t.height=1;var r=t.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new f.ColorContrastCache,this.colors={foreground:d,background:m,cursor:v,cursorAccent:o,selectionTransparent:s,selectionOpaque:u.color.blend(m,s),selectionForeground:void 0,ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return h.prototype.onOptionsChange=function(i){i==="minimumContrastRatio"&&this._contrastCache.clear()},h.prototype.setTheme=function(i){i===void 0&&(i={}),this.colors.foreground=this._parseColor(i.foreground,d),this.colors.background=this._parseColor(i.background,m),this.colors.cursor=this._parseColor(i.cursor,v,!0),this.colors.cursorAccent=this._parseColor(i.cursorAccent,o,!0),this.colors.selectionTransparent=this._parseColor(i.selection,s,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent);var e={css:"",rgba:0};this.colors.selectionForeground=i.selectionForeground?this._parseColor(i.selectionForeground,e):void 0,this.colors.selectionForeground===e&&(this.colors.selectionForeground=void 0),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(i.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(i.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(i.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(i.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(i.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(i.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(i.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(i.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(i.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(i.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(i.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(i.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(i.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(i.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(i.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(i.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},h.prototype.restoreColor=function(i){if(i!==void 0)switch(i){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[i]=this._restoreColors.ansi[i]}else for(var e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]},h.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},h.prototype._parseColor=function(i,e,t){if(t===void 0&&(t=this.allowTransparency),i===void 0)return e;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=i,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+i+" is invalid using fallback "+e.css),e;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!t)return console.warn("Color: "+i+" is using transparency, but allowTransparency is false. Using fallback "+e.css+"."),e;var n=_(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(b){return Number(b)}),4),l=n[0],a=n[1],y=n[2],S=n[3],g=Math.round(255*S);return{rgba:u.channels.toRgba(l,a,y,g),css:i}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(r[0],r[1],r[2],r[3])}},h}();c.ColorManager=p},9631:function(W,c){var w=this&&this.__values||function(_){var u=typeof Symbol=="function"&&Symbol.iterator,f=u&&_[u],d=0;if(f)return f.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&d>=_.length&&(_=void 0),{value:_&&_[d++],done:!_}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var _,u,f,d=[],m=0;m<arguments.length;m++)d[m]=arguments[m];try{for(var v=w(d),o=v.next();!o.done;o=v.next()){var s=o.value;(f=s?.parentElement)===null||f===void 0||f.removeChild(s)}}catch(p){_={error:p}}finally{try{o&&!o.done&&(u=v.return)&&u.call(v)}finally{if(_)throw _.error}}}},3656:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(w,_,u,f){w.addEventListener(_,u,f);var d=!1;return{dispose:function(){d||(d=!0,w.removeEventListener(_,u,f))}}}},3551:function(W,c,w){var _=this&&this.__decorate||function(o,s,p,h){var i,e=arguments.length,t=e<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,s,p,h);else for(var r=o.length-1;r>=0;r--)(i=o[r])&&(t=(e<3?i(t):e>3?i(s,p,t):i(s,p))||t);return e>3&&t&&Object.defineProperty(s,p,t),t},u=this&&this.__param||function(o,s){return function(p,h){s(p,h,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var f=w(8460),d=w(2585),m=function(){function o(s,p,h){this._bufferService=s,this._logService=p,this._unicodeService=h,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new f.EventEmitter,this._onHideLinkUnderline=new f.EventEmitter,this._onLinkTooltip=new f.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(o.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),o.prototype.attachToDom=function(s,p){this._element=s,this._mouseZoneManager=p},o.prototype.linkifyRows=function(s,p){var h=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=s,this._rowsToLinkify.end=p):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,s),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,p)),this._mouseZoneManager.clearAll(s,p),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return h._linkifyRows()},o._timeBeforeLatency))},o.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var s=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var p=s.ydisp+this._rowsToLinkify.start;if(!(p>=s.lines.length)){for(var h=s.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,p,h,i,i);e.hasNext();)for(var t=e.next(),r=0;r<this._linkMatchers.length;r++)this._doLinkifyRow(t.range.first,t.content,this._linkMatchers[r]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},o.prototype.registerLinkMatcher=function(s,p,h){if(h===void 0&&(h={}),!p)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:s,handler:p,matchIndex:h.matchIndex,validationCallback:h.validationCallback,hoverTooltipCallback:h.tooltipCallback,hoverLeaveCallback:h.leaveCallback,willLinkActivate:h.willLinkActivate,priority:h.priority||0};return this._addLinkMatcherToList(i),i.id},o.prototype._addLinkMatcherToList=function(s){if(this._linkMatchers.length!==0){for(var p=this._linkMatchers.length-1;p>=0;p--)if(s.priority<=this._linkMatchers[p].priority)return void this._linkMatchers.splice(p+1,0,s);this._linkMatchers.splice(0,0,s)}else this._linkMatchers.push(s)},o.prototype.deregisterLinkMatcher=function(s){for(var p=0;p<this._linkMatchers.length;p++)if(this._linkMatchers[p].id===s)return this._linkMatchers.splice(p,1),!0;return!1},o.prototype._doLinkifyRow=function(s,p,h){for(var i,e=this,t=new RegExp(h.regex.source,(h.regex.flags||"")+"g"),r=-1,n=function(){var a=i[typeof h.matchIndex!="number"?0:h.matchIndex];if(!a)return l._logService.debug("match found without corresponding matchIndex",i,h),"break";if(r=p.indexOf(a,r+1),t.lastIndex=r+a.length,r<0)return"break";var y=l._bufferService.buffer.stringIndexToBufferIndex(s,r);if(y[0]<0)return"break";var S=l._bufferService.buffer.lines.get(y[0]);if(!S)return"break";var g=S.getFg(y[1]),b=g?g>>9&511:void 0;h.validationCallback?h.validationCallback(a,function(C){e._rowsTimeoutId||C&&e._addLink(y[1],y[0]-e._bufferService.buffer.ydisp,a,h,b)}):l._addLink(y[1],y[0]-l._bufferService.buffer.ydisp,a,h,b)},l=this;(i=t.exec(p))!==null&&n()!=="break";);},o.prototype._addLink=function(s,p,h,i,e){var t=this;if(this._mouseZoneManager&&this._element){var r=this._unicodeService.getStringCellWidth(h),n=s%this._bufferService.cols,l=p+Math.floor(s/this._bufferService.cols),a=(n+r)%this._bufferService.cols,y=l+Math.floor((n+r)/this._bufferService.cols);a===0&&(a=this._bufferService.cols,y--),this._mouseZoneManager.add(new v(n+1,l+1,a+1,y+1,function(S){if(i.handler)return i.handler(S,h);var g=window.open();g?(g.opener=null,g.location.href=h):console.warn("Opening link blocked as opener could not be cleared")},function(){t._onShowLinkUnderline.fire(t._createLinkHoverEvent(n,l,a,y,e)),t._element.classList.add("xterm-cursor-pointer")},function(S){t._onLinkTooltip.fire(t._createLinkHoverEvent(n,l,a,y,e)),i.hoverTooltipCallback&&i.hoverTooltipCallback(S,h,{start:{x:n,y:l},end:{x:a,y}})},function(){t._onHideLinkUnderline.fire(t._createLinkHoverEvent(n,l,a,y,e)),t._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()},function(S){return!i.willLinkActivate||i.willLinkActivate(S,h)}))}},o.prototype._createLinkHoverEvent=function(s,p,h,i,e){return{x1:s,y1:p,x2:h,y2:i,cols:this._bufferService.cols,fg:e}},o._timeBeforeLatency=200,o=_([u(0,d.IBufferService),u(1,d.ILogService),u(2,d.IUnicodeService)],o)}();c.Linkifier=m;var v=function(o,s,p,h,i,e,t,r,n){this.x1=o,this.y1=s,this.x2=p,this.y2=h,this.clickCallback=i,this.hoverCallback=e,this.tooltipCallback=t,this.leaveCallback=r,this.willLinkActivate=n};c.MouseZone=v},6465:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}),f=this&&this.__decorate||function(e,t,r,n){var l,a=arguments.length,y=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,r,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(y=(a<3?l(y):a>3?l(t,r,y):l(t,r))||y);return a>3&&y&&Object.defineProperty(t,r,y),y},d=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},m=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},v=this&&this.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,l,a=r.call(e),y=[];try{for(;(t===void 0||t-- >0)&&!(n=a.next()).done;)y.push(n.value)}catch(S){l={error:S}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(l)throw l.error}}return y};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var o=w(2585),s=w(8460),p=w(844),h=w(3656),i=function(e){function t(r){var n=e.call(this)||this;return n._bufferService=r,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new s.EventEmitter),n._onHideLinkUnderline=n.register(new s.EventEmitter),n.register((0,p.getDisposeArrayDisposable)(n._linkCacheDisposables)),n}return u(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(r){var n=this;return this._linkProviders.push(r),{dispose:function(){var l=n._linkProviders.indexOf(r);l!==-1&&n._linkProviders.splice(l,1)}}},t.prototype.attachToDom=function(r,n,l){var a=this;this._element=r,this._mouseService=n,this._renderService=l,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",function(){a._isMouseOut=!0,a._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(r){if(this._lastMouseEvent=r,this._element&&this._mouseService){var n=this._positionFromMouseEvent(r,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var l=r.composedPath(),a=0;a<l.length;a++){var y=l[a];if(y.classList.contains("xterm"))break;if(y.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},t.prototype._onHover=function(r){if(this._activeLine!==r.y)return this._clearCurrentLink(),void this._askForLink(r,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,r)||(this._clearCurrentLink(),this._askForLink(r,!0))},t.prototype._askForLink=function(r,n){var l,a,y,S,g=this;this._activeProviderReplies&&n||((y=this._activeProviderReplies)===null||y===void 0||y.forEach(function(E){E?.forEach(function(A){A.link.dispose&&A.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=r.y);var b=!1,C=function(E,A){n?!((S=R._activeProviderReplies)===null||S===void 0)&&S.get(E)&&(b=R._checkLinkProviderResult(E,r,b)):A.provideLinks(r.y,function(T){var U,q;if(!g._isMouseOut){var j=T?.map(function(z){return{link:z}});(U=g._activeProviderReplies)===null||U===void 0||U.set(E,j),b=g._checkLinkProviderResult(E,r,b),((q=g._activeProviderReplies)===null||q===void 0?void 0:q.size)===g._linkProviders.length&&g._removeIntersectingLinks(r.y,g._activeProviderReplies)}})},R=this;try{for(var L=m(this._linkProviders.entries()),k=L.next();!k.done;k=L.next()){var x=v(k.value,2);C(x[0],x[1])}}catch(E){l={error:E}}finally{try{k&&!k.done&&(a=L.return)&&a.call(L)}finally{if(l)throw l.error}}},t.prototype._removeIntersectingLinks=function(r,n){for(var l=new Set,a=0;a<n.size;a++){var y=n.get(a);if(y)for(var S=0;S<y.length;S++)for(var g=y[S],b=g.link.range.start.y<r?0:g.link.range.start.x,C=g.link.range.end.y>r?this._bufferService.cols:g.link.range.end.x,R=b;R<=C;R++){if(l.has(R)){y.splice(S--,1);break}l.add(R)}}},t.prototype._checkLinkProviderResult=function(r,n,l){var a,y=this;if(!this._activeProviderReplies)return l;for(var S=this._activeProviderReplies.get(r),g=!1,b=0;b<r;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(g=!0);if(!g&&S){var C=S.find(function(L){return y._linkAtPosition(L.link,n)});C&&(l=!0,this._handleNewLink(C))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(b=0;b<this._activeProviderReplies.size;b++){var R=(a=this._activeProviderReplies.get(b))===null||a===void 0?void 0:a.find(function(L){return y._linkAtPosition(L.link,n)});if(R){l=!0,this._handleNewLink(R);break}}return l},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(r){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(r,this._element,this._mouseService);n&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(r,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(r,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!r||!n||this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(r){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(r.link,l)&&(this._currentLink=r,this._currentLink.state={decorations:{underline:r.link.decorations===void 0||r.link.decorations.underline,pointerCursor:r.link.decorations===void 0||r.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,r.link,this._lastMouseEvent),r.link.decorations={},Object.defineProperties(r.link.decorations,{pointerCursor:{get:function(){var a,y;return(y=(a=n._currentLink)===null||a===void 0?void 0:a.state)===null||y===void 0?void 0:y.decorations.pointerCursor},set:function(a){var y,S;!((y=n._currentLink)===null||y===void 0)&&y.state&&n._currentLink.state.decorations.pointerCursor!==a&&(n._currentLink.state.decorations.pointerCursor=a,n._currentLink.state.isHovered&&((S=n._element)===null||S===void 0||S.classList.toggle("xterm-cursor-pointer",a)))}},underline:{get:function(){var a,y;return(y=(a=n._currentLink)===null||a===void 0?void 0:a.state)===null||y===void 0?void 0:y.decorations.underline},set:function(a){var y,S,g;!((y=n._currentLink)===null||y===void 0)&&y.state&&((g=(S=n._currentLink)===null||S===void 0?void 0:S.state)===null||g===void 0?void 0:g.decorations.underline)!==a&&(n._currentLink.state.decorations.underline=a,n._currentLink.state.isHovered&&n._fireUnderlineEvent(r.link,a))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(function(a){var y=a.start===0?0:a.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(y,a.end+1+n._bufferService.buffer.ydisp)})))}},t.prototype._linkHover=function(r,n,l){var a;!((a=this._currentLink)===null||a===void 0)&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&r.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(l,n.text)},t.prototype._fireUnderlineEvent=function(r,n){var l=r.range,a=this._bufferService.buffer.ydisp,y=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-a-1,l.end.x,l.end.y-a-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(y)},t.prototype._linkLeave=function(r,n,l){var a;!((a=this._currentLink)===null||a===void 0)&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&r.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(l,n.text)},t.prototype._linkAtPosition=function(r,n){var l=r.range.start.y===r.range.end.y,a=r.range.start.y<n.y,y=r.range.end.y>n.y;return(l&&r.range.start.x<=n.x&&r.range.end.x>=n.x||a&&r.range.end.x>=n.x||y&&r.range.start.x<=n.x||a&&y)&&r.range.start.y<=n.y&&r.range.end.y>=n.y},t.prototype._positionFromMouseEvent=function(r,n,l){var a=l.getCoords(r,n,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(r,n,l,a,y){return{x1:r,y1:n,x2:l,y2:a,cols:this._bufferService.cols,fg:y}},f([d(0,o.IBufferService)],t)}(p.Disposable);c.Linkifier2=i},9042:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,i){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},_(h,i)},function(h,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=h}_(h,i),h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),f=this&&this.__decorate||function(h,i,e,t){var r,n=arguments.length,l=n<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,i,e,t);else for(var a=h.length-1;a>=0;a--)(r=h[a])&&(l=(n<3?r(l):n>3?r(i,e,l):r(i,e))||l);return n>3&&l&&Object.defineProperty(i,e,l),l},d=this&&this.__param||function(h,i){return function(e,t){i(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var m=w(844),v=w(3656),o=w(4725),s=w(2585),p=function(h){function i(e,t,r,n,l,a){var y=h.call(this)||this;return y._element=e,y._screenElement=t,y._bufferService=r,y._mouseService=n,y._selectionService=l,y._optionsService=a,y._zones=[],y._areZonesActive=!1,y._lastHoverCoords=[void 0,void 0],y._initialSelectionLength=0,y.register((0,v.addDisposableDomListener)(y._element,"mousedown",function(S){return y._onMouseDown(S)})),y._mouseMoveListener=function(S){return y._onMouseMove(S)},y._mouseLeaveListener=function(S){return y._onMouseLeave(S)},y._clickListener=function(S){return y._onClick(S)},y}return u(i,h),i.prototype.dispose=function(){h.prototype.dispose.call(this),this._deactivate()},i.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},i.prototype.clearAll=function(e,t){if(this._zones.length!==0){e&&t||(e=0,t=this._bufferService.rows-1);for(var r=0;r<this._zones.length;r++){var n=this._zones[r];(n.y1>e&&n.y1<=t+1||n.y2>e&&n.y2<=t+1||n.y1<e&&n.y2>t+1)&&(this._currentZone&&this._currentZone===n&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(r--,1))}this._zones.length===0&&this._deactivate()}},i.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))},i.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))},i.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},i.prototype._onHover=function(e){var t=this,r=this._findZoneEventAt(e);r!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),r&&(this._currentZone=r,r.hoverCallback&&r.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return t._onTooltip(e)},this._optionsService.rawOptions.linkTooltipHoverDuration)))},i.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t?.tooltipCallback(e)},i.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);t?.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},i.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},i.prototype._onClick=function(e){var t=this._findZoneEventAt(e),r=this._getSelectionLength();t&&r===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},i.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},i.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var r=t[0],n=t[1],l=0;l<this._zones.length;l++){var a=this._zones[l];if(a.y1===a.y2){if(n===a.y1&&r>=a.x1&&r<a.x2)return a}else if(n===a.y1&&r>=a.x1||n===a.y2&&r<a.x2||n>a.y1&&n<a.y2)return a}},f([d(2,s.IBufferService),d(3,o.IMouseService),d(4,o.ISelectionService),d(5,s.IOptionsService)],i)}(m.Disposable);c.MouseZoneManager=p},6193:function(W,c){var w=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&u[f],m=0;if(d)return d.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var _=function(){function u(f){this._renderCallback=f,this._refreshCallbacks=[]}return u.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},u.prototype.addRefreshCallback=function(f){var d=this;return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()})),this._animationFrame},u.prototype.refresh=function(f,d,m){var v=this;this._rowCount=m,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return v._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._animationFrame=void 0,this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},u.prototype._runRefreshCallbacks=function(){var f,d;try{for(var m=w(this._refreshCallbacks),v=m.next();!v.done;v=m.next())(0,v.value)(0)}catch(o){f={error:o}}finally{try{v&&!v.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.error}}this._refreshCallbacks=[]},u}();c.RenderDebouncer=_},5596:function(W,c,w){var _,u=this&&this.__extends||(_=function(d,m){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,o){v.__proto__=o}||function(v,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(v[s]=o[s])},_(d,m)},function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function v(){this.constructor=d}_(d,m),d.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var f=function(d){function m(){var v=d!==null&&d.apply(this,arguments)||this;return v._currentDevicePixelRatio=window.devicePixelRatio,v}return u(m,d),m.prototype.setListener=function(v){var o=this;this._listener&&this.clearListener(),this._listener=v,this._outerListener=function(){o._listener&&(o._listener(window.devicePixelRatio,o._currentDevicePixelRatio),o._updateDpr())},this._updateDpr()},m.prototype.dispose=function(){d.prototype.dispose.call(this),this.clearListener()},m.prototype._updateDpr=function(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)===null||v===void 0||v.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},m.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)},m}(w(844).Disposable);c.ScreenDprMonitor=f},3236:function(W,c,w){var _,u=this&&this.__extends||(_=function(X,F){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,D){O.__proto__=D}||function(O,D){for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(O[H]=D[H])},_(X,F)},function(X,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");function O(){this.constructor=X}_(X,F),X.prototype=F===null?Object.create(F):(O.prototype=F.prototype,new O)}),f=this&&this.__values||function(X){var F=typeof Symbol=="function"&&Symbol.iterator,O=F&&X[F],D=0;if(O)return O.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&D>=X.length&&(X=void 0),{value:X&&X[D++],done:!X}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")},d=this&&this.__read||function(X,F){var O=typeof Symbol=="function"&&X[Symbol.iterator];if(!O)return X;var D,H,G=O.call(X),V=[];try{for(;(F===void 0||F-- >0)&&!(D=G.next()).done;)V.push(D.value)}catch(J){H={error:J}}finally{try{D&&!D.done&&(O=G.return)&&O.call(G)}finally{if(H)throw H.error}}return V},m=this&&this.__spreadArray||function(X,F,O){if(O||arguments.length===2)for(var D,H=0,G=F.length;H<G;H++)!D&&H in F||(D||(D=Array.prototype.slice.call(F,0,H)),D[H]=F[H]);return X.concat(D||Array.prototype.slice.call(F))};Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var v=w(2950),o=w(1680),s=w(3614),p=w(2584),h=w(5435),i=w(3525),e=w(3551),t=w(9312),r=w(6114),n=w(3656),l=w(9042),a=w(357),y=w(6954),S=w(4567),g=w(1296),b=w(7399),C=w(8460),R=w(8437),L=w(5680),k=w(3230),x=w(4725),E=w(428),A=w(8934),T=w(6465),U=w(5114),q=w(8969),j=w(8055),z=w(4269),N=w(5941),M=w(3107),Y=w(5744),Z=w(9074),te=w(2585),B=typeof window<"u"?window.document:null,Q=function(X){function F(O){O===void 0&&(O={});var D=X.call(this,O)||this;return D.browser=r,D._keyDownHandled=!1,D._keyDownSeen=!1,D._keyPressHandled=!1,D._unprocessedDeadKey=!1,D._onCursorMove=new C.EventEmitter,D._onKey=new C.EventEmitter,D._onRender=new C.EventEmitter,D._onSelectionChange=new C.EventEmitter,D._onTitleChange=new C.EventEmitter,D._onBell=new C.EventEmitter,D._onFocus=new C.EventEmitter,D._onBlur=new C.EventEmitter,D._onA11yCharEmitter=new C.EventEmitter,D._onA11yTabEmitter=new C.EventEmitter,D._setup(),D.linkifier=D._instantiationService.createInstance(e.Linkifier),D.linkifier2=D.register(D._instantiationService.createInstance(T.Linkifier2)),D._decorationService=D._instantiationService.createInstance(Z.DecorationService),D._instantiationService.setService(te.IDecorationService,D._decorationService),D.register(D._inputHandler.onRequestBell(function(){return D.bell()})),D.register(D._inputHandler.onRequestRefreshRows(function(H,G){return D.refresh(H,G)})),D.register(D._inputHandler.onRequestSendFocus(function(){return D._reportFocus()})),D.register(D._inputHandler.onRequestReset(function(){return D.reset()})),D.register(D._inputHandler.onRequestWindowsOptionsReport(function(H){return D._reportWindowsOptions(H)})),D.register(D._inputHandler.onColor(function(H){return D._handleColorEvent(H)})),D.register((0,C.forwardEvent)(D._inputHandler.onCursorMove,D._onCursorMove)),D.register((0,C.forwardEvent)(D._inputHandler.onTitleChange,D._onTitleChange)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yChar,D._onA11yCharEmitter)),D.register((0,C.forwardEvent)(D._inputHandler.onA11yTab,D._onA11yTabEmitter)),D.register(D._bufferService.onResize(function(H){return D._afterResize(H.cols,H.rows)})),D}return u(F,X),Object.defineProperty(F.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),F.prototype._handleColorEvent=function(O){var D,H,G,V;if(this._colorManager){try{for(var J=f(O),ie=J.next();!ie.done;ie=J.next()){var se=ie.value,ae=void 0,K="";switch(se.index){case 256:ae="foreground",K="10";break;case 257:ae="background",K="11";break;case 258:ae="cursor",K="12";break;default:ae="ansi",K="4;"+se.index}if(ae)switch(se.type){case 0:var ce=j.color.toColorRGB(ae==="ansi"?this._colorManager.colors.ansi[se.index]:this._colorManager.colors[ae]);this.coreService.triggerDataEvent(p.C0.ESC+"]"+K+";"+(0,N.toRgbString)(ce)+p.C1_ESCAPED.ST);break;case 1:ae==="ansi"?this._colorManager.colors.ansi[se.index]=j.rgba.toColor.apply(j.rgba,m([],d(se.color),!1)):this._colorManager.colors[ae]=j.rgba.toColor.apply(j.rgba,m([],d(se.color),!1));break;case 2:this._colorManager.restoreColor(se.index)}}}catch(de){D={error:de}}finally{try{ie&&!ie.done&&(H=J.return)&&H.call(J)}finally{if(D)throw D.error}}(G=this._renderService)===null||G===void 0||G.setColors(this._colorManager.colors),(V=this.viewport)===null||V===void 0||V.onThemeChange(this._colorManager.colors)}},F.prototype.dispose=function(){var O,D,H;this._isDisposed||(X.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(H=(D=this.element)===null||D===void 0?void 0:D.parentNode)===null||H===void 0||H.removeChild(this.element))},F.prototype._setup=function(){X.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(F.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),F.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},F.prototype._updateOptions=function(O){var D,H,G,V;switch(X.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(D=this._renderService)===null||D===void 0||D.clear(),(H=this._charSizeService)===null||H===void 0||H.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":(G=this.viewport)===null||G===void 0||G.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new S.AccessibilityManager(this,this._renderService)):((V=this._accessibilityManager)===null||V===void 0||V.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},F.prototype._onTextAreaFocus=function(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},F.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},F.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},F.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var O=this.buffer.ybase+this.buffer.y,D=this.buffer.lines.get(O);if(D){var H=Math.min(this.buffer.x,this.cols-1),G=this._renderService.dimensions.actualCellHeight,V=D.getWidth(H),J=this._renderService.dimensions.actualCellWidth*V,ie=this.buffer.y*this._renderService.dimensions.actualCellHeight,se=H*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=se+"px",this.textarea.style.top=ie+"px",this.textarea.style.width=J+"px",this.textarea.style.height=G+"px",this.textarea.style.lineHeight=G+"px",this.textarea.style.zIndex="-5"}}},F.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register((0,n.addDisposableDomListener)(this.element,"copy",function(H){O.hasSelection()&&(0,s.copyHandler)(H,O._selectionService)}));var D=function(H){return(0,s.handlePasteEvent)(H,O.textarea,O.coreService)};this.register((0,n.addDisposableDomListener)(this.textarea,"paste",D)),this.register((0,n.addDisposableDomListener)(this.element,"paste",D)),r.isFirefox?this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(H){H.button===2&&(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register((0,n.addDisposableDomListener)(this.element,"contextmenu",function(H){(0,s.rightClickHandler)(H,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),r.isLinux&&this.register((0,n.addDisposableDomListener)(this.element,"auxclick",function(H){H.button===1&&(0,s.moveTextAreaUnderMouseCursor)(H,O.textarea,O.screenElement)}))},F.prototype._bindKeys=function(){var O=this;this.register((0,n.addDisposableDomListener)(this.textarea,"keyup",function(D){return O._keyUp(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keydown",function(D){return O._keyDown(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"keypress",function(D){return O._keyPress(D)},!0)),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionupdate",function(D){return O._compositionHelper.compositionupdate(D)})),this.register((0,n.addDisposableDomListener)(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register((0,n.addDisposableDomListener)(this.textarea,"input",function(D){return O._inputEvent(D)},!0)),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(D){return O._queueLinkification(D.start,D.end)}))},F.prototype.open=function(O){var D=this;if(!O)throw new Error("Terminal requires a parent element.");O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.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"),O.appendChild(this.element);var H=B.createDocumentFragment();this._viewportElement=B.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),H.appendChild(this._viewportElement),this._viewportScrollArea=B.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=B.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=B.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),H.appendChild(this.screenElement),this.textarea=B.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",l.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,n.addDisposableDomListener)(this.textarea,"focus",function(J){return D._onTextAreaFocus(J)})),this.register((0,n.addDisposableDomListener)(this.textarea,"blur",function(){return D._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var G=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(x.ICoreBrowserService,G),this._charSizeService=this._instantiationService.createInstance(E.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new L.ColorManager(B,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(J){return D._colorManager.onOptionsChange(J)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(z.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService);var V=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,V,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(function(J){return D._onRender.fire(J)})),this.onResize(function(J){return D._renderService.resize(J.cols,J.rows)}),this._compositionView=B.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(H),this._soundService=this._instantiationService.createInstance(a.SoundService),this._instantiationService.setService(x.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(o.Viewport,function(J){return D.scrollLines(J,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return D.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){D._renderService.onCursorMove(),D._syncTextArea()})),this.register(this.onResize(function(){return D._renderService.onResize(D.cols,D.rows)})),this.register(this.onBlur(function(){return D._renderService.onBlur()})),this.register(this.onFocus(function(){return D._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return D.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(J){return D.scrollLines(J.amount,J.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return D._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(J){return D._renderService.onSelectionChanged(J.start,J.end,J.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(J){D.textarea.value=J,D.textarea.focus(),D.textarea.select()})),this.register(this._onScroll.event(function(J){D.viewport.syncScrollArea(),D._selectionService.refresh()})),this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",function(){return D._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return D._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(M.BufferDecorationRenderer,this.screenElement)),this.register((0,n.addDisposableDomListener)(this.element,"mousedown",function(J){return D._selectionService.onMouseDown(J)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new S.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance(Y.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange(function(){!D._overviewRulerRenderer&&D.options.overviewRulerWidth&&D._viewportElement&&D.screenElement&&(D._overviewRulerRenderer=D._instantiationService.createInstance(Y.OverviewRulerRenderer,D._viewportElement,D.screenElement))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},F.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(i.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(g.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},F.prototype._setTheme=function(O){var D,H,G;this._theme=O,(D=this._colorManager)===null||D===void 0||D.setTheme(O),(H=this._renderService)===null||H===void 0||H.setColors(this._colorManager.colors),(G=this.viewport)===null||G===void 0||G.onThemeChange(this._colorManager.colors)},F.prototype.bindMouse=function(){var O=this,D=this,H=this.element;function G(K){var ce,de,Se=D._mouseService.getRawByteCoords(K,D.screenElement,D.cols,D.rows);if(!Se)return!1;switch(K.overrideType||K.type){case"mousemove":de=32,K.buttons===void 0?(ce=3,K.button!==void 0&&(ce=K.button<3?K.button:3)):ce=1&K.buttons?0:4&K.buttons?1:2&K.buttons?2:3;break;case"mouseup":de=0,ce=K.button<3?K.button:3;break;case"mousedown":de=1,ce=K.button<3?K.button:3;break;case"wheel":if(D.viewport.getLinesScrolled(K)===0)return!1;de=K.deltaY<0?0:1,ce=4;break;default:return!1}return!(de===void 0||ce===void 0||ce>4)&&D.coreMouseService.triggerMouseEvent({col:Se.x-33,row:Se.y-33,button:ce,action:de,ctrl:K.ctrlKey,alt:K.altKey,shift:K.shiftKey})}var V={mouseup:null,wheel:null,mousedrag:null,mousemove:null},J=function(K){return G(K),K.buttons||(O._document.removeEventListener("mouseup",V.mouseup),V.mousedrag&&O._document.removeEventListener("mousemove",V.mousedrag)),O.cancel(K)},ie=function(K){return G(K),O.cancel(K,!0)},se=function(K){K.buttons&&G(K)},ae=function(K){K.buttons||G(K)};this.register(this.coreMouseService.onProtocolChange(function(K){K?(O.optionsService.rawOptions.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O.coreMouseService.explainEvents(K)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&K?V.mousemove||(H.addEventListener("mousemove",ae),V.mousemove=ae):(H.removeEventListener("mousemove",V.mousemove),V.mousemove=null),16&K?V.wheel||(H.addEventListener("wheel",ie,{passive:!1}),V.wheel=ie):(H.removeEventListener("wheel",V.wheel),V.wheel=null),2&K?V.mouseup||(V.mouseup=J):(O._document.removeEventListener("mouseup",V.mouseup),V.mouseup=null),4&K?V.mousedrag||(V.mousedrag=se):(O._document.removeEventListener("mousemove",V.mousedrag),V.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,n.addDisposableDomListener)(H,"mousedown",function(K){if(K.preventDefault(),O.focus(),O.coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(K))return G(K),V.mouseup&&O._document.addEventListener("mouseup",V.mouseup),V.mousedrag&&O._document.addEventListener("mousemove",V.mousedrag),O.cancel(K)})),this.register((0,n.addDisposableDomListener)(H,"wheel",function(K){if(!V.wheel){if(!O.buffer.hasScrollback){var ce=O.viewport.getLinesScrolled(K);if(ce===0)return;for(var de=p.C0.ESC+(O.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(K.deltaY<0?"A":"B"),Se="",Be=0;Be<Math.abs(ce);Be++)Se+=de;return O.coreService.triggerDataEvent(Se,!0),O.cancel(K,!0)}return O.viewport.onWheel(K)?O.cancel(K):void 0}},{passive:!1})),this.register((0,n.addDisposableDomListener)(H,"touchstart",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(K),O.cancel(K)},{passive:!0})),this.register((0,n.addDisposableDomListener)(H,"touchmove",function(K){if(!O.coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(K)?void 0:O.cancel(K)},{passive:!1}))},F.prototype.refresh=function(O,D){var H;(H=this._renderService)===null||H===void 0||H.refreshRows(O,D)},F.prototype._queueLinkification=function(O,D){var H;(H=this.linkifier)===null||H===void 0||H.linkifyRows(O,D)},F.prototype.updateCursorStyle=function(O){var D;!((D=this._selectionService)===null||D===void 0)&&D.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},F.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},F.prototype.scrollLines=function(O,D,H){H===void 0&&(H=0),X.prototype.scrollLines.call(this,O,D,H),this.refresh(0,this.rows-1)},F.prototype.paste=function(O){(0,s.paste)(O,this.textarea,this.coreService)},F.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},F.prototype.registerLinkMatcher=function(O,D,H){var G=this.linkifier.registerLinkMatcher(O,D,H);return this.refresh(0,this.rows-1),G},F.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},F.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},F.prototype.registerCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var D=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),D},F.prototype.deregisterCharacterJoiner=function(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(F.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),F.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},F.prototype.registerDecoration=function(O){return this._decorationService.registerDecoration(O)},F.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},F.prototype.select=function(O,D,H){this._selectionService.setSelection(O,D,H)},F.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},F.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]}},F.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},F.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},F.prototype.selectLines=function(O,D){var H;(H=this._selectionService)===null||H===void 0||H.selectLines(O,D)},F.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;var D=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!D&&!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;D||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var H=(0,b.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),H.type===3||H.type===2){var G=this.rows-1;return this.scrollLines(H.type===2?-G:G),this.cancel(O,!0)}return H.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(H.cancel&&this.cancel(O,!0),!H.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(H.key!==p.C0.ETX&&H.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:H.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(H.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0))))},F.prototype._isThirdLevelShift=function(O,D){var H=O.isMac&&!this.options.macOptionIsMeta&&D.altKey&&!D.ctrlKey&&!D.metaKey||O.isWindows&&D.altKey&&D.ctrlKey&&!D.metaKey||O.isWindows&&D.getModifierState("AltGraph");return D.type==="keypress"?H:H&&(!D.keyCode||D.keyCode>47)},F.prototype._keyUp=function(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(D){return D.keyCode===16||D.keyCode===17||D.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)},F.prototype._keyPress=function(O){var D;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)D=O.charCode;else if(O.which===null||O.which===void 0)D=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;D=O.which}return!(!D||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(D=String.fromCharCode(D),this._onKey.fire({key:D,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(D,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},F.prototype._inputEvent=function(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var D=O.data;return this.coreService.triggerDataEvent(D,!0),this.cancel(O),!0}return!1},F.prototype.bell=function(){var O;this._soundBell()&&((O=this._soundService)===null||O===void 0||O.playBellSound()),this._onBell.fire()},F.prototype.resize=function(O,D){O!==this.cols||D!==this.rows?X.prototype.resize.call(this,O,D):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},F.prototype._afterResize=function(O,D){var H,G;(H=this._charSizeService)===null||H===void 0||H.measure(),(G=this.viewport)===null||G===void 0||G.syncScrollArea(!0)},F.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),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 O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(R.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},F.prototype.reset=function(){var O,D;this.options.rows=this.rows,this.options.cols=this.cols;var H=this._customKeyEventHandler;this._setup(),X.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._decorationService.reset(),this._customKeyEventHandler=H,this.refresh(0,this.rows-1),(D=this.viewport)===null||D===void 0||D.syncScrollArea()},F.prototype.clearTextureAtlas=function(){var O;(O=this._renderService)===null||O===void 0||O.clearTextureAtlas()},F.prototype._reportFocus=function(){var O;!((O=this.element)===null||O===void 0)&&O.classList.contains("focus")?this.coreService.triggerDataEvent(p.C0.ESC+"[I"):this.coreService.triggerDataEvent(p.C0.ESC+"[O")},F.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case h.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var D=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),H=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[4;"+H+";"+D+"t");break;case h.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var G=this._renderService.dimensions.scaledCellWidth.toFixed(0),V=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(p.C0.ESC+"[6;"+V+";"+G+"t")}},F.prototype.cancel=function(O,D){if(this.options.cancelEvents||D)return O.preventDefault(),O.stopPropagation(),!1},F.prototype._visualBell=function(){return!1},F.prototype._soundBell=function(){return this.options.bellStyle==="sound"},F}(q.CoreTerminal);c.Terminal=Q},9924:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0;var w=function(){function _(u,f){f===void 0&&(f=1e3),this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return _.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},_.prototype.refresh=function(u,f,d){var m=this;this._rowCount=d,u=u!==void 0?u:0,f=f!==void 0?f: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,f):f;var v=Date.now();if(v-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=v,this._innerRefresh();else if(!this._additionalRefreshRequested){var o=v-this._lastRefreshMs,s=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){m._lastRefreshMs=Date.now(),m._innerRefresh(),m._additionalRefreshRequested=!1,m._refreshTimeoutID=void 0},s)}},_.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}},_}();c.TimeBasedDebouncer=w},1680:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,i){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},_(h,i)},function(h,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=h}_(h,i),h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),f=this&&this.__decorate||function(h,i,e,t){var r,n=arguments.length,l=n<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,i,e,t);else for(var a=h.length-1;a>=0;a--)(r=h[a])&&(l=(n<3?r(l):n>3?r(i,e,l):r(i,e))||l);return n>3&&l&&Object.defineProperty(i,e,l),l},d=this&&this.__param||function(h,i){return function(e,t){i(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;var m=w(844),v=w(3656),o=w(4725),s=w(2585),p=function(h){function i(e,t,r,n,l,a,y,S){var g=h.call(this)||this;return g._scrollLines=e,g._viewportElement=t,g._scrollArea=r,g._element=n,g._bufferService=l,g._optionsService=a,g._charSizeService=y,g._renderService=S,g.scrollBarWidth=0,g._currentRowHeight=0,g._currentScaledCellHeight=0,g._lastRecordedBufferLength=0,g._lastRecordedViewportHeight=0,g._lastRecordedBufferHeight=0,g._lastTouchY=0,g._lastScrollTop=0,g._wheelPartialScroll=0,g._refreshAnimationFrame=null,g._ignoreNextScrollEvent=!1,g.scrollBarWidth=g._viewportElement.offsetWidth-g._scrollArea.offsetWidth||15,g.register((0,v.addDisposableDomListener)(g._viewportElement,"scroll",g._onScroll.bind(g))),g._activeBuffer=g._bufferService.buffer,g.register(g._bufferService.buffers.onBufferActivate(function(b){return g._activeBuffer=b.activeBuffer})),g._renderDimensions=g._renderService.dimensions,g.register(g._renderService.onDimensionsChange(function(b){return g._renderDimensions=b})),setTimeout(function(){return g.syncScrollArea()},0),g}return u(i,h),i.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},i.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return t._innerRefresh()}))},i.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 e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},i.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},i.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},i.prototype._bubbleScroll=function(e,t){var r=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&r<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},i.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},i.prototype._getPixelsScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},i.prototype.getLinesScrolled=function(e){if(e.deltaY===0||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},i.prototype._applyScrollModifier=function(e,t){var r=this._optionsService.rawOptions.fastScrollModifier;return r==="alt"&&t.altKey||r==="ctrl"&&t.ctrlKey||r==="shift"&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},i.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},i.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},f([d(4,s.IBufferService),d(5,s.IOptionsService),d(6,o.ICharSizeService),d(7,o.IRenderService)],i)}(m.Disposable);c.Viewport=p},3107:function(W,c,w){var _,u=this&&this.__extends||(_=function(i,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},_(i,e)},function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}_(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__decorate||function(i,e,t,r){var n,l=arguments.length,a=l<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(i,e,t,r);else for(var y=i.length-1;y>=0;y--)(n=i[y])&&(a=(l<3?n(a):l>3?n(e,t,a):n(e,t))||a);return l>3&&a&&Object.defineProperty(e,t,a),a},d=this&&this.__param||function(i,e){return function(t,r){e(t,r,i)}},m=this&&this.__values||function(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;var v=w(3656),o=w(4725),s=w(844),p=w(2585),h=function(i){function e(t,r,n,l){var a=i.call(this)||this;return a._screenElement=t,a._bufferService=r,a._decorationService=n,a._renderService=l,a._decorationElements=new Map,a._altBufferIsActive=!1,a._dimensionsChanged=!1,a._container=document.createElement("div"),a._container.classList.add("xterm-decoration-container"),a._screenElement.appendChild(a._container),a.register(a._renderService.onRenderedViewportChange(function(){return a._queueRefresh()})),a.register(a._renderService.onDimensionsChange(function(){a._dimensionsChanged=!0,a._queueRefresh()})),a.register((0,v.addDisposableDomListener)(window,"resize",function(){return a._queueRefresh()})),a.register(a._bufferService.buffers.onBufferActivate(function(){a._altBufferIsActive=a._bufferService.buffer===a._bufferService.buffers.alt})),a.register(a._decorationService.onDecorationRegistered(function(){return a._queueRefresh()})),a.register(a._decorationService.onDecorationRemoved(function(y){return a._removeDecoration(y)})),a}return u(e,i),e.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),i.prototype.dispose.call(this)},e.prototype._queueRefresh=function(){var t=this;this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(function(){t.refreshDecorations(),t._animationFrame=void 0}))},e.prototype.refreshDecorations=function(){var t,r;try{for(var n=m(this._decorationService.decorations),l=n.next();!l.done;l=n.next()){var a=l.value;this._renderDecoration(a)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this._dimensionsChanged=!1},e.prototype._renderDecoration=function(t){this._refreshStyle(t),this._dimensionsChanged&&this._refreshXPosition(t)},e.prototype._createElement=function(t){var r,n=document.createElement("div");n.classList.add("xterm-decoration"),n.style.width=Math.round((t.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",n.style.height=(t.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",n.style.top=(t.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",n.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var l=(r=t.options.x)!==null&&r!==void 0?r:0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(t,n),n},e.prototype._refreshStyle=function(t){var r=this,n=t.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)t.element&&(t.element.style.display="none",t.onRenderEmitter.fire(t.element));else{var l=this._decorationElements.get(t);l||(t.onDispose(function(){return r._removeDecoration(t)}),l=this._createElement(t),t.element=l,this._decorationElements.set(t,l),this._container.appendChild(l)),l.style.top=n*this._renderService.dimensions.actualCellHeight+"px",l.style.display=this._altBufferIsActive?"none":"block",t.onRenderEmitter.fire(l)}},e.prototype._refreshXPosition=function(t,r){var n;if(r===void 0&&(r=t.element),r){var l=(n=t.options.x)!==null&&n!==void 0?n:0;(t.options.anchor||"left")==="right"?r.style.right=l?l*this._renderService.dimensions.actualCellWidth+"px":"":r.style.left=l?l*this._renderService.dimensions.actualCellWidth+"px":""}},e.prototype._removeDecoration=function(t){var r;(r=this._decorationElements.get(t))===null||r===void 0||r.remove(),this._decorationElements.delete(t)},f([d(1,p.IBufferService),d(2,p.IDecorationService),d(3,o.IRenderService)],e)}(s.Disposable);c.BufferDecorationRenderer=h},5871:function(W,c){var w=this&&this.__values||function(u){var f=typeof Symbol=="function"&&Symbol.iterator,d=f&&u[f],m=0;if(d)return d.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&m>=u.length&&(u=void 0),{value:u&&u[m++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0;var _=function(){function u(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(u.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),u.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},u.prototype.addDecoration=function(f){var d,m;if(f.options.overviewRulerOptions){try{for(var v=w(this._zones),o=v.next();!o.done;o=v.next()){var s=o.value;if(s.color===f.options.overviewRulerOptions.color&&s.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(s,f.marker.line))return;if(this._lineAdjacentToZone(s,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(s,f.marker.line)}}}catch(p){d={error:p}}finally{try{o&&!o.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},u.prototype.setPadding=function(f){this._linePadding=f},u.prototype._lineIntersectsZone=function(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine},u.prototype._lineAdjacentToZone=function(f,d,m){return d>=f.startBufferLine-this._linePadding[m||"full"]&&d<=f.endBufferLine+this._linePadding[m||"full"]},u.prototype._addLineToZone=function(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)},u}();c.ColorZoneStore=_},5744:function(W,c,w){var _,u=this&&this.__extends||(_=function(n,l){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,y){a.__proto__=y}||function(a,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(a[S]=y[S])},_(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function a(){this.constructor=n}_(n,l),n.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}),f=this&&this.__decorate||function(n,l,a,y){var S,g=arguments.length,b=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,a):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(n,l,a,y);else for(var C=n.length-1;C>=0;C--)(S=n[C])&&(b=(g<3?S(b):g>3?S(l,a,b):S(l,a))||b);return g>3&&b&&Object.defineProperty(l,a,b),b},d=this&&this.__param||function(n,l){return function(a,y){l(a,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&n[l],y=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;var v=w(5871),o=w(3656),s=w(4725),p=w(844),h=w(2585),i={full:0,left:0,center:0,right:0},e={full:0,left:0,center:0,right:0},t={full:0,left:0,center:0,right:0},r=function(n){function l(a,y,S,g,b,C){var R,L=n.call(this)||this;L._viewportElement=a,L._screenElement=y,L._bufferService=S,L._decorationService=g,L._renderService=b,L._optionsService=C,L._colorZoneStore=new v.ColorZoneStore,L._shouldUpdateDimensions=!0,L._shouldUpdateAnchor=!0,L._lastKnownBufferLength=0,L._canvas=document.createElement("canvas"),L._canvas.classList.add("xterm-decoration-overview-ruler"),L._refreshCanvasDimensions(),(R=L._viewportElement.parentElement)===null||R===void 0||R.insertBefore(L._canvas,L._viewportElement);var k=L._canvas.getContext("2d");if(!k)throw new Error("Ctx cannot be null");return L._ctx=k,L._registerDecorationListeners(),L._registerBufferChangeListeners(),L._registerDimensionChangeListeners(),L}return u(l,n),Object.defineProperty(l.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),l.prototype._registerDecorationListeners=function(){var a=this;this.register(this._decorationService.onDecorationRegistered(function(){return a._queueRefresh(void 0,!0)})),this.register(this._decorationService.onDecorationRemoved(function(){return a._queueRefresh(void 0,!0)}))},l.prototype._registerBufferChangeListeners=function(){var a=this;this.register(this._renderService.onRenderedViewportChange(function(){return a._queueRefresh()})),this.register(this._bufferService.buffers.onBufferActivate(function(){a._canvas.style.display=a._bufferService.buffer===a._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(function(){a._lastKnownBufferLength!==a._bufferService.buffers.normal.lines.length&&(a._refreshDrawHeightConstants(),a._refreshColorZonePadding())}))},l.prototype._registerDimensionChangeListeners=function(){var a=this;this.register(this._renderService.onRender(function(){a._containerHeight&&a._containerHeight===a._screenElement.clientHeight||(a._queueRefresh(!0),a._containerHeight=a._screenElement.clientHeight)})),this.register(this._optionsService.onOptionChange(function(y){y==="overviewRulerWidth"&&a._queueRefresh(!0)})),this.register((0,o.addDisposableDomListener)(window,"resize",function(){a._queueRefresh(!0)})),this._queueRefresh(!0)},l.prototype.dispose=function(){var a;(a=this._canvas)===null||a===void 0||a.remove(),n.prototype.dispose.call(this)},l.prototype._refreshDrawConstants=function(){var a=Math.floor(this._canvas.width/3),y=Math.ceil(this._canvas.width/3);e.full=this._canvas.width,e.left=a,e.center=y,e.right=a,this._refreshDrawHeightConstants(),t.full=0,t.left=0,t.center=e.left,t.right=e.left+e.center},l.prototype._refreshDrawHeightConstants=function(){i.full=Math.round(2*window.devicePixelRatio);var a=this._canvas.height/this._bufferService.buffer.lines.length,y=Math.round(Math.max(Math.min(a,12),6)*window.devicePixelRatio);i.left=y,i.center=y,i.right=y},l.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*i.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*i.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*i.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*i.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},l.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},l.prototype._refreshDecorations=function(){var a,y,S,g,b,C;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var R=m(this._decorationService.decorations),L=R.next();!L.done;L=R.next()){var k=L.value;this._colorZoneStore.addDecoration(k)}}catch(j){a={error:j}}finally{try{L&&!L.done&&(y=R.return)&&y.call(R)}finally{if(a)throw a.error}}this._ctx.lineWidth=1;var x=this._colorZoneStore.zones;try{for(var E=m(x),A=E.next();!A.done;A=E.next())(q=A.value).position!=="full"&&this._renderColorZone(q)}catch(j){S={error:j}}finally{try{A&&!A.done&&(g=E.return)&&g.call(E)}finally{if(S)throw S.error}}try{for(var T=m(x),U=T.next();!U.done;U=T.next()){var q;(q=U.value).position==="full"&&this._renderColorZone(q)}}catch(j){b={error:j}}finally{try{U&&!U.done&&(C=T.return)&&C.call(T)}finally{if(b)throw b.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},l.prototype._renderColorZone=function(a){this._ctx.fillStyle=a.color,this._ctx.fillRect(t[a.position||"full"],Math.round((this._canvas.height-1)*(a.startBufferLine/this._bufferService.buffers.active.lines.length)-i[a.position||"full"]/2),e[a.position||"full"],Math.round((this._canvas.height-1)*((a.endBufferLine-a.startBufferLine)/this._bufferService.buffers.active.lines.length)+i[a.position||"full"]))},l.prototype._queueRefresh=function(a,y){var S=this;this._shouldUpdateDimensions=a||this._shouldUpdateDimensions,this._shouldUpdateAnchor=y||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=window.requestAnimationFrame(function(){S._refreshDecorations(),S._animationFrame=void 0}))},f([d(2,h.IBufferService),d(3,h.IDecorationService),d(4,s.IRenderService),d(5,h.IOptionsService)],l)}(p.Disposable);c.OverviewRulerRenderer=r},2950:function(W,c,w){var _=this&&this.__decorate||function(v,o,s,p){var h,i=arguments.length,e=i<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,s):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,o,s,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(i<3?h(e):i>3?h(o,s,e):h(o,s))||e);return i>3&&e&&Object.defineProperty(o,s,e),e},u=this&&this.__param||function(v,o){return function(s,p){o(s,p,v)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;var f=w(4725),d=w(2585),m=function(){function v(o,s,p,h,i,e){this._textarea=o,this._compositionView=s,this._bufferService=p,this._optionsService=h,this._coreService=i,this._renderService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(v.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),v.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},v.prototype.compositionupdate=function(o){var s=this;this._compositionView.textContent=o.data,this.updateCompositionElements(),setTimeout(function(){s._compositionPosition.end=s._textarea.value.length},0)},v.prototype.compositionend=function(){this._finalizeComposition(!0)},v.prototype.keydown=function(o){if(this._isComposing||this._isSendingComposition){if(o.keyCode===229||o.keyCode===16||o.keyCode===17||o.keyCode===18)return!1;this._finalizeComposition(!1)}return o.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},v.prototype._finalizeComposition=function(o){var s=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,o){var p={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(s._isSendingComposition){s._isSendingComposition=!1;var i;p.start+=s._dataAlreadySent.length,(i=s._isComposing?s._textarea.value.substring(p.start,p.end):s._textarea.value.substring(p.start)).length>0&&s._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;var h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}},v.prototype._handleAnyTextareaChanges=function(){var o=this,s=this._textarea.value;setTimeout(function(){if(!o._isComposing){var p=o._textarea.value.replace(s,"");p.length>0&&(o._dataAlreadySent=p,o._coreService.triggerDataEvent(p,!0))}},0)},v.prototype.updateCompositionElements=function(o){var s=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var p=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.actualCellHeight,i=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,e=p*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=e+"px",this._compositionView.style.top=i+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=e+"px",this._textarea.style.top=i+"px",this._textarea.style.width=Math.max(t.width,1)+"px",this._textarea.style.height=Math.max(t.height,1)+"px",this._textarea.style.lineHeight=t.height+"px"}o||setTimeout(function(){return s.updateCompositionElements(!0)},0)}},_([u(2,d.IBufferService),u(3,d.IOptionsService),u(4,d.ICoreService),u(5,f.IRenderService)],v)}();c.CompositionHelper=m},9806:(W,c)=>{function w(_,u,f){var d=f.getBoundingClientRect(),m=_.getComputedStyle(f),v=parseInt(m.getPropertyValue("padding-left")),o=parseInt(m.getPropertyValue("padding-top"));return[u.clientX-d.left-v,u.clientY-d.top-o]}Object.defineProperty(c,"__esModule",{value:!0}),c.getRawByteCoords=c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=w,c.getCoords=function(_,u,f,d,m,v,o,s,p){if(v){var h=w(_,u,f);if(h)return h[0]=Math.ceil((h[0]+(p?o/2:0))/o),h[1]=Math.ceil(h[1]/s),h[0]=Math.min(Math.max(h[0],1),d+(p?1:0)),h[1]=Math.min(Math.max(h[1],1),m),h}},c.getRawByteCoords=function(_){if(_)return{x:_[0]+32,y:_[1]+32}}},9504:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;var _=w(2584);function u(s,p,h,i){var e=s-f(h,s),t=p-f(h,p),r=Math.abs(e-t)-function(n,l,a){for(var y=0,S=n-f(a,n),g=l-f(a,l),b=0;b<Math.abs(S-g);b++){var C=d(n,l)==="A"?-1:1,R=a.buffer.lines.get(S+C*b);R?.isWrapped&&y++}return y}(s,p,h);return o(r,v(d(s,p),i))}function f(s,p){for(var h=0,i=s.buffer.lines.get(p),e=i?.isWrapped;e&&p>=0&&p<s.rows;)h++,e=(i=s.buffer.lines.get(--p))==null?void 0:i.isWrapped;return h}function d(s,p){return s>p?"A":"B"}function m(s,p,h,i,e,t){for(var r=s,n=p,l="";r!==h||n!==i;)r+=e?1:-1,e&&r>t.cols-1?(l+=t.buffer.translateBufferLineToString(n,!1,s,r),r=0,s=0,n++):!e&&r<0&&(l+=t.buffer.translateBufferLineToString(n,!1,0,s+1),s=r=t.cols-1,n--);return l+t.buffer.translateBufferLineToString(n,!1,s,r)}function v(s,p){var h=p?"O":"[";return _.C0.ESC+h+s}function o(s,p){s=Math.floor(s);for(var h="",i=0;i<s;i++)h+=p;return h}c.moveToCellSequence=function(s,p,h,i){var e,t=h.buffer.x,r=h.buffer.y;if(!h.buffer.hasScrollback)return function(l,a,y,S,g,b){return u(a,S,g,b).length===0?"":o(m(l,a,l,a-f(g,a),!1,g).length,v("D",b))}(t,r,0,p,h,i)+u(r,p,h,i)+function(l,a,y,S,g,b){var C;C=u(a,S,g,b).length>0?S-f(g,S):a;var R=S,L=function(k,x,E,A,T,U){var q;return q=u(E,A,T,U).length>0?A-f(T,A):x,k<E&&q<=A||k>=E&&q<A?"C":"D"}(l,a,y,S,g,b);return o(m(l,C,y,R,L==="C",g).length,v(L,b))}(t,r,s,p,h,i);if(r===p)return e=t>s?"D":"C",o(Math.abs(t-s),v(e,i));e=r>p?"D":"C";var n=Math.abs(r-p);return o(function(l,a){return a.cols-l}(r>p?s:t,h)+(n-1)*h.cols+1+((r>p?t:s)-1),v(e,i))}},4389:function(W,c,w){var _=this&&this.__assign||function(){return _=Object.assign||function(i){for(var e,t=1,r=arguments.length;t<r;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i},_.apply(this,arguments)},u=this&&this.__values||function(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var f=w(3236),d=w(9042),m=w(7975),v=w(7090),o=w(5741),s=w(8285),p=["cols","rows"],h=function(){function i(e){var t=this;this._core=new f.Terminal(e),this._addonManager=new o.AddonManager,this._publicOptions=_({},this._core.options);var r=function(y){return t._core.options[y]},n=function(y,S){t._checkReadonlyOptions(y),t._core.options[y]=S};for(var l in this._core.options){var a={get:r.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this._publicOptions,l,a)}}return i.prototype._checkReadonlyOptions=function(e){if(p.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},i.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(i.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new m.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"unicode",{get:function(){return this._checkProposedApi(),new v.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new s.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),i.prototype.blur=function(){this._core.blur()},i.prototype.focus=function(){this._core.focus()},i.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},i.prototype.open=function(e){this._core.open(e)},i.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},i.prototype.registerLinkMatcher=function(e,t,r){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,r)},i.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},i.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},i.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},i.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},i.prototype.registerMarker=function(e){return e===void 0&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},i.prototype.registerDecoration=function(e){var t,r,n;return this._checkProposedApi(),this._verifyPositiveIntegers((t=e.x)!==null&&t!==void 0?t:0,(r=e.width)!==null&&r!==void 0?r:0,(n=e.height)!==null&&n!==void 0?n:0),this._core.registerDecoration(e)},i.prototype.addMarker=function(e){return this.registerMarker(e)},i.prototype.hasSelection=function(){return this._core.hasSelection()},i.prototype.select=function(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)},i.prototype.getSelection=function(){return this._core.getSelection()},i.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},i.prototype.clearSelection=function(){this._core.clearSelection()},i.prototype.selectAll=function(){this._core.selectAll()},i.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},i.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},i.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},i.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},i.prototype.scrollToTop=function(){this._core.scrollToTop()},i.prototype.scrollToBottom=function(){this._core.scrollToBottom()},i.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},i.prototype.clear=function(){this._core.clear()},i.prototype.write=function(e,t){this._core.write(e,t)},i.prototype.writeUtf8=function(e,t){this._core.write(e,t)},i.prototype.writeln=function(e,t){this._core.write(e),this._core.write(`\r
4
+ `,t)},i.prototype.paste=function(e){this._core.paste(e)},i.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},i.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},i.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},i.prototype.reset=function(){this._core.reset()},i.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},i.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(i,"strings",{get:function(){return d},enumerable:!1,configurable:!0}),i.prototype._verifyIntegers=function(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var l=u(r),a=l.next();!a.done;a=l.next()){var y=a.value;if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}}catch(S){e={error:S}}finally{try{a&&!a.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},i.prototype._verifyPositiveIntegers=function(){for(var e,t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var l=u(r),a=l.next();!a.done;a=l.next()){var y=a.value;if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}catch(S){e={error:S}}finally{try{a&&!a.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},i}();c.Terminal=h},1546:function(W,c,w){var _=this&&this.__values||function(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.BaseRenderLayer=void 0;var u=w(643),f=w(8803),d=w(1420),m=w(3734),v=w(1752),o=w(8055),s=w(9631),p=w(8978),h=function(){function i(e,t,r,n,l,a,y,S,g){this._container=e,this._alpha=n,this._colors=l,this._rendererId=a,this._bufferService=y,this._optionsService=S,this._decorationService=g,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return i.prototype.dispose=function(){var e;(0,s.removeElementFromParent)(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},i.prototype._initCanvas=function(){this._ctx=(0,v.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},i.prototype.onOptionsChanged=function(){},i.prototype.onBlur=function(){},i.prototype.onFocus=function(){},i.prototype.onCursorMove=function(){},i.prototype.onGridChanged=function(e,t){},i.prototype.onSelectionChanged=function(e,t,r){r===void 0&&(r=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r},i.prototype.setColors=function(e){this._refreshCharAtlas(e)},i.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},i.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,d.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},i.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},i.prototype.clearTextureAtlas=function(){var e;(e=this._charAtlas)===null||e===void 0||e.clear()},i.prototype._fillCells=function(e,t,r,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,n*this._scaledCellHeight)},i.prototype._fillMiddleLineAtCells=function(e,t,r){r===void 0&&(r=1);var n=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-n-window.devicePixelRatio,r*this._scaledCellWidth,window.devicePixelRatio)},i.prototype._fillBottomLineAtCells=function(e,t,r){r===void 0&&(r=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,r*this._scaledCellWidth,window.devicePixelRatio)},i.prototype._fillLeftLineAtCell=function(e,t,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*r,this._scaledCellHeight)},i.prototype._strokeRectAtCell=function(e,t,r,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,r*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},i.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))},i.prototype._clearCells=function(e,t,r,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,n*this._scaledCellHeight))},i.prototype._fillCharTrueColor=function(e,t,r){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=f.TEXT_BASELINE,this._clipRow(r);var n=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(n=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),n||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},i.prototype._drawChars=function(e,t,r){var n,l,a,y=this._getContrastColor(e,t,r);if(y||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,r,y);else{var S,g;e.isInverse()?(S=e.isBgDefault()?f.INVERTED_DEFAULT_COLOR:e.getBgColor(),g=e.isFgDefault()?f.INVERTED_DEFAULT_COLOR:e.getFgColor()):(g=e.isBgDefault()?u.DEFAULT_COLOR:e.getBgColor(),S=e.isFgDefault()?u.DEFAULT_COLOR:e.getFgColor()),S+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&S<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||u.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||u.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=g,this._currentGlyphIdentifier.fg=S,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var b=!1;try{for(var C=_(this._decorationService.getDecorationsAtCell(t,r)),R=C.next();!R.done;R=C.next()){var L=R.value;if(L.backgroundColorRGB||L.foregroundColorRGB){b=!0;break}}}catch(k){n={error:k}}finally{try{R&&!R.done&&(l=C.return)&&l.call(C)}finally{if(n)throw n.error}}!b&&(!((a=this._charAtlas)===null||a===void 0)&&a.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,r)}},i.prototype._drawUncachedChars=function(e,t,r,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=f.TEXT_BASELINE,e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=o.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+m.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var a=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&a<8&&(a+=8),this._ctx.fillStyle=this._colors.ansi[a].css}this._clipRow(r),e.isDim()&&(this._ctx.globalAlpha=f.DIM_OPACITY);var y=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(y=(0,p.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),y||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},i.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},i.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},i.prototype._getContrastColor=function(e,t,r){var n,l,a,y,S=!1;try{for(var g=_(this._decorationService.getDecorationsAtCell(t,r)),b=g.next();!b.done;b=g.next()){var C=b.value;C.options.layer!=="top"&&S||(C.backgroundColorRGB&&(a=C.backgroundColorRGB.rgba),C.foregroundColorRGB&&(y=C.foregroundColorRGB.rgba),S=C.options.layer==="top")}}catch(Y){n={error:Y}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(n)throw n.error}}if(S||this._colors.selectionForeground&&this._isCellInSelection(t,r)&&(y=this._colors.selectionForeground.rgba),a||y||this._optionsService.rawOptions.minimumContrastRatio!==1&&!(0,v.excludeFromContrastRatioDemands)(e.getCode())){if(!a&&!y){var R=this._colors.contrastCache.getColor(e.bg,e.fg);if(R!==void 0)return R||void 0}var L=e.getFgColor(),k=e.getFgColorMode(),x=e.getBgColor(),E=e.getBgColorMode(),A=!!e.isInverse(),T=!!e.isInverse();if(A){var U=L;L=x,x=U;var q=k;k=E,E=q}var j=this._resolveBackgroundRgba(a!==void 0?50331648:E,a??x,A),z=this._resolveForegroundRgba(k,L,A,T),N=o.rgba.ensureContrastRatio(a??j,y??z,this._optionsService.rawOptions.minimumContrastRatio);if(!N){if(!y)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);N=y}var M={css:o.channels.toCss(N>>24&255,N>>16&255,N>>8&255),rgba:N};return a||y||this._colors.contrastCache.setColor(e.bg,e.fg,M),M}},i.prototype._resolveBackgroundRgba=function(e,t,r){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.foreground.rgba:this._colors.background.rgba}},i.prototype._resolveForegroundRgba=function(e,t,r,n){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&n&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.background.rgba:this._colors.foreground.rgba}},i.prototype._isCellInSelection=function(e,t){var r=this._selectionStart,n=this._selectionEnd;return!(!r||!n)&&(this._columnSelectMode?e>=r[0]&&t>=r[1]&&e<n[0]&&t<n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0])},i}();c.BaseRenderLayer=h},2512:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}),f=this&&this.__decorate||function(e,t,r,n){var l,a=arguments.length,y=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,r,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(y=(a<3?l(y):a>3?l(t,r,y):l(t,r))||y);return a>3&&y&&Object.defineProperty(t,r,y),y},d=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CursorRenderLayer=void 0;var m=w(1546),v=w(511),o=w(2585),s=w(4725),p=600,h=function(e){function t(r,n,l,a,y,S,g,b,C,R){var L=e.call(this,r,"cursor",n,!0,l,a,S,g,R)||this;return L._onRequestRedraw=y,L._coreService=b,L._coreBrowserService=C,L._cell=new v.CellData,L._state={x:0,y:0,isFocused:!1,style:"",width:0},L._cursorRenderers={bar:L._renderBarCursor.bind(L),block:L._renderBlockCursor.bind(L),underline:L._renderUnderlineCursor.bind(L)},L}return u(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(r){e.prototype.resize.call(this,r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager)===null||r===void 0||r.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var r;(r=this._cursorBlinkStateManager)===null||r===void 0||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var r;(r=this._cursorBlinkStateManager)===null||r===void 0||r.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var r,n=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new i(this._coreBrowserService.isFocused,function(){n._render(!0)})):((r=this._cursorBlinkStateManager)===null||r===void 0||r.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var r;(r=this._cursorBlinkStateManager)===null||r===void 0||r.restartBlinkAnimation()},t.prototype.onGridChanged=function(r,n){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(r){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=n-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)this._clearCursor();else{var a=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(n).loadCell(a,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var y=this._optionsService.rawOptions.cursorStyle;return y&&y!=="block"?this._cursorRenderers[y](a,l,this._cell):this._renderBlurCursor(a,l,this._cell),this._ctx.restore(),this._state.x=a,this._state.y=l,this._state.isFocused=!1,this._state.style=y,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===a&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](a,l,this._cell),this._ctx.restore(),this._state.x=a,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.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})},t.prototype._renderBarCursor=function(r,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(r,n,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(r,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(r,n,l.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(l,r,n),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(r,n,l){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(r,n),this._ctx.restore()},t.prototype._renderBlurCursor=function(r,n,l){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(r,n,l.getWidth(),1),this._ctx.restore()},f([d(5,o.IBufferService),d(6,o.IOptionsService),d(7,o.ICoreService),d(8,s.ICoreBrowserService),d(9,o.IDecorationService)],t)}(m.BaseRenderLayer);c.CursorRenderLayer=h;var i=function(){function e(t,r){this._renderCallback=r,this.isCursorVisible=!0,t&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.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)},e.prototype.restartBlinkAnimation=function(){var t=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){t._renderCallback(),t._animationFrame=void 0})))},e.prototype._restartInterval=function(t){var r=this;t===void 0&&(t=p),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(r._animationTimeRestarted){var n=p-(Date.now()-r._animationTimeRestarted);if(r._animationTimeRestarted=void 0,n>0)return void r._restartInterval(n)}r.isCursorVisible=!1,r._animationFrame=window.requestAnimationFrame(function(){r._renderCallback(),r._animationFrame=void 0}),r._blinkInterval=window.setInterval(function(){if(r._animationTimeRestarted){var l=p-(Date.now()-r._animationTimeRestarted);return r._animationTimeRestarted=void 0,void r._restartInterval(l)}r.isCursorVisible=!r.isCursorVisible,r._animationFrame=window.requestAnimationFrame(function(){r._renderCallback(),r._animationFrame=void 0})},p)},t)},e.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)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(W,c,w){var _,u,f,d,m,v,o,s,p,h,i,e,t,r,n,l,a,y,S,g,b,C,R,L,k,x,E,A,T,U,q,j,z,N,M,Y,Z,te,B,Q,X,F,O,D,H,G,V,J,ie,se,ae,K,ce,de,Se,Be,jt,Ft,Wt,Ut,qt,Nt,Fe,We,Ue,qe,Ne,ze,Ke,Ge,Ve,Xe,Ze,Ye,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,dt,_t,pt,vt,yt,gt,mt,bt,St,Ct,wt,Lt,Et,xt,kt,Rt,Mt,At,Ot,Dt,Tt,Bt,zt,Kt,Gt,Vt,Xt,Zt,Yt,Jt,$t,Qt,er,tr,rr,ir,nr,or,fr=this&&this.__read||function(P,I){var oe=typeof Symbol=="function"&&P[Symbol.iterator];if(!oe)return P;var _e,Ce,ve=oe.call(P),ne=[];try{for(;(I===void 0||I-- >0)&&!(_e=ve.next()).done;)ne.push(_e.value)}catch(ye){Ce={error:ye}}finally{try{_e&&!_e.done&&(oe=ve.return)&&oe.call(ve)}finally{if(Ce)throw Ce.error}}return ne},sr=this&&this.__values||function(P){var I=typeof Symbol=="function"&&Symbol.iterator,oe=I&&P[I],_e=0;if(oe)return oe.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&_e>=P.length&&(P=void 0),{value:P&&P[_e++],done:!P}}};throw new TypeError(I?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.tryDrawCustomChar=c.powerlineDefinitions=c.boxDrawingDefinitions=c.blockElementDefinitions=void 0;var dr=w(1752);c.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 gr={"\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]]};c.boxDrawingDefinitions={"\u2500":(_={},_[1]="M0,.5 L1,.5",_),"\u2501":(u={},u[3]="M0,.5 L1,.5",u),"\u2502":(f={},f[1]="M.5,0 L.5,1",f),"\u2503":(d={},d[3]="M.5,0 L.5,1",d),"\u250C":(m={},m[1]="M0.5,1 L.5,.5 L1,.5",m),"\u250F":(v={},v[3]="M0.5,1 L.5,.5 L1,.5",v),"\u2510":(o={},o[1]="M0,.5 L.5,.5 L.5,1",o),"\u2513":(s={},s[3]="M0,.5 L.5,.5 L.5,1",s),"\u2514":(p={},p[1]="M.5,0 L.5,.5 L1,.5",p),"\u2517":(h={},h[3]="M.5,0 L.5,.5 L1,.5",h),"\u2518":(i={},i[1]="M.5,0 L.5,.5 L0,.5",i),"\u251B":(e={},e[3]="M.5,0 L.5,.5 L0,.5",e),"\u251C":(t={},t[1]="M.5,0 L.5,1 M.5,.5 L1,.5",t),"\u2523":(r={},r[3]="M.5,0 L.5,1 M.5,.5 L1,.5",r),"\u2524":(n={},n[1]="M.5,0 L.5,1 M.5,.5 L0,.5",n),"\u252B":(l={},l[3]="M.5,0 L.5,1 M.5,.5 L0,.5",l),"\u252C":(a={},a[1]="M0,.5 L1,.5 M.5,.5 L.5,1",a),"\u2533":(y={},y[3]="M0,.5 L1,.5 M.5,.5 L.5,1",y),"\u2534":(S={},S[1]="M0,.5 L1,.5 M.5,.5 L.5,0",S),"\u253B":(g={},g[3]="M0,.5 L1,.5 M.5,.5 L.5,0",g),"\u253C":(b={},b[1]="M0,.5 L1,.5 M.5,0 L.5,1",b),"\u254B":(C={},C[3]="M0,.5 L1,.5 M.5,0 L.5,1",C),"\u2574":(R={},R[1]="M.5,.5 L0,.5",R),"\u2578":(L={},L[3]="M.5,.5 L0,.5",L),"\u2575":(k={},k[1]="M.5,.5 L.5,0",k),"\u2579":(x={},x[3]="M.5,.5 L.5,0",x),"\u2576":(E={},E[1]="M.5,.5 L1,.5",E),"\u257A":(A={},A[3]="M.5,.5 L1,.5",A),"\u2577":(T={},T[1]="M.5,.5 L.5,1",T),"\u257B":(U={},U[3]="M.5,.5 L.5,1",U),"\u2550":(q={},q[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},q),"\u2551":(j={},j[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},j),"\u2552":(z={},z[1]=function(P,I){return"M.5,1 L.5,"+(.5-I)+" L1,"+(.5-I)+" M.5,"+(.5+I)+" L1,"+(.5+I)},z),"\u2553":(N={},N[1]=function(P,I){return"M"+(.5-P)+",1 L"+(.5-P)+",.5 L1,.5 M"+(.5+P)+",.5 L"+(.5+P)+",1"},N),"\u2554":(M={},M[1]=function(P,I){return"M1,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1"},M),"\u2555":(Y={},Y[1]=function(P,I){return"M0,"+(.5-I)+" L.5,"+(.5-I)+" L.5,1 M0,"+(.5+I)+" L.5,"+(.5+I)},Y),"\u2556":(Z={},Z[1]=function(P,I){return"M"+(.5+P)+",1 L"+(.5+P)+",.5 L0,.5 M"+(.5-P)+",.5 L"+(.5-P)+",1"},Z),"\u2557":(te={},te[1]=function(P,I){return"M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M0,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",1"},te),"\u2558":(B={},B[1]=function(P,I){return"M.5,0 L.5,"+(.5+I)+" L1,"+(.5+I)+" M.5,"+(.5-I)+" L1,"+(.5-I)},B),"\u2559":(Q={},Q[1]=function(P,I){return"M1,.5 L"+(.5-P)+",.5 L"+(.5-P)+",0 M"+(.5+P)+",.5 L"+(.5+P)+",0"},Q),"\u255A":(X={},X[1]=function(P,I){return"M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0 M1,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",0"},X),"\u255B":(F={},F[1]=function(P,I){return"M0,"+(.5+I)+" L.5,"+(.5+I)+" L.5,0 M0,"+(.5-I)+" L.5,"+(.5-I)},F),"\u255C":(O={},O[1]=function(P,I){return"M0,.5 L"+(.5+P)+",.5 L"+(.5+P)+",0 M"+(.5-P)+",.5 L"+(.5-P)+",0"},O),"\u255D":(D={},D[1]=function(P,I){return"M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M0,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",0"},D),"\u255E":(H={},H[1]=function(P,I){return"M.5,0 L.5,1 M.5,"+(.5-I)+" L1,"+(.5-I)+" M.5,"+(.5+I)+" L1,"+(.5+I)},H),"\u255F":(G={},G[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1 M"+(.5+P)+",.5 L1,.5"},G),"\u2560":(V={},V[1]=function(P,I){return"M"+(.5-P)+",0 L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},V),"\u2561":(J={},J[1]=function(P,I){return"M.5,0 L.5,1 M0,"+(.5-I)+" L.5,"+(.5-I)+" M0,"+(.5+I)+" L.5,"+(.5+I)},J),"\u2562":(ie={},ie[1]=function(P,I){return"M0,.5 L"+(.5-P)+",.5 M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},ie),"\u2563":(se={},se[1]=function(P,I){return"M"+(.5+P)+",0 L"+(.5+P)+",1 M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0"},se),"\u2564":(ae={},ae[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)+" M.5,"+(.5+I)+" L.5,1"},ae),"\u2565":(K={},K[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",.5 L"+(.5-P)+",1 M"+(.5+P)+",.5 L"+(.5+P)+",1"},K),"\u2566":(ce={},ce[1]=function(P,I){return"M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1"},ce),"\u2567":(de={},de[1]=function(P,I){return"M.5,0 L.5,"+(.5-I)+" M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},de),"\u2568":(Se={},Se[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",.5 L"+(.5-P)+",0 M"+(.5+P)+",.5 L"+(.5+P)+",0"},Se),"\u2569":(Be={},Be[1]=function(P,I){return"M0,"+(.5+I)+" L1,"+(.5+I)+" M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},Be),"\u256A":(jt={},jt[1]=function(P,I){return"M.5,0 L.5,1 M0,"+(.5-I)+" L1,"+(.5-I)+" M0,"+(.5+I)+" L1,"+(.5+I)},jt),"\u256B":(Ft={},Ft[1]=function(P,I){return"M0,.5 L1,.5 M"+(.5-P)+",0 L"+(.5-P)+",1 M"+(.5+P)+",0 L"+(.5+P)+",1"},Ft),"\u256C":(Wt={},Wt[1]=function(P,I){return"M0,"+(.5+I)+" L"+(.5-P)+","+(.5+I)+" L"+(.5-P)+",1 M1,"+(.5+I)+" L"+(.5+P)+","+(.5+I)+" L"+(.5+P)+",1 M0,"+(.5-I)+" L"+(.5-P)+","+(.5-I)+" L"+(.5-P)+",0 M1,"+(.5-I)+" L"+(.5+P)+","+(.5-I)+" L"+(.5+P)+",0"},Wt),"\u2571":(Ut={},Ut[1]="M1,0 L0,1",Ut),"\u2572":(qt={},qt[1]="M0,0 L1,1",qt),"\u2573":(Nt={},Nt[1]="M1,0 L0,1 M0,0 L1,1",Nt),"\u257C":(Fe={},Fe[1]="M.5,.5 L0,.5",Fe[3]="M.5,.5 L1,.5",Fe),"\u257D":(We={},We[1]="M.5,.5 L.5,0",We[3]="M.5,.5 L.5,1",We),"\u257E":(Ue={},Ue[1]="M.5,.5 L1,.5",Ue[3]="M.5,.5 L0,.5",Ue),"\u257F":(qe={},qe[1]="M.5,.5 L.5,1",qe[3]="M.5,.5 L.5,0",qe),"\u250D":(Ne={},Ne[1]="M.5,.5 L.5,1",Ne[3]="M.5,.5 L1,.5",Ne),"\u250E":(ze={},ze[1]="M.5,.5 L1,.5",ze[3]="M.5,.5 L.5,1",ze),"\u2511":(Ke={},Ke[1]="M.5,.5 L.5,1",Ke[3]="M.5,.5 L0,.5",Ke),"\u2512":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,.5 L.5,1",Ge),"\u2515":(Ve={},Ve[1]="M.5,.5 L.5,0",Ve[3]="M.5,.5 L1,.5",Ve),"\u2516":(Xe={},Xe[1]="M.5,.5 L1,.5",Xe[3]="M.5,.5 L.5,0",Xe),"\u2519":(Ze={},Ze[1]="M.5,.5 L.5,0",Ze[3]="M.5,.5 L0,.5",Ze),"\u251A":(Ye={},Ye[1]="M.5,.5 L0,.5",Ye[3]="M.5,.5 L.5,0",Ye),"\u251D":(Je={},Je[1]="M.5,0 L.5,1",Je[3]="M.5,.5 L1,.5",Je),"\u251E":($e={},$e[1]="M0.5,1 L.5,.5 L1,.5",$e[3]="M.5,.5 L.5,0",$e),"\u251F":(Qe={},Qe[1]="M.5,0 L.5,.5 L1,.5",Qe[3]="M.5,.5 L.5,1",Qe),"\u2520":(et={},et[1]="M.5,.5 L1,.5",et[3]="M.5,0 L.5,1",et),"\u2521":(tt={},tt[1]="M.5,.5 L.5,1",tt[3]="M.5,0 L.5,.5 L1,.5",tt),"\u2522":(rt={},rt[1]="M.5,.5 L.5,0",rt[3]="M0.5,1 L.5,.5 L1,.5",rt),"\u2525":(it={},it[1]="M.5,0 L.5,1",it[3]="M.5,.5 L0,.5",it),"\u2526":(nt={},nt[1]="M0,.5 L.5,.5 L.5,1",nt[3]="M.5,.5 L.5,0",nt),"\u2527":(ot={},ot[1]="M.5,0 L.5,.5 L0,.5",ot[3]="M.5,.5 L.5,1",ot),"\u2528":(st={},st[1]="M.5,.5 L0,.5",st[3]="M.5,0 L.5,1",st),"\u2529":(at={},at[1]="M.5,.5 L.5,1",at[3]="M.5,0 L.5,.5 L0,.5",at),"\u252A":(ct={},ct[1]="M.5,.5 L.5,0",ct[3]="M0,.5 L.5,.5 L.5,1",ct),"\u252D":(lt={},lt[1]="M0.5,1 L.5,.5 L1,.5",lt[3]="M.5,.5 L0,.5",lt),"\u252E":(ht={},ht[1]="M0,.5 L.5,.5 L.5,1",ht[3]="M.5,.5 L1,.5",ht),"\u252F":(ut={},ut[1]="M.5,.5 L.5,1",ut[3]="M0,.5 L1,.5",ut),"\u2530":(ft={},ft[1]="M0,.5 L1,.5",ft[3]="M.5,.5 L.5,1",ft),"\u2531":(dt={},dt[1]="M.5,.5 L1,.5",dt[3]="M0,.5 L.5,.5 L.5,1",dt),"\u2532":(_t={},_t[1]="M.5,.5 L0,.5",_t[3]="M0.5,1 L.5,.5 L1,.5",_t),"\u2535":(pt={},pt[1]="M.5,0 L.5,.5 L1,.5",pt[3]="M.5,.5 L0,.5",pt),"\u2536":(vt={},vt[1]="M.5,0 L.5,.5 L0,.5",vt[3]="M.5,.5 L1,.5",vt),"\u2537":(yt={},yt[1]="M.5,.5 L.5,0",yt[3]="M0,.5 L1,.5",yt),"\u2538":(gt={},gt[1]="M0,.5 L1,.5",gt[3]="M.5,.5 L.5,0",gt),"\u2539":(mt={},mt[1]="M.5,.5 L1,.5",mt[3]="M.5,0 L.5,.5 L0,.5",mt),"\u253A":(bt={},bt[1]="M.5,.5 L0,.5",bt[3]="M.5,0 L.5,.5 L1,.5",bt),"\u253D":(St={},St[1]="M.5,0 L.5,1 M.5,.5 L1,.5",St[3]="M.5,.5 L0,.5",St),"\u253E":(Ct={},Ct[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Ct[3]="M.5,.5 L1,.5",Ct),"\u253F":(wt={},wt[1]="M.5,0 L.5,1",wt[3]="M0,.5 L1,.5",wt),"\u2540":(Lt={},Lt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Lt[3]="M.5,.5 L.5,0",Lt),"\u2541":(Et={},Et[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Et[3]="M.5,.5 L.5,1",Et),"\u2542":(xt={},xt[1]="M0,.5 L1,.5",xt[3]="M.5,0 L.5,1",xt),"\u2543":(kt={},kt[1]="M0.5,1 L.5,.5 L1,.5",kt[3]="M.5,0 L.5,.5 L0,.5",kt),"\u2544":(Rt={},Rt[1]="M0,.5 L.5,.5 L.5,1",Rt[3]="M.5,0 L.5,.5 L1,.5",Rt),"\u2545":(Mt={},Mt[1]="M.5,0 L.5,.5 L1,.5",Mt[3]="M0,.5 L.5,.5 L.5,1",Mt),"\u2546":(At={},At[1]="M.5,0 L.5,.5 L0,.5",At[3]="M0.5,1 L.5,.5 L1,.5",At),"\u2547":(Ot={},Ot[1]="M.5,.5 L.5,1",Ot[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ot),"\u2548":(Dt={},Dt[1]="M.5,.5 L.5,0",Dt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",Dt),"\u2549":(Tt={},Tt[1]="M.5,.5 L1,.5",Tt[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Tt),"\u254A":(Bt={},Bt[1]="M.5,.5 L0,.5",Bt[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Bt),"\u254C":(zt={},zt[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",zt),"\u254D":(Kt={},Kt[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Kt),"\u2504":(Gt={},Gt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Gt),"\u2505":(Vt={},Vt[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Vt),"\u2508":(Xt={},Xt[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",Xt),"\u2509":(Zt={},Zt[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",Zt),"\u254E":(Yt={},Yt[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Yt),"\u254F":(Jt={},Jt[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Jt),"\u2506":($t={},$t[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",$t),"\u2507":(Qt={},Qt[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Qt),"\u250A":(er={},er[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",er),"\u250B":(tr={},tr[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",tr),"\u256D":(rr={},rr[1]="C.5,1,.5,.5,1,.5",rr),"\u256E":(ir={},ir[1]="C.5,1,.5,.5,0,.5",ir),"\u256F":(nr={},nr[1]="C.5,0,.5,.5,0,.5",nr),"\u2570":(or={},or[1]="C.5,0,.5,.5,1,.5",or)},c.powerlineDefinitions={"\uE0B0":{d:"M0,0 L1,.5 L0,1",type:0},"\uE0B1":{d:"M0,0 L1,.5 L0,1",type:1,horizontalPadding:.5},"\uE0B2":{d:"M1,0 L0,.5 L1,1",type:0},"\uE0B3":{d:"M1,0 L0,.5 L1,1",type:1,horizontalPadding:.5}},c.tryDrawCustomChar=function(P,I,oe,_e,Ce,ve){var ne=c.blockElementDefinitions[I];if(ne)return function(re,pe,Oe,De,Re,Me){for(var le=0;le<pe.length;le++){var he=pe[le],$=Re/8,ue=Me/8;re.fillRect(Oe+he.x*$,De+he.y*ue,he.w*$,he.h*ue)}}(P,ne,oe,_e,Ce,ve),!0;var ye=gr[I];if(ye)return function(re,pe,Oe,De,Re,Me){var le,he=_r.get(pe);he||(he=new Map,_r.set(pe,he));var $=re.fillStyle;if(typeof $!="string")throw new Error('Unexpected fillStyle type "'+$+'"');var ue=he.get($);if(!ue){var fe=pe[0].length,ge=pe.length,Le=document.createElement("canvas");Le.width=fe,Le.height=ge;var Te=(0,dr.throwIfFalsy)(Le.getContext("2d")),be=new ImageData(fe,ge),Pe=void 0,Ae=void 0,ke=void 0,Ie=void 0;if($.startsWith("#"))Pe=parseInt($.slice(1,3),16),Ae=parseInt($.slice(3,5),16),ke=parseInt($.slice(5,7),16),Ie=$.length>7&&parseInt($.slice(7,9),16)||1;else{if(!$.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+$+'" when drawing pattern glyph');Pe=(le=fr($.substring(5,$.length-1).split(",").map(function(je){return parseFloat(je)}),4))[0],Ae=le[1],ke=le[2],Ie=le[3]}for(var Ee=0;Ee<ge;Ee++)for(var xe=0;xe<fe;xe++)be.data[4*(Ee*fe+xe)]=Pe,be.data[4*(Ee*fe+xe)+1]=Ae,be.data[4*(Ee*fe+xe)+2]=ke,be.data[4*(Ee*fe+xe)+3]=pe[Ee][xe]*(255*Ie);Te.putImageData(be,0,0),ue=(0,dr.throwIfFalsy)(re.createPattern(Le,null)),he.set($,ue)}re.fillStyle=ue,re.fillRect(Oe,De,Re,Me)}(P,ye,oe,_e,Ce,ve),!0;var we=c.boxDrawingDefinitions[I];if(we)return function(re,pe,Oe,De,Re,Me){var le,he,$,ue;re.strokeStyle=re.fillStyle;try{for(var fe=sr(Object.entries(pe)),ge=fe.next();!ge.done;ge=fe.next()){var Le=fr(ge.value,2),Te=Le[0],be=Le[1];re.beginPath(),re.lineWidth=window.devicePixelRatio*Number.parseInt(Te);var Pe=void 0;Pe=typeof be=="function"?be(.15,.15/Me*Re):be;try{for(var Ae=($=void 0,sr(Pe.split(" "))),ke=Ae.next();!ke.done;ke=Ae.next()){var Ie=ke.value,Ee=Ie[0],xe=vr[Ee];if(xe){var je=Ie.substring(1).split(",");je[0]&&je[1]&&xe(re,yr(je,Re,Me,Oe,De))}else console.error('Could not find drawing instructions for "'+Ee+'"')}}catch(ar){$={error:ar}}finally{try{ke&&!ke.done&&(ue=Ae.return)&&ue.call(Ae)}finally{if($)throw $.error}}re.stroke(),re.closePath()}}catch(ar){le={error:ar}}finally{try{ge&&!ge.done&&(he=fe.return)&&he.call(fe)}finally{if(le)throw le.error}}}(P,we,oe,_e,Ce,ve),!0;var He=c.powerlineDefinitions[I];return!!He&&(function(re,pe,Oe,De,Re,Me){var le,he;re.beginPath(),re.lineWidth=window.devicePixelRatio;try{for(var $=sr(pe.d.split(" ")),ue=$.next();!ue.done;ue=$.next()){var fe=ue.value,ge=fe[0],Le=vr[ge];if(Le){var Te=fe.substring(1).split(",");Te[0]&&Te[1]&&Le(re,yr(Te,Re,Me,Oe,De,pe.horizontalPadding))}else console.error('Could not find drawing instructions for "'+ge+'"')}}catch(be){le={error:be}}finally{try{ue&&!ue.done&&(he=$.return)&&he.call($)}finally{if(le)throw le.error}}pe.type===1?(re.strokeStyle=re.fillStyle,re.stroke()):re.fill(),re.closePath()}(P,He,oe,_e,Ce,ve),!0)};var _r=new Map;function pr(P,I,oe){return oe===void 0&&(oe=0),Math.max(Math.min(P,I),oe)}var vr={C:function(P,I){return P.bezierCurveTo(I[0],I[1],I[2],I[3],I[4],I[5])},L:function(P,I){return P.lineTo(I[0],I[1])},M:function(P,I){return P.moveTo(I[0],I[1])}};function yr(P,I,oe,_e,Ce,ve){ve===void 0&&(ve=0);var ne=P.map(function(He){return parseFloat(He)||parseInt(He)});if(ne.length<2)throw new Error("Too few arguments for instruction");for(var ye=0;ye<ne.length;ye+=2)ne[ye]*=I-2*ve*window.devicePixelRatio,ne[ye]!==0&&(ne[ye]=pr(Math.round(ne[ye]+.5)-.5,I,0)),ne[ye]+=_e+ve*window.devicePixelRatio;for(var we=1;we<ne.length;we+=2)ne[we]*=oe,ne[we]!==0&&(ne[we]=pr(Math.round(ne[we]+.5)-.5,oe,0)),ne[we]+=Ce;return ne}},3700:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.GridCache=void 0;var w=function(){function _(){this.cache=[]}return _.prototype.resize=function(u,f){for(var d=0;d<u;d++){this.cache.length<=d&&this.cache.push([]);for(var m=this.cache[d].length;m<f;m++)this.cache[d].push(void 0);this.cache[d].length=f}this.cache.length=u},_.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0},_}();c.GridCache=w},5098:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,i){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},_(h,i)},function(h,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=h}_(h,i),h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),f=this&&this.__decorate||function(h,i,e,t){var r,n=arguments.length,l=n<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,i,e,t);else for(var a=h.length-1;a>=0;a--)(r=h[a])&&(l=(n<3?r(l):n>3?r(i,e,l):r(i,e))||l);return n>3&&l&&Object.defineProperty(i,e,l),l},d=this&&this.__param||function(h,i){return function(e,t){i(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.LinkRenderLayer=void 0;var m=w(1546),v=w(8803),o=w(2040),s=w(2585),p=function(h){function i(e,t,r,n,l,a,y,S,g){var b=h.call(this,e,"link",t,!0,r,n,y,S,g)||this;return l.onShowLinkUnderline(function(C){return b._onShowLinkUnderline(C)}),l.onHideLinkUnderline(function(C){return b._onHideLinkUnderline(C)}),a.onShowLinkUnderline(function(C){return b._onShowLinkUnderline(C)}),a.onHideLinkUnderline(function(C){return b._onHideLinkUnderline(C)}),b}return u(i,h),i.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state=void 0},i.prototype.reset=function(){this._clearCurrentLink()},i.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},i.prototype._onShowLinkUnderline=function(e){if(e.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,o.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},i.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},f([d(6,s.IBufferService),d(7,s.IOptionsService),d(8,s.IDecorationService)],i)}(m.BaseRenderLayer);c.LinkRenderLayer=p},3525:function(W,c,w){var _,u=this&&this.__extends||(_=function(a,y){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,g){S.__proto__=g}||function(S,g){for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(S[b]=g[b])},_(a,y)},function(a,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function S(){this.constructor=a}_(a,y),a.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)}),f=this&&this.__decorate||function(a,y,S,g){var b,C=arguments.length,R=C<3?y:g===null?g=Object.getOwnPropertyDescriptor(y,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(a,y,S,g);else for(var L=a.length-1;L>=0;L--)(b=a[L])&&(R=(C<3?b(R):C>3?b(y,S,R):b(y,S))||R);return C>3&&R&&Object.defineProperty(y,S,R),R},d=this&&this.__param||function(a,y){return function(S,g){y(S,g,a)}},m=this&&this.__values||function(a){var y=typeof Symbol=="function"&&Symbol.iterator,S=y&&a[y],g=0;if(S)return S.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&g>=a.length&&(a=void 0),{value:a&&a[g++],done:!a}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.Renderer=void 0;var v=w(9596),o=w(4149),s=w(2512),p=w(5098),h=w(844),i=w(4725),e=w(2585),t=w(1420),r=w(8460),n=1,l=function(a){function y(S,g,b,C,R,L,k,x){var E=a.call(this)||this;E._colors=S,E._screenElement=g,E._bufferService=L,E._charSizeService=k,E._optionsService=x,E._id=n++,E._onRequestRedraw=new r.EventEmitter;var A=E._optionsService.rawOptions.allowTransparency;return E._renderLayers=[R.createInstance(v.TextRenderLayer,E._screenElement,0,E._colors,A,E._id),R.createInstance(o.SelectionRenderLayer,E._screenElement,1,E._colors,E._id),R.createInstance(p.LinkRenderLayer,E._screenElement,2,E._colors,E._id,b,C),R.createInstance(s.CursorRenderLayer,E._screenElement,3,E._colors,E._id,E._onRequestRedraw)],E.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},E._devicePixelRatio=window.devicePixelRatio,E._updateDimensions(),E.onOptionsChanged(),E}return u(y,a),Object.defineProperty(y.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),y.prototype.dispose=function(){var S,g;try{for(var b=m(this._renderLayers),C=b.next();!C.done;C=b.next())C.value.dispose()}catch(R){S={error:R}}finally{try{C&&!C.done&&(g=b.return)&&g.call(b)}finally{if(S)throw S.error}}a.prototype.dispose.call(this),(0,t.removeTerminalFromCache)(this._id)},y.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},y.prototype.setColors=function(S){var g,b;this._colors=S;try{for(var C=m(this._renderLayers),R=C.next();!R.done;R=C.next()){var L=R.value;L.setColors(this._colors),L.reset()}}catch(k){g={error:k}}finally{try{R&&!R.done&&(b=C.return)&&b.call(C)}finally{if(g)throw g.error}}},y.prototype.onResize=function(S,g){var b,C;this._updateDimensions();try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.resize(this.dimensions)}catch(k){b={error:k}}finally{try{L&&!L.done&&(C=R.return)&&C.call(R)}finally{if(b)throw b.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},y.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},y.prototype.onBlur=function(){this._runOperation(function(S){return S.onBlur()})},y.prototype.onFocus=function(){this._runOperation(function(S){return S.onFocus()})},y.prototype.onSelectionChanged=function(S,g,b){b===void 0&&(b=!1),this._runOperation(function(C){return C.onSelectionChanged(S,g,b)}),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},y.prototype.onCursorMove=function(){this._runOperation(function(S){return S.onCursorMove()})},y.prototype.onOptionsChanged=function(){this._runOperation(function(S){return S.onOptionsChanged()})},y.prototype.clear=function(){this._runOperation(function(S){return S.reset()})},y.prototype._runOperation=function(S){var g,b;try{for(var C=m(this._renderLayers),R=C.next();!R.done;R=C.next())S(R.value)}catch(L){g={error:L}}finally{try{R&&!R.done&&(b=C.return)&&b.call(C)}finally{if(g)throw g.error}}},y.prototype.renderRows=function(S,g){var b,C;try{for(var R=m(this._renderLayers),L=R.next();!L.done;L=R.next())L.value.onGridChanged(S,g)}catch(k){b={error:k}}finally{try{L&&!L.done&&(C=R.return)&&C.call(R)}finally{if(b)throw b.error}}},y.prototype.clearTextureAtlas=function(){var S,g;try{for(var b=m(this._renderLayers),C=b.next();!C.done;C=b.next())C.value.clearTextureAtlas()}catch(R){S={error:R}}finally{try{C&&!C.done&&(g=b.return)&&g.call(b)}finally{if(S)throw S.error}}},y.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},f([d(4,e.IInstantiationService),d(5,e.IBufferService),d(6,i.ICharSizeService),d(7,e.IOptionsService)],y)}(h.Disposable);c.Renderer=l},1752:(W,c)=>{function w(_){return 57508<=_&&_<=57558}Object.defineProperty(c,"__esModule",{value:!0}),c.excludeFromContrastRatioDemands=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},c.isPowerlineGlyph=w,c.excludeFromContrastRatioDemands=function(_){return w(_)||function(u){return 9472<=u&&u<=9631}(_)}},4149:function(W,c,w){var _,u=this&&this.__extends||(_=function(s,p){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,i){h.__proto__=i}||function(h,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(h[e]=i[e])},_(s,p)},function(s,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function h(){this.constructor=s}_(s,p),s.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}),f=this&&this.__decorate||function(s,p,h,i){var e,t=arguments.length,r=t<3?p:i===null?i=Object.getOwnPropertyDescriptor(p,h):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,p,h,i);else for(var n=s.length-1;n>=0;n--)(e=s[n])&&(r=(t<3?e(r):t>3?e(p,h,r):e(p,h))||r);return t>3&&r&&Object.defineProperty(p,h,r),r},d=this&&this.__param||function(s,p){return function(h,i){p(h,i,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionRenderLayer=void 0;var m=w(1546),v=w(2585),o=function(s){function p(h,i,e,t,r,n,l){var a=s.call(this,h,"selection",i,!0,e,t,r,n,l)||this;return a._clearState(),a}return u(p,s),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(h){s.prototype.resize.call(this,h),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(h,i,e){if(s.prototype.onSelectionChanged.call(this,h,i,e),this._didStateChange(h,i,e,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&i){var t=h[1]-this._bufferService.buffer.ydisp,r=i[1]-this._bufferService.buffer.ydisp,n=Math.max(t,0),l=Math.min(r,this._bufferService.rows-1);if(n>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,e){var a=h[0],y=i[0]-a,S=l-n+1;this._fillCells(a,n,y,S)}else{a=t===n?h[0]:0;var g=n===r?i[0]:this._bufferService.cols;this._fillCells(a,n,g-a,1);var b=Math.max(l-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,b),n!==l){var C=r===l?i[0]:this._bufferService.cols;this._fillCells(0,l,C,1)}}this._state.start=[h[0],h[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=e,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(h,i,e,t){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||e!==this._state.columnSelectMode||t!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(h,i){return!(!h||!i)&&h[0]===i[0]&&h[1]===i[1]},f([d(4,v.IBufferService),d(5,v.IOptionsService),d(6,v.IDecorationService)],p)}(m.BaseRenderLayer);c.SelectionRenderLayer=o},9596:function(W,c,w){var _,u=this&&this.__extends||(_=function(n,l){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,y){a.__proto__=y}||function(a,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(a[S]=y[S])},_(n,l)},function(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function a(){this.constructor=n}_(n,l),n.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}),f=this&&this.__decorate||function(n,l,a,y){var S,g=arguments.length,b=g<3?l:y===null?y=Object.getOwnPropertyDescriptor(l,a):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(n,l,a,y);else for(var C=n.length-1;C>=0;C--)(S=n[C])&&(b=(g<3?S(b):g>3?S(l,a,b):S(l,a))||b);return g>3&&b&&Object.defineProperty(l,a,b),b},d=this&&this.__param||function(n,l){return function(a,y){l(a,y,n)}},m=this&&this.__values||function(n){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&n[l],y=0;if(a)return a.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&y>=n.length&&(n=void 0),{value:n&&n[y++],done:!n}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.TextRenderLayer=void 0;var v=w(3700),o=w(1546),s=w(3734),p=w(643),h=w(511),i=w(2585),e=w(4725),t=w(4269),r=function(n){function l(a,y,S,g,b,C,R,L,k){var x=n.call(this,a,"text",y,g,S,b,C,R,k)||this;return x._characterJoinerService=L,x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new h.CellData,x._state=new v.GridCache,x}return u(l,n),l.prototype.resize=function(a){n.prototype.resize.call(this,a);var y=this._getFont(!1,!1);this._characterWidth===a.scaledCharWidth&&this._characterFont===y||(this._characterWidth=a.scaledCharWidth,this._characterFont=y,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},l.prototype.reset=function(){this._state.clear(),this._clearAll()},l.prototype._forEachCell=function(a,y,S){for(var g=a;g<=y;g++)for(var b=g+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.lines.get(b),R=this._characterJoinerService.getJoinedCharacters(b),L=0;L<this._bufferService.cols;L++){C.loadCell(L,this._workCell);var k=this._workCell,x=!1,E=L;if(k.getWidth()!==0){if(R.length>0&&L===R[0][0]){x=!0;var A=R.shift();k=new t.JoinedCellData(this._workCell,C.translateToString(!0,A[0],A[1]),A[1]-A[0]),E=A[1]-1}!x&&this._isOverlapping(k)&&E<C.length-1&&C.getCodePoint(E+1)===p.NULL_CELL_CODE&&(k.content&=-12582913,k.content|=2<<22),S(k,L,g),L=E}}},l.prototype._drawBackground=function(a,y){var S=this,g=this._ctx,b=this._bufferService.cols,C=0,R=0,L=null;g.save(),this._forEachCell(a,y,function(k,x,E){var A,T,U=null;k.isInverse()?U=k.isFgDefault()?S._colors.foreground.css:k.isFgRGB()?"rgb("+s.AttributeData.toColorRGB(k.getFgColor()).join(",")+")":S._colors.ansi[k.getFgColor()].css:k.isBgRGB()?U="rgb("+s.AttributeData.toColorRGB(k.getBgColor()).join(",")+")":k.isBgPalette()&&(U=S._colors.ansi[k.getBgColor()].css);var q=!1;try{for(var j=m(S._decorationService.getDecorationsAtCell(x,S._bufferService.buffer.ydisp+E)),z=j.next();!z.done;z=j.next()){var N=z.value;N.options.layer!=="top"&&q||(N.backgroundColorRGB&&(U=N.backgroundColorRGB.css),q=N.options.layer==="top")}}catch(M){A={error:M}}finally{try{z&&!z.done&&(T=j.return)&&T.call(j)}finally{if(A)throw A.error}}L===null&&(C=x,R=E),E!==R?(g.fillStyle=L||"",S._fillCells(C,R,b-C,1),C=x,R=E):L!==U&&(g.fillStyle=L||"",S._fillCells(C,R,x-C,1),C=x,R=E),L=U}),L!==null&&(g.fillStyle=L,this._fillCells(C,R,b-C,1)),g.restore()},l.prototype._drawForeground=function(a,y){var S=this;this._forEachCell(a,y,function(g,b,C){if(!g.isInvisible()&&(S._drawChars(g,b,C),g.isUnderline()||g.isStrikethrough())){if(S._ctx.save(),g.isInverse())if(g.isBgDefault())S._ctx.fillStyle=S._colors.background.css;else if(g.isBgRGB())S._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(g.getBgColor()).join(",")+")";else{var R=g.getBgColor();S._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&R<8&&(R+=8),S._ctx.fillStyle=S._colors.ansi[R].css}else if(g.isFgDefault())S._ctx.fillStyle=S._colors.foreground.css;else if(g.isFgRGB())S._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(g.getFgColor()).join(",")+")";else{var L=g.getFgColor();S._optionsService.rawOptions.drawBoldTextInBrightColors&&g.isBold()&&L<8&&(L+=8),S._ctx.fillStyle=S._colors.ansi[L].css}g.isStrikethrough()&&S._fillMiddleLineAtCells(b,C,g.getWidth()),g.isUnderline()&&S._fillBottomLineAtCells(b,C,g.getWidth()),S._ctx.restore()}})},l.prototype.onGridChanged=function(a,y){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,a,this._bufferService.cols,y-a+1),this._drawBackground(a,y),this._drawForeground(a,y))},l.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},l.prototype._isOverlapping=function(a){if(a.getWidth()!==1||a.getCode()<256)return!1;var y=a.getChars();if(this._characterOverlapCache.hasOwnProperty(y))return this._characterOverlapCache[y];this._ctx.save(),this._ctx.font=this._characterFont;var S=Math.floor(this._ctx.measureText(y).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[y]=S,S},f([d(5,i.IBufferService),d(6,i.IOptionsService),d(7,e.ICharacterJoinerService),d(8,i.IDecorationService)],l)}(o.BaseRenderLayer);c.TextRenderLayer=r},9616:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BaseCharAtlas=void 0;var w=function(){function _(){this._didWarmUp=!1}return _.prototype.dispose=function(){},_.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},_.prototype._doWarmUp=function(){},_.prototype.clear=function(){},_.prototype.beginFrame=function(){},_}();c.BaseCharAtlas=w},1420:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.removeTerminalFromCache=c.acquireCharAtlas=void 0;var _=w(2040),u=w(1906),f=[];c.acquireCharAtlas=function(d,m,v,o,s){for(var p=(0,_.generateConfig)(o,s,d,v),h=0;h<f.length;h++){var i=(e=f[h]).ownedBy.indexOf(m);if(i>=0){if((0,_.configEquals)(e.config,p))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),f.splice(h,1)):e.ownedBy.splice(i,1);break}}for(h=0;h<f.length;h++){var e=f[h];if((0,_.configEquals)(e.config,p))return e.ownedBy.push(m),e.atlas}var t={atlas:new u.DynamicCharAtlas(document,p),config:p,ownedBy:[m]};return f.push(t),t.atlas},c.removeTerminalFromCache=function(d){for(var m=0;m<f.length;m++){var v=f[m].ownedBy.indexOf(d);if(v!==-1){f[m].ownedBy.length===1?(f[m].atlas.dispose(),f.splice(m,1)):f[m].ownedBy.splice(v,1);break}}}},2040:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.is256Color=c.configEquals=c.generateConfig=void 0;var _=w(643);c.generateConfig=function(u,f,d,m){var v={foreground:m.foreground,background:m.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:m.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:u,scaledCharHeight:f,fontFamily:d.fontFamily,fontSize:d.fontSize,fontWeight:d.fontWeight,fontWeightBold:d.fontWeightBold,allowTransparency:d.allowTransparency,colors:v}},c.configEquals=function(u,f){for(var d=0;d<u.colors.ansi.length;d++)if(u.colors.ansi[d].rgba!==f.colors.ansi[d].rgba)return!1;return u.devicePixelRatio===f.devicePixelRatio&&u.fontFamily===f.fontFamily&&u.fontSize===f.fontSize&&u.fontWeight===f.fontWeight&&u.fontWeightBold===f.fontWeightBold&&u.allowTransparency===f.allowTransparency&&u.scaledCharWidth===f.scaledCharWidth&&u.scaledCharHeight===f.scaledCharHeight&&u.colors.foreground===f.colors.foreground&&u.colors.background===f.colors.background},c.is256Color=function(u){return u<_.DEFAULT_COLOR}},8803:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR_ATLAS_CELL_SPACING=c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;var _=w(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic",c.CHAR_ATLAS_CELL_SPACING=1},1906:function(W,c,w){var _,u=this&&this.__extends||(_=function(a,y){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,g){S.__proto__=g}||function(S,g){for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(S[b]=g[b])},_(a,y)},function(a,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function S(){this.constructor=a}_(a,y),a.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)});Object.defineProperty(c,"__esModule",{value:!0}),c.NoneCharAtlas=c.DynamicCharAtlas=c.getGlyphCacheKey=void 0;var f=w(8803),d=w(9616),m=w(5680),v=w(7001),o=w(6114),s=w(1752),p=w(8055),h=1024,i=1024,e={css:"rgba(0, 0, 0, 0)",rgba:0};function t(a){return a.code<<21|a.bg<<12|a.fg<<3|(a.bold?0:4)+(a.dim?0:2)+(a.italic?0:1)}c.getGlyphCacheKey=t;var r=function(a){function y(S,g){var b=a.call(this)||this;b._config=g,b._drawToCacheCount=0,b._glyphsWaitingOnBitmap=[],b._bitmapCommitTimeout=null,b._bitmap=null,b._cacheCanvas=S.createElement("canvas"),b._cacheCanvas.width=h,b._cacheCanvas.height=i,b._cacheCtx=(0,s.throwIfFalsy)(b._cacheCanvas.getContext("2d",{alpha:!0}));var C=S.createElement("canvas");C.width=b._config.scaledCharWidth,C.height=b._config.scaledCharHeight,b._tmpCtx=(0,s.throwIfFalsy)(C.getContext("2d",{alpha:b._config.allowTransparency})),b._width=Math.floor(h/b._config.scaledCharWidth),b._height=Math.floor(i/b._config.scaledCharHeight);var R=b._width*b._height;return b._cacheMap=new v.LRUMap(R),b._cacheMap.prealloc(R),b}return u(y,a),y.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},y.prototype.beginFrame=function(){this._drawToCacheCount=0},y.prototype.clear=function(){if(this._cacheMap.size>0){var S=this._width*this._height;this._cacheMap=new v.LRUMap(S),this._cacheMap.prealloc(S)}this._cacheCtx.clearRect(0,0,h,i),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},y.prototype.draw=function(S,g,b,C){if(g.code===32)return!0;if(!this._canCache(g))return!1;var R=t(g),L=this._cacheMap.get(R);if(L!=null)return this._drawFromCache(S,L,b,C),!0;if(this._drawToCacheCount<100){var k;k=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var x=this._drawToCache(g,k);return this._cacheMap.set(R,x),this._drawFromCache(S,x,b,C),!0}return!1},y.prototype._canCache=function(S){return S.code<256},y.prototype._toCoordinateX=function(S){return S%this._width*this._config.scaledCharWidth},y.prototype._toCoordinateY=function(S){return Math.floor(S/this._width)*this._config.scaledCharHeight},y.prototype._drawFromCache=function(S,g,b,C){if(!g.isEmpty){var R=this._toCoordinateX(g.index),L=this._toCoordinateY(g.index);S.drawImage(g.inBitmap?this._bitmap:this._cacheCanvas,R,L,this._config.scaledCharWidth,this._config.scaledCharHeight,b,C,this._config.scaledCharWidth,this._config.scaledCharHeight)}},y.prototype._getColorFromAnsiIndex=function(S){return S<this._config.colors.ansi.length?this._config.colors.ansi[S]:m.DEFAULT_ANSI_COLORS[S]},y.prototype._getBackgroundColor=function(S){return this._config.allowTransparency?e:S.bg===f.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:S.bg<256?this._getColorFromAnsiIndex(S.bg):this._config.colors.background},y.prototype._getForegroundColor=function(S){return S.fg===f.INVERTED_DEFAULT_COLOR?p.color.opaque(this._config.colors.background):S.fg<256?this._getColorFromAnsiIndex(S.fg):this._config.colors.foreground},y.prototype._drawToCache=function(S,g){this._drawToCacheCount++,this._tmpCtx.save();var b=this._getBackgroundColor(S);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=b.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var C=S.bold?this._config.fontWeightBold:this._config.fontWeight,R=S.italic?"italic":"";this._tmpCtx.font=R+" "+C+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=f.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(S).css,S.dim&&(this._tmpCtx.globalAlpha=f.DIM_OPACITY),this._tmpCtx.fillText(S.chars,0,this._config.scaledCharHeight);var L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),k=!1;if(this._config.allowTransparency||(k=l(L,b)),k&&S.chars==="_"&&!this._config.allowTransparency)for(var x=1;x<=5&&(this._tmpCtx.fillText(S.chars,0,this._config.scaledCharHeight-x),k=l(L=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),b));x++);this._tmpCtx.restore();var E=this._toCoordinateX(g),A=this._toCoordinateY(g);this._cacheCtx.putImageData(L,E,A);var T={index:g,isEmpty:k,inBitmap:!1};return this._addGlyphToBitmap(T),T},y.prototype._addGlyphToBitmap=function(S){var g=this;!("createImageBitmap"in window)||o.isFirefox||o.isSafari||(this._glyphsWaitingOnBitmap.push(S),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return g._generateBitmap()},100)))},y.prototype._generateBitmap=function(){var S=this,g=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(b){S._bitmap=b;for(var C=0;C<g.length;C++)g[C].inBitmap=!0}),this._bitmapCommitTimeout=null},y}(d.BaseCharAtlas);c.DynamicCharAtlas=r;var n=function(a){function y(S,g){return a.call(this)||this}return u(y,a),y.prototype.draw=function(S,g,b,C){return!1},y}(d.BaseCharAtlas);function l(a,y){for(var S=!0,g=y.rgba>>>24,b=y.rgba>>>16&255,C=y.rgba>>>8&255,R=0;R<a.data.length;R+=4)a.data[R]===g&&a.data[R+1]===b&&a.data[R+2]===C?a.data[R+3]=0:S=!1;return S}c.NoneCharAtlas=n},7001:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LRUMap=void 0;var w=function(){function _(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return _.prototype._unlinkNode=function(u){var f=u.prev,d=u.next;u===this._head&&(this._head=d),u===this._tail&&(this._tail=f),f!==null&&(f.next=d),d!==null&&(d.prev=f)},_.prototype._appendNode=function(u){var f=this._tail;f!==null&&(f.next=u),u.prev=f,u.next=null,this._tail=u,this._head===null&&(this._head=u)},_.prototype.prealloc=function(u){for(var f=this._nodePool,d=0;d<u;d++)f.push({prev:null,next:null,key:null,value:null})},_.prototype.get=function(u){var f=this._map[u];return f!==void 0?(this._unlinkNode(f),this._appendNode(f),f.value):null},_.prototype.peekValue=function(u){var f=this._map[u];return f!==void 0?f.value:null},_.prototype.peek=function(){var u=this._head;return u===null?null:u.value},_.prototype.set=function(u,f){var d=this._map[u];if(d!==void 0)d=this._map[u],this._unlinkNode(d),d.value=f;else if(this.size>=this.capacity)d=this._head,this._unlinkNode(d),delete this._map[d.key],d.key=u,d.value=f,this._map[u]=d;else{var m=this._nodePool;m.length>0?((d=m.pop()).key=u,d.value=f):d={prev:null,next:null,key:u,value:f},this._map[u]=d,this.size++}this._appendNode(d)},_}();c.LRUMap=w},1296:function(W,c,w){var _,u=this&&this.__extends||(_=function(g,b){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,R){C.__proto__=R}||function(C,R){for(var L in R)Object.prototype.hasOwnProperty.call(R,L)&&(C[L]=R[L])},_(g,b)},function(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function C(){this.constructor=g}_(g,b),g.prototype=b===null?Object.create(b):(C.prototype=b.prototype,new C)}),f=this&&this.__decorate||function(g,b,C,R){var L,k=arguments.length,x=k<3?b:R===null?R=Object.getOwnPropertyDescriptor(b,C):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(g,b,C,R);else for(var E=g.length-1;E>=0;E--)(L=g[E])&&(x=(k<3?L(x):k>3?L(b,C,x):L(b,C))||x);return k>3&&x&&Object.defineProperty(b,C,x),x},d=this&&this.__param||function(g,b){return function(C,R){b(C,R,g)}},m=this&&this.__values||function(g){var b=typeof Symbol=="function"&&Symbol.iterator,C=b&&g[b],R=0;if(C)return C.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&R>=g.length&&(g=void 0),{value:g&&g[R++],done:!g}}};throw new TypeError(b?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;var v=w(3787),o=w(8803),s=w(844),p=w(4725),h=w(2585),i=w(8460),e=w(8055),t=w(9631),r="xterm-dom-renderer-owner-",n="xterm-fg-",l="xterm-bg-",a="xterm-focus",y=1,S=function(g){function b(C,R,L,k,x,E,A,T,U,q){var j=g.call(this)||this;return j._colors=C,j._element=R,j._screenElement=L,j._viewportElement=k,j._linkifier=x,j._linkifier2=E,j._charSizeService=T,j._optionsService=U,j._bufferService=q,j._terminalClass=y++,j._rowElements=[],j._rowContainer=document.createElement("div"),j._rowContainer.classList.add("xterm-rows"),j._rowContainer.style.lineHeight="normal",j._rowContainer.setAttribute("aria-hidden","true"),j._refreshRowElements(j._bufferService.cols,j._bufferService.rows),j._selectionContainer=document.createElement("div"),j._selectionContainer.classList.add("xterm-selection"),j._selectionContainer.setAttribute("aria-hidden","true"),j.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},j._updateDimensions(),j._injectCss(),j._rowFactory=A.createInstance(v.DomRendererRowFactory,document,j._colors),j._element.classList.add(r+j._terminalClass),j._screenElement.appendChild(j._rowContainer),j._screenElement.appendChild(j._selectionContainer),j.register(j._linkifier.onShowLinkUnderline(function(z){return j._onLinkHover(z)})),j.register(j._linkifier.onHideLinkUnderline(function(z){return j._onLinkLeave(z)})),j.register(j._linkifier2.onShowLinkUnderline(function(z){return j._onLinkHover(z)})),j.register(j._linkifier2.onHideLinkUnderline(function(z){return j._onLinkLeave(z)})),j}return u(b,g),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return new i.EventEmitter().event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._element.classList.remove(r+this._terminalClass),(0,t.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),g.prototype.dispose.call(this)},b.prototype._updateDimensions=function(){var C,R;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next()){var x=k.value;x.style.width=this.dimensions.canvasWidth+"px",x.style.height=this.dimensions.actualCellHeight+"px",x.style.lineHeight=this.dimensions.actualCellHeight+"px",x.style.overflow="hidden"}}catch(A){C={error:A}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(C)throw C.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var E=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=E,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},b.prototype.setColors=function(C){this._colors=C,this._injectCss()},b.prototype._injectCss=function(){var C=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var R=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";R+=this._terminalSelector+" span:not(."+v.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+v.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+v.ITALIC_CLASS+" { font-style: italic;}",R+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",R+="@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+"; }}",R+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+":not(."+v.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_BLINK_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+v.CURSOR_CLASS+"."+v.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",R+=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.selectionOpaque.css+";}",this._colors.ansi.forEach(function(L,k){R+=C._terminalSelector+" ."+n+k+" { color: "+L.css+"; }"+C._terminalSelector+" ."+l+k+" { background-color: "+L.css+"; }"}),R+=this._terminalSelector+" ."+n+o.INVERTED_DEFAULT_COLOR+" { color: "+e.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+l+o.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=R},b.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},b.prototype._refreshRowElements=function(C,R){for(var L=this._rowElements.length;L<=R;L++){var k=document.createElement("div");this._rowContainer.appendChild(k),this._rowElements.push(k)}for(;this._rowElements.length>R;)this._rowContainer.removeChild(this._rowElements.pop())},b.prototype.onResize=function(C,R){this._refreshRowElements(C,R),this._updateDimensions()},b.prototype.onCharSizeChanged=function(){this._updateDimensions()},b.prototype.onBlur=function(){this._rowContainer.classList.remove(a)},b.prototype.onFocus=function(){this._rowContainer.classList.add(a)},b.prototype.onSelectionChanged=function(C,R,L){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(C,R,L),this.renderRows(0,this._bufferService.rows-1),C&&R){var k=C[1]-this._bufferService.buffer.ydisp,x=R[1]-this._bufferService.buffer.ydisp,E=Math.max(k,0),A=Math.min(x,this._bufferService.rows-1);if(!(E>=this._bufferService.rows||A<0)){var T=document.createDocumentFragment();if(L){var U=C[0]>R[0];T.appendChild(this._createSelectionElement(E,U?R[0]:C[0],U?C[0]:R[0],A-E+1))}else{var q=k===E?C[0]:0,j=E===x?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(E,q,j));var z=A-E-1;if(T.appendChild(this._createSelectionElement(E+1,0,this._bufferService.cols,z)),E!==A){var N=x===A?R[0]:this._bufferService.cols;T.appendChild(this._createSelectionElement(A,0,N))}}this._selectionContainer.appendChild(T)}}},b.prototype._createSelectionElement=function(C,R,L,k){k===void 0&&(k=1);var x=document.createElement("div");return x.style.height=k*this.dimensions.actualCellHeight+"px",x.style.top=C*this.dimensions.actualCellHeight+"px",x.style.left=R*this.dimensions.actualCellWidth+"px",x.style.width=this.dimensions.actualCellWidth*(L-R)+"px",x},b.prototype.onCursorMove=function(){},b.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},b.prototype.clear=function(){var C,R;try{for(var L=m(this._rowElements),k=L.next();!k.done;k=L.next())k.value.innerText=""}catch(x){C={error:x}}finally{try{k&&!k.done&&(R=L.return)&&R.call(L)}finally{if(C)throw C.error}}},b.prototype.renderRows=function(C,R){for(var L=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),x=this._optionsService.rawOptions.cursorBlink,E=C;E<=R;E++){var A=this._rowElements[E];A.innerText="";var T=E+this._bufferService.buffer.ydisp,U=this._bufferService.buffer.lines.get(T),q=this._optionsService.rawOptions.cursorStyle;A.appendChild(this._rowFactory.createRow(U,T,T===L,q,k,x,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(b.prototype,"_terminalSelector",{get:function(){return"."+r+this._terminalClass},enumerable:!1,configurable:!0}),b.prototype._onLinkHover=function(C){this._setCellUnderline(C.x1,C.x2,C.y1,C.y2,C.cols,!0)},b.prototype._onLinkLeave=function(C){this._setCellUnderline(C.x1,C.x2,C.y1,C.y2,C.cols,!1)},b.prototype._setCellUnderline=function(C,R,L,k,x,E){for(;C!==R||L!==k;){var A=this._rowElements[L];if(!A)return;var T=A.children[C];T&&(T.style.textDecoration=E?"underline":"none"),++C>=x&&(C=0,L++)}},f([d(6,h.IInstantiationService),d(7,p.ICharSizeService),d(8,h.IOptionsService),d(9,h.IBufferService)],b)}(s.Disposable);c.DomRenderer=S},3787:function(W,c,w){var _=this&&this.__decorate||function(r,n,l,a){var y,S=arguments.length,g=S<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,l):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(r,n,l,a);else for(var b=r.length-1;b>=0;b--)(y=r[b])&&(g=(S<3?y(g):S>3?y(n,l,g):y(n,l))||g);return S>3&&g&&Object.defineProperty(n,l,g),g},u=this&&this.__param||function(r,n){return function(l,a){n(l,a,r)}},f=this&&this.__values||function(r){var n=typeof Symbol=="function"&&Symbol.iterator,l=n&&r[n],a=0;if(l)return l.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&a>=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=c.CURSOR_STYLE_UNDERLINE_CLASS=c.CURSOR_STYLE_BAR_CLASS=c.CURSOR_STYLE_BLOCK_CLASS=c.CURSOR_BLINK_CLASS=c.CURSOR_CLASS=c.STRIKETHROUGH_CLASS=c.UNDERLINE_CLASS=c.ITALIC_CLASS=c.DIM_CLASS=c.BOLD_CLASS=void 0;var d=w(8803),m=w(643),v=w(511),o=w(2585),s=w(8055),p=w(4725),h=w(4269),i=w(1752);c.BOLD_CLASS="xterm-bold",c.DIM_CLASS="xterm-dim",c.ITALIC_CLASS="xterm-italic",c.UNDERLINE_CLASS="xterm-underline",c.STRIKETHROUGH_CLASS="xterm-strikethrough",c.CURSOR_CLASS="xterm-cursor",c.CURSOR_BLINK_CLASS="xterm-cursor-blink",c.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",c.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",c.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var e=function(){function r(n,l,a,y,S,g){this._document=n,this._colors=l,this._characterJoinerService=a,this._optionsService=y,this._coreService=S,this._decorationService=g,this._workCell=new v.CellData,this._columnSelectMode=!1}return r.prototype.setColors=function(n){this._colors=n},r.prototype.onSelectionChanged=function(n,l,a){this._selectionStart=n,this._selectionEnd=l,this._columnSelectMode=a},r.prototype.createRow=function(n,l,a,y,S,g,b,C){for(var R,L,k=this._document.createDocumentFragment(),x=this._characterJoinerService.getJoinedCharacters(l),E=0,A=Math.min(n.length,C)-1;A>=0;A--)if(n.loadCell(A,this._workCell).getCode()!==m.NULL_CELL_CODE||a&&A===S){E=A+1;break}for(A=0;A<E;A++){n.loadCell(A,this._workCell);var T=this._workCell.getWidth();if(T!==0){var U=!1,q=A,j=this._workCell;if(x.length>0&&A===x[0][0]){U=!0;var z=x.shift();j=new h.JoinedCellData(this._workCell,n.translateToString(!0,z[0],z[1]),z[1]-z[0]),q=z[1]-1,T=j.getWidth()}var N=this._document.createElement("span");if(T>1&&(N.style.width=b*T+"px"),U&&(N.style.display="inline",S>=A&&S<=q&&(S=A)),!this._coreService.isCursorHidden&&a&&A===S)switch(N.classList.add(c.CURSOR_CLASS),g&&N.classList.add(c.CURSOR_BLINK_CLASS),y){case"bar":N.classList.add(c.CURSOR_STYLE_BAR_CLASS);break;case"underline":N.classList.add(c.CURSOR_STYLE_UNDERLINE_CLASS);break;default:N.classList.add(c.CURSOR_STYLE_BLOCK_CLASS)}j.isBold()&&N.classList.add(c.BOLD_CLASS),j.isItalic()&&N.classList.add(c.ITALIC_CLASS),j.isDim()&&N.classList.add(c.DIM_CLASS),j.isUnderline()&&N.classList.add(c.UNDERLINE_CLASS),j.isInvisible()?N.textContent=m.WHITESPACE_CELL_CHAR:N.textContent=j.getChars()||m.WHITESPACE_CELL_CHAR,j.isStrikethrough()&&N.classList.add(c.STRIKETHROUGH_CLASS);var M=j.getFgColor(),Y=j.getFgColorMode(),Z=j.getBgColor(),te=j.getBgColorMode(),B=!!j.isInverse();if(B){var Q=M;M=Z,Z=Q;var X=Y;Y=te,te=X}var F=void 0,O=void 0,D=!1;try{for(var H=(R=void 0,f(this._decorationService.getDecorationsAtCell(A,l))),G=H.next();!G.done;G=H.next()){var V=G.value;V.options.layer!=="top"&&D||(V.backgroundColorRGB&&(te=50331648,Z=V.backgroundColorRGB.rgba>>8&16777215,F=V.backgroundColorRGB),V.foregroundColorRGB&&(Y=50331648,M=V.foregroundColorRGB.rgba>>8&16777215,O=V.foregroundColorRGB),D=V.options.layer==="top")}}catch(ae){R={error:ae}}finally{try{G&&!G.done&&(L=H.return)&&L.call(H)}finally{if(R)throw R.error}}var J=this._isCellInSelection(A,l);D||this._colors.selectionForeground&&J&&(Y=50331648,M=this._colors.selectionForeground.rgba>>8&16777215,O=this._colors.selectionForeground),J&&(F=this._colors.selectionOpaque,D=!0),D&&N.classList.add("xterm-decoration-top");var ie=void 0;switch(te){case 16777216:case 33554432:ie=this._colors.ansi[Z],N.classList.add("xterm-bg-"+Z);break;case 50331648:ie=s.rgba.toColor(Z>>16,Z>>8&255,255&Z),this._addStyle(N,"background-color:#"+t((Z>>>0).toString(16),"0",6));break;default:B?(ie=this._colors.foreground,N.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)):ie=this._colors.background}switch(Y){case 16777216:case 33554432:j.isBold()&&M<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(M+=8),this._applyMinimumContrast(N,ie,this._colors.ansi[M],j,F,void 0)||N.classList.add("xterm-fg-"+M);break;case 50331648:var se=s.rgba.toColor(M>>16&255,M>>8&255,255&M);this._applyMinimumContrast(N,ie,se,j,F,O)||this._addStyle(N,"color:#"+t(M.toString(16),"0",6));break;default:this._applyMinimumContrast(N,ie,this._colors.foreground,j,F,void 0)||B&&N.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}k.appendChild(N),A=q}}return k},r.prototype._applyMinimumContrast=function(n,l,a,y,S,g){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,i.excludeFromContrastRatioDemands)(y.getCode()))return!1;var b=void 0;return S||g||(b=this._colors.contrastCache.getColor(l.rgba,a.rgba)),b===void 0&&(b=s.color.ensureContrastRatio(S||l,g||a,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((S||l).rgba,(g||a).rgba,b??null)),!!b&&(this._addStyle(n,"color:"+b.css),!0)},r.prototype._addStyle=function(n,l){n.setAttribute("style",""+(n.getAttribute("style")||"")+l+";")},r.prototype._isCellInSelection=function(n,l){var a=this._selectionStart,y=this._selectionEnd;return!(!a||!y)&&(this._columnSelectMode?a[0]<=y[0]?n>=a[0]&&l>=a[1]&&n<y[0]&&l<=y[1]:n<a[0]&&l>=a[1]&&n>=y[0]&&l<=y[1]:l>a[1]&&l<y[1]||a[1]===y[1]&&l===a[1]&&n>=a[0]&&n<y[0]||a[1]<y[1]&&l===y[1]&&n<y[0]||a[1]<y[1]&&l===a[1]&&n>=a[0])},_([u(2,p.ICharacterJoinerService),u(3,o.IOptionsService),u(4,o.ICoreService),u(5,o.IDecorationService)],r)}();function t(r,n,l){for(;r.length<l;)r=n+r;return r}c.DomRendererRowFactory=e},456:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0;var w=function(){function _(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return _.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(_.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(_.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(u=this.selectionStart[0]+this.selectionStartLength)>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]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(u=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:void 0;var u},enumerable:!1,configurable:!0}),_.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])},_.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.SelectionModel=w},428:function(W,c,w){var _=this&&this.__decorate||function(o,s,p,h){var i,e=arguments.length,t=e<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(o,s,p,h);else for(var r=o.length-1;r>=0;r--)(i=o[r])&&(t=(e<3?i(t):e>3?i(s,p,t):i(s,p))||t);return e>3&&t&&Object.defineProperty(s,p,t),t},u=this&&this.__param||function(o,s){return function(p,h){s(p,h,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;var f=w(2585),d=w(8460),m=function(){function o(s,p,h){this._optionsService=h,this.width=0,this.height=0,this._onCharSizeChange=new d.EventEmitter,this._measureStrategy=new v(s,p,this._optionsService)}return Object.defineProperty(o.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),o.prototype.measure=function(){var s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())},_([u(2,f.IOptionsService)],o)}();c.CharSizeService=m;var v=function(){function o(s,p,h){this._document=s,this._parentElement=p,this._optionsService=h,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 o.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var s=this._measureElement.getBoundingClientRect();return s.width!==0&&s.height!==0&&(this._result.width=s.width,this._result.height=Math.ceil(s.height)),this._result},o}()},4269:function(W,c,w){var _,u=this&&this.__extends||(_=function(i,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},_(i,e)},function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}_(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__decorate||function(i,e,t,r){var n,l=arguments.length,a=l<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(i,e,t,r);else for(var y=i.length-1;y>=0;y--)(n=i[y])&&(a=(l<3?n(a):l>3?n(e,t,a):n(e,t))||a);return l>3&&a&&Object.defineProperty(e,t,a),a},d=this&&this.__param||function(i,e){return function(t,r){e(t,r,i)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;var m=w(3734),v=w(643),o=w(511),s=w(2585),p=function(i){function e(t,r,n){var l=i.call(this)||this;return l.content=0,l.combinedData="",l.fg=t.fg,l.bg=t.bg,l.combinedData=r,l._width=n,l}return u(e,i),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(m.AttributeData);c.JoinedCellData=p;var h=function(){function i(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new o.CellData}return i.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},i.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},i.prototype.getJoinedCharacters=function(e){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];for(var r=[],n=t.translateToString(!0),l=0,a=0,y=0,S=t.getFg(0),g=t.getBg(0),b=0;b<t.getTrimmedLength();b++)if(t.loadCell(b,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==S||this._workCell.bg!==g){if(b-l>1)for(var C=this._getJoinedRanges(n,y,a,t,l),R=0;R<C.length;R++)r.push(C[R]);l=b,y=a,S=this._workCell.fg,g=this._workCell.bg}a+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-l>1)for(C=this._getJoinedRanges(n,y,a,t,l),R=0;R<C.length;R++)r.push(C[R]);return r},i.prototype._getJoinedRanges=function(e,t,r,n,l){var a=e.substring(t,r),y=[];try{y=this._characterJoiners[0].handler(a)}catch(C){console.error(C)}for(var S=1;S<this._characterJoiners.length;S++)try{for(var g=this._characterJoiners[S].handler(a),b=0;b<g.length;b++)i._mergeRanges(y,g[b])}catch(C){console.error(C)}return this._stringRangesToCellRanges(y,n,l),y},i.prototype._stringRangesToCellRanges=function(e,t,r){var n=0,l=!1,a=0,y=e[n];if(y){for(var S=r;S<this._bufferService.cols;S++){var g=t.getWidth(S),b=t.getString(S).length||v.WHITESPACE_CELL_CHAR.length;if(g!==0){if(!l&&y[0]<=a&&(y[0]=S,l=!0),y[1]<=a){if(y[1]=S,!(y=e[++n]))break;y[0]<=a?(y[0]=S,l=!0):l=!1}a+=b}}y&&(y[1]=this._bufferService.cols)}},i._mergeRanges=function(e,t){for(var r=!1,n=0;n<e.length;n++){var l=e[n];if(r){if(t[1]<=l[0])return e[n-1][1]=t[1],e;if(t[1]<=l[1])return e[n-1][1]=Math.max(t[1],l[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=l[0])return e.splice(n,0,t),e;if(t[1]<=l[1])return l[0]=Math.min(t[0],l[0]),e;t[0]<l[1]&&(l[0]=Math.min(t[0],l[0]),r=!0)}}return r?e[e.length-1][1]=t[1]:e.push(t),e},i=f([d(0,s.IBufferService)],i)}();c.CharacterJoinerService=h},5114:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;var w=function(){function _(u){this._textarea=u}return Object.defineProperty(_.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),_}();c.CoreBrowserService=w},8934:function(W,c,w){var _=this&&this.__decorate||function(v,o,s,p){var h,i=arguments.length,e=i<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,s):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(v,o,s,p);else for(var t=v.length-1;t>=0;t--)(h=v[t])&&(e=(i<3?h(e):i>3?h(o,s,e):h(o,s))||e);return i>3&&e&&Object.defineProperty(o,s,e),e},u=this&&this.__param||function(v,o){return function(s,p){o(s,p,v)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;var f=w(4725),d=w(9806),m=function(){function v(o,s){this._renderService=o,this._charSizeService=s}return v.prototype.getCoords=function(o,s,p,h,i){return(0,d.getCoords)(window,o,s,p,h,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,i)},v.prototype.getRawByteCoords=function(o,s,p,h){var i=this.getCoords(o,s,p,h);return(0,d.getRawByteCoords)(i)},_([u(0,f.IRenderService),u(1,f.ICharSizeService)],v)}();c.MouseService=m},3230:function(W,c,w){var _,u=this&&this.__extends||(_=function(t,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(n[a]=l[a])},_(t,r)},function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}_(t,r),t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}),f=this&&this.__decorate||function(t,r,n,l){var a,y=arguments.length,S=y<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(t,r,n,l);else for(var g=t.length-1;g>=0;g--)(a=t[g])&&(S=(y<3?a(S):y>3?a(r,n,S):a(r,n))||S);return y>3&&S&&Object.defineProperty(r,n,S),S},d=this&&this.__param||function(t,r){return function(n,l){r(n,l,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;var m=w(6193),v=w(8460),o=w(844),s=w(5596),p=w(3656),h=w(2585),i=w(4725),e=function(t){function r(n,l,a,y,S,g,b){var C=t.call(this)||this;if(C._renderer=n,C._rowCount=l,C._charSizeService=S,C._isPaused=!1,C._needsFullRefresh=!1,C._isNextRenderRedrawOnly=!0,C._needsSelectionRefresh=!1,C._canvasWidth=0,C._canvasHeight=0,C._selectionState={start:void 0,end:void 0,columnSelectMode:!1},C._onDimensionsChange=new v.EventEmitter,C._onRenderedViewportChange=new v.EventEmitter,C._onRender=new v.EventEmitter,C._onRefreshRequest=new v.EventEmitter,C.register({dispose:function(){return C._renderer.dispose()}}),C._renderDebouncer=new m.RenderDebouncer(function(L,k){return C._renderRows(L,k)}),C.register(C._renderDebouncer),C._screenDprMonitor=new s.ScreenDprMonitor,C._screenDprMonitor.setListener(function(){return C.onDevicePixelRatioChange()}),C.register(C._screenDprMonitor),C.register(b.onResize(function(){return C._fullRefresh()})),C.register(b.buffers.onBufferActivate(function(){var L;return(L=C._renderer)===null||L===void 0?void 0:L.clear()})),C.register(y.onOptionChange(function(){return C._handleOptionsChanged()})),C.register(C._charSizeService.onCharSizeChange(function(){return C.onCharSizeChanged()})),C.register(g.onDecorationRegistered(function(){return C._fullRefresh()})),C.register(g.onDecorationRemoved(function(){return C._fullRefresh()})),C._renderer.onRequestRedraw(function(L){return C.refreshRows(L.start,L.end,!0)}),C.register((0,p.addDisposableDomListener)(window,"resize",function(){return C.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var R=new IntersectionObserver(function(L){return C._onIntersectionChange(L[L.length-1])},{threshold:0});R.observe(a),C.register({dispose:function(){return R.disconnect()}})}return C}return u(r,t),Object.defineProperty(r.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),r.prototype._onIntersectionChange=function(n){this._isPaused=n.isIntersecting===void 0?n.intersectionRatio===0:!n.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},r.prototype.refreshRows=function(n,l,a){a===void 0&&(a=!1),this._isPaused?this._needsFullRefresh=!0:(a||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(n,l,this._rowCount))},r.prototype._renderRows=function(n,l){this._renderer.renderRows(n,l),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:n,end:l}),this._onRender.fire({start:n,end:l}),this._isNextRenderRedrawOnly=!0},r.prototype.resize=function(n,l){this._rowCount=l,this._fireOnCanvasResize()},r.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},r.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},r.prototype.dispose=function(){t.prototype.dispose.call(this)},r.prototype.setRenderer=function(n){var l=this;this._renderer.dispose(),this._renderer=n,this._renderer.onRequestRedraw(function(a){return l.refreshRows(a.start,a.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},r.prototype.addRefreshCallback=function(n){return this._renderDebouncer.addRefreshCallback(n)},r.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},r.prototype.clearTextureAtlas=function(){var n,l;(l=(n=this._renderer)===null||n===void 0?void 0:n.clearTextureAtlas)===null||l===void 0||l.call(n),this._fullRefresh()},r.prototype.setColors=function(n){this._renderer.setColors(n),this._fullRefresh()},r.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},r.prototype.onResize=function(n,l){this._renderer.onResize(n,l),this._fullRefresh()},r.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},r.prototype.onBlur=function(){this._renderer.onBlur()},r.prototype.onFocus=function(){this._renderer.onFocus()},r.prototype.onSelectionChanged=function(n,l,a){this._selectionState.start=n,this._selectionState.end=l,this._selectionState.columnSelectMode=a,this._renderer.onSelectionChanged(n,l,a)},r.prototype.onCursorMove=function(){this._renderer.onCursorMove()},r.prototype.clear=function(){this._renderer.clear()},f([d(3,h.IOptionsService),d(4,i.ICharSizeService),d(5,h.IDecorationService),d(6,h.IBufferService)],r)}(o.Disposable);c.RenderService=e},9312:function(W,c,w){var _,u=this&&this.__extends||(_=function(y,S){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(g[C]=b[C])},_(y,S)},function(y,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function g(){this.constructor=y}_(y,S),y.prototype=S===null?Object.create(S):(g.prototype=S.prototype,new g)}),f=this&&this.__decorate||function(y,S,g,b){var C,R=arguments.length,L=R<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(y,S,g,b);else for(var k=y.length-1;k>=0;k--)(C=y[k])&&(L=(R<3?C(L):R>3?C(S,g,L):C(S,g))||L);return R>3&&L&&Object.defineProperty(S,g,L),L},d=this&&this.__param||function(y,S){return function(g,b){S(g,b,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;var m=w(6114),v=w(456),o=w(511),s=w(8460),p=w(4725),h=w(2585),i=w(9806),e=w(9504),t=w(844),r=w(4841),n="\xA0",l=new RegExp(n,"g"),a=function(y){function S(g,b,C,R,L,k,x,E){var A=y.call(this)||this;return A._element=g,A._screenElement=b,A._linkifier=C,A._bufferService=R,A._coreService=L,A._mouseService=k,A._optionsService=x,A._renderService=E,A._dragScrollAmount=0,A._enabled=!0,A._workCell=new o.CellData,A._mouseDownTimeStamp=0,A._oldHasSelection=!1,A._oldSelectionStart=void 0,A._oldSelectionEnd=void 0,A._onLinuxMouseSelection=A.register(new s.EventEmitter),A._onRedrawRequest=A.register(new s.EventEmitter),A._onSelectionChange=A.register(new s.EventEmitter),A._onRequestScrollLines=A.register(new s.EventEmitter),A._mouseMoveListener=function(T){return A._onMouseMove(T)},A._mouseUpListener=function(T){return A._onMouseUp(T)},A._coreService.onUserInput(function(){A.hasSelection&&A.clearSelection()}),A._trimListener=A._bufferService.buffer.lines.onTrim(function(T){return A._onTrim(T)}),A.register(A._bufferService.buffers.onBufferActivate(function(T){return A._onBufferActivate(T)})),A.enable(),A._model=new v.SelectionModel(A._bufferService),A._activeSelectionMode=0,A}return u(S,y),Object.defineProperty(S.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._removeMouseDownListeners()},S.prototype.reset=function(){this.clearSelection()},S.prototype.disable=function(){this.clearSelection(),this._enabled=!1},S.prototype.enable=function(){this._enabled=!0},Object.defineProperty(S.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"hasSelection",{get:function(){var g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!g||!b||g[0]===b[0]&&g[1]===b[1])},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionText",{get:function(){var g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!g||!b)return"";var C=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(g[0]===b[0])return"";for(var L=g[0]<b[0]?g[0]:b[0],k=g[0]<b[0]?b[0]:g[0],x=g[1];x<=b[1];x++){var E=C.translateBufferLineToString(x,!0,L,k);R.push(E)}}else{var A=g[1]===b[1]?b[0]:void 0;for(R.push(C.translateBufferLineToString(g[1],!0,g[0],A)),x=g[1]+1;x<=b[1]-1;x++){var T=C.lines.get(x);E=C.translateBufferLineToString(x,!0),T?.isWrapped?R[R.length-1]+=E:R.push(E)}g[1]!==b[1]&&(T=C.lines.get(b[1]),E=C.translateBufferLineToString(b[1],!0,0,b[0]),T&&T.isWrapped?R[R.length-1]+=E:R.push(E))}return R.map(function(U){return U.replace(l," ")}).join(m.isWindows?`\r
5
5
  `:`
6
- `)},enumerable:!1,configurable:!0}),b.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},b.prototype.refresh=function(g){var S=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return S._refresh()})),m.isLinux&&g&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},b.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},b.prototype._isClickInSelection=function(g){var S=this._getMouseBufferCoords(g),C=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!!(C&&k&&S)&&this._areCoordsInSelection(S,C,k)},b.prototype.isCellInSelection=function(g,S){var C=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!(!C||!k)&&this._areCoordsInSelection([g,S],C,k)},b.prototype._areCoordsInSelection=function(g,S,C){return g[1]>S[1]&&g[1]<C[1]||S[1]===C[1]&&g[1]===S[1]&&g[0]>=S[0]&&g[0]<C[0]||S[1]<C[1]&&g[1]===C[1]&&g[0]<C[0]||S[1]<C[1]&&g[1]===S[1]&&g[0]>=S[0]},b.prototype._selectWordAtCursor=function(g,S){var C,k,L=(k=(C=this._linkifier.currentLink)===null||C===void 0?void 0:C.link)===null||k===void 0?void 0:k.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,i.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var R=this._getMouseBufferCoords(g);return!!R&&(this._selectWordAt(R,S),this._model.selectionEnd=void 0,!0)},b.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},b.prototype.selectLines=function(g,S){this._model.clearSelection(),g=Math.max(g,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()},b.prototype._onTrim=function(g){this._model.onTrim(g)&&this.refresh()},b.prototype._getMouseBufferCoords=function(g){var S=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S},b.prototype._getMouseEventScrollAmount=function(g){var S=(0,r.getCoordsRelativeToElement)(window,g,this._screenElement)[1],C=this._renderService.dimensions.canvasHeight;return S>=0&&S<=C?0:(S>C&&(S-=C),S=Math.min(Math.max(S,-50),50),(S/=50)/Math.abs(S)+Math.round(14*S))},b.prototype.shouldForceSelection=function(g){return m.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey},b.prototype.onMouseDown=function(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._onIncrementalClick(g):g.detail===1?this._onSingleClick(g):g.detail===2?this._onDoubleClick(g):g.detail===3&&this._onTripleClick(g),this._addMouseDownListeners(),this.refresh(!0)}},b.prototype._addMouseDownListeners=function(){var g=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return g._dragScroll()},50)},b.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},b.prototype._onIncrementalClick=function(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))},b.prototype._onSingleClick=function(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),this._model.selectionStart){this._model.selectionEnd=void 0;var S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},b.prototype._onDoubleClick=function(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)},b.prototype._onTripleClick=function(g){var S=this._getMouseBufferCoords(g);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))},b.prototype.shouldColumnSelect=function(g){return g.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},b.prototype._onMouseMove=function(g){if(g.stopImmediatePropagation(),this._model.selectionStart){var S=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){var k=C.lines.get(this._model.selectionEnd[1]);k&&k.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},b.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}},b.prototype._onMouseUp=function(g){var S=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&g.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var C=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){var k=(0,e.moveToCellSequence)(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(k,!0)}}}else this._fireEventIfSelectionChanged()},b.prototype._fireEventIfSelectionChanged=function(){var g=this._model.finalSelectionStart,S=this._model.finalSelectionEnd,C=!(!g||!S||g[0]===S[0]&&g[1]===S[1]);C?g&&S&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&S[0]===this._oldSelectionEnd[0]&&S[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,S,C)):this._oldHasSelection&&this._fireOnSelectionChange(g,S,C)},b.prototype._fireOnSelectionChange=function(g,S,C){this._oldSelectionStart=g,this._oldSelectionEnd=S,this._oldHasSelection=C,this._onSelectionChange.fire()},b.prototype._onBufferActivate=function(g){var S=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(function(C){return S._onTrim(C)})},b.prototype._convertViewportColToCharacterIndex=function(g,S){for(var C=S[0],k=0;S[0]>=k;k++){var L=g.loadCell(k,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:L>1&&S[0]!==k&&(C+=L-1)}return C},b.prototype.setSelection=function(g,S,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,S],this._model.selectionStartLength=C,this.refresh(),this._fireEventIfSelectionChanged()},b.prototype.rightClickSelect=function(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},b.prototype._getWordAt=function(g,S,C,k){if(C===void 0&&(C=!0),k===void 0&&(k=!0),!(g[0]>=this._bufferService.cols)){var L=this._bufferService.buffer,R=L.lines.get(g[1]);if(R){var x=L.translateBufferLineToString(g[1],!1),E=this._convertViewportColToCharacterIndex(R,g),A=E,T=g[0]-E,U=0,q=0,j=0,z=0;if(x.charAt(E)===" "){for(;E>0&&x.charAt(E-1)===" ";)E--;for(;A<x.length&&x.charAt(A+1)===" ";)A++}else{var N=g[0],M=g[0];R.getWidth(N)===0&&(U++,N--),R.getWidth(M)===2&&(q++,M++);var Y=R.getString(M).length;for(Y>1&&(z+=Y-1,A+=Y-1);N>0&&E>0&&!this._isCharWordSeparator(R.loadCell(N-1,this._workCell));){R.loadCell(N-1,this._workCell);var Z=this._workCell.getChars().length;this._workCell.getWidth()===0?(U++,N--):Z>1&&(j+=Z-1,E-=Z-1),E--,N--}for(;M<R.length&&A+1<x.length&&!this._isCharWordSeparator(R.loadCell(M+1,this._workCell));){R.loadCell(M+1,this._workCell);var ee=this._workCell.getChars().length;this._workCell.getWidth()===2?(q++,M++):ee>1&&(z+=ee-1,A+=ee-1),A++,M++}}A++;var B=E+T-U+j,Q=Math.min(this._bufferService.cols,A-E+U+q-j-z);if(S||x.slice(E,A).trim()!==""){if(C&&B===0&&R.getCodePoint(0)!==32){var X=L.lines.get(g[1]-1);if(X&&R.isWrapped&&X.getCodePoint(this._bufferService.cols-1)!==32){var F=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(F){var O=this._bufferService.cols-F.start;B-=O,Q+=O}}}if(k&&B+Q===this._bufferService.cols&&R.getCodePoint(this._bufferService.cols-1)!==32){var D=L.lines.get(g[1]+1);if(D?.isWrapped&&D.getCodePoint(0)!==32){var H=this._getWordAt([0,g[1]+1],!1,!1,!0);H&&(Q+=H.length)}}return{start:B,length:Q}}}}},b.prototype._selectWordAt=function(g,S){var C=this._getWordAt(g,S);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[C.start,g[1]],this._model.selectionStartLength=C.length}},b.prototype._selectToWordAt=function(g){var S=this._getWordAt(g,!0);if(S){for(var C=g[1];S.start<0;)S.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,C]}},b.prototype._isCharWordSeparator=function(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0},b.prototype._selectLineAt=function(g){var S=this._bufferService.buffer.getWrappedRangeForLine(g),C={start:{x:0,y:S.first},end:{x:this._bufferService.cols-1,y:S.last}};this._model.selectionStart=[0,S.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,i.getRangeLength)(C,this._bufferService.cols)},f([d(3,h.IBufferService),d(4,h.ICoreService),d(5,p.IMouseService),d(6,h.IOptionsService),d(7,p.IRenderService)],b)}(t.Disposable);c.SelectionService=o},4725:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ICharacterJoinerService=c.ISoundService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;var _=w(8343);c.ICharSizeService=(0,_.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),c.IMouseService=(0,_.createDecorator)("MouseService"),c.IRenderService=(0,_.createDecorator)("RenderService"),c.ISelectionService=(0,_.createDecorator)("SelectionService"),c.ISoundService=(0,_.createDecorator)("SoundService"),c.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService")},357:function(W,c,w){var _=this&&this.__decorate||function(m,v,a,s){var p,h=arguments.length,r=h<3?v:s===null?s=Object.getOwnPropertyDescriptor(v,a):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(m,v,a,s);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(r=(h<3?p(r):h>3?p(v,a,r):p(v,a))||r);return h>3&&r&&Object.defineProperty(v,a,r),r},u=this&&this.__param||function(m,v){return function(a,s){v(a,s,m)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SoundService=void 0;var f=w(2585),d=function(){function m(v){this._optionsService=v}return Object.defineProperty(m,"audioContext",{get:function(){if(!m._audioContext){var v=window.AudioContext||window.webkitAudioContext;if(!v)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;m._audioContext=new v}return m._audioContext},enumerable:!1,configurable:!0}),m.prototype.playBellSound=function(){var v=m.audioContext;if(v){var a=v.createBufferSource();v.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(s){a.buffer=s,a.connect(v.destination),a.start(0)})}},m.prototype._base64ToArrayBuffer=function(v){for(var a=window.atob(v),s=a.length,p=new Uint8Array(s),h=0;h<s;h++)p[h]=a.charCodeAt(h);return p.buffer},m.prototype._removeMimeType=function(v){return v.split(",")[1]},m=_([u(0,f.IOptionsService)],m)}();c.SoundService=d},6349:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;var _=w(8460),u=function(){function f(d){this._maxLength=d,this.onDeleteEmitter=new _.EventEmitter,this.onInsertEmitter=new _.EventEmitter,this.onTrimEmitter=new _.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(f.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"maxLength",{get:function(){return this._maxLength},set:function(d){if(this._maxLength!==d){for(var m=new Array(d),v=0;v<Math.min(d,this.length);v++)m[v]=this._array[this._getCyclicIndex(v)];this._array=m,this._maxLength=d,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._length},set:function(d){if(d>this._length)for(var m=this._length;m<d;m++)this._array[m]=void 0;this._length=d},enumerable:!1,configurable:!0}),f.prototype.get=function(d){return this._array[this._getCyclicIndex(d)]},f.prototype.set=function(d,m){this._array[this._getCyclicIndex(d)]=m},f.prototype.push=function(d){this._array[this._getCyclicIndex(this._length)]=d,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},f.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(f.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),f.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},f.prototype.splice=function(d,m){for(var v=[],a=2;a<arguments.length;a++)v[a-2]=arguments[a];if(m){for(var s=d;s<this._length-m;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+m)];this._length-=m,this.onDeleteEmitter.fire({index:d,amount:m})}for(s=this._length-1;s>=d;s--)this._array[this._getCyclicIndex(s+v.length)]=this._array[this._getCyclicIndex(s)];for(s=0;s<v.length;s++)this._array[this._getCyclicIndex(d+s)]=v[s];if(v.length&&this.onInsertEmitter.fire({index:d,amount:v.length}),this._length+v.length>this._maxLength){var p=this._length+v.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=v.length},f.prototype.trimStart=function(d){d>this._length&&(d=this._length),this._startIndex+=d,this._length-=d,this.onTrimEmitter.fire(d)},f.prototype.shiftElements=function(d,m,v){if(!(m<=0)){if(d<0||d>=this._length)throw new Error("start argument out of range");if(d+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(var a=m-1;a>=0;a--)this.set(d+a+v,this.get(d+a));var s=d+m+v-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(a=0;a<m;a++)this.set(d+a+v,this.get(d+a))}},f.prototype._getCyclicIndex=function(d){return(this._startIndex+d)%this._maxLength},f}();c.CircularList=u},1439:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function w(_,u){if(u===void 0&&(u=5),typeof _!="object")return _;var f=Array.isArray(_)?[]:{};for(var d in _)f[d]=u<=1?_[d]:_[d]&&w(_[d],u-1);return f}},8055:function(W,c){var w,_,u,f,d=this&&this.__read||function(a,s){var p=typeof Symbol=="function"&&a[Symbol.iterator];if(!p)return a;var h,r,e=p.call(a),t=[];try{for(;(s===void 0||s-- >0)&&!(h=e.next()).done;)t.push(h.value)}catch(i){r={error:i}}finally{try{h&&!h.done&&(p=e.return)&&p.call(e)}finally{if(r)throw r.error}}return t};function m(a){var s=a.toString(16);return s.length<2?"0"+s:s}function v(a,s){return a<s?(s+.05)/(a+.05):(a+.05)/(s+.05)}Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=void 0,function(a){a.toCss=function(s,p,h,r){return r!==void 0?"#"+m(s)+m(p)+m(h)+m(r):"#"+m(s)+m(p)+m(h)},a.toRgba=function(s,p,h,r){return r===void 0&&(r=255),(s<<24|p<<16|h<<8|r)>>>0}}(w=c.channels||(c.channels={})),(_=c.color||(c.color={})).blend=function(a,s){var p=(255&s.rgba)/255;if(p===1)return{css:s.css,rgba:s.rgba};var h=s.rgba>>24&255,r=s.rgba>>16&255,e=s.rgba>>8&255,t=a.rgba>>24&255,i=a.rgba>>16&255,n=a.rgba>>8&255,l=t+Math.round((h-t)*p),o=i+Math.round((r-i)*p),y=n+Math.round((e-n)*p);return{css:w.toCss(l,o,y),rgba:w.toRgba(l,o,y)}},_.isOpaque=function(a){return(255&a.rgba)==255},_.ensureContrastRatio=function(a,s,p){var h=f.ensureContrastRatio(a.rgba,s.rgba,p);if(h)return f.toColor(h>>24&255,h>>16&255,h>>8&255)},_.opaque=function(a){var s=(255|a.rgba)>>>0,p=d(f.toChannels(s),3),h=p[0],r=p[1],e=p[2];return{css:w.toCss(h,r,e),rgba:s}},_.opacity=function(a,s){var p=Math.round(255*s),h=d(f.toChannels(a.rgba),3),r=h[0],e=h[1],t=h[2];return{css:w.toCss(r,e,t,p),rgba:w.toRgba(r,e,t,p)}},_.toColorRGB=function(a){return[a.rgba>>24&255,a.rgba>>16&255,a.rgba>>8&255]},(c.css||(c.css={})).toColor=function(a){if(a.match(/#[0-9a-f]{3,8}/i))switch(a.length){case 4:var s=parseInt(a.slice(1,2).repeat(2),16),p=parseInt(a.slice(2,3).repeat(2),16),h=parseInt(a.slice(3,4).repeat(2),16);return f.toColor(s,p,h);case 5:s=parseInt(a.slice(1,2).repeat(2),16),p=parseInt(a.slice(2,3).repeat(2),16),h=parseInt(a.slice(3,4).repeat(2),16);var r=parseInt(a.slice(4,5).repeat(2),16);return f.toColor(s,p,h,r);case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}var e=a.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e)return s=parseInt(e[1]),p=parseInt(e[2]),h=parseInt(e[3]),r=Math.round(255*(e[5]===void 0?1:parseFloat(e[5]))),f.toColor(s,p,h,r);throw new Error("css.toColor: Unsupported css format")},function(a){function s(p,h,r){var e=p/255,t=h/255,i=r/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))}a.relativeLuminance=function(p){return s(p>>16&255,p>>8&255,255&p)},a.relativeLuminance2=s}(u=c.rgb||(c.rgb={})),function(a){function s(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,o=r>>16&255,y=r>>8&255,b=v(u.relativeLuminance2(l,o,y),u.relativeLuminance2(t,i,n));b<e&&(l>0||o>0||y>0);)l-=Math.max(0,Math.ceil(.1*l)),o-=Math.max(0,Math.ceil(.1*o)),y-=Math.max(0,Math.ceil(.1*y)),b=v(u.relativeLuminance2(l,o,y),u.relativeLuminance2(t,i,n));return(l<<24|o<<16|y<<8|255)>>>0}function p(h,r,e){for(var t=h>>24&255,i=h>>16&255,n=h>>8&255,l=r>>24&255,o=r>>16&255,y=r>>8&255,b=v(u.relativeLuminance2(l,o,y),u.relativeLuminance2(t,i,n));b<e&&(l<255||o<255||y<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),o=Math.min(255,o+Math.ceil(.1*(255-o))),y=Math.min(255,y+Math.ceil(.1*(255-y))),b=v(u.relativeLuminance2(l,o,y),u.relativeLuminance2(t,i,n));return(l<<24|o<<16|y<<8|255)>>>0}a.ensureContrastRatio=function(h,r,e){var t=u.relativeLuminance(h>>8),i=u.relativeLuminance(r>>8);if(v(t,i)<e){if(i<t){var n=s(h,r,e),l=v(t,u.relativeLuminance(n>>8));if(l<e){var o=p(h,h,e);return l>v(t,u.relativeLuminance(o>>8))?n:o}return n}var y=p(h,r,e),b=v(t,u.relativeLuminance(y>>8));return b<e?(o=s(h,h,e),b>v(t,u.relativeLuminance(o>>8))?y:o):y}},a.reduceLuminance=s,a.increaseLuminance=p,a.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},a.toColor=function(h,r,e,t){return{css:w.toCss(h,r,e,t),rgba:w.toRgba(h,r,e,t)}}}(f=c.rgba||(c.rgba={})),c.toPaddedHex=m,c.contrastRatio=v},8969:function(W,c,w){var _,u=this&&this.__extends||(_=function(S,C){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,L){k.__proto__=L}||function(k,L){for(var R in L)Object.prototype.hasOwnProperty.call(L,R)&&(k[R]=L[R])},_(S,C)},function(S,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function k(){this.constructor=S}_(S,C),S.prototype=C===null?Object.create(C):(k.prototype=C.prototype,new k)}),f=this&&this.__values||function(S){var C=typeof Symbol=="function"&&Symbol.iterator,k=C&&S[C],L=0;if(k)return k.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&L>=S.length&&(S=void 0),{value:S&&S[L++],done:!S}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;var d=w(844),m=w(2585),v=w(4348),a=w(7866),s=w(744),p=w(7302),h=w(6975),r=w(8460),e=w(1753),t=w(3730),i=w(1480),n=w(7994),l=w(9282),o=w(5435),y=w(5981),b=!1,g=function(S){function C(k){var L=S.call(this)||this;return L._onBinary=new r.EventEmitter,L._onData=new r.EventEmitter,L._onLineFeed=new r.EventEmitter,L._onResize=new r.EventEmitter,L._onScroll=new r.EventEmitter,L._onWriteParsed=new r.EventEmitter,L._instantiationService=new v.InstantiationService,L.optionsService=new p.OptionsService(k),L._instantiationService.setService(m.IOptionsService,L.optionsService),L._bufferService=L.register(L._instantiationService.createInstance(s.BufferService)),L._instantiationService.setService(m.IBufferService,L._bufferService),L._logService=L._instantiationService.createInstance(a.LogService),L._instantiationService.setService(m.ILogService,L._logService),L.coreService=L.register(L._instantiationService.createInstance(h.CoreService,function(){return L.scrollToBottom()})),L._instantiationService.setService(m.ICoreService,L.coreService),L.coreMouseService=L._instantiationService.createInstance(e.CoreMouseService),L._instantiationService.setService(m.ICoreMouseService,L.coreMouseService),L._dirtyRowService=L._instantiationService.createInstance(t.DirtyRowService),L._instantiationService.setService(m.IDirtyRowService,L._dirtyRowService),L.unicodeService=L._instantiationService.createInstance(i.UnicodeService),L._instantiationService.setService(m.IUnicodeService,L.unicodeService),L._charsetService=L._instantiationService.createInstance(n.CharsetService),L._instantiationService.setService(m.ICharsetService,L._charsetService),L._inputHandler=new o.InputHandler(L._bufferService,L._charsetService,L.coreService,L._dirtyRowService,L._logService,L.optionsService,L.coreMouseService,L.unicodeService),L.register((0,r.forwardEvent)(L._inputHandler.onLineFeed,L._onLineFeed)),L.register(L._inputHandler),L.register((0,r.forwardEvent)(L._bufferService.onResize,L._onResize)),L.register((0,r.forwardEvent)(L.coreService.onData,L._onData)),L.register((0,r.forwardEvent)(L.coreService.onBinary,L._onBinary)),L.register(L.optionsService.onOptionChange(function(R){return L._updateOptions(R)})),L.register(L._bufferService.onScroll(function(R){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L.register(L._inputHandler.onScroll(function(R){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L._writeBuffer=new y.WriteBuffer(function(R,x){return L._inputHandler.parse(R,x)}),L.register((0,r.forwardEvent)(L._writeBuffer.onWriteParsed,L._onWriteParsed)),L}return u(C,S),Object.defineProperty(C.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onScroll",{get:function(){var k=this;return this._onScrollApi||(this._onScrollApi=new r.EventEmitter,this.register(this._onScroll.event(function(L){var R;(R=k._onScrollApi)===null||R===void 0||R.fire(L.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"options",{get:function(){return this.optionsService.options},set:function(k){for(var L in k)this.optionsService.options[L]=k[L]},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){var k;this._isDisposed||(S.prototype.dispose.call(this),(k=this._windowsMode)===null||k===void 0||k.dispose(),this._windowsMode=void 0)},C.prototype.write=function(k,L){this._writeBuffer.write(k,L)},C.prototype.writeSync=function(k,L){this._logService.logLevel<=m.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(k,L)},C.prototype.resize=function(k,L){isNaN(k)||isNaN(L)||(k=Math.max(k,s.MINIMUM_COLS),L=Math.max(L,s.MINIMUM_ROWS),this._bufferService.resize(k,L))},C.prototype.scroll=function(k,L){L===void 0&&(L=!1),this._bufferService.scroll(k,L)},C.prototype.scrollLines=function(k,L,R){this._bufferService.scrollLines(k,L,R)},C.prototype.scrollPages=function(k){this._bufferService.scrollPages(k)},C.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},C.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},C.prototype.scrollToLine=function(k){this._bufferService.scrollToLine(k)},C.prototype.registerEscHandler=function(k,L){return this._inputHandler.registerEscHandler(k,L)},C.prototype.registerDcsHandler=function(k,L){return this._inputHandler.registerDcsHandler(k,L)},C.prototype.registerCsiHandler=function(k,L){return this._inputHandler.registerCsiHandler(k,L)},C.prototype.registerOscHandler=function(k,L){return this._inputHandler.registerOscHandler(k,L)},C.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},C.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},C.prototype._updateOptions=function(k){var L;switch(k){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)}},C.prototype._enableWindowsMode=function(){var k=this;if(!this._windowsMode){var L=[];L.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},function(){return(0,l.updateWindowsModeWrappedState)(k._bufferService),!1})),this._windowsMode={dispose:function(){var R,x;try{for(var E=f(L),A=E.next();!A.done;A=E.next())A.value.dispose()}catch(T){R={error:T}}finally{try{A&&!A.done&&(x=E.return)&&x.call(E)}finally{if(R)throw R.error}}}}}},C}(d.Disposable);c.CoreTerminal=g},8460:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.forwardEvent=c.EventEmitter=void 0;var w=function(){function _(){this._listeners=[],this._disposed=!1}return Object.defineProperty(_.prototype,"event",{get:function(){var u=this;return this._event||(this._event=function(f){return u._listeners.push(f),{dispose:function(){if(!u._disposed){for(var d=0;d<u._listeners.length;d++)if(u._listeners[d]===f)return void u._listeners.splice(d,1)}}}}),this._event},enumerable:!1,configurable:!0}),_.prototype.fire=function(u,f){for(var d=[],m=0;m<this._listeners.length;m++)d.push(this._listeners[m]);for(m=0;m<d.length;m++)d[m].call(void 0,u,f)},_.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},_}();c.EventEmitter=w,c.forwardEvent=function(_,u){return _(function(f){return u.fire(f)})}},5435:function(W,c,w){var _,u=this&&this.__extends||(_=function(L,R){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&(x[A]=E[A])},_(L,R)},function(L,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function x(){this.constructor=L}_(L,R),L.prototype=R===null?Object.create(R):(x.prototype=R.prototype,new x)});Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;var f,d=w(2584),m=w(7116),v=w(2015),a=w(844),s=w(8273),p=w(482),h=w(8437),r=w(8460),e=w(643),t=w(511),i=w(3734),n=w(2585),l=w(6242),o=w(6351),y=w(5941),b={"(":0,")":1,"*":2,"+":3,"-":1,".":2},g=131072;function S(L,R){if(L>24)return R.setWinLines||!1;switch(L){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}(function(L){L[L.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",L[L.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(f=c.WindowsOptionsReportType||(c.WindowsOptionsReportType={}));var C=function(){function L(R,x,E,A){this._bufferService=R,this._coreService=x,this._logService=E,this._optionsService=A,this._data=new Uint32Array(0)}return L.prototype.hook=function(R){this._data=new Uint32Array(0)},L.prototype.put=function(R,x,E){this._data=(0,s.concat)(this._data,R.subarray(x,E))},L.prototype.unhook=function(R){if(!R)return this._data=new Uint32Array(0),!0;var x=(0,p.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),x){case'"q':this._coreService.triggerDataEvent(d.C0.ESC+'P1$r0"q'+d.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(d.C0.ESC+'P1$r61;1"p'+d.C0.ESC+"\\");break;case"r":var E=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(d.C0.ESC+"P1$r"+E+d.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(d.C0.ESC+"P1$r0m"+d.C0.ESC+"\\");break;case" q":var A={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];A-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(d.C0.ESC+"P1$r"+A+" q"+d.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",x),this._coreService.triggerDataEvent(d.C0.ESC+"P0$r"+d.C0.ESC+"\\")}return!0},L}(),k=function(L){function R(x,E,A,T,U,q,j,z,N){N===void 0&&(N=new v.EscapeSequenceParser);var M=L.call(this)||this;M._bufferService=x,M._charsetService=E,M._coreService=A,M._dirtyRowService=T,M._logService=U,M._optionsService=q,M._coreMouseService=j,M._unicodeService=z,M._parser=N,M._parseBuffer=new Uint32Array(4096),M._stringDecoder=new p.StringToUtf32,M._utf8Decoder=new p.Utf8ToUtf32,M._workCell=new t.CellData,M._windowTitle="",M._iconName="",M._windowTitleStack=[],M._iconNameStack=[],M._curAttrData=h.DEFAULT_ATTR_DATA.clone(),M._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),M._onRequestBell=new r.EventEmitter,M._onRequestRefreshRows=new r.EventEmitter,M._onRequestReset=new r.EventEmitter,M._onRequestSendFocus=new r.EventEmitter,M._onRequestSyncScrollBar=new r.EventEmitter,M._onRequestWindowsOptionsReport=new r.EventEmitter,M._onA11yChar=new r.EventEmitter,M._onA11yTab=new r.EventEmitter,M._onCursorMove=new r.EventEmitter,M._onLineFeed=new r.EventEmitter,M._onScroll=new r.EventEmitter,M._onTitleChange=new r.EventEmitter,M._onColor=new r.EventEmitter,M._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},M._specialColors=[256,257,258],M.register(M._parser),M._activeBuffer=M._bufferService.buffer,M.register(M._bufferService.buffers.onBufferActivate(function(B){return M._activeBuffer=B.activeBuffer})),M._parser.setCsiHandlerFallback(function(B,Q){M._logService.debug("Unknown CSI code: ",{identifier:M._parser.identToString(B),params:Q.toArray()})}),M._parser.setEscHandlerFallback(function(B){M._logService.debug("Unknown ESC code: ",{identifier:M._parser.identToString(B)})}),M._parser.setExecuteHandlerFallback(function(B){M._logService.debug("Unknown EXECUTE code: ",{code:B})}),M._parser.setOscHandlerFallback(function(B,Q,X){M._logService.debug("Unknown OSC code: ",{identifier:B,action:Q,data:X})}),M._parser.setDcsHandlerFallback(function(B,Q,X){Q==="HOOK"&&(X=X.toArray()),M._logService.debug("Unknown DCS code: ",{identifier:M._parser.identToString(B),action:Q,payload:X})}),M._parser.setPrintHandler(function(B,Q,X){return M.print(B,Q,X)}),M._parser.registerCsiHandler({final:"@"},function(B){return M.insertChars(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"@"},function(B){return M.scrollLeft(B)}),M._parser.registerCsiHandler({final:"A"},function(B){return M.cursorUp(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"A"},function(B){return M.scrollRight(B)}),M._parser.registerCsiHandler({final:"B"},function(B){return M.cursorDown(B)}),M._parser.registerCsiHandler({final:"C"},function(B){return M.cursorForward(B)}),M._parser.registerCsiHandler({final:"D"},function(B){return M.cursorBackward(B)}),M._parser.registerCsiHandler({final:"E"},function(B){return M.cursorNextLine(B)}),M._parser.registerCsiHandler({final:"F"},function(B){return M.cursorPrecedingLine(B)}),M._parser.registerCsiHandler({final:"G"},function(B){return M.cursorCharAbsolute(B)}),M._parser.registerCsiHandler({final:"H"},function(B){return M.cursorPosition(B)}),M._parser.registerCsiHandler({final:"I"},function(B){return M.cursorForwardTab(B)}),M._parser.registerCsiHandler({final:"J"},function(B){return M.eraseInDisplay(B)}),M._parser.registerCsiHandler({prefix:"?",final:"J"},function(B){return M.eraseInDisplay(B)}),M._parser.registerCsiHandler({final:"K"},function(B){return M.eraseInLine(B)}),M._parser.registerCsiHandler({prefix:"?",final:"K"},function(B){return M.eraseInLine(B)}),M._parser.registerCsiHandler({final:"L"},function(B){return M.insertLines(B)}),M._parser.registerCsiHandler({final:"M"},function(B){return M.deleteLines(B)}),M._parser.registerCsiHandler({final:"P"},function(B){return M.deleteChars(B)}),M._parser.registerCsiHandler({final:"S"},function(B){return M.scrollUp(B)}),M._parser.registerCsiHandler({final:"T"},function(B){return M.scrollDown(B)}),M._parser.registerCsiHandler({final:"X"},function(B){return M.eraseChars(B)}),M._parser.registerCsiHandler({final:"Z"},function(B){return M.cursorBackwardTab(B)}),M._parser.registerCsiHandler({final:"`"},function(B){return M.charPosAbsolute(B)}),M._parser.registerCsiHandler({final:"a"},function(B){return M.hPositionRelative(B)}),M._parser.registerCsiHandler({final:"b"},function(B){return M.repeatPrecedingCharacter(B)}),M._parser.registerCsiHandler({final:"c"},function(B){return M.sendDeviceAttributesPrimary(B)}),M._parser.registerCsiHandler({prefix:">",final:"c"},function(B){return M.sendDeviceAttributesSecondary(B)}),M._parser.registerCsiHandler({final:"d"},function(B){return M.linePosAbsolute(B)}),M._parser.registerCsiHandler({final:"e"},function(B){return M.vPositionRelative(B)}),M._parser.registerCsiHandler({final:"f"},function(B){return M.hVPosition(B)}),M._parser.registerCsiHandler({final:"g"},function(B){return M.tabClear(B)}),M._parser.registerCsiHandler({final:"h"},function(B){return M.setMode(B)}),M._parser.registerCsiHandler({prefix:"?",final:"h"},function(B){return M.setModePrivate(B)}),M._parser.registerCsiHandler({final:"l"},function(B){return M.resetMode(B)}),M._parser.registerCsiHandler({prefix:"?",final:"l"},function(B){return M.resetModePrivate(B)}),M._parser.registerCsiHandler({final:"m"},function(B){return M.charAttributes(B)}),M._parser.registerCsiHandler({final:"n"},function(B){return M.deviceStatus(B)}),M._parser.registerCsiHandler({prefix:"?",final:"n"},function(B){return M.deviceStatusPrivate(B)}),M._parser.registerCsiHandler({intermediates:"!",final:"p"},function(B){return M.softReset(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"q"},function(B){return M.setCursorStyle(B)}),M._parser.registerCsiHandler({final:"r"},function(B){return M.setScrollRegion(B)}),M._parser.registerCsiHandler({final:"s"},function(B){return M.saveCursor(B)}),M._parser.registerCsiHandler({final:"t"},function(B){return M.windowOptions(B)}),M._parser.registerCsiHandler({final:"u"},function(B){return M.restoreCursor(B)}),M._parser.registerCsiHandler({intermediates:"'",final:"}"},function(B){return M.insertColumns(B)}),M._parser.registerCsiHandler({intermediates:"'",final:"~"},function(B){return M.deleteColumns(B)}),M._parser.setExecuteHandler(d.C0.BEL,function(){return M.bell()}),M._parser.setExecuteHandler(d.C0.LF,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.VT,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.FF,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.CR,function(){return M.carriageReturn()}),M._parser.setExecuteHandler(d.C0.BS,function(){return M.backspace()}),M._parser.setExecuteHandler(d.C0.HT,function(){return M.tab()}),M._parser.setExecuteHandler(d.C0.SO,function(){return M.shiftOut()}),M._parser.setExecuteHandler(d.C0.SI,function(){return M.shiftIn()}),M._parser.setExecuteHandler(d.C1.IND,function(){return M.index()}),M._parser.setExecuteHandler(d.C1.NEL,function(){return M.nextLine()}),M._parser.setExecuteHandler(d.C1.HTS,function(){return M.tabSet()}),M._parser.registerOscHandler(0,new l.OscHandler(function(B){return M.setTitle(B),M.setIconName(B),!0})),M._parser.registerOscHandler(1,new l.OscHandler(function(B){return M.setIconName(B)})),M._parser.registerOscHandler(2,new l.OscHandler(function(B){return M.setTitle(B)})),M._parser.registerOscHandler(4,new l.OscHandler(function(B){return M.setOrReportIndexedColor(B)})),M._parser.registerOscHandler(10,new l.OscHandler(function(B){return M.setOrReportFgColor(B)})),M._parser.registerOscHandler(11,new l.OscHandler(function(B){return M.setOrReportBgColor(B)})),M._parser.registerOscHandler(12,new l.OscHandler(function(B){return M.setOrReportCursorColor(B)})),M._parser.registerOscHandler(104,new l.OscHandler(function(B){return M.restoreIndexedColor(B)})),M._parser.registerOscHandler(110,new l.OscHandler(function(B){return M.restoreFgColor(B)})),M._parser.registerOscHandler(111,new l.OscHandler(function(B){return M.restoreBgColor(B)})),M._parser.registerOscHandler(112,new l.OscHandler(function(B){return M.restoreCursorColor(B)})),M._parser.registerEscHandler({final:"7"},function(){return M.saveCursor()}),M._parser.registerEscHandler({final:"8"},function(){return M.restoreCursor()}),M._parser.registerEscHandler({final:"D"},function(){return M.index()}),M._parser.registerEscHandler({final:"E"},function(){return M.nextLine()}),M._parser.registerEscHandler({final:"H"},function(){return M.tabSet()}),M._parser.registerEscHandler({final:"M"},function(){return M.reverseIndex()}),M._parser.registerEscHandler({final:"="},function(){return M.keypadApplicationMode()}),M._parser.registerEscHandler({final:">"},function(){return M.keypadNumericMode()}),M._parser.registerEscHandler({final:"c"},function(){return M.fullReset()}),M._parser.registerEscHandler({final:"n"},function(){return M.setgLevel(2)}),M._parser.registerEscHandler({final:"o"},function(){return M.setgLevel(3)}),M._parser.registerEscHandler({final:"|"},function(){return M.setgLevel(3)}),M._parser.registerEscHandler({final:"}"},function(){return M.setgLevel(2)}),M._parser.registerEscHandler({final:"~"},function(){return M.setgLevel(1)}),M._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return M.selectDefaultCharset()}),M._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return M.selectDefaultCharset()});var Y=function(B){Z._parser.registerEscHandler({intermediates:"(",final:B},function(){return M.selectCharset("("+B)}),Z._parser.registerEscHandler({intermediates:")",final:B},function(){return M.selectCharset(")"+B)}),Z._parser.registerEscHandler({intermediates:"*",final:B},function(){return M.selectCharset("*"+B)}),Z._parser.registerEscHandler({intermediates:"+",final:B},function(){return M.selectCharset("+"+B)}),Z._parser.registerEscHandler({intermediates:"-",final:B},function(){return M.selectCharset("-"+B)}),Z._parser.registerEscHandler({intermediates:".",final:B},function(){return M.selectCharset("."+B)}),Z._parser.registerEscHandler({intermediates:"/",final:B},function(){return M.selectCharset("/"+B)})},Z=this;for(var ee in m.CHARSETS)Y(ee);return M._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return M.screenAlignmentPattern()}),M._parser.setErrorHandler(function(B){return M._logService.error("Parsing error: ",B),B}),M._parser.registerDcsHandler({intermediates:"$",final:"q"},new C(M._bufferService,M._coreService,M._logService,M._optionsService)),M}return u(R,L),Object.defineProperty(R.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),R.prototype.dispose=function(){L.prototype.dispose.call(this)},R.prototype._preserveStack=function(x,E,A,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=E,this._parseStack.decodedLength=A,this._parseStack.position=T},R.prototype._logSlowResolvingAsync=function(x){this._logService.logLevel<=n.LogLevelEnum.WARN&&Promise.race([x,new Promise(function(E,A){return setTimeout(function(){return A("#SLOW_TIMEOUT")},5e3)})]).catch(function(E){if(E!=="#SLOW_TIMEOUT")throw E;console.warn("async parser handler taking longer than 5000 ms")})},R.prototype.parse=function(x,E){var A,T=this._activeBuffer.x,U=this._activeBuffer.y,q=0,j=this._parseStack.paused;if(j){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,E))return this._logSlowResolvingAsync(A),A;T=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>g&&(q=this._parseStack.position+g)}if(this._logService.logLevel<=n.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?' "'+x+'"':' "'+Array.prototype.map.call(x,function(Y){return String.fromCharCode(Y)}).join("")+'"'),typeof x=="string"?x.split("").map(function(Y){return Y.charCodeAt(0)}):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<g&&(this._parseBuffer=new Uint32Array(Math.min(x.length,g))),j||this._dirtyRowService.clearRange(),x.length>g)for(var z=q;z<x.length;z+=g){var N=z+g<x.length?z+g:x.length,M=typeof x=="string"?this._stringDecoder.decode(x.substring(z,N),this._parseBuffer):this._utf8Decoder.decode(x.subarray(z,N),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,M))return this._preserveStack(T,U,M,z),this._logSlowResolvingAsync(A),A}else if(!j&&(M=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer),A=this._parser.parse(this._parseBuffer,M)))return this._preserveStack(T,U,M,0),this._logSlowResolvingAsync(A),A;this._activeBuffer.x===T&&this._activeBuffer.y===U||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},R.prototype.print=function(x,E,A){var T,U,q=this._charsetService.charset,j=this._optionsService.rawOptions.screenReaderMode,z=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,M=this._coreService.modes.insertMode,Y=this._curAttrData,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-E>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Y.fg,Y.bg,Y.extended);for(var ee=E;ee<A;++ee){if(T=x[ee],U=this._unicodeService.wcwidth(T),T<127&&q){var B=q[String.fromCharCode(T)];B&&(T=B.charCodeAt(0))}if(j&&this._onA11yChar.fire((0,p.stringFromCodePoint)(T)),U||!this._activeBuffer.x){if(this._activeBuffer.x+U-1>=z){if(N){for(;this._activeBuffer.x<z;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,1,Y.fg,Y.bg,Y.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=z-1,U===2)continue}if(M&&(Z.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(Y),Y),Z.getWidth(z-1)===2&&Z.setCellFromCodePoint(z-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,Y.fg,Y.bg,Y.extended)),Z.setCellFromCodePoint(this._activeBuffer.x++,T,U,Y.fg,Y.bg,Y.extended),U>0)for(;--U;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,0,Y.fg,Y.bg,Y.extended)}else Z.getWidth(this._activeBuffer.x-1)?Z.addCodepointToCell(this._activeBuffer.x-1,T):Z.addCodepointToCell(this._activeBuffer.x-2,T)}A-E>0&&(Z.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<z&&A-E>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodePoint(this._activeBuffer.x,0,1,Y.fg,Y.bg,Y.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},R.prototype.registerCsiHandler=function(x,E){var A=this;return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,E):this._parser.registerCsiHandler(x,function(T){return!S(T.params[0],A._optionsService.rawOptions.windowOptions)||E(T)})},R.prototype.registerDcsHandler=function(x,E){return this._parser.registerDcsHandler(x,new o.DcsHandler(E))},R.prototype.registerEscHandler=function(x,E){return this._parser.registerEscHandler(x,E)},R.prototype.registerOscHandler=function(x,E){return this._parser.registerOscHandler(x,new l.OscHandler(E))},R.prototype.bell=function(){return this._onRequestBell.fire(),!0},R.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},R.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},R.prototype.backspace=function(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||x===void 0)&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);E.hasWidth(this._activeBuffer.x)&&!E.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},R.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0},R.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},R.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},R.prototype._restrictCursor=function(x){x===void 0&&(x=this._bufferService.cols-1),this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},R.prototype._setCursor=function(x,E){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+E):(this._activeBuffer.x=x,this._activeBuffer.y=E),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},R.prototype._moveCursor=function(x,E){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+E)},R.prototype.cursorUp=function(x){var E=this._activeBuffer.y-this._activeBuffer.scrollTop;return E>=0?this._moveCursor(0,-Math.min(E,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0},R.prototype.cursorDown=function(x){var E=this._activeBuffer.scrollBottom-this._activeBuffer.y;return E>=0?this._moveCursor(0,Math.min(E,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0},R.prototype.cursorForward=function(x){return this._moveCursor(x.params[0]||1,0),!0},R.prototype.cursorBackward=function(x){return this._moveCursor(-(x.params[0]||1),0),!0},R.prototype.cursorNextLine=function(x){return this.cursorDown(x),this._activeBuffer.x=0,!0},R.prototype.cursorPrecedingLine=function(x){return this.cursorUp(x),this._activeBuffer.x=0,!0},R.prototype.cursorCharAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},R.prototype.cursorPosition=function(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0},R.prototype.charPosAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},R.prototype.hPositionRelative=function(x){return this._moveCursor(x.params[0]||1,0),!0},R.prototype.linePosAbsolute=function(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0},R.prototype.vPositionRelative=function(x){return this._moveCursor(0,x.params[0]||1),!0},R.prototype.hVPosition=function(x){return this.cursorPosition(x),!0},R.prototype.tabClear=function(x){var E=x.params[0];return E===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:E===3&&(this._activeBuffer.tabs={}),!0},R.prototype.cursorForwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var E=x.params[0]||1;E--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},R.prototype.cursorBackwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var E=x.params[0]||1;E--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},R.prototype._eraseInBufferLine=function(x,E,A,T){T===void 0&&(T=!1);var U=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);U.replaceCells(E,A,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T&&(U.isWrapped=!1)},R.prototype._resetBufferLine=function(x){var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);E.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),E.isWrapped=!1},R.prototype.eraseInDisplay=function(x){var E;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(E=this._activeBuffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);E<this._bufferService.rows;E++)this._resetBufferLine(E);this._dirtyRowService.markDirty(E);break;case 1:for(E=this._activeBuffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(E+1).isWrapped=!1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 2:for(E=this._bufferService.rows,this._dirtyRowService.markDirty(E-1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 3:var A=this._activeBuffer.lines.length-this._bufferService.rows;A>0&&(this._activeBuffer.lines.trimStart(A),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-A,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-A,0),this._onScroll.fire(0))}return!0},R.prototype.eraseInLine=function(x){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},R.prototype.insertLines=function(x){this._restrictCursor();var E=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var A=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;E--;)this._activeBuffer.lines.splice(U-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},R.prototype.deleteLines=function(x){this._restrictCursor();var E=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var A,T=this._activeBuffer.ybase+this._activeBuffer.y;for(A=this._bufferService.rows-1-this._activeBuffer.scrollBottom,A=this._bufferService.rows-1+this._activeBuffer.ybase-A;E--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},R.prototype.insertChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},R.prototype.deleteChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},R.prototype.scrollUp=function(x){for(var E=x.params[0]||1;E--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.scrollDown=function(x){for(var E=x.params[0]||1;E--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(h.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.scrollLeft=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.deleteCells(0,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.scrollRight=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.insertCells(0,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.insertColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.insertCells(this._activeBuffer.x,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.deleteColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.deleteCells(this._activeBuffer.x,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},R.prototype.eraseChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},R.prototype.repeatPrecedingCharacter=function(x){if(!this._parser.precedingCodepoint)return!0;for(var E=x.params[0]||1,A=new Uint32Array(E),T=0;T<E;++T)A[T]=this._parser.precedingCodepoint;return this.print(A,0,A.length),!0},R.prototype.sendDeviceAttributesPrimary=function(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0},R.prototype.sendDeviceAttributesSecondary=function(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0},R.prototype._is=function(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0},R.prototype.setMode=function(x){for(var E=0;E<x.length;E++)x.params[E]===4&&(this._coreService.modes.insertMode=!0);return!0},R.prototype.setModePrivate=function(x){for(var E=0;E<x.length;E++)switch(x.params[E]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},R.prototype.resetMode=function(x){for(var E=0;E<x.length;E++)x.params[E]===4&&(this._coreService.modes.insertMode=!1);return!0},R.prototype.resetModePrivate=function(x){for(var E=0;E<x.length;E++)switch(x.params[E]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[E]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},R.prototype._updateAttrColor=function(x,E,A,T,U){return E===2?(x|=50331648,x&=-16777216,x|=i.AttributeData.fromColorRGB([A,T,U])):E===5&&(x&=-50331904,x|=33554432|255&A),x},R.prototype._extractColor=function(x,E,A){var T=[0,0,-1,0,0,0],U=0,q=0;do{if(T[q+U]=x.params[E+q],x.hasSubParams(E+q)){var j=x.getSubParams(E+q),z=0;do T[1]===5&&(U=1),T[q+z+1+U]=j[z];while(++z<j.length&&z+q+1+U<T.length);break}if(T[1]===5&&q+U>=2||T[1]===2&&q+U>=5)break;T[1]&&(U=1)}while(++q+E<x.length&&q+U<T.length);for(z=2;z<T.length;++z)T[z]===-1&&(T[z]=0);switch(T[0]){case 38:A.fg=this._updateAttrColor(A.fg,T[1],T[3],T[4],T[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,T[1],T[3],T[4],T[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,T[1],T[3],T[4],T[5])}return q},R.prototype._processUnderline=function(x,E){E.extended=E.extended.clone(),(!~x||x>5)&&(x=1),E.extended.underlineStyle=x,E.fg|=268435456,x===0&&(E.fg&=-268435457),E.updateExtended()},R.prototype.charAttributes=function(x){if(x.length===1&&x.params[0]===0)return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg,!0;for(var E,A=x.length,T=this._curAttrData,U=0;U<A;U++)(E=x.params[U])>=30&&E<=37?(T.fg&=-50331904,T.fg|=16777216|E-30):E>=40&&E<=47?(T.bg&=-50331904,T.bg|=16777216|E-40):E>=90&&E<=97?(T.fg&=-50331904,T.fg|=16777224|E-90):E>=100&&E<=107?(T.bg&=-50331904,T.bg|=16777224|E-100):E===0?(T.fg=h.DEFAULT_ATTR_DATA.fg,T.bg=h.DEFAULT_ATTR_DATA.bg):E===1?T.fg|=134217728:E===3?T.bg|=67108864:E===4?(T.fg|=268435456,this._processUnderline(x.hasSubParams(U)?x.getSubParams(U)[0]:1,T)):E===5?T.fg|=536870912:E===7?T.fg|=67108864:E===8?T.fg|=1073741824:E===9?T.fg|=2147483648:E===2?T.bg|=134217728:E===21?this._processUnderline(2,T):E===22?(T.fg&=-134217729,T.bg&=-134217729):E===23?T.bg&=-67108865:E===24?T.fg&=-268435457:E===25?T.fg&=-536870913:E===27?T.fg&=-67108865:E===28?T.fg&=-1073741825:E===29?T.fg&=2147483647:E===39?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):E===49?(T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):E===38||E===48||E===58?U+=this._extractColor(x,U,T):E===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):E===100?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",E);return!0},R.prototype.deviceStatus=function(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(d.C0.ESC+"[0n");break;case 6:var E=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(d.C0.ESC+"["+E+";"+A+"R")}return!0},R.prototype.deviceStatusPrivate=function(x){if(x.params[0]===6){var E=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(d.C0.ESC+"[?"+E+";"+A+"R")}return!0},R.prototype.softReset=function(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},R.prototype.setCursorStyle=function(x){var E=x.params[0]||1;switch(E){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var A=E%2==1;return this._optionsService.options.cursorBlink=A,!0},R.prototype.setScrollRegion=function(x){var E,A=x.params[0]||1;return(x.length<2||(E=x.params[1])>this._bufferService.rows||E===0)&&(E=this._bufferService.rows),E>A&&(this._activeBuffer.scrollTop=A-1,this._activeBuffer.scrollBottom=E-1,this._setCursor(0,0)),!0},R.prototype.windowOptions=function(x){if(!S(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;var E=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:E!==2&&this._onRequestWindowsOptionsReport.fire(f.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(f.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(d.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:E!==0&&E!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),E!==0&&E!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:E!==0&&E!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),E!==0&&E!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},R.prototype.saveCursor=function(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},R.prototype.restoreCursor=function(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},R.prototype.setTitle=function(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0},R.prototype.setIconName=function(x){return this._iconName=x,!0},R.prototype.setOrReportIndexedColor=function(x){for(var E=[],A=x.split(";");A.length>1;){var T=A.shift(),U=A.shift();if(/^\d+$/.exec(T)){var q=parseInt(T);if(0<=q&&q<256)if(U==="?")E.push({type:0,index:q});else{var j=(0,y.parseColor)(U);j&&E.push({type:1,index:q,color:j})}}}return E.length&&this._onColor.fire(E),!0},R.prototype._setOrReportSpecialColor=function(x,E){for(var A=x.split(";"),T=0;T<A.length&&!(E>=this._specialColors.length);++T,++E)if(A[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[E]}]);else{var U=(0,y.parseColor)(A[T]);U&&this._onColor.fire([{type:1,index:this._specialColors[E],color:U}])}return!0},R.prototype.setOrReportFgColor=function(x){return this._setOrReportSpecialColor(x,0)},R.prototype.setOrReportBgColor=function(x){return this._setOrReportSpecialColor(x,1)},R.prototype.setOrReportCursorColor=function(x){return this._setOrReportSpecialColor(x,2)},R.prototype.restoreIndexedColor=function(x){if(!x)return this._onColor.fire([{type:2}]),!0;for(var E=[],A=x.split(";"),T=0;T<A.length;++T)if(/^\d+$/.exec(A[T])){var U=parseInt(A[T]);0<=U&&U<256&&E.push({type:2,index:U})}return E.length&&this._onColor.fire(E),!0},R.prototype.restoreFgColor=function(x){return this._onColor.fire([{type:2,index:256}]),!0},R.prototype.restoreBgColor=function(x){return this._onColor.fire([{type:2,index:257}]),!0},R.prototype.restoreCursorColor=function(x){return this._onColor.fire([{type:2,index:258}]),!0},R.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},R.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},R.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},R.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0},R.prototype.selectCharset=function(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(b[x[0]],m.CHARSETS[x[1]]||m.DEFAULT_CHARSET),!0)},R.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},R.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},R.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},R.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},R.prototype.reset=function(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()},R.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},R.prototype.setgLevel=function(x){return this._charsetService.setgLevel(x),!0},R.prototype.screenAlignmentPattern=function(){var x=new t.CellData;x.content=1<<22|69,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(var E=0;E<this._bufferService.rows;++E){var A=this._activeBuffer.ybase+this._activeBuffer.y+E,T=this._activeBuffer.lines.get(A);T&&(T.fill(x),T.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},R}(a.Disposable);c.InputHandler=k},844:function(W,c){var w=this&&this.__values||function(f){var d=typeof Symbol=="function"&&Symbol.iterator,m=d&&f[d],v=0;if(m)return m.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.Disposable=void 0;var _=function(){function f(){this._disposables=[],this._isDisposed=!1}return f.prototype.dispose=function(){var d,m;this._isDisposed=!0;try{for(var v=w(this._disposables),a=v.next();!a.done;a=v.next())a.value.dispose()}catch(s){d={error:s}}finally{try{a&&!a.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}this._disposables.length=0},f.prototype.register=function(d){return this._disposables.push(d),d},f.prototype.unregister=function(d){var m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)},f}();function u(f){var d,m;try{for(var v=w(f),a=v.next();!a.done;a=v.next())a.value.dispose()}catch(s){d={error:s}}finally{try{a&&!a.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}f.length=0}c.Disposable=_,c.disposeArray=u,c.getDisposeArrayDisposable=function(f){return{dispose:function(){return u(f)}}}},6114:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.isSafari=c.isLegacyEdge=c.isFirefox=void 0;var w=typeof navigator>"u",_=w?"node":navigator.userAgent,u=w?"node":navigator.platform;c.isFirefox=_.includes("Firefox"),c.isLegacyEdge=_.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(_),c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),c.isIpad=u==="iPad",c.isIphone=u==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),c.isLinux=u.indexOf("Linux")>=0},6106:function(W,c){var w=this&&this.__generator||function(u,f){var d,m,v,a,s={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return a={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function p(h){return function(r){return function(e){if(d)throw new TypeError("Generator is already executing.");for(;s;)try{if(d=1,m&&(v=2&e[0]?m.return:e[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,e[1])).done)return v;switch(m=0,v&&(e=[2&e[0],v.value]),e[0]){case 0:case 1:v=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,m=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!((v=(v=s.trys).length>0&&v[v.length-1])||e[0]!==6&&e[0]!==2)){s=0;continue}if(e[0]===3&&(!v||e[1]>v[0]&&e[1]<v[3])){s.label=e[1];break}if(e[0]===6&&s.label<v[1]){s.label=v[1],v=e;break}if(v&&s.label<v[2]){s.label=v[2],s.ops.push(e);break}v[2]&&s.ops.pop(),s.trys.pop();continue}e=f.call(u,s)}catch(t){e=[6,t],m=0}finally{d=v=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([h,r])}}};Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;var _=function(){function u(f){this._getKey=f,this._array=[]}return u.prototype.clear=function(){this._array.length=0},u.prototype.insert=function(f){if(this._array.length!==0){var d=this._search(this._getKey(f),0,this._array.length-1);this._array.splice(d,0,f)}else this._array.push(f)},u.prototype.delete=function(f){if(this._array.length===0)return!1;var d=this._getKey(f),m=this._search(d,0,this._array.length-1);if(this._getKey(this._array[m])!==d)return!1;do if(this._array[m]===f)return this._array.splice(m,1),!0;while(++m<this._array.length&&this._getKey(this._array[m])===d);return!1},u.prototype.getKeyIterator=function(f){var d;return w(this,function(m){switch(m.label){case 0:if(this._array.length===0)return[2];if((d=this._search(f,0,this._array.length-1))<0||d>=this._array.length)return[2];if(this._getKey(this._array[d])!==f)return[2];m.label=1;case 1:return[4,this._array[d]];case 2:m.sent(),m.label=3;case 3:if(++d<this._array.length&&this._getKey(this._array[d])===f)return[3,1];m.label=4;case 4:return[2]}})},u.prototype.values=function(){return this._array.values()},u.prototype._search=function(f,d,m){if(m<d)return d;var v=Math.floor((d+m)/2);if(this._getKey(this._array[v])>f)return this._search(f,d,v-1);if(this._getKey(this._array[v])<f)return this._search(f,v+1,m);for(;v>0&&this._getKey(this._array[v-1])===f;)v--;return v},u}();c.SortedList=_},8273:(W,c)=>{function w(_,u,f,d){if(f===void 0&&(f=0),d===void 0&&(d=_.length),f>=_.length)return _;f=(_.length+f)%_.length,d=d>=_.length?_.length:(_.length+d)%_.length;for(var m=f;m<d;++m)_[m]=u;return _}Object.defineProperty(c,"__esModule",{value:!0}),c.concat=c.fillFallback=c.fill=void 0,c.fill=function(_,u,f,d){return _.fill?_.fill(u,f,d):w(_,u,f,d)},c.fillFallback=w,c.concat=function(_,u){var f=new _.constructor(_.length+u.length);return f.set(_),f.set(u,_.length),f}},9282:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;var _=w(643);c.updateWindowsModeWrappedState=function(u){var f=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),d=f?.get(u.cols-1),m=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);m&&d&&(m.isWrapped=d[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&d[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;var w=function(){function u(){this.fg=0,this.bg=0,this.extended=new _}return u.toColorRGB=function(f){return[f>>>16&255,f>>>8&255,255&f]},u.fromColorRGB=function(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]},u.prototype.clone=function(){var f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f},u.prototype.isInverse=function(){return 67108864&this.fg},u.prototype.isBold=function(){return 134217728&this.fg},u.prototype.isUnderline=function(){return 268435456&this.fg},u.prototype.isBlink=function(){return 536870912&this.fg},u.prototype.isInvisible=function(){return 1073741824&this.fg},u.prototype.isItalic=function(){return 67108864&this.bg},u.prototype.isDim=function(){return 134217728&this.bg},u.prototype.isStrikethrough=function(){return 2147483648&this.fg},u.prototype.getFgColorMode=function(){return 50331648&this.fg},u.prototype.getBgColorMode=function(){return 50331648&this.bg},u.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},u.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},u.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},u.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},u.prototype.isFgDefault=function(){return(50331648&this.fg)==0},u.prototype.isBgDefault=function(){return(50331648&this.bg)==0},u.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},u.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},u.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},u.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},u.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},u.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},u.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},u.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},u.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},u.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},u.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},u}();c.AttributeData=w;var _=function(){function u(f,d){f===void 0&&(f=0),d===void 0&&(d=-1),this.underlineStyle=f,this.underlineColor=d}return u.prototype.clone=function(){return new u(this.underlineStyle,this.underlineColor)},u.prototype.isEmpty=function(){return this.underlineStyle===0},u}();c.ExtendedAttrs=_},9092:function(W,c,w){var _=this&&this.__read||function(t,i){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var l,o,y=n.call(t),b=[];try{for(;(i===void 0||i-- >0)&&!(l=y.next()).done;)b.push(l.value)}catch(g){o={error:g}}finally{try{l&&!l.done&&(n=y.return)&&n.call(y)}finally{if(o)throw o.error}}return b},u=this&&this.__spreadArray||function(t,i,n){if(n||arguments.length===2)for(var l,o=0,y=i.length;o<y;o++)!l&&o in i||(l||(l=Array.prototype.slice.call(i,0,o)),l[o]=i[o]);return t.concat(l||Array.prototype.slice.call(i))};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferStringIterator=c.Buffer=c.MAX_BUFFER_SIZE=void 0;var f=w(6349),d=w(8437),m=w(511),v=w(643),a=w(4634),s=w(4863),p=w(7116),h=w(3734);c.MAX_BUFFER_SIZE=4294967295;var r=function(){function t(i,n,l){this._hasScrollback=i,this._optionsService=n,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=d.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=m.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=m.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(i){return i?(this._nullCell.fg=i.fg,this._nullCell.bg=i.bg,this._nullCell.extended=i.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(i){return i?(this._whitespaceCell.fg=i.fg,this._whitespaceCell.bg=i.bg,this._whitespaceCell.extended=i.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(i,n){return new d.BufferLine(this._bufferService.cols,this.getNullCell(i),n)},Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var i=this.ybase+this.y-this.ydisp;return i>=0&&i<this._rows},enumerable:!1,configurable:!0}),t.prototype._getCorrectBufferLength=function(i){if(!this._hasScrollback)return i;var n=i+this._optionsService.rawOptions.scrollback;return n>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(i){if(this.lines.length===0){i===void 0&&(i=d.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(i))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(i,n){var l=this.getNullCell(d.DEFAULT_ATTR_DATA),o=this._getCorrectBufferLength(n);if(o>this.lines.maxLength&&(this.lines.maxLength=o),this.lines.length>0){if(this._cols<i)for(var y=0;y<this.lines.length;y++)this.lines.get(y).resize(i,l);var b=0;if(this._rows<n)for(var g=this._rows;g<n;g++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new d.BufferLine(i,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+b+1?(this.ybase--,b++,this.ydisp>0&&this.ydisp--):this.lines.push(new d.BufferLine(i,l)));else for(g=this._rows;g>n;g--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(o<this.lines.maxLength){var S=this.lines.length-o;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=o}this.x=Math.min(this.x,i-1),this.y=Math.min(this.y,n-1),b&&(this.y+=b),this.savedX=Math.min(this.savedX,i-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(i,n),this._cols>i))for(y=0;y<this.lines.length;y++)this.lines.get(y).resize(i,l);this._cols=i,this._rows=n},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(i,n){this._cols!==i&&(i>this._cols?this._reflowLarger(i,n):this._reflowSmaller(i,n))},t.prototype._reflowLarger=function(i,n){var l=(0,a.reflowLargerGetLinesToRemove)(this.lines,this._cols,i,this.ybase+this.y,this.getNullCell(d.DEFAULT_ATTR_DATA));if(l.length>0){var o=(0,a.reflowLargerCreateNewLayout)(this.lines,l);(0,a.reflowLargerApplyNewLayout)(this.lines,o.layout),this._reflowLargerAdjustViewport(i,n,o.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(i,n,l){for(var o=this.getNullCell(d.DEFAULT_ATTR_DATA),y=l;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new d.BufferLine(i,o))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},t.prototype._reflowSmaller=function(i,n){for(var l=this.getNullCell(d.DEFAULT_ATTR_DATA),o=[],y=0,b=this.lines.length-1;b>=0;b--){var g=this.lines.get(b);if(!(!g||!g.isWrapped&&g.getTrimmedLength()<=i)){for(var S=[g];g.isWrapped&&b>0;)g=this.lines.get(--b),S.unshift(g);var C=this.ybase+this.y;if(!(C>=b&&C<b+S.length)){var k,L=S[S.length-1].getTrimmedLength(),R=(0,a.reflowSmallerGetNewLineLengths)(S,this._cols,i),x=R.length-S.length;k=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+x):Math.max(0,this.lines.length-this.lines.maxLength+x);for(var E=[],A=0;A<x;A++){var T=this.getBlankLine(d.DEFAULT_ATTR_DATA,!0);E.push(T)}E.length>0&&(o.push({start:b+S.length+y,newLines:E}),y+=E.length),S.push.apply(S,u([],_(E),!1));var U=R.length-1,q=R[U];q===0&&(q=R[--U]);for(var j=S.length-x-1,z=L;j>=0;){var N=Math.min(z,q);if(S[U]===void 0)break;if(S[U].copyCellsFrom(S[j],z-N,q-N,N,!0),(q-=N)==0&&(q=R[--U]),(z-=N)==0){j--;var M=Math.max(j,0);z=(0,a.getWrappedLineTrimmedLength)(S,M,this._cols)}}for(A=0;A<S.length;A++)R[A]<i&&S[A].setCell(R[A],l);for(var Y=x-k;Y-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+x,this.ybase+n-1)}}}if(o.length>0){var Z=[],ee=[];for(A=0;A<this.lines.length;A++)ee.push(this.lines.get(A));var B=this.lines.length,Q=B-1,X=0,F=o[X];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);var O=0;for(A=Math.min(this.lines.maxLength-1,B+y-1);A>=0;A--)if(F&&F.start>Q+O){for(var D=F.newLines.length-1;D>=0;D--)this.lines.set(A--,F.newLines[D]);A++,Z.push({index:Q+1,amount:F.newLines.length}),O+=F.newLines.length,F=o[++X]}else this.lines.set(A,ee[Q--]);var H=0;for(A=Z.length-1;A>=0;A--)Z[A].index+=H,this.lines.onInsertEmitter.fire(Z[A]),H+=Z[A].amount;var G=Math.max(0,B+y-this.lines.maxLength);G>0&&this.lines.onTrimEmitter.fire(G)}},t.prototype.stringIndexToBufferIndex=function(i,n,l){for(l===void 0&&(l=!1);n;){var o=this.lines.get(i);if(!o)return[-1,-1];for(var y=l?o.getTrimmedLength():o.length,b=0;b<y;++b)if(o.get(b)[v.CHAR_DATA_WIDTH_INDEX]&&(n-=o.get(b)[v.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[i,b];i++}return[i,0]},t.prototype.translateBufferLineToString=function(i,n,l,o){l===void 0&&(l=0);var y=this.lines.get(i);return y?y.translateToString(n,l,o):""},t.prototype.getWrappedRangeForLine=function(i){for(var n=i,l=i;n>0&&this.lines.get(n).isWrapped;)n--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:n,last:l}},t.prototype.setupTabStops=function(i){for(i!=null?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);i<this._cols;i+=this._optionsService.rawOptions.tabStopWidth)this.tabs[i]=!0},t.prototype.prevStop=function(i){for(i==null&&(i=this.x);!this.tabs[--i]&&i>0;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.nextStop=function(i){for(i==null&&(i=this.x);!this.tabs[++i]&&i<this._cols;);return i>=this._cols?this._cols-1:i<0?0:i},t.prototype.clearMarkers=function(i){this._isClearing=!0;for(var n=0;n<this.markers.length;n++)this.markers[n].line===i&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1},t.prototype.clearAllMarkers=function(){this._isClearing=!0;for(var i=0;i<this.markers.length;i++)this.markers[i].dispose(),this.markers.splice(i--,1);this._isClearing=!1},t.prototype.addMarker=function(i){var n=this,l=new s.Marker(i);return this.markers.push(l),l.register(this.lines.onTrim(function(o){l.line-=o,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(o){l.line>=o.index&&(l.line+=o.amount)})),l.register(this.lines.onDelete(function(o){l.line>=o.index&&l.line<o.index+o.amount&&l.dispose(),l.line>o.index&&(l.line-=o.amount)})),l.register(l.onDispose(function(){return n._removeMarker(l)})),l},t.prototype._removeMarker=function(i){this._isClearing||this.markers.splice(this.markers.indexOf(i),1)},t.prototype.iterator=function(i,n,l,o,y){return new e(this,i,n,l,o,y)},t}();c.Buffer=r;var e=function(){function t(i,n,l,o,y,b){l===void 0&&(l=0),o===void 0&&(o=i.lines.length),y===void 0&&(y=0),b===void 0&&(b=0),this._buffer=i,this._trimRight=n,this._startIndex=l,this._endIndex=o,this._startOverscan=y,this._endOverscan=b,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._current<this._endIndex},t.prototype.next=function(){var i=this._buffer.getWrappedRangeForLine(this._current);i.first<this._startIndex-this._startOverscan&&(i.first=this._startIndex-this._startOverscan),i.last>this._endIndex+this._endOverscan&&(i.last=this._endIndex+this._endOverscan),i.first=Math.max(i.first,0),i.last=Math.min(i.last,this._buffer.lines.length);for(var n="",l=i.first;l<=i.last;++l)n+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=i.last+1,{range:i,content:n}},t}();c.BufferStringIterator=e},8437:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;var _=w(482),u=w(643),f=w(511),d=w(3734);c.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);var m=function(){function v(a,s,p){p===void 0&&(p=!1),this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);for(var h=s||f.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),r=0;r<a;++r)this.setCell(r,h);this.length=a}return v.prototype.get=function(a){var s=this._data[3*a+0],p=2097151&s;return[this._data[3*a+1],2097152&s?this._combined[a]:p?(0,_.stringFromCodePoint)(p):"",s>>22,2097152&s?this._combined[a].charCodeAt(this._combined[a].length-1):p]},v.prototype.set=function(a,s){this._data[3*a+1]=s[u.CHAR_DATA_ATTR_INDEX],s[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[a]=s[1],this._data[3*a+0]=2097152|a|s[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*a+0]=s[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[u.CHAR_DATA_WIDTH_INDEX]<<22},v.prototype.getWidth=function(a){return this._data[3*a+0]>>22},v.prototype.hasWidth=function(a){return 12582912&this._data[3*a+0]},v.prototype.getFg=function(a){return this._data[3*a+1]},v.prototype.getBg=function(a){return this._data[3*a+2]},v.prototype.hasContent=function(a){return 4194303&this._data[3*a+0]},v.prototype.getCodePoint=function(a){var s=this._data[3*a+0];return 2097152&s?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&s},v.prototype.isCombined=function(a){return 2097152&this._data[3*a+0]},v.prototype.getString=function(a){var s=this._data[3*a+0];return 2097152&s?this._combined[a]:2097151&s?(0,_.stringFromCodePoint)(2097151&s):""},v.prototype.loadCell=function(a,s){var p=3*a;return s.content=this._data[p+0],s.fg=this._data[p+1],s.bg=this._data[p+2],2097152&s.content&&(s.combinedData=this._combined[a]),268435456&s.bg&&(s.extended=this._extendedAttrs[a]),s},v.prototype.setCell=function(a,s){2097152&s.content&&(this._combined[a]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[a]=s.extended),this._data[3*a+0]=s.content,this._data[3*a+1]=s.fg,this._data[3*a+2]=s.bg},v.prototype.setCellFromCodePoint=function(a,s,p,h,r,e){268435456&r&&(this._extendedAttrs[a]=e),this._data[3*a+0]=s|p<<22,this._data[3*a+1]=h,this._data[3*a+2]=r},v.prototype.addCodepointToCell=function(a,s){var p=this._data[3*a+0];2097152&p?this._combined[a]+=(0,_.stringFromCodePoint)(s):(2097151&p?(this._combined[a]=(0,_.stringFromCodePoint)(2097151&p)+(0,_.stringFromCodePoint)(s),p&=-2097152,p|=2097152):p=s|1<<22,this._data[3*a+0]=p)},v.prototype.insertCells=function(a,s,p,h){if((a%=this.length)&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),s<this.length-a){for(var r=new f.CellData,e=this.length-a-s-1;e>=0;--e)this.setCell(a+s+e,this.loadCell(a+e,r));for(e=0;e<s;++e)this.setCell(a+e,p)}else for(e=a;e<this.length;++e)this.setCell(e,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs)},v.prototype.deleteCells=function(a,s,p,h){if(a%=this.length,s<this.length-a){for(var r=new f.CellData,e=0;e<this.length-a-s;++e)this.setCell(a+e,this.loadCell(a+s+e,r));for(e=this.length-s;e<this.length;++e)this.setCell(e,p)}else for(e=a;e<this.length;++e)this.setCell(e,p);a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),this.getWidth(a)!==0||this.hasContent(a)||this.setCellFromCodePoint(a,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs)},v.prototype.replaceCells=function(a,s,p,h){for(a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs);a<s&&a<this.length;)this.setCell(a++,p)},v.prototype.resize=function(a,s){if(a!==this.length){if(a>this.length){var p=new Uint32Array(3*a);this.length&&(3*a<this._data.length?p.set(this._data.subarray(0,3*a)):p.set(this._data)),this._data=p;for(var h=this.length;h<a;++h)this.setCell(h,s)}else if(a){(p=new Uint32Array(3*a)).set(this._data.subarray(0,3*a)),this._data=p;var r=Object.keys(this._combined);for(h=0;h<r.length;h++){var e=parseInt(r[h],10);e>=a&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=a}},v.prototype.fill=function(a){this._combined={},this._extendedAttrs={};for(var s=0;s<this.length;++s)this.setCell(s,a)},v.prototype.copyFrom=function(a){for(var s in this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={},a._combined)this._combined[s]=a._combined[s];for(var s in this._extendedAttrs={},a._extendedAttrs)this._extendedAttrs[s]=a._extendedAttrs[s];this.isWrapped=a.isWrapped},v.prototype.clone=function(){var a=new v(0);for(var s in a._data=new Uint32Array(this._data),a.length=this.length,this._combined)a._combined[s]=this._combined[s];for(var s in this._extendedAttrs)a._extendedAttrs[s]=this._extendedAttrs[s];return a.isWrapped=this.isWrapped,a},v.prototype.getTrimmedLength=function(){for(var a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0},v.prototype.copyCellsFrom=function(a,s,p,h,r){var e=a._data;if(r)for(var t=h-1;t>=0;t--)for(var i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(s+t)+i];else for(t=0;t<h;t++)for(i=0;i<3;i++)this._data[3*(p+t)+i]=e[3*(s+t)+i];var n=Object.keys(a._combined);for(i=0;i<n.length;i++){var l=parseInt(n[i],10);l>=s&&(this._combined[l-s+p]=a._combined[l])}},v.prototype.translateToString=function(a,s,p){a===void 0&&(a=!1),s===void 0&&(s=0),p===void 0&&(p=this.length),a&&(p=Math.min(p,this.getTrimmedLength()));for(var h="";s<p;){var r=this._data[3*s+0],e=2097151&r;h+=2097152&r?this._combined[s]:e?(0,_.stringFromCodePoint)(e):u.WHITESPACE_CELL_CHAR,s+=r>>22||1}return h},v}();c.BufferLine=m},4841:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(w,_){if(w.start.y>w.end.y)throw new Error("Buffer range end ("+w.end.x+", "+w.end.y+") cannot be before start ("+w.start.x+", "+w.start.y+")");return _*(w.end.y-w.start.y)+(w.end.x-w.start.x+1)}},4634:(W,c)=>{function w(_,u,f){if(u===_.length-1)return _[u].getTrimmedLength();var d=!_[u].hasContent(f-1)&&_[u].getWidth(f-1)===1,m=_[u+1].getWidth(0)===2;return d&&m?f-1:f}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(_,u,f,d,m){for(var v=[],a=0;a<_.length-1;a++){var s=a,p=_.get(++s);if(p.isWrapped){for(var h=[_.get(a)];s<_.length&&p.isWrapped;)h.push(p),p=_.get(++s);if(d>=a&&d<s)a+=h.length-1;else{for(var r=0,e=w(h,r,u),t=1,i=0;t<h.length;){var n=w(h,t,u),l=n-i,o=f-e,y=Math.min(l,o);h[r].copyCellsFrom(h[t],i,e,y,!1),(e+=y)===f&&(r++,e=0),(i+=y)===n&&(t++,i=0),e===0&&r!==0&&h[r-1].getWidth(f-1)===2&&(h[r].copyCellsFrom(h[r-1],f-1,e++,1,!1),h[r-1].setCell(f-1,m))}h[r].replaceCells(e,f,m);for(var b=0,g=h.length-1;g>0&&(g>r||h[g].getTrimmedLength()===0);g--)b++;b>0&&(v.push(a+h.length-b),v.push(b)),a+=h.length-1}}}return v},c.reflowLargerCreateNewLayout=function(_,u){for(var f=[],d=0,m=u[d],v=0,a=0;a<_.length;a++)if(m===a){var s=u[++d];_.onDeleteEmitter.fire({index:a-v,amount:s}),a+=s-1,v+=s,m=u[++d]}else f.push(a);return{layout:f,countRemoved:v}},c.reflowLargerApplyNewLayout=function(_,u){for(var f=[],d=0;d<u.length;d++)f.push(_.get(u[d]));for(d=0;d<f.length;d++)_.set(d,f[d]);_.length=u.length},c.reflowSmallerGetNewLineLengths=function(_,u,f){for(var d=[],m=_.map(function(e,t){return w(_,t,u)}).reduce(function(e,t){return e+t}),v=0,a=0,s=0;s<m;){if(m-s<f){d.push(m-s);break}v+=f;var p=w(_,a,u);v>p&&(v-=p,a++);var h=_[a].getWidth(v-1)===2;h&&v--;var r=h?f-1:f;d.push(r),s+=r}return d},c.getWrappedLineTrimmedLength=w},5295:function(W,c,w){var _,u=this&&this.__extends||(_=function(v,a){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(s[h]=p[h])},_(v,a)},function(v,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function s(){this.constructor=v}_(v,a),v.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)});Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;var f=w(9092),d=w(8460),m=function(v){function a(s,p){var h=v.call(this)||this;return h._optionsService=s,h._bufferService=p,h._onBufferActivate=h.register(new d.EventEmitter),h.reset(),h}return u(a,v),Object.defineProperty(a.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),a.prototype.reset=function(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(a.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),a.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},a.prototype.activateAltBuffer=function(s){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(s),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},a.prototype.resize=function(s,p){this._normal.resize(s,p),this._alt.resize(s,p)},a.prototype.setupTabStops=function(s){this._normal.setupTabStops(s),this._alt.setupTabStops(s)},a}(w(844).Disposable);c.BufferSet=m},511:function(W,c,w){var _,u=this&&this.__extends||(_=function(a,s){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&(p[r]=h[r])},_(a,s)},function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function p(){this.constructor=a}_(a,s),a.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)});Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;var f=w(482),d=w(643),m=w(3734),v=function(a){function s(){var p=a!==null&&a.apply(this,arguments)||this;return p.content=0,p.fg=0,p.bg=0,p.extended=new m.ExtendedAttrs,p.combinedData="",p}return u(s,a),s.fromCharData=function(p){var h=new s;return h.setFromCharData(p),h},s.prototype.isCombined=function(){return 2097152&this.content},s.prototype.getWidth=function(){return this.content>>22},s.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""},s.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},s.prototype.setFromCharData=function(p){this.fg=p[d.CHAR_DATA_ATTR_INDEX],this.bg=0;var h=!1;if(p[d.CHAR_DATA_CHAR_INDEX].length>2)h=!0;else if(p[d.CHAR_DATA_CHAR_INDEX].length===2){var r=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var e=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(r-55296)+e-56320+65536|p[d.CHAR_DATA_WIDTH_INDEX]<<22:h=!0}else h=!0}else this.content=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[d.CHAR_DATA_WIDTH_INDEX]<<22;h&&(this.combinedData=p[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[d.CHAR_DATA_WIDTH_INDEX]<<22)},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(m.AttributeData);c.CellData=v},643:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=256,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:function(W,c,w){var _,u=this&&this.__extends||(_=function(m,v){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(a[p]=s[p])},_(m,v)},function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function a(){this.constructor=m}_(m,v),m.prototype=v===null?Object.create(v):(a.prototype=v.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;var f=w(8460),d=function(m){function v(a){var s=m.call(this)||this;return s.line=a,s._id=v._nextId++,s.isDisposed=!1,s._onDispose=new f.EventEmitter,s}return u(v,m),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),m.prototype.dispose.call(this))},v._nextId=1,v}(w(844).Disposable);c.Marker=d},7116:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},c.CHARSETS.A={"#":"\xA3"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},c.CHARSETS.C=c.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},c.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},c.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},c.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},c.CHARSETS.E=c.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},c.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},c.CHARSETS.H=c.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(W,c)=>{var w,_;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
7
- `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"}(w=c.C0||(c.C0={})),(_=c.C1||(c.C1={})).PAD="\x80",_.HOP="\x81",_.BPH="\x82",_.NBH="\x83",_.IND="\x84",_.NEL="\x85",_.SSA="\x86",_.ESA="\x87",_.HTS="\x88",_.HTJ="\x89",_.VTS="\x8A",_.PLD="\x8B",_.PLU="\x8C",_.RI="\x8D",_.SS2="\x8E",_.SS3="\x8F",_.DCS="\x90",_.PU1="\x91",_.PU2="\x92",_.STS="\x93",_.CCH="\x94",_.MW="\x95",_.SPA="\x96",_.EPA="\x97",_.SOS="\x98",_.SGCI="\x99",_.SCI="\x9A",_.CSI="\x9B",_.ST="\x9C",_.OSC="\x9D",_.PM="\x9E",_.APC="\x9F",(c.C1_ESCAPED||(c.C1_ESCAPED={})).ST=w.ESC+"\\"},7399:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;var _=w(2584),u={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};c.evaluateKeyboardEvent=function(f,d,m,v){var a={type:0,cancel:!1,key:void 0},s=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?a.key=d?_.C0.ESC+"OA":_.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?a.key=d?_.C0.ESC+"OD":_.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?a.key=d?_.C0.ESC+"OC":_.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(a.key=d?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:if(f.shiftKey){a.key=_.C0.BS;break}if(f.altKey){a.key=_.C0.ESC+_.C0.DEL;break}a.key=_.C0.DEL;break;case 9:if(f.shiftKey){a.key=_.C0.ESC+"[Z";break}a.key=_.C0.HT,a.cancel=!0;break;case 13:a.key=f.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,a.cancel=!0;break;case 27:a.key=_.C0.ESC,f.altKey&&(a.key=_.C0.ESC+_.C0.ESC),a.cancel=!0;break;case 37:if(f.metaKey)break;s?(a.key=_.C0.ESC+"[1;"+(s+1)+"D",a.key===_.C0.ESC+"[1;3D"&&(a.key=_.C0.ESC+(m?"b":"[1;5D"))):a.key=d?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(f.metaKey)break;s?(a.key=_.C0.ESC+"[1;"+(s+1)+"C",a.key===_.C0.ESC+"[1;3C"&&(a.key=_.C0.ESC+(m?"f":"[1;5C"))):a.key=d?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(f.metaKey)break;s?(a.key=_.C0.ESC+"[1;"+(s+1)+"A",m||a.key!==_.C0.ESC+"[1;3A"||(a.key=_.C0.ESC+"[1;5A")):a.key=d?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(f.metaKey)break;s?(a.key=_.C0.ESC+"[1;"+(s+1)+"B",m||a.key!==_.C0.ESC+"[1;3B"||(a.key=_.C0.ESC+"[1;5B")):a.key=d?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(a.key=_.C0.ESC+"[2~");break;case 46:a.key=s?_.C0.ESC+"[3;"+(s+1)+"~":_.C0.ESC+"[3~";break;case 36:a.key=s?_.C0.ESC+"[1;"+(s+1)+"H":d?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:a.key=s?_.C0.ESC+"[1;"+(s+1)+"F":d?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:f.shiftKey?a.type=2:f.ctrlKey?a.key=_.C0.ESC+"[5;"+(s+1)+"~":a.key=_.C0.ESC+"[5~";break;case 34:f.shiftKey?a.type=3:f.ctrlKey?a.key=_.C0.ESC+"[6;"+(s+1)+"~":a.key=_.C0.ESC+"[6~";break;case 112:a.key=s?_.C0.ESC+"[1;"+(s+1)+"P":_.C0.ESC+"OP";break;case 113:a.key=s?_.C0.ESC+"[1;"+(s+1)+"Q":_.C0.ESC+"OQ";break;case 114:a.key=s?_.C0.ESC+"[1;"+(s+1)+"R":_.C0.ESC+"OR";break;case 115:a.key=s?_.C0.ESC+"[1;"+(s+1)+"S":_.C0.ESC+"OS";break;case 116:a.key=s?_.C0.ESC+"[15;"+(s+1)+"~":_.C0.ESC+"[15~";break;case 117:a.key=s?_.C0.ESC+"[17;"+(s+1)+"~":_.C0.ESC+"[17~";break;case 118:a.key=s?_.C0.ESC+"[18;"+(s+1)+"~":_.C0.ESC+"[18~";break;case 119:a.key=s?_.C0.ESC+"[19;"+(s+1)+"~":_.C0.ESC+"[19~";break;case 120:a.key=s?_.C0.ESC+"[20;"+(s+1)+"~":_.C0.ESC+"[20~";break;case 121:a.key=s?_.C0.ESC+"[21;"+(s+1)+"~":_.C0.ESC+"[21~";break;case 122:a.key=s?_.C0.ESC+"[23;"+(s+1)+"~":_.C0.ESC+"[23~";break;case 123:a.key=s?_.C0.ESC+"[24;"+(s+1)+"~":_.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(m&&!v||!f.altKey||f.metaKey)!m||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?a.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(a.key=_.C0.US),f.key==="@"&&(a.key=_.C0.NUL)):f.keyCode===65&&(a.type=1);else{var p=u[f.keyCode],h=p?.[f.shiftKey?1:0];if(h)a.key=_.C0.ESC+h;else if(f.keyCode>=65&&f.keyCode<=90){var r=f.ctrlKey?f.keyCode-64:f.keyCode+32,e=String.fromCharCode(r);f.shiftKey&&(e=e.toUpperCase()),a.key=_.C0.ESC+e}else f.key==="Dead"&&f.code.startsWith("Key")&&(e=f.code.slice(3,4),f.shiftKey||(e=e.toLowerCase()),a.key=_.C0.ESC+e,a.cancel=!0)}else f.keyCode>=65&&f.keyCode<=90?a.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?a.key=_.C0.NUL:f.keyCode>=51&&f.keyCode<=55?a.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?a.key=_.C0.DEL:f.keyCode===219?a.key=_.C0.ESC:f.keyCode===220?a.key=_.C0.FS:f.keyCode===221&&(a.key=_.C0.GS)}return a}},482:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},c.utf32ToString=function(u,f,d){f===void 0&&(f=0),d===void 0&&(d=u.length);for(var m="",v=f;v<d;++v){var a=u[v];a>65535?(a-=65536,m+=String.fromCharCode(55296+(a>>10))+String.fromCharCode(a%1024+56320)):m+=String.fromCharCode(a)}return m};var w=function(){function u(){this._interim=0}return u.prototype.clear=function(){this._interim=0},u.prototype.decode=function(f,d){var m=f.length;if(!m)return 0;var v=0,a=0;this._interim&&(56320<=(h=f.charCodeAt(a++))&&h<=57343?d[v++]=1024*(this._interim-55296)+h-56320+65536:(d[v++]=this._interim,d[v++]=h),this._interim=0);for(var s=a;s<m;++s){var p=f.charCodeAt(s);if(55296<=p&&p<=56319){if(++s>=m)return this._interim=p,v;var h;56320<=(h=f.charCodeAt(s))&&h<=57343?d[v++]=1024*(p-55296)+h-56320+65536:(d[v++]=p,d[v++]=h)}else p!==65279&&(d[v++]=p)}return v},u}();c.StringToUtf32=w;var _=function(){function u(){this.interim=new Uint8Array(3)}return u.prototype.clear=function(){this.interim.fill(0)},u.prototype.decode=function(f,d){var m=f.length;if(!m)return 0;var v,a,s,p,h=0,r=0,e=0;if(this.interim[0]){var t=!1,i=this.interim[0];i&=(224&i)==192?31:(240&i)==224?15:7;for(var n=0,l=void 0;(l=63&this.interim[++n])&&n<4;)i<<=6,i|=l;for(var o=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=o-n;e<y;){if(e>=m)return 0;if((192&(l=f[e++]))!=128){e--,t=!0;break}this.interim[n++]=l,i<<=6,i|=63&l}t||(o===2?i<128?e--:d[h++]=i:o===3?i<2048||i>=55296&&i<=57343||i===65279||(d[h++]=i):i<65536||i>1114111||(d[h++]=i)),this.interim.fill(0)}for(var b=m-4,g=e;g<m;){for(;!(!(g<b)||128&(v=f[g])||128&(a=f[g+1])||128&(s=f[g+2])||128&(p=f[g+3]));)d[h++]=v,d[h++]=a,d[h++]=s,d[h++]=p,g+=4;if((v=f[g++])<128)d[h++]=v;else if((224&v)==192){if(g>=m)return this.interim[0]=v,h;if((192&(a=f[g++]))!=128){g--;continue}if((r=(31&v)<<6|63&a)<128){g--;continue}d[h++]=r}else if((240&v)==224){if(g>=m)return this.interim[0]=v,h;if((192&(a=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=a,h;if((192&(s=f[g++]))!=128){g--;continue}if((r=(15&v)<<12|(63&a)<<6|63&s)<2048||r>=55296&&r<=57343||r===65279)continue;d[h++]=r}else if((248&v)==240){if(g>=m)return this.interim[0]=v,h;if((192&(a=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=a,h;if((192&(s=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=a,this.interim[2]=s,h;if((192&(p=f[g++]))!=128){g--;continue}if((r=(7&v)<<18|(63&a)<<12|(63&s)<<6|63&p)<65536||r>1114111)continue;d[h++]=r}}return h},u}();c.Utf8ToUtf32=_},225:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;var _,u=w(8273),f=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],m=function(){function v(){if(this.version="6",!_){_=new Uint8Array(65536),(0,u.fill)(_,1),_[0]=0,(0,u.fill)(_,0,1,32),(0,u.fill)(_,0,127,160),(0,u.fill)(_,2,4352,4448),_[9001]=2,_[9002]=2,(0,u.fill)(_,2,11904,42192),_[12351]=1,(0,u.fill)(_,2,44032,55204),(0,u.fill)(_,2,63744,64256),(0,u.fill)(_,2,65040,65050),(0,u.fill)(_,2,65072,65136),(0,u.fill)(_,2,65280,65377),(0,u.fill)(_,2,65504,65511);for(var a=0;a<f.length;++a)(0,u.fill)(_,0,f[a][0],f[a][1]+1)}}return v.prototype.wcwidth=function(a){return a<32?0:a<127?1:a<65536?_[a]:function(s,p){var h,r=0,e=p.length-1;if(s<p[0][0]||s>p[e][1])return!1;for(;e>=r;)if(s>p[h=r+e>>1][1])r=h+1;else{if(!(s<p[h][0]))return!0;e=h-1}return!1}(a,d)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1},v}();c.UnicodeV6=m},5981:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;var _=w(8460),u=typeof queueMicrotask>"u"?function(d){Promise.resolve().then(d)}:queueMicrotask,f=function(){function d(m){this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new _.EventEmitter}return Object.defineProperty(d.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),d.prototype.writeSync=function(m,v){if(v!==void 0&&this._syncCalls>v)this._syncCalls=0;else if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var a;for(this._isSyncWriting=!0;a=this._writeBuffer.shift();){this._action(a);var s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},d.prototype.write=function(m,v){var a=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return a._innerWrite()})),this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(v)},d.prototype._innerWrite=function(m,v){var a=this;m===void 0&&(m=0),v===void 0&&(v=!0);for(var s=m||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],h=this._action(p,v);if(h)return void h.catch(function(e){return u(function(){throw e}),Promise.resolve(!1)}).then(function(e){return Date.now()-s>=12?setTimeout(function(){return a._innerWrite(0,e)}):a._innerWrite(s,e)});var r=this._callbacks[this._bufferOffset];if(r&&r(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-s>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return a._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},d}();c.WriteBuffer=f},5941:function(W,c){var w=this&&this.__read||function(d,m){var v=typeof Symbol=="function"&&d[Symbol.iterator];if(!v)return d;var a,s,p=v.call(d),h=[];try{for(;(m===void 0||m-- >0)&&!(a=p.next()).done;)h.push(a.value)}catch(r){s={error:r}}finally{try{a&&!a.done&&(v=p.return)&&v.call(p)}finally{if(s)throw s.error}}return h};Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;var _=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function f(d,m){var v=d.toString(16),a=v.length<2?"0"+v:v;switch(m){case 4:return v[0];case 8:return a;case 12:return(a+a).slice(0,3);default:return a+a}}c.parseColor=function(d){if(d){var m=d.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);var v=_.exec(m);if(v){var a=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/a*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/a*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/a*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),u.exec(m)&&[3,6,9,12].includes(m.length))){for(var s=m.length/3,p=[0,0,0],h=0;h<3;++h){var r=parseInt(m.slice(s*h,s*h+s),16);p[h]=s===1?r<<4:s===2?r:s===3?r>>4:r>>8}return p}}},c.toRgbString=function(d,m){m===void 0&&(m=16);var v=w(d,3),a=v[0],s=v[1],p=v[2];return"rgb:"+f(a,m)+"/"+f(s,m)+"/"+f(p,m)}},5770:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;var _=w(482),u=w(8742),f=w(5770),d=[],m=function(){function s(){this._handlers=Object.create(null),this._active=d,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return s.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=d},s.prototype.registerHandler=function(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);var r=this._handlers[p];return r.push(h),{dispose:function(){var e=r.indexOf(h);e!==-1&&r.splice(e,1)}}},s.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},s.prototype.setHandlerFallback=function(p){this._handlerFb=p},s.prototype.reset=function(){if(this._active.length)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=d,this._ident=0},s.prototype.hook=function(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||d,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(h);else this._handlerFb(this._ident,"HOOK",h)},s.prototype.put=function(p,h,r){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(p,h,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(p,h,r))},s.prototype.unhook=function(p,h){if(h===void 0&&(h=!0),this._active.length){var r=!1,e=this._active.length-1,t=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,r=h,t=this._stack.fallThrough,this._stack.paused=!1),!t&&r===!1){for(;e>=0&&(r=this._active[e].unhook(p))!==!0;e--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,r;e--}for(;e>=0;e--)if((r=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",p);this._active=d,this._ident=0},s}();c.DcsParser=m;var v=new u.Params;v.addParam(0);var a=function(){function s(p){this._handler=p,this._data="",this._params=v,this._hitLimit=!1}return s.prototype.hook=function(p){this._params=p.length>1||p.params[0]?p.clone():v,this._data="",this._hitLimit=!1},s.prototype.put=function(p,h,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,h,r),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},s.prototype.unhook=function(p){var h=this,r=!1;if(this._hitLimit)r=!1;else if(p&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then(function(e){return h._params=v,h._data="",h._hitLimit=!1,e});return this._params=v,this._data="",this._hitLimit=!1,r},s}();c.DcsHandler=a},2015:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;var f=w(844),d=w(8273),m=w(8742),v=w(6242),a=w(6351),s=function(){function r(e){this.table=new Uint8Array(e)}return r.prototype.setDefault=function(e,t){(0,d.fill)(this.table,e<<4|t)},r.prototype.add=function(e,t,i,n){this.table[t<<8|e]=i<<4|n},r.prototype.addMany=function(e,t,i,n){for(var l=0;l<e.length;l++)this.table[t<<8|e[l]]=i<<4|n},r}();c.TransitionTable=s;var p=160;c.VT500_TRANSITION_TABLE=function(){var r=new s(4095),e=Array.apply(null,Array(256)).map(function(y,b){return b}),t=function(y,b){return e.slice(y,b)},i=t(32,127),n=t(0,24);n.push(25),n.push.apply(n,t(28,32));var l,o=t(0,14);for(l in r.setDefault(1,0),r.addMany(i,0,2,0),o)r.addMany([24,26,153,154],l,3,0),r.addMany(t(128,144),l,3,0),r.addMany(t(144,152),l,3,0),r.add(156,l,0,0),r.add(27,l,11,1),r.add(157,l,4,8),r.addMany([152,158,159],l,0,7),r.add(155,l,11,3),r.add(144,l,11,9);return r.addMany(n,0,3,0),r.addMany(n,1,3,1),r.add(127,1,0,1),r.addMany(n,8,0,8),r.addMany(n,3,3,3),r.add(127,3,0,3),r.addMany(n,4,3,4),r.add(127,4,0,4),r.addMany(n,6,3,6),r.addMany(n,5,3,5),r.add(127,5,0,5),r.addMany(n,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(i,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(t(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(i,7,0,7),r.addMany(n,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(t(64,127),3,7,0),r.addMany(t(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(t(48,60),4,8,4),r.addMany(t(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(t(32,64),6,0,6),r.add(127,6,0,6),r.addMany(t(64,127),6,0,0),r.addMany(t(32,48),3,9,5),r.addMany(t(32,48),5,9,5),r.addMany(t(48,64),5,0,6),r.addMany(t(64,127),5,7,0),r.addMany(t(32,48),4,9,5),r.addMany(t(32,48),1,9,2),r.addMany(t(32,48),2,9,2),r.addMany(t(48,127),2,10,0),r.addMany(t(48,80),1,10,0),r.addMany(t(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(t(96,127),1,10,0),r.add(80,1,11,9),r.addMany(n,9,0,9),r.add(127,9,0,9),r.addMany(t(28,32),9,0,9),r.addMany(t(32,48),9,9,12),r.addMany(t(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(n,11,0,11),r.addMany(t(32,128),11,0,11),r.addMany(t(28,32),11,0,11),r.addMany(n,10,0,10),r.add(127,10,0,10),r.addMany(t(28,32),10,0,10),r.addMany(t(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(t(32,48),10,9,12),r.addMany(n,12,0,12),r.add(127,12,0,12),r.addMany(t(28,32),12,0,12),r.addMany(t(32,48),12,9,12),r.addMany(t(48,64),12,0,11),r.addMany(t(64,127),12,12,13),r.addMany(t(64,127),10,12,13),r.addMany(t(64,127),9,12,13),r.addMany(n,13,13,13),r.addMany(i,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(p,0,2,0),r.add(p,8,5,8),r.add(p,6,0,6),r.add(p,11,0,11),r.add(p,13,13,13),r}();var h=function(r){function e(t){t===void 0&&(t=c.VT500_TRANSITION_TABLE);var i=r.call(this)||this;return i._transitions=t,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new m.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(n,l,o){},i._executeHandlerFb=function(n){},i._csiHandlerFb=function(n,l){},i._escHandlerFb=function(n){},i._errorHandlerFb=function(n){return n},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new v.OscParser,i._dcsParser=new a.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},function(){return!0}),i}return u(e,r),e.prototype._identifier=function(t,i){i===void 0&&(i=[64,126]);var n=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var o=t.intermediates.charCodeAt(l);if(32>o||o>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=o}}if(t.final.length!==1)throw new Error("final must be a single byte");var y=t.final.charCodeAt(0);if(i[0]>y||y>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return(n<<=8)|y},e.prototype.identToString=function(t){for(var i=[];t;)i.push(String.fromCharCode(255&t)),t>>=8;return i.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(t){this._printHandler=t},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(t,i){var n=this._identifier(t,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);var l=this._escHandlers[n];return l.push(i),{dispose:function(){var o=l.indexOf(i);o!==-1&&l.splice(o,1)}}},e.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},e.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},e.prototype.setExecuteHandler=function(t,i){this._executeHandlers[t.charCodeAt(0)]=i},e.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},e.prototype.registerCsiHandler=function(t,i){var n=this._identifier(t);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);var l=this._csiHandlers[n];return l.push(i),{dispose:function(){var o=l.indexOf(i);o!==-1&&l.splice(o,1)}}},e.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},e.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},e.prototype.registerDcsHandler=function(t,i){return this._dcsParser.registerHandler(this._identifier(t),i)},e.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},e.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},e.prototype.registerOscHandler=function(t,i){return this._oscParser.registerHandler(t,i)},e.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},e.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},e.prototype.setErrorHandler=function(t){this._errorHandler=t},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(t,i,n,l,o){this._parseStack.state=t,this._parseStack.handlers=i,this._parseStack.handlerPos=n,this._parseStack.transition=l,this._parseStack.chunkPos=o},e.prototype.parse=function(t,i,n){var l,o=0,y=0,b=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,b=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var g=this._parseStack.handlers,S=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&S>-1){for(;S>=0&&(l=g[S](this._params))!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 4:if(n===!1&&S>-1){for(;S>=0&&(l=g[S]())!==!0;S--)if(l instanceof Promise)return this._parseStack.handlerPos=S,l}this._parseStack.handlers=[];break;case 6:if(o=t[this._parseStack.chunkPos],l=this._dcsParser.unhook(o!==24&&o!==26,n))return l;o===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(o=t[this._parseStack.chunkPos],l=this._oscParser.end(o!==24&&o!==26,n))return l;o===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,b=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var C=b;C<i;++C){switch(o=t[C],(y=this._transitions.table[this.currentState<<8|(o<160?o:p)])>>4){case 2:for(var k=C+1;;++k){if(k>=i||(o=t[k])<32||o>126&&o<p){this._printHandler(t,C,k),C=k-1;break}if(++k>=i||(o=t[k])<32||o>126&&o<p){this._printHandler(t,C,k),C=k-1;break}if(++k>=i||(o=t[k])<32||o>126&&o<p){this._printHandler(t,C,k),C=k-1;break}if(++k>=i||(o=t[k])<32||o>126&&o<p){this._printHandler(t,C,k),C=k-1;break}}break;case 3:this._executeHandlers[o]?this._executeHandlers[o]():this._executeHandlerFb(o),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:o,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var L=(g=this._csiHandlers[this._collect<<8|o])?g.length-1:-1;L>=0&&(l=g[L](this._params))!==!0;L--)if(l instanceof Promise)return this._preserveStack(3,g,L,y,C),l;L<0&&this._csiHandlerFb(this._collect<<8|o,this._params),this.precedingCodepoint=0;break;case 8:do switch(o){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(o-48)}while(++C<i&&(o=t[C])>47&&o<60);C--;break;case 9:this._collect<<=8,this._collect|=o;break;case 10:for(var R=this._escHandlers[this._collect<<8|o],x=R?R.length-1:-1;x>=0&&(l=R[x]())!==!0;x--)if(l instanceof Promise)return this._preserveStack(4,R,x,y,C),l;x<0&&this._escHandlerFb(this._collect<<8|o),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|o,this._params);break;case 13:for(var E=C+1;;++E)if(E>=i||(o=t[E])===24||o===26||o===27||o>127&&o<p){this._dcsParser.put(t,C,E),C=E-1;break}break;case 14:if(l=this._dcsParser.unhook(o!==24&&o!==26))return this._preserveStack(6,[],0,y,C),l;o===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var A=C+1;;A++)if(A>=i||(o=t[A])<32||o>127&&o<p){this._oscParser.put(t,C,A),C=A-1;break}break;case 6:if(l=this._oscParser.end(o!==24&&o!==26))return this._preserveStack(5,[],0,y,C),l;o===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&y}},e}(f.Disposable);c.EscapeSequenceParser=h},6242:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;var _=w(5770),u=w(482),f=[],d=function(){function v(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(a,s){this._handlers[a]===void 0&&(this._handlers[a]=[]);var p=this._handlers[a];return p.push(s),{dispose:function(){var h=p.indexOf(s);h!==-1&&p.splice(h,1)}}},v.prototype.clearHandler=function(a){this._handlers[a]&&delete this._handlers[a]},v.prototype.setHandlerFallback=function(a){this._handlerFb=a},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=f},v.prototype.reset=function(){if(this._state===2)for(var a=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;a>=0;--a)this._active[a].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||f,this._active.length)for(var a=this._active.length-1;a>=0;a--)this._active[a].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(a,s,p){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(a,s,p);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(a,s,p))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(a,s,p){if(this._state!==3){if(this._state===1)for(;s<p;){var h=a[s++];if(h===59){this._state=2,this._start();break}if(h<48||57<h)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+h-48}this._state===2&&p-s>0&&this._put(a,s,p)}},v.prototype.end=function(a,s){if(s===void 0&&(s=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var p=!1,h=this._active.length-1,r=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=s,r=this._stack.fallThrough,this._stack.paused=!1),!r&&p===!1){for(;h>=0&&(p=this._active[h].end(a))!==!0;h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if((p=this._active[h].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",a);this._active=f,this._id=-1,this._state=0}},v}();c.OscParser=d;var m=function(){function v(a){this._handler=a,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(a,s,p){this._hitLimit||(this._data+=(0,u.utf32ToString)(a,s,p),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(a){var s=this,p=!1;if(this._hitLimit)p=!1;else if(a&&(p=this._handler(this._data))instanceof Promise)return p.then(function(h){return s._data="",s._hitLimit=!1,h});return this._data="",this._hitLimit=!1,p},v}();c.OscHandler=m},8742:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;var w=2147483647,_=function(){function u(f,d){if(f===void 0&&(f=32),d===void 0&&(d=32),this.maxLength=f,this.maxSubParamsLength=d,d>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(d),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return u.fromArray=function(f){var d=new u;if(!f.length)return d;for(var m=Array.isArray(f[0])?1:0;m<f.length;++m){var v=f[m];if(Array.isArray(v))for(var a=0;a<v.length;++a)d.addSubParam(v[a]);else d.addParam(v)}return d},u.prototype.clone=function(){var f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f},u.prototype.toArray=function(){for(var f=[],d=0;d<this.length;++d){f.push(this.params[d]);var m=this._subParamsIdx[d]>>8,v=255&this._subParamsIdx[d];v-m>0&&f.push(Array.prototype.slice.call(this._subParams,m,v))}return f},u.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},u.prototype.addParam=function(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>w?w:f}},u.prototype.addSubParam=function(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>w?w:f,this._subParamsIdx[this.length-1]++}},u.prototype.hasSubParams=function(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0},u.prototype.getSubParams=function(f){var d=this._subParamsIdx[f]>>8,m=255&this._subParamsIdx[f];return m-d>0?this._subParams.subarray(d,m):null},u.prototype.getSubParamsAll=function(){for(var f={},d=0;d<this.length;++d){var m=this._subParamsIdx[d]>>8,v=255&this._subParamsIdx[d];v-m>0&&(f[d]=this._subParams.slice(m,v))}return f},u.prototype.addDigit=function(f){var d;if(!(this._rejectDigits||!(d=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var m=this._digitIsSub?this._subParams:this.params,v=m[d-1];m[d-1]=~v?Math.min(10*v+f,w):f}},u}();c.Params=_},5741:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0;var w=function(){function _(){this._addons=[]}return _.prototype.dispose=function(){for(var u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()},_.prototype.loadAddon=function(u,f){var d=this,m={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(m),f.dispose=function(){return d._wrappedAddonDispose(m)},f.activate(u)},_.prototype._wrappedAddonDispose=function(u){if(!u.isDisposed){for(var f=-1,d=0;d<this._addons.length;d++)if(this._addons[d]===u){f=d;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}},_}();c.AddonManager=w},8771:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;var _=w(3785),u=w(511),f=function(){function d(m,v){this._buffer=m,this.type=v}return d.prototype.init=function(m){return this._buffer=m,this},Object.defineProperty(d.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),d.prototype.getLine=function(m){var v=this._buffer.lines.get(m);if(v)return new _.BufferLineApiView(v)},d.prototype.getNullCell=function(){return new u.CellData},d}();c.BufferApiView=f},3785:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;var _=w(511),u=function(){function f(d){this._line=d}return Object.defineProperty(f.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),f.prototype.getCell=function(d,m){if(!(d<0||d>=this._line.length))return m?(this._line.loadCell(d,m),m):this._line.loadCell(d,new _.CellData)},f.prototype.translateToString=function(d,m,v){return this._line.translateToString(d,m,v)},f}();c.BufferLineApiView=u},8285:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;var _=w(8771),u=w(8460),f=function(){function d(m){var v=this;this._core=m,this._onBufferChange=new u.EventEmitter,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(d.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),d}();c.BufferNamespaceApi=f},7975:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0;var w=function(){function _(u){this._core=u}return _.prototype.registerCsiHandler=function(u,f){return this._core.registerCsiHandler(u,function(d){return f(d.toArray())})},_.prototype.addCsiHandler=function(u,f){return this.registerCsiHandler(u,f)},_.prototype.registerDcsHandler=function(u,f){return this._core.registerDcsHandler(u,function(d,m){return f(d,m.toArray())})},_.prototype.addDcsHandler=function(u,f){return this.registerDcsHandler(u,f)},_.prototype.registerEscHandler=function(u,f){return this._core.registerEscHandler(u,f)},_.prototype.addEscHandler=function(u,f){return this.registerEscHandler(u,f)},_.prototype.registerOscHandler=function(u,f){return this._core.registerOscHandler(u,f)},_.prototype.addOscHandler=function(u,f){return this.registerOscHandler(u,f)},_}();c.ParserApi=w},7090:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0;var w=function(){function _(u){this._core=u}return _.prototype.register=function(u){this._core.unicodeService.register(u)},Object.defineProperty(_.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(u){this._core.unicodeService.activeVersion=u},enumerable:!1,configurable:!0}),_}();c.UnicodeApi=w},744:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,r){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},_(h,r)},function(h,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=h}_(h,r),h.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}),f=this&&this.__decorate||function(h,r,e,t){var i,n=arguments.length,l=n<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,r,e,t);else for(var o=h.length-1;o>=0;o--)(i=h[o])&&(l=(n<3?i(l):n>3?i(r,e,l):i(r,e))||l);return n>3&&l&&Object.defineProperty(r,e,l),l},d=this&&this.__param||function(h,r){return function(e,t){r(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;var m=w(2585),v=w(5295),a=w(8460),s=w(844);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;var p=function(h){function r(e){var t=h.call(this)||this;return t._optionsService=e,t.isUserScrolling=!1,t._onResize=new a.EventEmitter,t._onScroll=new a.EventEmitter,t.cols=Math.max(e.rawOptions.cols||0,c.MINIMUM_COLS),t.rows=Math.max(e.rawOptions.rows||0,c.MINIMUM_ROWS),t.buffers=new v.BufferSet(e,t),t}return u(r,h),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){h.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){t===void 0&&(t=!1);var i,n=this.buffer;(i=this._cachedBlankLine)&&i.length===this.cols&&i.getFg(0)===e.fg&&i.getBg(0)===e.bg||(i=n.getBlankLine(e,t),this._cachedBlankLine=i),i.isWrapped=t;var l=n.ybase+n.scrollTop,o=n.ybase+n.scrollBottom;if(n.scrollTop===0){var y=n.lines.isFull;o===n.lines.length-1?y?n.lines.recycle().copyFrom(i):n.lines.push(i.clone()):n.lines.splice(o+1,0,i.clone()),y?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{var b=o-l+1;n.lines.shiftElements(l+1,b-1,-1),n.lines.set(o,i.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)},r.prototype.scrollLines=function(e,t,i){var n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);var l=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),l!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;t!==0&&this.scrollLines(t)},f([d(0,m.IOptionsService)],r)}(s.Disposable);c.BufferService=p},7994:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0;var w=function(){function _(){this.glevel=0,this._charsets=[]}return _.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},_.prototype.setgLevel=function(u){this.glevel=u,this.charset=this._charsets[u]},_.prototype.setgCharset=function(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)},_}();c.CharsetService=w},1753:function(W,c,w){var _=this&&this.__decorate||function(r,e,t,i){var n,l=arguments.length,o=l<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,e,t,i);else for(var y=r.length-1;y>=0;y--)(n=r[y])&&(o=(l<3?n(o):l>3?n(e,t,o):n(e,t))||o);return l>3&&o&&Object.defineProperty(e,t,o),o},u=this&&this.__param||function(r,e){return function(t,i){e(t,i,r)}},f=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;var d=w(2585),m=w(8460),v={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(r){return r.button!==4&&r.action===1&&(r.ctrl=!1,r.alt=!1,r.shift=!1,!0)}},VT200:{events:19,restrict:function(r){return r.action!==32}},DRAG:{events:23,restrict:function(r){return r.action!==32||r.button!==3}},ANY:{events:31,restrict:function(r){return!0}}};function a(r,e){var t=(r.ctrl?16:0)|(r.shift?4:0)|(r.alt?8:0);return r.button===4?(t|=64,t|=r.action):(t|=3&r.button,4&r.button&&(t|=64),8&r.button&&(t|=128),r.action===32?t|=32:r.action!==0||e||(t|=3)),t}var s=String.fromCharCode,p={DEFAULT:function(r){var e=[a(r,!1)+32,r.col+32,r.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1B[M"+s(e[0])+s(e[1])+s(e[2])},SGR:function(r){var e=r.action===0&&r.button!==4?"m":"M";return"\x1B[<"+a(r,!0)+";"+r.col+";"+r.row+e}},h=function(){function r(e,t){var i,n,l,o;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new m.EventEmitter,this._lastEvent=null;try{for(var y=f(Object.keys(v)),b=y.next();!b.done;b=y.next()){var g=b.value;this.addProtocol(g,v[g])}}catch(L){i={error:L}}finally{try{b&&!b.done&&(n=y.return)&&n.call(y)}finally{if(i)throw i.error}}try{for(var S=f(Object.keys(p)),C=S.next();!C.done;C=S.next()){var k=C.value;this.addEncoding(k,p[k])}}catch(L){l={error:L}}finally{try{C&&!C.done&&(o=S.return)&&o.call(S)}finally{if(l)throw l.error}}this.reset()}return r.prototype.addProtocol=function(e,t){this._protocols[e]=t},r.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(r.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(r.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),r.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,e))||!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},r.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},r.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},_([u(0,d.IBufferService),u(1,d.ICoreService)],r)}();c.CoreMouseService=h},6975:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}),f=this&&this.__decorate||function(e,t,i,n){var l,o=arguments.length,y=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,i,n);else for(var b=e.length-1;b>=0;b--)(l=e[b])&&(y=(o<3?l(y):o>3?l(t,i,y):l(t,i))||y);return o>3&&y&&Object.defineProperty(t,i,y),y},d=this&&this.__param||function(e,t){return function(i,n){t(i,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;var m=w(2585),v=w(8460),a=w(1439),s=w(844),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),r=function(e){function t(i,n,l,o){var y=e.call(this)||this;return y._bufferService=n,y._logService=l,y._optionsService=o,y.isCursorInitialized=!1,y.isCursorHidden=!1,y._onData=y.register(new v.EventEmitter),y._onUserInput=y.register(new v.EventEmitter),y._onBinary=y.register(new v.EventEmitter),y._scrollToBottom=i,y.register({dispose:function(){return y._scrollToBottom=void 0}}),y.modes=(0,a.clone)(p),y.decPrivateModes=(0,a.clone)(h),y}return u(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,a.clone)(p),this.decPrivateModes=(0,a.clone)(h)},t.prototype.triggerDataEvent=function(i,n){if(n===void 0&&(n=!1),!this._optionsService.rawOptions.disableStdin){var l=this._bufferService.buffer;l.ybase!==l.ydisp&&this._scrollToBottom(),n&&this._onUserInput.fire(),this._logService.debug('sending data "'+i+'"',function(){return i.split("").map(function(o){return o.charCodeAt(0)})}),this._onData.fire(i)}},t.prototype.triggerBinaryEvent=function(i){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+i+'"',function(){return i.split("").map(function(n){return n.charCodeAt(0)})}),this._onBinary.fire(i))},f([d(1,m.IBufferService),d(2,m.ILogService),d(3,m.IOptionsService)],t)}(s.Disposable);c.CoreService=r},9074:function(W,c,w){var _,u=this&&this.__extends||(_=function(r,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])},_(r,e)},function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}_(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__generator||function(r,e){var t,i,n,l,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function y(b){return function(g){return function(S){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,i&&(n=2&S[0]?i.return:S[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,S[1])).done)return n;switch(i=0,n&&(S=[2&S[0],n.value]),S[0]){case 0:case 1:n=S;break;case 4:return o.label++,{value:S[1],done:!1};case 5:o.label++,i=S[1],S=[0];continue;case 7:S=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||S[0]!==6&&S[0]!==2)){o=0;continue}if(S[0]===3&&(!n||S[1]>n[0]&&S[1]<n[3])){o.label=S[1];break}if(S[0]===6&&o.label<n[1]){o.label=n[1],n=S;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(S);break}n[2]&&o.ops.pop(),o.trys.pop();continue}S=e.call(r,o)}catch(C){S=[6,C],i=0}finally{t=n=0}if(5&S[0])throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}([b,g])}}},d=this&&this.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;var m=w(8055),v=w(8460),a=w(844),s=w(6106),p=function(r){function e(){var t=r.call(this)||this;return t._decorations=new s.SortedList(function(i){return i.marker.line}),t._onDecorationRegistered=t.register(new v.EventEmitter),t._onDecorationRemoved=t.register(new v.EventEmitter),t}return u(e,r),Object.defineProperty(e.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),e.prototype.registerDecoration=function(t){var i=this;if(!t.marker.isDisposed){var n=new h(t);if(n){var l=n.marker.onDispose(function(){return n.dispose()});n.onDispose(function(){n&&(i._decorations.delete(n)&&i._onDecorationRemoved.fire(n),l.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}},e.prototype.reset=function(){var t,i;try{for(var n=d(this._decorations.values()),l=n.next();!l.done;l=n.next())l.value.dispose()}catch(o){t={error:o}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this._decorations.clear()},e.prototype.getDecorationsAtLine=function(t){return f(this,function(i){return[2,this._decorations.getKeyIterator(t)]})},e.prototype.getDecorationsAtCell=function(t,i,n){var l,o,y,b,g,S,C,k,L,R,x;return f(this,function(E){switch(E.label){case 0:l=0,o=0,E.label=1;case 1:E.trys.push([1,6,7,8]),y=d(this._decorations.getKeyIterator(i)),b=y.next(),E.label=2;case 2:return b.done?[3,5]:(g=b.value,l=(L=g.options.x)!==null&&L!==void 0?L:0,o=l+((R=g.options.width)!==null&&R!==void 0?R:1),!(t>=l&&t<o)||n&&((x=g.options.layer)!==null&&x!==void 0?x:"bottom")!==n?[3,4]:[4,g]);case 3:E.sent(),E.label=4;case 4:return b=y.next(),[3,2];case 5:return[3,8];case 6:return S=E.sent(),C={error:S},[3,8];case 7:try{b&&!b.done&&(k=y.return)&&k.call(y)}finally{if(C)throw C.error}return[7];case 8:return[2]}})},e.prototype.dispose=function(){var t,i;try{for(var n=d(this._decorations.values()),l=n.next();!l.done;l=n.next()){var o=l.value;this._onDecorationRemoved.fire(o)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}this.reset()},e}(a.Disposable);c.DecorationService=p;var h=function(r){function e(t){var i=r.call(this)||this;return i.options=t,i.isDisposed=!1,i.onRenderEmitter=i.register(new v.EventEmitter),i.onRender=i.onRenderEmitter.event,i._onDispose=i.register(new v.EventEmitter),i.onDispose=i._onDispose.event,i._cachedBg=null,i._cachedFg=null,i.marker=t.marker,i.options.overviewRulerOptions&&!i.options.overviewRulerOptions.position&&(i.options.overviewRulerOptions.position="full"),i}return u(e,r),Object.defineProperty(e.prototype,"backgroundColorRGB",{get:function(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=m.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"foregroundColorRGB",{get:function(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=m.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),r.prototype.dispose.call(this))},e}(a.Disposable)},3730:function(W,c,w){var _=this&&this.__decorate||function(m,v,a,s){var p,h=arguments.length,r=h<3?v:s===null?s=Object.getOwnPropertyDescriptor(v,a):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(m,v,a,s);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(r=(h<3?p(r):h>3?p(v,a,r):p(v,a))||r);return h>3&&r&&Object.defineProperty(v,a,r),r},u=this&&this.__param||function(m,v){return function(a,s){v(a,s,m)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DirtyRowService=void 0;var f=w(2585),d=function(){function m(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(m.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),m.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},m.prototype.markDirty=function(v){v<this._start?this._start=v:v>this._end&&(this._end=v)},m.prototype.markRangeDirty=function(v,a){if(v>a){var s=v;v=a,a=s}v<this._start&&(this._start=v),a>this._end&&(this._end=a)},m.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},_([u(0,f.IBufferService)],m)}();c.DirtyRowService=d},4348:function(W,c,w){var _=this&&this.__values||function(s){var p=typeof Symbol=="function"&&Symbol.iterator,h=p&&s[p],r=0;if(h)return h.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&r>=s.length&&(s=void 0),{value:s&&s[r++],done:!s}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(s,p){var h=typeof Symbol=="function"&&s[Symbol.iterator];if(!h)return s;var r,e,t=h.call(s),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},f=this&&this.__spreadArray||function(s,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return s.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;var d=w(2585),m=w(8343),v=function(){function s(){for(var p,h,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];this._entries=new Map;try{for(var t=_(r),i=t.next();!i.done;i=t.next()){var n=u(i.value,2),l=n[0],o=n[1];this.set(l,o)}}catch(y){p={error:y}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(p)throw p.error}}}return s.prototype.set=function(p,h){var r=this._entries.get(p);return this._entries.set(p,h),r},s.prototype.forEach=function(p){this._entries.forEach(function(h,r){return p(r,h)})},s.prototype.has=function(p){return this._entries.has(p)},s.prototype.get=function(p){return this._entries.get(p)},s}();c.ServiceCollection=v;var a=function(){function s(){this._services=new v,this._services.set(d.IInstantiationService,this)}return s.prototype.setService=function(p,h){this._services.set(p,h)},s.prototype.getService=function(p){return this._services.get(p)},s.prototype.createInstance=function(p){for(var h,r,e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var i=(0,m.getServiceDependencies)(p).sort(function(S,C){return S.index-C.index}),n=[];try{for(var l=_(i),o=l.next();!o.done;o=l.next()){var y=o.value,b=this._services.get(y.id);if(!b)throw new Error("[createInstance] "+p.name+" depends on UNKNOWN service "+y.id+".");n.push(b)}}catch(S){h={error:S}}finally{try{o&&!o.done&&(r=l.return)&&r.call(l)}finally{if(h)throw h.error}}var g=i.length>0?i[0].index:e.length;if(e.length!==g)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(g+1)+" conflicts with "+e.length+" static arguments");return new(p.bind.apply(p,f([void 0],u(f(f([],u(e),!1),u(n),!1)),!1)))},s}();c.InstantiationService=a},7866:function(W,c,w){var _=this&&this.__decorate||function(s,p,h,r){var e,t=arguments.length,i=t<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,h):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(s,p,h,r);else for(var n=s.length-1;n>=0;n--)(e=s[n])&&(i=(t<3?e(i):t>3?e(p,h,i):e(p,h))||i);return t>3&&i&&Object.defineProperty(p,h,i),i},u=this&&this.__param||function(s,p){return function(h,r){p(h,r,s)}},f=this&&this.__read||function(s,p){var h=typeof Symbol=="function"&&s[Symbol.iterator];if(!h)return s;var r,e,t=h.call(s),i=[];try{for(;(p===void 0||p-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(n){e={error:n}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return i},d=this&&this.__spreadArray||function(s,p,h){if(h||arguments.length===2)for(var r,e=0,t=p.length;e<t;e++)!r&&e in p||(r||(r=Array.prototype.slice.call(p,0,e)),r[e]=p[e]);return s.concat(r||Array.prototype.slice.call(p))};Object.defineProperty(c,"__esModule",{value:!0}),c.LogService=void 0;var m=w(2585),v={debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF},a=function(){function s(p){var h=this;this._optionsService=p,this.logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(r){r==="logLevel"&&h._updateLogLevel()})}return s.prototype._updateLogLevel=function(){this.logLevel=v[this._optionsService.rawOptions.logLevel]},s.prototype._evalLazyOptionalParams=function(p){for(var h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())},s.prototype._log=function(p,h,r){this._evalLazyOptionalParams(r),p.call.apply(p,d([console,"xterm.js: "+h],f(r),!1))},s.prototype.debug=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.DEBUG&&this._log(console.log,p,h)},s.prototype.info=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.INFO&&this._log(console.info,p,h)},s.prototype.warn=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.WARN&&this._log(console.warn,p,h)},s.prototype.error=function(p){for(var h=[],r=1;r<arguments.length;r++)h[r-1]=arguments[r];this.logLevel<=m.LogLevelEnum.ERROR&&this._log(console.error,p,h)},_([u(0,m.IOptionsService)],s)}();c.LogService=a},7302:function(W,c,w){var _=this&&this.__assign||function(){return _=Object.assign||function(v){for(var a,s=1,p=arguments.length;s<p;s++)for(var h in a=arguments[s])Object.prototype.hasOwnProperty.call(a,h)&&(v[h]=a[h]);return v},_.apply(this,arguments)};Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=c.DEFAULT_BELL_SOUND=void 0;var u=w(8460),f=w(6114);c.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",c.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:c.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:f.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var d=["normal","bold","100","200","300","400","500","600","700","800","900"],m=function(){function v(a){this._onOptionChange=new u.EventEmitter;var s=_({},c.DEFAULT_OPTIONS);for(var p in a)if(p in s)try{var h=a[p];s[p]=this._sanitizeAndValidateOption(p,h)}catch(r){console.error(r)}this.rawOptions=s,this.options=_({},s),this._setupOptions()}return Object.defineProperty(v.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),v.prototype._setupOptions=function(){var a=this,s=function(e){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return a.rawOptions[e]},p=function(e,t){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');t=a._sanitizeAndValidateOption(e,t),a.rawOptions[e]!==t&&(a.rawOptions[e]=t,a._onOptionChange.fire(e))};for(var h in this.rawOptions){var r={get:s.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,r)}},v.prototype.setOption=function(a,s){this.options[a]=s},v.prototype._sanitizeAndValidateOption=function(a,s){switch(a){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":s||(s=c.DEFAULT_OPTIONS[a]);break;case"fontWeight":case"fontWeightBold":if(typeof s=="number"&&1<=s&&s<=1e3)break;s=d.includes(s)?s:c.DEFAULT_OPTIONS[a];break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(a+" cannot be less than 1, value: "+s);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(a+" cannot be less than 0, value: "+s);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(a+" cannot be less than or equal to 0, value: "+s);case"rows":case"cols":if(!s&&s!==0)throw new Error(a+" must be numeric, value: "+s)}return s},v.prototype.getOption=function(a){return this.options[a]},v}();c.OptionsService=m},8343:(W,c)=>{function w(_,u,f){u.di$target===u?u.di$dependencies.push({id:_,index:f}):(u.di$dependencies=[{id:_,index:f}],u.di$target=u)}Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0,c.serviceRegistry=new Map,c.getServiceDependencies=function(_){return _.di$dependencies||[]},c.createDecorator=function(_){if(c.serviceRegistry.has(_))return c.serviceRegistry.get(_);var u=function(f,d,m){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");w(u,f,m)};return u.toString=function(){return _},c.serviceRegistry.set(_,u),u}},2585:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.IDirtyRowService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;var _,u=w(8343);c.IBufferService=(0,u.createDecorator)("BufferService"),c.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),c.ICoreService=(0,u.createDecorator)("CoreService"),c.ICharsetService=(0,u.createDecorator)("CharsetService"),c.IDirtyRowService=(0,u.createDecorator)("DirtyRowService"),c.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(_=c.LogLevelEnum||(c.LogLevelEnum={}))[_.DEBUG=0]="DEBUG",_[_.INFO=1]="INFO",_[_.WARN=2]="WARN",_[_.ERROR=3]="ERROR",_[_.OFF=4]="OFF",c.ILogService=(0,u.createDecorator)("LogService"),c.IOptionsService=(0,u.createDecorator)("OptionsService"),c.IUnicodeService=(0,u.createDecorator)("UnicodeService"),c.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;var _=w(8460),u=w(225),f=function(){function d(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter;var m=new u.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}return Object.defineProperty(d.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"activeVersion",{get:function(){return this._active},set:function(m){if(!this._providers[m])throw new Error('unknown Unicode version "'+m+'"');this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)},enumerable:!1,configurable:!0}),d.prototype.register=function(m){this._providers[m.version]=m},d.prototype.wcwidth=function(m){return this._activeProvider.wcwidth(m)},d.prototype.getStringCellWidth=function(m){for(var v=0,a=m.length,s=0;s<a;++s){var p=m.charCodeAt(s);if(55296<=p&&p<=56319){if(++s>=a)return v+this.wcwidth(p);var h=m.charCodeAt(s);56320<=h&&h<=57343?p=1024*(p-55296)+h-56320+65536:v+=this.wcwidth(h)}v+=this.wcwidth(p)}return v},d}();c.UnicodeService=f}},ue={};return function W(c){var w=ue[c];if(w!==void 0)return w.exports;var _=ue[c]={exports:{}};return Ae[c].call(_.exports,_,_.exports,W),_.exports}(4389)})()})});var gr=pr((It,cr)=>{(function(Ae,ue){typeof It=="object"&&typeof cr=="object"?cr.exports=ue():typeof define=="function"&&define.amd?define([],ue):typeof It=="object"?It.FitAddon=ue():Ae.FitAddon=ue()})(self,function(){return(()=>{"use strict";var Ae={775:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FitAddon=void 0;var w=function(){function _(){}return _.prototype.activate=function(u){this._terminal=u},_.prototype.dispose=function(){},_.prototype.fit=function(){var u=this.proposeDimensions();if(u&&this._terminal){var f=this._terminal._core;this._terminal.rows===u.rows&&this._terminal.cols===u.cols||(f._renderService.clear(),this._terminal.resize(u.cols,u.rows))}},_.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var u=this._terminal._core;if(u._renderService.dimensions.actualCellWidth!==0&&u._renderService.dimensions.actualCellHeight!==0){var f=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(f.getPropertyValue("height")),m=Math.max(0,parseInt(f.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),a=d-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),s=m-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-u.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(s/u._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(a/u._renderService.dimensions.actualCellHeight))}}}},_}();c.FitAddon=w}},ue={};return function W(c){if(ue[c])return ue[c].exports;var w=ue[c]={exports:{}};return Ae[c](w,w.exports,W),w.exports}(775)})()})});export{yr as a,gr as b};
6
+ `)},enumerable:!1,configurable:!0}),S.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},S.prototype.refresh=function(g){var b=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return b._refresh()})),m.isLinux&&g&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},S.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},S.prototype._isClickInSelection=function(g){var b=this._getMouseBufferCoords(g),C=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!!(C&&R&&b)&&this._areCoordsInSelection(b,C,R)},S.prototype.isCellInSelection=function(g,b){var C=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!C||!R)&&this._areCoordsInSelection([g,b],C,R)},S.prototype._areCoordsInSelection=function(g,b,C){return g[1]>b[1]&&g[1]<C[1]||b[1]===C[1]&&g[1]===b[1]&&g[0]>=b[0]&&g[0]<C[0]||b[1]<C[1]&&g[1]===C[1]&&g[0]<C[0]||b[1]<C[1]&&g[1]===b[1]&&g[0]>=b[0]},S.prototype._selectWordAtCursor=function(g,b){var C,R,L=(R=(C=this._linkifier.currentLink)===null||C===void 0?void 0:C.link)===null||R===void 0?void 0:R.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,r.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var k=this._getMouseBufferCoords(g);return!!k&&(this._selectWordAt(k,b),this._model.selectionEnd=void 0,!0)},S.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},S.prototype.selectLines=function(g,b){this._model.clearSelection(),g=Math.max(g,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()},S.prototype._onTrim=function(g){this._model.onTrim(g)&&this.refresh()},S.prototype._getMouseBufferCoords=function(g){var b=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b},S.prototype._getMouseEventScrollAmount=function(g){var b=(0,i.getCoordsRelativeToElement)(window,g,this._screenElement)[1],C=this._renderService.dimensions.canvasHeight;return b>=0&&b<=C?0:(b>C&&(b-=C),b=Math.min(Math.max(b,-50),50),(b/=50)/Math.abs(b)+Math.round(14*b))},S.prototype.shouldForceSelection=function(g){return m.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey},S.prototype.onMouseDown=function(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._onIncrementalClick(g):g.detail===1?this._onSingleClick(g):g.detail===2?this._onDoubleClick(g):g.detail===3&&this._onTripleClick(g),this._addMouseDownListeners(),this.refresh(!0)}},S.prototype._addMouseDownListeners=function(){var g=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return g._dragScroll()},50)},S.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},S.prototype._onIncrementalClick=function(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))},S.prototype._onSingleClick=function(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),this._model.selectionStart){this._model.selectionEnd=void 0;var b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&b.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},S.prototype._onDoubleClick=function(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)},S.prototype._onTripleClick=function(g){var b=this._getMouseBufferCoords(g);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))},S.prototype.shouldColumnSelect=function(g){return g.altKey&&!(m.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},S.prototype._onMouseMove=function(g){if(g.stopImmediatePropagation(),this._model.selectionStart){var b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){var R=C.lines.get(this._model.selectionEnd[1]);R&&R.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},S.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}},S.prototype._onMouseUp=function(g){var b=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&g.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var C=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){var R=(0,e.moveToCellSequence)(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(R,!0)}}}else this._fireEventIfSelectionChanged()},S.prototype._fireEventIfSelectionChanged=function(){var g=this._model.finalSelectionStart,b=this._model.finalSelectionEnd,C=!(!g||!b||g[0]===b[0]&&g[1]===b[1]);C?g&&b&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&b[0]===this._oldSelectionEnd[0]&&b[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,b,C)):this._oldHasSelection&&this._fireOnSelectionChange(g,b,C)},S.prototype._fireOnSelectionChange=function(g,b,C){this._oldSelectionStart=g,this._oldSelectionEnd=b,this._oldHasSelection=C,this._onSelectionChange.fire()},S.prototype._onBufferActivate=function(g){var b=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(function(C){return b._onTrim(C)})},S.prototype._convertViewportColToCharacterIndex=function(g,b){for(var C=b[0],R=0;b[0]>=R;R++){var L=g.loadCell(R,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:L>1&&b[0]!==R&&(C+=L-1)}return C},S.prototype.setSelection=function(g,b,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,b],this._model.selectionStartLength=C,this.refresh(),this._fireEventIfSelectionChanged()},S.prototype.rightClickSelect=function(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},S.prototype._getWordAt=function(g,b,C,R){if(C===void 0&&(C=!0),R===void 0&&(R=!0),!(g[0]>=this._bufferService.cols)){var L=this._bufferService.buffer,k=L.lines.get(g[1]);if(k){var x=L.translateBufferLineToString(g[1],!1),E=this._convertViewportColToCharacterIndex(k,g),A=E,T=g[0]-E,U=0,q=0,j=0,z=0;if(x.charAt(E)===" "){for(;E>0&&x.charAt(E-1)===" ";)E--;for(;A<x.length&&x.charAt(A+1)===" ";)A++}else{var N=g[0],M=g[0];k.getWidth(N)===0&&(U++,N--),k.getWidth(M)===2&&(q++,M++);var Y=k.getString(M).length;for(Y>1&&(z+=Y-1,A+=Y-1);N>0&&E>0&&!this._isCharWordSeparator(k.loadCell(N-1,this._workCell));){k.loadCell(N-1,this._workCell);var Z=this._workCell.getChars().length;this._workCell.getWidth()===0?(U++,N--):Z>1&&(j+=Z-1,E-=Z-1),E--,N--}for(;M<k.length&&A+1<x.length&&!this._isCharWordSeparator(k.loadCell(M+1,this._workCell));){k.loadCell(M+1,this._workCell);var te=this._workCell.getChars().length;this._workCell.getWidth()===2?(q++,M++):te>1&&(z+=te-1,A+=te-1),A++,M++}}A++;var B=E+T-U+j,Q=Math.min(this._bufferService.cols,A-E+U+q-j-z);if(b||x.slice(E,A).trim()!==""){if(C&&B===0&&k.getCodePoint(0)!==32){var X=L.lines.get(g[1]-1);if(X&&k.isWrapped&&X.getCodePoint(this._bufferService.cols-1)!==32){var F=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(F){var O=this._bufferService.cols-F.start;B-=O,Q+=O}}}if(R&&B+Q===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var D=L.lines.get(g[1]+1);if(D?.isWrapped&&D.getCodePoint(0)!==32){var H=this._getWordAt([0,g[1]+1],!1,!1,!0);H&&(Q+=H.length)}}return{start:B,length:Q}}}}},S.prototype._selectWordAt=function(g,b){var C=this._getWordAt(g,b);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[C.start,g[1]],this._model.selectionStartLength=C.length}},S.prototype._selectToWordAt=function(g){var b=this._getWordAt(g,!0);if(b){for(var C=g[1];b.start<0;)b.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,C]}},S.prototype._isCharWordSeparator=function(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0},S.prototype._selectLineAt=function(g){var b=this._bufferService.buffer.getWrappedRangeForLine(g),C={start:{x:0,y:b.first},end:{x:this._bufferService.cols-1,y:b.last}};this._model.selectionStart=[0,b.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,r.getRangeLength)(C,this._bufferService.cols)},f([d(3,h.IBufferService),d(4,h.ICoreService),d(5,p.IMouseService),d(6,h.IOptionsService),d(7,p.IRenderService)],S)}(t.Disposable);c.SelectionService=a},4725:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ICharacterJoinerService=c.ISoundService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;var _=w(8343);c.ICharSizeService=(0,_.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),c.IMouseService=(0,_.createDecorator)("MouseService"),c.IRenderService=(0,_.createDecorator)("RenderService"),c.ISelectionService=(0,_.createDecorator)("SelectionService"),c.ISoundService=(0,_.createDecorator)("SoundService"),c.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService")},357:function(W,c,w){var _=this&&this.__decorate||function(m,v,o,s){var p,h=arguments.length,i=h<3?v:s===null?s=Object.getOwnPropertyDescriptor(v,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(m,v,o,s);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(i=(h<3?p(i):h>3?p(v,o,i):p(v,o))||i);return h>3&&i&&Object.defineProperty(v,o,i),i},u=this&&this.__param||function(m,v){return function(o,s){v(o,s,m)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SoundService=void 0;var f=w(2585),d=function(){function m(v){this._optionsService=v}return Object.defineProperty(m,"audioContext",{get:function(){if(!m._audioContext){var v=window.AudioContext||window.webkitAudioContext;if(!v)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;m._audioContext=new v}return m._audioContext},enumerable:!1,configurable:!0}),m.prototype.playBellSound=function(){var v=m.audioContext;if(v){var o=v.createBufferSource();v.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),function(s){o.buffer=s,o.connect(v.destination),o.start(0)})}},m.prototype._base64ToArrayBuffer=function(v){for(var o=window.atob(v),s=o.length,p=new Uint8Array(s),h=0;h<s;h++)p[h]=o.charCodeAt(h);return p.buffer},m.prototype._removeMimeType=function(v){return v.split(",")[1]},m=_([u(0,f.IOptionsService)],m)}();c.SoundService=d},6349:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;var _=w(8460),u=function(){function f(d){this._maxLength=d,this.onDeleteEmitter=new _.EventEmitter,this.onInsertEmitter=new _.EventEmitter,this.onTrimEmitter=new _.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(f.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"maxLength",{get:function(){return this._maxLength},set:function(d){if(this._maxLength!==d){for(var m=new Array(d),v=0;v<Math.min(d,this.length);v++)m[v]=this._array[this._getCyclicIndex(v)];this._array=m,this._maxLength=d,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._length},set:function(d){if(d>this._length)for(var m=this._length;m<d;m++)this._array[m]=void 0;this._length=d},enumerable:!1,configurable:!0}),f.prototype.get=function(d){return this._array[this._getCyclicIndex(d)]},f.prototype.set=function(d,m){this._array[this._getCyclicIndex(d)]=m},f.prototype.push=function(d){this._array[this._getCyclicIndex(this._length)]=d,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},f.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(f.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),f.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},f.prototype.splice=function(d,m){for(var v=[],o=2;o<arguments.length;o++)v[o-2]=arguments[o];if(m){for(var s=d;s<this._length-m;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+m)];this._length-=m,this.onDeleteEmitter.fire({index:d,amount:m})}for(s=this._length-1;s>=d;s--)this._array[this._getCyclicIndex(s+v.length)]=this._array[this._getCyclicIndex(s)];for(s=0;s<v.length;s++)this._array[this._getCyclicIndex(d+s)]=v[s];if(v.length&&this.onInsertEmitter.fire({index:d,amount:v.length}),this._length+v.length>this._maxLength){var p=this._length+v.length-this._maxLength;this._startIndex+=p,this._length=this._maxLength,this.onTrimEmitter.fire(p)}else this._length+=v.length},f.prototype.trimStart=function(d){d>this._length&&(d=this._length),this._startIndex+=d,this._length-=d,this.onTrimEmitter.fire(d)},f.prototype.shiftElements=function(d,m,v){if(!(m<=0)){if(d<0||d>=this._length)throw new Error("start argument out of range");if(d+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(var o=m-1;o>=0;o--)this.set(d+o+v,this.get(d+o));var s=d+m+v-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(o=0;o<m;o++)this.set(d+o+v,this.get(d+o))}},f.prototype._getCyclicIndex=function(d){return(this._startIndex+d)%this._maxLength},f}();c.CircularList=u},1439:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function w(_,u){if(u===void 0&&(u=5),typeof _!="object")return _;var f=Array.isArray(_)?[]:{};for(var d in _)f[d]=u<=1?_[d]:_[d]&&w(_[d],u-1);return f}},8055:function(W,c){var w,_,u,f,d=this&&this.__read||function(o,s){var p=typeof Symbol=="function"&&o[Symbol.iterator];if(!p)return o;var h,i,e=p.call(o),t=[];try{for(;(s===void 0||s-- >0)&&!(h=e.next()).done;)t.push(h.value)}catch(r){i={error:r}}finally{try{h&&!h.done&&(p=e.return)&&p.call(e)}finally{if(i)throw i.error}}return t};function m(o){var s=o.toString(16);return s.length<2?"0"+s:s}function v(o,s){return o<s?(s+.05)/(o+.05):(o+.05)/(s+.05)}Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=void 0,function(o){o.toCss=function(s,p,h,i){return i!==void 0?"#"+m(s)+m(p)+m(h)+m(i):"#"+m(s)+m(p)+m(h)},o.toRgba=function(s,p,h,i){return i===void 0&&(i=255),(s<<24|p<<16|h<<8|i)>>>0}}(w=c.channels||(c.channels={})),(_=c.color||(c.color={})).blend=function(o,s){var p=(255&s.rgba)/255;if(p===1)return{css:s.css,rgba:s.rgba};var h=s.rgba>>24&255,i=s.rgba>>16&255,e=s.rgba>>8&255,t=o.rgba>>24&255,r=o.rgba>>16&255,n=o.rgba>>8&255,l=t+Math.round((h-t)*p),a=r+Math.round((i-r)*p),y=n+Math.round((e-n)*p);return{css:w.toCss(l,a,y),rgba:w.toRgba(l,a,y)}},_.isOpaque=function(o){return(255&o.rgba)==255},_.ensureContrastRatio=function(o,s,p){var h=f.ensureContrastRatio(o.rgba,s.rgba,p);if(h)return f.toColor(h>>24&255,h>>16&255,h>>8&255)},_.opaque=function(o){var s=(255|o.rgba)>>>0,p=d(f.toChannels(s),3),h=p[0],i=p[1],e=p[2];return{css:w.toCss(h,i,e),rgba:s}},_.opacity=function(o,s){var p=Math.round(255*s),h=d(f.toChannels(o.rgba),3),i=h[0],e=h[1],t=h[2];return{css:w.toCss(i,e,t,p),rgba:w.toRgba(i,e,t,p)}},_.toColorRGB=function(o){return[o.rgba>>24&255,o.rgba>>16&255,o.rgba>>8&255]},(c.css||(c.css={})).toColor=function(o){if(o.match(/#[0-9a-f]{3,8}/i))switch(o.length){case 4:var s=parseInt(o.slice(1,2).repeat(2),16),p=parseInt(o.slice(2,3).repeat(2),16),h=parseInt(o.slice(3,4).repeat(2),16);return f.toColor(s,p,h);case 5:s=parseInt(o.slice(1,2).repeat(2),16),p=parseInt(o.slice(2,3).repeat(2),16),h=parseInt(o.slice(3,4).repeat(2),16);var i=parseInt(o.slice(4,5).repeat(2),16);return f.toColor(s,p,h,i);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}var e=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(e)return s=parseInt(e[1]),p=parseInt(e[2]),h=parseInt(e[3]),i=Math.round(255*(e[5]===void 0?1:parseFloat(e[5]))),f.toColor(s,p,h,i);throw new Error("css.toColor: Unsupported css format")},function(o){function s(p,h,i){var e=p/255,t=h/255,r=i/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}o.relativeLuminance=function(p){return s(p>>16&255,p>>8&255,255&p)},o.relativeLuminance2=s}(u=c.rgb||(c.rgb={})),function(o){function s(h,i,e){for(var t=h>>24&255,r=h>>16&255,n=h>>8&255,l=i>>24&255,a=i>>16&255,y=i>>8&255,S=v(u.relativeLuminance2(l,a,y),u.relativeLuminance2(t,r,n));S<e&&(l>0||a>0||y>0);)l-=Math.max(0,Math.ceil(.1*l)),a-=Math.max(0,Math.ceil(.1*a)),y-=Math.max(0,Math.ceil(.1*y)),S=v(u.relativeLuminance2(l,a,y),u.relativeLuminance2(t,r,n));return(l<<24|a<<16|y<<8|255)>>>0}function p(h,i,e){for(var t=h>>24&255,r=h>>16&255,n=h>>8&255,l=i>>24&255,a=i>>16&255,y=i>>8&255,S=v(u.relativeLuminance2(l,a,y),u.relativeLuminance2(t,r,n));S<e&&(l<255||a<255||y<255);)l=Math.min(255,l+Math.ceil(.1*(255-l))),a=Math.min(255,a+Math.ceil(.1*(255-a))),y=Math.min(255,y+Math.ceil(.1*(255-y))),S=v(u.relativeLuminance2(l,a,y),u.relativeLuminance2(t,r,n));return(l<<24|a<<16|y<<8|255)>>>0}o.ensureContrastRatio=function(h,i,e){var t=u.relativeLuminance(h>>8),r=u.relativeLuminance(i>>8);if(v(t,r)<e){if(r<t){var n=s(h,i,e),l=v(t,u.relativeLuminance(n>>8));if(l<e){var a=p(h,h,e);return l>v(t,u.relativeLuminance(a>>8))?n:a}return n}var y=p(h,i,e),S=v(t,u.relativeLuminance(y>>8));return S<e?(a=s(h,h,e),S>v(t,u.relativeLuminance(a>>8))?y:a):y}},o.reduceLuminance=s,o.increaseLuminance=p,o.toChannels=function(h){return[h>>24&255,h>>16&255,h>>8&255,255&h]},o.toColor=function(h,i,e,t){return{css:w.toCss(h,i,e,t),rgba:w.toRgba(h,i,e,t)}}}(f=c.rgba||(c.rgba={})),c.toPaddedHex=m,c.contrastRatio=v},8969:function(W,c,w){var _,u=this&&this.__extends||(_=function(b,C){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,L){R.__proto__=L}||function(R,L){for(var k in L)Object.prototype.hasOwnProperty.call(L,k)&&(R[k]=L[k])},_(b,C)},function(b,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function R(){this.constructor=b}_(b,C),b.prototype=C===null?Object.create(C):(R.prototype=C.prototype,new R)}),f=this&&this.__values||function(b){var C=typeof Symbol=="function"&&Symbol.iterator,R=C&&b[C],L=0;if(R)return R.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&L>=b.length&&(b=void 0),{value:b&&b[L++],done:!b}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;var d=w(844),m=w(2585),v=w(4348),o=w(7866),s=w(744),p=w(7302),h=w(6975),i=w(8460),e=w(1753),t=w(3730),r=w(1480),n=w(7994),l=w(9282),a=w(5435),y=w(5981),S=!1,g=function(b){function C(R){var L=b.call(this)||this;return L._onBinary=new i.EventEmitter,L._onData=new i.EventEmitter,L._onLineFeed=new i.EventEmitter,L._onResize=new i.EventEmitter,L._onScroll=new i.EventEmitter,L._onWriteParsed=new i.EventEmitter,L._instantiationService=new v.InstantiationService,L.optionsService=new p.OptionsService(R),L._instantiationService.setService(m.IOptionsService,L.optionsService),L._bufferService=L.register(L._instantiationService.createInstance(s.BufferService)),L._instantiationService.setService(m.IBufferService,L._bufferService),L._logService=L._instantiationService.createInstance(o.LogService),L._instantiationService.setService(m.ILogService,L._logService),L.coreService=L.register(L._instantiationService.createInstance(h.CoreService,function(){return L.scrollToBottom()})),L._instantiationService.setService(m.ICoreService,L.coreService),L.coreMouseService=L._instantiationService.createInstance(e.CoreMouseService),L._instantiationService.setService(m.ICoreMouseService,L.coreMouseService),L._dirtyRowService=L._instantiationService.createInstance(t.DirtyRowService),L._instantiationService.setService(m.IDirtyRowService,L._dirtyRowService),L.unicodeService=L._instantiationService.createInstance(r.UnicodeService),L._instantiationService.setService(m.IUnicodeService,L.unicodeService),L._charsetService=L._instantiationService.createInstance(n.CharsetService),L._instantiationService.setService(m.ICharsetService,L._charsetService),L._inputHandler=new a.InputHandler(L._bufferService,L._charsetService,L.coreService,L._dirtyRowService,L._logService,L.optionsService,L.coreMouseService,L.unicodeService),L.register((0,i.forwardEvent)(L._inputHandler.onLineFeed,L._onLineFeed)),L.register(L._inputHandler),L.register((0,i.forwardEvent)(L._bufferService.onResize,L._onResize)),L.register((0,i.forwardEvent)(L.coreService.onData,L._onData)),L.register((0,i.forwardEvent)(L.coreService.onBinary,L._onBinary)),L.register(L.optionsService.onOptionChange(function(k){return L._updateOptions(k)})),L.register(L._bufferService.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L.register(L._inputHandler.onScroll(function(k){L._onScroll.fire({position:L._bufferService.buffer.ydisp,source:0}),L._dirtyRowService.markRangeDirty(L._bufferService.buffer.scrollTop,L._bufferService.buffer.scrollBottom)})),L._writeBuffer=new y.WriteBuffer(function(k,x){return L._inputHandler.parse(k,x)}),L.register((0,i.forwardEvent)(L._writeBuffer.onWriteParsed,L._onWriteParsed)),L}return u(C,b),Object.defineProperty(C.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onScroll",{get:function(){var R=this;return this._onScrollApi||(this._onScrollApi=new i.EventEmitter,this.register(this._onScroll.event(function(L){var k;(k=R._onScrollApi)===null||k===void 0||k.fire(L.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"options",{get:function(){return this.optionsService.options},set:function(R){for(var L in R)this.optionsService.options[L]=R[L]},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){var R;this._isDisposed||(b.prototype.dispose.call(this),(R=this._windowsMode)===null||R===void 0||R.dispose(),this._windowsMode=void 0)},C.prototype.write=function(R,L){this._writeBuffer.write(R,L)},C.prototype.writeSync=function(R,L){this._logService.logLevel<=m.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(R,L)},C.prototype.resize=function(R,L){isNaN(R)||isNaN(L)||(R=Math.max(R,s.MINIMUM_COLS),L=Math.max(L,s.MINIMUM_ROWS),this._bufferService.resize(R,L))},C.prototype.scroll=function(R,L){L===void 0&&(L=!1),this._bufferService.scroll(R,L)},C.prototype.scrollLines=function(R,L,k){this._bufferService.scrollLines(R,L,k)},C.prototype.scrollPages=function(R){this._bufferService.scrollPages(R)},C.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},C.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},C.prototype.scrollToLine=function(R){this._bufferService.scrollToLine(R)},C.prototype.registerEscHandler=function(R,L){return this._inputHandler.registerEscHandler(R,L)},C.prototype.registerDcsHandler=function(R,L){return this._inputHandler.registerDcsHandler(R,L)},C.prototype.registerCsiHandler=function(R,L){return this._inputHandler.registerCsiHandler(R,L)},C.prototype.registerOscHandler=function(R,L){return this._inputHandler.registerOscHandler(R,L)},C.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},C.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},C.prototype._updateOptions=function(R){var L;switch(R){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():((L=this._windowsMode)===null||L===void 0||L.dispose(),this._windowsMode=void 0)}},C.prototype._enableWindowsMode=function(){var R=this;if(!this._windowsMode){var L=[];L.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),L.push(this.registerCsiHandler({final:"H"},function(){return(0,l.updateWindowsModeWrappedState)(R._bufferService),!1})),this._windowsMode={dispose:function(){var k,x;try{for(var E=f(L),A=E.next();!A.done;A=E.next())A.value.dispose()}catch(T){k={error:T}}finally{try{A&&!A.done&&(x=E.return)&&x.call(E)}finally{if(k)throw k.error}}}}}},C}(d.Disposable);c.CoreTerminal=g},8460:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.forwardEvent=c.EventEmitter=void 0;var w=function(){function _(){this._listeners=[],this._disposed=!1}return Object.defineProperty(_.prototype,"event",{get:function(){var u=this;return this._event||(this._event=function(f){return u._listeners.push(f),{dispose:function(){if(!u._disposed){for(var d=0;d<u._listeners.length;d++)if(u._listeners[d]===f)return void u._listeners.splice(d,1)}}}}),this._event},enumerable:!1,configurable:!0}),_.prototype.fire=function(u,f){for(var d=[],m=0;m<this._listeners.length;m++)d.push(this._listeners[m]);for(m=0;m<d.length;m++)d[m].call(void 0,u,f)},_.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},_}();c.EventEmitter=w,c.forwardEvent=function(_,u){return _(function(f){return u.fire(f)})}},5435:function(W,c,w){var _,u=this&&this.__extends||(_=function(L,k){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&(x[A]=E[A])},_(L,k)},function(L,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function x(){this.constructor=L}_(L,k),L.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)});Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;var f,d=w(2584),m=w(7116),v=w(2015),o=w(844),s=w(8273),p=w(482),h=w(8437),i=w(8460),e=w(643),t=w(511),r=w(3734),n=w(2585),l=w(6242),a=w(6351),y=w(5941),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2},g=131072;function b(L,k){if(L>24)return k.setWinLines||!1;switch(L){case 1:return!!k.restoreWin;case 2:return!!k.minimizeWin;case 3:return!!k.setWinPosition;case 4:return!!k.setWinSizePixels;case 5:return!!k.raiseWin;case 6:return!!k.lowerWin;case 7:return!!k.refreshWin;case 8:return!!k.setWinSizeChars;case 9:return!!k.maximizeWin;case 10:return!!k.fullscreenWin;case 11:return!!k.getWinState;case 13:return!!k.getWinPosition;case 14:return!!k.getWinSizePixels;case 15:return!!k.getScreenSizePixels;case 16:return!!k.getCellSizePixels;case 18:return!!k.getWinSizeChars;case 19:return!!k.getScreenSizeChars;case 20:return!!k.getIconTitle;case 21:return!!k.getWinTitle;case 22:return!!k.pushTitle;case 23:return!!k.popTitle;case 24:return!!k.setWinLines}return!1}(function(L){L[L.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",L[L.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(f=c.WindowsOptionsReportType||(c.WindowsOptionsReportType={}));var C=function(){function L(k,x,E,A){this._bufferService=k,this._coreService=x,this._logService=E,this._optionsService=A,this._data=new Uint32Array(0)}return L.prototype.hook=function(k){this._data=new Uint32Array(0)},L.prototype.put=function(k,x,E){this._data=(0,s.concat)(this._data,k.subarray(x,E))},L.prototype.unhook=function(k){if(!k)return this._data=new Uint32Array(0),!0;var x=(0,p.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),x){case'"q':this._coreService.triggerDataEvent(d.C0.ESC+'P1$r0"q'+d.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(d.C0.ESC+'P1$r61;1"p'+d.C0.ESC+"\\");break;case"r":var E=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(d.C0.ESC+"P1$r"+E+d.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(d.C0.ESC+"P1$r0m"+d.C0.ESC+"\\");break;case" q":var A={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];A-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(d.C0.ESC+"P1$r"+A+" q"+d.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",x),this._coreService.triggerDataEvent(d.C0.ESC+"P0$r"+d.C0.ESC+"\\")}return!0},L}(),R=function(L){function k(x,E,A,T,U,q,j,z,N){N===void 0&&(N=new v.EscapeSequenceParser);var M=L.call(this)||this;M._bufferService=x,M._charsetService=E,M._coreService=A,M._dirtyRowService=T,M._logService=U,M._optionsService=q,M._coreMouseService=j,M._unicodeService=z,M._parser=N,M._parseBuffer=new Uint32Array(4096),M._stringDecoder=new p.StringToUtf32,M._utf8Decoder=new p.Utf8ToUtf32,M._workCell=new t.CellData,M._windowTitle="",M._iconName="",M._windowTitleStack=[],M._iconNameStack=[],M._curAttrData=h.DEFAULT_ATTR_DATA.clone(),M._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),M._onRequestBell=new i.EventEmitter,M._onRequestRefreshRows=new i.EventEmitter,M._onRequestReset=new i.EventEmitter,M._onRequestSendFocus=new i.EventEmitter,M._onRequestSyncScrollBar=new i.EventEmitter,M._onRequestWindowsOptionsReport=new i.EventEmitter,M._onA11yChar=new i.EventEmitter,M._onA11yTab=new i.EventEmitter,M._onCursorMove=new i.EventEmitter,M._onLineFeed=new i.EventEmitter,M._onScroll=new i.EventEmitter,M._onTitleChange=new i.EventEmitter,M._onColor=new i.EventEmitter,M._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},M._specialColors=[256,257,258],M.register(M._parser),M._activeBuffer=M._bufferService.buffer,M.register(M._bufferService.buffers.onBufferActivate(function(B){return M._activeBuffer=B.activeBuffer})),M._parser.setCsiHandlerFallback(function(B,Q){M._logService.debug("Unknown CSI code: ",{identifier:M._parser.identToString(B),params:Q.toArray()})}),M._parser.setEscHandlerFallback(function(B){M._logService.debug("Unknown ESC code: ",{identifier:M._parser.identToString(B)})}),M._parser.setExecuteHandlerFallback(function(B){M._logService.debug("Unknown EXECUTE code: ",{code:B})}),M._parser.setOscHandlerFallback(function(B,Q,X){M._logService.debug("Unknown OSC code: ",{identifier:B,action:Q,data:X})}),M._parser.setDcsHandlerFallback(function(B,Q,X){Q==="HOOK"&&(X=X.toArray()),M._logService.debug("Unknown DCS code: ",{identifier:M._parser.identToString(B),action:Q,payload:X})}),M._parser.setPrintHandler(function(B,Q,X){return M.print(B,Q,X)}),M._parser.registerCsiHandler({final:"@"},function(B){return M.insertChars(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"@"},function(B){return M.scrollLeft(B)}),M._parser.registerCsiHandler({final:"A"},function(B){return M.cursorUp(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"A"},function(B){return M.scrollRight(B)}),M._parser.registerCsiHandler({final:"B"},function(B){return M.cursorDown(B)}),M._parser.registerCsiHandler({final:"C"},function(B){return M.cursorForward(B)}),M._parser.registerCsiHandler({final:"D"},function(B){return M.cursorBackward(B)}),M._parser.registerCsiHandler({final:"E"},function(B){return M.cursorNextLine(B)}),M._parser.registerCsiHandler({final:"F"},function(B){return M.cursorPrecedingLine(B)}),M._parser.registerCsiHandler({final:"G"},function(B){return M.cursorCharAbsolute(B)}),M._parser.registerCsiHandler({final:"H"},function(B){return M.cursorPosition(B)}),M._parser.registerCsiHandler({final:"I"},function(B){return M.cursorForwardTab(B)}),M._parser.registerCsiHandler({final:"J"},function(B){return M.eraseInDisplay(B)}),M._parser.registerCsiHandler({prefix:"?",final:"J"},function(B){return M.eraseInDisplay(B)}),M._parser.registerCsiHandler({final:"K"},function(B){return M.eraseInLine(B)}),M._parser.registerCsiHandler({prefix:"?",final:"K"},function(B){return M.eraseInLine(B)}),M._parser.registerCsiHandler({final:"L"},function(B){return M.insertLines(B)}),M._parser.registerCsiHandler({final:"M"},function(B){return M.deleteLines(B)}),M._parser.registerCsiHandler({final:"P"},function(B){return M.deleteChars(B)}),M._parser.registerCsiHandler({final:"S"},function(B){return M.scrollUp(B)}),M._parser.registerCsiHandler({final:"T"},function(B){return M.scrollDown(B)}),M._parser.registerCsiHandler({final:"X"},function(B){return M.eraseChars(B)}),M._parser.registerCsiHandler({final:"Z"},function(B){return M.cursorBackwardTab(B)}),M._parser.registerCsiHandler({final:"`"},function(B){return M.charPosAbsolute(B)}),M._parser.registerCsiHandler({final:"a"},function(B){return M.hPositionRelative(B)}),M._parser.registerCsiHandler({final:"b"},function(B){return M.repeatPrecedingCharacter(B)}),M._parser.registerCsiHandler({final:"c"},function(B){return M.sendDeviceAttributesPrimary(B)}),M._parser.registerCsiHandler({prefix:">",final:"c"},function(B){return M.sendDeviceAttributesSecondary(B)}),M._parser.registerCsiHandler({final:"d"},function(B){return M.linePosAbsolute(B)}),M._parser.registerCsiHandler({final:"e"},function(B){return M.vPositionRelative(B)}),M._parser.registerCsiHandler({final:"f"},function(B){return M.hVPosition(B)}),M._parser.registerCsiHandler({final:"g"},function(B){return M.tabClear(B)}),M._parser.registerCsiHandler({final:"h"},function(B){return M.setMode(B)}),M._parser.registerCsiHandler({prefix:"?",final:"h"},function(B){return M.setModePrivate(B)}),M._parser.registerCsiHandler({final:"l"},function(B){return M.resetMode(B)}),M._parser.registerCsiHandler({prefix:"?",final:"l"},function(B){return M.resetModePrivate(B)}),M._parser.registerCsiHandler({final:"m"},function(B){return M.charAttributes(B)}),M._parser.registerCsiHandler({final:"n"},function(B){return M.deviceStatus(B)}),M._parser.registerCsiHandler({prefix:"?",final:"n"},function(B){return M.deviceStatusPrivate(B)}),M._parser.registerCsiHandler({intermediates:"!",final:"p"},function(B){return M.softReset(B)}),M._parser.registerCsiHandler({intermediates:" ",final:"q"},function(B){return M.setCursorStyle(B)}),M._parser.registerCsiHandler({final:"r"},function(B){return M.setScrollRegion(B)}),M._parser.registerCsiHandler({final:"s"},function(B){return M.saveCursor(B)}),M._parser.registerCsiHandler({final:"t"},function(B){return M.windowOptions(B)}),M._parser.registerCsiHandler({final:"u"},function(B){return M.restoreCursor(B)}),M._parser.registerCsiHandler({intermediates:"'",final:"}"},function(B){return M.insertColumns(B)}),M._parser.registerCsiHandler({intermediates:"'",final:"~"},function(B){return M.deleteColumns(B)}),M._parser.setExecuteHandler(d.C0.BEL,function(){return M.bell()}),M._parser.setExecuteHandler(d.C0.LF,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.VT,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.FF,function(){return M.lineFeed()}),M._parser.setExecuteHandler(d.C0.CR,function(){return M.carriageReturn()}),M._parser.setExecuteHandler(d.C0.BS,function(){return M.backspace()}),M._parser.setExecuteHandler(d.C0.HT,function(){return M.tab()}),M._parser.setExecuteHandler(d.C0.SO,function(){return M.shiftOut()}),M._parser.setExecuteHandler(d.C0.SI,function(){return M.shiftIn()}),M._parser.setExecuteHandler(d.C1.IND,function(){return M.index()}),M._parser.setExecuteHandler(d.C1.NEL,function(){return M.nextLine()}),M._parser.setExecuteHandler(d.C1.HTS,function(){return M.tabSet()}),M._parser.registerOscHandler(0,new l.OscHandler(function(B){return M.setTitle(B),M.setIconName(B),!0})),M._parser.registerOscHandler(1,new l.OscHandler(function(B){return M.setIconName(B)})),M._parser.registerOscHandler(2,new l.OscHandler(function(B){return M.setTitle(B)})),M._parser.registerOscHandler(4,new l.OscHandler(function(B){return M.setOrReportIndexedColor(B)})),M._parser.registerOscHandler(10,new l.OscHandler(function(B){return M.setOrReportFgColor(B)})),M._parser.registerOscHandler(11,new l.OscHandler(function(B){return M.setOrReportBgColor(B)})),M._parser.registerOscHandler(12,new l.OscHandler(function(B){return M.setOrReportCursorColor(B)})),M._parser.registerOscHandler(104,new l.OscHandler(function(B){return M.restoreIndexedColor(B)})),M._parser.registerOscHandler(110,new l.OscHandler(function(B){return M.restoreFgColor(B)})),M._parser.registerOscHandler(111,new l.OscHandler(function(B){return M.restoreBgColor(B)})),M._parser.registerOscHandler(112,new l.OscHandler(function(B){return M.restoreCursorColor(B)})),M._parser.registerEscHandler({final:"7"},function(){return M.saveCursor()}),M._parser.registerEscHandler({final:"8"},function(){return M.restoreCursor()}),M._parser.registerEscHandler({final:"D"},function(){return M.index()}),M._parser.registerEscHandler({final:"E"},function(){return M.nextLine()}),M._parser.registerEscHandler({final:"H"},function(){return M.tabSet()}),M._parser.registerEscHandler({final:"M"},function(){return M.reverseIndex()}),M._parser.registerEscHandler({final:"="},function(){return M.keypadApplicationMode()}),M._parser.registerEscHandler({final:">"},function(){return M.keypadNumericMode()}),M._parser.registerEscHandler({final:"c"},function(){return M.fullReset()}),M._parser.registerEscHandler({final:"n"},function(){return M.setgLevel(2)}),M._parser.registerEscHandler({final:"o"},function(){return M.setgLevel(3)}),M._parser.registerEscHandler({final:"|"},function(){return M.setgLevel(3)}),M._parser.registerEscHandler({final:"}"},function(){return M.setgLevel(2)}),M._parser.registerEscHandler({final:"~"},function(){return M.setgLevel(1)}),M._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return M.selectDefaultCharset()}),M._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return M.selectDefaultCharset()});var Y=function(B){Z._parser.registerEscHandler({intermediates:"(",final:B},function(){return M.selectCharset("("+B)}),Z._parser.registerEscHandler({intermediates:")",final:B},function(){return M.selectCharset(")"+B)}),Z._parser.registerEscHandler({intermediates:"*",final:B},function(){return M.selectCharset("*"+B)}),Z._parser.registerEscHandler({intermediates:"+",final:B},function(){return M.selectCharset("+"+B)}),Z._parser.registerEscHandler({intermediates:"-",final:B},function(){return M.selectCharset("-"+B)}),Z._parser.registerEscHandler({intermediates:".",final:B},function(){return M.selectCharset("."+B)}),Z._parser.registerEscHandler({intermediates:"/",final:B},function(){return M.selectCharset("/"+B)})},Z=this;for(var te in m.CHARSETS)Y(te);return M._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return M.screenAlignmentPattern()}),M._parser.setErrorHandler(function(B){return M._logService.error("Parsing error: ",B),B}),M._parser.registerDcsHandler({intermediates:"$",final:"q"},new C(M._bufferService,M._coreService,M._logService,M._optionsService)),M}return u(k,L),Object.defineProperty(k.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){L.prototype.dispose.call(this)},k.prototype._preserveStack=function(x,E,A,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=x,this._parseStack.cursorStartY=E,this._parseStack.decodedLength=A,this._parseStack.position=T},k.prototype._logSlowResolvingAsync=function(x){this._logService.logLevel<=n.LogLevelEnum.WARN&&Promise.race([x,new Promise(function(E,A){return setTimeout(function(){return A("#SLOW_TIMEOUT")},5e3)})]).catch(function(E){if(E!=="#SLOW_TIMEOUT")throw E;console.warn("async parser handler taking longer than 5000 ms")})},k.prototype.parse=function(x,E){var A,T=this._activeBuffer.x,U=this._activeBuffer.y,q=0,j=this._parseStack.paused;if(j){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,E))return this._logSlowResolvingAsync(A),A;T=this._parseStack.cursorStartX,U=this._parseStack.cursorStartY,this._parseStack.paused=!1,x.length>g&&(q=this._parseStack.position+g)}if(this._logService.logLevel<=n.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof x=="string"?' "'+x+'"':' "'+Array.prototype.map.call(x,function(Y){return String.fromCharCode(Y)}).join("")+'"'),typeof x=="string"?x.split("").map(function(Y){return Y.charCodeAt(0)}):x),this._parseBuffer.length<x.length&&this._parseBuffer.length<g&&(this._parseBuffer=new Uint32Array(Math.min(x.length,g))),j||this._dirtyRowService.clearRange(),x.length>g)for(var z=q;z<x.length;z+=g){var N=z+g<x.length?z+g:x.length,M=typeof x=="string"?this._stringDecoder.decode(x.substring(z,N),this._parseBuffer):this._utf8Decoder.decode(x.subarray(z,N),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,M))return this._preserveStack(T,U,M,z),this._logSlowResolvingAsync(A),A}else if(!j&&(M=typeof x=="string"?this._stringDecoder.decode(x,this._parseBuffer):this._utf8Decoder.decode(x,this._parseBuffer),A=this._parser.parse(this._parseBuffer,M)))return this._preserveStack(T,U,M,0),this._logSlowResolvingAsync(A),A;this._activeBuffer.x===T&&this._activeBuffer.y===U||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},k.prototype.print=function(x,E,A){var T,U,q=this._charsetService.charset,j=this._optionsService.rawOptions.screenReaderMode,z=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,M=this._coreService.modes.insertMode,Y=this._curAttrData,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-E>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Y.fg,Y.bg,Y.extended);for(var te=E;te<A;++te){if(T=x[te],U=this._unicodeService.wcwidth(T),T<127&&q){var B=q[String.fromCharCode(T)];B&&(T=B.charCodeAt(0))}if(j&&this._onA11yChar.fire((0,p.stringFromCodePoint)(T)),U||!this._activeBuffer.x){if(this._activeBuffer.x+U-1>=z){if(N){for(;this._activeBuffer.x<z;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,1,Y.fg,Y.bg,Y.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=z-1,U===2)continue}if(M&&(Z.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(Y),Y),Z.getWidth(z-1)===2&&Z.setCellFromCodePoint(z-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,Y.fg,Y.bg,Y.extended)),Z.setCellFromCodePoint(this._activeBuffer.x++,T,U,Y.fg,Y.bg,Y.extended),U>0)for(;--U;)Z.setCellFromCodePoint(this._activeBuffer.x++,0,0,Y.fg,Y.bg,Y.extended)}else Z.getWidth(this._activeBuffer.x-1)?Z.addCodepointToCell(this._activeBuffer.x-1,T):Z.addCodepointToCell(this._activeBuffer.x-2,T)}A-E>0&&(Z.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<z&&A-E>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodePoint(this._activeBuffer.x,0,1,Y.fg,Y.bg,Y.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype.registerCsiHandler=function(x,E){var A=this;return x.final!=="t"||x.prefix||x.intermediates?this._parser.registerCsiHandler(x,E):this._parser.registerCsiHandler(x,function(T){return!b(T.params[0],A._optionsService.rawOptions.windowOptions)||E(T)})},k.prototype.registerDcsHandler=function(x,E){return this._parser.registerDcsHandler(x,new a.DcsHandler(E))},k.prototype.registerEscHandler=function(x,E){return this._parser.registerEscHandler(x,E)},k.prototype.registerOscHandler=function(x,E){return this._parser.registerOscHandler(x,new l.OscHandler(E))},k.prototype.bell=function(){return this._onRequestBell.fire(),!0},k.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},k.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},k.prototype.backspace=function(){var x;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(!((x=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||x===void 0)&&x.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);E.hasWidth(this._activeBuffer.x)&&!E.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},k.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var x=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-x),!0},k.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},k.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},k.prototype._restrictCursor=function(x){x===void 0&&(x=this._bufferService.cols-1),this._activeBuffer.x=Math.min(x,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._setCursor=function(x,E){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=x,this._activeBuffer.y=this._activeBuffer.scrollTop+E):(this._activeBuffer.x=x,this._activeBuffer.y=E),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},k.prototype._moveCursor=function(x,E){this._restrictCursor(),this._setCursor(this._activeBuffer.x+x,this._activeBuffer.y+E)},k.prototype.cursorUp=function(x){var E=this._activeBuffer.y-this._activeBuffer.scrollTop;return E>=0?this._moveCursor(0,-Math.min(E,x.params[0]||1)):this._moveCursor(0,-(x.params[0]||1)),!0},k.prototype.cursorDown=function(x){var E=this._activeBuffer.scrollBottom-this._activeBuffer.y;return E>=0?this._moveCursor(0,Math.min(E,x.params[0]||1)):this._moveCursor(0,x.params[0]||1),!0},k.prototype.cursorForward=function(x){return this._moveCursor(x.params[0]||1,0),!0},k.prototype.cursorBackward=function(x){return this._moveCursor(-(x.params[0]||1),0),!0},k.prototype.cursorNextLine=function(x){return this.cursorDown(x),this._activeBuffer.x=0,!0},k.prototype.cursorPrecedingLine=function(x){return this.cursorUp(x),this._activeBuffer.x=0,!0},k.prototype.cursorCharAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.cursorPosition=function(x){return this._setCursor(x.length>=2?(x.params[1]||1)-1:0,(x.params[0]||1)-1),!0},k.prototype.charPosAbsolute=function(x){return this._setCursor((x.params[0]||1)-1,this._activeBuffer.y),!0},k.prototype.hPositionRelative=function(x){return this._moveCursor(x.params[0]||1,0),!0},k.prototype.linePosAbsolute=function(x){return this._setCursor(this._activeBuffer.x,(x.params[0]||1)-1),!0},k.prototype.vPositionRelative=function(x){return this._moveCursor(0,x.params[0]||1),!0},k.prototype.hVPosition=function(x){return this.cursorPosition(x),!0},k.prototype.tabClear=function(x){var E=x.params[0];return E===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:E===3&&(this._activeBuffer.tabs={}),!0},k.prototype.cursorForwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var E=x.params[0]||1;E--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},k.prototype.cursorBackwardTab=function(x){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var E=x.params[0]||1;E--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},k.prototype._eraseInBufferLine=function(x,E,A,T){T===void 0&&(T=!1);var U=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);U.replaceCells(E,A,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T&&(U.isWrapped=!1)},k.prototype._resetBufferLine=function(x){var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);E.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+x),E.isWrapped=!1},k.prototype.eraseInDisplay=function(x){var E;switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:for(E=this._activeBuffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);E<this._bufferService.rows;E++)this._resetBufferLine(E);this._dirtyRowService.markDirty(E);break;case 1:for(E=this._activeBuffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(E+1).isWrapped=!1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 2:for(E=this._bufferService.rows,this._dirtyRowService.markDirty(E-1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 3:var A=this._activeBuffer.lines.length-this._bufferService.rows;A>0&&(this._activeBuffer.lines.trimStart(A),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-A,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-A,0),this._onScroll.fire(0))}return!0},k.prototype.eraseInLine=function(x){switch(this._restrictCursor(this._bufferService.cols),x.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},k.prototype.insertLines=function(x){this._restrictCursor();var E=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var A=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;E--;)this._activeBuffer.lines.splice(U-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.deleteLines=function(x){this._restrictCursor();var E=x.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var A,T=this._activeBuffer.ybase+this._activeBuffer.y;for(A=this._bufferService.rows-1-this._activeBuffer.scrollBottom,A=this._bufferService.rows-1+this._activeBuffer.ybase-A;E--;)this._activeBuffer.lines.splice(T,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},k.prototype.insertChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.insertCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.deleteChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.deleteCells(this._activeBuffer.x,x.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.scrollUp=function(x){for(var E=x.params[0]||1;E--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollDown=function(x){for(var E=x.params[0]||1;E--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(h.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollLeft=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.deleteCells(0,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.scrollRight=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.insertCells(0,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.insertColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.insertCells(this._activeBuffer.x,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.deleteColumns=function(x){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var E=x.params[0]||1,A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){var T=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);T.deleteCells(this._activeBuffer.x,E,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),T.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},k.prototype.eraseChars=function(x){this._restrictCursor();var E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return E&&(E.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(x.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},k.prototype.repeatPrecedingCharacter=function(x){if(!this._parser.precedingCodepoint)return!0;for(var E=x.params[0]||1,A=new Uint32Array(E),T=0;T<E;++T)A[T]=this._parser.precedingCodepoint;return this.print(A,0,A.length),!0},k.prototype.sendDeviceAttributesPrimary=function(x){return x.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0},k.prototype.sendDeviceAttributesSecondary=function(x){return x.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(x.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0},k.prototype._is=function(x){return(this._optionsService.rawOptions.termName+"").indexOf(x)===0},k.prototype.setMode=function(x){for(var E=0;E<x.length;E++)x.params[E]===4&&(this._coreService.modes.insertMode=!0);return!0},k.prototype.setModePrivate=function(x){for(var E=0;E<x.length;E++)switch(x.params[E]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},k.prototype.resetMode=function(x){for(var E=0;E<x.length;E++)x.params[E]===4&&(this._coreService.modes.insertMode=!1);return!0},k.prototype.resetModePrivate=function(x){for(var E=0;E<x.length;E++)switch(x.params[E]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),x.params[E]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},k.prototype._updateAttrColor=function(x,E,A,T,U){return E===2?(x|=50331648,x&=-16777216,x|=r.AttributeData.fromColorRGB([A,T,U])):E===5&&(x&=-50331904,x|=33554432|255&A),x},k.prototype._extractColor=function(x,E,A){var T=[0,0,-1,0,0,0],U=0,q=0;do{if(T[q+U]=x.params[E+q],x.hasSubParams(E+q)){var j=x.getSubParams(E+q),z=0;do T[1]===5&&(U=1),T[q+z+1+U]=j[z];while(++z<j.length&&z+q+1+U<T.length);break}if(T[1]===5&&q+U>=2||T[1]===2&&q+U>=5)break;T[1]&&(U=1)}while(++q+E<x.length&&q+U<T.length);for(z=2;z<T.length;++z)T[z]===-1&&(T[z]=0);switch(T[0]){case 38:A.fg=this._updateAttrColor(A.fg,T[1],T[3],T[4],T[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,T[1],T[3],T[4],T[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,T[1],T[3],T[4],T[5])}return q},k.prototype._processUnderline=function(x,E){E.extended=E.extended.clone(),(!~x||x>5)&&(x=1),E.extended.underlineStyle=x,E.fg|=268435456,x===0&&(E.fg&=-268435457),E.updateExtended()},k.prototype.charAttributes=function(x){if(x.length===1&&x.params[0]===0)return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg,!0;for(var E,A=x.length,T=this._curAttrData,U=0;U<A;U++)(E=x.params[U])>=30&&E<=37?(T.fg&=-50331904,T.fg|=16777216|E-30):E>=40&&E<=47?(T.bg&=-50331904,T.bg|=16777216|E-40):E>=90&&E<=97?(T.fg&=-50331904,T.fg|=16777224|E-90):E>=100&&E<=107?(T.bg&=-50331904,T.bg|=16777224|E-100):E===0?(T.fg=h.DEFAULT_ATTR_DATA.fg,T.bg=h.DEFAULT_ATTR_DATA.bg):E===1?T.fg|=134217728:E===3?T.bg|=67108864:E===4?(T.fg|=268435456,this._processUnderline(x.hasSubParams(U)?x.getSubParams(U)[0]:1,T)):E===5?T.fg|=536870912:E===7?T.fg|=67108864:E===8?T.fg|=1073741824:E===9?T.fg|=2147483648:E===2?T.bg|=134217728:E===21?this._processUnderline(2,T):E===22?(T.fg&=-134217729,T.bg&=-134217729):E===23?T.bg&=-67108865:E===24?T.fg&=-268435457:E===25?T.fg&=-536870913:E===27?T.fg&=-67108865:E===28?T.fg&=-1073741825:E===29?T.fg&=2147483647:E===39?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):E===49?(T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):E===38||E===48||E===58?U+=this._extractColor(x,U,T):E===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):E===100?(T.fg&=-67108864,T.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",E);return!0},k.prototype.deviceStatus=function(x){switch(x.params[0]){case 5:this._coreService.triggerDataEvent(d.C0.ESC+"[0n");break;case 6:var E=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(d.C0.ESC+"["+E+";"+A+"R")}return!0},k.prototype.deviceStatusPrivate=function(x){if(x.params[0]===6){var E=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(d.C0.ESC+"[?"+E+";"+A+"R")}return!0},k.prototype.softReset=function(x){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},k.prototype.setCursorStyle=function(x){var E=x.params[0]||1;switch(E){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var A=E%2==1;return this._optionsService.options.cursorBlink=A,!0},k.prototype.setScrollRegion=function(x){var E,A=x.params[0]||1;return(x.length<2||(E=x.params[1])>this._bufferService.rows||E===0)&&(E=this._bufferService.rows),E>A&&(this._activeBuffer.scrollTop=A-1,this._activeBuffer.scrollBottom=E-1,this._setCursor(0,0)),!0},k.prototype.windowOptions=function(x){if(!b(x.params[0],this._optionsService.rawOptions.windowOptions))return!0;var E=x.length>1?x.params[1]:0;switch(x.params[0]){case 14:E!==2&&this._onRequestWindowsOptionsReport.fire(f.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(f.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(d.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:E!==0&&E!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),E!==0&&E!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:E!==0&&E!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),E!==0&&E!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},k.prototype.saveCursor=function(x){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},k.prototype.restoreCursor=function(x){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},k.prototype.setTitle=function(x){return this._windowTitle=x,this._onTitleChange.fire(x),!0},k.prototype.setIconName=function(x){return this._iconName=x,!0},k.prototype.setOrReportIndexedColor=function(x){for(var E=[],A=x.split(";");A.length>1;){var T=A.shift(),U=A.shift();if(/^\d+$/.exec(T)){var q=parseInt(T);if(0<=q&&q<256)if(U==="?")E.push({type:0,index:q});else{var j=(0,y.parseColor)(U);j&&E.push({type:1,index:q,color:j})}}}return E.length&&this._onColor.fire(E),!0},k.prototype._setOrReportSpecialColor=function(x,E){for(var A=x.split(";"),T=0;T<A.length&&!(E>=this._specialColors.length);++T,++E)if(A[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[E]}]);else{var U=(0,y.parseColor)(A[T]);U&&this._onColor.fire([{type:1,index:this._specialColors[E],color:U}])}return!0},k.prototype.setOrReportFgColor=function(x){return this._setOrReportSpecialColor(x,0)},k.prototype.setOrReportBgColor=function(x){return this._setOrReportSpecialColor(x,1)},k.prototype.setOrReportCursorColor=function(x){return this._setOrReportSpecialColor(x,2)},k.prototype.restoreIndexedColor=function(x){if(!x)return this._onColor.fire([{type:2}]),!0;for(var E=[],A=x.split(";"),T=0;T<A.length;++T)if(/^\d+$/.exec(A[T])){var U=parseInt(A[T]);0<=U&&U<256&&E.push({type:2,index:U})}return E.length&&this._onColor.fire(E),!0},k.prototype.restoreFgColor=function(x){return this._onColor.fire([{type:2,index:256}]),!0},k.prototype.restoreBgColor=function(x){return this._onColor.fire([{type:2,index:257}]),!0},k.prototype.restoreCursorColor=function(x){return this._onColor.fire([{type:2,index:258}]),!0},k.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},k.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},k.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},k.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0},k.prototype.selectCharset=function(x){return x.length!==2?(this.selectDefaultCharset(),!0):(x[0]==="/"||this._charsetService.setgCharset(S[x[0]],m.CHARSETS[x[1]]||m.DEFAULT_CHARSET),!0)},k.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},k.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},k.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var x=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,x,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},k.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},k.prototype.reset=function(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()},k.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},k.prototype.setgLevel=function(x){return this._charsetService.setgLevel(x),!0},k.prototype.screenAlignmentPattern=function(){var x=new t.CellData;x.content=1<<22|69,x.fg=this._curAttrData.fg,x.bg=this._curAttrData.bg,this._setCursor(0,0);for(var E=0;E<this._bufferService.rows;++E){var A=this._activeBuffer.ybase+this._activeBuffer.y+E,T=this._activeBuffer.lines.get(A);T&&(T.fill(x),T.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},k}(o.Disposable);c.InputHandler=R},844:function(W,c){var w=this&&this.__values||function(f){var d=typeof Symbol=="function"&&Symbol.iterator,m=d&&f[d],v=0;if(m)return m.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&v>=f.length&&(f=void 0),{value:f&&f[v++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.Disposable=void 0;var _=function(){function f(){this._disposables=[],this._isDisposed=!1}return f.prototype.dispose=function(){var d,m;this._isDisposed=!0;try{for(var v=w(this._disposables),o=v.next();!o.done;o=v.next())o.value.dispose()}catch(s){d={error:s}}finally{try{o&&!o.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}this._disposables.length=0},f.prototype.register=function(d){return this._disposables.push(d),d},f.prototype.unregister=function(d){var m=this._disposables.indexOf(d);m!==-1&&this._disposables.splice(m,1)},f}();function u(f){var d,m;try{for(var v=w(f),o=v.next();!o.done;o=v.next())o.value.dispose()}catch(s){d={error:s}}finally{try{o&&!o.done&&(m=v.return)&&m.call(v)}finally{if(d)throw d.error}}f.length=0}c.Disposable=_,c.disposeArray=u,c.getDisposeArrayDisposable=function(f){return{dispose:function(){return u(f)}}}},6114:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.isSafari=c.isLegacyEdge=c.isFirefox=void 0;var w=typeof navigator>"u",_=w?"node":navigator.userAgent,u=w?"node":navigator.platform;c.isFirefox=_.includes("Firefox"),c.isLegacyEdge=_.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(_),c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),c.isIpad=u==="iPad",c.isIphone=u==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),c.isLinux=u.indexOf("Linux")>=0},6106:function(W,c){var w=this&&this.__generator||function(u,f){var d,m,v,o,s={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return o={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function p(h){return function(i){return function(e){if(d)throw new TypeError("Generator is already executing.");for(;s;)try{if(d=1,m&&(v=2&e[0]?m.return:e[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,e[1])).done)return v;switch(m=0,v&&(e=[2&e[0],v.value]),e[0]){case 0:case 1:v=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,m=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!((v=(v=s.trys).length>0&&v[v.length-1])||e[0]!==6&&e[0]!==2)){s=0;continue}if(e[0]===3&&(!v||e[1]>v[0]&&e[1]<v[3])){s.label=e[1];break}if(e[0]===6&&s.label<v[1]){s.label=v[1],v=e;break}if(v&&s.label<v[2]){s.label=v[2],s.ops.push(e);break}v[2]&&s.ops.pop(),s.trys.pop();continue}e=f.call(u,s)}catch(t){e=[6,t],m=0}finally{d=v=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([h,i])}}};Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;var _=function(){function u(f){this._getKey=f,this._array=[]}return u.prototype.clear=function(){this._array.length=0},u.prototype.insert=function(f){if(this._array.length!==0){var d=this._search(this._getKey(f),0,this._array.length-1);this._array.splice(d,0,f)}else this._array.push(f)},u.prototype.delete=function(f){if(this._array.length===0)return!1;var d=this._getKey(f),m=this._search(d,0,this._array.length-1);if(this._getKey(this._array[m])!==d)return!1;do if(this._array[m]===f)return this._array.splice(m,1),!0;while(++m<this._array.length&&this._getKey(this._array[m])===d);return!1},u.prototype.getKeyIterator=function(f){var d;return w(this,function(m){switch(m.label){case 0:if(this._array.length===0)return[2];if((d=this._search(f,0,this._array.length-1))<0||d>=this._array.length)return[2];if(this._getKey(this._array[d])!==f)return[2];m.label=1;case 1:return[4,this._array[d]];case 2:m.sent(),m.label=3;case 3:if(++d<this._array.length&&this._getKey(this._array[d])===f)return[3,1];m.label=4;case 4:return[2]}})},u.prototype.values=function(){return this._array.values()},u.prototype._search=function(f,d,m){if(m<d)return d;var v=Math.floor((d+m)/2);if(this._getKey(this._array[v])>f)return this._search(f,d,v-1);if(this._getKey(this._array[v])<f)return this._search(f,v+1,m);for(;v>0&&this._getKey(this._array[v-1])===f;)v--;return v},u}();c.SortedList=_},8273:(W,c)=>{function w(_,u,f,d){if(f===void 0&&(f=0),d===void 0&&(d=_.length),f>=_.length)return _;f=(_.length+f)%_.length,d=d>=_.length?_.length:(_.length+d)%_.length;for(var m=f;m<d;++m)_[m]=u;return _}Object.defineProperty(c,"__esModule",{value:!0}),c.concat=c.fillFallback=c.fill=void 0,c.fill=function(_,u,f,d){return _.fill?_.fill(u,f,d):w(_,u,f,d)},c.fillFallback=w,c.concat=function(_,u){var f=new _.constructor(_.length+u.length);return f.set(_),f.set(u,_.length),f}},9282:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;var _=w(643);c.updateWindowsModeWrappedState=function(u){var f=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),d=f?.get(u.cols-1),m=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);m&&d&&(m.isWrapped=d[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&d[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;var w=function(){function u(){this.fg=0,this.bg=0,this.extended=new _}return u.toColorRGB=function(f){return[f>>>16&255,f>>>8&255,255&f]},u.fromColorRGB=function(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]},u.prototype.clone=function(){var f=new u;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f},u.prototype.isInverse=function(){return 67108864&this.fg},u.prototype.isBold=function(){return 134217728&this.fg},u.prototype.isUnderline=function(){return 268435456&this.fg},u.prototype.isBlink=function(){return 536870912&this.fg},u.prototype.isInvisible=function(){return 1073741824&this.fg},u.prototype.isItalic=function(){return 67108864&this.bg},u.prototype.isDim=function(){return 134217728&this.bg},u.prototype.isStrikethrough=function(){return 2147483648&this.fg},u.prototype.getFgColorMode=function(){return 50331648&this.fg},u.prototype.getBgColorMode=function(){return 50331648&this.bg},u.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},u.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},u.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},u.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},u.prototype.isFgDefault=function(){return(50331648&this.fg)==0},u.prototype.isBgDefault=function(){return(50331648&this.bg)==0},u.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},u.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},u.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},u.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},u.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},u.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},u.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},u.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},u.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},u.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},u.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},u}();c.AttributeData=w;var _=function(){function u(f,d){f===void 0&&(f=0),d===void 0&&(d=-1),this.underlineStyle=f,this.underlineColor=d}return u.prototype.clone=function(){return new u(this.underlineStyle,this.underlineColor)},u.prototype.isEmpty=function(){return this.underlineStyle===0},u}();c.ExtendedAttrs=_},9092:function(W,c,w){var _=this&&this.__read||function(t,r){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var l,a,y=n.call(t),S=[];try{for(;(r===void 0||r-- >0)&&!(l=y.next()).done;)S.push(l.value)}catch(g){a={error:g}}finally{try{l&&!l.done&&(n=y.return)&&n.call(y)}finally{if(a)throw a.error}}return S},u=this&&this.__spreadArray||function(t,r,n){if(n||arguments.length===2)for(var l,a=0,y=r.length;a<y;a++)!l&&a in r||(l||(l=Array.prototype.slice.call(r,0,a)),l[a]=r[a]);return t.concat(l||Array.prototype.slice.call(r))};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferStringIterator=c.Buffer=c.MAX_BUFFER_SIZE=void 0;var f=w(6349),d=w(8437),m=w(511),v=w(643),o=w(4634),s=w(4863),p=w(7116),h=w(3734);c.MAX_BUFFER_SIZE=4294967295;var i=function(){function t(r,n,l){this._hasScrollback=r,this._optionsService=n,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=d.DEFAULT_ATTR_DATA.clone(),this.savedCharset=p.DEFAULT_CHARSET,this.markers=[],this._nullCell=m.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=m.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return t.prototype.getNullCell=function(r){return r?(this._nullCell.fg=r.fg,this._nullCell.bg=r.bg,this._nullCell.extended=r.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell},t.prototype.getWhitespaceCell=function(r){return r?(this._whitespaceCell.fg=r.fg,this._whitespaceCell.bg=r.bg,this._whitespaceCell.extended=r.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell},t.prototype.getBlankLine=function(r,n){return new d.BufferLine(this._bufferService.cols,this.getNullCell(r),n)},Object.defineProperty(t.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCursorInViewport",{get:function(){var r=this.ybase+this.y-this.ydisp;return r>=0&&r<this._rows},enumerable:!1,configurable:!0}),t.prototype._getCorrectBufferLength=function(r){if(!this._hasScrollback)return r;var n=r+this._optionsService.rawOptions.scrollback;return n>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:n},t.prototype.fillViewportRows=function(r){if(this.lines.length===0){r===void 0&&(r=d.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(r))}},t.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},t.prototype.resize=function(r,n){var l=this.getNullCell(d.DEFAULT_ATTR_DATA),a=this._getCorrectBufferLength(n);if(a>this.lines.maxLength&&(this.lines.maxLength=a),this.lines.length>0){if(this._cols<r)for(var y=0;y<this.lines.length;y++)this.lines.get(y).resize(r,l);var S=0;if(this._rows<n)for(var g=this._rows;g<n;g++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new d.BufferLine(r,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+S+1?(this.ybase--,S++,this.ydisp>0&&this.ydisp--):this.lines.push(new d.BufferLine(r,l)));else for(g=this._rows;g>n;g--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(a<this.lines.maxLength){var b=this.lines.length-a;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,0)),this.lines.maxLength=a}this.x=Math.min(this.x,r-1),this.y=Math.min(this.y,n-1),S&&(this.y+=S),this.savedX=Math.min(this.savedX,r-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(r,n),this._cols>r))for(y=0;y<this.lines.length;y++)this.lines.get(y).resize(r,l);this._cols=r,this._rows=n},Object.defineProperty(t.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),t.prototype._reflow=function(r,n){this._cols!==r&&(r>this._cols?this._reflowLarger(r,n):this._reflowSmaller(r,n))},t.prototype._reflowLarger=function(r,n){var l=(0,o.reflowLargerGetLinesToRemove)(this.lines,this._cols,r,this.ybase+this.y,this.getNullCell(d.DEFAULT_ATTR_DATA));if(l.length>0){var a=(0,o.reflowLargerCreateNewLayout)(this.lines,l);(0,o.reflowLargerApplyNewLayout)(this.lines,a.layout),this._reflowLargerAdjustViewport(r,n,a.countRemoved)}},t.prototype._reflowLargerAdjustViewport=function(r,n,l){for(var a=this.getNullCell(d.DEFAULT_ATTR_DATA),y=l;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new d.BufferLine(r,a))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},t.prototype._reflowSmaller=function(r,n){for(var l=this.getNullCell(d.DEFAULT_ATTR_DATA),a=[],y=0,S=this.lines.length-1;S>=0;S--){var g=this.lines.get(S);if(!(!g||!g.isWrapped&&g.getTrimmedLength()<=r)){for(var b=[g];g.isWrapped&&S>0;)g=this.lines.get(--S),b.unshift(g);var C=this.ybase+this.y;if(!(C>=S&&C<S+b.length)){var R,L=b[b.length-1].getTrimmedLength(),k=(0,o.reflowSmallerGetNewLineLengths)(b,this._cols,r),x=k.length-b.length;R=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+x):Math.max(0,this.lines.length-this.lines.maxLength+x);for(var E=[],A=0;A<x;A++){var T=this.getBlankLine(d.DEFAULT_ATTR_DATA,!0);E.push(T)}E.length>0&&(a.push({start:S+b.length+y,newLines:E}),y+=E.length),b.push.apply(b,u([],_(E),!1));var U=k.length-1,q=k[U];q===0&&(q=k[--U]);for(var j=b.length-x-1,z=L;j>=0;){var N=Math.min(z,q);if(b[U]===void 0)break;if(b[U].copyCellsFrom(b[j],z-N,q-N,N,!0),(q-=N)==0&&(q=k[--U]),(z-=N)==0){j--;var M=Math.max(j,0);z=(0,o.getWrappedLineTrimmedLength)(b,M,this._cols)}}for(A=0;A<b.length;A++)k[A]<r&&b[A].setCell(k[A],l);for(var Y=x-R;Y-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+x,this.ybase+n-1)}}}if(a.length>0){var Z=[],te=[];for(A=0;A<this.lines.length;A++)te.push(this.lines.get(A));var B=this.lines.length,Q=B-1,X=0,F=a[X];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);var O=0;for(A=Math.min(this.lines.maxLength-1,B+y-1);A>=0;A--)if(F&&F.start>Q+O){for(var D=F.newLines.length-1;D>=0;D--)this.lines.set(A--,F.newLines[D]);A++,Z.push({index:Q+1,amount:F.newLines.length}),O+=F.newLines.length,F=a[++X]}else this.lines.set(A,te[Q--]);var H=0;for(A=Z.length-1;A>=0;A--)Z[A].index+=H,this.lines.onInsertEmitter.fire(Z[A]),H+=Z[A].amount;var G=Math.max(0,B+y-this.lines.maxLength);G>0&&this.lines.onTrimEmitter.fire(G)}},t.prototype.stringIndexToBufferIndex=function(r,n,l){for(l===void 0&&(l=!1);n;){var a=this.lines.get(r);if(!a)return[-1,-1];for(var y=l?a.getTrimmedLength():a.length,S=0;S<y;++S)if(a.get(S)[v.CHAR_DATA_WIDTH_INDEX]&&(n-=a.get(S)[v.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[r,S];r++}return[r,0]},t.prototype.translateBufferLineToString=function(r,n,l,a){l===void 0&&(l=0);var y=this.lines.get(r);return y?y.translateToString(n,l,a):""},t.prototype.getWrappedRangeForLine=function(r){for(var n=r,l=r;n>0&&this.lines.get(n).isWrapped;)n--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:n,last:l}},t.prototype.setupTabStops=function(r){for(r!=null?this.tabs[r]||(r=this.prevStop(r)):(this.tabs={},r=0);r<this._cols;r+=this._optionsService.rawOptions.tabStopWidth)this.tabs[r]=!0},t.prototype.prevStop=function(r){for(r==null&&(r=this.x);!this.tabs[--r]&&r>0;);return r>=this._cols?this._cols-1:r<0?0:r},t.prototype.nextStop=function(r){for(r==null&&(r=this.x);!this.tabs[++r]&&r<this._cols;);return r>=this._cols?this._cols-1:r<0?0:r},t.prototype.clearMarkers=function(r){this._isClearing=!0;for(var n=0;n<this.markers.length;n++)this.markers[n].line===r&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1},t.prototype.clearAllMarkers=function(){this._isClearing=!0;for(var r=0;r<this.markers.length;r++)this.markers[r].dispose(),this.markers.splice(r--,1);this._isClearing=!1},t.prototype.addMarker=function(r){var n=this,l=new s.Marker(r);return this.markers.push(l),l.register(this.lines.onTrim(function(a){l.line-=a,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(a){l.line>=a.index&&(l.line+=a.amount)})),l.register(this.lines.onDelete(function(a){l.line>=a.index&&l.line<a.index+a.amount&&l.dispose(),l.line>a.index&&(l.line-=a.amount)})),l.register(l.onDispose(function(){return n._removeMarker(l)})),l},t.prototype._removeMarker=function(r){this._isClearing||this.markers.splice(this.markers.indexOf(r),1)},t.prototype.iterator=function(r,n,l,a,y){return new e(this,r,n,l,a,y)},t}();c.Buffer=i;var e=function(){function t(r,n,l,a,y,S){l===void 0&&(l=0),a===void 0&&(a=r.lines.length),y===void 0&&(y=0),S===void 0&&(S=0),this._buffer=r,this._trimRight=n,this._startIndex=l,this._endIndex=a,this._startOverscan=y,this._endOverscan=S,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return t.prototype.hasNext=function(){return this._current<this._endIndex},t.prototype.next=function(){var r=this._buffer.getWrappedRangeForLine(this._current);r.first<this._startIndex-this._startOverscan&&(r.first=this._startIndex-this._startOverscan),r.last>this._endIndex+this._endOverscan&&(r.last=this._endIndex+this._endOverscan),r.first=Math.max(r.first,0),r.last=Math.min(r.last,this._buffer.lines.length);for(var n="",l=r.first;l<=r.last;++l)n+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=r.last+1,{range:r,content:n}},t}();c.BufferStringIterator=e},8437:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;var _=w(482),u=w(643),f=w(511),d=w(3734);c.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);var m=function(){function v(o,s,p){p===void 0&&(p=!1),this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);for(var h=s||f.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),i=0;i<o;++i)this.setCell(i,h);this.length=o}return v.prototype.get=function(o){var s=this._data[3*o+0],p=2097151&s;return[this._data[3*o+1],2097152&s?this._combined[o]:p?(0,_.stringFromCodePoint)(p):"",s>>22,2097152&s?this._combined[o].charCodeAt(this._combined[o].length-1):p]},v.prototype.set=function(o,s){this._data[3*o+1]=s[u.CHAR_DATA_ATTR_INDEX],s[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=s[1],this._data[3*o+0]=2097152|o|s[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=s[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[u.CHAR_DATA_WIDTH_INDEX]<<22},v.prototype.getWidth=function(o){return this._data[3*o+0]>>22},v.prototype.hasWidth=function(o){return 12582912&this._data[3*o+0]},v.prototype.getFg=function(o){return this._data[3*o+1]},v.prototype.getBg=function(o){return this._data[3*o+2]},v.prototype.hasContent=function(o){return 4194303&this._data[3*o+0]},v.prototype.getCodePoint=function(o){var s=this._data[3*o+0];return 2097152&s?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&s},v.prototype.isCombined=function(o){return 2097152&this._data[3*o+0]},v.prototype.getString=function(o){var s=this._data[3*o+0];return 2097152&s?this._combined[o]:2097151&s?(0,_.stringFromCodePoint)(2097151&s):""},v.prototype.loadCell=function(o,s){var p=3*o;return s.content=this._data[p+0],s.fg=this._data[p+1],s.bg=this._data[p+2],2097152&s.content&&(s.combinedData=this._combined[o]),268435456&s.bg&&(s.extended=this._extendedAttrs[o]),s},v.prototype.setCell=function(o,s){2097152&s.content&&(this._combined[o]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[o]=s.extended),this._data[3*o+0]=s.content,this._data[3*o+1]=s.fg,this._data[3*o+2]=s.bg},v.prototype.setCellFromCodePoint=function(o,s,p,h,i,e){268435456&i&&(this._extendedAttrs[o]=e),this._data[3*o+0]=s|p<<22,this._data[3*o+1]=h,this._data[3*o+2]=i},v.prototype.addCodepointToCell=function(o,s){var p=this._data[3*o+0];2097152&p?this._combined[o]+=(0,_.stringFromCodePoint)(s):(2097151&p?(this._combined[o]=(0,_.stringFromCodePoint)(2097151&p)+(0,_.stringFromCodePoint)(s),p&=-2097152,p|=2097152):p=s|1<<22,this._data[3*o+0]=p)},v.prototype.insertCells=function(o,s,p,h){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),s<this.length-o){for(var i=new f.CellData,e=this.length-o-s-1;e>=0;--e)this.setCell(o+s+e,this.loadCell(o+e,i));for(e=0;e<s;++e)this.setCell(o+e,p)}else for(e=o;e<this.length;++e)this.setCell(e,p);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs)},v.prototype.deleteCells=function(o,s,p,h){if(o%=this.length,s<this.length-o){for(var i=new f.CellData,e=0;e<this.length-o-s;++e)this.setCell(o+e,this.loadCell(o+s+e,i));for(e=this.length-s;e<this.length;++e)this.setCell(e,p)}else for(e=o;e<this.length;++e)this.setCell(e,p);o&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodePoint(o,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs)},v.prototype.replaceCells=function(o,s,p,h){for(o&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o-1,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s,0,1,h?.fg||0,h?.bg||0,h?.extended||new d.ExtendedAttrs);o<s&&o<this.length;)this.setCell(o++,p)},v.prototype.resize=function(o,s){if(o!==this.length){if(o>this.length){var p=new Uint32Array(3*o);this.length&&(3*o<this._data.length?p.set(this._data.subarray(0,3*o)):p.set(this._data)),this._data=p;for(var h=this.length;h<o;++h)this.setCell(h,s)}else if(o){(p=new Uint32Array(3*o)).set(this._data.subarray(0,3*o)),this._data=p;var i=Object.keys(this._combined);for(h=0;h<i.length;h++){var e=parseInt(i[h],10);e>=o&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=o}},v.prototype.fill=function(o){this._combined={},this._extendedAttrs={};for(var s=0;s<this.length;++s)this.setCell(s,o)},v.prototype.copyFrom=function(o){for(var s in this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={},o._combined)this._combined[s]=o._combined[s];for(var s in this._extendedAttrs={},o._extendedAttrs)this._extendedAttrs[s]=o._extendedAttrs[s];this.isWrapped=o.isWrapped},v.prototype.clone=function(){var o=new v(0);for(var s in o._data=new Uint32Array(this._data),o.length=this.length,this._combined)o._combined[s]=this._combined[s];for(var s in this._extendedAttrs)o._extendedAttrs[s]=this._extendedAttrs[s];return o.isWrapped=this.isWrapped,o},v.prototype.getTrimmedLength=function(){for(var o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0},v.prototype.copyCellsFrom=function(o,s,p,h,i){var e=o._data;if(i)for(var t=h-1;t>=0;t--)for(var r=0;r<3;r++)this._data[3*(p+t)+r]=e[3*(s+t)+r];else for(t=0;t<h;t++)for(r=0;r<3;r++)this._data[3*(p+t)+r]=e[3*(s+t)+r];var n=Object.keys(o._combined);for(r=0;r<n.length;r++){var l=parseInt(n[r],10);l>=s&&(this._combined[l-s+p]=o._combined[l])}},v.prototype.translateToString=function(o,s,p){o===void 0&&(o=!1),s===void 0&&(s=0),p===void 0&&(p=this.length),o&&(p=Math.min(p,this.getTrimmedLength()));for(var h="";s<p;){var i=this._data[3*s+0],e=2097151&i;h+=2097152&i?this._combined[s]:e?(0,_.stringFromCodePoint)(e):u.WHITESPACE_CELL_CHAR,s+=i>>22||1}return h},v}();c.BufferLine=m},4841:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(w,_){if(w.start.y>w.end.y)throw new Error("Buffer range end ("+w.end.x+", "+w.end.y+") cannot be before start ("+w.start.x+", "+w.start.y+")");return _*(w.end.y-w.start.y)+(w.end.x-w.start.x+1)}},4634:(W,c)=>{function w(_,u,f){if(u===_.length-1)return _[u].getTrimmedLength();var d=!_[u].hasContent(f-1)&&_[u].getWidth(f-1)===1,m=_[u+1].getWidth(0)===2;return d&&m?f-1:f}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(_,u,f,d,m){for(var v=[],o=0;o<_.length-1;o++){var s=o,p=_.get(++s);if(p.isWrapped){for(var h=[_.get(o)];s<_.length&&p.isWrapped;)h.push(p),p=_.get(++s);if(d>=o&&d<s)o+=h.length-1;else{for(var i=0,e=w(h,i,u),t=1,r=0;t<h.length;){var n=w(h,t,u),l=n-r,a=f-e,y=Math.min(l,a);h[i].copyCellsFrom(h[t],r,e,y,!1),(e+=y)===f&&(i++,e=0),(r+=y)===n&&(t++,r=0),e===0&&i!==0&&h[i-1].getWidth(f-1)===2&&(h[i].copyCellsFrom(h[i-1],f-1,e++,1,!1),h[i-1].setCell(f-1,m))}h[i].replaceCells(e,f,m);for(var S=0,g=h.length-1;g>0&&(g>i||h[g].getTrimmedLength()===0);g--)S++;S>0&&(v.push(o+h.length-S),v.push(S)),o+=h.length-1}}}return v},c.reflowLargerCreateNewLayout=function(_,u){for(var f=[],d=0,m=u[d],v=0,o=0;o<_.length;o++)if(m===o){var s=u[++d];_.onDeleteEmitter.fire({index:o-v,amount:s}),o+=s-1,v+=s,m=u[++d]}else f.push(o);return{layout:f,countRemoved:v}},c.reflowLargerApplyNewLayout=function(_,u){for(var f=[],d=0;d<u.length;d++)f.push(_.get(u[d]));for(d=0;d<f.length;d++)_.set(d,f[d]);_.length=u.length},c.reflowSmallerGetNewLineLengths=function(_,u,f){for(var d=[],m=_.map(function(e,t){return w(_,t,u)}).reduce(function(e,t){return e+t}),v=0,o=0,s=0;s<m;){if(m-s<f){d.push(m-s);break}v+=f;var p=w(_,o,u);v>p&&(v-=p,o++);var h=_[o].getWidth(v-1)===2;h&&v--;var i=h?f-1:f;d.push(i),s+=i}return d},c.getWrappedLineTrimmedLength=w},5295:function(W,c,w){var _,u=this&&this.__extends||(_=function(v,o){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,p){s.__proto__=p}||function(s,p){for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(s[h]=p[h])},_(v,o)},function(v,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function s(){this.constructor=v}_(v,o),v.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)});Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;var f=w(9092),d=w(8460),m=function(v){function o(s,p){var h=v.call(this)||this;return h._optionsService=s,h._bufferService=p,h._onBufferActivate=h.register(new d.EventEmitter),h.reset(),h}return u(o,v),Object.defineProperty(o.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),o.prototype.reset=function(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(o.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),o.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},o.prototype.activateAltBuffer=function(s){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(s),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},o.prototype.resize=function(s,p){this._normal.resize(s,p),this._alt.resize(s,p)},o.prototype.setupTabStops=function(s){this._normal.setupTabStops(s),this._alt.setupTabStops(s)},o}(w(844).Disposable);c.BufferSet=m},511:function(W,c,w){var _,u=this&&this.__extends||(_=function(o,s){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(p[i]=h[i])},_(o,s)},function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function p(){this.constructor=o}_(o,s),o.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)});Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;var f=w(482),d=w(643),m=w(3734),v=function(o){function s(){var p=o!==null&&o.apply(this,arguments)||this;return p.content=0,p.fg=0,p.bg=0,p.extended=new m.ExtendedAttrs,p.combinedData="",p}return u(s,o),s.fromCharData=function(p){var h=new s;return h.setFromCharData(p),h},s.prototype.isCombined=function(){return 2097152&this.content},s.prototype.getWidth=function(){return this.content>>22},s.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""},s.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},s.prototype.setFromCharData=function(p){this.fg=p[d.CHAR_DATA_ATTR_INDEX],this.bg=0;var h=!1;if(p[d.CHAR_DATA_CHAR_INDEX].length>2)h=!0;else if(p[d.CHAR_DATA_CHAR_INDEX].length===2){var i=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){var e=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(i-55296)+e-56320+65536|p[d.CHAR_DATA_WIDTH_INDEX]<<22:h=!0}else h=!0}else this.content=p[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[d.CHAR_DATA_WIDTH_INDEX]<<22;h&&(this.combinedData=p[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[d.CHAR_DATA_WIDTH_INDEX]<<22)},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(m.AttributeData);c.CellData=v},643:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=256,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:function(W,c,w){var _,u=this&&this.__extends||(_=function(m,v){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(o[p]=s[p])},_(m,v)},function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function o(){this.constructor=m}_(m,v),m.prototype=v===null?Object.create(v):(o.prototype=v.prototype,new o)});Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;var f=w(8460),d=function(m){function v(o){var s=m.call(this)||this;return s.line=o,s._id=v._nextId++,s.isDisposed=!1,s._onDispose=new f.EventEmitter,s}return u(v,m),Object.defineProperty(v.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),m.prototype.dispose.call(this))},v._nextId=1,v}(w(844).Disposable);c.Marker=d},7116:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},c.CHARSETS.A={"#":"\xA3"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},c.CHARSETS.C=c.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},c.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},c.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},c.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},c.CHARSETS.E=c.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},c.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},c.CHARSETS.H=c.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(W,c)=>{var w,_;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
7
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL="\x7F"}(w=c.C0||(c.C0={})),(_=c.C1||(c.C1={})).PAD="\x80",_.HOP="\x81",_.BPH="\x82",_.NBH="\x83",_.IND="\x84",_.NEL="\x85",_.SSA="\x86",_.ESA="\x87",_.HTS="\x88",_.HTJ="\x89",_.VTS="\x8A",_.PLD="\x8B",_.PLU="\x8C",_.RI="\x8D",_.SS2="\x8E",_.SS3="\x8F",_.DCS="\x90",_.PU1="\x91",_.PU2="\x92",_.STS="\x93",_.CCH="\x94",_.MW="\x95",_.SPA="\x96",_.EPA="\x97",_.SOS="\x98",_.SGCI="\x99",_.SCI="\x9A",_.CSI="\x9B",_.ST="\x9C",_.OSC="\x9D",_.PM="\x9E",_.APC="\x9F",(c.C1_ESCAPED||(c.C1_ESCAPED={})).ST=w.ESC+"\\"},7399:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;var _=w(2584),u={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};c.evaluateKeyboardEvent=function(f,d,m,v){var o={type:0,cancel:!1,key:void 0},s=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?o.key=d?_.C0.ESC+"OA":_.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?o.key=d?_.C0.ESC+"OD":_.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?o.key=d?_.C0.ESC+"OC":_.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(o.key=d?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:if(f.shiftKey){o.key=_.C0.BS;break}if(f.altKey){o.key=_.C0.ESC+_.C0.DEL;break}o.key=_.C0.DEL;break;case 9:if(f.shiftKey){o.key=_.C0.ESC+"[Z";break}o.key=_.C0.HT,o.cancel=!0;break;case 13:o.key=f.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,o.cancel=!0;break;case 27:o.key=_.C0.ESC,f.altKey&&(o.key=_.C0.ESC+_.C0.ESC),o.cancel=!0;break;case 37:if(f.metaKey)break;s?(o.key=_.C0.ESC+"[1;"+(s+1)+"D",o.key===_.C0.ESC+"[1;3D"&&(o.key=_.C0.ESC+(m?"b":"[1;5D"))):o.key=d?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(f.metaKey)break;s?(o.key=_.C0.ESC+"[1;"+(s+1)+"C",o.key===_.C0.ESC+"[1;3C"&&(o.key=_.C0.ESC+(m?"f":"[1;5C"))):o.key=d?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(f.metaKey)break;s?(o.key=_.C0.ESC+"[1;"+(s+1)+"A",m||o.key!==_.C0.ESC+"[1;3A"||(o.key=_.C0.ESC+"[1;5A")):o.key=d?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(f.metaKey)break;s?(o.key=_.C0.ESC+"[1;"+(s+1)+"B",m||o.key!==_.C0.ESC+"[1;3B"||(o.key=_.C0.ESC+"[1;5B")):o.key=d?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(o.key=_.C0.ESC+"[2~");break;case 46:o.key=s?_.C0.ESC+"[3;"+(s+1)+"~":_.C0.ESC+"[3~";break;case 36:o.key=s?_.C0.ESC+"[1;"+(s+1)+"H":d?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:o.key=s?_.C0.ESC+"[1;"+(s+1)+"F":d?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:f.shiftKey?o.type=2:f.ctrlKey?o.key=_.C0.ESC+"[5;"+(s+1)+"~":o.key=_.C0.ESC+"[5~";break;case 34:f.shiftKey?o.type=3:f.ctrlKey?o.key=_.C0.ESC+"[6;"+(s+1)+"~":o.key=_.C0.ESC+"[6~";break;case 112:o.key=s?_.C0.ESC+"[1;"+(s+1)+"P":_.C0.ESC+"OP";break;case 113:o.key=s?_.C0.ESC+"[1;"+(s+1)+"Q":_.C0.ESC+"OQ";break;case 114:o.key=s?_.C0.ESC+"[1;"+(s+1)+"R":_.C0.ESC+"OR";break;case 115:o.key=s?_.C0.ESC+"[1;"+(s+1)+"S":_.C0.ESC+"OS";break;case 116:o.key=s?_.C0.ESC+"[15;"+(s+1)+"~":_.C0.ESC+"[15~";break;case 117:o.key=s?_.C0.ESC+"[17;"+(s+1)+"~":_.C0.ESC+"[17~";break;case 118:o.key=s?_.C0.ESC+"[18;"+(s+1)+"~":_.C0.ESC+"[18~";break;case 119:o.key=s?_.C0.ESC+"[19;"+(s+1)+"~":_.C0.ESC+"[19~";break;case 120:o.key=s?_.C0.ESC+"[20;"+(s+1)+"~":_.C0.ESC+"[20~";break;case 121:o.key=s?_.C0.ESC+"[21;"+(s+1)+"~":_.C0.ESC+"[21~";break;case 122:o.key=s?_.C0.ESC+"[23;"+(s+1)+"~":_.C0.ESC+"[23~";break;case 123:o.key=s?_.C0.ESC+"[24;"+(s+1)+"~":_.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(m&&!v||!f.altKey||f.metaKey)!m||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?o.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(o.key=_.C0.US),f.key==="@"&&(o.key=_.C0.NUL)):f.keyCode===65&&(o.type=1);else{var p=u[f.keyCode],h=p?.[f.shiftKey?1:0];if(h)o.key=_.C0.ESC+h;else if(f.keyCode>=65&&f.keyCode<=90){var i=f.ctrlKey?f.keyCode-64:f.keyCode+32,e=String.fromCharCode(i);f.shiftKey&&(e=e.toUpperCase()),o.key=_.C0.ESC+e}else f.key==="Dead"&&f.code.startsWith("Key")&&(e=f.code.slice(3,4),f.shiftKey||(e=e.toLowerCase()),o.key=_.C0.ESC+e,o.cancel=!0)}else f.keyCode>=65&&f.keyCode<=90?o.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?o.key=_.C0.NUL:f.keyCode>=51&&f.keyCode<=55?o.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?o.key=_.C0.DEL:f.keyCode===219?o.key=_.C0.ESC:f.keyCode===220?o.key=_.C0.FS:f.keyCode===221&&(o.key=_.C0.GS)}return o}},482:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},c.utf32ToString=function(u,f,d){f===void 0&&(f=0),d===void 0&&(d=u.length);for(var m="",v=f;v<d;++v){var o=u[v];o>65535?(o-=65536,m+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):m+=String.fromCharCode(o)}return m};var w=function(){function u(){this._interim=0}return u.prototype.clear=function(){this._interim=0},u.prototype.decode=function(f,d){var m=f.length;if(!m)return 0;var v=0,o=0;this._interim&&(56320<=(h=f.charCodeAt(o++))&&h<=57343?d[v++]=1024*(this._interim-55296)+h-56320+65536:(d[v++]=this._interim,d[v++]=h),this._interim=0);for(var s=o;s<m;++s){var p=f.charCodeAt(s);if(55296<=p&&p<=56319){if(++s>=m)return this._interim=p,v;var h;56320<=(h=f.charCodeAt(s))&&h<=57343?d[v++]=1024*(p-55296)+h-56320+65536:(d[v++]=p,d[v++]=h)}else p!==65279&&(d[v++]=p)}return v},u}();c.StringToUtf32=w;var _=function(){function u(){this.interim=new Uint8Array(3)}return u.prototype.clear=function(){this.interim.fill(0)},u.prototype.decode=function(f,d){var m=f.length;if(!m)return 0;var v,o,s,p,h=0,i=0,e=0;if(this.interim[0]){var t=!1,r=this.interim[0];r&=(224&r)==192?31:(240&r)==224?15:7;for(var n=0,l=void 0;(l=63&this.interim[++n])&&n<4;)r<<=6,r|=l;for(var a=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=a-n;e<y;){if(e>=m)return 0;if((192&(l=f[e++]))!=128){e--,t=!0;break}this.interim[n++]=l,r<<=6,r|=63&l}t||(a===2?r<128?e--:d[h++]=r:a===3?r<2048||r>=55296&&r<=57343||r===65279||(d[h++]=r):r<65536||r>1114111||(d[h++]=r)),this.interim.fill(0)}for(var S=m-4,g=e;g<m;){for(;!(!(g<S)||128&(v=f[g])||128&(o=f[g+1])||128&(s=f[g+2])||128&(p=f[g+3]));)d[h++]=v,d[h++]=o,d[h++]=s,d[h++]=p,g+=4;if((v=f[g++])<128)d[h++]=v;else if((224&v)==192){if(g>=m)return this.interim[0]=v,h;if((192&(o=f[g++]))!=128){g--;continue}if((i=(31&v)<<6|63&o)<128){g--;continue}d[h++]=i}else if((240&v)==224){if(g>=m)return this.interim[0]=v,h;if((192&(o=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=o,h;if((192&(s=f[g++]))!=128){g--;continue}if((i=(15&v)<<12|(63&o)<<6|63&s)<2048||i>=55296&&i<=57343||i===65279)continue;d[h++]=i}else if((248&v)==240){if(g>=m)return this.interim[0]=v,h;if((192&(o=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=o,h;if((192&(s=f[g++]))!=128){g--;continue}if(g>=m)return this.interim[0]=v,this.interim[1]=o,this.interim[2]=s,h;if((192&(p=f[g++]))!=128){g--;continue}if((i=(7&v)<<18|(63&o)<<12|(63&s)<<6|63&p)<65536||i>1114111)continue;d[h++]=i}}return h},u}();c.Utf8ToUtf32=_},225:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;var _,u=w(8273),f=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],m=function(){function v(){if(this.version="6",!_){_=new Uint8Array(65536),(0,u.fill)(_,1),_[0]=0,(0,u.fill)(_,0,1,32),(0,u.fill)(_,0,127,160),(0,u.fill)(_,2,4352,4448),_[9001]=2,_[9002]=2,(0,u.fill)(_,2,11904,42192),_[12351]=1,(0,u.fill)(_,2,44032,55204),(0,u.fill)(_,2,63744,64256),(0,u.fill)(_,2,65040,65050),(0,u.fill)(_,2,65072,65136),(0,u.fill)(_,2,65280,65377),(0,u.fill)(_,2,65504,65511);for(var o=0;o<f.length;++o)(0,u.fill)(_,0,f[o][0],f[o][1]+1)}}return v.prototype.wcwidth=function(o){return o<32?0:o<127?1:o<65536?_[o]:function(s,p){var h,i=0,e=p.length-1;if(s<p[0][0]||s>p[e][1])return!1;for(;e>=i;)if(s>p[h=i+e>>1][1])i=h+1;else{if(!(s<p[h][0]))return!0;e=h-1}return!1}(o,d)?0:o>=131072&&o<=196605||o>=196608&&o<=262141?2:1},v}();c.UnicodeV6=m},5981:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;var _=w(8460),u=typeof queueMicrotask>"u"?function(d){Promise.resolve().then(d)}:queueMicrotask,f=function(){function d(m){this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new _.EventEmitter}return Object.defineProperty(d.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),d.prototype.writeSync=function(m,v){if(v!==void 0&&this._syncCalls>v)this._syncCalls=0;else if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var o;for(this._isSyncWriting=!0;o=this._writeBuffer.shift();){this._action(o);var s=this._callbacks.shift();s&&s()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},d.prototype.write=function(m,v){var o=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return o._innerWrite()})),this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(v)},d.prototype._innerWrite=function(m,v){var o=this;m===void 0&&(m=0),v===void 0&&(v=!0);for(var s=m||Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],h=this._action(p,v);if(h)return void h.catch(function(e){return u(function(){throw e}),Promise.resolve(!1)}).then(function(e){return Date.now()-s>=12?setTimeout(function(){return o._innerWrite(0,e)}):o._innerWrite(s,e)});var i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=p.length,Date.now()-s>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return o._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},d}();c.WriteBuffer=f},5941:function(W,c){var w=this&&this.__read||function(d,m){var v=typeof Symbol=="function"&&d[Symbol.iterator];if(!v)return d;var o,s,p=v.call(d),h=[];try{for(;(m===void 0||m-- >0)&&!(o=p.next()).done;)h.push(o.value)}catch(i){s={error:i}}finally{try{o&&!o.done&&(v=p.return)&&v.call(p)}finally{if(s)throw s.error}}return h};Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;var _=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function f(d,m){var v=d.toString(16),o=v.length<2?"0"+v:v;switch(m){case 4:return v[0];case 8:return o;case 12:return(o+o).slice(0,3);default:return o+o}}c.parseColor=function(d){if(d){var m=d.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);var v=_.exec(m);if(v){var o=v[1]?15:v[4]?255:v[7]?4095:65535;return[Math.round(parseInt(v[1]||v[4]||v[7]||v[10],16)/o*255),Math.round(parseInt(v[2]||v[5]||v[8]||v[11],16)/o*255),Math.round(parseInt(v[3]||v[6]||v[9]||v[12],16)/o*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),u.exec(m)&&[3,6,9,12].includes(m.length))){for(var s=m.length/3,p=[0,0,0],h=0;h<3;++h){var i=parseInt(m.slice(s*h,s*h+s),16);p[h]=s===1?i<<4:s===2?i:s===3?i>>4:i>>8}return p}}},c.toRgbString=function(d,m){m===void 0&&(m=16);var v=w(d,3),o=v[0],s=v[1],p=v[2];return"rgb:"+f(o,m)+"/"+f(s,m)+"/"+f(p,m)}},5770:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;var _=w(482),u=w(8742),f=w(5770),d=[],m=function(){function s(){this._handlers=Object.create(null),this._active=d,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return s.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=d},s.prototype.registerHandler=function(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);var i=this._handlers[p];return i.push(h),{dispose:function(){var e=i.indexOf(h);e!==-1&&i.splice(e,1)}}},s.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},s.prototype.setHandlerFallback=function(p){this._handlerFb=p},s.prototype.reset=function(){if(this._active.length)for(var p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].unhook(!1);this._stack.paused=!1,this._active=d,this._ident=0},s.prototype.hook=function(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||d,this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].hook(h);else this._handlerFb(this._ident,"HOOK",h)},s.prototype.put=function(p,h,i){if(this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].put(p,h,i);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(p,h,i))},s.prototype.unhook=function(p,h){if(h===void 0&&(h=!0),this._active.length){var i=!1,e=this._active.length-1,t=!1;if(this._stack.paused&&(e=this._stack.loopPosition-1,i=h,t=this._stack.fallThrough,this._stack.paused=!1),!t&&i===!1){for(;e>=0&&(i=this._active[e].unhook(p))!==!0;e--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!1,i;e--}for(;e>=0;e--)if((i=this._active[e].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=e,this._stack.fallThrough=!0,i}else this._handlerFb(this._ident,"UNHOOK",p);this._active=d,this._ident=0},s}();c.DcsParser=m;var v=new u.Params;v.addParam(0);var o=function(){function s(p){this._handler=p,this._data="",this._params=v,this._hitLimit=!1}return s.prototype.hook=function(p){this._params=p.length>1||p.params[0]?p.clone():v,this._data="",this._hitLimit=!1},s.prototype.put=function(p,h,i){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,h,i),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},s.prototype.unhook=function(p){var h=this,i=!1;if(this._hitLimit)i=!1;else if(p&&(i=this._handler(this._data,this._params))instanceof Promise)return i.then(function(e){return h._params=v,h._data="",h._hitLimit=!1,e});return this._params=v,this._data="",this._hitLimit=!1,i},s}();c.DcsHandler=o},2015:function(W,c,w){var _,u=this&&this.__extends||(_=function(i,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},_(i,e)},function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}_(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;var f=w(844),d=w(8273),m=w(8742),v=w(6242),o=w(6351),s=function(){function i(e){this.table=new Uint8Array(e)}return i.prototype.setDefault=function(e,t){(0,d.fill)(this.table,e<<4|t)},i.prototype.add=function(e,t,r,n){this.table[t<<8|e]=r<<4|n},i.prototype.addMany=function(e,t,r,n){for(var l=0;l<e.length;l++)this.table[t<<8|e[l]]=r<<4|n},i}();c.TransitionTable=s;var p=160;c.VT500_TRANSITION_TABLE=function(){var i=new s(4095),e=Array.apply(null,Array(256)).map(function(y,S){return S}),t=function(y,S){return e.slice(y,S)},r=t(32,127),n=t(0,24);n.push(25),n.push.apply(n,t(28,32));var l,a=t(0,14);for(l in i.setDefault(1,0),i.addMany(r,0,2,0),a)i.addMany([24,26,153,154],l,3,0),i.addMany(t(128,144),l,3,0),i.addMany(t(144,152),l,3,0),i.add(156,l,0,0),i.add(27,l,11,1),i.add(157,l,4,8),i.addMany([152,158,159],l,0,7),i.add(155,l,11,3),i.add(144,l,11,9);return i.addMany(n,0,3,0),i.addMany(n,1,3,1),i.add(127,1,0,1),i.addMany(n,8,0,8),i.addMany(n,3,3,3),i.add(127,3,0,3),i.addMany(n,4,3,4),i.add(127,4,0,4),i.addMany(n,6,3,6),i.addMany(n,5,3,5),i.add(127,5,0,5),i.addMany(n,2,3,2),i.add(127,2,0,2),i.add(93,1,4,8),i.addMany(r,8,5,8),i.add(127,8,5,8),i.addMany([156,27,24,26,7],8,6,0),i.addMany(t(28,32),8,0,8),i.addMany([88,94,95],1,0,7),i.addMany(r,7,0,7),i.addMany(n,7,0,7),i.add(156,7,0,0),i.add(127,7,0,7),i.add(91,1,11,3),i.addMany(t(64,127),3,7,0),i.addMany(t(48,60),3,8,4),i.addMany([60,61,62,63],3,9,4),i.addMany(t(48,60),4,8,4),i.addMany(t(64,127),4,7,0),i.addMany([60,61,62,63],4,0,6),i.addMany(t(32,64),6,0,6),i.add(127,6,0,6),i.addMany(t(64,127),6,0,0),i.addMany(t(32,48),3,9,5),i.addMany(t(32,48),5,9,5),i.addMany(t(48,64),5,0,6),i.addMany(t(64,127),5,7,0),i.addMany(t(32,48),4,9,5),i.addMany(t(32,48),1,9,2),i.addMany(t(32,48),2,9,2),i.addMany(t(48,127),2,10,0),i.addMany(t(48,80),1,10,0),i.addMany(t(81,88),1,10,0),i.addMany([89,90,92],1,10,0),i.addMany(t(96,127),1,10,0),i.add(80,1,11,9),i.addMany(n,9,0,9),i.add(127,9,0,9),i.addMany(t(28,32),9,0,9),i.addMany(t(32,48),9,9,12),i.addMany(t(48,60),9,8,10),i.addMany([60,61,62,63],9,9,10),i.addMany(n,11,0,11),i.addMany(t(32,128),11,0,11),i.addMany(t(28,32),11,0,11),i.addMany(n,10,0,10),i.add(127,10,0,10),i.addMany(t(28,32),10,0,10),i.addMany(t(48,60),10,8,10),i.addMany([60,61,62,63],10,0,11),i.addMany(t(32,48),10,9,12),i.addMany(n,12,0,12),i.add(127,12,0,12),i.addMany(t(28,32),12,0,12),i.addMany(t(32,48),12,9,12),i.addMany(t(48,64),12,0,11),i.addMany(t(64,127),12,12,13),i.addMany(t(64,127),10,12,13),i.addMany(t(64,127),9,12,13),i.addMany(n,13,13,13),i.addMany(r,13,13,13),i.add(127,13,0,13),i.addMany([27,156,24,26],13,14,0),i.add(p,0,2,0),i.add(p,8,5,8),i.add(p,6,0,6),i.add(p,11,0,11),i.add(p,13,13,13),i}();var h=function(i){function e(t){t===void 0&&(t=c.VT500_TRANSITION_TABLE);var r=i.call(this)||this;return r._transitions=t,r._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},r.initialState=0,r.currentState=r.initialState,r._params=new m.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(n,l,a){},r._executeHandlerFb=function(n){},r._csiHandlerFb=function(n,l){},r._escHandlerFb=function(n){},r._errorHandlerFb=function(n){return n},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new v.OscParser,r._dcsParser=new o.DcsParser,r._errorHandler=r._errorHandlerFb,r.registerEscHandler({final:"\\"},function(){return!0}),r}return u(e,i),e.prototype._identifier=function(t,r){r===void 0&&(r=[64,126]);var n=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=t.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var a=t.intermediates.charCodeAt(l);if(32>a||a>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=a}}if(t.final.length!==1)throw new Error("final must be a single byte");var y=t.final.charCodeAt(0);if(r[0]>y||y>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return(n<<=8)|y},e.prototype.identToString=function(t){for(var r=[];t;)r.push(String.fromCharCode(255&t)),t>>=8;return r.reverse().join("")},e.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},e.prototype.setPrintHandler=function(t){this._printHandler=t},e.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},e.prototype.registerEscHandler=function(t,r){var n=this._identifier(t,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);var l=this._escHandlers[n];return l.push(r),{dispose:function(){var a=l.indexOf(r);a!==-1&&l.splice(a,1)}}},e.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},e.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},e.prototype.setExecuteHandler=function(t,r){this._executeHandlers[t.charCodeAt(0)]=r},e.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},e.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},e.prototype.registerCsiHandler=function(t,r){var n=this._identifier(t);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);var l=this._csiHandlers[n];return l.push(r),{dispose:function(){var a=l.indexOf(r);a!==-1&&l.splice(a,1)}}},e.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},e.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},e.prototype.registerDcsHandler=function(t,r){return this._dcsParser.registerHandler(this._identifier(t),r)},e.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},e.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},e.prototype.registerOscHandler=function(t,r){return this._oscParser.registerHandler(t,r)},e.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},e.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},e.prototype.setErrorHandler=function(t){this._errorHandler=t},e.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},e.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},e.prototype._preserveStack=function(t,r,n,l,a){this._parseStack.state=t,this._parseStack.handlers=r,this._parseStack.handlerPos=n,this._parseStack.transition=l,this._parseStack.chunkPos=a},e.prototype.parse=function(t,r,n){var l,a=0,y=0,S=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,S=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var g=this._parseStack.handlers,b=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&b>-1){for(;b>=0&&(l=g[b](this._params))!==!0;b--)if(l instanceof Promise)return this._parseStack.handlerPos=b,l}this._parseStack.handlers=[];break;case 4:if(n===!1&&b>-1){for(;b>=0&&(l=g[b]())!==!0;b--)if(l instanceof Promise)return this._parseStack.handlerPos=b,l}this._parseStack.handlers=[];break;case 6:if(a=t[this._parseStack.chunkPos],l=this._dcsParser.unhook(a!==24&&a!==26,n))return l;a===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(a=t[this._parseStack.chunkPos],l=this._oscParser.end(a!==24&&a!==26,n))return l;a===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,S=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var C=S;C<r;++C){switch(a=t[C],(y=this._transitions.table[this.currentState<<8|(a<160?a:p)])>>4){case 2:for(var R=C+1;;++R){if(R>=r||(a=t[R])<32||a>126&&a<p){this._printHandler(t,C,R),C=R-1;break}if(++R>=r||(a=t[R])<32||a>126&&a<p){this._printHandler(t,C,R),C=R-1;break}if(++R>=r||(a=t[R])<32||a>126&&a<p){this._printHandler(t,C,R),C=R-1;break}if(++R>=r||(a=t[R])<32||a>126&&a<p){this._printHandler(t,C,R),C=R-1;break}}break;case 3:this._executeHandlers[a]?this._executeHandlers[a]():this._executeHandlerFb(a),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:a,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var L=(g=this._csiHandlers[this._collect<<8|a])?g.length-1:-1;L>=0&&(l=g[L](this._params))!==!0;L--)if(l instanceof Promise)return this._preserveStack(3,g,L,y,C),l;L<0&&this._csiHandlerFb(this._collect<<8|a,this._params),this.precedingCodepoint=0;break;case 8:do switch(a){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(a-48)}while(++C<r&&(a=t[C])>47&&a<60);C--;break;case 9:this._collect<<=8,this._collect|=a;break;case 10:for(var k=this._escHandlers[this._collect<<8|a],x=k?k.length-1:-1;x>=0&&(l=k[x]())!==!0;x--)if(l instanceof Promise)return this._preserveStack(4,k,x,y,C),l;x<0&&this._escHandlerFb(this._collect<<8|a),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|a,this._params);break;case 13:for(var E=C+1;;++E)if(E>=r||(a=t[E])===24||a===26||a===27||a>127&&a<p){this._dcsParser.put(t,C,E),C=E-1;break}break;case 14:if(l=this._dcsParser.unhook(a!==24&&a!==26))return this._preserveStack(6,[],0,y,C),l;a===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var A=C+1;;A++)if(A>=r||(a=t[A])<32||a>127&&a<p){this._oscParser.put(t,C,A),C=A-1;break}break;case 6:if(l=this._oscParser.end(a!==24&&a!==26))return this._preserveStack(5,[],0,y,C),l;a===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&y}},e}(f.Disposable);c.EscapeSequenceParser=h},6242:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;var _=w(5770),u=w(482),f=[],d=function(){function v(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return v.prototype.registerHandler=function(o,s){this._handlers[o]===void 0&&(this._handlers[o]=[]);var p=this._handlers[o];return p.push(s),{dispose:function(){var h=p.indexOf(s);h!==-1&&p.splice(h,1)}}},v.prototype.clearHandler=function(o){this._handlers[o]&&delete this._handlers[o]},v.prototype.setHandlerFallback=function(o){this._handlerFb=o},v.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=f},v.prototype.reset=function(){if(this._state===2)for(var o=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;o>=0;--o)this._active[o].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0},v.prototype._start=function(){if(this._active=this._handlers[this._id]||f,this._active.length)for(var o=this._active.length-1;o>=0;o--)this._active[o].start();else this._handlerFb(this._id,"START")},v.prototype._put=function(o,s,p){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(o,s,p);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(o,s,p))},v.prototype.start=function(){this.reset(),this._state=1},v.prototype.put=function(o,s,p){if(this._state!==3){if(this._state===1)for(;s<p;){var h=o[s++];if(h===59){this._state=2,this._start();break}if(h<48||57<h)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+h-48}this._state===2&&p-s>0&&this._put(o,s,p)}},v.prototype.end=function(o,s){if(s===void 0&&(s=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var p=!1,h=this._active.length-1,i=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=s,i=this._stack.fallThrough,this._stack.paused=!1),!i&&p===!1){for(;h>=0&&(p=this._active[h].end(o))!==!0;h--)if(p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,p;h--}for(;h>=0;h--)if((p=this._active[h].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",o);this._active=f,this._id=-1,this._state=0}},v}();c.OscParser=d;var m=function(){function v(o){this._handler=o,this._data="",this._hitLimit=!1}return v.prototype.start=function(){this._data="",this._hitLimit=!1},v.prototype.put=function(o,s,p){this._hitLimit||(this._data+=(0,u.utf32ToString)(o,s,p),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},v.prototype.end=function(o){var s=this,p=!1;if(this._hitLimit)p=!1;else if(o&&(p=this._handler(this._data))instanceof Promise)return p.then(function(h){return s._data="",s._hitLimit=!1,h});return this._data="",this._hitLimit=!1,p},v}();c.OscHandler=m},8742:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;var w=2147483647,_=function(){function u(f,d){if(f===void 0&&(f=32),d===void 0&&(d=32),this.maxLength=f,this.maxSubParamsLength=d,d>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(d),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return u.fromArray=function(f){var d=new u;if(!f.length)return d;for(var m=Array.isArray(f[0])?1:0;m<f.length;++m){var v=f[m];if(Array.isArray(v))for(var o=0;o<v.length;++o)d.addSubParam(v[o]);else d.addParam(v)}return d},u.prototype.clone=function(){var f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f},u.prototype.toArray=function(){for(var f=[],d=0;d<this.length;++d){f.push(this.params[d]);var m=this._subParamsIdx[d]>>8,v=255&this._subParamsIdx[d];v-m>0&&f.push(Array.prototype.slice.call(this._subParams,m,v))}return f},u.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},u.prototype.addParam=function(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>w?w:f}},u.prototype.addSubParam=function(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>w?w:f,this._subParamsIdx[this.length-1]++}},u.prototype.hasSubParams=function(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0},u.prototype.getSubParams=function(f){var d=this._subParamsIdx[f]>>8,m=255&this._subParamsIdx[f];return m-d>0?this._subParams.subarray(d,m):null},u.prototype.getSubParamsAll=function(){for(var f={},d=0;d<this.length;++d){var m=this._subParamsIdx[d]>>8,v=255&this._subParamsIdx[d];v-m>0&&(f[d]=this._subParams.slice(m,v))}return f},u.prototype.addDigit=function(f){var d;if(!(this._rejectDigits||!(d=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var m=this._digitIsSub?this._subParams:this.params,v=m[d-1];m[d-1]=~v?Math.min(10*v+f,w):f}},u}();c.Params=_},5741:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0;var w=function(){function _(){this._addons=[]}return _.prototype.dispose=function(){for(var u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()},_.prototype.loadAddon=function(u,f){var d=this,m={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(m),f.dispose=function(){return d._wrappedAddonDispose(m)},f.activate(u)},_.prototype._wrappedAddonDispose=function(u){if(!u.isDisposed){for(var f=-1,d=0;d<this._addons.length;d++)if(this._addons[d]===u){f=d;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}},_}();c.AddonManager=w},8771:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;var _=w(3785),u=w(511),f=function(){function d(m,v){this._buffer=m,this.type=v}return d.prototype.init=function(m){return this._buffer=m,this},Object.defineProperty(d.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),d.prototype.getLine=function(m){var v=this._buffer.lines.get(m);if(v)return new _.BufferLineApiView(v)},d.prototype.getNullCell=function(){return new u.CellData},d}();c.BufferApiView=f},3785:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;var _=w(511),u=function(){function f(d){this._line=d}return Object.defineProperty(f.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),f.prototype.getCell=function(d,m){if(!(d<0||d>=this._line.length))return m?(this._line.loadCell(d,m),m):this._line.loadCell(d,new _.CellData)},f.prototype.translateToString=function(d,m,v){return this._line.translateToString(d,m,v)},f}();c.BufferLineApiView=u},8285:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;var _=w(8771),u=w(8460),f=function(){function d(m){var v=this;this._core=m,this._onBufferChange=new u.EventEmitter,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return v._onBufferChange.fire(v.active)})}return Object.defineProperty(d.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),d}();c.BufferNamespaceApi=f},7975:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0;var w=function(){function _(u){this._core=u}return _.prototype.registerCsiHandler=function(u,f){return this._core.registerCsiHandler(u,function(d){return f(d.toArray())})},_.prototype.addCsiHandler=function(u,f){return this.registerCsiHandler(u,f)},_.prototype.registerDcsHandler=function(u,f){return this._core.registerDcsHandler(u,function(d,m){return f(d,m.toArray())})},_.prototype.addDcsHandler=function(u,f){return this.registerDcsHandler(u,f)},_.prototype.registerEscHandler=function(u,f){return this._core.registerEscHandler(u,f)},_.prototype.addEscHandler=function(u,f){return this.registerEscHandler(u,f)},_.prototype.registerOscHandler=function(u,f){return this._core.registerOscHandler(u,f)},_.prototype.addOscHandler=function(u,f){return this.registerOscHandler(u,f)},_}();c.ParserApi=w},7090:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0;var w=function(){function _(u){this._core=u}return _.prototype.register=function(u){this._core.unicodeService.register(u)},Object.defineProperty(_.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(u){this._core.unicodeService.activeVersion=u},enumerable:!1,configurable:!0}),_}();c.UnicodeApi=w},744:function(W,c,w){var _,u=this&&this.__extends||(_=function(h,i){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},_(h,i)},function(h,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=h}_(h,i),h.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),f=this&&this.__decorate||function(h,i,e,t){var r,n=arguments.length,l=n<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,e):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(h,i,e,t);else for(var a=h.length-1;a>=0;a--)(r=h[a])&&(l=(n<3?r(l):n>3?r(i,e,l):r(i,e))||l);return n>3&&l&&Object.defineProperty(i,e,l),l},d=this&&this.__param||function(h,i){return function(e,t){i(e,t,h)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;var m=w(2585),v=w(5295),o=w(8460),s=w(844);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;var p=function(h){function i(e){var t=h.call(this)||this;return t._optionsService=e,t.isUserScrolling=!1,t._onResize=new o.EventEmitter,t._onScroll=new o.EventEmitter,t.cols=Math.max(e.rawOptions.cols||0,c.MINIMUM_COLS),t.rows=Math.max(e.rawOptions.rows||0,c.MINIMUM_ROWS),t.buffers=new v.BufferSet(e,t),t}return u(i,h),Object.defineProperty(i.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){h.prototype.dispose.call(this),this.buffers.dispose()},i.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},i.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},i.prototype.scroll=function(e,t){t===void 0&&(t=!1);var r,n=this.buffer;(r=this._cachedBlankLine)&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=n.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;var l=n.ybase+n.scrollTop,a=n.ybase+n.scrollBottom;if(n.scrollTop===0){var y=n.lines.isFull;a===n.lines.length-1?y?n.lines.recycle().copyFrom(r):n.lines.push(r.clone()):n.lines.splice(a+1,0,r.clone()),y?this.isUserScrolling&&(n.ydisp=Math.max(n.ydisp-1,0)):(n.ybase++,this.isUserScrolling||n.ydisp++)}else{var S=a-l+1;n.lines.shiftElements(l+1,S-1,-1),n.lines.set(a,r.clone())}this.isUserScrolling||(n.ydisp=n.ybase),this._onScroll.fire(n.ydisp)},i.prototype.scrollLines=function(e,t,r){var n=this.buffer;if(e<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);var l=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),l!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},i.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},i.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},i.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},i.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;t!==0&&this.scrollLines(t)},f([d(0,m.IOptionsService)],i)}(s.Disposable);c.BufferService=p},7994:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0;var w=function(){function _(){this.glevel=0,this._charsets=[]}return _.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},_.prototype.setgLevel=function(u){this.glevel=u,this.charset=this._charsets[u]},_.prototype.setgCharset=function(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)},_}();c.CharsetService=w},1753:function(W,c,w){var _=this&&this.__decorate||function(i,e,t,r){var n,l=arguments.length,a=l<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(i,e,t,r);else for(var y=i.length-1;y>=0;y--)(n=i[y])&&(a=(l<3?n(a):l>3?n(e,t,a):n(e,t))||a);return l>3&&a&&Object.defineProperty(e,t,a),a},u=this&&this.__param||function(i,e){return function(t,r){e(t,r,i)}},f=this&&this.__values||function(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;var d=w(2585),m=w(8460),v={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(i){return i.button!==4&&i.action===1&&(i.ctrl=!1,i.alt=!1,i.shift=!1,!0)}},VT200:{events:19,restrict:function(i){return i.action!==32}},DRAG:{events:23,restrict:function(i){return i.action!==32||i.button!==3}},ANY:{events:31,restrict:function(i){return!0}}};function o(i,e){var t=(i.ctrl?16:0)|(i.shift?4:0)|(i.alt?8:0);return i.button===4?(t|=64,t|=i.action):(t|=3&i.button,4&i.button&&(t|=64),8&i.button&&(t|=128),i.action===32?t|=32:i.action!==0||e||(t|=3)),t}var s=String.fromCharCode,p={DEFAULT:function(i){var e=[o(i,!1)+32,i.col+32,i.row+32];return e[0]>255||e[1]>255||e[2]>255?"":"\x1B[M"+s(e[0])+s(e[1])+s(e[2])},SGR:function(i){var e=i.action===0&&i.button!==4?"m":"M";return"\x1B[<"+o(i,!0)+";"+i.col+";"+i.row+e}},h=function(){function i(e,t){var r,n,l,a;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new m.EventEmitter,this._lastEvent=null;try{for(var y=f(Object.keys(v)),S=y.next();!S.done;S=y.next()){var g=S.value;this.addProtocol(g,v[g])}}catch(L){r={error:L}}finally{try{S&&!S.done&&(n=y.return)&&n.call(y)}finally{if(r)throw r.error}}try{for(var b=f(Object.keys(p)),C=b.next();!C.done;C=b.next()){var R=C.value;this.addEncoding(R,p[R])}}catch(L){l={error:L}}finally{try{C&&!C.done&&(a=b.return)&&a.call(b)}finally{if(l)throw l.error}}this.reset()}return i.prototype.addProtocol=function(e,t){this._protocols[e]=t},i.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(i.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),i.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(i.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),i.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,e))||!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},i.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},i.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},_([u(0,d.IBufferService),u(1,d.ICoreService)],i)}();c.CoreMouseService=h},6975:function(W,c,w){var _,u=this&&this.__extends||(_=function(e,t){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(r[l]=n[l])},_(e,t)},function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}_(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}),f=this&&this.__decorate||function(e,t,r,n){var l,a=arguments.length,y=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(e,t,r,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(y=(a<3?l(y):a>3?l(t,r,y):l(t,r))||y);return a>3&&y&&Object.defineProperty(t,r,y),y},d=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;var m=w(2585),v=w(8460),o=w(1439),s=w(844),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),i=function(e){function t(r,n,l,a){var y=e.call(this)||this;return y._bufferService=n,y._logService=l,y._optionsService=a,y.isCursorInitialized=!1,y.isCursorHidden=!1,y._onData=y.register(new v.EventEmitter),y._onUserInput=y.register(new v.EventEmitter),y._onBinary=y.register(new v.EventEmitter),y._scrollToBottom=r,y.register({dispose:function(){return y._scrollToBottom=void 0}}),y.modes=(0,o.clone)(p),y.decPrivateModes=(0,o.clone)(h),y}return u(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,o.clone)(p),this.decPrivateModes=(0,o.clone)(h)},t.prototype.triggerDataEvent=function(r,n){if(n===void 0&&(n=!1),!this._optionsService.rawOptions.disableStdin){var l=this._bufferService.buffer;l.ybase!==l.ydisp&&this._scrollToBottom(),n&&this._onUserInput.fire(),this._logService.debug('sending data "'+r+'"',function(){return r.split("").map(function(a){return a.charCodeAt(0)})}),this._onData.fire(r)}},t.prototype.triggerBinaryEvent=function(r){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+r+'"',function(){return r.split("").map(function(n){return n.charCodeAt(0)})}),this._onBinary.fire(r))},f([d(1,m.IBufferService),d(2,m.ILogService),d(3,m.IOptionsService)],t)}(s.Disposable);c.CoreService=i},9074:function(W,c,w){var _,u=this&&this.__extends||(_=function(i,e){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},_(i,e)},function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=i}_(i,e),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}),f=this&&this.__generator||function(i,e){var t,r,n,l,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return l={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function y(S){return function(g){return function(b){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(n=2&b[0]?r.return:b[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,b[1])).done)return n;switch(r=0,n&&(b=[2&b[0],n.value]),b[0]){case 0:case 1:n=b;break;case 4:return a.label++,{value:b[1],done:!1};case 5:a.label++,r=b[1],b=[0];continue;case 7:b=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||b[0]!==6&&b[0]!==2)){a=0;continue}if(b[0]===3&&(!n||b[1]>n[0]&&b[1]<n[3])){a.label=b[1];break}if(b[0]===6&&a.label<n[1]){a.label=n[1],n=b;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(b);break}n[2]&&a.ops.pop(),a.trys.pop();continue}b=e.call(i,a)}catch(C){b=[6,C],r=0}finally{t=n=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([S,g])}}},d=this&&this.__values||function(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;var m=w(8055),v=w(8460),o=w(844),s=w(6106),p=function(i){function e(){var t=i.call(this)||this;return t._decorations=new s.SortedList(function(r){return r.marker.line}),t._onDecorationRegistered=t.register(new v.EventEmitter),t._onDecorationRemoved=t.register(new v.EventEmitter),t}return u(e,i),Object.defineProperty(e.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),e.prototype.registerDecoration=function(t){var r=this;if(!t.marker.isDisposed){var n=new h(t);if(n){var l=n.marker.onDispose(function(){return n.dispose()});n.onDispose(function(){n&&(r._decorations.delete(n)&&r._onDecorationRemoved.fire(n),l.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}},e.prototype.reset=function(){var t,r;try{for(var n=d(this._decorations.values()),l=n.next();!l.done;l=n.next())l.value.dispose()}catch(a){t={error:a}}finally{try{l&&!l.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this._decorations.clear()},e.prototype.getDecorationsAtLine=function(t){return f(this,function(r){return[2,this._decorations.getKeyIterator(t)]})},e.prototype.getDecorationsAtCell=function(t,r,n){var l,a,y,S,g,b,C,R,L,k,x;return f(this,function(E){switch(E.label){case 0:l=0,a=0,E.label=1;case 1:E.trys.push([1,6,7,8]),y=d(this._decorations.getKeyIterator(r)),S=y.next(),E.label=2;case 2:return S.done?[3,5]:(g=S.value,l=(L=g.options.x)!==null&&L!==void 0?L:0,a=l+((k=g.options.width)!==null&&k!==void 0?k:1),!(t>=l&&t<a)||n&&((x=g.options.layer)!==null&&x!==void 0?x:"bottom")!==n?[3,4]:[4,g]);case 3:E.sent(),E.label=4;case 4:return S=y.next(),[3,2];case 5:return[3,8];case 6:return b=E.sent(),C={error:b},[3,8];case 7:try{S&&!S.done&&(R=y.return)&&R.call(y)}finally{if(C)throw C.error}return[7];case 8:return[2]}})},e.prototype.dispose=function(){var t,r;try{for(var n=d(this._decorations.values()),l=n.next();!l.done;l=n.next()){var a=l.value;this._onDecorationRemoved.fire(a)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.reset()},e}(o.Disposable);c.DecorationService=p;var h=function(i){function e(t){var r=i.call(this)||this;return r.options=t,r.isDisposed=!1,r.onRenderEmitter=r.register(new v.EventEmitter),r.onRender=r.onRenderEmitter.event,r._onDispose=r.register(new v.EventEmitter),r.onDispose=r._onDispose.event,r._cachedBg=null,r._cachedFg=null,r.marker=t.marker,r.options.overviewRulerOptions&&!r.options.overviewRulerOptions.position&&(r.options.overviewRulerOptions.position="full"),r}return u(e,i),Object.defineProperty(e.prototype,"backgroundColorRGB",{get:function(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=m.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"foregroundColorRGB",{get:function(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=m.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),i.prototype.dispose.call(this))},e}(o.Disposable)},3730:function(W,c,w){var _=this&&this.__decorate||function(m,v,o,s){var p,h=arguments.length,i=h<3?v:s===null?s=Object.getOwnPropertyDescriptor(v,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(m,v,o,s);else for(var e=m.length-1;e>=0;e--)(p=m[e])&&(i=(h<3?p(i):h>3?p(v,o,i):p(v,o))||i);return h>3&&i&&Object.defineProperty(v,o,i),i},u=this&&this.__param||function(m,v){return function(o,s){v(o,s,m)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DirtyRowService=void 0;var f=w(2585),d=function(){function m(v){this._bufferService=v,this.clearRange()}return Object.defineProperty(m.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),m.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},m.prototype.markDirty=function(v){v<this._start?this._start=v:v>this._end&&(this._end=v)},m.prototype.markRangeDirty=function(v,o){if(v>o){var s=v;v=o,o=s}v<this._start&&(this._start=v),o>this._end&&(this._end=o)},m.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},_([u(0,f.IBufferService)],m)}();c.DirtyRowService=d},4348:function(W,c,w){var _=this&&this.__values||function(s){var p=typeof Symbol=="function"&&Symbol.iterator,h=p&&s[p],i=0;if(h)return h.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&i>=s.length&&(s=void 0),{value:s&&s[i++],done:!s}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__read||function(s,p){var h=typeof Symbol=="function"&&s[Symbol.iterator];if(!h)return s;var i,e,t=h.call(s),r=[];try{for(;(p===void 0||p-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(n){e={error:n}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return r},f=this&&this.__spreadArray||function(s,p,h){if(h||arguments.length===2)for(var i,e=0,t=p.length;e<t;e++)!i&&e in p||(i||(i=Array.prototype.slice.call(p,0,e)),i[e]=p[e]);return s.concat(i||Array.prototype.slice.call(p))};Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;var d=w(2585),m=w(8343),v=function(){function s(){for(var p,h,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];this._entries=new Map;try{for(var t=_(i),r=t.next();!r.done;r=t.next()){var n=u(r.value,2),l=n[0],a=n[1];this.set(l,a)}}catch(y){p={error:y}}finally{try{r&&!r.done&&(h=t.return)&&h.call(t)}finally{if(p)throw p.error}}}return s.prototype.set=function(p,h){var i=this._entries.get(p);return this._entries.set(p,h),i},s.prototype.forEach=function(p){this._entries.forEach(function(h,i){return p(i,h)})},s.prototype.has=function(p){return this._entries.has(p)},s.prototype.get=function(p){return this._entries.get(p)},s}();c.ServiceCollection=v;var o=function(){function s(){this._services=new v,this._services.set(d.IInstantiationService,this)}return s.prototype.setService=function(p,h){this._services.set(p,h)},s.prototype.getService=function(p){return this._services.get(p)},s.prototype.createInstance=function(p){for(var h,i,e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var r=(0,m.getServiceDependencies)(p).sort(function(b,C){return b.index-C.index}),n=[];try{for(var l=_(r),a=l.next();!a.done;a=l.next()){var y=a.value,S=this._services.get(y.id);if(!S)throw new Error("[createInstance] "+p.name+" depends on UNKNOWN service "+y.id+".");n.push(S)}}catch(b){h={error:b}}finally{try{a&&!a.done&&(i=l.return)&&i.call(l)}finally{if(h)throw h.error}}var g=r.length>0?r[0].index:e.length;if(e.length!==g)throw new Error("[createInstance] First service dependency of "+p.name+" at position "+(g+1)+" conflicts with "+e.length+" static arguments");return new(p.bind.apply(p,f([void 0],u(f(f([],u(e),!1),u(n),!1)),!1)))},s}();c.InstantiationService=o},7866:function(W,c,w){var _=this&&this.__decorate||function(s,p,h,i){var e,t=arguments.length,r=t<3?p:i===null?i=Object.getOwnPropertyDescriptor(p,h):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(s,p,h,i);else for(var n=s.length-1;n>=0;n--)(e=s[n])&&(r=(t<3?e(r):t>3?e(p,h,r):e(p,h))||r);return t>3&&r&&Object.defineProperty(p,h,r),r},u=this&&this.__param||function(s,p){return function(h,i){p(h,i,s)}},f=this&&this.__read||function(s,p){var h=typeof Symbol=="function"&&s[Symbol.iterator];if(!h)return s;var i,e,t=h.call(s),r=[];try{for(;(p===void 0||p-- >0)&&!(i=t.next()).done;)r.push(i.value)}catch(n){e={error:n}}finally{try{i&&!i.done&&(h=t.return)&&h.call(t)}finally{if(e)throw e.error}}return r},d=this&&this.__spreadArray||function(s,p,h){if(h||arguments.length===2)for(var i,e=0,t=p.length;e<t;e++)!i&&e in p||(i||(i=Array.prototype.slice.call(p,0,e)),i[e]=p[e]);return s.concat(i||Array.prototype.slice.call(p))};Object.defineProperty(c,"__esModule",{value:!0}),c.LogService=void 0;var m=w(2585),v={debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF},o=function(){function s(p){var h=this;this._optionsService=p,this.logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(i){i==="logLevel"&&h._updateLogLevel()})}return s.prototype._updateLogLevel=function(){this.logLevel=v[this._optionsService.rawOptions.logLevel]},s.prototype._evalLazyOptionalParams=function(p){for(var h=0;h<p.length;h++)typeof p[h]=="function"&&(p[h]=p[h]())},s.prototype._log=function(p,h,i){this._evalLazyOptionalParams(i),p.call.apply(p,d([console,"xterm.js: "+h],f(i),!1))},s.prototype.debug=function(p){for(var h=[],i=1;i<arguments.length;i++)h[i-1]=arguments[i];this.logLevel<=m.LogLevelEnum.DEBUG&&this._log(console.log,p,h)},s.prototype.info=function(p){for(var h=[],i=1;i<arguments.length;i++)h[i-1]=arguments[i];this.logLevel<=m.LogLevelEnum.INFO&&this._log(console.info,p,h)},s.prototype.warn=function(p){for(var h=[],i=1;i<arguments.length;i++)h[i-1]=arguments[i];this.logLevel<=m.LogLevelEnum.WARN&&this._log(console.warn,p,h)},s.prototype.error=function(p){for(var h=[],i=1;i<arguments.length;i++)h[i-1]=arguments[i];this.logLevel<=m.LogLevelEnum.ERROR&&this._log(console.error,p,h)},_([u(0,m.IOptionsService)],s)}();c.LogService=o},7302:function(W,c,w){var _=this&&this.__assign||function(){return _=Object.assign||function(v){for(var o,s=1,p=arguments.length;s<p;s++)for(var h in o=arguments[s])Object.prototype.hasOwnProperty.call(o,h)&&(v[h]=o[h]);return v},_.apply(this,arguments)};Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=c.DEFAULT_BELL_SOUND=void 0;var u=w(8460),f=w(6114);c.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",c.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:c.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:f.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var d=["normal","bold","100","200","300","400","500","600","700","800","900"],m=function(){function v(o){this._onOptionChange=new u.EventEmitter;var s=_({},c.DEFAULT_OPTIONS);for(var p in o)if(p in s)try{var h=o[p];s[p]=this._sanitizeAndValidateOption(p,h)}catch(i){console.error(i)}this.rawOptions=s,this.options=_({},s),this._setupOptions()}return Object.defineProperty(v.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),v.prototype._setupOptions=function(){var o=this,s=function(e){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return o.rawOptions[e]},p=function(e,t){if(!(e in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');t=o._sanitizeAndValidateOption(e,t),o.rawOptions[e]!==t&&(o.rawOptions[e]=t,o._onOptionChange.fire(e))};for(var h in this.rawOptions){var i={get:s.bind(this,h),set:p.bind(this,h)};Object.defineProperty(this.options,h,i)}},v.prototype.setOption=function(o,s){this.options[o]=s},v.prototype._sanitizeAndValidateOption=function(o,s){switch(o){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":s||(s=c.DEFAULT_OPTIONS[o]);break;case"fontWeight":case"fontWeightBold":if(typeof s=="number"&&1<=s&&s<=1e3)break;s=d.includes(s)?s:c.DEFAULT_OPTIONS[o];break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(o+" cannot be less than 1, value: "+s);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(o+" cannot be less than 0, value: "+s);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(o+" cannot be less than or equal to 0, value: "+s);case"rows":case"cols":if(!s&&s!==0)throw new Error(o+" must be numeric, value: "+s)}return s},v.prototype.getOption=function(o){return this.options[o]},v}();c.OptionsService=m},8343:(W,c)=>{function w(_,u,f){u.di$target===u?u.di$dependencies.push({id:_,index:f}):(u.di$dependencies=[{id:_,index:f}],u.di$target=u)}Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0,c.serviceRegistry=new Map,c.getServiceDependencies=function(_){return _.di$dependencies||[]},c.createDecorator=function(_){if(c.serviceRegistry.has(_))return c.serviceRegistry.get(_);var u=function(f,d,m){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");w(u,f,m)};return u.toString=function(){return _},c.serviceRegistry.set(_,u),u}},2585:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.IDirtyRowService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;var _,u=w(8343);c.IBufferService=(0,u.createDecorator)("BufferService"),c.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),c.ICoreService=(0,u.createDecorator)("CoreService"),c.ICharsetService=(0,u.createDecorator)("CharsetService"),c.IDirtyRowService=(0,u.createDecorator)("DirtyRowService"),c.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(_=c.LogLevelEnum||(c.LogLevelEnum={}))[_.DEBUG=0]="DEBUG",_[_.INFO=1]="INFO",_[_.WARN=2]="WARN",_[_.ERROR=3]="ERROR",_[_.OFF=4]="OFF",c.ILogService=(0,u.createDecorator)("LogService"),c.IOptionsService=(0,u.createDecorator)("OptionsService"),c.IUnicodeService=(0,u.createDecorator)("UnicodeService"),c.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(W,c,w)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;var _=w(8460),u=w(225),f=function(){function d(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter;var m=new u.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}return Object.defineProperty(d.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"activeVersion",{get:function(){return this._active},set:function(m){if(!this._providers[m])throw new Error('unknown Unicode version "'+m+'"');this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)},enumerable:!1,configurable:!0}),d.prototype.register=function(m){this._providers[m.version]=m},d.prototype.wcwidth=function(m){return this._activeProvider.wcwidth(m)},d.prototype.getStringCellWidth=function(m){for(var v=0,o=m.length,s=0;s<o;++s){var p=m.charCodeAt(s);if(55296<=p&&p<=56319){if(++s>=o)return v+this.wcwidth(p);var h=m.charCodeAt(s);56320<=h&&h<=57343?p=1024*(p-55296)+h-56320+65536:v+=this.wcwidth(h)}v+=this.wcwidth(p)}return v},d}();c.UnicodeService=f}},ee={};return function W(c){var w=ee[c];if(w!==void 0)return w.exports;var _=ee[c]={exports:{}};return me[c].call(_.exports,_,_.exports,W),_.exports}(4389)})()})});var br=cr((It,hr)=>{(function(me,ee){typeof It=="object"&&typeof hr=="object"?hr.exports=ee():typeof define=="function"&&define.amd?define([],ee):typeof It=="object"?It.FitAddon=ee():me.FitAddon=ee()})(self,function(){return(()=>{"use strict";var me={775:(W,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FitAddon=void 0;var w=function(){function _(){}return _.prototype.activate=function(u){this._terminal=u},_.prototype.dispose=function(){},_.prototype.fit=function(){var u=this.proposeDimensions();if(u&&this._terminal){var f=this._terminal._core;this._terminal.rows===u.rows&&this._terminal.cols===u.cols||(f._renderService.clear(),this._terminal.resize(u.cols,u.rows))}},_.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var u=this._terminal._core;if(u._renderService.dimensions.actualCellWidth!==0&&u._renderService.dimensions.actualCellHeight!==0){var f=window.getComputedStyle(this._terminal.element.parentElement),d=parseInt(f.getPropertyValue("height")),m=Math.max(0,parseInt(f.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),o=d-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),s=m-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-u.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(s/u._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(o/u._renderService.dimensions.actualCellHeight))}}}},_}();c.FitAddon=w}},ee={};return function W(c){if(ee[c])return ee[c].exports;var w=ee[c]={exports:{}};return me[c](w,w.exports,W),w.exports}(775)})()})});var Sr=cr((Ht,ur)=>{(function(me,ee){typeof Ht=="object"&&typeof ur=="object"?ur.exports=ee():typeof define=="function"&&define.amd?define([],ee):typeof Ht=="object"?Ht.WebLinksAddon=ee():me.WebLinksAddon=ee()})(self,function(){return(()=>{"use strict";var me={6:(w,_)=>{Object.defineProperty(_,"__esModule",{value:!0}),_.LinkComputer=_.WebLinkProvider=void 0;var u=function(){function d(m,v,o,s){s===void 0&&(s={}),this._terminal=m,this._regex=v,this._handler=o,this._options=s}return d.prototype.provideLinks=function(m,v){var o=f.computeLink(m,this._regex,this._terminal,this._handler);v(this._addCallbacks(o))},d.prototype._addCallbacks=function(m){var v=this;return m.map(function(o){return o.leave=v._options.leave,o.hover=function(s,p){if(v._options.hover){var h=o.range;v._options.hover(s,p,h)}},o})},d}();_.WebLinkProvider=u;var f=function(){function d(){}return d.computeLink=function(m,v,o,s){for(var p,h=new RegExp(v.source,(v.flags||"")+"g"),i=d._translateBufferLineToStringWithWrap(m-1,!1,o),e=i[0],t=i[1],r=-1,n=[];(p=h.exec(e))!==null;){var l=p[1];if(!l){console.log("match found without corresponding matchIndex");break}if(r=e.indexOf(l,r+1),h.lastIndex=r+l.length,r<0)break;for(var a=r+l.length,y=t+1;a>o.cols;)a-=o.cols,y++;for(var S=r+1,g=t+1;S>o.cols;)S-=o.cols,g++;var b={start:{x:S,y:g},end:{x:a,y}};n.push({range:b,text:l,activate:s})}return n},d._translateBufferLineToStringWithWrap=function(m,v,o){var s,p,h="";do{if(!(e=o.buffer.active.getLine(m)))break;e.isWrapped&&m--,p=e.isWrapped}while(p);var i=m;do{var e,t=o.buffer.active.getLine(m+1);if(s=!!t&&t.isWrapped,!(e=o.buffer.active.getLine(m)))break;h+=e.translateToString(!s&&v).substring(0,o.cols),m++}while(s);return[h,i]},d}();_.LinkComputer=f}},ee={};function W(w){var _=ee[w];if(_!==void 0)return _.exports;var u=ee[w]={exports:{}};return me[w](u,u.exports,W),u.exports}var c={};return(()=>{var w=c;Object.defineProperty(w,"__esModule",{value:!0}),w.WebLinksAddon=void 0;var _=W(6),u=new RegExp(`(?:^|[^\\da-z\\.-]+)((https?:\\/\\/)((([\\da-z\\.-]+)\\.([a-z\\.]{2,18}))|((\\d{1,3}\\.){3}\\d{1,3})|(localhost))(:\\d{1,5})?((\\/[\\/\\w\\.\\-%~:+@]*)*([^:"'\\s]))?(\\?[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?(#[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*)?)($|[^\\/\\w\\.\\-%]+)`);function f(m,v){var o=window.open();if(o){try{o.opener=null}catch{}o.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}var d=function(){function m(v,o,s){v===void 0&&(v=f),o===void 0&&(o={}),s===void 0&&(s=!1),this._handler=v,this._options=o,this._useLinkProvider=s}return m.prototype.activate=function(v){if(this._terminal=v,this._useLinkProvider&&"registerLinkProvider"in this._terminal){var o=(s=this._options).urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new _.WebLinkProvider(this._terminal,o,this._handler,s))}else{var s;(s=this._options).matchIndex=1,this._linkMatcherId=this._terminal.registerLinkMatcher(u,this._handler,s)}},m.prototype.dispose=function(){var v;this._linkMatcherId!==void 0&&this._terminal!==void 0&&this._terminal.deregisterLinkMatcher(this._linkMatcherId),(v=this._linkProvider)===null||v===void 0||v.dispose()},m}();w.WebLinksAddon=d})(),c})()})});export{mr as a,br as b,Sr as c};