|
|
(self.webpackChunk=self.webpackChunk||[]).push([[9716],{42922:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),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"},f=y,h=o(74643),u=function(s,a){return d.createElement(h.Z,(0,C.Z)({},s,{ref:a,icon:f}))},_=d.forwardRef(u)},63237:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),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"},f=y,h=o(74643),u=function(s,a){return d.createElement(h.Z,(0,C.Z)({},s,{ref:a,icon:f}))},_=d.forwardRef(u)},99569:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),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"},f=y,h=o(74643),u=function(s,a){return d.createElement(h.Z,(0,C.Z)({},s,{ref:a,icon:f}))},_=d.forwardRef(u)},72395:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),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"},f=y,h=o(74643),u=function(s,a){return d.createElement(h.Z,(0,C.Z)({},s,{ref:a,icon:f}))},_=d.forwardRef(u)},53978:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(87462),d=o(67294),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"},f=y,h=o(74643),u=function(s,a){return d.createElement(h.Z,(0,C.Z)({},s,{ref:a,icon:f}))},_=d.forwardRef(u)},77969:function(le,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"}},7621:function(le,B,o){"use strict";o.d(B,{Z:function(){return f}});var C=o(35973),d={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},y=o(67294),f=({message:h,className:u,children:_,style:i={}})=>y.createElement("div",{className:`custom-spinner ${d.idsRingWrapper} ${u}`},y.createElement("div",{className:d.ldsRing},y.createElement("div",null),y.createElement("div",null),y.createElement("div",null),y.createElement("div",null)),h?y.createElement("p",{style:i},h):null,_,y.createElement(C.Outlet,null))},38658:function(le,B,o){"use strict";o.d(B,{Z:function(){return _}});var C=o(67294),d={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=o(94184),f=o.n(y),h=o(35973),_=({className:i,style:s={},leftNode:a,leftTitle:t,rightNode:n,rightTitle:e})=>{const r=(0,h.useIntl)();return C.createElement("div",{className:f()(d.result,i),style:s},C.createElement("div",{className:d.left},C.createElement("div",{className:d.title},C.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),C.createElement("span",null,t||r.formatMessage({id:"shixuns.selfTestInput",defaultMessage:"\u81EA\u6D4B\u8F93\u5165"}))),C.createElement("div",{className:d.leftNode},a)),C.createElement("div",{className:d.right},C.createElement("div",{className:d.title},C.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),C.createElement("span",null,e||r.formatMessage({id:"shixuns.executionResults",defaultMessage:"\u8FD0\u884C\u7ED3\u679C"}))),C.createElement("div",{className:d.rightNode},n)))}},57560:function(le,B,o){"use strict";o.r(B),o.d(B,{default:function(){return e}});var C=o(67294),d=o(77969),y=o(11320),f=o(35973),h=o(57953),u=o(33227),_=o(72971),i=o(36295),s=o(19575),a=o(27484),t=o.n(a),n=(r,c,l)=>new Promise((E,w)=>{var S=g=>{try{x(l.next(g))}catch(p){w(p)}},v=g=>{try{x(l.throw(g))}catch(p){w(p)}},x=g=>g.done?E(g.value):Promise.resolve(g.value).then(S,v);x((l=l.apply(r,c)).next())}),e=()=>{const r=(0,f.useIntl)(),{submitId:c,id:l}=(0,f.useParams)(),[E,w]=(0,C.useState)(void 0);console.log((0,f.useLocation)(),33);const S=(0,f.useLocation)();function v(){var W;f.history.push(`/problems/${l}/oj/${(W=S==null?void 0:S.query)==null?void 0:W.backId}?tab=1`)}(0,C.useEffect)(()=>((0,f.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,f.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,f.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,f.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,C.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,C.useEffect)(()=>{c&&function(){return n(this,null,function*(){const q=yield(0,u.X6)(c);w(q.data)})}()},[c]);const{status:x,created_at:g,code:p,name:m,language:b,pass_sets_count:O,set_count:R,error_msg:k,output:I,input:N,expected_output:P,execute_memory:F,user:A,execute_time:D,input_file_url:L,output_file_url:M,is_file:T,expected_output_file_url:j}=E||{};return C.createElement(h.Z,{spinning:!E,delay:500},C.createElement("div",{className:"record-detail-info"},E?C.createElement(C.Fragment,null,C.createElement("header",{className:d.Z.header},C.createElement("div",null,C.createElement("img",{src:`${y.Z.IMG_SERVER}/images/${A.image_url}`,alt:"user",width:30}),C.createElement("span",null,A.name)),C.createElement("h2",null," ",m," "),C.createElement("button",{className:"ant-btn",onClick:v,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),C.createElement("div",{className:"record-detail-body"},C.createElement("h2",null," ",r.formatMessage({id:"shixuns.submissionRecords",defaultMessage:"\u63D0\u4EA4\u8BB0\u5F55"})),C.createElement("ul",{className:"record-info"},C.createElement("li",null," \u72B6\u6001\uFF1A",C.createElement("span",{className:x===0?"c-green":"c-red"},_.Im[x])," "),C.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",C.createElement("span",null,t()(g).format("YYYY-MM-DD HH:mm:ss"))," "),C.createElement("li",null," ",r.formatMessage({id:"classrooms.language",defaultMessage:"\u8BED\u8A00"}),"\uFF1A",C.createElement("span",null,b)," "),C.createElement("li",null," ",r.formatMessage({id:"classrooms.executionTime",defaultMessage:"\u6267\u884C\u7528\u65F6"}),"\uFF1A",C.createElement("span",null,D*1e3,"ms")," "),C.createElement("li",null," ",`${O} / ${R} {intl.formatMessage({ id: 'classrooms.passedTestCases', defaultMessage: '\u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B' })}`," ")),(0,_.gZ)({status:x,error_msg:k,execute_time:D,output:I,input:N,expected_output:P,input_file_url:L,output_file_url:M,is_file:T,expected_output_file_url:j}),C.createElement("h2",null," ",r.formatMessage({id:"classrooms.submittedContent",defaultMessage:"\u63D0\u4EA4\u7684\u5185\u5BB9"})," "),C.createElement(i.ZP,{height:"200px",width:"100%",language:b==null?void 0:b.toLocaleLowerCase(),value:s.Base64.decode(p),options:{readOnly:!0}}))):null))}},72971:function(le,B,o){"use strict";o.d(B,{Im:function(){return k},ZP:function(){return D},gZ:function(){return F}});var C=o(67294),d=o(69677),y=o(71577),f=o(42922),h=o(53978),u=o(94189),_=o(19575),i=o(7621),s=o(85725),a=o(28706),t=o(38658),n=o(12320),e=o(94184),r=o.n(e),c=o(35973),l=o(67294),E=Object.defineProperty,w=Object.defineProperties,S=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,p=(L,M,T)=>M in L?E(L,M,{enumerable:!0,configurable:!0,writable:!0,value:T}):L[M]=T,m=(L,M)=>{for(var T in M||(M={}))x.call(M,T)&&p(L,T,M[T]);if(v)for(var T of v(M))g.call(M,T)&&p(L,T,M[T]);return L},b=(L,M)=>w(L,S(M));const{TextArea:O}=d.default,R={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=(L=>(L[L.SET_VISIBLE=0]="SET_VISIBLE",L[L.SET_TABINDEX=1]="SET_TABINDEX",L))(I||{});function N(L,M){switch(M.type){case 0:return b(m({},L),{visible:M.payload});case 1:return b(m({},L),{tabIndex:M.payload});default:throw new Error}}function P({value:L,className:M}){const T=(0,c.useIntl)(),[j,W]=(0,C.useState)(!1),q=(0,C.useRef)(),Z=(0,C.useRef)();return(0,C.useEffect)(()=>{j&&(Z.current.reset(),Z.current.write((0,a.pp)(L||"")))},[L,j]),(0,C.useEffect)(()=>{var G,H,z,X;if(q.current){Z.current=new n.Terminal({fontSize:14,disableStdin:!0}),Z.current.open(q.current);const ce=q.current.offsetWidth-14,U=((X=(z=(H=(G=Z.current)==null?void 0:G._core)==null?void 0:H._renderService)==null?void 0:z.dimensions)==null?void 0:X.actualCellWidth)||9.5,V=Math.ceil(ce/U);Z.current.resize(V,8),W(!0)}},[]),l.createElement("div",{ref:q,className:r()("XtermText-valueRef",M)})}function F(L){const M=(0,c.useIntl)(),{status:T,error_msg:j,output:W,input:q,expected_output:Z,is_file:G,input_file_url:H,output_file_url:z,expected_output_file_url:X}=L;let ce=null;const U={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(T){case u.h.NOMATCH:ce=l.createElement(l.Fragment,null,l.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!G&&l.createElement(P,{className:"mb10",value:q}),G&&l.createElement("div",{style:U},l.createElement("a",{onClick:()=>(0,a.LR)(H,q)},q)),l.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!G&&l.createElement(P,{className:"mb10",value:W&&_.Base64.decode(W)||""}),G&&l.createElement("div",{style:U},l.createElement("a",{onClick:()=>(0,a.LR)(z,W)},W)),l.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!G&&l.createElement(P,{className:"mb10",value:Z&&_.Base64.decode(Z)||""}),G&&l.createElement("div",{style:U},l.createElement("a",{onClick:()=>(0,a.LR)(X,Z)},Z)));break;case u.h.EXECUTEFAILURE:ce=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!G&&l.createElement(s.Z,{value:q,style:U}),G&&l.createElement("div",{style:U},l.createElement("a",{onClick:()=>(0,a.LR)(H,q)},q)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},_.Base64.decode(j)));break;case u.h.COMPILEFAILURE:ce=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!G&&l.createElement(s.Z,{value:q,style:U}),G&&l.createElement("div",{style:U},l.createElement("a",{onClick:()=>(0,a.LR)(H,q)},q)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},_.Base64.decode(j)));break;case u.h.PODFAILURE:ce=l.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case u.h.TIMEOUT:ce=l.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.createElement(l.Fragment,null," ",ce," ")}function A(L){const M=(0,c.useIntl)(),{status:T,error_msg:j,execute_time:W,output:q,input:Z,expected_output:G,is_file:H,input_file_url:z,output_file_url:X,expected_output_file_url:ce}=L;let U=null;switch(T){case u.h.OK:U=l.createElement(l.Fragment,null,l.createElement("p",null,M.formatMessage({id:"classrooms.executionTime",defaultMessage:"\u6267\u884C\u7528\u65F6"}),"\uFF1A",W,"\u79D2"),l.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.createElement("pre",null,_.Base64.decode(q)));break;case u.h.NOMATCH:U=l.createElement(l.Fragment,null,l.createElement("p",null,M.formatMessage({id:"shixuns.input",defaultMessage:"\u8F93\u5165"}),"\uFF1A",l.createElement("pre",null,Z)),l.createElement("p",null,M.formatMessage({id:"questionBankAddQuestion.output",defaultMessage:"\u8F93\u51FA"}),"\uFF1A",q&&_.Base64.decode(q)),l.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",G&&_.Base64.decode(G)));break;case u.h.EXECUTEFAILURE:U=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.createElement("pre",null,Z)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},_.Base64.decode(j)));break;case u.h.COMPILEFAILURE:U=l.createElement(l.Fragment,null,l.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.createElement("pre",null,Z)),l.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.createElement("pre",{className:"error"},_.Base64.decode(j)));break;case u.h.PODFAILURE:U=l.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case u.h.TIMEOUT:U=l.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.createElement(l.Fragment,null," ",U," ")}var D=({id:L,is_file:M,input:T,debuging:j,submitting:W,executingMessage:q,debugResult:Z,onChangeInput:G,onDebugCode:H,onSubmitCode:z})=>{const X=(0,c.useIntl)(),[ce,U]=(0,C.useReducer)(N,R),{visible:V,tabIndex:K}=ce;(0,C.useEffect)(()=>{U({type:0,payload:!1})},[L]);function $(Y){let se=Y.target.id;U({type:1,payload:se})}function Q(){U({type:0,payload:!V})}const te=(0,C.useMemo)(()=>{if(Z){const{status:Y}=Z;return l.createElement(l.Fragment,null,A(Z))}return null},[Z]);function J(){U({type:0,payload:!0}),U({type:1,payload:"1"}),H()}return l.createElement("div",{className:"test-case-panel"},l.createElement("div",{className:`test-case-panel-body ${V?"active":""}`},l.createElement("ul",{className:"s-navs"},l.createElement("li",null,l.createElement("a",{className:"active"},X.formatMessage({id:"problemset.debugResult",defaultMessage:"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"})))),l.createElement(t.Z,{leftTitle:X.formatMessage({id:"questionBankAddQuestion.customTestCase",defaultMessage:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"}),rightTitle:X.formatMessage({id:"questionBankAddQuestion.codeExecutionResult",defaultMessage:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"}),style:{height:240},leftNode:l.createElement(O,{placeholder:X.formatMessage({id:"classrooms.pleaseEnterSelfTestCase",defaultMessage:"\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:M?"":T,onChange:G}),rightNode:j?l.createElement(i.Z,{message:X.formatMessage({id:"shixuns.codeExecuting",defaultMessage:"\u4EE3\u7801\u6267\u884C\u4E2D"})+"..."}):Z?te: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 ${V?"up":""}`,onClick:Q},V?l.createElement(f.Z,null):l.createElement(h.Z,null)),l.createElement("footer",{className:"footer"},l.createElement("span",{style:{visibility:"hidden"}},X.formatMessage({id:"problemset.console",defaultMessage:"\u63A7\u5236\u53F0"})),l.createElement("div",{className:"flex-container"},l.createElement(y.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},X.formatMessage({id:"testPaperBank.previousQuestion",defaultMessage:"\u4E0A\u4E00\u9898"})),l.createElement(y.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},X.formatMessage({id:"testPaperBank.nextQuestion",defaultMessage:"\u4E0B\u4E00\u9898"})),l.createElement(y.ZP,{className:"btn-green",type:"ghost",loading:j,onClick:J},X.formatMessage({id:"questionBankAddQuestion.debugCode",defaultMessage:"\u8C03\u8BD5\u4EE3\u7801"})),l.createElement(y.ZP,{type:"primary",className:"custom-ant-disabled",loading:W,disabled:W,onClick:()=>{U({type:0,payload:!1}),z()}},X.formatMessage({id:"questionBankAddQuestion.evaluateAndSubmit",defaultMessage:"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"})))))}},94189:function(le,B,o){"use strict";o.d(B,{h:function(){return C}});var C=(d=>(d[d.NOMATCH=-1]="NOMATCH",d[d.OK=0]="OK",d[d.TIMEOUT=2]="TIMEOUT",d[d.PODFAILURE=3]="PODFAILURE",d[d.COMPILEFAILURE=4]="COMPILEFAILURE",d[d.EXECUTEFAILURE=5]="EXECUTEFAILURE",d[d.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",d))(C||{})},33227:function(le,B,o){"use strict";o.d(B,{H7:function(){return s},KC:function(){return r},M3:function(){return w},MK:function(){return i},MU:function(){return f},Rg:function(){return x},WH:function(){return c},X6:function(){return u},bM:function(){return y},bx:function(){return l},dd:function(){return n},de:function(){return p},fi:function(){return a},fu:function(){return d},gu:function(){return E},n4:function(){return t},qe:function(){return v},rL:function(){return g},rX:function(){return _},uc:function(){return m},vl:function(){return e},wO:function(){return S},zO:function(){return h}});var C=o(33170);function d(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 f(b,O){return(0,C.v_)(`mypractices/${b}/code_debug.json`,O)}function h(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 _(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 s(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 n(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 g(b,O){return(0,C.v_)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}/hide`)}function p(b,O){return(0,C.IV)(`practices/${b}/question_solution_articles/${O==null?void 0:O.active}`,O)}function m(b,O){return(0,C.v_)(`mypractices/${b}/update_practice_time_sum`,O)}},9708:function(le,B,o){"use strict";o.d(B,{F:function(){return h},Z:function(){return f}});var C=o(94184),d=o.n(C);const y=null;function f(u,_,i){return d()({[`${u}-status-success`]:_==="success",[`${u}-status-warning`]:_==="warning",[`${u}-status-error`]:_==="error",[`${u}-status-validating`]:_==="validating",[`${u}-has-feedback`]:i})}const h=(u,_)=>_||u},82586:function(le,B,o){"use strict";o.d(B,{Z:function(){return S},n:function(){return E}});var C=o(16646),d=o(94184),y=o.n(d),f=o(67656),h=o(17799),u=o(67294),_=o(9708),i=o(53124),s=o(98866),a=o(98675),t=o(65223),n=o(4173),e=o(72922),r=o(47673);function c(v){return!!(v.prefix||v.suffix||v.allowClear)}var l=function(v,x){var g={};for(var p in v)Object.prototype.hasOwnProperty.call(v,p)&&x.indexOf(p)<0&&(g[p]=v[p]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,p=Object.getOwnPropertySymbols(v);m<p.length;m++)x.indexOf(p[m])<0&&Object.prototype.propertyIsEnumerable.call(v,p[m])&&(g[p[m]]=v[p[m]]);return g};function E(v,x){if(!v)return;v.focus(x);const{cursor:g}=x||{};if(g){const p=v.value.length;switch(g){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(p,p);break;default:v.setSelectionRange(0,p);break}}}var S=(0,u.forwardRef)((v,x)=>{var g;const{prefixCls:p,bordered:m=!0,status:b,size:O,disabled:R,onBlur:k,onFocus:I,suffix:N,allowClear:P,addonAfter:F,addonBefore:A,className:D,style:L,styles:M,rootClassName:T,onChange:j,classNames:W}=v,q=l(v,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Z,direction:G,input:H}=u.useContext(i.E_),z=Z("input",p),X=(0,u.useRef)(null),[ce,U]=(0,r.ZP)(z),{compactSize:V,compactItemClassnames:K}=(0,n.ri)(z,G),$=(0,a.Z)(ve=>{var ge;return(ge=O!=null?O:V)!==null&&ge!==void 0?ge:ve}),Q=u.useContext(s.Z),te=R!=null?R:Q,{status:J,hasFeedback:Y,feedbackIcon:se}=(0,u.useContext)(t.aM),re=(0,_.F)(J,b),ae=c(v)||!!Y,he=(0,u.useRef)(ae);(0,u.useEffect)(()=>{var ve;ae&&he.current,he.current=ae},[ae]);const ie=(0,e.Z)(X,!0),ee=ve=>{ie(),k==null||k(ve)},fe=ve=>{ie(),I==null||I(ve)},ue=ve=>{ie(),j==null||j(ve)},de=(Y||N)&&u.createElement(u.Fragment,null,N,Y&&se);let ye;return typeof P=="object"&&(P!=null&&P.clearIcon)?ye=P:P&&(ye={clearIcon:u.createElement(C.Z,null)}),ce(u.createElement(f.default,Object.assign({ref:(0,h.sQ)(x,X),prefixCls:z,autoComplete:H==null?void 0:H.autoComplete},q,{disabled:te,onBlur:ee,onFocus:fe,style:Object.assign(Object.assign({},H==null?void 0:H.style),L),styles:Object.assign(Object.assign({},H==null?void 0:H.styles),M),suffix:de,allowClear:ye,className:y()(D,T,K,H==null?void 0:H.className),onChange:ue,addonAfter:F&&u.createElement(n.BR,null,u.createElement(t.Ux,{override:!0,status:!0},F)),addonBefore:A&&u.createElement(n.BR,null,u.createElement(t.Ux,{override:!0,status:!0},A)),classNames:Object.assign(Object.assign(Object.assign({},W),H==null?void 0:H.classNames),{input:y()({[`${z}-sm`]:$==="small",[`${z}-lg`]:$==="large",[`${z}-rtl`]:G==="rtl",[`${z}-borderless`]:!m},!ae&&(0,_.Z)(z,re),W==null?void 0:W.input,(g=H==null?void 0:H.classNames)===null||g===void 0?void 0:g.input,U)}),classes:{affixWrapper:y()({[`${z}-affix-wrapper-sm`]:$==="small",[`${z}-affix-wrapper-lg`]:$==="large",[`${z}-affix-wrapper-rtl`]:G==="rtl",[`${z}-affix-wrapper-borderless`]:!m},(0,_.Z)(`${z}-affix-wrapper`,re,Y),U),wrapper:y()({[`${z}-group-rtl`]:G==="rtl"},U),group:y()({[`${z}-group-wrapper-sm`]:$==="small",[`${z}-group-wrapper-lg`]:$==="large",[`${z}-group-wrapper-rtl`]:G==="rtl",[`${z}-group-wrapper-disabled`]:te},(0,_.Z)(`${z}-group-wrapper`,re,Y),U)}})))})},96330:function(le,B,o){"use strict";var C=o(16646),d=o(94184),y=o.n(d),f=o(64701),h=o(67294),u=o(9708),_=o(53124),i=o(98866),s=o(98675),a=o(65223),t=o(82586),n=o(47673),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,h.forwardRef)((c,l)=>{const{prefixCls:E,bordered:w=!0,size:S,disabled:v,status:x,allowClear:g,showCount:p,classNames:m,rootClassName:b,className:O}=c,R=e(c,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:k,direction:I}=h.useContext(_.E_),N=(0,s.Z)(S),P=h.useContext(i.Z),F=v!=null?v:P,{status:A,hasFeedback:D,feedbackIcon:L}=h.useContext(a.aM),M=(0,u.F)(A,x),T=h.useRef(null);h.useImperativeHandle(l,()=>{var G;return{resizableTextArea:(G=T.current)===null||G===void 0?void 0:G.resizableTextArea,focus:H=>{var z,X;(0,t.n)((X=(z=T.current)===null||z===void 0?void 0:z.resizableTextArea)===null||X===void 0?void 0:X.textArea,H)},blur:()=>{var H;return(H=T.current)===null||H===void 0?void 0:H.blur()}}});const j=k("input",E);let W;typeof g=="object"&&(g!=null&&g.clearIcon)?W=g:g&&(W={clearIcon:h.createElement(C.Z,null)});const[q,Z]=(0,n.ZP)(j);return q(h.createElement(f.default,Object.assign({},R,{disabled:F,allowClear:W,className:y()(O,b),classes:{affixWrapper:y()(`${j}-textarea-affix-wrapper`,{[`${j}-affix-wrapper-rtl`]:I==="rtl",[`${j}-affix-wrapper-borderless`]:!w,[`${j}-affix-wrapper-sm`]:N==="small",[`${j}-affix-wrapper-lg`]:N==="large",[`${j}-textarea-show-count`]:p},(0,u.Z)(`${j}-affix-wrapper`,M),Z)},classNames:Object.assign(Object.assign({},m),{textarea:y()({[`${j}-borderless`]:!w,[`${j}-sm`]:N==="small",[`${j}-lg`]:N==="large"},(0,u.Z)(j,M),Z,m==null?void 0:m.textarea)}),prefixCls:j,suffix:D&&h.createElement("span",{className:`${j}-textarea-suffix`},L),showCount:p,ref:T})))});B.Z=r},72922:function(le,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(67294);function d(y,f){const h=(0,C.useRef)([]),u=()=>{h.current.push(setTimeout(()=>{var _,i,s,a;!((_=y.current)===null||_===void 0)&&_.input&&((i=y.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((s=y.current)===null||s===void 0)&&s.input.hasAttribute("value"))&&((a=y.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,C.useEffect)(()=>(f&&u(),()=>h.current.forEach(_=>{_&&clearTimeout(_)})),[]),u}},69677:function(le,B,o){"use strict";o.d(B,{default:function(){return N}});var C=o(94184),d=o.n(C),y=o(67294),f=o(53124),h=o(65223),u=o(47673),i=P=>{const{getPrefixCls:F,direction:A}=(0,y.useContext)(f.E_),{prefixCls:D,className:L}=P,M=F("input-group",D),T=F("input"),[j,W]=(0,u.ZP)(T),q=d()(M,{[`${M}-lg`]:P.size==="large",[`${M}-sm`]:P.size==="small",[`${M}-compact`]:P.compact,[`${M}-rtl`]:A==="rtl"},W,L),Z=(0,y.useContext)(h.aM),G=(0,y.useMemo)(()=>Object.assign(Object.assign({},Z),{isFormItemInput:!1}),[Z]);return j(y.createElement("span",{className:q,style:P.style,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onFocus:P.onFocus,onBlur:P.onBlur},y.createElement(h.aM.Provider,{value:G},P.children)))},s=o(82586),a=o(63237),t=o(99569),n=o(10366),e=o(17799),r=o(72922),c=function(P,F){var A={};for(var D in P)Object.prototype.hasOwnProperty.call(P,D)&&F.indexOf(D)<0&&(A[D]=P[D]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,D=Object.getOwnPropertySymbols(P);L<D.length;L++)F.indexOf(D[L])<0&&Object.prototype.propertyIsEnumerable.call(P,D[L])&&(A[D[L]]=P[D[L]]);return A};const l=P=>P?y.createElement(t.Z,null):y.createElement(a.Z,null),E={click:"onClick",hover:"onMouseOver"};var S=y.forwardRef((P,F)=>{const{visibilityToggle:A=!0}=P,D=typeof A=="object"&&A.visible!==void 0,[L,M]=(0,y.useState)(()=>D?A.visible:!1),T=(0,y.useRef)(null);y.useEffect(()=>{D&&M(A.visible)},[D,A]);const j=(0,r.Z)(T),W=()=>{const{disabled:te}=P;te||(L&&j(),M(J=>{var Y;const se=!J;return typeof A=="object"&&((Y=A.onVisibleChange)===null||Y===void 0||Y.call(A,se)),se}))},q=te=>{const{action:J="click",iconRender:Y=l}=P,se=E[J]||"",re=Y(L),ae={[se]:W,className:`${te}-icon`,key:"passwordIcon",onMouseDown:he=>{he.preventDefault()},onMouseUp:he=>{he.preventDefault()}};return y.cloneElement(y.isValidElement(re)?re:y.createElement("span",null,re),ae)},{className:Z,prefixCls:G,inputPrefixCls:H,size:z}=P,X=c(P,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:ce}=y.useContext(f.E_),U=ce("input",H),V=ce("input-password",G),K=A&&q(V),$=d()(V,Z,{[`${V}-${z}`]:!!z}),Q=Object.assign(Object.assign({},(0,n.Z)(X,["suffix","iconRender","visibilityToggle"])),{type:L?"text":"password",className:$,prefixCls:U,suffix:K});return z&&(Q.size=z),y.createElement(s.Z,Object.assign({ref:(0,e.sQ)(F,T)},Q))}),v=o(72395),x=o(96159),g=o(71577),p=o(98675),m=o(4173),b=function(P,F){var A={};for(var D in P)Object.prototype.hasOwnProperty.call(P,D)&&F.indexOf(D)<0&&(A[D]=P[D]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,D=Object.getOwnPropertySymbols(P);L<D.length;L++)F.indexOf(D[L])<0&&Object.prototype.propertyIsEnumerable.call(P,D[L])&&(A[D[L]]=P[D[L]]);return A},R=y.forwardRef((P,F)=>{const{prefixCls:A,inputPrefixCls:D,className:L,size:M,suffix:T,enterButton:j=!1,addonAfter:W,loading:q,disabled:Z,onSearch:G,onChange:H,onCompositionStart:z,onCompositionEnd:X}=P,ce=b(P,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:U,direction:V}=y.useContext(f.E_),K=y.useRef(!1),$=U("input-search",A),Q=U("input",D),{compactSize:te}=(0,m.ri)($,V),J=(0,p.Z)(ne=>{var pe;return(pe=M!=null?M:te)!==null&&pe!==void 0?pe:ne}),Y=y.useRef(null),se=ne=>{ne&&ne.target&&ne.type==="click"&&G&&G(ne.target.value,ne,{source:"clear"}),H&&H(ne)},re=ne=>{var pe;document.activeElement===((pe=Y.current)===null||pe===void 0?void 0:pe.input)&&ne.preventDefault()},ae=ne=>{var pe,me;G&&G((me=(pe=Y.current)===null||pe===void 0?void 0:pe.input)===null||me===void 0?void 0:me.value,ne,{source:"input"})},he=ne=>{K.current||q||ae(ne)},ie=typeof j=="boolean"?y.createElement(v.Z,null):null,ee=`${$}-button`;let fe;const ue=j||{},de=ue.type&&ue.type.__ANT_BUTTON===!0;de||ue.type==="button"?fe=(0,x.Tm)(ue,Object.assign({onMouseDown:re,onClick:ne=>{var pe,me;(me=(pe=ue==null?void 0:ue.props)===null||pe===void 0?void 0:pe.onClick)===null||me===void 0||me.call(pe,ne),ae(ne)},key:"enterButton"},de?{className:ee,size:J}:{})):fe=y.createElement(g.ZP,{className:ee,type:j?"primary":void 0,size:J,disabled:Z,key:"enterButton",onMouseDown:re,onClick:ae,loading:q,icon:ie},j),W&&(fe=[fe,(0,x.Tm)(W,{key:"addonAfter"})]);const ye=d()($,{[`${$}-rtl`]:V==="rtl",[`${$}-${J}`]:!!J,[`${$}-with-button`]:!!j},L),ve=ne=>{K.current=!0,z==null||z(ne)},ge=ne=>{K.current=!1,X==null||X(ne)};return y.createElement(s.Z,Object.assign({ref:(0,e.sQ)(Y,F),onPressEnter:he},ce,{size:J,onCompositionStart:ve,onCompositionEnd:ge,prefixCls:Q,addonAfter:fe,suffix:T,onChange:se,className:ye,disabled:Z}))}),k=o(96330);const I=s.Z;I.Group=i,I.Search=R,I.TextArea=k.Z,I.Password=S;var N=I},47673:function(le,B,o){"use strict";o.d(B,{M1:function(){return _},TM:function(){return x},Xy:function(){return i},bi:function(){return t},e5:function(){return v},ik:function(){return n},nz:function(){return h},pU:function(){return u},s7:function(){return e},x0:function(){return a}});var C=o(14747),d=o(80110),y=o(45503),f=o(67968);const h=g=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:g,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=g=>({borderColor:g.hoverBorderColor}),_=g=>({borderColor:g.activeBorderColor,boxShadow:g.activeShadow,outline:0}),i=g=>({color:g.colorTextDisabled,backgroundColor:g.colorBgContainerDisabled,borderColor:g.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,y.TS)(g,{hoverBorderColor:g.colorBorder})))}),s=g=>{const{paddingBlockLG:p,fontSizeLG:m,lineHeightLG:b,borderRadiusLG:O,paddingInlineLG:R}=g;return{padding:`${p}px ${R}px`,fontSize:m,lineHeight:b,borderRadius:O}},a=g=>({padding:`${g.paddingBlockSM}px ${g.paddingInlineSM}px`,borderRadius:g.borderRadiusSM}),t=(g,p)=>{const{componentCls:m,colorError:b,colorWarning:O,errorActiveShadow:R,warningActiveShadow:k,colorErrorBorderHover:I,colorWarningBorderHover:N}=g;return{[`&-status-error:not(${p}-disabled):not(${p}-borderless)${p}`]:{borderColor:b,"&:hover":{borderColor:I},"&:focus, &-focused":Object.assign({},_((0,y.TS)(g,{activeBorderColor:b,activeShadow:R}))),[`${m}-prefix, ${m}-suffix`]:{color:b}},[`&-status-warning:not(${p}-disabled):not(${p}-borderless)${p}`]:{borderColor:O,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},_((0,y.TS)(g,{activeBorderColor:O,activeShadow:k}))),[`${m}-prefix, ${m}-suffix`]:{color:O}}}},n=g=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${g.paddingBlock}px ${g.paddingInline}px`,color:g.colorText,fontSize:g.fontSize,lineHeight:g.lineHeight,backgroundColor:g.colorBgContainer,backgroundImage:"none",borderWidth:g.lineWidth,borderStyle:g.lineType,borderColor:g.colorBorder,borderRadius:g.borderRadius,transition:`all ${g.motionDurationMid}`},h(g.colorTextPlaceholder)),{"&:hover":Object.assign({},u(g)),"&:focus, &-focused":Object.assign({},_(g)),"&-disabled, &[disabled]":Object.assign({},i(g)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:g.controlHeight,lineHeight:g.lineHeight,verticalAlign:"bottom",transition:`all ${g.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},s(g)),"&-sm":Object.assign({},a(g)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=g=>{const{componentCls:p,antCls:m}=g;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:g.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${p}, &-lg > ${p}-group-addon`]:Object.assign({},s(g)),[`&-sm ${p}, &-sm > ${p}-group-addon`]:Object.assign({},a(g)),[`&-lg ${m}-select-single ${m}-select-selector`]:{height:g.controlHeightLG},[`&-sm ${m}-select-single ${m}-select-selector`]:{height:g.controlHeightSM},[`> ${p}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${p}-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 ${g.paddingInline}px`,color:g.colorText,fontWeight:"normal",fontSize:g.fontSize,textAlign:"center",backgroundColor:g.colorFillAlter,border:`${g.lineWidth}px ${g.lineType} ${g.colorBorder}`,borderRadius:g.borderRadius,transition:`all ${g.motionDurationSlow}`,lineHeight:1,[`${m}-select`]:{margin:`-${g.paddingBlock+1}px -${g.paddingInline}px`,[`&${m}-select-single:not(${m}-select-customize-input)`]:{[`${m}-select-selector`]:{backgroundColor:"inherit",border:`${g.lineWidth}px ${g.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${m}-select-selector`]:{color:g.colorPrimary}}},[`${m}-cascader-picker`]:{margin:`-9px -${g.paddingInline}px`,backgroundColor:"transparent",[`${m}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${p}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${p}-search-with-button &`]:{zIndex:0}}},[`> ${p}:first-child, ${p}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${m}-select ${m}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${p}-affix-wrapper`]:{[`&:not(:first-child) ${p}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${p}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${p}:last-child, ${p}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${m}-select ${m}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${p}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${p}-search &`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius}},[`&:not(:first-child), ${p}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${p}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,C.dF)()),{[`${p}-group-addon, ${p}-group-wrap, > ${p}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:g.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${p}-affix-wrapper,
|
|
|
& > ${p}-number-affix-wrapper,
|
|
|
& > ${m}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-g.lineWidth,borderInlineEndWidth:g.lineWidth},[`${p}`]:{float:"none"},[`& > ${m}-select > ${m}-select-selector,
|
|
|
& > ${m}-select-auto-complete ${p},
|
|
|
& > ${m}-cascader-picker ${p},
|
|
|
& > ${p}-group-wrapper ${p}`]:{borderInlineEndWidth:g.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${m}-select-focused`]:{zIndex:1},[`& > ${m}-select > ${m}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${m}-select:first-child > ${m}-select-selector,
|
|
|
& > ${m}-select-auto-complete:first-child ${p},
|
|
|
& > ${m}-cascader-picker:first-child ${p}`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius},[`& > *:last-child,
|
|
|
& > ${m}-select:last-child > ${m}-select-selector,
|
|
|
& > ${m}-cascader-picker:last-child ${p},
|
|
|
& > ${m}-cascader-picker-focused:last-child ${p}`]:{borderInlineEndWidth:g.lineWidth,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius},[`& > ${m}-select-auto-complete ${p}`]:{verticalAlign:"top"},[`${p}-group-wrapper + ${p}-group-wrapper`]:{marginInlineStart:-g.lineWidth,[`${p}-affix-wrapper`]:{borderRadius:0}},[`${p}-group-wrapper:not(:last-child)`]:{[`&${p}-search > ${p}-group`]:{[`& > ${p}-group-addon > ${p}-search-button`]:{borderRadius:0},[`& > ${p}`]:{borderStartStartRadius:g.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:g.borderRadius}}}})}},r=g=>{const{componentCls:p,controlHeightSM:m,lineWidth:b}=g,R=(m-b*2-16)/2;return{[p]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(g)),n(g)),t(g,p)),{'&[type="color"]':{height:g.controlHeight,[`&${p}-lg`]:{height:g.controlHeightLG},[`&${p}-sm`]:{height:m,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},c=g=>{const{componentCls:p}=g;return{[`${p}-clear-icon`]:{margin:0,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${g.motionDurationSlow}`,"&:hover":{color:g.colorTextTertiary},"&:active":{color:g.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${g.inputAffixPadding}px`}}}},l=g=>{const{componentCls:p,inputAffixPadding:m,colorTextDescription:b,motionDurationSlow:O,colorIcon:R,colorIconHover:k,iconCls:I}=g;return{[`${p}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n(g)),{display:"inline-flex",[`&:not(${p}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},u(g)),{zIndex:1,[`${p}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${p}[disabled]`]:{background:"transparent"}},[`> input${p}`]:{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"'},[`${p}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:g.paddingXS}},"&-show-count-suffix":{color:b},"&-show-count-has-suffix":{marginInlineEnd:g.paddingXXS},"&-prefix":{marginInlineEnd:m},"&-suffix":{marginInlineStart:m}}}),c(g)),{[`${I}${p}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${O}`,"&:hover":{color:k}}}),t(g,`${p}-affix-wrapper`))}},E=g=>{const{componentCls:p,colorError:m,colorWarning:b,borderRadiusLG:O,borderRadiusSM:R}=g;return{[`${p}-group`]:Object.assign(Object.assign(Object.assign({},(0,C.Wf)(g)),e(g)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${p}-group-addon`]:{borderRadius:O,fontSize:g.fontSizeLG}},"&-sm":{[`${p}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${p}-group-addon`]:{color:m,borderColor:m}},"&-status-warning":{[`${p}-group-addon`]:{color:b,borderColor:b}},"&-disabled":{[`${p}-group-addon`]:Object.assign({},i(g))},[`&:not(${p}-compact-first-item):not(${p}-compact-last-item)${p}-compact-item`]:{[`${p}, ${p}-group-addon`]:{borderRadius:0}},[`&:not(${p}-compact-last-item)${p}-compact-first-item`]:{[`${p}, ${p}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${p}-compact-first-item)${p}-compact-last-item`]:{[`${p}, ${p}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},w=g=>{const{componentCls:p,antCls:m}=g,b=`${p}-search`;return{[b]:{[`${p}`]:{"&:hover, &:focus":{borderColor:g.colorPrimaryHover,[`+ ${p}-group-addon ${b}-button:not(${m}-btn-primary)`]:{borderInlineStartColor:g.colorPrimaryHover}}},[`${p}-affix-wrapper`]:{borderRadius:0},[`${p}-lg`]:{lineHeight:g.lineHeightLG-2e-4},[`> ${p}-group`]:{[`> ${p}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${b}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${b}-button:not(${m}-btn-primary)`]:{color:g.colorTextDescription,"&:hover":{color:g.colorPrimaryHover},"&:active":{color:g.colorPrimaryActive},[`&${m}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${b}-button`]:{height:g.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${b}-button`]:{height:g.controlHeightLG},[`&-small ${b}-button`]:{height:g.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${p}-compact-item`]:{[`&:not(${p}-compact-last-item)`]:{[`${p}-group-addon`]:{[`${p}-search-button`]:{marginInlineEnd:-g.lineWidth,borderRadius:0}}},[`&:not(${p}-compact-first-item)`]:{[`${p},${p}-affix-wrapper`]:{borderRadius:0}},[`> ${p}-group-addon ${p}-search-button,
|
|
|
> ${p},
|
|
|
${p}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${p}-affix-wrapper-focused`]:{zIndex:2}}}}},S=g=>{const{componentCls:p,paddingLG:m}=g,b=`${p}-textarea`;return{[b]:{position:"relative","&-show-count":{[`> ${p}`]:{height:"100%"},[`${p}-data-count`]:{position:"absolute",bottom:-g.fontSize*g.lineHeight,insetInlineEnd:0,color:g.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${p}`]:{paddingInlineEnd:m}},[`&-affix-wrapper${b}-has-feedback`]:{[`${p}`]:{paddingInlineEnd:m}},[`&-affix-wrapper${p}-affix-wrapper`]:{padding:0,[`> textarea${p}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${p}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${p}-clear-icon`]:{position:"absolute",insetInlineEnd:g.paddingXS,insetBlockStart:g.paddingXS},[`${b}-suffix`]:{position:"absolute",top:0,insetInlineEnd:g.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function v(g){return(0,y.TS)(g,{inputAffixPadding:g.paddingXXS})}const x=g=>{const{controlHeight:p,fontSize:m,lineHeight:b,lineWidth:O,controlHeightSM:R,controlHeightLG:k,fontSizeLG:I,lineHeightLG:N,paddingSM:P,controlPaddingHorizontalSM:F,controlPaddingHorizontal:A,colorFillAlter:D,colorPrimaryHover:L,controlOutlineWidth:M,controlOutline:T,colorErrorOutline:j,colorWarningOutline:W}=g;return{paddingBlock:Math.max(Math.round((p-m*b)/2*10)/10-O,3),paddingBlockSM:Math.max(Math.round((R-m*b)/2*10)/10-O,0),paddingBlockLG:Math.ceil((k-I*N)/2*10)/10-O,paddingInline:P-O,paddingInlineSM:F-O,paddingInlineLG:A-O,addonBg:D,activeBorderColor:L,hoverBorderColor:L,activeShadow:`0 0 0 ${M}px ${T}`,errorActiveShadow:`0 0 0 ${M}px ${j}`,warningActiveShadow:`0 0 0 ${M}px ${W}`}};B.ZP=(0,f.Z)("Input",g=>{const p=(0,y.TS)(g,v(g));return[r(p),S(p),l(p),E(p),w(p),(0,d.c)(p)]},x)},64701:function(le,B,o){"use strict";o.r(B),o.d(B,{ResizableTextArea:function(){return q},default:function(){return ce}});var C=o(87462),d=o(1413),y=o(4942),f=o(71002),h=o(97685),u=o(45987),_=o(74902),i=o(94184),s=o.n(i),a=o(67656),t=o(87887),n=o(67294);function e(U){var V=n.useRef();V.current=U;var K=n.useCallback(function(){for(var $,Q=arguments.length,te=new Array(Q),J=0;J<Q;J++)te[J]=arguments[J];return($=V.current)===null||$===void 0?void 0:$.call.apply($,[V].concat(te))},[]);return K}function r(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var c=r()?n.useLayoutEffect:n.useEffect,l=c,E=function(V,K){var $=n.useRef(!0);c(function(){if(!$.current)return V()},K),c(function(){return $.current=!1,function(){$.current=!0}},[])};function w(U){var V=n.useRef(!1),K=n.useState(U),$=(0,h.Z)(K,2),Q=$[0],te=$[1];n.useEffect(function(){return V.current=!1,function(){V.current=!0}},[]);function J(Y,se){se&&V.current||te(Y)}return[Q,J]}function S(U){return U!==void 0}function v(U,V){var K=V||{},$=K.defaultValue,Q=K.value,te=K.onChange,J=K.postState,Y=w(function(){return S(Q)?Q:S($)?typeof $=="function"?$():$:typeof U=="function"?U():U}),se=(0,h.Z)(Y,2),re=se[0],ae=se[1],he=Q!==void 0?Q:re,ie=J?J(he):he,ee=e(te),fe=w([he]),ue=(0,h.Z)(fe,2),de=ue[0],ye=ue[1];E(function(){var ge=de[0];re!==ge&&ee(re,ge)},[de]),E(function(){S(Q)||ae(Q)},[Q]);var ve=e(function(ge,ne){ae(ge,ne),ye([he],ne)});return[ie,ve]}var x=o(48555),g=function(V){return+setTimeout(V,16)},p=function(V){return clearTimeout(V)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(g=function(V){return window.requestAnimationFrame(V)},p=function(V){return window.cancelAnimationFrame(V)});var m=0,b=new Map;function O(U){b.delete(U)}var R=function(V){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;m+=1;var $=m;function Q(te){if(te===0)O($),V();else{var J=g(function(){Q(te-1)});b.set($,J)}}return Q(K),$};R.cancel=function(U){var V=b.get(U);return O(V),p(V)};var k=R,I=`
|
|
|
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;
|
|
|
`,N=["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"],P={},F;function A(U){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K=U.getAttribute("id")||U.getAttribute("data-reactid")||U.getAttribute("name");if(V&&P[K])return P[K];var $=window.getComputedStyle(U),Q=$.getPropertyValue("box-sizing")||$.getPropertyValue("-moz-box-sizing")||$.getPropertyValue("-webkit-box-sizing"),te=parseFloat($.getPropertyValue("padding-bottom"))+parseFloat($.getPropertyValue("padding-top")),J=parseFloat($.getPropertyValue("border-bottom-width"))+parseFloat($.getPropertyValue("border-top-width")),Y=N.map(function(re){return"".concat(re,":").concat($.getPropertyValue(re))}).join(";"),se={sizingStyle:Y,paddingSize:te,borderSize:J,boxSizing:Q};return V&&K&&(P[K]=se),se}function D(U){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),U.getAttribute("wrap")?F.setAttribute("wrap",U.getAttribute("wrap")):F.removeAttribute("wrap");var Q=A(U,V),te=Q.paddingSize,J=Q.borderSize,Y=Q.boxSizing,se=Q.sizingStyle;F.setAttribute("style","".concat(se,";").concat(I)),F.value=U.value||U.placeholder||"";var re=void 0,ae=void 0,he,ie=F.scrollHeight;if(Y==="border-box"?ie+=J:Y==="content-box"&&(ie-=te),K!==null||$!==null){F.value=" ";var ee=F.scrollHeight-te;K!==null&&(re=ee*K,Y==="border-box"&&(re=re+te+J),ie=Math.max(re,ie)),$!==null&&(ae=ee*$,Y==="border-box"&&(ae=ae+te+J),he=ie>ae?"":"hidden",ie=Math.min(ae,ie))}var fe={height:ie,overflowY:he,resize:"none"};return re&&(fe.minHeight=re),ae&&(fe.maxHeight=ae),fe}var L=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],M=0,T=1,j=2,W=n.forwardRef(function(U,V){var K=U,$=K.prefixCls,Q=K.onPressEnter,te=K.defaultValue,J=K.value,Y=K.autoSize,se=K.onResize,re=K.className,ae=K.style,he=K.disabled,ie=K.onChange,ee=K.onInternalAutoSize,fe=(0,u.Z)(K,L),ue=v(te,{value:J,postState:function(be){return be!=null?be:""}}),de=(0,h.Z)(ue,2),ye=de[0],ve=de[1],ge=function(be){ve(be.target.value),ie==null||ie(be)},ne=n.useRef();n.useImperativeHandle(V,function(){return{textArea:ne.current}});var pe=n.useMemo(function(){return Y&&(0,f.Z)(Y)==="object"?[Y.minRows,Y.maxRows]:[]},[Y]),me=(0,h.Z)(pe,2),Ae=me[0],xe=me[1],De=!!Y,We=function(){try{if(document.activeElement===ne.current){var be=ne.current,Ze=be.selectionStart,$e=be.selectionEnd,Oe=be.scrollTop;ne.current.setSelectionRange(Ze,$e),ne.current.scrollTop=Oe}}catch(Ve){}},Re=n.useState(j),Le=(0,h.Z)(Re,2),Se=Le[0],Te=Le[1],Ne=n.useState(),ze=(0,h.Z)(Ne,2),Me=ze[0],qe=ze[1],Pe=function(){Te(M)};l(function(){De&&Pe()},[J,Ae,xe,De]),l(function(){if(Se===M)Te(T);else if(Se===T){var Ee=D(ne.current,!1,Ae,xe);Te(j),qe(Ee)}else We()},[Se]);var Ie=n.useRef(),ke=function(){k.cancel(Ie.current)},Be=function(be){Se===j&&(se==null||se(be),Y&&(ke(),Ie.current=k(function(){Pe()})))};n.useEffect(function(){return ke},[]);var He=De?Me:null,Fe=(0,d.Z)((0,d.Z)({},ae),He);return(Se===M||Se===T)&&(Fe.overflowY="hidden",Fe.overflowX="hidden"),n.createElement(x.Z,{onResize:Be,disabled:!(Y||se)},n.createElement("textarea",(0,C.Z)({},fe,{ref:ne,style:Fe,className:s()($,re,(0,y.Z)({},"".concat($,"-disabled"),he)),disabled:he,value:ye,onChange:ge})))}),q=W,Z=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function G(U,V){return(0,_.Z)(U||"").slice(0,V).join("")}function H(U,V,K,$){var Q=K;return U?Q=G(K,$):(0,_.Z)(V||"").length<K.length&&(0,_.Z)(K||"").length>$&&(Q=V),Q}var z=n.forwardRef(function(U,V){var K,$=U.defaultValue,Q=U.value,te=U.onFocus,J=U.onBlur,Y=U.onChange,se=U.allowClear,re=U.maxLength,ae=U.onCompositionStart,he=U.onCompositionEnd,ie=U.suffix,ee=U.prefixCls,fe=ee===void 0?"rc-textarea":ee,ue=U.classes,de=U.showCount,ye=U.className,ve=U.style,ge=U.disabled,ne=U.hidden,pe=U.classNames,me=U.styles,Ae=U.onResize,xe=(0,u.Z)(U,Z),De=v($,{value:Q,defaultValue:$}),We=(0,h.Z)(De,2),Re=We[0],Le=We[1],Se=(0,n.useRef)(null),Te=n.useState(!1),Ne=(0,h.Z)(Te,2),ze=Ne[0],Me=Ne[1],qe=n.useState(!1),Pe=(0,h.Z)(qe,2),Ie=Pe[0],ke=Pe[1],Be=n.useRef(),He=n.useRef(0),Fe=n.useState(null),Ee=(0,h.Z)(Fe,2),be=Ee[0],Ze=Ee[1],$e=function(){var oe;(oe=Se.current)===null||oe===void 0||oe.textArea.focus()};(0,n.useImperativeHandle)(V,function(){return{resizableTextArea:Se.current,focus:$e,blur:function(){var oe;(oe=Se.current)===null||oe===void 0||oe.textArea.blur()}}}),(0,n.useEffect)(function(){Me(function(Ce){return!ge&&Ce})},[ge]);var Oe=Number(re)>0,Ve=function(oe){ke(!0),Be.current=Re,He.current=oe.currentTarget.selectionStart,ae==null||ae(oe)},Xe=function(oe){ke(!1);var _e=oe.currentTarget.value;if(Oe){var we,ot=He.current>=re+1||He.current===((we=Be.current)===null||we===void 0?void 0:we.length);_e=H(ot,Be.current,_e,re)}_e!==Re&&(Le(_e),(0,t.rJ)(oe.currentTarget,oe,Y,_e)),he==null||he(oe)},Ye=function(oe){var _e=oe.target.value;if(!Ie&&Oe){var we=oe.target.selectionStart>=re+1||oe.target.selectionStart===_e.length||!oe.target.selectionStart;_e=H(we,Re,_e,re)}Le(_e),(0,t.rJ)(oe.currentTarget,oe,Y,_e)},Je=function(oe){var _e=xe.onPressEnter,we=xe.onKeyDown;oe.key==="Enter"&&_e&&_e(oe),we==null||we(oe)},Qe=function(oe){Me(!0),te==null||te(oe)},et=function(oe){Me(!1),J==null||J(oe)},tt=function(oe){var _e;Le(""),$e(),(0,t.rJ)((_e=Se.current)===null||_e===void 0?void 0:_e.textArea,oe,Y)},je=(0,t.D7)(Re);!Ie&&Oe&&Q==null&&(je=G(je,re));var Ke=ie,Ue;if(de){var Ge=(0,_.Z)(je).length;(0,f.Z)(de)==="object"?Ue=de.formatter({value:je,count:Ge,maxLength:re}):Ue="".concat(Ge).concat(Oe?" / ".concat(re):""),Ke=n.createElement(n.Fragment,null,Ke,n.createElement("span",{className:s()("".concat(fe,"-data-count"),pe==null?void 0:pe.count),style:me==null?void 0:me.count},Ue))}var rt=function(oe){var _e;Ae==null||Ae(oe),(_e=Se.current)!==null&&_e!==void 0&&_e.textArea.style.height&&Ze(!0)},it=!xe.autoSize&&!de&&!se,nt=n.createElement(a.BaseInput,{value:je,allowClear:se,handleReset:tt,suffix:Ke,prefixCls:fe,classes:{affixWrapper:s()(ue==null?void 0:ue.affixWrapper,(K={},(0,y.Z)(K,"".concat(fe,"-show-count"),de),(0,y.Z)(K,"".concat(fe,"-textarea-allow-clear"),se),K))},disabled:ge,focused:ze,className:ye,style:(0,d.Z)((0,d.Z)({},ve),be&&!it?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ue=="string"?Ue:void 0}},hidden:ne,inputElement:n.createElement(q,(0,C.Z)({},xe,{onKeyDown:Je,onChange:Ye,onFocus:Qe,onBlur:et,onCompositionStart:Ve,onCompositionEnd:Xe,className:pe==null?void 0:pe.textarea,style:(0,d.Z)((0,d.Z)({},me==null?void 0:me.textarea),{},{resize:ve==null?void 0:ve.resize}),disabled:ge,prefixCls:fe,onResize:rt,ref:Se}))});return nt}),X=z,ce=X},19575:function(le,B,o){var C,d;(function(y,f){le.exports=f(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof o.g!="undefined"?o.g:this,function(y){"use strict";y=y||{};var f=y.Base64,h="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(P){for(var F={},A=0,D=P.length;A<D;A++)F[P.charAt(A)]=A;return F}(u),i=String.fromCharCode,s=function(P){if(P.length<2){var F=P.charCodeAt(0);return F<128?P:F<2048?i(192|F>>>6)+i(128|F&63):i(224|F>>>12&15)+i(128|F>>>6&63)+i(128|F&63)}else{var F=65536+(P.charCodeAt(0)-55296)*1024+(P.charCodeAt(1)-56320);return i(240|F>>>18&7)+i(128|F>>>12&63)+i(128|F>>>6&63)+i(128|F&63)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(P){return P.replace(a,s)},n=function(P){var F=[0,2,1][P.length%3],A=P.charCodeAt(0)<<16|(P.length>1?P.charCodeAt(1):0)<<8|(P.length>2?P.charCodeAt(2):0),D=[u.charAt(A>>>18),u.charAt(A>>>12&63),F>=2?"=":u.charAt(A>>>6&63),F>=1?"=":u.charAt(A&63)];return D.join("")},e=y.btoa&&typeof y.btoa=="function"?function(P){return y.btoa(P)}:function(P){if(P.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return P.replace(/[\s\S]{1,3}/g,n)},r=function(P){return e(t(String(P)))},c=function(P){return P.replace(/[+\/]/g,function(F){return F=="+"?"-":"_"}).replace(/=/g,"")},l=function(P,F){return F?c(r(P)):r(P)},E=function(P){return l(P,!0)},w;y.Uint8Array&&(w=function(P,F){for(var A="",D=0,L=P.length;D<L;D+=3){var M=P[D],T=P[D+1],j=P[D+2],W=M<<16|T<<8|j;A+=u.charAt(W>>>18)+u.charAt(W>>>12&63)+(typeof T!="undefined"?u.charAt(W>>>6&63):"=")+(typeof j!="undefined"?u.charAt(W&63):"=")}return F?c(A):A});var S=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(P){switch(P.length){case 4:var F=(7&P.charCodeAt(0))<<18|(63&P.charCodeAt(1))<<12|(63&P.charCodeAt(2))<<6|63&P.charCodeAt(3),A=F-65536;return i((A>>>10)+55296)+i((A&1023)+56320);case 3:return i((15&P.charCodeAt(0))<<12|(63&P.charCodeAt(1))<<6|63&P.charCodeAt(2));default:return i((31&P.charCodeAt(0))<<6|63&P.charCodeAt(1))}},x=function(P){return P.replace(S,v)},g=function(P){var F=P.length,A=F%4,D=(F>0?_[P.charAt(0)]<<18:0)|(F>1?_[P.charAt(1)]<<12:0)|(F>2?_[P.charAt(2)]<<6:0)|(F>3?_[P.charAt(3)]:0),L=[i(D>>>16),i(D>>>8&255),i(D&255)];return L.length-=[0,0,2,1][A],L.join("")},p=y.atob&&typeof y.atob=="function"?function(P){return y.atob(P)}:function(P){return P.replace(/\S{1,4}/g,g)},m=function(P){return p(String(P).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(P){return x(p(P))},O=function(P){return String(P).replace(/[-_]/g,function(F){return F=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},R=function(P){return b(O(P))},k;y.Uint8Array&&(k=function(P){return Uint8Array.from(m(O(P)),function(F){return F.charCodeAt(0)})});var I=function(){var P=y.Base64;return y.Base64=f,P};if(y.Base64={VERSION:h,atob:m,btoa:e,fromBase64:R,toBase64:l,utob:t,encode:l,encodeURI:E,btou:x,decode:R,noConflict:I,fromUint8Array:w,toUint8Array:k},typeof Object.defineProperty=="function"){var N=function(P){return{value:P,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return R(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(P){return l(this,P)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return l(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),le.exports?le.exports.Base64=y.Base64:(C=[],d=function(){return y.Base64}.apply(B,C),d!==void 0&&(le.exports=d)),{Base64:y.Base64}})},67656:function(le,B,o){"use strict";o.r(B),o.d(B,{BaseInput:function(){return a},default:function(){return S}});var C=o(87462),d=o(1413),y=o(4942),f=o(71002),h=o(94184),u=o.n(h),_=o(67294),i=o(87887),s=function(x){var g,p,m=x.inputElement,b=x.prefixCls,O=x.prefix,R=x.suffix,k=x.addonBefore,I=x.addonAfter,N=x.className,P=x.style,F=x.disabled,A=x.readOnly,D=x.focused,L=x.triggerFocus,M=x.allowClear,T=x.value,j=x.handleReset,W=x.hidden,q=x.classes,Z=x.classNames,G=x.dataAttrs,H=x.styles,z=x.components,X=(z==null?void 0:z.affixWrapper)||"span",ce=(z==null?void 0:z.groupWrapper)||"span",U=(z==null?void 0:z.wrapper)||"span",V=(z==null?void 0:z.groupAddon)||"span",K=(0,_.useRef)(null),$=function(ue){var de;(de=K.current)!==null&&de!==void 0&&de.contains(ue.target)&&(L==null||L())},Q=function(){var ue;if(!M)return null;var de=!F&&!A&&T,ye="".concat(b,"-clear-icon"),ve=(0,f.Z)(M)==="object"&&M!==null&&M!==void 0&&M.clearIcon?M.clearIcon:"\u2716";return _.createElement("span",{onClick:j,onMouseDown:function(ne){return ne.preventDefault()},className:u()(ye,(ue={},(0,y.Z)(ue,"".concat(ye,"-hidden"),!de),(0,y.Z)(ue,"".concat(ye,"-has-suffix"),!!R),ue)),role:"button",tabIndex:-1},ve)},te=(0,_.cloneElement)(m,{value:T,hidden:W,className:u()((g=m.props)===null||g===void 0?void 0:g.className,!(0,i.X3)(x)&&!(0,i.He)(x)&&N)||null,style:(0,d.Z)((0,d.Z)({},(p=m.props)===null||p===void 0?void 0:p.style),!(0,i.X3)(x)&&!(0,i.He)(x)?P:{})});if((0,i.X3)(x)){var J,Y="".concat(b,"-affix-wrapper"),se=u()(Y,(J={},(0,y.Z)(J,"".concat(Y,"-disabled"),F),(0,y.Z)(J,"".concat(Y,"-focused"),D),(0,y.Z)(J,"".concat(Y,"-readonly"),A),(0,y.Z)(J,"".concat(Y,"-input-with-clear-btn"),R&&M&&T),J),!(0,i.He)(x)&&N,q==null?void 0:q.affixWrapper,Z==null?void 0:Z.affixWrapper),re=(R||M)&&_.createElement("span",{className:u()("".concat(b,"-suffix"),Z==null?void 0:Z.suffix),style:H==null?void 0:H.suffix},Q(),R);te=_.createElement(X,(0,C.Z)({className:se,style:(0,d.Z)((0,d.Z)({},(0,i.He)(x)?void 0:P),H==null?void 0:H.affixWrapper),hidden:!(0,i.He)(x)&&W,onClick:$},G==null?void 0:G.affixWrapper,{ref:K}),O&&_.createElement("span",{className:u()("".concat(b,"-prefix"),Z==null?void 0:Z.prefix),style:H==null?void 0:H.prefix},O),(0,_.cloneElement)(m,{value:T,hidden:null}),re)}if((0,i.He)(x)){var ae="".concat(b,"-group"),he="".concat(ae,"-addon"),ie=u()("".concat(b,"-wrapper"),ae,q==null?void 0:q.wrapper),ee=u()("".concat(b,"-group-wrapper"),N,q==null?void 0:q.group);return _.createElement(ce,{className:ee,style:P,hidden:W},_.createElement(U,{className:ie},k&&_.createElement(V,{className:he},k),(0,_.cloneElement)(te,{hidden:null}),I&&_.createElement(V,{className:he},I)))}return te},a=s,t=o(74902),n=o(97685),e=o(45987),r=o(21770),c=o(98423),l=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],E=(0,_.forwardRef)(function(v,x){var g=v.autoComplete,p=v.onChange,m=v.onFocus,b=v.onBlur,O=v.onPressEnter,R=v.onKeyDown,k=v.prefixCls,I=k===void 0?"rc-input":k,N=v.disabled,P=v.htmlSize,F=v.className,A=v.maxLength,D=v.suffix,L=v.showCount,M=v.type,T=M===void 0?"text":M,j=v.classes,W=v.classNames,q=v.styles,Z=(0,e.Z)(v,l),G=(0,r.Z)(v.defaultValue,{value:v.value}),H=(0,n.Z)(G,2),z=H[0],X=H[1],ce=(0,_.useState)(!1),U=(0,n.Z)(ce,2),V=U[0],K=U[1],$=(0,_.useRef)(null),Q=function(ee){$.current&&(0,i.nH)($.current,ee)};(0,_.useImperativeHandle)(x,function(){return{focus:Q,blur:function(){var ee;(ee=$.current)===null||ee===void 0||ee.blur()},setSelectionRange:function(ee,fe,ue){var de;(de=$.current)===null||de===void 0||de.setSelectionRange(ee,fe,ue)},select:function(){var ee;(ee=$.current)===null||ee===void 0||ee.select()},input:$.current}}),(0,_.useEffect)(function(){K(function(ie){return ie&&N?!1:ie})},[N]);var te=function(ee){v.value===void 0&&X(ee.target.value),$.current&&(0,i.rJ)($.current,ee,p)},J=function(ee){O&&ee.key==="Enter"&&O(ee),R==null||R(ee)},Y=function(ee){K(!0),m==null||m(ee)},se=function(ee){K(!1),b==null||b(ee)},re=function(ee){X(""),Q(),$.current&&(0,i.rJ)($.current,ee,p)},ae=function(){var ee=(0,c.Z)(v,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return _.createElement("input",(0,C.Z)({autoComplete:g},ee,{onChange:te,onFocus:Y,onBlur:se,onKeyDown:J,className:u()(I,(0,y.Z)({},"".concat(I,"-disabled"),N),W==null?void 0:W.input),style:q==null?void 0:q.input,ref:$,size:P,type:T}))},he=function(){var ee=Number(A)>0;if(D||L){var fe=(0,i.D7)(z),ue=(0,t.Z)(fe).length,de=(0,f.Z)(L)==="object"?L.formatter({value:fe,count:ue,maxLength:A}):"".concat(ue).concat(ee?" / ".concat(A):"");return _.createElement(_.Fragment,null,!!L&&_.createElement("span",{className:u()("".concat(I,"-show-count-suffix"),(0,y.Z)({},"".concat(I,"-show-count-has-suffix"),!!D),W==null?void 0:W.count),style:(0,d.Z)({},q==null?void 0:q.count)},de),D)}return null};return _.createElement(a,(0,C.Z)({},Z,{prefixCls:I,className:F,inputElement:ae(),handleReset:re,value:(0,i.D7)(z),focused:V,triggerFocus:Q,suffix:he(),disabled:N,classes:j,classNames:W,styles:q}))}),w=E,S=w},87887:function(le,B,o){"use strict";o.d(B,{D7:function(){return h},He:function(){return C},X3:function(){return d},nH:function(){return f},rJ:function(){return y}});function C(u){return!!(u.addonBefore||u.addonAfter)}function d(u){return!!(u.prefix||u.suffix||u.allowClear)}function y(u,_,i,s){if(i){var a=_;if(_.type==="click"){var t=u.cloneNode(!0);a=Object.create(_,{target:{value:t},currentTarget:{value:t}}),t.value="",i(a);return}if(s!==void 0){a=Object.create(_,{target:{value:u},currentTarget:{value:u}}),u.value=s,i(a);return}i(a)}}function f(u,_){if(u){u.focus(_);var i=_||{},s=i.cursor;if(s){var a=u.value.length;switch(s){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(a,a);break;default:u.setSelectionRange(0,a)}}}}function h(u){return typeof u=="undefined"||u===null?"":String(u)}},66680:function(le,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(67294);function d(y){var f=C.useRef();f.current=y;var h=C.useCallback(function(){for(var u,_=arguments.length,i=new Array(_),s=0;s<_;s++)i[s]=arguments[s];return(u=f.current)===null||u===void 0?void 0:u.call.apply(u,[f].concat(i))},[]);return h}},21770:function(le,B,o){"use strict";o.d(B,{Z:function(){return u}});var C=o(97685),d=o(66680),y=o(8410),f=o(63896);function h(_){return _!==void 0}function u(_,i){var s=i||{},a=s.defaultValue,t=s.value,n=s.onChange,e=s.postState,r=(0,f.Z)(function(){return h(t)?t:h(a)?typeof a=="function"?a():a:typeof _=="function"?_():_}),c=(0,C.Z)(r,2),l=c[0],E=c[1],w=t!==void 0?t:l,S=e?e(w):w,v=(0,d.Z)(n),x=(0,f.Z)([w]),g=(0,C.Z)(x,2),p=g[0],m=g[1];(0,y.o)(function(){var O=p[0];l!==O&&v(l,O)},[p]),(0,y.o)(function(){h(t)||E(t)},[t]);var b=(0,d.Z)(function(O,R){E(O,R),m([w],R)});return[S,b]}},98423:function(le,B,o){"use strict";o.d(B,{Z:function(){return d}});var C=o(1413);function d(y,f){var h=(0,C.Z)({},y);return Array.isArray(f)&&f.forEach(function(u){delete h[u]}),h}},12320:function(le){(function(B,o){if(1)le.exports=o();else var C,d})(window,function(){return function(B){var o={};function C(d){if(o[d])return o[d].exports;var y=o[d]={i:d,l:!1,exports:{}};return B[d].call(y.exports,y,y.exports,C),y.l=!0,y.exports}return C.m=B,C.c=o,C.d=function(d,y,f){C.o(d,y)||Object.defineProperty(d,y,{enumerable:!0,get:f})},C.r=function(d){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},C.t=function(d,y){if(1&y&&(d=C(d)),8&y||4&y&&typeof d=="object"&&d&&d.__esModule)return d;var f=Object.create(null);if(C.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:d}),2&y&&typeof d!="string")for(var h in d)C.d(f,h,function(u){return d[u]}.bind(null,h));return f},C.n=function(d){var y=d&&d.__esModule?function(){return d.default}:function(){return d};return C.d(y,"a",y),y},C.o=function(d,y){return Object.prototype.hasOwnProperty.call(d,y)},C.p="",C(C.s=34)}([function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var d=function(){function y(){this._listeners=[],this._disposed=!1}return Object.defineProperty(y.prototype,"event",{get:function(){var f=this;return this._event||(this._event=function(h){return f._listeners.push(h),{dispose:function(){if(!f._disposed){for(var u=0;u<f._listeners.length;u++)if(f._listeners[u]===h)return void f._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),y.prototype.fire=function(f,h){for(var u=[],_=0;_<this._listeners.length;_++)u.push(this._listeners[_]);for(_=0;_<u.length;_++)u[_].call(void 0,f,h)},y.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},y}();o.EventEmitter=d,o.forwardEvent=function(y,f){return y(function(h){return f.fire(h)})}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.IUnicodeService=o.IOptionsService=o.ILogService=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var d=C(14);o.IBufferService=d.createDecorator("BufferService"),o.ICoreMouseService=d.createDecorator("CoreMouseService"),o.ICoreService=d.createDecorator("CoreService"),o.ICharsetService=d.createDecorator("CharsetService"),o.IDirtyRowService=d.createDecorator("DirtyRowService"),o.IInstantiationService=d.createDecorator("InstantiationService"),o.ILogService=d.createDecorator("LogService"),o.IOptionsService=d.createDecorator("OptionsService"),o.IUnicodeService=d.createDecorator("UnicodeService")},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var d=function(){function f(){this._disposables=[],this._isDisposed=!1}return f.prototype.dispose=function(){this._isDisposed=!0;for(var h=0,u=this._disposables;h<u.length;h++)u[h].dispose();this._disposables.length=0},f.prototype.register=function(h){return this._disposables.push(h),h},f.prototype.unregister=function(h){var u=this._disposables.indexOf(h);u!==-1&&this._disposables.splice(u,1)},f}();function y(f){for(var h=0,u=f;h<u.length;h++)u[h].dispose();f.length=0}o.Disposable=d,o.disposeArray=y,o.getDisposeArrayDisposable=function(f){return{dispose:function(){return y(f)}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n])})(i,s)},function(i,s){function a(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var f=C(8),h=C(3),u=C(6),_=function(i){function s(){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(s,i),s.fromCharData=function(a){var t=new s;return t.setFromCharData(a),t},s.prototype.isCombined=function(){return 2097152&this.content},s.prototype.getWidth=function(){return this.content>>22},s.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?f.stringFromCodePoint(2097151&this.content):""},s.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},s.prototype.setFromCharData=function(a){this.fg=a[h.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(a[h.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(a[h.CHAR_DATA_CHAR_INDEX].length===2){var n=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){var e=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(n-55296)+e-56320+65536|a[h.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=a[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[h.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=a[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[h.CHAR_DATA_WIDTH_INDEX]<<22)},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(u.AttributeData);o.CellData=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var d=C(14);o.ICharSizeService=d.createDecorator("CharSizeService"),o.ICoreBrowserService=d.createDecorator("CoreBrowserService"),o.IMouseService=d.createDecorator("MouseService"),o.IRenderService=d.createDecorator("RenderService"),o.ISelectionService=d.createDecorator("SelectionService"),o.ISoundService=d.createDecorator("SoundService")},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var d=function(){function f(){this.fg=0,this.bg=0,this.extended=new y}return f.toColorRGB=function(h){return[h>>>16&255,h>>>8&255,255&h]},f.fromColorRGB=function(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]},f.prototype.clone=function(){var h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h},f.prototype.isInverse=function(){return 67108864&this.fg},f.prototype.isBold=function(){return 134217728&this.fg},f.prototype.isUnderline=function(){return 268435456&this.fg},f.prototype.isBlink=function(){return 536870912&this.fg},f.prototype.isInvisible=function(){return 1073741824&this.fg},f.prototype.isItalic=function(){return 67108864&this.bg},f.prototype.isDim=function(){return 134217728&this.bg},f.prototype.getFgColorMode=function(){return 50331648&this.fg},f.prototype.getBgColorMode=function(){return 50331648&this.bg},f.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},f.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},f.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},f.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},f.prototype.isFgDefault=function(){return(50331648&this.fg)==0},f.prototype.isBgDefault=function(){return(50331648&this.bg)==0},f.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},f.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},f.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},f.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},f.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},f.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()},f.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},f.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},f.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},f.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},f.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},f}();o.AttributeData=d;var y=function(){function f(h,u){h===void 0&&(h=0),u===void 0&&(u=-1),this.underlineStyle=h,this.underlineColor=u}return f.prototype.clone=function(){return new f(this.underlineStyle,this.underlineColor)},f.prototype.isEmpty=function(){return this.underlineStyle===0},f}();o.ExtendedAttrs=y},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(d,y,f,h){d.addEventListener(y,f,h);var u=!1;return{dispose:function(){u||(u=!0,d.removeEventListener(y,f,h))}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},o.utf32ToString=function(f,h,u){h===void 0&&(h=0),u===void 0&&(u=f.length);for(var _="",i=h;i<u;++i){var s=f[i];s>65535?(s-=65536,_+=String.fromCharCode(55296+(s>>10))+String.fromCharCode(s%1024+56320)):_+=String.fromCharCode(s)}return _};var d=function(){function f(){this._interim=0}return f.prototype.clear=function(){this._interim=0},f.prototype.decode=function(h,u){var _=h.length;if(!_)return 0;var i=0,s=0;this._interim&&(56320<=(n=h.charCodeAt(s++))&&n<=57343?u[i++]=1024*(this._interim-55296)+n-56320+65536:(u[i++]=this._interim,u[i++]=n),this._interim=0);for(var a=s;a<_;++a){var t=h.charCodeAt(a);if(55296<=t&&t<=56319){if(++a>=_)return this._interim=t,i;var n;56320<=(n=h.charCodeAt(a))&&n<=57343?u[i++]=1024*(t-55296)+n-56320+65536:(u[i++]=t,u[i++]=n)}else u[i++]=t}return i},f}();o.StringToUtf32=d;var y=function(){function f(){this.interim=new Uint8Array(3)}return f.prototype.clear=function(){this.interim.fill(0)},f.prototype.decode=function(h,u){var _=h.length;if(!_)return 0;var i,s,a,t,n=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>=_)return 0;if((192&(w=h[r++]))!=128){r--,c=!0;break}this.interim[E++]=w,l<<=6,l|=63&w}c||(S===2?l<128?r--:u[n++]=l:S===3?l<2048||l>=55296&&l<=57343||(u[n++]=l):l<65536||l>1114111||(u[n++]=l)),this.interim.fill(0)}for(var x=_-4,g=r;g<_;){for(;!(!(g<x)||128&(i=h[g])||128&(s=h[g+1])||128&(a=h[g+2])||128&(t=h[g+3]));)u[n++]=i,u[n++]=s,u[n++]=a,u[n++]=t,g+=4;if((i=h[g++])<128)u[n++]=i;else if((224&i)==192){if(g>=_)return this.interim[0]=i,n;if((192&(s=h[g++]))!=128){g--;continue}if((e=(31&i)<<6|63&s)<128){g--;continue}u[n++]=e}else if((240&i)==224){if(g>=_)return this.interim[0]=i,n;if((192&(s=h[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,n;if((192&(a=h[g++]))!=128){g--;continue}if((e=(15&i)<<12|(63&s)<<6|63&a)<2048||e>=55296&&e<=57343)continue;u[n++]=e}else if((248&i)==240){if(g>=_)return this.interim[0]=i,n;if((192&(s=h[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,n;if((192&(a=h[g++]))!=128){g--;continue}if(g>=_)return this.interim[0]=i,this.interim[1]=s,this.interim[2]=a,n;if((192&(t=h[g++]))!=128){g--;continue}if((e=(7&i)<<18|(63&s)<<12|(63&a)<<6|63&t)<65536||e>1114111)continue;u[n++]=e}}return n},f}();o.Utf8ToUtf32=y},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0,o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.CHAR_ATLAS_CELL_SPACING=1},function(B,o,C){"use strict";var d,y,f,h;function u(i){var s=i.toString(16);return s.length<2?"0"+s:s}function _(i,s){return i<s?(s+.05)/(i+.05):(i+.05)/(s+.05)}Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=void 0,function(i){i.toCss=function(s,a,t,n){return n!==void 0?"#"+u(s)+u(a)+u(t)+u(n):"#"+u(s)+u(a)+u(t)},i.toRgba=function(s,a,t,n){return n===void 0&&(n=255),(s<<24|a<<16|t<<8|n)>>>0}}(d=o.channels||(o.channels={})),(y=o.color||(o.color={})).blend=function(i,s){var a=(255&s.rgba)/255;if(a===1)return{css:s.css,rgba:s.rgba};var t=s.rgba>>24&255,n=s.rgba>>16&255,e=s.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((n-c)*a),S=l+Math.round((e-l)*a);return{css:d.toCss(E,w,S),rgba:d.toRgba(E,w,S)}},y.isOpaque=function(i){return(255&i.rgba)==255},y.ensureContrastRatio=function(i,s,a){var t=h.ensureContrastRatio(i.rgba,s.rgba,a);if(t)return h.toColor(t>>24&255,t>>16&255,t>>8&255)},y.opaque=function(i){var s=(255|i.rgba)>>>0,a=h.toChannels(s),t=a[0],n=a[1],e=a[2];return{css:d.toCss(t,n,e),rgba:s}},y.opacity=function(i,s){var a=Math.round(255*s),t=h.toChannels(i.rgba),n=t[0],e=t[1],r=t[2];return{css:d.toCss(n,e,r,a),rgba:d.toRgba(n,e,r,a)}},(o.css||(o.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 s(a,t,n){var e=a/255,r=t/255,c=n/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 s(a>>16&255,a>>8&255,255&a)},i.relativeLuminance2=s}(f=o.rgb||(o.rgb={})),function(i){function s(t,n,e){for(var r=t>>24&255,c=t>>16&255,l=t>>8&255,E=n>>24&255,w=n>>16&255,S=n>>8&255,v=_(f.relativeLuminance2(E,S,w),f.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=_(f.relativeLuminance2(E,S,w),f.relativeLuminance2(r,c,l));return(E<<24|w<<16|S<<8|255)>>>0}function a(t,n,e){for(var r=t>>24&255,c=t>>16&255,l=t>>8&255,E=n>>24&255,w=n>>16&255,S=n>>8&255,v=_(f.relativeLuminance2(E,S,w),f.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=_(f.relativeLuminance2(E,S,w),f.relativeLuminance2(r,c,l));return(E<<24|w<<16|S<<8|255)>>>0}i.ensureContrastRatio=function(t,n,e){var r=f.relativeLuminance(t>>8),c=f.relativeLuminance(n>>8);if(_(r,c)<e)return c<r?s(t,n,e):a(t,n,e)},i.reduceLuminance=s,i.increaseLuminance=a,i.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},i.toColor=function(t,n,e){return{css:d.toCss(t,n,e),rgba:d.toRgba(t,n,e)}}}(h=o.rgba||(o.rgba={})),o.toPaddedHex=u,o.contrastRatio=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isFirefox=void 0;var d=typeof navigator=="undefined",y=d?"node":navigator.userAgent,f=d?"node":navigator.platform;function h(u,_){return u.indexOf(_)>=0}o.isFirefox=!!~y.indexOf("Firefox"),o.isSafari=/^((?!chrome|android).)*safari/i.test(y),o.isMac=h(["Macintosh","MacIntel","MacPPC","Mac68K"],f),o.isIpad=f==="iPad",o.isIphone=f==="iPhone",o.isWindows=h(["Windows","Win16","Win32","WinCE"],f),o.isLinux=f.indexOf("Linux")>=0},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.C1=o.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
|
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL="\x7F"}(o.C0||(o.C0={})),function(d){d.PAD="\x80",d.HOP="\x81",d.BPH="\x82",d.NBH="\x83",d.IND="\x84",d.NEL="\x85",d.SSA="\x86",d.ESA="\x87",d.HTS="\x88",d.HTJ="\x89",d.VTS="\x8A",d.PLD="\x8B",d.PLU="\x8C",d.RI="\x8D",d.SS2="\x8E",d.SS3="\x8F",d.DCS="\x90",d.PU1="\x91",d.PU2="\x92",d.STS="\x93",d.CCH="\x94",d.MW="\x95",d.SPA="\x96",d.EPA="\x97",d.SOS="\x98",d.SGCI="\x99",d.SCI="\x9A",d.CSI="\x9B",d.ST="\x9C",d.OSC="\x9D",d.PM="\x9E",d.APC="\x9F"}(o.C1||(o.C1={}))},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var d=C(3),y=C(9),f=C(25),h=C(6),u=C(28),_=C(10),i=C(17),s=function(){function a(t,n,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-"+n+"-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,n){},a.prototype.onSelectionChanged=function(t,n,e){e===void 0&&(e=!1)},a.prototype.setColors=function(t){this._refreshCharAtlas(t)},a.prototype._setTransparency=function(t){if(t!==this._alpha){var n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},a.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=f.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,n,e,r){this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},a.prototype._fillBottomLineAtCells=function(t,n,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(n+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},a.prototype._fillLeftLineAtCell=function(t,n,e){this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},a.prototype._strokeRectAtCell=function(t,n,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,n*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,n,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,n*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},a.prototype._fillCharTrueColor=function(t,n,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),n*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},a.prototype._drawChars=function(t,n,e){var r,c,l=this._getContrastColor(t);l||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,n,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()?d.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?d.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||d.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||d.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,n*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,n,e))},a.prototype._drawUncachedChars=function(t,n,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=_.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+h.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("+h.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(),n*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,n){return(n?"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 n=this._colors.contrastCache.getColor(t.bg,t.fg);if(n!==void 0)return n||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),g=this._resolveForegroundRgba(r,e,E,w),p=_.rgba.ensureContrastRatio(x,g,this._optionsService.options.minimumContrastRatio);if(p){var m={css:_.channels.toCss(p>>24&255,p>>16&255,p>>8&255),rgba:p};return this._colors.contrastCache.setColor(t.bg,t.fg,m),m}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},a.prototype._resolveBackgroundRgba=function(t,n,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[n].rgba;case 50331648:return n<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},a.prototype._resolveForegroundRgba=function(t,n,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&n<8&&(n+=8),this._colors.ansi[n].rgba;case 50331648:return n<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},a}();o.BaseRenderLayer=s},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;function d(y,f,h){f.di$target===f?f.di$dependencies.push({id:y,index:h}):(f.di$dependencies=[{id:y,index:h}],f.di$target=f)}o.serviceRegistry=new Map,o.getServiceDependencies=function(y){return y.di$dependencies||[]},o.createDecorator=function(y){if(o.serviceRegistry.has(y))return o.serviceRegistry.get(y);var f=function(h,u,_){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");d(f,h,_)};return f.toString=function(){return y},o.serviceRegistry.set(y,f),f}},function(B,o,C){"use strict";function d(y,f,h,u){if(h===void 0&&(h=0),u===void 0&&(u=y.length),h>=y.length)return y;h=(y.length+h)%y.length,u=u>=y.length?y.length:(y.length+u)%y.length;for(var _=h;_<u;++_)y[_]=f;return y}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(y,f,h,u){return y.fill?y.fill(f,h,u):d(y,f,h,u)},o.fillFallback=d,o.concat=function(y,f){var h=new y.constructor(y.length+f.length);return h.set(y),h.set(f,y.length),h}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var d=C(8),y=C(3),f=C(4),h=C(6);o.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);var u=function(){function _(i,s,a){a===void 0&&(a=!1),this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var t=s||f.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),n=0;n<i;++n)this.setCell(n,t);this.length=i}return _.prototype.get=function(i){var s=this._data[3*i+0],a=2097151&s;return[this._data[3*i+1],2097152&s?this._combined[i]:a?d.stringFromCodePoint(a):"",s>>22,2097152&s?this._combined[i].charCodeAt(this._combined[i].length-1):a]},_.prototype.set=function(i,s){this._data[3*i+1]=s[y.CHAR_DATA_ATTR_INDEX],s[y.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=s[1],this._data[3*i+0]=2097152|i|s[y.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=s[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[y.CHAR_DATA_WIDTH_INDEX]<<22},_.prototype.getWidth=function(i){return this._data[3*i+0]>>22},_.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},_.prototype.getFg=function(i){return this._data[3*i+1]},_.prototype.getBg=function(i){return this._data[3*i+2]},_.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},_.prototype.getCodePoint=function(i){var s=this._data[3*i+0];return 2097152&s?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&s},_.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},_.prototype.getString=function(i){var s=this._data[3*i+0];return 2097152&s?this._combined[i]:2097151&s?d.stringFromCodePoint(2097151&s):""},_.prototype.loadCell=function(i,s){var a=3*i;return s.content=this._data[a+0],s.fg=this._data[a+1],s.bg=this._data[a+2],2097152&s.content&&(s.combinedData=this._combined[i]),268435456&s.bg&&(s.extended=this._extendedAttrs[i]),s},_.prototype.setCell=function(i,s){2097152&s.content&&(this._combined[i]=s.combinedData),268435456&s.bg&&(this._extendedAttrs[i]=s.extended),this._data[3*i+0]=s.content,this._data[3*i+1]=s.fg,this._data[3*i+2]=s.bg},_.prototype.setCellFromCodePoint=function(i,s,a,t,n,e){268435456&n&&(this._extendedAttrs[i]=e),this._data[3*i+0]=s|a<<22,this._data[3*i+1]=t,this._data[3*i+2]=n},_.prototype.addCodepointToCell=function(i,s){var a=this._data[3*i+0];2097152&a?this._combined[i]+=d.stringFromCodePoint(s):(2097151&a?(this._combined[i]=d.stringFromCodePoint(2097151&a)+d.stringFromCodePoint(s),a&=-2097152,a|=2097152):a=s|1<<22,this._data[3*i+0]=a)},_.prototype.insertCells=function(i,s,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 h.ExtendedAttrs),s<this.length-i){for(var n=new f.CellData,e=this.length-i-s-1;e>=0;--e)this.setCell(i+s+e,this.loadCell(i+e,n));for(e=0;e<s;++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 h.ExtendedAttrs)},_.prototype.deleteCells=function(i,s,a,t){if(i%=this.length,s<this.length-i){for(var n=new f.CellData,e=0;e<this.length-i-s;++e)this.setCell(i+e,this.loadCell(i+s+e,n));for(e=this.length-s;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 h.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 h.ExtendedAttrs)},_.prototype.replaceCells=function(i,s,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 h.ExtendedAttrs),s<this.length&&this.getWidth(s-1)===2&&this.setCellFromCodePoint(s,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs);i<s&&i<this.length;)this.setCell(i++,a)},_.prototype.resize=function(i,s){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,s)}else if(i){(a=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=a;var n=Object.keys(this._combined);for(t=0;t<n.length;t++){var e=parseInt(n[t],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},_.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var s=0;s<this.length;++s)this.setCell(s,i)},_.prototype.copyFrom=function(i){for(var s 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[s]=i._combined[s];for(var s in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[s]=i._extendedAttrs[s];this.isWrapped=i.isWrapped},_.prototype.clone=function(){var i=new _(0);for(var s in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[s]=this._combined[s];for(var s in this._extendedAttrs)i._extendedAttrs[s]=this._extendedAttrs[s];return i.isWrapped=this.isWrapped,i},_.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},_.prototype.copyCellsFrom=function(i,s,a,t,n){var e=i._data;if(n)for(var r=t-1;r>=0;r--)for(var c=0;c<3;c++)this._data[3*(a+r)+c]=e[3*(s+r)+c];else for(r=0;r<t;r++)for(c=0;c<3;c++)this._data[3*(a+r)+c]=e[3*(s+r)+c];var l=Object.keys(i._combined);for(c=0;c<l.length;c++){var E=parseInt(l[c],10);E>=s&&(this._combined[E-s+a]=i._combined[E])}},_.prototype.translateToString=function(i,s,a){i===void 0&&(i=!1),s===void 0&&(s=0),a===void 0&&(a=this.length),i&&(a=Math.min(a,this.getTrimmedLength()));for(var t="";s<a;){var n=this._data[3*s+0],e=2097151&n;t+=2097152&n?this._combined[s]:e?d.stringFromCodePoint(e):y.WHITESPACE_CELL_CHAR,s+=n>>22||1}return t},_}();o.BufferLine=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var d,y=[],f=0;f<arguments.length;f++)y[f]=arguments[f];for(var h=0,u=y;h<u.length;h++){var _=u[h];(d=_==null?void 0:_.parentElement)===null||d===void 0||d.removeChild(_)}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(g,p){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var O in b)b.hasOwnProperty(O)&&(m[O]=b[O])})(g,p)},function(g,p){function m(){this.constructor=g}d(g,p),g.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var f,h=C(12),u=C(20),_=C(39),i=C(2),s=C(15),a=C(8),t=C(16),n=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(g,p){if(g>24)return p.setWinLines||!1;switch(g){case 1:return!!p.restoreWin;case 2:return!!p.minimizeWin;case 3:return!!p.setWinPosition;case 4:return!!p.setWinSizePixels;case 5:return!!p.raiseWin;case 6:return!!p.lowerWin;case 7:return!!p.refreshWin;case 8:return!!p.setWinSizeChars;case 9:return!!p.maximizeWin;case 10:return!!p.fullscreenWin;case 11:return!!p.getWinState;case 13:return!!p.getWinPosition;case 14:return!!p.getWinSizePixels;case 15:return!!p.getScreenSizePixels;case 16:return!!p.getCellSizePixels;case 18:return!!p.getWinSizeChars;case 19:return!!p.getScreenSizeChars;case 20:return!!p.getIconTitle;case 21:return!!p.getWinTitle;case 22:return!!p.pushTitle;case 23:return!!p.popTitle;case 24:return!!p.setWinLines}return!1}(function(g){g[g.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",g[g.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(f=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var v=function(){function g(p,m,b,O){this._bufferService=p,this._coreService=m,this._logService=b,this._optionsService=O,this._data=new Uint32Array(0)}return g.prototype.hook=function(p){this._data=new Uint32Array(0)},g.prototype.put=function(p,m,b){this._data=s.concat(this._data,p.subarray(m,b))},g.prototype.unhook=function(p){if(p){var m=a.utf32ToString(this._data);switch(this._data=new Uint32Array(0),m){case'"q':return this._coreService.triggerDataEvent(h.C0.ESC+'P1$r0"q'+h.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(h.C0.ESC+'P1$r61;1"p'+h.C0.ESC+"\\");case"r":var b=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(h.C0.ESC+"P1$r"+b+h.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(h.C0.ESC+"P1$r0m"+h.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(h.C0.ESC+"P1$r"+O+" q"+h.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",m),this._coreService.triggerDataEvent(h.C0.ESC+"P0$r"+h.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},g}(),x=function(g){function p(m,b,O,R,k,I,N,P,F){F===void 0&&(F=new _.EscapeSequenceParser);var A=g.call(this)||this;A._bufferService=m,A._charsetService=b,A._coreService=O,A._dirtyRowService=R,A._logService=k,A._optionsService=I,A._coreMouseService=N,A._unicodeService=P,A._parser=F,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 n.EventEmitter,A._onRequestRefreshRows=new n.EventEmitter,A._onRequestReset=new n.EventEmitter,A._onRequestScroll=new n.EventEmitter,A._onRequestSyncScrollBar=new n.EventEmitter,A._onRequestWindowsOptionsReport=new n.EventEmitter,A._onA11yChar=new n.EventEmitter,A._onA11yTab=new n.EventEmitter,A._onCursorMove=new n.EventEmitter,A._onLineFeed=new n.EventEmitter,A._onScroll=new n.EventEmitter,A._onTitleChange=new n.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(T,j){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(T),params:j.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,j,W){A._logService.debug("Unknown OSC code: ",{identifier:T,action:j,data:W})}),A._parser.setDcsHandlerFallback(function(T,j,W){j==="HOOK"&&(W=W.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(T),action:j,payload:W})}),A._parser.setPrintHandler(function(T,j,W){return A.print(T,j,W)}),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(h.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(h.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(h.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(h.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(h.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(h.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(h.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(h.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(h.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){L._parser.setEscHandler({intermediates:"(",final:T},function(){return A.selectCharset("("+T)}),L._parser.setEscHandler({intermediates:")",final:T},function(){return A.selectCharset(")"+T)}),L._parser.setEscHandler({intermediates:"*",final:T},function(){return A.selectCharset("*"+T)}),L._parser.setEscHandler({intermediates:"+",final:T},function(){return A.selectCharset("+"+T)}),L._parser.setEscHandler({intermediates:"-",final:T},function(){return A.selectCharset("-"+T)}),L._parser.setEscHandler({intermediates:".",final:T},function(){return A.selectCharset("."+T)}),L._parser.setEscHandler({intermediates:"/",final:T},function(){return A.selectCharset("/"+T)})},L=this;for(var M in u.CHARSETS)D(M);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(p,g),Object.defineProperty(p.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){g.prototype.dispose.call(this)},p.prototype.parse=function(m){var b=this._bufferService.buffer,O=b.x,R=b.y;if(this._logService.debug("parsing data",m),this._parseBuffer.length<m.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(m.length,131072))),this._dirtyRowService.clearRange(),m.length>131072)for(var k=0;k<m.length;k+=131072){var I=k+131072<m.length?k+131072:m.length,N=typeof m=="string"?this._stringDecoder.decode(m.substring(k,I),this._parseBuffer):this._utf8Decoder.decode(m.subarray(k,I),this._parseBuffer);this._parser.parse(this._parseBuffer,N)}else N=typeof m=="string"?this._stringDecoder.decode(m,this._parseBuffer):this._utf8Decoder.decode(m,this._parseBuffer),this._parser.parse(this._parseBuffer,N);(b=this._bufferService.buffer).x===O&&b.y===R||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},p.prototype.print=function(m,b,O){var R,k,I=this._bufferService.buffer,N=this._charsetService.charset,P=this._optionsService.options.screenReaderMode,F=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,D=this._coreService.modes.insertMode,L=this._curAttrData,M=I.lines.get(I.ybase+I.y);this._dirtyRowService.markDirty(I.y),I.x&&O-b>0&&M.getWidth(I.x-1)===2&&M.setCellFromCodePoint(I.x-1,0,1,L.fg,L.bg,L.extended);for(var T=b;T<O;++T){if(R=m[T],k=this._unicodeService.wcwidth(R),R<127&&N){var j=N[String.fromCharCode(R)];j&&(R=j.charCodeAt(0))}if(P&&this._onA11yChar.fire(a.stringFromCodePoint(R)),k||!I.x){if(I.x+k-1>=F){if(A){for(;I.x<F;)M.setCellFromCodePoint(I.x++,0,1,L.fg,L.bg,L.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),M=I.lines.get(I.ybase+I.y)}else if(I.x=F-1,k===2)continue}if(D&&(M.insertCells(I.x,k,I.getNullCell(L),L),M.getWidth(F-1)===2&&M.setCellFromCodePoint(F-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,L.fg,L.bg,L.extended)),M.setCellFromCodePoint(I.x++,R,k,L.fg,L.bg,L.extended),k>0)for(;--k;)M.setCellFromCodePoint(I.x++,0,0,L.fg,L.bg,L.extended)}else M.getWidth(I.x-1)?M.addCodepointToCell(I.x-1,R):M.addCodepointToCell(I.x-2,R)}O-b>0&&(M.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<F&&O-b>0&&M.getWidth(I.x)===0&&!M.hasContent(I.x)&&M.setCellFromCodePoint(I.x,0,1,L.fg,L.bg,L.extended),this._dirtyRowService.markDirty(I.y)},p.prototype.addCsiHandler=function(m,b){var O=this;return m.final!=="t"||m.prefix||m.intermediates?this._parser.addCsiHandler(m,b):this._parser.addCsiHandler(m,function(R){return!S(R.params[0],O._optionsService.options.windowOptions)||b(R)})},p.prototype.addDcsHandler=function(m,b){return this._parser.addDcsHandler(m,new E.DcsHandler(b))},p.prototype.addEscHandler=function(m,b){return this._parser.addEscHandler(m,b)},p.prototype.addOscHandler=function(m,b){return this._parser.addOscHandler(m,new l.OscHandler(b))},p.prototype.bell=function(){this._onRequestBell.fire()},p.prototype.lineFeed=function(){var m=this._bufferService.buffer;this._dirtyRowService.markDirty(m.y),this._optionsService.options.convertEol&&(m.x=0),m.y++,m.y===m.scrollBottom+1?(m.y--,this._onRequestScroll.fire(this._eraseAttrData())):m.y>=this._bufferService.rows&&(m.y=this._bufferService.rows-1),m.x>=this._bufferService.cols&&m.x--,this._dirtyRowService.markDirty(m.y),this._onLineFeed.fire()},p.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},p.prototype.backspace=function(){var m,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&&(!((m=b.lines.get(b.ybase+b.y))===null||m===void 0)&&m.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()},p.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var m=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-m)}},p.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},p.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},p.prototype._restrictCursor=function(m){m===void 0&&(m=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(m,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)},p.prototype._setCursor=function(m,b){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=m,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+b):(this._bufferService.buffer.x=m,this._bufferService.buffer.y=b),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},p.prototype._moveCursor=function(m,b){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+m,this._bufferService.buffer.y+b)},p.prototype.cursorUp=function(m){var b=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;b>=0?this._moveCursor(0,-Math.min(b,m.params[0]||1)):this._moveCursor(0,-(m.params[0]||1))},p.prototype.cursorDown=function(m){var b=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;b>=0?this._moveCursor(0,Math.min(b,m.params[0]||1)):this._moveCursor(0,m.params[0]||1)},p.prototype.cursorForward=function(m){this._moveCursor(m.params[0]||1,0)},p.prototype.cursorBackward=function(m){this._moveCursor(-(m.params[0]||1),0)},p.prototype.cursorNextLine=function(m){this.cursorDown(m),this._bufferService.buffer.x=0},p.prototype.cursorPrecedingLine=function(m){this.cursorUp(m),this._bufferService.buffer.x=0},p.prototype.cursorCharAbsolute=function(m){this._setCursor((m.params[0]||1)-1,this._bufferService.buffer.y)},p.prototype.cursorPosition=function(m){this._setCursor(m.length>=2?(m.params[1]||1)-1:0,(m.params[0]||1)-1)},p.prototype.charPosAbsolute=function(m){this._setCursor((m.params[0]||1)-1,this._bufferService.buffer.y)},p.prototype.hPositionRelative=function(m){this._moveCursor(m.params[0]||1,0)},p.prototype.linePosAbsolute=function(m){this._setCursor(this._bufferService.buffer.x,(m.params[0]||1)-1)},p.prototype.vPositionRelative=function(m){this._moveCursor(0,m.params[0]||1)},p.prototype.hVPosition=function(m){this.cursorPosition(m)},p.prototype.tabClear=function(m){var b=m.params[0];b===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:b===3&&(this._bufferService.buffer.tabs={})},p.prototype.cursorForwardTab=function(m){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=m.params[0]||1;b--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},p.prototype.cursorBackwardTab=function(m){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=m.params[0]||1,O=this._bufferService.buffer;b--;)O.x=O.prevStop()},p.prototype._eraseInBufferLine=function(m,b,O,R){R===void 0&&(R=!1);var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+m);k.replaceCells(b,O,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(k.isWrapped=!1)},p.prototype._resetBufferLine=function(m){var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+m);b.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),b.isWrapped=!1},p.prototype.eraseInDisplay=function(m){var b;switch(this._restrictCursor(),m.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))}},p.prototype.eraseInLine=function(m){switch(this._restrictCursor(),m.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)},p.prototype.insertLines=function(m){this._restrictCursor();var b=m.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){for(var R=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(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},p.prototype.deleteLines=function(m){this._restrictCursor();var b=m.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){var R,k=O.ybase+O.y;for(R=this._bufferService.rows-1-O.scrollBottom,R=this._bufferService.rows-1+O.ybase-R;b--;)O.lines.splice(k,1),O.lines.splice(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},p.prototype.insertChars=function(m){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.insertCells(this._bufferService.buffer.x,m.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.deleteChars=function(m){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.deleteCells(this._bufferService.buffer.x,m.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.scrollUp=function(m){for(var b=m.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)},p.prototype.scrollDown=function(m){for(var b=m.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)},p.prototype.scrollLeft=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.deleteCells(0,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.scrollRight=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.insertCells(0,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.insertColumns=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=this._bufferService.buffer.lines.get(b.ybase+R);k.insertCells(b.x,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.deleteColumns=function(m){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var O=m.params[0]||1,R=b.scrollTop;R<=b.scrollBottom;++R){var k=b.lines.get(b.ybase+R);k.deleteCells(b.x,O,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},p.prototype.eraseChars=function(m){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+(m.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},p.prototype.repeatPrecedingCharacter=function(m){if(this._parser.precedingCodepoint){for(var b=m.params[0]||1,O=new Uint32Array(b),R=0;R<b;++R)O[R]=this._parser.precedingCodepoint;this.print(O,0,O.length)}},p.prototype.sendDeviceAttributesPrimary=function(m){m.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c"))},p.prototype.sendDeviceAttributesSecondary=function(m){m.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(m.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c"))},p.prototype._is=function(m){return(this._optionsService.options.termName+"").indexOf(m)===0},p.prototype.setMode=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!0}},p.prototype.setModePrivate=function(m){for(var b=0;b<m.length;b++)switch(m.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}},p.prototype.resetMode=function(m){for(var b=0;b<m.length;b++)switch(m.params[b]){case 4:this._coreService.modes.insertMode=!1}},p.prototype.resetModePrivate=function(m){for(var b=0;b<m.length;b++)switch(m.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(),m.params[b]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},p.prototype._updateAttrColor=function(m,b,O,R,k){return b===2?(m|=50331648,m&=-16777216,m|=c.AttributeData.fromColorRGB([O,R,k])):b===5&&(m&=-50331904,m|=33554432|255&O),m},p.prototype._extractColor=function(m,b,O){var R=[0,0,-1,0,0,0],k=0,I=0;do{if(R[I+k]=m.params[b+I],m.hasSubParams(b+I)){var N=m.getSubParams(b+I),P=0;do R[1]===5&&(k=1),R[I+P+1+k]=N[P];while(++P<N.length&&P+I+1+k<R.length);break}if(R[1]===5&&I+k>=2||R[1]===2&&I+k>=5)break;R[1]&&(k=1)}while(++I+b<m.length&&I+k<R.length);for(P=2;P<R.length;++P)R[P]===-1&&(R[P]=0);switch(R[0]){case 38:O.fg=this._updateAttrColor(O.fg,R[1],R[3],R[4],R[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,R[1],R[3],R[4],R[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,R[1],R[3],R[4],R[5])}return I},p.prototype._processUnderline=function(m,b){b.extended=b.extended.clone(),(!~m||m>5)&&(m=1),b.extended.underlineStyle=m,b.fg|=268435456,m===0&&(b.fg&=-268435457),b.updateExtended()},p.prototype.charAttributes=function(m){if(m.length===1&&m.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=m.length,R=this._curAttrData,k=0;k<O;k++)(b=m.params[k])>=30&&b<=37?(R.fg&=-50331904,R.fg|=16777216|b-30):b>=40&&b<=47?(R.bg&=-50331904,R.bg|=16777216|b-40):b>=90&&b<=97?(R.fg&=-50331904,R.fg|=16777224|b-90):b>=100&&b<=107?(R.bg&=-50331904,R.bg|=16777224|b-100):b===0?(R.fg=t.DEFAULT_ATTR_DATA.fg,R.bg=t.DEFAULT_ATTR_DATA.bg):b===1?R.fg|=134217728:b===3?R.bg|=67108864:b===4?(R.fg|=268435456,this._processUnderline(m.hasSubParams(k)?m.getSubParams(k)[0]:1,R)):b===5?R.fg|=536870912:b===7?R.fg|=67108864:b===8?R.fg|=1073741824:b===2?R.bg|=134217728:b===21?this._processUnderline(2,R):b===22?(R.fg&=-134217729,R.bg&=-134217729):b===23?R.bg&=-67108865:b===24?R.fg&=-268435457:b===25?R.fg&=-536870913:b===27?R.fg&=-67108865:b===28?R.fg&=-1073741825:b===39?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):b===49?(R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):b===38||b===48||b===58?k+=this._extractColor(m,k,R):b===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):b===100?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",b)},p.prototype.deviceStatus=function(m){switch(m.params[0]){case 5:this._coreService.triggerDataEvent(h.C0.ESC+"[0n");break;case 6:var b=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"["+b+";"+O+"R")}},p.prototype.deviceStatusPrivate=function(m){switch(m.params[0]){case 6:var b=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"[?"+b+";"+O+"R")}},p.prototype.softReset=function(m){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},p.prototype.setCursorStyle=function(m){var b=m.params[0]||1;switch(b){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var O=b%2==1;this._optionsService.options.cursorBlink=O},p.prototype.setScrollRegion=function(m){var b,O=m.params[0]||1;(m.length<2||(b=m.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))},p.prototype.windowOptions=function(m){if(S(m.params[0],this._optionsService.options.windowOptions)){var b=m.length>1?m.params[1]:0;switch(m.params[0]){case 14:b!==2&&this._onRequestWindowsOptionsReport.fire(f.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(f.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(h.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())}}},p.prototype.saveCursor=function(m){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},p.prototype.restoreCursor=function(m){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()},p.prototype.setTitle=function(m){this._windowTitle=m,this._onTitleChange.fire(m)},p.prototype.setIconName=function(m){this._iconName=m},p.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},p.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},p.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},p.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},p.prototype.selectCharset=function(m){m.length===2?m[0]!=="/"&&this._charsetService.setgCharset(w[m[0]],u.CHARSETS[m[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},p.prototype.index=function(){this._restrictCursor();var m=this._bufferService.buffer;this._bufferService.buffer.y++,m.y===m.scrollBottom+1?(m.y--,this._onRequestScroll.fire(this._eraseAttrData())):m.y>=this._bufferService.rows&&(m.y=this._bufferService.rows-1),this._restrictCursor()},p.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},p.prototype.reverseIndex=function(){this._restrictCursor();var m=this._bufferService.buffer;if(m.y===m.scrollTop){var b=m.scrollBottom-m.scrollTop;m.lines.shiftElements(m.ybase+m.y,b,1),m.lines.set(m.ybase+m.y,m.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(m.scrollTop,m.scrollBottom)}else m.y--,this._restrictCursor()},p.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},p.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},p.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},p.prototype.setgLevel=function(m){this._charsetService.setgLevel(m)},p.prototype.screenAlignmentPattern=function(){var m=new r.CellData;m.content=1<<22|69,m.fg=this._curAttrData.fg,m.bg=this._curAttrData.bg;var b=this._bufferService.buffer;this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var R=b.ybase+b.y+O,k=b.lines.get(R);k&&(k.fill(m),k.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},p}(i.Disposable);o.InputHandler=x},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.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"},o.CHARSETS.A={"#":"\xA3"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},o.CHARSETS.C=o.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},o.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},o.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},o.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},o.CHARSETS.E=o.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},o.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},o.CHARSETS.H=o.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var d=function(){function y(f,h){if(f===void 0&&(f=32),h===void 0&&(h=32),this.maxLength=f,this.maxSubParamsLength=h,h>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return y.fromArray=function(f){var h=new y;if(!f.length)return h;for(var u=f[0]instanceof Array?1:0;u<f.length;++u){var _=f[u];if(_ instanceof Array)for(var i=0;i<_.length;++i)h.addSubParam(_[i]);else h.addParam(_)}return h},y.prototype.clone=function(){var f=new y(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f},y.prototype.toArray=function(){for(var f=[],h=0;h<this.length;++h){f.push(this.params[h]);var u=this._subParamsIdx[h]>>8,_=255&this._subParamsIdx[h];_-u>0&&f.push(Array.prototype.slice.call(this._subParams,u,_))}return f},y.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},y.prototype.addParam=function(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>2147483647?2147483647:f}},y.prototype.addSubParam=function(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>2147483647?2147483647:f,this._subParamsIdx[this.length-1]++}},y.prototype.hasSubParams=function(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0},y.prototype.getSubParams=function(f){var h=this._subParamsIdx[f]>>8,u=255&this._subParamsIdx[f];return u-h>0?this._subParams.subarray(h,u):null},y.prototype.getSubParamsAll=function(){for(var f={},h=0;h<this.length;++h){var u=this._subParamsIdx[h]>>8,_=255&this._subParamsIdx[h];_-u>0&&(f[h]=this._subParams.slice(u,_))}return f},y.prototype.addDigit=function(f){var h;if(!(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,_=u[h-1];u[h-1]=~_?Math.min(10*_+f,2147483647):f}},y}();o.Params=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var d=C(23),y=C(8),f=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(_,i){this._handlers[_]===void 0&&(this._handlers[_]=[]);var s=this._handlers[_];return s.push(i),{dispose:function(){var a=s.indexOf(i);a!==-1&&s.splice(a,1)}}},u.prototype.setHandler=function(_,i){this._handlers[_]=[i]},u.prototype.clearHandler=function(_){this._handlers[_]&&delete this._handlers[_]},u.prototype.setHandlerFallback=function(_){this._handlerFb=_},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 _=this._handlers[this._id];if(_)for(var i=_.length-1;i>=0;i--)_[i].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(_,i,s){var a=this._handlers[this._id];if(a)for(var t=a.length-1;t>=0;t--)a[t].put(_,i,s);else this._handlerFb(this._id,"PUT",y.utf32ToString(_,i,s))},u.prototype._end=function(_){var i=this._handlers[this._id];if(i){for(var s=i.length-1;s>=0&&i[s].end(_)===!1;s--);for(s--;s>=0;s--)i[s].end(!1)}else this._handlerFb(this._id,"END",_)},u.prototype.start=function(){this.reset(),this._id=-1,this._state=1},u.prototype.put=function(_,i,s){if(this._state!==3){if(this._state===1)for(;i<s;){var a=_[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&&s-i>0&&this._put(_,i,s)}},u.prototype.end=function(_){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(_)),this._id=-1,this._state=0)},u}();o.OscParser=f;var h=function(){function u(_){this._handler=_,this._data="",this._hitLimit=!1}return u.prototype.start=function(){this._data="",this._hitLimit=!1},u.prototype.put=function(_,i,s){this._hitLimit||(this._data+=y.utf32ToString(_,i,s),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(_){var i;return this._hitLimit?i=!1:_&&(i=this._handler(this._data)),this._data="",this._hitLimit=!1,i},u}();o.OscHandler=h},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var d=C(8),y=C(21),f=C(23),h=[],u=function(){function i(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=function(){}}return i.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},i.prototype.addHandler=function(s,a){this._handlers[s]===void 0&&(this._handlers[s]=[]);var t=this._handlers[s];return t.push(a),{dispose:function(){var n=t.indexOf(a);n!==-1&&t.splice(n,1)}}},i.prototype.setHandler=function(s,a){this._handlers[s]=[a]},i.prototype.clearHandler=function(s){this._handlers[s]&&delete this._handlers[s]},i.prototype.setHandlerFallback=function(s){this._handlerFb=s},i.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=h,this._ident=0},i.prototype.hook=function(s,a){if(this.reset(),this._ident=s,this._active=this._handlers[s]||h,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(s,a,t){if(this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].put(s,a,t);else this._handlerFb(this._ident,"PUT",d.utf32ToString(s,a,t))},i.prototype.unhook=function(s){if(this._active.length){for(var a=this._active.length-1;a>=0&&this._active[a].unhook(s)===!1;a--);for(a--;a>=0;a--)this._active[a].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",s);this._active=h,this._ident=0},i}();o.DcsParser=u;var _=function(){function i(s){this._handler=s,this._data="",this._hitLimit=!1}return i.prototype.hook=function(s){this._params=s.clone(),this._data="",this._hitLimit=!1},i.prototype.put=function(s,a,t){this._hitLimit||(this._data+=d.utf32ToString(s,a,t),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},i.prototype.unhook=function(s){var a;return this._hitLimit?a=!1:s&&(a=this._handler(this._data,this._params||new y.Params)),this._params=void 0,this._data="",this._hitLimit=!1,a},i}();o.DcsHandler=_},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var d=C(26),y=C(43),f=[];o.acquireCharAtlas=function(h,u,_,i,s){for(var a=d.generateConfig(i,s,h,_),t=0;t<f.length;t++){var n=(e=f[t]).ownedBy.indexOf(u);if(n>=0){if(d.configEquals(e.config,a))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),f.splice(t,1)):e.ownedBy.splice(n,1);break}}for(t=0;t<f.length;t++){var e=f[t];if(d.configEquals(e.config,a))return e.ownedBy.push(u),e.atlas}var r={atlas:new y.DynamicCharAtlas(document,a),config:a,ownedBy:[u]};return f.push(r),r.atlas},o.removeTerminalFromCache=function(h){for(var u=0;u<f.length;u++){var _=f[u].ownedBy.indexOf(h);if(_!==-1){f[u].ownedBy.length===1?(f[u].atlas.dispose(),f.splice(u,1)):f[u].ownedBy.splice(_,1);break}}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var d=C(3);o.generateConfig=function(y,f,h,u){var _={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:f,fontFamily:h.fontFamily,fontSize:h.fontSize,fontWeight:h.fontWeight,fontWeightBold:h.fontWeightBold,allowTransparency:h.allowTransparency,colors:_}},o.configEquals=function(y,f){for(var h=0;h<y.colors.ansi.length;h++)if(y.colors.ansi[h].rgba!==f.colors.ansi[h].rgba)return!1;return y.devicePixelRatio===f.devicePixelRatio&&y.fontFamily===f.fontFamily&&y.fontSize===f.fontSize&&y.fontWeight===f.fontWeight&&y.fontWeightBold===f.fontWeightBold&&y.allowTransparency===f.allowTransparency&&y.scaledCharWidth===f.scaledCharWidth&&y.scaledCharHeight===f.scaledCharHeight&&y.colors.foreground===f.colors.foreground&&y.colors.background===f.colors.background},o.is256Color=function(y){return y<d.DEFAULT_COLOR}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var d=C(10),y=C(45),f=d.css.toColor("#ffffff"),h=d.css.toColor("#000000"),u=d.css.toColor("#ffffff"),_=d.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=function(){for(var a=[d.css.toColor("#2e3436"),d.css.toColor("#cc0000"),d.css.toColor("#4e9a06"),d.css.toColor("#c4a000"),d.css.toColor("#3465a4"),d.css.toColor("#75507b"),d.css.toColor("#06989a"),d.css.toColor("#d3d7cf"),d.css.toColor("#555753"),d.css.toColor("#ef2929"),d.css.toColor("#8ae234"),d.css.toColor("#fce94f"),d.css.toColor("#729fcf"),d.css.toColor("#ad7fa8"),d.css.toColor("#34e2e2"),d.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],n=0;n<216;n++){var e=t[n/36%6|0],r=t[n/6%6|0],c=t[n%6];a.push({css:d.channels.toCss(e,r,c),rgba:d.channels.toRgba(e,r,c)})}for(n=0;n<24;n++){var l=8+10*n;a.push({css:d.channels.toCss(l,l,l),rgba:d.channels.toRgba(l,l,l)})}return a}();var s=function(){function a(t,n){this.allowTransparency=n;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:f,background:h,cursor:u,cursorAccent:_,selectionTransparent:i,selectionOpaque:d.color.blend(h,i),ansi:o.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,f),this.colors.background=this._parseColor(t.background,h),this.colors.cursor=this._parseColor(t.cursor,u,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,_,!0),this.colors.selectionTransparent=this._parseColor(t.selection,i,!0),this.colors.selectionOpaque=d.color.blend(this.colors.background,this.colors.selectionTransparent),d.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=d.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},a.prototype._parseColor=function(t,n,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return n;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+n.css),n;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 "+n.css+"."),n;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:d.channels.toRgba(l,E,w,v),css:t}}return{css:this._ctx.fillStyle,rgba:d.channels.toRgba(r[0],r[1],r[2],r[3])}},a}();o.ColorManager=s},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(s,a){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(s,a)},function(s,a){function t(){this.constructor=s}d(s,a),s.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerRegistry=o.JoinedCellData=void 0;var f=C(6),h=C(3),u=C(4),_=function(s){function a(t,n,e){var r=s.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=n,r._width=e,r}return y(a,s),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}(f.AttributeData);o.JoinedCellData=_;var i=function(){function s(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return s.prototype.registerCharacterJoiner=function(a){var t={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(t),t.id},s.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},s.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 n=[],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++)n.push(v[x]);r=S,l=c,E=this._workCell.fg,w=this._workCell.bg}c+=this._workCell.getChars().length||h.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++)n.push(v[x]);return n},s.prototype._getJoinedRanges=function(a,t,n,e,r){for(var c=a.substring(t,n),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++)s._mergeRanges(l,w[S]);return this._stringRangesToCellRanges(l,e,r),l},s.prototype._stringRangesToCellRanges=function(a,t,n){var e=0,r=!1,c=0,l=a[e];if(l){for(var E=n;E<this._bufferService.cols;E++){var w=t.getWidth(E),S=t.getString(E).length||h.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)}},s._mergeRanges=function(a,t){for(var n=!1,e=0;e<a.length;e++){var r=a[e];if(n){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]),n=!0)}}return n?a[a.length-1][1]=t[1]:a.push(t),a},s}();o.CharacterJoinerRegistry=i},function(B,o,C){"use strict";function d(y,f){var h=f.getBoundingClientRect();return[y.clientX-h.left,y.clientY-h.top]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=d,o.getCoords=function(y,f,h,u,_,i,s,a){if(_){var t=d(y,f);if(t)return t[0]=Math.ceil((t[0]+(a?i/2:0))/i),t[1]=Math.ceil(t[1]/s),t[0]=Math.min(Math.max(t[0],1),h+(a?1:0)),t[1]=Math.min(Math.max(t[1],1),u),t}},o.getRawByteCoords=function(y){if(y)return{x:y[0]+32,y:y[1]+32}}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var d=function(){function y(f){this._renderCallback=f}return y.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.refresh=function(f,h,u){var _=this;this._rowCount=u,f=f!==void 0?f:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return _._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var f=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(f,h)}},y}();o.RenderDebouncer=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(h,u){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,i){_.__proto__=i}||function(_,i){for(var s in i)i.hasOwnProperty(s)&&(_[s]=i[s])})(h,u)},function(h,u){function _(){this.constructor=h}d(h,u),h.prototype=u===null?Object.create(u):(_.prototype=u.prototype,new _)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var f=function(h){function u(){var _=h!==null&&h.apply(this,arguments)||this;return _._currentDevicePixelRatio=window.devicePixelRatio,_}return y(u,h),u.prototype.setListener=function(_){var i=this;this._listener&&this.clearListener(),this._listener=_,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){h.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)===null||_===void 0||_.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);o.ScreenDprMonitor=f},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function d(y,f){if(f===void 0&&(f=5),typeof y!="object")return y;var h=Array.isArray(y)?[]:{};for(var u in y)h[u]=f<=1?y[u]:y[u]?d(y[u],f-1):y[u];return h}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var d=C(4),y=C(35),f=C(18),h=C(0),u=C(83),_=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 n(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 s(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 f},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}();o.Terminal=_;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 d.CellData},e}(),s=function(){function e(r){var c=this;this._buffers=r,this._onBufferChange=new h.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 d.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}(),n=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,o,C){"use strict";var d,y=this&&this.__extends||(d=function(F,A){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,L){D.__proto__=L}||function(D,L){for(var M in L)L.hasOwnProperty(M)&&(D[M]=L[M])})(F,A)},function(F,A){function D(){this.constructor=F}d(F,A),F.prototype=A===null?Object.create(A):(D.prototype=A.prototype,new D)});Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var f=C(36),h=C(37),u=C(38),_=C(12),i=C(19),s=C(40),a=C(50),t=C(51),n=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),g=C(27),p=C(60),m=C(5),b=C(61),O=C(62),R=C(63),k=C(64),I=C(65),N=typeof window!="undefined"?window.document:null,P=function(F){function A(D){D===void 0&&(D={});var L=F.call(this,D)||this;return L.browser=n,L._keyDownHandled=!1,L._onCursorMove=new v.EventEmitter,L._onKey=new v.EventEmitter,L._onRender=new v.EventEmitter,L._onSelectionChange=new v.EventEmitter,L._onTitleChange=new v.EventEmitter,L._onFocus=new v.EventEmitter,L._onBlur=new v.EventEmitter,L._onA11yCharEmitter=new v.EventEmitter,L._onA11yTabEmitter=new v.EventEmitter,L._setup(),L.linkifier=L._instantiationService.createInstance(a.Linkifier),L.linkifier2=L.register(L._instantiationService.createInstance(R.Linkifier2)),L.register(L._inputHandler.onRequestBell(function(){return L.bell()})),L.register(L._inputHandler.onRequestRefreshRows(function(M,T){return L.refresh(M,T)})),L.register(L._inputHandler.onRequestReset(function(){return L.reset()})),L.register(L._inputHandler.onRequestScroll(function(M,T){return L.scroll(M,T||void 0)})),L.register(L._inputHandler.onRequestWindowsOptionsReport(function(M){return L._reportWindowsOptions(M)})),L.register(v.forwardEvent(L._inputHandler.onCursorMove,L._onCursorMove)),L.register(v.forwardEvent(L._inputHandler.onTitleChange,L._onTitleChange)),L.register(v.forwardEvent(L._inputHandler.onA11yChar,L._onA11yCharEmitter)),L.register(v.forwardEvent(L._inputHandler.onA11yTab,L._onA11yTabEmitter)),L.register(L._bufferService.onResize(function(M){return L._afterResize(M.cols,M.rows)})),L}return y(A,F),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,L,M;this._isDisposed||(F.prototype.dispose.call(this),(D=this._renderService)===null||D===void 0||D.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(M=(L=this.element)===null||L===void 0?void 0:L.parentNode)===null||M===void 0||M.removeChild(this.element))},A.prototype._setup=function(){F.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 L,M,T,j;switch(F.prototype._updateOptions.call(this,D),D){case"fontFamily":case"fontSize":(L=this._renderService)===null||L===void 0||L.clear(),(M=this._charSizeService)===null||M===void 0||M.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)):((j=this._accessibilityManager)===null||j===void 0||j.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(_.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(_.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),L=this._bufferService.buffer.y*D,M=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=M+"px",this.textarea.style.top=L+"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(M){D.hasSelection()&&u.copyHandler(M,D._selectionService)}));var L=function(M){return u.handlePasteEvent(M,D.textarea,D._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",L)),this.register(e.addDisposableDomListener(this.element,"paste",L)),n.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(M){M.button===2&&u.rightClickHandler(M,D.textarea,D.screenElement,D._selectionService,D.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(M){u.rightClickHandler(M,D.textarea,D.screenElement,D._selectionService,D.options.rightClickSelectsWord)})),n.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(M){M.button===1&&u.moveTextAreaUnderMouseCursor(M,D.textarea,D.screenElement)}))},A.prototype._bindKeys=function(){var D=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(L){return D._keyUp(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(L){return D._keyDown(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(L){return D._keyPress(L)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return D._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(L){return D._compositionHelper.compositionupdate(L)})),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(L){return D._queueLinkification(L.start,L.end)}))},A.prototype.open=function(D){var L=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 M=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),M.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),M.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(W){return L._onTextAreaFocus(W)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return L._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var T=this._instantiationService.createInstance(k.CoreBrowserService,this.textarea);this._instantiationService.setService(m.ICoreBrowserService,T),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(m.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(f.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(M),this._theme=this.options.theme||this._theme,this._colorManager=new g.ColorManager(N,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(W){return L._colorManager.onOptionsChange(W)})),this._colorManager.setTheme(this._theme);var j=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(p.RenderService,j,this.rows,this.screenElement)),this._instantiationService.setService(m.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(W){return L._onRender.fire(W)})),this.onResize(function(W){return L._renderService.resize(W.cols,W.rows)}),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(m.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(O.MouseService),this._instantiationService.setService(m.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(h.Viewport,function(W,q){return L.scrollLines(W,q)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return L.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){L._renderService.onCursorMove(),L._syncTextArea()})),this.register(this.onResize(function(){return L._renderService.onResize(L.cols,L.rows)})),this.register(this.onBlur(function(){return L._renderService.onBlur()})),this.register(this.onFocus(function(){return L._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return L.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(m.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(W){return L.scrollLines(W.amount,W.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return L._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(W){return L._renderService.onSelectionChanged(W.start,W.end,W.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(W){L.textarea.value=W,L.textarea.focus(),L.textarea.select()})),this.register(this.onScroll(function(){L.viewport.syncScrollArea(),L._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return L._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return L._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(W){return L._selectionService.onMouseDown(W)})),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(s.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 L,M,T;this._theme=D,(L=this._colorManager)===null||L===void 0||L.setTheme(D),(M=this._renderService)===null||M===void 0||M.setColors(this._colorManager.colors),(T=this.viewport)===null||T===void 0||T.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var D=this,L=this,M=this.element;function T(H){var z,X,ce=L._mouseService.getRawByteCoords(H,L.screenElement,L.cols,L.rows);if(!ce)return!1;switch(H.overrideType||H.type){case"mousemove":X=32,H.buttons===void 0?(z=3,H.button!==void 0&&(z=H.button<3?H.button:3)):z=1&H.buttons?0:4&H.buttons?1:2&H.buttons?2:3;break;case"mouseup":X=0,z=H.button<3?H.button:3;break;case"mousedown":X=1,z=H.button<3?H.button:3;break;case"wheel":H.deltaY!==0&&(X=H.deltaY<0?0:1),z=4;break;default:return!1}return!(X===void 0||z===void 0||z>4)&&L._coreMouseService.triggerMouseEvent({col:ce.x-33,row:ce.y-33,button:z,action:X,ctrl:H.ctrlKey,alt:H.altKey,shift:H.shiftKey})}var j={mouseup:null,wheel:null,mousedrag:null,mousemove:null},W=function(H){return T(H),H.buttons||(D._document.removeEventListener("mouseup",j.mouseup),j.mousedrag&&D._document.removeEventListener("mousemove",j.mousedrag)),D.cancel(H)},q=function(H){return T(H),H.preventDefault(),D.cancel(H)},Z=function(H){H.buttons&&T(H)},G=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?j.mousemove||(M.addEventListener("mousemove",G),j.mousemove=G):(M.removeEventListener("mousemove",j.mousemove),j.mousemove=null),16&H?j.wheel||(M.addEventListener("wheel",q,{passive:!1}),j.wheel=q):(M.removeEventListener("wheel",j.wheel),j.wheel=null),2&H?j.mouseup||(j.mouseup=W):(D._document.removeEventListener("mouseup",j.mouseup),j.mouseup=null),4&H?j.mousedrag||(j.mousedrag=Z):(D._document.removeEventListener("mousemove",j.mousedrag),j.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(M,"mousedown",function(H){if(H.preventDefault(),D.focus(),D._coreMouseService.areMouseEventsActive&&!D._selectionService.shouldForceSelection(H))return T(H),j.mouseup&&D._document.addEventListener("mouseup",j.mouseup),j.mousedrag&&D._document.addEventListener("mousemove",j.mousedrag),D.cancel(H)})),this.register(e.addDisposableDomListener(M,"wheel",function(H){if(!j.wheel){if(!D.buffer.hasScrollback){var z=D.viewport.getLinesScrolled(H);if(z===0)return;for(var X=_.C0.ESC+(D._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(H.deltaY<0?"A":"B"),ce="",U=0;U<Math.abs(z);U++)ce+=X;D._coreService.triggerDataEvent(ce,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(M,"wheel",function(H){if(!j.wheel)return D.viewport.onWheel(H)?void 0:D.cancel(H)},{passive:!1})),this.register(e.addDisposableDomListener(M,"touchstart",function(H){if(!D._coreMouseService.areMouseEventsActive)return D.viewport.onTouchStart(H),D.cancel(H)},{passive:!0})),this.register(e.addDisposableDomListener(M,"touchmove",function(H){if(!D._coreMouseService.areMouseEventsActive)return D.viewport.onTouchMove(H)?void 0:D.cancel(H)},{passive:!1}))},A.prototype.refresh=function(D,L){var M;(M=this._renderService)===null||M===void 0||M.refreshRows(D,L)},A.prototype._queueLinkification=function(D,L){var M;(M=this.linkifier)===null||M===void 0||M.linkifyRows(D,L)},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,L){F.prototype.scrollLines.call(this,D,L),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,L,M){var T=this.linkifier.registerLinkMatcher(D,L,M);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 L=this._renderService.registerCharacterJoiner(D);return this.refresh(0,this.rows-1),L},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,L,M){this._selectionService.setSelection(D,L,M)},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,L){var M;(M=this._selectionService)===null||M===void 0||M.selectLines(D,L)},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 L=S.evaluateKeyboardEvent(D,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(D),L.type===3||L.type===2){var M=this.rows-1;return this.scrollLines(L.type===2?-M:M),this.cancel(D,!0)}return L.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,D)||(L.cancel&&this.cancel(D,!0),!L.key||(L.key!==_.C0.ETX&&L.key!==_.C0.CR||(this.textarea.value=""),this._onKey.fire({key:L.key,domEvent:D}),this._showCursor(),this._coreService.triggerDataEvent(L.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(D,!0)))},A.prototype._isThirdLevelShift=function(D,L){var M=D.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||D.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey;return L.type==="keypress"?M:M&&(!L.keyCode||L.keyCode>47)},A.prototype._keyUp=function(D){this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1||(function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18}(D)||this.focus(),this.updateCursorStyle(D))},A.prototype._keyPress=function(D){var L;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(D)===!1)return!1;if(this.cancel(D),D.charCode)L=D.charCode;else if(D.which===null||D.which===void 0)L=D.keyCode;else{if(D.which===0||D.charCode===0)return!1;L=D.which}return!(!L||(D.altKey||D.ctrlKey||D.metaKey)&&!this._isThirdLevelShift(this.browser,D))&&(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:D}),this._showCursor(),this._coreService.triggerDataEvent(L,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(D,L){D!==this.cols||L!==this.rows?F.prototype.resize.call(this,D,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(D,L){var M,T;(M=this._charSizeService)===null||M===void 0||M.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,L;this.options.rows=this.rows,this.options.cols=this.cols;var M=this._customKeyEventHandler;this._setup(),F.prototype.reset.call(this),(D=this._selectionService)===null||D===void 0||D.reset(),this._customKeyEventHandler=M,this.refresh(0,this.rows-1),(L=this.viewport)===null||L===void 0||L.syncScrollArea()},A.prototype._reportWindowsOptions=function(D){if(this._renderService)switch(D){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var L=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),M=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(_.C0.ESC+"[4;"+M+";"+L+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var T=this._renderService.dimensions.scaledCellWidth.toFixed(0),j=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(_.C0.ESC+"[6;"+j+";"+T+"t")}},A.prototype.cancel=function(D,L){if(this.options.cancelEvents||L)return D.preventDefault(),D.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(I.CoreTerminal);o.Terminal=P},function(B,o,C){"use strict";var d=this&&this.__decorate||function(_,i,s,a){var t,n=arguments.length,e=n<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(_,i,s,a);else for(var r=_.length-1;r>=0;r--)(t=_[r])&&(e=(n<3?t(e):n>3?t(i,s,e):t(i,s))||e);return n>3&&e&&Object.defineProperty(i,s,e),e},y=this&&this.__param||function(_,i){return function(s,a){i(s,a,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var f=C(5),h=C(1),u=function(){function _(i,s,a,t,n,e){this._textarea=i,this._compositionView=s,this._bufferService=a,this._optionsService=t,this._charSizeService=n,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(_.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),_.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},_.prototype.compositionupdate=function(i){var s=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){s._compositionPosition.end=s._textarea.value.length},0)},_.prototype.compositionend=function(){this._finalizeComposition(!0)},_.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)},_.prototype._finalizeComposition=function(i){var s=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(s._isSendingComposition){s._isSendingComposition=!1;var n=void 0;n=s._isComposing?s._textarea.value.substring(a.start,a.end):s._textarea.value.substring(a.start),s._coreService.triggerDataEvent(n,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},_.prototype._handleAnyTextareaChanges=function(){var i=this,s=this._textarea.value;setTimeout(function(){if(!i._isComposing){var a=i._textarea.value.replace(s,"");a.length>0&&i._coreService.triggerDataEvent(a,!0)}},0)},_.prototype.updateCompositionElements=function(i){var s=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,n=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=n+"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=n+"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 s.updateCompositionElements(!0)},0)}},_=d([y(2,h.IBufferService),y(3,h.IOptionsService),y(4,f.ICharSizeService),y(5,h.ICoreService)],_)}();o.CompositionHelper=u},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),f=this&&this.__decorate||function(t,n,e,r){var c,l=arguments.length,E=l<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(n,e,E):c(n,e))||E);return l>3&&E&&Object.defineProperty(n,e,E),E},h=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var u=C(2),_=C(7),i=C(5),s=C(1),a=function(t){function n(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(_.addDisposableDomListener(v._viewportElement,"scroll",v._onScroll.bind(v))),setTimeout(function(){return v.syncScrollArea()},0),v}return y(n,t),n.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},n.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()}))},n.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},n.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)},n.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)}},n.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)},n.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},n.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},n.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},n.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},n.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},n.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))},n=f([h(3,s.IBufferService),h(4,s.IOptionsService),h(5,i.ICharSizeService),h(6,i.IRenderService)],n)}(u.Disposable);o.Viewport=a},function(B,o,C){"use strict";function d(u){return u.replace(/\r?\n/g,"\r")}function y(u,_){return _?"\x1B[200~"+u+"\x1B[201~":u}function f(u,_,i){u=y(u=d(u),i.decPrivateModes.bracketedPasteMode),i.triggerDataEvent(u,!0),_.value=""}function h(u,_,i){var s=i.getBoundingClientRect(),a=u.clientX-s.left-10,t=u.clientY-s.top-10;_.style.width="20px",_.style.height="20px",_.style.left=a+"px",_.style.top=t+"px",_.style.zIndex="1000",_.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=d,o.bracketTextForPaste=y,o.copyHandler=function(u,_){u.clipboardData&&u.clipboardData.setData("text/plain",_.selectionText),u.preventDefault()},o.handlePasteEvent=function(u,_,i){u.stopPropagation(),u.clipboardData&&f(u.clipboardData.getData("text/plain"),_,i)},o.paste=f,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(u,_,i,s,a){h(u,_,i),a&&!s.isClickInSelection(u)&&s.selectWordAtCursor(u),_.value=s.selectionText,_.select()}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var f=C(2),h=C(15),u=C(21),_=C(22),i=C(24),s=function(){function t(n){this.table=new Uint8Array(n)}return t.prototype.setDefault=function(n,e){h.fill(this.table,n<<4|e)},t.prototype.add=function(n,e,r,c){this.table[e<<8|n]=r<<4|c},t.prototype.addMany=function(n,e,r,c){for(var l=0;l<n.length;l++)this.table[e<<8|n[l]]=r<<4|c},t}();o.TransitionTable=s,o.VT500_TRANSITION_TABLE=function(){var t=new s(4095),n=Array.apply(null,Array(256)).map(function(w,S){return S}),e=function(w,S){return n.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 n(e){e===void 0&&(e=o.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 _.OscParser,r._dcsParser=new i.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return y(n,t),n.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},n.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},n.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},n.prototype.setPrintHandler=function(e){this._printHandler=e},n.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},n.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)}}},n.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},n.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},n.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},n.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},n.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},n.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},n.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)}}},n.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},n.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},n.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},n.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},n.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},n.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},n.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},n.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},n.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},n.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},n.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},n.prototype.setErrorHandler=function(e){this._errorHandler=e},n.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},n.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},n.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,g=this._transitions.table,p=0;p<r;++p){switch((l=g[E<<8|((c=e[p])<160?c:160)])>>4){case 2:for(var m=p+1;;++m){if(m>=r||(c=e[m])<32||c>126&&c<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(c=e[m])<32||c>126&&c<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(c=e[m])<32||c>126&&c<160){this._printHandler(e,p,m),p=m-1;break}if(++m>=r||(c=e[m])<32||c>126&&c<160){this._printHandler(e,p,m),p=m-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:p,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(++p<r&&(c=e[p])>47&&c<60);p--;break;case 9:v<<=8,v|=c;break;case 10:for(var R=this._escHandlers[v<<8|c],k=R?R.length-1:-1;k>=0&&R[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=p+1;;++I)if(I>=r||(c=e[I])===24||c===26||c===27||c>127&&c<160){S.put(e,p,I),p=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=p+1;;N++)if(N>=r||(c=e[N])<32||c>127&&c<=159){w.put(e,p,N),p=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},n}(f.Disposable);o.EscapeSequenceParser=a},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(w,S){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var g in x)x.hasOwnProperty(g)&&(v[g]=x[g])})(w,S)},function(w,S){function v(){this.constructor=w}d(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),f=this&&this.__decorate||function(w,S,v,x){var g,p=arguments.length,m=p<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(g=w[b])&&(m=(p<3?g(m):p>3?g(S,v,m):g(S,v))||m);return p>3&&m&&Object.defineProperty(S,v,m),m},h=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var u=C(41),_=C(47),i=C(48),s=C(49),a=C(29),t=C(2),n=C(5),e=C(1),r=C(25),c=C(0),l=1,E=function(w){function S(v,x,g,p,m,b,O,R,k){var I=w.call(this)||this;I._colors=v,I._screenElement=x,I._bufferService=m,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 _.SelectionRenderLayer(I._screenElement,1,I._colors,I._id,I._bufferService,O),new s.LinkRenderLayer(I._screenElement,2,I._colors,I._id,g,p,I._bufferService,O),new i.CursorRenderLayer(I._screenElement,3,I._colors,I._id,I._onRequestRedraw,I._bufferService,O,R,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,g=this._renderLayers;x<g.length;x++){var p=g[x];p.setColors(this._colors),p.reset()}},S.prototype.onResize=function(v,x){this._updateDimensions();for(var g=0,p=this._renderLayers;g<p.length;g++)p[g].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,g){g===void 0&&(g=!1),this._runOperation(function(p){return p.onSelectionChanged(v,x,g)})},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,g=this._renderLayers;x<g.length;x++)v(g[x])},S.prototype.renderRows=function(v,x){for(var g=0,p=this._renderLayers;g<p.length;g++)p[g].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=f([h(4,e.IBufferService),h(5,n.ICharSizeService),h(6,e.IOptionsService),h(7,e.ICoreService),h(8,n.ICoreBrowserService)],S)}(t.Disposable);o.Renderer=E},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)});Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var f=C(42),h=C(13),u=C(6),_=C(3),i=C(29),s=C(4),a=function(t){function n(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 s.CellData,x._state=new f.GridCache,x._characterJoinerRegistry=l,x}return y(n,t),n.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)},n.prototype.reset=function(){this._state.clear(),this._clearAll()},n.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 g=this._workCell,p=!1,m=x;if(g.getWidth()!==0){if(v.length>0&&x===v[0][0]){p=!0;var b=v.shift();g=new i.JoinedCellData(this._workCell,S.translateToString(!0,b[0],b[1]),b[1]-b[0]),m=b[1]-1}!p&&this._isOverlapping(g)&&m<S.length-1&&S.getCodePoint(m+1)===_.NULL_CELL_CODE&&(g.content&=-12582913,g.content|=2<<22),l(g,x,E),x=m}}},n.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,g,p){var m=null;x.isInverse()?m=x.isFgDefault()?c._colors.foreground.css:x.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(x.getFgColor()).join(",")+")":c._colors.ansi[x.getFgColor()].css:x.isBgRGB()?m="rgb("+u.AttributeData.toColorRGB(x.getBgColor()).join(",")+")":x.isBgPalette()&&(m=c._colors.ansi[x.getBgColor()].css),v===null&&(w=g,S=p),p!==S?(l.fillStyle=v||"",c._fillCells(w,S,E-w,1),w=g,S=p):v!==m&&(l.fillStyle=v||"",c._fillCells(w,S,g-w,1),w=g,S=p),v=m}),v!==null&&(l.fillStyle=v,this._fillCells(w,S,E-w,1)),l.restore()},n.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()}})},n.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))},n.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},n.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},n}(h.BaseRenderLayer);o.TextRenderLayer=a},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var d=function(){function y(){this.cache=[]}return y.prototype.resize=function(f,h){for(var u=0;u<f;u++){this.cache.length<=u&&this.cache.push([]);for(var _=this.cache[u].length;_<h;_++)this.cache[u].push(void 0);this.cache[u].length=h}this.cache.length=f},y.prototype.clear=function(){for(var f=0;f<this.cache.length;f++)for(var h=0;h<this.cache[f].length;h++)this.cache[f][h]=void 0},y}();o.GridCache=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(c,l){return(d=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}d(c,l),c.prototype=l===null?Object.create(l):(E.prototype=l.prototype,new E)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var f=C(9),h=C(44),u=C(27),_=C(46),i=C(11),s=C(28),a=C(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function n(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}o.getGlyphCacheKey=n;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=s.throwIfFalsy(S._cacheCanvas.getContext("2d",{alpha:!0}));var v=E.createElement("canvas");v.width=S._config.scaledCharWidth,v.height=S._config.scaledCharHeight,S._tmpCtx=s.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 _.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=n(w),g=this._cacheMap.get(x);if(g!=null)return this._drawFromCache(E,g,S,v),!0;if(this._drawToCacheCount<100){var p=void 0;p=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var m=this._drawToCache(w,p);return this._cacheMap.set(x,m),this._drawFromCache(E,m,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),g=this._toCoordinateY(w.index);E.drawImage(w.inBitmap?this._bitmap:this._cacheCanvas,x,g,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===f.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===f.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=f.DIM_OPACITY),this._tmpCtx.fillText(E.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var g=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),p=!1;this._config.allowTransparency||(p=function(R,k){for(var I=!0,N=k.rgba>>>24,P=k.rgba>>>16&255,F=k.rgba>>>8&255,A=0;A<R.data.length;A+=4)R.data[A]===N&&R.data[A+1]===P&&R.data[A+2]===F?R.data[A+3]=0:I=!1;return I}(g,S));var m=this._toCoordinateX(w),b=this._toCoordinateY(w);this._cacheCtx.putImageData(g,m,b);var O={index:w,isEmpty:p,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}(h.BaseCharAtlas);o.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}(h.BaseCharAtlas);o.NoneCharAtlas=r},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var d=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}();o.BaseCharAtlas=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var d=function(){function y(){this._color={},this._rgba={}}return y.prototype.clear=function(){this._color={},this._rgba={}},y.prototype.setCss=function(f,h,u){this._rgba[f]||(this._rgba[f]={}),this._rgba[f][h]=u},y.prototype.getCss=function(f,h){return this._rgba[f]?this._rgba[f][h]:void 0},y.prototype.setColor=function(f,h,u){this._color[f]||(this._color[f]={}),this._color[f][h]=u},y.prototype.getColor=function(f,h){return this._color[f]?this._color[f][h]:void 0},y}();o.ColorContrastCache=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var d=function(){function y(f){this.capacity=f,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return y.prototype._unlinkNode=function(f){var h=f.prev,u=f.next;f===this._head&&(this._head=u),f===this._tail&&(this._tail=h),h!==null&&(h.next=u),u!==null&&(u.prev=h)},y.prototype._appendNode=function(f){var h=this._tail;h!==null&&(h.next=f),f.prev=h,f.next=null,this._tail=f,this._head===null&&(this._head=f)},y.prototype.prealloc=function(f){for(var h=this._nodePool,u=0;u<f;u++)h.push({prev:null,next:null,key:null,value:null})},y.prototype.get=function(f){var h=this._map[f];return h!==void 0?(this._unlinkNode(h),this._appendNode(h),h.value):null},y.prototype.peekValue=function(f){var h=this._map[f];return h!==void 0?h.value:null},y.prototype.peek=function(){var f=this._head;return f===null?null:f.value},y.prototype.set=function(f,h){var u=this._map[f];if(u!==void 0)u=this._map[f],this._unlinkNode(u),u.value=h;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=f,u.value=h,this._map[f]=u;else{var _=this._nodePool;_.length>0?((u=_.pop()).key=f,u.value=h):u={prev:null,next:null,key:f,value:h},this._map[f]=u,this.size++}this._appendNode(u)},y}();o.LRUMap=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(h,u){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,i){_.__proto__=i}||function(_,i){for(var s in i)i.hasOwnProperty(s)&&(_[s]=i[s])})(h,u)},function(h,u){function _(){this.constructor=h}d(h,u),h.prototype=u===null?Object.create(u):(_.prototype=u.prototype,new _)});Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var f=function(h){function u(_,i,s,a,t,n){var e=h.call(this,_,"selection",i,!0,s,a,t,n)||this;return e._clearState(),e}return y(u,h),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(_){h.prototype.resize.call(this,_),this._clearState()},u.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},u.prototype.onSelectionChanged=function(_,i,s){if(this._didStateChange(_,i,s,this._bufferService.buffer.ydisp))if(this._clearAll(),_&&i){var a=_[1]-this._bufferService.buffer.ydisp,t=i[1]-this._bufferService.buffer.ydisp,n=Math.max(a,0),e=Math.min(t,this._bufferService.rows-1);if(!(n>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,s){var r=_[0],c=i[0]-r,l=e-n+1;this._fillCells(r,n,c,l)}else{r=a===n?_[0]:0;var E=n===e?i[0]:this._bufferService.cols;this._fillCells(r,n,E-r,1);var w=Math.max(e-n-1,0);if(this._fillCells(0,n+1,this._bufferService.cols,w),n!==e){var S=t===e?i[0]:this._bufferService.cols;this._fillCells(0,e,S,1)}}this._state.start=[_[0],_[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=s,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(_,i,s,a){return!this._areCoordinatesEqual(_,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||s!==this._state.columnSelectMode||a!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(_,i){return!(!_||!i)&&_[0]===i[0]&&_[1]===i[1]},u}(C(13).BaseRenderLayer);o.SelectionRenderLayer=f},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n])})(i,s)},function(i,s){function a(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var f=C(13),h=C(4),u=function(i){function s(a,t,n,e,r,c,l,E,w){var S=i.call(this,a,"cursor",t,!0,n,e,c,l)||this;return S._onRequestRedraw=r,S._coreService=E,S._coreBrowserService=w,S._cell=new h.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(s,i),s.prototype.resize=function(a){i.prototype.resize.call(this,a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},s.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},s.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onOptionsChanged=function(){var a,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new _(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})},s.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype.onGridChanged=function(a,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,n=t-this._bufferService.buffer.ydisp;if(n<0||n>=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,n,this._cell):this._renderBlurCursor(e,n,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=n,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===n&&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,n,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=n,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},s.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})},s.prototype._renderBarCursor=function(a,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,t,this._optionsService.options.cursorWidth),this._ctx.restore()},s.prototype._renderBlockCursor=function(a,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,t,n.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(n,a,t),this._ctx.restore()},s.prototype._renderUnderlineCursor=function(a,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,t),this._ctx.restore()},s.prototype._renderBlurCursor=function(a,t,n){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,t,n.getWidth(),1),this._ctx.restore()},s}(f.BaseRenderLayer);o.CursorRenderLayer=u;var _=function(){function i(s,a){this._renderCallback=a,this.isCursorVisible=!0,s&&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 s=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0})))},i.prototype._restartInterval=function(s){var a=this;s===void 0&&(s=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 n=600-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(n)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},600)},s)},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,o,C){"use strict";var d,y=this&&this.__extends||(d=function(i,s){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var n in t)t.hasOwnProperty(n)&&(a[n]=t[n])})(i,s)},function(i,s){function a(){this.constructor=i}d(i,s),i.prototype=s===null?Object.create(s):(a.prototype=s.prototype,new a)});Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var f=C(13),h=C(9),u=C(26),_=function(i){function s(a,t,n,e,r,c,l,E){var w=i.call(this,a,"link",t,!0,n,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(s,i),s.prototype.resize=function(a){i.prototype.resize.call(this,a),this._state=void 0},s.prototype.reset=function(){this._clearCurrentLink()},s.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}},s.prototype._onShowLinkUnderline=function(a){if(a.fg===h.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},s.prototype._onHideLinkUnderline=function(a){this._clearCurrentLink()},s}(f.BaseRenderLayer);o.LinkRenderLayer=_},function(B,o,C){"use strict";var d=this&&this.__decorate||function(i,s,a,t){var n,e=arguments.length,r=e<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,s,a,t);else for(var c=i.length-1;c>=0;c--)(n=i[c])&&(r=(e<3?n(r):e>3?n(s,a,r):n(s,a))||r);return e>3&&r&&Object.defineProperty(s,a,r),r},y=this&&this.__param||function(i,s){return function(a,t){s(a,t,i)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var f=C(0),h=C(1),u=function(){function i(s,a,t){this._bufferService=s,this._logService=a,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new f.EventEmitter,this._onHideLinkUnderline=new f.EventEmitter,this._onLinkTooltip=new f.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(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(s,a){this._element=s,this._mouseZoneManager=a},i.prototype.linkifyRows=function(s,a){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=s,this._rowsToLinkify.end=a):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,s),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,a)),this._mouseZoneManager.clearAll(s,a),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var s=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var a=s.ydisp+this._rowsToLinkify.start;if(!(a>=s.lines.length)){for(var t=s.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,n=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,a,t,n,n);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(s,a,t){if(t===void 0&&(t={}),!a)throw new Error("handler must be defined");var n={id:this._nextLinkMatcherId++,regex:s,handler:a,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(n),n.id},i.prototype._addLinkMatcherToList=function(s){if(this._linkMatchers.length!==0){for(var a=this._linkMatchers.length-1;a>=0;a--)if(s.priority<=this._linkMatchers[a].priority)return void this._linkMatchers.splice(a+1,0,s);this._linkMatchers.splice(0,0,s)}else this._linkMatchers.push(s)},i.prototype.deregisterLinkMatcher=function(s){for(var a=0;a<this._linkMatchers.length;a++)if(this._linkMatchers[a].id===s)return this._linkMatchers.splice(a,1),!0;return!1},i.prototype._doLinkifyRow=function(s,a,t){for(var n,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),c=-1,l=function(){var w=n[typeof t.matchIndex!="number"?0:t.matchIndex];if(!w)return E._logService.debug("match found without corresponding matchIndex",n,t),"break";if(c=a.indexOf(w,c+1),r.lastIndex=c+w.length,c<0)return"break";var S=E._bufferService.buffer.stringIndexToBufferIndex(s,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]),g=x?x>>9&511:void 0;t.validationCallback?t.validationCallback(w,function(p){e._rowsTimeoutId||p&&e._addLink(S[1],S[0]-e._bufferService.buffer.ydisp,w,t,g)}):E._addLink(S[1],S[0]-E._bufferService.buffer.ydisp,w,t,g)},E=this;(n=r.exec(a))!==null&&l()!=="break";);},i.prototype._addLink=function(s,a,t,n,e){var r=this;if(this._mouseZoneManager&&this._element){var c=this._unicodeService.getStringCellWidth(t),l=s%this._bufferService.cols,E=a+Math.floor(s/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 _(l+1,E+1,w+1,S+1,function(v){if(n.handler)return n.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)),n.hoverTooltipCallback&&n.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"),n.hoverLeaveCallback&&n.hoverLeaveCallback()},function(v){return!n.willLinkActivate||n.willLinkActivate(v,t)}))}},i.prototype._createLinkHoverEvent=function(s,a,t,n,e){return{x1:s,y1:a,x2:t,y2:n,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=d([y(0,h.IBufferService),y(1,h.ILogService),y(2,h.IUnicodeService)],i)}();o.Linkifier=u;var _=function(i,s,a,t,n,e,r,c,l){this.x1=i,this.y1=s,this.x2=a,this.y2=t,this.clickCallback=n,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=c,this.willLinkActivate=l};o.MouseZone=_},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(w,S){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var g in x)x.hasOwnProperty(g)&&(v[g]=x[g])})(w,S)},function(w,S){function v(){this.constructor=w}d(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),f=this&&this.__decorate||function(w,S,v,x){var g,p=arguments.length,m=p<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(g=w[b])&&(m=(p<3?g(m):p>3?g(S,v,m):g(S,v))||m);return p>3&&m&&Object.defineProperty(S,v,m),m},h=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var u=C(11),_=C(52),i=C(4),s=C(0),a=C(5),t=C(1),n=C(30),e=C(53),r=C(2),c="\xA0",l=new RegExp(c,"g"),E=function(w){function S(v,x,g,p,m,b,O){var R=w.call(this)||this;return R._element=v,R._screenElement=x,R._bufferService=g,R._coreService=p,R._mouseService=m,R._optionsService=b,R._renderService=O,R._dragScrollAmount=0,R._enabled=!0,R._workCell=new i.CellData,R._mouseDownTimeStamp=0,R._onLinuxMouseSelection=R.register(new s.EventEmitter),R._onRedrawRequest=R.register(new s.EventEmitter),R._onSelectionChange=R.register(new s.EventEmitter),R._onRequestScrollLines=R.register(new s.EventEmitter),R._mouseMoveListener=function(k){return R._onMouseMove(k)},R._mouseUpListener=function(k){return R._onMouseUp(k)},R._coreService.onUserInput(function(){R.hasSelection&&R.clearSelection()}),R._trimListener=R._bufferService.buffer.lines.onTrim(function(k){return R._onTrim(k)}),R.register(R._bufferService.buffers.onBufferActivate(function(k){return R._onBufferActivate(k)})),R.enable(),R._model=new _.SelectionModel(R._bufferService),R._activeSelectionMode=0,R}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 g=this._bufferService.buffer,p=[];if(this._activeSelectionMode===3){if(v[0]===x[0])return"";for(var m=v[1];m<=x[1];m++){var b=g.translateBufferLineToString(m,!0,v[0],x[0]);p.push(b)}}else{var O=v[1]===x[1]?x[0]:void 0;for(p.push(g.translateBufferLineToString(v[1],!0,v[0],O)),m=v[1]+1;m<=x[1]-1;m++){var R=g.lines.get(m);b=g.translateBufferLineToString(m,!0),R&&R.isWrapped?p[p.length-1]+=b:p.push(b)}v[1]!==x[1]&&(R=g.lines.get(x[1]),b=g.translateBufferLineToString(x[1],!0,0,x[0]),R&&R.isWrapped?p[p.length-1]+=b:p.push(b))}return p.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),g=this._model.finalSelectionStart,p=this._model.finalSelectionEnd;return!!(g&&p&&x)&&this._areCoordsInSelection(x,g,p)},S.prototype._areCoordsInSelection=function(v,x,g){return v[1]>x[1]&&v[1]<g[1]||x[1]===g[1]&&v[1]===x[1]&&v[0]>=x[0]&&v[0]<g[0]||x[1]<g[1]&&v[1]===g[1]&&v[0]<g[0]||x[1]<g[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=n.getCoordsRelativeToElement(v,this._screenElement)[1],g=this._renderService.dimensions.canvasHeight;return x>=0&&x<=g?0:(x>g&&(x-=g),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 g=this._bufferService.buffer;if(this._model.selectionEnd[1]<g.lines.length){var p=g.lines.get(this._model.selectionEnd[1]);p&&p.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 g=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(g&&g[0]!==void 0&&g[1]!==void 0){var p=e.moveToCellSequence(g[0]-1,g[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(p,!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(g){return x._onTrim(g)})},S.prototype._convertViewportColToCharacterIndex=function(v,x){for(var g=x[0],p=0;x[0]>=p;p++){var m=v.loadCell(p,this._workCell).getChars().length;this._workCell.getWidth()===0?g--:m>1&&x[0]!==p&&(g+=m-1)}return g},S.prototype.setSelection=function(v,x,g){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,x],this._model.selectionStartLength=g,this.refresh()},S.prototype._getWordAt=function(v,x,g,p){if(g===void 0&&(g=!0),p===void 0&&(p=!0),!(v[0]>=this._bufferService.cols)){var m=this._bufferService.buffer,b=m.lines.get(v[1]);if(b){var O=m.translateBufferLineToString(v[1],!1),R=this._convertViewportColToCharacterIndex(b,v),k=R,I=v[0]-R,N=0,P=0,F=0,A=0;if(O.charAt(R)===" "){for(;R>0&&O.charAt(R-1)===" ";)R--;for(;k<O.length&&O.charAt(k+1)===" ";)k++}else{var D=v[0],L=v[0];b.getWidth(D)===0&&(N++,D--),b.getWidth(L)===2&&(P++,L++);var M=b.getString(L).length;for(M>1&&(A+=M-1,k+=M-1);D>0&&R>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&&(F+=T-1,R-=T-1),R--,D--}for(;L<b.length&&k+1<O.length&&!this._isCharWordSeparator(b.loadCell(L+1,this._workCell));){b.loadCell(L+1,this._workCell);var j=this._workCell.getChars().length;this._workCell.getWidth()===2?(P++,L++):j>1&&(A+=j-1,k+=j-1),k++,L++}}k++;var W=R+I-N+F,q=Math.min(this._bufferService.cols,k-R+N+P-F-A);if(x||O.slice(R,k).trim()!==""){if(g&&W===0&&b.getCodePoint(0)!==32){var Z=m.lines.get(v[1]-1);if(Z&&b.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){var G=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(G){var H=this._bufferService.cols-G.start;W-=H,q+=H}}}if(p&&W+q===this._bufferService.cols&&b.getCodePoint(this._bufferService.cols-1)!==32){var z=m.lines.get(v[1]+1);if(z&&z.isWrapped&&z.getCodePoint(0)!==32){var X=this._getWordAt([0,v[1]+1],!1,!1,!0);X&&(q+=X.length)}}return{start:W,length:q}}}}},S.prototype._selectWordAt=function(v,x){var g=this._getWordAt(v,x);if(g){for(;g.start<0;)g.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[g.start,v[1]],this._model.selectionStartLength=g.length}},S.prototype._selectToWordAt=function(v){var x=this._getWordAt(v,!0);if(x){for(var g=v[1];x.start<0;)x.start+=this._bufferService.cols,g--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,g++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,g]}},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=f([h(2,t.IBufferService),h(3,t.ICoreService),h(4,a.IMouseService),h(5,t.IOptionsService),h(6,a.IRenderService)],S)}(r.Disposable);o.SelectionService=E},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var d=function(){function y(f){this._bufferService=f,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 f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,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 f=this.selectionStart,h=this.selectionEnd;return!(!f||!h)&&(f[1]>h[1]||f[1]===h[1]&&f[0]>h[0])},y.prototype.onTrim=function(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},y}();o.SelectionModel=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var d=C(12);function y(s,a,t,n){var e=s-f(t,s),r=a-f(t,a);return i(Math.abs(e-r)-function(c,l,E){for(var w=0,S=c-f(E,c),v=l-f(E,l),x=0;x<Math.abs(S-v);x++){var g=h(c,l)==="A"?-1:1,p=E.buffer.lines.get(S+g*x);p&&p.isWrapped&&w++}return w}(s,a,t),_(h(s,a),n))}function f(s,a){for(var t=0,n=s.buffer.lines.get(a),e=n&&n.isWrapped;e&&a>=0&&a<s.rows;)t++,e=(n=s.buffer.lines.get(--a))&&n.isWrapped;return t}function h(s,a){return s>a?"A":"B"}function u(s,a,t,n,e,r){for(var c=s,l=a,E="";c!==t||l!==n;)c+=e?1:-1,e&&c>r.cols-1?(E+=r.buffer.translateBufferLineToString(l,!1,s,c),c=0,s=0,l++):!e&&c<0&&(E+=r.buffer.translateBufferLineToString(l,!1,0,s+1),s=c=r.cols-1,l--);return E+r.buffer.translateBufferLineToString(l,!1,s,c)}function _(s,a){var t=a?"O":"[";return d.C0.ESC+t+s}function i(s,a){s=Math.floor(s);for(var t="",n=0;n<s;n++)t+=a;return t}o.moveToCellSequence=function(s,a,t,n){var e,r=t.buffer.x,c=t.buffer.y;if(!t.buffer.hasScrollback)return function(E,w,S,v,x,g){return y(w,v,x,g).length===0?"":i(u(E,w,E,w-f(x,w),!1,x).length,_("D",g))}(r,c,0,a,t,n)+y(c,a,t,n)+function(E,w,S,v,x,g){var p;p=y(w,v,x,g).length>0?v-f(x,v):w;var m=v,b=function(O,R,k,I,N,P){var F;return F=y(k,I,N,P).length>0?I-f(N,I):R,O<k&&F<=I||O>=k&&F<I?"C":"D"}(E,w,S,v,x,g);return i(u(E,p,S,m,b==="C",x).length,_(b,g))}(r,c,s,a,t,n);if(c===a)return e=r>s?"D":"C",i(Math.abs(r-s),_(e,n));e=c>a?"D":"C";var l=Math.abs(c-a);return i(function(E,w){return w.cols-E}(c>a?s:r,t)+(l-1)*t.cols+1+((c>a?r:s)-1),_(e,n))}},function(B,o,C){"use strict";var d=this&&this.__decorate||function(u,_,i,s){var a,t=arguments.length,n=t<3?_:s===null?s=Object.getOwnPropertyDescriptor(_,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(u,_,i,s);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(n=(t<3?a(n):t>3?a(_,i,n):a(_,i))||n);return t>3&&n&&Object.defineProperty(_,i,n),n},y=this&&this.__param||function(u,_){return function(i,s){_(i,s,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var f=C(1),h=function(){function u(_){this._optionsService=_}return Object.defineProperty(u,"audioContext",{get:function(){if(!u._audioContext){var _=window.AudioContext||window.webkitAudioContext;if(!_)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;u._audioContext=new _}return u._audioContext},enumerable:!1,configurable:!0}),u.prototype.playBellSound=function(){var _=u.audioContext;if(_){var i=_.createBufferSource();_.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(s){i.buffer=s,i.connect(_.destination),i.start(0)})}},u.prototype._base64ToArrayBuffer=function(_){for(var i=window.atob(_),s=i.length,a=new Uint8Array(s),t=0;t<s;t++)a[t]=i.charCodeAt(t);return a.buffer},u.prototype._removeMimeType=function(_){return _.split(",")[1]},u=d([y(0,f.IOptionsService)],u)}();o.SoundService=h},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),f=this&&this.__decorate||function(t,n,e,r){var c,l=arguments.length,E=l<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(n,e,E):c(n,e))||E);return l>3&&E&&Object.defineProperty(n,e,E),E},h=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var u=C(2),_=C(7),i=C(5),s=C(1),a=function(t){function n(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(_.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(n,t),n.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},n.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},n.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()}},n.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))},n.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))},n.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},n.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)))},n.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},n.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())}},n.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},n.prototype._onClick=function(e){var r=this._findZoneEventAt(e),c=this._getSelectionLength();r&&c===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},n.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},n.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}},n=f([h(2,s.IBufferService),h(3,i.IMouseService),h(4,i.ISelectionService),h(5,s.IOptionsService)],n)}(u.Disposable);o.MouseZoneManager=a},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(n,e){return(d=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])})(n,e)},function(n,e){function r(){this.constructor=n}d(n,e),n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var f=C(18),h=C(11),u=C(31),_=C(7),i=C(2),s=C(32),a=C(17),t=function(n){function e(r,c){var l=n.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 s.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register(_.addDisposableDomListener(window,"resize",function(){return l._refreshRowsDimensions()})),l}return y(e,n),e.prototype.dispose=function(){n.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+=f.tooMuchOutput)),h.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,h.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);o.AccessibilityManager=t},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(l,E){return(d=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}d(l,E),l.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}),f=this&&this.__decorate||function(l,E,w,S){var v,x=arguments.length,g=x<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,E,w,S);else for(var p=l.length-1;p>=0;p--)(v=l[p])&&(g=(x<3?v(g):x>3?v(E,w,g):v(E,w))||g);return x>3&&g&&Object.defineProperty(E,w,g),g},h=this&&this.__param||function(l,E){return function(w,S){E(w,S,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var u=C(58),_=C(9),i=C(2),s=C(5),a=C(1),t=C(0),n=C(10),e=C(17),r=1,c=function(l){function E(w,S,v,x,g,p,m,b,O){var R=l.call(this)||this;return R._colors=w,R._element=S,R._screenElement=v,R._viewportElement=x,R._linkifier=g,R._linkifier2=p,R._charSizeService=m,R._optionsService=b,R._bufferService=O,R._terminalClass=r++,R._rowElements=[],R._rowContainer=document.createElement("div"),R._rowContainer.classList.add("xterm-rows"),R._rowContainer.style.lineHeight="normal",R._rowContainer.setAttribute("aria-hidden","true"),R._refreshRowElements(R._bufferService.cols,R._bufferService.rows),R._selectionContainer=document.createElement("div"),R._selectionContainer.classList.add("xterm-selection"),R._selectionContainer.setAttribute("aria-hidden","true"),R.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},R._updateDimensions(),R._injectCss(),R._rowFactory=new u.DomRendererRowFactory(document,R._optionsService,R._colors),R._element.classList.add("xterm-dom-renderer-owner-"+R._terminalClass),R._screenElement.appendChild(R._rowContainer),R._screenElement.appendChild(R._selectionContainer),R._linkifier.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R._linkifier2.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier2.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R}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-"+_.INVERTED_DEFAULT_COLOR+" { color: "+n.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+_.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,g=S[1]-this._bufferService.buffer.ydisp,p=Math.max(x,0),m=Math.min(g,this._bufferService.rows-1);if(!(p>=this._bufferService.rows||m<0)){var b=document.createDocumentFragment();if(v)b.appendChild(this._createSelectionElement(p,w[0],S[0],m-p+1));else{var O=x===p?w[0]:0,R=p===m?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(p,O,R));var k=m-p-1;if(b.appendChild(this._createSelectionElement(p+1,0,this._bufferService.cols,k)),p!==m){var I=g===m?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(m,0,I))}}this._selectionContainer.appendChild(b)}}},E.prototype._createSelectionElement=function(w,S,v,x){x===void 0&&(x=1);var g=document.createElement("div");return g.style.height=x*this.dimensions.actualCellHeight+"px",g.style.top=w*this.dimensions.actualCellHeight+"px",g.style.left=S*this.dimensions.actualCellWidth+"px",g.style.width=this.dimensions.actualCellWidth*(v-S)+"px",g},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),g=this._optionsService.options.cursorBlink,p=w;p<=S;p++){var m=this._rowElements[p];m.innerHTML="";var b=p+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.lines.get(b),R=this._optionsService.options.cursorStyle;m.appendChild(this._rowFactory.createRow(O,b===v,R,x,g,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,g,p){for(;w!==S||v!==x;){var m=this._rowElements[v];if(!m)return;var b=m.children[w];b&&(b.style.textDecoration=p?"underline":"none"),++w>=g&&(w=0,v++)}},E=f([h(6,s.ICharSizeService),h(7,a.IOptionsService),h(8,a.IBufferService)],E)}(i.Disposable);o.DomRenderer=c},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var d=C(9),y=C(3),f=C(4),h=C(10);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function i(s,a,t){this._document=s,this._optionsService=a,this._colors=t,this._workCell=new f.CellData}return i.prototype.setColors=function(s){this._colors=s},i.prototype.createRow=function(s,a,t,n,e,r,c){for(var l=this._document.createDocumentFragment(),E=0,w=Math.min(s.length,c)-1;w>=0;w--)if(s.loadCell(w,this._workCell).getCode()!==y.NULL_CELL_CODE||a&&w===n){E=w+1;break}for(w=0;w<E;w++){s.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===n)switch(v.classList.add(o.CURSOR_CLASS),e&&v.classList.add(o.CURSOR_BLINK_CLASS),t){case"bar":v.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":v.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:v.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&v.classList.add(o.BOLD_CLASS),this._workCell.isItalic()&&v.classList.add(o.ITALIC_CLASS),this._workCell.isDim()&&v.classList.add(o.DIM_CLASS),this._workCell.isUnderline()&&v.classList.add(o.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(),g=this._workCell.getFgColorMode(),p=this._workCell.getBgColor(),m=this._workCell.getBgColorMode(),b=!!this._workCell.isInverse();if(b){var O=x;x=p,p=O;var R=g;g=m,m=R}switch(g){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=h.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(v,this._colors.background,k)||this._addStyle(v,"color:#"+_(x.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(v,this._colors.background,this._colors.foreground)||b&&v.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}switch(m){case 16777216:case 33554432:v.classList.add("xterm-bg-"+p);break;case 50331648:this._addStyle(v,"background-color:#"+_(p.toString(16),"0",6));break;case 0:default:b&&v.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)}l.appendChild(v)}}return l},i.prototype._applyMinimumContrast=function(s,a,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var n=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return n===void 0&&(n=h.color.ensureContrastRatio(a,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,n!=null?n:null)),!!n&&(this._addStyle(s,"color:"+n.css),!0)},i.prototype._addStyle=function(s,a){s.setAttribute("style",""+(s.getAttribute("style")||"")+a+";")},i}();function _(i,s,a){for(;i.length<a;)i=s+i;return i}o.DomRendererRowFactory=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var d=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:["'",'"']};o.evaluateKeyboardEvent=function(f,h,u,_){var i={type:0,cancel:!1,key:void 0},s=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?i.key=h?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?i.key=h?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?i.key=h?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(i.key=h?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(f.shiftKey){i.key=d.C0.BS;break}if(f.altKey){i.key=d.C0.ESC+d.C0.DEL;break}i.key=d.C0.DEL;break;case 9:if(f.shiftKey){i.key=d.C0.ESC+"[Z";break}i.key=d.C0.HT,i.cancel=!0;break;case 13:i.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,i.cancel=!0;break;case 27:i.key=d.C0.ESC,f.altKey&&(i.key=d.C0.ESC+d.C0.ESC),i.cancel=!0;break;case 37:if(f.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"D",i.key===d.C0.ESC+"[1;3D"&&(i.key=d.C0.ESC+(u?"b":"[1;5D"))):i.key=h?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"C",i.key===d.C0.ESC+"[1;3C"&&(i.key=d.C0.ESC+(u?"f":"[1;5C"))):i.key=h?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"A",u||i.key!==d.C0.ESC+"[1;3A"||(i.key=d.C0.ESC+"[1;5A")):i.key=h?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;s?(i.key=d.C0.ESC+"[1;"+(s+1)+"B",u||i.key!==d.C0.ESC+"[1;3B"||(i.key=d.C0.ESC+"[1;5B")):i.key=h?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(i.key=d.C0.ESC+"[2~");break;case 46:i.key=s?d.C0.ESC+"[3;"+(s+1)+"~":d.C0.ESC+"[3~";break;case 36:i.key=s?d.C0.ESC+"[1;"+(s+1)+"H":h?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:i.key=s?d.C0.ESC+"[1;"+(s+1)+"F":h?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?i.type=2:i.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?i.type=3:i.key=d.C0.ESC+"[6~";break;case 112:i.key=s?d.C0.ESC+"[1;"+(s+1)+"P":d.C0.ESC+"OP";break;case 113:i.key=s?d.C0.ESC+"[1;"+(s+1)+"Q":d.C0.ESC+"OQ";break;case 114:i.key=s?d.C0.ESC+"[1;"+(s+1)+"R":d.C0.ESC+"OR";break;case 115:i.key=s?d.C0.ESC+"[1;"+(s+1)+"S":d.C0.ESC+"OS";break;case 116:i.key=s?d.C0.ESC+"[15;"+(s+1)+"~":d.C0.ESC+"[15~";break;case 117:i.key=s?d.C0.ESC+"[17;"+(s+1)+"~":d.C0.ESC+"[17~";break;case 118:i.key=s?d.C0.ESC+"[18;"+(s+1)+"~":d.C0.ESC+"[18~";break;case 119:i.key=s?d.C0.ESC+"[19;"+(s+1)+"~":d.C0.ESC+"[19~";break;case 120:i.key=s?d.C0.ESC+"[20;"+(s+1)+"~":d.C0.ESC+"[20~";break;case 121:i.key=s?d.C0.ESC+"[21;"+(s+1)+"~":d.C0.ESC+"[21~";break;case 122:i.key=s?d.C0.ESC+"[23;"+(s+1)+"~":d.C0.ESC+"[23~";break;case 123:i.key=s?d.C0.ESC+"[24;"+(s+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(u&&!_||!f.altKey||f.metaKey)u&&!f.altKey&&!f.ctrlKey&&f.metaKey?f.keyCode===65&&(i.type=1):f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?i.key=f.key:f.key&&f.ctrlKey&&f.key==="_"&&(i.key=d.C0.US);else{var a=y[f.keyCode],t=a&&a[f.shiftKey?1:0];if(t)i.key=d.C0.ESC+t;else if(f.keyCode>=65&&f.keyCode<=90){var n=f.ctrlKey?f.keyCode-64:f.keyCode+32;i.key=d.C0.ESC+String.fromCharCode(n)}}else f.keyCode>=65&&f.keyCode<=90?i.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?i.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?i.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?i.key=d.C0.DEL:f.keyCode===219?i.key=d.C0.ESC:f.keyCode===220?i.key=d.C0.FS:f.keyCode===221&&(i.key=d.C0.GS)}return i}},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(r,c){return(d=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}d(r,c),r.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}),f=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},h=this&&this.__param||function(r,c){return function(l,E){c(l,E,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var u=C(31),_=C(0),i=C(2),s=C(32),a=C(7),t=C(1),n=C(5),e=function(r){function c(l,E,w,S,v,x){var g=r.call(this)||this;if(g._renderer=l,g._rowCount=E,g._isPaused=!1,g._needsFullRefresh=!1,g._isNextRenderRedrawOnly=!0,g._needsSelectionRefresh=!1,g._canvasWidth=0,g._canvasHeight=0,g._selectionState={start:void 0,end:void 0,columnSelectMode:!1},g._onDimensionsChange=new _.EventEmitter,g._onRender=new _.EventEmitter,g._onRefreshRequest=new _.EventEmitter,g.register({dispose:function(){return g._renderer.dispose()}}),g._renderDebouncer=new u.RenderDebouncer(function(m,b){return g._renderRows(m,b)}),g.register(g._renderDebouncer),g._screenDprMonitor=new s.ScreenDprMonitor,g._screenDprMonitor.setListener(function(){return g.onDevicePixelRatioChange()}),g.register(g._screenDprMonitor),g.register(x.onResize(function(m){return g._fullRefresh()})),g.register(S.onOptionChange(function(){return g._renderer.onOptionsChanged()})),g.register(v.onCharSizeChange(function(){return g.onCharSizeChanged()})),g._renderer.onRequestRedraw(function(m){return g.refreshRows(m.start,m.end,!0)}),g.register(a.addDisposableDomListener(window,"resize",function(){return g.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var p=new IntersectionObserver(function(m){return g._onIntersectionChange(m[m.length-1])},{threshold:0});p.observe(w),g.register({dispose:function(){return p.disconnect()}})}return g}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=f([h(3,t.IOptionsService),h(4,n.ICharSizeService),h(5,t.IBufferService)],c)}(i.Disposable);o.RenderService=e},function(B,o,C){"use strict";var d=this&&this.__decorate||function(i,s,a,t){var n,e=arguments.length,r=e<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,s,a,t);else for(var c=i.length-1;c>=0;c--)(n=i[c])&&(r=(e<3?n(r):e>3?n(s,a,r):n(s,a))||r);return e>3&&r&&Object.defineProperty(s,a,r),r},y=this&&this.__param||function(i,s){return function(a,t){s(a,t,i)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var f=C(1),h=C(0),u=function(){function i(s,a,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new h.EventEmitter,this._measureStrategy=new _(s,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 s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())},i=d([y(2,f.IOptionsService)],i)}();o.CharSizeService=u;var _=function(){function i(s,a,t){this._document=s,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 s=this._measureElement.getBoundingClientRect();return s.width!==0&&s.height!==0&&(this._result.width=s.width,this._result.height=Math.ceil(s.height)),this._result},i}()},function(B,o,C){"use strict";var d=this&&this.__decorate||function(_,i,s,a){var t,n=arguments.length,e=n<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,s):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(_,i,s,a);else for(var r=_.length-1;r>=0;r--)(t=_[r])&&(e=(n<3?t(e):n>3?t(i,s,e):t(i,s))||e);return n>3&&e&&Object.defineProperty(i,s,e),e},y=this&&this.__param||function(_,i){return function(s,a){i(s,a,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var f=C(5),h=C(30),u=function(){function _(i,s){this._renderService=i,this._charSizeService=s}return _.prototype.getCoords=function(i,s,a,t,n){return h.getCoords(i,s,a,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,n)},_.prototype.getRawByteCoords=function(i,s,a,t){var n=this.getCoords(i,s,a,t);return h.getRawByteCoords(n)},_=d([y(0,f.IRenderService),y(1,f.ICharSizeService)],_)}();o.MouseService=u},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),f=this&&this.__decorate||function(t,n,e,r){var c,l=arguments.length,E=l<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(n,e,E):c(n,e))||E);return l>3&&E&&Object.defineProperty(n,e,E),E},h=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var u=C(1),_=C(0),i=C(2),s=C(7),a=function(t){function n(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 _.EventEmitter),r._onHideLinkUnderline=r.register(new _.EventEmitter),r.register(i.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return y(n,t),Object.defineProperty(n.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),n.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)}}},n.prototype.attachToDom=function(e,r,c){var l=this;this._element=e,this._mouseService=r,this._renderService=c,this.register(s.addDisposableDomListener(this._element,"mouseleave",function(){l._isMouseOut=!0,l._clearCurrentLink()})),this.register(s.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(s.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},n.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)}}},n.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))},n.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,g;if(!c._isMouseOut){var p=v==null?void 0:v.map(function(m){return{link:m}});(x=c._activeProviderReplies)===null||x===void 0||x.set(w,p),l=c._checkLinkProviderResult(w,e,l),((g=c._activeProviderReplies)===null||g===void 0?void 0:g.size)===c._linkProviders.length&&c._removeIntersectingLinks(e.y,c._activeProviderReplies)}})})},n.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,g=v;g<=x;g++){if(c.has(g)){E.splice(w--,1);break}c.add(g)}}},n.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(p){return E._linkAtPosition(p.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 g=(l=this._activeProviderReplies.get(v))===null||l===void 0?void 0:l.find(function(p){return E._linkAtPosition(p.link,r)});if(g){c=!0,this._handleNewLink(g);break}}return c},n.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)}},n.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))},n.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)})))}},n.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)},n.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)},n.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)},n.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},n.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}},n.prototype._createLinkUnderlineEvent=function(e,r,c,l,E){return{x1:e,y1:r,x2:c,y2:l,cols:this._bufferService.cols,fg:E}},n=f([h(0,u.IBufferService)],n)}(i.Disposable);o.Linkifier2=a},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var d=function(){function y(f){this._textarea=f}return Object.defineProperty(y.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),y}();o.CoreBrowserService=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(v,x){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var m in p)p.hasOwnProperty(m)&&(g[m]=p[m])})(v,x)},function(v,x){function g(){this.constructor=v}d(v,x),v.prototype=x===null?Object.create(x):(g.prototype=x.prototype,new g)});Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var f=C(2),h=C(1),u=C(66),_=C(67),i=C(68),s=C(74),a=C(75),t=C(0),n=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(g){var p=v.call(this)||this;return p._onBinary=new t.EventEmitter,p._onData=new t.EventEmitter,p._onLineFeed=new t.EventEmitter,p._onResize=new t.EventEmitter,p._onScroll=new t.EventEmitter,p._instantiationService=new u.InstantiationService,p.optionsService=new s.OptionsService(g),p._instantiationService.setService(h.IOptionsService,p.optionsService),p._bufferService=p.register(p._instantiationService.createInstance(i.BufferService)),p._instantiationService.setService(h.IBufferService,p._bufferService),p._logService=p._instantiationService.createInstance(_.LogService),p._instantiationService.setService(h.ILogService,p._logService),p._coreService=p.register(p._instantiationService.createInstance(a.CoreService,function(){return p.scrollToBottom()})),p._instantiationService.setService(h.ICoreService,p._coreService),p._coreMouseService=p._instantiationService.createInstance(n.CoreMouseService),p._instantiationService.setService(h.ICoreMouseService,p._coreMouseService),p._dirtyRowService=p._instantiationService.createInstance(e.DirtyRowService),p._instantiationService.setService(h.IDirtyRowService,p._dirtyRowService),p.unicodeService=p._instantiationService.createInstance(r.UnicodeService),p._instantiationService.setService(h.IUnicodeService,p.unicodeService),p._charsetService=p._instantiationService.createInstance(c.CharsetService),p._instantiationService.setService(h.ICharsetService,p._charsetService),p._inputHandler=new E.InputHandler(p._bufferService,p._charsetService,p._coreService,p._dirtyRowService,p._logService,p.optionsService,p._coreMouseService,p.unicodeService),p.register(t.forwardEvent(p._inputHandler.onLineFeed,p._onLineFeed)),p.register(p._inputHandler),p.register(t.forwardEvent(p._bufferService.onResize,p._onResize)),p.register(t.forwardEvent(p._coreService.onData,p._onData)),p.register(t.forwardEvent(p._coreService.onBinary,p._onBinary)),p.register(p.optionsService.onOptionChange(function(m){return p._updateOptions(m)})),p._writeBuffer=new w.WriteBuffer(function(m){return p._inputHandler.parse(m)}),p}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 g;this._isDisposed||(v.prototype.dispose.call(this),(g=this._windowsMode)===null||g===void 0||g.dispose(),this._windowsMode=void 0)},x.prototype.write=function(g,p){this._writeBuffer.write(g,p)},x.prototype.writeSync=function(g){this._writeBuffer.writeSync(g)},x.prototype.resize=function(g,p){isNaN(g)||isNaN(p)||(g=Math.max(g,i.MINIMUM_COLS),p=Math.max(p,i.MINIMUM_ROWS),this._bufferService.resize(g,p))},x.prototype.scroll=function(g,p){p===void 0&&(p=!1);var m,b=this._bufferService.buffer;(m=this._cachedBlankLine)&&m.length===this.cols&&m.getFg(0)===g.fg&&m.getBg(0)===g.bg||(m=b.getBlankLine(g,p),this._cachedBlankLine=m),m.isWrapped=p;var O=b.ybase+b.scrollTop,R=b.ybase+b.scrollBottom;if(b.scrollTop===0){var k=b.lines.isFull;R===b.lines.length-1?k?b.lines.recycle().copyFrom(m):b.lines.push(m.clone()):b.lines.splice(R+1,0,m.clone()),k?this._bufferService.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this._bufferService.isUserScrolling||b.ydisp++)}else{var I=R-O+1;b.lines.shiftElements(O+1,I-1,-1),b.lines.set(R,m.clone())}this._bufferService.isUserScrolling||(b.ydisp=b.ybase),this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom),this._onScroll.fire(b.ydisp)},x.prototype.scrollLines=function(g,p){var m=this._bufferService.buffer;if(g<0){if(m.ydisp===0)return;this._bufferService.isUserScrolling=!0}else g+m.ydisp>=m.ybase&&(this._bufferService.isUserScrolling=!1);var b=m.ydisp;m.ydisp=Math.max(Math.min(m.ydisp+g,m.ybase),0),b!==m.ydisp&&(p||this._onScroll.fire(m.ydisp))},x.prototype.scrollPages=function(g){this.scrollLines(g*(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(g){var p=g-this._bufferService.buffer.ydisp;p!==0&&this.scrollLines(p)},x.prototype.addEscHandler=function(g,p){return this._inputHandler.addEscHandler(g,p)},x.prototype.addDcsHandler=function(g,p){return this._inputHandler.addDcsHandler(g,p)},x.prototype.addCsiHandler=function(g,p){return this._inputHandler.addCsiHandler(g,p)},x.prototype.addOscHandler=function(g,p){return this._inputHandler.addOscHandler(g,p)},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(g){var p;switch(g){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((p=this._windowsMode)===null||p===void 0||p.dispose(),this._windowsMode=void 0)}},x.prototype._enableWindowsMode=function(){var g=this;if(!this._windowsMode){var p=[];p.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),p.push(this.addCsiHandler({final:"H"},function(){return l.updateWindowsModeWrappedState(g._bufferService),!1})),this._windowsMode={dispose:function(){for(var m=0,b=p;m<b.length;m++)b[m].dispose()}}}},x}(f.Disposable);o.CoreTerminal=S},function(B,o,C){"use strict";var d=this&&this.__spreadArrays||function(){for(var _=0,i=0,s=arguments.length;i<s;i++)_+=arguments[i].length;var a=Array(_),t=0;for(i=0;i<s;i++)for(var n=arguments[i],e=0,r=n.length;e<r;e++,t++)a[t]=n[e];return a};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var y=C(1),f=C(14),h=function(){function _(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];this._entries=new Map;for(var a=0,t=i;a<t.length;a++){var n=t[a],e=n[0],r=n[1];this.set(e,r)}}return _.prototype.set=function(i,s){var a=this._entries.get(i);return this._entries.set(i,s),a},_.prototype.forEach=function(i){this._entries.forEach(function(s,a){return i(a,s)})},_.prototype.has=function(i){return this._entries.has(i)},_.prototype.get=function(i){return this._entries.get(i)},_}();o.ServiceCollection=h;var u=function(){function _(){this._services=new h,this._services.set(y.IInstantiationService,this)}return _.prototype.setService=function(i,s){this._services.set(i,s)},_.prototype.getService=function(i){return this._services.get(i)},_.prototype.createInstance=function(i){for(var s=[],a=1;a<arguments.length;a++)s[a-1]=arguments[a];for(var t=f.getServiceDependencies(i).sort(function(w,S){return w.index-S.index}),n=[],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+".");n.push(l)}var E=t.length>0?t[0].index:s.length;if(s.length!==E)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(E+1)+" conflicts with "+s.length+" static arguments");return new(i.bind.apply(i,d([void 0],d(s,n))))},_}();o.InstantiationService=u},function(B,o,C){"use strict";var d=this&&this.__decorate||function(s,a,t,n){var e,r=arguments.length,c=r<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(s,a,t,n);else for(var l=s.length-1;l>=0;l--)(e=s[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(s,a){return function(t,n){a(t,n,s)}},f=this&&this.__spreadArrays||function(){for(var s=0,a=0,t=arguments.length;a<t;a++)s+=arguments[a].length;var n=Array(s),e=0;for(a=0;a<t;a++)for(var r=arguments[a],c=0,l=r.length;c<l;c++,e++)n[e]=r[c];return n};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=o.LogLevel=void 0;var h,u=C(1);(function(s){s[s.DEBUG=0]="DEBUG",s[s.INFO=1]="INFO",s[s.WARN=2]="WARN",s[s.ERROR=3]="ERROR",s[s.OFF=4]="OFF"})(h=o.LogLevel||(o.LogLevel={}));var _={debug:h.DEBUG,info:h.INFO,warn:h.WARN,error:h.ERROR,off:h.OFF},i=function(){function s(a){var t=this;this._optionsService=a,this._updateLogLevel(),this._optionsService.onOptionChange(function(n){n==="logLevel"&&t._updateLogLevel()})}return s.prototype._updateLogLevel=function(){this._logLevel=_[this._optionsService.options.logLevel]},s.prototype._evalLazyOptionalParams=function(a){for(var t=0;t<a.length;t++)typeof a[t]=="function"&&(a[t]=a[t]())},s.prototype._log=function(a,t,n){this._evalLazyOptionalParams(n),a.call.apply(a,f([console,"xterm.js: "+t],n))},s.prototype.debug=function(a){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=h.DEBUG&&this._log(console.log,a,t)},s.prototype.info=function(a){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=h.INFO&&this._log(console.info,a,t)},s.prototype.warn=function(a){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=h.WARN&&this._log(console.warn,a,t)},s.prototype.error=function(a){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=h.ERROR&&this._log(console.error,a,t)},s=d([y(0,u.IOptionsService)],s)}();o.LogService=i},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(t,n){return(d=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,n)},function(t,n){function e(){this.constructor=t}d(t,n),t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}),f=this&&this.__decorate||function(t,n,e,r){var c,l=arguments.length,E=l<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(n,e,E):c(n,e))||E);return l>3&&E&&Object.defineProperty(n,e,E),E},h=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var u=C(1),_=C(69),i=C(0),s=C(2);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var a=function(t){function n(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,o.MINIMUM_COLS),r.rows=Math.max(e.options.rows,o.MINIMUM_ROWS),r.buffers=new _.BufferSet(e,r),r}return y(n,t),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},n.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})},n.prototype.reset=function(){this.buffers.dispose(),this.buffers=new _.BufferSet(this._optionsService,this),this.isUserScrolling=!1},n=f([h(0,u.IOptionsService)],n)}(s.Disposable);o.BufferService=a},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(_,i){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var t in a)a.hasOwnProperty(t)&&(s[t]=a[t])})(_,i)},function(_,i){function s(){this.constructor=_}d(_,i),_.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var f=C(70),h=C(0),u=function(_){function i(s,a){var t=_.call(this)||this;return t._onBufferActivate=t.register(new h.EventEmitter),t._normal=new f.Buffer(!0,s,a),t._normal.fillViewportRows(),t._alt=new f.Buffer(!1,s,a),t._activeBuffer=t._normal,t.setupTabStops(),t}return y(i,_),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(s){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(s),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},i.prototype.resize=function(s,a){this._normal.resize(s,a),this._alt.resize(s,a)},i.prototype.setupTabStops=function(s){this._normal.setupTabStops(s),this._alt.setupTabStops(s)},i}(C(2).Disposable);o.BufferSet=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var d=C(71),y=C(16),f=C(4),h=C(3),u=C(72),_=C(73),i=C(20),s=C(6);o.MAX_BUFFER_SIZE=4294967295;var a=function(){function n(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=f.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]),this._whitespaceCell=f.CellData.fromCharData([0,h.WHITESPACE_CELL_CHAR,h.WHITESPACE_CELL_WIDTH,h.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return n.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 s.ExtendedAttrs),this._nullCell},n.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 s.ExtendedAttrs),this._whitespaceCell},n.prototype.getBlankLine=function(e,r){return new y.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(n.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),n.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:r},n.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))}},n.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},n.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(n.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),n.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},n.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)}},n.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)},n.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 g=v[v.length-1].getTrimmedLength(),p=u.reflowSmallerGetNewLineLengths(v,this._cols,e),m=p.length-v.length,b=void 0;b=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+m):Math.max(0,this.lines.length-this.lines.maxLength+m);for(var O=[],R=0;R<m;R++){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=p.length-1,N=p[I];N===0&&(N=p[--I]);for(var P=v.length-m-1,F=g;P>=0;){var A=Math.min(F,N);if(v[I].copyCellsFrom(v[P],F-A,N-A,A,!0),(N-=A)===0&&(N=p[--I]),(F-=A)===0){P--;var D=Math.max(P,0);F=u.getWrappedLineTrimmedLength(v,D,this._cols)}}for(R=0;R<v.length;R++)p[R]<e&&v[R].setCell(p[R],c);for(var L=m-b;L-- >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+m,this.ybase+r-1)}}}if(l.length>0){var M=[],T=[];for(R=0;R<this.lines.length;R++)T.push(this.lines.get(R));var j=this.lines.length,W=j-1,q=0,Z=l[q];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);var G=0;for(R=Math.min(this.lines.maxLength-1,j+E-1);R>=0;R--)if(Z&&Z.start>W+G){for(var H=Z.newLines.length-1;H>=0;H--)this.lines.set(R--,Z.newLines[H]);R++,M.push({index:W+1,amount:Z.newLines.length}),G+=Z.newLines.length,Z=l[++q]}else this.lines.set(R,T[W--]);var z=0;for(R=M.length-1;R>=0;R--)M[R].index+=z,this.lines.onInsertEmitter.fire(M[R]),z+=M[R].amount;var X=Math.max(0,j+E-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}},n.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)[h.CHAR_DATA_WIDTH_INDEX]&&(r-=l.get(w)[h.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,w];e++}return[e,0]},n.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):""},n.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}},n.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},n.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},n.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},n.prototype.addMarker=function(e){var r=this,c=new _.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},n.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},n.prototype.iterator=function(e,r,c,l,E){return new t(this,e,r,c,l,E)},n}();o.Buffer=a;var t=function(){function n(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 n.prototype.hasNext=function(){return this._current<this._endIndex},n.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}},n}();o.BufferStringIterator=t},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var d=C(0),y=function(){function f(h){this._maxLength=h,this.onDeleteEmitter=new d.EventEmitter,this.onInsertEmitter=new d.EventEmitter,this.onTrimEmitter=new d.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(f.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"maxLength",{get:function(){return this._maxLength},set:function(h){if(this._maxLength!==h){for(var u=new Array(h),_=0;_<Math.min(h,this.length);_++)u[_]=this._array[this._getCyclicIndex(_)];this._array=u,this._maxLength=h,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"length",{get:function(){return this._length},set:function(h){if(h>this._length)for(var u=this._length;u<h;u++)this._array[u]=void 0;this._length=h},enumerable:!1,configurable:!0}),f.prototype.get=function(h){return this._array[this._getCyclicIndex(h)]},f.prototype.set=function(h,u){this._array[this._getCyclicIndex(h)]=u},f.prototype.push=function(h){this._array[this._getCyclicIndex(this._length)]=h,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},f.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(f.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),f.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},f.prototype.splice=function(h,u){for(var _=[],i=2;i<arguments.length;i++)_[i-2]=arguments[i];if(u){for(var s=h;s<this._length-u;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+u)];this._length-=u}for(s=this._length-1;s>=h;s--)this._array[this._getCyclicIndex(s+_.length)]=this._array[this._getCyclicIndex(s)];for(s=0;s<_.length;s++)this._array[this._getCyclicIndex(h+s)]=_[s];if(this._length+_.length>this._maxLength){var a=this._length+_.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=_.length},f.prototype.trimStart=function(h){h>this._length&&(h=this._length),this._startIndex+=h,this._length-=h,this.onTrimEmitter.fire(h)},f.prototype.shiftElements=function(h,u,_){if(!(u<=0)){if(h<0||h>=this._length)throw new Error("start argument out of range");if(h+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(var i=u-1;i>=0;i--)this.set(h+i+_,this.get(h+i));var s=h+u+_-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<u;i++)this.set(h+i+_,this.get(h+i))}},f.prototype._getCyclicIndex=function(h){return(this._startIndex+h)%this._maxLength},f}();o.CircularList=y},function(B,o,C){"use strict";function d(y,f,h){if(f===y.length-1)return y[f].getTrimmedLength();var u=!y[f].hasContent(h-1)&&y[f].getWidth(h-1)===1,_=y[f+1].getWidth(0)===2;return u&&_?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(y,f,h,u,_){for(var i=[],s=0;s<y.length-1;s++){var a=s,t=y.get(++a);if(t.isWrapped){for(var n=[y.get(s)];a<y.length&&t.isWrapped;)n.push(t),t=y.get(++a);if(u>=s&&u<a)s+=n.length-1;else{for(var e=0,r=d(n,e,f),c=1,l=0;c<n.length;){var E=d(n,c,f),w=E-l,S=h-r,v=Math.min(w,S);n[e].copyCellsFrom(n[c],l,r,v,!1),(r+=v)===h&&(e++,r=0),(l+=v)===E&&(c++,l=0),r===0&&e!==0&&n[e-1].getWidth(h-1)===2&&(n[e].copyCellsFrom(n[e-1],h-1,r++,1,!1),n[e-1].setCell(h-1,_))}n[e].replaceCells(r,h,_);for(var x=0,g=n.length-1;g>0&&(g>e||n[g].getTrimmedLength()===0);g--)x++;x>0&&(i.push(s+n.length-x),i.push(x)),s+=n.length-1}}}return i},o.reflowLargerCreateNewLayout=function(y,f){for(var h=[],u=0,_=f[u],i=0,s=0;s<y.length;s++)if(_===s){var a=f[++u];y.onDeleteEmitter.fire({index:s-i,amount:a}),s+=a-1,i+=a,_=f[++u]}else h.push(s);return{layout:h,countRemoved:i}},o.reflowLargerApplyNewLayout=function(y,f){for(var h=[],u=0;u<f.length;u++)h.push(y.get(f[u]));for(u=0;u<h.length;u++)y.set(u,h[u]);y.length=f.length},o.reflowSmallerGetNewLineLengths=function(y,f,h){for(var u=[],_=y.map(function(r,c){return d(y,c,f)}).reduce(function(r,c){return r+c}),i=0,s=0,a=0;a<_;){if(_-a<h){u.push(_-a);break}i+=h;var t=d(y,s,f);i>t&&(i-=t,s++);var n=y[s].getWidth(i-1)===2;n&&i--;var e=n?h-1:h;u.push(e),a+=e}return u},o.getWrappedLineTrimmedLength=d},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(u,_){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var a in s)s.hasOwnProperty(a)&&(i[a]=s[a])})(u,_)},function(u,_){function i(){this.constructor=u}d(u,_),u.prototype=_===null?Object.create(_):(i.prototype=_.prototype,new i)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var f=C(0),h=function(u){function _(i){var s=u.call(this)||this;return s.line=i,s._id=_._nextId++,s.isDisposed=!1,s._onDispose=new f.EventEmitter,s}return y(_,u),Object.defineProperty(_.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),_.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},_._nextId=1,_}(C(2).Disposable);o.Marker=h},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var d=C(0),y=C(11),f=C(33);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:o.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 h=["cols","rows"],u=function(){function _(i){this._onOptionChange=new d.EventEmitter,this.options=f.clone(o.DEFAULT_OPTIONS);for(var s=0,a=Object.keys(i);s<a.length;s++){var t=a[s];if(t in this.options){var n=i[t];this.options[t]=n}}}return Object.defineProperty(_.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),_.prototype.setOption=function(i,s){if(!(i in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');if(h.indexOf(i)!==-1)throw new Error('Option "'+i+'" can only be set in the constructor');this.options[i]!==s&&(s=this._sanitizeAndValidateOption(i,s),this.options[i]!==s&&(this.options[i]=s,this._onOptionChange.fire(i)))},_.prototype._sanitizeAndValidateOption=function(i,s){switch(i){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":s||(s=o.DEFAULT_OPTIONS[i]);break;case"cursorWidth":s=Math.floor(s);case"lineHeight":case"tabStopWidth":if(s<1)throw new Error(i+" cannot be less than 1, value: "+s);break;case"minimumContrastRatio":s=Math.max(1,Math.min(21,Math.round(10*s)/10));break;case"scrollback":if((s=Math.min(s,4294967295))<0)throw new Error(i+" cannot be less than 0, value: "+s);break;case"fastScrollSensitivity":case"scrollSensitivity":if(s<=0)throw new Error(i+" cannot be less than or equal to 0, value: "+s)}return s},_.prototype.getOption=function(i){if(!(i in o.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');return this.options[i]},_}();o.OptionsService=u},function(B,o,C){"use strict";var d,y=this&&this.__extends||(d=function(e,r){return(d=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}d(e,r),e.prototype=r===null?Object.create(r):(c.prototype=r.prototype,new c)}),f=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},h=this&&this.__param||function(e,r){return function(c,l){r(c,l,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var u=C(1),_=C(0),i=C(33),s=C(2),a=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),n=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 _.EventEmitter),S._onUserInput=S.register(new _.EventEmitter),S._onBinary=S.register(new _.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=f([h(1,u.IBufferService),h(2,u.ILogService),h(3,u.IOptionsService)],r)}(s.Disposable);o.CoreService=n},function(B,o,C){"use strict";var d=this&&this.__decorate||function(t,n,e,r){var c,l=arguments.length,E=l<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,n,e,r);else for(var w=t.length-1;w>=0;w--)(c=t[w])&&(E=(l<3?c(E):l>3?c(n,e,E):c(n,e))||E);return l>3&&E&&Object.defineProperty(n,e,E),E},y=this&&this.__param||function(t,n){return function(e,r){n(e,r,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var f=C(1),h=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 _(t,n){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||n||(e|=3)),e}var i=String.fromCharCode,s={DEFAULT:function(t){var n=[_(t,!1)+32,t.col+32,t.row+32];return n[0]>255||n[1]>255||n[2]>255?"":"\x1B[M"+i(n[0])+i(n[1])+i(n[2])},SGR:function(t){var n=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+_(t,!0)+";"+t.col+";"+t.row+n}},a=function(){function t(n,e){this._bufferService=n,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new h.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(s);E<w.length;E++){var S=w[E];this.addEncoding(S,s[S])}this.reset()}return t.prototype.addProtocol=function(n,e){this._protocols[n]=e},t.prototype.addEncoding=function(n,e){this._encodings[n]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(n){if(!this._protocols[n])throw new Error('unknown protocol "'+n+'"');this._activeProtocol=n,this._onProtocolChange.fire(this._protocols[n].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(n){if(!this._encodings[n])throw new Error('unknown encoding "'+n+'"');this._activeEncoding=n},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(n){if(n.col<0||n.col>=this._bufferService.cols||n.row<0||n.row>=this._bufferService.rows||n.button===4&&n.action===32||n.button===3&&n.action!==32||n.button!==4&&(n.action===2||n.action===3)||(n.col++,n.row++,n.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,n))||!this._protocols[this._activeProtocol].restrict(n))return!1;var e=this._encodings[this._activeEncoding](n);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=n,!0},t.prototype.explainEvents=function(n){return{down:!!(1&n),up:!!(2&n),drag:!!(4&n),move:!!(8&n),wheel:!!(16&n)}},t.prototype._compareEvents=function(n,e){return n.col===e.col&&n.row===e.row&&n.button===e.button&&n.action===e.action&&n.ctrl===e.ctrl&&n.alt===e.alt&&n.shift===e.shift},t=d([y(0,f.IBufferService),y(1,f.ICoreService)],t)}();o.CoreMouseService=a},function(B,o,C){"use strict";var d=this&&this.__decorate||function(u,_,i,s){var a,t=arguments.length,n=t<3?_:s===null?s=Object.getOwnPropertyDescriptor(_,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(u,_,i,s);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(n=(t<3?a(n):t>3?a(_,i,n):a(_,i))||n);return t>3&&n&&Object.defineProperty(_,i,n),n},y=this&&this.__param||function(u,_){return function(i,s){_(i,s,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var f=C(1),h=function(){function u(_){this._bufferService=_,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(_){_<this._start?this._start=_:_>this._end&&(this._end=_)},u.prototype.markRangeDirty=function(_,i){if(_>i){var s=_;_=i,i=s}_<this._start&&(this._start=_),i>this._end&&(this._end=i)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=d([y(0,f.IBufferService)],u)}();o.DirtyRowService=h},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var d=C(0),y=C(79),f=function(){function h(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter;var u=new y.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}return Object.defineProperty(h.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(h.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}),h.prototype.register=function(u){this._providers[u.version]=u},h.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},h.prototype.getStringCellWidth=function(u){for(var _=0,i=u.length,s=0;s<i;++s){var a=u.charCodeAt(s);if(55296<=a&&a<=56319){if(++s>=i)return _+this.wcwidth(a);var t=u.charCodeAt(s);56320<=t&&t<=57343?a=1024*(a-55296)+t-56320+65536:_+=this.wcwidth(t)}_+=this.wcwidth(a)}return _},h}();o.UnicodeService=f},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var d,y=C(15),f=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],u=function(){function _(){if(this.version="6",!d){d=new Uint8Array(65536),y.fill(d,1),d[0]=0,y.fill(d,0,1,32),y.fill(d,0,127,160),y.fill(d,2,4352,4448),d[9001]=2,d[9002]=2,y.fill(d,2,11904,42192),d[12351]=1,y.fill(d,2,44032,55204),y.fill(d,2,63744,64256),y.fill(d,2,65040,65050),y.fill(d,2,65072,65136),y.fill(d,2,65280,65377),y.fill(d,2,65504,65511);for(var i=0;i<f.length;++i)y.fill(d,0,f[i][0],f[i][1]+1)}}return _.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?d[i]:function(s,a){var t,n=0,e=a.length-1;if(s<a[0][0]||s>a[e][1])return!1;for(;e>=n;)if(s>a[t=n+e>>1][1])n=t+1;else{if(!(s<a[t][0]))return!0;e=t-1}return!1}(i,h)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},_}();o.UnicodeV6=u},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var d=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(f){this.glevel=f,this.charset=this._charsets[f]},y.prototype.setgCharset=function(f,h){this._charsets[f]=h,this.glevel===f&&(this.charset=h)},y}();o.CharsetService=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var d=C(3);o.updateWindowsModeWrappedState=function(y){var f=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),h=f==null?void 0:f.get(y.cols-1),u=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);u&&h&&(u.isWrapped=h[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&h[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var d=function(){function y(f){this._action=f,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return y.prototype.writeSync=function(f){if(this._writeBuffer.length){for(var h=this._bufferOffset;h<this._writeBuffer.length;++h){var u=this._writeBuffer[h],_=this._callbacks[h];this._action(u),_&&_()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(f)},y.prototype.write=function(f,h){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+=f.length,this._writeBuffer.push(f),this._callbacks.push(h)},y.prototype._innerWrite=function(){for(var f=this,h=Date.now();this._writeBuffer.length>this._bufferOffset;){var u=this._writeBuffer[this._bufferOffset],_=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(u),this._pendingData-=u.length,_&&_(),Date.now()-h>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return f._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},y}();o.WriteBuffer=d},function(B,o,C){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var d=function(){function y(){this._addons=[]}return y.prototype.dispose=function(){for(var f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()},y.prototype.loadAddon=function(f,h){var u=this,_={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(_),h.dispose=function(){return u._wrappedAddonDispose(_)},h.activate(f)},y.prototype._wrappedAddonDispose=function(f){if(!f.isDisposed){for(var h=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===f){h=u;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(h,1)}},y}();o.AddonManager=d}])})}}]);
|