comp-hub 0.29.7 → 0.29.8

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 (154) hide show
  1. package/README.md +132 -132
  2. package/bin/cli.js +53 -53
  3. package/bin/lib/commands.js +173 -173
  4. package/bin/lib/constants.js +22 -22
  5. package/bin/lib/http.js +62 -62
  6. package/bin/lib/startup.js +183 -183
  7. package/bin/lib/utils.js +112 -112
  8. package/dist/index.js +1 -1
  9. package/dist/website/container/assets/{index-CfBoiGrX.css → index-BlSriQ8o.css} +1 -1
  10. package/dist/website/container/assets/{index-BeeqGiFl.js → index-rRWp31us.js} +1 -1
  11. package/dist/website/container/index.html +32 -32
  12. package/dist/website/container/js/vue2-sfc-loader.js +260 -260
  13. package/dist/website/container/js/vue3-sfc-loader.js +289 -289
  14. package/dist/website/item/assets/index-CDQboxOq.css +1 -0
  15. package/dist/website/item/assets/{index-D3VEpySe.js → index-DIJTHUc5.js} +3 -3
  16. package/dist/website/item/index.html +30 -30
  17. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CSa_pS0b.js +1 -0
  18. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-BCEeHWp0.js +1 -0
  19. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-B9sbaztP.js +1 -0
  20. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-I_B9sBtb.js +1 -0
  21. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-vaWJXLBi.js +1 -0
  22. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-Brp0esZx.js +1 -0
  23. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-Dp5z6Iw1.js +1 -0
  24. package/dist/website/main/assets/cloud-upload-DRSmr6Qo.js +1 -0
  25. package/dist/website/main/assets/core-YKf42450.js +3 -0
  26. package/dist/website/main/assets/{el-table-column-BaabKDRF.js → el-table-column-B36K2Har.js} +1 -1
  27. package/dist/website/main/assets/home-rounded--9AAXiZb.js +1 -0
  28. package/dist/website/main/assets/index-BHVQkNA2.js +1 -0
  29. package/dist/website/main/assets/index-BV4gqPW9.js +1 -0
  30. package/dist/website/main/assets/{index-9ejOpPXc.js → index-BW8vDkye.js} +3 -3
  31. package/dist/website/main/assets/index-BXjslBXB.js +1 -0
  32. package/dist/website/main/assets/index-BmnVYsjU.js +1 -0
  33. package/dist/website/main/assets/index-C-RbFIGY.js +1 -0
  34. package/dist/website/main/assets/index-C-elMysi.js +1 -0
  35. package/dist/website/main/assets/index-CCE8UKEc.js +1 -0
  36. package/dist/website/main/assets/index-CJu9086M.js +2 -0
  37. package/dist/website/main/assets/index-CN4epH6N.js +1 -0
  38. package/dist/website/main/assets/{index-CyPExloz.css → index-CRFJskzu.css} +1 -1
  39. package/dist/website/main/assets/index-CTk2LB3W.js +1 -0
  40. package/dist/website/main/assets/index-CWZwdzIK.js +1 -0
  41. package/dist/website/main/assets/index-CYRE55Ch.js +1 -0
  42. package/dist/website/main/assets/index-CYvMpsAk.js +1 -0
  43. package/dist/website/main/assets/index-CdGhZYup.js +1 -0
  44. package/dist/website/main/assets/index-CfYP0TVV.js +1 -0
  45. package/dist/website/main/assets/index-D-zBzPPy.css +1 -0
  46. package/dist/website/main/assets/index-D2HIFwH2.js +1 -0
  47. package/dist/website/main/assets/index-D8FvfjtO.js +1 -0
  48. package/dist/website/main/assets/index-DGeSXL3t.js +1 -0
  49. package/dist/website/main/assets/index-DW1TR3IW.js +1 -0
  50. package/dist/website/main/assets/index-DhAkucE9.js +1 -0
  51. package/dist/website/main/assets/index-Dl_h7vrN.js +2 -0
  52. package/dist/website/main/assets/index-DpHwEP_B.js +1 -0
  53. package/dist/website/main/assets/{index-CpXbVBP2.js → index-Ds4AosT0.js} +5 -5
  54. package/dist/website/main/assets/index-DwBDz4RR.js +1 -0
  55. package/dist/website/main/assets/{index-Cl0SK7oa.css → index-DxyEzkir.css} +1 -1
  56. package/dist/website/main/assets/index-EHIrsqSu.js +1 -0
  57. package/dist/website/main/assets/index-FFTkVbVX.css +1 -0
  58. package/dist/website/main/assets/index-M80Ed-Pb.js +1 -0
  59. package/dist/website/main/assets/index-Mryq8zw5.js +5 -0
  60. package/dist/website/main/assets/index-PeLBbpUx.js +1 -0
  61. package/dist/website/main/assets/index-QX7WDOzk.js +1 -0
  62. package/dist/website/main/assets/{index-C8unIZll.css → index-WO9Mrc8w.css} +1 -1
  63. package/dist/website/main/assets/index-qAhDQceU.js +1 -0
  64. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BfK34NCv.js +1 -0
  65. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DjS3Q9-g.js +1 -0
  66. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-DtekInbn.js +1 -0
  67. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-RkEocesH.js +1 -0
  68. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-XpLtazGO.js +2 -0
  69. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-m8-lu9dQ.js +1 -0
  70. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-t5Qr3Cck.js +1 -0
  71. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-D39LYnj3.js → index.vue_vue_type_style_index_0_lang-B-Okzh4k.js} +1 -1
  72. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-BCmjNfvt.js +6 -0
  73. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-CTWQlkPh.js +1 -0
  74. package/dist/website/main/assets/kid-star-DWSbAoDk.js +1 -0
  75. package/dist/website/main/assets/md5-BVscxO09.js +1 -0
  76. package/dist/website/main/assets/settings-DyQPsIIk.js +1 -0
  77. package/dist/website/main/assets/supervised-user-circle-BzCVjgAw.js +1 -0
  78. package/dist/website/main/assets/sync-saved-locally-rounded-Dm232VG8.js +1 -0
  79. package/dist/website/main/assets/terminal-Cpm-3gfc.js +1 -0
  80. package/dist/website/main/assets/useCacheOssStore-BUYcRp33.js +1 -0
  81. package/dist/website/main/assets/{useCompEditStore-DCFM66C4.js → useCompEditStore-CCV6awON.js} +2 -2
  82. package/dist/website/main/assets/{useCompEditStore-DfjsDbzX.css → useCompEditStore-CxnuC31d.css} +1 -1
  83. package/dist/website/main/assets/useCompMetaLocalStore-ke8aERqo.js +1 -0
  84. package/dist/website/main/assets/useKeyword-BWlKaVGC.js +1 -0
  85. package/dist/website/main/assets/useMessage-DGNISOif.js +1 -0
  86. package/dist/website/main/assets/{useTeamHeaders-kxuE8Q8s.js → useTeamHeaders-CXV6avPM.js} +1 -1
  87. package/dist/website/main/assets/useVscodeOpen-W9IOZ_u_.js +1 -0
  88. package/dist/website/main/assets/{vendor-core-B1hRUZR_.js → vendor-core-BHu_Iam8.js} +1 -1
  89. package/dist/website/main/assets/{vendor-ui-CMQTpMsc.js → vendor-ui-Lm7VJSSH.js} +2 -2
  90. package/dist/website/main/assets/{vendor-xterm-mNFjEaKn.js → vendor-xterm-DbWxaMay.js} +1 -1
  91. package/dist/website/main/index.html +4 -4
  92. package/package.json +45 -45
  93. package/dist/website/item/assets/index-BZnlGnqP.css +0 -1
  94. package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-sJqw3hBL.js +0 -1
  95. package/dist/website/main/assets/BaseDialog.vue_vue_type_script_setup_true_lang-C89AreA-.js +0 -1
  96. package/dist/website/main/assets/BaseSegmented.vue_vue_type_script_setup_true_lang-DLPiWvzo.js +0 -1
  97. package/dist/website/main/assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-CPSb3doF.js +0 -1
  98. package/dist/website/main/assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-1uLX4usT.js +0 -1
  99. package/dist/website/main/assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-D2kQQ7qs.js +0 -1
  100. package/dist/website/main/assets/PanelBackground.vue_vue_type_script_setup_true_lang-BbH9Ke8c.js +0 -1
  101. package/dist/website/main/assets/cloud-upload-BZUdgCdI.js +0 -1
  102. package/dist/website/main/assets/core-CduF1cve.js +0 -3
  103. package/dist/website/main/assets/home-rounded-CAKszmlU.js +0 -1
  104. package/dist/website/main/assets/index-B2G95uaY.js +0 -1
  105. package/dist/website/main/assets/index-BI1iHj1p.js +0 -2
  106. package/dist/website/main/assets/index-BerOWbR5.js +0 -1
  107. package/dist/website/main/assets/index-Bg2Ll1MS.js +0 -1
  108. package/dist/website/main/assets/index-Bk2GHNDj.js +0 -1
  109. package/dist/website/main/assets/index-Bn9djJ1D.js +0 -1
  110. package/dist/website/main/assets/index-BoBZsqw_.js +0 -1
  111. package/dist/website/main/assets/index-Bth_SWAt.css +0 -1
  112. package/dist/website/main/assets/index-BvkOcMzw.js +0 -1
  113. package/dist/website/main/assets/index-BzJsbiup.js +0 -1
  114. package/dist/website/main/assets/index-C-ssDsWy.js +0 -1
  115. package/dist/website/main/assets/index-C4QJD9AO.js +0 -1
  116. package/dist/website/main/assets/index-CSqRH-KQ.js +0 -1
  117. package/dist/website/main/assets/index-CUiK2qn1.js +0 -1
  118. package/dist/website/main/assets/index-CZwZuk3-.js +0 -1
  119. package/dist/website/main/assets/index-ChEH9AoP.js +0 -1
  120. package/dist/website/main/assets/index-D4G87Mom.js +0 -1
  121. package/dist/website/main/assets/index-D6J3GPPV.js +0 -1
  122. package/dist/website/main/assets/index-DDnVu2nK.js +0 -1
  123. package/dist/website/main/assets/index-DJ4AvgpT.css +0 -1
  124. package/dist/website/main/assets/index-DL5xk_C7.js +0 -1
  125. package/dist/website/main/assets/index-DLWhyZSM.js +0 -2
  126. package/dist/website/main/assets/index-DO0i9je3.js +0 -5
  127. package/dist/website/main/assets/index-DYjUv_9s.js +0 -1
  128. package/dist/website/main/assets/index-De1XOjmk.js +0 -1
  129. package/dist/website/main/assets/index-DmCMPHi-.js +0 -1
  130. package/dist/website/main/assets/index-Dmk2WbAD.js +0 -1
  131. package/dist/website/main/assets/index-DryBDQGT.js +0 -1
  132. package/dist/website/main/assets/index-Dy_awGYi.js +0 -1
  133. package/dist/website/main/assets/index-QDcOlnTv.js +0 -1
  134. package/dist/website/main/assets/index-evWJEs_J.js +0 -1
  135. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BCWiMLjz.js +0 -1
  136. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-BHRL6G5S.js +0 -1
  137. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CKf4glow.js +0 -1
  138. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CVAkHJvA.js +0 -1
  139. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cnaq7WZP.js +0 -1
  140. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-IxBKq7Py.js +0 -2
  141. package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-qqOG6j-E.js +0 -1
  142. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-Cm4wH59u.js +0 -6
  143. package/dist/website/main/assets/index.vue_vue_type_style_index_0_lang-D2h7hdt0.js +0 -1
  144. package/dist/website/main/assets/kid-star-FcmIH9T1.js +0 -1
  145. package/dist/website/main/assets/md5-DEHaPvGx.js +0 -1
  146. package/dist/website/main/assets/settings-DST6rYZI.js +0 -1
  147. package/dist/website/main/assets/supervised-user-circle-5toxzbuX.js +0 -1
  148. package/dist/website/main/assets/sync-saved-locally-rounded-ekj1nT7F.js +0 -1
  149. package/dist/website/main/assets/terminal-CiPichiX.js +0 -1
  150. package/dist/website/main/assets/useCacheOssStore-D1ihuvZi.js +0 -1
  151. package/dist/website/main/assets/useCompMetaLocalStore-CnMRn13T.js +0 -1
  152. package/dist/website/main/assets/useKeyword-2O8Qbig-.js +0 -1
  153. package/dist/website/main/assets/useMessage-C_SU5QaN.js +0 -1
  154. package/dist/website/main/assets/useVscodeOpen-CA_im4Vj.js +0 -1
