|
|
(self.webpackChunk=self.webpackChunk||[]).push([[9716],{84105:function(ie,B,n){"use strict";n.d(B,{Z:function(){return i}});var C=n(54476),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},h=y,f=n(7657),u=function(a,t){return _.createElement(f.Z,(0,C.Z)({},a,{ref:t,icon:h}))},p=_.forwardRef(u),i=p},73331:function(ie,B,n){"use strict";n.d(B,{Z:function(){return i}});var C=n(54476),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},h=y,f=n(7657),u=function(a,t){return _.createElement(f.Z,(0,C.Z)({},a,{ref:t,icon:h}))},p=_.forwardRef(u),i=p},15277:function(ie,B,n){"use strict";n.d(B,{Z:function(){return i}});var C=n(54476),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},h=y,f=n(7657),u=function(a,t){return _.createElement(f.Z,(0,C.Z)({},a,{ref:t,icon:h}))},p=_.forwardRef(u),i=p},47472:function(ie,B,n){"use strict";n.d(B,{Z:function(){return i}});var C=n(54476),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},h=y,f=n(7657),u=function(a,t){return _.createElement(f.Z,(0,C.Z)({},a,{ref:t,icon:h}))},p=_.forwardRef(u),i=p},87395:function(ie,B,n){"use strict";n.d(B,{Z:function(){return i}});var C=n(54476),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},h=y,f=n(7657),u=function(a,t){return _.createElement(f.Z,(0,C.Z)({},a,{ref:t,icon:h}))},p=_.forwardRef(u),i=p},85849:function(ie,B){"use strict";B.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},77433:function(ie,B,n){"use strict";n.d(B,{Z:function(){return h}});var C=n(58024),_={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},y=n(59301),h=({message:f,className:u,children:p,style:i={}})=>y.createElement("div",{className:`custom-spinner ${_.idsRingWrapper} ${u}`},y.createElement("div",{className:_.ldsRing},y.createElement("div",null),y.createElement("div",null),y.createElement("div",null),y.createElement("div",null)),f?y.createElement("p",{style:i},f):null,p,y.createElement(C.Outlet,null))},88909:function(ie,B,n){"use strict";n.d(B,{Z:function(){return u}});var C=n(59301),_={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},y=n(92310),h=n.n(y),u=({className:p,style:i={},leftNode:o,leftTitle:a="\u81EA\u6D4B\u8F93\u5165",rightNode:t,rightTitle:s="\u8FD0\u884C\u7ED3\u679C"})=>C.createElement("div",{className:h()(_.result,p),style:i},C.createElement("div",{className:_.left},C.createElement("div",{className:_.title},C.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),C.createElement("span",null,a)),C.createElement("div",{className:_.leftNode},o)),C.createElement("div",{className:_.right},C.createElement("div",{className:_.title},C.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),C.createElement("span",null,s)),C.createElement("div",{className:_.rightNode},t)))},52692:function(ie,B,n){"use strict";n.r(B),n.d(B,{default:function(){return e}});var C=n(59301),_=n(85849),y=n(29701),h=n(58024),f=n(71418),u=n(1322),p=n(72895),i=n(87498),o=n(24334),a=n(66649),t=n.n(a),s=(r,c,l)=>new Promise((E,w)=>{var S=m=>{try{x(l.next(m))}catch(d){w(d)}},v=m=>{try{x(l.throw(m))}catch(d){w(d)}},x=m=>m.done?E(m.value):Promise.resolve(m.value).then(S,v);x((l=l.apply(r,c)).next())}),e=()=>{const{submitId:r,id:c}=(0,h.useParams)(),[l,E]=(0,C.useState)(void 0);console.log((0,h.useLocation)(),33);const w=(0,h.useLocation)();function S(){var F;h.history.push(`/problems/${c}/oj/${(F=w==null?void 0:w.query)==null?void 0:F.backId}?tab=1`)}(0,C.useEffect)(()=>((0,h.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,h.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,C.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,C.useEffect)(()=>{r&&function(){return s(this,null,function*(){const U=yield(0,u.X6)(r);E(U.data)})}()},[r]);const{status:v,created_at:x,code:m,name:d,language:g,pass_sets_count:b,set_count:O,error_msg:L,output:k,input:I,expected_output:N,execute_memory:M,user:j,execute_time:A,input_file_url:D,output_file_url:R,is_file:P,expected_output_file_url:T}=l||{};return C.createElement(f.Z,{spinning:!l,delay:500},C.createElement("div",{className:"record-detail-info"},l?C.createElement(C.Fragment,null,C.createElement("header",{className:_.Z.header},C.createElement("div",null,C.createElement("img",{src:`${y.Z.IMG_SERVER}/images/${j.image_url}`,alt:"user",width:30}),C.createElement("span",null,j.name)),C.createElement("h2",null," ",d," "),C.createElement("button",{className:"ant-btn",onClick:S,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),C.createElement("div",{className:"record-detail-body"},C.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),C.createElement("ul",{className:"record-info"},C.createElement("li",null," \u72B6\u6001\uFF1A",C.createElement("span",{className:v===0?"c-green":"c-red"},p.Im[v])," "),C.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",C.createElement("span",null,t()(x).format("YYYY-MM-DD HH:mm:ss"))," "),C.createElement("li",null," \u8BED\u8A00\uFF1A",C.createElement("span",null,g)," "),C.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",C.createElement("span",null,A*1e3,"ms")," "),C.createElement("li",null," ",`${b} / ${O} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,p.gZ)({status:v,error_msg:L,execute_time:A,output:k,input:I,expected_output:N,input_file_url:D,output_file_url:R,is_file:P,expected_output_file_url:T}),C.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),C.createElement(i.ZP,{height:"200px",width:"100%",language:g==null?void 0:g.toLocaleLowerCase(),value:o.Base64.decode(m),options:{readOnly:!0}}))):null))}},72895:function(ie,B,n){"use strict";n.d(B,{Im:function(){return k},ZP:function(){return D},gZ:function(){return j}});var C=n(59301),_=n(92832),y=n(3113),h=n(84105),f=n(87395),u=n(28233),p=n(24334),i=n(77433),o=n(72481),a=n(99770),t=n(88909),s=n(34376),e=n(92310),r=n.n(e),c=n(58024),l=n(59301),E=Object.defineProperty,w=Object.defineProperties,S=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,d=(R,P,T)=>P in R?E(R,P,{enumerable:!0,configurable:!0,writable:!0,value:T}):R[P]=T,g=(R,P)=>{for(var T in P||(P={}))x.call(P,T)&&d(R,T,P[T]);if(v)for(var T of v(P))m.call(P,T)&&d(R,T,P[T]);return R},b=(R,P)=>w(R,S(P));const{TextArea:O}=_.default,L={visible:!1,tabIndex:"0"},k={[u.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[u.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[u.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var I=(R=>(R[R.SET_VISIBLE=0]="SET_VISIBLE",R[R.SET_TABINDEX=1]="SET_TABINDEX",R))(I||{});function N(R,P){switch(P.type){case 0:return b(g({},R),{visible:P.payload});case 1:return b(g({},R),{tabIndex:P.payload});default:throw new Error}}function M({value:R,className:P}){const T=(0,c.useIntl)(),[F,U]=(0,C.useState)(!1),z=(0,C.useRef)(),$=(0,C.useRef)();return(0,C.useEffect)(()=>{F&&($.current.reset(),$.current.write((0,a.pp)(R||"")))},[R,F]),(0,C.useEffect)(()=>{var q,H,W,Z;if(z.current){$.current=new s.Terminal({fontSize:14,disableStdin:!0}),$.current.open(z.current);const V=z.current.offsetWidth-14,K=((Z=(W=(H=(q=$.current)==null?void 0:q._core)==null?void 0:H._renderService)==null?void 0:W.dimensions)==null?void 0:Z.actualCellWidth)||9.5,ne=Math.ceil(V/K);$.current.resize(ne,8),U(!0)}},[]),l.createElement("div",{ref:z,className:r()("XtermText-valueRef",P)})}function j(R){const P=(0,c.useIntl)(),{status:T,error_msg:F,output:U,input:z,expected_output:$,is_file:q,input_file_url:H,output_file_url:W,expected_output_file_url:Z}=R;let V=null;const K={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(T){case u.h.NOMATCH:V=l.createElement(l.Fragment,null,l.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!q&&l.createElement(M,{className:"mb10",value:z}),q&&l.createElement("div",{style:K},l.createElement("a",{onClick:()=>(0,a.LR)(H,z)},z)),l.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!q&&l.createElement(M,{className:"mb10",value:U&&p.Base64.decode(U)||""}),q&&l.createElement("div",{style:K},l.createElement("a",{onClick:()=>(0,a.LR)(W,U)},U)),l.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!q&&l.createElement(M,{className:"mb10",value:$&&p.Base64.decode($)||""}),q&&l.createElement("div",{style:K},l.createElement("a",{onClick:()=>(0,a.LR)(Z,$)},$)));break;case u.h.EXECUTEFAILURE:V=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!q&&l.createElement(o.Z,{value:z,style:K}),q&&l.createElement("div",{style:K},l.createElement("a",{onClick:()=>(0,a.LR)(H,z)},z)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},p.Base64.decode(F)));break;case u.h.COMPILEFAILURE:V=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!q&&l.createElement(o.Z,{value:z,style:K}),q&&l.createElement("div",{style:K},l.createElement("a",{onClick:()=>(0,a.LR)(H,z)},z)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},p.Base64.decode(F)));break;case u.h.PODFAILURE:V=l.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case u.h.TIMEOUT:V=l.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.createElement(l.Fragment,null," ",V," ")}function A(R){const P=(0,c.useIntl)(),{status:T,error_msg:F,execute_time:U,output:z,input:$,expected_output:q,is_file:H,input_file_url:W,output_file_url:Z,expected_output_file_url:V}=R;let K=null;switch(T){case u.h.OK:K=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",U,"\u79D2"),l.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.createElement("pre",null,p.Base64.decode(z)));break;case u.h.NOMATCH:K=l.createElement(l.Fragment,null,l.createElement("p",null,"\u8F93\u5165\uFF1A",l.createElement("pre",null,$)),l.createElement("p",null,P.formatMessage({id:"questionBankAddQuestion.output",defaultMessage:"\u8F93\u51FA"}),"\uFF1A",z&&p.Base64.decode(z)),l.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",q&&p.Base64.decode(q)));break;case u.h.EXECUTEFAILURE:K=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.createElement("pre",null,$)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},p.Base64.decode(F)));break;case u.h.COMPILEFAILURE:K=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.createElement("pre",null,$)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},p.Base64.decode(F)));break;case u.h.PODFAILURE:K=l.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case u.h.TIMEOUT:K=l.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.createElement(l.Fragment,null," ",K," ")}var D=({id:R,is_file:P,input:T,debuging:F,submitting:U,executingMessage:z,debugResult:$,onChangeInput:q,onDebugCode:H,onSubmitCode:W})=>{const Z=(0,c.useIntl)(),[V,K]=(0,C.useReducer)(N,L),{visible:ne,tabIndex:oe}=V;(0,C.useEffect)(()=>{K({type:0,payload:!1})},[R]);function X(J){let ae=J.target.id;K({type:1,payload:ae})}function ce(){K({type:0,payload:!ne})}const _e=(0,C.useMemo)(()=>{if($){const{status:J}=$;return l.createElement(l.Fragment,null,A($))}return null},[$]);function Q(){K({type:0,payload:!0}),K({type:1,payload:"1"}),H()}return l.createElement("div",{className:"test-case-panel"},l.createElement("div",{className:`test-case-panel-body ${ne?"active":""}`},l.createElement("ul",{className:"s-navs"},l.createElement("li",null,l.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),l.createElement(t.Z,{leftTitle:Z.formatMessage({id:"questionBankAddQuestion.customTestCase",defaultMessage:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"}),rightTitle:Z.formatMessage({id:"questionBankAddQuestion.codeExecutionResult",defaultMessage:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"}),style:{height:240},leftNode:l.createElement(O,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:P?"":T,onChange:q}),rightNode:F?l.createElement(i.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):$?_e:l.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),l.createElement("a",{className:`btn-collapse ${ne?"up":""}`,onClick:ce},ne?l.createElement(h.Z,null):l.createElement(f.Z,null)),l.createElement("footer",{className:"footer"},l.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),l.createElement("div",{className:"flex-container"},l.createElement(y.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},Z.formatMessage({id:"testPaperBank.previousQuestion",defaultMessage:"\u4E0A\u4E00\u9898"})),l.createElement(y.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},Z.formatMessage({id:"testPaperBank.nextQuestion",defaultMessage:"\u4E0B\u4E00\u9898"})),l.createElement(y.ZP,{className:"btn-green",type:"ghost",loading:F,onClick:Q},Z.formatMessage({id:"questionBankAddQuestion.debugCode",defaultMessage:"\u8C03\u8BD5\u4EE3\u7801"})),l.createElement(y.ZP,{type:"primary",className:"custom-ant-disabled",loading:U,disabled:U,onClick:()=>{K({type:0,payload:!1}),W()}},Z.formatMessage({id:"questionBankAddQuestion.evaluateAndSubmit",defaultMessage:"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"})))))}},28233:function(ie,B,n){"use strict";n.d(B,{h:function(){return C}});var C=(_=>(_[_.NOMATCH=-1]="NOMATCH",_[_.OK=0]="OK",_[_.TIMEOUT=2]="TIMEOUT",_[_.PODFAILURE=3]="PODFAILURE",_[_.COMPILEFAILURE=4]="COMPILEFAILURE",_[_.EXECUTEFAILURE=5]="EXECUTEFAILURE",_[_.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",_))(C||{})},1322:function(ie,B,n){"use strict";n.d(B,{H7:function(){return o},KC:function(){return r},M3:function(){return w},MK:function(){return i},MU:function(){return h},Rg:function(){return x},WH:function(){return c},X6:function(){return u},bM:function(){return y},bx:function(){return l},dd:function(){return s},de:function(){return d},fi:function(){return a},fu:function(){return _},gu:function(){return E},n4:function(){return t},qe:function(){return v},rL:function(){return m},rX:function(){return p},uc:function(){return g},vl:function(){return e},wO:function(){return S},zO:function(){return f}});var C=n(59729);function _(b){return(0,C.U2)(`mypractices/${b}.json`,{hidePopLogin:!0})}function y(b,O){return(0,C.v_)(`mypractices/${b}/code_submit.json`,O)}function h(b,O){return(0,C.v_)(`mypractices/${b}/code_debug.json`,O)}function f(b,O){return O.language&&(O.language=encodeURIComponent(O.language)),(0,C.U2)(`mypractices/${b}/submit_records.json`,O)}function u(b){return(0,C.U2)("mypractices/record_detail.json",{id:b})}function p(b,O){return(0,C.U2)(`mypractices/${b}/result.json`,{mode:O})}function i(b,O){return(0,C.v_)(`mypractices/${b}/add_notes.json`,O)}function o(b,O){return(0,C.v_)(`mypractices/${b}/restore_initial_code.json`,O)}function a(b,O){return(0,C.v_)(`mypractices/${b}/sync_code.json`,O)}function t(b,O){return(0,C.v_)(`mypractices/${b}/update_code.json`,O)}function s(b){return(0,C.v_)(`mypractices/${b}/initial_codes.json`)}function e(b,O){return(0,C.v_)(`discusses/${b}/plus.json`,O)}function r(b){return(0,C.U2)("practices/practices_list.json",b)}function c(b,O){return(0,C.U2)(`practices/${b}/question_solution_articles`,O)}function l(b,O){return(0,C.v_)(`practices/${b}/question_solution_articles`,O)}function E(b,O){return(0,C.gz)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}`,O)}function w(b,O){return(0,C.U2)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}/edit`,O)}function S(b,O){return(0,C.U2)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}`,O)}function v(b,O){return(0,C.v_)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}/set_authority_or_excellent`,O)}function x(b,O){return(0,C.v_)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}/praise_or_treads`,O)}function m(b,O){return(0,C.v_)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}/hide`)}function d(b,O){return(0,C.IV)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}`,O)}function g(b,O){return(0,C.v_)(`mypractices/${b}/update_practice_time_sum`,O)}},19080:function(ie,B,n){"use strict";n.d(B,{F:function(){return f},Z:function(){return h}});var C=n(92310),_=n.n(C);const y=null;function h(u,p,i){return _()({[`${u}-status-success`]:p==="success",[`${u}-status-warning`]:p==="warning",[`${u}-status-error`]:p==="error",[`${u}-status-validating`]:p==="validating",[`${u}-has-feedback`]:i})}const f=(u,p)=>p||u},9432:function(ie,B,n){"use strict";n.d(B,{Z:function(){return S},n:function(){return E}});var C=n(19248),_=n(92310),y=n.n(_),h=n(93681),f=n(8654),u=n(59301),p=n(19080),i=n(36355),o=n(1684),a=n(19716),t=n(32441),s=n(33234),e=n(59412),r=n(9937);function c(v){return!!(v.prefix||v.suffix||v.allowClear)}var l=function(v,x){var m={};for(var d in v)Object.prototype.hasOwnProperty.call(v,d)&&x.indexOf(d)<0&&(m[d]=v[d]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,d=Object.getOwnPropertySymbols(v);g<d.length;g++)x.indexOf(d[g])<0&&Object.prototype.propertyIsEnumerable.call(v,d[g])&&(m[d[g]]=v[d[g]]);return m};function E(v,x){if(!v)return;v.focus(x);const{cursor:m}=x||{};if(m){const d=v.value.length;switch(m){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(d,d);break;default:v.setSelectionRange(0,d);break}}}var S=(0,u.forwardRef)((v,x)=>{var m;const{prefixCls:d,bordered:g=!0,status:b,size:O,disabled:L,onBlur:k,onFocus:I,suffix:N,allowClear:M,addonAfter:j,addonBefore:A,className:D,style:R,styles:P,rootClassName:T,onChange:F,classNames:U}=v,z=l(v,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:$,direction:q,input:H}=u.useContext(i.E_),W=$("input",d),Z=(0,u.useRef)(null),[V,K]=(0,r.ZP)(W),{compactSize:ne,compactItemClassnames:oe}=(0,s.ri)(W,q),X=(0,a.Z)(ge=>{var ye;return(ye=O!=null?O:ne)!==null&&ye!==void 0?ye:ge}),ce=u.useContext(o.Z),_e=L!=null?L:ce,{status:Q,hasFeedback:J,feedbackIcon:ae}=(0,u.useContext)(t.aM),le=(0,p.F)(Q,b),se=c(v)||!!J,pe=(0,u.useRef)(se);(0,u.useEffect)(()=>{var ge;se&&pe.current,pe.current=se},[se]);const ee=(0,e.Z)(Z,!0),G=ge=>{ee(),k==null||k(ge)},ve=ge=>{ee(),I==null||I(ge)},te=ge=>{ee(),F==null||F(ge)},ue=(J||N)&&u.createElement(u.Fragment,null,N,J&&ae);let he;return typeof M=="object"&&(M!=null&&M.clearIcon)?he=M:M&&(he={clearIcon:u.createElement(C.Z,null)}),V(u.createElement(h.default,Object.assign({ref:(0,f.sQ)(x,Z),prefixCls:W,autoComplete:H==null?void 0:H.autoComplete},z,{disabled:_e,onBlur:G,onFocus:ve,style:Object.assign(Object.assign({},H==null?void 0:H.style),R),styles:Object.assign(Object.assign({},H==null?void 0:H.styles),P),suffix:ue,allowClear:he,className:y()(D,T,oe,H==null?void 0:H.className),onChange:te,addonAfter:j&&u.createElement(s.BR,null,u.createElement(t.Ux,{override:!0,status:!0},j)),addonBefore:A&&u.createElement(s.BR,null,u.createElement(t.Ux,{override:!0,status:!0},A)),classNames:Object.assign(Object.assign(Object.assign({},U),H==null?void 0:H.classNames),{input:y()({[`${W}-sm`]:X==="small",[`${W}-lg`]:X==="large",[`${W}-rtl`]:q==="rtl",[`${W}-borderless`]:!g},!se&&(0,p.Z)(W,le),U==null?void 0:U.input,(m=H==null?void 0:H.classNames)===null||m===void 0?void 0:m.input,K)}),classes:{affixWrapper:y()({[`${W}-affix-wrapper-sm`]:X==="small",[`${W}-affix-wrapper-lg`]:X==="large",[`${W}-affix-wrapper-rtl`]:q==="rtl",[`${W}-affix-wrapper-borderless`]:!g},(0,p.Z)(`${W}-affix-wrapper`,le,J),K),wrapper:y()({[`${W}-group-rtl`]:q==="rtl"},K),group:y()({[`${W}-group-wrapper-sm`]:X==="small",[`${W}-group-wrapper-lg`]:X==="large",[`${W}-group-wrapper-rtl`]:q==="rtl",[`${W}-group-wrapper-disabled`]:_e},(0,p.Z)(`${W}-group-wrapper`,le,J),K)}})))})},1643:function(ie,B,n){"use strict";var C=n(19248),_=n(92310),y=n.n(_),h=n(9296),f=n(59301),u=n(19080),p=n(36355),i=n(1684),o=n(19716),a=n(32441),t=n(9432),s=n(9937),e=function(c,l){var E={};for(var w in c)Object.prototype.hasOwnProperty.call(c,w)&&l.indexOf(w)<0&&(E[w]=c[w]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,w=Object.getOwnPropertySymbols(c);S<w.length;S++)l.indexOf(w[S])<0&&Object.prototype.propertyIsEnumerable.call(c,w[S])&&(E[w[S]]=c[w[S]]);return E};const r=(0,f.forwardRef)((c,l)=>{const{prefixCls:E,bordered:w=!0,size:S,disabled:v,status:x,allowClear:m,showCount:d,classNames:g,rootClassName:b,className:O}=c,L=e(c,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:k,direction:I}=f.useContext(p.E_),N=(0,o.Z)(S),M=f.useContext(i.Z),j=v!=null?v:M,{status:A,hasFeedback:D,feedbackIcon:R}=f.useContext(a.aM),P=(0,u.F)(A,x),T=f.useRef(null);f.useImperativeHandle(l,()=>{var q;return{resizableTextArea:(q=T.current)===null||q===void 0?void 0:q.resizableTextArea,focus:H=>{var W,Z;(0,t.n)((Z=(W=T.current)===null||W===void 0?void 0:W.resizableTextArea)===null||Z===void 0?void 0:Z.textArea,H)},blur:()=>{var H;return(H=T.current)===null||H===void 0?void 0:H.blur()}}});const F=k("input",E);let U;typeof m=="object"&&(m!=null&&m.clearIcon)?U=m:m&&(U={clearIcon:f.createElement(C.Z,null)});const[z,$]=(0,s.ZP)(F);return z(f.createElement(h.default,Object.assign({},L,{disabled:j,allowClear:U,className:y()(O,b),classes:{affixWrapper:y()(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:I==="rtl",[`${F}-affix-wrapper-borderless`]:!w,[`${F}-affix-wrapper-sm`]:N==="small",[`${F}-affix-wrapper-lg`]:N==="large",[`${F}-textarea-show-count`]:d},(0,u.Z)(`${F}-affix-wrapper`,P),$)},classNames:Object.assign(Object.assign({},g),{textarea:y()({[`${F}-borderless`]:!w,[`${F}-sm`]:N==="small",[`${F}-lg`]:N==="large"},(0,u.Z)(F,P),$,g==null?void 0:g.textarea)}),prefixCls:F,suffix:D&&f.createElement("span",{className:`${F}-textarea-suffix`},R),showCount:d,ref:T})))});B.Z=r},59412:function(ie,B,n){"use strict";n.d(B,{Z:function(){return _}});var C=n(59301);function _(y,h){const f=(0,C.useRef)([]),u=()=>{f.current.push(setTimeout(()=>{var p,i,o,a;!((p=y.current)===null||p===void 0)&&p.input&&((i=y.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((o=y.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((a=y.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,C.useEffect)(()=>(h&&u(),()=>f.current.forEach(p=>{p&&clearTimeout(p)})),[]),u}},92832:function(ie,B,n){"use strict";n.d(B,{default:function(){return N}});var C=n(92310),_=n.n(C),y=n(59301),h=n(36355),f=n(32441),u=n(9937),i=M=>{const{getPrefixCls:j,direction:A}=(0,y.useContext)(h.E_),{prefixCls:D,className:R}=M,P=j("input-group",D),T=j("input"),[F,U]=(0,u.ZP)(T),z=_()(P,{[`${P}-lg`]:M.size==="large",[`${P}-sm`]:M.size==="small",[`${P}-compact`]:M.compact,[`${P}-rtl`]:A==="rtl"},U,R),$=(0,y.useContext)(f.aM),q=(0,y.useMemo)(()=>Object.assign(Object.assign({},$),{isFormItemInput:!1}),[$]);return F(y.createElement("span",{className:z,style:M.style,onMouseEnter:M.onMouseEnter,onMouseLeave:M.onMouseLeave,onFocus:M.onFocus,onBlur:M.onBlur},y.createElement(f.aM.Provider,{value:q},M.children)))},o=n(9432),a=n(73331),t=n(15277),s=n(2738),e=n(8654),r=n(59412),c=function(M,j){var A={};for(var D in M)Object.prototype.hasOwnProperty.call(M,D)&&j.indexOf(D)<0&&(A[D]=M[D]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,D=Object.getOwnPropertySymbols(M);R<D.length;R++)j.indexOf(D[R])<0&&Object.prototype.propertyIsEnumerable.call(M,D[R])&&(A[D[R]]=M[D[R]]);return A};const l=M=>M?y.createElement(t.Z,null):y.createElement(a.Z,null),E={click:"onClick",hover:"onMouseOver"};var S=y.forwardRef((M,j)=>{const{visibilityToggle:A=!0}=M,D=typeof A=="object"&&A.visible!==void 0,[R,P]=(0,y.useState)(()=>D?A.visible:!1),T=(0,y.useRef)(null);y.useEffect(()=>{D&&P(A.visible)},[D,A]);const F=(0,r.Z)(T),U=()=>{const{disabled:_e}=M;_e||(R&&F(),P(Q=>{var J;const ae=!Q;return typeof A=="object"&&((J=A.onVisibleChange)===null||J===void 0||J.call(A,ae)),ae}))},z=_e=>{const{action:Q="click",iconRender:J=l}=M,ae=E[Q]||"",le=J(R),se={[ae]:U,className:`${_e}-icon`,key:"passwordIcon",onMouseDown:pe=>{pe.preventDefault()},onMouseUp:pe=>{pe.preventDefault()}};return y.cloneElement(y.isValidElement(le)?le:y.createElement("span",null,le),se)},{className:$,prefixCls:q,inputPrefixCls:H,size:W}=M,Z=c(M,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:V}=y.useContext(h.E_),K=V("input",H),ne=V("input-password",q),oe=A&&z(ne),X=_()(ne,$,{[`${ne}-${W}`]:!!W}),ce=Object.assign(Object.assign({},(0,s.Z)(Z,["suffix","iconRender","visibilityToggle"])),{type:R?"text":"password",className:X,prefixCls:K,suffix:oe});return W&&(ce.size=W),y.createElement(o.Z,Object.assign({ref:(0,e.sQ)(j,T)},ce))}),v=n(47472),x=n(92343),m=n(3113),d=n(19716),g=n(33234),b=function(M,j){var A={};for(var D in M)Object.prototype.hasOwnProperty.call(M,D)&&j.indexOf(D)<0&&(A[D]=M[D]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,D=Object.getOwnPropertySymbols(M);R<D.length;R++)j.indexOf(D[R])<0&&Object.prototype.propertyIsEnumerable.call(M,D[R])&&(A[D[R]]=M[D[R]]);return A},L=y.forwardRef((M,j)=>{const{prefixCls:A,inputPrefixCls:D,className:R,size:P,suffix:T,enterButton:F=!1,addonAfter:U,loading:z,disabled:$,onSearch:q,onChange:H,onCompositionStart:W,onCompositionEnd:Z}=M,V=b(M,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:K,direction:ne}=y.useContext(h.E_),oe=y.useRef(!1),X=K("input-search",A),ce=K("input",D),{compactSize:_e}=(0,g.ri)(X,ne),Q=(0,d.Z)(re=>{var fe;return(fe=P!=null?P:_e)!==null&&fe!==void 0?fe:re}),J=y.useRef(null),ae=re=>{re&&re.target&&re.type==="click"&&q&&q(re.target.value,re,{source:"clear"}),H&&H(re)},le=re=>{var fe;document.activeElement===((fe=J.current)===null||fe===void 0?void 0:fe.input)&&re.preventDefault()},se=re=>{var fe,be;q&&q((be=(fe=J.current)===null||fe===void 0?void 0:fe.input)===null||be===void 0?void 0:be.value,re,{source:"input"})},pe=re=>{oe.current||z||se(re)},ee=typeof F=="boolean"?y.createElement(v.Z,null):null,G=`${X}-button`;let ve;const te=F||{},ue=te.type&&te.type.__ANT_BUTTON===!0;ue||te.type==="button"?ve=(0,x.Tm)(te,Object.assign({onMouseDown:le,onClick:re=>{var fe,be;(be=(fe=te==null?void 0:te.props)===null||fe===void 0?void 0:fe.onClick)===null||be===void 0||be.call(fe,re),se(re)},key:"enterButton"},ue?{className:G,size:Q}:{})):ve=y.createElement(m.ZP,{className:G,type:F?"primary":void 0,size:Q,disabled:$,key:"enterButton",onMouseDown:le,onClick:se,loading:z,icon:ee},F),U&&(ve=[ve,(0,x.Tm)(U,{key:"addonAfter"})]);const he=_()(X,{[`${X}-rtl`]:ne==="rtl",[`${X}-${Q}`]:!!Q,[`${X}-with-button`]:!!F},R),ge=re=>{oe.current=!0,W==null||W(re)},ye=re=>{oe.current=!1,Z==null||Z(re)};return y.createElement(o.Z,Object.assign({ref:(0,e.sQ)(J,j),onPressEnter:pe},V,{size:Q,onCompositionStart:ge,onCompositionEnd:ye,prefixCls:ce,addonAfter:ve,suffix:T,onChange:ae,className:he,disabled:$}))}),k=n(1643);const I=o.Z;I.Group=i,I.Search=L,I.TextArea=k.Z,I.Password=S;var N=I},9937:function(ie,B,n){"use strict";n.d(B,{M1:function(){return p},TM:function(){return x},Xy:function(){return i},bi:function(){return t},e5:function(){return v},ik:function(){return s},nz:function(){return f},pU:function(){return u},s7:function(){return e},x0:function(){return a}});var C=n(17313),_=n(74207),y=n(37613),h=n(83116);const f=m=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:m,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=m=>({borderColor:m.hoverBorderColor}),p=m=>({borderColor:m.activeBorderColor,boxShadow:m.activeShadow,outline:0}),i=m=>({color:m.colorTextDisabled,backgroundColor:m.colorBgContainerDisabled,borderColor:m.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,y.TS)(m,{hoverBorderColor:m.colorBorder})))}),o=m=>{const{paddingBlockLG:d,fontSizeLG:g,lineHeightLG:b,borderRadiusLG:O,paddingInlineLG:L}=m;return{padding:`${d}px ${L}px`,fontSize:g,lineHeight:b,borderRadius:O}},a=m=>({padding:`${m.paddingBlockSM}px ${m.paddingInlineSM}px`,borderRadius:m.borderRadiusSM}),t=(m,d)=>{const{componentCls:g,colorError:b,colorWarning:O,errorActiveShadow:L,warningActiveShadow:k,colorErrorBorderHover:I,colorWarningBorderHover:N}=m;return{[`&-status-error:not(${d}-disabled):not(${d}-borderless)${d}`]:{borderColor:b,"&:hover":{borderColor:I},"&:focus, &-focused":Object.assign({},p((0,y.TS)(m,{activeBorderColor:b,activeShadow:L}))),[`${g}-prefix, ${g}-suffix`]:{color:b}},[`&-status-warning:not(${d}-disabled):not(${d}-borderless)${d}`]:{borderColor:O,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},p((0,y.TS)(m,{activeBorderColor:O,activeShadow:k}))),[`${g}-prefix, ${g}-suffix`]:{color:O}}}},s=m=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${m.paddingBlock}px ${m.paddingInline}px`,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight,backgroundColor:m.colorBgContainer,backgroundImage:"none",borderWidth:m.lineWidth,borderStyle:m.lineType,borderColor:m.colorBorder,borderRadius:m.borderRadius,transition:`all ${m.motionDurationMid}`},f(m.colorTextPlaceholder)),{"&:hover":Object.assign({},u(m)),"&:focus, &-focused":Object.assign({},p(m)),"&-disabled, &[disabled]":Object.assign({},i(m)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:m.controlHeight,lineHeight:m.lineHeight,verticalAlign:"bottom",transition:`all ${m.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},o(m)),"&-sm":Object.assign({},a(m)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=m=>{const{componentCls:d,antCls:g}=m;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:m.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${d}, &-lg > ${d}-group-addon`]:Object.assign({},o(m)),[`&-sm ${d}, &-sm > ${d}-group-addon`]:Object.assign({},a(m)),[`&-lg ${g}-select-single ${g}-select-selector`]:{height:m.controlHeightLG},[`&-sm ${g}-select-single ${g}-select-selector`]:{height:m.controlHeightSM},[`> ${d}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${d}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${m.paddingInline}px`,color:m.colorText,fontWeight:"normal",fontSize:m.fontSize,textAlign:"center",backgroundColor:m.colorFillAlter,border:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`,borderRadius:m.borderRadius,transition:`all ${m.motionDurationSlow}`,lineHeight:1,[`${g}-select`]:{margin:`-${m.paddingBlock+1}px -${m.paddingInline}px`,[`&${g}-select-single:not(${g}-select-customize-input)`]:{[`${g}-select-selector`]:{backgroundColor:"inherit",border:`${m.lineWidth}px ${m.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${g}-select-selector`]:{color:m.colorPrimary}}},[`${g}-cascader-picker`]:{margin:`-9px -${m.paddingInline}px`,backgroundColor:"transparent",[`${g}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${d}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${d}-search-with-button &`]:{zIndex:0}}},[`> ${d}:first-child, ${d}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${g}-select ${g}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${d}-affix-wrapper`]:{[`&:not(:first-child) ${d}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${d}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${d}:last-child, ${d}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${g}-select ${g}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${d}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${d}-search &`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius}},[`&:not(:first-child), ${d}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${d}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,C.dF)()),{[`${d}-group-addon, ${d}-group-wrap, > ${d}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:m.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${d}-affix-wrapper,
|
|
|
& > ${d}-number-affix-wrapper,
|
|
|
& > ${g}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-m.lineWidth,borderInlineEndWidth:m.lineWidth},[`${d}`]:{float:"none"},[`& > ${g}-select > ${g}-select-selector,
|
|
|
& > ${g}-select-auto-complete ${d},
|
|
|
& > ${g}-cascader-picker ${d},
|
|
|
& > ${d}-group-wrapper ${d}`]:{borderInlineEndWidth:m.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${g}-select-focused`]:{zIndex:1},[`& > ${g}-select > ${g}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${g}-select:first-child > ${g}-select-selector,
|
|
|
& > ${g}-select-auto-complete:first-child ${d},
|
|
|
& > ${g}-cascader-picker:first-child ${d}`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius},[`& > *:last-child,
|
|
|
& > ${g}-select:last-child > ${g}-select-selector,
|
|
|
& > ${g}-cascader-picker:last-child ${d},
|
|
|
& > ${g}-cascader-picker-focused:last-child ${d}`]:{borderInlineEndWidth:m.lineWidth,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius},[`& > ${g}-select-auto-complete ${d}`]:{verticalAlign:"top"},[`${d}-group-wrapper + ${d}-group-wrapper`]:{marginInlineStart:-m.lineWidth,[`${d}-affix-wrapper`]:{borderRadius:0}},[`${d}-group-wrapper:not(:last-child)`]:{[`&${d}-search > ${d}-group`]:{[`& > ${d}-group-addon > ${d}-search-button`]:{borderRadius:0},[`& > ${d}`]:{borderStartStartRadius:m.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:m.borderRadius}}}})}},r=m=>{const{componentCls:d,controlHeightSM:g,lineWidth:b}=m,L=(g-b*2-16)/2;return{[d]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(m)),s(m)),t(m,d)),{'&[type="color"]':{height:m.controlHeight,[`&${d}-lg`]:{height:m.controlHeightLG},[`&${d}-sm`]:{height:g,paddingTop:L,paddingBottom:L}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},c=m=>{const{componentCls:d}=m;return{[`${d}-clear-icon`]:{margin:0,color:m.colorTextQuaternary,fontSize:m.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${m.motionDurationSlow}`,"&:hover":{color:m.colorTextTertiary},"&:active":{color:m.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${m.inputAffixPadding}px`}}}},l=m=>{const{componentCls:d,inputAffixPadding:g,colorTextDescription:b,motionDurationSlow:O,colorIcon:L,colorIconHover:k,iconCls:I}=m;return{[`${d}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s(m)),{display:"inline-flex",[`&:not(${d}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},u(m)),{zIndex:1,[`${d}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${d}[disabled]`]:{background:"transparent"}},[`> input${d}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${d}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:m.paddingXS}},"&-show-count-suffix":{color:b},"&-show-count-has-suffix":{marginInlineEnd:m.paddingXXS},"&-prefix":{marginInlineEnd:g},"&-suffix":{marginInlineStart:g}}}),c(m)),{[`${I}${d}-password-icon`]:{color:L,cursor:"pointer",transition:`all ${O}`,"&:hover":{color:k}}}),t(m,`${d}-affix-wrapper`))}},E=m=>{const{componentCls:d,colorError:g,colorWarning:b,borderRadiusLG:O,borderRadiusSM:L}=m;return{[`${d}-group`]:Object.assign(Object.assign(Object.assign({},(0,C.Wf)(m)),e(m)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${d}-group-addon`]:{borderRadius:O,fontSize:m.fontSizeLG}},"&-sm":{[`${d}-group-addon`]:{borderRadius:L}},"&-status-error":{[`${d}-group-addon`]:{color:g,borderColor:g}},"&-status-warning":{[`${d}-group-addon`]:{color:b,borderColor:b}},"&-disabled":{[`${d}-group-addon`]:Object.assign({},i(m))},[`&:not(${d}-compact-first-item):not(${d}-compact-last-item)${d}-compact-item`]:{[`${d}, ${d}-group-addon`]:{borderRadius:0}},[`&:not(${d}-compact-last-item)${d}-compact-first-item`]:{[`${d}, ${d}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${d}-compact-first-item)${d}-compact-last-item`]:{[`${d}, ${d}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},w=m=>{const{componentCls:d,antCls:g}=m,b=`${d}-search`;return{[b]:{[`${d}`]:{"&:hover, &:focus":{borderColor:m.colorPrimaryHover,[`+ ${d}-group-addon ${b}-button:not(${g}-btn-primary)`]:{borderInlineStartColor:m.colorPrimaryHover}}},[`${d}-affix-wrapper`]:{borderRadius:0},[`${d}-lg`]:{lineHeight:m.lineHeightLG-2e-4},[`> ${d}-group`]:{[`> ${d}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${b}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${b}-button:not(${g}-btn-primary)`]:{color:m.colorTextDescription,"&:hover":{color:m.colorPrimaryHover},"&:active":{color:m.colorPrimaryActive},[`&${g}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${b}-button`]:{height:m.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${b}-button`]:{height:m.controlHeightLG},[`&-small ${b}-button`]:{height:m.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${d}-compact-item`]:{[`&:not(${d}-compact-last-item)`]:{[`${d}-group-addon`]:{[`${d}-search-button`]:{marginInlineEnd:-m.lineWidth,borderRadius:0}}},[`&:not(${d}-compact-first-item)`]:{[`${d},${d}-affix-wrapper`]:{borderRadius:0}},[`> ${d}-group-addon ${d}-search-button,
|
|
|
> ${d},
|
|
|
${d}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${d}-affix-wrapper-focused`]:{zIndex:2}}}}},S=m=>{const{componentCls:d,paddingLG:g}=m,b=`${d}-textarea`;return{[b]:{position:"relative","&-show-count":{[`> ${d}`]:{height:"100%"},[`${d}-data-count`]:{position:"absolute",bottom:-m.fontSize*m.lineHeight,insetInlineEnd:0,color:m.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${d}`]:{paddingInlineEnd:g}},[`&-affix-wrapper${b}-has-feedback`]:{[`${d}`]:{paddingInlineEnd:g}},[`&-affix-wrapper${d}-affix-wrapper`]:{padding:0,[`> textarea${d}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${d}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${d}-clear-icon`]:{position:"absolute",insetInlineEnd:m.paddingXS,insetBlockStart:m.paddingXS},[`${b}-suffix`]:{position:"absolute",top:0,insetInlineEnd:m.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function v(m){return(0,y.TS)(m,{inputAffixPadding:m.paddingXXS})}const x=m=>{const{controlHeight:d,fontSize:g,lineHeight:b,lineWidth:O,controlHeightSM:L,controlHeightLG:k,fontSizeLG:I,lineHeightLG:N,paddingSM:M,controlPaddingHorizontalSM:j,controlPaddingHorizontal:A,colorFillAlter:D,colorPrimaryHover:R,controlOutlineWidth:P,controlOutline:T,colorErrorOutline:F,colorWarningOutline:U}=m;return{paddingBlock:Math.max(Math.round((d-g*b)/2*10)/10-O,3),paddingBlockSM:Math.max(Math.round((L-g*b)/2*10)/10-O,0),paddingBlockLG:Math.ceil((k-I*N)/2*10)/10-O,paddingInline:M-O,paddingInlineSM:j-O,paddingInlineLG:A-O,addonBg:D,activeBorderColor:R,hoverBorderColor:R,activeShadow:`0 0 0 ${P}px ${T}`,errorActiveShadow:`0 0 0 ${P}px ${F}`,warningActiveShadow:`0 0 0 ${P}px ${U}`}};B.ZP=(0,h.Z)("Input",m=>{const d=(0,y.TS)(m,v(m));return[r(d),S(d),l(d),E(d),w(d),(0,_.c)(d)]},x)},24334:function(ie,B,n){var C,_;(function(y,h){ie.exports=h(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof n.g!="undefined"?n.g:this,function(y){"use strict";y=y||{};var h=y.Base64,f="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(M){for(var j={},A=0,D=M.length;A<D;A++)j[M.charAt(A)]=A;return j}(u),i=String.fromCharCode,o=function(M){if(M.length<2){var j=M.charCodeAt(0);return j<128?M:j<2048?i(192|j>>>6)+i(128|j&63):i(224|j>>>12&15)+i(128|j>>>6&63)+i(128|j&63)}else{var j=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return i(240|j>>>18&7)+i(128|j>>>12&63)+i(128|j>>>6&63)+i(128|j&63)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(M){return M.replace(a,o)},s=function(M){var j=[0,2,1][M.length%3],A=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),D=[u.charAt(A>>>18),u.charAt(A>>>12&63),j>=2?"=":u.charAt(A>>>6&63),j>=1?"=":u.charAt(A&63)];return D.join("")},e=y.btoa&&typeof y.btoa=="function"?function(M){return y.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,s)},r=function(M){return e(t(String(M)))},c=function(M){return M.replace(/[+\/]/g,function(j){return j=="+"?"-":"_"}).replace(/=/g,"")},l=function(M,j){return j?c(r(M)):r(M)},E=function(M){return l(M,!0)},w;y.Uint8Array&&(w=function(M,j){for(var A="",D=0,R=M.length;D<R;D+=3){var P=M[D],T=M[D+1],F=M[D+2],U=P<<16|T<<8|F;A+=u.charAt(U>>>18)+u.charAt(U>>>12&63)+(typeof T!="undefined"?u.charAt(U>>>6&63):"=")+(typeof F!="undefined"?u.charAt(U&63):"=")}return j?c(A):A});var S=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(M){switch(M.length){case 4:var j=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),A=j-65536;return i((A>>>10)+55296)+i((A&1023)+56320);case 3:return i((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return i((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},x=function(M){return M.replace(S,v)},m=function(M){var j=M.length,A=j%4,D=(j>0?p[M.charAt(0)]<<18:0)|(j>1?p[M.charAt(1)]<<12:0)|(j>2?p[M.charAt(2)]<<6:0)|(j>3?p[M.charAt(3)]:0),R=[i(D>>>16),i(D>>>8&255),i(D&255)];return R.length-=[0,0,2,1][A],R.join("")},d=y.atob&&typeof y.atob=="function"?function(M){return y.atob(M)}:function(M){return M.replace(/\S{1,4}/g,m)},g=function(M){return d(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(M){return x(d(M))},O=function(M){return String(M).replace(/[-_]/g,function(j){return j=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(M){return b(O(M))},k;y.Uint8Array&&(k=function(M){return Uint8Array.from(g(O(M)),function(j){return j.charCodeAt(0)})});var I=function(){var M=y.Base64;return y.Base64=h,M};if(y.Base64={VERSION:f,atob:g,btoa:e,fromBase64:L,toBase64:l,utob:t,encode:l,encodeURI:E,btou:x,decode:L,noConflict:I,fromUint8Array:w,toUint8Array:k},typeof Object.defineProperty=="function"){var N=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return L(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(M){return l(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return l(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),ie.exports?ie.exports.Base64=y.Base64:(C=[],_=function(){return y.Base64}.apply(B,C),_!==void 0&&(ie.exports=_)),{Base64:y.Base64}})},93681:function(ie,B,n){"use strict";n.r(B),n.d(B,{BaseInput:function(){return a},default:function(){return S}});var C=n(54476),_=n(33885),y=n(20068),h=n(76190),f=n(92310),u=n.n(f),p=n(59301),i=n(5643),o=function(x){var m,d,g=x.inputElement,b=x.prefixCls,O=x.prefix,L=x.suffix,k=x.addonBefore,I=x.addonAfter,N=x.className,M=x.style,j=x.disabled,A=x.readOnly,D=x.focused,R=x.triggerFocus,P=x.allowClear,T=x.value,F=x.handleReset,U=x.hidden,z=x.classes,$=x.classNames,q=x.dataAttrs,H=x.styles,W=x.components,Z=(W==null?void 0:W.affixWrapper)||"span",V=(W==null?void 0:W.groupWrapper)||"span",K=(W==null?void 0:W.wrapper)||"span",ne=(W==null?void 0:W.groupAddon)||"span",oe=(0,p.useRef)(null),X=function(te){var ue;(ue=oe.current)!==null&&ue!==void 0&&ue.contains(te.target)&&(R==null||R())},ce=function(){var te;if(!P)return null;var ue=!j&&!A&&T,he="".concat(b,"-clear-icon"),ge=(0,h.Z)(P)==="object"&&P!==null&&P!==void 0&&P.clearIcon?P.clearIcon:"\u2716";return p.createElement("span",{onClick:F,onMouseDown:function(re){return re.preventDefault()},className:u()(he,(te={},(0,y.Z)(te,"".concat(he,"-hidden"),!ue),(0,y.Z)(te,"".concat(he,"-has-suffix"),!!L),te)),role:"button",tabIndex:-1},ge)},_e=(0,p.cloneElement)(g,{value:T,hidden:U,className:u()((m=g.props)===null||m===void 0?void 0:m.className,!(0,i.X3)(x)&&!(0,i.He)(x)&&N)||null,style:(0,_.Z)((0,_.Z)({},(d=g.props)===null||d===void 0?void 0:d.style),!(0,i.X3)(x)&&!(0,i.He)(x)?M:{})});if((0,i.X3)(x)){var Q,J="".concat(b,"-affix-wrapper"),ae=u()(J,(Q={},(0,y.Z)(Q,"".concat(J,"-disabled"),j),(0,y.Z)(Q,"".concat(J,"-focused"),D),(0,y.Z)(Q,"".concat(J,"-readonly"),A),(0,y.Z)(Q,"".concat(J,"-input-with-clear-btn"),L&&P&&T),Q),!(0,i.He)(x)&&N,z==null?void 0:z.affixWrapper,$==null?void 0:$.affixWrapper),le=(L||P)&&p.createElement("span",{className:u()("".concat(b,"-suffix"),$==null?void 0:$.suffix),style:H==null?void 0:H.suffix},ce(),L);_e=p.createElement(Z,(0,C.Z)({className:ae,style:(0,_.Z)((0,_.Z)({},(0,i.He)(x)?void 0:M),H==null?void 0:H.affixWrapper),hidden:!(0,i.He)(x)&&U,onClick:X},q==null?void 0:q.affixWrapper,{ref:oe}),O&&p.createElement("span",{className:u()("".concat(b,"-prefix"),$==null?void 0:$.prefix),style:H==null?void 0:H.prefix},O),(0,p.cloneElement)(g,{value:T,hidden:null}),le)}if((0,i.He)(x)){var se="".concat(b,"-group"),pe="".concat(se,"-addon"),ee=u()("".concat(b,"-wrapper"),se,z==null?void 0:z.wrapper),G=u()("".concat(b,"-group-wrapper"),N,z==null?void 0:z.group);return p.createElement(V,{className:G,style:M,hidden:U},p.createElement(K,{className:ee},k&&p.createElement(ne,{className:pe},k),(0,p.cloneElement)(_e,{hidden:null}),I&&p.createElement(ne,{className:pe},I)))}return _e},a=o,t=n(94480),s=n(42978),e=n(75931),r=n(18929),c=n(2738),l=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],E=(0,p.forwardRef)(function(v,x){var m=v.autoComplete,d=v.onChange,g=v.onFocus,b=v.onBlur,O=v.onPressEnter,L=v.onKeyDown,k=v.prefixCls,I=k===void 0?"rc-input":k,N=v.disabled,M=v.htmlSize,j=v.className,A=v.maxLength,D=v.suffix,R=v.showCount,P=v.type,T=P===void 0?"text":P,F=v.classes,U=v.classNames,z=v.styles,$=(0,e.Z)(v,l),q=(0,r.Z)(v.defaultValue,{value:v.value}),H=(0,s.Z)(q,2),W=H[0],Z=H[1],V=(0,p.useState)(!1),K=(0,s.Z)(V,2),ne=K[0],oe=K[1],X=(0,p.useRef)(null),ce=function(G){X.current&&(0,i.nH)(X.current,G)};(0,p.useImperativeHandle)(x,function(){return{focus:ce,blur:function(){var G;(G=X.current)===null||G===void 0||G.blur()},setSelectionRange:function(G,ve,te){var ue;(ue=X.current)===null||ue===void 0||ue.setSelectionRange(G,ve,te)},select:function(){var G;(G=X.current)===null||G===void 0||G.select()},input:X.current}}),(0,p.useEffect)(function(){oe(function(ee){return ee&&N?!1:ee})},[N]);var _e=function(G){v.value===void 0&&Z(G.target.value),X.current&&(0,i.rJ)(X.current,G,d)},Q=function(G){O&&G.key==="Enter"&&O(G),L==null||L(G)},J=function(G){oe(!0),g==null||g(G)},ae=function(G){oe(!1),b==null||b(G)},le=function(G){Z(""),ce(),X.current&&(0,i.rJ)(X.current,G,d)},se=function(){var G=(0,c.Z)(v,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return p.createElement("input",(0,C.Z)({autoComplete:m},G,{onChange:_e,onFocus:J,onBlur:ae,onKeyDown:Q,className:u()(I,(0,y.Z)({},"".concat(I,"-disabled"),N),U==null?void 0:U.input),style:z==null?void 0:z.input,ref:X,size:M,type:T}))},pe=function(){var G=Number(A)>0;if(D||R){var ve=(0,i.D7)(W),te=(0,t.Z)(ve).length,ue=(0,h.Z)(R)==="object"?R.formatter({value:ve,count:te,maxLength:A}):"".concat(te).concat(G?" / ".concat(A):"");return p.createElement(p.Fragment,null,!!R&&p.createElement("span",{className:u()("".concat(I,"-show-count-suffix"),(0,y.Z)({},"".concat(I,"-show-count-has-suffix"),!!D),U==null?void 0:U.count),style:(0,_.Z)({},z==null?void 0:z.count)},ue),D)}return null};return p.createElement(a,(0,C.Z)({},$,{prefixCls:I,className:j,inputElement:se(),handleReset:le,value:(0,i.D7)(W),focused:ne,triggerFocus:ce,suffix:pe(),disabled:N,classes:F,classNames:U,styles:z}))}),w=E,S=w},5643:function(ie,B,n){"use strict";n.d(B,{D7:function(){return f},He:function(){return C},X3:function(){return _},nH:function(){return h},rJ:function(){return y}});function C(u){return!!(u.addonBefore||u.addonAfter)}function _(u){return!!(u.prefix||u.suffix||u.allowClear)}function y(u,p,i,o){if(i){var a=p;if(p.type==="click"){var t=u.cloneNode(!0);a=Object.create(p,{target:{value:t},currentTarget:{value:t}}),t.value="",i(a);return}if(o!==void 0){a=Object.create(p,{target:{value:u},currentTarget:{value:u}}),u.value=o,i(a);return}i(a)}}function h(u,p){if(u){u.focus(p);var i=p||{},o=i.cursor;if(o){var a=u.value.length;switch(o){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(a,a);break;default:u.setSelectionRange(0,a)}}}}function f(u){return typeof u=="undefined"||u===null?"":String(u)}},9296:function(ie,B,n){"use strict";n.r(B),n.d(B,{ResizableTextArea:function(){return k},default:function(){return D}});var C=n(54476),_=n(33885),y=n(20068),h=n(76190),f=n(42978),u=n(75931),p=n(94480),i=n(92310),o=n.n(i),a=n(93681),t=n(5643),s=n(18929),e=n(59301),r=n(29301),c=n(34280),l=n(16089),E=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,w=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],S={},v;function x(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=R.getAttribute("id")||R.getAttribute("data-reactid")||R.getAttribute("name");if(P&&S[T])return S[T];var F=window.getComputedStyle(R),U=F.getPropertyValue("box-sizing")||F.getPropertyValue("-moz-box-sizing")||F.getPropertyValue("-webkit-box-sizing"),z=parseFloat(F.getPropertyValue("padding-bottom"))+parseFloat(F.getPropertyValue("padding-top")),$=parseFloat(F.getPropertyValue("border-bottom-width"))+parseFloat(F.getPropertyValue("border-top-width")),q=w.map(function(W){return"".concat(W,":").concat(F.getPropertyValue(W))}).join(";"),H={sizingStyle:q,paddingSize:z,borderSize:$,boxSizing:U};return P&&T&&(S[T]=H),H}function m(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;v||(v=document.createElement("textarea"),v.setAttribute("tab-index","-1"),v.setAttribute("aria-hidden","true"),document.body.appendChild(v)),R.getAttribute("wrap")?v.setAttribute("wrap",R.getAttribute("wrap")):v.removeAttribute("wrap");var U=x(R,P),z=U.paddingSize,$=U.borderSize,q=U.boxSizing,H=U.sizingStyle;v.setAttribute("style","".concat(H,";").concat(E)),v.value=R.value||R.placeholder||"";var W=void 0,Z=void 0,V,K=v.scrollHeight;if(q==="border-box"?K+=$:q==="content-box"&&(K-=z),T!==null||F!==null){v.value=" ";var ne=v.scrollHeight-z;T!==null&&(W=ne*T,q==="border-box"&&(W=W+z+$),K=Math.max(W,K)),F!==null&&(Z=ne*F,q==="border-box"&&(Z=Z+z+$),V=K>Z?"":"hidden",K=Math.min(Z,K))}var oe={height:K,overflowY:V,resize:"none"};return W&&(oe.minHeight=W),Z&&(oe.maxHeight=Z),oe}var d=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],g=0,b=1,O=2,L=e.forwardRef(function(R,P){var T=R,F=T.prefixCls,U=T.onPressEnter,z=T.defaultValue,$=T.value,q=T.autoSize,H=T.onResize,W=T.className,Z=T.style,V=T.disabled,K=T.onChange,ne=T.onInternalAutoSize,oe=(0,u.Z)(T,d),X=(0,s.Z)(z,{value:$,postState:function(me){return me!=null?me:""}}),ce=(0,f.Z)(X,2),_e=ce[0],Q=ce[1],J=function(me){Q(me.target.value),K==null||K(me)},ae=e.useRef();e.useImperativeHandle(P,function(){return{textArea:ae.current}});var le=e.useMemo(function(){return q&&(0,h.Z)(q)==="object"?[q.minRows,q.maxRows]:[]},[q]),se=(0,f.Z)(le,2),pe=se[0],ee=se[1],G=!!q,ve=function(){try{if(document.activeElement===ae.current){var me=ae.current,Ie=me.selectionStart,Me=me.selectionEnd,we=me.scrollTop;ae.current.setSelectionRange(Ie,Me),ae.current.scrollTop=we}}catch(Be){}},te=e.useState(O),ue=(0,f.Z)(te,2),he=ue[0],ge=ue[1],ye=e.useState(),re=(0,f.Z)(ye,2),fe=re[0],be=re[1],xe=function(){ge(g)};(0,c.Z)(function(){G&&xe()},[$,pe,ee,G]),(0,c.Z)(function(){if(he===g)ge(b);else if(he===b){var Ce=m(ae.current,!1,pe,ee);ge(O),be(Ce)}else ve()},[he]);var Ae=e.useRef(),Re=function(){l.Z.cancel(Ae.current)},Le=function(me){he===O&&(H==null||H(me),q&&(Re(),Ae.current=(0,l.Z)(function(){xe()})))};e.useEffect(function(){return Re},[]);var Oe=G?fe:null,De=(0,_.Z)((0,_.Z)({},Z),Oe);return(he===g||he===b)&&(De.overflowY="hidden",De.overflowX="hidden"),e.createElement(r.Z,{onResize:Le,disabled:!(q||H)},e.createElement("textarea",(0,C.Z)({},oe,{ref:ae,style:De,className:o()(F,W,(0,y.Z)({},"".concat(F,"-disabled"),V)),disabled:V,value:_e,onChange:J})))}),k=L,I=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function N(R,P){return(0,p.Z)(R||"").slice(0,P).join("")}function M(R,P,T,F){var U=T;return R?U=N(T,F):(0,p.Z)(P||"").length<T.length&&(0,p.Z)(T||"").length>F&&(U=P),U}var j=e.forwardRef(function(R,P){var T,F=R.defaultValue,U=R.value,z=R.onFocus,$=R.onBlur,q=R.onChange,H=R.allowClear,W=R.maxLength,Z=R.onCompositionStart,V=R.onCompositionEnd,K=R.suffix,ne=R.prefixCls,oe=ne===void 0?"rc-textarea":ne,X=R.classes,ce=R.showCount,_e=R.className,Q=R.style,J=R.disabled,ae=R.hidden,le=R.classNames,se=R.styles,pe=R.onResize,ee=(0,u.Z)(R,I),G=(0,s.Z)(F,{value:U,defaultValue:F}),ve=(0,f.Z)(G,2),te=ve[0],ue=ve[1],he=(0,e.useRef)(null),ge=e.useState(!1),ye=(0,f.Z)(ge,2),re=ye[0],fe=ye[1],be=e.useState(!1),xe=(0,f.Z)(be,2),Ae=xe[0],Re=xe[1],Le=e.useRef(),Oe=e.useRef(0),De=e.useState(null),Ce=(0,f.Z)(De,2),me=Ce[0],Ie=Ce[1],Me=function(){var Y;(Y=he.current)===null||Y===void 0||Y.textArea.focus()};(0,e.useImperativeHandle)(P,function(){return{resizableTextArea:he.current,focus:Me,blur:function(){var Y;(Y=he.current)===null||Y===void 0||Y.textArea.blur()}}}),(0,e.useEffect)(function(){fe(function(Se){return!J&&Se})},[J]);var we=Number(W)>0,Be=function(Y){Re(!0),Le.current=te,Oe.current=Y.currentTarget.selectionStart,Z==null||Z(Y)},Fe=function(Y){Re(!1);var de=Y.currentTarget.value;if(we){var Ee,Ke=Oe.current>=W+1||Oe.current===((Ee=Le.current)===null||Ee===void 0?void 0:Ee.length);de=M(Ke,Le.current,de,W)}de!==te&&(ue(de),(0,t.rJ)(Y.currentTarget,Y,q,de)),V==null||V(Y)},je=function(Y){var de=Y.target.value;if(!Ae&&we){var Ee=Y.target.selectionStart>=W+1||Y.target.selectionStart===de.length||!Y.target.selectionStart;de=M(Ee,te,de,W)}ue(de),(0,t.rJ)(Y.currentTarget,Y,q,de)},Ue=function(Y){var de=ee.onPressEnter,Ee=ee.onKeyDown;Y.key==="Enter"&&de&&de(Y),Ee==null||Ee(Y)},We=function(Y){fe(!0),z==null||z(Y)},Ne=function(Y){fe(!1),$==null||$(Y)},ze=function(Y){var de;ue(""),Me(),(0,t.rJ)((de=he.current)===null||de===void 0?void 0:de.textArea,Y,q)},Te=(0,t.D7)(te);!Ae&&we&&U==null&&(Te=N(Te,W));var ke=K,Pe;if(ce){var He=(0,p.Z)(Te).length;(0,h.Z)(ce)==="object"?Pe=ce.formatter({value:Te,count:He,maxLength:W}):Pe="".concat(He).concat(we?" / ".concat(W):""),ke=e.createElement(e.Fragment,null,ke,e.createElement("span",{className:o()("".concat(oe,"-data-count"),le==null?void 0:le.count),style:se==null?void 0:se.count},Pe))}var $e=function(Y){var de;pe==null||pe(Y),(de=he.current)!==null&&de!==void 0&&de.textArea.style.height&&Ie(!0)},qe=!ee.autoSize&&!ce&&!H,Ze=e.createElement(a.BaseInput,{value:Te,allowClear:H,handleReset:ze,suffix:ke,prefixCls:oe,classes:{affixWrapper:o()(X==null?void 0:X.affixWrapper,(T={},(0,y.Z)(T,"".concat(oe,"-show-count"),ce),(0,y.Z)(T,"".concat(oe,"-textarea-allow-clear"),H),T))},disabled:J,focused:re,className:_e,style:(0,_.Z)((0,_.Z)({},Q),me&&!qe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Pe=="string"?Pe:void 0}},hidden:ae,inputElement:e.createElement(k,(0,C.Z)({},ee,{onKeyDown:Ue,onChange:je,onFocus:We,onBlur:Ne,onCompositionStart:Be,onCompositionEnd:Fe,className:le==null?void 0:le.textarea,style:(0,_.Z)((0,_.Z)({},se==null?void 0:se.textarea),{},{resize:Q==null?void 0:Q.resize}),disabled:J,prefixCls:oe,onResize:$e,ref:he}))});return Ze}),A=j,D=A},34376:function(ie){(function(B,n){if(1)ie.exports=n();else var C,_})(window,function(){return function(B){var n={};function C(_){if(n[_])return n[_].exports;var y=n[_]={i:_,l:!1,exports:{}};return B[_].call(y.exports,y,y.exports,C),y.l=!0,y.exports}return C.m=B,C.c=n,C.d=function(_,y,h){C.o(_,y)||Object.defineProperty(_,y,{enumerable:!0,get:h})},C.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},C.t=function(_,y){if(1&y&&(_=C(_)),8&y||4&y&&typeof _=="object"&&_&&_.__esModule)return _;var h=Object.create(null);if(C.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:_}),2&y&&typeof _!="string")for(var f in _)C.d(h,f,function(u){return _[u]}.bind(null,f));return h},C.n=function(_){var y=_&&_.__esModule?function(){return _.default}:function(){return _};return C.d(y,"a",y),y},C.o=function(_,y){return Object.prototype.hasOwnProperty.call(_,y)},C.p="",C(C.s=34)}([function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.forwardEvent=n.EventEmitter=void 0;var _=function(){function y(){this._listeners=[],this._disposed=!1}return Object.defineProperty(y.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(f){return h._listeners.push(f),{dispose:function(){if(!h._disposed){for(var u=0;u<h._listeners.length;u++)if(h._listeners[u]===f)return void h._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),y.prototype.fire=function(h,f){for(var u=[],p=0;p<this._listeners.length;p++)u.push(this._listeners[p]);for(p=0;p<u.length;p++)u[p].call(void 0,h,f)},y.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},y}();n.EventEmitter=_,n.forwardEvent=function(y,h){return y(function(f){return h.fire(f)})}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IUnicodeService=n.IOptionsService=n.ILogService=n.IInstantiationService=n.IDirtyRowService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;var _=C(14);n.IBufferService=_.createDecorator("BufferService"),n.ICoreMouseService=_.createDecorator("CoreMouseService"),n.ICoreService=_.createDecorator("CoreService"),n.ICharsetService=_.createDecorator("CharsetService"),n.IDirtyRowService=_.createDecorator("DirtyRowService"),n.IInstantiationService=_.createDecorator("InstantiationService"),n.ILogService=_.createDecorator("LogService"),n.IOptionsService=_.createDecorator("OptionsService"),n.IUnicodeService=_.createDecorator("UnicodeService")},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.Disposable=void 0;var _=function(){function h(){this._disposables=[],this._isDisposed=!1}return h.prototype.dispose=function(){this._isDisposed=!0;for(var f=0,u=this._disposables;f<u.length;f++)u[f].dispose();this._disposables.length=0},h.prototype.register=function(f){return this._disposables.push(f),f},h.prototype.unregister=function(f){var u=this._disposables.indexOf(f);u!==-1&&this._disposables.splice(u,1)},h}();function y(h){for(var f=0,u=h;f<u.length;f++)u[f].dispose();h.length=0}n.Disposable=_,n.disposeArray=y,n.getDisposeArrayDisposable=function(h){return{dispose:function(){return y(h)}}}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=256,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s])})(i,o)},function(i,o){function a(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)});Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;var h=C(8),f=C(3),u=C(6),p=function(i){function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.content=0,a.fg=0,a.bg=0,a.extended=new u.ExtendedAttrs,a.combinedData="",a}return y(o,i),o.fromCharData=function(a){var t=new o;return t.setFromCharData(a),t},o.prototype.isCombined=function(){return 2097152&this.content},o.prototype.getWidth=function(){return this.content>>22},o.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?h.stringFromCodePoint(2097151&this.content):""},o.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},o.prototype.setFromCharData=function(a){this.fg=a[f.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(a[f.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(a[f.CHAR_DATA_CHAR_INDEX].length===2){var s=a[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=s&&s<=56319){var e=a[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(s-55296)+e-56320+65536|a[f.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=a[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[f.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=a[f.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[f.CHAR_DATA_WIDTH_INDEX]<<22)},o.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},o}(u.AttributeData);n.CellData=p},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ISoundService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;var _=C(14);n.ICharSizeService=_.createDecorator("CharSizeService"),n.ICoreBrowserService=_.createDecorator("CoreBrowserService"),n.IMouseService=_.createDecorator("MouseService"),n.IRenderService=_.createDecorator("RenderService"),n.ISelectionService=_.createDecorator("SelectionService"),n.ISoundService=_.createDecorator("SoundService")},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;var _=function(){function h(){this.fg=0,this.bg=0,this.extended=new y}return h.toColorRGB=function(f){return[f>>>16&255,f>>>8&255,255&f]},h.fromColorRGB=function(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]},h.prototype.clone=function(){var f=new h;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f},h.prototype.isInverse=function(){return 67108864&this.fg},h.prototype.isBold=function(){return 134217728&this.fg},h.prototype.isUnderline=function(){return 268435456&this.fg},h.prototype.isBlink=function(){return 536870912&this.fg},h.prototype.isInvisible=function(){return 1073741824&this.fg},h.prototype.isItalic=function(){return 67108864&this.bg},h.prototype.isDim=function(){return 134217728&this.bg},h.prototype.getFgColorMode=function(){return 50331648&this.fg},h.prototype.getBgColorMode=function(){return 50331648&this.bg},h.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},h.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},h.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},h.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},h.prototype.isFgDefault=function(){return(50331648&this.fg)==0},h.prototype.isBgDefault=function(){return(50331648&this.bg)==0},h.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},h.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},h.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},h.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},h.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},h.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},h.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},h.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},h.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},h.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},h.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},h}();n.AttributeData=_;var y=function(){function h(f,u){f===void 0&&(f=0),u===void 0&&(u=-1),this.underlineStyle=f,this.underlineColor=u}return h.prototype.clone=function(){return new h(this.underlineStyle,this.underlineColor)},h.prototype.isEmpty=function(){return this.underlineStyle===0},h}();n.ExtendedAttrs=y},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(_,y,h,f){_.addEventListener(y,h,f);var u=!1;return{dispose:function(){u||(u=!0,_.removeEventListener(y,h,f))}}}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},n.utf32ToString=function(h,f,u){f===void 0&&(f=0),u===void 0&&(u=h.length);for(var p="",i=f;i<u;++i){var o=h[i];o>65535?(o-=65536,p+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):p+=String.fromCharCode(o)}return p};var _=function(){function h(){this._interim=0}return h.prototype.clear=function(){this._interim=0},h.prototype.decode=function(f,u){var p=f.length;if(!p)return 0;var i=0,o=0;this._interim&&(56320<=(s=f.charCodeAt(o++))&&s<=57343?u[i++]=1024*(this._interim-55296)+s-56320+65536:(u[i++]=this._interim,u[i++]=s),this._interim=0);for(var a=o;a<p;++a){var t=f.charCodeAt(a);if(55296<=t&&t<=56319){if(++a>=p)return this._interim=t,i;var s;56320<=(s=f.charCodeAt(a))&&s<=57343?u[i++]=1024*(t-55296)+s-56320+65536:(u[i++]=t,u[i++]=s)}else u[i++]=t}return i},h}();n.StringToUtf32=_;var y=function(){function h(){this.interim=new Uint8Array(3)}return h.prototype.clear=function(){this.interim.fill(0)},h.prototype.decode=function(f,u){var p=f.length;if(!p)return 0;var i,o,a,t,s=0,e=0,r=0;if(this.interim[0]){var c=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;for(var E=0,w=void 0;(w=63&this.interim[++E])&&E<4;)l<<=6,l|=w;for(var S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,v=S-E;r<v;){if(r>=p)return 0;if((192&(w=f[r++]))!=128){r--,c=!0;break}this.interim[E++]=w,l<<=6,l|=63&w}c||(S===2?l<128?r--:u[s++]=l:S===3?l<2048||l>=55296&&l<=57343||(u[s++]=l):l<65536||l>1114111||(u[s++]=l)),this.interim.fill(0)}for(var x=p-4,m=r;m<p;){for(;!(!(m<x)||128&(i=f[m])||128&(o=f[m+1])||128&(a=f[m+2])||128&(t=f[m+3]));)u[s++]=i,u[s++]=o,u[s++]=a,u[s++]=t,m+=4;if((i=f[m++])<128)u[s++]=i;else if((224&i)==192){if(m>=p)return this.interim[0]=i,s;if((192&(o=f[m++]))!=128){m--;continue}if((e=(31&i)<<6|63&o)<128){m--;continue}u[s++]=e}else if((240&i)==224){if(m>=p)return this.interim[0]=i,s;if((192&(o=f[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,s;if((192&(a=f[m++]))!=128){m--;continue}if((e=(15&i)<<12|(63&o)<<6|63&a)<2048||e>=55296&&e<=57343)continue;u[s++]=e}else if((248&i)==240){if(m>=p)return this.interim[0]=i,s;if((192&(o=f[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,s;if((192&(a=f[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=a,s;if((192&(t=f[m++]))!=128){m--;continue}if((e=(7&i)<<18|(63&o)<<12|(63&a)<<6|63&t)<65536||e>1114111)continue;u[s++]=e}}return s},h}();n.Utf8ToUtf32=y},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAR_ATLAS_CELL_SPACING=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0,n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.CHAR_ATLAS_CELL_SPACING=1},function(B,n,C){"use strict";var _,y,h,f;function u(i){var o=i.toString(16);return o.length<2?"0"+o:o}function p(i,o){return i<o?(o+.05)/(i+.05):(i+.05)/(o+.05)}Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=void 0,function(i){i.toCss=function(o,a,t,s){return s!==void 0?"#"+u(o)+u(a)+u(t)+u(s):"#"+u(o)+u(a)+u(t)},i.toRgba=function(o,a,t,s){return s===void 0&&(s=255),(o<<24|a<<16|t<<8|s)>>>0}}(_=n.channels||(n.channels={})),(y=n.color||(n.color={})).blend=function(i,o){var a=(255&o.rgba)/255;if(a===1)return{css:o.css,rgba:o.rgba};var t=o.rgba>>24&255,s=o.rgba>>16&255,e=o.rgba>>8&255,r=i.rgba>>24&255,c=i.rgba>>16&255,l=i.rgba>>8&255,E=r+Math.round((t-r)*a),w=c+Math.round((s-c)*a),S=l+Math.round((e-l)*a);return{css:_.toCss(E,w,S),rgba:_.toRgba(E,w,S)}},y.isOpaque=function(i){return(255&i.rgba)==255},y.ensureContrastRatio=function(i,o,a){var t=f.ensureContrastRatio(i.rgba,o.rgba,a);if(t)return f.toColor(t>>24&255,t>>16&255,t>>8&255)},y.opaque=function(i){var o=(255|i.rgba)>>>0,a=f.toChannels(o),t=a[0],s=a[1],e=a[2];return{css:_.toCss(t,s,e),rgba:o}},y.opacity=function(i,o){var a=Math.round(255*o),t=f.toChannels(i.rgba),s=t[0],e=t[1],r=t[2];return{css:_.toCss(s,e,r,a),rgba:_.toRgba(s,e,r,a)}},(n.css||(n.css={})).toColor=function(i){switch(i.length){case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(i){function o(a,t,s){var e=a/255,r=t/255,c=s/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4))}i.relativeLuminance=function(a){return o(a>>16&255,a>>8&255,255&a)},i.relativeLuminance2=o}(h=n.rgb||(n.rgb={})),function(i){function o(t,s,e){for(var r=t>>24&255,c=t>>16&255,l=t>>8&255,E=s>>24&255,w=s>>16&255,S=s>>8&255,v=p(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,c,l));v<e&&(E>0||w>0||S>0);)E-=Math.max(0,Math.ceil(.1*E)),w-=Math.max(0,Math.ceil(.1*w)),S-=Math.max(0,Math.ceil(.1*S)),v=p(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,c,l));return(E<<24|w<<16|S<<8|255)>>>0}function a(t,s,e){for(var r=t>>24&255,c=t>>16&255,l=t>>8&255,E=s>>24&255,w=s>>16&255,S=s>>8&255,v=p(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,c,l));v<e&&(E<255||w<255||S<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),w=Math.min(255,w+Math.ceil(.1*(255-w))),S=Math.min(255,S+Math.ceil(.1*(255-S))),v=p(h.relativeLuminance2(E,S,w),h.relativeLuminance2(r,c,l));return(E<<24|w<<16|S<<8|255)>>>0}i.ensureContrastRatio=function(t,s,e){var r=h.relativeLuminance(t>>8),c=h.relativeLuminance(s>>8);if(p(r,c)<e)return c<r?o(t,s,e):a(t,s,e)},i.reduceLuminance=o,i.increaseLuminance=a,i.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},i.toColor=function(t,s,e){return{css:_.toCss(t,s,e),rgba:_.toRgba(t,s,e)}}}(f=n.rgba||(n.rgba={})),n.toPaddedHex=u,n.contrastRatio=p},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.isSafari=n.isFirefox=void 0;var _=typeof navigator=="undefined",y=_?"node":navigator.userAgent,h=_?"node":navigator.platform;function f(u,p){return u.indexOf(p)>=0}n.isFirefox=!!~y.indexOf("Firefox"),n.isSafari=/^((?!chrome|android).)*safari/i.test(y),n.isMac=f(["Macintosh","MacIntel","MacPPC","Mac68K"],h),n.isIpad=h==="iPad",n.isIphone=h==="iPhone",n.isWindows=f(["Windows","Win16","Win32","WinCE"],h),n.isLinux=h.indexOf("Linux")>=0},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.C1=n.C0=void 0,function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=`
|
|
|
`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL="\x7F"}(n.C0||(n.C0={})),function(_){_.PAD="\x80",_.HOP="\x81",_.BPH="\x82",_.NBH="\x83",_.IND="\x84",_.NEL="\x85",_.SSA="\x86",_.ESA="\x87",_.HTS="\x88",_.HTJ="\x89",_.VTS="\x8A",_.PLD="\x8B",_.PLU="\x8C",_.RI="\x8D",_.SS2="\x8E",_.SS3="\x8F",_.DCS="\x90",_.PU1="\x91",_.PU2="\x92",_.STS="\x93",_.CCH="\x94",_.MW="\x95",_.SPA="\x96",_.EPA="\x97",_.SOS="\x98",_.SGCI="\x99",_.SCI="\x9A",_.CSI="\x9B",_.ST="\x9C",_.OSC="\x9D",_.PM="\x9E",_.APC="\x9F"}(n.C1||(n.C1={}))},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;var _=C(3),y=C(9),h=C(25),f=C(6),u=C(28),p=C(10),i=C(17),o=function(){function a(t,s,e,r,c,l,E,w){this._container=t,this._alpha=r,this._colors=c,this._rendererId=l,this._bufferService=E,this._optionsService=w,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+s+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return a.prototype.dispose=function(){var t;i.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},a.prototype._initCanvas=function(){this._ctx=u.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},a.prototype.onOptionsChanged=function(){},a.prototype.onBlur=function(){},a.prototype.onFocus=function(){},a.prototype.onCursorMove=function(){},a.prototype.onGridChanged=function(t,s){},a.prototype.onSelectionChanged=function(t,s,e){e===void 0&&(e=!1)},a.prototype.setColors=function(t){this._refreshCharAtlas(t)},a.prototype._setTransparency=function(t){if(t!==this._alpha){var s=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},a.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=h.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},a.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},a.prototype._fillCells=function(t,s,e,r){this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},a.prototype._fillBottomLineAtCells=function(t,s,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(s+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},a.prototype._fillLeftLineAtCell=function(t,s,e){this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},a.prototype._strokeRectAtCell=function(t,s,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,s*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},a.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},a.prototype._clearCells=function(t,s,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},a.prototype._fillCharTrueColor=function(t,s,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},a.prototype._drawChars=function(t,s,e){var r,c,l=this._getContrastColor(t);l||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,s,e,l):(t.isInverse()?(r=t.isBgDefault()?y.INVERTED_DEFAULT_COLOR:t.getBgColor(),c=t.isFgDefault()?y.INVERTED_DEFAULT_COLOR:t.getFgColor()):(c=t.isBgDefault()?_.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?_.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||_.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||_.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=c,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,s,e))},a.prototype._drawUncachedChars=function(t,s,e,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(r)this._ctx.fillStyle=r.css;else if(t.isBgDefault())this._ctx.fillStyle=p.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+f.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var c=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}else if(r)this._ctx.fillStyle=r.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+f.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var l=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=y.DIM_OPACITY),this._ctx.fillText(t.getChars(),s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},a.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},a.prototype._getFont=function(t,s){return(s?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},a.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var s=this._colors.contrastCache.getColor(t.bg,t.fg);if(s!==void 0)return s||void 0;var e=t.getFgColor(),r=t.getFgColorMode(),c=t.getBgColor(),l=t.getBgColorMode(),E=!!t.isInverse(),w=!!t.isInverse();if(E){var S=e;e=c,c=S;var v=r;r=l,l=v}var x=this._resolveBackgroundRgba(l,c,E),m=this._resolveForegroundRgba(r,e,E,w),d=p.rgba.ensureContrastRatio(x,m,this._optionsService.options.minimumContrastRatio);if(d){var g={css:p.channels.toCss(d>>24&255,d>>16&255,d>>8&255),rgba:d};return this._colors.contrastCache.setColor(t.bg,t.fg,g),g}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},a.prototype._resolveBackgroundRgba=function(t,s,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[s].rgba;case 50331648:return s<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},a.prototype._resolveForegroundRgba=function(t,s,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&s<8&&(s+=8),this._colors.ansi[s].rgba;case 50331648:return s<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},a}();n.BaseRenderLayer=o},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;function _(y,h,f){h.di$target===h?h.di$dependencies.push({id:y,index:f}):(h.di$dependencies=[{id:y,index:f}],h.di$target=h)}n.serviceRegistry=new Map,n.getServiceDependencies=function(y){return y.di$dependencies||[]},n.createDecorator=function(y){if(n.serviceRegistry.has(y))return n.serviceRegistry.get(y);var h=function(f,u,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");_(h,f,p)};return h.toString=function(){return y},n.serviceRegistry.set(y,h),h}},function(B,n,C){"use strict";function _(y,h,f,u){if(f===void 0&&(f=0),u===void 0&&(u=y.length),f>=y.length)return y;f=(y.length+f)%y.length,u=u>=y.length?y.length:(y.length+u)%y.length;for(var p=f;p<u;++p)y[p]=h;return y}Object.defineProperty(n,"__esModule",{value:!0}),n.concat=n.fillFallback=n.fill=void 0,n.fill=function(y,h,f,u){return y.fill?y.fill(h,f,u):_(y,h,f,u)},n.fillFallback=_,n.concat=function(y,h){var f=new y.constructor(y.length+h.length);return f.set(y),f.set(h,y.length),f}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;var _=C(8),y=C(3),h=C(4),f=C(6);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);var u=function(){function p(i,o,a){a===void 0&&(a=!1),this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var t=o||h.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),s=0;s<i;++s)this.setCell(s,t);this.length=i}return p.prototype.get=function(i){var o=this._data[3*i+0],a=2097151&o;return[this._data[3*i+1],2097152&o?this._combined[i]:a?_.stringFromCodePoint(a):"",o>>22,2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):a]},p.prototype.set=function(i,o){this._data[3*i+1]=o[y.CHAR_DATA_ATTR_INDEX],o[y.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=o[1],this._data[3*i+0]=2097152|i|o[y.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=o[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[y.CHAR_DATA_WIDTH_INDEX]<<22},p.prototype.getWidth=function(i){return this._data[3*i+0]>>22},p.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},p.prototype.getFg=function(i){return this._data[3*i+1]},p.prototype.getBg=function(i){return this._data[3*i+2]},p.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},p.prototype.getCodePoint=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&o},p.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},p.prototype.getString=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i]:2097151&o?_.stringFromCodePoint(2097151&o):""},p.prototype.loadCell=function(i,o){var a=3*i;return o.content=this._data[a+0],o.fg=this._data[a+1],o.bg=this._data[a+2],2097152&o.content&&(o.combinedData=this._combined[i]),268435456&o.bg&&(o.extended=this._extendedAttrs[i]),o},p.prototype.setCell=function(i,o){2097152&o.content&&(this._combined[i]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[i]=o.extended),this._data[3*i+0]=o.content,this._data[3*i+1]=o.fg,this._data[3*i+2]=o.bg},p.prototype.setCellFromCodePoint=function(i,o,a,t,s,e){268435456&s&&(this._extendedAttrs[i]=e),this._data[3*i+0]=o|a<<22,this._data[3*i+1]=t,this._data[3*i+2]=s},p.prototype.addCodepointToCell=function(i,o){var a=this._data[3*i+0];2097152&a?this._combined[i]+=_.stringFromCodePoint(o):(2097151&a?(this._combined[i]=_.stringFromCodePoint(2097151&a)+_.stringFromCodePoint(o),a&=-2097152,a|=2097152):a=o|1<<22,this._data[3*i+0]=a)},p.prototype.insertCells=function(i,o,a,t){if((i%=this.length)&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs),o<this.length-i){for(var s=new h.CellData,e=this.length-i-o-1;e>=0;--e)this.setCell(i+o+e,this.loadCell(i+e,s));for(e=0;e<o;++e)this.setCell(i+e,a)}else for(e=i;e<this.length;++e)this.setCell(e,a);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs)},p.prototype.deleteCells=function(i,o,a,t){if(i%=this.length,o<this.length-i){for(var s=new h.CellData,e=0;e<this.length-i-o;++e)this.setCell(i+e,this.loadCell(i+o+e,s));for(e=this.length-o;e<this.length;++e)this.setCell(e,a)}else for(e=i;e<this.length;++e)this.setCell(e,a);i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs),this.getWidth(i)!==0||this.hasContent(i)||this.setCellFromCodePoint(i,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs)},p.prototype.replaceCells=function(i,o,a,t){for(i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new f.ExtendedAttrs);i<o&&i<this.length;)this.setCell(i++,a)},p.prototype.resize=function(i,o){if(i!==this.length){if(i>this.length){var a=new Uint32Array(3*i);this.length&&(3*i<this._data.length?a.set(this._data.subarray(0,3*i)):a.set(this._data)),this._data=a;for(var t=this.length;t<i;++t)this.setCell(t,o)}else if(i){(a=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=a;var s=Object.keys(this._combined);for(t=0;t<s.length;t++){var e=parseInt(s[t],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},p.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var o=0;o<this.length;++o)this.setCell(o,i)},p.prototype.copyFrom=function(i){for(var o in this.length!==i.length?this._data=new Uint32Array(i._data):this._data.set(i._data),this.length=i.length,this._combined={},i._combined)this._combined[o]=i._combined[o];for(var o in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[o]=i._extendedAttrs[o];this.isWrapped=i.isWrapped},p.prototype.clone=function(){var i=new p(0);for(var o in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[o]=this._combined[o];for(var o in this._extendedAttrs)i._extendedAttrs[o]=this._extendedAttrs[o];return i.isWrapped=this.isWrapped,i},p.prototype.getTrimmedLength=function(){for(var i=this.length-1;i>=0;--i)if(4194303&this._data[3*i+0])return i+(this._data[3*i+0]>>22);return 0},p.prototype.copyCellsFrom=function(i,o,a,t,s){var e=i._data;if(s)for(var r=t-1;r>=0;r--)for(var c=0;c<3;c++)this._data[3*(a+r)+c]=e[3*(o+r)+c];else for(r=0;r<t;r++)for(c=0;c<3;c++)this._data[3*(a+r)+c]=e[3*(o+r)+c];var l=Object.keys(i._combined);for(c=0;c<l.length;c++){var E=parseInt(l[c],10);E>=o&&(this._combined[E-o+a]=i._combined[E])}},p.prototype.translateToString=function(i,o,a){i===void 0&&(i=!1),o===void 0&&(o=0),a===void 0&&(a=this.length),i&&(a=Math.min(a,this.getTrimmedLength()));for(var t="";o<a;){var s=this._data[3*o+0],e=2097151&s;t+=2097152&s?this._combined[o]:e?_.stringFromCodePoint(e):y.WHITESPACE_CELL_CHAR,o+=s>>22||1}return t},p}();n.BufferLine=u},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeElementFromParent=void 0,n.removeElementFromParent=function(){for(var _,y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];for(var f=0,u=y;f<u.length;f++){var p=u[f];(_=p==null?void 0:p.parentElement)===null||_===void 0||_.removeChild(p)}}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(m,d){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var O in b)b.hasOwnProperty(O)&&(g[O]=b[O])})(m,d)},function(m,d){function g(){this.constructor=m}_(m,d),m.prototype=d===null?Object.create(d):(g.prototype=d.prototype,new g)});Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;var h,f=C(12),u=C(20),p=C(39),i=C(2),o=C(15),a=C(8),t=C(16),s=C(0),e=C(3),r=C(4),c=C(6),l=C(22),E=C(24),w={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function S(m,d){if(m>24)return d.setWinLines||!1;switch(m){case 1:return!!d.restoreWin;case 2:return!!d.minimizeWin;case 3:return!!d.setWinPosition;case 4:return!!d.setWinSizePixels;case 5:return!!d.raiseWin;case 6:return!!d.lowerWin;case 7:return!!d.refreshWin;case 8:return!!d.setWinSizeChars;case 9:return!!d.maximizeWin;case 10:return!!d.fullscreenWin;case 11:return!!d.getWinState;case 13:return!!d.getWinPosition;case 14:return!!d.getWinSizePixels;case 15:return!!d.getScreenSizePixels;case 16:return!!d.getCellSizePixels;case 18:return!!d.getWinSizeChars;case 19:return!!d.getScreenSizeChars;case 20:return!!d.getIconTitle;case 21:return!!d.getWinTitle;case 22:return!!d.pushTitle;case 23:return!!d.popTitle;case 24:return!!d.setWinLines}return!1}(function(m){m[m.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",m[m.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(h=n.WindowsOptionsReportType||(n.WindowsOptionsReportType={}));var v=function(){function m(d,g,b,O){this._bufferService=d,this._coreService=g,this._logService=b,this._optionsService=O,this._data=new Uint32Array(0)}return m.prototype.hook=function(d){this._data=new Uint32Array(0)},m.prototype.put=function(d,g,b){this._data=o.concat(this._data,d.subarray(g,b))},m.prototype.unhook=function(d){if(d){var g=a.utf32ToString(this._data);switch(this._data=new Uint32Array(0),g){case'"q':return this._coreService.triggerDataEvent(f.C0.ESC+'P1$r0"q'+f.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(f.C0.ESC+'P1$r61;1"p'+f.C0.ESC+"\\");case"r":var b=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+b+f.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(f.C0.ESC+"P1$r0m"+f.C0.ESC+"\\");case" q":var O={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return O-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(f.C0.ESC+"P1$r"+O+" q"+f.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",g),this._coreService.triggerDataEvent(f.C0.ESC+"P0$r"+f.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},m}(),x=function(m){function d(g,b,O,L,k,I,N,M,j){j===void 0&&(j=new p.EscapeSequenceParser);var A=m.call(this)||this;A._bufferService=g,A._charsetService=b,A._coreService=O,A._dirtyRowService=L,A._logService=k,A._optionsService=I,A._coreMouseService=N,A._unicodeService=M,A._parser=j,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new a.StringToUtf32,A._utf8Decoder=new a.Utf8ToUtf32,A._workCell=new r.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=t.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new s.EventEmitter,A._onRequestRefreshRows=new s.EventEmitter,A._onRequestReset=new s.EventEmitter,A._onRequestScroll=new s.EventEmitter,A._onRequestSyncScrollBar=new s.EventEmitter,A._onRequestWindowsOptionsReport=new s.EventEmitter,A._onA11yChar=new s.EventEmitter,A._onA11yTab=new s.EventEmitter,A._onCursorMove=new s.EventEmitter,A._onLineFeed=new s.EventEmitter,A._onScroll=new s.EventEmitter,A._onTitleChange=new s.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(T,F){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(T),params:F.toArray()})}),A._parser.setEscHandlerFallback(function(T){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(T)})}),A._parser.setExecuteHandlerFallback(function(T){A._logService.debug("Unknown EXECUTE code: ",{code:T})}),A._parser.setOscHandlerFallback(function(T,F,U){A._logService.debug("Unknown OSC code: ",{identifier:T,action:F,data:U})}),A._parser.setDcsHandlerFallback(function(T,F,U){F==="HOOK"&&(U=U.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(T),action:F,payload:U})}),A._parser.setPrintHandler(function(T,F,U){return A.print(T,F,U)}),A._parser.setCsiHandler({final:"@"},function(T){return A.insertChars(T)}),A._parser.setCsiHandler({intermediates:" ",final:"@"},function(T){return A.scrollLeft(T)}),A._parser.setCsiHandler({final:"A"},function(T){return A.cursorUp(T)}),A._parser.setCsiHandler({intermediates:" ",final:"A"},function(T){return A.scrollRight(T)}),A._parser.setCsiHandler({final:"B"},function(T){return A.cursorDown(T)}),A._parser.setCsiHandler({final:"C"},function(T){return A.cursorForward(T)}),A._parser.setCsiHandler({final:"D"},function(T){return A.cursorBackward(T)}),A._parser.setCsiHandler({final:"E"},function(T){return A.cursorNextLine(T)}),A._parser.setCsiHandler({final:"F"},function(T){return A.cursorPrecedingLine(T)}),A._parser.setCsiHandler({final:"G"},function(T){return A.cursorCharAbsolute(T)}),A._parser.setCsiHandler({final:"H"},function(T){return A.cursorPosition(T)}),A._parser.setCsiHandler({final:"I"},function(T){return A.cursorForwardTab(T)}),A._parser.setCsiHandler({final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({prefix:"?",final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({prefix:"?",final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({final:"L"},function(T){return A.insertLines(T)}),A._parser.setCsiHandler({final:"M"},function(T){return A.deleteLines(T)}),A._parser.setCsiHandler({final:"P"},function(T){return A.deleteChars(T)}),A._parser.setCsiHandler({final:"S"},function(T){return A.scrollUp(T)}),A._parser.setCsiHandler({final:"T"},function(T){return A.scrollDown(T)}),A._parser.setCsiHandler({final:"X"},function(T){return A.eraseChars(T)}),A._parser.setCsiHandler({final:"Z"},function(T){return A.cursorBackwardTab(T)}),A._parser.setCsiHandler({final:"`"},function(T){return A.charPosAbsolute(T)}),A._parser.setCsiHandler({final:"a"},function(T){return A.hPositionRelative(T)}),A._parser.setCsiHandler({final:"b"},function(T){return A.repeatPrecedingCharacter(T)}),A._parser.setCsiHandler({final:"c"},function(T){return A.sendDeviceAttributesPrimary(T)}),A._parser.setCsiHandler({prefix:">",final:"c"},function(T){return A.sendDeviceAttributesSecondary(T)}),A._parser.setCsiHandler({final:"d"},function(T){return A.linePosAbsolute(T)}),A._parser.setCsiHandler({final:"e"},function(T){return A.vPositionRelative(T)}),A._parser.setCsiHandler({final:"f"},function(T){return A.hVPosition(T)}),A._parser.setCsiHandler({final:"g"},function(T){return A.tabClear(T)}),A._parser.setCsiHandler({final:"h"},function(T){return A.setMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"h"},function(T){return A.setModePrivate(T)}),A._parser.setCsiHandler({final:"l"},function(T){return A.resetMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"l"},function(T){return A.resetModePrivate(T)}),A._parser.setCsiHandler({final:"m"},function(T){return A.charAttributes(T)}),A._parser.setCsiHandler({final:"n"},function(T){return A.deviceStatus(T)}),A._parser.setCsiHandler({prefix:"?",final:"n"},function(T){return A.deviceStatusPrivate(T)}),A._parser.setCsiHandler({intermediates:"!",final:"p"},function(T){return A.softReset(T)}),A._parser.setCsiHandler({intermediates:" ",final:"q"},function(T){return A.setCursorStyle(T)}),A._parser.setCsiHandler({final:"r"},function(T){return A.setScrollRegion(T)}),A._parser.setCsiHandler({final:"s"},function(T){return A.saveCursor(T)}),A._parser.setCsiHandler({final:"t"},function(T){return A.windowOptions(T)}),A._parser.setCsiHandler({final:"u"},function(T){return A.restoreCursor(T)}),A._parser.setCsiHandler({intermediates:"'",final:"}"},function(T){return A.insertColumns(T)}),A._parser.setCsiHandler({intermediates:"'",final:"~"},function(T){return A.deleteColumns(T)}),A._parser.setExecuteHandler(f.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(f.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(f.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(f.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(f.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(f.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(f.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(f.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(f.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(f.C1.HTS,function(){return A.tabSet()}),A._parser.setOscHandler(0,new l.OscHandler(function(T){A.setTitle(T),A.setIconName(T)})),A._parser.setOscHandler(1,new l.OscHandler(function(T){return A.setIconName(T)})),A._parser.setOscHandler(2,new l.OscHandler(function(T){return A.setTitle(T)})),A._parser.setEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.setEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.setEscHandler({final:"D"},function(){return A.index()}),A._parser.setEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.setEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.setEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.setEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.setEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.setEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.setEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.setEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.setEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var D=function(T){R._parser.setEscHandler({intermediates:"(",final:T},function(){return A.selectCharset("("+T)}),R._parser.setEscHandler({intermediates:")",final:T},function(){return A.selectCharset(")"+T)}),R._parser.setEscHandler({intermediates:"*",final:T},function(){return A.selectCharset("*"+T)}),R._parser.setEscHandler({intermediates:"+",final:T},function(){return A.selectCharset("+"+T)}),R._parser.setEscHandler({intermediates:"-",final:T},function(){return A.selectCharset("-"+T)}),R._parser.setEscHandler({intermediates:".",final:T},function(){return A.selectCharset("."+T)}),R._parser.setEscHandler({intermediates:"/",final:T},function(){return A.selectCharset("/"+T)})},R=this;for(var P in u.CHARSETS)D(P);return A._parser.setEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(T){return A._logService.error("Parsing error: ",T),T}),A._parser.setDcsHandler({intermediates:"$",final:"q"},new v(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return y(d,m),Object.defineProperty(d.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){m.prototype.dispose.call(this)},d.prototype.parse=function(g){var b=this._bufferService.buffer,O=b.x,L=b.y;if(this._logService.debug("parsing data",g),this._parseBuffer.length<g.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(g.length,131072))),this._dirtyRowService.clearRange(),g.length>131072)for(var k=0;k<g.length;k+=131072){var I=k+131072<g.length?k+131072:g.length,N=typeof g=="string"?this._stringDecoder.decode(g.substring(k,I),this._parseBuffer):this._utf8Decoder.decode(g.subarray(k,I),this._parseBuffer);this._parser.parse(this._parseBuffer,N)}else N=typeof g=="string"?this._stringDecoder.decode(g,this._parseBuffer):this._utf8Decoder.decode(g,this._parseBuffer),this._parser.parse(this._parseBuffer,N);(b=this._bufferService.buffer).x===O&&b.y===L||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},d.prototype.print=function(g,b,O){var L,k,I=this._bufferService.buffer,N=this._charsetService.charset,M=this._optionsService.options.screenReaderMode,j=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,D=this._coreService.modes.insertMode,R=this._curAttrData,P=I.lines.get(I.ybase+I.y);this._dirtyRowService.markDirty(I.y),I.x&&O-b>0&&P.getWidth(I.x-1)===2&&P.setCellFromCodePoint(I.x-1,0,1,R.fg,R.bg,R.extended);for(var T=b;T<O;++T){if(L=g[T],k=this._unicodeService.wcwidth(L),L<127&&N){var F=N[String.fromCharCode(L)];F&&(L=F.charCodeAt(0))}if(M&&this._onA11yChar.fire(a.stringFromCodePoint(L)),k||!I.x){if(I.x+k-1>=j){if(A){for(;I.x<j;)P.setCellFromCodePoint(I.x++,0,1,R.fg,R.bg,R.extended);I.x=0,I.y++,I.y===I.scrollBottom+1?(I.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(I.y>=this._bufferService.rows&&(I.y=this._bufferService.rows-1),I.lines.get(I.ybase+I.y).isWrapped=!0),P=I.lines.get(I.ybase+I.y)}else if(I.x=j-1,k===2)continue}if(D&&(P.insertCells(I.x,k,I.getNullCell(R),R),P.getWidth(j-1)===2&&P.setCellFromCodePoint(j-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,R.fg,R.bg,R.extended)),P.setCellFromCodePoint(I.x++,L,k,R.fg,R.bg,R.extended),k>0)for(;--k;)P.setCellFromCodePoint(I.x++,0,0,R.fg,R.bg,R.extended)}else P.getWidth(I.x-1)?P.addCodepointToCell(I.x-1,L):P.addCodepointToCell(I.x-2,L)}O-b>0&&(P.loadCell(I.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),I.x<j&&O-b>0&&P.getWidth(I.x)===0&&!P.hasContent(I.x)&&P.setCellFromCodePoint(I.x,0,1,R.fg,R.bg,R.extended),this._dirtyRowService.markDirty(I.y)},d.prototype.addCsiHandler=function(g,b){var O=this;return g.final!=="t"||g.prefix||g.intermediates?this._parser.addCsiHandler(g,b):this._parser.addCsiHandler(g,function(L){return!S(L.params[0],O._optionsService.options.windowOptions)||b(L)})},d.prototype.addDcsHandler=function(g,b){return this._parser.addDcsHandler(g,new E.DcsHandler(b))},d.prototype.addEscHandler=function(g,b){return this._parser.addEscHandler(g,b)},d.prototype.addOscHandler=function(g,b){return this._parser.addOscHandler(g,new l.OscHandler(b))},d.prototype.bell=function(){this._onRequestBell.fire()},d.prototype.lineFeed=function(){var g=this._bufferService.buffer;this._dirtyRowService.markDirty(g.y),this._optionsService.options.convertEol&&(g.x=0),g.y++,g.y===g.scrollBottom+1?(g.y--,this._onRequestScroll.fire(this._eraseAttrData())):g.y>=this._bufferService.rows&&(g.y=this._bufferService.rows-1),g.x>=this._bufferService.cols&&g.x--,this._dirtyRowService.markDirty(g.y),this._onLineFeed.fire()},d.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},d.prototype.backspace=function(){var g,b=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(b.x>0&&b.x--);if(this._restrictCursor(this._bufferService.cols),b.x>0)b.x--;else if(b.x===0&&b.y>b.scrollTop&&b.y<=b.scrollBottom&&(!((g=b.lines.get(b.ybase+b.y))===null||g===void 0)&&g.isWrapped)){b.lines.get(b.ybase+b.y).isWrapped=!1,b.y--,b.x=this._bufferService.cols-1;var O=b.lines.get(b.ybase+b.y);O.hasWidth(b.x)&&!O.hasContent(b.x)&&b.x--}this._restrictCursor()},d.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var g=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-g)}},d.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},d.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},d.prototype._restrictCursor=function(g){g===void 0&&(g=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(g,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype._setCursor=function(g,b){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=g,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+b):(this._bufferService.buffer.x=g,this._bufferService.buffer.y=b),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype._moveCursor=function(g,b){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+g,this._bufferService.buffer.y+b)},d.prototype.cursorUp=function(g){var b=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;b>=0?this._moveCursor(0,-Math.min(b,g.params[0]||1)):this._moveCursor(0,-(g.params[0]||1))},d.prototype.cursorDown=function(g){var b=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;b>=0?this._moveCursor(0,Math.min(b,g.params[0]||1)):this._moveCursor(0,g.params[0]||1)},d.prototype.cursorForward=function(g){this._moveCursor(g.params[0]||1,0)},d.prototype.cursorBackward=function(g){this._moveCursor(-(g.params[0]||1),0)},d.prototype.cursorNextLine=function(g){this.cursorDown(g),this._bufferService.buffer.x=0},d.prototype.cursorPrecedingLine=function(g){this.cursorUp(g),this._bufferService.buffer.x=0},d.prototype.cursorCharAbsolute=function(g){this._setCursor((g.params[0]||1)-1,this._bufferService.buffer.y)},d.prototype.cursorPosition=function(g){this._setCursor(g.length>=2?(g.params[1]||1)-1:0,(g.params[0]||1)-1)},d.prototype.charPosAbsolute=function(g){this._setCursor((g.params[0]||1)-1,this._bufferService.buffer.y)},d.prototype.hPositionRelative=function(g){this._moveCursor(g.params[0]||1,0)},d.prototype.linePosAbsolute=function(g){this._setCursor(this._bufferService.buffer.x,(g.params[0]||1)-1)},d.prototype.vPositionRelative=function(g){this._moveCursor(0,g.params[0]||1)},d.prototype.hVPosition=function(g){this.cursorPosition(g)},d.prototype.tabClear=function(g){var b=g.params[0];b===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:b===3&&(this._bufferService.buffer.tabs={})},d.prototype.cursorForwardTab=function(g){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=g.params[0]||1;b--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},d.prototype.cursorBackwardTab=function(g){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=g.params[0]||1,O=this._bufferService.buffer;b--;)O.x=O.prevStop()},d.prototype._eraseInBufferLine=function(g,b,O,L){L===void 0&&(L=!1);var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+g);k.replaceCells(b,O,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),L&&(k.isWrapped=!1)},d.prototype._resetBufferLine=function(g){var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+g);b.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),b.isWrapped=!1},d.prototype.eraseInDisplay=function(g){var b;switch(this._restrictCursor(),g.params[0]){case 0:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);b<this._bufferService.rows;b++)this._resetBufferLine(b);this._dirtyRowService.markDirty(b);break;case 1:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(b+1).isWrapped=!1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 2:for(b=this._bufferService.rows,this._dirtyRowService.markDirty(b-1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 3:var O=this._bufferService.buffer.lines.length-this._bufferService.rows;O>0&&(this._bufferService.buffer.lines.trimStart(O),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-O,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-O,0),this._onScroll.fire(0))}},d.prototype.eraseInLine=function(g){switch(this._restrictCursor(),g.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype.insertLines=function(g){this._restrictCursor();var b=g.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){for(var L=O.ybase+O.y,k=this._bufferService.rows-1-O.scrollBottom,I=this._bufferService.rows-1+O.ybase-k+1;b--;)O.lines.splice(I-1,1),O.lines.splice(L,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},d.prototype.deleteLines=function(g){this._restrictCursor();var b=g.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){var L,k=O.ybase+O.y;for(L=this._bufferService.rows-1-O.scrollBottom,L=this._bufferService.rows-1+O.ybase-L;b--;)O.lines.splice(k,1),O.lines.splice(L,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},d.prototype.insertChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.insertCells(this._bufferService.buffer.x,g.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.deleteChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.deleteCells(this._bufferService.buffer.x,g.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.scrollUp=function(g){for(var b=g.params[0]||1,O=this._bufferService.buffer;b--;)O.lines.splice(O.ybase+O.scrollTop,1),O.lines.splice(O.ybase+O.scrollBottom,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},d.prototype.scrollDown=function(g){for(var b=g.params[0]||1,O=this._bufferService.buffer;b--;)O.lines.splice(O.ybase+O.scrollBottom,1),O.lines.splice(O.ybase+O.scrollTop,0,O.getBlankLine(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},d.prototype.scrollLeft=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.deleteCells(0,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.scrollRight=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.insertCells(0,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.insertColumns=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=this._bufferService.buffer.lines.get(b.ybase+L);k.insertCells(b.x,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.deleteColumns=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.deleteCells(b.x,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.eraseChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(g.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.repeatPrecedingCharacter=function(g){if(this._parser.precedingCodepoint){for(var b=g.params[0]||1,O=new Uint32Array(b),L=0;L<b;++L)O[L]=this._parser.precedingCodepoint;this.print(O,0,O.length)}},d.prototype.sendDeviceAttributesPrimary=function(g){g.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c"))},d.prototype.sendDeviceAttributesSecondary=function(g){g.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(g.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c"))},d.prototype._is=function(g){return(this._optionsService.options.termName+"").indexOf(g)===0},d.prototype.setMode=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 4:this._coreService.modes.insertMode=!0}},d.prototype.setModePrivate=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,u.DEFAULT_CHARSET),this._charsetService.setgCharset(1,u.DEFAULT_CHARSET),this._charsetService.setgCharset(2,u.DEFAULT_CHARSET),this._charsetService.setgCharset(3,u.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},d.prototype.resetMode=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 4:this._coreService.modes.insertMode=!1}},d.prototype.resetModePrivate=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),g.params[b]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},d.prototype._updateAttrColor=function(g,b,O,L,k){return b===2?(g|=50331648,g&=-16777216,g|=c.AttributeData.fromColorRGB([O,L,k])):b===5&&(g&=-50331904,g|=33554432|255&O),g},d.prototype._extractColor=function(g,b,O){var L=[0,0,-1,0,0,0],k=0,I=0;do{if(L[I+k]=g.params[b+I],g.hasSubParams(b+I)){var N=g.getSubParams(b+I),M=0;do L[1]===5&&(k=1),L[I+M+1+k]=N[M];while(++M<N.length&&M+I+1+k<L.length);break}if(L[1]===5&&I+k>=2||L[1]===2&&I+k>=5)break;L[1]&&(k=1)}while(++I+b<g.length&&I+k<L.length);for(M=2;M<L.length;++M)L[M]===-1&&(L[M]=0);switch(L[0]){case 38:O.fg=this._updateAttrColor(O.fg,L[1],L[3],L[4],L[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,L[1],L[3],L[4],L[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,L[1],L[3],L[4],L[5])}return I},d.prototype._processUnderline=function(g,b){b.extended=b.extended.clone(),(!~g||g>5)&&(g=1),b.extended.underlineStyle=g,b.fg|=268435456,g===0&&(b.fg&=-268435457),b.updateExtended()},d.prototype.charAttributes=function(g){if(g.length===1&&g.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var b,O=g.length,L=this._curAttrData,k=0;k<O;k++)(b=g.params[k])>=30&&b<=37?(L.fg&=-50331904,L.fg|=16777216|b-30):b>=40&&b<=47?(L.bg&=-50331904,L.bg|=16777216|b-40):b>=90&&b<=97?(L.fg&=-50331904,L.fg|=16777224|b-90):b>=100&&b<=107?(L.bg&=-50331904,L.bg|=16777224|b-100):b===0?(L.fg=t.DEFAULT_ATTR_DATA.fg,L.bg=t.DEFAULT_ATTR_DATA.bg):b===1?L.fg|=134217728:b===3?L.bg|=67108864:b===4?(L.fg|=268435456,this._processUnderline(g.hasSubParams(k)?g.getSubParams(k)[0]:1,L)):b===5?L.fg|=536870912:b===7?L.fg|=67108864:b===8?L.fg|=1073741824:b===2?L.bg|=134217728:b===21?this._processUnderline(2,L):b===22?(L.fg&=-134217729,L.bg&=-134217729):b===23?L.bg&=-67108865:b===24?L.fg&=-268435457:b===25?L.fg&=-536870913:b===27?L.fg&=-67108865:b===28?L.fg&=-1073741825:b===39?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):b===49?(L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):b===38||b===48||b===58?k+=this._extractColor(g,k,L):b===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):b===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.",b)},d.prototype.deviceStatus=function(g){switch(g.params[0]){case 5:this._coreService.triggerDataEvent(f.C0.ESC+"[0n");break;case 6:var b=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"["+b+";"+O+"R")}},d.prototype.deviceStatusPrivate=function(g){switch(g.params[0]){case 6:var b=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(f.C0.ESC+"[?"+b+";"+O+"R")}},d.prototype.softReset=function(g){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},d.prototype.setCursorStyle=function(g){var b=g.params[0]||1;switch(b){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var O=b%2==1;this._optionsService.options.cursorBlink=O},d.prototype.setScrollRegion=function(g){var b,O=g.params[0]||1;(g.length<2||(b=g.params[1])>this._bufferService.rows||b===0)&&(b=this._bufferService.rows),b>O&&(this._bufferService.buffer.scrollTop=O-1,this._bufferService.buffer.scrollBottom=b-1,this._setCursor(0,0))},d.prototype.windowOptions=function(g){if(S(g.params[0],this._optionsService.options.windowOptions)){var b=g.length>1?g.params[1]:0;switch(g.params[0]){case 14:b!==2&&this._onRequestWindowsOptionsReport.fire(h.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(h.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(f.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:b!==0&&b!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),b!==0&&b!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:b!==0&&b!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),b!==0&&b!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},d.prototype.saveCursor=function(g){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},d.prototype.restoreCursor=function(g){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},d.prototype.setTitle=function(g){this._windowTitle=g,this._onTitleChange.fire(g)},d.prototype.setIconName=function(g){this._iconName=g},d.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},d.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},d.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},d.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},d.prototype.selectCharset=function(g){g.length===2?g[0]!=="/"&&this._charsetService.setgCharset(w[g[0]],u.CHARSETS[g[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},d.prototype.index=function(){this._restrictCursor();var g=this._bufferService.buffer;this._bufferService.buffer.y++,g.y===g.scrollBottom+1?(g.y--,this._onRequestScroll.fire(this._eraseAttrData())):g.y>=this._bufferService.rows&&(g.y=this._bufferService.rows-1),this._restrictCursor()},d.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},d.prototype.reverseIndex=function(){this._restrictCursor();var g=this._bufferService.buffer;if(g.y===g.scrollTop){var b=g.scrollBottom-g.scrollTop;g.lines.shiftElements(g.ybase+g.y,b,1),g.lines.set(g.ybase+g.y,g.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(g.scrollTop,g.scrollBottom)}else g.y--,this._restrictCursor()},d.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},d.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},d.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},d.prototype.setgLevel=function(g){this._charsetService.setgLevel(g)},d.prototype.screenAlignmentPattern=function(){var g=new r.CellData;g.content=1<<22|69,g.fg=this._curAttrData.fg,g.bg=this._curAttrData.bg;var b=this._bufferService.buffer;this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var L=b.ybase+b.y+O,k=b.lines.get(L);k&&(k.fill(g),k.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},d}(i.Disposable);n.InputHandler=x},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},n.CHARSETS.A={"#":"\xA3"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},n.CHARSETS.C=n.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},n.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},n.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},n.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},n.CHARSETS.E=n.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},n.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},n.CHARSETS.H=n.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;var _=function(){function y(h,f){if(h===void 0&&(h=32),f===void 0&&(f=32),this.maxLength=h,this.maxSubParamsLength=f,f>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(f),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return y.fromArray=function(h){var f=new y;if(!h.length)return f;for(var u=h[0]instanceof Array?1:0;u<h.length;++u){var p=h[u];if(p instanceof Array)for(var i=0;i<p.length;++i)f.addSubParam(p[i]);else f.addParam(p)}return f},y.prototype.clone=function(){var h=new y(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h},y.prototype.toArray=function(){for(var h=[],f=0;f<this.length;++f){h.push(this.params[f]);var u=this._subParamsIdx[f]>>8,p=255&this._subParamsIdx[f];p-u>0&&h.push(Array.prototype.slice.call(this._subParams,u,p))}return h},y.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},y.prototype.addParam=function(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>2147483647?2147483647:h}},y.prototype.addSubParam=function(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>2147483647?2147483647:h,this._subParamsIdx[this.length-1]++}},y.prototype.hasSubParams=function(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0},y.prototype.getSubParams=function(h){var f=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];return u-f>0?this._subParams.subarray(f,u):null},y.prototype.getSubParamsAll=function(){for(var h={},f=0;f<this.length;++f){var u=this._subParamsIdx[f]>>8,p=255&this._subParamsIdx[f];p-u>0&&(h[f]=this._subParams.slice(u,p))}return h},y.prototype.addDigit=function(h){var f;if(!(this._rejectDigits||!(f=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,p=u[f-1];u[f-1]=~p?Math.min(10*p+h,2147483647):h}},y}();n.Params=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;var _=C(23),y=C(8),h=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(p,i){this._handlers[p]===void 0&&(this._handlers[p]=[]);var o=this._handlers[p];return o.push(i),{dispose:function(){var a=o.indexOf(i);a!==-1&&o.splice(a,1)}}},u.prototype.setHandler=function(p,i){this._handlers[p]=[i]},u.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},u.prototype.setHandlerFallback=function(p){this._handlerFb=p},u.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},u.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},u.prototype._start=function(){var p=this._handlers[this._id];if(p)for(var i=p.length-1;i>=0;i--)p[i].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(p,i,o){var a=this._handlers[this._id];if(a)for(var t=a.length-1;t>=0;t--)a[t].put(p,i,o);else this._handlerFb(this._id,"PUT",y.utf32ToString(p,i,o))},u.prototype._end=function(p){var i=this._handlers[this._id];if(i){for(var o=i.length-1;o>=0&&i[o].end(p)===!1;o--);for(o--;o>=0;o--)i[o].end(!1)}else this._handlerFb(this._id,"END",p)},u.prototype.start=function(){this.reset(),this._id=-1,this._state=1},u.prototype.put=function(p,i,o){if(this._state!==3){if(this._state===1)for(;i<o;){var a=p[i++];if(a===59){this._state=2,this._start();break}if(a<48||57<a)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+a-48}this._state===2&&o-i>0&&this._put(p,i,o)}},u.prototype.end=function(p){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(p)),this._id=-1,this._state=0)},u}();n.OscParser=h;var f=function(){function u(p){this._handler=p,this._data="",this._hitLimit=!1}return u.prototype.start=function(){this._data="",this._hitLimit=!1},u.prototype.put=function(p,i,o){this._hitLimit||(this._data+=y.utf32ToString(p,i,o),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(p){var i;return this._hitLimit?i=!1:p&&(i=this._handler(this._data)),this._data="",this._hitLimit=!1,i},u}();n.OscHandler=f},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;var _=C(8),y=C(21),h=C(23),f=[],u=function(){function i(){this._handlers=Object.create(null),this._active=f,this._ident=0,this._handlerFb=function(){}}return i.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},i.prototype.addHandler=function(o,a){this._handlers[o]===void 0&&(this._handlers[o]=[]);var t=this._handlers[o];return t.push(a),{dispose:function(){var s=t.indexOf(a);s!==-1&&t.splice(s,1)}}},i.prototype.setHandler=function(o,a){this._handlers[o]=[a]},i.prototype.clearHandler=function(o){this._handlers[o]&&delete this._handlers[o]},i.prototype.setHandlerFallback=function(o){this._handlerFb=o},i.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=f,this._ident=0},i.prototype.hook=function(o,a){if(this.reset(),this._ident=o,this._active=this._handlers[o]||f,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(a);else this._handlerFb(this._ident,"HOOK",a)},i.prototype.put=function(o,a,t){if(this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].put(o,a,t);else this._handlerFb(this._ident,"PUT",_.utf32ToString(o,a,t))},i.prototype.unhook=function(o){if(this._active.length){for(var a=this._active.length-1;a>=0&&this._active[a].unhook(o)===!1;a--);for(a--;a>=0;a--)this._active[a].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",o);this._active=f,this._ident=0},i}();n.DcsParser=u;var p=function(){function i(o){this._handler=o,this._data="",this._hitLimit=!1}return i.prototype.hook=function(o){this._params=o.clone(),this._data="",this._hitLimit=!1},i.prototype.put=function(o,a,t){this._hitLimit||(this._data+=_.utf32ToString(o,a,t),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},i.prototype.unhook=function(o){var a;return this._hitLimit?a=!1:o&&(a=this._handler(this._data,this._params||new y.Params)),this._params=void 0,this._data="",this._hitLimit=!1,a},i}();n.DcsHandler=p},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireCharAtlas=void 0;var _=C(26),y=C(43),h=[];n.acquireCharAtlas=function(f,u,p,i,o){for(var a=_.generateConfig(i,o,f,p),t=0;t<h.length;t++){var s=(e=h[t]).ownedBy.indexOf(u);if(s>=0){if(_.configEquals(e.config,a))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),h.splice(t,1)):e.ownedBy.splice(s,1);break}}for(t=0;t<h.length;t++){var e=h[t];if(_.configEquals(e.config,a))return e.ownedBy.push(u),e.atlas}var r={atlas:new y.DynamicCharAtlas(document,a),config:a,ownedBy:[u]};return h.push(r),r.atlas},n.removeTerminalFromCache=function(f){for(var u=0;u<h.length;u++){var p=h[u].ownedBy.indexOf(f);if(p!==-1){h[u].ownedBy.length===1?(h[u].atlas.dispose(),h.splice(u,1)):h[u].ownedBy.splice(p,1);break}}}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;var _=C(3);n.generateConfig=function(y,h,f,u){var p={foreground:u.foreground,background:u.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:u.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:y,scaledCharHeight:h,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,colors:p}},n.configEquals=function(y,h){for(var f=0;f<y.colors.ansi.length;f++)if(y.colors.ansi[f].rgba!==h.colors.ansi[f].rgba)return!1;return y.devicePixelRatio===h.devicePixelRatio&&y.fontFamily===h.fontFamily&&y.fontSize===h.fontSize&&y.fontWeight===h.fontWeight&&y.fontWeightBold===h.fontWeightBold&&y.allowTransparency===h.allowTransparency&&y.scaledCharWidth===h.scaledCharWidth&&y.scaledCharHeight===h.scaledCharHeight&&y.colors.foreground===h.colors.foreground&&y.colors.background===h.colors.background},n.is256Color=function(y){return y<_.DEFAULT_COLOR}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColorManager=n.DEFAULT_ANSI_COLORS=void 0;var _=C(10),y=C(45),h=_.css.toColor("#ffffff"),f=_.css.toColor("#000000"),u=_.css.toColor("#ffffff"),p=_.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=function(){for(var a=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],s=0;s<216;s++){var e=t[s/36%6|0],r=t[s/6%6|0],c=t[s%6];a.push({css:_.channels.toCss(e,r,c),rgba:_.channels.toRgba(e,r,c)})}for(s=0;s<24;s++){var l=8+10*s;a.push({css:_.channels.toCss(l,l,l),rgba:_.channels.toRgba(l,l,l)})}return a}();var o=function(){function a(t,s){this.allowTransparency=s;var e=t.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new y.ColorContrastCache,this.colors={foreground:h,background:f,cursor:u,cursorAccent:p,selectionTransparent:i,selectionOpaque:_.color.blend(f,i),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return a.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},a.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,h),this.colors.background=this._parseColor(t.background,f),this.colors.cursor=this._parseColor(t.cursor,u,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,p,!0),this.colors.selectionTransparent=this._parseColor(t.selection,i,!0),this.colors.selectionOpaque=_.color.blend(this.colors.background,this.colors.selectionTransparent),_.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=_.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,n.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,n.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,n.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,n.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,n.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,n.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,n.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,n.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,n.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,n.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,n.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,n.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,n.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,n.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,n.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},a.prototype._parseColor=function(t,s,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return s;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+s.css),s;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+s.css+"."),s;var c=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(x){return Number(x)}),l=c[0],E=c[1],w=c[2],S=c[3],v=Math.round(255*S);return{rgba:_.channels.toRgba(l,E,w,v),css:t}}return{css:this._ctx.fillStyle,rgba:_.channels.toRgba(r[0],r[1],r[2],r[3])}},a}();n.ColorManager=o},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.throwIfFalsy=void 0,n.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _}},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(o,a){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var e in s)s.hasOwnProperty(e)&&(t[e]=s[e])})(o,a)},function(o,a){function t(){this.constructor=o}_(o,a),o.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerRegistry=n.JoinedCellData=void 0;var h=C(6),f=C(3),u=C(4),p=function(o){function a(t,s,e){var r=o.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=s,r._width=e,r}return y(a,o),a.prototype.isCombined=function(){return 2097152},a.prototype.getWidth=function(){return this._width},a.prototype.getChars=function(){return this.combinedData},a.prototype.getCode=function(){return 2097151},a.prototype.setFromCharData=function(t){throw new Error("not implemented")},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(h.AttributeData);n.JoinedCellData=p;var i=function(){function o(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return o.prototype.registerCharacterJoiner=function(a){var t={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(t),t.id},o.prototype.deregisterCharacterJoiner=function(a){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===a)return this._characterJoiners.splice(t,1),!0;return!1},o.prototype.getJoinedCharacters=function(a){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(a);if(!t||t.length===0)return[];for(var s=[],e=t.translateToString(!0),r=0,c=0,l=0,E=t.getFg(0),w=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==w){if(S-r>1)for(var v=this._getJoinedRanges(e,l,c,t,r),x=0;x<v.length;x++)s.push(v[x]);r=S,l=c,E=this._workCell.fg,w=this._workCell.bg}c+=this._workCell.getChars().length||f.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1)for(v=this._getJoinedRanges(e,l,c,t,r),x=0;x<v.length;x++)s.push(v[x]);return s},o.prototype._getJoinedRanges=function(a,t,s,e,r){for(var c=a.substring(t,s),l=this._characterJoiners[0].handler(c),E=1;E<this._characterJoiners.length;E++)for(var w=this._characterJoiners[E].handler(c),S=0;S<w.length;S++)o._mergeRanges(l,w[S]);return this._stringRangesToCellRanges(l,e,r),l},o.prototype._stringRangesToCellRanges=function(a,t,s){var e=0,r=!1,c=0,l=a[e];if(l){for(var E=s;E<this._bufferService.cols;E++){var w=t.getWidth(E),S=t.getString(E).length||f.WHITESPACE_CELL_CHAR.length;if(w!==0){if(!r&&l[0]<=c&&(l[0]=E,r=!0),l[1]<=c){if(l[1]=E,!(l=a[++e]))break;l[0]<=c?(l[0]=E,r=!0):r=!1}c+=S}}l&&(l[1]=this._bufferService.cols)}},o._mergeRanges=function(a,t){for(var s=!1,e=0;e<a.length;e++){var r=a[e];if(s){if(t[1]<=r[0])return a[e-1][1]=t[1],a;if(t[1]<=r[1])return a[e-1][1]=Math.max(t[1],r[1]),a.splice(e,1),a;a.splice(e,1),e--}else{if(t[1]<=r[0])return a.splice(e,0,t),a;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),a;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),s=!0)}}return s?a[a.length-1][1]=t[1]:a.push(t),a},o}();n.CharacterJoinerRegistry=i},function(B,n,C){"use strict";function _(y,h){var f=h.getBoundingClientRect();return[y.clientX-f.left,y.clientY-f.top]}Object.defineProperty(n,"__esModule",{value:!0}),n.getRawByteCoords=n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=_,n.getCoords=function(y,h,f,u,p,i,o,a){if(p){var t=_(y,h);if(t)return t[0]=Math.ceil((t[0]+(a?i/2:0))/i),t[1]=Math.ceil(t[1]/o),t[0]=Math.min(Math.max(t[0],1),f+(a?1:0)),t[1]=Math.min(Math.max(t[1],1),u),t}},n.getRawByteCoords=function(y){if(y)return{x:y[0]+32,y:y[1]+32}}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0;var _=function(){function y(h){this._renderCallback=h}return y.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.refresh=function(h,f,u){var p=this;this._rowCount=u,h=h!==void 0?h:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return p._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var h=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(h,f)}},y}();n.RenderDebouncer=_},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(f,u){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var o in i)i.hasOwnProperty(o)&&(p[o]=i[o])})(f,u)},function(f,u){function p(){this.constructor=f}_(f,u),f.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0}),n.ScreenDprMonitor=void 0;var h=function(f){function u(){var p=f!==null&&f.apply(this,arguments)||this;return p._currentDevicePixelRatio=window.devicePixelRatio,p}return y(u,f),u.prototype.setListener=function(p){var i=this;this._listener&&this.clearListener(),this._listener=p,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){f.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},u.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},u}(C(2).Disposable);n.ScreenDprMonitor=h},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function _(y,h){if(h===void 0&&(h=5),typeof y!="object")return y;var f=Array.isArray(y)?[]:{};for(var u in y)f[u]=h<=1?y[u]:y[u]?_(y[u],h-1):y[u];return f}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;var _=C(4),y=C(35),h=C(18),f=C(0),u=C(83),p=function(){function e(r){this._core=new y.Terminal(r),this._addonManager=new u.AddonManager}return e.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new t(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new s(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),new o(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(r,c){this._verifyIntegers(r,c),this._core.resize(r,c)},e.prototype.open=function(r){this._core.open(r)},e.prototype.attachCustomKeyEventHandler=function(r){this._core.attachCustomKeyEventHandler(r)},e.prototype.registerLinkMatcher=function(r,c,l){return this._checkProposedApi(),this._core.registerLinkMatcher(r,c,l)},e.prototype.deregisterLinkMatcher=function(r){this._checkProposedApi(),this._core.deregisterLinkMatcher(r)},e.prototype.registerLinkProvider=function(r){return this._checkProposedApi(),this._core.registerLinkProvider(r)},e.prototype.registerCharacterJoiner=function(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)},e.prototype.deregisterCharacterJoiner=function(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)},e.prototype.registerMarker=function(r){return this._checkProposedApi(),this._verifyIntegers(r),this._core.addMarker(r)},e.prototype.addMarker=function(r){return this.registerMarker(r)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(r,c,l){this._verifyIntegers(r,c,l),this._core.select(r,c,l)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(r,c){this._verifyIntegers(r,c),this._core.selectLines(r,c)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(r){this._verifyIntegers(r),this._core.scrollLines(r)},e.prototype.scrollPages=function(r){this._verifyIntegers(r),this._core.scrollPages(r)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(r){this._verifyIntegers(r),this._core.scrollToLine(r)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(r,c){this._core.write(r,c)},e.prototype.writeUtf8=function(r,c){this._core.write(r,c)},e.prototype.writeln=function(r,c){this._core.write(r),this._core.write(`\r
|
|
|
`,c)},e.prototype.paste=function(r){this._core.paste(r)},e.prototype.getOption=function(r){return this._core.optionsService.getOption(r)},e.prototype.setOption=function(r,c){this._core.optionsService.setOption(r,c)},e.prototype.refresh=function(r,c){this._verifyIntegers(r,c),this._core.refresh(r,c)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(r){return this._addonManager.loadAddon(this,r)},Object.defineProperty(e,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var r=[],c=0;c<arguments.length;c++)r[c]=arguments[c];for(var l=0,E=r;l<E.length;l++){var w=E[l];if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}},e}();n.Terminal=p;var i=function(){function e(r,c){this._buffer=r,this.type=c}return e.prototype.init=function(r){return this._buffer=r,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(r){var c=this._buffer.lines.get(r);if(c)return new a(c)},e.prototype.getNullCell=function(){return new _.CellData},e}(),o=function(){function e(r){var c=this;this._buffers=r,this._onBufferChange=new f.EventEmitter,this._normal=new i(this._buffers.normal,"normal"),this._alternate=new i(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return c._onBufferChange.fire(c.active)})}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),e}(),a=function(){function e(r){this._line=r}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(r,c){if(!(r<0||r>=this._line.length))return c?(this._line.loadCell(r,c),c):this._line.loadCell(r,new _.CellData)},e.prototype.translateToString=function(r,c,l){return this._line.translateToString(r,c,l)},e}(),t=function(){function e(r){this._core=r}return e.prototype.registerCsiHandler=function(r,c){return this._core.addCsiHandler(r,function(l){return c(l.toArray())})},e.prototype.addCsiHandler=function(r,c){return this.registerCsiHandler(r,c)},e.prototype.registerDcsHandler=function(r,c){return this._core.addDcsHandler(r,function(l,E){return c(l,E.toArray())})},e.prototype.addDcsHandler=function(r,c){return this.registerDcsHandler(r,c)},e.prototype.registerEscHandler=function(r,c){return this._core.addEscHandler(r,c)},e.prototype.addEscHandler=function(r,c){return this.registerEscHandler(r,c)},e.prototype.registerOscHandler=function(r,c){return this._core.addOscHandler(r,c)},e.prototype.addOscHandler=function(r,c){return this.registerOscHandler(r,c)},e}(),s=function(){function e(r){this._core=r}return e.prototype.register=function(r){this._core.unicodeService.register(r)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(r){this._core.unicodeService.activeVersion=r},enumerable:!1,configurable:!0}),e}()},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(j,A){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,R){D.__proto__=R}||function(D,R){for(var P in R)R.hasOwnProperty(P)&&(D[P]=R[P])})(j,A)},function(j,A){function D(){this.constructor=j}_(j,A),j.prototype=A===null?Object.create(A):(D.prototype=A.prototype,new D)});Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;var h=C(36),f=C(37),u=C(38),p=C(12),i=C(19),o=C(40),a=C(50),t=C(51),s=C(11),e=C(7),r=C(18),c=C(54),l=C(55),E=C(56),w=C(57),S=C(59),v=C(0),x=C(16),m=C(27),d=C(60),g=C(5),b=C(61),O=C(62),L=C(63),k=C(64),I=C(65),N=typeof window!="undefined"?window.document:null,M=function(j){function A(D){D===void 0&&(D={});var R=j.call(this,D)||this;return R.browser=s,R._keyDownHandled=!1,R._onCursorMove=new v.EventEmitter,R._onKey=new v.EventEmitter,R._onRender=new v.EventEmitter,R._onSelectionChange=new v.EventEmitter,R._onTitleChange=new v.EventEmitter,R._onFocus=new v.EventEmitter,R._onBlur=new v.EventEmitter,R._onA11yCharEmitter=new v.EventEmitter,R._onA11yTabEmitter=new v.EventEmitter,R._setup(),R.linkifier=R._instantiationService.createInstance(a.Linkifier),R.linkifier2=R.register(R._instantiationService.createInstance(L.Linkifier2)),R.register(R._inputHandler.onRequestBell(function(){return R.bell()})),R.register(R._inputHandler.onRequestRefreshRows(function(P,T){return R.refresh(P,T)})),R.register(R._inputHandler.onRequestReset(function(){return R.reset()})),R.register(R._inputHandler.onRequestScroll(function(P,T){return R.scroll(P,T||void 0)})),R.register(R._inputHandler.onRequestWindowsOptionsReport(function(P){return R._reportWindowsOptions(P)})),R.register(v.forwardEvent(R._inputHandler.onCursorMove,R._onCursorMove)),R.register(v.forwardEvent(R._inputHandler.onTitleChange,R._onTitleChange)),R.register(v.forwardEvent(R._inputHandler.onA11yChar,R._onA11yCharEmitter)),R.register(v.forwardEvent(R._inputHandler.onA11yTab,R._onA11yTabEmitter)),R.register(R._bufferService.onResize(function(P){return R._afterResize(P.cols,P.rows)})),R}return y(A,j),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var D,R,P;this._isDisposed||(j.prototype.dispose.call(this),(D=this._renderService)===null||D===void 0||D.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(P=(R=this.element)===null||R===void 0?void 0:R.parentNode)===null||P===void 0||P.removeChild(this.element))},A.prototype._setup=function(){j.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},A.prototype._updateOptions=function(D){var R,P,T,F;switch(j.prototype._updateOptions.call(this,D),D){case"fontFamily":case"fontSize":(R=this._renderService)===null||R===void 0||R.clear(),(P=this._charSizeService)===null||P===void 0||P.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(T=this.viewport)===null||T===void 0||T.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)):((F=this._accessibilityManager)===null||F===void 0||F.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},A.prototype._onTextAreaFocus=function(D){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(D),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},A.prototype.blur=function(){var D;return(D=this.textarea)===null||D===void 0?void 0:D.blur()},A.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},A.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var D=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),R=this._bufferService.buffer.y*D,P=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=P+"px",this.textarea.style.top=R+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=D+"px",this.textarea.style.lineHeight=D+"px",this.textarea.style.zIndex="-5"}},A.prototype._initGlobal=function(){var D=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(P){D.hasSelection()&&u.copyHandler(P,D._selectionService)}));var R=function(P){return u.handlePasteEvent(P,D.textarea,D._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",R)),this.register(e.addDisposableDomListener(this.element,"paste",R)),s.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(P){P.button===2&&u.rightClickHandler(P,D.textarea,D.screenElement,D._selectionService,D.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(P){u.rightClickHandler(P,D.textarea,D.screenElement,D._selectionService,D.options.rightClickSelectsWord)})),s.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(P){P.button===1&&u.moveTextAreaUnderMouseCursor(P,D.textarea,D.screenElement)}))},A.prototype._bindKeys=function(){var D=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(R){return D._keyUp(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(R){return D._keyDown(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(R){return D._keyPress(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return D._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(R){return D._compositionHelper.compositionupdate(R)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return D._compositionHelper.compositionend()})),this.register(this.onRender(function(){return D._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(R){return D._queueLinkification(R.start,R.end)}))},A.prototype.open=function(D){var R=this;if(!D)throw new Error("Terminal requires a parent element.");N.body.contains(D)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=D.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),D.appendChild(this.element);var P=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(e.addDisposableDomListener(this.textarea,"focus",function(U){return R._onTextAreaFocus(U)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return R._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var T=this._instantiationService.createInstance(k.CoreBrowserService,this.textarea);this._instantiationService.setService(g.ICoreBrowserService,T),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(g.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(P),this._theme=this.options.theme||this._theme,this._colorManager=new m.ColorManager(N,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(U){return R._colorManager.onOptionsChange(U)})),this._colorManager.setTheme(this._theme);var F=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(d.RenderService,F,this.rows,this.screenElement)),this._instantiationService.setService(g.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(U){return R._onRender.fire(U)})),this.onResize(function(U){return R._renderService.resize(U.cols,U.rows)}),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(g.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(O.MouseService),this._instantiationService.setService(g.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(f.Viewport,function(U,z){return R.scrollLines(U,z)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return R.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){R._renderService.onCursorMove(),R._syncTextArea()})),this.register(this.onResize(function(){return R._renderService.onResize(R.cols,R.rows)})),this.register(this.onBlur(function(){return R._renderService.onBlur()})),this.register(this.onFocus(function(){return R._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return R.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(g.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(U){return R.scrollLines(U.amount,U.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return R._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(U){return R._renderService.onSelectionChanged(U.start,U.end,U.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(U){R.textarea.value=U,R.textarea.focus(),R.textarea.select()})),this.register(this.onScroll(function(){R.viewport.syncScrollArea(),R._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return R._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return R._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(U){return R._selectionService.onMouseDown(U)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},A.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(o.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(w.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},A.prototype._setTheme=function(D){var R,P,T;this._theme=D,(R=this._colorManager)===null||R===void 0||R.setTheme(D),(P=this._renderService)===null||P===void 0||P.setColors(this._colorManager.colors),(T=this.viewport)===null||T===void 0||T.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var D=this,R=this,P=this.element;function T(H){var W,Z,V=R._mouseService.getRawByteCoords(H,R.screenElement,R.cols,R.rows);if(!V)return!1;switch(H.overrideType||H.type){case"mousemove":Z=32,H.buttons===void 0?(W=3,H.button!==void 0&&(W=H.button<3?H.button:3)):W=1&H.buttons?0:4&H.buttons?1:2&H.buttons?2:3;break;case"mouseup":Z=0,W=H.button<3?H.button:3;break;case"mousedown":Z=1,W=H.button<3?H.button:3;break;case"wheel":H.deltaY!==0&&(Z=H.deltaY<0?0:1),W=4;break;default:return!1}return!(Z===void 0||W===void 0||W>4)&&R._coreMouseService.triggerMouseEvent({col:V.x-33,row:V.y-33,button:W,action:Z,ctrl:H.ctrlKey,alt:H.altKey,shift:H.shiftKey})}var F={mouseup:null,wheel:null,mousedrag:null,mousemove:null},U=function(H){return T(H),H.buttons||(D._document.removeEventListener("mouseup",F.mouseup),F.mousedrag&&D._document.removeEventListener("mousemove",F.mousedrag)),D.cancel(H)},z=function(H){return T(H),H.preventDefault(),D.cancel(H)},$=function(H){H.buttons&&T(H)},q=function(H){H.buttons||T(H)};this.register(this._coreMouseService.onProtocolChange(function(H){H?(D.optionsService.options.logLevel==="debug"&&D._logService.debug("Binding to mouse events:",D._coreMouseService.explainEvents(H)),D.element.classList.add("enable-mouse-events"),D._selectionService.disable()):(D._logService.debug("Unbinding from mouse events."),D.element.classList.remove("enable-mouse-events"),D._selectionService.enable()),8&H?F.mousemove||(P.addEventListener("mousemove",q),F.mousemove=q):(P.removeEventListener("mousemove",F.mousemove),F.mousemove=null),16&H?F.wheel||(P.addEventListener("wheel",z,{passive:!1}),F.wheel=z):(P.removeEventListener("wheel",F.wheel),F.wheel=null),2&H?F.mouseup||(F.mouseup=U):(D._document.removeEventListener("mouseup",F.mouseup),F.mouseup=null),4&H?F.mousedrag||(F.mousedrag=$):(D._document.removeEventListener("mousemove",F.mousedrag),F.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(P,"mousedown",function(H){if(H.preventDefault(),D.focus(),D._coreMouseService.areMouseEventsActive&&!D._selectionService.shouldForceSelection(H))return T(H),F.mouseup&&D._document.addEventListener("mouseup",F.mouseup),F.mousedrag&&D._document.addEventListener("mousemove",F.mousedrag),D.cancel(H)})),this.register(e.addDisposableDomListener(P,"wheel",function(H){if(!F.wheel){if(!D.buffer.hasScrollback){var W=D.viewport.getLinesScrolled(H);if(W===0)return;for(var Z=p.C0.ESC+(D._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(H.deltaY<0?"A":"B"),V="",K=0;K<Math.abs(W);K++)V+=Z;D._coreService.triggerDataEvent(V,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(P,"wheel",function(H){if(!F.wheel)return D.viewport.onWheel(H)?void 0:D.cancel(H)},{passive:!1})),this.register(e.addDisposableDomListener(P,"touchstart",function(H){if(!D._coreMouseService.areMouseEventsActive)return D.viewport.onTouchStart(H),D.cancel(H)},{passive:!0})),this.register(e.addDisposableDomListener(P,"touchmove",function(H){if(!D._coreMouseService.areMouseEventsActive)return D.viewport.onTouchMove(H)?void 0:D.cancel(H)},{passive:!1}))},A.prototype.refresh=function(D,R){var P;(P=this._renderService)===null||P===void 0||P.refreshRows(D,R)},A.prototype._queueLinkification=function(D,R){var P;(P=this.linkifier)===null||P===void 0||P.linkifyRows(D,R)},A.prototype.updateCursorStyle=function(D){this._selectionService&&this._selectionService.shouldColumnSelect(D)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},A.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},A.prototype.scrollLines=function(D,R){j.prototype.scrollLines.call(this,D,R),this.refresh(0,this.rows-1)},A.prototype.paste=function(D){u.paste(D,this.textarea,this._coreService)},A.prototype.attachCustomKeyEventHandler=function(D){this._customKeyEventHandler=D},A.prototype.registerLinkMatcher=function(D,R,P){var T=this.linkifier.registerLinkMatcher(D,R,P);return this.refresh(0,this.rows-1),T},A.prototype.deregisterLinkMatcher=function(D){this.linkifier.deregisterLinkMatcher(D)&&this.refresh(0,this.rows-1)},A.prototype.registerLinkProvider=function(D){return this.linkifier2.registerLinkProvider(D)},A.prototype.registerCharacterJoiner=function(D){var R=this._renderService.registerCharacterJoiner(D);return this.refresh(0,this.rows-1),R},A.prototype.deregisterCharacterJoiner=function(D){this._renderService.deregisterCharacterJoiner(D)&&this.refresh(0,this.rows-1)},Object.defineProperty(A.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),A.prototype.addMarker=function(D){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+D)},A.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},A.prototype.select=function(D,R,P){this._selectionService.setSelection(D,R,P)},A.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},A.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},A.prototype.clearSelection=function(){var D;(D=this._selectionService)===null||D===void 0||D.clearSelection()},A.prototype.selectAll=function(){var D;(D=this._selectionService)===null||D===void 0||D.selectAll()},A.prototype.selectLines=function(D,R){var P;(P=this._selectionService)===null||P===void 0||P.selectLines(D,R)},A.prototype._keyDown=function(D){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1)return!1;if(!this._compositionHelper.keydown(D))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var R=S.evaluateKeyboardEvent(D,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(D),R.type===3||R.type===2){var P=this.rows-1;return this.scrollLines(R.type===2?-P:P),this.cancel(D,!0)}return R.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,D)||(R.cancel&&this.cancel(D,!0),!R.key||(R.key!==p.C0.ETX&&R.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:R.key,domEvent:D}),this._showCursor(),this._coreService.triggerDataEvent(R.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(D,!0)))},A.prototype._isThirdLevelShift=function(D,R){var P=D.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||D.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey;return R.type==="keypress"?P:P&&(!R.keyCode||R.keyCode>47)},A.prototype._keyUp=function(D){this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1||(function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18}(D)||this.focus(),this.updateCursorStyle(D))},A.prototype._keyPress=function(D){var R;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1)return!1;if(this.cancel(D),D.charCode)R=D.charCode;else if(D.which===null||D.which===void 0)R=D.keyCode;else{if(D.which===0||D.charCode===0)return!1;R=D.which}return!(!R||(D.altKey||D.ctrlKey||D.metaKey)&&!this._isThirdLevelShift(this.browser,D))&&(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:D}),this._showCursor(),this._coreService.triggerDataEvent(R,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(D,R){D!==this.cols||R!==this.rows?j.prototype.resize.call(this,D,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(D,R){var P,T;(P=this._charSizeService)===null||P===void 0||P.measure(),(T=this.viewport)===null||T===void 0||T.syncScrollArea(!0)},A.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var D=1;D<this.rows;D++)this.buffer.lines.push(this.buffer.getBlankLine(x.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},A.prototype.reset=function(){var D,R;this.options.rows=this.rows,this.options.cols=this.cols;var P=this._customKeyEventHandler;this._setup(),j.prototype.reset.call(this),(D=this._selectionService)===null||D===void 0||D.reset(),this._customKeyEventHandler=P,this.refresh(0,this.rows-1),(R=this.viewport)===null||R===void 0||R.syncScrollArea()},A.prototype._reportWindowsOptions=function(D){if(this._renderService)switch(D){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var R=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),P=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(p.C0.ESC+"[4;"+P+";"+R+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var T=this._renderService.dimensions.scaledCellWidth.toFixed(0),F=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(p.C0.ESC+"[6;"+F+";"+T+"t")}},A.prototype.cancel=function(D,R){if(this.options.cancelEvents||R)return D.preventDefault(),D.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(I.CoreTerminal);n.Terminal=M},function(B,n,C){"use strict";var _=this&&this.__decorate||function(p,i,o,a){var t,s=arguments.length,e=s<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,a);else for(var r=p.length-1;r>=0;r--)(t=p[r])&&(e=(s<3?t(e):s>3?t(i,o,e):t(i,o))||e);return s>3&&e&&Object.defineProperty(i,o,e),e},y=this&&this.__param||function(p,i){return function(o,a){i(o,a,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;var h=C(5),f=C(1),u=function(){function p(i,o,a,t,s,e){this._textarea=i,this._compositionView=o,this._bufferService=a,this._optionsService=t,this._charSizeService=s,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(p.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),p.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},p.prototype.compositionupdate=function(i){var o=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){o._compositionPosition.end=o._textarea.value.length},0)},p.prototype.compositionend=function(){this._finalizeComposition(!0)},p.prototype.keydown=function(i){if(this._isComposing||this._isSendingComposition){if(i.keyCode===229||i.keyCode===16||i.keyCode===17||i.keyCode===18)return!1;this._finalizeComposition(!1)}return i.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},p.prototype._finalizeComposition=function(i){var o=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,i){var a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(o._isSendingComposition){o._isSendingComposition=!1;var s=void 0;s=o._isComposing?o._textarea.value.substring(a.start,a.end):o._textarea.value.substring(a.start),o._coreService.triggerDataEvent(s,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},p.prototype._handleAnyTextareaChanges=function(){var i=this,o=this._textarea.value;setTimeout(function(){if(!i._isComposing){var a=i._textarea.value.replace(o,"");a.length>0&&i._coreService.triggerDataEvent(a,!0)}},0)},p.prototype.updateCompositionElements=function(i){var o=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var a=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*a,s=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=s+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=a+"px",this._compositionView.style.lineHeight=a+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=s+"px",this._textarea.style.top=t+"px",this._textarea.style.width=e.width+"px",this._textarea.style.height=e.height+"px",this._textarea.style.lineHeight=e.height+"px"}i||setTimeout(function(){return o.updateCompositionElements(!0)},0)}},p=_([y(2,f.IBufferService),y(3,f.IOptionsService),y(4,h.ICharSizeService),y(5,f.ICoreService)],p)}();n.CompositionHelper=u},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),h=this&&this.__decorate||function(t,s,e,r){var c,l=arguments.length,E=l<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(s,e,E):c(s,e))||E);return l>3&&E&&Object.defineProperty(s,e,E),E},f=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;var u=C(2),p=C(7),i=C(5),o=C(1),a=function(t){function s(e,r,c,l,E,w,S){var v=t.call(this)||this;return v._scrollLines=e,v._viewportElement=r,v._scrollArea=c,v._bufferService=l,v._optionsService=E,v._charSizeService=w,v._renderService=S,v.scrollBarWidth=0,v._currentRowHeight=0,v._lastRecordedBufferLength=0,v._lastRecordedViewportHeight=0,v._lastRecordedBufferHeight=0,v._lastTouchY=0,v._lastScrollTop=0,v._wheelPartialScroll=0,v._refreshAnimationFrame=null,v._ignoreNextScrollEvent=!1,v.scrollBarWidth=v._viewportElement.offsetWidth-v._scrollArea.offsetWidth||15,v.register(p.addDisposableDomListener(v._viewportElement,"scroll",v._onScroll.bind(v))),setTimeout(function(){return v.syncScrollArea()},0),v}return y(s,t),s.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},s.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},s.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null},s.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===r&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},s.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r,!0)}},s.prototype._bubbleScroll=function(e,r){var c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&c<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},s.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},s.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},s.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},s.prototype._applyScrollModifier=function(e,r){var c=this._optionsService.options.fastScrollModifier;return c==="alt"&&r.altKey||c==="ctrl"&&r.ctrlKey||c==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},s.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},s.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},s=h([f(3,o.IBufferService),f(4,o.IOptionsService),f(5,i.ICharSizeService),f(6,i.IRenderService)],s)}(u.Disposable);n.Viewport=a},function(B,n,C){"use strict";function _(u){return u.replace(/\r?\n/g,"\r")}function y(u,p){return p?"\x1B[200~"+u+"\x1B[201~":u}function h(u,p,i){u=y(u=_(u),i.decPrivateModes.bracketedPasteMode),i.triggerDataEvent(u,!0),p.value=""}function f(u,p,i){var o=i.getBoundingClientRect(),a=u.clientX-o.left-10,t=u.clientY-o.top-10;p.style.width="20px",p.style.height="20px",p.style.left=a+"px",p.style.top=t+"px",p.style.zIndex="1000",p.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=_,n.bracketTextForPaste=y,n.copyHandler=function(u,p){u.clipboardData&&u.clipboardData.setData("text/plain",p.selectionText),u.preventDefault()},n.handlePasteEvent=function(u,p,i){u.stopPropagation(),u.clipboardData&&h(u.clipboardData.getData("text/plain"),p,i)},n.paste=h,n.moveTextAreaUnderMouseCursor=f,n.rightClickHandler=function(u,p,i,o,a){f(u,p,i),a&&!o.isClickInSelection(u)&&o.selectWordAtCursor(u),p.value=o.selectionText,p.select()}},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;var h=C(2),f=C(15),u=C(21),p=C(22),i=C(24),o=function(){function t(s){this.table=new Uint8Array(s)}return t.prototype.setDefault=function(s,e){f.fill(this.table,s<<4|e)},t.prototype.add=function(s,e,r,c){this.table[e<<8|s]=r<<4|c},t.prototype.addMany=function(s,e,r,c){for(var l=0;l<s.length;l++)this.table[e<<8|s[l]]=r<<4|c},t}();n.TransitionTable=o,n.VT500_TRANSITION_TABLE=function(){var t=new o(4095),s=Array.apply(null,Array(256)).map(function(w,S){return S}),e=function(w,S){return s.slice(w,S)},r=e(32,127),c=e(0,24);c.push(25),c.push.apply(c,e(28,32));var l,E=e(0,14);for(l in t.setDefault(1,0),t.addMany(r,0,2,0),E)t.addMany([24,26,153,154],l,3,0),t.addMany(e(128,144),l,3,0),t.addMany(e(144,152),l,3,0),t.add(156,l,0,0),t.add(27,l,11,1),t.add(157,l,4,8),t.addMany([152,158,159],l,0,7),t.add(155,l,11,3),t.add(144,l,11,9);return t.addMany(c,0,3,0),t.addMany(c,1,3,1),t.add(127,1,0,1),t.addMany(c,8,0,8),t.addMany(c,3,3,3),t.add(127,3,0,3),t.addMany(c,4,3,4),t.add(127,4,0,4),t.addMany(c,6,3,6),t.addMany(c,5,3,5),t.add(127,5,0,5),t.addMany(c,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(r,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(r,7,0,7),t.addMany(c,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(c,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(c,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(c,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(c,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(c,13,13,13),t.addMany(r,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(160,0,2,0),t.add(160,8,5,8),t.add(160,6,0,6),t.add(160,11,0,11),t.add(160,13,13,13),t}();var a=function(t){function s(e){e===void 0&&(e=n.VT500_TRANSITION_TABLE);var r=t.call(this)||this;return r._transitions=e,r.initialState=0,r.currentState=r.initialState,r._params=new u.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(c,l,E){},r._executeHandlerFb=function(c){},r._csiHandlerFb=function(c,l){},r._escHandlerFb=function(c){},r._errorHandlerFb=function(c){return c},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new p.OscParser,r._dcsParser=new i.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return y(s,t),s.prototype._identifier=function(e,r){r===void 0&&(r=[64,126]);var c=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((c=e.prefix.charCodeAt(0))&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<e.intermediates.length;++l){var E=e.intermediates.charCodeAt(l);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=E}}if(e.final.length!==1)throw new Error("final must be a single byte");var w=e.final.charCodeAt(0);if(r[0]>w||w>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return c<<=8,c|=w},s.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},s.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},s.prototype.setPrintHandler=function(e){this._printHandler=e},s.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},s.prototype.addEscHandler=function(e,r){var c=this._identifier(e,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);var l=this._escHandlers[c];return l.push(r),{dispose:function(){var E=l.indexOf(r);E!==-1&&l.splice(E,1)}}},s.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},s.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},s.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},s.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},s.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},s.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},s.prototype.addCsiHandler=function(e,r){var c=this._identifier(e);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);var l=this._csiHandlers[c];return l.push(r),{dispose:function(){var E=l.indexOf(r);E!==-1&&l.splice(E,1)}}},s.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},s.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},s.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},s.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},s.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},s.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},s.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},s.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},s.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},s.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},s.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},s.prototype.setErrorHandler=function(e){this._errorHandler=e},s.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},s.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},s.prototype.parse=function(e,r){for(var c=0,l=0,E=this.currentState,w=this._oscParser,S=this._dcsParser,v=this._collect,x=this._params,m=this._transitions.table,d=0;d<r;++d){switch((l=m[E<<8|((c=e[d])<160?c:160)])>>4){case 2:for(var g=d+1;;++g){if(g>=r||(c=e[g])<32||c>126&&c<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(c=e[g])<32||c>126&&c<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(c=e[g])<32||c>126&&c<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(c=e[g])<32||c>126&&c<160){this._printHandler(e,d,g),d=g-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:d,code:c,currentState:E,collect:v,params:x,abort:!1}).abort)return;break;case 7:for(var b=this._csiHandlers[v<<8|c],O=b?b.length-1:-1;O>=0&&b[O](x)===!1;O--);O<0&&this._csiHandlerFb(v<<8|c,x),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:x.addParam(0);break;case 58:x.addSubParam(-1);break;default:x.addDigit(c-48)}while(++d<r&&(c=e[d])>47&&c<60);d--;break;case 9:v<<=8,v|=c;break;case 10:for(var L=this._escHandlers[v<<8|c],k=L?L.length-1:-1;k>=0&&L[k]()===!1;k--);k<0&&this._escHandlerFb(v<<8|c),this.precedingCodepoint=0;break;case 11:x.reset(),x.addParam(0),v=0;break;case 12:S.hook(v<<8|c,x);break;case 13:for(var I=d+1;;++I)if(I>=r||(c=e[I])===24||c===26||c===27||c>127&&c<160){S.put(e,d,I),d=I-1;break}break;case 14:S.unhook(c!==24&&c!==26),c===27&&(l|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0;break;case 4:w.start();break;case 5:for(var N=d+1;;N++)if(N>=r||(c=e[N])<32||c>127&&c<=159){w.put(e,d,N),d=N-1;break}break;case 6:w.end(c!==24&&c!==26),c===27&&(l|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0}E=15&l}this._collect=v,this.currentState=E},s}(h.Disposable);n.EscapeSequenceParser=a},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(w,S){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var m in x)x.hasOwnProperty(m)&&(v[m]=x[m])})(w,S)},function(w,S){function v(){this.constructor=w}_(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),h=this&&this.__decorate||function(w,S,v,x){var m,d=arguments.length,g=d<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(m=w[b])&&(g=(d<3?m(g):d>3?m(S,v,g):m(S,v))||g);return d>3&&g&&Object.defineProperty(S,v,g),g},f=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Renderer=void 0;var u=C(41),p=C(47),i=C(48),o=C(49),a=C(29),t=C(2),s=C(5),e=C(1),r=C(25),c=C(0),l=1,E=function(w){function S(v,x,m,d,g,b,O,L,k){var I=w.call(this)||this;I._colors=v,I._screenElement=x,I._bufferService=g,I._charSizeService=b,I._optionsService=O,I._id=l++,I._onRequestRedraw=new c.EventEmitter;var N=I._optionsService.options.allowTransparency;return I._characterJoinerRegistry=new a.CharacterJoinerRegistry(I._bufferService),I._renderLayers=[new u.TextRenderLayer(I._screenElement,0,I._colors,I._characterJoinerRegistry,N,I._id,I._bufferService,O),new p.SelectionRenderLayer(I._screenElement,1,I._colors,I._id,I._bufferService,O),new o.LinkRenderLayer(I._screenElement,2,I._colors,I._id,m,d,I._bufferService,O),new i.CursorRenderLayer(I._screenElement,3,I._colors,I._id,I._onRequestRedraw,I._bufferService,O,L,k)],I.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},I._devicePixelRatio=window.devicePixelRatio,I._updateDimensions(),I.onOptionsChanged(),I}return y(S,w),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){for(var v=0,x=this._renderLayers;v<x.length;v++)x[v].dispose();w.prototype.dispose.call(this),r.removeTerminalFromCache(this._id)},S.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},S.prototype.setColors=function(v){this._colors=v;for(var x=0,m=this._renderLayers;x<m.length;x++){var d=m[x];d.setColors(this._colors),d.reset()}},S.prototype.onResize=function(v,x){this._updateDimensions();for(var m=0,d=this._renderLayers;m<d.length;m++)d[m].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},S.prototype.onBlur=function(){this._runOperation(function(v){return v.onBlur()})},S.prototype.onFocus=function(){this._runOperation(function(v){return v.onFocus()})},S.prototype.onSelectionChanged=function(v,x,m){m===void 0&&(m=!1),this._runOperation(function(d){return d.onSelectionChanged(v,x,m)})},S.prototype.onCursorMove=function(){this._runOperation(function(v){return v.onCursorMove()})},S.prototype.onOptionsChanged=function(){this._runOperation(function(v){return v.onOptionsChanged()})},S.prototype.clear=function(){this._runOperation(function(v){return v.reset()})},S.prototype._runOperation=function(v){for(var x=0,m=this._renderLayers;x<m.length;x++)v(m[x])},S.prototype.renderRows=function(v,x){for(var m=0,d=this._renderLayers;m<d.length;m++)d[m].onGridChanged(v,x)},S.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},S.prototype.registerCharacterJoiner=function(v){return this._characterJoinerRegistry.registerCharacterJoiner(v)},S.prototype.deregisterCharacterJoiner=function(v){return this._characterJoinerRegistry.deregisterCharacterJoiner(v)},S=h([f(4,e.IBufferService),f(5,s.ICharSizeService),f(6,e.IOptionsService),f(7,e.ICoreService),f(8,s.ICoreBrowserService)],S)}(t.Disposable);n.Renderer=E},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;var h=C(42),f=C(13),u=C(6),p=C(3),i=C(29),o=C(4),a=function(t){function s(e,r,c,l,E,w,S,v){var x=t.call(this,e,"text",r,E,c,w,S,v)||this;return x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new o.CellData,x._state=new h.GridCache,x._characterJoinerRegistry=l,x}return y(s,t),s.prototype.resize=function(e){t.prototype.resize.call(this,e);var r=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===r||(this._characterWidth=e.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},s.prototype.reset=function(){this._state.clear(),this._clearAll()},s.prototype._forEachCell=function(e,r,c,l){for(var E=e;E<=r;E++)for(var w=E+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.lines.get(w),v=c?c.getJoinedCharacters(w):[],x=0;x<this._bufferService.cols;x++){S.loadCell(x,this._workCell);var m=this._workCell,d=!1,g=x;if(m.getWidth()!==0){if(v.length>0&&x===v[0][0]){d=!0;var b=v.shift();m=new i.JoinedCellData(this._workCell,S.translateToString(!0,b[0],b[1]),b[1]-b[0]),g=b[1]-1}!d&&this._isOverlapping(m)&&g<S.length-1&&S.getCodePoint(g+1)===p.NULL_CELL_CODE&&(m.content&=-12582913,m.content|=2<<22),l(m,x,E),x=g}}},s.prototype._drawBackground=function(e,r){var c=this,l=this._ctx,E=this._bufferService.cols,w=0,S=0,v=null;l.save(),this._forEachCell(e,r,null,function(x,m,d){var g=null;x.isInverse()?g=x.isFgDefault()?c._colors.foreground.css:x.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(x.getFgColor()).join(",")+")":c._colors.ansi[x.getFgColor()].css:x.isBgRGB()?g="rgb("+u.AttributeData.toColorRGB(x.getBgColor()).join(",")+")":x.isBgPalette()&&(g=c._colors.ansi[x.getBgColor()].css),v===null&&(w=m,S=d),d!==S?(l.fillStyle=v||"",c._fillCells(w,S,E-w,1),w=m,S=d):v!==g&&(l.fillStyle=v||"",c._fillCells(w,S,m-w,1),w=m,S=d),v=g}),v!==null&&(l.fillStyle=v,this._fillCells(w,S,E-w,1)),l.restore()},s.prototype._drawForeground=function(e,r){var c=this;this._forEachCell(e,r,this._characterJoinerRegistry,function(l,E,w){if(!l.isInvisible()&&(c._drawChars(l,E,w),l.isUnderline())){if(c._ctx.save(),l.isInverse())if(l.isBgDefault())c._ctx.fillStyle=c._colors.background.css;else if(l.isBgRGB())c._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getBgColor()).join(",")+")";else{var S=l.getBgColor();c._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&S<8&&(S+=8),c._ctx.fillStyle=c._colors.ansi[S].css}else if(l.isFgDefault())c._ctx.fillStyle=c._colors.foreground.css;else if(l.isFgRGB())c._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getFgColor()).join(",")+")";else{var v=l.getFgColor();c._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&v<8&&(v+=8),c._ctx.fillStyle=c._colors.ansi[v].css}c._fillBottomLineAtCells(E,w,l.getWidth()),c._ctx.restore()}})},s.prototype.onGridChanged=function(e,r){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,r-e+1),this._drawBackground(e,r),this._drawForeground(e,r))},s.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},s.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var r=e.getChars();if(this._characterOverlapCache.hasOwnProperty(r))return this._characterOverlapCache[r];this._ctx.save(),this._ctx.font=this._characterFont;var c=Math.floor(this._ctx.measureText(r).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[r]=c,c},s}(f.BaseRenderLayer);n.TextRenderLayer=a},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0;var _=function(){function y(){this.cache=[]}return y.prototype.resize=function(h,f){for(var u=0;u<h;u++){this.cache.length<=u&&this.cache.push([]);for(var p=this.cache[u].length;p<f;p++)this.cache[u].push(void 0);this.cache[u].length=f}this.cache.length=h},y.prototype.clear=function(){for(var h=0;h<this.cache.length;h++)for(var f=0;f<this.cache[h].length;f++)this.cache[h][f]=void 0},y}();n.GridCache=_},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(c,l){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var S in w)w.hasOwnProperty(S)&&(E[S]=w[S])})(c,l)},function(c,l){function E(){this.constructor=c}_(c,l),c.prototype=l===null?Object.create(l):(E.prototype=l.prototype,new E)});Object.defineProperty(n,"__esModule",{value:!0}),n.NoneCharAtlas=n.DynamicCharAtlas=n.getGlyphCacheKey=void 0;var h=C(9),f=C(44),u=C(27),p=C(46),i=C(11),o=C(28),a=C(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function s(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}n.getGlyphCacheKey=s;var e=function(c){function l(E,w){var S=c.call(this)||this;S._config=w,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=E.createElement("canvas"),S._cacheCanvas.width=1024,S._cacheCanvas.height=1024,S._cacheCtx=o.throwIfFalsy(S._cacheCanvas.getContext("2d",{alpha:!0}));var v=E.createElement("canvas");v.width=S._config.scaledCharWidth,v.height=S._config.scaledCharHeight,S._tmpCtx=o.throwIfFalsy(v.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(1024/S._config.scaledCharWidth),S._height=Math.floor(1024/S._config.scaledCharHeight);var x=S._width*S._height;return S._cacheMap=new p.LRUMap(x),S._cacheMap.prealloc(x),S}return y(l,c),l.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},l.prototype.beginFrame=function(){this._drawToCacheCount=0},l.prototype.draw=function(E,w,S,v){if(w.code===32)return!0;if(!this._canCache(w))return!1;var x=s(w),m=this._cacheMap.get(x);if(m!=null)return this._drawFromCache(E,m,S,v),!0;if(this._drawToCacheCount<100){var d=void 0;d=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var g=this._drawToCache(w,d);return this._cacheMap.set(x,g),this._drawFromCache(E,g,S,v),!0}return!1},l.prototype._canCache=function(E){return E.code<256},l.prototype._toCoordinateX=function(E){return E%this._width*this._config.scaledCharWidth},l.prototype._toCoordinateY=function(E){return Math.floor(E/this._width)*this._config.scaledCharHeight},l.prototype._drawFromCache=function(E,w,S,v){if(!w.isEmpty){var x=this._toCoordinateX(w.index),m=this._toCoordinateY(w.index);E.drawImage(w.inBitmap?this._bitmap:this._cacheCanvas,x,m,this._config.scaledCharWidth,this._config.scaledCharHeight,S,v,this._config.scaledCharWidth,this._config.scaledCharHeight)}},l.prototype._getColorFromAnsiIndex=function(E){return E<this._config.colors.ansi.length?this._config.colors.ansi[E]:u.DEFAULT_ANSI_COLORS[E]},l.prototype._getBackgroundColor=function(E){return this._config.allowTransparency?t:E.bg===h.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:E.bg<256?this._getColorFromAnsiIndex(E.bg):this._config.colors.background},l.prototype._getForegroundColor=function(E){return E.fg===h.INVERTED_DEFAULT_COLOR?a.color.opaque(this._config.colors.background):E.fg<256?this._getColorFromAnsiIndex(E.fg):this._config.colors.foreground},l.prototype._drawToCache=function(E,w){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(E);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var v=E.bold?this._config.fontWeightBold:this._config.fontWeight,x=E.italic?"italic":"";this._tmpCtx.font=x+" "+v+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(E).css,E.dim&&(this._tmpCtx.globalAlpha=h.DIM_OPACITY),this._tmpCtx.fillText(E.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var m=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),d=!1;this._config.allowTransparency||(d=function(L,k){for(var I=!0,N=k.rgba>>>24,M=k.rgba>>>16&255,j=k.rgba>>>8&255,A=0;A<L.data.length;A+=4)L.data[A]===N&&L.data[A+1]===M&&L.data[A+2]===j?L.data[A+3]=0:I=!1;return I}(m,S));var g=this._toCoordinateX(w),b=this._toCoordinateY(w);this._cacheCtx.putImageData(m,g,b);var O={index:w,isEmpty:d,inBitmap:!1};return this._addGlyphToBitmap(O),O},l.prototype._addGlyphToBitmap=function(E){var w=this;!("createImageBitmap"in window)||i.isFirefox||i.isSafari||(this._glyphsWaitingOnBitmap.push(E),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return w._generateBitmap()},100)))},l.prototype._generateBitmap=function(){var E=this,w=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){E._bitmap=S;for(var v=0;v<w.length;v++)w[v].inBitmap=!0}),this._bitmapCommitTimeout=null},l}(f.BaseCharAtlas);n.DynamicCharAtlas=e;var r=function(c){function l(E,w){return c.call(this)||this}return y(l,c),l.prototype.draw=function(E,w,S,v){return!1},l}(f.BaseCharAtlas);n.NoneCharAtlas=r},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseCharAtlas=void 0;var _=function(){function y(){this._didWarmUp=!1}return y.prototype.dispose=function(){},y.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},y.prototype._doWarmUp=function(){},y.prototype.beginFrame=function(){},y}();n.BaseCharAtlas=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;var _=function(){function y(){this._color={},this._rgba={}}return y.prototype.clear=function(){this._color={},this._rgba={}},y.prototype.setCss=function(h,f,u){this._rgba[h]||(this._rgba[h]={}),this._rgba[h][f]=u},y.prototype.getCss=function(h,f){return this._rgba[h]?this._rgba[h][f]:void 0},y.prototype.setColor=function(h,f,u){this._color[h]||(this._color[h]={}),this._color[h][f]=u},y.prototype.getColor=function(h,f){return this._color[h]?this._color[h][f]:void 0},y}();n.ColorContrastCache=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LRUMap=void 0;var _=function(){function y(h){this.capacity=h,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return y.prototype._unlinkNode=function(h){var f=h.prev,u=h.next;h===this._head&&(this._head=u),h===this._tail&&(this._tail=f),f!==null&&(f.next=u),u!==null&&(u.prev=f)},y.prototype._appendNode=function(h){var f=this._tail;f!==null&&(f.next=h),h.prev=f,h.next=null,this._tail=h,this._head===null&&(this._head=h)},y.prototype.prealloc=function(h){for(var f=this._nodePool,u=0;u<h;u++)f.push({prev:null,next:null,key:null,value:null})},y.prototype.get=function(h){var f=this._map[h];return f!==void 0?(this._unlinkNode(f),this._appendNode(f),f.value):null},y.prototype.peekValue=function(h){var f=this._map[h];return f!==void 0?f.value:null},y.prototype.peek=function(){var h=this._head;return h===null?null:h.value},y.prototype.set=function(h,f){var u=this._map[h];if(u!==void 0)u=this._map[h],this._unlinkNode(u),u.value=f;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=h,u.value=f,this._map[h]=u;else{var p=this._nodePool;p.length>0?((u=p.pop()).key=h,u.value=f):u={prev:null,next:null,key:h,value:f},this._map[h]=u,this.size++}this._appendNode(u)},y}();n.LRUMap=_},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(f,u){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var o in i)i.hasOwnProperty(o)&&(p[o]=i[o])})(f,u)},function(f,u){function p(){this.constructor=f}_(f,u),f.prototype=u===null?Object.create(u):(p.prototype=u.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;var h=function(f){function u(p,i,o,a,t,s){var e=f.call(this,p,"selection",i,!0,o,a,t,s)||this;return e._clearState(),e}return y(u,f),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(p){f.prototype.resize.call(this,p),this._clearState()},u.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},u.prototype.onSelectionChanged=function(p,i,o){if(this._didStateChange(p,i,o,this._bufferService.buffer.ydisp))if(this._clearAll(),p&&i){var a=p[1]-this._bufferService.buffer.ydisp,t=i[1]-this._bufferService.buffer.ydisp,s=Math.max(a,0),e=Math.min(t,this._bufferService.rows-1);if(!(s>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,o){var r=p[0],c=i[0]-r,l=e-s+1;this._fillCells(r,s,c,l)}else{r=a===s?p[0]:0;var E=s===e?i[0]:this._bufferService.cols;this._fillCells(r,s,E-r,1);var w=Math.max(e-s-1,0);if(this._fillCells(0,s+1,this._bufferService.cols,w),s!==e){var S=t===e?i[0]:this._bufferService.cols;this._fillCells(0,e,S,1)}}this._state.start=[p[0],p[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=o,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(p,i,o,a){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||o!==this._state.columnSelectMode||a!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(p,i){return!(!p||!i)&&p[0]===i[0]&&p[1]===i[1]},u}(C(13).BaseRenderLayer);n.SelectionRenderLayer=h},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s])})(i,o)},function(i,o){function a(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)});Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;var h=C(13),f=C(4),u=function(i){function o(a,t,s,e,r,c,l,E,w){var S=i.call(this,a,"cursor",t,!0,s,e,c,l)||this;return S._onRequestRedraw=r,S._coreService=E,S._coreBrowserService=w,S._cell=new f.CellData,S._state={x:0,y:0,isFocused:!1,style:"",width:0},S._cursorRenderers={bar:S._renderBarCursor.bind(S),block:S._renderBlockCursor.bind(S),underline:S._renderUnderlineCursor.bind(S)},S}return y(o,i),o.prototype.resize=function(a){i.prototype.resize.call(this,a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},o.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},o.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onOptionsChanged=function(){var a,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new p(this._coreBrowserService.isFocused,function(){t._render(!0)})):((a=this._cursorBlinkStateManager)===null||a===void 0||a.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},o.prototype.onGridChanged=function(a,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},o.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,s=t-this._bufferService.buffer.ydisp;if(s<0||s>=this._bufferService.rows)this._clearCursor();else{var e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&r!=="block"?this._cursorRenderers[r](e,s,this._cell):this._renderBlurCursor(e,s,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=s,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===s&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](e,s,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=s,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},o.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},o.prototype._renderBarCursor=function(a,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,t,this._optionsService.options.cursorWidth),this._ctx.restore()},o.prototype._renderBlockCursor=function(a,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,t,s.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(s,a,t),this._ctx.restore()},o.prototype._renderUnderlineCursor=function(a,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,t),this._ctx.restore()},o.prototype._renderBlurCursor=function(a,t,s){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,t,s.getWidth(),1),this._ctx.restore()},o}(h.BaseRenderLayer);n.CursorRenderLayer=u;var p=function(){function i(o,a){this._renderCallback=a,this.isCursorVisible=!0,o&&this._restartInterval()}return Object.defineProperty(i.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.restartBlinkAnimation=function(){var o=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){o._renderCallback(),o._animationFrame=void 0})))},i.prototype._restartInterval=function(o){var a=this;o===void 0&&(o=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(a._animationTimeRestarted){var t=600-(Date.now()-a._animationTimeRestarted);if(a._animationTimeRestarted=void 0,t>0)return void a._restartInterval(t)}a.isCursorVisible=!1,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0}),a._blinkInterval=window.setInterval(function(){if(a._animationTimeRestarted){var s=600-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(s)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},600)},o)},i.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},i}()},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s])})(i,o)},function(i,o){function a(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)});Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;var h=C(13),f=C(9),u=C(26),p=function(i){function o(a,t,s,e,r,c,l,E){var w=i.call(this,a,"link",t,!0,s,e,l,E)||this;return r.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),r.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),c.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),c.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),w}return y(o,i),o.prototype.resize=function(a){i.prototype.resize.call(this,a),this._state=void 0},o.prototype.reset=function(){this._clearCurrentLink()},o.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var a=this._state.y2-this._state.y1-1;a>0&&this._clearCells(0,this._state.y1+1,this._state.cols,a),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},o.prototype._onShowLinkUnderline=function(a){if(a.fg===f.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:a.fg&&u.is256Color(a.fg)?this._ctx.fillStyle=this._colors.ansi[a.fg].css:this._ctx.fillStyle=this._colors.foreground.css,a.y1===a.y2)this._fillBottomLineAtCells(a.x1,a.y1,a.x2-a.x1);else{this._fillBottomLineAtCells(a.x1,a.y1,a.cols-a.x1);for(var t=a.y1+1;t<a.y2;t++)this._fillBottomLineAtCells(0,t,a.cols);this._fillBottomLineAtCells(0,a.y2,a.x2)}this._state=a},o.prototype._onHideLinkUnderline=function(a){this._clearCurrentLink()},o}(h.BaseRenderLayer);n.LinkRenderLayer=p},function(B,n,C){"use strict";var _=this&&this.__decorate||function(i,o,a,t){var s,e=arguments.length,r=e<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,a,t);else for(var c=i.length-1;c>=0;c--)(s=i[c])&&(r=(e<3?s(r):e>3?s(o,a,r):s(o,a))||r);return e>3&&r&&Object.defineProperty(o,a,r),r},y=this&&this.__param||function(i,o){return function(a,t){o(a,t,i)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseZone=n.Linkifier=void 0;var h=C(0),f=C(1),u=function(){function i(o,a,t){this._bufferService=o,this._logService=a,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new h.EventEmitter,this._onHideLinkUnderline=new h.EventEmitter,this._onLinkTooltip=new h.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),i.prototype.attachToDom=function(o,a){this._element=o,this._mouseZoneManager=a},i.prototype.linkifyRows=function(o,a){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=o,this._rowsToLinkify.end=a):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,o),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,a)),this._mouseZoneManager.clearAll(o,a),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var o=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var a=o.ydisp+this._rowsToLinkify.start;if(!(a>=o.lines.length)){for(var t=o.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,s=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,a,t,s,s);e.hasNext();)for(var r=e.next(),c=0;c<this._linkMatchers.length;c++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[c]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},i.prototype.registerLinkMatcher=function(o,a,t){if(t===void 0&&(t={}),!a)throw new Error("handler must be defined");var s={id:this._nextLinkMatcherId++,regex:o,handler:a,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(s),s.id},i.prototype._addLinkMatcherToList=function(o){if(this._linkMatchers.length!==0){for(var a=this._linkMatchers.length-1;a>=0;a--)if(o.priority<=this._linkMatchers[a].priority)return void this._linkMatchers.splice(a+1,0,o);this._linkMatchers.splice(0,0,o)}else this._linkMatchers.push(o)},i.prototype.deregisterLinkMatcher=function(o){for(var a=0;a<this._linkMatchers.length;a++)if(this._linkMatchers[a].id===o)return this._linkMatchers.splice(a,1),!0;return!1},i.prototype._doLinkifyRow=function(o,a,t){for(var s,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),c=-1,l=function(){var w=s[typeof t.matchIndex!="number"?0:t.matchIndex];if(!w)return E._logService.debug("match found without corresponding matchIndex",s,t),"break";if(c=a.indexOf(w,c+1),r.lastIndex=c+w.length,c<0)return"break";var S=E._bufferService.buffer.stringIndexToBufferIndex(o,c);if(S[0]<0)return"break";var v=E._bufferService.buffer.lines.get(S[0]);if(!v)return"break";var x=v.getFg(S[1]),m=x?x>>9&511:void 0;t.validationCallback?t.validationCallback(w,function(d){e._rowsTimeoutId||d&&e._addLink(S[1],S[0]-e._bufferService.buffer.ydisp,w,t,m)}):E._addLink(S[1],S[0]-E._bufferService.buffer.ydisp,w,t,m)},E=this;(s=r.exec(a))!==null&&l()!=="break";);},i.prototype._addLink=function(o,a,t,s,e){var r=this;if(this._mouseZoneManager&&this._element){var c=this._unicodeService.getStringCellWidth(t),l=o%this._bufferService.cols,E=a+Math.floor(o/this._bufferService.cols),w=(l+c)%this._bufferService.cols,S=E+Math.floor((l+c)/this._bufferService.cols);w===0&&(w=this._bufferService.cols,S--),this._mouseZoneManager.add(new p(l+1,E+1,w+1,S+1,function(v){if(s.handler)return s.handler(v,t);var x=window.open();x?(x.opener=null,x.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(l,E,w,S,e)),r._element.classList.add("xterm-cursor-pointer")},function(v){r._onLinkTooltip.fire(r._createLinkHoverEvent(l,E,w,S,e)),s.hoverTooltipCallback&&s.hoverTooltipCallback(v,t,{start:{x:l,y:E},end:{x:w,y:S}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(l,E,w,S,e)),r._element.classList.remove("xterm-cursor-pointer"),s.hoverLeaveCallback&&s.hoverLeaveCallback()},function(v){return!s.willLinkActivate||s.willLinkActivate(v,t)}))}},i.prototype._createLinkHoverEvent=function(o,a,t,s,e){return{x1:o,y1:a,x2:t,y2:s,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=_([y(0,f.IBufferService),y(1,f.ILogService),y(2,f.IUnicodeService)],i)}();n.Linkifier=u;var p=function(i,o,a,t,s,e,r,c,l){this.x1=i,this.y1=o,this.x2=a,this.y2=t,this.clickCallback=s,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=c,this.willLinkActivate=l};n.MouseZone=p},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(w,S){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var m in x)x.hasOwnProperty(m)&&(v[m]=x[m])})(w,S)},function(w,S){function v(){this.constructor=w}_(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),h=this&&this.__decorate||function(w,S,v,x){var m,d=arguments.length,g=d<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(m=w[b])&&(g=(d<3?m(g):d>3?m(S,v,g):m(S,v))||g);return d>3&&g&&Object.defineProperty(S,v,g),g},f=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;var u=C(11),p=C(52),i=C(4),o=C(0),a=C(5),t=C(1),s=C(30),e=C(53),r=C(2),c="\xA0",l=new RegExp(c,"g"),E=function(w){function S(v,x,m,d,g,b,O){var L=w.call(this)||this;return L._element=v,L._screenElement=x,L._bufferService=m,L._coreService=d,L._mouseService=g,L._optionsService=b,L._renderService=O,L._dragScrollAmount=0,L._enabled=!0,L._workCell=new i.CellData,L._mouseDownTimeStamp=0,L._onLinuxMouseSelection=L.register(new o.EventEmitter),L._onRedrawRequest=L.register(new o.EventEmitter),L._onSelectionChange=L.register(new o.EventEmitter),L._onRequestScrollLines=L.register(new o.EventEmitter),L._mouseMoveListener=function(k){return L._onMouseMove(k)},L._mouseUpListener=function(k){return L._onMouseUp(k)},L._coreService.onUserInput(function(){L.hasSelection&&L.clearSelection()}),L._trimListener=L._bufferService.buffer.lines.onTrim(function(k){return L._onTrim(k)}),L.register(L._bufferService.buffers.onBufferActivate(function(k){return L._onBufferActivate(k)})),L.enable(),L._model=new p.SelectionModel(L._bufferService),L._activeSelectionMode=0,L}return y(S,w),Object.defineProperty(S.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._removeMouseDownListeners()},S.prototype.reset=function(){this.clearSelection()},S.prototype.disable=function(){this.clearSelection(),this._enabled=!1},S.prototype.enable=function(){this._enabled=!0},Object.defineProperty(S.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"hasSelection",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!v||!x)&&(v[0]!==x[0]||v[1]!==x[1])},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionText",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!v||!x)return"";var m=this._bufferService.buffer,d=[];if(this._activeSelectionMode===3){if(v[0]===x[0])return"";for(var g=v[1];g<=x[1];g++){var b=m.translateBufferLineToString(g,!0,v[0],x[0]);d.push(b)}}else{var O=v[1]===x[1]?x[0]:void 0;for(d.push(m.translateBufferLineToString(v[1],!0,v[0],O)),g=v[1]+1;g<=x[1]-1;g++){var L=m.lines.get(g);b=m.translateBufferLineToString(g,!0),L&&L.isWrapped?d[d.length-1]+=b:d.push(b)}v[1]!==x[1]&&(L=m.lines.get(x[1]),b=m.translateBufferLineToString(x[1],!0,0,x[0]),L&&L.isWrapped?d[d.length-1]+=b:d.push(b))}return d.map(function(k){return k.replace(l," ")}).join(u.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),S.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},S.prototype.refresh=function(v){var x=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return x._refresh()})),u.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},S.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},S.prototype.isClickInSelection=function(v){var x=this._getMouseBufferCoords(v),m=this._model.finalSelectionStart,d=this._model.finalSelectionEnd;return!!(m&&d&&x)&&this._areCoordsInSelection(x,m,d)},S.prototype._areCoordsInSelection=function(v,x,m){return v[1]>x[1]&&v[1]<m[1]||x[1]===m[1]&&v[1]===x[1]&&v[0]>=x[0]&&v[0]<m[0]||x[1]<m[1]&&v[1]===m[1]&&v[0]<m[0]||x[1]<m[1]&&v[1]===x[1]&&v[0]>=x[0]},S.prototype.selectWordAtCursor=function(v){var x=this._getMouseBufferCoords(v);x&&(this._selectWordAt(x,!1),this._model.selectionEnd=void 0,this.refresh(!0))},S.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},S.prototype.selectLines=function(v,x){this._model.clearSelection(),v=Math.max(v,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()},S.prototype._onTrim=function(v){this._model.onTrim(v)&&this.refresh()},S.prototype._getMouseBufferCoords=function(v){var x=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x},S.prototype._getMouseEventScrollAmount=function(v){var x=s.getCoordsRelativeToElement(v,this._screenElement)[1],m=this._renderService.dimensions.canvasHeight;return x>=0&&x<=m?0:(x>m&&(x-=m),x=Math.min(Math.max(x,-50),50),(x/=50)/Math.abs(x)+Math.round(14*x))},S.prototype.shouldForceSelection=function(v){return u.isMac?v.altKey&&this._optionsService.options.macOptionClickForcesSelection:v.shiftKey},S.prototype.onMouseDown=function(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._onIncrementalClick(v):v.detail===1?this._onSingleClick(v):v.detail===2?this._onDoubleClick(v):v.detail===3&&this._onTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}},S.prototype._addMouseDownListeners=function(){var v=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return v._dragScroll()},50)},S.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},S.prototype._onIncrementalClick=function(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))},S.prototype._onSingleClick=function(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),this._model.selectionStart){this._model.selectionEnd=void 0;var x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},S.prototype._onDoubleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=1,this._selectWordAt(x,!0))},S.prototype._onTripleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))},S.prototype.shouldColumnSelect=function(v){return v.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},S.prototype._onMouseMove=function(v){if(v.stopImmediatePropagation(),this._model.selectionStart){var x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var m=this._bufferService.buffer;if(this._model.selectionEnd[1]<m.lines.length){var d=m.lines.get(this._model.selectionEnd[1]);d&&d.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},S.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}},S.prototype._onMouseUp=function(v){var x=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&v.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var m=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(m&&m[0]!==void 0&&m[1]!==void 0){var d=e.moveToCellSequence(m[0]-1,m[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(d,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},S.prototype._onBufferActivate=function(v){var x=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim(function(m){return x._onTrim(m)})},S.prototype._convertViewportColToCharacterIndex=function(v,x){for(var m=x[0],d=0;x[0]>=d;d++){var g=v.loadCell(d,this._workCell).getChars().length;this._workCell.getWidth()===0?m--:g>1&&x[0]!==d&&(m+=g-1)}return m},S.prototype.setSelection=function(v,x,m){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,x],this._model.selectionStartLength=m,this.refresh()},S.prototype._getWordAt=function(v,x,m,d){if(m===void 0&&(m=!0),d===void 0&&(d=!0),!(v[0]>=this._bufferService.cols)){var g=this._bufferService.buffer,b=g.lines.get(v[1]);if(b){var O=g.translateBufferLineToString(v[1],!1),L=this._convertViewportColToCharacterIndex(b,v),k=L,I=v[0]-L,N=0,M=0,j=0,A=0;if(O.charAt(L)===" "){for(;L>0&&O.charAt(L-1)===" ";)L--;for(;k<O.length&&O.charAt(k+1)===" ";)k++}else{var D=v[0],R=v[0];b.getWidth(D)===0&&(N++,D--),b.getWidth(R)===2&&(M++,R++);var P=b.getString(R).length;for(P>1&&(A+=P-1,k+=P-1);D>0&&L>0&&!this._isCharWordSeparator(b.loadCell(D-1,this._workCell));){b.loadCell(D-1,this._workCell);var T=this._workCell.getChars().length;this._workCell.getWidth()===0?(N++,D--):T>1&&(j+=T-1,L-=T-1),L--,D--}for(;R<b.length&&k+1<O.length&&!this._isCharWordSeparator(b.loadCell(R+1,this._workCell));){b.loadCell(R+1,this._workCell);var F=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,R++):F>1&&(A+=F-1,k+=F-1),k++,R++}}k++;var U=L+I-N+j,z=Math.min(this._bufferService.cols,k-L+N+M-j-A);if(x||O.slice(L,k).trim()!==""){if(m&&U===0&&b.getCodePoint(0)!==32){var $=g.lines.get(v[1]-1);if($&&b.isWrapped&&$.getCodePoint(this._bufferService.cols-1)!==32){var q=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(q){var H=this._bufferService.cols-q.start;U-=H,z+=H}}}if(d&&U+z===this._bufferService.cols&&b.getCodePoint(this._bufferService.cols-1)!==32){var W=g.lines.get(v[1]+1);if(W&&W.isWrapped&&W.getCodePoint(0)!==32){var Z=this._getWordAt([0,v[1]+1],!1,!1,!0);Z&&(z+=Z.length)}}return{start:U,length:z}}}}},S.prototype._selectWordAt=function(v,x){var m=this._getWordAt(v,x);if(m){for(;m.start<0;)m.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[m.start,v[1]],this._model.selectionStartLength=m.length}},S.prototype._selectToWordAt=function(v){var x=this._getWordAt(v,!0);if(x){for(var m=v[1];x.start<0;)x.start+=this._bufferService.cols,m--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,m++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,m]}},S.prototype._isCharWordSeparator=function(v){return v.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(v.getChars())>=0},S.prototype._selectLineAt=function(v){var x=this._bufferService.buffer.getWrappedRangeForLine(v);this._model.selectionStart=[0,x.first],this._model.selectionEnd=[this._bufferService.cols,x.last],this._model.selectionStartLength=0},S=h([f(2,t.IBufferService),f(3,t.ICoreService),f(4,a.IMouseService),f(5,t.IOptionsService),f(6,a.IRenderService)],S)}(r.Disposable);n.SelectionService=E},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0;var _=function(){function y(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}return y.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(y.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),y.prototype.areSelectionValuesReversed=function(){var h=this.selectionStart,f=this.selectionEnd;return!(!h||!f)&&(h[1]>f[1]||h[1]===f[1]&&h[0]>f[0])},y.prototype.onTrim=function(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},y}();n.SelectionModel=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;var _=C(12);function y(o,a,t,s){var e=o-h(t,o),r=a-h(t,a);return i(Math.abs(e-r)-function(c,l,E){for(var w=0,S=c-h(E,c),v=l-h(E,l),x=0;x<Math.abs(S-v);x++){var m=f(c,l)==="A"?-1:1,d=E.buffer.lines.get(S+m*x);d&&d.isWrapped&&w++}return w}(o,a,t),p(f(o,a),s))}function h(o,a){for(var t=0,s=o.buffer.lines.get(a),e=s&&s.isWrapped;e&&a>=0&&a<o.rows;)t++,e=(s=o.buffer.lines.get(--a))&&s.isWrapped;return t}function f(o,a){return o>a?"A":"B"}function u(o,a,t,s,e,r){for(var c=o,l=a,E="";c!==t||l!==s;)c+=e?1:-1,e&&c>r.cols-1?(E+=r.buffer.translateBufferLineToString(l,!1,o,c),c=0,o=0,l++):!e&&c<0&&(E+=r.buffer.translateBufferLineToString(l,!1,0,o+1),o=c=r.cols-1,l--);return E+r.buffer.translateBufferLineToString(l,!1,o,c)}function p(o,a){var t=a?"O":"[";return _.C0.ESC+t+o}function i(o,a){o=Math.floor(o);for(var t="",s=0;s<o;s++)t+=a;return t}n.moveToCellSequence=function(o,a,t,s){var e,r=t.buffer.x,c=t.buffer.y;if(!t.buffer.hasScrollback)return function(E,w,S,v,x,m){return y(w,v,x,m).length===0?"":i(u(E,w,E,w-h(x,w),!1,x).length,p("D",m))}(r,c,0,a,t,s)+y(c,a,t,s)+function(E,w,S,v,x,m){var d;d=y(w,v,x,m).length>0?v-h(x,v):w;var g=v,b=function(O,L,k,I,N,M){var j;return j=y(k,I,N,M).length>0?I-h(N,I):L,O<k&&j<=I||O>=k&&j<I?"C":"D"}(E,w,S,v,x,m);return i(u(E,d,S,g,b==="C",x).length,p(b,m))}(r,c,o,a,t,s);if(c===a)return e=r>o?"D":"C",i(Math.abs(r-o),p(e,s));e=c>a?"D":"C";var l=Math.abs(c-a);return i(function(E,w){return w.cols-E}(c>a?o:r,t)+(l-1)*t.cols+1+((c>a?r:o)-1),p(e,s))}},function(B,n,C){"use strict";var _=this&&this.__decorate||function(u,p,i,o){var a,t=arguments.length,s=t<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(u,p,i,o);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(s=(t<3?a(s):t>3?a(p,i,s):a(p,i))||s);return t>3&&s&&Object.defineProperty(p,i,s),s},y=this&&this.__param||function(u,p){return function(i,o){p(i,o,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SoundService=void 0;var h=C(1),f=function(){function u(p){this._optionsService=p}return Object.defineProperty(u,"audioContext",{get:function(){if(!u._audioContext){var p=window.AudioContext||window.webkitAudioContext;if(!p)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;u._audioContext=new p}return u._audioContext},enumerable:!1,configurable:!0}),u.prototype.playBellSound=function(){var p=u.audioContext;if(p){var i=p.createBufferSource();p.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(o){i.buffer=o,i.connect(p.destination),i.start(0)})}},u.prototype._base64ToArrayBuffer=function(p){for(var i=window.atob(p),o=i.length,a=new Uint8Array(o),t=0;t<o;t++)a[t]=i.charCodeAt(t);return a.buffer},u.prototype._removeMimeType=function(p){return p.split(",")[1]},u=_([y(0,h.IOptionsService)],u)}();n.SoundService=f},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),h=this&&this.__decorate||function(t,s,e,r){var c,l=arguments.length,E=l<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(s,e,E):c(s,e))||E);return l>3&&E&&Object.defineProperty(s,e,E),E},f=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseZoneManager=void 0;var u=C(2),p=C(7),i=C(5),o=C(1),a=function(t){function s(e,r,c,l,E,w){var S=t.call(this)||this;return S._element=e,S._screenElement=r,S._bufferService=c,S._mouseService=l,S._selectionService=E,S._optionsService=w,S._zones=[],S._areZonesActive=!1,S._lastHoverCoords=[void 0,void 0],S._initialSelectionLength=0,S.register(p.addDisposableDomListener(S._element,"mousedown",function(v){return S._onMouseDown(v)})),S._mouseMoveListener=function(v){return S._onMouseMove(v)},S._mouseLeaveListener=function(v){return S._onMouseLeave(v)},S._clickListener=function(v){return S._onClick(v)},S}return y(s,t),s.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},s.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},s.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var c=0;c<this._zones.length;c++){var l=this._zones[c];(l.y1>e&&l.y1<=r+1||l.y2>e&&l.y2<=r+1||l.y1<e&&l.y2>r+1)&&(this._currentZone&&this._currentZone===l&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(c--,1))}this._zones.length===0&&this._deactivate()}},s.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},s.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},s.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},s.prototype._onHover=function(e){var r=this,c=this._findZoneEventAt(e);c!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),c&&(this._currentZone=c,c.hoverCallback&&c.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},s.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},s.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);r!=null&&r.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},s.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},s.prototype._onClick=function(e){var r=this._findZoneEventAt(e),c=this._getSelectionLength();r&&c===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},s.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},s.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var c=r[0],l=r[1],E=0;E<this._zones.length;E++){var w=this._zones[E];if(w.y1===w.y2){if(l===w.y1&&c>=w.x1&&c<w.x2)return w}else if(l===w.y1&&c>=w.x1||l===w.y2&&c<w.x2||l>w.y1&&l<w.y2)return w}},s=h([f(2,o.IBufferService),f(3,i.IMouseService),f(4,i.ISelectionService),f(5,o.IOptionsService)],s)}(u.Disposable);n.MouseZoneManager=a},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(s,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var l in c)c.hasOwnProperty(l)&&(r[l]=c[l])})(s,e)},function(s,e){function r(){this.constructor=s}_(s,e),s.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;var h=C(18),f=C(11),u=C(31),p=C(7),i=C(2),o=C(32),a=C(17),t=function(s){function e(r,c){var l=s.call(this)||this;l._terminal=r,l._renderService=c,l._liveRegionLineCount=0,l._charsToConsume=[],l._charsToAnnounce="",l._accessibilityTreeRoot=document.createElement("div"),l._accessibilityTreeRoot.classList.add("xterm-accessibility"),l._rowContainer=document.createElement("div"),l._rowContainer.classList.add("xterm-accessibility-tree"),l._rowContainer.setAttribute("role","list"),l._rowElements=[];for(var E=0;E<l._terminal.rows;E++)l._rowElements[E]=l._createAccessibilityTreeNode(),l._rowContainer.appendChild(l._rowElements[E]);if(l._topBoundaryFocusListener=function(w){return l._onBoundaryFocus(w,0)},l._bottomBoundaryFocusListener=function(w){return l._onBoundaryFocus(w,1)},l._rowElements[0].addEventListener("focus",l._topBoundaryFocusListener),l._rowElements[l._rowElements.length-1].addEventListener("focus",l._bottomBoundaryFocusListener),l._refreshRowsDimensions(),l._accessibilityTreeRoot.appendChild(l._rowContainer),l._renderRowsDebouncer=new u.RenderDebouncer(l._renderRows.bind(l)),l._refreshRows(),l._liveRegion=document.createElement("div"),l._liveRegion.classList.add("live-region"),l._liveRegion.setAttribute("aria-live","assertive"),l._accessibilityTreeRoot.appendChild(l._liveRegion),!l._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return l._terminal.element.insertAdjacentElement("afterbegin",l._accessibilityTreeRoot),l.register(l._renderRowsDebouncer),l.register(l._terminal.onResize(function(w){return l._onResize(w.rows)})),l.register(l._terminal.onRender(function(w){return l._refreshRows(w.start,w.end)})),l.register(l._terminal.onScroll(function(){return l._refreshRows()})),l.register(l._terminal.onA11yChar(function(w){return l._onChar(w)})),l.register(l._terminal.onLineFeed(function(){return l._onChar(`
|
|
|
`)})),l.register(l._terminal.onA11yTab(function(w){return l._onTab(w)})),l.register(l._terminal.onKey(function(w){return l._onKey(w.key)})),l.register(l._terminal.onBlur(function(){return l._clearLiveRegion()})),l.register(l._renderService.onDimensionsChange(function(){return l._refreshRowsDimensions()})),l._screenDprMonitor=new o.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register(p.addDisposableDomListener(window,"resize",function(){return l._refreshRowsDimensions()})),l}return y(e,s),e.prototype.dispose=function(){s.prototype.dispose.call(this),a.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,c){var l=r.target,E=this._rowElements[c===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")!==(c===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===E){var w,S;if(c===0?(w=l,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(w=this._rowElements.shift(),S=l,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){var v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else v=this._createAccessibilityTreeNode(),this._rowElements.push(v),this._rowContainer.appendChild(v);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var c=0;c<r;c++)this._onChar(" ")},e.prototype._onChar=function(r){var c=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),f.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){c._accessibilityTreeRoot.appendChild(c._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,f.isMac&&a.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,c){this._renderRowsDebouncer.refresh(r,c,this._terminal.rows)},e.prototype._renderRows=function(r,c){for(var l=this._terminal.buffer,E=l.lines.length.toString(),w=r;w<=c;w++){var S=l.translateBufferLineToString(l.ydisp+w,!0),v=(l.ydisp+w+1).toString(),x=this._rowElements[w];x&&(S.length===0?x.innerHTML=" ":x.textContent=S,x.setAttribute("aria-posinset",v),x.setAttribute("aria-setsize",E))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(i.Disposable);n.AccessibilityManager=t},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(l,E){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,S){w.__proto__=S}||function(w,S){for(var v in S)S.hasOwnProperty(v)&&(w[v]=S[v])})(l,E)},function(l,E){function w(){this.constructor=l}_(l,E),l.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}),h=this&&this.__decorate||function(l,E,w,S){var v,x=arguments.length,m=x<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,E,w,S);else for(var d=l.length-1;d>=0;d--)(v=l[d])&&(m=(x<3?v(m):x>3?v(E,w,m):v(E,w))||m);return x>3&&m&&Object.defineProperty(E,w,m),m},f=this&&this.__param||function(l,E){return function(w,S){E(w,S,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;var u=C(58),p=C(9),i=C(2),o=C(5),a=C(1),t=C(0),s=C(10),e=C(17),r=1,c=function(l){function E(w,S,v,x,m,d,g,b,O){var L=l.call(this)||this;return L._colors=w,L._element=S,L._screenElement=v,L._viewportElement=x,L._linkifier=m,L._linkifier2=d,L._charSizeService=g,L._optionsService=b,L._bufferService=O,L._terminalClass=r++,L._rowElements=[],L._rowContainer=document.createElement("div"),L._rowContainer.classList.add("xterm-rows"),L._rowContainer.style.lineHeight="normal",L._rowContainer.setAttribute("aria-hidden","true"),L._refreshRowElements(L._bufferService.cols,L._bufferService.rows),L._selectionContainer=document.createElement("div"),L._selectionContainer.classList.add("xterm-selection"),L._selectionContainer.setAttribute("aria-hidden","true"),L.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},L._updateDimensions(),L._injectCss(),L._rowFactory=new u.DomRendererRowFactory(document,L._optionsService,L._colors),L._element.classList.add("xterm-dom-renderer-owner-"+L._terminalClass),L._screenElement.appendChild(L._rowContainer),L._screenElement.appendChild(L._selectionContainer),L._linkifier.onShowLinkUnderline(function(k){return L._onLinkHover(k)}),L._linkifier.onHideLinkUnderline(function(k){return L._onLinkLeave(k)}),L._linkifier2.onShowLinkUnderline(function(k){return L._onLinkHover(k)}),L._linkifier2.onHideLinkUnderline(function(k){return L._onLinkLeave(k)}),L}return y(E,l),Object.defineProperty(E.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),e.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),l.prototype.dispose.call(this)},E.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var w=0,S=this._rowElements;w<S.length;w++){var v=S[w];v.style.width=this.dimensions.canvasWidth+"px",v.style.height=this.dimensions.actualCellHeight+"px",v.style.lineHeight=this.dimensions.actualCellHeight+"px",v.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},E.prototype.setColors=function(w){this._colors=w,this._injectCss()},E.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var S=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";S+=this._terminalSelector+" span:not(."+u.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+u.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+u.ITALIC_CLASS+" { font-style: italic;}",S+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",S+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",S+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_BLINK_CLASS+":not(."+u.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_BLINK_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",S+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(v,x){S+=w._terminalSelector+" .xterm-fg-"+x+" { color: "+v.css+"; }"+w._terminalSelector+" .xterm-bg-"+x+" { background-color: "+v.css+"; }"}),S+=this._terminalSelector+" .xterm-fg-"+p.INVERTED_DEFAULT_COLOR+" { color: "+s.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+p.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=S},E.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},E.prototype._refreshRowElements=function(w,S){for(var v=this._rowElements.length;v<=S;v++){var x=document.createElement("div");this._rowContainer.appendChild(x),this._rowElements.push(x)}for(;this._rowElements.length>S;)this._rowContainer.removeChild(this._rowElements.pop())},E.prototype.onResize=function(w,S){this._refreshRowElements(w,S),this._updateDimensions()},E.prototype.onCharSizeChanged=function(){this._updateDimensions()},E.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},E.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},E.prototype.onSelectionChanged=function(w,S,v){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(w&&S){var x=w[1]-this._bufferService.buffer.ydisp,m=S[1]-this._bufferService.buffer.ydisp,d=Math.max(x,0),g=Math.min(m,this._bufferService.rows-1);if(!(d>=this._bufferService.rows||g<0)){var b=document.createDocumentFragment();if(v)b.appendChild(this._createSelectionElement(d,w[0],S[0],g-d+1));else{var O=x===d?w[0]:0,L=d===g?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(d,O,L));var k=g-d-1;if(b.appendChild(this._createSelectionElement(d+1,0,this._bufferService.cols,k)),d!==g){var I=m===g?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(g,0,I))}}this._selectionContainer.appendChild(b)}}},E.prototype._createSelectionElement=function(w,S,v,x){x===void 0&&(x=1);var m=document.createElement("div");return m.style.height=x*this.dimensions.actualCellHeight+"px",m.style.top=w*this.dimensions.actualCellHeight+"px",m.style.left=S*this.dimensions.actualCellWidth+"px",m.style.width=this.dimensions.actualCellWidth*(v-S)+"px",m},E.prototype.onCursorMove=function(){},E.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},E.prototype.clear=function(){for(var w=0,S=this._rowElements;w<S.length;w++)S[w].innerHTML=""},E.prototype.renderRows=function(w,S){for(var v=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._optionsService.options.cursorBlink,d=w;d<=S;d++){var g=this._rowElements[d];g.innerHTML="";var b=d+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.lines.get(b),L=this._optionsService.options.cursorStyle;g.appendChild(this._rowFactory.createRow(O,b===v,L,x,m,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(E.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),E.prototype.registerCharacterJoiner=function(w){return-1},E.prototype.deregisterCharacterJoiner=function(w){return!1},E.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},E.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},E.prototype._setCellUnderline=function(w,S,v,x,m,d){for(;w!==S||v!==x;){var g=this._rowElements[v];if(!g)return;var b=g.children[w];b&&(b.style.textDecoration=d?"underline":"none"),++w>=m&&(w=0,v++)}},E=h([f(6,o.ICharSizeService),f(7,a.IOptionsService),f(8,a.IBufferService)],E)}(i.Disposable);n.DomRenderer=c},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=n.CURSOR_STYLE_UNDERLINE_CLASS=n.CURSOR_STYLE_BAR_CLASS=n.CURSOR_STYLE_BLOCK_CLASS=n.CURSOR_BLINK_CLASS=n.CURSOR_CLASS=n.UNDERLINE_CLASS=n.ITALIC_CLASS=n.DIM_CLASS=n.BOLD_CLASS=void 0;var _=C(9),y=C(3),h=C(4),f=C(10);n.BOLD_CLASS="xterm-bold",n.DIM_CLASS="xterm-dim",n.ITALIC_CLASS="xterm-italic",n.UNDERLINE_CLASS="xterm-underline",n.CURSOR_CLASS="xterm-cursor",n.CURSOR_BLINK_CLASS="xterm-cursor-blink",n.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",n.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",n.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function i(o,a,t){this._document=o,this._optionsService=a,this._colors=t,this._workCell=new h.CellData}return i.prototype.setColors=function(o){this._colors=o},i.prototype.createRow=function(o,a,t,s,e,r,c){for(var l=this._document.createDocumentFragment(),E=0,w=Math.min(o.length,c)-1;w>=0;w--)if(o.loadCell(w,this._workCell).getCode()!==y.NULL_CELL_CODE||a&&w===s){E=w+1;break}for(w=0;w<E;w++){o.loadCell(w,this._workCell);var S=this._workCell.getWidth();if(S!==0){var v=this._document.createElement("span");if(S>1&&(v.style.width=r*S+"px"),a&&w===s)switch(v.classList.add(n.CURSOR_CLASS),e&&v.classList.add(n.CURSOR_BLINK_CLASS),t){case"bar":v.classList.add(n.CURSOR_STYLE_BAR_CLASS);break;case"underline":v.classList.add(n.CURSOR_STYLE_UNDERLINE_CLASS);break;default:v.classList.add(n.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&v.classList.add(n.BOLD_CLASS),this._workCell.isItalic()&&v.classList.add(n.ITALIC_CLASS),this._workCell.isDim()&&v.classList.add(n.DIM_CLASS),this._workCell.isUnderline()&&v.classList.add(n.UNDERLINE_CLASS),this._workCell.isInvisible()?v.textContent=y.WHITESPACE_CELL_CHAR:v.textContent=this._workCell.getChars()||y.WHITESPACE_CELL_CHAR;var x=this._workCell.getFgColor(),m=this._workCell.getFgColorMode(),d=this._workCell.getBgColor(),g=this._workCell.getBgColorMode(),b=!!this._workCell.isInverse();if(b){var O=x;x=d,d=O;var L=m;m=g,g=L}switch(m){case 16777216:case 33554432:this._workCell.isBold()&&x<8&&this._optionsService.options.drawBoldTextInBrightColors&&(x+=8),this._applyMinimumContrast(v,this._colors.background,this._colors.ansi[x])||v.classList.add("xterm-fg-"+x);break;case 50331648:var k=f.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(v,this._colors.background,k)||this._addStyle(v,"color:#"+p(x.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(v,this._colors.background,this._colors.foreground)||b&&v.classList.add("xterm-fg-"+_.INVERTED_DEFAULT_COLOR)}switch(g){case 16777216:case 33554432:v.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(v,"background-color:#"+p(d.toString(16),"0",6));break;case 0:default:b&&v.classList.add("xterm-bg-"+_.INVERTED_DEFAULT_COLOR)}l.appendChild(v)}}return l},i.prototype._applyMinimumContrast=function(o,a,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var s=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return s===void 0&&(s=f.color.ensureContrastRatio(a,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,s!=null?s:null)),!!s&&(this._addStyle(o,"color:"+s.css),!0)},i.prototype._addStyle=function(o,a){o.setAttribute("style",""+(o.getAttribute("style")||"")+a+";")},i}();function p(i,o,a){for(;i.length<a;)i=o+i;return i}n.DomRendererRowFactory=u},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;var _=C(12),y={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:["'",'"']};n.evaluateKeyboardEvent=function(h,f,u,p){var i={type:0,cancel:!1,key:void 0},o=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?i.key=f?_.C0.ESC+"OA":_.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?i.key=f?_.C0.ESC+"OD":_.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?i.key=f?_.C0.ESC+"OC":_.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(i.key=f?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:if(h.shiftKey){i.key=_.C0.BS;break}if(h.altKey){i.key=_.C0.ESC+_.C0.DEL;break}i.key=_.C0.DEL;break;case 9:if(h.shiftKey){i.key=_.C0.ESC+"[Z";break}i.key=_.C0.HT,i.cancel=!0;break;case 13:i.key=h.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,i.cancel=!0;break;case 27:i.key=_.C0.ESC,h.altKey&&(i.key=_.C0.ESC+_.C0.ESC),i.cancel=!0;break;case 37:if(h.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"D",i.key===_.C0.ESC+"[1;3D"&&(i.key=_.C0.ESC+(u?"b":"[1;5D"))):i.key=f?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(h.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"C",i.key===_.C0.ESC+"[1;3C"&&(i.key=_.C0.ESC+(u?"f":"[1;5C"))):i.key=f?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(h.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"A",u||i.key!==_.C0.ESC+"[1;3A"||(i.key=_.C0.ESC+"[1;5A")):i.key=f?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(h.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"B",u||i.key!==_.C0.ESC+"[1;3B"||(i.key=_.C0.ESC+"[1;5B")):i.key=f?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(i.key=_.C0.ESC+"[2~");break;case 46:i.key=o?_.C0.ESC+"[3;"+(o+1)+"~":_.C0.ESC+"[3~";break;case 36:i.key=o?_.C0.ESC+"[1;"+(o+1)+"H":f?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:i.key=o?_.C0.ESC+"[1;"+(o+1)+"F":f?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:h.shiftKey?i.type=2:i.key=_.C0.ESC+"[5~";break;case 34:h.shiftKey?i.type=3:i.key=_.C0.ESC+"[6~";break;case 112:i.key=o?_.C0.ESC+"[1;"+(o+1)+"P":_.C0.ESC+"OP";break;case 113:i.key=o?_.C0.ESC+"[1;"+(o+1)+"Q":_.C0.ESC+"OQ";break;case 114:i.key=o?_.C0.ESC+"[1;"+(o+1)+"R":_.C0.ESC+"OR";break;case 115:i.key=o?_.C0.ESC+"[1;"+(o+1)+"S":_.C0.ESC+"OS";break;case 116:i.key=o?_.C0.ESC+"[15;"+(o+1)+"~":_.C0.ESC+"[15~";break;case 117:i.key=o?_.C0.ESC+"[17;"+(o+1)+"~":_.C0.ESC+"[17~";break;case 118:i.key=o?_.C0.ESC+"[18;"+(o+1)+"~":_.C0.ESC+"[18~";break;case 119:i.key=o?_.C0.ESC+"[19;"+(o+1)+"~":_.C0.ESC+"[19~";break;case 120:i.key=o?_.C0.ESC+"[20;"+(o+1)+"~":_.C0.ESC+"[20~";break;case 121:i.key=o?_.C0.ESC+"[21;"+(o+1)+"~":_.C0.ESC+"[21~";break;case 122:i.key=o?_.C0.ESC+"[23;"+(o+1)+"~":_.C0.ESC+"[23~";break;case 123:i.key=o?_.C0.ESC+"[24;"+(o+1)+"~":_.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(u&&!p||!h.altKey||h.metaKey)u&&!h.altKey&&!h.ctrlKey&&h.metaKey?h.keyCode===65&&(i.type=1):h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?i.key=h.key:h.key&&h.ctrlKey&&h.key==="_"&&(i.key=_.C0.US);else{var a=y[h.keyCode],t=a&&a[h.shiftKey?1:0];if(t)i.key=_.C0.ESC+t;else if(h.keyCode>=65&&h.keyCode<=90){var s=h.ctrlKey?h.keyCode-64:h.keyCode+32;i.key=_.C0.ESC+String.fromCharCode(s)}}else h.keyCode>=65&&h.keyCode<=90?i.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?i.key=_.C0.NUL:h.keyCode>=51&&h.keyCode<=55?i.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?i.key=_.C0.DEL:h.keyCode===219?i.key=_.C0.ESC:h.keyCode===220?i.key=_.C0.FS:h.keyCode===221&&(i.key=_.C0.GS)}return i}},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(r,c){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,E){l.__proto__=E}||function(l,E){for(var w in E)E.hasOwnProperty(w)&&(l[w]=E[w])})(r,c)},function(r,c){function l(){this.constructor=r}_(r,c),r.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}),h=this&&this.__decorate||function(r,c,l,E){var w,S=arguments.length,v=S<3?c:E===null?E=Object.getOwnPropertyDescriptor(c,l):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,c,l,E);else for(var x=r.length-1;x>=0;x--)(w=r[x])&&(v=(S<3?w(v):S>3?w(c,l,v):w(c,l))||v);return S>3&&v&&Object.defineProperty(c,l,v),v},f=this&&this.__param||function(r,c){return function(l,E){c(l,E,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;var u=C(31),p=C(0),i=C(2),o=C(32),a=C(7),t=C(1),s=C(5),e=function(r){function c(l,E,w,S,v,x){var m=r.call(this)||this;if(m._renderer=l,m._rowCount=E,m._isPaused=!1,m._needsFullRefresh=!1,m._isNextRenderRedrawOnly=!0,m._needsSelectionRefresh=!1,m._canvasWidth=0,m._canvasHeight=0,m._selectionState={start:void 0,end:void 0,columnSelectMode:!1},m._onDimensionsChange=new p.EventEmitter,m._onRender=new p.EventEmitter,m._onRefreshRequest=new p.EventEmitter,m.register({dispose:function(){return m._renderer.dispose()}}),m._renderDebouncer=new u.RenderDebouncer(function(g,b){return m._renderRows(g,b)}),m.register(m._renderDebouncer),m._screenDprMonitor=new o.ScreenDprMonitor,m._screenDprMonitor.setListener(function(){return m.onDevicePixelRatioChange()}),m.register(m._screenDprMonitor),m.register(x.onResize(function(g){return m._fullRefresh()})),m.register(S.onOptionChange(function(){return m._renderer.onOptionsChanged()})),m.register(v.onCharSizeChange(function(){return m.onCharSizeChanged()})),m._renderer.onRequestRedraw(function(g){return m.refreshRows(g.start,g.end,!0)}),m.register(a.addDisposableDomListener(window,"resize",function(){return m.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var d=new IntersectionObserver(function(g){return m._onIntersectionChange(g[g.length-1])},{threshold:0});d.observe(w),m.register({dispose:function(){return d.disconnect()}})}return m}return y(c,r),Object.defineProperty(c.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),c.prototype._onIntersectionChange=function(l){this._isPaused=l.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},c.prototype.refreshRows=function(l,E,w){w===void 0&&(w=!1),this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,E,this._rowCount))},c.prototype._renderRows=function(l,E){this._renderer.renderRows(l,E),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:l,end:E}),this._isNextRenderRedrawOnly=!0},c.prototype.resize=function(l,E){this._rowCount=E,this._fireOnCanvasResize()},c.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},c.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},c.prototype.dispose=function(){r.prototype.dispose.call(this)},c.prototype.setRenderer=function(l){var E=this;this._renderer.dispose(),this._renderer=l,this._renderer.onRequestRedraw(function(w){return E.refreshRows(w.start,w.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},c.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},c.prototype.setColors=function(l){this._renderer.setColors(l),this._fullRefresh()},c.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},c.prototype.onResize=function(l,E){this._renderer.onResize(l,E),this._fullRefresh()},c.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},c.prototype.onBlur=function(){this._renderer.onBlur()},c.prototype.onFocus=function(){this._renderer.onFocus()},c.prototype.onSelectionChanged=function(l,E,w){this._selectionState.start=l,this._selectionState.end=E,this._selectionState.columnSelectMode=w,this._renderer.onSelectionChanged(l,E,w)},c.prototype.onCursorMove=function(){this._renderer.onCursorMove()},c.prototype.clear=function(){this._renderer.clear()},c.prototype.registerCharacterJoiner=function(l){return this._renderer.registerCharacterJoiner(l)},c.prototype.deregisterCharacterJoiner=function(l){return this._renderer.deregisterCharacterJoiner(l)},c=h([f(3,t.IOptionsService),f(4,s.ICharSizeService),f(5,t.IBufferService)],c)}(i.Disposable);n.RenderService=e},function(B,n,C){"use strict";var _=this&&this.__decorate||function(i,o,a,t){var s,e=arguments.length,r=e<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,a,t);else for(var c=i.length-1;c>=0;c--)(s=i[c])&&(r=(e<3?s(r):e>3?s(o,a,r):s(o,a))||r);return e>3&&r&&Object.defineProperty(o,a,r),r},y=this&&this.__param||function(i,o){return function(a,t){o(a,t,i)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;var h=C(1),f=C(0),u=function(){function i(o,a,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new f.EventEmitter,this._measureStrategy=new p(o,a,this._optionsService)}return Object.defineProperty(i.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),i.prototype.measure=function(){var o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())},i=_([y(2,h.IOptionsService)],i)}();n.CharSizeService=u;var p=function(){function i(o,a,t){this._document=o,this._parentElement=a,this._optionsService=t,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return i.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var o=this._measureElement.getBoundingClientRect();return o.width!==0&&o.height!==0&&(this._result.width=o.width,this._result.height=Math.ceil(o.height)),this._result},i}()},function(B,n,C){"use strict";var _=this&&this.__decorate||function(p,i,o,a){var t,s=arguments.length,e=s<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,a);else for(var r=p.length-1;r>=0;r--)(t=p[r])&&(e=(s<3?t(e):s>3?t(i,o,e):t(i,o))||e);return s>3&&e&&Object.defineProperty(i,o,e),e},y=this&&this.__param||function(p,i){return function(o,a){i(o,a,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;var h=C(5),f=C(30),u=function(){function p(i,o){this._renderService=i,this._charSizeService=o}return p.prototype.getCoords=function(i,o,a,t,s){return f.getCoords(i,o,a,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,s)},p.prototype.getRawByteCoords=function(i,o,a,t){var s=this.getCoords(i,o,a,t);return f.getRawByteCoords(s)},p=_([y(0,h.IRenderService),y(1,h.ICharSizeService)],p)}();n.MouseService=u},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),h=this&&this.__decorate||function(t,s,e,r){var c,l=arguments.length,E=l<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(s,e,E):c(s,e))||E);return l>3&&E&&Object.defineProperty(s,e,E),E},f=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier2=void 0;var u=C(1),p=C(0),i=C(2),o=C(7),a=function(t){function s(e){var r=t.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new p.EventEmitter),r._onHideLinkUnderline=r.register(new p.EventEmitter),r.register(i.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return y(s,t),Object.defineProperty(s.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),s.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var c=r._linkProviders.indexOf(e);c!==-1&&r._linkProviders.splice(c,1)}}},s.prototype.attachToDom=function(e,r,c){var l=this;this._element=e,this._mouseService=r,this._renderService=c,this.register(o.addDisposableDomListener(this._element,"mouseleave",function(){l._isMouseOut=!0,l._clearCurrentLink()})),this.register(o.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(o.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},s.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var c=e.composedPath(),l=0;l<c.length;l++){var E=c[l];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},s.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},s.prototype._askForLink=function(e,r){var c=this;this._activeProviderReplies&&r||(this._activeProviderReplies=new Map,this._activeLine=e.y);var l=!1;this._linkProviders.forEach(function(E,w){var S;r?!((S=c._activeProviderReplies)===null||S===void 0)&&S.get(w)&&(l=c._checkLinkProviderResult(w,e,l)):E.provideLinks(e.y,function(v){var x,m;if(!c._isMouseOut){var d=v==null?void 0:v.map(function(g){return{link:g}});(x=c._activeProviderReplies)===null||x===void 0||x.set(w,d),l=c._checkLinkProviderResult(w,e,l),((m=c._activeProviderReplies)===null||m===void 0?void 0:m.size)===c._linkProviders.length&&c._removeIntersectingLinks(e.y,c._activeProviderReplies)}})})},s.prototype._removeIntersectingLinks=function(e,r){for(var c=new Set,l=0;l<r.size;l++){var E=r.get(l);if(E)for(var w=0;w<E.length;w++)for(var S=E[w],v=S.link.range.start.y<e?0:S.link.range.start.x,x=S.link.range.end.y>e?this._bufferService.cols:S.link.range.end.x,m=v;m<=x;m++){if(c.has(m)){E.splice(w--,1);break}c.add(m)}}},s.prototype._checkLinkProviderResult=function(e,r,c){var l,E=this;if(!this._activeProviderReplies)return c;for(var w=this._activeProviderReplies.get(e),S=!1,v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(S=!0);if(!S&&w){var x=w.find(function(d){return E._linkAtPosition(d.link,r)});x&&(c=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviders.length&&!c)for(v=0;v<this._activeProviderReplies.size;v++){var m=(l=this._activeProviderReplies.get(v))===null||l===void 0?void 0:l.find(function(d){return E._linkAtPosition(d.link,r)});if(m){c=!0,this._handleNewLink(m);break}}return c},s.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},s.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,i.disposeArray(this._linkCacheDisposables))},s.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(e.link,c)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var l,E;return(E=(l=r._currentLink)===null||l===void 0?void 0:l.state)===null||E===void 0?void 0:E.decorations.pointerCursor},set:function(l){var E,w;!((E=r._currentLink)===null||E===void 0)&&E.state&&r._currentLink.state.decorations.pointerCursor!==l&&(r._currentLink.state.decorations.pointerCursor=l,r._currentLink.state.isHovered&&((w=r._element)===null||w===void 0||w.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:function(){var l,E;return(E=(l=r._currentLink)===null||l===void 0?void 0:l.state)===null||E===void 0?void 0:E.decorations.underline},set:function(l){var E,w,S;!((E=r._currentLink)===null||E===void 0)&&E.state&&((S=(w=r._currentLink)===null||w===void 0?void 0:w.state)===null||S===void 0?void 0:S.decorations.underline)!==l&&(r._currentLink.state.decorations.underline=l,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(l){var E=l.start===0?0:l.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(E,l.end+1+r._bufferService.buffer.ydisp)})))}},s.prototype._linkHover=function(e,r,c){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(c,r.text)},s.prototype._fireUnderlineEvent=function(e,r){var c=e.range,l=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-l-1,c.end.x,c.end.y-l-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)},s.prototype._linkLeave=function(e,r,c){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(c,r.text)},s.prototype._linkAtPosition=function(e,r){var c=e.range.start.y===e.range.end.y,l=e.range.start.y<r.y,E=e.range.end.y>r.y;return(c&&e.range.start.x<=r.x&&e.range.end.x>=r.x||l&&e.range.end.x>=r.x||E&&e.range.start.x<=r.x||l&&E)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},s.prototype._positionFromMouseEvent=function(e,r,c){var l=c.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}},s.prototype._createLinkUnderlineEvent=function(e,r,c,l,E){return{x1:e,y1:r,x2:c,y2:l,cols:this._bufferService.cols,fg:E}},s=h([f(0,u.IBufferService)],s)}(i.Disposable);n.Linkifier2=a},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;var _=function(){function y(h){this._textarea=h}return Object.defineProperty(y.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),y}();n.CoreBrowserService=_},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(v,x){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,d){m.__proto__=d}||function(m,d){for(var g in d)d.hasOwnProperty(g)&&(m[g]=d[g])})(v,x)},function(v,x){function m(){this.constructor=v}_(v,x),v.prototype=x===null?Object.create(x):(m.prototype=x.prototype,new m)});Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;var h=C(2),f=C(1),u=C(66),p=C(67),i=C(68),o=C(74),a=C(75),t=C(0),s=C(76),e=C(77),r=C(78),c=C(80),l=C(81),E=C(19),w=C(82),S=function(v){function x(m){var d=v.call(this)||this;return d._onBinary=new t.EventEmitter,d._onData=new t.EventEmitter,d._onLineFeed=new t.EventEmitter,d._onResize=new t.EventEmitter,d._onScroll=new t.EventEmitter,d._instantiationService=new u.InstantiationService,d.optionsService=new o.OptionsService(m),d._instantiationService.setService(f.IOptionsService,d.optionsService),d._bufferService=d.register(d._instantiationService.createInstance(i.BufferService)),d._instantiationService.setService(f.IBufferService,d._bufferService),d._logService=d._instantiationService.createInstance(p.LogService),d._instantiationService.setService(f.ILogService,d._logService),d._coreService=d.register(d._instantiationService.createInstance(a.CoreService,function(){return d.scrollToBottom()})),d._instantiationService.setService(f.ICoreService,d._coreService),d._coreMouseService=d._instantiationService.createInstance(s.CoreMouseService),d._instantiationService.setService(f.ICoreMouseService,d._coreMouseService),d._dirtyRowService=d._instantiationService.createInstance(e.DirtyRowService),d._instantiationService.setService(f.IDirtyRowService,d._dirtyRowService),d.unicodeService=d._instantiationService.createInstance(r.UnicodeService),d._instantiationService.setService(f.IUnicodeService,d.unicodeService),d._charsetService=d._instantiationService.createInstance(c.CharsetService),d._instantiationService.setService(f.ICharsetService,d._charsetService),d._inputHandler=new E.InputHandler(d._bufferService,d._charsetService,d._coreService,d._dirtyRowService,d._logService,d.optionsService,d._coreMouseService,d.unicodeService),d.register(t.forwardEvent(d._inputHandler.onLineFeed,d._onLineFeed)),d.register(d._inputHandler),d.register(t.forwardEvent(d._bufferService.onResize,d._onResize)),d.register(t.forwardEvent(d._coreService.onData,d._onData)),d.register(t.forwardEvent(d._coreService.onBinary,d._onBinary)),d.register(d.optionsService.onOptionChange(function(g){return d._updateOptions(g)})),d._writeBuffer=new w.WriteBuffer(function(g){return d._inputHandler.parse(g)}),d}return y(x,v),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){var m;this._isDisposed||(v.prototype.dispose.call(this),(m=this._windowsMode)===null||m===void 0||m.dispose(),this._windowsMode=void 0)},x.prototype.write=function(m,d){this._writeBuffer.write(m,d)},x.prototype.writeSync=function(m){this._writeBuffer.writeSync(m)},x.prototype.resize=function(m,d){isNaN(m)||isNaN(d)||(m=Math.max(m,i.MINIMUM_COLS),d=Math.max(d,i.MINIMUM_ROWS),this._bufferService.resize(m,d))},x.prototype.scroll=function(m,d){d===void 0&&(d=!1);var g,b=this._bufferService.buffer;(g=this._cachedBlankLine)&&g.length===this.cols&&g.getFg(0)===m.fg&&g.getBg(0)===m.bg||(g=b.getBlankLine(m,d),this._cachedBlankLine=g),g.isWrapped=d;var O=b.ybase+b.scrollTop,L=b.ybase+b.scrollBottom;if(b.scrollTop===0){var k=b.lines.isFull;L===b.lines.length-1?k?b.lines.recycle().copyFrom(g):b.lines.push(g.clone()):b.lines.splice(L+1,0,g.clone()),k?this._bufferService.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this._bufferService.isUserScrolling||b.ydisp++)}else{var I=L-O+1;b.lines.shiftElements(O+1,I-1,-1),b.lines.set(L,g.clone())}this._bufferService.isUserScrolling||(b.ydisp=b.ybase),this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom),this._onScroll.fire(b.ydisp)},x.prototype.scrollLines=function(m,d){var g=this._bufferService.buffer;if(m<0){if(g.ydisp===0)return;this._bufferService.isUserScrolling=!0}else m+g.ydisp>=g.ybase&&(this._bufferService.isUserScrolling=!1);var b=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+m,g.ybase),0),b!==g.ydisp&&(d||this._onScroll.fire(g.ydisp))},x.prototype.scrollPages=function(m){this.scrollLines(m*(this.rows-1))},x.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},x.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},x.prototype.scrollToLine=function(m){var d=m-this._bufferService.buffer.ydisp;d!==0&&this.scrollLines(d)},x.prototype.addEscHandler=function(m,d){return this._inputHandler.addEscHandler(m,d)},x.prototype.addDcsHandler=function(m,d){return this._inputHandler.addDcsHandler(m,d)},x.prototype.addCsiHandler=function(m,d){return this._inputHandler.addCsiHandler(m,d)},x.prototype.addOscHandler=function(m,d){return this._inputHandler.addOscHandler(m,d)},x.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},x.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},x.prototype._updateOptions=function(m){var d;switch(m){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((d=this._windowsMode)===null||d===void 0||d.dispose(),this._windowsMode=void 0)}},x.prototype._enableWindowsMode=function(){var m=this;if(!this._windowsMode){var d=[];d.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),d.push(this.addCsiHandler({final:"H"},function(){return l.updateWindowsModeWrappedState(m._bufferService),!1})),this._windowsMode={dispose:function(){for(var g=0,b=d;g<b.length;g++)b[g].dispose()}}}},x}(h.Disposable);n.CoreTerminal=S},function(B,n,C){"use strict";var _=this&&this.__spreadArrays||function(){for(var p=0,i=0,o=arguments.length;i<o;i++)p+=arguments[i].length;var a=Array(p),t=0;for(i=0;i<o;i++)for(var s=arguments[i],e=0,r=s.length;e<r;e++,t++)a[t]=s[e];return a};Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;var y=C(1),h=C(14),f=function(){function p(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];this._entries=new Map;for(var a=0,t=i;a<t.length;a++){var s=t[a],e=s[0],r=s[1];this.set(e,r)}}return p.prototype.set=function(i,o){var a=this._entries.get(i);return this._entries.set(i,o),a},p.prototype.forEach=function(i){this._entries.forEach(function(o,a){return i(a,o)})},p.prototype.has=function(i){return this._entries.has(i)},p.prototype.get=function(i){return this._entries.get(i)},p}();n.ServiceCollection=f;var u=function(){function p(){this._services=new f,this._services.set(y.IInstantiationService,this)}return p.prototype.setService=function(i,o){this._services.set(i,o)},p.prototype.getService=function(i){return this._services.get(i)},p.prototype.createInstance=function(i){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];for(var t=h.getServiceDependencies(i).sort(function(w,S){return w.index-S.index}),s=[],e=0,r=t;e<r.length;e++){var c=r[e],l=this._services.get(c.id);if(!l)throw new Error("[createInstance] "+i.name+" depends on UNKNOWN service "+c.id+".");s.push(l)}var E=t.length>0?t[0].index:o.length;if(o.length!==E)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(E+1)+" conflicts with "+o.length+" static arguments");return new(i.bind.apply(i,_([void 0],_(o,s))))},p}();n.InstantiationService=u},function(B,n,C){"use strict";var _=this&&this.__decorate||function(o,a,t,s){var e,r=arguments.length,c=r<3?a:s===null?s=Object.getOwnPropertyDescriptor(a,t):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,t,s);else for(var l=o.length-1;l>=0;l--)(e=o[l])&&(c=(r<3?e(c):r>3?e(a,t,c):e(a,t))||c);return r>3&&c&&Object.defineProperty(a,t,c),c},y=this&&this.__param||function(o,a){return function(t,s){a(t,s,o)}},h=this&&this.__spreadArrays||function(){for(var o=0,a=0,t=arguments.length;a<t;a++)o+=arguments[a].length;var s=Array(o),e=0;for(a=0;a<t;a++)for(var r=arguments[a],c=0,l=r.length;c<l;c++,e++)s[e]=r[c];return s};Object.defineProperty(n,"__esModule",{value:!0}),n.LogService=n.LogLevel=void 0;var f,u=C(1);(function(o){o[o.DEBUG=0]="DEBUG",o[o.INFO=1]="INFO",o[o.WARN=2]="WARN",o[o.ERROR=3]="ERROR",o[o.OFF=4]="OFF"})(f=n.LogLevel||(n.LogLevel={}));var p={debug:f.DEBUG,info:f.INFO,warn:f.WARN,error:f.ERROR,off:f.OFF},i=function(){function o(a){var t=this;this._optionsService=a,this._updateLogLevel(),this._optionsService.onOptionChange(function(s){s==="logLevel"&&t._updateLogLevel()})}return o.prototype._updateLogLevel=function(){this._logLevel=p[this._optionsService.options.logLevel]},o.prototype._evalLazyOptionalParams=function(a){for(var t=0;t<a.length;t++)typeof a[t]=="function"&&(a[t]=a[t]())},o.prototype._log=function(a,t,s){this._evalLazyOptionalParams(s),a.call.apply(a,h([console,"xterm.js: "+t],s))},o.prototype.debug=function(a){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=f.DEBUG&&this._log(console.log,a,t)},o.prototype.info=function(a){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=f.INFO&&this._log(console.info,a,t)},o.prototype.warn=function(a){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=f.WARN&&this._log(console.warn,a,t)},o.prototype.error=function(a){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=f.ERROR&&this._log(console.error,a,t)},o=_([y(0,u.IOptionsService)],o)}();n.LogService=i},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),h=this&&this.__decorate||function(t,s,e,r){var c,l=arguments.length,E=l<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(s,e,E):c(s,e))||E);return l>3&&E&&Object.defineProperty(s,e,E),E},f=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;var u=C(1),p=C(69),i=C(0),o=C(2);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;var a=function(t){function s(e){var r=t.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new i.EventEmitter,r.cols=Math.max(e.options.cols,n.MINIMUM_COLS),r.rows=Math.max(e.options.rows,n.MINIMUM_ROWS),r.buffers=new p.BufferSet(e,r),r}return y(s,t),Object.defineProperty(s.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),s.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},s.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},s.prototype.reset=function(){this.buffers.dispose(),this.buffers=new p.BufferSet(this._optionsService,this),this.isUserScrolling=!1},s=h([f(0,u.IOptionsService)],s)}(o.Disposable);n.BufferService=a},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(p,i){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var t in a)a.hasOwnProperty(t)&&(o[t]=a[t])})(p,i)},function(p,i){function o(){this.constructor=p}_(p,i),p.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)});Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;var h=C(70),f=C(0),u=function(p){function i(o,a){var t=p.call(this)||this;return t._onBufferActivate=t.register(new f.EventEmitter),t._normal=new h.Buffer(!0,o,a),t._normal.fillViewportRows(),t._alt=new h.Buffer(!1,o,a),t._activeBuffer=t._normal,t.setupTabStops(),t}return y(i,p),Object.defineProperty(i.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),i.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},i.prototype.activateAltBuffer=function(o){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(o),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}))},i.prototype.resize=function(o,a){this._normal.resize(o,a),this._alt.resize(o,a)},i.prototype.setupTabStops=function(o){this._normal.setupTabStops(o),this._alt.setupTabStops(o)},i}(C(2).Disposable);n.BufferSet=u},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BufferStringIterator=n.Buffer=n.MAX_BUFFER_SIZE=void 0;var _=C(71),y=C(16),h=C(4),f=C(3),u=C(72),p=C(73),i=C(20),o=C(6);n.MAX_BUFFER_SIZE=4294967295;var a=function(){function s(e,r,c){this._hasScrollback=e,this._optionsService=r,this._bufferService=c,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=i.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,f.WHITESPACE_CELL_CHAR,f.WHITESPACE_CELL_WIDTH,f.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return s.prototype.getNullCell=function(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 o.ExtendedAttrs),this._nullCell},s.prototype.getWhitespaceCell=function(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 o.ExtendedAttrs),this._whitespaceCell},s.prototype.getBlankLine=function(e,r){return new y.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(s.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),s.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:r},s.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=y.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},s.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},s.prototype.resize=function(e,r){var c=this.getNullCell(y.DEFAULT_ATTR_DATA),l=this._getCorrectBufferLength(r);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<e)for(var E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,c);var w=0;if(this._rows<r)for(var S=this._rows;S<r;S++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new y.BufferLine(e,c)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(e,c)));else for(S=this._rows;S>r;S--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){var v=this.lines.length-l;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=l}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,c);this._cols=e,this._rows=r},Object.defineProperty(s.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),s.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},s.prototype._reflowLarger=function(e,r){var c=u.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(c.length>0){var l=u.reflowLargerCreateNewLayout(this.lines,c);u.reflowLargerApplyNewLayout(this.lines,l.layout),this._reflowLargerAdjustViewport(e,r,l.countRemoved)}},s.prototype._reflowLargerAdjustViewport=function(e,r,c){for(var l=this.getNullCell(y.DEFAULT_ATTR_DATA),E=c;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new y.BufferLine(e,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-c,0)},s.prototype._reflowSmaller=function(e,r){for(var c=this.getNullCell(y.DEFAULT_ATTR_DATA),l=[],E=0,w=this.lines.length-1;w>=0;w--){var S=this.lines.get(w);if(!(!S||!S.isWrapped&&S.getTrimmedLength()<=e)){for(var v=[S];S.isWrapped&&w>0;)S=this.lines.get(--w),v.unshift(S);var x=this.ybase+this.y;if(!(x>=w&&x<w+v.length)){var m=v[v.length-1].getTrimmedLength(),d=u.reflowSmallerGetNewLineLengths(v,this._cols,e),g=d.length-v.length,b=void 0;b=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+g):Math.max(0,this.lines.length-this.lines.maxLength+g);for(var O=[],L=0;L<g;L++){var k=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);O.push(k)}O.length>0&&(l.push({start:w+v.length+E,newLines:O}),E+=O.length),v.push.apply(v,O);var I=d.length-1,N=d[I];N===0&&(N=d[--I]);for(var M=v.length-g-1,j=m;M>=0;){var A=Math.min(j,N);if(v[I].copyCellsFrom(v[M],j-A,N-A,A,!0),(N-=A)===0&&(N=d[--I]),(j-=A)===0){M--;var D=Math.max(M,0);j=u.getWrappedLineTrimmedLength(v,D,this._cols)}}for(L=0;L<v.length;L++)d[L]<e&&v[L].setCell(d[L],c);for(var R=g-b;R-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+g,this.ybase+r-1)}}}if(l.length>0){var P=[],T=[];for(L=0;L<this.lines.length;L++)T.push(this.lines.get(L));var F=this.lines.length,U=F-1,z=0,$=l[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);var q=0;for(L=Math.min(this.lines.maxLength-1,F+E-1);L>=0;L--)if($&&$.start>U+q){for(var H=$.newLines.length-1;H>=0;H--)this.lines.set(L--,$.newLines[H]);L++,P.push({index:U+1,amount:$.newLines.length}),q+=$.newLines.length,$=l[++z]}else this.lines.set(L,T[U--]);var W=0;for(L=P.length-1;L>=0;L--)P[L].index+=W,this.lines.onInsertEmitter.fire(P[L]),W+=P[L].amount;var Z=Math.max(0,F+E-this.lines.maxLength);Z>0&&this.lines.onTrimEmitter.fire(Z)}},s.prototype.stringIndexToBufferIndex=function(e,r,c){for(c===void 0&&(c=!1);r;){var l=this.lines.get(e);if(!l)return[-1,-1];for(var E=c?l.getTrimmedLength():l.length,w=0;w<E;++w)if(l.get(w)[f.CHAR_DATA_WIDTH_INDEX]&&(r-=l.get(w)[f.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,w];e++}return[e,0]},s.prototype.translateBufferLineToString=function(e,r,c,l){c===void 0&&(c=0);var E=this.lines.get(e);return E?E.translateToString(r,c,l):""},s.prototype.getWrappedRangeForLine=function(e){for(var r=e,c=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;c+1<this.lines.length&&this.lines.get(c+1).isWrapped;)c++;return{first:r,last:c}},s.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},s.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},s.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},s.prototype.addMarker=function(e){var r=this,c=new p.Marker(e);return this.markers.push(c),c.register(this.lines.onTrim(function(l){c.line-=l,c.line<0&&c.dispose()})),c.register(this.lines.onInsert(function(l){c.line>=l.index&&(c.line+=l.amount)})),c.register(this.lines.onDelete(function(l){c.line>=l.index&&c.line<l.index+l.amount&&c.dispose(),c.line>l.index&&(c.line-=l.amount)})),c.register(c.onDispose(function(){return r._removeMarker(c)})),c},s.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},s.prototype.iterator=function(e,r,c,l,E){return new t(this,e,r,c,l,E)},s}();n.Buffer=a;var t=function(){function s(e,r,c,l,E,w){c===void 0&&(c=0),l===void 0&&(l=e.lines.length),E===void 0&&(E=0),w===void 0&&(w=0),this._buffer=e,this._trimRight=r,this._startIndex=c,this._endIndex=l,this._startOverscan=E,this._endOverscan=w,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return s.prototype.hasNext=function(){return this._current<this._endIndex},s.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var r="",c=e.first;c<=e.last;++c)r+=this._buffer.translateBufferLineToString(c,this._trimRight);return this._current=e.last+1,{range:e,content:r}},s}();n.BufferStringIterator=t},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;var _=C(0),y=function(){function h(f){this._maxLength=f,this.onDeleteEmitter=new _.EventEmitter,this.onInsertEmitter=new _.EventEmitter,this.onTrimEmitter=new _.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(h.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"maxLength",{get:function(){return this._maxLength},set:function(f){if(this._maxLength!==f){for(var u=new Array(f),p=0;p<Math.min(f,this.length);p++)u[p]=this._array[this._getCyclicIndex(p)];this._array=u,this._maxLength=f,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._length},set:function(f){if(f>this._length)for(var u=this._length;u<f;u++)this._array[u]=void 0;this._length=f},enumerable:!1,configurable:!0}),h.prototype.get=function(f){return this._array[this._getCyclicIndex(f)]},h.prototype.set=function(f,u){this._array[this._getCyclicIndex(f)]=u},h.prototype.push=function(f){this._array[this._getCyclicIndex(this._length)]=f,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},h.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(h.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),h.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},h.prototype.splice=function(f,u){for(var p=[],i=2;i<arguments.length;i++)p[i-2]=arguments[i];if(u){for(var o=f;o<this._length-u;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+u)];this._length-=u}for(o=this._length-1;o>=f;o--)this._array[this._getCyclicIndex(o+p.length)]=this._array[this._getCyclicIndex(o)];for(o=0;o<p.length;o++)this._array[this._getCyclicIndex(f+o)]=p[o];if(this._length+p.length>this._maxLength){var a=this._length+p.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=p.length},h.prototype.trimStart=function(f){f>this._length&&(f=this._length),this._startIndex+=f,this._length-=f,this.onTrimEmitter.fire(f)},h.prototype.shiftElements=function(f,u,p){if(!(u<=0)){if(f<0||f>=this._length)throw new Error("start argument out of range");if(f+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(var i=u-1;i>=0;i--)this.set(f+i+p,this.get(f+i));var o=f+u+p-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<u;i++)this.set(f+i+p,this.get(f+i))}},h.prototype._getCyclicIndex=function(f){return(this._startIndex+f)%this._maxLength},h}();n.CircularList=y},function(B,n,C){"use strict";function _(y,h,f){if(h===y.length-1)return y[h].getTrimmedLength();var u=!y[h].hasContent(f-1)&&y[h].getWidth(f-1)===1,p=y[h+1].getWidth(0)===2;return u&&p?f-1:f}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(y,h,f,u,p){for(var i=[],o=0;o<y.length-1;o++){var a=o,t=y.get(++a);if(t.isWrapped){for(var s=[y.get(o)];a<y.length&&t.isWrapped;)s.push(t),t=y.get(++a);if(u>=o&&u<a)o+=s.length-1;else{for(var e=0,r=_(s,e,h),c=1,l=0;c<s.length;){var E=_(s,c,h),w=E-l,S=f-r,v=Math.min(w,S);s[e].copyCellsFrom(s[c],l,r,v,!1),(r+=v)===f&&(e++,r=0),(l+=v)===E&&(c++,l=0),r===0&&e!==0&&s[e-1].getWidth(f-1)===2&&(s[e].copyCellsFrom(s[e-1],f-1,r++,1,!1),s[e-1].setCell(f-1,p))}s[e].replaceCells(r,f,p);for(var x=0,m=s.length-1;m>0&&(m>e||s[m].getTrimmedLength()===0);m--)x++;x>0&&(i.push(o+s.length-x),i.push(x)),o+=s.length-1}}}return i},n.reflowLargerCreateNewLayout=function(y,h){for(var f=[],u=0,p=h[u],i=0,o=0;o<y.length;o++)if(p===o){var a=h[++u];y.onDeleteEmitter.fire({index:o-i,amount:a}),o+=a-1,i+=a,p=h[++u]}else f.push(o);return{layout:f,countRemoved:i}},n.reflowLargerApplyNewLayout=function(y,h){for(var f=[],u=0;u<h.length;u++)f.push(y.get(h[u]));for(u=0;u<f.length;u++)y.set(u,f[u]);y.length=h.length},n.reflowSmallerGetNewLineLengths=function(y,h,f){for(var u=[],p=y.map(function(r,c){return _(y,c,h)}).reduce(function(r,c){return r+c}),i=0,o=0,a=0;a<p;){if(p-a<f){u.push(p-a);break}i+=f;var t=_(y,o,h);i>t&&(i-=t,o++);var s=y[o].getWidth(i-1)===2;s&&i--;var e=s?f-1:f;u.push(e),a+=e}return u},n.getWrappedLineTrimmedLength=_},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(u,p){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])})(u,p)},function(u,p){function i(){this.constructor=u}_(u,p),u.prototype=p===null?Object.create(p):(i.prototype=p.prototype,new i)});Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;var h=C(0),f=function(u){function p(i){var o=u.call(this)||this;return o.line=i,o._id=p._nextId++,o.isDisposed=!1,o._onDispose=new h.EventEmitter,o}return y(p,u),Object.defineProperty(p.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},p._nextId=1,p}(C(2).Disposable);n.Marker=f},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=n.DEFAULT_BELL_SOUND=void 0;var _=C(0),y=C(11),h=C(33);n.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",n.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:n.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:y.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var f=["cols","rows"],u=function(){function p(i){this._onOptionChange=new _.EventEmitter,this.options=h.clone(n.DEFAULT_OPTIONS);for(var o=0,a=Object.keys(i);o<a.length;o++){var t=a[o];if(t in this.options){var s=i[t];this.options[t]=s}}}return Object.defineProperty(p.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),p.prototype.setOption=function(i,o){if(!(i in n.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');if(f.indexOf(i)!==-1)throw new Error('Option "'+i+'" can only be set in the constructor');this.options[i]!==o&&(o=this._sanitizeAndValidateOption(i,o),this.options[i]!==o&&(this.options[i]=o,this._onOptionChange.fire(i)))},p.prototype._sanitizeAndValidateOption=function(i,o){switch(i){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":o||(o=n.DEFAULT_OPTIONS[i]);break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(i+" cannot be less than 1, value: "+o);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(i+" cannot be less than 0, value: "+o);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(i+" cannot be less than or equal to 0, value: "+o)}return o},p.prototype.getOption=function(i){if(!(i in n.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');return this.options[i]},p}();n.OptionsService=u},function(B,n,C){"use strict";var _,y=this&&this.__extends||(_=function(e,r){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var E in l)l.hasOwnProperty(E)&&(c[E]=l[E])})(e,r)},function(e,r){function c(){this.constructor=e}_(e,r),e.prototype=r===null?Object.create(r):(c.prototype=r.prototype,new c)}),h=this&&this.__decorate||function(e,r,c,l){var E,w=arguments.length,S=w<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(e,r,c,l);else for(var v=e.length-1;v>=0;v--)(E=e[v])&&(S=(w<3?E(S):w>3?E(r,c,S):E(r,c))||S);return w>3&&S&&Object.defineProperty(r,c,S),S},f=this&&this.__param||function(e,r){return function(c,l){r(c,l,e)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;var u=C(1),p=C(0),i=C(33),o=C(2),a=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),s=function(e){function r(c,l,E,w){var S=e.call(this)||this;return S._bufferService=l,S._logService=E,S._optionsService=w,S.isCursorInitialized=!1,S.isCursorHidden=!1,S._onData=S.register(new p.EventEmitter),S._onUserInput=S.register(new p.EventEmitter),S._onBinary=S.register(new p.EventEmitter),S._scrollToBottom=c,S.register({dispose:function(){return S._scrollToBottom=void 0}}),S.modes=i.clone(a),S.decPrivateModes=i.clone(t),S}return y(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=i.clone(a),this.decPrivateModes=i.clone(t)},r.prototype.triggerDataEvent=function(c,l){if(l===void 0&&(l=!1),!this._optionsService.options.disableStdin){var E=this._bufferService.buffer;E.ybase!==E.ydisp&&this._scrollToBottom(),l&&this._onUserInput.fire(),this._logService.debug('sending data "'+c+'"',function(){return c.split("").map(function(w){return w.charCodeAt(0)})}),this._onData.fire(c)}},r.prototype.triggerBinaryEvent=function(c){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+c+'"',function(){return c.split("").map(function(l){return l.charCodeAt(0)})}),this._onBinary.fire(c))},r=h([f(1,u.IBufferService),f(2,u.ILogService),f(3,u.IOptionsService)],r)}(o.Disposable);n.CoreService=s},function(B,n,C){"use strict";var _=this&&this.__decorate||function(t,s,e,r){var c,l=arguments.length,E=l<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(s,e,E):c(s,e))||E);return l>3&&E&&Object.defineProperty(s,e,E),E},y=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;var h=C(1),f=C(0),u={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return t.action!==32}},DRAG:{events:23,restrict:function(t){return t.action!==32||t.button!==3}},ANY:{events:31,restrict:function(t){return!0}}};function p(t,s){var e=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(e|=64,e|=t.action):(e|=3&t.button,4&t.button&&(e|=64),8&t.button&&(e|=128),t.action===32?e|=32:t.action!==0||s||(e|=3)),e}var i=String.fromCharCode,o={DEFAULT:function(t){var s=[p(t,!1)+32,t.col+32,t.row+32];return s[0]>255||s[1]>255||s[2]>255?"":"\x1B[M"+i(s[0])+i(s[1])+i(s[2])},SGR:function(t){var s=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+p(t,!0)+";"+t.col+";"+t.row+s}},a=function(){function t(s,e){this._bufferService=s,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new f.EventEmitter,this._lastEvent=null;for(var r=0,c=Object.keys(u);r<c.length;r++){var l=c[r];this.addProtocol(l,u[l])}for(var E=0,w=Object.keys(o);E<w.length;E++){var S=w[E];this.addEncoding(S,o[S])}this.reset()}return t.prototype.addProtocol=function(s,e){this._protocols[s]=e},t.prototype.addEncoding=function(s,e){this._encodings[s]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(s){if(!this._protocols[s])throw new Error('unknown protocol "'+s+'"');this._activeProtocol=s,this._onProtocolChange.fire(this._protocols[s].events)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(s){if(!this._encodings[s])throw new Error('unknown encoding "'+s+'"');this._activeEncoding=s},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(t.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),t.prototype.triggerMouseEvent=function(s){if(s.col<0||s.col>=this._bufferService.cols||s.row<0||s.row>=this._bufferService.rows||s.button===4&&s.action===32||s.button===3&&s.action!==32||s.button!==4&&(s.action===2||s.action===3)||(s.col++,s.row++,s.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,s))||!this._protocols[this._activeProtocol].restrict(s))return!1;var e=this._encodings[this._activeEncoding](s);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=s,!0},t.prototype.explainEvents=function(s){return{down:!!(1&s),up:!!(2&s),drag:!!(4&s),move:!!(8&s),wheel:!!(16&s)}},t.prototype._compareEvents=function(s,e){return s.col===e.col&&s.row===e.row&&s.button===e.button&&s.action===e.action&&s.ctrl===e.ctrl&&s.alt===e.alt&&s.shift===e.shift},t=_([y(0,h.IBufferService),y(1,h.ICoreService)],t)}();n.CoreMouseService=a},function(B,n,C){"use strict";var _=this&&this.__decorate||function(u,p,i,o){var a,t=arguments.length,s=t<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(u,p,i,o);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(s=(t<3?a(s):t>3?a(p,i,s):a(p,i))||s);return t>3&&s&&Object.defineProperty(p,i,s),s},y=this&&this.__param||function(u,p){return function(i,o){p(i,o,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DirtyRowService=void 0;var h=C(1),f=function(){function u(p){this._bufferService=p,this.clearRange()}return Object.defineProperty(u.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),u.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},u.prototype.markDirty=function(p){p<this._start?this._start=p:p>this._end&&(this._end=p)},u.prototype.markRangeDirty=function(p,i){if(p>i){var o=p;p=i,i=o}p<this._start&&(this._start=p),i>this._end&&(this._end=i)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=_([y(0,h.IBufferService)],u)}();n.DirtyRowService=f},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;var _=C(0),y=C(79),h=function(){function f(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter;var u=new y.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}return Object.defineProperty(f.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._active},set:function(u){if(!this._providers[u])throw new Error('unknown Unicode version "'+u+'"');this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)},enumerable:!1,configurable:!0}),f.prototype.register=function(u){this._providers[u.version]=u},f.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},f.prototype.getStringCellWidth=function(u){for(var p=0,i=u.length,o=0;o<i;++o){var a=u.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=i)return p+this.wcwidth(a);var t=u.charCodeAt(o);56320<=t&&t<=57343?a=1024*(a-55296)+t-56320+65536:p+=this.wcwidth(t)}p+=this.wcwidth(a)}return p},f}();n.UnicodeService=h},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;var _,y=C(15),h=[[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]],f=[[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]],u=function(){function p(){if(this.version="6",!_){_=new Uint8Array(65536),y.fill(_,1),_[0]=0,y.fill(_,0,1,32),y.fill(_,0,127,160),y.fill(_,2,4352,4448),_[9001]=2,_[9002]=2,y.fill(_,2,11904,42192),_[12351]=1,y.fill(_,2,44032,55204),y.fill(_,2,63744,64256),y.fill(_,2,65040,65050),y.fill(_,2,65072,65136),y.fill(_,2,65280,65377),y.fill(_,2,65504,65511);for(var i=0;i<h.length;++i)y.fill(_,0,h[i][0],h[i][1]+1)}}return p.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?_[i]:function(o,a){var t,s=0,e=a.length-1;if(o<a[0][0]||o>a[e][1])return!1;for(;e>=s;)if(o>a[t=s+e>>1][1])s=t+1;else{if(!(o<a[t][0]))return!0;e=t-1}return!1}(i,f)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},p}();n.UnicodeV6=u},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0;var _=function(){function y(){this.glevel=0,this._charsets=[]}return y.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},y.prototype.setgLevel=function(h){this.glevel=h,this.charset=this._charsets[h]},y.prototype.setgCharset=function(h,f){this._charsets[h]=f,this.glevel===h&&(this.charset=f)},y}();n.CharsetService=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;var _=C(3);n.updateWindowsModeWrappedState=function(y){var h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),f=h==null?void 0:h.get(y.cols-1),u=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);u&&f&&(u.isWrapped=f[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&f[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;var _=function(){function y(h){this._action=h,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return y.prototype.writeSync=function(h){if(this._writeBuffer.length){for(var f=this._bufferOffset;f<this._writeBuffer.length;++f){var u=this._writeBuffer[f],p=this._callbacks[f];this._action(u),p&&p()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(h)},y.prototype.write=function(h,f){var u=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return u._innerWrite()})),this._pendingData+=h.length,this._writeBuffer.push(h),this._callbacks.push(f)},y.prototype._innerWrite=function(){for(var h=this,f=Date.now();this._writeBuffer.length>this._bufferOffset;){var u=this._writeBuffer[this._bufferOffset],p=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(u),this._pendingData-=u.length,p&&p(),Date.now()-f>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return h._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},y}();n.WriteBuffer=_},function(B,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0;var _=function(){function y(){this._addons=[]}return y.prototype.dispose=function(){for(var h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()},y.prototype.loadAddon=function(h,f){var u=this,p={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(p),f.dispose=function(){return u._wrappedAddonDispose(p)},f.activate(h)},y.prototype._wrappedAddonDispose=function(h){if(!h.isDisposed){for(var f=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===h){f=u;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(f,1)}},y}();n.AddonManager=_}])})}}]);
|