@@ -6,4 +6,4 @@ WARNING: This link could potentially be dangerous`)){const s=window.open();if(s)
6
6
  `:`
7
7
  `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(d){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),s.isLinux&&d&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(d){const m=this._getMouseBufferCoords(d),E=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!!(E&&k&&m)&&this._areCoordsInSelection(m,E,k)}isCellInSelection(d,m){const E=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!(!E||!k)&&this._areCoordsInSelection([d,m],E,k)}_areCoordsInSelection(d,m,E){return d[1]>m[1]&&d[1]<E[1]||m[1]===E[1]&&d[1]===m[1]&&d[0]>=m[0]&&d[0]<E[0]||m[1]<E[1]&&d[1]===E[1]&&d[0]<E[0]||m[1]<E[1]&&d[1]===m[1]&&d[0]>=m[0]}_selectWordAtCursor(d,m){const E=this._linkifier.currentLink?.link?.range;if(E)return this._model.selectionStart=[E.start.x-1,E.start.y-1],this._model.selectionStartLength=(0,e.getRangeLength)(E,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const k=this._getMouseBufferCoords(d);return!!k&&(this._selectWordAt(k,m),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(d,m){this._model.clearSelection(),d=Math.max(d,0),m=Math.min(m,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,d],this._model.selectionEnd=[this._bufferService.cols,m],this.refresh(),this._onSelectionChange.fire()}_handleTrim(d){this._model.handleTrim(d)&&this.refresh()}_getMouseBufferCoords(d){const m=this._mouseService.getCoords(d,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(m)return m[0]--,m[1]--,m[1]+=this._bufferService.buffer.ydisp,m}_getMouseEventScrollAmount(d){let m=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,d,this._screenElement)[1];const E=this._renderService.dimensions.css.canvas.height;return m>=0&&m<=E?0:(m>E&&(m-=E),m=Math.min(Math.max(m,-50),50),m/=50,m/Math.abs(m)+Math.round(14*m))}shouldForceSelection(d){return s.isMac?d.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:d.shiftKey}handleMouseDown(d){if(this._mouseDownTimeStamp=d.timeStamp,(d.button!==2||!this.hasSelection)&&d.button===0){if(!this._enabled){if(!this.shouldForceSelection(d))return;d.stopPropagation()}d.preventDefault(),this._dragScrollAmount=0,this._enabled&&d.shiftKey?this._handleIncrementalClick(d):d.detail===1?this._handleSingleClick(d):d.detail===2?this._handleDoubleClick(d):d.detail===3&&this._handleTripleClick(d),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(d){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(d))}_handleSingleClick(d){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(d)?3:0,this._model.selectionStart=this._getMouseBufferCoords(d),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const m=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);m&&m.length!==this._model.selectionStart[0]&&m.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(d){this._selectWordAtCursor(d,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(d){const m=this._getMouseBufferCoords(d);m&&(this._activeSelectionMode=2,this._selectLineAt(m[1]))}shouldColumnSelect(d){return d.altKey&&!(s.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(d){if(d.stopImmediatePropagation(),!this._model.selectionStart)return;const m=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(d),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(d),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const E=this._bufferService.buffer;if(this._model.selectionEnd[1]<E.lines.length){const k=E.lines.get(this._model.selectionEnd[1]);k&&k.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}m&&m[0]===this._model.selectionEnd[0]&&m[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const d=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(d.ydisp+this._bufferService.rows,d.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=d.ydisp),this.refresh()}}_handleMouseUp(d){const m=d.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&m<500&&d.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const E=this._mouseService.getCoords(d,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(E&&E[0]!==void 0&&E[1]!==void 0){const k=(0,c.moveToCellSequence)(E[0]-1,E[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(k,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const d=this._model.finalSelectionStart,m=this._model.finalSelectionEnd,E=!(!d||!m||d[0]===m[0]&&d[1]===m[1]);E?d&&m&&(this._oldSelectionStart&&this._oldSelectionEnd&&d[0]===this._oldSelectionStart[0]&&d[1]===this._oldSelectionStart[1]&&m[0]===this._oldSelectionEnd[0]&&m[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(d,m,E)):this._oldHasSelection&&this._fireOnSelectionChange(d,m,E)}_fireOnSelectionChange(d,m,E){this._oldSelectionStart=d,this._oldSelectionEnd=m,this._oldHasSelection=E,this._onSelectionChange.fire()}_handleBufferActivate(d){this.clearSelection(),this._trimListener.dispose(),this._trimListener=d.activeBuffer.lines.onTrim((m=>this._handleTrim(m)))}_convertViewportColToCharacterIndex(d,m){let E=m;for(let k=0;m>=k;k++){const D=d.loadCell(k,this._workCell).getChars().length;this._workCell.getWidth()===0?E--:D>1&&m!==k&&(E+=D-1)}return E}setSelection(d,m,E){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[d,m],this._model.selectionStartLength=E,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(d){this._isClickInSelection(d)||(this._selectWordAtCursor(d,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(d,m,E=!0,k=!0){if(d[0]>=this._bufferService.cols)return;const D=this._bufferService.buffer,b=D.lines.get(d[1]);if(!b)return;const x=D.translateBufferLineToString(d[1],!1);let M=this._convertViewportColToCharacterIndex(b,d[0]),I=M;const U=d[0]-M;let P=0,S=0,w=0,y=0;if(x.charAt(M)===" "){for(;M>0&&x.charAt(M-1)===" ";)M--;for(;I<x.length&&x.charAt(I+1)===" ";)I++}else{let H=d[0],N=d[0];b.getWidth(H)===0&&(P++,H--),b.getWidth(N)===2&&(S++,N++);const $=b.getString(N).length;for($>1&&(y+=$-1,I+=$-1);H>0&&M>0&&!this._isCharWordSeparator(b.loadCell(H-1,this._workCell));){b.loadCell(H-1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===0?(P++,H--):R>1&&(w+=R-1,M-=R-1),M--,H--}for(;N<b.length&&I+1<x.length&&!this._isCharWordSeparator(b.loadCell(N+1,this._workCell));){b.loadCell(N+1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===2?(S++,N++):R>1&&(y+=R-1,I+=R-1),I++,N++}}I++;let L=M+U-P+w,T=Math.min(this._bufferService.cols,I-M+P+S-w-y);if(m||x.slice(M,I).trim()!==""){if(E&&L===0&&b.getCodePoint(0)!==32){const H=D.lines.get(d[1]-1);if(H&&b.isWrapped&&H.getCodePoint(this._bufferService.cols-1)!==32){const N=this._getWordAt([this._bufferService.cols-1,d[1]-1],!1,!0,!1);if(N){const $=this._bufferService.cols-N.start;L-=$,T+=$}}}if(k&&L+T===this._bufferService.cols&&b.getCodePoint(this._bufferService.cols-1)!==32){const H=D.lines.get(d[1]+1);if(H?.isWrapped&&H.getCodePoint(0)!==32){const N=this._getWordAt([0,d[1]+1],!1,!1,!0);N&&(T+=N.length)}}return{start:L,length:T}}}_selectWordAt(d,m){const E=this._getWordAt(d,m);if(E){for(;E.start<0;)E.start+=this._bufferService.cols,d[1]--;this._model.selectionStart=[E.start,d[1]],this._model.selectionStartLength=E.length}}_selectToWordAt(d){const m=this._getWordAt(d,!0);if(m){let E=d[1];for(;m.start<0;)m.start+=this._bufferService.cols,E--;if(!this._model.areSelectionValuesReversed())for(;m.start+m.length>this._bufferService.cols;)m.length-=this._bufferService.cols,E++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?m.start:m.start+m.length,E]}}_isCharWordSeparator(d){return d.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(d.getChars())>=0}_selectLineAt(d){const m=this._bufferService.buffer.getWrappedRangeForLine(d),E={start:{x:0,y:m.first},end:{x:this._bufferService.cols-1,y:m.last}};this._model.selectionStart=[0,m.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,e.getRangeLength)(E,this._bufferService.cols)}};r.SelectionService=g=l([_(3,a.IBufferService),_(4,a.ICoreService),_(5,p.IMouseService),_(6,a.IOptionsService),_(7,p.IRenderService),_(8,p.ICoreBrowserService)],g)},4725:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ILinkProviderService=r.IThemeService=r.ICharacterJoinerService=r.ISelectionService=r.IRenderService=r.IMouseService=r.ICoreBrowserService=r.ICharSizeService=void 0;const l=o(8343);r.ICharSizeService=(0,l.createDecorator)("CharSizeService"),r.ICoreBrowserService=(0,l.createDecorator)("CoreBrowserService"),r.IMouseService=(0,l.createDecorator)("MouseService"),r.IRenderService=(0,l.createDecorator)("RenderService"),r.ISelectionService=(0,l.createDecorator)("SelectionService"),r.ICharacterJoinerService=(0,l.createDecorator)("CharacterJoinerService"),r.IThemeService=(0,l.createDecorator)("ThemeService"),r.ILinkProviderService=(0,l.createDecorator)("LinkProviderService")},6731:function(A,r,o){var l=this&&this.__decorate||function(g,d,m,E){var k,D=arguments.length,b=D<3?d:E===null?E=Object.getOwnPropertyDescriptor(d,m):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,d,m,E);else for(var x=g.length-1;x>=0;x--)(k=g[x])&&(b=(D<3?k(b):D>3?k(d,m,b):k(d,m))||b);return D>3&&b&&Object.defineProperty(d,m,b),b},_=this&&this.__param||function(g,d){return function(m,E){d(m,E,g)}};Object.defineProperty(r,"__esModule",{value:!0}),r.ThemeService=r.DEFAULT_ANSI_COLORS=void 0;const n=o(7239),c=o(8055),u=o(8460),p=o(844),h=o(2585),t=c.css.toColor("#ffffff"),s=c.css.toColor("#000000"),e=c.css.toColor("#ffffff"),i=c.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};r.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const g=[c.css.toColor("#2e3436"),c.css.toColor("#cc0000"),c.css.toColor("#4e9a06"),c.css.toColor("#c4a000"),c.css.toColor("#3465a4"),c.css.toColor("#75507b"),c.css.toColor("#06989a"),c.css.toColor("#d3d7cf"),c.css.toColor("#555753"),c.css.toColor("#ef2929"),c.css.toColor("#8ae234"),c.css.toColor("#fce94f"),c.css.toColor("#729fcf"),c.css.toColor("#ad7fa8"),c.css.toColor("#34e2e2"),c.css.toColor("#eeeeec")],d=[0,95,135,175,215,255];for(let m=0;m<216;m++){const E=d[m/36%6|0],k=d[m/6%6|0],D=d[m%6];g.push({css:c.channels.toCss(E,k,D),rgba:c.channels.toRgba(E,k,D)})}for(let m=0;m<24;m++){const E=8+10*m;g.push({css:c.channels.toCss(E,E,E),rgba:c.channels.toRgba(E,E,E)})}return g})());let f=r.ThemeService=class extends p.Disposable{get colors(){return this._colors}constructor(g){super(),this._optionsService=g,this._contrastCache=new n.ColorContrastCache,this._halfContrastCache=new n.ColorContrastCache,this._onChangeColors=this.register(new u.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:t,background:s,cursor:e,cursorAccent:i,selectionForeground:void 0,selectionBackgroundTransparent:a,selectionBackgroundOpaque:c.color.blend(s,a),selectionInactiveBackgroundTransparent:a,selectionInactiveBackgroundOpaque:c.color.blend(s,a),ansi:r.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(g={}){const d=this._colors;if(d.foreground=v(g.foreground,t),d.background=v(g.background,s),d.cursor=v(g.cursor,e),d.cursorAccent=v(g.cursorAccent,i),d.selectionBackgroundTransparent=v(g.selectionBackground,a),d.selectionBackgroundOpaque=c.color.blend(d.background,d.selectionBackgroundTransparent),d.selectionInactiveBackgroundTransparent=v(g.selectionInactiveBackground,d.selectionBackgroundTransparent),d.selectionInactiveBackgroundOpaque=c.color.blend(d.background,d.selectionInactiveBackgroundTransparent),d.selectionForeground=g.selectionForeground?v(g.selectionForeground,c.NULL_COLOR):void 0,d.selectionForeground===c.NULL_COLOR&&(d.selectionForeground=void 0),c.color.isOpaque(d.selectionBackgroundTransparent)&&(d.selectionBackgroundTransparent=c.color.opacity(d.selectionBackgroundTransparent,.3)),c.color.isOpaque(d.selectionInactiveBackgroundTransparent)&&(d.selectionInactiveBackgroundTransparent=c.color.opacity(d.selectionInactiveBackgroundTransparent,.3)),d.ansi=r.DEFAULT_ANSI_COLORS.slice(),d.ansi[0]=v(g.black,r.DEFAULT_ANSI_COLORS[0]),d.ansi[1]=v(g.red,r.DEFAULT_ANSI_COLORS[1]),d.ansi[2]=v(g.green,r.DEFAULT_ANSI_COLORS[2]),d.ansi[3]=v(g.yellow,r.DEFAULT_ANSI_COLORS[3]),d.ansi[4]=v(g.blue,r.DEFAULT_ANSI_COLORS[4]),d.ansi[5]=v(g.magenta,r.DEFAULT_ANSI_COLORS[5]),d.ansi[6]=v(g.cyan,r.DEFAULT_ANSI_COLORS[6]),d.ansi[7]=v(g.white,r.DEFAULT_ANSI_COLORS[7]),d.ansi[8]=v(g.brightBlack,r.DEFAULT_ANSI_COLORS[8]),d.ansi[9]=v(g.brightRed,r.DEFAULT_ANSI_COLORS[9]),d.ansi[10]=v(g.brightGreen,r.DEFAULT_ANSI_COLORS[10]),d.ansi[11]=v(g.brightYellow,r.DEFAULT_ANSI_COLORS[11]),d.ansi[12]=v(g.brightBlue,r.DEFAULT_ANSI_COLORS[12]),d.ansi[13]=v(g.brightMagenta,r.DEFAULT_ANSI_COLORS[13]),d.ansi[14]=v(g.brightCyan,r.DEFAULT_ANSI_COLORS[14]),d.ansi[15]=v(g.brightWhite,r.DEFAULT_ANSI_COLORS[15]),g.extendedAnsi){const m=Math.min(d.ansi.length-16,g.extendedAnsi.length);for(let E=0;E<m;E++)d.ansi[E+16]=v(g.extendedAnsi[E],r.DEFAULT_ANSI_COLORS[E+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(g){this._restoreColor(g),this._onChangeColors.fire(this.colors)}_restoreColor(g){if(g!==void 0)switch(g){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[g]=this._restoreColors.ansi[g]}else for(let d=0;d<this._restoreColors.ansi.length;++d)this._colors.ansi[d]=this._restoreColors.ansi[d]}modifyColors(g){g(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function v(g,d){if(g!==void 0)try{return c.css.toColor(g)}catch{}return d}r.ThemeService=f=l([_(0,h.IOptionsService)],f)},6349:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CircularList=void 0;const l=o(8460),_=o(844);class n extends _.Disposable{constructor(u){super(),this._maxLength=u,this.onDeleteEmitter=this.register(new l.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new l.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new l.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(u){if(this._maxLength===u)return;const p=new Array(u);for(let h=0;h<Math.min(u,this.length);h++)p[h]=this._array[this._getCyclicIndex(h)];this._array=p,this._maxLength=u,this._startIndex=0}get length(){return this._length}set length(u){if(u>this._length)for(let p=this._length;p<u;p++)this._array[p]=void 0;this._length=u}get(u){return this._array[this._getCyclicIndex(u)]}set(u,p){this._array[this._getCyclicIndex(u)]=p}push(u){this._array[this._getCyclicIndex(this._length)]=u,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(u,p,...h){if(p){for(let t=u;t<this._length-p;t++)this._array[this._getCyclicIndex(t)]=this._array[this._getCyclicIndex(t+p)];this._length-=p,this.onDeleteEmitter.fire({index:u,amount:p})}for(let t=this._length-1;t>=u;t--)this._array[this._getCyclicIndex(t+h.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;t<h.length;t++)this._array[this._getCyclicIndex(u+t)]=h[t];if(h.length&&this.onInsertEmitter.fire({index:u,amount:h.length}),this._length+h.length>this._maxLength){const t=this._length+h.length-this._maxLength;this._startIndex+=t,this._length=this._maxLength,this.onTrimEmitter.fire(t)}else this._length+=h.length}trimStart(u){u>this._length&&(u=this._length),this._startIndex+=u,this._length-=u,this.onTrimEmitter.fire(u)}shiftElements(u,p,h){if(!(p<=0)){if(u<0||u>=this._length)throw new Error("start argument out of range");if(u+h<0)throw new Error("Cannot shift elements in list beyond index 0");if(h>0){for(let s=p-1;s>=0;s--)this.set(u+s+h,this.get(u+s));const t=u+p+h-this._length;if(t>0)for(this._length+=t;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let t=0;t<p;t++)this.set(u+t+h,this.get(u+t))}}_getCyclicIndex(u){return(this._startIndex+u)%this._maxLength}}r.CircularList=n},1439:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.clone=void 0,r.clone=function o(l,_=5){if(typeof l!="object")return l;const n=Array.isArray(l)?[]:{};for(const c in l)n[c]=_<=1?l[c]:l[c]&&o(l[c],_-1);return n}},8055:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.contrastRatio=r.toPaddedHex=r.rgba=r.rgb=r.css=r.color=r.channels=r.NULL_COLOR=void 0;let o=0,l=0,_=0,n=0;var c,u,p,h,t;function s(i){const a=i.toString(16);return a.length<2?"0"+a:a}function e(i,a){return i<a?(a+.05)/(i+.05):(i+.05)/(a+.05)}r.NULL_COLOR={css:"#00000000",rgba:0},(function(i){i.toCss=function(a,f,v,g){return g!==void 0?`#${s(a)}${s(f)}${s(v)}${s(g)}`:`#${s(a)}${s(f)}${s(v)}`},i.toRgba=function(a,f,v,g=255){return(a<<24|f<<16|v<<8|g)>>>0},i.toColor=function(a,f,v,g){return{css:i.toCss(a,f,v,g),rgba:i.toRgba(a,f,v,g)}}})(c||(r.channels=c={})),(function(i){function a(f,v){return n=Math.round(255*v),[o,l,_]=t.toChannels(f.rgba),{css:c.toCss(o,l,_,n),rgba:c.toRgba(o,l,_,n)}}i.blend=function(f,v){if(n=(255&v.rgba)/255,n===1)return{css:v.css,rgba:v.rgba};const g=v.rgba>>24&255,d=v.rgba>>16&255,m=v.rgba>>8&255,E=f.rgba>>24&255,k=f.rgba>>16&255,D=f.rgba>>8&255;return o=E+Math.round((g-E)*n),l=k+Math.round((d-k)*n),_=D+Math.round((m-D)*n),{css:c.toCss(o,l,_),rgba:c.toRgba(o,l,_)}},i.isOpaque=function(f){return(255&f.rgba)==255},i.ensureContrastRatio=function(f,v,g){const d=t.ensureContrastRatio(f.rgba,v.rgba,g);if(d)return c.toColor(d>>24&255,d>>16&255,d>>8&255)},i.opaque=function(f){const v=(255|f.rgba)>>>0;return[o,l,_]=t.toChannels(v),{css:c.toCss(o,l,_),rgba:v}},i.opacity=a,i.multiplyOpacity=function(f,v){return n=255&f.rgba,a(f,n*v/255)},i.toColorRGB=function(f){return[f.rgba>>24&255,f.rgba>>16&255,f.rgba>>8&255]}})(u||(r.color=u={})),(function(i){let a,f;try{const v=document.createElement("canvas");v.width=1,v.height=1;const g=v.getContext("2d",{willReadFrequently:!0});g&&(a=g,a.globalCompositeOperation="copy",f=a.createLinearGradient(0,0,1,1))}catch{}i.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return o=parseInt(v.slice(1,2).repeat(2),16),l=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),c.toColor(o,l,_);case 5:return o=parseInt(v.slice(1,2).repeat(2),16),l=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),n=parseInt(v.slice(4,5).repeat(2),16),c.toColor(o,l,_,n);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const g=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(g)return o=parseInt(g[1]),l=parseInt(g[2]),_=parseInt(g[3]),n=Math.round(255*(g[5]===void 0?1:parseFloat(g[5]))),c.toColor(o,l,_,n);if(!a||!f)throw new Error("css.toColor: Unsupported css format");if(a.fillStyle=f,a.fillStyle=v,typeof a.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(a.fillRect(0,0,1,1),[o,l,_,n]=a.getImageData(0,0,1,1).data,n!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:c.toRgba(o,l,_,n),css:v}}})(p||(r.css=p={})),(function(i){function a(f,v,g){const d=f/255,m=v/255,E=g/255;return .2126*(d<=.03928?d/12.92:Math.pow((d+.055)/1.055,2.4))+.7152*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.0722*(E<=.03928?E/12.92:Math.pow((E+.055)/1.055,2.4))}i.relativeLuminance=function(f){return a(f>>16&255,f>>8&255,255&f)},i.relativeLuminance2=a})(h||(r.rgb=h={})),(function(i){function a(v,g,d){const m=v>>24&255,E=v>>16&255,k=v>>8&255;let D=g>>24&255,b=g>>16&255,x=g>>8&255,M=e(h.relativeLuminance2(D,b,x),h.relativeLuminance2(m,E,k));for(;M<d&&(D>0||b>0||x>0);)D-=Math.max(0,Math.ceil(.1*D)),b-=Math.max(0,Math.ceil(.1*b)),x-=Math.max(0,Math.ceil(.1*x)),M=e(h.relativeLuminance2(D,b,x),h.relativeLuminance2(m,E,k));return(D<<24|b<<16|x<<8|255)>>>0}function f(v,g,d){const m=v>>24&255,E=v>>16&255,k=v>>8&255;let D=g>>24&255,b=g>>16&255,x=g>>8&255,M=e(h.relativeLuminance2(D,b,x),h.relativeLuminance2(m,E,k));for(;M<d&&(D<255||b<255||x<255);)D=Math.min(255,D+Math.ceil(.1*(255-D))),b=Math.min(255,b+Math.ceil(.1*(255-b))),x=Math.min(255,x+Math.ceil(.1*(255-x))),M=e(h.relativeLuminance2(D,b,x),h.relativeLuminance2(m,E,k));return(D<<24|b<<16|x<<8|255)>>>0}i.blend=function(v,g){if(n=(255&g)/255,n===1)return g;const d=g>>24&255,m=g>>16&255,E=g>>8&255,k=v>>24&255,D=v>>16&255,b=v>>8&255;return o=k+Math.round((d-k)*n),l=D+Math.round((m-D)*n),_=b+Math.round((E-b)*n),c.toRgba(o,l,_)},i.ensureContrastRatio=function(v,g,d){const m=h.relativeLuminance(v>>8),E=h.relativeLuminance(g>>8);if(e(m,E)<d){if(E<m){const b=a(v,g,d),x=e(m,h.relativeLuminance(b>>8));if(x<d){const M=f(v,g,d);return x>e(m,h.relativeLuminance(M>>8))?b:M}return b}const k=f(v,g,d),D=e(m,h.relativeLuminance(k>>8));if(D<d){const b=a(v,g,d);return D>e(m,h.relativeLuminance(b>>8))?k:b}return k}},i.reduceLuminance=a,i.increaseLuminance=f,i.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(t||(r.rgba=t={})),r.toPaddedHex=s,r.contrastRatio=e},8969:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoreTerminal=void 0;const l=o(844),_=o(2585),n=o(4348),c=o(7866),u=o(744),p=o(7302),h=o(6975),t=o(8460),s=o(1753),e=o(1480),i=o(7994),a=o(9282),f=o(5435),v=o(5981),g=o(2660);let d=!1;class m extends l.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new t.EventEmitter),this._onScroll.event((k=>{this._onScrollApi?.fire(k.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(k){for(const D in k)this.optionsService.options[D]=k[D]}constructor(k){super(),this._windowsWrappingHeuristics=this.register(new l.MutableDisposable),this._onBinary=this.register(new t.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new t.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new t.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new t.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new t.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new t.EventEmitter),this._instantiationService=new n.InstantiationService,this.optionsService=this.register(new p.OptionsService(k)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(u.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(c.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(h.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(s.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(e.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(i.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(g.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new f.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,t.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,t.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,t.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,t.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((D=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((D=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new v.WriteBuffer(((D,b)=>this._inputHandler.parse(D,b)))),this.register((0,t.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(k,D){this._writeBuffer.write(k,D)}writeSync(k,D){this._logService.logLevel<=_.LogLevelEnum.WARN&&!d&&(this._logService.warn("writeSync is unreliable and will be removed soon."),d=!0),this._writeBuffer.writeSync(k,D)}input(k,D=!0){this.coreService.triggerDataEvent(k,D)}resize(k,D){isNaN(k)||isNaN(D)||(k=Math.max(k,u.MINIMUM_COLS),D=Math.max(D,u.MINIMUM_ROWS),this._bufferService.resize(k,D))}scroll(k,D=!1){this._bufferService.scroll(k,D)}scrollLines(k,D,b){this._bufferService.scrollLines(k,D,b)}scrollPages(k){this.scrollLines(k*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(k){const D=k-this._bufferService.buffer.ydisp;D!==0&&this.scrollLines(D)}registerEscHandler(k,D){return this._inputHandler.registerEscHandler(k,D)}registerDcsHandler(k,D){return this._inputHandler.registerDcsHandler(k,D)}registerCsiHandler(k,D){return this._inputHandler.registerCsiHandler(k,D)}registerOscHandler(k,D){return this._inputHandler.registerOscHandler(k,D)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let k=!1;const D=this.optionsService.rawOptions.windowsPty;D&&D.buildNumber!==void 0&&D.buildNumber!==void 0?k=D.backend==="conpty"&&D.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(k=!0),k?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const k=[];k.push(this.onLineFeed(a.updateWindowsModeWrappedState.bind(null,this._bufferService))),k.push(this.registerCsiHandler({final:"H"},(()=>((0,a.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,l.toDisposable)((()=>{for(const D of k)D.dispose()}))}}}r.CoreTerminal=m},8460:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===o)return void this._listeners.splice(l,1)}}})),this._event}fire(o,l){const _=[];for(let n=0;n<this._listeners.length;n++)_.push(this._listeners[n]);for(let n=0;n<_.length;n++)_[n].call(void 0,o,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,l){return o((_=>l.fire(_)))},r.runAndSubscribe=function(o,l){return l(void 0),o((_=>l(_)))}},5435:function(A,r,o){var l=this&&this.__decorate||function(P,S,w,y){var L,T=arguments.length,H=T<3?S:y===null?y=Object.getOwnPropertyDescriptor(S,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(P,S,w,y);else for(var N=P.length-1;N>=0;N--)(L=P[N])&&(H=(T<3?L(H):T>3?L(S,w,H):L(S,w))||H);return T>3&&H&&Object.defineProperty(S,w,H),H},_=this&&this.__param||function(P,S){return function(w,y){S(w,y,P)}};Object.defineProperty(r,"__esModule",{value:!0}),r.InputHandler=r.WindowsOptionsReportType=void 0;const n=o(2584),c=o(7116),u=o(2015),p=o(844),h=o(482),t=o(8437),s=o(8460),e=o(643),i=o(511),a=o(3734),f=o(2585),v=o(1480),g=o(6242),d=o(6351),m=o(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},k=131072;function D(P,S){if(P>24)return S.setWinLines||!1;switch(P){case 1:return!!S.restoreWin;case 2:return!!S.minimizeWin;case 3:return!!S.setWinPosition;case 4:return!!S.setWinSizePixels;case 5:return!!S.raiseWin;case 6:return!!S.lowerWin;case 7:return!!S.refreshWin;case 8:return!!S.setWinSizeChars;case 9:return!!S.maximizeWin;case 10:return!!S.fullscreenWin;case 11:return!!S.getWinState;case 13:return!!S.getWinPosition;case 14:return!!S.getWinSizePixels;case 15:return!!S.getScreenSizePixels;case 16:return!!S.getCellSizePixels;case 18:return!!S.getWinSizeChars;case 19:return!!S.getScreenSizeChars;case 20:return!!S.getIconTitle;case 21:return!!S.getWinTitle;case 22:return!!S.pushTitle;case 23:return!!S.popTitle;case 24:return!!S.setWinLines}return!1}var b;(function(P){P[P.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",P[P.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(b||(r.WindowsOptionsReportType=b={}));let x=0;class M extends p.Disposable{getAttrData(){return this._curAttrData}constructor(S,w,y,L,T,H,N,$,R=new u.EscapeSequenceParser){super(),this._bufferService=S,this._charsetService=w,this._coreService=y,this._logService=L,this._optionsService=T,this._oscLinkService=H,this._coreMouseService=N,this._unicodeService=$,this._parser=R,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new h.StringToUtf32,this._utf8Decoder=new h.Utf8ToUtf32,this._workCell=new i.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new s.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new s.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new s.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new s.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new s.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new s.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new s.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new s.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new s.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new s.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new s.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new s.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new s.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new I(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._parser.setCsiHandlerFallback(((C,B)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(C),params:B.toArray()})})),this._parser.setEscHandlerFallback((C=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(C)})})),this._parser.setExecuteHandlerFallback((C=>{this._logService.debug("Unknown EXECUTE code: ",{code:C})})),this._parser.setOscHandlerFallback(((C,B,O)=>{this._logService.debug("Unknown OSC code: ",{identifier:C,action:B,data:O})})),this._parser.setDcsHandlerFallback(((C,B,O)=>{B==="HOOK"&&(O=O.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(C),action:B,payload:O})})),this._parser.setPrintHandler(((C,B,O)=>this.print(C,B,O))),this._parser.registerCsiHandler({final:"@"},(C=>this.insertChars(C))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(C=>this.scrollLeft(C))),this._parser.registerCsiHandler({final:"A"},(C=>this.cursorUp(C))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(C=>this.scrollRight(C))),this._parser.registerCsiHandler({final:"B"},(C=>this.cursorDown(C))),this._parser.registerCsiHandler({final:"C"},(C=>this.cursorForward(C))),this._parser.registerCsiHandler({final:"D"},(C=>this.cursorBackward(C))),this._parser.registerCsiHandler({final:"E"},(C=>this.cursorNextLine(C))),this._parser.registerCsiHandler({final:"F"},(C=>this.cursorPrecedingLine(C))),this._parser.registerCsiHandler({final:"G"},(C=>this.cursorCharAbsolute(C))),this._parser.registerCsiHandler({final:"H"},(C=>this.cursorPosition(C))),this._parser.registerCsiHandler({final:"I"},(C=>this.cursorForwardTab(C))),this._parser.registerCsiHandler({final:"J"},(C=>this.eraseInDisplay(C,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(C=>this.eraseInDisplay(C,!0))),this._parser.registerCsiHandler({final:"K"},(C=>this.eraseInLine(C,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(C=>this.eraseInLine(C,!0))),this._parser.registerCsiHandler({final:"L"},(C=>this.insertLines(C))),this._parser.registerCsiHandler({final:"M"},(C=>this.deleteLines(C))),this._parser.registerCsiHandler({final:"P"},(C=>this.deleteChars(C))),this._parser.registerCsiHandler({final:"S"},(C=>this.scrollUp(C))),this._parser.registerCsiHandler({final:"T"},(C=>this.scrollDown(C))),this._parser.registerCsiHandler({final:"X"},(C=>this.eraseChars(C))),this._parser.registerCsiHandler({final:"Z"},(C=>this.cursorBackwardTab(C))),this._parser.registerCsiHandler({final:"`"},(C=>this.charPosAbsolute(C))),this._parser.registerCsiHandler({final:"a"},(C=>this.hPositionRelative(C))),this._parser.registerCsiHandler({final:"b"},(C=>this.repeatPrecedingCharacter(C))),this._parser.registerCsiHandler({final:"c"},(C=>this.sendDeviceAttributesPrimary(C))),this._parser.registerCsiHandler({prefix:">",final:"c"},(C=>this.sendDeviceAttributesSecondary(C))),this._parser.registerCsiHandler({final:"d"},(C=>this.linePosAbsolute(C))),this._parser.registerCsiHandler({final:"e"},(C=>this.vPositionRelative(C))),this._parser.registerCsiHandler({final:"f"},(C=>this.hVPosition(C))),this._parser.registerCsiHandler({final:"g"},(C=>this.tabClear(C))),this._parser.registerCsiHandler({final:"h"},(C=>this.setMode(C))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(C=>this.setModePrivate(C))),this._parser.registerCsiHandler({final:"l"},(C=>this.resetMode(C))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(C=>this.resetModePrivate(C))),this._parser.registerCsiHandler({final:"m"},(C=>this.charAttributes(C))),this._parser.registerCsiHandler({final:"n"},(C=>this.deviceStatus(C))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(C=>this.deviceStatusPrivate(C))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(C=>this.softReset(C))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(C=>this.setCursorStyle(C))),this._parser.registerCsiHandler({final:"r"},(C=>this.setScrollRegion(C))),this._parser.registerCsiHandler({final:"s"},(C=>this.saveCursor(C))),this._parser.registerCsiHandler({final:"t"},(C=>this.windowOptions(C))),this._parser.registerCsiHandler({final:"u"},(C=>this.restoreCursor(C))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(C=>this.insertColumns(C))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(C=>this.deleteColumns(C))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(C=>this.selectProtected(C))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(C=>this.requestMode(C,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(C=>this.requestMode(C,!1))),this._parser.setExecuteHandler(n.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(n.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(n.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(n.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(n.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(n.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(n.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(n.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(n.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(n.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new g.OscHandler((C=>(this.setTitle(C),this.setIconName(C),!0)))),this._parser.registerOscHandler(1,new g.OscHandler((C=>this.setIconName(C)))),this._parser.registerOscHandler(2,new g.OscHandler((C=>this.setTitle(C)))),this._parser.registerOscHandler(4,new g.OscHandler((C=>this.setOrReportIndexedColor(C)))),this._parser.registerOscHandler(8,new g.OscHandler((C=>this.setHyperlink(C)))),this._parser.registerOscHandler(10,new g.OscHandler((C=>this.setOrReportFgColor(C)))),this._parser.registerOscHandler(11,new g.OscHandler((C=>this.setOrReportBgColor(C)))),this._parser.registerOscHandler(12,new g.OscHandler((C=>this.setOrReportCursorColor(C)))),this._parser.registerOscHandler(104,new g.OscHandler((C=>this.restoreIndexedColor(C)))),this._parser.registerOscHandler(110,new g.OscHandler((C=>this.restoreFgColor(C)))),this._parser.registerOscHandler(111,new g.OscHandler((C=>this.restoreBgColor(C)))),this._parser.registerOscHandler(112,new g.OscHandler((C=>this.restoreCursorColor(C)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const C in c.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:C},(()=>this.selectCharset("("+C))),this._parser.registerEscHandler({intermediates:")",final:C},(()=>this.selectCharset(")"+C))),this._parser.registerEscHandler({intermediates:"*",final:C},(()=>this.selectCharset("*"+C))),this._parser.registerEscHandler({intermediates:"+",final:C},(()=>this.selectCharset("+"+C))),this._parser.registerEscHandler({intermediates:"-",final:C},(()=>this.selectCharset("-"+C))),this._parser.registerEscHandler({intermediates:".",final:C},(()=>this.selectCharset("."+C))),this._parser.registerEscHandler({intermediates:"/",final:C},(()=>this.selectCharset("/"+C)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((C=>(this._logService.error("Parsing error: ",C),C))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new d.DcsHandler(((C,B)=>this.requestStatusString(C,B))))}_preserveStack(S,w,y,L){this._parseStack.paused=!0,this._parseStack.cursorStartX=S,this._parseStack.cursorStartY=w,this._parseStack.decodedLength=y,this._parseStack.position=L}_logSlowResolvingAsync(S){this._logService.logLevel<=f.LogLevelEnum.WARN&&Promise.race([S,new Promise(((w,y)=>setTimeout((()=>y("#SLOW_TIMEOUT")),5e3)))]).catch((w=>{if(w!=="#SLOW_TIMEOUT")throw w;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(S,w){let y,L=this._activeBuffer.x,T=this._activeBuffer.y,H=0;const N=this._parseStack.paused;if(N){if(y=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,w))return this._logSlowResolvingAsync(y),y;L=this._parseStack.cursorStartX,T=this._parseStack.cursorStartY,this._parseStack.paused=!1,S.length>k&&(H=this._parseStack.position+k)}if(this._logService.logLevel<=f.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof S=="string"?` "${S}"`:` "${Array.prototype.map.call(S,(C=>String.fromCharCode(C))).join("")}"`),typeof S=="string"?S.split("").map((C=>C.charCodeAt(0))):S),this._parseBuffer.length<S.length&&this._parseBuffer.length<k&&(this._parseBuffer=new Uint32Array(Math.min(S.length,k))),N||this._dirtyRowTracker.clearRange(),S.length>k)for(let C=H;C<S.length;C+=k){const B=C+k<S.length?C+k:S.length,O=typeof S=="string"?this._stringDecoder.decode(S.substring(C,B),this._parseBuffer):this._utf8Decoder.decode(S.subarray(C,B),this._parseBuffer);if(y=this._parser.parse(this._parseBuffer,O))return this._preserveStack(L,T,O,C),this._logSlowResolvingAsync(y),y}else if(!N){const C=typeof S=="string"?this._stringDecoder.decode(S,this._parseBuffer):this._utf8Decoder.decode(S,this._parseBuffer);if(y=this._parser.parse(this._parseBuffer,C))return this._preserveStack(L,T,C,0),this._logSlowResolvingAsync(y),y}this._activeBuffer.x===L&&this._activeBuffer.y===T||this._onCursorMove.fire();const $=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),R=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);R<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(R,this._bufferService.rows-1),Math.min($,this._bufferService.rows-1))}print(S,w,y){let L,T;const H=this._charsetService.charset,N=this._optionsService.rawOptions.screenReaderMode,$=this._bufferService.cols,R=this._coreService.decPrivateModes.wraparound,C=this._coreService.modes.insertMode,B=this._curAttrData;let O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&y-w>0&&O.getWidth(this._activeBuffer.x-1)===2&&O.setCellFromCodepoint(this._activeBuffer.x-1,0,1,B);let W=this._parser.precedingJoinState;for(let F=w;F<y;++F){if(L=S[F],L<127&&H){const Y=H[String.fromCharCode(L)];Y&&(L=Y.charCodeAt(0))}const z=this._unicodeService.charProperties(L,W);T=v.UnicodeService.extractWidth(z);const V=v.UnicodeService.extractShouldJoin(z),G=V?v.UnicodeService.extractWidth(W):0;if(W=z,N&&this._onA11yChar.fire((0,h.stringFromCodePoint)(L)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+T-G>$){if(R){const Y=O;let j=this._activeBuffer.x-G;for(this._activeBuffer.x=G,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),O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),G>0&&O instanceof t.BufferLine&&O.copyCellsFrom(Y,j,0,G,!1);j<$;)Y.setCellFromCodepoint(j++,0,1,B)}else if(this._activeBuffer.x=$-1,T===2)continue}if(V&&this._activeBuffer.x){const Y=O.getWidth(this._activeBuffer.x-1)?1:2;O.addCodepointToCell(this._activeBuffer.x-Y,L,T);for(let j=T-G;--j>=0;)O.setCellFromCodepoint(this._activeBuffer.x++,0,0,B)}else if(C&&(O.insertCells(this._activeBuffer.x,T-G,this._activeBuffer.getNullCell(B)),O.getWidth($-1)===2&&O.setCellFromCodepoint($-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,B)),O.setCellFromCodepoint(this._activeBuffer.x++,L,T,B),T>0)for(;--T;)O.setCellFromCodepoint(this._activeBuffer.x++,0,0,B)}this._parser.precedingJoinState=W,this._activeBuffer.x<$&&y-w>0&&O.getWidth(this._activeBuffer.x)===0&&!O.hasContent(this._activeBuffer.x)&&O.setCellFromCodepoint(this._activeBuffer.x,0,1,B),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(S,w){return S.final!=="t"||S.prefix||S.intermediates?this._parser.registerCsiHandler(S,w):this._parser.registerCsiHandler(S,(y=>!D(y.params[0],this._optionsService.rawOptions.windowOptions)||w(y)))}registerDcsHandler(S,w){return this._parser.registerDcsHandler(S,new d.DcsHandler(w))}registerEscHandler(S,w){return this._parser.registerEscHandler(S,w)}registerOscHandler(S,w){return this._parser.registerOscHandler(S,new g.OscHandler(w))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){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&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const S=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);S.hasWidth(this._activeBuffer.x)&&!S.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const S=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-S),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(S=this._bufferService.cols-1){this._activeBuffer.x=Math.min(S,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(S,w){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=S,this._activeBuffer.y=this._activeBuffer.scrollTop+w):(this._activeBuffer.x=S,this._activeBuffer.y=w),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(S,w){this._restrictCursor(),this._setCursor(this._activeBuffer.x+S,this._activeBuffer.y+w)}cursorUp(S){const w=this._activeBuffer.y-this._activeBuffer.scrollTop;return w>=0?this._moveCursor(0,-Math.min(w,S.params[0]||1)):this._moveCursor(0,-(S.params[0]||1)),!0}cursorDown(S){const w=this._activeBuffer.scrollBottom-this._activeBuffer.y;return w>=0?this._moveCursor(0,Math.min(w,S.params[0]||1)):this._moveCursor(0,S.params[0]||1),!0}cursorForward(S){return this._moveCursor(S.params[0]||1,0),!0}cursorBackward(S){return this._moveCursor(-(S.params[0]||1),0),!0}cursorNextLine(S){return this.cursorDown(S),this._activeBuffer.x=0,!0}cursorPrecedingLine(S){return this.cursorUp(S),this._activeBuffer.x=0,!0}cursorCharAbsolute(S){return this._setCursor((S.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(S){return this._setCursor(S.length>=2?(S.params[1]||1)-1:0,(S.params[0]||1)-1),!0}charPosAbsolute(S){return this._setCursor((S.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(S){return this._moveCursor(S.params[0]||1,0),!0}linePosAbsolute(S){return this._setCursor(this._activeBuffer.x,(S.params[0]||1)-1),!0}vPositionRelative(S){return this._moveCursor(0,S.params[0]||1),!0}hVPosition(S){return this.cursorPosition(S),!0}tabClear(S){const w=S.params[0];return w===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:w===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(S){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let w=S.params[0]||1;for(;w--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(S){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let w=S.params[0]||1;for(;w--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(S){const w=S.params[0];return w===1&&(this._curAttrData.bg|=536870912),w!==2&&w!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(S,w,y,L=!1,T=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+S);H.replaceCells(w,y,this._activeBuffer.getNullCell(this._eraseAttrData()),T),L&&(H.isWrapped=!1)}_resetBufferLine(S,w=!1){const y=this._activeBuffer.lines.get(this._activeBuffer.ybase+S);y&&(y.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),w),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+S),y.isWrapped=!1)}eraseInDisplay(S,w=!1){let y;switch(this._restrictCursor(this._bufferService.cols),S.params[0]){case 0:for(y=this._activeBuffer.y,this._dirtyRowTracker.markDirty(y),this._eraseInBufferLine(y++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,w);y<this._bufferService.rows;y++)this._resetBufferLine(y,w);this._dirtyRowTracker.markDirty(y);break;case 1:for(y=this._activeBuffer.y,this._dirtyRowTracker.markDirty(y),this._eraseInBufferLine(y,0,this._activeBuffer.x+1,!0,w),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(y+1).isWrapped=!1);y--;)this._resetBufferLine(y,w);this._dirtyRowTracker.markDirty(0);break;case 2:for(y=this._bufferService.rows,this._dirtyRowTracker.markDirty(y-1);y--;)this._resetBufferLine(y,w);this._dirtyRowTracker.markDirty(0);break;case 3:const L=this._activeBuffer.lines.length-this._bufferService.rows;L>0&&(this._activeBuffer.lines.trimStart(L),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-L,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-L,0),this._onScroll.fire(0))}return!0}eraseInLine(S,w=!1){switch(this._restrictCursor(this._bufferService.cols),S.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,w);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,w);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,w)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(S){this._restrictCursor();let w=S.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const y=this._activeBuffer.ybase+this._activeBuffer.y,L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,T=this._bufferService.rows-1+this._activeBuffer.ybase-L+1;for(;w--;)this._activeBuffer.lines.splice(T-1,1),this._activeBuffer.lines.splice(y,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(S){this._restrictCursor();let w=S.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const y=this._activeBuffer.ybase+this._activeBuffer.y;let L;for(L=this._bufferService.rows-1-this._activeBuffer.scrollBottom,L=this._bufferService.rows-1+this._activeBuffer.ybase-L;w--;)this._activeBuffer.lines.splice(y,1),this._activeBuffer.lines.splice(L,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(S){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.insertCells(this._activeBuffer.x,S.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(S){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.deleteCells(this._activeBuffer.x,S.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(S){let w=S.params[0]||1;for(;w--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(S){let w=S.params[0]||1;for(;w--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(t.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(S){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=S.params[0]||1;for(let y=this._activeBuffer.scrollTop;y<=this._activeBuffer.scrollBottom;++y){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+y);L.deleteCells(0,w,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(S){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=S.params[0]||1;for(let y=this._activeBuffer.scrollTop;y<=this._activeBuffer.scrollBottom;++y){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+y);L.insertCells(0,w,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(S){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=S.params[0]||1;for(let y=this._activeBuffer.scrollTop;y<=this._activeBuffer.scrollBottom;++y){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+y);L.insertCells(this._activeBuffer.x,w,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(S){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=S.params[0]||1;for(let y=this._activeBuffer.scrollTop;y<=this._activeBuffer.scrollBottom;++y){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+y);L.deleteCells(this._activeBuffer.x,w,this._activeBuffer.getNullCell(this._eraseAttrData())),L.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(S){this._restrictCursor();const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return w&&(w.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(S.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(S){const w=this._parser.precedingJoinState;if(!w)return!0;const y=S.params[0]||1,L=v.UnicodeService.extractWidth(w),T=this._activeBuffer.x-L,H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(T),N=new Uint32Array(H.length*y);let $=0;for(let C=0;C<H.length;){const B=H.codePointAt(C)||0;N[$++]=B,C+=B>65535?2:1}let R=$;for(let C=1;C<y;++C)N.copyWithin(R,0,$),R+=$;return this.print(N,0,R),!0}sendDeviceAttributesPrimary(S){return S.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(n.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(n.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(S){return S.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(n.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(n.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(S.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(n.C0.ESC+"[>83;40003;0c")),!0}_is(S){return(this._optionsService.rawOptions.termName+"").indexOf(S)===0}setMode(S){for(let w=0;w<S.length;w++)switch(S.params[w]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(S){for(let w=0;w<S.length;w++)switch(S.params[w]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,c.DEFAULT_CHARSET),this._charsetService.setgCharset(1,c.DEFAULT_CHARSET),this._charsetService.setgCharset(2,c.DEFAULT_CHARSET),this._charsetService.setgCharset(3,c.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(S){for(let w=0;w<S.length;w++)switch(S.params[w]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(S){for(let w=0;w<S.length;w++)switch(S.params[w]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),S.params[w]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(S,w){const y=this._coreService.decPrivateModes,{activeProtocol:L,activeEncoding:T}=this._coreMouseService,H=this._coreService,{buffers:N,cols:$}=this._bufferService,{active:R,alt:C}=N,B=this._optionsService.rawOptions,O=V=>V?1:2,W=S.params[0];return F=W,z=w?W===2?4:W===4?O(H.modes.insertMode):W===12?3:W===20?O(B.convertEol):0:W===1?O(y.applicationCursorKeys):W===3?B.windowOptions.setWinLines?$===80?2:$===132?1:0:0:W===6?O(y.origin):W===7?O(y.wraparound):W===8?3:W===9?O(L==="X10"):W===12?O(B.cursorBlink):W===25?O(!H.isCursorHidden):W===45?O(y.reverseWraparound):W===66?O(y.applicationKeypad):W===67?4:W===1e3?O(L==="VT200"):W===1002?O(L==="DRAG"):W===1003?O(L==="ANY"):W===1004?O(y.sendFocus):W===1005?4:W===1006?O(T==="SGR"):W===1015?4:W===1016?O(T==="SGR_PIXELS"):W===1048?1:W===47||W===1047||W===1049?O(R===C):W===2004?O(y.bracketedPasteMode):0,H.triggerDataEvent(`${n.C0.ESC}[${w?"":"?"}${F};${z}$y`),!0;var F,z}_updateAttrColor(S,w,y,L,T){return w===2?(S|=50331648,S&=-16777216,S|=a.AttributeData.fromColorRGB([y,L,T])):w===5&&(S&=-50331904,S|=33554432|255&y),S}_extractColor(S,w,y){const L=[0,0,-1,0,0,0];let T=0,H=0;do{if(L[H+T]=S.params[w+H],S.hasSubParams(w+H)){const N=S.getSubParams(w+H);let $=0;do L[1]===5&&(T=1),L[H+$+1+T]=N[$];while(++$<N.length&&$+H+1+T<L.length);break}if(L[1]===5&&H+T>=2||L[1]===2&&H+T>=5)break;L[1]&&(T=1)}while(++H+w<S.length&&H+T<L.length);for(let N=2;N<L.length;++N)L[N]===-1&&(L[N]=0);switch(L[0]){case 38:y.fg=this._updateAttrColor(y.fg,L[1],L[3],L[4],L[5]);break;case 48:y.bg=this._updateAttrColor(y.bg,L[1],L[3],L[4],L[5]);break;case 58:y.extended=y.extended.clone(),y.extended.underlineColor=this._updateAttrColor(y.extended.underlineColor,L[1],L[3],L[4],L[5])}return H}_processUnderline(S,w){w.extended=w.extended.clone(),(!~S||S>5)&&(S=1),w.extended.underlineStyle=S,w.fg|=268435456,S===0&&(w.fg&=-268435457),w.updateExtended()}_processSGR0(S){S.fg=t.DEFAULT_ATTR_DATA.fg,S.bg=t.DEFAULT_ATTR_DATA.bg,S.extended=S.extended.clone(),S.extended.underlineStyle=0,S.extended.underlineColor&=-67108864,S.updateExtended()}charAttributes(S){if(S.length===1&&S.params[0]===0)return this._processSGR0(this._curAttrData),!0;const w=S.length;let y;const L=this._curAttrData;for(let T=0;T<w;T++)y=S.params[T],y>=30&&y<=37?(L.fg&=-50331904,L.fg|=16777216|y-30):y>=40&&y<=47?(L.bg&=-50331904,L.bg|=16777216|y-40):y>=90&&y<=97?(L.fg&=-50331904,L.fg|=16777224|y-90):y>=100&&y<=107?(L.bg&=-50331904,L.bg|=16777224|y-100):y===0?this._processSGR0(L):y===1?L.fg|=134217728:y===3?L.bg|=67108864:y===4?(L.fg|=268435456,this._processUnderline(S.hasSubParams(T)?S.getSubParams(T)[0]:1,L)):y===5?L.fg|=536870912:y===7?L.fg|=67108864:y===8?L.fg|=1073741824:y===9?L.fg|=2147483648:y===2?L.bg|=134217728:y===21?this._processUnderline(2,L):y===22?(L.fg&=-134217729,L.bg&=-134217729):y===23?L.bg&=-67108865:y===24?(L.fg&=-268435457,this._processUnderline(0,L)):y===25?L.fg&=-536870913:y===27?L.fg&=-67108865:y===28?L.fg&=-1073741825:y===29?L.fg&=2147483647:y===39?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):y===49?(L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):y===38||y===48||y===58?T+=this._extractColor(S,T,L):y===53?L.bg|=1073741824:y===55?L.bg&=-1073741825:y===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):y===100?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",y);return!0}deviceStatus(S){switch(S.params[0]){case 5:this._coreService.triggerDataEvent(`${n.C0.ESC}[0n`);break;case 6:const w=this._activeBuffer.y+1,y=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[${w};${y}R`)}return!0}deviceStatusPrivate(S){if(S.params[0]===6){const w=this._activeBuffer.y+1,y=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${n.C0.ESC}[?${w};${y}R`)}return!0}softReset(S){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(S){const w=S.params[0]||1;switch(w){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const y=w%2==1;return this._optionsService.options.cursorBlink=y,!0}setScrollRegion(S){const w=S.params[0]||1;let y;return(S.length<2||(y=S.params[1])>this._bufferService.rows||y===0)&&(y=this._bufferService.rows),y>w&&(this._activeBuffer.scrollTop=w-1,this._activeBuffer.scrollBottom=y-1,this._setCursor(0,0)),!0}windowOptions(S){if(!D(S.params[0],this._optionsService.rawOptions.windowOptions))return!0;const w=S.length>1?S.params[1]:0;switch(S.params[0]){case 14:w!==2&&this._onRequestWindowsOptionsReport.fire(b.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(b.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${n.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:w!==0&&w!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),w!==0&&w!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:w!==0&&w!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),w!==0&&w!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(S){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(S){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(S){return this._windowTitle=S,this._onTitleChange.fire(S),!0}setIconName(S){return this._iconName=S,!0}setOrReportIndexedColor(S){const w=[],y=S.split(";");for(;y.length>1;){const L=y.shift(),T=y.shift();if(/^\d+$/.exec(L)){const H=parseInt(L);if(U(H))if(T==="?")w.push({type:0,index:H});else{const N=(0,m.parseColor)(T);N&&w.push({type:1,index:H,color:N})}}}return w.length&&this._onColor.fire(w),!0}setHyperlink(S){const w=S.split(";");return!(w.length<2)&&(w[1]?this._createHyperlink(w[0],w[1]):!w[0]&&this._finishHyperlink())}_createHyperlink(S,w){this._getCurrentLinkId()&&this._finishHyperlink();const y=S.split(":");let L;const T=y.findIndex((H=>H.startsWith("id=")));return T!==-1&&(L=y[T].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:L,uri:w}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(S,w){const y=S.split(";");for(let L=0;L<y.length&&!(w>=this._specialColors.length);++L,++w)if(y[L]==="?")this._onColor.fire([{type:0,index:this._specialColors[w]}]);else{const T=(0,m.parseColor)(y[L]);T&&this._onColor.fire([{type:1,index:this._specialColors[w],color:T}])}return!0}setOrReportFgColor(S){return this._setOrReportSpecialColor(S,0)}setOrReportBgColor(S){return this._setOrReportSpecialColor(S,1)}setOrReportCursorColor(S){return this._setOrReportSpecialColor(S,2)}restoreIndexedColor(S){if(!S)return this._onColor.fire([{type:2}]),!0;const w=[],y=S.split(";");for(let L=0;L<y.length;++L)if(/^\d+$/.exec(y[L])){const T=parseInt(y[L]);U(T)&&w.push({type:2,index:T})}return w.length&&this._onColor.fire(w),!0}restoreFgColor(S){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(S){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(S){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,c.DEFAULT_CHARSET),!0}selectCharset(S){return S.length!==2?(this.selectDefaultCharset(),!0):(S[0]==="/"||this._charsetService.setgCharset(E[S[0]],c.CHARSETS[S[1]]||c.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const S=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,S,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(S){return this._charsetService.setgLevel(S),!0}screenAlignmentPattern(){const S=new i.CellData;S.content=4194373,S.fg=this._curAttrData.fg,S.bg=this._curAttrData.bg,this._setCursor(0,0);for(let w=0;w<this._bufferService.rows;++w){const y=this._activeBuffer.ybase+this._activeBuffer.y+w,L=this._activeBuffer.lines.get(y);L&&(L.fill(S),L.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(S,w){const y=this._bufferService.buffer,L=this._optionsService.rawOptions;return(T=>(this._coreService.triggerDataEvent(`${n.C0.ESC}${T}${n.C0.ESC}\\`),!0))(S==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:S==='"p'?'P1$r61;1"p':S==="r"?`P1$r${y.scrollTop+1};${y.scrollBottom+1}r`:S==="m"?"P1$r0m":S===" q"?`P1$r${{block:2,underline:4,bar:6}[L.cursorStyle]-(L.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(S,w){this._dirtyRowTracker.markRangeDirty(S,w)}}r.InputHandler=M;let I=class{constructor(P){this._bufferService=P,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(P){P<this.start?this.start=P:P>this.end&&(this.end=P)}markRangeDirty(P,S){P>S&&(x=P,P=S,S=x),P<this.start&&(this.start=P),S>this.end&&(this.end=S)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function U(P){return 0<=P&&P<256}I=l([_(0,f.IBufferService)],I)},844:(A,r)=>{function o(l){for(const _ of l)_.dispose();l.length=0}Object.defineProperty(r,"__esModule",{value:!0}),r.getDisposeArrayDisposable=r.disposeArray=r.toDisposable=r.MutableDisposable=r.Disposable=void 0,r.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const l of this._disposables)l.dispose();this._disposables.length=0}register(l){return this._disposables.push(l),l}unregister(l){const _=this._disposables.indexOf(l);_!==-1&&this._disposables.splice(_,1)}},r.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(l){this._isDisposed||l===this._value||(this._value?.dispose(),this._value=l)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},r.toDisposable=function(l){return{dispose:l}},r.disposeArray=o,r.getDisposeArrayDisposable=function(l){return{dispose:()=>o(l)}}},1505:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.FourKeyMap=r.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(_,n,c){this._data[_]||(this._data[_]={}),this._data[_][n]=c}get(_,n){return this._data[_]?this._data[_][n]:void 0}clear(){this._data={}}}r.TwoKeyMap=o,r.FourKeyMap=class{constructor(){this._data=new o}set(l,_,n,c,u){this._data.get(l,_)||this._data.set(l,_,new o),this._data.get(l,_).set(n,c,u)}get(l,_,n,c){return this._data.get(l,_)?.get(n,c)}clear(){this._data.clear()}}},6114:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.isChromeOS=r.isLinux=r.isWindows=r.isIphone=r.isIpad=r.isMac=r.getSafariVersion=r.isSafari=r.isLegacyEdge=r.isFirefox=r.isNode=void 0,r.isNode=typeof process<"u"&&"title"in process;const o=r.isNode?"node":navigator.userAgent,l=r.isNode?"node":navigator.platform;r.isFirefox=o.includes("Firefox"),r.isLegacyEdge=o.includes("Edge"),r.isSafari=/^((?!chrome|android).)*safari/i.test(o),r.getSafariVersion=function(){if(!r.isSafari)return 0;const _=o.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},r.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(l),r.isIpad=l==="iPad",r.isIphone=l==="iPhone",r.isWindows=["Windows","Win16","Win32","WinCE"].includes(l),r.isLinux=l.indexOf("Linux")>=0,r.isChromeOS=/\bCrOS\b/.test(o)},6106:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.SortedList=void 0;let o=0;r.SortedList=class{constructor(l){this._getKey=l,this._array=[]}clear(){this._array.length=0}insert(l){this._array.length!==0?(o=this._search(this._getKey(l)),this._array.splice(o,0,l)):this._array.push(l)}delete(l){if(this._array.length===0)return!1;const _=this._getKey(l);if(_===void 0||(o=this._search(_),o===-1)||this._getKey(this._array[o])!==_)return!1;do if(this._array[o]===l)return this._array.splice(o,1),!0;while(++o<this._array.length&&this._getKey(this._array[o])===_);return!1}*getKeyIterator(l){if(this._array.length!==0&&(o=this._search(l),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===l))do yield this._array[o];while(++o<this._array.length&&this._getKey(this._array[o])===l)}forEachByKey(l,_){if(this._array.length!==0&&(o=this._search(l),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===l))do _(this._array[o]);while(++o<this._array.length&&this._getKey(this._array[o])===l)}values(){return[...this._array].values()}_search(l){let _=0,n=this._array.length-1;for(;n>=_;){let c=_+n>>1;const u=this._getKey(this._array[c]);if(u>l)n=c-1;else{if(!(u<l)){for(;c>0&&this._getKey(this._array[c-1])===l;)c--;return c}_=c+1}}return _}}},7226:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DebouncedIdleTask=r.IdleTaskQueue=r.PriorityTaskQueue=void 0;const l=o(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(u){this._tasks.push(u),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(u){this._idleCallback=void 0;let p=0,h=0,t=u.timeRemaining(),s=0;for(;this._i<this._tasks.length;){if(p=Date.now(),this._tasks[this._i]()||this._i++,p=Math.max(1,Date.now()-p),h=Math.max(p,h),s=u.timeRemaining(),1.5*h>s)return t-p<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(t-p))}ms`),void this._start();t=s}this.clear()}}class n extends _{_requestCallback(u){return setTimeout((()=>u(this._createDeadline(16))))}_cancelCallback(u){clearTimeout(u)}_createDeadline(u){const p=Date.now()+u;return{timeRemaining:()=>Math.max(0,p-Date.now())}}}r.PriorityTaskQueue=n,r.IdleTaskQueue=!l.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(c){return requestIdleCallback(c)}_cancelCallback(c){cancelIdleCallback(c)}}:n,r.DebouncedIdleTask=class{constructor(){this._queue=new r.IdleTaskQueue}set(c){this._queue.clear(),this._queue.enqueue(c)}flush(){this._queue.flush()}}},9282:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.updateWindowsModeWrappedState=void 0;const l=o(643);r.updateWindowsModeWrappedState=function(_){const n=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),c=n?.get(_.cols-1),u=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);u&&c&&(u.isWrapped=c[l.CHAR_DATA_CODE_INDEX]!==l.NULL_CELL_CODE&&c[l.CHAR_DATA_CODE_INDEX]!==l.WHITESPACE_CELL_CODE)}},3734:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ExtendedAttrs=r.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new l}static toColorRGB(n){return[n>>>16&255,n>>>8&255,255&n]}static fromColorRGB(n){return(255&n[0])<<16|(255&n[1])<<8|255&n[2]}clone(){const n=new o;return n.fg=this.fg,n.bg=this.bg,n.extended=this.extended.clone(),n}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}r.AttributeData=o;class l{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(n){this._ext=n}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(n){this._ext&=-469762049,this._ext|=n<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(n){this._ext&=-67108864,this._ext|=67108863&n}get urlId(){return this._urlId}set urlId(n){this._urlId=n}get underlineVariantOffset(){const n=(3758096384&this._ext)>>29;return n<0?4294967288^n:n}set underlineVariantOffset(n){this._ext&=536870911,this._ext|=n<<29&3758096384}constructor(n=0,c=0){this._ext=0,this._urlId=0,this._ext=n,this._urlId=c}clone(){return new l(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}r.ExtendedAttrs=l},9092:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Buffer=r.MAX_BUFFER_SIZE=void 0;const l=o(6349),_=o(7226),n=o(3734),c=o(8437),u=o(4634),p=o(511),h=o(643),t=o(4863),s=o(7116);r.MAX_BUFFER_SIZE=4294967295,r.Buffer=class{constructor(e,i,a){this._hasScrollback=e,this._optionsService=i,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=c.DEFAULT_ATTR_DATA.clone(),this.savedCharset=s.DEFAULT_CHARSET,this.markers=[],this._nullCell=p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]),this._whitespaceCell=p.CellData.fromCharData([0,h.WHITESPACE_CELL_CHAR,h.WHITESPACE_CELL_WIDTH,h.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new l.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell}getBlankLine(e,i){return new c.BufferLine(this._bufferService.cols,this.getNullCell(e),i)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;const i=e+this._optionsService.rawOptions.scrollback;return i>r.MAX_BUFFER_SIZE?r.MAX_BUFFER_SIZE:i}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=c.DEFAULT_ATTR_DATA);let i=this._rows;for(;i--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new l.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,i){const a=this.getNullCell(c.DEFAULT_ATTR_DATA);let f=0;const v=this._getCorrectBufferLength(i);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<e)for(let d=0;d<this.lines.length;d++)f+=+this.lines.get(d).resize(e,a);let g=0;if(this._rows<i)for(let d=this._rows;d<i;d++)this.lines.length<i+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new c.BufferLine(e,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+g+1?(this.ybase--,g++,this.ydisp>0&&this.ydisp--):this.lines.push(new c.BufferLine(e,a)));else for(let d=this._rows;d>i;d--)this.lines.length>i+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const d=this.lines.length-v;d>0&&(this.lines.trimStart(d),this.ybase=Math.max(this.ybase-d,0),this.ydisp=Math.max(this.ydisp-d,0),this.savedY=Math.max(this.savedY-d,0)),this.lines.maxLength=v}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,i-1),g&&(this.y+=g),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(e,i),this._cols>e))for(let g=0;g<this.lines.length;g++)f+=+this.lines.get(g).resize(e,a);this._cols=e,this._rows=i,this._memoryCleanupQueue.clear(),f>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let i=0;for(;this._memoryCleanupPosition<this.lines.length;)if(i+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),i>100)return!0;return e}get _isReflowEnabled(){const e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,i){this._cols!==e&&(e>this._cols?this._reflowLarger(e,i):this._reflowSmaller(e,i))}_reflowLarger(e,i){const a=(0,u.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(c.DEFAULT_ATTR_DATA));if(a.length>0){const f=(0,u.reflowLargerCreateNewLayout)(this.lines,a);(0,u.reflowLargerApplyNewLayout)(this.lines,f.layout),this._reflowLargerAdjustViewport(e,i,f.countRemoved)}}_reflowLargerAdjustViewport(e,i,a){const f=this.getNullCell(c.DEFAULT_ATTR_DATA);let v=a;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<i&&this.lines.push(new c.BufferLine(e,f))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)}_reflowSmaller(e,i){const a=this.getNullCell(c.DEFAULT_ATTR_DATA),f=[];let v=0;for(let g=this.lines.length-1;g>=0;g--){let d=this.lines.get(g);if(!d||!d.isWrapped&&d.getTrimmedLength()<=e)continue;const m=[d];for(;d.isWrapped&&g>0;)d=this.lines.get(--g),m.unshift(d);const E=this.ybase+this.y;if(E>=g&&E<g+m.length)continue;const k=m[m.length-1].getTrimmedLength(),D=(0,u.reflowSmallerGetNewLineLengths)(m,this._cols,e),b=D.length-m.length;let x;x=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+b):Math.max(0,this.lines.length-this.lines.maxLength+b);const M=[];for(let y=0;y<b;y++){const L=this.getBlankLine(c.DEFAULT_ATTR_DATA,!0);M.push(L)}M.length>0&&(f.push({start:g+m.length+v,newLines:M}),v+=M.length),m.push(...M);let I=D.length-1,U=D[I];U===0&&(I--,U=D[I]);let P=m.length-b-1,S=k;for(;P>=0;){const y=Math.min(S,U);if(m[I]===void 0)break;if(m[I].copyCellsFrom(m[P],S-y,U-y,y,!0),U-=y,U===0&&(I--,U=D[I]),S-=y,S===0){P--;const L=Math.max(P,0);S=(0,u.getWrappedLineTrimmedLength)(m,L,this._cols)}}for(let y=0;y<m.length;y++)D[y]<e&&m[y].setCell(D[y],a);let w=b-x;for(;w-- >0;)this.ybase===0?this.y<i-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-i&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+b,this.ybase+i-1)}if(f.length>0){const g=[],d=[];for(let I=0;I<this.lines.length;I++)d.push(this.lines.get(I));const m=this.lines.length;let E=m-1,k=0,D=f[k];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let b=0;for(let I=Math.min(this.lines.maxLength-1,m+v-1);I>=0;I--)if(D&&D.start>E+b){for(let U=D.newLines.length-1;U>=0;U--)this.lines.set(I--,D.newLines[U]);I++,g.push({index:E+1,amount:D.newLines.length}),b+=D.newLines.length,D=f[++k]}else this.lines.set(I,d[E--]);let x=0;for(let I=g.length-1;I>=0;I--)g[I].index+=x,this.lines.onInsertEmitter.fire(g[I]),x+=g[I].amount;const M=Math.max(0,m+v-this.lines.maxLength);M>0&&this.lines.onTrimEmitter.fire(M)}}translateBufferLineToString(e,i,a=0,f){const v=this.lines.get(e);return v?v.translateToString(i,a,f):""}getWrappedRangeForLine(e){let i=e,a=e;for(;i>0&&this.lines.get(i).isWrapped;)i--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:i,last:a}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let i=0;i<this.markers.length;i++)this.markers[i].line===e&&(this.markers[i].dispose(),this.markers.splice(i--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose(),this.markers.splice(e--,1);this._isClearing=!1}addMarker(e){const i=new t.Marker(e);return this.markers.push(i),i.register(this.lines.onTrim((a=>{i.line-=a,i.line<0&&i.dispose()}))),i.register(this.lines.onInsert((a=>{i.line>=a.index&&(i.line+=a.amount)}))),i.register(this.lines.onDelete((a=>{i.line>=a.index&&i.line<a.index+a.amount&&i.dispose(),i.line>a.index&&(i.line-=a.amount)}))),i.register(i.onDispose((()=>this._removeMarker(i)))),i}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}}},8437:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLine=r.DEFAULT_ATTR_DATA=void 0;const l=o(3734),_=o(511),n=o(643),c=o(482);r.DEFAULT_ATTR_DATA=Object.freeze(new l.AttributeData);let u=0;class p{constructor(t,s,e=!1){this.isWrapped=e,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*t);const i=s||_.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]);for(let a=0;a<t;++a)this.setCell(a,i);this.length=t}get(t){const s=this._data[3*t+0],e=2097151&s;return[this._data[3*t+1],2097152&s?this._combined[t]:e?(0,c.stringFromCodePoint)(e):"",s>>22,2097152&s?this._combined[t].charCodeAt(this._combined[t].length-1):e]}set(t,s){this._data[3*t+1]=s[n.CHAR_DATA_ATTR_INDEX],s[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[t]=s[1],this._data[3*t+0]=2097152|t|s[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*t+0]=s[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[n.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(t){return this._data[3*t+0]>>22}hasWidth(t){return 12582912&this._data[3*t+0]}getFg(t){return this._data[3*t+1]}getBg(t){return this._data[3*t+2]}hasContent(t){return 4194303&this._data[3*t+0]}getCodePoint(t){const s=this._data[3*t+0];return 2097152&s?this._combined[t].charCodeAt(this._combined[t].length-1):2097151&s}isCombined(t){return 2097152&this._data[3*t+0]}getString(t){const s=this._data[3*t+0];return 2097152&s?this._combined[t]:2097151&s?(0,c.stringFromCodePoint)(2097151&s):""}isProtected(t){return 536870912&this._data[3*t+2]}loadCell(t,s){return u=3*t,s.content=this._data[u+0],s.fg=this._data[u+1],s.bg=this._data[u+2],2097152&s.content&&(s.combinedData=this._combined[t]),268435456&s.bg&&(s.extended=this._extendedAttrs[t]),s}setCell(t,s){2097152&s.content&&(this._combined[t]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[t]=s.extended),this._data[3*t+0]=s.content,this._data[3*t+1]=s.fg,this._data[3*t+2]=s.bg}setCellFromCodepoint(t,s,e,i){268435456&i.bg&&(this._extendedAttrs[t]=i.extended),this._data[3*t+0]=s|e<<22,this._data[3*t+1]=i.fg,this._data[3*t+2]=i.bg}addCodepointToCell(t,s,e){let i=this._data[3*t+0];2097152&i?this._combined[t]+=(0,c.stringFromCodePoint)(s):2097151&i?(this._combined[t]=(0,c.stringFromCodePoint)(2097151&i)+(0,c.stringFromCodePoint)(s),i&=-2097152,i|=2097152):i=s|4194304,e&&(i&=-12582913,i|=e<<22),this._data[3*t+0]=i}insertCells(t,s,e){if((t%=this.length)&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,e),s<this.length-t){const i=new _.CellData;for(let a=this.length-t-s-1;a>=0;--a)this.setCell(t+s+a,this.loadCell(t+a,i));for(let a=0;a<s;++a)this.setCell(t+a,e)}else for(let i=t;i<this.length;++i)this.setCell(i,e);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,e)}deleteCells(t,s,e){if(t%=this.length,s<this.length-t){const i=new _.CellData;for(let a=0;a<this.length-t-s;++a)this.setCell(t+a,this.loadCell(t+s+a,i));for(let a=this.length-s;a<this.length;++a)this.setCell(a,e)}else for(let i=t;i<this.length;++i)this.setCell(i,e);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,e),this.getWidth(t)!==0||this.hasContent(t)||this.setCellFromCodepoint(t,0,1,e)}replaceCells(t,s,e,i=!1){if(i)for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,e),s<this.length&&this.getWidth(s-1)===2&&!this.isProtected(s)&&this.setCellFromCodepoint(s,0,1,e);t<s&&t<this.length;)this.isProtected(t)||this.setCell(t,e),t++;else for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,e),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodepoint(s,0,1,e);t<s&&t<this.length;)this.setCell(t++,e)}resize(t,s){if(t===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const e=3*t;if(t>this.length){if(this._data.buffer.byteLength>=4*e)this._data=new Uint32Array(this._data.buffer,0,e);else{const i=new Uint32Array(e);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,s)}else{this._data=this._data.subarray(0,e);const i=Object.keys(this._combined);for(let f=0;f<i.length;f++){const v=parseInt(i[f],10);v>=t&&delete this._combined[v]}const a=Object.keys(this._extendedAttrs);for(let f=0;f<a.length;f++){const v=parseInt(a[f],10);v>=t&&delete this._extendedAttrs[v]}}return this.length=t,4*e*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,s=!1){if(s)for(let e=0;e<this.length;++e)this.isProtected(e)||this.setCell(e,t);else{this._combined={},this._extendedAttrs={};for(let e=0;e<this.length;++e)this.setCell(e,t)}}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(const s in t._combined)this._combined[s]=t._combined[s];this._extendedAttrs={};for(const s in t._extendedAttrs)this._extendedAttrs[s]=t._extendedAttrs[s];this.isWrapped=t.isWrapped}clone(){const t=new p(0);t._data=new Uint32Array(this._data),t.length=this.length;for(const s in this._combined)t._combined[s]=this._combined[s];for(const s in this._extendedAttrs)t._extendedAttrs[s]=this._extendedAttrs[s];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(4194303&this._data[3*t+0])return t+(this._data[3*t+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(4194303&this._data[3*t+0]||50331648&this._data[3*t+2])return t+(this._data[3*t+0]>>22);return 0}copyCellsFrom(t,s,e,i,a){const f=t._data;if(a)for(let g=i-1;g>=0;g--){for(let d=0;d<3;d++)this._data[3*(e+g)+d]=f[3*(s+g)+d];268435456&f[3*(s+g)+2]&&(this._extendedAttrs[e+g]=t._extendedAttrs[s+g])}else for(let g=0;g<i;g++){for(let d=0;d<3;d++)this._data[3*(e+g)+d]=f[3*(s+g)+d];268435456&f[3*(s+g)+2]&&(this._extendedAttrs[e+g]=t._extendedAttrs[s+g])}const v=Object.keys(t._combined);for(let g=0;g<v.length;g++){const d=parseInt(v[g],10);d>=s&&(this._combined[d-s+e]=t._combined[d])}}translateToString(t,s,e,i){s=s??0,e=e??this.length,t&&(e=Math.min(e,this.getTrimmedLength())),i&&(i.length=0);let a="";for(;s<e;){const f=this._data[3*s+0],v=2097151&f,g=2097152&f?this._combined[s]:v?(0,c.stringFromCodePoint)(v):n.WHITESPACE_CELL_CHAR;if(a+=g,i)for(let d=0;d<g.length;++d)i.push(s);s+=f>>22||1}return i&&i.push(s),a}}r.BufferLine=p},4841:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.getRangeLength=void 0,r.getRangeLength=function(o,l){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return l*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(A,r)=>{function o(l,_,n){if(_===l.length-1)return l[_].getTrimmedLength();const c=!l[_].hasContent(n-1)&&l[_].getWidth(n-1)===1,u=l[_+1].getWidth(0)===2;return c&&u?n-1:n}Object.defineProperty(r,"__esModule",{value:!0}),r.getWrappedLineTrimmedLength=r.reflowSmallerGetNewLineLengths=r.reflowLargerApplyNewLayout=r.reflowLargerCreateNewLayout=r.reflowLargerGetLinesToRemove=void 0,r.reflowLargerGetLinesToRemove=function(l,_,n,c,u){const p=[];for(let h=0;h<l.length-1;h++){let t=h,s=l.get(++t);if(!s.isWrapped)continue;const e=[l.get(h)];for(;t<l.length&&s.isWrapped;)e.push(s),s=l.get(++t);if(c>=h&&c<t){h+=e.length-1;continue}let i=0,a=o(e,i,_),f=1,v=0;for(;f<e.length;){const d=o(e,f,_),m=d-v,E=n-a,k=Math.min(m,E);e[i].copyCellsFrom(e[f],v,a,k,!1),a+=k,a===n&&(i++,a=0),v+=k,v===d&&(f++,v=0),a===0&&i!==0&&e[i-1].getWidth(n-1)===2&&(e[i].copyCellsFrom(e[i-1],n-1,a++,1,!1),e[i-1].setCell(n-1,u))}e[i].replaceCells(a,n,u);let g=0;for(let d=e.length-1;d>0&&(d>i||e[d].getTrimmedLength()===0);d--)g++;g>0&&(p.push(h+e.length-g),p.push(g)),h+=e.length-1}return p},r.reflowLargerCreateNewLayout=function(l,_){const n=[];let c=0,u=_[c],p=0;for(let h=0;h<l.length;h++)if(u===h){const t=_[++c];l.onDeleteEmitter.fire({index:h-p,amount:t}),h+=t-1,p+=t,u=_[++c]}else n.push(h);return{layout:n,countRemoved:p}},r.reflowLargerApplyNewLayout=function(l,_){const n=[];for(let c=0;c<_.length;c++)n.push(l.get(_[c]));for(let c=0;c<n.length;c++)l.set(c,n[c]);l.length=_.length},r.reflowSmallerGetNewLineLengths=function(l,_,n){const c=[],u=l.map(((s,e)=>o(l,e,_))).reduce(((s,e)=>s+e));let p=0,h=0,t=0;for(;t<u;){if(u-t<n){c.push(u-t);break}p+=n;const s=o(l,h,_);p>s&&(p-=s,h++);const e=l[h].getWidth(p-1)===2;e&&p--;const i=e?n-1:n;c.push(i),t+=i}return c},r.getWrappedLineTrimmedLength=o},5295:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferSet=void 0;const l=o(8460),_=o(844),n=o(9092);class c extends _.Disposable{constructor(p,h){super(),this._optionsService=p,this._bufferService=h,this._onBufferActivate=this.register(new l.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new n.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new n.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(p){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(p),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(p,h){this._normal.resize(p,h),this._alt.resize(p,h),this.setupTabStops(p)}setupTabStops(p){this._normal.setupTabStops(p),this._alt.setupTabStops(p)}}r.BufferSet=c},511:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CellData=void 0;const l=o(482),_=o(643),n=o(3734);class c extends n.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new n.ExtendedAttrs,this.combinedData=""}static fromCharData(p){const h=new c;return h.setFromCharData(p),h}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,l.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(p){this.fg=p[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let h=!1;if(p[_.CHAR_DATA_CHAR_INDEX].length>2)h=!0;else if(p[_.CHAR_DATA_CHAR_INDEX].length===2){const t=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=t&&t<=56319){const s=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(t-55296)+s-56320+65536|p[_.CHAR_DATA_WIDTH_INDEX]<<22:h=!0}else h=!0}else this.content=p[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|p[_.CHAR_DATA_WIDTH_INDEX]<<22;h&&(this.combinedData=p[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|p[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}r.CellData=c},643:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WHITESPACE_CELL_CODE=r.WHITESPACE_CELL_WIDTH=r.WHITESPACE_CELL_CHAR=r.NULL_CELL_CODE=r.NULL_CELL_WIDTH=r.NULL_CELL_CHAR=r.CHAR_DATA_CODE_INDEX=r.CHAR_DATA_WIDTH_INDEX=r.CHAR_DATA_CHAR_INDEX=r.CHAR_DATA_ATTR_INDEX=r.DEFAULT_EXT=r.DEFAULT_ATTR=r.DEFAULT_COLOR=void 0,r.DEFAULT_COLOR=0,r.DEFAULT_ATTR=256|r.DEFAULT_COLOR<<9,r.DEFAULT_EXT=0,r.CHAR_DATA_ATTR_INDEX=0,r.CHAR_DATA_CHAR_INDEX=1,r.CHAR_DATA_WIDTH_INDEX=2,r.CHAR_DATA_CODE_INDEX=3,r.NULL_CELL_CHAR="",r.NULL_CELL_WIDTH=1,r.NULL_CELL_CODE=0,r.WHITESPACE_CELL_CHAR=" ",r.WHITESPACE_CELL_WIDTH=1,r.WHITESPACE_CELL_CODE=32},4863:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Marker=void 0;const l=o(8460),_=o(844);class n{get id(){return this._id}constructor(u){this.line=u,this.isDisposed=!1,this._disposables=[],this._id=n._nextId++,this._onDispose=this.register(new l.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(u){return this._disposables.push(u),u}}r.Marker=n,n._nextId=1},7116:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_CHARSET=r.CHARSETS=void 0,r.CHARSETS={},r.DEFAULT_CHARSET=r.CHARSETS.B,r.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},r.CHARSETS.A={"#":"£"},r.CHARSETS.B=void 0,r.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},r.CHARSETS.C=r.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},r.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},r.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},r.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},r.CHARSETS.E=r.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},r.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},r.CHARSETS.H=r.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},r.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(A,r)=>{var o,l,_;Object.defineProperty(r,"__esModule",{value:!0}),r.C1_ESCAPED=r.C1=r.C0=void 0,(function(n){n.NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="\x07",n.BS="\b",n.HT=" ",n.LF=`
8
8
  `,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""})(o||(r.C0=o={})),(function(n){n.PAD="€",n.HOP="",n.BPH="‚",n.NBH="ƒ",n.IND="„",n.NEL="…",n.SSA="†",n.ESA="‡",n.HTS="ˆ",n.HTJ="‰",n.VTS="Š",n.PLD="‹",n.PLU="Œ",n.RI="",n.SS2="Ž",n.SS3="",n.DCS="",n.PU1="‘",n.PU2="’",n.STS="“",n.CCH="”",n.MW="•",n.SPA="–",n.EPA="—",n.SOS="˜",n.SGCI="™",n.SCI="š",n.CSI="›",n.ST="œ",n.OSC="",n.PM="ž",n.APC="Ÿ"})(l||(r.C1=l={})),(function(n){n.ST=`${o.ESC}\\`})(_||(r.C1_ESCAPED=_={}))},7399:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const l=o(2584),_={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:["'",'"']};r.evaluateKeyboardEvent=function(n,c,u,p){const h={type:0,cancel:!1,key:void 0},t=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?h.key=c?l.C0.ESC+"OA":l.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?h.key=c?l.C0.ESC+"OD":l.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?h.key=c?l.C0.ESC+"OC":l.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(h.key=c?l.C0.ESC+"OB":l.C0.ESC+"[B");break;case 8:h.key=n.ctrlKey?"\b":l.C0.DEL,n.altKey&&(h.key=l.C0.ESC+h.key);break;case 9:if(n.shiftKey){h.key=l.C0.ESC+"[Z";break}h.key=l.C0.HT,h.cancel=!0;break;case 13:h.key=n.altKey?l.C0.ESC+l.C0.CR:l.C0.CR,h.cancel=!0;break;case 27:h.key=l.C0.ESC,n.altKey&&(h.key=l.C0.ESC+l.C0.ESC),h.cancel=!0;break;case 37:if(n.metaKey)break;t?(h.key=l.C0.ESC+"[1;"+(t+1)+"D",h.key===l.C0.ESC+"[1;3D"&&(h.key=l.C0.ESC+(u?"b":"[1;5D"))):h.key=c?l.C0.ESC+"OD":l.C0.ESC+"[D";break;case 39:if(n.metaKey)break;t?(h.key=l.C0.ESC+"[1;"+(t+1)+"C",h.key===l.C0.ESC+"[1;3C"&&(h.key=l.C0.ESC+(u?"f":"[1;5C"))):h.key=c?l.C0.ESC+"OC":l.C0.ESC+"[C";break;case 38:if(n.metaKey)break;t?(h.key=l.C0.ESC+"[1;"+(t+1)+"A",u||h.key!==l.C0.ESC+"[1;3A"||(h.key=l.C0.ESC+"[1;5A")):h.key=c?l.C0.ESC+"OA":l.C0.ESC+"[A";break;case 40:if(n.metaKey)break;t?(h.key=l.C0.ESC+"[1;"+(t+1)+"B",u||h.key!==l.C0.ESC+"[1;3B"||(h.key=l.C0.ESC+"[1;5B")):h.key=c?l.C0.ESC+"OB":l.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(h.key=l.C0.ESC+"[2~");break;case 46:h.key=t?l.C0.ESC+"[3;"+(t+1)+"~":l.C0.ESC+"[3~";break;case 36:h.key=t?l.C0.ESC+"[1;"+(t+1)+"H":c?l.C0.ESC+"OH":l.C0.ESC+"[H";break;case 35:h.key=t?l.C0.ESC+"[1;"+(t+1)+"F":c?l.C0.ESC+"OF":l.C0.ESC+"[F";break;case 33:n.shiftKey?h.type=2:n.ctrlKey?h.key=l.C0.ESC+"[5;"+(t+1)+"~":h.key=l.C0.ESC+"[5~";break;case 34:n.shiftKey?h.type=3:n.ctrlKey?h.key=l.C0.ESC+"[6;"+(t+1)+"~":h.key=l.C0.ESC+"[6~";break;case 112:h.key=t?l.C0.ESC+"[1;"+(t+1)+"P":l.C0.ESC+"OP";break;case 113:h.key=t?l.C0.ESC+"[1;"+(t+1)+"Q":l.C0.ESC+"OQ";break;case 114:h.key=t?l.C0.ESC+"[1;"+(t+1)+"R":l.C0.ESC+"OR";break;case 115:h.key=t?l.C0.ESC+"[1;"+(t+1)+"S":l.C0.ESC+"OS";break;case 116:h.key=t?l.C0.ESC+"[15;"+(t+1)+"~":l.C0.ESC+"[15~";break;case 117:h.key=t?l.C0.ESC+"[17;"+(t+1)+"~":l.C0.ESC+"[17~";break;case 118:h.key=t?l.C0.ESC+"[18;"+(t+1)+"~":l.C0.ESC+"[18~";break;case 119:h.key=t?l.C0.ESC+"[19;"+(t+1)+"~":l.C0.ESC+"[19~";break;case 120:h.key=t?l.C0.ESC+"[20;"+(t+1)+"~":l.C0.ESC+"[20~";break;case 121:h.key=t?l.C0.ESC+"[21;"+(t+1)+"~":l.C0.ESC+"[21~";break;case 122:h.key=t?l.C0.ESC+"[23;"+(t+1)+"~":l.C0.ESC+"[23~";break;case 123:h.key=t?l.C0.ESC+"[24;"+(t+1)+"~":l.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(u&&!p||!n.altKey||n.metaKey)!u||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?h.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(h.key=l.C0.US),n.key==="@"&&(h.key=l.C0.NUL)):n.keyCode===65&&(h.type=1);else{const s=_[n.keyCode],e=s?.[n.shiftKey?1:0];if(e)h.key=l.C0.ESC+e;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let a=String.fromCharCode(i);n.shiftKey&&(a=a.toUpperCase()),h.key=l.C0.ESC+a}else if(n.keyCode===32)h.key=l.C0.ESC+(n.ctrlKey?l.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),h.key=l.C0.ESC+i,h.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?h.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?h.key=l.C0.NUL:n.keyCode>=51&&n.keyCode<=55?h.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?h.key=l.C0.DEL:n.keyCode===219?h.key=l.C0.ESC:n.keyCode===220?h.key=l.C0.FS:n.keyCode===221&&(h.key=l.C0.GS)}return h}},482:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},r.utf32ToString=function(o,l=0,_=o.length){let n="";for(let c=l;c<_;++c){let u=o[c];u>65535?(u-=65536,n+=String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):n+=String.fromCharCode(u)}return n},r.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,l){const _=o.length;if(!_)return 0;let n=0,c=0;if(this._interim){const u=o.charCodeAt(c++);56320<=u&&u<=57343?l[n++]=1024*(this._interim-55296)+u-56320+65536:(l[n++]=this._interim,l[n++]=u),this._interim=0}for(let u=c;u<_;++u){const p=o.charCodeAt(u);if(55296<=p&&p<=56319){if(++u>=_)return this._interim=p,n;const h=o.charCodeAt(u);56320<=h&&h<=57343?l[n++]=1024*(p-55296)+h-56320+65536:(l[n++]=p,l[n++]=h)}else p!==65279&&(l[n++]=p)}return n}},r.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,l){const _=o.length;if(!_)return 0;let n,c,u,p,h=0,t=0,s=0;if(this.interim[0]){let a=!1,f=this.interim[0];f&=(224&f)==192?31:(240&f)==224?15:7;let v,g=0;for(;(v=63&this.interim[++g])&&g<4;)f<<=6,f|=v;const d=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,m=d-g;for(;s<m;){if(s>=_)return 0;if(v=o[s++],(192&v)!=128){s--,a=!0;break}this.interim[g++]=v,f<<=6,f|=63&v}a||(d===2?f<128?s--:l[h++]=f:d===3?f<2048||f>=55296&&f<=57343||f===65279||(l[h++]=f):f<65536||f>1114111||(l[h++]=f)),this.interim.fill(0)}const e=_-4;let i=s;for(;i<_;){for(;!(!(i<e)||128&(n=o[i])||128&(c=o[i+1])||128&(u=o[i+2])||128&(p=o[i+3]));)l[h++]=n,l[h++]=c,l[h++]=u,l[h++]=p,i+=4;if(n=o[i++],n<128)l[h++]=n;else if((224&n)==192){if(i>=_)return this.interim[0]=n,h;if(c=o[i++],(192&c)!=128){i--;continue}if(t=(31&n)<<6|63&c,t<128){i--;continue}l[h++]=t}else if((240&n)==224){if(i>=_)return this.interim[0]=n,h;if(c=o[i++],(192&c)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=c,h;if(u=o[i++],(192&u)!=128){i--;continue}if(t=(15&n)<<12|(63&c)<<6|63&u,t<2048||t>=55296&&t<=57343||t===65279)continue;l[h++]=t}else if((248&n)==240){if(i>=_)return this.interim[0]=n,h;if(c=o[i++],(192&c)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=c,h;if(u=o[i++],(192&u)!=128){i--;continue}if(i>=_)return this.interim[0]=n,this.interim[1]=c,this.interim[2]=u,h;if(p=o[i++],(192&p)!=128){i--;continue}if(t=(7&n)<<18|(63&c)<<12|(63&u)<<6|63&p,t<65536||t>1114111)continue;l[h++]=t}}return h}}},225:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const l=o(1480),_=[[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]],n=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let c;r.UnicodeV6=class{constructor(){if(this.version="6",!c){c=new Uint8Array(65536),c.fill(1),c[0]=0,c.fill(0,1,32),c.fill(0,127,160),c.fill(2,4352,4448),c[9001]=2,c[9002]=2,c.fill(2,11904,42192),c[12351]=1,c.fill(2,44032,55204),c.fill(2,63744,64256),c.fill(2,65040,65050),c.fill(2,65072,65136),c.fill(2,65280,65377),c.fill(2,65504,65511);for(let u=0;u<_.length;++u)c.fill(0,_[u][0],_[u][1]+1)}}wcwidth(u){return u<32?0:u<127?1:u<65536?c[u]:(function(p,h){let t,s=0,e=h.length-1;if(p<h[0][0]||p>h[e][1])return!1;for(;e>=s;)if(t=s+e>>1,p>h[t][1])s=t+1;else{if(!(p<h[t][0]))return!0;e=t-1}return!1})(u,n)?0:u>=131072&&u<=196605||u>=196608&&u<=262141?2:1}charProperties(u,p){let h=this.wcwidth(u),t=h===0&&p!==0;if(t){const s=l.UnicodeService.extractWidth(p);s===0?t=!1:s>h&&(h=s)}return l.UnicodeService.createPropertyValue(0,h,t)}}},5981:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WriteBuffer=void 0;const l=o(8460),_=o(844);class n extends _.Disposable{constructor(u){super(),this._action=u,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(u,p){if(p!==void 0&&this._syncCalls>p)return void(this._syncCalls=0);if(this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let h;for(this._isSyncWriting=!0;h=this._writeBuffer.shift();){this._action(h);const t=this._callbacks.shift();t&&t()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(u,p){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(p),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(p)}_innerWrite(u=0,p=!0){const h=u||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const t=this._writeBuffer[this._bufferOffset],s=this._action(t,p);if(s){const i=a=>Date.now()-h>=12?setTimeout((()=>this._innerWrite(0,a))):this._innerWrite(h,a);return void s.catch((a=>(queueMicrotask((()=>{throw a})),Promise.resolve(!1)))).then(i)}const e=this._callbacks[this._bufferOffset];if(e&&e(),this._bufferOffset++,this._pendingData-=t.length,Date.now()-h>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}r.WriteBuffer=n},5941:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.toRgbString=r.parseColor=void 0;const o=/^([\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})$/,l=/^[\da-f]+$/;function _(n,c){const u=n.toString(16),p=u.length<2?"0"+u:u;switch(c){case 4:return u[0];case 8:return p;case 12:return(p+p).slice(0,3);default:return p+p}}r.parseColor=function(n){if(!n)return;let c=n.toLowerCase();if(c.indexOf("rgb:")===0){c=c.slice(4);const u=o.exec(c);if(u){const p=u[1]?15:u[4]?255:u[7]?4095:65535;return[Math.round(parseInt(u[1]||u[4]||u[7]||u[10],16)/p*255),Math.round(parseInt(u[2]||u[5]||u[8]||u[11],16)/p*255),Math.round(parseInt(u[3]||u[6]||u[9]||u[12],16)/p*255)]}}else if(c.indexOf("#")===0&&(c=c.slice(1),l.exec(c)&&[3,6,9,12].includes(c.length))){const u=c.length/3,p=[0,0,0];for(let h=0;h<3;++h){const t=parseInt(c.slice(u*h,u*h+u),16);p[h]=u===1?t<<4:u===2?t:u===3?t>>4:t>>8}return p}},r.toRgbString=function(n,c=16){const[u,p,h]=n;return`rgb:${_(u,c)}/${_(p,c)}/${_(h,c)}`}},5770:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.PAYLOAD_LIMIT=void 0,r.PAYLOAD_LIMIT=1e7},6351:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DcsHandler=r.DcsParser=void 0;const l=o(482),_=o(8742),n=o(5770),c=[];r.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=c,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=c}registerHandler(p,h){this._handlers[p]===void 0&&(this._handlers[p]=[]);const t=this._handlers[p];return t.push(h),{dispose:()=>{const s=t.indexOf(h);s!==-1&&t.splice(s,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}reset(){if(this._active.length)for(let 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=c,this._ident=0}hook(p,h){if(this.reset(),this._ident=p,this._active=this._handlers[p]||c,this._active.length)for(let t=this._active.length-1;t>=0;t--)this._active[t].hook(h);else this._handlerFb(this._ident,"HOOK",h)}put(p,h,t){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(p,h,t);else this._handlerFb(this._ident,"PUT",(0,l.utf32ToString)(p,h,t))}unhook(p,h=!0){if(this._active.length){let t=!1,s=this._active.length-1,e=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,t=h,e=this._stack.fallThrough,this._stack.paused=!1),!e&&t===!1){for(;s>=0&&(t=this._active[s].unhook(p),t!==!0);s--)if(t instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,t;s--}for(;s>=0;s--)if(t=this._active[s].unhook(!1),t instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,t}else this._handlerFb(this._ident,"UNHOOK",p);this._active=c,this._ident=0}};const u=new _.Params;u.addParam(0),r.DcsHandler=class{constructor(p){this._handler=p,this._data="",this._params=u,this._hitLimit=!1}hook(p){this._params=p.length>1||p.params[0]?p.clone():u,this._data="",this._hitLimit=!1}put(p,h,t){this._hitLimit||(this._data+=(0,l.utf32ToString)(p,h,t),this._data.length>n.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(p){let h=!1;if(this._hitLimit)h=!1;else if(p&&(h=this._handler(this._data,this._params),h instanceof Promise))return h.then((t=>(this._params=u,this._data="",this._hitLimit=!1,t)));return this._params=u,this._data="",this._hitLimit=!1,h}}},2015:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.EscapeSequenceParser=r.VT500_TRANSITION_TABLE=r.TransitionTable=void 0;const l=o(844),_=o(8742),n=o(6242),c=o(6351);class u{constructor(s){this.table=new Uint8Array(s)}setDefault(s,e){this.table.fill(s<<4|e)}add(s,e,i,a){this.table[e<<8|s]=i<<4|a}addMany(s,e,i,a){for(let f=0;f<s.length;f++)this.table[e<<8|s[f]]=i<<4|a}}r.TransitionTable=u;const p=160;r.VT500_TRANSITION_TABLE=(function(){const t=new u(4095),s=Array.apply(null,Array(256)).map(((g,d)=>d)),e=(g,d)=>s.slice(g,d),i=e(32,127),a=e(0,24);a.push(25),a.push.apply(a,e(28,32));const f=e(0,14);let v;for(v in t.setDefault(1,0),t.addMany(i,0,2,0),f)t.addMany([24,26,153,154],v,3,0),t.addMany(e(128,144),v,3,0),t.addMany(e(144,152),v,3,0),t.add(156,v,0,0),t.add(27,v,11,1),t.add(157,v,4,8),t.addMany([152,158,159],v,0,7),t.add(155,v,11,3),t.add(144,v,11,9);return t.addMany(a,0,3,0),t.addMany(a,1,3,1),t.add(127,1,0,1),t.addMany(a,8,0,8),t.addMany(a,3,3,3),t.add(127,3,0,3),t.addMany(a,4,3,4),t.add(127,4,0,4),t.addMany(a,6,3,6),t.addMany(a,5,3,5),t.add(127,5,0,5),t.addMany(a,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(i,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(e(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(i,7,0,7),t.addMany(a,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(e(64,127),3,7,0),t.addMany(e(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(e(48,60),4,8,4),t.addMany(e(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(e(32,64),6,0,6),t.add(127,6,0,6),t.addMany(e(64,127),6,0,0),t.addMany(e(32,48),3,9,5),t.addMany(e(32,48),5,9,5),t.addMany(e(48,64),5,0,6),t.addMany(e(64,127),5,7,0),t.addMany(e(32,48),4,9,5),t.addMany(e(32,48),1,9,2),t.addMany(e(32,48),2,9,2),t.addMany(e(48,127),2,10,0),t.addMany(e(48,80),1,10,0),t.addMany(e(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(e(96,127),1,10,0),t.add(80,1,11,9),t.addMany(a,9,0,9),t.add(127,9,0,9),t.addMany(e(28,32),9,0,9),t.addMany(e(32,48),9,9,12),t.addMany(e(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(a,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(a,10,0,10),t.add(127,10,0,10),t.addMany(e(28,32),10,0,10),t.addMany(e(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(e(32,48),10,9,12),t.addMany(a,12,0,12),t.add(127,12,0,12),t.addMany(e(28,32),12,0,12),t.addMany(e(32,48),12,9,12),t.addMany(e(48,64),12,0,11),t.addMany(e(64,127),12,12,13),t.addMany(e(64,127),10,12,13),t.addMany(e(64,127),9,12,13),t.addMany(a,13,13,13),t.addMany(i,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(p,0,2,0),t.add(p,8,5,8),t.add(p,6,0,6),t.add(p,11,0,11),t.add(p,13,13,13),t})();class h extends l.Disposable{constructor(s=r.VT500_TRANSITION_TABLE){super(),this._transitions=s,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(e,i,a)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,i)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,l.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new n.OscParser),this._dcsParser=this.register(new c.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(s,e=[64,126]){let i=0;if(s.prefix){if(s.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=s.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(s.intermediates){if(s.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let f=0;f<s.intermediates.length;++f){const v=s.intermediates.charCodeAt(f);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=v}}if(s.final.length!==1)throw new Error("final must be a single byte");const a=s.final.charCodeAt(0);if(e[0]>a||a>e[1])throw new Error(`final must be in range ${e[0]} .. ${e[1]}`);return i<<=8,i|=a,i}identToString(s){const e=[];for(;s;)e.push(String.fromCharCode(255&s)),s>>=8;return e.reverse().join("")}setPrintHandler(s){this._printHandler=s}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(s,e){const i=this._identifier(s,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);const a=this._escHandlers[i];return a.push(e),{dispose:()=>{const f=a.indexOf(e);f!==-1&&a.splice(f,1)}}}clearEscHandler(s){this._escHandlers[this._identifier(s,[48,126])]&&delete this._escHandlers[this._identifier(s,[48,126])]}setEscHandlerFallback(s){this._escHandlerFb=s}setExecuteHandler(s,e){this._executeHandlers[s.charCodeAt(0)]=e}clearExecuteHandler(s){this._executeHandlers[s.charCodeAt(0)]&&delete this._executeHandlers[s.charCodeAt(0)]}setExecuteHandlerFallback(s){this._executeHandlerFb=s}registerCsiHandler(s,e){const i=this._identifier(s);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);const a=this._csiHandlers[i];return a.push(e),{dispose:()=>{const f=a.indexOf(e);f!==-1&&a.splice(f,1)}}}clearCsiHandler(s){this._csiHandlers[this._identifier(s)]&&delete this._csiHandlers[this._identifier(s)]}setCsiHandlerFallback(s){this._csiHandlerFb=s}registerDcsHandler(s,e){return this._dcsParser.registerHandler(this._identifier(s),e)}clearDcsHandler(s){this._dcsParser.clearHandler(this._identifier(s))}setDcsHandlerFallback(s){this._dcsParser.setHandlerFallback(s)}registerOscHandler(s,e){return this._oscParser.registerHandler(s,e)}clearOscHandler(s){this._oscParser.clearHandler(s)}setOscHandlerFallback(s){this._oscParser.setHandlerFallback(s)}setErrorHandler(s){this._errorHandler=s}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(s,e,i,a,f){this._parseStack.state=s,this._parseStack.handlers=e,this._parseStack.handlerPos=i,this._parseStack.transition=a,this._parseStack.chunkPos=f}parse(s,e,i){let a,f=0,v=0,g=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,g=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const d=this._parseStack.handlers;let m=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&m>-1){for(;m>=0&&(a=d[m](this._params),a!==!0);m--)if(a instanceof Promise)return this._parseStack.handlerPos=m,a}this._parseStack.handlers=[];break;case 4:if(i===!1&&m>-1){for(;m>=0&&(a=d[m](),a!==!0);m--)if(a instanceof Promise)return this._parseStack.handlerPos=m,a}this._parseStack.handlers=[];break;case 6:if(f=s[this._parseStack.chunkPos],a=this._dcsParser.unhook(f!==24&&f!==26,i),a)return a;f===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(f=s[this._parseStack.chunkPos],a=this._oscParser.end(f!==24&&f!==26,i),a)return a;f===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,g=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let d=g;d<e;++d){switch(f=s[d],v=this._transitions.table[this.currentState<<8|(f<160?f:p)],v>>4){case 2:for(let b=d+1;;++b){if(b>=e||(f=s[b])<32||f>126&&f<p){this._printHandler(s,d,b),d=b-1;break}if(++b>=e||(f=s[b])<32||f>126&&f<p){this._printHandler(s,d,b),d=b-1;break}if(++b>=e||(f=s[b])<32||f>126&&f<p){this._printHandler(s,d,b),d=b-1;break}if(++b>=e||(f=s[b])<32||f>126&&f<p){this._printHandler(s,d,b),d=b-1;break}}break;case 3:this._executeHandlers[f]?this._executeHandlers[f]():this._executeHandlerFb(f),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:d,code:f,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const m=this._csiHandlers[this._collect<<8|f];let E=m?m.length-1:-1;for(;E>=0&&(a=m[E](this._params),a!==!0);E--)if(a instanceof Promise)return this._preserveStack(3,m,E,v,d),a;E<0&&this._csiHandlerFb(this._collect<<8|f,this._params),this.precedingJoinState=0;break;case 8:do switch(f){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(f-48)}while(++d<e&&(f=s[d])>47&&f<60);d--;break;case 9:this._collect<<=8,this._collect|=f;break;case 10:const k=this._escHandlers[this._collect<<8|f];let D=k?k.length-1:-1;for(;D>=0&&(a=k[D](),a!==!0);D--)if(a instanceof Promise)return this._preserveStack(4,k,D,v,d),a;D<0&&this._escHandlerFb(this._collect<<8|f),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|f,this._params);break;case 13:for(let b=d+1;;++b)if(b>=e||(f=s[b])===24||f===26||f===27||f>127&&f<p){this._dcsParser.put(s,d,b),d=b-1;break}break;case 14:if(a=this._dcsParser.unhook(f!==24&&f!==26),a)return this._preserveStack(6,[],0,v,d),a;f===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let b=d+1;;b++)if(b>=e||(f=s[b])<32||f>127&&f<p){this._oscParser.put(s,d,b),d=b-1;break}break;case 6:if(a=this._oscParser.end(f!==24&&f!==26),a)return this._preserveStack(5,[],0,v,d),a;f===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&v}}}r.EscapeSequenceParser=h},6242:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OscHandler=r.OscParser=void 0;const l=o(5770),_=o(482),n=[];r.OscParser=class{constructor(){this._state=0,this._active=n,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(c,u){this._handlers[c]===void 0&&(this._handlers[c]=[]);const p=this._handlers[c];return p.push(u),{dispose:()=>{const h=p.indexOf(u);h!==-1&&p.splice(h,1)}}}clearHandler(c){this._handlers[c]&&delete this._handlers[c]}setHandlerFallback(c){this._handlerFb=c}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}reset(){if(this._state===2)for(let c=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;c>=0;--c)this._active[c].end(!1);this._stack.paused=!1,this._active=n,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||n,this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].start();else this._handlerFb(this._id,"START")}_put(c,u,p){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(c,u,p);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(c,u,p))}start(){this.reset(),this._state=1}put(c,u,p){if(this._state!==3){if(this._state===1)for(;u<p;){const h=c[u++];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-u>0&&this._put(c,u,p)}}end(c,u=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let p=!1,h=this._active.length-1,t=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,p=u,t=this._stack.fallThrough,this._stack.paused=!1),!t&&p===!1){for(;h>=0&&(p=this._active[h].end(c),p!==!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),p instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,p}else this._handlerFb(this._id,"END",c);this._active=n,this._id=-1,this._state=0}}},r.OscHandler=class{constructor(c){this._handler=c,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(c,u,p){this._hitLimit||(this._data+=(0,_.utf32ToString)(c,u,p),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(c){let u=!1;if(this._hitLimit)u=!1;else if(c&&(u=this._handler(this._data),u instanceof Promise))return u.then((p=>(this._data="",this._hitLimit=!1,p)));return this._data="",this._hitLimit=!1,u}}},8742:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Params=void 0;const o=2147483647;class l{static fromArray(n){const c=new l;if(!n.length)return c;for(let u=Array.isArray(n[0])?1:0;u<n.length;++u){const p=n[u];if(Array.isArray(p))for(let h=0;h<p.length;++h)c.addSubParam(p[h]);else c.addParam(p)}return c}constructor(n=32,c=32){if(this.maxLength=n,this.maxSubParamsLength=c,c>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(n),this.length=0,this._subParams=new Int32Array(c),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(n),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const n=new l(this.maxLength,this.maxSubParamsLength);return n.params.set(this.params),n.length=this.length,n._subParams.set(this._subParams),n._subParamsLength=this._subParamsLength,n._subParamsIdx.set(this._subParamsIdx),n._rejectDigits=this._rejectDigits,n._rejectSubDigits=this._rejectSubDigits,n._digitIsSub=this._digitIsSub,n}toArray(){const n=[];for(let c=0;c<this.length;++c){n.push(this.params[c]);const u=this._subParamsIdx[c]>>8,p=255&this._subParamsIdx[c];p-u>0&&n.push(Array.prototype.slice.call(this._subParams,u,p))}return n}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(n){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=n>o?o:n}}addSubParam(n){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(n<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=n>o?o:n,this._subParamsIdx[this.length-1]++}}hasSubParams(n){return(255&this._subParamsIdx[n])-(this._subParamsIdx[n]>>8)>0}getSubParams(n){const c=this._subParamsIdx[n]>>8,u=255&this._subParamsIdx[n];return u-c>0?this._subParams.subarray(c,u):null}getSubParamsAll(){const n={};for(let c=0;c<this.length;++c){const u=this._subParamsIdx[c]>>8,p=255&this._subParamsIdx[c];p-u>0&&(n[c]=this._subParams.slice(u,p))}return n}addDigit(n){let c;if(this._rejectDigits||!(c=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const u=this._digitIsSub?this._subParams:this.params,p=u[c-1];u[c-1]=~p?Math.min(10*p+n,o):n}}r.Params=l},5741:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.AddonManager=void 0,r.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,l){const _={instance:l,dispose:l.dispose,isDisposed:!1};this._addons.push(_),l.dispose=()=>this._wrappedAddonDispose(_),l.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let l=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===o){l=_;break}if(l===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(l,1)}}},8771:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferApiView=void 0;const l=o(3785),_=o(511);r.BufferApiView=class{constructor(n,c){this._buffer=n,this.type=c}init(n){return this._buffer=n,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(n){const c=this._buffer.lines.get(n);if(c)return new l.BufferLineApiView(c)}getNullCell(){return new _.CellData}}},3785:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferLineApiView=void 0;const l=o(511);r.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,n){if(!(_<0||_>=this._line.length))return n?(this._line.loadCell(_,n),n):this._line.loadCell(_,new l.CellData)}translateToString(_,n,c){return this._line.translateToString(_,n,c)}}},8285:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.BufferNamespaceApi=void 0;const l=o(8771),_=o(8460),n=o(844);class c extends n.Disposable{constructor(p){super(),this._core=p,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new l.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new l.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}r.BufferNamespaceApi=c},7975:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ParserApi=void 0,r.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,l){return this._core.registerCsiHandler(o,(_=>l(_.toArray())))}addCsiHandler(o,l){return this.registerCsiHandler(o,l)}registerDcsHandler(o,l){return this._core.registerDcsHandler(o,((_,n)=>l(_,n.toArray())))}addDcsHandler(o,l){return this.registerDcsHandler(o,l)}registerEscHandler(o,l){return this._core.registerEscHandler(o,l)}addEscHandler(o,l){return this.registerEscHandler(o,l)}registerOscHandler(o,l){return this._core.registerOscHandler(o,l)}addOscHandler(o,l){return this.registerOscHandler(o,l)}}},7090:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeApi=void 0,r.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(A,r,o){var l=this&&this.__decorate||function(t,s,e,i){var a,f=arguments.length,v=f<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,s,e,i);else for(var g=t.length-1;g>=0;g--)(a=t[g])&&(v=(f<3?a(v):f>3?a(s,e,v):a(s,e))||v);return f>3&&v&&Object.defineProperty(s,e,v),v},_=this&&this.__param||function(t,s){return function(e,i){s(e,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.BufferService=r.MINIMUM_ROWS=r.MINIMUM_COLS=void 0;const n=o(8460),c=o(844),u=o(5295),p=o(2585);r.MINIMUM_COLS=2,r.MINIMUM_ROWS=1;let h=r.BufferService=class extends c.Disposable{get buffer(){return this.buffers.active}constructor(t){super(),this.isUserScrolling=!1,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new n.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(t.rawOptions.cols||0,r.MINIMUM_COLS),this.rows=Math.max(t.rawOptions.rows||0,r.MINIMUM_ROWS),this.buffers=this.register(new u.BufferSet(t,this))}resize(t,s){this.cols=t,this.rows=s,this.buffers.resize(t,s),this._onResize.fire({cols:t,rows:s})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(t,s=!1){const e=this.buffer;let i;i=this._cachedBlankLine,i&&i.length===this.cols&&i.getFg(0)===t.fg&&i.getBg(0)===t.bg||(i=e.getBlankLine(t,s),this._cachedBlankLine=i),i.isWrapped=s;const a=e.ybase+e.scrollTop,f=e.ybase+e.scrollBottom;if(e.scrollTop===0){const v=e.lines.isFull;f===e.lines.length-1?v?e.lines.recycle().copyFrom(i):e.lines.push(i.clone()):e.lines.splice(f+1,0,i.clone()),v?this.isUserScrolling&&(e.ydisp=Math.max(e.ydisp-1,0)):(e.ybase++,this.isUserScrolling||e.ydisp++)}else{const v=f-a+1;e.lines.shiftElements(a+1,v-1,-1),e.lines.set(f,i.clone())}this.isUserScrolling||(e.ydisp=e.ybase),this._onScroll.fire(e.ydisp)}scrollLines(t,s,e){const i=this.buffer;if(t<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else t+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);const a=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+t,i.ybase),0),a!==i.ydisp&&(s||this._onScroll.fire(i.ydisp))}};r.BufferService=h=l([_(0,p.IOptionsService)],h)},7994:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CharsetService=void 0,r.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,l){this._charsets[o]=l,this.glevel===o&&(this.charset=l)}}},1753:function(A,r,o){var l=this&&this.__decorate||function(i,a,f,v){var g,d=arguments.length,m=d<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,f):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(i,a,f,v);else for(var E=i.length-1;E>=0;E--)(g=i[E])&&(m=(d<3?g(m):d>3?g(a,f,m):g(a,f))||m);return d>3&&m&&Object.defineProperty(a,f,m),m},_=this&&this.__param||function(i,a){return function(f,v){a(f,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreMouseService=void 0;const n=o(2585),c=o(8460),u=o(844),p={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:i=>i.button!==4&&i.action===1&&(i.ctrl=!1,i.alt=!1,i.shift=!1,!0)},VT200:{events:19,restrict:i=>i.action!==32},DRAG:{events:23,restrict:i=>i.action!==32||i.button!==3},ANY:{events:31,restrict:i=>!0}};function h(i,a){let f=(i.ctrl?16:0)|(i.shift?4:0)|(i.alt?8:0);return i.button===4?(f|=64,f|=i.action):(f|=3&i.button,4&i.button&&(f|=64),8&i.button&&(f|=128),i.action===32?f|=32:i.action!==0||a||(f|=3)),f}const t=String.fromCharCode,s={DEFAULT:i=>{const a=[h(i,!1)+32,i.col+32,i.row+32];return a[0]>255||a[1]>255||a[2]>255?"":`\x1B[M${t(a[0])}${t(a[1])}${t(a[2])}`},SGR:i=>{const a=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${h(i,!0)};${i.col};${i.row}${a}`},SGR_PIXELS:i=>{const a=i.action===0&&i.button!==4?"m":"M";return`\x1B[<${h(i,!0)};${i.x};${i.y}${a}`}};let e=r.CoreMouseService=class extends u.Disposable{constructor(i,a){super(),this._bufferService=i,this._coreService=a,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new c.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const f of Object.keys(p))this.addProtocol(f,p[f]);for(const f of Object.keys(s))this.addEncoding(f,s[f]);this.reset()}addProtocol(i,a){this._protocols[i]=a}addEncoding(i,a){this._encodings[i]=a}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(i){if(!this._protocols[i])throw new Error(`unknown protocol "${i}"`);this._activeProtocol=i,this._onProtocolChange.fire(this._protocols[i].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(i){if(!this._encodings[i])throw new Error(`unknown encoding "${i}"`);this._activeEncoding=i}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(i){if(i.col<0||i.col>=this._bufferService.cols||i.row<0||i.row>=this._bufferService.rows||i.button===4&&i.action===32||i.button===3&&i.action!==32||i.button!==4&&(i.action===2||i.action===3)||(i.col++,i.row++,i.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,i,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(i))return!1;const a=this._encodings[this._activeEncoding](i);return a&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(a):this._coreService.triggerDataEvent(a,!0)),this._lastEvent=i,!0}explainEvents(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}}_equalEvents(i,a,f){if(f){if(i.x!==a.x||i.y!==a.y)return!1}else if(i.col!==a.col||i.row!==a.row)return!1;return i.button===a.button&&i.action===a.action&&i.ctrl===a.ctrl&&i.alt===a.alt&&i.shift===a.shift}};r.CoreMouseService=e=l([_(0,n.IBufferService),_(1,n.ICoreService)],e)},6975:function(A,r,o){var l=this&&this.__decorate||function(e,i,a,f){var v,g=arguments.length,d=g<3?i:f===null?f=Object.getOwnPropertyDescriptor(i,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(e,i,a,f);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(d=(g<3?v(d):g>3?v(i,a,d):v(i,a))||d);return g>3&&d&&Object.defineProperty(i,a,d),d},_=this&&this.__param||function(e,i){return function(a,f){i(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.CoreService=void 0;const n=o(1439),c=o(8460),u=o(844),p=o(2585),h=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let s=r.CoreService=class extends u.Disposable{constructor(e,i,a){super(),this._bufferService=e,this._logService=i,this._optionsService=a,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new c.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new c.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new c.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new c.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,n.clone)(h),this.decPrivateModes=(0,n.clone)(t)}reset(){this.modes=(0,n.clone)(h),this.decPrivateModes=(0,n.clone)(t)}triggerDataEvent(e,i=!1){if(this._optionsService.rawOptions.disableStdin)return;const a=this._bufferService.buffer;i&&this._optionsService.rawOptions.scrollOnUserInput&&a.ybase!==a.ydisp&&this._onRequestScrollToBottom.fire(),i&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`,(()=>e.split("").map((f=>f.charCodeAt(0))))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`,(()=>e.split("").map((i=>i.charCodeAt(0))))),this._onBinary.fire(e))}};r.CoreService=s=l([_(0,p.IBufferService),_(1,p.ILogService),_(2,p.IOptionsService)],s)},9074:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.DecorationService=void 0;const l=o(8055),_=o(8460),n=o(844),c=o(6106);let u=0,p=0;class h extends n.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new c.SortedList((e=>e?.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,n.toDisposable)((()=>this.reset())))}registerDecoration(e){if(e.marker.isDisposed)return;const i=new t(e);if(i){const a=i.marker.onDispose((()=>i.dispose()));i.onDispose((()=>{i&&(this._decorations.delete(i)&&this._onDecorationRemoved.fire(i),a.dispose())})),this._decorations.insert(i),this._onDecorationRegistered.fire(i)}return i}reset(){for(const e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,i,a){let f=0,v=0;for(const g of this._decorations.getKeyIterator(i))f=g.options.x??0,v=f+(g.options.width??1),e>=f&&e<v&&(!a||(g.options.layer??"bottom")===a)&&(yield g)}forEachDecorationAtCell(e,i,a,f){this._decorations.forEachByKey(i,(v=>{u=v.options.x??0,p=u+(v.options.width??1),e>=u&&e<p&&(!a||(v.options.layer??"bottom")===a)&&f(v)}))}}r.DecorationService=h;class t extends n.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=l.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=l.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(e){super(),this.options=e,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.InstantiationService=r.ServiceCollection=void 0;const l=o(2585),_=o(8343);class n{constructor(...u){this._entries=new Map;for(const[p,h]of u)this.set(p,h)}set(u,p){const h=this._entries.get(u);return this._entries.set(u,p),h}forEach(u){for(const[p,h]of this._entries.entries())u(p,h)}has(u){return this._entries.has(u)}get(u){return this._entries.get(u)}}r.ServiceCollection=n,r.InstantiationService=class{constructor(){this._services=new n,this._services.set(l.IInstantiationService,this)}setService(c,u){this._services.set(c,u)}getService(c){return this._services.get(c)}createInstance(c,...u){const p=(0,_.getServiceDependencies)(c).sort(((s,e)=>s.index-e.index)),h=[];for(const s of p){const e=this._services.get(s.id);if(!e)throw new Error(`[createInstance] ${c.name} depends on UNKNOWN service ${s.id}.`);h.push(e)}const t=p.length>0?p[0].index:u.length;if(u.length!==t)throw new Error(`[createInstance] First service dependency of ${c.name} at position ${t+1} conflicts with ${u.length} static arguments`);return new c(...u,...h)}}},7866:function(A,r,o){var l=this&&this.__decorate||function(t,s,e,i){var a,f=arguments.length,v=f<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,s,e,i);else for(var g=t.length-1;g>=0;g--)(a=t[g])&&(v=(f<3?a(v):f>3?a(s,e,v):a(s,e))||v);return f>3&&v&&Object.defineProperty(s,e,v),v},_=this&&this.__param||function(t,s){return function(e,i){s(e,i,t)}};Object.defineProperty(r,"__esModule",{value:!0}),r.traceCall=r.setTraceLogger=r.LogService=void 0;const n=o(844),c=o(2585),u={trace:c.LogLevelEnum.TRACE,debug:c.LogLevelEnum.DEBUG,info:c.LogLevelEnum.INFO,warn:c.LogLevelEnum.WARN,error:c.LogLevelEnum.ERROR,off:c.LogLevelEnum.OFF};let p,h=r.LogService=class extends n.Disposable{get logLevel(){return this._logLevel}constructor(t){super(),this._optionsService=t,this._logLevel=c.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),p=this}_updateLogLevel(){this._logLevel=u[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(t){for(let s=0;s<t.length;s++)typeof t[s]=="function"&&(t[s]=t[s]())}_log(t,s,e){this._evalLazyOptionalParams(e),t.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+s,...e)}trace(t,...s){this._logLevel<=c.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,t,s)}debug(t,...s){this._logLevel<=c.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,t,s)}info(t,...s){this._logLevel<=c.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,t,s)}warn(t,...s){this._logLevel<=c.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,t,s)}error(t,...s){this._logLevel<=c.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,t,s)}};r.LogService=h=l([_(0,c.IOptionsService)],h),r.setTraceLogger=function(t){p=t},r.traceCall=function(t,s,e){if(typeof e.value!="function")throw new Error("not supported");const i=e.value;e.value=function(...a){if(p.logLevel!==c.LogLevelEnum.TRACE)return i.apply(this,a);p.trace(`GlyphRenderer#${i.name}(${a.map((v=>JSON.stringify(v))).join(", ")})`);const f=i.apply(this,a);return p.trace(`GlyphRenderer#${i.name} return`,f),f}}},7302:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.OptionsService=r.DEFAULT_OPTIONS=void 0;const l=o(8460),_=o(844),n=o(6114);r.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:n.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const c=["normal","bold","100","200","300","400","500","600","700","800","900"];class u extends _.Disposable{constructor(h){super(),this._onOptionChange=this.register(new l.EventEmitter),this.onOptionChange=this._onOptionChange.event;const t={...r.DEFAULT_OPTIONS};for(const s in h)if(s in t)try{const e=h[s];t[s]=this._sanitizeAndValidateOption(s,e)}catch(e){console.error(e)}this.rawOptions=t,this.options={...t},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(h,t){return this.onOptionChange((s=>{s===h&&t(this.rawOptions[h])}))}onMultipleOptionChange(h,t){return this.onOptionChange((s=>{h.indexOf(s)!==-1&&t()}))}_setupOptions(){const h=s=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);return this.rawOptions[s]},t=(s,e)=>{if(!(s in r.DEFAULT_OPTIONS))throw new Error(`No option with key "${s}"`);e=this._sanitizeAndValidateOption(s,e),this.rawOptions[s]!==e&&(this.rawOptions[s]=e,this._onOptionChange.fire(s))};for(const s in this.rawOptions){const e={get:h.bind(this,s),set:t.bind(this,s)};Object.defineProperty(this.options,s,e)}}_sanitizeAndValidateOption(h,t){switch(h){case"cursorStyle":if(t||(t=r.DEFAULT_OPTIONS[h]),!(function(s){return s==="block"||s==="underline"||s==="bar"})(t))throw new Error(`"${t}" is not a valid value for ${h}`);break;case"wordSeparator":t||(t=r.DEFAULT_OPTIONS[h]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=c.includes(t)?t:r.DEFAULT_OPTIONS[h];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${h} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(10*t)/10));break;case"scrollback":if((t=Math.min(t,4294967295))<0)throw new Error(`${h} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${h} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${h} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{}}return t}}r.OptionsService=u},2660:function(A,r,o){var l=this&&this.__decorate||function(u,p,h,t){var s,e=arguments.length,i=e<3?p:t===null?t=Object.getOwnPropertyDescriptor(p,h):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(u,p,h,t);else for(var a=u.length-1;a>=0;a--)(s=u[a])&&(i=(e<3?s(i):e>3?s(p,h,i):s(p,h))||i);return e>3&&i&&Object.defineProperty(p,h,i),i},_=this&&this.__param||function(u,p){return function(h,t){p(h,t,u)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkService=void 0;const n=o(2585);let c=r.OscLinkService=class{constructor(u){this._bufferService=u,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(u){const p=this._bufferService.buffer;if(u.id===void 0){const a=p.addMarker(p.ybase+p.y),f={data:u,id:this._nextId++,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(f,a))),this._dataByLinkId.set(f.id,f),f.id}const h=u,t=this._getEntryIdKey(h),s=this._entriesWithId.get(t);if(s)return this.addLineToLink(s.id,p.ybase+p.y),s.id;const e=p.addMarker(p.ybase+p.y),i={id:this._nextId++,key:this._getEntryIdKey(h),data:h,lines:[e]};return e.onDispose((()=>this._removeMarkerFromLink(i,e))),this._entriesWithId.set(i.key,i),this._dataByLinkId.set(i.id,i),i.id}addLineToLink(u,p){const h=this._dataByLinkId.get(u);if(h&&h.lines.every((t=>t.line!==p))){const t=this._bufferService.buffer.addMarker(p);h.lines.push(t),t.onDispose((()=>this._removeMarkerFromLink(h,t)))}}getLinkData(u){return this._dataByLinkId.get(u)?.data}_getEntryIdKey(u){return`${u.id};;${u.uri}`}_removeMarkerFromLink(u,p){const h=u.lines.indexOf(p);h!==-1&&(u.lines.splice(h,1),u.lines.length===0&&(u.data.id!==void 0&&this._entriesWithId.delete(u.key),this._dataByLinkId.delete(u.id)))}};r.OscLinkService=c=l([_(0,n.IBufferService)],c)},8343:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createDecorator=r.getServiceDependencies=r.serviceRegistry=void 0;const o="di$target",l="di$dependencies";r.serviceRegistry=new Map,r.getServiceDependencies=function(_){return _[l]||[]},r.createDecorator=function(_){if(r.serviceRegistry.has(_))return r.serviceRegistry.get(_);const n=function(c,u,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(h,t,s){t[o]===t?t[l].push({id:h,index:s}):(t[l]=[{id:h,index:s}],t[o]=t)})(n,c,p)};return n.toString=()=>_,r.serviceRegistry.set(_,n),n}},2585:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.IDecorationService=r.IUnicodeService=r.IOscLinkService=r.IOptionsService=r.ILogService=r.LogLevelEnum=r.IInstantiationService=r.ICharsetService=r.ICoreService=r.ICoreMouseService=r.IBufferService=void 0;const l=o(8343);var _;r.IBufferService=(0,l.createDecorator)("BufferService"),r.ICoreMouseService=(0,l.createDecorator)("CoreMouseService"),r.ICoreService=(0,l.createDecorator)("CoreService"),r.ICharsetService=(0,l.createDecorator)("CharsetService"),r.IInstantiationService=(0,l.createDecorator)("InstantiationService"),(function(n){n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.OFF=5]="OFF"})(_||(r.LogLevelEnum=_={})),r.ILogService=(0,l.createDecorator)("LogService"),r.IOptionsService=(0,l.createDecorator)("OptionsService"),r.IOscLinkService=(0,l.createDecorator)("OscLinkService"),r.IUnicodeService=(0,l.createDecorator)("UnicodeService"),r.IDecorationService=(0,l.createDecorator)("DecorationService")},1480:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const l=o(8460),_=o(225);class n{static extractShouldJoin(u){return(1&u)!=0}static extractWidth(u){return u>>1&3}static extractCharKind(u){return u>>3}static createPropertyValue(u,p,h=!1){return(16777215&u)<<3|(3&p)<<1|(h?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new l.EventEmitter,this.onChange=this._onChange.event;const u=new _.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(u){if(!this._providers[u])throw new Error(`unknown Unicode version "${u}"`);this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)}register(u){this._providers[u.version]=u}wcwidth(u){return this._activeProvider.wcwidth(u)}getStringCellWidth(u){let p=0,h=0;const t=u.length;for(let s=0;s<t;++s){let e=u.charCodeAt(s);if(55296<=e&&e<=56319){if(++s>=t)return p+this.wcwidth(e);const f=u.charCodeAt(s);56320<=f&&f<=57343?e=1024*(e-55296)+f-56320+65536:p+=this.wcwidth(f)}const i=this.charProperties(e,h);let a=n.extractWidth(i);n.extractShouldJoin(i)&&(a-=n.extractWidth(h)),p+=a,h=i}return p}charProperties(u,p){return this._activeProvider.charProperties(u,p)}}r.UnicodeService=n}},X={};function K(A){var r=X[A];if(r!==void 0)return r.exports;var o=X[A]={exports:{}};return Z[A].call(o.exports,o,o.exports,K),o.exports}var J={};return(()=>{var A=J;Object.defineProperty(A,"__esModule",{value:!0}),A.Terminal=void 0;const r=K(9042),o=K(3236),l=K(844),_=K(5741),n=K(8285),c=K(7975),u=K(7090),p=["cols","rows"];class h extends l.Disposable{constructor(s){super(),this._core=this.register(new o.Terminal(s)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const e=a=>this._core.options[a],i=(a,f)=>{this._checkReadonlyOptions(a),this._core.options[a]=f};for(const a in this._core.options){const f={get:e.bind(this,a),set:i.bind(this,a)};Object.defineProperty(this._publicOptions,a,f)}}_checkReadonlyOptions(s){if(p.includes(s))throw new Error(`Option "${s}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new c.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new u.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new n.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const s=this._core.coreService.decPrivateModes;let e="none";switch(this._core.coreMouseService.activeProtocol){case"X10":e="x10";break;case"VT200":e="vt200";break;case"DRAG":e="drag";break;case"ANY":e="any"}return{applicationCursorKeysMode:s.applicationCursorKeys,applicationKeypadMode:s.applicationKeypad,bracketedPasteMode:s.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:e,originMode:s.origin,reverseWraparoundMode:s.reverseWraparound,sendFocusMode:s.sendFocus,wraparoundMode:s.wraparound}}get options(){return this._publicOptions}set options(s){for(const e in s)this._publicOptions[e]=s[e]}blur(){this._core.blur()}focus(){this._core.focus()}input(s,e=!0){this._core.input(s,e)}resize(s,e){this._verifyIntegers(s,e),this._core.resize(s,e)}open(s){this._core.open(s)}attachCustomKeyEventHandler(s){this._core.attachCustomKeyEventHandler(s)}attachCustomWheelEventHandler(s){this._core.attachCustomWheelEventHandler(s)}registerLinkProvider(s){return this._core.registerLinkProvider(s)}registerCharacterJoiner(s){return this._checkProposedApi(),this._core.registerCharacterJoiner(s)}deregisterCharacterJoiner(s){this._checkProposedApi(),this._core.deregisterCharacterJoiner(s)}registerMarker(s=0){return this._verifyIntegers(s),this._core.registerMarker(s)}registerDecoration(s){return this._checkProposedApi(),this._verifyPositiveIntegers(s.x??0,s.width??0,s.height??0),this._core.registerDecoration(s)}hasSelection(){return this._core.hasSelection()}select(s,e,i){this._verifyIntegers(s,e,i),this._core.select(s,e,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(s,e){this._verifyIntegers(s,e),this._core.selectLines(s,e)}dispose(){super.dispose()}scrollLines(s){this._verifyIntegers(s),this._core.scrollLines(s)}scrollPages(s){this._verifyIntegers(s),this._core.scrollPages(s)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(s){this._verifyIntegers(s),this._core.scrollToLine(s)}clear(){this._core.clear()}write(s,e){this._core.write(s,e)}writeln(s,e){this._core.write(s),this._core.write(`\r
9
- `,e)}paste(s){this._core.paste(s)}refresh(s,e){this._verifyIntegers(s,e),this._core.refresh(s,e)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const e of s)if(e===1/0||isNaN(e)||e%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const e of s)if(e&&(e===1/0||isNaN(e)||e%1!=0||e<0))throw new Error("This API only accepts positive integers")}}A.Terminal=h})(),J})()))})(pe)),pe.exports}var ge={exports:{}},Ce;function De(){return Ce||(Ce=1,(function(se,de){(function(Z,X){se.exports=X()})(self,(()=>(()=>{var Z={};return(()=>{var X=Z;Object.defineProperty(X,"__esModule",{value:!0}),X.FitAddon=void 0,X.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){const K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;const J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;const A=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),c=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-A;return{cols:Math.max(2,Math.floor(c/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})()))})(ge)),ge.exports}var le={exports:{}},ke=le.exports,be;function Re(){return be||(be=1,(function(se,de){(function(Z,X){se.exports=X()})(ke,(()=>(()=>{var Z={433:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV11=void 0;const l=o(938),_=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],n=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],c=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],u=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let p;function h(t,s){let e,i=0,a=s.length-1;if(t<s[0][0]||t>s[a][1])return!1;for(;a>=i;)if(e=i+a>>1,t>s[e][1])i=e+1;else{if(!(t<s[e][0]))return!0;a=e-1}return!1}r.UnicodeV11=class{constructor(){if(this.version="11",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160);for(let t=0;t<_.length;++t)p.fill(0,_[t][0],_[t][1]+1);for(let t=0;t<c.length;++t)p.fill(2,c[t][0],c[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?p[t]:h(t,n)?0:h(t,u)?2:1}charProperties(t,s){let e=this.wcwidth(t),i=e===0&&s!==0;if(i){const a=l.UnicodeService.extractWidth(s);a===0?i=!1:a>e&&(e=a)}return l.UnicodeService.createPropertyValue(0,e,i)}}},345:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===o)return void this._listeners.splice(l,1)}}})),this._event}fire(o,l){const _=[];for(let n=0;n<this._listeners.length;n++)_.push(this._listeners[n]);for(let n=0;n<_.length;n++)_[n].call(void 0,o,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,l){return o((_=>l.fire(_)))},r.runAndSubscribe=function(o,l){return l(void 0),o((_=>l(_)))}},490:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const l=o(938),_=[[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]],n=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let c;r.UnicodeV6=class{constructor(){if(this.version="6",!c){c=new Uint8Array(65536),c.fill(1),c[0]=0,c.fill(0,1,32),c.fill(0,127,160),c.fill(2,4352,4448),c[9001]=2,c[9002]=2,c.fill(2,11904,42192),c[12351]=1,c.fill(2,44032,55204),c.fill(2,63744,64256),c.fill(2,65040,65050),c.fill(2,65072,65136),c.fill(2,65280,65377),c.fill(2,65504,65511);for(let u=0;u<_.length;++u)c.fill(0,_[u][0],_[u][1]+1)}}wcwidth(u){return u<32?0:u<127?1:u<65536?c[u]:(function(p,h){let t,s=0,e=h.length-1;if(p<h[0][0]||p>h[e][1])return!1;for(;e>=s;)if(t=s+e>>1,p>h[t][1])s=t+1;else{if(!(p<h[t][0]))return!0;e=t-1}return!1})(u,n)?0:u>=131072&&u<=196605||u>=196608&&u<=262141?2:1}charProperties(u,p){let h=this.wcwidth(u),t=h===0&&p!==0;if(t){const s=l.UnicodeService.extractWidth(p);s===0?t=!1:s>h&&(h=s)}return l.UnicodeService.createPropertyValue(0,h,t)}}},938:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const l=o(345),_=o(490);class n{static extractShouldJoin(u){return(1&u)!=0}static extractWidth(u){return u>>1&3}static extractCharKind(u){return u>>3}static createPropertyValue(u,p,h=!1){return(16777215&u)<<3|(3&p)<<1|(h?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new l.EventEmitter,this.onChange=this._onChange.event;const u=new _.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(u){if(!this._providers[u])throw new Error(`unknown Unicode version "${u}"`);this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)}register(u){this._providers[u.version]=u}wcwidth(u){return this._activeProvider.wcwidth(u)}getStringCellWidth(u){let p=0,h=0;const t=u.length;for(let s=0;s<t;++s){let e=u.charCodeAt(s);if(55296<=e&&e<=56319){if(++s>=t)return p+this.wcwidth(e);const f=u.charCodeAt(s);56320<=f&&f<=57343?e=1024*(e-55296)+f-56320+65536:p+=this.wcwidth(f)}const i=this.charProperties(e,h);let a=n.extractWidth(i);n.extractShouldJoin(i)&&(a-=n.extractWidth(h)),p+=a,h=i}return p}charProperties(u,p){return this._activeProvider.charProperties(u,p)}}r.UnicodeService=n}},X={};function K(A){var r=X[A];if(r!==void 0)return r.exports;var o=X[A]={exports:{}};return Z[A](o,o.exports,K),o.exports}var J={};return(()=>{var A=J;Object.defineProperty(A,"__esModule",{value:!0}),A.Unicode11Addon=void 0;const r=K(433);A.Unicode11Addon=class{activate(o){o.unicode.register(new r.UnicodeV11)}dispose(){}}})(),J})()))})(le)),le.exports}var me={exports:{}},we;function xe(){return we||(we=1,(function(se,de){(function(Z,X){se.exports=X()})(self,(()=>(()=>{var Z={6:(A,r)=>{function o(_){try{const n=new URL(_),c=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return _.toLocaleLowerCase().startsWith(c.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(_,n,c,u={}){this._terminal=_,this._regex=n,this._handler=c,this._options=u}provideLinks(_,n){const c=l.computeLink(_,this._regex,this._terminal,this._handler);n(this._addCallbacks(c))}_addCallbacks(_){return _.map((n=>(n.leave=this._options.leave,n.hover=(c,u)=>{if(this._options.hover){const{range:p}=n;this._options.hover(c,u,p)}},n)))}};class l{static computeLink(n,c,u,p){const h=new RegExp(c.source,(c.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,u),e=t.join("");let i;const a=[];for(;i=h.exec(e);){const f=i[0];if(!o(f))continue;const[v,g]=l._mapStrIdx(u,s,0,i.index),[d,m]=l._mapStrIdx(u,v,g,f.length);if(v===-1||g===-1||d===-1||m===-1)continue;const E={start:{x:g+1,y:v+1},end:{x:m,y:d+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,c){let u,p=n,h=n,t=0,s="";const e=[];if(u=c.buffer.active.getLine(n)){const i=u.translateToString(!0);if(u.isWrapped&&i[0]!==" "){for(t=0;(u=c.buffer.active.getLine(--p))&&t<2048&&(s=u.translateToString(!0),t+=s.length,e.push(s),u.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(u=c.buffer.active.getLine(++h))&&u.isWrapped&&t<2048&&(s=u.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,c,u,p){const h=n.buffer.active,t=h.getNullCell();let s=u;for(;p;){const e=h.getLine(c);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);const a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){const f=h.getLine(c+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[c,i]}c++,s=0}return[c,s]}}r.LinkComputer=l}},X={};function K(A){var r=X[A];if(r!==void 0)return r.exports;var o=X[A]={exports:{}};return Z[A](o,o.exports,K),o.exports}var J={};return(()=>{var A=J;Object.defineProperty(A,"__esModule",{value:!0}),A.WebLinksAddon=void 0;const r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(_,n){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}A.WebLinksAddon=class{constructor(_=l,n={}){this._handler=_,this._options=n}activate(_){this._terminal=_;const n=this._options,c=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,c,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})()))})(me)),me.exports}export{De as a,Re as b,xe as c,Le as r};
9
+ `,e)}paste(s){this._core.paste(s)}refresh(s,e){this._verifyIntegers(s,e),this._core.refresh(s,e)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const e of s)if(e===1/0||isNaN(e)||e%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const e of s)if(e&&(e===1/0||isNaN(e)||e%1!=0||e<0))throw new Error("This API only accepts positive integers")}}A.Terminal=h})(),J})()))})(pe)),pe.exports}var ge={exports:{}},Ce;function De(){return Ce||(Ce=1,(function(se,de){(function(Z,X){se.exports=X()})(self,(()=>(()=>{var Z={};return(()=>{var X=Z;Object.defineProperty(X,"__esModule",{value:!0}),X.FitAddon=void 0,X.FitAddon=class{activate(K){this._terminal=K}dispose(){}fit(){const K=this.proposeDimensions();if(!K||!this._terminal||isNaN(K.cols)||isNaN(K.rows))return;const J=this._terminal._core;this._terminal.rows===K.rows&&this._terminal.cols===K.cols||(J._renderService.clear(),this._terminal.resize(K.cols,K.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const K=this._terminal._core,J=K._renderService.dimensions;if(J.css.cell.width===0||J.css.cell.height===0)return;const A=this._terminal.options.scrollback===0?0:K.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),c=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-A;return{cols:Math.max(2,Math.floor(c/J.css.cell.width)),rows:Math.max(1,Math.floor(n/J.css.cell.height))}}}})(),Z})()))})(ge)),ge.exports}var le={exports:{}},ke=le.exports,be;function Re(){return be||(be=1,(function(se,de){(function(Z,X){se.exports=X()})(ke,(()=>(()=>{var Z={433:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV11=void 0;const l=o(938),_=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],n=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],c=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],u=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let p;function h(t,s){let e,i=0,a=s.length-1;if(t<s[0][0]||t>s[a][1])return!1;for(;a>=i;)if(e=i+a>>1,t>s[e][1])i=e+1;else{if(!(t<s[e][0]))return!0;a=e-1}return!1}r.UnicodeV11=class{constructor(){if(this.version="11",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160);for(let t=0;t<_.length;++t)p.fill(0,_[t][0],_[t][1]+1);for(let t=0;t<c.length;++t)p.fill(2,c[t][0],c[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?p[t]:h(t,n)?0:h(t,u)?2:1}charProperties(t,s){let e=this.wcwidth(t),i=e===0&&s!==0;if(i){const a=l.UnicodeService.extractWidth(s);a===0?i=!1:a>e&&(e=a)}return l.UnicodeService.createPropertyValue(0,e,i)}}},345:(A,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.runAndSubscribe=r.forwardEvent=r.EventEmitter=void 0,r.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let l=0;l<this._listeners.length;l++)if(this._listeners[l]===o)return void this._listeners.splice(l,1)}}})),this._event}fire(o,l){const _=[];for(let n=0;n<this._listeners.length;n++)_.push(this._listeners[n]);for(let n=0;n<_.length;n++)_[n].call(void 0,o,l)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},r.forwardEvent=function(o,l){return o((_=>l.fire(_)))},r.runAndSubscribe=function(o,l){return l(void 0),o((_=>l(_)))}},490:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeV6=void 0;const l=o(938),_=[[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]],n=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let c;r.UnicodeV6=class{constructor(){if(this.version="6",!c){c=new Uint8Array(65536),c.fill(1),c[0]=0,c.fill(0,1,32),c.fill(0,127,160),c.fill(2,4352,4448),c[9001]=2,c[9002]=2,c.fill(2,11904,42192),c[12351]=1,c.fill(2,44032,55204),c.fill(2,63744,64256),c.fill(2,65040,65050),c.fill(2,65072,65136),c.fill(2,65280,65377),c.fill(2,65504,65511);for(let u=0;u<_.length;++u)c.fill(0,_[u][0],_[u][1]+1)}}wcwidth(u){return u<32?0:u<127?1:u<65536?c[u]:(function(p,h){let t,s=0,e=h.length-1;if(p<h[0][0]||p>h[e][1])return!1;for(;e>=s;)if(t=s+e>>1,p>h[t][1])s=t+1;else{if(!(p<h[t][0]))return!0;e=t-1}return!1})(u,n)?0:u>=131072&&u<=196605||u>=196608&&u<=262141?2:1}charProperties(u,p){let h=this.wcwidth(u),t=h===0&&p!==0;if(t){const s=l.UnicodeService.extractWidth(p);s===0?t=!1:s>h&&(h=s)}return l.UnicodeService.createPropertyValue(0,h,t)}}},938:(A,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.UnicodeService=void 0;const l=o(345),_=o(490);class n{static extractShouldJoin(u){return(1&u)!=0}static extractWidth(u){return u>>1&3}static extractCharKind(u){return u>>3}static createPropertyValue(u,p,h=!1){return(16777215&u)<<3|(3&p)<<1|(h?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new l.EventEmitter,this.onChange=this._onChange.event;const u=new _.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(u){if(!this._providers[u])throw new Error(`unknown Unicode version "${u}"`);this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)}register(u){this._providers[u.version]=u}wcwidth(u){return this._activeProvider.wcwidth(u)}getStringCellWidth(u){let p=0,h=0;const t=u.length;for(let s=0;s<t;++s){let e=u.charCodeAt(s);if(55296<=e&&e<=56319){if(++s>=t)return p+this.wcwidth(e);const f=u.charCodeAt(s);56320<=f&&f<=57343?e=1024*(e-55296)+f-56320+65536:p+=this.wcwidth(f)}const i=this.charProperties(e,h);let a=n.extractWidth(i);n.extractShouldJoin(i)&&(a-=n.extractWidth(h)),p+=a,h=i}return p}charProperties(u,p){return this._activeProvider.charProperties(u,p)}}r.UnicodeService=n}},X={};function K(A){var r=X[A];if(r!==void 0)return r.exports;var o=X[A]={exports:{}};return Z[A](o,o.exports,K),o.exports}var J={};return(()=>{var A=J;Object.defineProperty(A,"__esModule",{value:!0}),A.Unicode11Addon=void 0;const r=K(433);A.Unicode11Addon=class{activate(o){o.unicode.register(new r.UnicodeV11)}dispose(){}}})(),J})()))})(le)),le.exports}var me={exports:{}},we;function xe(){return we||(we=1,(function(se,de){(function(Z,X){se.exports=X()})(self,(()=>(()=>{var Z={6:(A,r)=>{function o(_){try{const n=new URL(_),c=n.password&&n.username?`${n.protocol}//${n.username}:${n.password}@${n.host}`:n.username?`${n.protocol}//${n.username}@${n.host}`:`${n.protocol}//${n.host}`;return _.toLocaleLowerCase().startsWith(c.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(r,"__esModule",{value:!0}),r.LinkComputer=r.WebLinkProvider=void 0,r.WebLinkProvider=class{constructor(_,n,c,u={}){this._terminal=_,this._regex=n,this._handler=c,this._options=u}provideLinks(_,n){const c=l.computeLink(_,this._regex,this._terminal,this._handler);n(this._addCallbacks(c))}_addCallbacks(_){return _.map((n=>(n.leave=this._options.leave,n.hover=(c,u)=>{if(this._options.hover){const{range:p}=n;this._options.hover(c,u,p)}},n)))}};class l{static computeLink(n,c,u,p){const h=new RegExp(c.source,(c.flags||"")+"g"),[t,s]=l._getWindowedLineStrings(n-1,u),e=t.join("");let i;const a=[];for(;i=h.exec(e);){const f=i[0];if(!o(f))continue;const[v,g]=l._mapStrIdx(u,s,0,i.index),[d,m]=l._mapStrIdx(u,v,g,f.length);if(v===-1||g===-1||d===-1||m===-1)continue;const E={start:{x:g+1,y:v+1},end:{x:m,y:d+1}};a.push({range:E,text:f,activate:p})}return a}static _getWindowedLineStrings(n,c){let u,p=n,h=n,t=0,s="";const e=[];if(u=c.buffer.active.getLine(n)){const i=u.translateToString(!0);if(u.isWrapped&&i[0]!==" "){for(t=0;(u=c.buffer.active.getLine(--p))&&t<2048&&(s=u.translateToString(!0),t+=s.length,e.push(s),u.isWrapped&&s.indexOf(" ")===-1););e.reverse()}for(e.push(i),t=0;(u=c.buffer.active.getLine(++h))&&u.isWrapped&&t<2048&&(s=u.translateToString(!0),t+=s.length,e.push(s),s.indexOf(" ")===-1););}return[e,p]}static _mapStrIdx(n,c,u,p){const h=n.buffer.active,t=h.getNullCell();let s=u;for(;p;){const e=h.getLine(c);if(!e)return[-1,-1];for(let i=s;i<e.length;++i){e.getCell(i,t);const a=t.getChars();if(t.getWidth()&&(p-=a.length||1,i===e.length-1&&a==="")){const f=h.getLine(c+1);f&&f.isWrapped&&(f.getCell(0,t),t.getWidth()===2&&(p+=1))}if(p<0)return[c,i]}c++,s=0}return[c,s]}}r.LinkComputer=l}},X={};function K(A){var r=X[A];if(r!==void 0)return r.exports;var o=X[A]={exports:{}};return Z[A](o,o.exports,K),o.exports}var J={};return(()=>{var A=J;Object.defineProperty(A,"__esModule",{value:!0}),A.WebLinksAddon=void 0;const r=K(6),o=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function l(_,n){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}A.WebLinksAddon=class{constructor(_=l,n={}){this._handler=_,this._options=n}activate(_){this._terminal=_;const n=this._options,c=n.urlRegex||o;this._linkProvider=this._terminal.registerLinkProvider(new r.WebLinkProvider(this._terminal,c,this._handler,n))}dispose(){this._linkProvider?.dispose()}}})(),J})()))})(me)),me.exports}export{Re as a,xe as b,Le as c,De as r};
@@ -79,10 +79,10 @@
79
79
  document.documentElement.classList.remove('dark')
80
80
  }
81
81
  </script>
82
- <script type="module" crossorigin src="./assets/index-CpXbVBP2.js"></script>
83
- <link rel="modulepreload" crossorigin href="./assets/vendor-core-B1hRUZR_.js">
84
- <link rel="modulepreload" crossorigin href="./assets/vendor-ui-CMQTpMsc.js">
85
- <link rel="stylesheet" crossorigin href="./assets/index-C8unIZll.css">
82
+ <script type="module" crossorigin src="./assets/index-Ds4AosT0.js"></script>
83
+ <link rel="modulepreload" crossorigin href="./assets/vendor-core-BHu_Iam8.js">
84
+ <link rel="modulepreload" crossorigin href="./assets/vendor-ui-Lm7VJSSH.js">
85
+ <link rel="stylesheet" crossorigin href="./assets/index-WO9Mrc8w.css">
86
86
  </head>
87
87
 
88
88
  <body>