|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5111],{40001:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(5016),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},73331:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(5016),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},15277:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(5016),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},47472:function(Te,D,c){"use strict";c.d(D,{Z:function(){return r}});var _=c(5016),x=c(59301),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},h=m,o=c(7657),u=function(a,t){return x.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:h}))},d=x.forwardRef(u),r=d},98119:function(){"use strict"},84470:function(){"use strict"},53537:function(Te,D,c){"use strict";c.d(D,{G0:function(){return Ie},JW:function(){return Le},Jd:function(){return I},Kl:function(){return Se},L5:function(){return s},MH:function(){return ce},MI:function(){return Re},Qo:function(){return v},SO:function(){return n},Tf:function(){return b},VT:function(){return Z},XO:function(){return f},Xy:function(){return E},Y0:function(){return U},Ye:function(){return Fe},Yv:function(){return Me},ZH:function(){return ke},am:function(){return K},bD:function(){return Ke},eA:function(){return C},fA:function(){return he},fY:function(){return k},g6:function(){return e},g7:function(){return Xe},gT:function(){return O},gn:function(){return Ae},h$:function(){return Oe},hG:function(){return g},i8:function(){return ie},j3:function(){return ye},lH:function(){return X},li:function(){return l},n4:function(){return p},pU:function(){return N},qK:function(){return y},sA:function(){return pe},sP:function(){return Q},t$:function(){return z},wj:function(){return De},zl:function(){return S}});var _=c(38986),x=c(51257),m=Object.defineProperty,h=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(te,ne,Ee)=>ne in te?m(te,ne,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):te[ne]=Ee,r=(te,ne)=>{for(var Ee in ne||(ne={}))o.call(ne,Ee)&&d(te,Ee,ne[Ee]);if(h)for(var Ee of h(ne))u.call(ne,Ee)&&d(te,Ee,ne[Ee]);return te},i=(te,ne,Ee)=>new Promise((xe,de)=>{var ue=F=>{try{G(Ee.next(F))}catch(H){de(H)}},ae=F=>{try{G(Ee.throw(F))}catch(H){de(H)}},G=F=>F.done?xe(F.value):Promise.resolve(F.value).then(ue,ae);G((Ee=Ee.apply(te,ne)).next())});const a=(0,x.oP)(),t={};a!=null&&a.homework_common_id&&(t.homework_common_id=a==null?void 0:a.homework_common_id),a!=null&&a.exercisesId&&(t.exercise_id=a==null?void 0:a.exercisesId),console.log(a,t,"urlParamsAll");function f(te,ne){return(0,_.U2)(`tasks/${te}.json`,r(r({},ne),t))}function e(te,ne={}){return(0,_.U2)(`myshixuns/${te}/challenges.json`,r({},ne))}function n(te,ne){return(0,_.U2)(`myshixuns/${te}/subject_challenges.json`,ne)}function s(te,ne,Ee){return(0,_.U2)(`tasks/${te}/star.json`,{shixun_id:ne,star:Ee})}function l(te,ne){return ne.path&&(ne.path=encodeURIComponent(ne.path)),(0,_.U2)(`tasks/${te}/rep_content.json`,r(r({},ne),t))}function p(te,ne){return(0,_.v_)(`myshixuns/${te}/update_file.json`,r(r({},ne),t))}function y(te,ne){return(0,_.U2)(`tasks/${te}/reset_original_code.json`,r(r({},ne),t))}function b(te,ne){return(0,_.v_)(`myshixuns/${te}/reset_repository.json`,ne)}function g(te,ne){return(0,_.U2)(`tasks/${te}/reset_passed_code.json`,r(r({},ne),t))}function E(te,ne){return(0,_.v_)(`tasks/${te}/game_build.json`,r(r({},ne),t))}function C(te){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:te})}function v(te,ne){return(0,_.U2)(`tasks/${te}/game_status.json`,r(r({},ne),t))}function S(te,ne){return(0,_.v_)(`tasks/${te}/choose_build.json`,r(r({},ne),t))}function k(te){return(0,_.U2)(`myshixuns/${te}/get_remaining_time.json`)}function O(te){return(0,_.U2)(`tasks/${te}/picture_display.json`,t)}function R(te,ne){return get(`courses/${te}/inform_detail.json`,ne)}function U(te){return(0,_.v_)(`tasks/${te}/plus_or_cancel_praise.json`)}function N(te,ne={}){return(0,_.v_)(`myshixuns/${te}/repository.json`,ne)}function pe(te,ne={}){return(0,_.U2)(`myshixuns/${te}/start.json`,ne)}function Z(te,ne={}){return(0,_.v_)(`myshixuns/${te}/force_delete_pod.json`,ne)}function le(te,ne={}){return get(`myshixuns/${te}/set_tpisession.json`,ne)}function L(te){return get(`myshixuns/${te}/reset_pod.json`)}function K(te,ne){return(0,_.U2)(`myshixuns/${te}/reset_pod.json`,ne)}function I(te,ne){return(0,_.ZP)(`/api/tasks/${te}/reboot_esc.json`,{method:"post",body:ne})}function z(te){return(0,_.U2)(`tasks/${te}/check_test_sets.json`)}function X(te){return(0,_.U2)(`tasks/${te}/get_answer_info.json`)}function Q(te){return(0,_.U2)(`tasks/${te}/get_choose_answer.json`)}function ce(te){return(0,_.U2)(`tasks/${te}/unlock_choose_answer.json`)}function ye(te,ne){return(0,_.U2)(`tasks/${te}/unlock_answer.json`,{answer_id:ne})}function Le(te,ne,Ee,xe){return(0,_.v_)(`tasks/${te}/set_games_status.json`,r({result:ne,data:Ee},xe||{}))}function Se(te,ne){return(0,_.U2)(`myshixuns/${te}/active_pod.json`,ne)}function ie(te,ne){return(0,_.U2)(`tasks/${te}/rank_list.json`,ne)}function he(te,ne){return(0,_.v_)(`tasks/${te}/close_windows_vnc.json`,{tpi_id:ne})}function ke(te,ne){return(0,_.U2)(`tasks/${te}/commit_files.json`,ne)}function Ae(te,ne){return(0,_.U2)(`tasks/${te}/pull_files.json`,ne)}function Oe(te,ne){return(0,_.v_)(`tasks/${te}/log_output`,ne)}function Me(te,ne){return(0,_.U2)(`tasks/${te}/stop_log_output.json`,ne)}function Re(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/add_file.json`,{method:"post",body:te})})}function Ke(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/delete_git_file.json`,{method:"Delete",body:te})})}function Xe(te){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${te.id}/mv_file.json`,{method:"post",body:te})})}function Ne(te){return i(this,null,function*(){return te.path&&(te.path=encodeURIComponent(te.path)),Fetch(`/api/tasks/${te.id}/rep_content.json`,{method:"get",params:te})})}function Fe(te,ne){return(0,_.ZP)(`/api/shixuns/${te}/set_start_permanent.json`,{method:"put",body:ne})}function De(te){return i(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:te})})}function Ie(te){return i(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:te})})}},86074:function(Te,D,c){"use strict";c.d(D,{Z:function(){return h}});var _=c(25690),x={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},m=c(59301),h=({message:o,className:u,children:d,style:r={}})=>m.createElement("div",{className:`custom-spinner ${x.idsRingWrapper} ${u}`},m.createElement("div",{className:x.ldsRing},m.createElement("div",null),m.createElement("div",null),m.createElement("div",null),m.createElement("div",null)),o?m.createElement("p",{style:r},o):null,d,m.createElement(_.Outlet,null))},91558:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(59301),x=c(4676);class m extends _.Component{constructor(o){super(o);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:o}=this.props;return(0,x.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},87038:function(Te,D,c){"use strict";c.r(D);var _=c(59301),x=c(25690),m=c(85413),h=c(78059),o=c(84470),u=c(49535),d=c(38986),r=c(59301),i=Object.defineProperty,a=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,e=(p,y,b)=>y in p?i(p,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[y]=b,n=(p,y)=>{for(var b in y||(y={}))t.call(y,b)&&e(p,b,y[b]);if(a)for(var b of a(y))f.call(y,b)&&e(p,b,y[b]);return p},s=(p,y,b)=>new Promise((g,E)=>{var C=k=>{try{S(b.next(k))}catch(O){E(O)}},v=k=>{try{S(b.throw(k))}catch(O){E(O)}},S=k=>k.done?g(k.value):Promise.resolve(k.value).then(C,v);S((b=b.apply(p,y)).next())});const l=({classroomList:p,globalSetting:y,loading:b,dispatch:g})=>{var E;const[C,v]=(0,_.useState)({}),[S,k]=(0,_.useState)({}),O=(0,x.useParams)(),[R]=(0,x.useSearchParams)();let U="68yrbx3ech4a";switch(R.get("type")){case"windows":U="hvp5tzfof4wl";break;case"vnc":U="m3ifqz82epo9";break}let N;(0,_.useEffect)(()=>{pe()},[]),(0,_.useEffect)(()=>{C.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[C]);const pe=()=>s(void 0,null,function*(){var Z,le;const L=yield(0,d.ZP)(`/api/tasks/${R.get("taskId")||U||"68yrbx3ech4a"}.json`,{method:"get"});if(k(n({},L)),R.get("type")==="terminal"){const K=yield(0,d.ZP)(`/api/myshixuns/${(Z=L==null?void 0:L.myshixun)==null?void 0:Z.identifier}/start.json`,{method:"get",game_id:(le=L==null?void 0:L.game)==null?void 0:le.id});v(n({},(K==null?void 0:K.data)||{}))}R.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},R.get("type")==="terminal"&&r.createElement(m.Z,{sshConfigData:C,sid:1}),R.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(h.Z,{taskId:U,myshixunId:(E=S==null?void 0:S.myshixun)==null?void 0:E.identifier,vnc_url:R.get("type")==="vnc",window_vnc_url:R.get("type")==="windows",taskData:S}))};D.default=(0,x.connect)(({classroomList:p,loading:y,globalSetting:b})=>({classroomList:p,globalSetting:b,loading:y.models.classroomList}))(l)},78059:function(Te,D,c){"use strict";c.d(D,{Z:function(){return I}});var _=c(59301),x=c(43418),m=c(8591),h=c(93948),o=c(86074),u=c(76374),d=c(91558),r=c(25690),i=c(51257),a=c(92832),t=c(3113);const f=a.default.TextArea;var e=({onCancel:z,onSave:X,content:Q})=>{const[ce,ye]=(0,_.useState)(Q);function Le(ie){ye(ie.target.value)}function Se(){X(ce)}return(0,_.useEffect)(()=>{ye(Q)},[Q]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(f,{value:ce,onChange:Le,className:"clipboard"}),_.createElement("p",null," ",_.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),_.createElement("p",null," ",_.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),_.createElement("div",{className:"btn-action-container"},_.createElement(t.ZP,{type:"ghost",onClick:z,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(t.ZP,{type:"primary",onClick:Se},"\u4FDD\u5B58")))},n=c(84989),s=c(53537),l=c(62013),p=c(49535),y=c(38986),b=c(59301),g=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,O=(z,X,Q)=>X in z?g(z,X,{enumerable:!0,configurable:!0,writable:!0,value:Q}):z[X]=Q,R=(z,X)=>{for(var Q in X||(X={}))S.call(X,Q)&&O(z,Q,X[Q]);if(v)for(var Q of v(X))k.call(X,Q)&&O(z,Q,X[Q]);return z},U=(z,X)=>E(z,C(X)),N=(z,X,Q)=>new Promise((ce,ye)=>{var Le=he=>{try{ie(Q.next(he))}catch(ke){ye(ke)}},Se=he=>{try{ie(Q.throw(he))}catch(ke){ye(ke)}},ie=he=>he.done?ce(he.value):Promise.resolve(he.value).then(Le,Se);ie((Q=Q.apply(z,X)).next())});function pe(z){return z.replace(/\\u([\dA-Za-z]{4})/g,function(X,Q){return String.fromCharCode(parseInt("0x"+Q))})}function Z(z){z||(z=window.location.search);let X=z.substr(1),Q={};return X.split("&").forEach(function(ce){let ye=ce.split("=");Q[ye[0]]=decodeURIComponent(ye[1])}),Q}const le={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var L=(z=>(z[z.SET_LOADING=0]="SET_LOADING",z[z.SET_IS_LARGE=1]="SET_IS_LARGE",z[z.SET_MES=2]="SET_MES",z[z.SET_STATE=3]="SET_STATE",z[z.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",z[z.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",z[z.UPDATE_ALL=6]="UPDATE_ALL",z))(L||{});function K(z,X){switch(X.type){case 0:return U(R({},z),{loading:X.payload});case 1:return R({},U(R({},z),{isLarge:X.payload}));case 2:return U(R({},z),{mes:X.payload});case 3:return R(R({},z),X.payload);case 5:return U(R({},z),{transferContent:X.payload});case 4:return U(R({},z),{showClipBoardBox:X.payload});case 6:return R({loading:z.loading},X.payload);default:throw new Error}}var I=({vnc_url:z,window_vnc_url:X,linux_vnc:Q,virtual_machine:ce,taskData:ye,shixun_environment_id:Le,tab_type:Se,instance_startup_type:ie,index_tab:he,tpi_type:ke})=>{const Ae=(0,_.useRef)(),Oe=(0,_.useRef)(),Me=(0,_.useRef)(),Re=(0,_.useRef)(),Ke=(0,_.useRef)(),Xe=(0,_.useRef)(),Ne=(0,_.useRef)(),Fe=(0,_.useRef)(),[De,Ie]=(0,_.useReducer)(K,le),[te,ne]=(0,_.useState)(0),{mes:Ee,loading:xe,showClipBoardBox:de,isLarge:ue,transferContent:ae}=De,G=(0,_.useRef)(),F=(0,_.useRef)(),[H]=(0,r.useSearchParams)();let[T,V]=(0,_.useState)(0),_e=(0,_.useRef)();const be=(0,r.useParams)();(0,_.useEffect)(()=>()=>{var q,P;(P=(q=Oe.current)==null?void 0:q.disconnect)==null||P.call(q),clearTimeout(Fe.current),clearInterval(G.current)},[]),(0,_.useEffect)(()=>{F.current=De.loading},[De.loading]);const j=()=>{var q;ie===2?setTimeout(()=>{Ce()},1500):((q=Me==null?void 0:Me.current)==null?void 0:q.resizeSession)!==void 0&&((0,n.vp)()?Me.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,n.gH)(),j),()=>{document.removeEventListener((0,n.gH)(),j)}),[]);function A(){Ie({type:4,payload:!1})}function $(){Ie({type:1,payload:!ue})}function Y(q){return Ae.current&&(Re.current=new u.Z(P=>{var W;for(let J of P)ie===2&&Ce(),(J.target.offsetHeight>0||J.target.offsetWidth>0)&&q&&(q.scaleViewport=!0,(W=q==null?void 0:q._eventHandlers)==null||W.windowResize())}),Re.current.observe(Ae.current)),Re.current}const se=()=>N(void 0,null,function*(){var q,P,W,J,we,me,ge;let He={};H.get("type")==="exercises"?He.exercise_id=H.get("exercisesId"):be.courseId&&be.homeworkId&&(He.homework_common_id=be.homeworkId);const ze=yield(0,s.sA)((q=ye.myshixun)==null?void 0:q.identifier,R(U(R({},be),{taskId:be.taskId,shixun_environment_id:Le,tab_type:Se}),He));if((W=(P=ze==null?void 0:ze.data)==null?void 0:P.data_list)!=null&&W.length)return p.Z.publish("pod-restrict-data",{identifier:(J=ze==null?void 0:ze.data)==null?void 0:J.identifier,data_list:(we=ze==null?void 0:ze.data)==null?void 0:we.data_list}),Promise.reject();if((ze==null?void 0:ze.status)===-3)return new Promise((Ue,Be)=>N(void 0,null,function*(){x.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>N(void 0,null,function*(){clearTimeout(_e.current),V(0),yield(0,s.fA)(be.taskId,ze==null?void 0:ze.message),ne(te+1)})})}));if((ze==null?void 0:ze.status)===-1)throw new String(ze==null?void 0:ze.message);if((ze==null?void 0:ze.status)===0)return ce&&((0,i.d8)("PVEAuthCookie",(ge=(me=ze==null?void 0:ze.data)==null?void 0:me.cookie_options)==null?void 0:ge.cookies_value,1),(0,i.d8)("PVELangCookie","zh_CN",1)),p.Z.publish("update-windows-time",ze==null?void 0:ze.data),p.Z.publish("send-tabs-result-data",U(R({},ze==null?void 0:ze.data),{index_tab:he})),ze});function ve(){V(100),clearTimeout(_e.current),setTimeout(()=>{Ie({type:0,payload:!1})},1300),clearTimeout(G.current)}const oe=()=>{Me.current=new l.Z(Ae.current,Ne.current,{credentials:{password:Xe.current},wsProtocols:["binary"],show_dot:!0}),Me.current.removeEventListener("disconnect",re),Me.current.removeEventListener("connect",ve),Me.current.removeEventListener("clipboard",B),window.rfbs2=Me.current,Re.current=Y(Me.current),Me.current.viewOnly=be.view_only||!1,Me.current.scaleViewport=be.scale||!0,Me.current.showDotCursor=!0,Me.current.resizeSession=!0,Me.current.addEventListener("disconnect",re),Me.current.addEventListener("connect",ve),Me.current.addEventListener("clipboard",B)};function B(q){const P=pe(q.detail.text);Ie({type:5,payload:P})}function re(){if(X)Ie({type:0,payload:!0}),ne(te+1);else{if(clearTimeout(Fe.current),oe(),F.current)return;Fe.current=setTimeout(()=>{ne(te+1)},6e3)}setTimeout(()=>{var q,P;(P=(q=Me.current)==null?void 0:q.connect)==null||P.call(q)},3e3)}(0,_.useEffect)(()=>{if(p.Z.subscribe(`reset-linux-windows-vnc-${he}`,()=>{ne(te+1)}),(X||z||Q||ce)&&Ae.current){clearTimeout(_e.current),ie===2&&Ce(),new Promise(()=>N(void 0,null,function*(){var J,we,me,ge,He;const ze=Z();let Ue=yield se();if(Q||ce){const Be=(we=(J=Ue==null?void 0:Ue.data)==null?void 0:J.link_url)!=null&&we.includes("?")?"&":"?";Ke.current.src=((me=Ue==null?void 0:Ue.data)==null?void 0:me.link_url)+Be+"time="+Date.now(),Ie({type:0,payload:!1});return}else if(X)Xe.current="Edu123",Ne.current=decodeURIComponent((ge=Ue==null?void 0:Ue.data)==null?void 0:ge.link_url);else{const Be=new URL(decodeURIComponent((He=Ue==null?void 0:Ue.data)==null?void 0:He.link_url)),{protocol:je,searchParams:Pe,host:We,search:Ze}=Be,Qe=(0,i.en)(Ze);Xe.current=Pe.get("password"),Ne.current=`${je==="https:"?"wss":"ws"}://${We}/${Qe.path||"websockify"}`}if(ie===2){setTimeout(()=>{var Be,je,Pe,We;Y(),Ke.current.style.cssText=Ke.current.style.cssText+"width:1920px;height:1080px;position:initial",Ke.current.src=`${window.ENV==="build"?"/react/build/":""}/rdp.html?${(Be=Ue==null?void 0:Ue.data)!=null&&Be.gpPort?"gpPort="+((je=Ue==null?void 0:Ue.data)==null?void 0:je.gpPort)+"&password="+((Pe=Ue==null?void 0:Ue.data)==null?void 0:Pe.password)+"&":""}tpiId=${(We=ye==null?void 0:ye.myshixun)==null?void 0:We.id}&envId=${Le}&tpiType=${ke}`,Ie({type:0,payload:!1})},5e3);return}oe()}));const q=p.Z.subscribe(`vnc-reset-${he}`,J=>{if(J==="\u53D6\u6D88"){Ie({type:0,payload:!1});return}V(0),Ie({type:3,payload:{loading:!0,mes:J||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),P=p.Z.subscribe(`send-ctrl-alt-delete-${he}`,()=>{var J;(J=Me.current)==null||J.sendCtrlAltDel(),m.ZP.success("\u53D1\u9001\u6210\u529F")}),W=p.Z.subscribe(`show-clipboard-box-${he}`,()=>{Ie({type:4,payload:!0})});return V(0),()=>{var J,we,me,ge;(J=Me.current)==null||J.removeEventListener("disconnect",re),(we=Me.current)==null||we.removeEventListener("connect",ve),(me=Me.current)==null||me.removeEventListener("clipboard",B),q(),P(),W(),Ae.current&&((ge=Re.current)==null||ge.unobserve(Ae.current))}}},[z,X,Q,te,Le,Se]);function M(){var q,P;(P=(q=Me.current)==null?void 0:q.sendKey)==null||P.call(q,135)}function fe(q){return N(this,null,function*(){var P;if(z){const W=q,J=yield(0,y.ZP)(`/api/tasks/${be.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:Le}});(J==null?void 0:J.status)===0&&(Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A())}else(P=Me.current)==null||P.clipboardPasteFrom(q),Ie({type:5,payload:q}),m.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A()})}function Ce(){var q,P;q=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ke.current.parentElement.className="wh1080p",Ke.current.parentElement.style.cssText=`transform:scale(${q});transform-origin:center center`,Ae.current.style.cssText="translate(-50%, -50%) scale("+q+")"}(0,_.useEffect)(()=>{T==0&&(clearTimeout(_e.current),w())},[T]);const w=()=>{T>99?T=99:(T=T+1,_e.current=setTimeout(()=>{w()},1500)),T<100&&V(T)},ee=(0,_.useMemo)(()=>xe?"none":Q||ce||X&&ie===2?"block":"none",[Q,xe,ce,X]);return b.createElement(_.Fragment,null,ue&&b.createElement("a",{className:"btn-vnc-resize",onClick:$},b.createElement("i",{className:"iconfont icon-tuichuquanping"})),b.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:ee==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},b.createElement("div",null,b.createElement("iframe",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},frameBorder:"0",ref:Ke,allowFullScreen:!0}))),b.createElement("div",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},className:`${X?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ue?"full-screen":""}`},xe?b.createElement(o.Z,{message:Ee,style:{color:"#0152d9"}},b.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},b.createElement(h.Z,{percent:T,format:q=>b.createElement("span",{className:"c-white"},q,"%")}))):null,b.createElement("div",{ref:Ae,className:`vnc-panel ${xe?"hidden zIndexf1":"animated fadeIn"}`})),b.createElement(d.Z,null,b.createElement(x.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:de,onCancel:A,footer:null},b.createElement(e,{onCancel:A,onSave:fe,content:ae}))))}},85413:function(Te,D,c){"use strict";c.d(D,{Z:function(){return S}});var _=c(59301),x=c(24334),m=c(34376),h=c(98119),o={"xterm-panel":"xterm-panel___XA0p9"},u=c(49535),d=c(76374),r=c(53537),i=c(25690),a=c(51257),t=c(43418),f=c(59301),e=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=(k,O,R)=>O in k?e(k,O,{enumerable:!0,configurable:!0,writable:!0,value:R}):k[O]=R,g=(k,O)=>{for(var R in O||(O={}))p.call(O,R)&&b(k,R,O[R]);if(l)for(var R of l(O))y.call(O,R)&&b(k,R,O[R]);return k},E=(k,O)=>n(k,s(O)),C=(k,O,R)=>new Promise((U,N)=>{var pe=L=>{try{le(R.next(L))}catch(K){N(K)}},Z=L=>{try{le(R.throw(L))}catch(K){N(K)}},le=L=>L.done?U(L.value):Promise.resolve(L.value).then(pe,Z);le((R=R.apply(k,O)).next())});const v=3e4;var S=({itemData:k={},game:O,myshixun:R})=>{const U=(0,i.useParams)(),[N,pe]=(0,_.useState)(null),[Z,le]=(0,_.useState)({}),{link_url:L,password:K,port:I}=Z,z=(0,_.useRef)(),X=(0,_.useRef)(),Q=(0,_.useRef)(!1),ce=(0,_.useRef)(!1),ye=(0,_.useRef)(!0),Le=(0,a.oP)(),[Se]=(0,i.useSearchParams)(),{shixun_environment_id:ie,position:he,tab_type:ke,index_tab:Ae,command_string:Oe}=k;(0,_.useEffect)(()=>{Ke()},[]);function Me(Xe,Ne,Fe){let De=Fe._core._renderService.dimensions.actualCellWidth||9.5,Ie=Fe._core._renderService.dimensions.actualCellHeight||18;const te=Math.floor(Ne/Ie);return[Math.floor(Xe/De),te]}function Re(Xe,Ne){const Fe=new d.Z(De=>{for(let Ie of De)if(Ie.target.offsetHeight>0||Ie.target.offsetWidth>0){const[te,ne]=Me(Ie.target.offsetWidth,Ie.target.offsetHeight,Xe);console.log("cols, rows",te,ne),u.Z.publish(`ssh-xterm-resize-${Ae}`,{columns:te,rows:ne,width:Ie.target.offsetWidth,height:Ie.target.offsetHeight}),Xe.resize(te,ne);const Ee=x.Base64.decode("IA=="),xe=x.Base64.decode("CBtbSw==");Xe.write(Ee),Xe.write(xe)}});return Fe.observe(Ne),Fe}function Ke(){return C(this,null,function*(){var Xe,Ne,Fe,De,Ie;let te={};Se.get("type")==="exercises"?te.exercise_id=Se.get("exercisesId"):U.courseId&&U.homeworkId&&(te.homework_common_id=U.homeworkId);const ne=yield(0,r.sA)(R==null?void 0:R.identifier,g(g({shixun_environment_id:ie,tab_type:ke,game_id:O.id},Le),te));if((Ne=(Xe=ne==null?void 0:ne.data)==null?void 0:Xe.data_list)!=null&&Ne.length){u.Z.publish("pod-restrict-data",{identifier:(Fe=ne==null?void 0:ne.data)==null?void 0:Fe.identifier,data_list:(De=ne==null?void 0:ne.data)==null?void 0:De.data_list});return}if((ne==null?void 0:ne.status)===-3)return new Promise((Ee,xe)=>C(this,null,function*(){t.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>C(this,null,function*(){yield closeWindowsVnc(U.taskId,ne==null?void 0:ne.message),init()})})}));if(((Ie=ne==null?void 0:ne.data)==null?void 0:Ie.code)===200036){t.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:f.createElement("div",{className:"mb10"},"\u7531\u4E8E\u4E0A\u6B21\u7684\u5B9E\u9A8C\u73AF\u5883\u672A\u6B63\u5E38\u5173\u95ED\uFF0C\u65E0\u6CD5\u518D\u5F00\u542F\u65B0\u7684\u5B9E\u9A8C\u73AF\u5883,",f.createElement("br",null),f.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(R==null?void 0:R.identifier,{shixun_environment_id:ie,tab_type:ke,game_id:O.id}).then(Ee=>{(Ee==null?void 0:Ee.status)==0&&Ke()})}});return}(ne==null?void 0:ne.status)===0&&(u.Z.publish("update-windows-time",ne==null?void 0:ne.data),u.Z.publish("send-tabs-result-data",E(g({},ne==null?void 0:ne.data),{index_tab:Ae})),le(ne.data),setTimeout(()=>u.Z.publish(`create-socket-${Ae}`),300))})}return(0,_.useEffect)(()=>{if(z.current&&L){const Xe=new m.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Xe.open(z.current),Xe.onData(Fe=>{X.current&&X.current.readyState===1&&X.current.send(JSON.stringify({tp:"client",data:Fe}))}),Xe.write("Connecting..."),pe(Xe);const Ne=Re(Xe,z.current);return()=>{Xe.dispose(),z.current&&(Ne==null||Ne.unobserve(z.current))}}},[L,z.current]),(0,_.useEffect)(()=>{if(N&&L){let Xe=function(){const De=new WebSocket(L);X.current=De,De.onopen=()=>{let te=N.element.parentElement;if(te){let ne=te.offsetWidth,Ee=te.offsetHeight;console.log("init",{tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}),De.send(JSON.stringify({tp:"init",data:E(g({},Z),{secret:K,width:ne,height:Ee,rows:N.rows,columns:N.cols})}))}N.focus()},De.onerror=te=>{console.log("------in socket error----",te,De,L)},De.onmessage=te=>{ce.current=!1,Q.current||(N.write("\r"),setTimeout(()=>{},1e3)),Q.current=!0,console.log("event:",te);const ne=x.Base64.decode(te.data.toString());let Ee=N._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ne,Ee,N),N.write(ne),Oe!=null&&Oe.length?ye.current&&(ye.current=!1,setTimeout(()=>{X.current.send(JSON.stringify({tp:"client",data:(Oe==null?void 0:Oe.join("\r"))+"\r"})),N.setOption("disableStdin",!1)},1e3)):(ye.current=!1,N.setOption("disableStdin",!1))};const Ie=setInterval(()=>{var te;X.current&&((te=X.current)==null||te.send(JSON.stringify({tp:"h"})))},v);De.onclose=te=>{Ie&&clearInterval(Ie),console.log(Ie,"tid",Ae),ce.current||N.write(`\r
|
|
|
connection closed`),ce.current=!0,setTimeout(()=>{Xe()},1e4)}};const Ne=u.Z.subscribe(`create-socket-${Ae}`,()=>{Xe()}),Fe=u.Z.subscribe(`ssh-xterm-resize-${Ae}`,De=>{X.current&&X.current.readyState===1&&X.current.send(JSON.stringify({tp:"resize",data:g({},De)}))});return()=>{Ne(),Fe(),X.current&&(X.current.close(),Q.current=!1)}}},[N,L,I]),f.createElement("div",{ref:z,className:o["xterm-panel"]},L?null:f.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},84989:function(Te,D,c){"use strict";c.d(D,{BU:function(){return x},Dj:function(){return _},gH:function(){return m},vp:function(){return h}});function _(o){try{o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen&&o.webkitRequestFullScreen()}catch(u){console.log(u,":e")}}function x(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const m=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function h(){var o=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,u=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",o),window.isFullScreen?window.isFullScreen:o!=null}},19080:function(Te,D,c){"use strict";c.d(D,{F:function(){return o},Z:function(){return h}});var _=c(92310),x=c.n(_);const m=null;function h(u,d,r){return x()({[`${u}-status-success`]:d==="success",[`${u}-status-warning`]:d==="warning",[`${u}-status-error`]:d==="error",[`${u}-status-validating`]:d==="validating",[`${u}-has-feedback`]:r})}const o=(u,d)=>d||u},9432:function(Te,D,c){"use strict";c.d(D,{Z:function(){return b},n:function(){return p}});var _=c(19248),x=c(92310),m=c.n(x),h=c(93681),o=c(8654),u=c(59301),d=c(19080),r=c(36355),i=c(1684),a=c(19716),t=c(32441),f=c(33234),e=c(59412),n=c(9937);function s(g){return!!(g.prefix||g.suffix||g.allowClear)}var l=function(g,E){var C={};for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&E.indexOf(v)<0&&(C[v]=g[v]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,v=Object.getOwnPropertySymbols(g);S<v.length;S++)E.indexOf(v[S])<0&&Object.prototype.propertyIsEnumerable.call(g,v[S])&&(C[v[S]]=g[v[S]]);return C};function p(g,E){if(!g)return;g.focus(E);const{cursor:C}=E||{};if(C){const v=g.value.length;switch(C){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(v,v);break;default:g.setSelectionRange(0,v);break}}}var b=(0,u.forwardRef)((g,E)=>{var C;const{prefixCls:v,bordered:S=!0,status:k,size:O,disabled:R,onBlur:U,onFocus:N,suffix:pe,allowClear:Z,addonAfter:le,addonBefore:L,className:K,style:I,styles:z,rootClassName:X,onChange:Q,classNames:ce}=g,ye=l(g,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Le,direction:Se,input:ie}=u.useContext(r.E_),he=Le("input",v),ke=(0,u.useRef)(null),[Ae,Oe]=(0,n.ZP)(he),{compactSize:Me,compactItemClassnames:Re}=(0,f.ri)(he,Se),Ke=(0,a.Z)(H=>{var T;return(T=O!=null?O:Me)!==null&&T!==void 0?T:H}),Xe=u.useContext(i.Z),Ne=R!=null?R:Xe,{status:Fe,hasFeedback:De,feedbackIcon:Ie}=(0,u.useContext)(t.aM),te=(0,d.F)(Fe,k),ne=s(g)||!!De,Ee=(0,u.useRef)(ne);(0,u.useEffect)(()=>{var H;ne&&Ee.current,Ee.current=ne},[ne]);const xe=(0,e.Z)(ke,!0),de=H=>{xe(),U==null||U(H)},ue=H=>{xe(),N==null||N(H)},ae=H=>{xe(),Q==null||Q(H)},G=(De||pe)&&u.createElement(u.Fragment,null,pe,De&&Ie);let F;return typeof Z=="object"&&(Z!=null&&Z.clearIcon)?F=Z:Z&&(F={clearIcon:u.createElement(_.Z,null)}),Ae(u.createElement(h.default,Object.assign({ref:(0,o.sQ)(E,ke),prefixCls:he,autoComplete:ie==null?void 0:ie.autoComplete},ye,{disabled:Ne,onBlur:de,onFocus:ue,style:Object.assign(Object.assign({},ie==null?void 0:ie.style),I),styles:Object.assign(Object.assign({},ie==null?void 0:ie.styles),z),suffix:G,allowClear:F,className:m()(K,X,Re,ie==null?void 0:ie.className),onChange:ae,addonAfter:le&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},le)),addonBefore:L&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},L)),classNames:Object.assign(Object.assign(Object.assign({},ce),ie==null?void 0:ie.classNames),{input:m()({[`${he}-sm`]:Ke==="small",[`${he}-lg`]:Ke==="large",[`${he}-rtl`]:Se==="rtl",[`${he}-borderless`]:!S},!ne&&(0,d.Z)(he,te),ce==null?void 0:ce.input,(C=ie==null?void 0:ie.classNames)===null||C===void 0?void 0:C.input,Oe)}),classes:{affixWrapper:m()({[`${he}-affix-wrapper-sm`]:Ke==="small",[`${he}-affix-wrapper-lg`]:Ke==="large",[`${he}-affix-wrapper-rtl`]:Se==="rtl",[`${he}-affix-wrapper-borderless`]:!S},(0,d.Z)(`${he}-affix-wrapper`,te,De),Oe),wrapper:m()({[`${he}-group-rtl`]:Se==="rtl"},Oe),group:m()({[`${he}-group-wrapper-sm`]:Ke==="small",[`${he}-group-wrapper-lg`]:Ke==="large",[`${he}-group-wrapper-rtl`]:Se==="rtl",[`${he}-group-wrapper-disabled`]:Ne},(0,d.Z)(`${he}-group-wrapper`,te,De),Oe)}})))})},1643:function(Te,D,c){"use strict";var _=c(19248),x=c(92310),m=c.n(x),h=c(9296),o=c(59301),u=c(19080),d=c(36355),r=c(1684),i=c(19716),a=c(32441),t=c(9432),f=c(9937),e=function(s,l){var p={};for(var y in s)Object.prototype.hasOwnProperty.call(s,y)&&l.indexOf(y)<0&&(p[y]=s[y]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,y=Object.getOwnPropertySymbols(s);b<y.length;b++)l.indexOf(y[b])<0&&Object.prototype.propertyIsEnumerable.call(s,y[b])&&(p[y[b]]=s[y[b]]);return p};const n=(0,o.forwardRef)((s,l)=>{const{prefixCls:p,bordered:y=!0,size:b,disabled:g,status:E,allowClear:C,showCount:v,classNames:S,rootClassName:k,className:O}=s,R=e(s,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:U,direction:N}=o.useContext(d.E_),pe=(0,i.Z)(b),Z=o.useContext(r.Z),le=g!=null?g:Z,{status:L,hasFeedback:K,feedbackIcon:I}=o.useContext(a.aM),z=(0,u.F)(L,E),X=o.useRef(null);o.useImperativeHandle(l,()=>{var Se;return{resizableTextArea:(Se=X.current)===null||Se===void 0?void 0:Se.resizableTextArea,focus:ie=>{var he,ke;(0,t.n)((ke=(he=X.current)===null||he===void 0?void 0:he.resizableTextArea)===null||ke===void 0?void 0:ke.textArea,ie)},blur:()=>{var ie;return(ie=X.current)===null||ie===void 0?void 0:ie.blur()}}});const Q=U("input",p);let ce;typeof C=="object"&&(C!=null&&C.clearIcon)?ce=C:C&&(ce={clearIcon:o.createElement(_.Z,null)});const[ye,Le]=(0,f.ZP)(Q);return ye(o.createElement(h.default,Object.assign({},R,{disabled:le,allowClear:ce,className:m()(O,k),classes:{affixWrapper:m()(`${Q}-textarea-affix-wrapper`,{[`${Q}-affix-wrapper-rtl`]:N==="rtl",[`${Q}-affix-wrapper-borderless`]:!y,[`${Q}-affix-wrapper-sm`]:pe==="small",[`${Q}-affix-wrapper-lg`]:pe==="large",[`${Q}-textarea-show-count`]:v},(0,u.Z)(`${Q}-affix-wrapper`,z),Le)},classNames:Object.assign(Object.assign({},S),{textarea:m()({[`${Q}-borderless`]:!y,[`${Q}-sm`]:pe==="small",[`${Q}-lg`]:pe==="large"},(0,u.Z)(Q,z),Le,S==null?void 0:S.textarea)}),prefixCls:Q,suffix:K&&o.createElement("span",{className:`${Q}-textarea-suffix`},I),showCount:v,ref:X})))});D.Z=n},59412:function(Te,D,c){"use strict";c.d(D,{Z:function(){return x}});var _=c(59301);function x(m,h){const o=(0,_.useRef)([]),u=()=>{o.current.push(setTimeout(()=>{var d,r,i,a;!((d=m.current)===null||d===void 0)&&d.input&&((r=m.current)===null||r===void 0?void 0:r.input.getAttribute("type"))==="password"&&(!((i=m.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((a=m.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,_.useEffect)(()=>(h&&u(),()=>o.current.forEach(d=>{d&&clearTimeout(d)})),[]),u}},92832:function(Te,D,c){"use strict";c.d(D,{default:function(){return pe}});var _=c(92310),x=c.n(_),m=c(59301),h=c(36355),o=c(32441),u=c(9937),r=Z=>{const{getPrefixCls:le,direction:L}=(0,m.useContext)(h.E_),{prefixCls:K,className:I}=Z,z=le("input-group",K),X=le("input"),[Q,ce]=(0,u.ZP)(X),ye=x()(z,{[`${z}-lg`]:Z.size==="large",[`${z}-sm`]:Z.size==="small",[`${z}-compact`]:Z.compact,[`${z}-rtl`]:L==="rtl"},ce,I),Le=(0,m.useContext)(o.aM),Se=(0,m.useMemo)(()=>Object.assign(Object.assign({},Le),{isFormItemInput:!1}),[Le]);return Q(m.createElement("span",{className:ye,style:Z.style,onMouseEnter:Z.onMouseEnter,onMouseLeave:Z.onMouseLeave,onFocus:Z.onFocus,onBlur:Z.onBlur},m.createElement(o.aM.Provider,{value:Se},Z.children)))},i=c(9432),a=c(73331),t=c(15277),f=c(2738),e=c(8654),n=c(59412),s=function(Z,le){var L={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&le.indexOf(K)<0&&(L[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Z);I<K.length;I++)le.indexOf(K[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,K[I])&&(L[K[I]]=Z[K[I]]);return L};const l=Z=>Z?m.createElement(t.Z,null):m.createElement(a.Z,null),p={click:"onClick",hover:"onMouseOver"};var b=m.forwardRef((Z,le)=>{const{visibilityToggle:L=!0}=Z,K=typeof L=="object"&&L.visible!==void 0,[I,z]=(0,m.useState)(()=>K?L.visible:!1),X=(0,m.useRef)(null);m.useEffect(()=>{K&&z(L.visible)},[K,L]);const Q=(0,n.Z)(X),ce=()=>{const{disabled:Ne}=Z;Ne||(I&&Q(),z(Fe=>{var De;const Ie=!Fe;return typeof L=="object"&&((De=L.onVisibleChange)===null||De===void 0||De.call(L,Ie)),Ie}))},ye=Ne=>{const{action:Fe="click",iconRender:De=l}=Z,Ie=p[Fe]||"",te=De(I),ne={[Ie]:ce,className:`${Ne}-icon`,key:"passwordIcon",onMouseDown:Ee=>{Ee.preventDefault()},onMouseUp:Ee=>{Ee.preventDefault()}};return m.cloneElement(m.isValidElement(te)?te:m.createElement("span",null,te),ne)},{className:Le,prefixCls:Se,inputPrefixCls:ie,size:he}=Z,ke=s(Z,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ae}=m.useContext(h.E_),Oe=Ae("input",ie),Me=Ae("input-password",Se),Re=L&&ye(Me),Ke=x()(Me,Le,{[`${Me}-${he}`]:!!he}),Xe=Object.assign(Object.assign({},(0,f.Z)(ke,["suffix","iconRender","visibilityToggle"])),{type:I?"text":"password",className:Ke,prefixCls:Oe,suffix:Re});return he&&(Xe.size=he),m.createElement(i.Z,Object.assign({ref:(0,e.sQ)(le,X)},Xe))}),g=c(47472),E=c(92343),C=c(3113),v=c(19716),S=c(33234),k=function(Z,le){var L={};for(var K in Z)Object.prototype.hasOwnProperty.call(Z,K)&&le.indexOf(K)<0&&(L[K]=Z[K]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Z);I<K.length;I++)le.indexOf(K[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,K[I])&&(L[K[I]]=Z[K[I]]);return L},R=m.forwardRef((Z,le)=>{const{prefixCls:L,inputPrefixCls:K,className:I,size:z,suffix:X,enterButton:Q=!1,addonAfter:ce,loading:ye,disabled:Le,onSearch:Se,onChange:ie,onCompositionStart:he,onCompositionEnd:ke}=Z,Ae=k(Z,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Oe,direction:Me}=m.useContext(h.E_),Re=m.useRef(!1),Ke=Oe("input-search",L),Xe=Oe("input",K),{compactSize:Ne}=(0,S.ri)(Ke,Me),Fe=(0,v.Z)(V=>{var _e;return(_e=z!=null?z:Ne)!==null&&_e!==void 0?_e:V}),De=m.useRef(null),Ie=V=>{V&&V.target&&V.type==="click"&&Se&&Se(V.target.value,V,{source:"clear"}),ie&&ie(V)},te=V=>{var _e;document.activeElement===((_e=De.current)===null||_e===void 0?void 0:_e.input)&&V.preventDefault()},ne=V=>{var _e,be;Se&&Se((be=(_e=De.current)===null||_e===void 0?void 0:_e.input)===null||be===void 0?void 0:be.value,V,{source:"input"})},Ee=V=>{Re.current||ye||ne(V)},xe=typeof Q=="boolean"?m.createElement(g.Z,null):null,de=`${Ke}-button`;let ue;const ae=Q||{},G=ae.type&&ae.type.__ANT_BUTTON===!0;G||ae.type==="button"?ue=(0,E.Tm)(ae,Object.assign({onMouseDown:te,onClick:V=>{var _e,be;(be=(_e=ae==null?void 0:ae.props)===null||_e===void 0?void 0:_e.onClick)===null||be===void 0||be.call(_e,V),ne(V)},key:"enterButton"},G?{className:de,size:Fe}:{})):ue=m.createElement(C.ZP,{className:de,type:Q?"primary":void 0,size:Fe,disabled:Le,key:"enterButton",onMouseDown:te,onClick:ne,loading:ye,icon:xe},Q),ce&&(ue=[ue,(0,E.Tm)(ce,{key:"addonAfter"})]);const F=x()(Ke,{[`${Ke}-rtl`]:Me==="rtl",[`${Ke}-${Fe}`]:!!Fe,[`${Ke}-with-button`]:!!Q},I),H=V=>{Re.current=!0,he==null||he(V)},T=V=>{Re.current=!1,ke==null||ke(V)};return m.createElement(i.Z,Object.assign({ref:(0,e.sQ)(De,le),onPressEnter:Ee},Ae,{size:Fe,onCompositionStart:H,onCompositionEnd:T,prefixCls:Xe,addonAfter:ue,suffix:X,onChange:Ie,className:F,disabled:Le}))}),U=c(1643);const N=i.Z;N.Group=r,N.Search=R,N.TextArea=U.Z,N.Password=b;var pe=N},9937:function(Te,D,c){"use strict";c.d(D,{M1:function(){return d},TM:function(){return E},Xy:function(){return r},bi:function(){return t},e5:function(){return g},ik:function(){return f},nz:function(){return o},pU:function(){return u},s7:function(){return e},x0:function(){return a}});var _=c(17313),x=c(74207),m=c(37613),h=c(83116);const o=C=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:C,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=C=>({borderColor:C.hoverBorderColor}),d=C=>({borderColor:C.activeBorderColor,boxShadow:C.activeShadow,outline:0}),r=C=>({color:C.colorTextDisabled,backgroundColor:C.colorBgContainerDisabled,borderColor:C.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,m.TS)(C,{hoverBorderColor:C.colorBorder})))}),i=C=>{const{paddingBlockLG:v,fontSizeLG:S,lineHeightLG:k,borderRadiusLG:O,paddingInlineLG:R}=C;return{padding:`${v}px ${R}px`,fontSize:S,lineHeight:k,borderRadius:O}},a=C=>({padding:`${C.paddingBlockSM}px ${C.paddingInlineSM}px`,borderRadius:C.borderRadiusSM}),t=(C,v)=>{const{componentCls:S,colorError:k,colorWarning:O,errorActiveShadow:R,warningActiveShadow:U,colorErrorBorderHover:N,colorWarningBorderHover:pe}=C;return{[`&-status-error:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:k,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},d((0,m.TS)(C,{activeBorderColor:k,activeShadow:R}))),[`${S}-prefix, ${S}-suffix`]:{color:k}},[`&-status-warning:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:O,"&:hover":{borderColor:pe},"&:focus, &-focused":Object.assign({},d((0,m.TS)(C,{activeBorderColor:O,activeShadow:U}))),[`${S}-prefix, ${S}-suffix`]:{color:O}}}},f=C=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${C.paddingBlock}px ${C.paddingInline}px`,color:C.colorText,fontSize:C.fontSize,lineHeight:C.lineHeight,backgroundColor:C.colorBgContainer,backgroundImage:"none",borderWidth:C.lineWidth,borderStyle:C.lineType,borderColor:C.colorBorder,borderRadius:C.borderRadius,transition:`all ${C.motionDurationMid}`},o(C.colorTextPlaceholder)),{"&:hover":Object.assign({},u(C)),"&:focus, &-focused":Object.assign({},d(C)),"&-disabled, &[disabled]":Object.assign({},r(C)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:C.controlHeight,lineHeight:C.lineHeight,verticalAlign:"bottom",transition:`all ${C.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},i(C)),"&-sm":Object.assign({},a(C)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=C=>{const{componentCls:v,antCls:S}=C;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:C.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${v}, &-lg > ${v}-group-addon`]:Object.assign({},i(C)),[`&-sm ${v}, &-sm > ${v}-group-addon`]:Object.assign({},a(C)),[`&-lg ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightLG},[`&-sm ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightSM},[`> ${v}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${v}-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 ${C.paddingInline}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,textAlign:"center",backgroundColor:C.colorFillAlter,border:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`,borderRadius:C.borderRadius,transition:`all ${C.motionDurationSlow}`,lineHeight:1,[`${S}-select`]:{margin:`-${C.paddingBlock+1}px -${C.paddingInline}px`,[`&${S}-select-single:not(${S}-select-customize-input)`]:{[`${S}-select-selector`]:{backgroundColor:"inherit",border:`${C.lineWidth}px ${C.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${S}-select-selector`]:{color:C.colorPrimary}}},[`${S}-cascader-picker`]:{margin:`-9px -${C.paddingInline}px`,backgroundColor:"transparent",[`${S}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${v}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${v}-search-with-button &`]:{zIndex:0}}},[`> ${v}:first-child, ${v}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}-affix-wrapper`]:{[`&:not(:first-child) ${v}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${v}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}:last-child, ${v}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${v}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${v}-search &`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius}},[`&:not(:first-child), ${v}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${v}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,_.dF)()),{[`${v}-group-addon, ${v}-group-wrap, > ${v}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:C.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${v}-affix-wrapper,
|
|
|
& > ${v}-number-affix-wrapper,
|
|
|
& > ${S}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-C.lineWidth,borderInlineEndWidth:C.lineWidth},[`${v}`]:{float:"none"},[`& > ${S}-select > ${S}-select-selector,
|
|
|
& > ${S}-select-auto-complete ${v},
|
|
|
& > ${S}-cascader-picker ${v},
|
|
|
& > ${v}-group-wrapper ${v}`]:{borderInlineEndWidth:C.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${S}-select-focused`]:{zIndex:1},[`& > ${S}-select > ${S}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${S}-select:first-child > ${S}-select-selector,
|
|
|
& > ${S}-select-auto-complete:first-child ${v},
|
|
|
& > ${S}-cascader-picker:first-child ${v}`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius},[`& > *:last-child,
|
|
|
& > ${S}-select:last-child > ${S}-select-selector,
|
|
|
& > ${S}-cascader-picker:last-child ${v},
|
|
|
& > ${S}-cascader-picker-focused:last-child ${v}`]:{borderInlineEndWidth:C.lineWidth,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius},[`& > ${S}-select-auto-complete ${v}`]:{verticalAlign:"top"},[`${v}-group-wrapper + ${v}-group-wrapper`]:{marginInlineStart:-C.lineWidth,[`${v}-affix-wrapper`]:{borderRadius:0}},[`${v}-group-wrapper:not(:last-child)`]:{[`&${v}-search > ${v}-group`]:{[`& > ${v}-group-addon > ${v}-search-button`]:{borderRadius:0},[`& > ${v}`]:{borderStartStartRadius:C.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:C.borderRadius}}}})}},n=C=>{const{componentCls:v,controlHeightSM:S,lineWidth:k}=C,R=(S-k*2-16)/2;return{[v]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),f(C)),t(C,v)),{'&[type="color"]':{height:C.controlHeight,[`&${v}-lg`]:{height:C.controlHeightLG},[`&${v}-sm`]:{height:S,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},s=C=>{const{componentCls:v}=C;return{[`${v}-clear-icon`]:{margin:0,color:C.colorTextQuaternary,fontSize:C.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${C.motionDurationSlow}`,"&:hover":{color:C.colorTextTertiary},"&:active":{color:C.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${C.inputAffixPadding}px`}}}},l=C=>{const{componentCls:v,inputAffixPadding:S,colorTextDescription:k,motionDurationSlow:O,colorIcon:R,colorIconHover:U,iconCls:N}=C;return{[`${v}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f(C)),{display:"inline-flex",[`&:not(${v}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},u(C)),{zIndex:1,[`${v}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${v}[disabled]`]:{background:"transparent"}},[`> input${v}`]:{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"'},[`${v}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:C.paddingXS}},"&-show-count-suffix":{color:k},"&-show-count-has-suffix":{marginInlineEnd:C.paddingXXS},"&-prefix":{marginInlineEnd:S},"&-suffix":{marginInlineStart:S}}}),s(C)),{[`${N}${v}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${O}`,"&:hover":{color:U}}}),t(C,`${v}-affix-wrapper`))}},p=C=>{const{componentCls:v,colorError:S,colorWarning:k,borderRadiusLG:O,borderRadiusSM:R}=C;return{[`${v}-group`]:Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),e(C)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${v}-group-addon`]:{borderRadius:O,fontSize:C.fontSizeLG}},"&-sm":{[`${v}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${v}-group-addon`]:{color:S,borderColor:S}},"&-status-warning":{[`${v}-group-addon`]:{color:k,borderColor:k}},"&-disabled":{[`${v}-group-addon`]:Object.assign({},r(C))},[`&:not(${v}-compact-first-item):not(${v}-compact-last-item)${v}-compact-item`]:{[`${v}, ${v}-group-addon`]:{borderRadius:0}},[`&:not(${v}-compact-last-item)${v}-compact-first-item`]:{[`${v}, ${v}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${v}-compact-first-item)${v}-compact-last-item`]:{[`${v}, ${v}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},y=C=>{const{componentCls:v,antCls:S}=C,k=`${v}-search`;return{[k]:{[`${v}`]:{"&:hover, &:focus":{borderColor:C.colorPrimaryHover,[`+ ${v}-group-addon ${k}-button:not(${S}-btn-primary)`]:{borderInlineStartColor:C.colorPrimaryHover}}},[`${v}-affix-wrapper`]:{borderRadius:0},[`${v}-lg`]:{lineHeight:C.lineHeightLG-2e-4},[`> ${v}-group`]:{[`> ${v}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${k}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${k}-button:not(${S}-btn-primary)`]:{color:C.colorTextDescription,"&:hover":{color:C.colorPrimaryHover},"&:active":{color:C.colorPrimaryActive},[`&${S}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${k}-button`]:{height:C.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${k}-button`]:{height:C.controlHeightLG},[`&-small ${k}-button`]:{height:C.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${v}-compact-item`]:{[`&:not(${v}-compact-last-item)`]:{[`${v}-group-addon`]:{[`${v}-search-button`]:{marginInlineEnd:-C.lineWidth,borderRadius:0}}},[`&:not(${v}-compact-first-item)`]:{[`${v},${v}-affix-wrapper`]:{borderRadius:0}},[`> ${v}-group-addon ${v}-search-button,
|
|
|
> ${v},
|
|
|
${v}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${v}-affix-wrapper-focused`]:{zIndex:2}}}}},b=C=>{const{componentCls:v,paddingLG:S}=C,k=`${v}-textarea`;return{[k]:{position:"relative","&-show-count":{[`> ${v}`]:{height:"100%"},[`${v}-data-count`]:{position:"absolute",bottom:-C.fontSize*C.lineHeight,insetInlineEnd:0,color:C.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${v}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${k}-has-feedback`]:{[`${v}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${v}-affix-wrapper`]:{padding:0,[`> textarea${v}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${v}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${v}-clear-icon`]:{position:"absolute",insetInlineEnd:C.paddingXS,insetBlockStart:C.paddingXS},[`${k}-suffix`]:{position:"absolute",top:0,insetInlineEnd:C.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function g(C){return(0,m.TS)(C,{inputAffixPadding:C.paddingXXS})}const E=C=>{const{controlHeight:v,fontSize:S,lineHeight:k,lineWidth:O,controlHeightSM:R,controlHeightLG:U,fontSizeLG:N,lineHeightLG:pe,paddingSM:Z,controlPaddingHorizontalSM:le,controlPaddingHorizontal:L,colorFillAlter:K,colorPrimaryHover:I,controlOutlineWidth:z,controlOutline:X,colorErrorOutline:Q,colorWarningOutline:ce}=C;return{paddingBlock:Math.max(Math.round((v-S*k)/2*10)/10-O,3),paddingBlockSM:Math.max(Math.round((R-S*k)/2*10)/10-O,0),paddingBlockLG:Math.ceil((U-N*pe)/2*10)/10-O,paddingInline:Z-O,paddingInlineSM:le-O,paddingInlineLG:L-O,addonBg:K,activeBorderColor:I,hoverBorderColor:I,activeShadow:`0 0 0 ${z}px ${X}`,errorActiveShadow:`0 0 0 ${z}px ${Q}`,warningActiveShadow:`0 0 0 ${z}px ${ce}`}};D.ZP=(0,h.Z)("Input",C=>{const v=(0,m.TS)(C,g(C));return[n(v),b(v),l(v),p(v),y(v),(0,x.c)(v)]},E)},93948:function(Te,D,c){"use strict";c.d(D,{Z:function(){return be}});var _=c(59301),x=c(29679),m=c(40001),h=c(19248),o=c(99267),u=c(92310),d=c.n(u),r=c(2738),i=c(36355),a=c(5016),t=c(20049),f=c(5883),e={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},n=function(){var A=(0,_.useRef)([]),$=(0,_.useRef)(null);return(0,_.useEffect)(function(){var Y=Date.now(),se=!1;A.current.forEach(function(ve){if(ve){se=!0;var oe=ve.style;oe.transitionDuration=".3s, .3s, .3s, .06s",$.current&&Y-$.current<100&&(oe.transitionDuration="0s, 0s")}}),se&&($.current=Date.now())}),A.current},s=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],l=function(A){var $=(0,t.Z)((0,t.Z)({},e),A),Y=$.className,se=$.percent,ve=$.prefixCls,oe=$.strokeColor,B=$.strokeLinecap,re=$.strokeWidth,M=$.style,fe=$.trailColor,Ce=$.trailWidth,w=$.transition,ee=(0,f.Z)($,s);delete ee.gapPosition;var q=Array.isArray(se)?se:[se],P=Array.isArray(oe)?oe:[oe],W=n(),J=re/2,we=100-re/2,me="M ".concat(B==="round"?J:0,",").concat(J,`
|
|
|
L `).concat(B==="round"?we:100,",").concat(J),ge="0 0 100 ".concat(re),He=0;return _.createElement("svg",(0,a.Z)({className:d()("".concat(ve,"-line"),Y),viewBox:ge,preserveAspectRatio:"none",style:M},ee),_.createElement("path",{className:"".concat(ve,"-line-trail"),d:me,strokeLinecap:B,stroke:fe,strokeWidth:Ce||re,fillOpacity:"0"}),q.map(function(ze,Ue){var Be=1;switch(B){case"round":Be=1-re/100;break;case"square":Be=1-re/2/100;break;default:Be=1;break}var je={strokeDasharray:"".concat(ze*Be,"px, 100px"),strokeDashoffset:"-".concat(He,"px"),transition:w||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Pe=P[Ue]||P[P.length-1];return He+=ze,_.createElement("path",{key:Ue,className:"".concat(ve,"-line-path"),d:me,strokeLinecap:B,stroke:Pe,strokeWidth:re,fillOpacity:"0",ref:function(Ze){W[Ue]=Ze},style:je})}))},p=l,y=c(10928),b=c(52456),g=c(47273),E=0,C=(0,g.Z)();function v(){var j;return C?(j=E,E+=1):j="TEST_OR_SSR",j}var S=function(j){var A=_.useState(),$=(0,b.Z)(A,2),Y=$[0],se=$[1];return _.useEffect(function(){se("rc_progress_".concat(v()))},[]),j||Y},k=function(A){var $=A.bg,Y=A.children;return _.createElement("div",{style:{width:"100%",height:"100%",background:$}},Y)};function O(j,A){return Object.keys(j).map(function($){var Y=parseFloat($),se="".concat(Math.floor(Y*A),"%");return"".concat(j[$]," ").concat(se)})}var R=_.forwardRef(function(j,A){var $=j.prefixCls,Y=j.color,se=j.gradientId,ve=j.radius,oe=j.style,B=j.ptg,re=j.strokeLinecap,M=j.strokeWidth,fe=j.size,Ce=j.gapDegree,w=Y&&(0,y.Z)(Y)==="object",ee=w?"#FFF":void 0,q=fe/2,P=_.createElement("circle",{className:"".concat($,"-circle-path"),r:ve,cx:q,cy:q,stroke:ee,strokeLinecap:re,strokeWidth:M,opacity:B===0?0:1,style:oe,ref:A});if(!w)return P;var W="".concat(se,"-conic"),J=Ce?"".concat(180+Ce/2,"deg"):"0deg",we=O(Y,(360-Ce)/360),me=O(Y,1),ge="conic-gradient(from ".concat(J,", ").concat(we.join(", "),")"),He="linear-gradient(to ".concat(Ce?"bottom":"top",", ").concat(me.join(", "),")");return _.createElement(_.Fragment,null,_.createElement("mask",{id:W},P),_.createElement("foreignObject",{x:0,y:0,width:fe,height:fe,mask:"url(#".concat(W,")")},_.createElement(k,{bg:He},_.createElement(k,{bg:ge}))))}),U=R,N=100,pe=function(A,$,Y,se,ve,oe,B,re,M,fe){var Ce=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,w=Y/100*360*((360-oe)/360),ee=oe===0?0:{bottom:0,top:180,left:90,right:-90}[B],q=(100-se)/100*$;M==="round"&&se!==100&&(q+=fe/2,q>=$&&(q=$-.01));var P=N/2;return{stroke:typeof re=="string"?re:void 0,strokeDasharray:"".concat($,"px ").concat(A),strokeDashoffset:q+Ce,transform:"rotate(".concat(ve+w+ee,"deg)"),transformOrigin:"".concat(P,"px ").concat(P,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Z=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function le(j){var A=j!=null?j:[];return Array.isArray(A)?A:[A]}var L=function(A){var $=(0,t.Z)((0,t.Z)({},e),A),Y=$.id,se=$.prefixCls,ve=$.steps,oe=$.strokeWidth,B=$.trailWidth,re=$.gapDegree,M=re===void 0?0:re,fe=$.gapPosition,Ce=$.trailColor,w=$.strokeLinecap,ee=$.style,q=$.className,P=$.strokeColor,W=$.percent,J=(0,f.Z)($,Z),we=N/2,me=S(Y),ge="".concat(me,"-gradient"),He=we-oe/2,ze=Math.PI*2*He,Ue=M>0?90+M/2:-90,Be=ze*((360-M)/360),je=(0,y.Z)(ve)==="object"?ve:{count:ve,space:2},Pe=je.count,We=je.space,Ze=le(W),Qe=le(P),$e=Qe.find(function(it){return it&&(0,y.Z)(it)==="object"}),Ge=$e&&(0,y.Z)($e)==="object",Ve=Ge?"butt":w,Ye=pe(ze,Be,0,100,Ue,M,fe,Ce,Ve,oe),qe=n(),rt=function(){var nt=0;return Ze.map(function(et,Je){var st=Qe[Je]||Qe[Qe.length-1],tt=pe(ze,Be,nt,et,Ue,M,fe,st,Ve,oe);return nt+=et,_.createElement(U,{key:Je,color:st,ptg:et,radius:He,prefixCls:se,gradientId:ge,style:tt,strokeLinecap:Ve,strokeWidth:oe,gapDegree:M,ref:function(at){qe[Je]=at},size:N})}).reverse()},ct=function(){var nt=Math.round(Pe*(Ze[0]/100)),et=100/Pe,Je=0;return new Array(Pe).fill(null).map(function(st,tt){var ot=tt<=nt-1?Qe[0]:Ce,at=ot&&(0,y.Z)(ot)==="object"?"url(#".concat(ge,")"):void 0,lt=pe(ze,Be,Je,et,Ue,M,fe,ot,"butt",oe,We);return Je+=(Be-lt.strokeDashoffset+We)*100/Be,_.createElement("circle",{key:tt,className:"".concat(se,"-circle-path"),r:He,cx:we,cy:we,stroke:at,strokeWidth:oe,opacity:1,style:lt,ref:function(ut){qe[tt]=ut}})})};return _.createElement("svg",(0,a.Z)({className:d()("".concat(se,"-circle"),q),viewBox:"0 0 ".concat(N," ").concat(N),style:ee,id:Y,role:"presentation"},J),!Pe&&_.createElement("circle",{className:"".concat(se,"-circle-trail"),r:He,cx:we,cy:we,stroke:Ce,strokeLinecap:Ve,strokeWidth:B||oe,style:Ye}),Pe?ct():rt())},K=L,I={Line:p,Circle:K},z=c(6848),X=c(93398);function Q(j){return!j||j<0?0:j>100?100:j}function ce(j){let{success:A,successPercent:$}=j,Y=$;return A&&"progress"in A&&(Y=A.progress),A&&"percent"in A&&(Y=A.percent),Y}const ye=j=>{let{percent:A,success:$,successPercent:Y}=j;const se=Q(ce({success:$,successPercent:Y}));return[se,Q(Q(A)-se)]},Le=j=>{let{success:A={},strokeColor:$}=j;const{strokeColor:Y}=A;return[Y||X.presetPrimaryColors.green,$||null]},Se=(j,A,$)=>{var Y,se,ve,oe;let B=-1,re=-1;if(A==="step"){const M=$.steps,fe=$.strokeWidth;typeof j=="string"||typeof j=="undefined"?(B=j==="small"?2:14,re=fe!=null?fe:8):typeof j=="number"?[B,re]=[j,j]:[B=14,re=8]=j,B*=M}else if(A==="line"){const M=$==null?void 0:$.strokeWidth;typeof j=="string"||typeof j=="undefined"?re=M||(j==="small"?6:8):typeof j=="number"?[B,re]=[j,j]:[B=-1,re=8]=j}else(A==="circle"||A==="dashboard")&&(typeof j=="string"||typeof j=="undefined"?[B,re]=j==="small"?[60,60]:[120,120]:typeof j=="number"?[B,re]=[j,j]:(B=(se=(Y=j[0])!==null&&Y!==void 0?Y:j[1])!==null&&se!==void 0?se:120,re=(oe=(ve=j[0])!==null&&ve!==void 0?ve:j[1])!==null&&oe!==void 0?oe:120));return[B,re]},ie=3,he=j=>ie/j*100;var Ae=j=>{const{prefixCls:A,trailColor:$=null,strokeLinecap:Y="round",gapPosition:se,gapDegree:ve,width:oe=120,type:B,children:re,success:M,size:fe=oe}=j,[Ce,w]=Se(fe,"circle");let{strokeWidth:ee}=j;ee===void 0&&(ee=Math.max(he(Ce),6));const q={width:Ce,height:w,fontSize:Ce*.15+6},P=_.useMemo(()=>{if(ve||ve===0)return ve;if(B==="dashboard")return 75},[ve,B]),W=se||B==="dashboard"&&"bottom"||void 0,J=Object.prototype.toString.call(j.strokeColor)==="[object Object]",we=Le({success:M,strokeColor:j.strokeColor}),me=d()(`${A}-inner`,{[`${A}-circle-gradient`]:J}),ge=_.createElement(K,{percent:ye(j),strokeWidth:ee,trailWidth:ee,strokeColor:we,strokeLinecap:Y,trailColor:$,prefixCls:A,gapDegree:P,gapPosition:W});return _.createElement("div",{className:me,style:q},Ce<=20?_.createElement(z.Z,{title:re},_.createElement("span",null,ge)):_.createElement(_.Fragment,null,ge,re))},Oe=function(j,A){var $={};for(var Y in j)Object.prototype.hasOwnProperty.call(j,Y)&&A.indexOf(Y)<0&&($[Y]=j[Y]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,Y=Object.getOwnPropertySymbols(j);se<Y.length;se++)A.indexOf(Y[se])<0&&Object.prototype.propertyIsEnumerable.call(j,Y[se])&&($[Y[se]]=j[Y[se]]);return $};const Me=j=>{let A=[];return Object.keys(j).forEach($=>{const Y=parseFloat($.replace(/%/g,""));isNaN(Y)||A.push({key:Y,value:j[$]})}),A=A.sort(($,Y)=>$.key-Y.key),A.map($=>{let{key:Y,value:se}=$;return`${se} ${Y}%`}).join(", ")},Re=(j,A)=>{const{from:$=X.presetPrimaryColors.blue,to:Y=X.presetPrimaryColors.blue,direction:se=A==="rtl"?"to left":"to right"}=j,ve=Oe(j,["from","to","direction"]);if(Object.keys(ve).length!==0){const oe=Me(ve);return{backgroundImage:`linear-gradient(${se}, ${oe})`}}return{backgroundImage:`linear-gradient(${se}, ${$}, ${Y})`}};var Xe=j=>{const{prefixCls:A,direction:$,percent:Y,size:se,strokeWidth:ve,strokeColor:oe,strokeLinecap:B="round",children:re,trailColor:M=null,success:fe}=j,Ce=oe&&typeof oe!="string"?Re(oe,$):{backgroundColor:oe},w=B==="square"||B==="butt"?0:void 0,ee={backgroundColor:M||void 0,borderRadius:w},q=se!=null?se:[-1,ve||(se==="small"?6:8)],[P,W]=Se(q,"line",{strokeWidth:ve}),J=Object.assign({width:`${Q(Y)}%`,height:W,borderRadius:w},Ce),we=ce(j),me={width:`${Q(we)}%`,height:W,borderRadius:w,backgroundColor:fe==null?void 0:fe.strokeColor},ge={width:P<0?"100%":P,height:W};return _.createElement(_.Fragment,null,_.createElement("div",{className:`${A}-outer`,style:ge},_.createElement("div",{className:`${A}-inner`,style:ee},_.createElement("div",{className:`${A}-bg`,style:J}),we!==void 0?_.createElement("div",{className:`${A}-success-bg`,style:me}):null)),re)},Fe=j=>{const{size:A,steps:$,percent:Y=0,strokeWidth:se=8,strokeColor:ve,trailColor:oe=null,prefixCls:B,children:re}=j,M=Math.round($*(Y/100)),fe=A==="small"?2:14,Ce=A!=null?A:[fe,se],[w,ee]=Se(Ce,"step",{steps:$,strokeWidth:se}),q=w/$,P=new Array($);for(let W=0;W<$;W++){const J=Array.isArray(ve)?ve[W]:ve;P[W]=_.createElement("div",{key:W,className:d()(`${B}-steps-item`,{[`${B}-steps-item-active`]:W<=M-1}),style:{backgroundColor:W<=M-1?J:oe,width:q,height:ee}})}return _.createElement("div",{className:`${B}-steps-outer`},P,re)},De=c(93083),Ie=c(17313),te=c(83116),ne=c(37613);const Ee=j=>{const A=j?"100%":"-100%";return new De.Keyframes(`antProgress${j?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${A}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${A}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},xe=j=>{const{componentCls:A,iconCls:$}=j;return{[A]:Object.assign(Object.assign({},(0,Ie.Wf)(j)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:j.fontSize,marginInlineEnd:j.marginXS,marginBottom:j.marginXS},[`${A}-outer`]:{display:"inline-block",width:"100%"},[`&${A}-show-info`]:{[`${A}-outer`]:{marginInlineEnd:`calc(-2em - ${j.marginXS}px)`,paddingInlineEnd:`calc(2em + ${j.paddingXS}px)`}},[`${A}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:j.remainingColor,borderRadius:j.lineBorderRadius},[`${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:j.defaultColor}},[`${A}-success-bg, ${A}-bg`]:{position:"relative",backgroundColor:j.defaultColor,borderRadius:j.lineBorderRadius,transition:`all ${j.motionDurationSlow} ${j.motionEaseInOutCirc}`},[`${A}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:j.colorSuccess},[`${A}-text`]:{display:"inline-block",width:"2em",marginInlineStart:j.marginXS,color:j.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[$]:{fontSize:j.fontSize}},[`&${A}-status-active`]:{[`${A}-bg::before`]:{position:"absolute",inset:0,backgroundColor:j.colorBgContainer,borderRadius:j.lineBorderRadius,opacity:0,animationName:Ee(),animationDuration:j.progressActiveMotionDuration,animationTimingFunction:j.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${A}-rtl${A}-status-active`]:{[`${A}-bg::before`]:{animationName:Ee(!0)}},[`&${A}-status-exception`]:{[`${A}-bg`]:{backgroundColor:j.colorError},[`${A}-text`]:{color:j.colorError}},[`&${A}-status-exception ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:j.colorError}},[`&${A}-status-success`]:{[`${A}-bg`]:{backgroundColor:j.colorSuccess},[`${A}-text`]:{color:j.colorSuccess}},[`&${A}-status-success ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:j.colorSuccess}}})}},de=j=>{const{componentCls:A,iconCls:$}=j;return{[A]:{[`${A}-circle-trail`]:{stroke:j.remainingColor},[`&${A}-circle ${A}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${A}-circle ${A}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:j.circleTextColor,fontSize:j.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[$]:{fontSize:`${j.fontSize/j.fontSizeSM}em`}},[`${A}-circle&-status-exception`]:{[`${A}-text`]:{color:j.colorError}},[`${A}-circle&-status-success`]:{[`${A}-text`]:{color:j.colorSuccess}}},[`${A}-inline-circle`]:{lineHeight:1,[`${A}-inner`]:{verticalAlign:"bottom"}}}},ue=j=>{const{componentCls:A}=j;return{[A]:{[`${A}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:j.progressStepMinWidth,marginInlineEnd:j.progressStepMarginInlineEnd,backgroundColor:j.remainingColor,transition:`all ${j.motionDurationSlow}`,"&-active":{backgroundColor:j.defaultColor}}}}}},ae=j=>{const{componentCls:A,iconCls:$}=j;return{[A]:{[`${A}-small&-line, ${A}-small&-line ${A}-text ${$}`]:{fontSize:j.fontSizeSM}}}};var G=(0,te.Z)("Progress",j=>{const A=j.marginXXS/2,$=(0,ne.TS)(j,{progressStepMarginInlineEnd:A,progressStepMinWidth:A,progressActiveMotionDuration:"2.4s"});return[xe($),de($),ue($),ae($)]},j=>({circleTextColor:j.colorText,defaultColor:j.colorInfo,remainingColor:j.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),F=function(j,A){var $={};for(var Y in j)Object.prototype.hasOwnProperty.call(j,Y)&&A.indexOf(Y)<0&&($[Y]=j[Y]);if(j!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,Y=Object.getOwnPropertySymbols(j);se<Y.length;se++)A.indexOf(Y[se])<0&&Object.prototype.propertyIsEnumerable.call(j,Y[se])&&($[Y[se]]=j[Y[se]]);return $};const H=null,T=["normal","exception","active","success"];var _e=_.forwardRef((j,A)=>{const{prefixCls:$,className:Y,rootClassName:se,steps:ve,strokeColor:oe,percent:B=0,size:re="default",showInfo:M=!0,type:fe="line",status:Ce,format:w,style:ee}=j,q=F(j,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),P=_.useMemo(()=>{var Ze,Qe;const $e=ce(j);return parseInt($e!==void 0?(Ze=$e!=null?$e:0)===null||Ze===void 0?void 0:Ze.toString():(Qe=B!=null?B:0)===null||Qe===void 0?void 0:Qe.toString(),10)},[B,j.success,j.successPercent]),W=_.useMemo(()=>!T.includes(Ce)&&P>=100?"success":Ce||"normal",[Ce,P]),{getPrefixCls:J,direction:we,progress:me}=_.useContext(i.E_),ge=J("progress",$),[He,ze]=G(ge),Ue=_.useMemo(()=>{if(!M)return null;const Ze=ce(j);let Qe;const $e=w||(Ve=>`${Ve}%`),Ge=fe==="line";return w||W!=="exception"&&W!=="success"?Qe=$e(Q(B),Q(Ze)):W==="exception"?Qe=Ge?_.createElement(h.Z,null):_.createElement(o.Z,null):W==="success"&&(Qe=Ge?_.createElement(x.Z,null):_.createElement(m.Z,null)),_.createElement("span",{className:`${ge}-text`,title:typeof Qe=="string"?Qe:void 0},Qe)},[M,B,P,W,fe,ge,w]),Be=Array.isArray(oe)?oe[0]:oe,je=typeof oe=="string"||Array.isArray(oe)?oe:void 0;let Pe;fe==="line"?Pe=ve?_.createElement(Fe,Object.assign({},j,{strokeColor:je,prefixCls:ge,steps:ve}),Ue):_.createElement(Xe,Object.assign({},j,{strokeColor:Be,prefixCls:ge,direction:we}),Ue):(fe==="circle"||fe==="dashboard")&&(Pe=_.createElement(Ae,Object.assign({},j,{strokeColor:Be,prefixCls:ge,progressStatus:W}),Ue));const We=d()(ge,`${ge}-status-${W}`,`${ge}-${fe==="dashboard"&&"circle"||ve&&"steps"||fe}`,{[`${ge}-inline-circle`]:fe==="circle"&&Se(re,"circle")[0]<=20,[`${ge}-show-info`]:M,[`${ge}-${re}`]:typeof re=="string",[`${ge}-rtl`]:we==="rtl"},me==null?void 0:me.className,Y,se,ze);return He(_.createElement("div",Object.assign({ref:A,style:Object.assign(Object.assign({},me==null?void 0:me.style),ee),className:We,role:"progressbar","aria-valuenow":P},(0,r.Z)(q,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Pe))}),be=_e},24334:function(Te,D,c){var _,x;(function(m,h){Te.exports=h(m)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof c.g!="undefined"?c.g:this,function(m){"use strict";m=m||{};var h=m.Base64,o="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(Z){for(var le={},L=0,K=Z.length;L<K;L++)le[Z.charAt(L)]=L;return le}(u),r=String.fromCharCode,i=function(Z){if(Z.length<2){var le=Z.charCodeAt(0);return le<128?Z:le<2048?r(192|le>>>6)+r(128|le&63):r(224|le>>>12&15)+r(128|le>>>6&63)+r(128|le&63)}else{var le=65536+(Z.charCodeAt(0)-55296)*1024+(Z.charCodeAt(1)-56320);return r(240|le>>>18&7)+r(128|le>>>12&63)+r(128|le>>>6&63)+r(128|le&63)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(Z){return Z.replace(a,i)},f=function(Z){var le=[0,2,1][Z.length%3],L=Z.charCodeAt(0)<<16|(Z.length>1?Z.charCodeAt(1):0)<<8|(Z.length>2?Z.charCodeAt(2):0),K=[u.charAt(L>>>18),u.charAt(L>>>12&63),le>=2?"=":u.charAt(L>>>6&63),le>=1?"=":u.charAt(L&63)];return K.join("")},e=m.btoa&&typeof m.btoa=="function"?function(Z){return m.btoa(Z)}:function(Z){if(Z.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Z.replace(/[\s\S]{1,3}/g,f)},n=function(Z){return e(t(String(Z)))},s=function(Z){return Z.replace(/[+\/]/g,function(le){return le=="+"?"-":"_"}).replace(/=/g,"")},l=function(Z,le){return le?s(n(Z)):n(Z)},p=function(Z){return l(Z,!0)},y;m.Uint8Array&&(y=function(Z,le){for(var L="",K=0,I=Z.length;K<I;K+=3){var z=Z[K],X=Z[K+1],Q=Z[K+2],ce=z<<16|X<<8|Q;L+=u.charAt(ce>>>18)+u.charAt(ce>>>12&63)+(typeof X!="undefined"?u.charAt(ce>>>6&63):"=")+(typeof Q!="undefined"?u.charAt(ce&63):"=")}return le?s(L):L});var b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,g=function(Z){switch(Z.length){case 4:var le=(7&Z.charCodeAt(0))<<18|(63&Z.charCodeAt(1))<<12|(63&Z.charCodeAt(2))<<6|63&Z.charCodeAt(3),L=le-65536;return r((L>>>10)+55296)+r((L&1023)+56320);case 3:return r((15&Z.charCodeAt(0))<<12|(63&Z.charCodeAt(1))<<6|63&Z.charCodeAt(2));default:return r((31&Z.charCodeAt(0))<<6|63&Z.charCodeAt(1))}},E=function(Z){return Z.replace(b,g)},C=function(Z){var le=Z.length,L=le%4,K=(le>0?d[Z.charAt(0)]<<18:0)|(le>1?d[Z.charAt(1)]<<12:0)|(le>2?d[Z.charAt(2)]<<6:0)|(le>3?d[Z.charAt(3)]:0),I=[r(K>>>16),r(K>>>8&255),r(K&255)];return I.length-=[0,0,2,1][L],I.join("")},v=m.atob&&typeof m.atob=="function"?function(Z){return m.atob(Z)}:function(Z){return Z.replace(/\S{1,4}/g,C)},S=function(Z){return v(String(Z).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(Z){return E(v(Z))},O=function(Z){return String(Z).replace(/[-_]/g,function(le){return le=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},R=function(Z){return k(O(Z))},U;m.Uint8Array&&(U=function(Z){return Uint8Array.from(S(O(Z)),function(le){return le.charCodeAt(0)})});var N=function(){var Z=m.Base64;return m.Base64=h,Z};if(m.Base64={VERSION:o,atob:S,btoa:e,fromBase64:R,toBase64:l,utob:t,encode:l,encodeURI:p,btou:E,decode:R,noConflict:N,fromUint8Array:y,toUint8Array:U},typeof Object.defineProperty=="function"){var pe=function(Z){return{value:Z,enumerable:!1,writable:!0,configurable:!0}};m.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",pe(function(){return R(this)})),Object.defineProperty(String.prototype,"toBase64",pe(function(Z){return l(this,Z)})),Object.defineProperty(String.prototype,"toBase64URI",pe(function(){return l(this,!0)}))}}return m.Meteor&&(Base64=m.Base64),Te.exports?Te.exports.Base64=m.Base64:(_=[],x=function(){return m.Base64}.apply(D,_),x!==void 0&&(Te.exports=x)),{Base64:m.Base64}})},57128:function(Te,D,c){"use strict";function _(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(r){return typeof r}:_=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_(u)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=h(c(50500));function m(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return m=function(){return u},u}function h(u){if(u&&u.__esModule)return u;if(u===null||_(u)!=="object"&&typeof u!="function")return{default:u};var d=m();if(d&&d.has(u))return d.get(u);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in u)if(Object.prototype.hasOwnProperty.call(u,a)){var t=i?Object.getOwnPropertyDescriptor(u,a):null;t&&(t.get||t.set)?Object.defineProperty(r,a,t):r[a]=u[a]}return r.default=u,d&&d.set(u,r),r}var o={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(d){"use strict";for(var r="",i=d.length,a=i%3,t=0;t<i-2;t+=3)r+=this.toBase64Table[d[t]>>2],r+=this.toBase64Table[((d[t]&3)<<4)+(d[t+1]>>4)],r+=this.toBase64Table[((d[t+1]&15)<<2)+(d[t+2]>>6)],r+=this.toBase64Table[d[t+2]&63];var f=i-a;return a===2?(r+=this.toBase64Table[d[f]>>2],r+=this.toBase64Table[((d[f]&3)<<4)+(d[f+1]>>4)],r+=this.toBase64Table[(d[f+1]&15)<<2],r+=this.toBase64Table[64]):a===1&&(r+=this.toBase64Table[d[f]>>2],r+=this.toBase64Table[(d[f]&3)<<4],r+=this.toBase64Table[64],r+=this.toBase64Table[64]),r},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(d){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=d.indexOf("=")-r;i<0&&(i=d.length-r);for(var a=(i>>2)*3+Math.floor(i%4/1.5),t=new Array(a),f=0,e=0,n=0,s=r;s<d.length;s++){var l=this.toBinaryTable[d.charCodeAt(s)&127],p=d.charAt(s)===this.base64Pad;if(l===-1){x.Error("Illegal character code "+d.charCodeAt(s)+" at position "+s);continue}e=e<<6|l,f+=6,f>=8&&(f-=8,p||(t[n++]=e>>f&255),e&=(1<<f)-1)}if(f){var y=new Error("Corrupted base64 string");throw y.name="Base64-Error",y}return t}};D.default=o},17852:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function x(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var m=function(){function h(){c(this,h)}return x(h,[{key:"decodeRect",value:function(u,d,r,i,a,t,f){if(a.rQwait("COPYRECT",4))return!1;var e=a.rQshift16(),n=a.rQshift16();return t.copyImage(e,n,u,d,r,i),!0}}]),h}();D.default=m},18330:function(Te,D,c){"use strict";function _(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(t){return typeof t}:_=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(i)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=h(c(50500));function m(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return m=function(){return i},i}function h(i){if(i&&i.__esModule)return i;if(i===null||_(i)!=="object"&&typeof i!="function")return{default:i};var a=m();if(a&&a.has(i))return a.get(i);var t={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var n=f?Object.getOwnPropertyDescriptor(i,e):null;n&&(n.get||n.set)?Object.defineProperty(t,e,n):t[e]=i[e]}return t.default=i,a&&a.set(i,t),t}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function u(i,a){for(var t=0;t<a.length;t++){var f=a[t];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function d(i,a,t){return a&&u(i.prototype,a),t&&u(i,t),i}var r=function(){function i(){o(this,i),this._tiles=0,this._lastsubencoding=0}return d(i,[{key:"decodeRect",value:function(t,f,e,n,s,l,p){for(this._tiles===0&&(this._tilesX=Math.ceil(e/16),this._tilesY=Math.ceil(n/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var y=1;if(s.rQwait("HEXTILE",y))return!1;var b=s.rQ,g=s.rQi,E=b[g];if(E>30)throw new Error("Illegal hextile subencoding (subencoding: "+E+")");var C=this._totalTiles-this._tiles,v=C%this._tilesX,S=Math.floor(C/this._tilesX),k=t+v*16,O=f+S*16,R=Math.min(16,t+e-k),U=Math.min(16,f+n-O);if(E&1)y+=R*U*4;else if(E&2&&(y+=4),E&4&&(y+=4),E&8){if(y++,s.rQwait("HEXTILE",y))return!1;var N=b[g+y-1];E&16?y+=N*6:y+=N*2}if(s.rQwait("HEXTILE",y))return!1;if(g++,E===0)this._lastsubencoding&1?x.Debug(" Ignoring blank after RAW"):l.fillRect(k,O,R,U,this._background);else if(E&1)l.blitImage(k,O,R,U,b,g),g+=y-1;else{if(E&2&&(this._background=[b[g],b[g+1],b[g+2],b[g+3]],g+=4),E&4&&(this._foreground=[b[g],b[g+1],b[g+2],b[g+3]],g+=4),l.startTile(k,O,R,U,this._background),E&8){var pe=b[g];g++;for(var Z=0;Z<pe;Z++){var le=void 0;E&16?(le=[b[g],b[g+1],b[g+2],b[g+3]],g+=4):le=this._foreground;var L=b[g];g++;var K=L>>4,I=L&15,z=b[g];g++;var X=(z>>4)+1,Q=(z&15)+1;l.subTile(K,I,X,Q,le)}}l.finishTile()}s.rQi=g,this._lastsubencoding=E,this._tiles--}return!0}}]),i}();D.default=r},11231:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function x(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var m=function(){function h(){c(this,h),this._lines=0}return x(h,[{key:"decodeRect",value:function(u,d,r,i,a,t,f){this._lines===0&&(this._lines=i);var e=f==8?1:4,n=r*e;if(a.rQwait("RAW",n))return!1;var s=d+(i-this._lines),l=Math.min(this._lines,Math.floor(a.rQlen/n)),p=a.rQ,y=a.rQi;if(f==8){for(var b=r*l,g=new Uint8Array(b*4),E=0;E<b;E++)g[E*4+0]=(p[y+E]>>0&3)*255/3,g[E*4+1]=(p[y+E]>>2&3)*255/3,g[E*4+2]=(p[y+E]>>4&3)*255/3,g[E*4+4]=0;p=g,y=0}return t.blitImage(u,s,r,l,p,y),a.rQskipBytes(l*n),this._lines-=l,!(this._lines>0)}}]),h}();D.default=m},57507:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function x(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var m=function(){function h(){c(this,h),this._subrects=0}return x(h,[{key:"decodeRect",value:function(u,d,r,i,a,t,f){if(this._subrects===0){if(a.rQwait("RRE",8))return!1;this._subrects=a.rQshift32();var e=a.rQshiftBytes(4);t.fillRect(u,d,r,i,e)}for(;this._subrects>0;){if(a.rQwait("RRE",12))return!1;var n=a.rQshiftBytes(4),s=a.rQshift16(),l=a.rQshift16(),p=a.rQshift16(),y=a.rQshift16();t.fillRect(u+s,d+l,p,y,n),this._subrects--}return!0}}]),h}();D.default=m},21330:function(Te,D,c){"use strict";function _(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(t)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=u(c(50500)),m=h(c(48831));function h(t){return t&&t.__esModule?t:{default:t}}function o(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return o=function(){return t},t}function u(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var f=o();if(f&&f.has(t))return f.get(t);var e={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var l=n?Object.getOwnPropertyDescriptor(t,s):null;l&&(l.get||l.set)?Object.defineProperty(e,s,l):e[s]=t[s]}return e.default=t,f&&f.set(t,e),e}function d(t,f){if(!(t instanceof f))throw new TypeError("Cannot call a class as a function")}function r(t,f){for(var e=0;e<f.length;e++){var n=f[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,f,e){return f&&r(t.prototype,f),e&&r(t,e),t}var a=function(){function t(){d(this,t),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var f=0;f<4;f++)this._zlibs[f]=new m.default}return i(t,[{key:"decodeRect",value:function(e,n,s,l,p,y,b){if(this._ctl===null){if(p.rQwait("TIGHT compression-control",1))return!1;this._ctl=p.rQshift8();for(var g=0;g<4;g++)this._ctl>>g&1&&(this._zlibs[g].reset(),x.Info("Reset zlib stream "+g));this._ctl=this._ctl>>4}var E;if(this._ctl===8)E=this._fillRect(e,n,s,l,p,y,b);else if(this._ctl===9)E=this._jpegRect(e,n,s,l,p,y,b);else if(this._ctl===10)E=this._pngRect(e,n,s,l,p,y,b);else if(!(this._ctl&128))E=this._basicRect(this._ctl,e,n,s,l,p,y,b);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return E&&(this._ctl=null),E}},{key:"_fillRect",value:function(e,n,s,l,p,y,b){if(p.rQwait("TIGHT",3))return!1;var g=p.rQi,E=p.rQ;return y.fillRect(e,n,s,l,[E[g+2],E[g+1],E[g]],!1),p.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(e,n,s,l,p,y,b){var g=this._readData(p);return g===null?!1:(y.imageRect(e,n,s,l,"image/jpeg",g),!0)}},{key:"_pngRect",value:function(e,n,s,l,p,y,b){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(e,n,s,l,p,y,b,g){if(this._filter===null)if(e&4){if(y.rQwait("TIGHT",1))return!1;this._filter=y.rQshift8()}else this._filter=0;var E=e&3,C;switch(this._filter){case 0:C=this._copyFilter(E,n,s,l,p,y,b,g);break;case 1:C=this._paletteFilter(E,n,s,l,p,y,b,g);break;case 2:C=this._gradientFilter(E,n,s,l,p,y,b,g);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return C&&(this._filter=null),C}},{key:"_copyFilter",value:function(e,n,s,l,p,y,b,g){var E=l*p*3,C;if(E<12){if(y.rQwait("TIGHT",E))return!1;C=y.rQshiftBytes(E)}else{if(C=this._readData(y),C===null)return!1;this._zlibs[e].setInput(C),C=this._zlibs[e].inflate(E),this._zlibs[e].setInput(null)}return b.blitRgbImage(n,s,l,p,C,0,!1),!0}},{key:"_paletteFilter",value:function(e,n,s,l,p,y,b,g){if(this._numColors===0){if(y.rQwait("TIGHT palette",1))return!1;var E=y.rQpeek8()+1,C=E*3;if(y.rQwait("TIGHT palette",1+C))return!1;this._numColors=E,y.rQskipBytes(1),y.rQshiftTo(this._palette,C)}var v=this._numColors<=2?1:8,S=Math.floor((l*v+7)/8),k=S*p,O;if(k<12){if(y.rQwait("TIGHT",k))return!1;O=y.rQshiftBytes(k)}else{if(O=this._readData(y),O===null)return!1;this._zlibs[e].setInput(O),O=this._zlibs[e].inflate(k),this._zlibs[e].setInput(null)}return this._numColors==2?this._monoRect(n,s,l,p,O,this._palette,b):this._paletteRect(n,s,l,p,O,this._palette,b),this._numColors=0,!0}},{key:"_monoRect",value:function(e,n,s,l,p,y,b){for(var g=this._getScratchBuffer(s*l*4),E=Math.floor((s+7)/8),C=Math.floor(s/8),v=0;v<l;v++){var S=void 0,k=void 0,O=void 0;for(O=0;O<C;O++)for(var R=7;R>=0;R--)S=(v*s+O*8+7-R)*4,k=(p[v*E+O]>>R&1)*3,g[S]=y[k],g[S+1]=y[k+1],g[S+2]=y[k+2],g[S+3]=255;for(var U=7;U>=8-s%8;U--)S=(v*s+O*8+7-U)*4,k=(p[v*E+O]>>U&1)*3,g[S]=y[k],g[S+1]=y[k+1],g[S+2]=y[k+2],g[S+3]=255}b.blitRgbxImage(e,n,s,l,g,0,!1)}},{key:"_paletteRect",value:function(e,n,s,l,p,y,b){for(var g=this._getScratchBuffer(s*l*4),E=s*l*4,C=0,v=0;C<E;C+=4,v++){var S=p[v]*3;g[C]=y[S],g[C+1]=y[S+1],g[C+2]=y[S+2],g[C+3]=255}b.blitRgbxImage(e,n,s,l,g,0,!1)}},{key:"_gradientFilter",value:function(e,n,s,l,p,y,b,g){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(e){if(this._len===0){if(e.rQwait("TIGHT",3))return null;var n;n=e.rQshift8(),this._len=n&127,n&128&&(n=e.rQshift8(),this._len|=(n&127)<<7,n&128&&(n=e.rQshift8(),this._len|=n<<14))}if(e.rQwait("TIGHT",this._len))return null;var s=e.rQshiftBytes(this._len);return this._len=0,s}},{key:"_getScratchBuffer",value:function(e){return(!this._scratchBuffer||this._scratchBuffer.length<e)&&(this._scratchBuffer=new Uint8Array(e)),this._scratchBuffer}}]),t}();D.default=a},91649:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=x(c(21330));function x(s){return s&&s.__esModule?s:{default:s}}function m(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(p){return typeof p}:m=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},m(s)}function h(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function o(s,l){for(var p=0;p<l.length;p++){var y=l[p];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(s,y.key,y)}}function u(s,l,p){return l&&o(s.prototype,l),p&&o(s,p),s}function d(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),l&&r(s,l)}function r(s,l){return r=Object.setPrototypeOf||function(y,b){return y.__proto__=b,y},r(s,l)}function i(s){var l=f();return function(){var y=e(s),b;if(l){var g=e(this).constructor;b=Reflect.construct(y,arguments,g)}else b=y.apply(this,arguments);return a(this,b)}}function a(s,l){return l&&(m(l)==="object"||typeof l=="function")?l:t(s)}function t(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function e(s){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},e(s)}var n=function(s){d(p,s);var l=i(p);function p(){return h(this,p),l.apply(this,arguments)}return u(p,[{key:"_pngRect",value:function(b,g,E,C,v,S,k){var O=this._readData(v);return O===null?!1:(S.imageRect(b,g,E,C,"image/png",O),!0)}},{key:"_basicRect",value:function(b,g,E,C,v,S,k,O){throw new Error("BasicCompression received in TightPNG rect")}}]),p}(_.default);D.default=n},17834:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(25805),x=m(c(27589));function m(r){return r&&r.__esModule?r:{default:r}}function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var a=0;a<i.length;a++){var t=i[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function u(r,i,a){return i&&o(r.prototype,i),a&&o(r,a),r}var d=function(){function r(){h(this,r),this.strm=new x.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.deflateInit)(this.strm,this.windowBits)}return u(r,[{key:"deflate",value:function(a){this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;var t=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),f=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(t<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){var e=[f],n=f.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,t=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),t<0)throw new Error("zlib deflate failed");var s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);n+=s.length,e.push(s)}while(this.strm.avail_in>0);for(var l=new Uint8Array(n),p=0,y=0;y<e.length;y++)l.set(e[y],p),p+=e[y].length;f=l}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,f}}]),r}();D.default=d},64966:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(E,C){if(!(E instanceof C))throw new TypeError("Cannot call a class as a function")}function _(E,C){for(var v=0;v<C.length;v++){var S=C[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(E,S.key,S)}}function x(E,C,v){return C&&_(E.prototype,C),v&&_(E,v),E}var m=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=0,u,d,r,i,a,t;u=65536,d=1<<24,r=u|d,i=4,a=1024,t=i|a;var f=[r|a,o|o,u|o,r|t,r|i,u|t,o|i,u|o,o|a,r|a,r|t,o|a,d|t,r|i,d|o,o|i,o|t,d|a,d|a,u|a,u|a,r|o,r|o,d|t,u|i,d|i,d|i,u|i,o|o,o|t,u|t,d|o,u|o,r|t,o|i,r|o,r|a,d|o,d|o,o|a,r|i,u|o,u|a,d|i,o|a,o|i,d|t,u|t,r|t,u|i,r|o,d|t,d|i,o|t,u|t,r|a,o|t,d|a,d|a,o|o,u|i,u|a,o|o,r|i];u=1<<20,d=1<<31,r=u|d,i=32,a=32768,t=i|a;var e=[r|t,d|a,o|a,u|t,u|o,o|i,r|i,d|t,d|i,r|t,r|a,d|o,d|a,u|o,o|i,r|i,u|a,u|i,d|t,o|o,d|o,o|a,u|t,r|o,u|i,d|i,o|o,u|a,o|t,r|a,r|o,o|t,o|o,u|t,r|i,u|o,d|t,r|o,r|a,o|a,r|o,d|a,o|i,r|t,u|t,o|i,o|a,d|o,o|t,r|a,u|o,d|i,u|i,d|t,d|i,u|i,u|a,o|o,d|a,o|t,d|o,r|i,r|t,u|a];u=1<<17,d=1<<27,r=u|d,i=8,a=512,t=i|a;var n=[o|t,r|a,o|o,r|i,d|a,o|o,u|t,d|a,u|i,d|i,d|i,u|o,r|t,u|i,r|o,o|t,d|o,o|i,r|a,o|a,u|a,r|o,r|i,u|t,d|t,u|a,u|o,d|t,o|i,r|t,o|a,d|o,r|a,d|o,u|i,o|t,u|o,r|a,d|a,o|o,o|a,u|i,r|t,d|a,d|i,o|a,o|o,r|i,d|t,u|o,d|o,r|t,o|i,u|t,u|a,d|i,r|o,d|t,o|t,r|o,u|t,o|i,r|i,u|a];u=8192,d=1<<23,r=u|d,i=1,a=128,t=i|a;var s=[r|i,u|t,u|t,o|a,r|a,d|t,d|i,u|i,o|o,r|o,r|o,r|t,o|t,o|o,d|a,d|i,o|i,u|o,d|o,r|i,o|a,d|o,u|i,u|a,d|t,o|i,u|a,d|a,u|o,r|a,r|t,o|t,d|a,d|i,r|o,r|t,o|t,o|o,o|o,r|o,u|a,d|a,d|t,o|i,r|i,u|t,u|t,o|a,r|t,o|t,o|i,u|o,d|i,u|i,r|a,d|t,u|i,u|a,d|o,r|i,o|a,d|o,u|o,r|a];u=1<<25,d=1<<30,r=u|d,i=256,a=1<<19,t=i|a;var l=[o|i,u|t,u|a,r|i,o|a,o|i,d|o,u|a,d|t,o|a,u|i,d|t,r|i,r|a,o|t,d|o,u|o,d|a,d|a,o|o,d|i,r|t,r|t,u|i,r|a,d|i,o|o,r|o,u|t,u|o,r|o,o|t,o|a,r|i,o|i,u|o,d|o,u|a,r|i,d|t,u|i,d|o,r|a,u|t,d|t,o|i,u|o,r|a,r|t,o|t,r|o,r|t,u|a,o|o,d|a,r|o,o|t,u|i,d|i,o|a,o|o,d|a,u|t,d|i];u=1<<22,d=1<<29,r=u|d,i=16,a=16384,t=i|a;var p=[d|i,r|o,o|a,r|t,r|o,o|i,r|t,u|o,d|a,u|t,u|o,d|i,u|i,d|a,d|o,o|t,o|o,u|i,d|t,o|a,u|a,d|t,o|i,r|i,r|i,o|o,u|t,r|a,o|t,u|a,r|a,d|o,d|a,o|i,r|i,u|a,r|t,u|o,o|t,d|i,u|o,d|a,d|o,o|t,d|i,r|t,u|a,r|o,u|t,r|a,o|o,r|i,o|i,o|a,r|o,u|t,o|a,u|i,d|t,o|o,r|a,d|o,u|i,d|t];u=1<<21,d=1<<26,r=u|d,i=2,a=2048,t=i|a;var y=[u|o,r|i,d|t,o|o,o|a,d|t,u|t,r|a,r|t,u|o,o|o,d|i,o|i,d|o,r|i,o|t,d|a,u|t,u|i,d|a,d|i,r|o,r|a,u|i,r|o,o|a,o|t,r|t,u|a,o|i,d|o,u|a,d|o,u|a,u|o,d|t,d|t,r|i,r|i,o|i,u|i,d|o,d|a,u|o,r|a,o|t,u|t,r|a,o|t,d|i,r|t,r|o,u|a,o|o,o|i,r|t,o|o,u|t,r|o,o|a,d|i,d|a,o|a,u|i];u=1<<18,d=1<<28,r=u|d,i=64,a=4096,t=i|a;var b=[d|t,o|a,u|o,r|t,d|o,d|t,o|i,d|o,u|i,r|o,r|t,u|a,r|a,u|t,o|a,o|i,r|o,d|i,d|a,o|t,u|a,u|i,r|i,r|a,o|t,o|o,o|o,r|i,d|i,d|a,u|t,u|o,u|t,u|o,r|a,o|a,o|i,r|i,o|a,u|t,d|a,o|i,d|i,r|o,r|i,d|o,u|o,d|t,o|o,r|t,u|i,d|i,r|o,d|a,d|t,o|o,r|t,u|a,u|a,o|t,o|t,u|i,d|o,r|a],g=function(){function E(C){c(this,E),this.keys=[];for(var v=[],S=[],k=[],O=0,R=56;O<56;++O,R-=8){R+=R<-5?65:R<-3?31:R<-1?63:R===27?35:0;var U=R&7;v[O]=C[R>>>3]&1<<U?1:0}for(var N=0;N<16;++N){var pe=N<<1,Z=pe+1;k[pe]=k[Z]=0;for(var le=28;le<59;le+=28)for(var L=le-28;L<le;++L){var K=L+h[N];S[L]=K<le?v[K]:v[K-28]}for(var I=0;I<24;++I)S[m[I]]!==0&&(k[pe]|=1<<23-I),S[m[I+24]]!==0&&(k[Z]|=1<<23-I)}for(var z=0,X=0,Q=0;z<16;++z){var ce=k[X++],ye=k[X++];this.keys[Q]=(ce&16515072)<<6,this.keys[Q]|=(ce&4032)<<10,this.keys[Q]|=(ye&16515072)>>>10,this.keys[Q]|=(ye&4032)>>>6,++Q,this.keys[Q]=(ce&258048)<<12,this.keys[Q]|=(ce&63)<<16,this.keys[Q]|=(ye&258048)>>>4,this.keys[Q]|=ye&63,++Q}}return x(E,[{key:"enc8",value:function(v){var S=v.slice(),k=0,O,R,U;O=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],R=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],U=(O>>>4^R)&252645135,R^=U,O^=U<<4,U=(O>>>16^R)&65535,R^=U,O^=U<<16,U=(R>>>2^O)&858993459,O^=U,R^=U<<2,U=(R>>>8^O)&16711935,O^=U,R^=U<<8,R=R<<1|R>>>31&1,U=(O^R)&2863311530,O^=U,R^=U,O=O<<1|O>>>31&1;for(var N=0,pe=0;N<8;++N){U=R<<28|R>>>4,U^=this.keys[pe++];var Z=y[U&63];Z|=l[U>>>8&63],Z|=n[U>>>16&63],Z|=f[U>>>24&63],U=R^this.keys[pe++],Z|=b[U&63],Z|=p[U>>>8&63],Z|=s[U>>>16&63],Z|=e[U>>>24&63],O^=Z,U=O<<28|O>>>4,U^=this.keys[pe++],Z=y[U&63],Z|=l[U>>>8&63],Z|=n[U>>>16&63],Z|=f[U>>>24&63],U=O^this.keys[pe++],Z|=b[U&63],Z|=p[U>>>8&63],Z|=s[U>>>16&63],Z|=e[U>>>24&63],R^=Z}for(R=R<<31|R>>>1,U=(O^R)&2863311530,O^=U,R^=U,O=O<<31|O>>>1,U=(O>>>8^R)&16711935,R^=U,O^=U<<8,U=(O>>>2^R)&858993459,R^=U,O^=U<<2,U=(R>>>16^O)&65535,O^=U,R^=U<<16,U=(R>>>4^O)&252645135,O^=U,R^=U<<4,U=[R,O],k=0;k<8;k++)S[k]=(U[k>>>2]>>>8*(3-k%4))%256,S[k]<0&&(S[k]+=256);return S}},{key:"encrypt",value:function(v){return this.enc8(v.slice(0,8)).concat(this.enc8(v.slice(8,16)))}}]),E}();D.default=g},22814:function(Te,D,c){"use strict";function _(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(s){return typeof s}:_=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_(e)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=r(c(50500)),m=u(c(57128)),h=c(41895),o=c(20860);function u(e){return e&&e.__esModule?e:{default:e}}function d(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return d=function(){return e},e}function r(e){if(e&&e.__esModule)return e;if(e===null||_(e)!=="object"&&typeof e!="function")return{default:e};var n=d();if(n&&n.has(e))return n.get(e);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in e)if(Object.prototype.hasOwnProperty.call(e,p)){var y=l?Object.getOwnPropertyDescriptor(e,p):null;y&&(y.get||y.set)?Object.defineProperty(s,p,y):s[p]=e[p]}return s.default=e,n&&n.set(e,s),s}function i(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function a(e,n){for(var s=0;s<n.length;s++){var l=n[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function t(e,n,s){return n&&a(e.prototype,n),s&&a(e,s),e}var f=function(){function e(n){if(i(this,e),this._drawCtx=null,this._renderQ=[],this._flushing=!1,this._fbWidth=0,this._fbHeight=0,this._prevDrawStyle="",this._tile=null,this._tile16x16=null,this._tileX=0,this._tileY=0,x.Debug(">> Display.constructor"),this._target=n,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},x.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),x.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return t(e,[{key:"viewportChangePos",value:function(s,l){var p=this._viewportLoc;s=Math.floor(s),l=Math.floor(l),this._clipViewport||(s=-p.w,l=-p.h);var y=p.x+p.w-1,b=p.y+p.h-1;s<0&&p.x+s<0&&(s=-p.x),y+s>=this._fbWidth&&(s-=y+s-this._fbWidth+1),p.y+l<0&&(l=-p.y),b+l>=this._fbHeight&&(l-=b+l-this._fbHeight+1),!(s===0&&l===0)&&(x.Debug("viewportChange deltaX: "+s+", deltaY: "+l),p.x+=s,p.y+=l,this._damage(p.x,p.y,p.w,p.h),this.flip())}},{key:"viewportChangeSize",value:function(s,l){(!this._clipViewport||typeof s=="undefined"||typeof l=="undefined")&&(x.Debug("Setting viewport to full display region"),s=this._fbWidth,l=this._fbHeight),s=Math.floor(s),l=Math.floor(l),s>this._fbWidth&&(s=this._fbWidth),l>this._fbHeight&&(l=this._fbHeight);var p=this._viewportLoc;if(p.w!==s||p.h!==l){p.w=s,p.h=l;var y=this._target;y.width=s,y.height=l,this.viewportChangePos(0,0),this._damage(p.x,p.y,p.w,p.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(s){return this._scale===0?0:(0,o.toSigned32bit)(s/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(s){return this._scale===0?0:(0,o.toSigned32bit)(s/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(s,l){this._prevDrawStyle="",this._fbWidth=s,this._fbHeight=l;var p=this._backbuffer;if(p.width!==s||p.height!==l){var y=null;p.width>0&&p.height>0&&(y=this._drawCtx.getImageData(0,0,p.width,p.height)),p.width!==s&&(p.width=s),p.height!==l&&(p.height=l),y&&this._drawCtx.putImageData(y,0,0)}var b=this._viewportLoc;this.viewportChangeSize(b.w,b.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(s,l,p,y){s<this._damageBounds.left&&(this._damageBounds.left=s),l<this._damageBounds.top&&(this._damageBounds.top=l),s+p>this._damageBounds.right&&(this._damageBounds.right=s+p),l+y>this._damageBounds.bottom&&(this._damageBounds.bottom=l+y)}},{key:"flip",value:function(s){if(this._renderQ.length!==0&&!s)this._renderQPush({type:"flip"});else{var l=this._damageBounds.left,p=this._damageBounds.top,y=this._damageBounds.right-l,b=this._damageBounds.bottom-p,g=l-this._viewportLoc.x,E=p-this._viewportLoc.y;g<0&&(y+=g,l-=g,g=0),E<0&&(b+=E,p-=E,E=0),g+y>this._viewportLoc.w&&(y=this._viewportLoc.w-g),E+b>this._viewportLoc.h&&(b=this._viewportLoc.h-E),y>0&&b>0&&this._targetCtx.drawImage(this._backbuffer,l,p,y,b,g,E,y,b),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(s,l,p,y,b,g){this._renderQ.length!==0&&!g?this._renderQPush({type:"fill",x:s,y:l,width:p,height:y,color:b}):(this._setFillColor(b),this._drawCtx.fillRect(s,l,p,y),this._damage(s,l,p,y))}},{key:"copyImage",value:function(s,l,p,y,b,g,E){this._renderQ.length!==0&&!E?this._renderQPush({type:"copy",oldX:s,oldY:l,x:p,y,width:b,height:g}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,s,l,b,g,p,y,b,g),this._damage(p,y,b,g))}},{key:"imageRect",value:function(s,l,p,y,b,g){if(!(p===0||y===0)){var E=new Image;E.src="data: "+b+";base64,"+m.default.encode(g),this._renderQPush({type:"img",img:E,x:s,y:l,width:p,height:y})}}},{key:"startTile",value:function(s,l,p,y,b){this._tileX=s,this._tileY=l,p===16&&y===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(p,y);for(var g=b[2],E=b[1],C=b[0],v=this._tile.data,S=0;S<p*y*4;S+=4)v[S]=g,v[S+1]=E,v[S+2]=C,v[S+3]=255}},{key:"subTile",value:function(s,l,p,y,b){for(var g=b[2],E=b[1],C=b[0],v=s+p,S=l+y,k=this._tile.data,O=this._tile.width,R=l;R<S;R++)for(var U=s;U<v;U++){var N=(U+R*O)*4;k[N]=g,k[N+1]=E,k[N+2]=C,k[N+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(s,l,p,y,b,g,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*y*4);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blit",data:C,x:s,y:l,width:p,height:y})}else this._bgrxImageData(s,l,p,y,b,g)}},{key:"blitRgbImage",value:function(s,l,p,y,b,g,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*y*3);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blitRgb",data:C,x:s,y:l,width:p,height:y})}else this._rgbImageData(s,l,p,y,b,g)}},{key:"blitRgbxImage",value:function(s,l,p,y,b,g,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*y*4);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blitRgbx",data:C,x:s,y:l,width:p,height:y})}else this._rgbxImageData(s,l,p,y,b,g)}},{key:"drawImage",value:function(s,l,p){this._drawCtx.drawImage(s,l,p),this._damage(l,p,s.width,s.height)}},{key:"autoscale",value:function(s,l){var p;if(s===0||l===0)p=0;else{var y=this._viewportLoc,b=s/l,g=y.w/y.h;g>=b?p=s/y.w:p=l/y.h}this._rescale(p)}},{key:"_rescale",value:function(s){this._scale=s;var l=this._viewportLoc,p=s*l.w+"px",y=s*l.h+"px";(this._target.style.width!==p||this._target.style.height!==y)&&(this._target.style.width=p,this._target.style.height=y)}},{key:"_setFillColor",value:function(s){var l="rgb("+s[2]+","+s[1]+","+s[0]+")";l!==this._prevDrawStyle&&(this._drawCtx.fillStyle=l,this._prevDrawStyle=l)}},{key:"_rgbImageData",value:function(s,l,p,y,b,g){for(var E=this._drawCtx.createImageData(p,y),C=E.data,v=0,S=g;v<p*y*4;v+=4,S+=3)C[v]=b[S],C[v+1]=b[S+1],C[v+2]=b[S+2],C[v+3]=255;this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_bgrxImageData",value:function(s,l,p,y,b,g){for(var E=this._drawCtx.createImageData(p,y),C=E.data,v=0,S=g;v<p*y*4;v+=4,S+=4)C[v]=b[S+2],C[v+1]=b[S+1],C[v+2]=b[S],C[v+3]=255;this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_rgbxImageData",value:function(s,l,p,y,b,g){var E;h.supportsImageMetadata?E=new ImageData(new Uint8ClampedArray(b.buffer,b.byteOffset,p*y*4),p,y):(E=this._drawCtx.createImageData(p,y),E.data.set(new Uint8ClampedArray(b.buffer,b.byteOffset,p*y*4))),this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_renderQPush",value:function(s){this._renderQ.push(s),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var s=!0;s&&this._renderQ.length>0;){var l=this._renderQ[0];switch(l.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(l.oldX,l.oldY,l.x,l.y,l.width,l.height,!0);break;case"fill":this.fillRect(l.x,l.y,l.width,l.height,l.color,!0);break;case"blit":this.blitImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgb":this.blitRgbImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"img":if(l.img.complete&&l.img.width!==0&&l.img.height!==0){if(l.img.width!==l.width||l.img.height!==l.height){x.Error("Decoded image has incorrect dimensions. Got "+l.img.width+"x"+l.img.height+". Expected "+l.width+"x"+l.height+".");return}this.drawImage(l.img,l.x,l.y)}else l.img._noVNCDisplay=this,l.img.addEventListener("load",this._resumeRenderQ),s=!1;break}s&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(s){this._rescale(s)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(s){this._clipViewport=s;var l=this._viewportLoc;this.viewportChangeSize(l.w,l.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),e}();D.default=f},31729:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.encodingName=_,D.encodings=void 0;var c={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};D.encodings=c;function _(x){switch(x){case c.encodingRaw:return"Raw";case c.encodingCopyRect:return"CopyRect";case c.encodingRRE:return"RRE";case c.encodingHextile:return"Hextile";case c.encodingTight:return"Tight";case c.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+x+"]"}}},48831:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(95766),x=m(c(27589));function m(r){return r&&r.__esModule?r:{default:r}}function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var a=0;a<i.length;a++){var t=i[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function u(r,i,a){return i&&o(r.prototype,i),a&&o(r,a),r}var d=function(){function r(){h(this,r),this.strm=new x.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.inflateInit)(this.strm,this.windowBits)}return u(r,[{key:"setInput",value:function(a){a?(this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0):(this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0)}},{key:"inflate",value:function(a){a>this.chunkSize&&(this.chunkSize=a,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=a;var t=(0,_.inflate)(this.strm,0);if(t<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=a)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,_.inflateReset)(this.strm)}}]),r}();D.default=d},18280:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=x(c(69314));function x(r){return r&&r.__esModule?r:{default:r}}var m={};function h(r,i){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in m)throw new Error('Duplicate entry for key "'+r+'"');m[r]=[i,i,i,i]}function o(r,i,a){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in m)throw new Error('Duplicate entry for key "'+r+'"');m[r]=[i,i,a,i]}function u(r,i,a){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in m)throw new Error('Duplicate entry for key "'+r+'"');m[r]=[i,i,i,a]}o("Alt",_.default.XK_Alt_L,_.default.XK_Alt_R),h("AltGraph",_.default.XK_ISO_Level3_Shift),h("CapsLock",_.default.XK_Caps_Lock),o("Control",_.default.XK_Control_L,_.default.XK_Control_R),o("Meta",_.default.XK_Super_L,_.default.XK_Super_R),h("NumLock",_.default.XK_Num_Lock),h("ScrollLock",_.default.XK_Scroll_Lock),o("Shift",_.default.XK_Shift_L,_.default.XK_Shift_R),u("Enter",_.default.XK_Return,_.default.XK_KP_Enter),h("Tab",_.default.XK_Tab),u(" ",_.default.XK_space,_.default.XK_KP_Space),u("ArrowDown",_.default.XK_Down,_.default.XK_KP_Down),u("ArrowUp",_.default.XK_Up,_.default.XK_KP_Up),u("ArrowLeft",_.default.XK_Left,_.default.XK_KP_Left),u("ArrowRight",_.default.XK_Right,_.default.XK_KP_Right),u("End",_.default.XK_End,_.default.XK_KP_End),u("Home",_.default.XK_Home,_.default.XK_KP_Home),u("PageDown",_.default.XK_Next,_.default.XK_KP_Next),u("PageUp",_.default.XK_Prior,_.default.XK_KP_Prior),h("Backspace",_.default.XK_BackSpace),u("Clear",_.default.XK_Clear,_.default.XK_KP_Begin),h("Copy",_.default.XF86XK_Copy),h("Cut",_.default.XF86XK_Cut),u("Delete",_.default.XK_Delete,_.default.XK_KP_Delete),u("Insert",_.default.XK_Insert,_.default.XK_KP_Insert),h("Paste",_.default.XF86XK_Paste),h("Redo",_.default.XK_Redo),h("Undo",_.default.XK_Undo),h("Cancel",_.default.XK_Cancel),h("ContextMenu",_.default.XK_Menu),h("Escape",_.default.XK_Escape),h("Execute",_.default.XK_Execute),h("Find",_.default.XK_Find),h("Help",_.default.XK_Help),h("Pause",_.default.XK_Pause),h("Select",_.default.XK_Select),h("ZoomIn",_.default.XF86XK_ZoomIn),h("ZoomOut",_.default.XF86XK_ZoomOut),h("BrightnessDown",_.default.XF86XK_MonBrightnessDown),h("BrightnessUp",_.default.XF86XK_MonBrightnessUp),h("Eject",_.default.XF86XK_Eject),h("LogOff",_.default.XF86XK_LogOff),h("Power",_.default.XF86XK_PowerOff),h("PowerOff",_.default.XF86XK_PowerDown),h("PrintScreen",_.default.XK_Print),h("Hibernate",_.default.XF86XK_Hibernate),h("Standby",_.default.XF86XK_Standby),h("WakeUp",_.default.XF86XK_WakeUp),h("AllCandidates",_.default.XK_MultipleCandidate),h("Alphanumeric",_.default.XK_Eisu_Shift),h("CodeInput",_.default.XK_Codeinput),h("Compose",_.default.XK_Multi_key),h("Convert",_.default.XK_Henkan),h("GroupFirst",_.default.XK_ISO_First_Group),h("GroupLast",_.default.XK_ISO_Last_Group),h("GroupNext",_.default.XK_ISO_Next_Group),h("GroupPrevious",_.default.XK_ISO_Prev_Group),h("NonConvert",_.default.XK_Muhenkan),h("PreviousCandidate",_.default.XK_PreviousCandidate),h("SingleCandidate",_.default.XK_SingleCandidate),h("HangulMode",_.default.XK_Hangul),h("HanjaMode",_.default.XK_Hangul_Hanja),h("JunjuaMode",_.default.XK_Hangul_Jeonja),h("Eisu",_.default.XK_Eisu_toggle),h("Hankaku",_.default.XK_Hankaku),h("Hiragana",_.default.XK_Hiragana),h("HiraganaKatakana",_.default.XK_Hiragana_Katakana),h("KanaMode",_.default.XK_Kana_Shift),h("KanjiMode",_.default.XK_Kanji),h("Katakana",_.default.XK_Katakana),h("Romaji",_.default.XK_Romaji),h("Zenkaku",_.default.XK_Zenkaku),h("ZenkakuHanaku",_.default.XK_Zenkaku_Hankaku),h("F1",_.default.XK_F1),h("F2",_.default.XK_F2),h("F3",_.default.XK_F3),h("F4",_.default.XK_F4),h("F5",_.default.XK_F5),h("F6",_.default.XK_F6),h("F7",_.default.XK_F7),h("F8",_.default.XK_F8),h("F9",_.default.XK_F9),h("F10",_.default.XK_F10),h("F11",_.default.XK_F11),h("F12",_.default.XK_F12),h("F13",_.default.XK_F13),h("F14",_.default.XK_F14),h("F15",_.default.XK_F15),h("F16",_.default.XK_F16),h("F17",_.default.XK_F17),h("F18",_.default.XK_F18),h("F19",_.default.XK_F19),h("F20",_.default.XK_F20),h("F21",_.default.XK_F21),h("F22",_.default.XK_F22),h("F23",_.default.XK_F23),h("F24",_.default.XK_F24),h("F25",_.default.XK_F25),h("F26",_.default.XK_F26),h("F27",_.default.XK_F27),h("F28",_.default.XK_F28),h("F29",_.default.XK_F29),h("F30",_.default.XK_F30),h("F31",_.default.XK_F31),h("F32",_.default.XK_F32),h("F33",_.default.XK_F33),h("F34",_.default.XK_F34),h("F35",_.default.XK_F35),h("Close",_.default.XF86XK_Close),h("MailForward",_.default.XF86XK_MailForward),h("MailReply",_.default.XF86XK_Reply),h("MailSend",_.default.XF86XK_Send),h("MediaFastForward",_.default.XF86XK_AudioForward),h("MediaPause",_.default.XF86XK_AudioPause),h("MediaPlay",_.default.XF86XK_AudioPlay),h("MediaRecord",_.default.XF86XK_AudioRecord),h("MediaRewind",_.default.XF86XK_AudioRewind),h("MediaStop",_.default.XF86XK_AudioStop),h("MediaTrackNext",_.default.XF86XK_AudioNext),h("MediaTrackPrevious",_.default.XF86XK_AudioPrev),h("New",_.default.XF86XK_New),h("Open",_.default.XF86XK_Open),h("Print",_.default.XK_Print),h("Save",_.default.XF86XK_Save),h("SpellCheck",_.default.XF86XK_Spell),h("AudioVolumeDown",_.default.XF86XK_AudioLowerVolume),h("AudioVolumeUp",_.default.XF86XK_AudioRaiseVolume),h("AudioVolumeMute",_.default.XF86XK_AudioMute),h("MicrophoneVolumeMute",_.default.XF86XK_AudioMicMute),h("LaunchApplication1",_.default.XF86XK_MyComputer),h("LaunchApplication2",_.default.XF86XK_Calculator),h("LaunchCalendar",_.default.XF86XK_Calendar),h("LaunchMail",_.default.XF86XK_Mail),h("LaunchMediaPlayer",_.default.XF86XK_AudioMedia),h("LaunchMusicPlayer",_.default.XF86XK_Music),h("LaunchPhone",_.default.XF86XK_Phone),h("LaunchScreenSaver",_.default.XF86XK_ScreenSaver),h("LaunchSpreadsheet",_.default.XF86XK_Excel),h("LaunchWebBrowser",_.default.XF86XK_WWW),h("LaunchWebCam",_.default.XF86XK_WebCam),h("LaunchWordProcessor",_.default.XF86XK_Word),h("BrowserBack",_.default.XF86XK_Back),h("BrowserFavorites",_.default.XF86XK_Favorites),h("BrowserForward",_.default.XF86XK_Forward),h("BrowserHome",_.default.XF86XK_HomePage),h("BrowserRefresh",_.default.XF86XK_Refresh),h("BrowserSearch",_.default.XF86XK_Search),h("BrowserStop",_.default.XF86XK_Stop),h("Dimmer",_.default.XF86XK_BrightnessAdjust),h("MediaAudioTrack",_.default.XF86XK_AudioCycleTrack),h("RandomToggle",_.default.XF86XK_AudioRandomPlay),h("SplitScreenToggle",_.default.XF86XK_SplitScreen),h("Subtitle",_.default.XF86XK_Subtitle),h("VideoModeNext",_.default.XF86XK_Next_VMode),u("=",_.default.XK_equal,_.default.XK_KP_Equal),u("+",_.default.XK_plus,_.default.XK_KP_Add),u("-",_.default.XK_minus,_.default.XK_KP_Subtract),u("*",_.default.XK_asterisk,_.default.XK_KP_Multiply),u("/",_.default.XK_slash,_.default.XK_KP_Divide),u(".",_.default.XK_period,_.default.XK_KP_Decimal),u(",",_.default.XK_comma,_.default.XK_KP_Separator),u("0",_.default.XK_0,_.default.XK_KP_0),u("1",_.default.XK_1,_.default.XK_KP_1),u("2",_.default.XK_2,_.default.XK_KP_2),u("3",_.default.XK_3,_.default.XK_KP_3),u("4",_.default.XK_4,_.default.XK_KP_4),u("5",_.default.XK_5,_.default.XK_KP_5),u("6",_.default.XK_6,_.default.XK_KP_6),u("7",_.default.XK_7,_.default.XK_KP_7),u("8",_.default.XK_8,_.default.XK_KP_8),u("9",_.default.XK_9,_.default.XK_KP_9);var d=m;D.default=d},15311:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};D.default=c},91584:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(b,g){if(!(b instanceof g))throw new TypeError("Cannot call a class as a function")}function _(b,g){for(var E=0;E<g.length;E++){var C=g[E];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}function x(b,g,E){return g&&_(b.prototype,g),E&&_(b,E),b}var m=0,h=1,o=2,u=4,d=8,r=16,i=32,a=64,t=127,f=50,e=90,n=250,s=1e3,l=1e3,p=50,y=function(){function b(){c(this,b),this._target=null,this._state=t,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return x(b,[{key:"attach",value:function(E){this.detach(),this._target=E,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}},{key:"detach",value:function(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}},{key:"_eventHandler",value:function(E){var C;switch(E.stopPropagation(),E.preventDefault(),E.type){case"touchstart":C=this._touchStart;break;case"touchmove":C=this._touchMove;break;case"touchend":case"touchcancel":C=this._touchEnd;break}for(var v=0;v<E.changedTouches.length;v++){var S=E.changedTouches[v];C.call(this,S.identifier,S.clientX,S.clientY)}}},{key:"_touchStart",value:function(E,C,v){if(this._hasDetectedGesture()||this._state===m){this._ignored.push(E);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>n){this._state=m,this._ignored.push(E);return}if(this._waitingRelease){this._state=m,this._ignored.push(E);return}switch(this._tracked.push({id:E,started:Date.now(),active:!0,firstX:C,firstY:v,lastX:C,lastY:v,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(h|d|r),this._stopLongpressTimeout();break;case 3:this._state&=~(o|i|a);break;default:this._state=m}}},{key:"_touchMove",value:function(E,C,v){var S=this._tracked.find(function(pe){return pe.id===E});if(S!==void 0){S.lastX=C,S.lastY=v;var k=C-S.firstX,O=v-S.firstY;if((S.firstX!==S.lastX||S.firstY!==S.lastY)&&(S.angle=Math.atan2(O,k)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(k,O)<f)return;if(this._state&=~(h|o|u|r),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~d),this._tracked.length!==2&&(this._state&=~(i|a)),this._tracked.length===2){var R=this._tracked.find(function(pe){return pe.id!==E}),U=Math.hypot(R.firstX-R.lastX,R.firstY-R.lastY);if(U>f){var N=Math.abs(S.angle-R.angle);N=Math.abs((N+180)%360-180),N>e?this._state&=~i:this._state&=~a,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(E,C,v){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=t,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=m),!this._hasDetectedGesture()&&(this._state&=~(d|i|a),this._state&=~r,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=~(o|u);break;case 2:this._state&=~(h|u);break}if(this._waitingRelease){Date.now()-this._releaseStart>n&&(this._state=m),this._tracked.some(function(O){return Date.now()-O.started>s})&&(this._state=m);var S=this._tracked.find(function(O){return O.id===E});if(S.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==m)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var k=0;k<this._tracked.length;k++)this._tracked[k].active&&this._ignored.push(this._tracked[k].id);this._tracked=[],this._state=m,this._ignored.indexOf(E)!==-1&&this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&(this._state=t,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return!(this._state===m||this._state&this._state-1||this._state&(h|o|u)&&this._tracked.some(function(E){return E.active}))}},{key:"_startLongpressTimeout",value:function(){var E=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return E._longpressTimeout()},l)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=r,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var E=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return E._twoTouchTimeout()},p)}},{key:"_stopTwoTouchTimeout",value:function(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}},{key:"_isTwoTouchTimeoutRunning",value:function(){return this._twoTouchTimeoutId!==null}},{key:"_twoTouchTimeout",value:function(){if(this._tracked.length===0)throw new Error("A pinch or two drag gesture failed, no tracked touches");var E=this._getAverageMovement(),C=Math.abs(E.x),v=Math.abs(E.y),S=this._getAverageDistance(),k=Math.abs(Math.hypot(S.first.x,S.first.y)-Math.hypot(S.last.x,S.last.y));v<k&&C<k?this._state=a:this._state=i,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(E){var C={type:this._stateToGesture(this._state)},v=this._getPosition(),S=v.last;switch(E==="gesturestart"&&(S=v.first),this._state){case i:case a:S=v.first;break}if(C.clientX=S.x,C.clientY=S.y,this._state===a){var k=this._getAverageDistance();E==="gesturestart"?(C.magnitudeX=k.first.x,C.magnitudeY=k.first.y):(C.magnitudeX=k.last.x,C.magnitudeY=k.last.y)}else if(this._state===i)if(E==="gesturestart")C.magnitudeX=0,C.magnitudeY=0;else{var O=this._getAverageMovement();C.magnitudeX=O.x,C.magnitudeY=O.y}var R=new CustomEvent(E,{detail:C});this._target.dispatchEvent(R)}},{key:"_stateToGesture",value:function(E){switch(E){case h:return"onetap";case o:return"twotap";case u:return"threetap";case d:return"drag";case r:return"longpress";case i:return"twodrag";case a:return"pinch"}throw new Error("Unknown gesture state: "+E)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var E=this._tracked.length,C=0,v=0,S=0,k=0,O=0;O<this._tracked.length;O++)C+=this._tracked[O].firstX,v+=this._tracked[O].firstY,S+=this._tracked[O].lastX,k+=this._tracked[O].lastY;return{first:{x:C/E,y:v/E},last:{x:S/E,y:k/E}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var E,C;E=C=0;for(var v=this._tracked.length,S=0;S<this._tracked.length;S++)E+=this._tracked[S].lastX-this._tracked[S].firstX,C+=this._tracked[S].lastY-this._tracked[S].firstY;return{x:E/v,y:C/v}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var E=this._tracked[0],C=this._tracked[this._tracked.length-1],v=Math.abs(C.firstX-E.firstX),S=Math.abs(C.firstY-E.firstY),k=Math.abs(C.lastX-E.lastX),O=Math.abs(C.lastY-E.lastY);return{first:{x:v,y:S},last:{x:k,y:O}}}}]),b}();D.default=y},1606:function(Te,D,c){"use strict";function _(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(n)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=i(c(50500)),m=c(79420),h=i(c(50556)),o=d(c(69314)),u=i(c(41895));function d(n){return n&&n.__esModule?n:{default:n}}function r(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return r=function(){return n},n}function i(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var s=r();if(s&&s.has(n))return s.get(n);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in n)if(Object.prototype.hasOwnProperty.call(n,y)){var b=p?Object.getOwnPropertyDescriptor(n,y):null;b&&(b.get||b.set)?Object.defineProperty(l,y,b):l[y]=n[y]}return l.default=n,s&&s.set(n,l),l}function a(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function t(n,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(n,p.key,p)}}function f(n,s,l){return s&&t(n.prototype,s),l&&t(n,l),n}var e=function(){function n(s){a(this,n),this._target=s||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=function(){}}return f(n,[{key:"_sendKeyEvent",value:function(l,p,y){if(y)this._keyDownList[p]=l;else{if(!(p in this._keyDownList))return;delete this._keyDownList[p]}x.Debug("onkeyevent "+(y?"down":"up")+", keysym: "+l,", code: "+p),this.onkeyevent(l,p,y)}},{key:"_getKeyCode",value:function(l){var p=h.getKeycode(l);if(p!=="Unidentified")return p;if(l.keyCode&&l.type!=="keypress"&&l.keyCode!==229)return"Platform"+l.keyCode;if(l.keyIdentifier){if(l.keyIdentifier.substr(0,2)!=="U+")return l.keyIdentifier;var y=parseInt(l.keyIdentifier.substr(2),16),b=String.fromCharCode(y).toUpperCase();return"Platform"+b.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(l){var p=this._getKeyCode(l),y=h.getKeysym(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),p==="AltRight"&&l.timeStamp-this._altGrCtrlTime<50?y=o.default.XK_ISO_Level3_Shift:this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),p==="Unidentified"){y&&(this._sendKeyEvent(y,p,!0),this._sendKeyEvent(y,p,!1)),(0,m.stopEvent)(l);return}if(u.isMac()||u.isIOS())switch(y){case o.default.XK_Super_L:y=o.default.XK_Alt_L;break;case o.default.XK_Super_R:y=o.default.XK_Super_L;break;case o.default.XK_Alt_L:y=o.default.XK_Mode_switch;break;case o.default.XK_Alt_R:y=o.default.XK_ISO_Level3_Shift;break}if(p in this._keyDownList&&(y=this._keyDownList[p]),(u.isMac()||u.isIOS())&&p==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1),(0,m.stopEvent)(l);return}if(!y&&(!l.key||u.isIE()||u.isEdge())){this._pendingKey=p,setTimeout(this._handleKeyPressTimeout.bind(this),10,l);return}if(this._pendingKey=null,(0,m.stopEvent)(l),p==="ControlLeft"&&u.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=l.timeStamp;return}this._sendKeyEvent(y,p,!0)}},{key:"_handleKeyPress",value:function(l){if((0,m.stopEvent)(l),this._pendingKey!==null){var p=this._getKeyCode(l),y=h.getKeysym(l);if(!(p!=="Unidentified"&&p!=this._pendingKey)){if(p=this._pendingKey,this._pendingKey=null,!y){x.Info("keypress with no keysym:",l);return}this._sendKeyEvent(y,p,!0)}}}},{key:"_handleKeyPressTimeout",value:function(l){if(this._pendingKey!==null){var p,y=this._pendingKey;if(this._pendingKey=null,l.keyCode>=48&&l.keyCode<=57)p=l.keyCode;else if(l.keyCode>=65&&l.keyCode<=90){var b=String.fromCharCode(l.keyCode);l.shiftKey?b=b.toUpperCase():b=b.toLowerCase(),p=b.charCodeAt()}else p=0;this._sendKeyEvent(p,y,!0)}}},{key:"_handleKeyUp",value:function(l){(0,m.stopEvent)(l);var p=this._getKeyCode(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),(u.isMac()||u.isIOS())&&p==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[p],p,!1),u.isWindows()&&(p==="ShiftLeft"||p==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){x.Debug(">> Keyboard.allKeysUp");for(var l in this._keyDownList)this._sendKeyEvent(this._keyDownList[l],l,!1);x.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(l){if(!l.skipCheckAlt&&!l.altKey){var p=this._target,y=this._keyDownList;["AltLeft","AltRight"].forEach(function(b){if(b in y){var g=new KeyboardEvent("keyup",{key:y[b],code:b});g.skipCheckAlt=!0,p.dispatchEvent(g)}})}}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),u.isWindows()&&u.isFirefox()){var l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.addEventListener(p,l,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(u.isWindows()&&u.isFirefox()){var l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.removeEventListener(p,l)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),n}();D.default=e},69314:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};D.default=c},44836:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,402:2294,466:16777681,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8361:3839,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8711:2245,8728:3018,8730:2262,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8756:2240,8764:2248,8771:2249,8773:16785992,8800:2237,8801:2255,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,12289:1188,12290:1185,12300:1186,12301:1187,12443:1246,12444:1247,12449:1191,12450:1201,12451:1192,12452:1202,12453:1193,12454:1203,12455:1194,12456:1204,12457:1195,12458:1205,12459:1206,12461:1207,12463:1208,12465:1209,12467:1210,12469:1211,12471:1212,12473:1213,12475:1214,12477:1215,12479:1216,12481:1217,12483:1199,12484:1218,12486:1219,12488:1220,12490:1221,12491:1222,12492:1223,12493:1224,12494:1225,12495:1226,12498:1227,12501:1228,12504:1229,12507:1230,12510:1231,12511:1232,12512:1233,12513:1234,12514:1235,12515:1196,12516:1236,12517:1197,12518:1237,12519:1198,12520:1238,12521:1239,12522:1240,12523:1241,12524:1242,12525:1243,12527:1244,12530:1190,12531:1245,12539:1189,12540:1200},_={lookup:function(m){if(m>=32&&m<=255)return m;var h=c[m];return h!==void 0?h:16777216|m}};D.default=_},50556:function(Te,D,c){"use strict";function _(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(n)}Object.defineProperty(D,"__esModule",{value:!0}),D.getKeycode=t,D.getKey=f,D.getKeysym=e;var x=a(c(69314)),m=a(c(44836)),h=a(c(88193)),o=a(c(15311)),u=a(c(18280)),d=i(c(41895));function r(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return r=function(){return n},n}function i(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var s=r();if(s&&s.has(n))return s.get(n);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in n)if(Object.prototype.hasOwnProperty.call(n,y)){var b=p?Object.getOwnPropertyDescriptor(n,y):null;b&&(b.get||b.set)?Object.defineProperty(l,y,b):l[y]=n[y]}return l.default=n,s&&s.set(n,l),l}function a(n){return n&&n.__esModule?n:{default:n}}function t(n){if(n.code){switch(n.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return n.code}if(n.type!=="keypress"&&n.keyCode in h.default){var s=h.default[n.keyCode];if(d.isMac()&&s==="ContextMenu"&&(s="MetaRight"),n.location===2)switch(s){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(n.location===3)switch(s){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return s}return"Unidentified"}function f(n){if(n.key!==void 0){switch(n.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return n.char}switch(n.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(n.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(n.key==="\0"&&n.code==="NumpadDecimal")return"Delete";if(!d.isIE()&&!d.isEdge()||n.key.length!==1&&n.key!=="Unidentified")return n.key}var s=t(n);return s in o.default?o.default[s]:n.charCode?String.fromCharCode(n.charCode):"Unidentified"}function e(n){var s=f(n);if(s==="Unidentified")return null;if(s in u.default){var l=n.location;if(s==="Meta"&&l===0&&(l=2),s==="Clear"&&l===3){var p=t(n);p==="NumLock"&&(l=0)}if((l===void 0||l>3)&&(l=0),s==="Meta"){var y=t(n);if(y==="AltLeft")return x.default.XK_Meta_L;if(y==="AltRight")return x.default.XK_Meta_R}if(s==="Clear"){var b=t(n);if(b==="NumLock")return x.default.XK_Num_Lock}return u.default[s][l]}if(s.length!==1)return null;var g=s.charCodeAt();return g?m.default.lookup(g):null}},88193:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={8:"Backspace",9:"Tab",10:"NumpadClear",12:"Numpad5",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"};D.default=c},87619:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};D.default=c},62013:function(Te,D,c){"use strict";var _;_={value:!0},D.Z=void 0;var x=c(20860),m=U(c(50500)),h=c(31516),o=c(41895),u=c(92742),d=c(79420),r=O(c(5004)),i=O(c(22814)),a=O(c(48831)),t=O(c(17834)),f=O(c(1606)),e=O(c(91584)),n=O(c(54641)),s=O(c(16327)),l=O(c(64966)),p=O(c(69314)),y=O(c(87619)),b=c(31729);c(21882);var g=O(c(11231)),E=O(c(17852)),C=O(c(57507)),v=O(c(18330)),S=O(c(21330)),k=O(c(91649));function O(de){return de&&de.__esModule?de:{default:de}}function R(){if(typeof WeakMap!="function")return null;var de=new WeakMap;return R=function(){return de},de}function U(de){if(de&&de.__esModule)return de;if(de===null||N(de)!=="object"&&typeof de!="function")return{default:de};var ue=R();if(ue&&ue.has(de))return ue.get(de);var ae={},G=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in de)if(Object.prototype.hasOwnProperty.call(de,F)){var H=G?Object.getOwnPropertyDescriptor(de,F):null;H&&(H.get||H.set)?Object.defineProperty(ae,F,H):ae[F]=de[F]}return ae.default=de,ue&&ue.set(de,ae),ae}function N(de){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(ae){return typeof ae}:N=function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},N(de)}function pe(de,ue){if(!(de instanceof ue))throw new TypeError("Cannot call a class as a function")}function Z(de,ue){for(var ae=0;ae<ue.length;ae++){var G=ue[ae];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(de,G.key,G)}}function le(de,ue,ae){return ue&&Z(de.prototype,ue),ae&&Z(de,ae),de}function L(de,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");de.prototype=Object.create(ue&&ue.prototype,{constructor:{value:de,writable:!0,configurable:!0}}),ue&&K(de,ue)}function K(de,ue){return K=Object.setPrototypeOf||function(G,F){return G.__proto__=F,G},K(de,ue)}function I(de){var ue=Q();return function(){var G=ce(de),F;if(ue){var H=ce(this).constructor;F=Reflect.construct(G,arguments,H)}else F=G.apply(this,arguments);return z(this,F)}}function z(de,ue){return ue&&(N(ue)==="object"||typeof ue=="function")?ue:X(de)}function X(de){if(de===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return de}function Q(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(de){return!1}}function ce(de){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(ae){return ae.__proto__||Object.getPrototypeOf(ae)},ce(de)}var ye=3,Le="rgb(40, 40, 40)",Se=17,ie=50,he=19,ke=75,Ae=50,Oe=1e3,Me=50,Re=1,Ke=null,Xe=null,Ne=null,Fe=null,De=1<<24,Ie=1<<25,te=1<<26,ne=1<<27,Ee=1<<28,xe=function(de){L(ae,de);var ue=I(ae);function ae(G,F,H){var T;if(pe(this,ae),!G)throw new Error("Must specify target");if(!F)throw new Error("Must specify URL");T=ue.call(this),T._target=G,T._url=F,H=H||{},T._rfbCredentials=H.credentials||{},T._shared="shared"in H?!!H.shared:!0,T._repeaterID=H.repeaterID||"",T._wsProtocols=H.wsProtocols||[],T._rfbConnectionState="",T._rfbInitState="",T._rfbAuthScheme=-1,T._rfbCleanDisconnect=!0,T._rfbVersion=0,T._rfbMaxVersion=3.8,T._rfbTightVNC=!1,T._rfbVeNCryptState=0,T._rfbXvpVer=0,T._fbWidth=0,T._fbHeight=0,T._fbName="",T._capabilities={power:!1},T._supportsFence=!1,T._supportsContinuousUpdates=!1,T._enabledContinuousUpdates=!1,T._supportsSetDesktopSize=!1,T._screenID=0,T._screenFlags=0,T._qemuExtKeyEventSupported=!1,T._clipboardText=null,T._clipboardServerCapabilitiesActions={},T._clipboardServerCapabilitiesFormats={},T._sock=null,T._display=null,T._flushing=!1,T._keyboard=null,T._gestures=null,T._disconnTimer=null,T._resizeTimeout=null,T._mouseMoveTimer=null,T._decoders={},T._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},T._mousePos={},T._mouseButtonMask=0,T._mouseLastMoveTime=0,T._viewportDragging=!1,T._viewportDragPos={},T._viewportHasMoved=!1,T._accumulatedWheelDeltaX=0,T._accumulatedWheelDeltaY=0,T._gestureLastTapTime=null,T._gestureFirstDoubleTapEv=null,T._gestureLastMagnitudeX=0,T._gestureLastMagnitudeY=0,T._eventHandlers={focusCanvas:T._focusCanvas.bind(X(T)),windowResize:T._windowResize.bind(X(T)),handleMouse:T._handleMouse.bind(X(T)),handleWheel:T._handleWheel.bind(X(T)),handleGesture:T._handleGesture.bind(X(T))},m.Debug(">> RFB.constructor"),T._screen=document.createElement("div"),T._screen.style.display="flex",T._screen.style.width="100%",T._screen.style.height="100%",T._screen.style.overflow="auto",T._screen.style.background=Le,T._canvas=document.createElement("canvas"),T._canvas.style.margin="auto",T._canvas.style.outline="none",T._canvas.style.flexShrink="0",T._canvas.width=0,T._canvas.height=0,T._canvas.tabIndex=-1,T._screen.appendChild(T._canvas),T._cursor=new n.default,T._cursorImage=ae.cursors.none,T._decoders[b.encodings.encodingRaw]=new g.default,T._decoders[b.encodings.encodingCopyRect]=new E.default,T._decoders[b.encodings.encodingRRE]=new C.default,T._decoders[b.encodings.encodingHextile]=new v.default,T._decoders[b.encodings.encodingTight]=new S.default,T._decoders[b.encodings.encodingTightPNG]=new k.default;try{T._display=new i.default(T._canvas)}catch(V){throw m.Error("Display exception: "+V),V}return T._display.onflush=T._onFlush.bind(X(T)),T._keyboard=new f.default(T._canvas),T._keyboard.onkeyevent=T._handleKeyEvent.bind(X(T)),T._gestures=new e.default,T._sock=new s.default,T._sock.on("message",function(){T._handleMessage()}),T._sock.on("open",function(){T._rfbConnectionState==="connecting"&&T._rfbInitState===""?(T._rfbInitState="ProtocolVersion",m.Debug("Starting VNC handshake")):T._fail("Unexpected server connection while "+T._rfbConnectionState)}),T._sock.on("close",function(V){m.Debug("WebSocket on-close event");var _e="";switch(V.code&&(_e="(code: "+V.code,V.reason&&(_e+=", reason: "+V.reason),_e+=")"),T._rfbConnectionState){case"connecting":T._fail("Connection closed "+_e);break;case"connected":T._updateConnectionState("disconnecting"),T._updateConnectionState("disconnected");break;case"disconnecting":T._updateConnectionState("disconnected");break;case"disconnected":T._fail("Unexpected server disconnect when already disconnected "+_e);break;default:T._fail("Unexpected server disconnect before connecting "+_e);break}T._sock.off("close")}),T._sock.on("error",function(V){return m.Warn("WebSocket on-error event")}),setTimeout(T._updateConnectionState.bind(X(T),"connecting")),m.Debug("<< RFB.constructor"),T.dragViewport=!1,T.focusOnClick=!0,T._viewOnly=!1,T._clipViewport=!1,T._scaleViewport=!1,T._resizeSession=!1,T._showDotCursor=!1,H.showDotCursor!==void 0&&(m.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),T._showDotCursor=H.showDotCursor),T._qualityLevel=6,T._compressionLevel=2,T}return le(ae,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(F){this._rfbCredentials=F,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){this._rfbConnectionState!=="connected"||this._viewOnly||(m.Info("Sending Ctrl-Alt-Del"),this.sendKey(p.default.XK_Control_L,"ControlLeft",!0),this.sendKey(p.default.XK_Alt_L,"AltLeft",!0),this.sendKey(p.default.XK_Delete,"Delete",!0),this.sendKey(p.default.XK_Delete,"Delete",!1),this.sendKey(p.default.XK_Alt_L,"AltLeft",!1),this.sendKey(p.default.XK_Control_L,"ControlLeft",!1))}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(F,H,T){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(T===void 0){this.sendKey(F,H,!0),this.sendKey(F,H,!1);return}var V=y.default[H];if(this._qemuExtKeyEventSupported&&V)F=F||0,m.Info("Sending key ("+(T?"down":"up")+"): keysym "+F+", scancode "+V),ae.messages.QEMUExtendedKeyEvent(this._sock,F,T,V);else{if(!F)return;m.Info("Sending keysym ("+(T?"down":"up")+"): "+F),ae.messages.keyEvent(this._sock,F,T?1:0)}}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(F){if(!(this._rfbConnectionState!=="connected"||this._viewOnly))if(this._clipboardServerCapabilitiesFormats[Re]&&this._clipboardServerCapabilitiesActions[ne])this._clipboardText=F,ae.messages.extendedClipboardNotify(this._sock,[Re]);else{for(var H=new Uint8Array(F.length),T=0;T<F.length;T++)H[T]=F.charCodeAt(T);ae.messages.clientCutText(this._sock,H)}}},{key:"_connect",value:function(){m.Debug(">> RFB.connect"),m.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(F){F.name==="SyntaxError"?this._fail("Invalid host or port ("+F+")"):this._fail("Error when opening socket ("+F+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),m.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){m.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(F){if(F.name!=="NotFoundError")throw F}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),m.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(F){this.focusOnClick&&this.focus()}},{key:"_setDesktopName",value:function(F){this._fbName=F,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(F){var H=this;window.requestAnimationFrame(function(){H._updateClip(),H._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var F=this._display.clipViewport,H=this._clipViewport;if(this._scaleViewport&&(H=!1),F!==H&&(this._display.clipViewport=H),H){var T=this._screenSize();this._display.viewportChangeSize(T.w,T.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var F=this._screenSize();this._display.autoscale(F.w,F.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!(!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)){var F=this._screenSize();ae.messages.setDesktopSize(this._sock,Math.floor(F.w),Math.floor(F.h),this._screenID,this._screenFlags),m.Debug("Requested new desktop size: "+F.w+"x"+F.h)}}},{key:"_screenSize",value:function(){var F=this._screen.getBoundingClientRect();return{w:F.width,h:F.height}}},{key:"_fixScrollbars",value:function(){var F=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=F}},{key:"_updateConnectionState",value:function(F){var H=this,T=this._rfbConnectionState;if(F===T){m.Debug("Already in state '"+F+"', ignoring");return}if(T==="disconnected"){m.Error("Tried changing state of a disconnected RFB object");return}switch(F){case"connected":if(T!=="connecting"){m.Error("Bad transition to connected state, previous connection state: "+T);return}break;case"disconnected":if(T!=="disconnecting"){m.Error("Bad transition to disconnected state, previous connection state: "+T);return}break;case"connecting":if(T!==""){m.Error("Bad transition to connecting state, previous connection state: "+T);return}break;case"disconnecting":if(T!=="connected"&&T!=="connecting"){m.Error("Bad transition to disconnecting state, previous connection state: "+T);return}break;default:m.Error("Unknown connection state: "+F);return}switch(this._rfbConnectionState=F,m.Debug("New state '"+F+"', was '"+T+"'."),this._disconnTimer&&F!=="disconnecting"&&(m.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),F){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){m.Error("Disconnection timed out."),H._updateConnectionState("disconnected")},ye*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(F){switch(this._rfbConnectionState){case"disconnecting":m.Error("Failed when disconnecting: "+F);break;case"connected":m.Error("Failed while connected: "+F);break;case"connecting":m.Error("Failed when connecting: "+F);break;default:m.Error("RFB failure: "+F);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(F,H){this._capabilities[F]=H,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){m.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":m.Error("Got data while disconnected");break;case"connected":for(;!(this._flushing||!this._normalMsg()||this._sock.rQlen===0););break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(F,H,T){this.sendKey(F,H,T)}},{key:"_handleMouse",value:function(F){if(!(F.type==="click"&&F.target!==this._canvas)&&(F.stopPropagation(),F.preventDefault(),!(F.type==="click"||F.type==="contextmenu"))){var H=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas);switch(F.type){case"mousedown":(0,d.setCapture)(this._canvas),this._handleMouseButton(H.x,H.y,!0,1<<F.button);break;case"mouseup":this._handleMouseButton(H.x,H.y,!1,1<<F.button);break;case"mousemove":this._handleMouseMove(H.x,H.y);break}}}},{key:"_handleMouseButton",value:function(F,H,T,V){if(this.dragViewport)if(T&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:F,y:H},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(F,H,V)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(F,H,this._mouseButtonMask)),T?this._mouseButtonMask|=V:this._mouseButtonMask&=~V,this._sendMouse(F,H,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(F,H){var T=this;if(this._viewportDragging){var V=this._viewportDragPos.x-F,_e=this._viewportDragPos.y-H;(this._viewportHasMoved||Math.abs(V)>o.dragThreshold||Math.abs(_e)>o.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:F,y:H},this._display.viewportChangePos(V,_e));return}if(this._mousePos={x:F,y:H},this._mouseMoveTimer==null){var be=Date.now()-this._mouseLastMoveTime;be>Se?(this._sendMouse(F,H,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){T._handleDelayedMouseMove()},Se-be)}}},{key:"_handleDelayedMouseMove",value:function(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}},{key:"_sendMouse",value:function(F,H,T){this._rfbConnectionState==="connected"&&(this._viewOnly||ae.messages.pointerEvent(this._sock,this._display.absX(F),this._display.absY(H),T))}},{key:"_handleWheel",value:function(F){if(this._rfbConnectionState==="connected"&&!this._viewOnly){F.stopPropagation(),F.preventDefault();var H=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas),T=F.deltaX,V=F.deltaY;F.deltaMode!==0&&(T*=he,V*=he),this._accumulatedWheelDeltaX+=T,this._accumulatedWheelDeltaY+=V,Math.abs(this._accumulatedWheelDeltaX)>=ie&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(H.x,H.y,!0,32),this._handleMouseButton(H.x,H.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(H.x,H.y,!0,64),this._handleMouseButton(H.x,H.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=ie&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(H.x,H.y,!0,8),this._handleMouseButton(H.x,H.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(H.x,H.y,!0,16),this._handleMouseButton(H.x,H.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(F,H,T){this._handleMouseMove(H,T),this._cursor.move(F.detail.clientX,F.detail.clientY)}},{key:"_handleTapEvent",value:function(F,H){var T=(0,u.clientToElement)(F.detail.clientX,F.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Oe&&this._gestureFirstDoubleTapEv.detail.type===F.detail.type){var V=this._gestureFirstDoubleTapEv.detail.clientX-F.detail.clientX,_e=this._gestureFirstDoubleTapEv.detail.clientY-F.detail.clientY,be=Math.hypot(V,_e);be<Me?T=(0,u.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=F}else this._gestureFirstDoubleTapEv=F;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,H),this._handleMouseButton(T.x,T.y,!1,H)}},{key:"_handleGesture",value:function(F){var H,T=(0,u.clientToElement)(F.detail.clientX,F.detail.clientY,this._canvas);switch(F.type){case"gesturestart":switch(F.detail.type){case"onetap":this._handleTapEvent(F,1);break;case"twotap":this._handleTapEvent(F,4);break;case"threetap":this._handleTapEvent(F,2);break;case"drag":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,1);break;case"longpress":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=F.detail.magnitudeX,this._gestureLastMagnitudeY=F.detail.magnitudeY,this._fakeMouseMove(F,T.x,T.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),this._fakeMouseMove(F,T.x,T.y);break}break;case"gesturemove":switch(F.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(F,T.x,T.y);break;case"twodrag":for(this._fakeMouseMove(F,T.x,T.y);F.detail.magnitudeY-this._gestureLastMagnitudeY>Ae;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeY+=Ae;for(;F.detail.magnitudeY-this._gestureLastMagnitudeY<-Ae;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeY-=Ae;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX>Ae;)this._handleMouseButton(T.x,T.y,!0,32),this._handleMouseButton(T.x,T.y,!1,32),this._gestureLastMagnitudeX+=Ae;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX<-Ae;)this._handleMouseButton(T.x,T.y,!0,64),this._handleMouseButton(T.x,T.y,!1,64),this._gestureLastMagnitudeX-=Ae;break;case"pinch":if(this._fakeMouseMove(F,T.x,T.y),H=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),Math.abs(H-this._gestureLastMagnitudeX)>ke){for(this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!0);H-this._gestureLastMagnitudeX>ke;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeX+=ke;for(;H-this._gestureLastMagnitudeX<-ke;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeX-=ke}this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(F.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,1);break;case"longpress":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var F=this._sock.rQshiftStr(12).substr(4,7);m.Info("Server ProtocolVersion: "+F);var H=0;switch(F){case"000.000":H=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+F)}if(H){for(var T="ID:"+this._repeaterID;T.length<250;)T+="\0";return this._sock.sendString(T),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var V="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+V+`
|
|
|
`),m.Debug("Sent ProtocolVersion: "+V),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function F(V,_e){for(var be=0;be<_e.length;be++)if(_e[be]===V)return!0;return!1}if(this._rfbVersion>=3.7){var H=this._sock.rQshift8();if(this._sock.rQwait("security type",H,1))return!1;if(H===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var T=this._sock.rQshiftBytes(H);if(m.Debug("Server security types: "+T),F(1,T))this._rfbAuthScheme=1;else if(F(22,T))this._rfbAuthScheme=22;else if(F(16,T))this._rfbAuthScheme=16;else if(F(2,T))this._rfbAuthScheme=2;else if(F(19,T))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+T+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",m.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var F=this._sock.rQshift32(),H="";if(F>0){if(this._sock.rQwait("reason",F,4))return!1;H=this._sock.rQshiftStr(F)}return H!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:H}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+H+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var F=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(F),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var F=this._sock.rQshift8(),H=this._sock.rQshift8();if(!(F==0&&H==2))return this._fail("Unsupported VeNCrypt version "+F+"."+H);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var T=this._sock.rQshift8();if(T!=0)return this._fail("VeNCrypt failure "+T);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var V=this._sock.rQshift8();if(V<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=V,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var _e=[],be=0;be<this._rfbVeNCryptSubtypesLength;be++)_e.push(this._sock.rQshift32());if(_e.indexOf(256)!=-1)this._sock.send([0,0,1,0]),this._rfbVeNCryptState=4;else return this._fail("VeNCrypt Plain subtype not offered by server")}if(this._rfbVeNCryptState==4){if(!this._rfbCredentials.username||!this._rfbCredentials.password)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1;var j=(0,h.encodeUTF8)(this._rfbCredentials.username),A=(0,h.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,j.length]),this._sock.send([0,0,0,A.length]),this._sock.sendString(j),this._sock.sendString(A),this._rfbInitState="SecurityResult",!0}}},{key:"_negotiateStdVNCAuth",value:function(){if(this._sock.rQwait("auth challenge",16))return!1;if(this._rfbCredentials.password===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;var F=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),H=ae.genDES(this._rfbCredentials.password,F);return this._sock.send(H),this._rfbInitState="SecurityResult",!0}},{key:"_negotiateTightUnixAuth",value:function(){return this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0?(this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1):(this._sock.send([0,0,0,this._rfbCredentials.username.length]),this._sock.send([0,0,0,this._rfbCredentials.password.length]),this._sock.sendString(this._rfbCredentials.username),this._sock.sendString(this._rfbCredentials.password),this._rfbInitState="SecurityResult",!0)}},{key:"_negotiateTightTunnels",value:function(F){for(var H={0:{vendor:"TGHT",signature:"NOTUNNEL"}},T={},V=0;V<F;V++){var _e=this._sock.rQshift32(),be=this._sock.rQshiftStr(4),j=this._sock.rQshiftStr(8);T[_e]={vendor:be,signature:j}}return m.Debug("Server Tight tunnel types: "+T),T[1]&&T[1].vendor==="SICR"&&T[1].signature==="SCHANNEL"&&(m.Debug("Detected Siemens server. Assuming NOTUNNEL support."),T[0]={vendor:"TGHT",signature:"NOTUNNEL"}),T[0]?T[0].vendor!=H[0].vendor||T[0].signature!=H[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(m.Debug("Selected tunnel type: "+H[0]),this._sock.send([0,0,0,0]),!1):this._fail("Server wanted tunnels, but doesn't support the notunnel type")}},{key:"_negotiateTightAuth",value:function(){if(!this._rfbTightVNC){if(this._sock.rQwait("num tunnels",4))return!1;var F=this._sock.rQshift32();if(F>0&&this._sock.rQwait("tunnel capabilities",16*F,4))return!1;if(this._rfbTightVNC=!0,F>0)return this._negotiateTightTunnels(F),!1}if(this._sock.rQwait("sub auth count",4))return!1;var H=this._sock.rQshift32();if(H===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*H,4))return!1;for(var T={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},V=[],_e=0;_e<H;_e++){this._sock.rQshift32();var be=this._sock.rQshiftStr(12);V.push(be)}m.Debug("Server Tight authentication types: "+V);for(var j in T)if(V.indexOf(j)!=-1)switch(this._sock.send([0,0,0,T[j]]),m.Debug("Selected authentication type: "+j),j){case"STDVNOAUTH__":return this._rfbInitState="SecurityResult",!0;case"STDVVNCAUTH_":return this._rfbAuthScheme=2,this._initMsg();case"TGHTULGNAUTH":return this._rfbAuthScheme=129,this._initMsg();default:return this._fail("Unsupported tiny auth scheme (scheme: "+j+")")}return this._fail("No supported sub-auth types!")}},{key:"_negotiateAuthentication",value:function(){switch(this._rfbAuthScheme){case 1:return this._rfbVersion>=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var F=this._sock.rQshift32();return F===0?(this._rfbInitState="ClientInitialisation",m.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=F,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:F}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var F=this._sock.rQshift16(),H=this._sock.rQshift16(),T=this._sock.rQshift8(),V=this._sock.rQshift8(),_e=this._sock.rQshift8(),be=this._sock.rQshift8(),j=this._sock.rQshift16(),A=this._sock.rQshift16(),$=this._sock.rQshift16(),Y=this._sock.rQshift8(),se=this._sock.rQshift8(),ve=this._sock.rQshift8();this._sock.rQskipBytes(3);var oe=this._sock.rQshift32();if(this._sock.rQwait("server init name",oe,24))return!1;var B=this._sock.rQshiftStr(oe);if(B=(0,h.decodeUTF8)(B,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+oe))return!1;var re=this._sock.rQshift16(),M=this._sock.rQshift16(),fe=this._sock.rQshift16();this._sock.rQskipBytes(2);var Ce=(re+M+fe)*16;if(this._sock.rQwait("TightVNC extended server init header",Ce,32+oe))return!1;this._sock.rQskipBytes(16*re),this._sock.rQskipBytes(16*M),this._sock.rQskipBytes(16*fe)}return m.Info("Screen: "+F+"x"+H+", bpp: "+T+", depth: "+V+", bigEndian: "+_e+", trueColor: "+be+", redMax: "+j+", greenMax: "+A+", blueMax: "+$+", redShift: "+Y+", greenShift: "+se+", blueShift: "+ve),this._setDesktopName(B),this._resize(F,H),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(m.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),ae.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),ae.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var F=[];F.push(b.encodings.encodingCopyRect),this._fbDepth==24&&(F.push(b.encodings.encodingTight),F.push(b.encodings.encodingTightPNG),F.push(b.encodings.encodingHextile),F.push(b.encodings.encodingRRE)),F.push(b.encodings.encodingRaw),F.push(b.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),F.push(b.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),F.push(b.encodings.pseudoEncodingDesktopSize),F.push(b.encodings.pseudoEncodingLastRect),F.push(b.encodings.pseudoEncodingQEMUExtendedKeyEvent),F.push(b.encodings.pseudoEncodingExtendedDesktopSize),F.push(b.encodings.pseudoEncodingXvp),F.push(b.encodings.pseudoEncodingFence),F.push(b.encodings.pseudoEncodingContinuousUpdates),F.push(b.encodings.pseudoEncodingDesktopName),F.push(b.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(F.push(b.encodings.pseudoEncodingVMwareCursor),F.push(b.encodings.pseudoEncodingCursor)),ae.messages.clientEncodings(this._sock,F)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return m.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(m.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var F=this._sock.rQshift32();if(F=(0,x.toSigned32bit)(F),this._sock.rQwait("ServerCutText content",Math.abs(F),8))return!1;if(F>=0){var H=this._sock.rQshiftStr(F);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:H}}))}else{F=Math.abs(F);var T=this._sock.rQshift32(),V=T&65535,_e=T&4278190080,be=!!(_e&De);if(be){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var j=0;j<=15;j++){var A=1<<j;V&A&&(this._clipboardServerCapabilitiesFormats[A]=!0,this._sock.rQshift32())}for(var $=24;$<=31;$++){var Y=1<<$;this._clipboardServerCapabilitiesActions[Y]=!!(_e&Y)}var se=[De,Ie,te,ne,Ee];ae.messages.extendedClipboardCaps(this._sock,se,{extendedClipboardFormatText:0})}else if(_e===Ie){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[Ee]&&V&Re&&ae.messages.extendedClipboardProvide(this._sock,[Re],[this._clipboardText])}else if(_e===te){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[ne]&&(this._clipboardText!=null?ae.messages.extendedClipboardNotify(this._sock,[Re]):ae.messages.extendedClipboardNotify(this._sock,[]))}else if(_e===ne){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[Ie]&&V&Re&&ae.messages.extendedClipboardRequest(this._sock,[Re])}else if(_e===Ee){if(this._viewOnly||!(V&Re))return!0;this._clipboardText=null;var ve=this._sock.rQshiftBytes(F-4),oe=new a.default,B=null;oe.setInput(ve);for(var re=0;re<=15;re++){var M=1<<re;if(V&M){var fe=0,Ce=oe.inflate(4);fe|=Ce[0]<<24,fe|=Ce[1]<<16,fe|=Ce[2]<<8,fe|=Ce[3];var w=oe.inflate(fe);M===Re&&(B=w)}}if(oe.setInput(null),B!==null){for(var ee="",q=0;q<B.length;q++)ee+=String.fromCharCode(B[q]);B=ee,B=(0,h.decodeUTF8)(B),B.length>0&&B.charAt(B.length-1)==="\0"&&(B=B.slice(0,-1)),B=B.replace(`\r
|
|
|
`,`
|
|
|
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:B}}))}}else return this._fail("Unexpected action in extended clipboard message: "+_e)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var F=this._sock.rQshift32(),H=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",H,9))return!1;H>64&&(m.Warn("Bad payload length ("+H+") in fence response"),H=64);var T=this._sock.rQshiftStr(H);return this._supportsFence=!0,F&1<<31?(F&=3,ae.messages.clientFence(this._sock,F,T),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var F=this._sock.rQshift8(),H=this._sock.rQshift8();switch(H){case 0:m.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=F,m.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+H+")");break}return!0}},{key:"_normalMsg",value:function(){var F;this._FBU.rects>0?F=0:F=this._sock.rQshift8();var H,T;switch(F){case 0:return T=this._framebufferUpdate(),T&&!this._enabledContinuousUpdates&&ae.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),T;case 1:return this._handleSetColourMapMsg();case 2:return m.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return H=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,H&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),m.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+F+")"),m.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var F=this._sock.rQshiftBytes(12);this._FBU.x=(F[0]<<8)+F[1],this._FBU.y=(F[2]<<8)+F[3],this._FBU.width=(F[4]<<8)+F[5],this._FBU.height=(F[6]<<8)+F[7],this._FBU.encoding=parseInt((F[8]<<24)+(F[9]<<16)+(F[10]<<8)+F[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case b.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case b.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case b.encodings.pseudoEncodingCursor:return this._handleCursor();case b.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var F=document.createEvent("keyboardEvent");F.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(H){}return!0;case b.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case b.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case b.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var F=this._FBU.x,H=this._FBU.y,T=this._FBU.width,V=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var _e=this._sock.rQshift8();this._sock.rQshift8();var be,j=4;if(_e==0){var A=-256;if(be=new Array(T*V*j),this._sock.rQwait("VMware cursor classic encoding",T*V*j*2,2))return!1;for(var $=new Array(T*V),Y=0;Y<T*V;Y++)$[Y]=this._sock.rQshift32();for(var se=new Array(T*V),ve=0;ve<T*V;ve++)se[ve]=this._sock.rQshift32();for(var oe=0;oe<T*V;oe++)if($[oe]==0){var B=se[oe],re=B>>8&255,M=B>>16&255,fe=B>>24&255;be[oe*j]=re,be[oe*j+1]=M,be[oe*j+2]=fe,be[oe*j+3]=255}else($[oe]&A)==A?se[oe]==0?(be[oe*j]=0,be[oe*j+1]=0,be[oe*j+2]=0,be[oe*j+3]=0):((se[oe]&A)==A,be[oe*j]=0,be[oe*j+1]=0,be[oe*j+2]=0,be[oe*j+3]=255):(be[oe*j]=0,be[oe*j+1]=0,be[oe*j+2]=0,be[oe*j+3]=255)}else if(_e==1){if(this._sock.rQwait("VMware cursor alpha encoding",T*V*4,2))return!1;be=new Array(T*V*j);for(var Ce=0;Ce<T*V;Ce++){var w=this._sock.rQshift32();be[Ce*4]=w>>24&255,be[Ce*4+1]=w>>16&255,be[Ce*4+2]=w>>8&255,be[Ce*4+3]=w&255}}else return m.Warn("The given cursor type is not supported: "+_e+" given."),!1;return this._updateCursor(be,F,H,T,V),!0}},{key:"_handleCursor",value:function(){var F=this._FBU.x,H=this._FBU.y,T=this._FBU.width,V=this._FBU.height,_e=T*V*4,be=Math.ceil(T/8)*V,j=_e+be;if(this._sock.rQwait("cursor encoding",j))return!1;for(var A=this._sock.rQshiftBytes(_e),$=this._sock.rQshiftBytes(be),Y=new Uint8Array(T*V*4),se=0,ve=0;ve<V;ve++)for(var oe=0;oe<T;oe++){var B=ve*Math.ceil(T/8)+Math.floor(oe/8),re=$[B]<<oe%8&128?255:0;Y[se]=A[se+2],Y[se+1]=A[se+1],Y[se+2]=A[se],Y[se+3]=re,se+=4}return this._updateCursor(Y,F,H,T,V),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var F=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",F,4))return!1;var H=this._sock.rQshiftStr(F);return H=(0,h.decodeUTF8)(H,!0),this._setDesktopName(H),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var F=this._sock.rQpeek8(),H=4+F*16;if(this._sock.rQwait("ExtendedDesktopSize",H))return!1;var T=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,T&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var V=0;V<F;V+=1)V===0?(this._screenID=this._sock.rQshiftBytes(4),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._screenFlags=this._sock.rQshiftBytes(4)):this._sock.rQskipBytes(16);if(this._FBU.x===1&&this._FBU.y!==0){var _e="";switch(this._FBU.y){case 1:_e="Resize is administratively prohibited";break;case 2:_e="Out of resources";break;case 3:_e="Invalid screen layout";break;default:_e="Unknown reason";break}m.Warn("Server did not accept the resize request: "+_e)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var F=this._decoders[this._FBU.encoding];if(!F)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return F.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(H){return this._fail("Error decoding rect: "+H),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&ae.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(F,H){this._fbWidth=F,this._fbHeight=H,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(F,H){this._rfbXvpVer<F||(m.Info("Sending XVP operation "+H+" (version "+F+")"),ae.messages.xvpOp(this._sock,F,H))}},{key:"_updateCursor",value:function(F,H,T,V,_e){this._cursorImage={rgbaPixels:F,hotx:H,hoty:T,w:V,h:_e},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var F=3;F<this._cursorImage.rgbaPixels.length;F+=4)if(this._cursorImage.rgbaPixels[F])return!1;return!0}},{key:"_refreshCursor",value:function(){if(!(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")){var F=this._shouldShowDotCursor()?ae.cursors.dot:this._cursorImage;this._cursor.change(F.rgbaPixels,F.hotx,F.hoty,F.w,F.h)}}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(F){this._viewOnly=F,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(F?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(F){m.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(F){this._clipViewport=F,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(F){this._scaleViewport=F,F&&this._clipViewport&&this._updateClip(),this._updateScale(),!F&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(F){this._resizeSession=F,F&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(F){this._showDotCursor=F,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(F){this._screen.style.background=F}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(F){if(!Number.isInteger(F)||F<0||F>9){m.Error("qualityLevel must be an integer between 0 and 9");return}this._qualityLevel!==F&&(this._qualityLevel=F,this._rfbConnectionState==="connected"&&this._sendEncodings())}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(F){if(!Number.isInteger(F)||F<0||F>9){m.Error("compressionLevel must be an integer between 0 and 9");return}this._compressionLevel!==F&&(this._compressionLevel=F,this._rfbConnectionState==="connected"&&this._sendEncodings())}}],[{key:"genDES",value:function(F,H){var T=F.split("").map(function(V){return V.charCodeAt(0)});return new l.default(T).encrypt(H)}}]),ae}(r.default);D.Z=xe,xe.messages={keyEvent:function(ue,ae,G){var F=ue._sQ,H=ue._sQlen;F[H]=4,F[H+1]=G,F[H+2]=0,F[H+3]=0,F[H+4]=ae>>24,F[H+5]=ae>>16,F[H+6]=ae>>8,F[H+7]=ae,ue._sQlen+=8,ue.flush()},QEMUExtendedKeyEvent:function(ue,ae,G,F){function H(be){var j=F>>8,A=F&255;return j===224&&A<127?A|128:be}var T=ue._sQ,V=ue._sQlen;T[V]=255,T[V+1]=0,T[V+2]=G>>8,T[V+3]=G,T[V+4]=ae>>24,T[V+5]=ae>>16,T[V+6]=ae>>8,T[V+7]=ae;var _e=H(F);T[V+8]=_e>>24,T[V+9]=_e>>16,T[V+10]=_e>>8,T[V+11]=_e,ue._sQlen+=12,ue.flush()},pointerEvent:function(ue,ae,G,F){var H=ue._sQ,T=ue._sQlen;H[T]=5,H[T+1]=F,H[T+2]=ae>>8,H[T+3]=ae,H[T+4]=G>>8,H[T+5]=G,ue._sQlen+=6,ue.flush()},_buildExtendedClipboardFlags:function(ue,ae){for(var G=new Uint8Array(4),F=0,H=0,T=0;T<ue.length;T++)H|=ue[T];for(var V=0;V<ae.length;V++)F|=ae[V];return G[0]=H>>24,G[1]=0,G[2]=0,G[3]=F,G},extendedClipboardProvide:function(ue,ae,G){for(var F=new t.default,H=[],T=0;T<ae.length;T++){if(ae[T]!=Re)throw new Error("Unsupported extended clipboard format for Provide message.");G[T]=G[T].replace(/\r\n|\r|\n/gm,`\r
|
|
|
`);var V=(0,h.encodeUTF8)(G[T]+"\0");H.push(V.length>>24&255,V.length>>16&255,V.length>>8&255,V.length&255);for(var _e=0;_e<V.length;_e++)H.push(V.charCodeAt(_e))}var be=F.deflate(new Uint8Array(H)),j=new Uint8Array(4+be.length);j.set(xe.messages._buildExtendedClipboardFlags([Ee],ae)),j.set(be,4),xe.messages.clientCutText(ue,j,!0)},extendedClipboardNotify:function(ue,ae){var G=xe.messages._buildExtendedClipboardFlags([ne],ae);xe.messages.clientCutText(ue,G,!0)},extendedClipboardRequest:function(ue,ae){var G=xe.messages._buildExtendedClipboardFlags([Ie],ae);xe.messages.clientCutText(ue,G,!0)},extendedClipboardCaps:function(ue,ae,G){var F=Object.keys(G),H=new Uint8Array(4+4*F.length);F.map(function(_e){return parseInt(_e)}),F.sort(function(_e,be){return _e-be}),H.set(xe.messages._buildExtendedClipboardFlags(ae,[]));for(var T=4,V=0;V<F.length;V++)H[T]=G[F[V]]>>24,H[T+1]=G[F[V]]>>16,H[T+2]=G[F[V]]>>8,H[T+3]=G[F[V]]>>0,T+=4,H[3]|=1<<F[V];xe.messages.clientCutText(ue,H,!0)},clientCutText:function(ue,ae){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,F=ue._sQ,H=ue._sQlen;F[H]=6,F[H+1]=0,F[H+2]=0,F[H+3]=0;var T;G?T=(0,x.toUnsigned32bit)(-ae.length):T=ae.length,F[H+4]=T>>24,F[H+5]=T>>16,F[H+6]=T>>8,F[H+7]=T,ue._sQlen+=8;for(var V=0,_e=ae.length;_e>0;){for(var be=Math.min(_e,ue._sQbufferSize-ue._sQlen),j=0;j<be;j++)F[ue._sQlen+j]=ae[V+j];ue._sQlen+=be,ue.flush(),_e-=be,V+=be}},setDesktopSize:function(ue,ae,G,F,H){var T=ue._sQ,V=ue._sQlen;T[V]=251,T[V+1]=0,T[V+2]=ae>>8,T[V+3]=ae,T[V+4]=G>>8,T[V+5]=G,T[V+6]=1,T[V+7]=0,T[V+8]=F>>24,T[V+9]=F>>16,T[V+10]=F>>8,T[V+11]=F,T[V+12]=0,T[V+13]=0,T[V+14]=0,T[V+15]=0,T[V+16]=ae>>8,T[V+17]=ae,T[V+18]=G>>8,T[V+19]=G,T[V+20]=H>>24,T[V+21]=H>>16,T[V+22]=H>>8,T[V+23]=H,ue._sQlen+=24,ue.flush()},clientFence:function(ue,ae,G){var F=ue._sQ,H=ue._sQlen;F[H]=248,F[H+1]=0,F[H+2]=0,F[H+3]=0,F[H+4]=ae>>24,F[H+5]=ae>>16,F[H+6]=ae>>8,F[H+7]=ae;var T=G.length;F[H+8]=T;for(var V=0;V<T;V++)F[H+9+V]=G.charCodeAt(V);ue._sQlen+=9+T,ue.flush()},enableContinuousUpdates:function(ue,ae,G,F,H,T){var V=ue._sQ,_e=ue._sQlen;V[_e]=150,V[_e+1]=ae,V[_e+2]=G>>8,V[_e+3]=G,V[_e+4]=F>>8,V[_e+5]=F,V[_e+6]=H>>8,V[_e+7]=H,V[_e+8]=T>>8,V[_e+9]=T,ue._sQlen+=10,ue.flush()},pixelFormat:function(ue,ae,G){var F=ue._sQ,H=ue._sQlen,T;ae>16?T=32:ae>8?T=16:T=8;var V=Math.floor(ae/3);F[H]=0,F[H+1]=0,F[H+2]=0,F[H+3]=0,F[H+4]=T,F[H+5]=ae,F[H+6]=0,F[H+7]=G?1:0,F[H+8]=0,F[H+9]=(1<<V)-1,F[H+10]=0,F[H+11]=(1<<V)-1,F[H+12]=0,F[H+13]=(1<<V)-1,F[H+14]=V*2,F[H+15]=V*1,F[H+16]=V*0,F[H+17]=0,F[H+18]=0,F[H+19]=0,ue._sQlen+=20,ue.flush()},clientEncodings:function(ue,ae){var G=ue._sQ,F=ue._sQlen;G[F]=2,G[F+1]=0,G[F+2]=ae.length>>8,G[F+3]=ae.length;for(var H=F+4,T=0;T<ae.length;T++){var V=ae[T];G[H]=V>>24,G[H+1]=V>>16,G[H+2]=V>>8,G[H+3]=V,H+=4}ue._sQlen+=H-F,ue.flush()},fbUpdateRequest:function(ue,ae,G,F,H,T){var V=ue._sQ,_e=ue._sQlen;typeof G=="undefined"&&(G=0),typeof F=="undefined"&&(F=0),V[_e]=3,V[_e+1]=ae?1:0,V[_e+2]=G>>8&255,V[_e+3]=G&255,V[_e+4]=F>>8&255,V[_e+5]=F&255,V[_e+6]=H>>8&255,V[_e+7]=H&255,V[_e+8]=T>>8&255,V[_e+9]=T&255,ue._sQlen+=10,ue.flush()},xvpOp:function(ue,ae,G){var F=ue._sQ,H=ue._sQlen;F[H]=250,F[H+1]=0,F[H+2]=ae,F[H+3]=G,ue._sQlen+=4,ue.flush()}},xe.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},41895:function(Te,D,c){"use strict";function _(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(O){return typeof O}:_=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},_(S)}Object.defineProperty(D,"__esModule",{value:!0}),D.isMac=p,D.isWindows=y,D.isIOS=b,D.isSafari=g,D.isIE=E,D.isEdge=C,D.isFirefox=v,D.hasScrollbarGutter=D.supportsImageMetadata=D.supportsCursorURIs=D.dragThreshold=D.isTouchDevice=void 0;var x=h(c(50500));function m(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return m=function(){return S},S}function h(S){if(S&&S.__esModule)return S;if(S===null||_(S)!=="object"&&typeof S!="function")return{default:S};var k=m();if(k&&k.has(S))return k.get(S);var O={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in S)if(Object.prototype.hasOwnProperty.call(S,U)){var N=R?Object.getOwnPropertyDescriptor(S,U):null;N&&(N.get||N.set)?Object.defineProperty(O,U,N):O[U]=S[U]}return O.default=S,k&&k.set(S,O),O}var o=!1;D.isTouchDevice=o,window.addEventListener("touchstart",function(){},!1);var u=10*(window.devicePixelRatio||1);D.dragThreshold=u;var d=!1;try{var r=document.createElement("canvas");r.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',r.style.cursor.indexOf("url")===0?(x.Info("Data URI scheme cursor supported"),d=!0):x.Warn("Data URI scheme cursor not supported")}catch(S){x.Error("Data URI scheme cursor test exception: "+S)}var i=d;D.supportsCursorURIs=i;var a=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),a=!0}catch(S){}var t=a;D.supportsImageMetadata=t;var f=!0;try{var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);var n=document.createElement("div");e.appendChild(n);var s=e.offsetWidth-n.offsetWidth;e.parentNode.removeChild(e),f=s!=0}catch(S){x.Error("Scrollbar test exception: "+S)}var l=f;D.hasScrollbarGutter=l;function p(){return navigator&&!!/mac/i.exec(navigator.platform)}function y(){return navigator&&!!/win/i.exec(navigator.platform)}function b(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function g(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function E(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function C(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function v(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},54641:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(41895);function x(d,r){if(!(d instanceof r))throw new TypeError("Cannot call a class as a function")}function m(d,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}function h(d,r,i){return r&&m(d.prototype,r),i&&m(d,i),d}var o=!_.supportsCursorURIs||_.isTouchDevice,u=function(){function d(){x(this,d),this._target=null,this._canvas=document.createElement("canvas"),o&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return h(d,[{key:"attach",value:function(i){if(this._target&&this.detach(),this._target=i,o){document.body.appendChild(this._canvas);var a={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,a),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,a),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,a),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,a)}this.clear()}},{key:"detach",value:function(){if(this._target){if(o){var i={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,i),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,i),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,i),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,i),document.body.removeChild(this._canvas)}this._target=null}}},{key:"change",value:function(i,a,t,f,e){if(f===0||e===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-a,this._position.y=this._position.y+this._hotSpot.y-t,this._hotSpot.x=a,this._hotSpot.y=t;var n=this._canvas.getContext("2d");this._canvas.width=f,this._canvas.height=e;var s;try{s=new ImageData(new Uint8ClampedArray(i),f,e)}catch(p){s=n.createImageData(f,e),s.data.set(new Uint8ClampedArray(i))}if(n.clearRect(0,0,f,e),n.putImageData(s,0,0),o)this._updatePosition();else{var l=this._canvas.toDataURL();this._target.style.cursor="url("+l+")"+a+" "+t+", default"}}},{key:"clear",value:function(){this._target.style.cursor="none",this._canvas.width=0,this._canvas.height=0,this._position.x=this._position.x+this._hotSpot.x,this._position.y=this._position.y+this._hotSpot.y,this._hotSpot.x=0,this._hotSpot.y=0}},{key:"move",value:function(i,a){if(o){window.visualViewport?(this._position.x=i+window.visualViewport.offsetLeft,this._position.y=a+window.visualViewport.offsetTop):(this._position.x=i,this._position.y=a),this._updatePosition();var t=document.elementFromPoint(i,a);this._updateVisibility(t)}}},{key:"_handleMouseOver",value:function(i){this._handleMouseMove(i)}},{key:"_handleMouseLeave",value:function(i){this._updateVisibility(i.relatedTarget)}},{key:"_handleMouseMove",value:function(i){this._updateVisibility(i.target),this._position.x=i.clientX-this._hotSpot.x,this._position.y=i.clientY-this._hotSpot.y,this._updatePosition()}},{key:"_handleMouseUp",value:function(i){var a=this,t=document.elementFromPoint(i.clientX,i.clientY);this._updateVisibility(t),this._captureIsActive()&&window.setTimeout(function(){a._target&&(t=document.elementFromPoint(i.clientX,i.clientY),a._updateVisibility(t))},0)}},{key:"_showCursor",value:function(){this._canvas.style.visibility==="hidden"&&(this._canvas.style.visibility="")}},{key:"_hideCursor",value:function(){this._canvas.style.visibility!=="hidden"&&(this._canvas.style.visibility="hidden")}},{key:"_shouldShowCursor",value:function(i){return i?i===this._target?!0:!(!this._target.contains(i)||window.getComputedStyle(i).cursor!=="none"):!1}},{key:"_updateVisibility",value:function(i){this._captureIsActive()&&(i=document.captureElement),this._shouldShowCursor(i)?this._showCursor():this._hideCursor()}},{key:"_updatePosition",value:function(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}},{key:"_captureIsActive",value:function(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}]),d}();D.default=u},92742:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.clientToElement=c;function c(_,x,m){var h=m.getBoundingClientRect(),o={x:0,y:0};return _<h.left?o.x=0:_>=h.right?o.x=h.width-1:o.x=_-h.left,x<h.top?o.y=0:x>=h.bottom?o.y=h.height-1:o.y=x-h.top,o}},79420:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getPointerEvent=c,D.stopEvent=_,D.setCapture=d,D.releaseCapture=r;function c(i){return i.changedTouches?i.changedTouches[0]:i.touches?i.touches[0]:i}function _(i){i.stopPropagation(),i.preventDefault()}var x=!1,m=null;document.captureElement=null;function h(i){if(!x){var a=new i.constructor(i.type,i);x=!0,document.captureElement?document.captureElement.dispatchEvent(a):m.dispatchEvent(a),x=!1,i.stopPropagation(),a.defaultPrevented&&i.preventDefault(),i.type==="mouseup"&&r()}}function o(){var i=document.getElementById("noVNC_mouse_capture_elem");i.style.cursor=window.getComputedStyle(document.captureElement).cursor}var u=new MutationObserver(o);function d(i){if(i.setCapture)i.setCapture(),document.captureElement=i,i.addEventListener("mouseup",r);else{r();var a=document.getElementById("noVNC_mouse_capture_elem");a===null&&(a=document.createElement("div"),a.id="noVNC_mouse_capture_elem",a.style.position="fixed",a.style.top="0px",a.style.left="0px",a.style.width="100%",a.style.height="100%",a.style.zIndex=1e4,a.style.display="none",document.body.appendChild(a),a.addEventListener("contextmenu",h),a.addEventListener("mousemove",h),a.addEventListener("mouseup",h)),document.captureElement=i,u.observe(i,{attributes:!0}),o(),a.style.display="",window.addEventListener("mousemove",h),window.addEventListener("mouseup",h)}}function r(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;m=document.captureElement,document.captureElement=null,u.disconnect();var i=document.getElementById("noVNC_mouse_capture_elem");i.style.display="none",window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",h)}}},5004:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function x(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var m=function(){function h(){c(this,h),this._listeners=new Map}return x(h,[{key:"addEventListener",value:function(u,d){this._listeners.has(u)||this._listeners.set(u,new Set),this._listeners.get(u).add(d)}},{key:"removeEventListener",value:function(u,d){this._listeners.has(u)&&this._listeners.get(u).delete(d)}},{key:"dispatchEvent",value:function(u){var d=this;return this._listeners.has(u.type)?(this._listeners.get(u.type).forEach(function(r){return r.call(d,u)}),!u.defaultPrevented):!0}}]),h}();D.default=m},20860:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.toUnsigned32bit=c,D.toSigned32bit=_;function c(x){return x>>>0}function _(x){return x|0}},50500:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.initLogging=o,D.getLogging=u,D.Error=D.Warn=D.Info=D.Debug=void 0;var c="warn",_=function(){};D.Debug=_;var x=function(){};D.Info=x;var m=function(){};D.Warn=m;var h=function(){};D.Error=h;function o(d){if(typeof d=="undefined"?d=c:c=d,D.Debug=_=D.Info=x=D.Warn=m=D.Error=h=function(){},typeof window.console!="undefined")switch(d){case"debug":D.Debug=_=console.debug.bind(window.console);case"info":D.Info=x=console.info.bind(window.console);case"warn":D.Warn=m=console.warn.bind(window.console);case"error":D.Error=h=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+d+"'")}}function u(){return c}o()},21882:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(D,c){"use strict";if(D==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(D),x=1;x<arguments.length;x++){var m=arguments[x];if(m!=null)for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(_[h]=m[h])}return _},writable:!0,configurable:!0}),function(){function Te(D,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var _=document.createEvent("CustomEvent");return _.initCustomEvent(D,c.bubbles,c.cancelable,c.detail),_}Te.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Te)}(),Number.isInteger=Number.isInteger||function(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}},31516:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.decodeUTF8=c,D.encodeUTF8=_;function c(x){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(x))}catch(h){if(h instanceof URIError&&m)return x;throw h}}function _(x){return unescape(encodeURIComponent(x))}},35986:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.shrinkBuf=c,D.arraySet=_,D.flattenChunks=x,D.Buf32=D.Buf16=D.Buf8=void 0;function c(u,d){return u.length===d?u:u.subarray?u.subarray(0,d):(u.length=d,u)}function _(u,d,r,i,a){if(d.subarray&&u.subarray){u.set(d.subarray(r,r+i),a);return}for(var t=0;t<i;t++)u[a+t]=d[r+t]}function x(u){var d,r,i,a,t,f;for(i=0,d=0,r=u.length;d<r;d++)i+=u[d].length;for(f=new Uint8Array(i),a=0,d=0,r=u.length;d<r;d++)t=u[d],f.set(t,a),a+=t.length;return f}var m=Uint8Array;D.Buf8=m;var h=Uint16Array;D.Buf16=h;var o=Int32Array;D.Buf32=o},97580:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(_,x,m,h){for(var o=_&65535|0,u=_>>>16&65535|0,d=0;m!==0;){d=m>2e3?2e3:m,m-=d;do o=o+x[h++]|0,u=u+o|0;while(--d);o%=65521,u%=65521}return o|u<<16|0}},1217:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(){for(var m,h=[],o=0;o<256;o++){m=o;for(var u=0;u<8;u++)m=m&1?3988292384^m>>>1:m>>>1;h[o]=m}return h}var _=c();function x(m,h,o,u){var d=_,r=u+o;m^=-1;for(var i=u;i<r;i++)m=m>>>8^d[(m^h[i])&255];return m^-1}},25805:function(Te,D,c){"use strict";function _(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(q){return typeof q}:_=function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},_(w)}Object.defineProperty(D,"__esModule",{value:!0}),D.deflateInit=B,D.deflateInit2=oe,D.deflateReset=se,D.deflateResetKeep=Y,D.deflateSetHeader=ve,D.deflate=re,D.deflateEnd=M,D.deflateSetDictionary=fe,D.deflateInfo=D.Z_DEFLATED=D.Z_UNKNOWN=D.Z_DEFAULT_STRATEGY=D.Z_FIXED=D.Z_RLE=D.Z_HUFFMAN_ONLY=D.Z_FILTERED=D.Z_DEFAULT_COMPRESSION=D.Z_BUF_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_STREAM_END=D.Z_OK=D.Z_BLOCK=D.Z_FINISH=D.Z_FULL_FLUSH=D.Z_PARTIAL_FLUSH=D.Z_NO_FLUSH=void 0;var x=i(c(35986)),m=i(c(55796)),h=d(c(97580)),o=d(c(1217)),u=d(c(70892));function d(w){return w&&w.__esModule?w:{default:w}}function r(){if(typeof WeakMap!="function")return null;var w=new WeakMap;return r=function(){return w},w}function i(w){if(w&&w.__esModule)return w;if(w===null||_(w)!=="object"&&typeof w!="function")return{default:w};var ee=r();if(ee&&ee.has(w))return ee.get(w);var q={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in w)if(Object.prototype.hasOwnProperty.call(w,W)){var J=P?Object.getOwnPropertyDescriptor(w,W):null;J&&(J.get||J.set)?Object.defineProperty(q,W,J):q[W]=w[W]}return q.default=w,ee&&ee.set(w,q),q}var a=0;D.Z_NO_FLUSH=a;var t=1;D.Z_PARTIAL_FLUSH=t;var f=3;D.Z_FULL_FLUSH=f;var e=4;D.Z_FINISH=e;var n=5;D.Z_BLOCK=n;var s=0;D.Z_OK=s;var l=1;D.Z_STREAM_END=l;var p=-2;D.Z_STREAM_ERROR=p;var y=-3;D.Z_DATA_ERROR=y;var b=-5;D.Z_BUF_ERROR=b;var g=-1;D.Z_DEFAULT_COMPRESSION=g;var E=1;D.Z_FILTERED=E;var C=2;D.Z_HUFFMAN_ONLY=C;var v=3;D.Z_RLE=v;var S=4;D.Z_FIXED=S;var k=0;D.Z_DEFAULT_STRATEGY=k;var O=2;D.Z_UNKNOWN=O;var R=8;D.Z_DEFLATED=R;var U=9,N=15,pe=8,Z=29,le=256,L=le+1+Z,K=30,I=19,z=2*L+1,X=15,Q=3,ce=258,ye=ce+Q+1,Le=32,Se=42,ie=69,he=73,ke=91,Ae=103,Oe=113,Me=666,Re=1,Ke=2,Xe=3,Ne=4,Fe=3;function De(w,ee){return w.msg=u.default[ee],ee}function Ie(w){return(w<<1)-(w>4?9:0)}function te(w){for(var ee=w.length;--ee>=0;)w[ee]=0}function ne(w){var ee=w.state,q=ee.pending;q>w.avail_out&&(q=w.avail_out),q!==0&&(x.arraySet(w.output,ee.pending_buf,ee.pending_out,q,w.next_out),w.next_out+=q,ee.pending_out+=q,w.total_out+=q,w.avail_out-=q,ee.pending-=q,ee.pending===0&&(ee.pending_out=0))}function Ee(w,ee){m._tr_flush_block(w,w.block_start>=0?w.block_start:-1,w.strstart-w.block_start,ee),w.block_start=w.strstart,ne(w.strm)}function xe(w,ee){w.pending_buf[w.pending++]=ee}function de(w,ee){w.pending_buf[w.pending++]=ee>>>8&255,w.pending_buf[w.pending++]=ee&255}function ue(w,ee,q,P){var W=w.avail_in;return W>P&&(W=P),W===0?0:(w.avail_in-=W,x.arraySet(ee,w.input,w.next_in,W,q),w.state.wrap===1?w.adler=(0,h.default)(w.adler,ee,W,q):w.state.wrap===2&&(w.adler=(0,o.default)(w.adler,ee,W,q)),w.next_in+=W,w.total_in+=W,W)}function ae(w,ee){var q=w.max_chain_length,P=w.strstart,W,J,we=w.prev_length,me=w.nice_match,ge=w.strstart>w.w_size-ye?w.strstart-(w.w_size-ye):0,He=w.window,ze=w.w_mask,Ue=w.prev,Be=w.strstart+ce,je=He[P+we-1],Pe=He[P+we];w.prev_length>=w.good_match&&(q>>=2),me>w.lookahead&&(me=w.lookahead);do if(W=ee,!(He[W+we]!==Pe||He[W+we-1]!==je||He[W]!==He[P]||He[++W]!==He[P+1])){P+=2,W++;do;while(He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&He[++P]===He[++W]&&P<Be);if(J=ce-(Be-P),P=Be-ce,J>we){if(w.match_start=ee,we=J,J>=me)break;je=He[P+we-1],Pe=He[P+we]}}while((ee=Ue[ee&ze])>ge&&--q!==0);return we<=w.lookahead?we:w.lookahead}function G(w){var ee=w.w_size,q,P,W,J,we;do{if(J=w.window_size-w.lookahead-w.strstart,w.strstart>=ee+(ee-ye)){x.arraySet(w.window,w.window,ee,ee,0),w.match_start-=ee,w.strstart-=ee,w.block_start-=ee,P=w.hash_size,q=P;do W=w.head[--q],w.head[q]=W>=ee?W-ee:0;while(--P);P=ee,q=P;do W=w.prev[--q],w.prev[q]=W>=ee?W-ee:0;while(--P);J+=ee}if(w.strm.avail_in===0)break;if(P=ue(w.strm,w.window,w.strstart+w.lookahead,J),w.lookahead+=P,w.lookahead+w.insert>=Q)for(we=w.strstart-w.insert,w.ins_h=w.window[we],w.ins_h=(w.ins_h<<w.hash_shift^w.window[we+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[we+Q-1])&w.hash_mask,w.prev[we&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=we,we++,w.insert--,!(w.lookahead+w.insert<Q)););}while(w.lookahead<ye&&w.strm.avail_in!==0)}function F(w,ee){var q=65535;for(q>w.pending_buf_size-5&&(q=w.pending_buf_size-5);;){if(w.lookahead<=1){if(G(w),w.lookahead===0&&ee===a)return Re;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var P=w.block_start+q;if((w.strstart===0||w.strstart>=P)&&(w.lookahead=w.strstart-P,w.strstart=P,Ee(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-ye&&(Ee(w,!1),w.strm.avail_out===0))return Re}return w.insert=0,ee===e?(Ee(w,!0),w.strm.avail_out===0?Xe:Ne):(w.strstart>w.block_start&&(Ee(w,!1),w.strm.avail_out===0),Re)}function H(w,ee){for(var q,P;;){if(w.lookahead<ye){if(G(w),w.lookahead<ye&&ee===a)return Re;if(w.lookahead===0)break}if(q=0,w.lookahead>=Q&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+Q-1])&w.hash_mask,q=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),q!==0&&w.strstart-q<=w.w_size-ye&&(w.match_length=ae(w,q)),w.match_length>=Q)if(P=m._tr_tally(w,w.strstart-w.match_start,w.match_length-Q),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=Q){w.match_length--;do w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+Q-1])&w.hash_mask,q=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart;while(--w.match_length!==0);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else P=m._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(P&&(Ee(w,!1),w.strm.avail_out===0))return Re}return w.insert=w.strstart<Q-1?w.strstart:Q-1,ee===e?(Ee(w,!0),w.strm.avail_out===0?Xe:Ne):w.last_lit&&(Ee(w,!1),w.strm.avail_out===0)?Re:Ke}function T(w,ee){for(var q,P,W;;){if(w.lookahead<ye){if(G(w),w.lookahead<ye&&ee===a)return Re;if(w.lookahead===0)break}if(q=0,w.lookahead>=Q&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+Q-1])&w.hash_mask,q=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=Q-1,q!==0&&w.prev_length<w.max_lazy_match&&w.strstart-q<=w.w_size-ye&&(w.match_length=ae(w,q),w.match_length<=5&&(w.strategy===E||w.match_length===Q&&w.strstart-w.match_start>4096)&&(w.match_length=Q-1)),w.prev_length>=Q&&w.match_length<=w.prev_length){W=w.strstart+w.lookahead-Q,P=m._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-Q),w.lookahead-=w.prev_length-1,w.prev_length-=2;do++w.strstart<=W&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+Q-1])&w.hash_mask,q=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart);while(--w.prev_length!==0);if(w.match_available=0,w.match_length=Q-1,w.strstart++,P&&(Ee(w,!1),w.strm.avail_out===0))return Re}else if(w.match_available){if(P=m._tr_tally(w,0,w.window[w.strstart-1]),P&&Ee(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return Re}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(P=m._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<Q-1?w.strstart:Q-1,ee===e?(Ee(w,!0),w.strm.avail_out===0?Xe:Ne):w.last_lit&&(Ee(w,!1),w.strm.avail_out===0)?Re:Ke}function V(w,ee){for(var q,P,W,J,we=w.window;;){if(w.lookahead<=ce){if(G(w),w.lookahead<=ce&&ee===a)return Re;if(w.lookahead===0)break}if(w.match_length=0,w.lookahead>=Q&&w.strstart>0&&(W=w.strstart-1,P=we[W],P===we[++W]&&P===we[++W]&&P===we[++W])){J=w.strstart+ce;do;while(P===we[++W]&&P===we[++W]&&P===we[++W]&&P===we[++W]&&P===we[++W]&&P===we[++W]&&P===we[++W]&&P===we[++W]&&W<J);w.match_length=ce-(J-W),w.match_length>w.lookahead&&(w.match_length=w.lookahead)}if(w.match_length>=Q?(q=m._tr_tally(w,1,w.match_length-Q),w.lookahead-=w.match_length,w.strstart+=w.match_length,w.match_length=0):(q=m._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++),q&&(Ee(w,!1),w.strm.avail_out===0))return Re}return w.insert=0,ee===e?(Ee(w,!0),w.strm.avail_out===0?Xe:Ne):w.last_lit&&(Ee(w,!1),w.strm.avail_out===0)?Re:Ke}function _e(w,ee){for(var q;;){if(w.lookahead===0&&(G(w),w.lookahead===0)){if(ee===a)return Re;break}if(w.match_length=0,q=m._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++,q&&(Ee(w,!1),w.strm.avail_out===0))return Re}return w.insert=0,ee===e?(Ee(w,!0),w.strm.avail_out===0?Xe:Ne):w.last_lit&&(Ee(w,!1),w.strm.avail_out===0)?Re:Ke}function be(w,ee,q,P,W){this.good_length=w,this.max_lazy=ee,this.nice_length=q,this.max_chain=P,this.func=W}var j;j=[new be(0,0,0,0,F),new be(4,4,8,4,H),new be(4,5,16,8,H),new be(4,6,32,32,H),new be(4,4,16,16,T),new be(8,16,32,32,T),new be(8,16,128,128,T),new be(8,32,128,256,T),new be(32,128,258,1024,T),new be(32,258,258,4096,T)];function A(w){w.window_size=2*w.w_size,te(w.head),w.max_lazy_match=j[w.level].max_lazy,w.good_match=j[w.level].good_length,w.nice_match=j[w.level].nice_length,w.max_chain_length=j[w.level].max_chain,w.strstart=0,w.block_start=0,w.lookahead=0,w.insert=0,w.match_length=w.prev_length=Q-1,w.match_available=0,w.ins_h=0}function $(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=R,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new x.Buf16(z*2),this.dyn_dtree=new x.Buf16((2*K+1)*2),this.bl_tree=new x.Buf16((2*I+1)*2),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new x.Buf16(X+1),this.heap=new x.Buf16(2*L+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new x.Buf16(2*L+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(w){var ee;return!w||!w.state?De(w,p):(w.total_in=w.total_out=0,w.data_type=O,ee=w.state,ee.pending=0,ee.pending_out=0,ee.wrap<0&&(ee.wrap=-ee.wrap),ee.status=ee.wrap?Se:Oe,w.adler=ee.wrap===2?0:1,ee.last_flush=a,m._tr_init(ee),s)}function se(w){var ee=Y(w);return ee===s&&A(w.state),ee}function ve(w,ee){return!w||!w.state||w.state.wrap!==2?p:(w.state.gzhead=ee,s)}function oe(w,ee,q,P,W,J){if(!w)return p;var we=1;if(ee===g&&(ee=6),P<0?(we=0,P=-P):P>15&&(we=2,P-=16),W<1||W>U||q!==R||P<8||P>15||ee<0||ee>9||J<0||J>S)return De(w,p);P===8&&(P=9);var me=new $;return w.state=me,me.strm=w,me.wrap=we,me.gzhead=null,me.w_bits=P,me.w_size=1<<me.w_bits,me.w_mask=me.w_size-1,me.hash_bits=W+7,me.hash_size=1<<me.hash_bits,me.hash_mask=me.hash_size-1,me.hash_shift=~~((me.hash_bits+Q-1)/Q),me.window=new x.Buf8(me.w_size*2),me.head=new x.Buf16(me.hash_size),me.prev=new x.Buf16(me.w_size),me.lit_bufsize=1<<W+6,me.pending_buf_size=me.lit_bufsize*4,me.pending_buf=new x.Buf8(me.pending_buf_size),me.d_buf=1*me.lit_bufsize,me.l_buf=3*me.lit_bufsize,me.level=ee,me.strategy=J,me.method=q,se(w)}function B(w,ee){return oe(w,ee,R,N,pe,k)}function re(w,ee){var q,P,W,J;if(!w||!w.state||ee>n||ee<0)return w?De(w,p):p;if(P=w.state,!w.output||!w.input&&w.avail_in!==0||P.status===Me&&ee!==e)return De(w,w.avail_out===0?b:p);if(P.strm=w,q=P.last_flush,P.last_flush=ee,P.status===Se)if(P.wrap===2)w.adler=0,xe(P,31),xe(P,139),xe(P,8),P.gzhead?(xe(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),xe(P,P.gzhead.time&255),xe(P,P.gzhead.time>>8&255),xe(P,P.gzhead.time>>16&255),xe(P,P.gzhead.time>>24&255),xe(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),xe(P,P.gzhead.os&255),P.gzhead.extra&&P.gzhead.extra.length&&(xe(P,P.gzhead.extra.length&255),xe(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=ie):(xe(P,0),xe(P,0),xe(P,0),xe(P,0),xe(P,0),xe(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),xe(P,Fe),P.status=Oe);else{var we=R+(P.w_bits-8<<4)<<8,me=-1;P.strategy>=C||P.level<2?me=0:P.level<6?me=1:P.level===6?me=2:me=3,we|=me<<6,P.strstart!==0&&(we|=Le),we+=31-we%31,P.status=Oe,de(P,we),P.strstart!==0&&(de(P,w.adler>>>16),de(P,w.adler&65535)),w.adler=1}if(P.status===ie)if(P.gzhead.extra){for(W=P.pending;P.gzindex<(P.gzhead.extra.length&65535)&&!(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ne(w),W=P.pending,P.pending===P.pending_buf_size));)xe(P,P.gzhead.extra[P.gzindex]&255),P.gzindex++;P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=he)}else P.status=he;if(P.status===he)if(P.gzhead.name){W=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ne(w),W=P.pending,P.pending===P.pending_buf_size)){J=1;break}P.gzindex<P.gzhead.name.length?J=P.gzhead.name.charCodeAt(P.gzindex++)&255:J=0,xe(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),J===0&&(P.gzindex=0,P.status=ke)}else P.status=ke;if(P.status===ke)if(P.gzhead.comment){W=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ne(w),W=P.pending,P.pending===P.pending_buf_size)){J=1;break}P.gzindex<P.gzhead.comment.length?J=P.gzhead.comment.charCodeAt(P.gzindex++)&255:J=0,xe(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),J===0&&(P.status=Ae)}else P.status=Ae;if(P.status===Ae&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&ne(w),P.pending+2<=P.pending_buf_size&&(xe(P,w.adler&255),xe(P,w.adler>>8&255),w.adler=0,P.status=Oe)):P.status=Oe),P.pending!==0){if(ne(w),w.avail_out===0)return P.last_flush=-1,s}else if(w.avail_in===0&&Ie(ee)<=Ie(q)&&ee!==e)return De(w,b);if(P.status===Me&&w.avail_in!==0)return De(w,b);if(w.avail_in!==0||P.lookahead!==0||ee!==a&&P.status!==Me){var ge=P.strategy===C?_e(P,ee):P.strategy===v?V(P,ee):j[P.level].func(P,ee);if((ge===Xe||ge===Ne)&&(P.status=Me),ge===Re||ge===Xe)return w.avail_out===0&&(P.last_flush=-1),s;if(ge===Ke&&(ee===t?m._tr_align(P):ee!==n&&(m._tr_stored_block(P,0,0,!1),ee===f&&(te(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),ne(w),w.avail_out===0))return P.last_flush=-1,s}return ee!==e?s:P.wrap<=0?l:(P.wrap===2?(xe(P,w.adler&255),xe(P,w.adler>>8&255),xe(P,w.adler>>16&255),xe(P,w.adler>>24&255),xe(P,w.total_in&255),xe(P,w.total_in>>8&255),xe(P,w.total_in>>16&255),xe(P,w.total_in>>24&255)):(de(P,w.adler>>>16),de(P,w.adler&65535)),ne(w),P.wrap>0&&(P.wrap=-P.wrap),P.pending!==0?s:l)}function M(w){var ee;return!w||!w.state?p:(ee=w.state.status,ee!==Se&&ee!==ie&&ee!==he&&ee!==ke&&ee!==Ae&&ee!==Oe&&ee!==Me?De(w,p):(w.state=null,ee===Oe?De(w,y):s))}function fe(w,ee){var q=ee.length,P,W,J,we,me,ge,He,ze;if(!w||!w.state||(P=w.state,we=P.wrap,we===2||we===1&&P.status!==Se||P.lookahead))return p;for(we===1&&(w.adler=(0,h.default)(w.adler,ee,q,0)),P.wrap=0,q>=P.w_size&&(we===0&&(te(P.head),P.strstart=0,P.block_start=0,P.insert=0),ze=new x.Buf8(P.w_size),x.arraySet(ze,ee,q-P.w_size,P.w_size,0),ee=ze,q=P.w_size),me=w.avail_in,ge=w.next_in,He=w.input,w.avail_in=q,w.next_in=0,w.input=ee,G(P);P.lookahead>=Q;){W=P.strstart,J=P.lookahead-(Q-1);do P.ins_h=(P.ins_h<<P.hash_shift^P.window[W+Q-1])&P.hash_mask,P.prev[W&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=W,W++;while(--J);P.strstart=W,P.lookahead=Q-1,G(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=Q-1,P.match_available=0,w.next_in=ge,w.input=He,w.avail_in=me,P.wrap=we,s}var Ce="pako deflate (from Nodeca project)";D.deflateInfo=Ce},16071:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=x;var c=30,_=12;function x(m,h){var o,u,d,r,i,a,t,f,e,n,s,l,p,y,b,g,E,C,v,S,k,O,R,U,N;o=m.state,u=m.next_in,U=m.input,d=u+(m.avail_in-5),r=m.next_out,N=m.output,i=r-(h-m.avail_out),a=r+(m.avail_out-257),t=o.dmax,f=o.wsize,e=o.whave,n=o.wnext,s=o.window,l=o.hold,p=o.bits,y=o.lencode,b=o.distcode,g=(1<<o.lenbits)-1,E=(1<<o.distbits)-1;e:do{p<15&&(l+=U[u++]<<p,p+=8,l+=U[u++]<<p,p+=8),C=y[l&g];t:for(;;){if(v=C>>>24,l>>>=v,p-=v,v=C>>>16&255,v===0)N[r++]=C&65535;else if(v&16){S=C&65535,v&=15,v&&(p<v&&(l+=U[u++]<<p,p+=8),S+=l&(1<<v)-1,l>>>=v,p-=v),p<15&&(l+=U[u++]<<p,p+=8,l+=U[u++]<<p,p+=8),C=b[l&E];r:for(;;){if(v=C>>>24,l>>>=v,p-=v,v=C>>>16&255,v&16){if(k=C&65535,v&=15,p<v&&(l+=U[u++]<<p,p+=8,p<v&&(l+=U[u++]<<p,p+=8)),k+=l&(1<<v)-1,k>t){m.msg="invalid distance too far back",o.mode=c;break e}if(l>>>=v,p-=v,v=r-i,k>v){if(v=k-v,v>e&&o.sane){m.msg="invalid distance too far back",o.mode=c;break e}if(O=0,R=s,n===0){if(O+=f-v,v<S){S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}}else if(n<v){if(O+=f+n-v,v-=n,v<S){S-=v;do N[r++]=s[O++];while(--v);if(O=0,n<S){v=n,S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}}}else if(O+=n-v,v<S){S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}for(;S>2;)N[r++]=R[O++],N[r++]=R[O++],N[r++]=R[O++],S-=3;S&&(N[r++]=R[O++],S>1&&(N[r++]=R[O++]))}else{O=r-k;do N[r++]=N[O++],N[r++]=N[O++],N[r++]=N[O++],S-=3;while(S>2);S&&(N[r++]=N[O++],S>1&&(N[r++]=N[O++]))}}else if(v&64){m.msg="invalid distance code",o.mode=c;break e}else{C=b[(C&65535)+(l&(1<<v)-1)];continue r}break}}else if(v&64)if(v&32){o.mode=_;break e}else{m.msg="invalid literal/length code",o.mode=c;break e}else{C=y[(C&65535)+(l&(1<<v)-1)];continue t}break}}while(u<d&&r<a);S=p>>3,u-=S,p-=S<<3,l&=(1<<p)-1,m.next_in=u,m.next_out=r,m.avail_in=u<d?5+(d-u):5-(u-d),m.avail_out=r<a?257+(a-r):257-(r-a),o.hold=l,o.bits=p}},95766:function(Te,D,c){"use strict";function _(B){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(M){return typeof M}:_=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},_(B)}Object.defineProperty(D,"__esModule",{value:!0}),D.inflateReset=G,D.inflateReset2=F,D.inflateResetKeep=ae,D.inflateInit=T,D.inflateInit2=H,D.inflate=$,D.inflateEnd=Y,D.inflateGetHeader=se,D.inflateSetDictionary=ve,D.inflateInfo=D.Z_DEFLATED=D.Z_BUF_ERROR=D.Z_MEM_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_NEED_DICT=D.Z_STREAM_END=D.Z_OK=D.Z_TREES=D.Z_BLOCK=D.Z_FINISH=void 0;var x=i(c(35986)),m=d(c(97580)),h=d(c(1217)),o=d(c(16071)),u=d(c(63093));function d(B){return B&&B.__esModule?B:{default:B}}function r(){if(typeof WeakMap!="function")return null;var B=new WeakMap;return r=function(){return B},B}function i(B){if(B&&B.__esModule)return B;if(B===null||_(B)!=="object"&&typeof B!="function")return{default:B};var re=r();if(re&&re.has(B))return re.get(B);var M={},fe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ce in B)if(Object.prototype.hasOwnProperty.call(B,Ce)){var w=fe?Object.getOwnPropertyDescriptor(B,Ce):null;w&&(w.get||w.set)?Object.defineProperty(M,Ce,w):M[Ce]=B[Ce]}return M.default=B,re&&re.set(B,M),M}var a=0,t=1,f=2,e=4;D.Z_FINISH=e;var n=5;D.Z_BLOCK=n;var s=6;D.Z_TREES=s;var l=0;D.Z_OK=l;var p=1;D.Z_STREAM_END=p;var y=2;D.Z_NEED_DICT=y;var b=-2;D.Z_STREAM_ERROR=b;var g=-3;D.Z_DATA_ERROR=g;var E=-4;D.Z_MEM_ERROR=E;var C=-5;D.Z_BUF_ERROR=C;var v=8;D.Z_DEFLATED=v;var S=1,k=2,O=3,R=4,U=5,N=6,pe=7,Z=8,le=9,L=10,K=11,I=12,z=13,X=14,Q=15,ce=16,ye=17,Le=18,Se=19,ie=20,he=21,ke=22,Ae=23,Oe=24,Me=25,Re=26,Ke=27,Xe=28,Ne=29,Fe=30,De=31,Ie=32,te=852,ne=592,Ee=15,xe=Ee;function de(B){return(B>>>24&255)+(B>>>8&65280)+((B&65280)<<8)+((B&255)<<24)}function ue(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new x.Buf16(320),this.work=new x.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ae(B){var re;return!B||!B.state?b:(re=B.state,B.total_in=B.total_out=re.total=0,B.msg="",re.wrap&&(B.adler=re.wrap&1),re.mode=S,re.last=0,re.havedict=0,re.dmax=32768,re.head=null,re.hold=0,re.bits=0,re.lencode=re.lendyn=new x.Buf32(te),re.distcode=re.distdyn=new x.Buf32(ne),re.sane=1,re.back=-1,l)}function G(B){var re;return!B||!B.state?b:(re=B.state,re.wsize=0,re.whave=0,re.wnext=0,ae(B))}function F(B,re){var M,fe;return!B||!B.state||(fe=B.state,re<0?(M=0,re=-re):(M=(re>>4)+1,re<48&&(re&=15)),re&&(re<8||re>15))?b:(fe.window!==null&&fe.wbits!==re&&(fe.window=null),fe.wrap=M,fe.wbits=re,G(B))}function H(B,re){var M,fe;return B?(fe=new ue,B.state=fe,fe.window=null,M=F(B,re),M!==l&&(B.state=null),M):b}function T(B){return H(B,xe)}var V=!0,_e,be;function j(B){if(V){var re;for(_e=new x.Buf32(512),be=new x.Buf32(32),re=0;re<144;)B.lens[re++]=8;for(;re<256;)B.lens[re++]=9;for(;re<280;)B.lens[re++]=7;for(;re<288;)B.lens[re++]=8;for((0,u.default)(t,B.lens,0,288,_e,0,B.work,{bits:9}),re=0;re<32;)B.lens[re++]=5;(0,u.default)(f,B.lens,0,32,be,0,B.work,{bits:5}),V=!1}B.lencode=_e,B.lenbits=9,B.distcode=be,B.distbits=5}function A(B,re,M,fe){var Ce,w=B.state;return w.window===null&&(w.wsize=1<<w.wbits,w.wnext=0,w.whave=0,w.window=new x.Buf8(w.wsize)),fe>=w.wsize?(x.arraySet(w.window,re,M-w.wsize,w.wsize,0),w.wnext=0,w.whave=w.wsize):(Ce=w.wsize-w.wnext,Ce>fe&&(Ce=fe),x.arraySet(w.window,re,M-fe,Ce,w.wnext),fe-=Ce,fe?(x.arraySet(w.window,re,M-fe,fe,0),w.wnext=fe,w.whave=w.wsize):(w.wnext+=Ce,w.wnext===w.wsize&&(w.wnext=0),w.whave<w.wsize&&(w.whave+=Ce))),0}function $(B,re){var M,fe,Ce,w,ee,q,P,W,J,we,me,ge,He,ze,Ue=0,Be,je,Pe,We,Ze,Qe,$e,Ge,Ve=new x.Buf8(4),Ye,qe,rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return b;M=B.state,M.mode===I&&(M.mode=z),ee=B.next_out,Ce=B.output,P=B.avail_out,w=B.next_in,fe=B.input,q=B.avail_in,W=M.hold,J=M.bits,we=q,me=P,Ge=l;e:for(;;)switch(M.mode){case S:if(M.wrap===0){M.mode=z;break}for(;J<16;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(M.wrap&2&&W===35615){M.check=0,Ve[0]=W&255,Ve[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ve,2,0),W=0,J=0,M.mode=k;break}if(M.flags=0,M.head&&(M.head.done=!1),!(M.wrap&1)||(((W&255)<<8)+(W>>8))%31){B.msg="incorrect header check",M.mode=Fe;break}if((W&15)!==v){B.msg="unknown compression method",M.mode=Fe;break}if(W>>>=4,J-=4,$e=(W&15)+8,M.wbits===0)M.wbits=$e;else if($e>M.wbits){B.msg="invalid window size",M.mode=Fe;break}M.dmax=1<<$e,B.adler=M.check=1,M.mode=W&512?L:I,W=0,J=0;break;case k:for(;J<16;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(M.flags=W,(M.flags&255)!==v){B.msg="unknown compression method",M.mode=Fe;break}if(M.flags&57344){B.msg="unknown header flags set",M.mode=Fe;break}M.head&&(M.head.text=W>>8&1),M.flags&512&&(Ve[0]=W&255,Ve[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ve,2,0)),W=0,J=0,M.mode=O;case O:for(;J<32;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.head&&(M.head.time=W),M.flags&512&&(Ve[0]=W&255,Ve[1]=W>>>8&255,Ve[2]=W>>>16&255,Ve[3]=W>>>24&255,M.check=(0,h.default)(M.check,Ve,4,0)),W=0,J=0,M.mode=R;case R:for(;J<16;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.head&&(M.head.xflags=W&255,M.head.os=W>>8),M.flags&512&&(Ve[0]=W&255,Ve[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ve,2,0)),W=0,J=0,M.mode=U;case U:if(M.flags&1024){for(;J<16;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.length=W,M.head&&(M.head.extra_len=W),M.flags&512&&(Ve[0]=W&255,Ve[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ve,2,0)),W=0,J=0}else M.head&&(M.head.extra=null);M.mode=N;case N:if(M.flags&1024&&(ge=M.length,ge>q&&(ge=q),ge&&(M.head&&($e=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),x.arraySet(M.head.extra,fe,w,ge,$e)),M.flags&512&&(M.check=(0,h.default)(M.check,fe,ge,w)),q-=ge,w+=ge,M.length-=ge),M.length))break e;M.length=0,M.mode=pe;case pe:if(M.flags&2048){if(q===0)break e;ge=0;do $e=fe[w+ge++],M.head&&$e&&M.length<65536&&(M.head.name+=String.fromCharCode($e));while($e&&ge<q);if(M.flags&512&&(M.check=(0,h.default)(M.check,fe,ge,w)),q-=ge,w+=ge,$e)break e}else M.head&&(M.head.name=null);M.length=0,M.mode=Z;case Z:if(M.flags&4096){if(q===0)break e;ge=0;do $e=fe[w+ge++],M.head&&$e&&M.length<65536&&(M.head.comment+=String.fromCharCode($e));while($e&&ge<q);if(M.flags&512&&(M.check=(0,h.default)(M.check,fe,ge,w)),q-=ge,w+=ge,$e)break e}else M.head&&(M.head.comment=null);M.mode=le;case le:if(M.flags&512){for(;J<16;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(W!==(M.check&65535)){B.msg="header crc mismatch",M.mode=Fe;break}W=0,J=0}M.head&&(M.head.hcrc=M.flags>>9&1,M.head.done=!0),B.adler=M.check=0,M.mode=I;break;case L:for(;J<32;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}B.adler=M.check=de(W),W=0,J=0,M.mode=K;case K:if(M.havedict===0)return B.next_out=ee,B.avail_out=P,B.next_in=w,B.avail_in=q,M.hold=W,M.bits=J,y;B.adler=M.check=1,M.mode=I;case I:if(re===n||re===s)break e;case z:if(M.last){W>>>=J&7,J-=J&7,M.mode=Ke;break}for(;J<3;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}switch(M.last=W&1,W>>>=1,J-=1,W&3){case 0:M.mode=X;break;case 1:if(j(M),M.mode=ie,re===s){W>>>=2,J-=2;break e}break;case 2:M.mode=ye;break;case 3:B.msg="invalid block type",M.mode=Fe}W>>>=2,J-=2;break;case X:for(W>>>=J&7,J-=J&7;J<32;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if((W&65535)!==(W>>>16^65535)){B.msg="invalid stored block lengths",M.mode=Fe;break}if(M.length=W&65535,W=0,J=0,M.mode=Q,re===s)break e;case Q:M.mode=ce;case ce:if(ge=M.length,ge){if(ge>q&&(ge=q),ge>P&&(ge=P),ge===0)break e;x.arraySet(Ce,fe,w,ge,ee),q-=ge,w+=ge,P-=ge,ee+=ge,M.length-=ge;break}M.mode=I;break;case ye:for(;J<14;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(M.nlen=(W&31)+257,W>>>=5,J-=5,M.ndist=(W&31)+1,W>>>=5,J-=5,M.ncode=(W&15)+4,W>>>=4,J-=4,M.nlen>286||M.ndist>30){B.msg="too many length or distance symbols",M.mode=Fe;break}M.have=0,M.mode=Le;case Le:for(;M.have<M.ncode;){for(;J<3;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.lens[rt[M.have++]]=W&7,W>>>=3,J-=3}for(;M.have<19;)M.lens[rt[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,Ye={bits:M.lenbits},Ge=(0,u.default)(a,M.lens,0,19,M.lencode,0,M.work,Ye),M.lenbits=Ye.bits,Ge){B.msg="invalid code lengths set",M.mode=Fe;break}M.have=0,M.mode=Se;case Se:for(;M.have<M.nlen+M.ndist;){for(;Ue=M.lencode[W&(1<<M.lenbits)-1],Be=Ue>>>24,je=Ue>>>16&255,Pe=Ue&65535,!(Be<=J);){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(Pe<16)W>>>=Be,J-=Be,M.lens[M.have++]=Pe;else{if(Pe===16){for(qe=Be+2;J<qe;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(W>>>=Be,J-=Be,M.have===0){B.msg="invalid bit length repeat",M.mode=Fe;break}$e=M.lens[M.have-1],ge=3+(W&3),W>>>=2,J-=2}else if(Pe===17){for(qe=Be+3;J<qe;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}W>>>=Be,J-=Be,$e=0,ge=3+(W&7),W>>>=3,J-=3}else{for(qe=Be+7;J<qe;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}W>>>=Be,J-=Be,$e=0,ge=11+(W&127),W>>>=7,J-=7}if(M.have+ge>M.nlen+M.ndist){B.msg="invalid bit length repeat",M.mode=Fe;break}for(;ge--;)M.lens[M.have++]=$e}}if(M.mode===Fe)break;if(M.lens[256]===0){B.msg="invalid code -- missing end-of-block",M.mode=Fe;break}if(M.lenbits=9,Ye={bits:M.lenbits},Ge=(0,u.default)(t,M.lens,0,M.nlen,M.lencode,0,M.work,Ye),M.lenbits=Ye.bits,Ge){B.msg="invalid literal/lengths set",M.mode=Fe;break}if(M.distbits=6,M.distcode=M.distdyn,Ye={bits:M.distbits},Ge=(0,u.default)(f,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,Ye),M.distbits=Ye.bits,Ge){B.msg="invalid distances set",M.mode=Fe;break}if(M.mode=ie,re===s)break e;case ie:M.mode=he;case he:if(q>=6&&P>=258){B.next_out=ee,B.avail_out=P,B.next_in=w,B.avail_in=q,M.hold=W,M.bits=J,(0,o.default)(B,me),ee=B.next_out,Ce=B.output,P=B.avail_out,w=B.next_in,fe=B.input,q=B.avail_in,W=M.hold,J=M.bits,M.mode===I&&(M.back=-1);break}for(M.back=0;Ue=M.lencode[W&(1<<M.lenbits)-1],Be=Ue>>>24,je=Ue>>>16&255,Pe=Ue&65535,!(Be<=J);){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(je&&!(je&240)){for(We=Be,Ze=je,Qe=Pe;Ue=M.lencode[Qe+((W&(1<<We+Ze)-1)>>We)],Be=Ue>>>24,je=Ue>>>16&255,Pe=Ue&65535,!(We+Be<=J);){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}W>>>=We,J-=We,M.back+=We}if(W>>>=Be,J-=Be,M.back+=Be,M.length=Pe,je===0){M.mode=Re;break}if(je&32){M.back=-1,M.mode=I;break}if(je&64){B.msg="invalid literal/length code",M.mode=Fe;break}M.extra=je&15,M.mode=ke;case ke:if(M.extra){for(qe=M.extra;J<qe;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.length+=W&(1<<M.extra)-1,W>>>=M.extra,J-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=Ae;case Ae:for(;Ue=M.distcode[W&(1<<M.distbits)-1],Be=Ue>>>24,je=Ue>>>16&255,Pe=Ue&65535,!(Be<=J);){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(!(je&240)){for(We=Be,Ze=je,Qe=Pe;Ue=M.distcode[Qe+((W&(1<<We+Ze)-1)>>We)],Be=Ue>>>24,je=Ue>>>16&255,Pe=Ue&65535,!(We+Be<=J);){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}W>>>=We,J-=We,M.back+=We}if(W>>>=Be,J-=Be,M.back+=Be,je&64){B.msg="invalid distance code",M.mode=Fe;break}M.offset=Pe,M.extra=je&15,M.mode=Oe;case Oe:if(M.extra){for(qe=M.extra;J<qe;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}M.offset+=W&(1<<M.extra)-1,W>>>=M.extra,J-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){B.msg="invalid distance too far back",M.mode=Fe;break}M.mode=Me;case Me:if(P===0)break e;if(ge=me-P,M.offset>ge){if(ge=M.offset-ge,ge>M.whave&&M.sane){B.msg="invalid distance too far back",M.mode=Fe;break}ge>M.wnext?(ge-=M.wnext,He=M.wsize-ge):He=M.wnext-ge,ge>M.length&&(ge=M.length),ze=M.window}else ze=Ce,He=ee-M.offset,ge=M.length;ge>P&&(ge=P),P-=ge,M.length-=ge;do Ce[ee++]=ze[He++];while(--ge);M.length===0&&(M.mode=he);break;case Re:if(P===0)break e;Ce[ee++]=M.length,P--,M.mode=he;break;case Ke:if(M.wrap){for(;J<32;){if(q===0)break e;q--,W|=fe[w++]<<J,J+=8}if(me-=P,B.total_out+=me,M.total+=me,me&&(B.adler=M.check=M.flags?(0,h.default)(M.check,Ce,me,ee-me):(0,m.default)(M.check,Ce,me,ee-me)),me=P,(M.flags?W:de(W))!==M.check){B.msg="incorrect data check",M.mode=Fe;break}W=0,J=0}M.mode=Xe;case Xe:if(M.wrap&&M.flags){for(;J<32;){if(q===0)break e;q--,W+=fe[w++]<<J,J+=8}if(W!==(M.total&4294967295)){B.msg="incorrect length check",M.mode=Fe;break}W=0,J=0}M.mode=Ne;case Ne:Ge=p;break e;case Fe:Ge=g;break e;case De:return E;case Ie:default:return b}return B.next_out=ee,B.avail_out=P,B.next_in=w,B.avail_in=q,M.hold=W,M.bits=J,(M.wsize||me!==B.avail_out&&M.mode<Fe&&(M.mode<Ke||re!==e))&&A(B,B.output,B.next_out,me-B.avail_out)?(M.mode=De,E):(we-=B.avail_in,me-=B.avail_out,B.total_in+=we,B.total_out+=me,M.total+=me,M.wrap&&me&&(B.adler=M.check=M.flags?(0,h.default)(M.check,Ce,me,B.next_out-me):(0,m.default)(M.check,Ce,me,B.next_out-me)),B.data_type=M.bits+(M.last?64:0)+(M.mode===I?128:0)+(M.mode===ie||M.mode===Q?256:0),(we===0&&me===0||re===e)&&Ge===l&&(Ge=C),Ge)}function Y(B){if(!B||!B.state)return b;var re=B.state;return re.window&&(re.window=null),B.state=null,l}function se(B,re){var M;return!B||!B.state||(M=B.state,!(M.wrap&2))?b:(M.head=re,re.done=!1,l)}function ve(B,re){var M=re.length,fe,Ce,w;return!B||!B.state||(fe=B.state,fe.wrap!==0&&fe.mode!==K)?b:fe.mode===K&&(Ce=1,Ce=(0,m.default)(Ce,re,M,0),Ce!==fe.check)?g:(w=A(B,re,M,M),w?(fe.mode=De,E):(fe.havedict=1,l))}var oe="pako inflate (from Nodeca project)";D.inflateInfo=oe},63093:function(Te,D,c){"use strict";function _(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(y){return typeof y}:_=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},_(l)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;var x=h(c(35986));function m(){if(typeof WeakMap!="function")return null;var l=new WeakMap;return m=function(){return l},l}function h(l){if(l&&l.__esModule)return l;if(l===null||_(l)!=="object"&&typeof l!="function")return{default:l};var p=m();if(p&&p.has(l))return p.get(l);var y={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in l)if(Object.prototype.hasOwnProperty.call(l,g)){var E=b?Object.getOwnPropertyDescriptor(l,g):null;E&&(E.get||E.set)?Object.defineProperty(y,g,E):y[g]=l[g]}return y.default=l,p&&p.set(l,y),y}var o=15,u=852,d=592,r=0,i=1,a=2,t=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],e=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function s(l,p,y,b,g,E,C,v){var S=v.bits,k=0,O=0,R=0,U=0,N=0,pe=0,Z=0,le=0,L=0,K=0,I,z,X,Q,ce,ye=null,Le=0,Se,ie=new x.Buf16(o+1),he=new x.Buf16(o+1),ke=null,Ae=0,Oe,Me,Re;for(k=0;k<=o;k++)ie[k]=0;for(O=0;O<b;O++)ie[p[y+O]]++;for(N=S,U=o;U>=1&&ie[U]===0;U--);if(N>U&&(N=U),U===0)return g[E++]=1<<24|64<<16|0,g[E++]=1<<24|64<<16|0,v.bits=1,0;for(R=1;R<U&&ie[R]===0;R++);for(N<R&&(N=R),le=1,k=1;k<=o;k++)if(le<<=1,le-=ie[k],le<0)return-1;if(le>0&&(l===r||U!==1))return-1;for(he[1]=0,k=1;k<o;k++)he[k+1]=he[k]+ie[k];for(O=0;O<b;O++)p[y+O]!==0&&(C[he[p[y+O]]++]=O);if(l===r?(ye=ke=C,Se=19):l===i?(ye=t,Le-=257,ke=f,Ae-=257,Se=256):(ye=e,ke=n,Se=-1),K=0,O=0,k=R,ce=E,pe=N,Z=0,X=-1,L=1<<N,Q=L-1,l===i&&L>u||l===a&&L>d)return 1;for(;;){Oe=k-Z,C[O]<Se?(Me=0,Re=C[O]):C[O]>Se?(Me=ke[Ae+C[O]],Re=ye[Le+C[O]]):(Me=96,Re=0),I=1<<k-Z,z=1<<pe,R=z;do z-=I,g[ce+(K>>Z)+z]=Oe<<24|Me<<16|Re|0;while(z!==0);for(I=1<<k-1;K&I;)I>>=1;if(I!==0?(K&=I-1,K+=I):K=0,O++,--ie[k]===0){if(k===U)break;k=p[y+C[O]]}if(k>N&&(K&Q)!==X){for(Z===0&&(Z=N),ce+=R,pe=k-Z,le=1<<pe;pe+Z<U&&(le-=ie[pe+Z],!(le<=0));)pe++,le<<=1;if(L+=1<<pe,l===i&&L>u||l===a&&L>d)return 1;X=K&Q,g[X]=N<<24|pe<<16|ce-E|0}}return K!==0&&(g[ce+K]=k-Z<<24|64<<16|0),v.bits=N,0}},70892:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};D.default=c},55796:function(Te,D,c){"use strict";function _(A){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(Y){return typeof Y}:_=function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},_(A)}Object.defineProperty(D,"__esModule",{value:!0}),D._tr_init=T,D._tr_stored_block=V,D._tr_flush_block=be,D._tr_tally=j,D._tr_align=_e;var x=h(c(35986));function m(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return m=function(){return A},A}function h(A){if(A&&A.__esModule)return A;if(A===null||_(A)!=="object"&&typeof A!="function")return{default:A};var $=m();if($&&$.has(A))return $.get(A);var Y={},se=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ve in A)if(Object.prototype.hasOwnProperty.call(A,ve)){var oe=se?Object.getOwnPropertyDescriptor(A,ve):null;oe&&(oe.get||oe.set)?Object.defineProperty(Y,ve,oe):Y[ve]=A[ve]}return Y.default=A,$&&$.set(A,Y),Y}var o=4,u=0,d=1,r=2;function i(A){for(var $=A.length;--$>=0;)A[$]=0}var a=0,t=1,f=2,e=3,n=258,s=29,l=256,p=l+1+s,y=30,b=19,g=2*p+1,E=15,C=16,v=7,S=256,k=16,O=17,R=18,U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],N=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],pe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],le=512,L=new Array((p+2)*2);i(L);var K=new Array(y*2);i(K);var I=new Array(le);i(I);var z=new Array(n-e+1);i(z);var X=new Array(s);i(X);var Q=new Array(y);i(Q);function ce(A,$,Y,se,ve){this.static_tree=A,this.extra_bits=$,this.extra_base=Y,this.elems=se,this.max_length=ve,this.has_stree=A&&A.length}var ye,Le,Se;function ie(A,$){this.dyn_tree=A,this.max_code=0,this.stat_desc=$}function he(A){return A<256?I[A]:I[256+(A>>>7)]}function ke(A,$){A.pending_buf[A.pending++]=$&255,A.pending_buf[A.pending++]=$>>>8&255}function Ae(A,$,Y){A.bi_valid>C-Y?(A.bi_buf|=$<<A.bi_valid&65535,ke(A,A.bi_buf),A.bi_buf=$>>C-A.bi_valid,A.bi_valid+=Y-C):(A.bi_buf|=$<<A.bi_valid&65535,A.bi_valid+=Y)}function Oe(A,$,Y){Ae(A,Y[$*2],Y[$*2+1])}function Me(A,$){var Y=0;do Y|=A&1,A>>>=1,Y<<=1;while(--$>0);return Y>>>1}function Re(A){A.bi_valid===16?(ke(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=A.bi_buf&255,A.bi_buf>>=8,A.bi_valid-=8)}function Ke(A,$){var Y=$.dyn_tree,se=$.max_code,ve=$.stat_desc.static_tree,oe=$.stat_desc.has_stree,B=$.stat_desc.extra_bits,re=$.stat_desc.extra_base,M=$.stat_desc.max_length,fe,Ce,w,ee,q,P,W=0;for(ee=0;ee<=E;ee++)A.bl_count[ee]=0;for(Y[A.heap[A.heap_max]*2+1]=0,fe=A.heap_max+1;fe<g;fe++)Ce=A.heap[fe],ee=Y[Y[Ce*2+1]*2+1]+1,ee>M&&(ee=M,W++),Y[Ce*2+1]=ee,!(Ce>se)&&(A.bl_count[ee]++,q=0,Ce>=re&&(q=B[Ce-re]),P=Y[Ce*2],A.opt_len+=P*(ee+q),oe&&(A.static_len+=P*(ve[Ce*2+1]+q)));if(W!==0){do{for(ee=M-1;A.bl_count[ee]===0;)ee--;A.bl_count[ee]--,A.bl_count[ee+1]+=2,A.bl_count[M]--,W-=2}while(W>0);for(ee=M;ee!==0;ee--)for(Ce=A.bl_count[ee];Ce!==0;)w=A.heap[--fe],!(w>se)&&(Y[w*2+1]!==ee&&(A.opt_len+=(ee-Y[w*2+1])*Y[w*2],Y[w*2+1]=ee),Ce--)}}function Xe(A,$,Y){var se=new Array(E+1),ve=0,oe,B;for(oe=1;oe<=E;oe++)se[oe]=ve=ve+Y[oe-1]<<1;for(B=0;B<=$;B++){var re=A[B*2+1];re!==0&&(A[B*2]=Me(se[re]++,re))}}function Ne(){var A,$,Y,se,ve,oe=new Array(E+1);for(Y=0,se=0;se<s-1;se++)for(X[se]=Y,A=0;A<1<<U[se];A++)z[Y++]=se;for(z[Y-1]=se,ve=0,se=0;se<16;se++)for(Q[se]=ve,A=0;A<1<<N[se];A++)I[ve++]=se;for(ve>>=7;se<y;se++)for(Q[se]=ve<<7,A=0;A<1<<N[se]-7;A++)I[256+ve++]=se;for($=0;$<=E;$++)oe[$]=0;for(A=0;A<=143;)L[A*2+1]=8,A++,oe[8]++;for(;A<=255;)L[A*2+1]=9,A++,oe[9]++;for(;A<=279;)L[A*2+1]=7,A++,oe[7]++;for(;A<=287;)L[A*2+1]=8,A++,oe[8]++;for(Xe(L,p+1,oe),A=0;A<y;A++)K[A*2+1]=5,K[A*2]=Me(A,5);ye=new ce(L,U,l+1,p,E),Le=new ce(K,N,0,y,E),Se=new ce(new Array(0),pe,0,b,v)}function Fe(A){var $;for($=0;$<p;$++)A.dyn_ltree[$*2]=0;for($=0;$<y;$++)A.dyn_dtree[$*2]=0;for($=0;$<b;$++)A.bl_tree[$*2]=0;A.dyn_ltree[S*2]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function De(A){A.bi_valid>8?ke(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function Ie(A,$,Y,se){De(A),se&&(ke(A,Y),ke(A,~Y)),x.arraySet(A.pending_buf,A.window,$,Y,A.pending),A.pending+=Y}function te(A,$,Y,se){var ve=$*2,oe=Y*2;return A[ve]<A[oe]||A[ve]===A[oe]&&se[$]<=se[Y]}function ne(A,$,Y){for(var se=A.heap[Y],ve=Y<<1;ve<=A.heap_len&&(ve<A.heap_len&&te($,A.heap[ve+1],A.heap[ve],A.depth)&&ve++,!te($,se,A.heap[ve],A.depth));)A.heap[Y]=A.heap[ve],Y=ve,ve<<=1;A.heap[Y]=se}function Ee(A,$,Y){var se,ve,oe=0,B,re;if(A.last_lit!==0)do se=A.pending_buf[A.d_buf+oe*2]<<8|A.pending_buf[A.d_buf+oe*2+1],ve=A.pending_buf[A.l_buf+oe],oe++,se===0?Oe(A,ve,$):(B=z[ve],Oe(A,B+l+1,$),re=U[B],re!==0&&(ve-=X[B],Ae(A,ve,re)),se--,B=he(se),Oe(A,B,Y),re=N[B],re!==0&&(se-=Q[B],Ae(A,se,re)));while(oe<A.last_lit);Oe(A,S,$)}function xe(A,$){var Y=$.dyn_tree,se=$.stat_desc.static_tree,ve=$.stat_desc.has_stree,oe=$.stat_desc.elems,B,re,M=-1,fe;for(A.heap_len=0,A.heap_max=g,B=0;B<oe;B++)Y[B*2]!==0?(A.heap[++A.heap_len]=M=B,A.depth[B]=0):Y[B*2+1]=0;for(;A.heap_len<2;)fe=A.heap[++A.heap_len]=M<2?++M:0,Y[fe*2]=1,A.depth[fe]=0,A.opt_len--,ve&&(A.static_len-=se[fe*2+1]);for($.max_code=M,B=A.heap_len>>1;B>=1;B--)ne(A,Y,B);fe=oe;do B=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ne(A,Y,1),re=A.heap[1],A.heap[--A.heap_max]=B,A.heap[--A.heap_max]=re,Y[fe*2]=Y[B*2]+Y[re*2],A.depth[fe]=(A.depth[B]>=A.depth[re]?A.depth[B]:A.depth[re])+1,Y[B*2+1]=Y[re*2+1]=fe,A.heap[1]=fe++,ne(A,Y,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],Ke(A,$),Xe(Y,M,A.bl_count)}function de(A,$,Y){var se,ve=-1,oe,B=$[0*2+1],re=0,M=7,fe=4;for(B===0&&(M=138,fe=3),$[(Y+1)*2+1]=65535,se=0;se<=Y;se++)oe=B,B=$[(se+1)*2+1],!(++re<M&&oe===B)&&(re<fe?A.bl_tree[oe*2]+=re:oe!==0?(oe!==ve&&A.bl_tree[oe*2]++,A.bl_tree[k*2]++):re<=10?A.bl_tree[O*2]++:A.bl_tree[R*2]++,re=0,ve=oe,B===0?(M=138,fe=3):oe===B?(M=6,fe=3):(M=7,fe=4))}function ue(A,$,Y){var se,ve=-1,oe,B=$[0*2+1],re=0,M=7,fe=4;for(B===0&&(M=138,fe=3),se=0;se<=Y;se++)if(oe=B,B=$[(se+1)*2+1],!(++re<M&&oe===B)){if(re<fe)do Oe(A,oe,A.bl_tree);while(--re!==0);else oe!==0?(oe!==ve&&(Oe(A,oe,A.bl_tree),re--),Oe(A,k,A.bl_tree),Ae(A,re-3,2)):re<=10?(Oe(A,O,A.bl_tree),Ae(A,re-3,3)):(Oe(A,R,A.bl_tree),Ae(A,re-11,7));re=0,ve=oe,B===0?(M=138,fe=3):oe===B?(M=6,fe=3):(M=7,fe=4)}}function ae(A){var $;for(de(A,A.dyn_ltree,A.l_desc.max_code),de(A,A.dyn_dtree,A.d_desc.max_code),xe(A,A.bl_desc),$=b-1;$>=3&&A.bl_tree[Z[$]*2+1]===0;$--);return A.opt_len+=3*($+1)+5+5+4,$}function G(A,$,Y,se){var ve;for(Ae(A,$-257,5),Ae(A,Y-1,5),Ae(A,se-4,4),ve=0;ve<se;ve++)Ae(A,A.bl_tree[Z[ve]*2+1],3);ue(A,A.dyn_ltree,$-1),ue(A,A.dyn_dtree,Y-1)}function F(A){var $=4093624447,Y;for(Y=0;Y<=31;Y++,$>>>=1)if($&1&&A.dyn_ltree[Y*2]!==0)return u;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return d;for(Y=32;Y<l;Y++)if(A.dyn_ltree[Y*2]!==0)return d;return u}var H=!1;function T(A){H||(Ne(),H=!0),A.l_desc=new ie(A.dyn_ltree,ye),A.d_desc=new ie(A.dyn_dtree,Le),A.bl_desc=new ie(A.bl_tree,Se),A.bi_buf=0,A.bi_valid=0,Fe(A)}function V(A,$,Y,se){Ae(A,(a<<1)+(se?1:0),3),Ie(A,$,Y,!0)}function _e(A){Ae(A,t<<1,3),Oe(A,S,L),Re(A)}function be(A,$,Y,se){var ve,oe,B=0;A.level>0?(A.strm.data_type===r&&(A.strm.data_type=F(A)),xe(A,A.l_desc),xe(A,A.d_desc),B=ae(A),ve=A.opt_len+3+7>>>3,oe=A.static_len+3+7>>>3,oe<=ve&&(ve=oe)):ve=oe=Y+5,Y+4<=ve&&$!==-1?V(A,$,Y,se):A.strategy===o||oe===ve?(Ae(A,(t<<1)+(se?1:0),3),Ee(A,L,K)):(Ae(A,(f<<1)+(se?1:0),3),G(A,A.l_desc.max_code+1,A.d_desc.max_code+1,B+1),Ee(A,A.dyn_ltree,A.dyn_dtree)),Fe(A),se&&De(A)}function j(A,$,Y){return A.pending_buf[A.d_buf+A.last_lit*2]=$>>>8&255,A.pending_buf[A.d_buf+A.last_lit*2+1]=$&255,A.pending_buf[A.l_buf+A.last_lit]=Y&255,A.last_lit++,$===0?A.dyn_ltree[Y*2]++:(A.matches++,$--,A.dyn_ltree[(z[Y]+l+1)*2]++,A.dyn_dtree[he($)*2]++),A.last_lit===A.lit_bufsize-1}},27589:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},16327:function(Te,D,c){"use strict";function _(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(t)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var x=h(c(50500));function m(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return m=function(){return t},t}function h(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var f=m();if(f&&f.has(t))return f.get(t);var e={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var l=n?Object.getOwnPropertyDescriptor(t,s):null;l&&(l.get||l.set)?Object.defineProperty(e,s,l):e[s]=t[s]}return e.default=t,f&&f.set(t,e),e}function o(t,f){if(!(t instanceof f))throw new TypeError("Cannot call a class as a function")}function u(t,f){for(var e=0;e<f.length;e++){var n=f[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,f,e){return f&&u(t.prototype,f),e&&u(t,e),t}var r=!1,i=40*1024*1024,a=function(){function t(){o(this,t),this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=1024*1024*4,this._rQ=null,this._sQbufferSize=1024*10,this._sQlen=0,this._sQ=null,this._eventHandlers={message:function(){},open:function(){},close:function(){},error:function(){}}}return d(t,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(e){this._rQi+=e}},{key:"rQshift8",value:function(){return this._rQshift(1)}},{key:"rQshift16",value:function(){return this._rQshift(2)}},{key:"rQshift32",value:function(){return this._rQshift(4)}},{key:"_rQshift",value:function(e){for(var n=0,s=e-1;s>=0;s--)n+=this._rQ[this._rQi++]<<s*8;return n}},{key:"rQshiftStr",value:function(e){typeof e=="undefined"&&(e=this.rQlen);for(var n="",s=0;s<e;s+=4096){var l=this.rQshiftBytes(Math.min(4096,e-s));n+=String.fromCharCode.apply(null,l)}return n}},{key:"rQshiftBytes",value:function(e){return typeof e=="undefined"&&(e=this.rQlen),this._rQi+=e,new Uint8Array(this._rQ.buffer,this._rQi-e,e)}},{key:"rQshiftTo",value:function(e,n){n===void 0&&(n=this.rQlen),e.set(new Uint8Array(this._rQ.buffer,this._rQi,n)),this._rQi+=n}},{key:"rQslice",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+e,n-e)}},{key:"rQwait",value:function(e,n,s){if(this.rQlen<n){if(s){if(this._rQi<s)throw new Error("rQwait cannot backup "+s+" bytes");this._rQi-=s}return!0}return!1}},{key:"flush",value:function(){this._sQlen>0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(e){this._sQ.set(e,this._sQlen),this._sQlen+=e.length,this.flush()}},{key:"sendString",value:function(e){this.send(e.split("").map(function(n){return n.charCodeAt(0)}))}},{key:"off",value:function(e){this._eventHandlers[e]=function(){}}},{key:"on",value:function(e,n){this._eventHandlers[e]=n}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(e,n){var s=this;this.init(),this._websocket=new WebSocket(e,n),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){x.Debug(">> WebSock.onopen"),s._websocket.protocol&&x.Info("Server choose sub-protocol: "+s._websocket.protocol),s._eventHandlers.open(),x.Debug("<< WebSock.onopen")},this._websocket.onclose=function(l){x.Debug(">> WebSock.onclose"),s._eventHandlers.close(l),x.Debug("<< WebSock.onclose")},this._websocket.onerror=function(l){x.Debug(">> WebSock.onerror: "+l),s._eventHandlers.error(l),x.Debug("<< WebSock.onerror: "+l)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(x.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(e){var n=(this._rQlen-this._rQi+e)*8,s=this._rQbufferSize<n;if(s&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,n)),this._rQbufferSize>i&&(this._rQbufferSize=i,this._rQbufferSize-this.rQlen<e))throw new Error("Receive Queue buffer exceeded "+i+" bytes, and the new message could not fit");if(s){var l=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(l,this._rQi,this._rQlen-this._rQi))}else r?this._rQ.copyWithin(0,this._rQi,this._rQlen):this._rQ.set(new Uint8Array(this._rQ.buffer,this._rQi,this._rQlen-this._rQi));this._rQlen=this._rQlen-this._rQi,this._rQi=0}},{key:"_DecodeMessage",value:function(e){var n=new Uint8Array(e);n.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(n.length),this._rQ.set(n,this._rQlen),this._rQlen+=n.length}},{key:"_recvMessage",value:function(e){this._DecodeMessage(e.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):x.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(e){this._rQi=e}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),t}();D.default=a},93681:function(Te,D,c){"use strict";c.r(D),c.d(D,{BaseInput:function(){return a},default:function(){return b}});var _=c(5016),x=c(20049),m=c(18082),h=c(10928),o=c(92310),u=c.n(o),d=c(59301),r=c(5643),i=function(E){var C,v,S=E.inputElement,k=E.prefixCls,O=E.prefix,R=E.suffix,U=E.addonBefore,N=E.addonAfter,pe=E.className,Z=E.style,le=E.disabled,L=E.readOnly,K=E.focused,I=E.triggerFocus,z=E.allowClear,X=E.value,Q=E.handleReset,ce=E.hidden,ye=E.classes,Le=E.classNames,Se=E.dataAttrs,ie=E.styles,he=E.components,ke=(he==null?void 0:he.affixWrapper)||"span",Ae=(he==null?void 0:he.groupWrapper)||"span",Oe=(he==null?void 0:he.wrapper)||"span",Me=(he==null?void 0:he.groupAddon)||"span",Re=(0,d.useRef)(null),Ke=function(ae){var G;(G=Re.current)!==null&&G!==void 0&&G.contains(ae.target)&&(I==null||I())},Xe=function(){var ae;if(!z)return null;var G=!le&&!L&&X,F="".concat(k,"-clear-icon"),H=(0,h.Z)(z)==="object"&&z!==null&&z!==void 0&&z.clearIcon?z.clearIcon:"\u2716";return d.createElement("span",{onClick:Q,onMouseDown:function(V){return V.preventDefault()},className:u()(F,(ae={},(0,m.Z)(ae,"".concat(F,"-hidden"),!G),(0,m.Z)(ae,"".concat(F,"-has-suffix"),!!R),ae)),role:"button",tabIndex:-1},H)},Ne=(0,d.cloneElement)(S,{value:X,hidden:ce,className:u()((C=S.props)===null||C===void 0?void 0:C.className,!(0,r.X3)(E)&&!(0,r.He)(E)&&pe)||null,style:(0,x.Z)((0,x.Z)({},(v=S.props)===null||v===void 0?void 0:v.style),!(0,r.X3)(E)&&!(0,r.He)(E)?Z:{})});if((0,r.X3)(E)){var Fe,De="".concat(k,"-affix-wrapper"),Ie=u()(De,(Fe={},(0,m.Z)(Fe,"".concat(De,"-disabled"),le),(0,m.Z)(Fe,"".concat(De,"-focused"),K),(0,m.Z)(Fe,"".concat(De,"-readonly"),L),(0,m.Z)(Fe,"".concat(De,"-input-with-clear-btn"),R&&z&&X),Fe),!(0,r.He)(E)&&pe,ye==null?void 0:ye.affixWrapper,Le==null?void 0:Le.affixWrapper),te=(R||z)&&d.createElement("span",{className:u()("".concat(k,"-suffix"),Le==null?void 0:Le.suffix),style:ie==null?void 0:ie.suffix},Xe(),R);Ne=d.createElement(ke,(0,_.Z)({className:Ie,style:(0,x.Z)((0,x.Z)({},(0,r.He)(E)?void 0:Z),ie==null?void 0:ie.affixWrapper),hidden:!(0,r.He)(E)&&ce,onClick:Ke},Se==null?void 0:Se.affixWrapper,{ref:Re}),O&&d.createElement("span",{className:u()("".concat(k,"-prefix"),Le==null?void 0:Le.prefix),style:ie==null?void 0:ie.prefix},O),(0,d.cloneElement)(S,{value:X,hidden:null}),te)}if((0,r.He)(E)){var ne="".concat(k,"-group"),Ee="".concat(ne,"-addon"),xe=u()("".concat(k,"-wrapper"),ne,ye==null?void 0:ye.wrapper),de=u()("".concat(k,"-group-wrapper"),pe,ye==null?void 0:ye.group);return d.createElement(Ae,{className:de,style:Z,hidden:ce},d.createElement(Oe,{className:xe},U&&d.createElement(Me,{className:Ee},U),(0,d.cloneElement)(Ne,{hidden:null}),N&&d.createElement(Me,{className:Ee},N)))}return Ne},a=i,t=c(92393),f=c(52456),e=c(5883),n=c(18929),s=c(2738),l=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],p=(0,d.forwardRef)(function(g,E){var C=g.autoComplete,v=g.onChange,S=g.onFocus,k=g.onBlur,O=g.onPressEnter,R=g.onKeyDown,U=g.prefixCls,N=U===void 0?"rc-input":U,pe=g.disabled,Z=g.htmlSize,le=g.className,L=g.maxLength,K=g.suffix,I=g.showCount,z=g.type,X=z===void 0?"text":z,Q=g.classes,ce=g.classNames,ye=g.styles,Le=(0,e.Z)(g,l),Se=(0,n.Z)(g.defaultValue,{value:g.value}),ie=(0,f.Z)(Se,2),he=ie[0],ke=ie[1],Ae=(0,d.useState)(!1),Oe=(0,f.Z)(Ae,2),Me=Oe[0],Re=Oe[1],Ke=(0,d.useRef)(null),Xe=function(de){Ke.current&&(0,r.nH)(Ke.current,de)};(0,d.useImperativeHandle)(E,function(){return{focus:Xe,blur:function(){var de;(de=Ke.current)===null||de===void 0||de.blur()},setSelectionRange:function(de,ue,ae){var G;(G=Ke.current)===null||G===void 0||G.setSelectionRange(de,ue,ae)},select:function(){var de;(de=Ke.current)===null||de===void 0||de.select()},input:Ke.current}}),(0,d.useEffect)(function(){Re(function(xe){return xe&&pe?!1:xe})},[pe]);var Ne=function(de){g.value===void 0&&ke(de.target.value),Ke.current&&(0,r.rJ)(Ke.current,de,v)},Fe=function(de){O&&de.key==="Enter"&&O(de),R==null||R(de)},De=function(de){Re(!0),S==null||S(de)},Ie=function(de){Re(!1),k==null||k(de)},te=function(de){ke(""),Xe(),Ke.current&&(0,r.rJ)(Ke.current,de,v)},ne=function(){var de=(0,s.Z)(g,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return d.createElement("input",(0,_.Z)({autoComplete:C},de,{onChange:Ne,onFocus:De,onBlur:Ie,onKeyDown:Fe,className:u()(N,(0,m.Z)({},"".concat(N,"-disabled"),pe),ce==null?void 0:ce.input),style:ye==null?void 0:ye.input,ref:Ke,size:Z,type:X}))},Ee=function(){var de=Number(L)>0;if(K||I){var ue=(0,r.D7)(he),ae=(0,t.Z)(ue).length,G=(0,h.Z)(I)==="object"?I.formatter({value:ue,count:ae,maxLength:L}):"".concat(ae).concat(de?" / ".concat(L):"");return d.createElement(d.Fragment,null,!!I&&d.createElement("span",{className:u()("".concat(N,"-show-count-suffix"),(0,m.Z)({},"".concat(N,"-show-count-has-suffix"),!!K),ce==null?void 0:ce.count),style:(0,x.Z)({},ye==null?void 0:ye.count)},G),K)}return null};return d.createElement(a,(0,_.Z)({},Le,{prefixCls:N,className:le,inputElement:ne(),handleReset:te,value:(0,r.D7)(he),focused:Me,triggerFocus:Xe,suffix:Ee(),disabled:pe,classes:Q,classNames:ce,styles:ye}))}),y=p,b=y},5643:function(Te,D,c){"use strict";c.d(D,{D7:function(){return o},He:function(){return _},X3:function(){return x},nH:function(){return h},rJ:function(){return m}});function _(u){return!!(u.addonBefore||u.addonAfter)}function x(u){return!!(u.prefix||u.suffix||u.allowClear)}function m(u,d,r,i){if(r){var a=d;if(d.type==="click"){var t=u.cloneNode(!0);a=Object.create(d,{target:{value:t},currentTarget:{value:t}}),t.value="",r(a);return}if(i!==void 0){a=Object.create(d,{target:{value:u},currentTarget:{value:u}}),u.value=i,r(a);return}r(a)}}function h(u,d){if(u){u.focus(d);var r=d||{},i=r.cursor;if(i){var a=u.value.length;switch(i){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(a,a);break;default:u.setSelectionRange(0,a)}}}}function o(u){return typeof u=="undefined"||u===null?"":String(u)}},9296:function(Te,D,c){"use strict";c.r(D),c.d(D,{ResizableTextArea:function(){return U},default:function(){return K}});var _=c(5016),x=c(20049),m=c(18082),h=c(10928),o=c(52456),u=c(5883),d=c(92393),r=c(92310),i=c.n(r),a=c(93681),t=c(5643),f=c(18929),e=c(59301),n=c(29301),s=c(34280),l=c(16089),p=`
|
|
|
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;
|
|
|
`,y=["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"],b={},g;function E(I){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=I.getAttribute("id")||I.getAttribute("data-reactid")||I.getAttribute("name");if(z&&b[X])return b[X];var Q=window.getComputedStyle(I),ce=Q.getPropertyValue("box-sizing")||Q.getPropertyValue("-moz-box-sizing")||Q.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(Q.getPropertyValue("padding-bottom"))+parseFloat(Q.getPropertyValue("padding-top")),Le=parseFloat(Q.getPropertyValue("border-bottom-width"))+parseFloat(Q.getPropertyValue("border-top-width")),Se=y.map(function(he){return"".concat(he,":").concat(Q.getPropertyValue(he))}).join(";"),ie={sizingStyle:Se,paddingSize:ye,borderSize:Le,boxSizing:ce};return z&&X&&(b[X]=ie),ie}function C(I){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;g||(g=document.createElement("textarea"),g.setAttribute("tab-index","-1"),g.setAttribute("aria-hidden","true"),document.body.appendChild(g)),I.getAttribute("wrap")?g.setAttribute("wrap",I.getAttribute("wrap")):g.removeAttribute("wrap");var ce=E(I,z),ye=ce.paddingSize,Le=ce.borderSize,Se=ce.boxSizing,ie=ce.sizingStyle;g.setAttribute("style","".concat(ie,";").concat(p)),g.value=I.value||I.placeholder||"";var he=void 0,ke=void 0,Ae,Oe=g.scrollHeight;if(Se==="border-box"?Oe+=Le:Se==="content-box"&&(Oe-=ye),X!==null||Q!==null){g.value=" ";var Me=g.scrollHeight-ye;X!==null&&(he=Me*X,Se==="border-box"&&(he=he+ye+Le),Oe=Math.max(he,Oe)),Q!==null&&(ke=Me*Q,Se==="border-box"&&(ke=ke+ye+Le),Ae=Oe>ke?"":"hidden",Oe=Math.min(ke,Oe))}var Re={height:Oe,overflowY:Ae,resize:"none"};return he&&(Re.minHeight=he),ke&&(Re.maxHeight=ke),Re}var v=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],S=0,k=1,O=2,R=e.forwardRef(function(I,z){var X=I,Q=X.prefixCls,ce=X.onPressEnter,ye=X.defaultValue,Le=X.value,Se=X.autoSize,ie=X.onResize,he=X.className,ke=X.style,Ae=X.disabled,Oe=X.onChange,Me=X.onInternalAutoSize,Re=(0,u.Z)(X,v),Ke=(0,f.Z)(ye,{value:Le,postState:function(B){return B!=null?B:""}}),Xe=(0,o.Z)(Ke,2),Ne=Xe[0],Fe=Xe[1],De=function(B){Fe(B.target.value),Oe==null||Oe(B)},Ie=e.useRef();e.useImperativeHandle(z,function(){return{textArea:Ie.current}});var te=e.useMemo(function(){return Se&&(0,h.Z)(Se)==="object"?[Se.minRows,Se.maxRows]:[]},[Se]),ne=(0,o.Z)(te,2),Ee=ne[0],xe=ne[1],de=!!Se,ue=function(){try{if(document.activeElement===Ie.current){var B=Ie.current,re=B.selectionStart,M=B.selectionEnd,fe=B.scrollTop;Ie.current.setSelectionRange(re,M),Ie.current.scrollTop=fe}}catch(Ce){}},ae=e.useState(O),G=(0,o.Z)(ae,2),F=G[0],H=G[1],T=e.useState(),V=(0,o.Z)(T,2),_e=V[0],be=V[1],j=function(){H(S)};(0,s.Z)(function(){de&&j()},[Le,Ee,xe,de]),(0,s.Z)(function(){if(F===S)H(k);else if(F===k){var oe=C(Ie.current,!1,Ee,xe);H(O),be(oe)}else ue()},[F]);var A=e.useRef(),$=function(){l.Z.cancel(A.current)},Y=function(B){F===O&&(ie==null||ie(B),Se&&($(),A.current=(0,l.Z)(function(){j()})))};e.useEffect(function(){return $},[]);var se=de?_e:null,ve=(0,x.Z)((0,x.Z)({},ke),se);return(F===S||F===k)&&(ve.overflowY="hidden",ve.overflowX="hidden"),e.createElement(n.Z,{onResize:Y,disabled:!(Se||ie)},e.createElement("textarea",(0,_.Z)({},Re,{ref:Ie,style:ve,className:i()(Q,he,(0,m.Z)({},"".concat(Q,"-disabled"),Ae)),disabled:Ae,value:Ne,onChange:De})))}),U=R,N=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function pe(I,z){return(0,d.Z)(I||"").slice(0,z).join("")}function Z(I,z,X,Q){var ce=X;return I?ce=pe(X,Q):(0,d.Z)(z||"").length<X.length&&(0,d.Z)(X||"").length>Q&&(ce=z),ce}var le=e.forwardRef(function(I,z){var X,Q=I.defaultValue,ce=I.value,ye=I.onFocus,Le=I.onBlur,Se=I.onChange,ie=I.allowClear,he=I.maxLength,ke=I.onCompositionStart,Ae=I.onCompositionEnd,Oe=I.suffix,Me=I.prefixCls,Re=Me===void 0?"rc-textarea":Me,Ke=I.classes,Xe=I.showCount,Ne=I.className,Fe=I.style,De=I.disabled,Ie=I.hidden,te=I.classNames,ne=I.styles,Ee=I.onResize,xe=(0,u.Z)(I,N),de=(0,f.Z)(Q,{value:ce,defaultValue:Q}),ue=(0,o.Z)(de,2),ae=ue[0],G=ue[1],F=(0,e.useRef)(null),H=e.useState(!1),T=(0,o.Z)(H,2),V=T[0],_e=T[1],be=e.useState(!1),j=(0,o.Z)(be,2),A=j[0],$=j[1],Y=e.useRef(),se=e.useRef(0),ve=e.useState(null),oe=(0,o.Z)(ve,2),B=oe[0],re=oe[1],M=function(){var Pe;(Pe=F.current)===null||Pe===void 0||Pe.textArea.focus()};(0,e.useImperativeHandle)(z,function(){return{resizableTextArea:F.current,focus:M,blur:function(){var Pe;(Pe=F.current)===null||Pe===void 0||Pe.textArea.blur()}}}),(0,e.useEffect)(function(){_e(function(je){return!De&&je})},[De]);var fe=Number(he)>0,Ce=function(Pe){$(!0),Y.current=ae,se.current=Pe.currentTarget.selectionStart,ke==null||ke(Pe)},w=function(Pe){$(!1);var We=Pe.currentTarget.value;if(fe){var Ze,Qe=se.current>=he+1||se.current===((Ze=Y.current)===null||Ze===void 0?void 0:Ze.length);We=Z(Qe,Y.current,We,he)}We!==ae&&(G(We),(0,t.rJ)(Pe.currentTarget,Pe,Se,We)),Ae==null||Ae(Pe)},ee=function(Pe){var We=Pe.target.value;if(!A&&fe){var Ze=Pe.target.selectionStart>=he+1||Pe.target.selectionStart===We.length||!Pe.target.selectionStart;We=Z(Ze,ae,We,he)}G(We),(0,t.rJ)(Pe.currentTarget,Pe,Se,We)},q=function(Pe){var We=xe.onPressEnter,Ze=xe.onKeyDown;Pe.key==="Enter"&&We&&We(Pe),Ze==null||Ze(Pe)},P=function(Pe){_e(!0),ye==null||ye(Pe)},W=function(Pe){_e(!1),Le==null||Le(Pe)},J=function(Pe){var We;G(""),M(),(0,t.rJ)((We=F.current)===null||We===void 0?void 0:We.textArea,Pe,Se)},we=(0,t.D7)(ae);!A&&fe&&ce==null&&(we=pe(we,he));var me=Oe,ge;if(Xe){var He=(0,d.Z)(we).length;(0,h.Z)(Xe)==="object"?ge=Xe.formatter({value:we,count:He,maxLength:he}):ge="".concat(He).concat(fe?" / ".concat(he):""),me=e.createElement(e.Fragment,null,me,e.createElement("span",{className:i()("".concat(Re,"-data-count"),te==null?void 0:te.count),style:ne==null?void 0:ne.count},ge))}var ze=function(Pe){var We;Ee==null||Ee(Pe),(We=F.current)!==null&&We!==void 0&&We.textArea.style.height&&re(!0)},Ue=!xe.autoSize&&!Xe&&!ie,Be=e.createElement(a.BaseInput,{value:we,allowClear:ie,handleReset:J,suffix:me,prefixCls:Re,classes:{affixWrapper:i()(Ke==null?void 0:Ke.affixWrapper,(X={},(0,m.Z)(X,"".concat(Re,"-show-count"),Xe),(0,m.Z)(X,"".concat(Re,"-textarea-allow-clear"),ie),X))},disabled:De,focused:V,className:Ne,style:(0,x.Z)((0,x.Z)({},Fe),B&&!Ue?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ge=="string"?ge:void 0}},hidden:Ie,inputElement:e.createElement(U,(0,_.Z)({},xe,{onKeyDown:q,onChange:ee,onFocus:P,onBlur:W,onCompositionStart:Ce,onCompositionEnd:w,className:te==null?void 0:te.textarea,style:(0,x.Z)((0,x.Z)({},ne==null?void 0:ne.textarea),{},{resize:Fe==null?void 0:Fe.resize}),disabled:De,prefixCls:Re,onResize:ze,ref:F}))});return Be}),L=le,K=L},34376:function(Te){(function(D,c){if(1)Te.exports=c();else var _,x})(window,function(){return function(D){var c={};function _(x){if(c[x])return c[x].exports;var m=c[x]={i:x,l:!1,exports:{}};return D[x].call(m.exports,m,m.exports,_),m.l=!0,m.exports}return _.m=D,_.c=c,_.d=function(x,m,h){_.o(x,m)||Object.defineProperty(x,m,{enumerable:!0,get:h})},_.r=function(x){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(x,"__esModule",{value:!0})},_.t=function(x,m){if(1&m&&(x=_(x)),8&m||4&m&&typeof x=="object"&&x&&x.__esModule)return x;var h=Object.create(null);if(_.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:x}),2&m&&typeof x!="string")for(var o in x)_.d(h,o,function(u){return x[u]}.bind(null,o));return h},_.n=function(x){var m=x&&x.__esModule?function(){return x.default}:function(){return x};return _.d(m,"a",m),m},_.o=function(x,m){return Object.prototype.hasOwnProperty.call(x,m)},_.p="",_(_.s=34)}([function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.forwardEvent=c.EventEmitter=void 0;var x=function(){function m(){this._listeners=[],this._disposed=!1}return Object.defineProperty(m.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(o){return h._listeners.push(o),{dispose:function(){if(!h._disposed){for(var u=0;u<h._listeners.length;u++)if(h._listeners[u]===o)return void h._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),m.prototype.fire=function(h,o){for(var u=[],d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(d=0;d<u.length;d++)u[d].call(void 0,h,o)},m.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},m}();c.EventEmitter=x,c.forwardEvent=function(m,h){return m(function(o){return h.fire(o)})}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.IUnicodeService=c.IOptionsService=c.ILogService=c.IInstantiationService=c.IDirtyRowService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;var x=_(14);c.IBufferService=x.createDecorator("BufferService"),c.ICoreMouseService=x.createDecorator("CoreMouseService"),c.ICoreService=x.createDecorator("CoreService"),c.ICharsetService=x.createDecorator("CharsetService"),c.IDirtyRowService=x.createDecorator("DirtyRowService"),c.IInstantiationService=x.createDecorator("InstantiationService"),c.ILogService=x.createDecorator("LogService"),c.IOptionsService=x.createDecorator("OptionsService"),c.IUnicodeService=x.createDecorator("UnicodeService")},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.Disposable=void 0;var x=function(){function h(){this._disposables=[],this._isDisposed=!1}return h.prototype.dispose=function(){this._isDisposed=!0;for(var o=0,u=this._disposables;o<u.length;o++)u[o].dispose();this._disposables.length=0},h.prototype.register=function(o){return this._disposables.push(o),o},h.prototype.unregister=function(o){var u=this._disposables.indexOf(o);u!==-1&&this._disposables.splice(u,1)},h}();function m(h){for(var o=0,u=h;o<u.length;o++)u[o].dispose();h.length=0}c.Disposable=x,c.disposeArray=m,c.getDisposeArrayDisposable=function(h){return{dispose:function(){return m(h)}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=256,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(r,i){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,i)},function(r,i){function a(){this.constructor=r}x(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;var h=_(8),o=_(3),u=_(6),d=function(r){function i(){var a=r!==null&&r.apply(this,arguments)||this;return a.content=0,a.fg=0,a.bg=0,a.extended=new u.ExtendedAttrs,a.combinedData="",a}return m(i,r),i.fromCharData=function(a){var t=new i;return t.setFromCharData(a),t},i.prototype.isCombined=function(){return 2097152&this.content},i.prototype.getWidth=function(){return this.content>>22},i.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?h.stringFromCodePoint(2097151&this.content):""},i.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},i.prototype.setFromCharData=function(a){this.fg=a[o.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(a[o.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(a[o.CHAR_DATA_CHAR_INDEX].length===2){var f=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=f&&f<=56319){var e=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(f-55296)+e-56320+65536|a[o.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[o.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=a[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[o.CHAR_DATA_WIDTH_INDEX]<<22)},i.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},i}(u.AttributeData);c.CellData=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ISoundService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;var x=_(14);c.ICharSizeService=x.createDecorator("CharSizeService"),c.ICoreBrowserService=x.createDecorator("CoreBrowserService"),c.IMouseService=x.createDecorator("MouseService"),c.IRenderService=x.createDecorator("RenderService"),c.ISelectionService=x.createDecorator("SelectionService"),c.ISoundService=x.createDecorator("SoundService")},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;var x=function(){function h(){this.fg=0,this.bg=0,this.extended=new m}return h.toColorRGB=function(o){return[o>>>16&255,o>>>8&255,255&o]},h.fromColorRGB=function(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]},h.prototype.clone=function(){var o=new h;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o},h.prototype.isInverse=function(){return 67108864&this.fg},h.prototype.isBold=function(){return 134217728&this.fg},h.prototype.isUnderline=function(){return 268435456&this.fg},h.prototype.isBlink=function(){return 536870912&this.fg},h.prototype.isInvisible=function(){return 1073741824&this.fg},h.prototype.isItalic=function(){return 67108864&this.bg},h.prototype.isDim=function(){return 134217728&this.bg},h.prototype.getFgColorMode=function(){return 50331648&this.fg},h.prototype.getBgColorMode=function(){return 50331648&this.bg},h.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},h.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},h.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},h.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},h.prototype.isFgDefault=function(){return(50331648&this.fg)==0},h.prototype.isBgDefault=function(){return(50331648&this.bg)==0},h.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},h.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},h.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},h.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},h.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},h.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},h.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},h.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},h.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},h.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},h.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},h}();c.AttributeData=x;var m=function(){function h(o,u){o===void 0&&(o=0),u===void 0&&(u=-1),this.underlineStyle=o,this.underlineColor=u}return h.prototype.clone=function(){return new h(this.underlineStyle,this.underlineColor)},h.prototype.isEmpty=function(){return this.underlineStyle===0},h}();c.ExtendedAttrs=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(x,m,h,o){x.addEventListener(m,h,o);var u=!1;return{dispose:function(){u||(u=!0,x.removeEventListener(m,h,o))}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},c.utf32ToString=function(h,o,u){o===void 0&&(o=0),u===void 0&&(u=h.length);for(var d="",r=o;r<u;++r){var i=h[r];i>65535?(i-=65536,d+=String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):d+=String.fromCharCode(i)}return d};var x=function(){function h(){this._interim=0}return h.prototype.clear=function(){this._interim=0},h.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r=0,i=0;this._interim&&(56320<=(f=o.charCodeAt(i++))&&f<=57343?u[r++]=1024*(this._interim-55296)+f-56320+65536:(u[r++]=this._interim,u[r++]=f),this._interim=0);for(var a=i;a<d;++a){var t=o.charCodeAt(a);if(55296<=t&&t<=56319){if(++a>=d)return this._interim=t,r;var f;56320<=(f=o.charCodeAt(a))&&f<=57343?u[r++]=1024*(t-55296)+f-56320+65536:(u[r++]=t,u[r++]=f)}else u[r++]=t}return r},h}();c.StringToUtf32=x;var m=function(){function h(){this.interim=new Uint8Array(3)}return h.prototype.clear=function(){this.interim.fill(0)},h.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r,i,a,t,f=0,e=0,n=0;if(this.interim[0]){var s=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;for(var p=0,y=void 0;(y=63&this.interim[++p])&&p<4;)l<<=6,l|=y;for(var b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,g=b-p;n<g;){if(n>=d)return 0;if((192&(y=o[n++]))!=128){n--,s=!0;break}this.interim[p++]=y,l<<=6,l|=63&y}s||(b===2?l<128?n--:u[f++]=l:b===3?l<2048||l>=55296&&l<=57343||(u[f++]=l):l<65536||l>1114111||(u[f++]=l)),this.interim.fill(0)}for(var E=d-4,C=n;C<d;){for(;!(!(C<E)||128&(r=o[C])||128&(i=o[C+1])||128&(a=o[C+2])||128&(t=o[C+3]));)u[f++]=r,u[f++]=i,u[f++]=a,u[f++]=t,C+=4;if((r=o[C++])<128)u[f++]=r;else if((224&r)==192){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if((e=(31&r)<<6|63&i)<128){C--;continue}u[f++]=e}else if((240&r)==224){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,f;if((192&(a=o[C++]))!=128){C--;continue}if((e=(15&r)<<12|(63&i)<<6|63&a)<2048||e>=55296&&e<=57343)continue;u[f++]=e}else if((248&r)==240){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,f;if((192&(a=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=a,f;if((192&(t=o[C++]))!=128){C--;continue}if((e=(7&r)<<18|(63&i)<<12|(63&a)<<6|63&t)<65536||e>1114111)continue;u[f++]=e}}return f},h}();c.Utf8ToUtf32=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR_ATLAS_CELL_SPACING=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0,c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.CHAR_ATLAS_CELL_SPACING=1},function(D,c,_){"use strict";var x,m,h,o;function u(r){var i=r.toString(16);return i.length<2?"0"+i:i}function d(r,i){return r<i?(i+.05)/(r+.05):(r+.05)/(i+.05)}Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=void 0,function(r){r.toCss=function(i,a,t,f){return f!==void 0?"#"+u(i)+u(a)+u(t)+u(f):"#"+u(i)+u(a)+u(t)},r.toRgba=function(i,a,t,f){return f===void 0&&(f=255),(i<<24|a<<16|t<<8|f)>>>0}}(x=c.channels||(c.channels={})),(m=c.color||(c.color={})).blend=function(r,i){var a=(255&i.rgba)/255;if(a===1)return{css:i.css,rgba:i.rgba};var t=i.rgba>>24&255,f=i.rgba>>16&255,e=i.rgba>>8&255,n=r.rgba>>24&255,s=r.rgba>>16&255,l=r.rgba>>8&255,p=n+Math.round((t-n)*a),y=s+Math.round((f-s)*a),b=l+Math.round((e-l)*a);return{css:x.toCss(p,y,b),rgba:x.toRgba(p,y,b)}},m.isOpaque=function(r){return(255&r.rgba)==255},m.ensureContrastRatio=function(r,i,a){var t=o.ensureContrastRatio(r.rgba,i.rgba,a);if(t)return o.toColor(t>>24&255,t>>16&255,t>>8&255)},m.opaque=function(r){var i=(255|r.rgba)>>>0,a=o.toChannels(i),t=a[0],f=a[1],e=a[2];return{css:x.toCss(t,f,e),rgba:i}},m.opacity=function(r,i){var a=Math.round(255*i),t=o.toChannels(r.rgba),f=t[0],e=t[1],n=t[2];return{css:x.toCss(f,e,n,a),rgba:x.toRgba(f,e,n,a)}},(c.css||(c.css={})).toColor=function(r){switch(r.length){case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(r){function i(a,t,f){var e=a/255,n=t/255,s=f/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}r.relativeLuminance=function(a){return i(a>>16&255,a>>8&255,255&a)},r.relativeLuminance2=i}(h=c.rgb||(c.rgb={})),function(r){function i(t,f,e){for(var n=t>>24&255,s=t>>16&255,l=t>>8&255,p=f>>24&255,y=f>>16&255,b=f>>8&255,g=d(h.relativeLuminance2(p,b,y),h.relativeLuminance2(n,s,l));g<e&&(p>0||y>0||b>0);)p-=Math.max(0,Math.ceil(.1*p)),y-=Math.max(0,Math.ceil(.1*y)),b-=Math.max(0,Math.ceil(.1*b)),g=d(h.relativeLuminance2(p,b,y),h.relativeLuminance2(n,s,l));return(p<<24|y<<16|b<<8|255)>>>0}function a(t,f,e){for(var n=t>>24&255,s=t>>16&255,l=t>>8&255,p=f>>24&255,y=f>>16&255,b=f>>8&255,g=d(h.relativeLuminance2(p,b,y),h.relativeLuminance2(n,s,l));g<e&&(p<255||y<255||b<255);)p=Math.min(255,p+Math.ceil(.1*(255-p))),y=Math.min(255,y+Math.ceil(.1*(255-y))),b=Math.min(255,b+Math.ceil(.1*(255-b))),g=d(h.relativeLuminance2(p,b,y),h.relativeLuminance2(n,s,l));return(p<<24|y<<16|b<<8|255)>>>0}r.ensureContrastRatio=function(t,f,e){var n=h.relativeLuminance(t>>8),s=h.relativeLuminance(f>>8);if(d(n,s)<e)return s<n?i(t,f,e):a(t,f,e)},r.reduceLuminance=i,r.increaseLuminance=a,r.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},r.toColor=function(t,f,e){return{css:x.toCss(t,f,e),rgba:x.toRgba(t,f,e)}}}(o=c.rgba||(c.rgba={})),c.toPaddedHex=u,c.contrastRatio=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.isSafari=c.isFirefox=void 0;var x=typeof navigator=="undefined",m=x?"node":navigator.userAgent,h=x?"node":navigator.platform;function o(u,d){return u.indexOf(d)>=0}c.isFirefox=!!~m.indexOf("Firefox"),c.isSafari=/^((?!chrome|android).)*safari/i.test(m),c.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],h),c.isIpad=h==="iPad",c.isIphone=h==="iPhone",c.isWindows=o(["Windows","Win16","Win32","WinCE"],h),c.isLinux=h.indexOf("Linux")>=0},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.C1=c.C0=void 0,function(x){x.NUL="\0",x.SOH="",x.STX="",x.ETX="",x.EOT="",x.ENQ="",x.ACK="",x.BEL="\x07",x.BS="\b",x.HT=" ",x.LF=`
|
|
|
`,x.VT="\v",x.FF="\f",x.CR="\r",x.SO="",x.SI="",x.DLE="",x.DC1="",x.DC2="",x.DC3="",x.DC4="",x.NAK="",x.SYN="",x.ETB="",x.CAN="",x.EM="",x.SUB="",x.ESC="\x1B",x.FS="",x.GS="",x.RS="",x.US="",x.SP=" ",x.DEL="\x7F"}(c.C0||(c.C0={})),function(x){x.PAD="\x80",x.HOP="\x81",x.BPH="\x82",x.NBH="\x83",x.IND="\x84",x.NEL="\x85",x.SSA="\x86",x.ESA="\x87",x.HTS="\x88",x.HTJ="\x89",x.VTS="\x8A",x.PLD="\x8B",x.PLU="\x8C",x.RI="\x8D",x.SS2="\x8E",x.SS3="\x8F",x.DCS="\x90",x.PU1="\x91",x.PU2="\x92",x.STS="\x93",x.CCH="\x94",x.MW="\x95",x.SPA="\x96",x.EPA="\x97",x.SOS="\x98",x.SGCI="\x99",x.SCI="\x9A",x.CSI="\x9B",x.ST="\x9C",x.OSC="\x9D",x.PM="\x9E",x.APC="\x9F"}(c.C1||(c.C1={}))},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BaseRenderLayer=void 0;var x=_(3),m=_(9),h=_(25),o=_(6),u=_(28),d=_(10),r=_(17),i=function(){function a(t,f,e,n,s,l,p,y){this._container=t,this._alpha=n,this._colors=s,this._rendererId=l,this._bufferService=p,this._optionsService=y,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-"+f+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return a.prototype.dispose=function(){var t;r.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,f){},a.prototype.onSelectionChanged=function(t,f,e){e===void 0&&(e=!1)},a.prototype.setColors=function(t){this._refreshCharAtlas(t)},a.prototype._setTransparency=function(t){if(t!==this._alpha){var f=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,f),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},a.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=h.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},a.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},a.prototype._fillCells=function(t,f,e,n){this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,n*this._scaledCellHeight)},a.prototype._fillBottomLineAtCells=function(t,f,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(f+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},a.prototype._fillLeftLineAtCell=function(t,f,e){this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},a.prototype._strokeRectAtCell=function(t,f,e,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,f*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,n*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,f,e,n){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,n*this._scaledCellHeight))},a.prototype._fillCharTrueColor=function(t,f,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},a.prototype._drawChars=function(t,f,e){var n,s,l=this._getContrastColor(t);l||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,f,e,l):(t.isInverse()?(n=t.isBgDefault()?m.INVERTED_DEFAULT_COLOR:t.getBgColor(),s=t.isFgDefault()?m.INVERTED_DEFAULT_COLOR:t.getFgColor()):(s=t.isBgDefault()?x.DEFAULT_COLOR:t.getBgColor(),n=t.isFgDefault()?x.DEFAULT_COLOR:t.getFgColor()),n+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&n<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||x.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||x.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=s,this._currentGlyphIdentifier.fg=n,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,f*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,f,e))},a.prototype._drawUncachedChars=function(t,f,e,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(n)this._ctx.fillStyle=n.css;else if(t.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var s=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&s<8&&(s+=8),this._ctx.fillStyle=this._colors.ansi[s].css}else if(n)this._ctx.fillStyle=n.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+o.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=m.DIM_OPACITY),this._ctx.fillText(t.getChars(),f*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,f){return(f?"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 f=this._colors.contrastCache.getColor(t.bg,t.fg);if(f!==void 0)return f||void 0;var e=t.getFgColor(),n=t.getFgColorMode(),s=t.getBgColor(),l=t.getBgColorMode(),p=!!t.isInverse(),y=!!t.isInverse();if(p){var b=e;e=s,s=b;var g=n;n=l,l=g}var E=this._resolveBackgroundRgba(l,s,p),C=this._resolveForegroundRgba(n,e,p,y),v=d.rgba.ensureContrastRatio(E,C,this._optionsService.options.minimumContrastRatio);if(v){var S={css:d.channels.toCss(v>>24&255,v>>16&255,v>>8&255),rgba:v};return this._colors.contrastCache.setColor(t.bg,t.fg,S),S}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},a.prototype._resolveBackgroundRgba=function(t,f,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},a.prototype._resolveForegroundRgba=function(t,f,e,n){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&n&&f<8&&(f+=8),this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},a}();c.BaseRenderLayer=i},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;function x(m,h,o){h.di$target===h?h.di$dependencies.push({id:m,index:o}):(h.di$dependencies=[{id:m,index:o}],h.di$target=h)}c.serviceRegistry=new Map,c.getServiceDependencies=function(m){return m.di$dependencies||[]},c.createDecorator=function(m){if(c.serviceRegistry.has(m))return c.serviceRegistry.get(m);var h=function(o,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");x(h,o,d)};return h.toString=function(){return m},c.serviceRegistry.set(m,h),h}},function(D,c,_){"use strict";function x(m,h,o,u){if(o===void 0&&(o=0),u===void 0&&(u=m.length),o>=m.length)return m;o=(m.length+o)%m.length,u=u>=m.length?m.length:(m.length+u)%m.length;for(var d=o;d<u;++d)m[d]=h;return m}Object.defineProperty(c,"__esModule",{value:!0}),c.concat=c.fillFallback=c.fill=void 0,c.fill=function(m,h,o,u){return m.fill?m.fill(h,o,u):x(m,h,o,u)},c.fillFallback=x,c.concat=function(m,h){var o=new m.constructor(m.length+h.length);return o.set(m),o.set(h,m.length),o}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;var x=_(8),m=_(3),h=_(4),o=_(6);c.DEFAULT_ATTR_DATA=Object.freeze(new o.AttributeData);var u=function(){function d(r,i,a){a===void 0&&(a=!1),this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);for(var t=i||h.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]),f=0;f<r;++f)this.setCell(f,t);this.length=r}return d.prototype.get=function(r){var i=this._data[3*r+0],a=2097151&i;return[this._data[3*r+1],2097152&i?this._combined[r]:a?x.stringFromCodePoint(a):"",i>>22,2097152&i?this._combined[r].charCodeAt(this._combined[r].length-1):a]},d.prototype.set=function(r,i){this._data[3*r+1]=i[m.CHAR_DATA_ATTR_INDEX],i[m.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=i[1],this._data[3*r+0]=2097152|r|i[m.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=i[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|i[m.CHAR_DATA_WIDTH_INDEX]<<22},d.prototype.getWidth=function(r){return this._data[3*r+0]>>22},d.prototype.hasWidth=function(r){return 12582912&this._data[3*r+0]},d.prototype.getFg=function(r){return this._data[3*r+1]},d.prototype.getBg=function(r){return this._data[3*r+2]},d.prototype.hasContent=function(r){return 4194303&this._data[3*r+0]},d.prototype.getCodePoint=function(r){var i=this._data[3*r+0];return 2097152&i?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&i},d.prototype.isCombined=function(r){return 2097152&this._data[3*r+0]},d.prototype.getString=function(r){var i=this._data[3*r+0];return 2097152&i?this._combined[r]:2097151&i?x.stringFromCodePoint(2097151&i):""},d.prototype.loadCell=function(r,i){var a=3*r;return i.content=this._data[a+0],i.fg=this._data[a+1],i.bg=this._data[a+2],2097152&i.content&&(i.combinedData=this._combined[r]),268435456&i.bg&&(i.extended=this._extendedAttrs[r]),i},d.prototype.setCell=function(r,i){2097152&i.content&&(this._combined[r]=i.combinedData),268435456&i.bg&&(this._extendedAttrs[r]=i.extended),this._data[3*r+0]=i.content,this._data[3*r+1]=i.fg,this._data[3*r+2]=i.bg},d.prototype.setCellFromCodePoint=function(r,i,a,t,f,e){268435456&f&&(this._extendedAttrs[r]=e),this._data[3*r+0]=i|a<<22,this._data[3*r+1]=t,this._data[3*r+2]=f},d.prototype.addCodepointToCell=function(r,i){var a=this._data[3*r+0];2097152&a?this._combined[r]+=x.stringFromCodePoint(i):(2097151&a?(this._combined[r]=x.stringFromCodePoint(2097151&a)+x.stringFromCodePoint(i),a&=-2097152,a|=2097152):a=i|1<<22,this._data[3*r+0]=a)},d.prototype.insertCells=function(r,i,a,t){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs),i<this.length-r){for(var f=new h.CellData,e=this.length-r-i-1;e>=0;--e)this.setCell(r+i+e,this.loadCell(r+e,f));for(e=0;e<i;++e)this.setCell(r+e,a)}else for(e=r;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 o.ExtendedAttrs)},d.prototype.deleteCells=function(r,i,a,t){if(r%=this.length,i<this.length-r){for(var f=new h.CellData,e=0;e<this.length-r-i;++e)this.setCell(r+e,this.loadCell(r+i+e,f));for(e=this.length-i;e<this.length;++e)this.setCell(e,a)}else for(e=r;e<this.length;++e)this.setCell(e,a);r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodePoint(r,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs)},d.prototype.replaceCells=function(r,i,a,t){for(r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs),i<this.length&&this.getWidth(i-1)===2&&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 o.ExtendedAttrs);r<i&&r<this.length;)this.setCell(r++,a)},d.prototype.resize=function(r,i){if(r!==this.length){if(r>this.length){var a=new Uint32Array(3*r);this.length&&(3*r<this._data.length?a.set(this._data.subarray(0,3*r)):a.set(this._data)),this._data=a;for(var t=this.length;t<r;++t)this.setCell(t,i)}else if(r){(a=new Uint32Array(3*r)).set(this._data.subarray(0,3*r)),this._data=a;var f=Object.keys(this._combined);for(t=0;t<f.length;t++){var e=parseInt(f[t],10);e>=r&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=r}},d.prototype.fill=function(r){this._combined={},this._extendedAttrs={};for(var i=0;i<this.length;++i)this.setCell(i,r)},d.prototype.copyFrom=function(r){for(var i in this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={},r._combined)this._combined[i]=r._combined[i];for(var i in this._extendedAttrs={},r._extendedAttrs)this._extendedAttrs[i]=r._extendedAttrs[i];this.isWrapped=r.isWrapped},d.prototype.clone=function(){var r=new d(0);for(var i in r._data=new Uint32Array(this._data),r.length=this.length,this._combined)r._combined[i]=this._combined[i];for(var i in this._extendedAttrs)r._extendedAttrs[i]=this._extendedAttrs[i];return r.isWrapped=this.isWrapped,r},d.prototype.getTrimmedLength=function(){for(var r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0},d.prototype.copyCellsFrom=function(r,i,a,t,f){var e=r._data;if(f)for(var n=t-1;n>=0;n--)for(var s=0;s<3;s++)this._data[3*(a+n)+s]=e[3*(i+n)+s];else for(n=0;n<t;n++)for(s=0;s<3;s++)this._data[3*(a+n)+s]=e[3*(i+n)+s];var l=Object.keys(r._combined);for(s=0;s<l.length;s++){var p=parseInt(l[s],10);p>=i&&(this._combined[p-i+a]=r._combined[p])}},d.prototype.translateToString=function(r,i,a){r===void 0&&(r=!1),i===void 0&&(i=0),a===void 0&&(a=this.length),r&&(a=Math.min(a,this.getTrimmedLength()));for(var t="";i<a;){var f=this._data[3*i+0],e=2097151&f;t+=2097152&f?this._combined[i]:e?x.stringFromCodePoint(e):m.WHITESPACE_CELL_CHAR,i+=f>>22||1}return t},d}();c.BufferLine=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var x,m=[],h=0;h<arguments.length;h++)m[h]=arguments[h];for(var o=0,u=m;o<u.length;o++){var d=u[o];(x=d==null?void 0:d.parentElement)===null||x===void 0||x.removeChild(d)}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(C,v){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var O in k)k.hasOwnProperty(O)&&(S[O]=k[O])})(C,v)},function(C,v){function S(){this.constructor=C}x(C,v),C.prototype=v===null?Object.create(v):(S.prototype=v.prototype,new S)});Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;var h,o=_(12),u=_(20),d=_(39),r=_(2),i=_(15),a=_(8),t=_(16),f=_(0),e=_(3),n=_(4),s=_(6),l=_(22),p=_(24),y={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function b(C,v){if(C>24)return v.setWinLines||!1;switch(C){case 1:return!!v.restoreWin;case 2:return!!v.minimizeWin;case 3:return!!v.setWinPosition;case 4:return!!v.setWinSizePixels;case 5:return!!v.raiseWin;case 6:return!!v.lowerWin;case 7:return!!v.refreshWin;case 8:return!!v.setWinSizeChars;case 9:return!!v.maximizeWin;case 10:return!!v.fullscreenWin;case 11:return!!v.getWinState;case 13:return!!v.getWinPosition;case 14:return!!v.getWinSizePixels;case 15:return!!v.getScreenSizePixels;case 16:return!!v.getCellSizePixels;case 18:return!!v.getWinSizeChars;case 19:return!!v.getScreenSizeChars;case 20:return!!v.getIconTitle;case 21:return!!v.getWinTitle;case 22:return!!v.pushTitle;case 23:return!!v.popTitle;case 24:return!!v.setWinLines}return!1}(function(C){C[C.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",C[C.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(h=c.WindowsOptionsReportType||(c.WindowsOptionsReportType={}));var g=function(){function C(v,S,k,O){this._bufferService=v,this._coreService=S,this._logService=k,this._optionsService=O,this._data=new Uint32Array(0)}return C.prototype.hook=function(v){this._data=new Uint32Array(0)},C.prototype.put=function(v,S,k){this._data=i.concat(this._data,v.subarray(S,k))},C.prototype.unhook=function(v){if(v){var S=a.utf32ToString(this._data);switch(this._data=new Uint32Array(0),S){case'"q':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r0"q'+o.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r61;1"p'+o.C0.ESC+"\\");case"r":var k=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+k+o.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r0m"+o.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(o.C0.ESC+"P1$r"+O+" q"+o.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",S),this._coreService.triggerDataEvent(o.C0.ESC+"P0$r"+o.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},C}(),E=function(C){function v(S,k,O,R,U,N,pe,Z,le){le===void 0&&(le=new d.EscapeSequenceParser);var L=C.call(this)||this;L._bufferService=S,L._charsetService=k,L._coreService=O,L._dirtyRowService=R,L._logService=U,L._optionsService=N,L._coreMouseService=pe,L._unicodeService=Z,L._parser=le,L._parseBuffer=new Uint32Array(4096),L._stringDecoder=new a.StringToUtf32,L._utf8Decoder=new a.Utf8ToUtf32,L._workCell=new n.CellData,L._windowTitle="",L._iconName="",L._windowTitleStack=[],L._iconNameStack=[],L._curAttrData=t.DEFAULT_ATTR_DATA.clone(),L._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),L._onRequestBell=new f.EventEmitter,L._onRequestRefreshRows=new f.EventEmitter,L._onRequestReset=new f.EventEmitter,L._onRequestScroll=new f.EventEmitter,L._onRequestSyncScrollBar=new f.EventEmitter,L._onRequestWindowsOptionsReport=new f.EventEmitter,L._onA11yChar=new f.EventEmitter,L._onA11yTab=new f.EventEmitter,L._onCursorMove=new f.EventEmitter,L._onLineFeed=new f.EventEmitter,L._onScroll=new f.EventEmitter,L._onTitleChange=new f.EventEmitter,L.register(L._parser),L._parser.setCsiHandlerFallback(function(X,Q){L._logService.debug("Unknown CSI code: ",{identifier:L._parser.identToString(X),params:Q.toArray()})}),L._parser.setEscHandlerFallback(function(X){L._logService.debug("Unknown ESC code: ",{identifier:L._parser.identToString(X)})}),L._parser.setExecuteHandlerFallback(function(X){L._logService.debug("Unknown EXECUTE code: ",{code:X})}),L._parser.setOscHandlerFallback(function(X,Q,ce){L._logService.debug("Unknown OSC code: ",{identifier:X,action:Q,data:ce})}),L._parser.setDcsHandlerFallback(function(X,Q,ce){Q==="HOOK"&&(ce=ce.toArray()),L._logService.debug("Unknown DCS code: ",{identifier:L._parser.identToString(X),action:Q,payload:ce})}),L._parser.setPrintHandler(function(X,Q,ce){return L.print(X,Q,ce)}),L._parser.setCsiHandler({final:"@"},function(X){return L.insertChars(X)}),L._parser.setCsiHandler({intermediates:" ",final:"@"},function(X){return L.scrollLeft(X)}),L._parser.setCsiHandler({final:"A"},function(X){return L.cursorUp(X)}),L._parser.setCsiHandler({intermediates:" ",final:"A"},function(X){return L.scrollRight(X)}),L._parser.setCsiHandler({final:"B"},function(X){return L.cursorDown(X)}),L._parser.setCsiHandler({final:"C"},function(X){return L.cursorForward(X)}),L._parser.setCsiHandler({final:"D"},function(X){return L.cursorBackward(X)}),L._parser.setCsiHandler({final:"E"},function(X){return L.cursorNextLine(X)}),L._parser.setCsiHandler({final:"F"},function(X){return L.cursorPrecedingLine(X)}),L._parser.setCsiHandler({final:"G"},function(X){return L.cursorCharAbsolute(X)}),L._parser.setCsiHandler({final:"H"},function(X){return L.cursorPosition(X)}),L._parser.setCsiHandler({final:"I"},function(X){return L.cursorForwardTab(X)}),L._parser.setCsiHandler({final:"J"},function(X){return L.eraseInDisplay(X)}),L._parser.setCsiHandler({prefix:"?",final:"J"},function(X){return L.eraseInDisplay(X)}),L._parser.setCsiHandler({final:"K"},function(X){return L.eraseInLine(X)}),L._parser.setCsiHandler({prefix:"?",final:"K"},function(X){return L.eraseInLine(X)}),L._parser.setCsiHandler({final:"L"},function(X){return L.insertLines(X)}),L._parser.setCsiHandler({final:"M"},function(X){return L.deleteLines(X)}),L._parser.setCsiHandler({final:"P"},function(X){return L.deleteChars(X)}),L._parser.setCsiHandler({final:"S"},function(X){return L.scrollUp(X)}),L._parser.setCsiHandler({final:"T"},function(X){return L.scrollDown(X)}),L._parser.setCsiHandler({final:"X"},function(X){return L.eraseChars(X)}),L._parser.setCsiHandler({final:"Z"},function(X){return L.cursorBackwardTab(X)}),L._parser.setCsiHandler({final:"`"},function(X){return L.charPosAbsolute(X)}),L._parser.setCsiHandler({final:"a"},function(X){return L.hPositionRelative(X)}),L._parser.setCsiHandler({final:"b"},function(X){return L.repeatPrecedingCharacter(X)}),L._parser.setCsiHandler({final:"c"},function(X){return L.sendDeviceAttributesPrimary(X)}),L._parser.setCsiHandler({prefix:">",final:"c"},function(X){return L.sendDeviceAttributesSecondary(X)}),L._parser.setCsiHandler({final:"d"},function(X){return L.linePosAbsolute(X)}),L._parser.setCsiHandler({final:"e"},function(X){return L.vPositionRelative(X)}),L._parser.setCsiHandler({final:"f"},function(X){return L.hVPosition(X)}),L._parser.setCsiHandler({final:"g"},function(X){return L.tabClear(X)}),L._parser.setCsiHandler({final:"h"},function(X){return L.setMode(X)}),L._parser.setCsiHandler({prefix:"?",final:"h"},function(X){return L.setModePrivate(X)}),L._parser.setCsiHandler({final:"l"},function(X){return L.resetMode(X)}),L._parser.setCsiHandler({prefix:"?",final:"l"},function(X){return L.resetModePrivate(X)}),L._parser.setCsiHandler({final:"m"},function(X){return L.charAttributes(X)}),L._parser.setCsiHandler({final:"n"},function(X){return L.deviceStatus(X)}),L._parser.setCsiHandler({prefix:"?",final:"n"},function(X){return L.deviceStatusPrivate(X)}),L._parser.setCsiHandler({intermediates:"!",final:"p"},function(X){return L.softReset(X)}),L._parser.setCsiHandler({intermediates:" ",final:"q"},function(X){return L.setCursorStyle(X)}),L._parser.setCsiHandler({final:"r"},function(X){return L.setScrollRegion(X)}),L._parser.setCsiHandler({final:"s"},function(X){return L.saveCursor(X)}),L._parser.setCsiHandler({final:"t"},function(X){return L.windowOptions(X)}),L._parser.setCsiHandler({final:"u"},function(X){return L.restoreCursor(X)}),L._parser.setCsiHandler({intermediates:"'",final:"}"},function(X){return L.insertColumns(X)}),L._parser.setCsiHandler({intermediates:"'",final:"~"},function(X){return L.deleteColumns(X)}),L._parser.setExecuteHandler(o.C0.BEL,function(){return L.bell()}),L._parser.setExecuteHandler(o.C0.LF,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.VT,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.FF,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.CR,function(){return L.carriageReturn()}),L._parser.setExecuteHandler(o.C0.BS,function(){return L.backspace()}),L._parser.setExecuteHandler(o.C0.HT,function(){return L.tab()}),L._parser.setExecuteHandler(o.C0.SO,function(){return L.shiftOut()}),L._parser.setExecuteHandler(o.C0.SI,function(){return L.shiftIn()}),L._parser.setExecuteHandler(o.C1.IND,function(){return L.index()}),L._parser.setExecuteHandler(o.C1.NEL,function(){return L.nextLine()}),L._parser.setExecuteHandler(o.C1.HTS,function(){return L.tabSet()}),L._parser.setOscHandler(0,new l.OscHandler(function(X){L.setTitle(X),L.setIconName(X)})),L._parser.setOscHandler(1,new l.OscHandler(function(X){return L.setIconName(X)})),L._parser.setOscHandler(2,new l.OscHandler(function(X){return L.setTitle(X)})),L._parser.setEscHandler({final:"7"},function(){return L.saveCursor()}),L._parser.setEscHandler({final:"8"},function(){return L.restoreCursor()}),L._parser.setEscHandler({final:"D"},function(){return L.index()}),L._parser.setEscHandler({final:"E"},function(){return L.nextLine()}),L._parser.setEscHandler({final:"H"},function(){return L.tabSet()}),L._parser.setEscHandler({final:"M"},function(){return L.reverseIndex()}),L._parser.setEscHandler({final:"="},function(){return L.keypadApplicationMode()}),L._parser.setEscHandler({final:">"},function(){return L.keypadNumericMode()}),L._parser.setEscHandler({final:"c"},function(){return L.fullReset()}),L._parser.setEscHandler({final:"n"},function(){return L.setgLevel(2)}),L._parser.setEscHandler({final:"o"},function(){return L.setgLevel(3)}),L._parser.setEscHandler({final:"|"},function(){return L.setgLevel(3)}),L._parser.setEscHandler({final:"}"},function(){return L.setgLevel(2)}),L._parser.setEscHandler({final:"~"},function(){return L.setgLevel(1)}),L._parser.setEscHandler({intermediates:"%",final:"@"},function(){return L.selectDefaultCharset()}),L._parser.setEscHandler({intermediates:"%",final:"G"},function(){return L.selectDefaultCharset()});var K=function(X){I._parser.setEscHandler({intermediates:"(",final:X},function(){return L.selectCharset("("+X)}),I._parser.setEscHandler({intermediates:")",final:X},function(){return L.selectCharset(")"+X)}),I._parser.setEscHandler({intermediates:"*",final:X},function(){return L.selectCharset("*"+X)}),I._parser.setEscHandler({intermediates:"+",final:X},function(){return L.selectCharset("+"+X)}),I._parser.setEscHandler({intermediates:"-",final:X},function(){return L.selectCharset("-"+X)}),I._parser.setEscHandler({intermediates:".",final:X},function(){return L.selectCharset("."+X)}),I._parser.setEscHandler({intermediates:"/",final:X},function(){return L.selectCharset("/"+X)})},I=this;for(var z in u.CHARSETS)K(z);return L._parser.setEscHandler({intermediates:"#",final:"8"},function(){return L.screenAlignmentPattern()}),L._parser.setErrorHandler(function(X){return L._logService.error("Parsing error: ",X),X}),L._parser.setDcsHandler({intermediates:"$",final:"q"},new g(L._bufferService,L._coreService,L._logService,L._optionsService)),L}return m(v,C),Object.defineProperty(v.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){C.prototype.dispose.call(this)},v.prototype.parse=function(S){var k=this._bufferService.buffer,O=k.x,R=k.y;if(this._logService.debug("parsing data",S),this._parseBuffer.length<S.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(S.length,131072))),this._dirtyRowService.clearRange(),S.length>131072)for(var U=0;U<S.length;U+=131072){var N=U+131072<S.length?U+131072:S.length,pe=typeof S=="string"?this._stringDecoder.decode(S.substring(U,N),this._parseBuffer):this._utf8Decoder.decode(S.subarray(U,N),this._parseBuffer);this._parser.parse(this._parseBuffer,pe)}else pe=typeof S=="string"?this._stringDecoder.decode(S,this._parseBuffer):this._utf8Decoder.decode(S,this._parseBuffer),this._parser.parse(this._parseBuffer,pe);(k=this._bufferService.buffer).x===O&&k.y===R||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},v.prototype.print=function(S,k,O){var R,U,N=this._bufferService.buffer,pe=this._charsetService.charset,Z=this._optionsService.options.screenReaderMode,le=this._bufferService.cols,L=this._coreService.decPrivateModes.wraparound,K=this._coreService.modes.insertMode,I=this._curAttrData,z=N.lines.get(N.ybase+N.y);this._dirtyRowService.markDirty(N.y),N.x&&O-k>0&&z.getWidth(N.x-1)===2&&z.setCellFromCodePoint(N.x-1,0,1,I.fg,I.bg,I.extended);for(var X=k;X<O;++X){if(R=S[X],U=this._unicodeService.wcwidth(R),R<127&&pe){var Q=pe[String.fromCharCode(R)];Q&&(R=Q.charCodeAt(0))}if(Z&&this._onA11yChar.fire(a.stringFromCodePoint(R)),U||!N.x){if(N.x+U-1>=le){if(L){for(;N.x<le;)z.setCellFromCodePoint(N.x++,0,1,I.fg,I.bg,I.extended);N.x=0,N.y++,N.y===N.scrollBottom+1?(N.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(N.y>=this._bufferService.rows&&(N.y=this._bufferService.rows-1),N.lines.get(N.ybase+N.y).isWrapped=!0),z=N.lines.get(N.ybase+N.y)}else if(N.x=le-1,U===2)continue}if(K&&(z.insertCells(N.x,U,N.getNullCell(I),I),z.getWidth(le-1)===2&&z.setCellFromCodePoint(le-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,I.fg,I.bg,I.extended)),z.setCellFromCodePoint(N.x++,R,U,I.fg,I.bg,I.extended),U>0)for(;--U;)z.setCellFromCodePoint(N.x++,0,0,I.fg,I.bg,I.extended)}else z.getWidth(N.x-1)?z.addCodepointToCell(N.x-1,R):z.addCodepointToCell(N.x-2,R)}O-k>0&&(z.loadCell(N.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),N.x<le&&O-k>0&&z.getWidth(N.x)===0&&!z.hasContent(N.x)&&z.setCellFromCodePoint(N.x,0,1,I.fg,I.bg,I.extended),this._dirtyRowService.markDirty(N.y)},v.prototype.addCsiHandler=function(S,k){var O=this;return S.final!=="t"||S.prefix||S.intermediates?this._parser.addCsiHandler(S,k):this._parser.addCsiHandler(S,function(R){return!b(R.params[0],O._optionsService.options.windowOptions)||k(R)})},v.prototype.addDcsHandler=function(S,k){return this._parser.addDcsHandler(S,new p.DcsHandler(k))},v.prototype.addEscHandler=function(S,k){return this._parser.addEscHandler(S,k)},v.prototype.addOscHandler=function(S,k){return this._parser.addOscHandler(S,new l.OscHandler(k))},v.prototype.bell=function(){this._onRequestBell.fire()},v.prototype.lineFeed=function(){var S=this._bufferService.buffer;this._dirtyRowService.markDirty(S.y),this._optionsService.options.convertEol&&(S.x=0),S.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),S.x>=this._bufferService.cols&&S.x--,this._dirtyRowService.markDirty(S.y),this._onLineFeed.fire()},v.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},v.prototype.backspace=function(){var S,k=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(k.x>0&&k.x--);if(this._restrictCursor(this._bufferService.cols),k.x>0)k.x--;else if(k.x===0&&k.y>k.scrollTop&&k.y<=k.scrollBottom&&(!((S=k.lines.get(k.ybase+k.y))===null||S===void 0)&&S.isWrapped)){k.lines.get(k.ybase+k.y).isWrapped=!1,k.y--,k.x=this._bufferService.cols-1;var O=k.lines.get(k.ybase+k.y);O.hasWidth(k.x)&&!O.hasContent(k.x)&&k.x--}this._restrictCursor()},v.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var S=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-S)}},v.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},v.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},v.prototype._restrictCursor=function(S){S===void 0&&(S=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(S,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)},v.prototype._setCursor=function(S,k){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=S,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+k):(this._bufferService.buffer.x=S,this._bufferService.buffer.y=k),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},v.prototype._moveCursor=function(S,k){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+S,this._bufferService.buffer.y+k)},v.prototype.cursorUp=function(S){var k=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;k>=0?this._moveCursor(0,-Math.min(k,S.params[0]||1)):this._moveCursor(0,-(S.params[0]||1))},v.prototype.cursorDown=function(S){var k=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;k>=0?this._moveCursor(0,Math.min(k,S.params[0]||1)):this._moveCursor(0,S.params[0]||1)},v.prototype.cursorForward=function(S){this._moveCursor(S.params[0]||1,0)},v.prototype.cursorBackward=function(S){this._moveCursor(-(S.params[0]||1),0)},v.prototype.cursorNextLine=function(S){this.cursorDown(S),this._bufferService.buffer.x=0},v.prototype.cursorPrecedingLine=function(S){this.cursorUp(S),this._bufferService.buffer.x=0},v.prototype.cursorCharAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},v.prototype.cursorPosition=function(S){this._setCursor(S.length>=2?(S.params[1]||1)-1:0,(S.params[0]||1)-1)},v.prototype.charPosAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},v.prototype.hPositionRelative=function(S){this._moveCursor(S.params[0]||1,0)},v.prototype.linePosAbsolute=function(S){this._setCursor(this._bufferService.buffer.x,(S.params[0]||1)-1)},v.prototype.vPositionRelative=function(S){this._moveCursor(0,S.params[0]||1)},v.prototype.hVPosition=function(S){this.cursorPosition(S)},v.prototype.tabClear=function(S){var k=S.params[0];k===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:k===3&&(this._bufferService.buffer.tabs={})},v.prototype.cursorForwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1;k--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},v.prototype.cursorBackwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.x=O.prevStop()},v.prototype._eraseInBufferLine=function(S,k,O,R){R===void 0&&(R=!1);var U=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);U.replaceCells(k,O,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(U.isWrapped=!1)},v.prototype._resetBufferLine=function(S){var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);k.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1},v.prototype.eraseInDisplay=function(S){var k;switch(this._restrictCursor(),S.params[0]){case 0:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);k<this._bufferService.rows;k++)this._resetBufferLine(k);this._dirtyRowService.markDirty(k);break;case 1:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k);this._dirtyRowService.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowService.markDirty(k-1);k--;)this._resetBufferLine(k);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))}},v.prototype.eraseInLine=function(S){switch(this._restrictCursor(),S.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)},v.prototype.insertLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){for(var R=O.ybase+O.y,U=this._bufferService.rows-1-O.scrollBottom,N=this._bufferService.rows-1+O.ybase-U+1;k--;)O.lines.splice(N-1,1),O.lines.splice(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},v.prototype.deleteLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){var R,U=O.ybase+O.y;for(R=this._bufferService.rows-1-O.scrollBottom,R=this._bufferService.rows-1+O.ybase-R;k--;)O.lines.splice(U,1),O.lines.splice(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},v.prototype.insertChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.insertCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.deleteChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.deleteCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.scrollUp=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)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)},v.prototype.scrollDown=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)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)},v.prototype.scrollLeft=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.deleteCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.scrollRight=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.insertCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.insertColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=this._bufferService.buffer.lines.get(k.ybase+R);U.insertCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.deleteColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.deleteCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.eraseChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(S.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.repeatPrecedingCharacter=function(S){if(this._parser.precedingCodepoint){for(var k=S.params[0]||1,O=new Uint32Array(k),R=0;R<k;++R)O[R]=this._parser.precedingCodepoint;this.print(O,0,O.length)}},v.prototype.sendDeviceAttributesPrimary=function(S){S.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c"))},v.prototype.sendDeviceAttributesSecondary=function(S){S.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(S.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c"))},v.prototype._is=function(S){return(this._optionsService.options.termName+"").indexOf(S)===0},v.prototype.setMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!0}},v.prototype.setModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){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}},v.prototype.resetMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!1}},v.prototype.resetModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){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(),S.params[k]===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}},v.prototype._updateAttrColor=function(S,k,O,R,U){return k===2?(S|=50331648,S&=-16777216,S|=s.AttributeData.fromColorRGB([O,R,U])):k===5&&(S&=-50331904,S|=33554432|255&O),S},v.prototype._extractColor=function(S,k,O){var R=[0,0,-1,0,0,0],U=0,N=0;do{if(R[N+U]=S.params[k+N],S.hasSubParams(k+N)){var pe=S.getSubParams(k+N),Z=0;do R[1]===5&&(U=1),R[N+Z+1+U]=pe[Z];while(++Z<pe.length&&Z+N+1+U<R.length);break}if(R[1]===5&&N+U>=2||R[1]===2&&N+U>=5)break;R[1]&&(U=1)}while(++N+k<S.length&&N+U<R.length);for(Z=2;Z<R.length;++Z)R[Z]===-1&&(R[Z]=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 N},v.prototype._processUnderline=function(S,k){k.extended=k.extended.clone(),(!~S||S>5)&&(S=1),k.extended.underlineStyle=S,k.fg|=268435456,S===0&&(k.fg&=-268435457),k.updateExtended()},v.prototype.charAttributes=function(S){if(S.length===1&&S.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var k,O=S.length,R=this._curAttrData,U=0;U<O;U++)(k=S.params[U])>=30&&k<=37?(R.fg&=-50331904,R.fg|=16777216|k-30):k>=40&&k<=47?(R.bg&=-50331904,R.bg|=16777216|k-40):k>=90&&k<=97?(R.fg&=-50331904,R.fg|=16777224|k-90):k>=100&&k<=107?(R.bg&=-50331904,R.bg|=16777224|k-100):k===0?(R.fg=t.DEFAULT_ATTR_DATA.fg,R.bg=t.DEFAULT_ATTR_DATA.bg):k===1?R.fg|=134217728:k===3?R.bg|=67108864:k===4?(R.fg|=268435456,this._processUnderline(S.hasSubParams(U)?S.getSubParams(U)[0]:1,R)):k===5?R.fg|=536870912:k===7?R.fg|=67108864:k===8?R.fg|=1073741824:k===2?R.bg|=134217728:k===21?this._processUnderline(2,R):k===22?(R.fg&=-134217729,R.bg&=-134217729):k===23?R.bg&=-67108865:k===24?R.fg&=-268435457:k===25?R.fg&=-536870913:k===27?R.fg&=-67108865:k===28?R.fg&=-1073741825:k===39?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):k===49?(R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?U+=this._extractColor(S,U,R):k===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):k===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.",k)},v.prototype.deviceStatus=function(S){switch(S.params[0]){case 5:this._coreService.triggerDataEvent(o.C0.ESC+"[0n");break;case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"["+k+";"+O+"R")}},v.prototype.deviceStatusPrivate=function(S){switch(S.params[0]){case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"[?"+k+";"+O+"R")}},v.prototype.softReset=function(S){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},v.prototype.setCursorStyle=function(S){var k=S.params[0]||1;switch(k){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=k%2==1;this._optionsService.options.cursorBlink=O},v.prototype.setScrollRegion=function(S){var k,O=S.params[0]||1;(S.length<2||(k=S.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>O&&(this._bufferService.buffer.scrollTop=O-1,this._bufferService.buffer.scrollBottom=k-1,this._setCursor(0,0))},v.prototype.windowOptions=function(S){if(b(S.params[0],this._optionsService.options.windowOptions)){var k=S.length>1?S.params[1]:0;switch(S.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(h.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(h.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(o.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},v.prototype.saveCursor=function(S){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},v.prototype.restoreCursor=function(S){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()},v.prototype.setTitle=function(S){this._windowTitle=S,this._onTitleChange.fire(S)},v.prototype.setIconName=function(S){this._iconName=S},v.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},v.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},v.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},v.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},v.prototype.selectCharset=function(S){S.length===2?S[0]!=="/"&&this._charsetService.setgCharset(y[S[0]],u.CHARSETS[S[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},v.prototype.index=function(){this._restrictCursor();var S=this._bufferService.buffer;this._bufferService.buffer.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),this._restrictCursor()},v.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},v.prototype.reverseIndex=function(){this._restrictCursor();var S=this._bufferService.buffer;if(S.y===S.scrollTop){var k=S.scrollBottom-S.scrollTop;S.lines.shiftElements(S.ybase+S.y,k,1),S.lines.set(S.ybase+S.y,S.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}else S.y--,this._restrictCursor()},v.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},v.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},v.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},v.prototype.setgLevel=function(S){this._charsetService.setgLevel(S)},v.prototype.screenAlignmentPattern=function(){var S=new n.CellData;S.content=1<<22|69,S.fg=this._curAttrData.fg,S.bg=this._curAttrData.bg;var k=this._bufferService.buffer;this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var R=k.ybase+k.y+O,U=k.lines.get(R);U&&(U.fill(S),U.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},v}(r.Disposable);c.InputHandler=E},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},c.CHARSETS.A={"#":"\xA3"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},c.CHARSETS.C=c.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},c.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},c.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},c.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},c.CHARSETS.E=c.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},c.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},c.CHARSETS.H=c.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;var x=function(){function m(h,o){if(h===void 0&&(h=32),o===void 0&&(o=32),this.maxLength=h,this.maxSubParamsLength=o,o>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(o),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return m.fromArray=function(h){var o=new m;if(!h.length)return o;for(var u=h[0]instanceof Array?1:0;u<h.length;++u){var d=h[u];if(d instanceof Array)for(var r=0;r<d.length;++r)o.addSubParam(d[r]);else o.addParam(d)}return o},m.prototype.clone=function(){var h=new m(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h},m.prototype.toArray=function(){for(var h=[],o=0;o<this.length;++o){h.push(this.params[o]);var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&h.push(Array.prototype.slice.call(this._subParams,u,d))}return h},m.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},m.prototype.addParam=function(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>2147483647?2147483647:h}},m.prototype.addSubParam=function(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>2147483647?2147483647:h,this._subParamsIdx[this.length-1]++}},m.prototype.hasSubParams=function(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0},m.prototype.getSubParams=function(h){var o=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];return u-o>0?this._subParams.subarray(o,u):null},m.prototype.getSubParamsAll=function(){for(var h={},o=0;o<this.length;++o){var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&(h[o]=this._subParams.slice(u,d))}return h},m.prototype.addDigit=function(h){var o;if(!(this._rejectDigits||!(o=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,d=u[o-1];u[o-1]=~d?Math.min(10*d+h,2147483647):h}},m}();c.Params=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;var x=_(23),m=_(8),h=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(d,r){this._handlers[d]===void 0&&(this._handlers[d]=[]);var i=this._handlers[d];return i.push(r),{dispose:function(){var a=i.indexOf(r);a!==-1&&i.splice(a,1)}}},u.prototype.setHandler=function(d,r){this._handlers[d]=[r]},u.prototype.clearHandler=function(d){this._handlers[d]&&delete this._handlers[d]},u.prototype.setHandlerFallback=function(d){this._handlerFb=d},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 d=this._handlers[this._id];if(d)for(var r=d.length-1;r>=0;r--)d[r].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(d,r,i){var a=this._handlers[this._id];if(a)for(var t=a.length-1;t>=0;t--)a[t].put(d,r,i);else this._handlerFb(this._id,"PUT",m.utf32ToString(d,r,i))},u.prototype._end=function(d){var r=this._handlers[this._id];if(r){for(var i=r.length-1;i>=0&&r[i].end(d)===!1;i--);for(i--;i>=0;i--)r[i].end(!1)}else this._handlerFb(this._id,"END",d)},u.prototype.start=function(){this.reset(),this._id=-1,this._state=1},u.prototype.put=function(d,r,i){if(this._state!==3){if(this._state===1)for(;r<i;){var a=d[r++];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&&i-r>0&&this._put(d,r,i)}},u.prototype.end=function(d){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(d)),this._id=-1,this._state=0)},u}();c.OscParser=h;var o=function(){function u(d){this._handler=d,this._data="",this._hitLimit=!1}return u.prototype.start=function(){this._data="",this._hitLimit=!1},u.prototype.put=function(d,r,i){this._hitLimit||(this._data+=m.utf32ToString(d,r,i),this._data.length>x.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(d){var r;return this._hitLimit?r=!1:d&&(r=this._handler(this._data)),this._data="",this._hitLimit=!1,r},u}();c.OscHandler=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;var x=_(8),m=_(21),h=_(23),o=[],u=function(){function r(){this._handlers=Object.create(null),this._active=o,this._ident=0,this._handlerFb=function(){}}return r.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},r.prototype.addHandler=function(i,a){this._handlers[i]===void 0&&(this._handlers[i]=[]);var t=this._handlers[i];return t.push(a),{dispose:function(){var f=t.indexOf(a);f!==-1&&t.splice(f,1)}}},r.prototype.setHandler=function(i,a){this._handlers[i]=[a]},r.prototype.clearHandler=function(i){this._handlers[i]&&delete this._handlers[i]},r.prototype.setHandlerFallback=function(i){this._handlerFb=i},r.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=o,this._ident=0},r.prototype.hook=function(i,a){if(this.reset(),this._ident=i,this._active=this._handlers[i]||o,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)},r.prototype.put=function(i,a,t){if(this._active.length)for(var f=this._active.length-1;f>=0;f--)this._active[f].put(i,a,t);else this._handlerFb(this._ident,"PUT",x.utf32ToString(i,a,t))},r.prototype.unhook=function(i){if(this._active.length){for(var a=this._active.length-1;a>=0&&this._active[a].unhook(i)===!1;a--);for(a--;a>=0;a--)this._active[a].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",i);this._active=o,this._ident=0},r}();c.DcsParser=u;var d=function(){function r(i){this._handler=i,this._data="",this._hitLimit=!1}return r.prototype.hook=function(i){this._params=i.clone(),this._data="",this._hitLimit=!1},r.prototype.put=function(i,a,t){this._hitLimit||(this._data+=x.utf32ToString(i,a,t),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},r.prototype.unhook=function(i){var a;return this._hitLimit?a=!1:i&&(a=this._handler(this._data,this._params||new m.Params)),this._params=void 0,this._data="",this._hitLimit=!1,a},r}();c.DcsHandler=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.removeTerminalFromCache=c.acquireCharAtlas=void 0;var x=_(26),m=_(43),h=[];c.acquireCharAtlas=function(o,u,d,r,i){for(var a=x.generateConfig(r,i,o,d),t=0;t<h.length;t++){var f=(e=h[t]).ownedBy.indexOf(u);if(f>=0){if(x.configEquals(e.config,a))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),h.splice(t,1)):e.ownedBy.splice(f,1);break}}for(t=0;t<h.length;t++){var e=h[t];if(x.configEquals(e.config,a))return e.ownedBy.push(u),e.atlas}var n={atlas:new m.DynamicCharAtlas(document,a),config:a,ownedBy:[u]};return h.push(n),n.atlas},c.removeTerminalFromCache=function(o){for(var u=0;u<h.length;u++){var d=h[u].ownedBy.indexOf(o);if(d!==-1){h[u].ownedBy.length===1?(h[u].atlas.dispose(),h.splice(u,1)):h[u].ownedBy.splice(d,1);break}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.is256Color=c.configEquals=c.generateConfig=void 0;var x=_(3);c.generateConfig=function(m,h,o,u){var d={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:m,scaledCharHeight:h,fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontWeightBold:o.fontWeightBold,allowTransparency:o.allowTransparency,colors:d}},c.configEquals=function(m,h){for(var o=0;o<m.colors.ansi.length;o++)if(m.colors.ansi[o].rgba!==h.colors.ansi[o].rgba)return!1;return m.devicePixelRatio===h.devicePixelRatio&&m.fontFamily===h.fontFamily&&m.fontSize===h.fontSize&&m.fontWeight===h.fontWeight&&m.fontWeightBold===h.fontWeightBold&&m.allowTransparency===h.allowTransparency&&m.scaledCharWidth===h.scaledCharWidth&&m.scaledCharHeight===h.scaledCharHeight&&m.colors.foreground===h.colors.foreground&&m.colors.background===h.colors.background},c.is256Color=function(m){return m<x.DEFAULT_COLOR}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var x=_(10),m=_(45),h=x.css.toColor("#ffffff"),o=x.css.toColor("#000000"),u=x.css.toColor("#ffffff"),d=x.css.toColor("#000000"),r={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=function(){for(var a=[x.css.toColor("#2e3436"),x.css.toColor("#cc0000"),x.css.toColor("#4e9a06"),x.css.toColor("#c4a000"),x.css.toColor("#3465a4"),x.css.toColor("#75507b"),x.css.toColor("#06989a"),x.css.toColor("#d3d7cf"),x.css.toColor("#555753"),x.css.toColor("#ef2929"),x.css.toColor("#8ae234"),x.css.toColor("#fce94f"),x.css.toColor("#729fcf"),x.css.toColor("#ad7fa8"),x.css.toColor("#34e2e2"),x.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],f=0;f<216;f++){var e=t[f/36%6|0],n=t[f/6%6|0],s=t[f%6];a.push({css:x.channels.toCss(e,n,s),rgba:x.channels.toRgba(e,n,s)})}for(f=0;f<24;f++){var l=8+10*f;a.push({css:x.channels.toCss(l,l,l),rgba:x.channels.toRgba(l,l,l)})}return a}();var i=function(){function a(t,f){this.allowTransparency=f;var e=t.createElement("canvas");e.width=1,e.height=1;var n=e.getContext("2d");if(!n)throw new Error("Could not get rendering context");this._ctx=n,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new m.ColorContrastCache,this.colors={foreground:h,background:o,cursor:u,cursorAccent:d,selectionTransparent:r,selectionOpaque:x.color.blend(o,r),ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return a.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},a.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,h),this.colors.background=this._parseColor(t.background,o),this.colors.cursor=this._parseColor(t.cursor,u,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,d,!0),this.colors.selectionTransparent=this._parseColor(t.selection,r,!0),this.colors.selectionOpaque=x.color.blend(this.colors.background,this.colors.selectionTransparent),x.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=x.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},a.prototype._parseColor=function(t,f,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return f;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+f.css),f;this._ctx.fillRect(0,0,1,1);var n=this._ctx.getImageData(0,0,1,1).data;if(n[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+f.css+"."),f;var s=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(E){return Number(E)}),l=s[0],p=s[1],y=s[2],b=s[3],g=Math.round(255*b);return{rgba:x.channels.toRgba(l,p,y,g),css:t}}return{css:this._ctx.fillStyle,rgba:x.channels.toRgba(n[0],n[1],n[2],n[3])}},a}();c.ColorManager=i},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.throwIfFalsy=void 0,c.throwIfFalsy=function(x){if(!x)throw new Error("value must not be falsy");return x}},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(i,a){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,f){t.__proto__=f}||function(t,f){for(var e in f)f.hasOwnProperty(e)&&(t[e]=f[e])})(i,a)},function(i,a){function t(){this.constructor=i}x(i,a),i.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerRegistry=c.JoinedCellData=void 0;var h=_(6),o=_(3),u=_(4),d=function(i){function a(t,f,e){var n=i.call(this)||this;return n.content=0,n.combinedData="",n.fg=t.fg,n.bg=t.bg,n.combinedData=f,n._width=e,n}return m(a,i),a.prototype.isCombined=function(){return 2097152},a.prototype.getWidth=function(){return this._width},a.prototype.getChars=function(){return this.combinedData},a.prototype.getCode=function(){return 2097151},a.prototype.setFromCharData=function(t){throw new Error("not implemented")},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(h.AttributeData);c.JoinedCellData=d;var r=function(){function i(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return i.prototype.registerCharacterJoiner=function(a){var t={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(t),t.id},i.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},i.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 f=[],e=t.translateToString(!0),n=0,s=0,l=0,p=t.getFg(0),y=t.getBg(0),b=0;b<t.getTrimmedLength();b++)if(t.loadCell(b,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==y){if(b-n>1)for(var g=this._getJoinedRanges(e,l,s,t,n),E=0;E<g.length;E++)f.push(g[E]);n=b,l=s,p=this._workCell.fg,y=this._workCell.bg}s+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-n>1)for(g=this._getJoinedRanges(e,l,s,t,n),E=0;E<g.length;E++)f.push(g[E]);return f},i.prototype._getJoinedRanges=function(a,t,f,e,n){for(var s=a.substring(t,f),l=this._characterJoiners[0].handler(s),p=1;p<this._characterJoiners.length;p++)for(var y=this._characterJoiners[p].handler(s),b=0;b<y.length;b++)i._mergeRanges(l,y[b]);return this._stringRangesToCellRanges(l,e,n),l},i.prototype._stringRangesToCellRanges=function(a,t,f){var e=0,n=!1,s=0,l=a[e];if(l){for(var p=f;p<this._bufferService.cols;p++){var y=t.getWidth(p),b=t.getString(p).length||o.WHITESPACE_CELL_CHAR.length;if(y!==0){if(!n&&l[0]<=s&&(l[0]=p,n=!0),l[1]<=s){if(l[1]=p,!(l=a[++e]))break;l[0]<=s?(l[0]=p,n=!0):n=!1}s+=b}}l&&(l[1]=this._bufferService.cols)}},i._mergeRanges=function(a,t){for(var f=!1,e=0;e<a.length;e++){var n=a[e];if(f){if(t[1]<=n[0])return a[e-1][1]=t[1],a;if(t[1]<=n[1])return a[e-1][1]=Math.max(t[1],n[1]),a.splice(e,1),a;a.splice(e,1),e--}else{if(t[1]<=n[0])return a.splice(e,0,t),a;if(t[1]<=n[1])return n[0]=Math.min(t[0],n[0]),a;t[0]<n[1]&&(n[0]=Math.min(t[0],n[0]),f=!0)}}return f?a[a.length-1][1]=t[1]:a.push(t),a},i}();c.CharacterJoinerRegistry=r},function(D,c,_){"use strict";function x(m,h){var o=h.getBoundingClientRect();return[m.clientX-o.left,m.clientY-o.top]}Object.defineProperty(c,"__esModule",{value:!0}),c.getRawByteCoords=c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=x,c.getCoords=function(m,h,o,u,d,r,i,a){if(d){var t=x(m,h);if(t)return t[0]=Math.ceil((t[0]+(a?r/2:0))/r),t[1]=Math.ceil(t[1]/i),t[0]=Math.min(Math.max(t[0],1),o+(a?1:0)),t[1]=Math.min(Math.max(t[1],1),u),t}},c.getRawByteCoords=function(m){if(m)return{x:m[0]+32,y:m[1]+32}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var x=function(){function m(h){this._renderCallback=h}return m.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},m.prototype.refresh=function(h,o,u){var d=this;this._rowCount=u,h=h!==void 0?h:0,o=o!==void 0?o:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,o):o,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()}))},m.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var h=Math.max(this._rowStart,0),o=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(h,o)}},m}();c.RenderDebouncer=x},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(o,u){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,r){d.__proto__=r}||function(d,r){for(var i in r)r.hasOwnProperty(i)&&(d[i]=r[i])})(o,u)},function(o,u){function d(){this.constructor=o}x(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var h=function(o){function u(){var d=o!==null&&o.apply(this,arguments)||this;return d._currentDevicePixelRatio=window.devicePixelRatio,d}return m(u,o),u.prototype.setListener=function(d){var r=this;this._listener&&this.clearListener(),this._listener=d,this._outerListener=function(){r._listener&&(r._listener(window.devicePixelRatio,r._currentDevicePixelRatio),r._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){o.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.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}(_(2).Disposable);c.ScreenDprMonitor=h},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function x(m,h){if(h===void 0&&(h=5),typeof m!="object")return m;var o=Array.isArray(m)?[]:{};for(var u in m)o[u]=h<=1?m[u]:m[u]?x(m[u],h-1):m[u];return o}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var x=_(4),m=_(35),h=_(18),o=_(0),u=_(83),d=function(){function e(n){this._core=new m.Terminal(n),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 f(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 i(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(n,s){this._verifyIntegers(n,s),this._core.resize(n,s)},e.prototype.open=function(n){this._core.open(n)},e.prototype.attachCustomKeyEventHandler=function(n){this._core.attachCustomKeyEventHandler(n)},e.prototype.registerLinkMatcher=function(n,s,l){return this._checkProposedApi(),this._core.registerLinkMatcher(n,s,l)},e.prototype.deregisterLinkMatcher=function(n){this._checkProposedApi(),this._core.deregisterLinkMatcher(n)},e.prototype.registerLinkProvider=function(n){return this._checkProposedApi(),this._core.registerLinkProvider(n)},e.prototype.registerCharacterJoiner=function(n){return this._checkProposedApi(),this._core.registerCharacterJoiner(n)},e.prototype.deregisterCharacterJoiner=function(n){this._checkProposedApi(),this._core.deregisterCharacterJoiner(n)},e.prototype.registerMarker=function(n){return this._checkProposedApi(),this._verifyIntegers(n),this._core.addMarker(n)},e.prototype.addMarker=function(n){return this.registerMarker(n)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(n,s,l){this._verifyIntegers(n,s,l),this._core.select(n,s,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(n,s){this._verifyIntegers(n,s),this._core.selectLines(n,s)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(n){this._verifyIntegers(n),this._core.scrollLines(n)},e.prototype.scrollPages=function(n){this._verifyIntegers(n),this._core.scrollPages(n)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(n){this._verifyIntegers(n),this._core.scrollToLine(n)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(n,s){this._core.write(n,s)},e.prototype.writeUtf8=function(n,s){this._core.write(n,s)},e.prototype.writeln=function(n,s){this._core.write(n),this._core.write(`\r
|
|
|
`,s)},e.prototype.paste=function(n){this._core.paste(n)},e.prototype.getOption=function(n){return this._core.optionsService.getOption(n)},e.prototype.setOption=function(n,s){this._core.optionsService.setOption(n,s)},e.prototype.refresh=function(n,s){this._verifyIntegers(n,s),this._core.refresh(n,s)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(n){return this._addonManager.loadAddon(this,n)},Object.defineProperty(e,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];for(var l=0,p=n;l<p.length;l++){var y=p[l];if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}},e}();c.Terminal=d;var r=function(){function e(n,s){this._buffer=n,this.type=s}return e.prototype.init=function(n){return this._buffer=n,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(n){var s=this._buffer.lines.get(n);if(s)return new a(s)},e.prototype.getNullCell=function(){return new x.CellData},e}(),i=function(){function e(n){var s=this;this._buffers=n,this._onBufferChange=new o.EventEmitter,this._normal=new r(this._buffers.normal,"normal"),this._alternate=new r(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return s._onBufferChange.fire(s.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(n){this._line=n}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(n,s){if(!(n<0||n>=this._line.length))return s?(this._line.loadCell(n,s),s):this._line.loadCell(n,new x.CellData)},e.prototype.translateToString=function(n,s,l){return this._line.translateToString(n,s,l)},e}(),t=function(){function e(n){this._core=n}return e.prototype.registerCsiHandler=function(n,s){return this._core.addCsiHandler(n,function(l){return s(l.toArray())})},e.prototype.addCsiHandler=function(n,s){return this.registerCsiHandler(n,s)},e.prototype.registerDcsHandler=function(n,s){return this._core.addDcsHandler(n,function(l,p){return s(l,p.toArray())})},e.prototype.addDcsHandler=function(n,s){return this.registerDcsHandler(n,s)},e.prototype.registerEscHandler=function(n,s){return this._core.addEscHandler(n,s)},e.prototype.addEscHandler=function(n,s){return this.registerEscHandler(n,s)},e.prototype.registerOscHandler=function(n,s){return this._core.addOscHandler(n,s)},e.prototype.addOscHandler=function(n,s){return this.registerOscHandler(n,s)},e}(),f=function(){function e(n){this._core=n}return e.prototype.register=function(n){this._core.unicodeService.register(n)},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(n){this._core.unicodeService.activeVersion=n},enumerable:!1,configurable:!0}),e}()},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(le,L){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,I){K.__proto__=I}||function(K,I){for(var z in I)I.hasOwnProperty(z)&&(K[z]=I[z])})(le,L)},function(le,L){function K(){this.constructor=le}x(le,L),le.prototype=L===null?Object.create(L):(K.prototype=L.prototype,new K)});Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var h=_(36),o=_(37),u=_(38),d=_(12),r=_(19),i=_(40),a=_(50),t=_(51),f=_(11),e=_(7),n=_(18),s=_(54),l=_(55),p=_(56),y=_(57),b=_(59),g=_(0),E=_(16),C=_(27),v=_(60),S=_(5),k=_(61),O=_(62),R=_(63),U=_(64),N=_(65),pe=typeof window!="undefined"?window.document:null,Z=function(le){function L(K){K===void 0&&(K={});var I=le.call(this,K)||this;return I.browser=f,I._keyDownHandled=!1,I._onCursorMove=new g.EventEmitter,I._onKey=new g.EventEmitter,I._onRender=new g.EventEmitter,I._onSelectionChange=new g.EventEmitter,I._onTitleChange=new g.EventEmitter,I._onFocus=new g.EventEmitter,I._onBlur=new g.EventEmitter,I._onA11yCharEmitter=new g.EventEmitter,I._onA11yTabEmitter=new g.EventEmitter,I._setup(),I.linkifier=I._instantiationService.createInstance(a.Linkifier),I.linkifier2=I.register(I._instantiationService.createInstance(R.Linkifier2)),I.register(I._inputHandler.onRequestBell(function(){return I.bell()})),I.register(I._inputHandler.onRequestRefreshRows(function(z,X){return I.refresh(z,X)})),I.register(I._inputHandler.onRequestReset(function(){return I.reset()})),I.register(I._inputHandler.onRequestScroll(function(z,X){return I.scroll(z,X||void 0)})),I.register(I._inputHandler.onRequestWindowsOptionsReport(function(z){return I._reportWindowsOptions(z)})),I.register(g.forwardEvent(I._inputHandler.onCursorMove,I._onCursorMove)),I.register(g.forwardEvent(I._inputHandler.onTitleChange,I._onTitleChange)),I.register(g.forwardEvent(I._inputHandler.onA11yChar,I._onA11yCharEmitter)),I.register(g.forwardEvent(I._inputHandler.onA11yTab,I._onA11yTabEmitter)),I.register(I._bufferService.onResize(function(z){return I._afterResize(z.cols,z.rows)})),I}return m(L,le),Object.defineProperty(L.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){var K,I,z;this._isDisposed||(le.prototype.dispose.call(this),(K=this._renderService)===null||K===void 0||K.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(z=(I=this.element)===null||I===void 0?void 0:I.parentNode)===null||z===void 0||z.removeChild(this.element))},L.prototype._setup=function(){le.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(L.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),L.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},L.prototype._updateOptions=function(K){var I,z,X,Q;switch(le.prototype._updateOptions.call(this,K),K){case"fontFamily":case"fontSize":(I=this._renderService)===null||I===void 0||I.clear(),(z=this._charSizeService)===null||z===void 0||z.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":(X=this.viewport)===null||X===void 0||X.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)):((Q=this._accessibilityManager)===null||Q===void 0||Q.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},L.prototype._onTextAreaFocus=function(K){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[I"),this.updateCursorStyle(K),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},L.prototype.blur=function(){var K;return(K=this.textarea)===null||K===void 0?void 0:K.blur()},L.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},L.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var K=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),I=this._bufferService.buffer.y*K,z=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=z+"px",this.textarea.style.top=I+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=K+"px",this.textarea.style.lineHeight=K+"px",this.textarea.style.zIndex="-5"}},L.prototype._initGlobal=function(){var K=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(z){K.hasSelection()&&u.copyHandler(z,K._selectionService)}));var I=function(z){return u.handlePasteEvent(z,K.textarea,K._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",I)),this.register(e.addDisposableDomListener(this.element,"paste",I)),f.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(z){z.button===2&&u.rightClickHandler(z,K.textarea,K.screenElement,K._selectionService,K.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(z){u.rightClickHandler(z,K.textarea,K.screenElement,K._selectionService,K.options.rightClickSelectsWord)})),f.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(z){z.button===1&&u.moveTextAreaUnderMouseCursor(z,K.textarea,K.screenElement)}))},L.prototype._bindKeys=function(){var K=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(I){return K._keyUp(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(I){return K._keyDown(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(I){return K._keyPress(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return K._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(I){return K._compositionHelper.compositionupdate(I)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return K._compositionHelper.compositionend()})),this.register(this.onRender(function(){return K._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(I){return K._queueLinkification(I.start,I.end)}))},L.prototype.open=function(K){var I=this;if(!K)throw new Error("Terminal requires a parent element.");pe.body.contains(K)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=K.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"),K.appendChild(this.element);var z=pe.createDocumentFragment();this._viewportElement=pe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.appendChild(this._viewportElement),this._viewportScrollArea=pe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=pe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=pe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),z.appendChild(this.screenElement),this.textarea=pe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",n.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(ce){return I._onTextAreaFocus(ce)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return I._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var X=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(S.ICoreBrowserService,X),this._charSizeService=this._instantiationService.createInstance(k.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._compositionView=pe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(z),this._theme=this.options.theme||this._theme,this._colorManager=new C.ColorManager(pe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ce){return I._colorManager.onOptionsChange(ce)})),this._colorManager.setTheme(this._theme);var Q=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(v.RenderService,Q,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ce){return I._onRender.fire(ce)})),this.onResize(function(ce){return I._renderService.resize(ce.cols,ce.rows)}),this._soundService=this._instantiationService.createInstance(s.SoundService),this._instantiationService.setService(S.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(O.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(o.Viewport,function(ce,ye){return I.scrollLines(ce,ye)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return I.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){I._renderService.onCursorMove(),I._syncTextArea()})),this.register(this.onResize(function(){return I._renderService.onResize(I.cols,I.rows)})),this.register(this.onBlur(function(){return I._renderService.onBlur()})),this.register(this.onFocus(function(){return I._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return I.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ce){return I.scrollLines(ce.amount,ce.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return I._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ce){return I._renderService.onSelectionChanged(ce.start,ce.end,ce.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ce){I.textarea.value=ce,I.textarea.focus(),I.textarea.select()})),this.register(this.onScroll(function(){I.viewport.syncScrollArea(),I._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return I._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return I._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(ce){return I._selectionService.onMouseDown(ce)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},L.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(i.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(y.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},L.prototype._setTheme=function(K){var I,z,X;this._theme=K,(I=this._colorManager)===null||I===void 0||I.setTheme(K),(z=this._renderService)===null||z===void 0||z.setColors(this._colorManager.colors),(X=this.viewport)===null||X===void 0||X.onThemeChange(this._colorManager.colors)},L.prototype.bindMouse=function(){var K=this,I=this,z=this.element;function X(ie){var he,ke,Ae=I._mouseService.getRawByteCoords(ie,I.screenElement,I.cols,I.rows);if(!Ae)return!1;switch(ie.overrideType||ie.type){case"mousemove":ke=32,ie.buttons===void 0?(he=3,ie.button!==void 0&&(he=ie.button<3?ie.button:3)):he=1&ie.buttons?0:4&ie.buttons?1:2&ie.buttons?2:3;break;case"mouseup":ke=0,he=ie.button<3?ie.button:3;break;case"mousedown":ke=1,he=ie.button<3?ie.button:3;break;case"wheel":ie.deltaY!==0&&(ke=ie.deltaY<0?0:1),he=4;break;default:return!1}return!(ke===void 0||he===void 0||he>4)&&I._coreMouseService.triggerMouseEvent({col:Ae.x-33,row:Ae.y-33,button:he,action:ke,ctrl:ie.ctrlKey,alt:ie.altKey,shift:ie.shiftKey})}var Q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ce=function(ie){return X(ie),ie.buttons||(K._document.removeEventListener("mouseup",Q.mouseup),Q.mousedrag&&K._document.removeEventListener("mousemove",Q.mousedrag)),K.cancel(ie)},ye=function(ie){return X(ie),ie.preventDefault(),K.cancel(ie)},Le=function(ie){ie.buttons&&X(ie)},Se=function(ie){ie.buttons||X(ie)};this.register(this._coreMouseService.onProtocolChange(function(ie){ie?(K.optionsService.options.logLevel==="debug"&&K._logService.debug("Binding to mouse events:",K._coreMouseService.explainEvents(ie)),K.element.classList.add("enable-mouse-events"),K._selectionService.disable()):(K._logService.debug("Unbinding from mouse events."),K.element.classList.remove("enable-mouse-events"),K._selectionService.enable()),8&ie?Q.mousemove||(z.addEventListener("mousemove",Se),Q.mousemove=Se):(z.removeEventListener("mousemove",Q.mousemove),Q.mousemove=null),16&ie?Q.wheel||(z.addEventListener("wheel",ye,{passive:!1}),Q.wheel=ye):(z.removeEventListener("wheel",Q.wheel),Q.wheel=null),2&ie?Q.mouseup||(Q.mouseup=ce):(K._document.removeEventListener("mouseup",Q.mouseup),Q.mouseup=null),4&ie?Q.mousedrag||(Q.mousedrag=Le):(K._document.removeEventListener("mousemove",Q.mousedrag),Q.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(z,"mousedown",function(ie){if(ie.preventDefault(),K.focus(),K._coreMouseService.areMouseEventsActive&&!K._selectionService.shouldForceSelection(ie))return X(ie),Q.mouseup&&K._document.addEventListener("mouseup",Q.mouseup),Q.mousedrag&&K._document.addEventListener("mousemove",Q.mousedrag),K.cancel(ie)})),this.register(e.addDisposableDomListener(z,"wheel",function(ie){if(!Q.wheel){if(!K.buffer.hasScrollback){var he=K.viewport.getLinesScrolled(ie);if(he===0)return;for(var ke=d.C0.ESC+(K._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ie.deltaY<0?"A":"B"),Ae="",Oe=0;Oe<Math.abs(he);Oe++)Ae+=ke;K._coreService.triggerDataEvent(Ae,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(z,"wheel",function(ie){if(!Q.wheel)return K.viewport.onWheel(ie)?void 0:K.cancel(ie)},{passive:!1})),this.register(e.addDisposableDomListener(z,"touchstart",function(ie){if(!K._coreMouseService.areMouseEventsActive)return K.viewport.onTouchStart(ie),K.cancel(ie)},{passive:!0})),this.register(e.addDisposableDomListener(z,"touchmove",function(ie){if(!K._coreMouseService.areMouseEventsActive)return K.viewport.onTouchMove(ie)?void 0:K.cancel(ie)},{passive:!1}))},L.prototype.refresh=function(K,I){var z;(z=this._renderService)===null||z===void 0||z.refreshRows(K,I)},L.prototype._queueLinkification=function(K,I){var z;(z=this.linkifier)===null||z===void 0||z.linkifyRows(K,I)},L.prototype.updateCursorStyle=function(K){this._selectionService&&this._selectionService.shouldColumnSelect(K)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},L.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},L.prototype.scrollLines=function(K,I){le.prototype.scrollLines.call(this,K,I),this.refresh(0,this.rows-1)},L.prototype.paste=function(K){u.paste(K,this.textarea,this._coreService)},L.prototype.attachCustomKeyEventHandler=function(K){this._customKeyEventHandler=K},L.prototype.registerLinkMatcher=function(K,I,z){var X=this.linkifier.registerLinkMatcher(K,I,z);return this.refresh(0,this.rows-1),X},L.prototype.deregisterLinkMatcher=function(K){this.linkifier.deregisterLinkMatcher(K)&&this.refresh(0,this.rows-1)},L.prototype.registerLinkProvider=function(K){return this.linkifier2.registerLinkProvider(K)},L.prototype.registerCharacterJoiner=function(K){var I=this._renderService.registerCharacterJoiner(K);return this.refresh(0,this.rows-1),I},L.prototype.deregisterCharacterJoiner=function(K){this._renderService.deregisterCharacterJoiner(K)&&this.refresh(0,this.rows-1)},Object.defineProperty(L.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),L.prototype.addMarker=function(K){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)},L.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},L.prototype.select=function(K,I,z){this._selectionService.setSelection(K,I,z)},L.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},L.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]}},L.prototype.clearSelection=function(){var K;(K=this._selectionService)===null||K===void 0||K.clearSelection()},L.prototype.selectAll=function(){var K;(K=this._selectionService)===null||K===void 0||K.selectAll()},L.prototype.selectLines=function(K,I){var z;(z=this._selectionService)===null||z===void 0||z.selectLines(K,I)},L.prototype._keyDown=function(K){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(!this._compositionHelper.keydown(K))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var I=b.evaluateKeyboardEvent(K,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),I.type===3||I.type===2){var z=this.rows-1;return this.scrollLines(I.type===2?-z:z),this.cancel(K,!0)}return I.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(I.cancel&&this.cancel(K,!0),!I.key||(I.key!==d.C0.ETX&&I.key!==d.C0.CR||(this.textarea.value=""),this._onKey.fire({key:I.key,domEvent:K}),this._showCursor(),this._coreService.triggerDataEvent(I.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(K,!0)))},L.prototype._isThirdLevelShift=function(K,I){var z=K.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||K.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey;return I.type==="keypress"?z:z&&(!I.keyCode||I.keyCode>47)},L.prototype._keyUp=function(K){this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||(function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18}(K)||this.focus(),this.updateCursorStyle(K))},L.prototype._keyPress=function(K){var I;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)I=K.charCode;else if(K.which===null||K.which===void 0)I=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;I=K.which}return!(!I||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K))&&(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:K}),this._showCursor(),this._coreService.triggerDataEvent(I,!0),!0)},L.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},L.prototype.resize=function(K,I){K!==this.cols||I!==this.rows?le.prototype.resize.call(this,K,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},L.prototype._afterResize=function(K,I){var z,X;(z=this._charSizeService)===null||z===void 0||z.measure(),(X=this.viewport)===null||X===void 0||X.syncScrollArea(!0)},L.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 K=1;K<this.rows;K++)this.buffer.lines.push(this.buffer.getBlankLine(E.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},L.prototype.reset=function(){var K,I;this.options.rows=this.rows,this.options.cols=this.cols;var z=this._customKeyEventHandler;this._setup(),le.prototype.reset.call(this),(K=this._selectionService)===null||K===void 0||K.reset(),this._customKeyEventHandler=z,this.refresh(0,this.rows-1),(I=this.viewport)===null||I===void 0||I.syncScrollArea()},L.prototype._reportWindowsOptions=function(K){if(this._renderService)switch(K){case r.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var I=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),z=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[4;"+z+";"+I+"t");break;case r.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var X=this._renderService.dimensions.scaledCellWidth.toFixed(0),Q=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[6;"+Q+";"+X+"t")}},L.prototype.cancel=function(K,I){if(this.options.cancelEvents||I)return K.preventDefault(),K.stopPropagation(),!1},L.prototype._visualBell=function(){return!1},L.prototype._soundBell=function(){return this.options.bellStyle==="sound"},L}(N.CoreTerminal);c.Terminal=Z},function(D,c,_){"use strict";var x=this&&this.__decorate||function(d,r,i,a){var t,f=arguments.length,e=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,r,i,a);else for(var n=d.length-1;n>=0;n--)(t=d[n])&&(e=(f<3?t(e):f>3?t(r,i,e):t(r,i))||e);return f>3&&e&&Object.defineProperty(r,i,e),e},m=this&&this.__param||function(d,r){return function(i,a){r(i,a,d)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;var h=_(5),o=_(1),u=function(){function d(r,i,a,t,f,e){this._textarea=r,this._compositionView=i,this._bufferService=a,this._optionsService=t,this._charSizeService=f,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(d.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),d.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},d.prototype.compositionupdate=function(r){var i=this;this._compositionView.textContent=r.data,this.updateCompositionElements(),setTimeout(function(){i._compositionPosition.end=i._textarea.value.length},0)},d.prototype.compositionend=function(){this._finalizeComposition(!0)},d.prototype.keydown=function(r){if(this._isComposing||this._isSendingComposition){if(r.keyCode===229||r.keyCode===16||r.keyCode===17||r.keyCode===18)return!1;this._finalizeComposition(!1)}return r.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},d.prototype._finalizeComposition=function(r){var i=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,r){var a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(i._isSendingComposition){i._isSendingComposition=!1;var f=void 0;f=i._isComposing?i._textarea.value.substring(a.start,a.end):i._textarea.value.substring(a.start),i._coreService.triggerDataEvent(f,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},d.prototype._handleAnyTextareaChanges=function(){var r=this,i=this._textarea.value;setTimeout(function(){if(!r._isComposing){var a=r._textarea.value.replace(i,"");a.length>0&&r._coreService.triggerDataEvent(a,!0)}},0)},d.prototype.updateCompositionElements=function(r){var i=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,f=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=f+"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=f+"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"}r||setTimeout(function(){return i.updateCompositionElements(!0)},0)}},d=x([m(2,o.IBufferService),m(3,o.IOptionsService),m(4,h.ICharSizeService),m(5,o.ICoreService)],d)}();c.CompositionHelper=u},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),h=this&&this.__decorate||function(t,f,e,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,f,e,n);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(p=(l<3?s(p):l>3?s(f,e,p):s(f,e))||p);return l>3&&p&&Object.defineProperty(f,e,p),p},o=this&&this.__param||function(t,f){return function(e,n){f(e,n,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;var u=_(2),d=_(7),r=_(5),i=_(1),a=function(t){function f(e,n,s,l,p,y,b){var g=t.call(this)||this;return g._scrollLines=e,g._viewportElement=n,g._scrollArea=s,g._bufferService=l,g._optionsService=p,g._charSizeService=y,g._renderService=b,g.scrollBarWidth=0,g._currentRowHeight=0,g._lastRecordedBufferLength=0,g._lastRecordedViewportHeight=0,g._lastRecordedBufferHeight=0,g._lastTouchY=0,g._lastScrollTop=0,g._wheelPartialScroll=0,g._refreshAnimationFrame=null,g._ignoreNextScrollEvent=!1,g.scrollBarWidth=g._viewportElement.offsetWidth-g._scrollArea.offsetWidth||15,g.register(d.addDisposableDomListener(g._viewportElement,"scroll",g._onScroll.bind(g))),setTimeout(function(){return g.syncScrollArea()},0),g}return m(f,t),f.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},f.prototype._refresh=function(e){var n=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return n._innerRefresh()}))},f.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 n=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==n&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=n),this._refreshAnimationFrame=null},f.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 n=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===n&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},f.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(n,!0)}},f.prototype._bubbleScroll=function(e,n){var s=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&s<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},f.prototype.onWheel=function(e){var n=this._getPixelsScrolled(e);return n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(e,n))},f.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var n=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n},f.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var n=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n},f.prototype._applyScrollModifier=function(e,n){var s=this._optionsService.options.fastScrollModifier;return s==="alt"&&n.altKey||s==="ctrl"&&n.ctrlKey||s==="shift"&&n.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},f.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},f.prototype.onTouchMove=function(e){var n=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(e,n))},f=h([o(3,i.IBufferService),o(4,i.IOptionsService),o(5,r.ICharSizeService),o(6,r.IRenderService)],f)}(u.Disposable);c.Viewport=a},function(D,c,_){"use strict";function x(u){return u.replace(/\r?\n/g,"\r")}function m(u,d){return d?"\x1B[200~"+u+"\x1B[201~":u}function h(u,d,r){u=m(u=x(u),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(u,!0),d.value=""}function o(u,d,r){var i=r.getBoundingClientRect(),a=u.clientX-i.left-10,t=u.clientY-i.top-10;d.style.width="20px",d.style.height="20px",d.style.left=a+"px",d.style.top=t+"px",d.style.zIndex="1000",d.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=x,c.bracketTextForPaste=m,c.copyHandler=function(u,d){u.clipboardData&&u.clipboardData.setData("text/plain",d.selectionText),u.preventDefault()},c.handlePasteEvent=function(u,d,r){u.stopPropagation(),u.clipboardData&&h(u.clipboardData.getData("text/plain"),d,r)},c.paste=h,c.moveTextAreaUnderMouseCursor=o,c.rightClickHandler=function(u,d,r,i,a){o(u,d,r),a&&!i.isClickInSelection(u)&&i.selectWordAtCursor(u),d.value=i.selectionText,d.select()}},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)});Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;var h=_(2),o=_(15),u=_(21),d=_(22),r=_(24),i=function(){function t(f){this.table=new Uint8Array(f)}return t.prototype.setDefault=function(f,e){o.fill(this.table,f<<4|e)},t.prototype.add=function(f,e,n,s){this.table[e<<8|f]=n<<4|s},t.prototype.addMany=function(f,e,n,s){for(var l=0;l<f.length;l++)this.table[e<<8|f[l]]=n<<4|s},t}();c.TransitionTable=i,c.VT500_TRANSITION_TABLE=function(){var t=new i(4095),f=Array.apply(null,Array(256)).map(function(y,b){return b}),e=function(y,b){return f.slice(y,b)},n=e(32,127),s=e(0,24);s.push(25),s.push.apply(s,e(28,32));var l,p=e(0,14);for(l in t.setDefault(1,0),t.addMany(n,0,2,0),p)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(s,0,3,0),t.addMany(s,1,3,1),t.add(127,1,0,1),t.addMany(s,8,0,8),t.addMany(s,3,3,3),t.add(127,3,0,3),t.addMany(s,4,3,4),t.add(127,4,0,4),t.addMany(s,6,3,6),t.addMany(s,5,3,5),t.add(127,5,0,5),t.addMany(s,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(n,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(n,7,0,7),t.addMany(s,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(s,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(s,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(s,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(s,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(s,13,13,13),t.addMany(n,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 f(e){e===void 0&&(e=c.VT500_TRANSITION_TABLE);var n=t.call(this)||this;return n._transitions=e,n.initialState=0,n.currentState=n.initialState,n._params=new u.Params,n._params.addParam(0),n._collect=0,n.precedingCodepoint=0,n._printHandlerFb=function(s,l,p){},n._executeHandlerFb=function(s){},n._csiHandlerFb=function(s,l){},n._escHandlerFb=function(s){},n._errorHandlerFb=function(s){return s},n._printHandler=n._printHandlerFb,n._executeHandlers=Object.create(null),n._csiHandlers=Object.create(null),n._escHandlers=Object.create(null),n._oscParser=new d.OscParser,n._dcsParser=new r.DcsParser,n._errorHandler=n._errorHandlerFb,n.setEscHandler({final:"\\"},function(){}),n}return m(f,t),f.prototype._identifier=function(e,n){n===void 0&&(n=[64,126]);var s=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((s=e.prefix.charCodeAt(0))&&60>s||s>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 p=e.intermediates.charCodeAt(l);if(32>p||p>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");s<<=8,s|=p}}if(e.final.length!==1)throw new Error("final must be a single byte");var y=e.final.charCodeAt(0);if(n[0]>y||y>n[1])throw new Error("final must be in range "+n[0]+" .. "+n[1]);return s<<=8,s|=y},f.prototype.identToString=function(e){for(var n=[];e;)n.push(String.fromCharCode(255&e)),e>>=8;return n.reverse().join("")},f.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},f.prototype.setPrintHandler=function(e){this._printHandler=e},f.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},f.prototype.addEscHandler=function(e,n){var s=this._identifier(e,[48,126]);this._escHandlers[s]===void 0&&(this._escHandlers[s]=[]);var l=this._escHandlers[s];return l.push(n),{dispose:function(){var p=l.indexOf(n);p!==-1&&l.splice(p,1)}}},f.prototype.setEscHandler=function(e,n){this._escHandlers[this._identifier(e,[48,126])]=[n]},f.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},f.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},f.prototype.setExecuteHandler=function(e,n){this._executeHandlers[e.charCodeAt(0)]=n},f.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},f.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},f.prototype.addCsiHandler=function(e,n){var s=this._identifier(e);this._csiHandlers[s]===void 0&&(this._csiHandlers[s]=[]);var l=this._csiHandlers[s];return l.push(n),{dispose:function(){var p=l.indexOf(n);p!==-1&&l.splice(p,1)}}},f.prototype.setCsiHandler=function(e,n){this._csiHandlers[this._identifier(e)]=[n]},f.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},f.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},f.prototype.addDcsHandler=function(e,n){return this._dcsParser.addHandler(this._identifier(e),n)},f.prototype.setDcsHandler=function(e,n){this._dcsParser.setHandler(this._identifier(e),n)},f.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},f.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},f.prototype.addOscHandler=function(e,n){return this._oscParser.addHandler(e,n)},f.prototype.setOscHandler=function(e,n){this._oscParser.setHandler(e,n)},f.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},f.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},f.prototype.setErrorHandler=function(e){this._errorHandler=e},f.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},f.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},f.prototype.parse=function(e,n){for(var s=0,l=0,p=this.currentState,y=this._oscParser,b=this._dcsParser,g=this._collect,E=this._params,C=this._transitions.table,v=0;v<n;++v){switch((l=C[p<<8|((s=e[v])<160?s:160)])>>4){case 2:for(var S=v+1;;++S){if(S>=n||(s=e[S])<32||s>126&&s<160){this._printHandler(e,v,S),v=S-1;break}if(++S>=n||(s=e[S])<32||s>126&&s<160){this._printHandler(e,v,S),v=S-1;break}if(++S>=n||(s=e[S])<32||s>126&&s<160){this._printHandler(e,v,S),v=S-1;break}if(++S>=n||(s=e[S])<32||s>126&&s<160){this._printHandler(e,v,S),v=S-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:s,currentState:p,collect:g,params:E,abort:!1}).abort)return;break;case 7:for(var k=this._csiHandlers[g<<8|s],O=k?k.length-1:-1;O>=0&&k[O](E)===!1;O--);O<0&&this._csiHandlerFb(g<<8|s,E),this.precedingCodepoint=0;break;case 8:do switch(s){case 59:E.addParam(0);break;case 58:E.addSubParam(-1);break;default:E.addDigit(s-48)}while(++v<n&&(s=e[v])>47&&s<60);v--;break;case 9:g<<=8,g|=s;break;case 10:for(var R=this._escHandlers[g<<8|s],U=R?R.length-1:-1;U>=0&&R[U]()===!1;U--);U<0&&this._escHandlerFb(g<<8|s),this.precedingCodepoint=0;break;case 11:E.reset(),E.addParam(0),g=0;break;case 12:b.hook(g<<8|s,E);break;case 13:for(var N=v+1;;++N)if(N>=n||(s=e[N])===24||s===26||s===27||s>127&&s<160){b.put(e,v,N),v=N-1;break}break;case 14:b.unhook(s!==24&&s!==26),s===27&&(l|=1),E.reset(),E.addParam(0),g=0,this.precedingCodepoint=0;break;case 4:y.start();break;case 5:for(var pe=v+1;;pe++)if(pe>=n||(s=e[pe])<32||s>127&&s<=159){y.put(e,v,pe),v=pe-1;break}break;case 6:y.end(s!==24&&s!==26),s===27&&(l|=1),E.reset(),E.addParam(0),g=0,this.precedingCodepoint=0}p=15&l}this._collect=g,this.currentState=p},f}(h.Disposable);c.EscapeSequenceParser=a},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(y,b){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,E){g.__proto__=E}||function(g,E){for(var C in E)E.hasOwnProperty(C)&&(g[C]=E[C])})(y,b)},function(y,b){function g(){this.constructor=y}x(y,b),y.prototype=b===null?Object.create(b):(g.prototype=b.prototype,new g)}),h=this&&this.__decorate||function(y,b,g,E){var C,v=arguments.length,S=v<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,b,g,E);else for(var k=y.length-1;k>=0;k--)(C=y[k])&&(S=(v<3?C(S):v>3?C(b,g,S):C(b,g))||S);return v>3&&S&&Object.defineProperty(b,g,S),S},o=this&&this.__param||function(y,b){return function(g,E){b(g,E,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Renderer=void 0;var u=_(41),d=_(47),r=_(48),i=_(49),a=_(29),t=_(2),f=_(5),e=_(1),n=_(25),s=_(0),l=1,p=function(y){function b(g,E,C,v,S,k,O,R,U){var N=y.call(this)||this;N._colors=g,N._screenElement=E,N._bufferService=S,N._charSizeService=k,N._optionsService=O,N._id=l++,N._onRequestRedraw=new s.EventEmitter;var pe=N._optionsService.options.allowTransparency;return N._characterJoinerRegistry=new a.CharacterJoinerRegistry(N._bufferService),N._renderLayers=[new u.TextRenderLayer(N._screenElement,0,N._colors,N._characterJoinerRegistry,pe,N._id,N._bufferService,O),new d.SelectionRenderLayer(N._screenElement,1,N._colors,N._id,N._bufferService,O),new i.LinkRenderLayer(N._screenElement,2,N._colors,N._id,C,v,N._bufferService,O),new r.CursorRenderLayer(N._screenElement,3,N._colors,N._id,N._onRequestRedraw,N._bufferService,O,R,U)],N.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},N._devicePixelRatio=window.devicePixelRatio,N._updateDimensions(),N.onOptionsChanged(),N}return m(b,y),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){for(var g=0,E=this._renderLayers;g<E.length;g++)E[g].dispose();y.prototype.dispose.call(this),n.removeTerminalFromCache(this._id)},b.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},b.prototype.setColors=function(g){this._colors=g;for(var E=0,C=this._renderLayers;E<C.length;E++){var v=C[E];v.setColors(this._colors),v.reset()}},b.prototype.onResize=function(g,E){this._updateDimensions();for(var C=0,v=this._renderLayers;C<v.length;C++)v[C].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},b.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},b.prototype.onBlur=function(){this._runOperation(function(g){return g.onBlur()})},b.prototype.onFocus=function(){this._runOperation(function(g){return g.onFocus()})},b.prototype.onSelectionChanged=function(g,E,C){C===void 0&&(C=!1),this._runOperation(function(v){return v.onSelectionChanged(g,E,C)})},b.prototype.onCursorMove=function(){this._runOperation(function(g){return g.onCursorMove()})},b.prototype.onOptionsChanged=function(){this._runOperation(function(g){return g.onOptionsChanged()})},b.prototype.clear=function(){this._runOperation(function(g){return g.reset()})},b.prototype._runOperation=function(g){for(var E=0,C=this._renderLayers;E<C.length;E++)g(C[E])},b.prototype.renderRows=function(g,E){for(var C=0,v=this._renderLayers;C<v.length;C++)v[C].onGridChanged(g,E)},b.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)},b.prototype.registerCharacterJoiner=function(g){return this._characterJoinerRegistry.registerCharacterJoiner(g)},b.prototype.deregisterCharacterJoiner=function(g){return this._characterJoinerRegistry.deregisterCharacterJoiner(g)},b=h([o(4,e.IBufferService),o(5,f.ICharSizeService),o(6,e.IOptionsService),o(7,e.ICoreService),o(8,f.ICoreBrowserService)],b)}(t.Disposable);c.Renderer=p},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)});Object.defineProperty(c,"__esModule",{value:!0}),c.TextRenderLayer=void 0;var h=_(42),o=_(13),u=_(6),d=_(3),r=_(29),i=_(4),a=function(t){function f(e,n,s,l,p,y,b,g){var E=t.call(this,e,"text",n,p,s,y,b,g)||this;return E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new i.CellData,E._state=new h.GridCache,E._characterJoinerRegistry=l,E}return m(f,t),f.prototype.resize=function(e){t.prototype.resize.call(this,e);var n=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===n||(this._characterWidth=e.scaledCharWidth,this._characterFont=n,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},f.prototype.reset=function(){this._state.clear(),this._clearAll()},f.prototype._forEachCell=function(e,n,s,l){for(var p=e;p<=n;p++)for(var y=p+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.lines.get(y),g=s?s.getJoinedCharacters(y):[],E=0;E<this._bufferService.cols;E++){b.loadCell(E,this._workCell);var C=this._workCell,v=!1,S=E;if(C.getWidth()!==0){if(g.length>0&&E===g[0][0]){v=!0;var k=g.shift();C=new r.JoinedCellData(this._workCell,b.translateToString(!0,k[0],k[1]),k[1]-k[0]),S=k[1]-1}!v&&this._isOverlapping(C)&&S<b.length-1&&b.getCodePoint(S+1)===d.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=2<<22),l(C,E,p),E=S}}},f.prototype._drawBackground=function(e,n){var s=this,l=this._ctx,p=this._bufferService.cols,y=0,b=0,g=null;l.save(),this._forEachCell(e,n,null,function(E,C,v){var S=null;E.isInverse()?S=E.isFgDefault()?s._colors.foreground.css:E.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(E.getFgColor()).join(",")+")":s._colors.ansi[E.getFgColor()].css:E.isBgRGB()?S="rgb("+u.AttributeData.toColorRGB(E.getBgColor()).join(",")+")":E.isBgPalette()&&(S=s._colors.ansi[E.getBgColor()].css),g===null&&(y=C,b=v),v!==b?(l.fillStyle=g||"",s._fillCells(y,b,p-y,1),y=C,b=v):g!==S&&(l.fillStyle=g||"",s._fillCells(y,b,C-y,1),y=C,b=v),g=S}),g!==null&&(l.fillStyle=g,this._fillCells(y,b,p-y,1)),l.restore()},f.prototype._drawForeground=function(e,n){var s=this;this._forEachCell(e,n,this._characterJoinerRegistry,function(l,p,y){if(!l.isInvisible()&&(s._drawChars(l,p,y),l.isUnderline())){if(s._ctx.save(),l.isInverse())if(l.isBgDefault())s._ctx.fillStyle=s._colors.background.css;else if(l.isBgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getBgColor()).join(",")+")";else{var b=l.getBgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&b<8&&(b+=8),s._ctx.fillStyle=s._colors.ansi[b].css}else if(l.isFgDefault())s._ctx.fillStyle=s._colors.foreground.css;else if(l.isFgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getFgColor()).join(",")+")";else{var g=l.getFgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&g<8&&(g+=8),s._ctx.fillStyle=s._colors.ansi[g].css}s._fillBottomLineAtCells(p,y,l.getWidth()),s._ctx.restore()}})},f.prototype.onGridChanged=function(e,n){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,n-e+1),this._drawBackground(e,n),this._drawForeground(e,n))},f.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},f.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var n=e.getChars();if(this._characterOverlapCache.hasOwnProperty(n))return this._characterOverlapCache[n];this._ctx.save(),this._ctx.font=this._characterFont;var s=Math.floor(this._ctx.measureText(n).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[n]=s,s},f}(o.BaseRenderLayer);c.TextRenderLayer=a},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.GridCache=void 0;var x=function(){function m(){this.cache=[]}return m.prototype.resize=function(h,o){for(var u=0;u<h;u++){this.cache.length<=u&&this.cache.push([]);for(var d=this.cache[u].length;d<o;d++)this.cache[u].push(void 0);this.cache[u].length=o}this.cache.length=h},m.prototype.clear=function(){for(var h=0;h<this.cache.length;h++)for(var o=0;o<this.cache[h].length;o++)this.cache[h][o]=void 0},m}();c.GridCache=x},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(s,l){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,y){p.__proto__=y}||function(p,y){for(var b in y)y.hasOwnProperty(b)&&(p[b]=y[b])})(s,l)},function(s,l){function p(){this.constructor=s}x(s,l),s.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)});Object.defineProperty(c,"__esModule",{value:!0}),c.NoneCharAtlas=c.DynamicCharAtlas=c.getGlyphCacheKey=void 0;var h=_(9),o=_(44),u=_(27),d=_(46),r=_(11),i=_(28),a=_(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function f(s){return s.code<<21|s.bg<<12|s.fg<<3|(s.bold?0:4)+(s.dim?0:2)+(s.italic?0:1)}c.getGlyphCacheKey=f;var e=function(s){function l(p,y){var b=s.call(this)||this;b._config=y,b._drawToCacheCount=0,b._glyphsWaitingOnBitmap=[],b._bitmapCommitTimeout=null,b._bitmap=null,b._cacheCanvas=p.createElement("canvas"),b._cacheCanvas.width=1024,b._cacheCanvas.height=1024,b._cacheCtx=i.throwIfFalsy(b._cacheCanvas.getContext("2d",{alpha:!0}));var g=p.createElement("canvas");g.width=b._config.scaledCharWidth,g.height=b._config.scaledCharHeight,b._tmpCtx=i.throwIfFalsy(g.getContext("2d",{alpha:b._config.allowTransparency})),b._width=Math.floor(1024/b._config.scaledCharWidth),b._height=Math.floor(1024/b._config.scaledCharHeight);var E=b._width*b._height;return b._cacheMap=new d.LRUMap(E),b._cacheMap.prealloc(E),b}return m(l,s),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(p,y,b,g){if(y.code===32)return!0;if(!this._canCache(y))return!1;var E=f(y),C=this._cacheMap.get(E);if(C!=null)return this._drawFromCache(p,C,b,g),!0;if(this._drawToCacheCount<100){var v=void 0;v=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var S=this._drawToCache(y,v);return this._cacheMap.set(E,S),this._drawFromCache(p,S,b,g),!0}return!1},l.prototype._canCache=function(p){return p.code<256},l.prototype._toCoordinateX=function(p){return p%this._width*this._config.scaledCharWidth},l.prototype._toCoordinateY=function(p){return Math.floor(p/this._width)*this._config.scaledCharHeight},l.prototype._drawFromCache=function(p,y,b,g){if(!y.isEmpty){var E=this._toCoordinateX(y.index),C=this._toCoordinateY(y.index);p.drawImage(y.inBitmap?this._bitmap:this._cacheCanvas,E,C,this._config.scaledCharWidth,this._config.scaledCharHeight,b,g,this._config.scaledCharWidth,this._config.scaledCharHeight)}},l.prototype._getColorFromAnsiIndex=function(p){return p<this._config.colors.ansi.length?this._config.colors.ansi[p]:u.DEFAULT_ANSI_COLORS[p]},l.prototype._getBackgroundColor=function(p){return this._config.allowTransparency?t:p.bg===h.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:p.bg<256?this._getColorFromAnsiIndex(p.bg):this._config.colors.background},l.prototype._getForegroundColor=function(p){return p.fg===h.INVERTED_DEFAULT_COLOR?a.color.opaque(this._config.colors.background):p.fg<256?this._getColorFromAnsiIndex(p.fg):this._config.colors.foreground},l.prototype._drawToCache=function(p,y){this._drawToCacheCount++,this._tmpCtx.save();var b=this._getBackgroundColor(p);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=b.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var g=p.bold?this._config.fontWeightBold:this._config.fontWeight,E=p.italic?"italic":"";this._tmpCtx.font=E+" "+g+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(p).css,p.dim&&(this._tmpCtx.globalAlpha=h.DIM_OPACITY),this._tmpCtx.fillText(p.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var C=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),v=!1;this._config.allowTransparency||(v=function(R,U){for(var N=!0,pe=U.rgba>>>24,Z=U.rgba>>>16&255,le=U.rgba>>>8&255,L=0;L<R.data.length;L+=4)R.data[L]===pe&&R.data[L+1]===Z&&R.data[L+2]===le?R.data[L+3]=0:N=!1;return N}(C,b));var S=this._toCoordinateX(y),k=this._toCoordinateY(y);this._cacheCtx.putImageData(C,S,k);var O={index:y,isEmpty:v,inBitmap:!1};return this._addGlyphToBitmap(O),O},l.prototype._addGlyphToBitmap=function(p){var y=this;!("createImageBitmap"in window)||r.isFirefox||r.isSafari||(this._glyphsWaitingOnBitmap.push(p),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return y._generateBitmap()},100)))},l.prototype._generateBitmap=function(){var p=this,y=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(b){p._bitmap=b;for(var g=0;g<y.length;g++)y[g].inBitmap=!0}),this._bitmapCommitTimeout=null},l}(o.BaseCharAtlas);c.DynamicCharAtlas=e;var n=function(s){function l(p,y){return s.call(this)||this}return m(l,s),l.prototype.draw=function(p,y,b,g){return!1},l}(o.BaseCharAtlas);c.NoneCharAtlas=n},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BaseCharAtlas=void 0;var x=function(){function m(){this._didWarmUp=!1}return m.prototype.dispose=function(){},m.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},m.prototype._doWarmUp=function(){},m.prototype.beginFrame=function(){},m}();c.BaseCharAtlas=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var x=function(){function m(){this._color={},this._rgba={}}return m.prototype.clear=function(){this._color={},this._rgba={}},m.prototype.setCss=function(h,o,u){this._rgba[h]||(this._rgba[h]={}),this._rgba[h][o]=u},m.prototype.getCss=function(h,o){return this._rgba[h]?this._rgba[h][o]:void 0},m.prototype.setColor=function(h,o,u){this._color[h]||(this._color[h]={}),this._color[h][o]=u},m.prototype.getColor=function(h,o){return this._color[h]?this._color[h][o]:void 0},m}();c.ColorContrastCache=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.LRUMap=void 0;var x=function(){function m(h){this.capacity=h,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return m.prototype._unlinkNode=function(h){var o=h.prev,u=h.next;h===this._head&&(this._head=u),h===this._tail&&(this._tail=o),o!==null&&(o.next=u),u!==null&&(u.prev=o)},m.prototype._appendNode=function(h){var o=this._tail;o!==null&&(o.next=h),h.prev=o,h.next=null,this._tail=h,this._head===null&&(this._head=h)},m.prototype.prealloc=function(h){for(var o=this._nodePool,u=0;u<h;u++)o.push({prev:null,next:null,key:null,value:null})},m.prototype.get=function(h){var o=this._map[h];return o!==void 0?(this._unlinkNode(o),this._appendNode(o),o.value):null},m.prototype.peekValue=function(h){var o=this._map[h];return o!==void 0?o.value:null},m.prototype.peek=function(){var h=this._head;return h===null?null:h.value},m.prototype.set=function(h,o){var u=this._map[h];if(u!==void 0)u=this._map[h],this._unlinkNode(u),u.value=o;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=h,u.value=o,this._map[h]=u;else{var d=this._nodePool;d.length>0?((u=d.pop()).key=h,u.value=o):u={prev:null,next:null,key:h,value:o},this._map[h]=u,this.size++}this._appendNode(u)},m}();c.LRUMap=x},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(o,u){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,r){d.__proto__=r}||function(d,r){for(var i in r)r.hasOwnProperty(i)&&(d[i]=r[i])})(o,u)},function(o,u){function d(){this.constructor=o}x(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionRenderLayer=void 0;var h=function(o){function u(d,r,i,a,t,f){var e=o.call(this,d,"selection",r,!0,i,a,t,f)||this;return e._clearState(),e}return m(u,o),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(d){o.prototype.resize.call(this,d),this._clearState()},u.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},u.prototype.onSelectionChanged=function(d,r,i){if(this._didStateChange(d,r,i,this._bufferService.buffer.ydisp))if(this._clearAll(),d&&r){var a=d[1]-this._bufferService.buffer.ydisp,t=r[1]-this._bufferService.buffer.ydisp,f=Math.max(a,0),e=Math.min(t,this._bufferService.rows-1);if(!(f>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,i){var n=d[0],s=r[0]-n,l=e-f+1;this._fillCells(n,f,s,l)}else{n=a===f?d[0]:0;var p=f===e?r[0]:this._bufferService.cols;this._fillCells(n,f,p-n,1);var y=Math.max(e-f-1,0);if(this._fillCells(0,f+1,this._bufferService.cols,y),f!==e){var b=t===e?r[0]:this._bufferService.cols;this._fillCells(0,e,b,1)}}this._state.start=[d[0],d[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(d,r,i,a){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||i!==this._state.columnSelectMode||a!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(d,r){return!(!d||!r)&&d[0]===r[0]&&d[1]===r[1]},u}(_(13).BaseRenderLayer);c.SelectionRenderLayer=h},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(r,i){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,i)},function(r,i){function a(){this.constructor=r}x(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.CursorRenderLayer=void 0;var h=_(13),o=_(4),u=function(r){function i(a,t,f,e,n,s,l,p,y){var b=r.call(this,a,"cursor",t,!0,f,e,s,l)||this;return b._onRequestRedraw=n,b._coreService=p,b._coreBrowserService=y,b._cell=new o.CellData,b._state={x:0,y:0,isFocused:!1,style:"",width:0},b._cursorRenderers={bar:b._renderBarCursor.bind(b),block:b._renderBlockCursor.bind(b),underline:b._renderUnderlineCursor.bind(b)},b}return m(i,r),i.prototype.resize=function(a){r.prototype.resize.call(this,a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},i.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},i.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onOptionsChanged=function(){var a,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(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})},i.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype.onGridChanged=function(a,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,f=t-this._bufferService.buffer.ydisp;if(f<0||f>=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 n=this._optionsService.options.cursorStyle;return n&&n!=="block"?this._cursorRenderers[n](e,f,this._cell):this._renderBlurCursor(e,f,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=f,this._state.isFocused=!1,this._state.style=n,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===f&&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,f,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=f,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},i.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})},i.prototype._renderBarCursor=function(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,t,this._optionsService.options.cursorWidth),this._ctx.restore()},i.prototype._renderBlockCursor=function(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,t,f.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(f,a,t),this._ctx.restore()},i.prototype._renderUnderlineCursor=function(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,t),this._ctx.restore()},i.prototype._renderBlurCursor=function(a,t,f){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,t,f.getWidth(),1),this._ctx.restore()},i}(h.BaseRenderLayer);c.CursorRenderLayer=u;var d=function(){function r(i,a){this._renderCallback=a,this.isCursorVisible=!0,i&&this._restartInterval()}return Object.defineProperty(r.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),r.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)},r.prototype.restartBlinkAnimation=function(){var i=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})))},r.prototype._restartInterval=function(i){var a=this;i===void 0&&(i=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 f=600-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(f)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},600)},i)},r.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)},r.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},r}()},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(r,i){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,i)},function(r,i){function a(){this.constructor=r}x(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.LinkRenderLayer=void 0;var h=_(13),o=_(9),u=_(26),d=function(r){function i(a,t,f,e,n,s,l,p){var y=r.call(this,a,"link",t,!0,f,e,l,p)||this;return n.onShowLinkUnderline(function(b){return y._onShowLinkUnderline(b)}),n.onHideLinkUnderline(function(b){return y._onHideLinkUnderline(b)}),s.onShowLinkUnderline(function(b){return y._onShowLinkUnderline(b)}),s.onHideLinkUnderline(function(b){return y._onHideLinkUnderline(b)}),y}return m(i,r),i.prototype.resize=function(a){r.prototype.resize.call(this,a),this._state=void 0},i.prototype.reset=function(){this._clearCurrentLink()},i.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var 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}},i.prototype._onShowLinkUnderline=function(a){if(a.fg===o.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},i.prototype._onHideLinkUnderline=function(a){this._clearCurrentLink()},i}(h.BaseRenderLayer);c.LinkRenderLayer=d},function(D,c,_){"use strict";var x=this&&this.__decorate||function(r,i,a,t){var f,e=arguments.length,n=e<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,a,t);else for(var s=r.length-1;s>=0;s--)(f=r[s])&&(n=(e<3?f(n):e>3?f(i,a,n):f(i,a))||n);return e>3&&n&&Object.defineProperty(i,a,n),n},m=this&&this.__param||function(r,i){return function(a,t){i(a,t,r)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var h=_(0),o=_(1),u=function(){function r(i,a,t){this._bufferService=i,this._logService=a,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new h.EventEmitter,this._onHideLinkUnderline=new h.EventEmitter,this._onLinkTooltip=new h.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(r.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),r.prototype.attachToDom=function(i,a){this._element=i,this._mouseZoneManager=a},r.prototype.linkifyRows=function(i,a){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=i,this._rowsToLinkify.end=a):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,i),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,a)),this._mouseZoneManager.clearAll(i,a),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},r._timeBeforeLatency))},r.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var i=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var a=i.ydisp+this._rowsToLinkify.start;if(!(a>=i.lines.length)){for(var t=i.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,f=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,a,t,f,f);e.hasNext();)for(var n=e.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(n.range.first,n.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},r.prototype.registerLinkMatcher=function(i,a,t){if(t===void 0&&(t={}),!a)throw new Error("handler must be defined");var f={id:this._nextLinkMatcherId++,regex:i,handler:a,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(f),f.id},r.prototype._addLinkMatcherToList=function(i){if(this._linkMatchers.length!==0){for(var a=this._linkMatchers.length-1;a>=0;a--)if(i.priority<=this._linkMatchers[a].priority)return void this._linkMatchers.splice(a+1,0,i);this._linkMatchers.splice(0,0,i)}else this._linkMatchers.push(i)},r.prototype.deregisterLinkMatcher=function(i){for(var a=0;a<this._linkMatchers.length;a++)if(this._linkMatchers[a].id===i)return this._linkMatchers.splice(a,1),!0;return!1},r.prototype._doLinkifyRow=function(i,a,t){for(var f,e=this,n=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),s=-1,l=function(){var y=f[typeof t.matchIndex!="number"?0:t.matchIndex];if(!y)return p._logService.debug("match found without corresponding matchIndex",f,t),"break";if(s=a.indexOf(y,s+1),n.lastIndex=s+y.length,s<0)return"break";var b=p._bufferService.buffer.stringIndexToBufferIndex(i,s);if(b[0]<0)return"break";var g=p._bufferService.buffer.lines.get(b[0]);if(!g)return"break";var E=g.getFg(b[1]),C=E?E>>9&511:void 0;t.validationCallback?t.validationCallback(y,function(v){e._rowsTimeoutId||v&&e._addLink(b[1],b[0]-e._bufferService.buffer.ydisp,y,t,C)}):p._addLink(b[1],b[0]-p._bufferService.buffer.ydisp,y,t,C)},p=this;(f=n.exec(a))!==null&&l()!=="break";);},r.prototype._addLink=function(i,a,t,f,e){var n=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(t),l=i%this._bufferService.cols,p=a+Math.floor(i/this._bufferService.cols),y=(l+s)%this._bufferService.cols,b=p+Math.floor((l+s)/this._bufferService.cols);y===0&&(y=this._bufferService.cols,b--),this._mouseZoneManager.add(new d(l+1,p+1,y+1,b+1,function(g){if(f.handler)return f.handler(g,t);var E=window.open();E?(E.opener=null,E.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){n._onShowLinkUnderline.fire(n._createLinkHoverEvent(l,p,y,b,e)),n._element.classList.add("xterm-cursor-pointer")},function(g){n._onLinkTooltip.fire(n._createLinkHoverEvent(l,p,y,b,e)),f.hoverTooltipCallback&&f.hoverTooltipCallback(g,t,{start:{x:l,y:p},end:{x:y,y:b}})},function(){n._onHideLinkUnderline.fire(n._createLinkHoverEvent(l,p,y,b,e)),n._element.classList.remove("xterm-cursor-pointer"),f.hoverLeaveCallback&&f.hoverLeaveCallback()},function(g){return!f.willLinkActivate||f.willLinkActivate(g,t)}))}},r.prototype._createLinkHoverEvent=function(i,a,t,f,e){return{x1:i,y1:a,x2:t,y2:f,cols:this._bufferService.cols,fg:e}},r._timeBeforeLatency=200,r=x([m(0,o.IBufferService),m(1,o.ILogService),m(2,o.IUnicodeService)],r)}();c.Linkifier=u;var d=function(r,i,a,t,f,e,n,s,l){this.x1=r,this.y1=i,this.x2=a,this.y2=t,this.clickCallback=f,this.hoverCallback=e,this.tooltipCallback=n,this.leaveCallback=s,this.willLinkActivate=l};c.MouseZone=d},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(y,b){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,E){g.__proto__=E}||function(g,E){for(var C in E)E.hasOwnProperty(C)&&(g[C]=E[C])})(y,b)},function(y,b){function g(){this.constructor=y}x(y,b),y.prototype=b===null?Object.create(b):(g.prototype=b.prototype,new g)}),h=this&&this.__decorate||function(y,b,g,E){var C,v=arguments.length,S=v<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,b,g,E);else for(var k=y.length-1;k>=0;k--)(C=y[k])&&(S=(v<3?C(S):v>3?C(b,g,S):C(b,g))||S);return v>3&&S&&Object.defineProperty(b,g,S),S},o=this&&this.__param||function(y,b){return function(g,E){b(g,E,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;var u=_(11),d=_(52),r=_(4),i=_(0),a=_(5),t=_(1),f=_(30),e=_(53),n=_(2),s="\xA0",l=new RegExp(s,"g"),p=function(y){function b(g,E,C,v,S,k,O){var R=y.call(this)||this;return R._element=g,R._screenElement=E,R._bufferService=C,R._coreService=v,R._mouseService=S,R._optionsService=k,R._renderService=O,R._dragScrollAmount=0,R._enabled=!0,R._workCell=new r.CellData,R._mouseDownTimeStamp=0,R._onLinuxMouseSelection=R.register(new i.EventEmitter),R._onRedrawRequest=R.register(new i.EventEmitter),R._onSelectionChange=R.register(new i.EventEmitter),R._onRequestScrollLines=R.register(new i.EventEmitter),R._mouseMoveListener=function(U){return R._onMouseMove(U)},R._mouseUpListener=function(U){return R._onMouseUp(U)},R._coreService.onUserInput(function(){R.hasSelection&&R.clearSelection()}),R._trimListener=R._bufferService.buffer.lines.onTrim(function(U){return R._onTrim(U)}),R.register(R._bufferService.buffers.onBufferActivate(function(U){return R._onBufferActivate(U)})),R.enable(),R._model=new d.SelectionModel(R._bufferService),R._activeSelectionMode=0,R}return m(b,y),Object.defineProperty(b.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._removeMouseDownListeners()},b.prototype.reset=function(){this.clearSelection()},b.prototype.disable=function(){this.clearSelection(),this._enabled=!1},b.prototype.enable=function(){this._enabled=!0},Object.defineProperty(b.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"hasSelection",{get:function(){var g=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!g||!E)&&(g[0]!==E[0]||g[1]!==E[1])},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionText",{get:function(){var g=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!g||!E)return"";var C=this._bufferService.buffer,v=[];if(this._activeSelectionMode===3){if(g[0]===E[0])return"";for(var S=g[1];S<=E[1];S++){var k=C.translateBufferLineToString(S,!0,g[0],E[0]);v.push(k)}}else{var O=g[1]===E[1]?E[0]:void 0;for(v.push(C.translateBufferLineToString(g[1],!0,g[0],O)),S=g[1]+1;S<=E[1]-1;S++){var R=C.lines.get(S);k=C.translateBufferLineToString(S,!0),R&&R.isWrapped?v[v.length-1]+=k:v.push(k)}g[1]!==E[1]&&(R=C.lines.get(E[1]),k=C.translateBufferLineToString(E[1],!0,0,E[0]),R&&R.isWrapped?v[v.length-1]+=k:v.push(k))}return v.map(function(U){return U.replace(l," ")}).join(u.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),b.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},b.prototype.refresh=function(g){var E=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return E._refresh()})),u.isLinux&&g&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},b.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},b.prototype.isClickInSelection=function(g){var E=this._getMouseBufferCoords(g),C=this._model.finalSelectionStart,v=this._model.finalSelectionEnd;return!!(C&&v&&E)&&this._areCoordsInSelection(E,C,v)},b.prototype._areCoordsInSelection=function(g,E,C){return g[1]>E[1]&&g[1]<C[1]||E[1]===C[1]&&g[1]===E[1]&&g[0]>=E[0]&&g[0]<C[0]||E[1]<C[1]&&g[1]===C[1]&&g[0]<C[0]||E[1]<C[1]&&g[1]===E[1]&&g[0]>=E[0]},b.prototype.selectWordAtCursor=function(g){var E=this._getMouseBufferCoords(g);E&&(this._selectWordAt(E,!1),this._model.selectionEnd=void 0,this.refresh(!0))},b.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},b.prototype.selectLines=function(g,E){this._model.clearSelection(),g=Math.max(g,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()},b.prototype._onTrim=function(g){this._model.onTrim(g)&&this.refresh()},b.prototype._getMouseBufferCoords=function(g){var E=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E},b.prototype._getMouseEventScrollAmount=function(g){var E=f.getCoordsRelativeToElement(g,this._screenElement)[1],C=this._renderService.dimensions.canvasHeight;return E>=0&&E<=C?0:(E>C&&(E-=C),E=Math.min(Math.max(E,-50),50),(E/=50)/Math.abs(E)+Math.round(14*E))},b.prototype.shouldForceSelection=function(g){return u.isMac?g.altKey&&this._optionsService.options.macOptionClickForcesSelection:g.shiftKey},b.prototype.onMouseDown=function(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._onIncrementalClick(g):g.detail===1?this._onSingleClick(g):g.detail===2?this._onDoubleClick(g):g.detail===3&&this._onTripleClick(g),this._addMouseDownListeners(),this.refresh(!0)}},b.prototype._addMouseDownListeners=function(){var g=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return g._dragScroll()},50)},b.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},b.prototype._onIncrementalClick=function(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))},b.prototype._onSingleClick=function(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),this._model.selectionStart){this._model.selectionEnd=void 0;var E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},b.prototype._onDoubleClick=function(g){var E=this._getMouseBufferCoords(g);E&&(this._activeSelectionMode=1,this._selectWordAt(E,!0))},b.prototype._onTripleClick=function(g){var E=this._getMouseBufferCoords(g);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))},b.prototype.shouldColumnSelect=function(g){return g.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},b.prototype._onMouseMove=function(g){if(g.stopImmediatePropagation(),this._model.selectionStart){var E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){var v=C.lines.get(this._model.selectionEnd[1]);v&&v.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},b.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}},b.prototype._onMouseUp=function(g){var E=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&g.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var C=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){var v=e.moveToCellSequence(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(v,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},b.prototype._onBufferActivate=function(g){var E=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(function(C){return E._onTrim(C)})},b.prototype._convertViewportColToCharacterIndex=function(g,E){for(var C=E[0],v=0;E[0]>=v;v++){var S=g.loadCell(v,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:S>1&&E[0]!==v&&(C+=S-1)}return C},b.prototype.setSelection=function(g,E,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,E],this._model.selectionStartLength=C,this.refresh()},b.prototype._getWordAt=function(g,E,C,v){if(C===void 0&&(C=!0),v===void 0&&(v=!0),!(g[0]>=this._bufferService.cols)){var S=this._bufferService.buffer,k=S.lines.get(g[1]);if(k){var O=S.translateBufferLineToString(g[1],!1),R=this._convertViewportColToCharacterIndex(k,g),U=R,N=g[0]-R,pe=0,Z=0,le=0,L=0;if(O.charAt(R)===" "){for(;R>0&&O.charAt(R-1)===" ";)R--;for(;U<O.length&&O.charAt(U+1)===" ";)U++}else{var K=g[0],I=g[0];k.getWidth(K)===0&&(pe++,K--),k.getWidth(I)===2&&(Z++,I++);var z=k.getString(I).length;for(z>1&&(L+=z-1,U+=z-1);K>0&&R>0&&!this._isCharWordSeparator(k.loadCell(K-1,this._workCell));){k.loadCell(K-1,this._workCell);var X=this._workCell.getChars().length;this._workCell.getWidth()===0?(pe++,K--):X>1&&(le+=X-1,R-=X-1),R--,K--}for(;I<k.length&&U+1<O.length&&!this._isCharWordSeparator(k.loadCell(I+1,this._workCell));){k.loadCell(I+1,this._workCell);var Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(Z++,I++):Q>1&&(L+=Q-1,U+=Q-1),U++,I++}}U++;var ce=R+N-pe+le,ye=Math.min(this._bufferService.cols,U-R+pe+Z-le-L);if(E||O.slice(R,U).trim()!==""){if(C&&ce===0&&k.getCodePoint(0)!==32){var Le=S.lines.get(g[1]-1);if(Le&&k.isWrapped&&Le.getCodePoint(this._bufferService.cols-1)!==32){var Se=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(Se){var ie=this._bufferService.cols-Se.start;ce-=ie,ye+=ie}}}if(v&&ce+ye===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var he=S.lines.get(g[1]+1);if(he&&he.isWrapped&&he.getCodePoint(0)!==32){var ke=this._getWordAt([0,g[1]+1],!1,!1,!0);ke&&(ye+=ke.length)}}return{start:ce,length:ye}}}}},b.prototype._selectWordAt=function(g,E){var C=this._getWordAt(g,E);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[C.start,g[1]],this._model.selectionStartLength=C.length}},b.prototype._selectToWordAt=function(g){var E=this._getWordAt(g,!0);if(E){for(var C=g[1];E.start<0;)E.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,C]}},b.prototype._isCharWordSeparator=function(g){return g.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(g.getChars())>=0},b.prototype._selectLineAt=function(g){var E=this._bufferService.buffer.getWrappedRangeForLine(g);this._model.selectionStart=[0,E.first],this._model.selectionEnd=[this._bufferService.cols,E.last],this._model.selectionStartLength=0},b=h([o(2,t.IBufferService),o(3,t.ICoreService),o(4,a.IMouseService),o(5,t.IOptionsService),o(6,a.IRenderService)],b)}(n.Disposable);c.SelectionService=p},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0;var x=function(){function m(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}return m.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(m.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(m.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),m.prototype.areSelectionValuesReversed=function(){var h=this.selectionStart,o=this.selectionEnd;return!(!h||!o)&&(h[1]>o[1]||h[1]===o[1]&&h[0]>o[0])},m.prototype.onTrim=function(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},m}();c.SelectionModel=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;var x=_(12);function m(i,a,t,f){var e=i-h(t,i),n=a-h(t,a);return r(Math.abs(e-n)-function(s,l,p){for(var y=0,b=s-h(p,s),g=l-h(p,l),E=0;E<Math.abs(b-g);E++){var C=o(s,l)==="A"?-1:1,v=p.buffer.lines.get(b+C*E);v&&v.isWrapped&&y++}return y}(i,a,t),d(o(i,a),f))}function h(i,a){for(var t=0,f=i.buffer.lines.get(a),e=f&&f.isWrapped;e&&a>=0&&a<i.rows;)t++,e=(f=i.buffer.lines.get(--a))&&f.isWrapped;return t}function o(i,a){return i>a?"A":"B"}function u(i,a,t,f,e,n){for(var s=i,l=a,p="";s!==t||l!==f;)s+=e?1:-1,e&&s>n.cols-1?(p+=n.buffer.translateBufferLineToString(l,!1,i,s),s=0,i=0,l++):!e&&s<0&&(p+=n.buffer.translateBufferLineToString(l,!1,0,i+1),i=s=n.cols-1,l--);return p+n.buffer.translateBufferLineToString(l,!1,i,s)}function d(i,a){var t=a?"O":"[";return x.C0.ESC+t+i}function r(i,a){i=Math.floor(i);for(var t="",f=0;f<i;f++)t+=a;return t}c.moveToCellSequence=function(i,a,t,f){var e,n=t.buffer.x,s=t.buffer.y;if(!t.buffer.hasScrollback)return function(p,y,b,g,E,C){return m(y,g,E,C).length===0?"":r(u(p,y,p,y-h(E,y),!1,E).length,d("D",C))}(n,s,0,a,t,f)+m(s,a,t,f)+function(p,y,b,g,E,C){var v;v=m(y,g,E,C).length>0?g-h(E,g):y;var S=g,k=function(O,R,U,N,pe,Z){var le;return le=m(U,N,pe,Z).length>0?N-h(pe,N):R,O<U&&le<=N||O>=U&&le<N?"C":"D"}(p,y,b,g,E,C);return r(u(p,v,b,S,k==="C",E).length,d(k,C))}(n,s,i,a,t,f);if(s===a)return e=n>i?"D":"C",r(Math.abs(n-i),d(e,f));e=s>a?"D":"C";var l=Math.abs(s-a);return r(function(p,y){return y.cols-p}(s>a?i:n,t)+(l-1)*t.cols+1+((s>a?n:i)-1),d(e,f))}},function(D,c,_){"use strict";var x=this&&this.__decorate||function(u,d,r,i){var a,t=arguments.length,f=t<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,d,r,i);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(f=(t<3?a(f):t>3?a(d,r,f):a(d,r))||f);return t>3&&f&&Object.defineProperty(d,r,f),f},m=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SoundService=void 0;var h=_(1),o=function(){function u(d){this._optionsService=d}return Object.defineProperty(u,"audioContext",{get:function(){if(!u._audioContext){var d=window.AudioContext||window.webkitAudioContext;if(!d)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;u._audioContext=new d}return u._audioContext},enumerable:!1,configurable:!0}),u.prototype.playBellSound=function(){var d=u.audioContext;if(d){var r=d.createBufferSource();d.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(i){r.buffer=i,r.connect(d.destination),r.start(0)})}},u.prototype._base64ToArrayBuffer=function(d){for(var r=window.atob(d),i=r.length,a=new Uint8Array(i),t=0;t<i;t++)a[t]=r.charCodeAt(t);return a.buffer},u.prototype._removeMimeType=function(d){return d.split(",")[1]},u=x([m(0,h.IOptionsService)],u)}();c.SoundService=o},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),h=this&&this.__decorate||function(t,f,e,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,f,e,n);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(p=(l<3?s(p):l>3?s(f,e,p):s(f,e))||p);return l>3&&p&&Object.defineProperty(f,e,p),p},o=this&&this.__param||function(t,f){return function(e,n){f(e,n,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var u=_(2),d=_(7),r=_(5),i=_(1),a=function(t){function f(e,n,s,l,p,y){var b=t.call(this)||this;return b._element=e,b._screenElement=n,b._bufferService=s,b._mouseService=l,b._selectionService=p,b._optionsService=y,b._zones=[],b._areZonesActive=!1,b._lastHoverCoords=[void 0,void 0],b._initialSelectionLength=0,b.register(d.addDisposableDomListener(b._element,"mousedown",function(g){return b._onMouseDown(g)})),b._mouseMoveListener=function(g){return b._onMouseMove(g)},b._mouseLeaveListener=function(g){return b._onMouseLeave(g)},b._clickListener=function(g){return b._onClick(g)},b}return m(f,t),f.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},f.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},f.prototype.clearAll=function(e,n){if(this._zones.length!==0){e&&n||(e=0,n=this._bufferService.rows-1);for(var s=0;s<this._zones.length;s++){var l=this._zones[s];(l.y1>e&&l.y1<=n+1||l.y2>e&&l.y2<=n+1||l.y1<e&&l.y2>n+1)&&(this._currentZone&&this._currentZone===l&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(s--,1))}this._zones.length===0&&this._deactivate()}},f.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))},f.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))},f.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},f.prototype._onHover=function(e){var n=this,s=this._findZoneEventAt(e);s!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),s&&(this._currentZone=s,s.hoverCallback&&s.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return n._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},f.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var n=this._findZoneEventAt(e);n&&n.tooltipCallback&&n.tooltipCallback(e)},f.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var n=this._findZoneEventAt(e);n!=null&&n.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},f.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},f.prototype._onClick=function(e){var n=this._findZoneEventAt(e),s=this._getSelectionLength();n&&s===this._initialSelectionLength&&(n.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},f.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},f.prototype._findZoneEventAt=function(e){var n=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(n)for(var s=n[0],l=n[1],p=0;p<this._zones.length;p++){var y=this._zones[p];if(y.y1===y.y2){if(l===y.y1&&s>=y.x1&&s<y.x2)return y}else if(l===y.y1&&s>=y.x1||l===y.y2&&s<y.x2||l>y.y1&&l<y.y2)return y}},f=h([o(2,i.IBufferService),o(3,r.IMouseService),o(4,r.ISelectionService),o(5,i.IOptionsService)],f)}(u.Disposable);c.MouseZoneManager=a},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(f,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var l in s)s.hasOwnProperty(l)&&(n[l]=s[l])})(f,e)},function(f,e){function n(){this.constructor=f}x(f,e),f.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var h=_(18),o=_(11),u=_(31),d=_(7),r=_(2),i=_(32),a=_(17),t=function(f){function e(n,s){var l=f.call(this)||this;l._terminal=n,l._renderService=s,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 p=0;p<l._terminal.rows;p++)l._rowElements[p]=l._createAccessibilityTreeNode(),l._rowContainer.appendChild(l._rowElements[p]);if(l._topBoundaryFocusListener=function(y){return l._onBoundaryFocus(y,0)},l._bottomBoundaryFocusListener=function(y){return l._onBoundaryFocus(y,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(y){return l._onResize(y.rows)})),l.register(l._terminal.onRender(function(y){return l._refreshRows(y.start,y.end)})),l.register(l._terminal.onScroll(function(){return l._refreshRows()})),l.register(l._terminal.onA11yChar(function(y){return l._onChar(y)})),l.register(l._terminal.onLineFeed(function(){return l._onChar(`
|
|
|
`)})),l.register(l._terminal.onA11yTab(function(y){return l._onTab(y)})),l.register(l._terminal.onKey(function(y){return l._onKey(y.key)})),l.register(l._terminal.onBlur(function(){return l._clearLiveRegion()})),l.register(l._renderService.onDimensionsChange(function(){return l._refreshRowsDimensions()})),l._screenDprMonitor=new i.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register(d.addDisposableDomListener(window,"resize",function(){return l._refreshRowsDimensions()})),l}return m(e,f),e.prototype.dispose=function(){f.prototype.dispose.call(this),a.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(n,s){var l=n.target,p=this._rowElements[s===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")!==(s===0?"1":""+this._terminal.buffer.lines.length)&&n.relatedTarget===p){var y,b;if(s===0?(y=l,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(y=this._rowElements.shift(),b=l,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){var g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else g=this._createAccessibilityTreeNode(),this._rowElements.push(g),this._rowContainer.appendChild(g);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}},e.prototype._onResize=function(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var n=document.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n},e.prototype._onTab=function(n){for(var s=0;s<n;s++)this._onChar(" ")},e.prototype._onChar=function(n){var s=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),o.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){s._accessibilityTreeRoot.appendChild(s._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,o.isMac&&a.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(n){this._clearLiveRegion(),this._charsToConsume.push(n)},e.prototype._refreshRows=function(n,s){this._renderRowsDebouncer.refresh(n,s,this._terminal.rows)},e.prototype._renderRows=function(n,s){for(var l=this._terminal.buffer,p=l.lines.length.toString(),y=n;y<=s;y++){var b=l.translateBufferLineToString(l.ydisp+y,!0),g=(l.ydisp+y+1).toString(),E=this._rowElements[y];E&&(b.length===0?E.innerHTML=" ":E.textContent=b,E.setAttribute("aria-posinset",g),E.setAttribute("aria-setsize",p))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}},e.prototype._refreshRowDimensions=function(n){n.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(r.Disposable);c.AccessibilityManager=t},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(l,p){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var g in b)b.hasOwnProperty(g)&&(y[g]=b[g])})(l,p)},function(l,p){function y(){this.constructor=l}x(l,p),l.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}),h=this&&this.__decorate||function(l,p,y,b){var g,E=arguments.length,C=E<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,p,y,b);else for(var v=l.length-1;v>=0;v--)(g=l[v])&&(C=(E<3?g(C):E>3?g(p,y,C):g(p,y))||C);return E>3&&C&&Object.defineProperty(p,y,C),C},o=this&&this.__param||function(l,p){return function(y,b){p(y,b,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;var u=_(58),d=_(9),r=_(2),i=_(5),a=_(1),t=_(0),f=_(10),e=_(17),n=1,s=function(l){function p(y,b,g,E,C,v,S,k,O){var R=l.call(this)||this;return R._colors=y,R._element=b,R._screenElement=g,R._viewportElement=E,R._linkifier=C,R._linkifier2=v,R._charSizeService=S,R._optionsService=k,R._bufferService=O,R._terminalClass=n++,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(U){return R._onLinkHover(U)}),R._linkifier.onHideLinkUnderline(function(U){return R._onLinkLeave(U)}),R._linkifier2.onShowLinkUnderline(function(U){return R._onLinkHover(U)}),R._linkifier2.onHideLinkUnderline(function(U){return R._onLinkLeave(U)}),R}return m(p,l),Object.defineProperty(p.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),p.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)},p.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 y=0,b=this._rowElements;y<b.length;y++){var g=b[y];g.style.width=this.dimensions.canvasWidth+"px",g.style.height=this.dimensions.actualCellHeight+"px",g.style.lineHeight=this.dimensions.actualCellHeight+"px",g.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var E=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=E,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},p.prototype.setColors=function(y){this._colors=y,this._injectCss()},p.prototype._injectCss=function(){var y=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var b=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";b+=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;}",b+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",b+="@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+"; }}",b+=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;}",b+=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(g,E){b+=y._terminalSelector+" .xterm-fg-"+E+" { color: "+g.css+"; }"+y._terminalSelector+" .xterm-bg-"+E+" { background-color: "+g.css+"; }"}),b+=this._terminalSelector+" .xterm-fg-"+d.INVERTED_DEFAULT_COLOR+" { color: "+f.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+d.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=b},p.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},p.prototype._refreshRowElements=function(y,b){for(var g=this._rowElements.length;g<=b;g++){var E=document.createElement("div");this._rowContainer.appendChild(E),this._rowElements.push(E)}for(;this._rowElements.length>b;)this._rowContainer.removeChild(this._rowElements.pop())},p.prototype.onResize=function(y,b){this._refreshRowElements(y,b),this._updateDimensions()},p.prototype.onCharSizeChanged=function(){this._updateDimensions()},p.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},p.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},p.prototype.onSelectionChanged=function(y,b,g){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(y&&b){var E=y[1]-this._bufferService.buffer.ydisp,C=b[1]-this._bufferService.buffer.ydisp,v=Math.max(E,0),S=Math.min(C,this._bufferService.rows-1);if(!(v>=this._bufferService.rows||S<0)){var k=document.createDocumentFragment();if(g)k.appendChild(this._createSelectionElement(v,y[0],b[0],S-v+1));else{var O=E===v?y[0]:0,R=v===S?b[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(v,O,R));var U=S-v-1;if(k.appendChild(this._createSelectionElement(v+1,0,this._bufferService.cols,U)),v!==S){var N=C===S?b[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(S,0,N))}}this._selectionContainer.appendChild(k)}}},p.prototype._createSelectionElement=function(y,b,g,E){E===void 0&&(E=1);var C=document.createElement("div");return C.style.height=E*this.dimensions.actualCellHeight+"px",C.style.top=y*this.dimensions.actualCellHeight+"px",C.style.left=b*this.dimensions.actualCellWidth+"px",C.style.width=this.dimensions.actualCellWidth*(g-b)+"px",C},p.prototype.onCursorMove=function(){},p.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},p.prototype.clear=function(){for(var y=0,b=this._rowElements;y<b.length;y++)b[y].innerHTML=""},p.prototype.renderRows=function(y,b){for(var g=this._bufferService.buffer.ybase+this._bufferService.buffer.y,E=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),C=this._optionsService.options.cursorBlink,v=y;v<=b;v++){var S=this._rowElements[v];S.innerHTML="";var k=v+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.lines.get(k),R=this._optionsService.options.cursorStyle;S.appendChild(this._rowFactory.createRow(O,k===g,R,E,C,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(p.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),p.prototype.registerCharacterJoiner=function(y){return-1},p.prototype.deregisterCharacterJoiner=function(y){return!1},p.prototype._onLinkHover=function(y){this._setCellUnderline(y.x1,y.x2,y.y1,y.y2,y.cols,!0)},p.prototype._onLinkLeave=function(y){this._setCellUnderline(y.x1,y.x2,y.y1,y.y2,y.cols,!1)},p.prototype._setCellUnderline=function(y,b,g,E,C,v){for(;y!==b||g!==E;){var S=this._rowElements[g];if(!S)return;var k=S.children[y];k&&(k.style.textDecoration=v?"underline":"none"),++y>=C&&(y=0,g++)}},p=h([o(6,i.ICharSizeService),o(7,a.IOptionsService),o(8,a.IBufferService)],p)}(r.Disposable);c.DomRenderer=s},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=c.CURSOR_STYLE_UNDERLINE_CLASS=c.CURSOR_STYLE_BAR_CLASS=c.CURSOR_STYLE_BLOCK_CLASS=c.CURSOR_BLINK_CLASS=c.CURSOR_CLASS=c.UNDERLINE_CLASS=c.ITALIC_CLASS=c.DIM_CLASS=c.BOLD_CLASS=void 0;var x=_(9),m=_(3),h=_(4),o=_(10);c.BOLD_CLASS="xterm-bold",c.DIM_CLASS="xterm-dim",c.ITALIC_CLASS="xterm-italic",c.UNDERLINE_CLASS="xterm-underline",c.CURSOR_CLASS="xterm-cursor",c.CURSOR_BLINK_CLASS="xterm-cursor-blink",c.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",c.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",c.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function r(i,a,t){this._document=i,this._optionsService=a,this._colors=t,this._workCell=new h.CellData}return r.prototype.setColors=function(i){this._colors=i},r.prototype.createRow=function(i,a,t,f,e,n,s){for(var l=this._document.createDocumentFragment(),p=0,y=Math.min(i.length,s)-1;y>=0;y--)if(i.loadCell(y,this._workCell).getCode()!==m.NULL_CELL_CODE||a&&y===f){p=y+1;break}for(y=0;y<p;y++){i.loadCell(y,this._workCell);var b=this._workCell.getWidth();if(b!==0){var g=this._document.createElement("span");if(b>1&&(g.style.width=n*b+"px"),a&&y===f)switch(g.classList.add(c.CURSOR_CLASS),e&&g.classList.add(c.CURSOR_BLINK_CLASS),t){case"bar":g.classList.add(c.CURSOR_STYLE_BAR_CLASS);break;case"underline":g.classList.add(c.CURSOR_STYLE_UNDERLINE_CLASS);break;default:g.classList.add(c.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&g.classList.add(c.BOLD_CLASS),this._workCell.isItalic()&&g.classList.add(c.ITALIC_CLASS),this._workCell.isDim()&&g.classList.add(c.DIM_CLASS),this._workCell.isUnderline()&&g.classList.add(c.UNDERLINE_CLASS),this._workCell.isInvisible()?g.textContent=m.WHITESPACE_CELL_CHAR:g.textContent=this._workCell.getChars()||m.WHITESPACE_CELL_CHAR;var E=this._workCell.getFgColor(),C=this._workCell.getFgColorMode(),v=this._workCell.getBgColor(),S=this._workCell.getBgColorMode(),k=!!this._workCell.isInverse();if(k){var O=E;E=v,v=O;var R=C;C=S,S=R}switch(C){case 16777216:case 33554432:this._workCell.isBold()&&E<8&&this._optionsService.options.drawBoldTextInBrightColors&&(E+=8),this._applyMinimumContrast(g,this._colors.background,this._colors.ansi[E])||g.classList.add("xterm-fg-"+E);break;case 50331648:var U=o.rgba.toColor(E>>16&255,E>>8&255,255&E);this._applyMinimumContrast(g,this._colors.background,U)||this._addStyle(g,"color:#"+d(E.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(g,this._colors.background,this._colors.foreground)||k&&g.classList.add("xterm-fg-"+x.INVERTED_DEFAULT_COLOR)}switch(S){case 16777216:case 33554432:g.classList.add("xterm-bg-"+v);break;case 50331648:this._addStyle(g,"background-color:#"+d(v.toString(16),"0",6));break;case 0:default:k&&g.classList.add("xterm-bg-"+x.INVERTED_DEFAULT_COLOR)}l.appendChild(g)}}return l},r.prototype._applyMinimumContrast=function(i,a,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var f=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return f===void 0&&(f=o.color.ensureContrastRatio(a,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,f!=null?f:null)),!!f&&(this._addStyle(i,"color:"+f.css),!0)},r.prototype._addStyle=function(i,a){i.setAttribute("style",""+(i.getAttribute("style")||"")+a+";")},r}();function d(r,i,a){for(;r.length<a;)r=i+r;return r}c.DomRendererRowFactory=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;var x=_(12),m={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};c.evaluateKeyboardEvent=function(h,o,u,d){var r={type:0,cancel:!1,key:void 0},i=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?r.key=o?x.C0.ESC+"OA":x.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?r.key=o?x.C0.ESC+"OD":x.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?r.key=o?x.C0.ESC+"OC":x.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(r.key=o?x.C0.ESC+"OB":x.C0.ESC+"[B");break;case 8:if(h.shiftKey){r.key=x.C0.BS;break}if(h.altKey){r.key=x.C0.ESC+x.C0.DEL;break}r.key=x.C0.DEL;break;case 9:if(h.shiftKey){r.key=x.C0.ESC+"[Z";break}r.key=x.C0.HT,r.cancel=!0;break;case 13:r.key=h.altKey?x.C0.ESC+x.C0.CR:x.C0.CR,r.cancel=!0;break;case 27:r.key=x.C0.ESC,h.altKey&&(r.key=x.C0.ESC+x.C0.ESC),r.cancel=!0;break;case 37:if(h.metaKey)break;i?(r.key=x.C0.ESC+"[1;"+(i+1)+"D",r.key===x.C0.ESC+"[1;3D"&&(r.key=x.C0.ESC+(u?"b":"[1;5D"))):r.key=o?x.C0.ESC+"OD":x.C0.ESC+"[D";break;case 39:if(h.metaKey)break;i?(r.key=x.C0.ESC+"[1;"+(i+1)+"C",r.key===x.C0.ESC+"[1;3C"&&(r.key=x.C0.ESC+(u?"f":"[1;5C"))):r.key=o?x.C0.ESC+"OC":x.C0.ESC+"[C";break;case 38:if(h.metaKey)break;i?(r.key=x.C0.ESC+"[1;"+(i+1)+"A",u||r.key!==x.C0.ESC+"[1;3A"||(r.key=x.C0.ESC+"[1;5A")):r.key=o?x.C0.ESC+"OA":x.C0.ESC+"[A";break;case 40:if(h.metaKey)break;i?(r.key=x.C0.ESC+"[1;"+(i+1)+"B",u||r.key!==x.C0.ESC+"[1;3B"||(r.key=x.C0.ESC+"[1;5B")):r.key=o?x.C0.ESC+"OB":x.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(r.key=x.C0.ESC+"[2~");break;case 46:r.key=i?x.C0.ESC+"[3;"+(i+1)+"~":x.C0.ESC+"[3~";break;case 36:r.key=i?x.C0.ESC+"[1;"+(i+1)+"H":o?x.C0.ESC+"OH":x.C0.ESC+"[H";break;case 35:r.key=i?x.C0.ESC+"[1;"+(i+1)+"F":o?x.C0.ESC+"OF":x.C0.ESC+"[F";break;case 33:h.shiftKey?r.type=2:r.key=x.C0.ESC+"[5~";break;case 34:h.shiftKey?r.type=3:r.key=x.C0.ESC+"[6~";break;case 112:r.key=i?x.C0.ESC+"[1;"+(i+1)+"P":x.C0.ESC+"OP";break;case 113:r.key=i?x.C0.ESC+"[1;"+(i+1)+"Q":x.C0.ESC+"OQ";break;case 114:r.key=i?x.C0.ESC+"[1;"+(i+1)+"R":x.C0.ESC+"OR";break;case 115:r.key=i?x.C0.ESC+"[1;"+(i+1)+"S":x.C0.ESC+"OS";break;case 116:r.key=i?x.C0.ESC+"[15;"+(i+1)+"~":x.C0.ESC+"[15~";break;case 117:r.key=i?x.C0.ESC+"[17;"+(i+1)+"~":x.C0.ESC+"[17~";break;case 118:r.key=i?x.C0.ESC+"[18;"+(i+1)+"~":x.C0.ESC+"[18~";break;case 119:r.key=i?x.C0.ESC+"[19;"+(i+1)+"~":x.C0.ESC+"[19~";break;case 120:r.key=i?x.C0.ESC+"[20;"+(i+1)+"~":x.C0.ESC+"[20~";break;case 121:r.key=i?x.C0.ESC+"[21;"+(i+1)+"~":x.C0.ESC+"[21~";break;case 122:r.key=i?x.C0.ESC+"[23;"+(i+1)+"~":x.C0.ESC+"[23~";break;case 123:r.key=i?x.C0.ESC+"[24;"+(i+1)+"~":x.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(u&&!d||!h.altKey||h.metaKey)u&&!h.altKey&&!h.ctrlKey&&h.metaKey?h.keyCode===65&&(r.type=1):h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?r.key=h.key:h.key&&h.ctrlKey&&h.key==="_"&&(r.key=x.C0.US);else{var a=m[h.keyCode],t=a&&a[h.shiftKey?1:0];if(t)r.key=x.C0.ESC+t;else if(h.keyCode>=65&&h.keyCode<=90){var f=h.ctrlKey?h.keyCode-64:h.keyCode+32;r.key=x.C0.ESC+String.fromCharCode(f)}}else h.keyCode>=65&&h.keyCode<=90?r.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?r.key=x.C0.NUL:h.keyCode>=51&&h.keyCode<=55?r.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?r.key=x.C0.DEL:h.keyCode===219?r.key=x.C0.ESC:h.keyCode===220?r.key=x.C0.FS:h.keyCode===221&&(r.key=x.C0.GS)}return r}},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(n,s){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,p){l.__proto__=p}||function(l,p){for(var y in p)p.hasOwnProperty(y)&&(l[y]=p[y])})(n,s)},function(n,s){function l(){this.constructor=n}x(n,s),n.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}),h=this&&this.__decorate||function(n,s,l,p){var y,b=arguments.length,g=b<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(n,s,l,p);else for(var E=n.length-1;E>=0;E--)(y=n[E])&&(g=(b<3?y(g):b>3?y(s,l,g):y(s,l))||g);return b>3&&g&&Object.defineProperty(s,l,g),g},o=this&&this.__param||function(n,s){return function(l,p){s(l,p,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;var u=_(31),d=_(0),r=_(2),i=_(32),a=_(7),t=_(1),f=_(5),e=function(n){function s(l,p,y,b,g,E){var C=n.call(this)||this;if(C._renderer=l,C._rowCount=p,C._isPaused=!1,C._needsFullRefresh=!1,C._isNextRenderRedrawOnly=!0,C._needsSelectionRefresh=!1,C._canvasWidth=0,C._canvasHeight=0,C._selectionState={start:void 0,end:void 0,columnSelectMode:!1},C._onDimensionsChange=new d.EventEmitter,C._onRender=new d.EventEmitter,C._onRefreshRequest=new d.EventEmitter,C.register({dispose:function(){return C._renderer.dispose()}}),C._renderDebouncer=new u.RenderDebouncer(function(S,k){return C._renderRows(S,k)}),C.register(C._renderDebouncer),C._screenDprMonitor=new i.ScreenDprMonitor,C._screenDprMonitor.setListener(function(){return C.onDevicePixelRatioChange()}),C.register(C._screenDprMonitor),C.register(E.onResize(function(S){return C._fullRefresh()})),C.register(b.onOptionChange(function(){return C._renderer.onOptionsChanged()})),C.register(g.onCharSizeChange(function(){return C.onCharSizeChanged()})),C._renderer.onRequestRedraw(function(S){return C.refreshRows(S.start,S.end,!0)}),C.register(a.addDisposableDomListener(window,"resize",function(){return C.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var v=new IntersectionObserver(function(S){return C._onIntersectionChange(S[S.length-1])},{threshold:0});v.observe(y),C.register({dispose:function(){return v.disconnect()}})}return C}return m(s,n),Object.defineProperty(s.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),s.prototype._onIntersectionChange=function(l){this._isPaused=l.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},s.prototype.refreshRows=function(l,p,y){y===void 0&&(y=!1),this._isPaused?this._needsFullRefresh=!0:(y||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,p,this._rowCount))},s.prototype._renderRows=function(l,p){this._renderer.renderRows(l,p),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:p}),this._isNextRenderRedrawOnly=!0},s.prototype.resize=function(l,p){this._rowCount=p,this._fireOnCanvasResize()},s.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},s.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},s.prototype.dispose=function(){n.prototype.dispose.call(this)},s.prototype.setRenderer=function(l){var p=this;this._renderer.dispose(),this._renderer=l,this._renderer.onRequestRedraw(function(y){return p.refreshRows(y.start,y.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},s.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},s.prototype.setColors=function(l){this._renderer.setColors(l),this._fullRefresh()},s.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},s.prototype.onResize=function(l,p){this._renderer.onResize(l,p),this._fullRefresh()},s.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},s.prototype.onBlur=function(){this._renderer.onBlur()},s.prototype.onFocus=function(){this._renderer.onFocus()},s.prototype.onSelectionChanged=function(l,p,y){this._selectionState.start=l,this._selectionState.end=p,this._selectionState.columnSelectMode=y,this._renderer.onSelectionChanged(l,p,y)},s.prototype.onCursorMove=function(){this._renderer.onCursorMove()},s.prototype.clear=function(){this._renderer.clear()},s.prototype.registerCharacterJoiner=function(l){return this._renderer.registerCharacterJoiner(l)},s.prototype.deregisterCharacterJoiner=function(l){return this._renderer.deregisterCharacterJoiner(l)},s=h([o(3,t.IOptionsService),o(4,f.ICharSizeService),o(5,t.IBufferService)],s)}(r.Disposable);c.RenderService=e},function(D,c,_){"use strict";var x=this&&this.__decorate||function(r,i,a,t){var f,e=arguments.length,n=e<3?i:t===null?t=Object.getOwnPropertyDescriptor(i,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,a,t);else for(var s=r.length-1;s>=0;s--)(f=r[s])&&(n=(e<3?f(n):e>3?f(i,a,n):f(i,a))||n);return e>3&&n&&Object.defineProperty(i,a,n),n},m=this&&this.__param||function(r,i){return function(a,t){i(a,t,r)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;var h=_(1),o=_(0),u=function(){function r(i,a,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new o.EventEmitter,this._measureStrategy=new d(i,a,this._optionsService)}return Object.defineProperty(r.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),r.prototype.measure=function(){var i=this._measureStrategy.measure();i.width===this.width&&i.height===this.height||(this.width=i.width,this.height=i.height,this._onCharSizeChange.fire())},r=x([m(2,h.IOptionsService)],r)}();c.CharSizeService=u;var d=function(){function r(i,a,t){this._document=i,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 r.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var i=this._measureElement.getBoundingClientRect();return i.width!==0&&i.height!==0&&(this._result.width=i.width,this._result.height=Math.ceil(i.height)),this._result},r}()},function(D,c,_){"use strict";var x=this&&this.__decorate||function(d,r,i,a){var t,f=arguments.length,e=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,r,i,a);else for(var n=d.length-1;n>=0;n--)(t=d[n])&&(e=(f<3?t(e):f>3?t(r,i,e):t(r,i))||e);return f>3&&e&&Object.defineProperty(r,i,e),e},m=this&&this.__param||function(d,r){return function(i,a){r(i,a,d)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;var h=_(5),o=_(30),u=function(){function d(r,i){this._renderService=r,this._charSizeService=i}return d.prototype.getCoords=function(r,i,a,t,f){return o.getCoords(r,i,a,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,f)},d.prototype.getRawByteCoords=function(r,i,a,t){var f=this.getCoords(r,i,a,t);return o.getRawByteCoords(f)},d=x([m(0,h.IRenderService),m(1,h.ICharSizeService)],d)}();c.MouseService=u},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),h=this&&this.__decorate||function(t,f,e,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,f,e,n);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(p=(l<3?s(p):l>3?s(f,e,p):s(f,e))||p);return l>3&&p&&Object.defineProperty(f,e,p),p},o=this&&this.__param||function(t,f){return function(e,n){f(e,n,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var u=_(1),d=_(0),r=_(2),i=_(7),a=function(t){function f(e){var n=t.call(this)||this;return n._bufferService=e,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new d.EventEmitter),n._onHideLinkUnderline=n.register(new d.EventEmitter),n.register(r.getDisposeArrayDisposable(n._linkCacheDisposables)),n}return m(f,t),Object.defineProperty(f.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),f.prototype.registerLinkProvider=function(e){var n=this;return this._linkProviders.push(e),{dispose:function(){var s=n._linkProviders.indexOf(e);s!==-1&&n._linkProviders.splice(s,1)}}},f.prototype.attachToDom=function(e,n,s){var l=this;this._element=e,this._mouseService=n,this._renderService=s,this.register(i.addDisposableDomListener(this._element,"mouseleave",function(){l._isMouseOut=!0,l._clearCurrentLink()})),this.register(i.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(i.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},f.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var n=this._positionFromMouseEvent(e,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var s=e.composedPath(),l=0;l<s.length;l++){var p=s[l];if(p.classList.contains("xterm"))break;if(p.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},f.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))},f.prototype._askForLink=function(e,n){var s=this;this._activeProviderReplies&&n||(this._activeProviderReplies=new Map,this._activeLine=e.y);var l=!1;this._linkProviders.forEach(function(p,y){var b;n?!((b=s._activeProviderReplies)===null||b===void 0)&&b.get(y)&&(l=s._checkLinkProviderResult(y,e,l)):p.provideLinks(e.y,function(g){var E,C;if(!s._isMouseOut){var v=g==null?void 0:g.map(function(S){return{link:S}});(E=s._activeProviderReplies)===null||E===void 0||E.set(y,v),l=s._checkLinkProviderResult(y,e,l),((C=s._activeProviderReplies)===null||C===void 0?void 0:C.size)===s._linkProviders.length&&s._removeIntersectingLinks(e.y,s._activeProviderReplies)}})})},f.prototype._removeIntersectingLinks=function(e,n){for(var s=new Set,l=0;l<n.size;l++){var p=n.get(l);if(p)for(var y=0;y<p.length;y++)for(var b=p[y],g=b.link.range.start.y<e?0:b.link.range.start.x,E=b.link.range.end.y>e?this._bufferService.cols:b.link.range.end.x,C=g;C<=E;C++){if(s.has(C)){p.splice(y--,1);break}s.add(C)}}},f.prototype._checkLinkProviderResult=function(e,n,s){var l,p=this;if(!this._activeProviderReplies)return s;for(var y=this._activeProviderReplies.get(e),b=!1,g=0;g<e;g++)this._activeProviderReplies.has(g)&&!this._activeProviderReplies.get(g)||(b=!0);if(!b&&y){var E=y.find(function(v){return p._linkAtPosition(v.link,n)});E&&(s=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviders.length&&!s)for(g=0;g<this._activeProviderReplies.size;g++){var C=(l=this._activeProviderReplies.get(g))===null||l===void 0?void 0:l.find(function(v){return p._linkAtPosition(v.link,n)});if(C){s=!0,this._handleNewLink(C);break}}return s},f.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(e,this._element,this._mouseService);n&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},f.prototype._clearCurrentLink=function(e,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!n||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,r.disposeArray(this._linkCacheDisposables))},f.prototype._handleNewLink=function(e){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(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,p;return(p=(l=n._currentLink)===null||l===void 0?void 0:l.state)===null||p===void 0?void 0:p.decorations.pointerCursor},set:function(l){var p,y;!((p=n._currentLink)===null||p===void 0)&&p.state&&n._currentLink.state.decorations.pointerCursor!==l&&(n._currentLink.state.decorations.pointerCursor=l,n._currentLink.state.isHovered&&((y=n._element)===null||y===void 0||y.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:function(){var l,p;return(p=(l=n._currentLink)===null||l===void 0?void 0:l.state)===null||p===void 0?void 0:p.decorations.underline},set:function(l){var p,y,b;!((p=n._currentLink)===null||p===void 0)&&p.state&&((b=(y=n._currentLink)===null||y===void 0?void 0:y.state)===null||b===void 0?void 0:b.decorations.underline)!==l&&(n._currentLink.state.decorations.underline=l,n._currentLink.state.isHovered&&n._fireUnderlineEvent(e.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(l){var p=l.start===0?0:l.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(p,l.end+1+n._bufferService.buffer.ydisp)})))}},f.prototype._linkHover=function(e,n,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(s,n.text)},f.prototype._fireUnderlineEvent=function(e,n){var s=e.range,l=this._bufferService.buffer.ydisp,p=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-l-1,s.end.x,s.end.y-l-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(p)},f.prototype._linkLeave=function(e,n,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(s,n.text)},f.prototype._linkAtPosition=function(e,n){var s=e.range.start.y===e.range.end.y,l=e.range.start.y<n.y,p=e.range.end.y>n.y;return(s&&e.range.start.x<=n.x&&e.range.end.x>=n.x||l&&e.range.end.x>=n.x||p&&e.range.start.x<=n.x||l&&p)&&e.range.start.y<=n.y&&e.range.end.y>=n.y},f.prototype._positionFromMouseEvent=function(e,n,s){var l=s.getCoords(e,n,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}},f.prototype._createLinkUnderlineEvent=function(e,n,s,l,p){return{x1:e,y1:n,x2:s,y2:l,cols:this._bufferService.cols,fg:p}},f=h([o(0,u.IBufferService)],f)}(r.Disposable);c.Linkifier2=a},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;var x=function(){function m(h){this._textarea=h}return Object.defineProperty(m.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),m}();c.CoreBrowserService=x},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(g,E){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,v){C.__proto__=v}||function(C,v){for(var S in v)v.hasOwnProperty(S)&&(C[S]=v[S])})(g,E)},function(g,E){function C(){this.constructor=g}x(g,E),g.prototype=E===null?Object.create(E):(C.prototype=E.prototype,new C)});Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;var h=_(2),o=_(1),u=_(66),d=_(67),r=_(68),i=_(74),a=_(75),t=_(0),f=_(76),e=_(77),n=_(78),s=_(80),l=_(81),p=_(19),y=_(82),b=function(g){function E(C){var v=g.call(this)||this;return v._onBinary=new t.EventEmitter,v._onData=new t.EventEmitter,v._onLineFeed=new t.EventEmitter,v._onResize=new t.EventEmitter,v._onScroll=new t.EventEmitter,v._instantiationService=new u.InstantiationService,v.optionsService=new i.OptionsService(C),v._instantiationService.setService(o.IOptionsService,v.optionsService),v._bufferService=v.register(v._instantiationService.createInstance(r.BufferService)),v._instantiationService.setService(o.IBufferService,v._bufferService),v._logService=v._instantiationService.createInstance(d.LogService),v._instantiationService.setService(o.ILogService,v._logService),v._coreService=v.register(v._instantiationService.createInstance(a.CoreService,function(){return v.scrollToBottom()})),v._instantiationService.setService(o.ICoreService,v._coreService),v._coreMouseService=v._instantiationService.createInstance(f.CoreMouseService),v._instantiationService.setService(o.ICoreMouseService,v._coreMouseService),v._dirtyRowService=v._instantiationService.createInstance(e.DirtyRowService),v._instantiationService.setService(o.IDirtyRowService,v._dirtyRowService),v.unicodeService=v._instantiationService.createInstance(n.UnicodeService),v._instantiationService.setService(o.IUnicodeService,v.unicodeService),v._charsetService=v._instantiationService.createInstance(s.CharsetService),v._instantiationService.setService(o.ICharsetService,v._charsetService),v._inputHandler=new p.InputHandler(v._bufferService,v._charsetService,v._coreService,v._dirtyRowService,v._logService,v.optionsService,v._coreMouseService,v.unicodeService),v.register(t.forwardEvent(v._inputHandler.onLineFeed,v._onLineFeed)),v.register(v._inputHandler),v.register(t.forwardEvent(v._bufferService.onResize,v._onResize)),v.register(t.forwardEvent(v._coreService.onData,v._onData)),v.register(t.forwardEvent(v._coreService.onBinary,v._onBinary)),v.register(v.optionsService.onOptionChange(function(S){return v._updateOptions(S)})),v._writeBuffer=new y.WriteBuffer(function(S){return v._inputHandler.parse(S)}),v}return m(E,g),Object.defineProperty(E.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){var C;this._isDisposed||(g.prototype.dispose.call(this),(C=this._windowsMode)===null||C===void 0||C.dispose(),this._windowsMode=void 0)},E.prototype.write=function(C,v){this._writeBuffer.write(C,v)},E.prototype.writeSync=function(C){this._writeBuffer.writeSync(C)},E.prototype.resize=function(C,v){isNaN(C)||isNaN(v)||(C=Math.max(C,r.MINIMUM_COLS),v=Math.max(v,r.MINIMUM_ROWS),this._bufferService.resize(C,v))},E.prototype.scroll=function(C,v){v===void 0&&(v=!1);var S,k=this._bufferService.buffer;(S=this._cachedBlankLine)&&S.length===this.cols&&S.getFg(0)===C.fg&&S.getBg(0)===C.bg||(S=k.getBlankLine(C,v),this._cachedBlankLine=S),S.isWrapped=v;var O=k.ybase+k.scrollTop,R=k.ybase+k.scrollBottom;if(k.scrollTop===0){var U=k.lines.isFull;R===k.lines.length-1?U?k.lines.recycle().copyFrom(S):k.lines.push(S.clone()):k.lines.splice(R+1,0,S.clone()),U?this._bufferService.isUserScrolling&&(k.ydisp=Math.max(k.ydisp-1,0)):(k.ybase++,this._bufferService.isUserScrolling||k.ydisp++)}else{var N=R-O+1;k.lines.shiftElements(O+1,N-1,-1),k.lines.set(R,S.clone())}this._bufferService.isUserScrolling||(k.ydisp=k.ybase),this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom),this._onScroll.fire(k.ydisp)},E.prototype.scrollLines=function(C,v){var S=this._bufferService.buffer;if(C<0){if(S.ydisp===0)return;this._bufferService.isUserScrolling=!0}else C+S.ydisp>=S.ybase&&(this._bufferService.isUserScrolling=!1);var k=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+C,S.ybase),0),k!==S.ydisp&&(v||this._onScroll.fire(S.ydisp))},E.prototype.scrollPages=function(C){this.scrollLines(C*(this.rows-1))},E.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},E.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},E.prototype.scrollToLine=function(C){var v=C-this._bufferService.buffer.ydisp;v!==0&&this.scrollLines(v)},E.prototype.addEscHandler=function(C,v){return this._inputHandler.addEscHandler(C,v)},E.prototype.addDcsHandler=function(C,v){return this._inputHandler.addDcsHandler(C,v)},E.prototype.addCsiHandler=function(C,v){return this._inputHandler.addCsiHandler(C,v)},E.prototype.addOscHandler=function(C,v){return this._inputHandler.addOscHandler(C,v)},E.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},E.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},E.prototype._updateOptions=function(C){var v;switch(C){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((v=this._windowsMode)===null||v===void 0||v.dispose(),this._windowsMode=void 0)}},E.prototype._enableWindowsMode=function(){var C=this;if(!this._windowsMode){var v=[];v.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),v.push(this.addCsiHandler({final:"H"},function(){return l.updateWindowsModeWrappedState(C._bufferService),!1})),this._windowsMode={dispose:function(){for(var S=0,k=v;S<k.length;S++)k[S].dispose()}}}},E}(h.Disposable);c.CoreTerminal=b},function(D,c,_){"use strict";var x=this&&this.__spreadArrays||function(){for(var d=0,r=0,i=arguments.length;r<i;r++)d+=arguments[r].length;var a=Array(d),t=0;for(r=0;r<i;r++)for(var f=arguments[r],e=0,n=f.length;e<n;e++,t++)a[t]=f[e];return a};Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;var m=_(1),h=_(14),o=function(){function d(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];this._entries=new Map;for(var a=0,t=r;a<t.length;a++){var f=t[a],e=f[0],n=f[1];this.set(e,n)}}return d.prototype.set=function(r,i){var a=this._entries.get(r);return this._entries.set(r,i),a},d.prototype.forEach=function(r){this._entries.forEach(function(i,a){return r(a,i)})},d.prototype.has=function(r){return this._entries.has(r)},d.prototype.get=function(r){return this._entries.get(r)},d}();c.ServiceCollection=o;var u=function(){function d(){this._services=new o,this._services.set(m.IInstantiationService,this)}return d.prototype.setService=function(r,i){this._services.set(r,i)},d.prototype.getService=function(r){return this._services.get(r)},d.prototype.createInstance=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];for(var t=h.getServiceDependencies(r).sort(function(y,b){return y.index-b.index}),f=[],e=0,n=t;e<n.length;e++){var s=n[e],l=this._services.get(s.id);if(!l)throw new Error("[createInstance] "+r.name+" depends on UNKNOWN service "+s.id+".");f.push(l)}var p=t.length>0?t[0].index:i.length;if(i.length!==p)throw new Error("[createInstance] First service dependency of "+r.name+" at position "+(p+1)+" conflicts with "+i.length+" static arguments");return new(r.bind.apply(r,x([void 0],x(i,f))))},d}();c.InstantiationService=u},function(D,c,_){"use strict";var x=this&&this.__decorate||function(i,a,t,f){var e,n=arguments.length,s=n<3?a:f===null?f=Object.getOwnPropertyDescriptor(a,t):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,a,t,f);else for(var l=i.length-1;l>=0;l--)(e=i[l])&&(s=(n<3?e(s):n>3?e(a,t,s):e(a,t))||s);return n>3&&s&&Object.defineProperty(a,t,s),s},m=this&&this.__param||function(i,a){return function(t,f){a(t,f,i)}},h=this&&this.__spreadArrays||function(){for(var i=0,a=0,t=arguments.length;a<t;a++)i+=arguments[a].length;var f=Array(i),e=0;for(a=0;a<t;a++)for(var n=arguments[a],s=0,l=n.length;s<l;s++,e++)f[e]=n[s];return f};Object.defineProperty(c,"__esModule",{value:!0}),c.LogService=c.LogLevel=void 0;var o,u=_(1);(function(i){i[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.OFF=4]="OFF"})(o=c.LogLevel||(c.LogLevel={}));var d={debug:o.DEBUG,info:o.INFO,warn:o.WARN,error:o.ERROR,off:o.OFF},r=function(){function i(a){var t=this;this._optionsService=a,this._updateLogLevel(),this._optionsService.onOptionChange(function(f){f==="logLevel"&&t._updateLogLevel()})}return i.prototype._updateLogLevel=function(){this._logLevel=d[this._optionsService.options.logLevel]},i.prototype._evalLazyOptionalParams=function(a){for(var t=0;t<a.length;t++)typeof a[t]=="function"&&(a[t]=a[t]())},i.prototype._log=function(a,t,f){this._evalLazyOptionalParams(f),a.call.apply(a,h([console,"xterm.js: "+t],f))},i.prototype.debug=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.DEBUG&&this._log(console.log,a,t)},i.prototype.info=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.INFO&&this._log(console.info,a,t)},i.prototype.warn=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.WARN&&this._log(console.warn,a,t)},i.prototype.error=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.ERROR&&this._log(console.error,a,t)},i=x([m(0,u.IOptionsService)],i)}();c.LogService=r},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(t,f){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])})(t,f)},function(t,f){function e(){this.constructor=t}x(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),h=this&&this.__decorate||function(t,f,e,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,f,e,n);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(p=(l<3?s(p):l>3?s(f,e,p):s(f,e))||p);return l>3&&p&&Object.defineProperty(f,e,p),p},o=this&&this.__param||function(t,f){return function(e,n){f(e,n,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;var u=_(1),d=_(69),r=_(0),i=_(2);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;var a=function(t){function f(e){var n=t.call(this)||this;return n._optionsService=e,n.isUserScrolling=!1,n._onResize=new r.EventEmitter,n.cols=Math.max(e.options.cols,c.MINIMUM_COLS),n.rows=Math.max(e.options.rows,c.MINIMUM_ROWS),n.buffers=new d.BufferSet(e,n),n}return m(f,t),Object.defineProperty(f.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},f.prototype.resize=function(e,n){this.cols=e,this.rows=n,this.buffers.resize(e,n),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:n})},f.prototype.reset=function(){this.buffers.dispose(),this.buffers=new d.BufferSet(this._optionsService,this),this.isUserScrolling=!1},f=h([o(0,u.IOptionsService)],f)}(i.Disposable);c.BufferService=a},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(d,r){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var t in a)a.hasOwnProperty(t)&&(i[t]=a[t])})(d,r)},function(d,r){function i(){this.constructor=d}x(d,r),d.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)});Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;var h=_(70),o=_(0),u=function(d){function r(i,a){var t=d.call(this)||this;return t._onBufferActivate=t.register(new o.EventEmitter),t._normal=new h.Buffer(!0,i,a),t._normal.fillViewportRows(),t._alt=new h.Buffer(!1,i,a),t._activeBuffer=t._normal,t.setupTabStops(),t}return m(r,d),Object.defineProperty(r.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),r.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}))},r.prototype.activateAltBuffer=function(i){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(i),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}))},r.prototype.resize=function(i,a){this._normal.resize(i,a),this._alt.resize(i,a)},r.prototype.setupTabStops=function(i){this._normal.setupTabStops(i),this._alt.setupTabStops(i)},r}(_(2).Disposable);c.BufferSet=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BufferStringIterator=c.Buffer=c.MAX_BUFFER_SIZE=void 0;var x=_(71),m=_(16),h=_(4),o=_(3),u=_(72),d=_(73),r=_(20),i=_(6);c.MAX_BUFFER_SIZE=4294967295;var a=function(){function f(e,n,s){this._hasScrollback=e,this._optionsService=n,this._bufferService=s,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=r.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,o.WHITESPACE_CELL_CHAR,o.WHITESPACE_CELL_WIDTH,o.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new x.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return f.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 i.ExtendedAttrs),this._nullCell},f.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 i.ExtendedAttrs),this._whitespaceCell},f.prototype.getBlankLine=function(e,n){return new m.BufferLine(this._bufferService.cols,this.getNullCell(e),n)},Object.defineProperty(f.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),f.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var n=e+this._optionsService.options.scrollback;return n>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:n},f.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=m.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(e))}},f.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new x.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},f.prototype.resize=function(e,n){var s=this.getNullCell(m.DEFAULT_ATTR_DATA),l=this._getCorrectBufferLength(n);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<e)for(var p=0;p<this.lines.length;p++)this.lines.get(p).resize(e,s);var y=0;if(this._rows<n)for(var b=this._rows;b<n;b++)this.lines.length<n+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new m.BufferLine(e,s)):this.ybase>0&&this.lines.length<=this.ybase+this.y+y+1?(this.ybase--,y++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(e,s)));else for(b=this._rows;b>n;b--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){var g=this.lines.length-l;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=l}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,n-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(e,n),this._cols>e))for(p=0;p<this.lines.length;p++)this.lines.get(p).resize(e,s);this._cols=e,this._rows=n},Object.defineProperty(f.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),f.prototype._reflow=function(e,n){this._cols!==e&&(e>this._cols?this._reflowLarger(e,n):this._reflowSmaller(e,n))},f.prototype._reflowLarger=function(e,n){var s=u.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(s.length>0){var l=u.reflowLargerCreateNewLayout(this.lines,s);u.reflowLargerApplyNewLayout(this.lines,l.layout),this._reflowLargerAdjustViewport(e,n,l.countRemoved)}},f.prototype._reflowLargerAdjustViewport=function(e,n,s){for(var l=this.getNullCell(m.DEFAULT_ATTR_DATA),p=s;p-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new m.BufferLine(e,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-s,0)},f.prototype._reflowSmaller=function(e,n){for(var s=this.getNullCell(m.DEFAULT_ATTR_DATA),l=[],p=0,y=this.lines.length-1;y>=0;y--){var b=this.lines.get(y);if(!(!b||!b.isWrapped&&b.getTrimmedLength()<=e)){for(var g=[b];b.isWrapped&&y>0;)b=this.lines.get(--y),g.unshift(b);var E=this.ybase+this.y;if(!(E>=y&&E<y+g.length)){var C=g[g.length-1].getTrimmedLength(),v=u.reflowSmallerGetNewLineLengths(g,this._cols,e),S=v.length-g.length,k=void 0;k=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+S):Math.max(0,this.lines.length-this.lines.maxLength+S);for(var O=[],R=0;R<S;R++){var U=this.getBlankLine(m.DEFAULT_ATTR_DATA,!0);O.push(U)}O.length>0&&(l.push({start:y+g.length+p,newLines:O}),p+=O.length),g.push.apply(g,O);var N=v.length-1,pe=v[N];pe===0&&(pe=v[--N]);for(var Z=g.length-S-1,le=C;Z>=0;){var L=Math.min(le,pe);if(g[N].copyCellsFrom(g[Z],le-L,pe-L,L,!0),(pe-=L)===0&&(pe=v[--N]),(le-=L)===0){Z--;var K=Math.max(Z,0);le=u.getWrappedLineTrimmedLength(g,K,this._cols)}}for(R=0;R<g.length;R++)v[R]<e&&g[R].setCell(v[R],s);for(var I=S-k;I-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+p)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+S,this.ybase+n-1)}}}if(l.length>0){var z=[],X=[];for(R=0;R<this.lines.length;R++)X.push(this.lines.get(R));var Q=this.lines.length,ce=Q-1,ye=0,Le=l[ye];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+p);var Se=0;for(R=Math.min(this.lines.maxLength-1,Q+p-1);R>=0;R--)if(Le&&Le.start>ce+Se){for(var ie=Le.newLines.length-1;ie>=0;ie--)this.lines.set(R--,Le.newLines[ie]);R++,z.push({index:ce+1,amount:Le.newLines.length}),Se+=Le.newLines.length,Le=l[++ye]}else this.lines.set(R,X[ce--]);var he=0;for(R=z.length-1;R>=0;R--)z[R].index+=he,this.lines.onInsertEmitter.fire(z[R]),he+=z[R].amount;var ke=Math.max(0,Q+p-this.lines.maxLength);ke>0&&this.lines.onTrimEmitter.fire(ke)}},f.prototype.stringIndexToBufferIndex=function(e,n,s){for(s===void 0&&(s=!1);n;){var l=this.lines.get(e);if(!l)return[-1,-1];for(var p=s?l.getTrimmedLength():l.length,y=0;y<p;++y)if(l.get(y)[o.CHAR_DATA_WIDTH_INDEX]&&(n-=l.get(y)[o.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[e,y];e++}return[e,0]},f.prototype.translateBufferLineToString=function(e,n,s,l){s===void 0&&(s=0);var p=this.lines.get(e);return p?p.translateToString(n,s,l):""},f.prototype.getWrappedRangeForLine=function(e){for(var n=e,s=e;n>0&&this.lines.get(n).isWrapped;)n--;for(;s+1<this.lines.length&&this.lines.get(s+1).isWrapped;)s++;return{first:n,last:s}},f.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},f.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},f.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},f.prototype.addMarker=function(e){var n=this,s=new d.Marker(e);return this.markers.push(s),s.register(this.lines.onTrim(function(l){s.line-=l,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(function(l){s.line>=l.index&&(s.line+=l.amount)})),s.register(this.lines.onDelete(function(l){s.line>=l.index&&s.line<l.index+l.amount&&s.dispose(),s.line>l.index&&(s.line-=l.amount)})),s.register(s.onDispose(function(){return n._removeMarker(s)})),s},f.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},f.prototype.iterator=function(e,n,s,l,p){return new t(this,e,n,s,l,p)},f}();c.Buffer=a;var t=function(){function f(e,n,s,l,p,y){s===void 0&&(s=0),l===void 0&&(l=e.lines.length),p===void 0&&(p=0),y===void 0&&(y=0),this._buffer=e,this._trimRight=n,this._startIndex=s,this._endIndex=l,this._startOverscan=p,this._endOverscan=y,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return f.prototype.hasNext=function(){return this._current<this._endIndex},f.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 n="",s=e.first;s<=e.last;++s)n+=this._buffer.translateBufferLineToString(s,this._trimRight);return this._current=e.last+1,{range:e,content:n}},f}();c.BufferStringIterator=t},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;var x=_(0),m=function(){function h(o){this._maxLength=o,this.onDeleteEmitter=new x.EventEmitter,this.onInsertEmitter=new x.EventEmitter,this.onTrimEmitter=new x.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(h.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"maxLength",{get:function(){return this._maxLength},set:function(o){if(this._maxLength!==o){for(var u=new Array(o),d=0;d<Math.min(o,this.length);d++)u[d]=this._array[this._getCyclicIndex(d)];this._array=u,this._maxLength=o,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._length},set:function(o){if(o>this._length)for(var u=this._length;u<o;u++)this._array[u]=void 0;this._length=o},enumerable:!1,configurable:!0}),h.prototype.get=function(o){return this._array[this._getCyclicIndex(o)]},h.prototype.set=function(o,u){this._array[this._getCyclicIndex(o)]=u},h.prototype.push=function(o){this._array[this._getCyclicIndex(this._length)]=o,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},h.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(h.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),h.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},h.prototype.splice=function(o,u){for(var d=[],r=2;r<arguments.length;r++)d[r-2]=arguments[r];if(u){for(var i=o;i<this._length-u;i++)this._array[this._getCyclicIndex(i)]=this._array[this._getCyclicIndex(i+u)];this._length-=u}for(i=this._length-1;i>=o;i--)this._array[this._getCyclicIndex(i+d.length)]=this._array[this._getCyclicIndex(i)];for(i=0;i<d.length;i++)this._array[this._getCyclicIndex(o+i)]=d[i];if(this._length+d.length>this._maxLength){var a=this._length+d.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=d.length},h.prototype.trimStart=function(o){o>this._length&&(o=this._length),this._startIndex+=o,this._length-=o,this.onTrimEmitter.fire(o)},h.prototype.shiftElements=function(o,u,d){if(!(u<=0)){if(o<0||o>=this._length)throw new Error("start argument out of range");if(o+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(var r=u-1;r>=0;r--)this.set(o+r+d,this.get(o+r));var i=o+u+d-this._length;if(i>0)for(this._length+=i;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;r<u;r++)this.set(o+r+d,this.get(o+r))}},h.prototype._getCyclicIndex=function(o){return(this._startIndex+o)%this._maxLength},h}();c.CircularList=m},function(D,c,_){"use strict";function x(m,h,o){if(h===m.length-1)return m[h].getTrimmedLength();var u=!m[h].hasContent(o-1)&&m[h].getWidth(o-1)===1,d=m[h+1].getWidth(0)===2;return u&&d?o-1:o}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(m,h,o,u,d){for(var r=[],i=0;i<m.length-1;i++){var a=i,t=m.get(++a);if(t.isWrapped){for(var f=[m.get(i)];a<m.length&&t.isWrapped;)f.push(t),t=m.get(++a);if(u>=i&&u<a)i+=f.length-1;else{for(var e=0,n=x(f,e,h),s=1,l=0;s<f.length;){var p=x(f,s,h),y=p-l,b=o-n,g=Math.min(y,b);f[e].copyCellsFrom(f[s],l,n,g,!1),(n+=g)===o&&(e++,n=0),(l+=g)===p&&(s++,l=0),n===0&&e!==0&&f[e-1].getWidth(o-1)===2&&(f[e].copyCellsFrom(f[e-1],o-1,n++,1,!1),f[e-1].setCell(o-1,d))}f[e].replaceCells(n,o,d);for(var E=0,C=f.length-1;C>0&&(C>e||f[C].getTrimmedLength()===0);C--)E++;E>0&&(r.push(i+f.length-E),r.push(E)),i+=f.length-1}}}return r},c.reflowLargerCreateNewLayout=function(m,h){for(var o=[],u=0,d=h[u],r=0,i=0;i<m.length;i++)if(d===i){var a=h[++u];m.onDeleteEmitter.fire({index:i-r,amount:a}),i+=a-1,r+=a,d=h[++u]}else o.push(i);return{layout:o,countRemoved:r}},c.reflowLargerApplyNewLayout=function(m,h){for(var o=[],u=0;u<h.length;u++)o.push(m.get(h[u]));for(u=0;u<o.length;u++)m.set(u,o[u]);m.length=h.length},c.reflowSmallerGetNewLineLengths=function(m,h,o){for(var u=[],d=m.map(function(n,s){return x(m,s,h)}).reduce(function(n,s){return n+s}),r=0,i=0,a=0;a<d;){if(d-a<o){u.push(d-a);break}r+=o;var t=x(m,i,h);r>t&&(r-=t,i++);var f=m[i].getWidth(r-1)===2;f&&r--;var e=f?o-1:o;u.push(e),a+=e}return u},c.getWrappedLineTrimmedLength=x},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(u,d){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])})(u,d)},function(u,d){function r(){this.constructor=u}x(u,d),u.prototype=d===null?Object.create(d):(r.prototype=d.prototype,new r)});Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;var h=_(0),o=function(u){function d(r){var i=u.call(this)||this;return i.line=r,i._id=d._nextId++,i.isDisposed=!1,i._onDispose=new h.EventEmitter,i}return m(d,u),Object.defineProperty(d.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},d._nextId=1,d}(_(2).Disposable);c.Marker=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=c.DEFAULT_BELL_SOUND=void 0;var x=_(0),m=_(11),h=_(33);c.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",c.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:c.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:m.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var o=["cols","rows"],u=function(){function d(r){this._onOptionChange=new x.EventEmitter,this.options=h.clone(c.DEFAULT_OPTIONS);for(var i=0,a=Object.keys(r);i<a.length;i++){var t=a[i];if(t in this.options){var f=r[t];this.options[t]=f}}}return Object.defineProperty(d.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),d.prototype.setOption=function(r,i){if(!(r in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');if(o.indexOf(r)!==-1)throw new Error('Option "'+r+'" can only be set in the constructor');this.options[r]!==i&&(i=this._sanitizeAndValidateOption(r,i),this.options[r]!==i&&(this.options[r]=i,this._onOptionChange.fire(r)))},d.prototype._sanitizeAndValidateOption=function(r,i){switch(r){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":i||(i=c.DEFAULT_OPTIONS[r]);break;case"cursorWidth":i=Math.floor(i);case"lineHeight":case"tabStopWidth":if(i<1)throw new Error(r+" cannot be less than 1, value: "+i);break;case"minimumContrastRatio":i=Math.max(1,Math.min(21,Math.round(10*i)/10));break;case"scrollback":if((i=Math.min(i,4294967295))<0)throw new Error(r+" cannot be less than 0, value: "+i);break;case"fastScrollSensitivity":case"scrollSensitivity":if(i<=0)throw new Error(r+" cannot be less than or equal to 0, value: "+i)}return i},d.prototype.getOption=function(r){if(!(r in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return this.options[r]},d}();c.OptionsService=u},function(D,c,_){"use strict";var x,m=this&&this.__extends||(x=function(e,n){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var p in l)l.hasOwnProperty(p)&&(s[p]=l[p])})(e,n)},function(e,n){function s(){this.constructor=e}x(e,n),e.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}),h=this&&this.__decorate||function(e,n,s,l){var p,y=arguments.length,b=y<3?n:l===null?l=Object.getOwnPropertyDescriptor(n,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(e,n,s,l);else for(var g=e.length-1;g>=0;g--)(p=e[g])&&(b=(y<3?p(b):y>3?p(n,s,b):p(n,s))||b);return y>3&&b&&Object.defineProperty(n,s,b),b},o=this&&this.__param||function(e,n){return function(s,l){n(s,l,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;var u=_(1),d=_(0),r=_(33),i=_(2),a=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),f=function(e){function n(s,l,p,y){var b=e.call(this)||this;return b._bufferService=l,b._logService=p,b._optionsService=y,b.isCursorInitialized=!1,b.isCursorHidden=!1,b._onData=b.register(new d.EventEmitter),b._onUserInput=b.register(new d.EventEmitter),b._onBinary=b.register(new d.EventEmitter),b._scrollToBottom=s,b.register({dispose:function(){return b._scrollToBottom=void 0}}),b.modes=r.clone(a),b.decPrivateModes=r.clone(t),b}return m(n,e),Object.defineProperty(n.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),n.prototype.reset=function(){this.modes=r.clone(a),this.decPrivateModes=r.clone(t)},n.prototype.triggerDataEvent=function(s,l){if(l===void 0&&(l=!1),!this._optionsService.options.disableStdin){var p=this._bufferService.buffer;p.ybase!==p.ydisp&&this._scrollToBottom(),l&&this._onUserInput.fire(),this._logService.debug('sending data "'+s+'"',function(){return s.split("").map(function(y){return y.charCodeAt(0)})}),this._onData.fire(s)}},n.prototype.triggerBinaryEvent=function(s){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+s+'"',function(){return s.split("").map(function(l){return l.charCodeAt(0)})}),this._onBinary.fire(s))},n=h([o(1,u.IBufferService),o(2,u.ILogService),o(3,u.IOptionsService)],n)}(i.Disposable);c.CoreService=f},function(D,c,_){"use strict";var x=this&&this.__decorate||function(t,f,e,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,e):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,f,e,n);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(p=(l<3?s(p):l>3?s(f,e,p):s(f,e))||p);return l>3&&p&&Object.defineProperty(f,e,p),p},m=this&&this.__param||function(t,f){return function(e,n){f(e,n,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;var h=_(1),o=_(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 d(t,f){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||f||(e|=3)),e}var r=String.fromCharCode,i={DEFAULT:function(t){var f=[d(t,!1)+32,t.col+32,t.row+32];return f[0]>255||f[1]>255||f[2]>255?"":"\x1B[M"+r(f[0])+r(f[1])+r(f[2])},SGR:function(t){var f=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+d(t,!0)+";"+t.col+";"+t.row+f}},a=function(){function t(f,e){this._bufferService=f,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new o.EventEmitter,this._lastEvent=null;for(var n=0,s=Object.keys(u);n<s.length;n++){var l=s[n];this.addProtocol(l,u[l])}for(var p=0,y=Object.keys(i);p<y.length;p++){var b=y[p];this.addEncoding(b,i[b])}this.reset()}return t.prototype.addProtocol=function(f,e){this._protocols[f]=e},t.prototype.addEncoding=function(f,e){this._encodings[f]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(f){if(!this._protocols[f])throw new Error('unknown protocol "'+f+'"');this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].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(f){if(!this._encodings[f])throw new Error('unknown encoding "'+f+'"');this._activeEncoding=f},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(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,f))||!this._protocols[this._activeProtocol].restrict(f))return!1;var e=this._encodings[this._activeEncoding](f);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=f,!0},t.prototype.explainEvents=function(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}},t.prototype._compareEvents=function(f,e){return f.col===e.col&&f.row===e.row&&f.button===e.button&&f.action===e.action&&f.ctrl===e.ctrl&&f.alt===e.alt&&f.shift===e.shift},t=x([m(0,h.IBufferService),m(1,h.ICoreService)],t)}();c.CoreMouseService=a},function(D,c,_){"use strict";var x=this&&this.__decorate||function(u,d,r,i){var a,t=arguments.length,f=t<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,d,r,i);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(f=(t<3?a(f):t>3?a(d,r,f):a(d,r))||f);return t>3&&f&&Object.defineProperty(d,r,f),f},m=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DirtyRowService=void 0;var h=_(1),o=function(){function u(d){this._bufferService=d,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(d){d<this._start?this._start=d:d>this._end&&(this._end=d)},u.prototype.markRangeDirty=function(d,r){if(d>r){var i=d;d=r,r=i}d<this._start&&(this._start=d),r>this._end&&(this._end=r)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=x([m(0,h.IBufferService)],u)}();c.DirtyRowService=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;var x=_(0),m=_(79),h=function(){function o(){this._providers=Object.create(null),this._active="",this._onChange=new x.EventEmitter;var u=new m.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}return Object.defineProperty(o.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(o.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}),o.prototype.register=function(u){this._providers[u.version]=u},o.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},o.prototype.getStringCellWidth=function(u){for(var d=0,r=u.length,i=0;i<r;++i){var a=u.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return d+this.wcwidth(a);var t=u.charCodeAt(i);56320<=t&&t<=57343?a=1024*(a-55296)+t-56320+65536:d+=this.wcwidth(t)}d+=this.wcwidth(a)}return d},o}();c.UnicodeService=h},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;var x,m=_(15),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[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 d(){if(this.version="6",!x){x=new Uint8Array(65536),m.fill(x,1),x[0]=0,m.fill(x,0,1,32),m.fill(x,0,127,160),m.fill(x,2,4352,4448),x[9001]=2,x[9002]=2,m.fill(x,2,11904,42192),x[12351]=1,m.fill(x,2,44032,55204),m.fill(x,2,63744,64256),m.fill(x,2,65040,65050),m.fill(x,2,65072,65136),m.fill(x,2,65280,65377),m.fill(x,2,65504,65511);for(var r=0;r<h.length;++r)m.fill(x,0,h[r][0],h[r][1]+1)}}return d.prototype.wcwidth=function(r){return r<32?0:r<127?1:r<65536?x[r]:function(i,a){var t,f=0,e=a.length-1;if(i<a[0][0]||i>a[e][1])return!1;for(;e>=f;)if(i>a[t=f+e>>1][1])f=t+1;else{if(!(i<a[t][0]))return!0;e=t-1}return!1}(r,o)?0:r>=131072&&r<=196605||r>=196608&&r<=262141?2:1},d}();c.UnicodeV6=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0;var x=function(){function m(){this.glevel=0,this._charsets=[]}return m.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},m.prototype.setgLevel=function(h){this.glevel=h,this.charset=this._charsets[h]},m.prototype.setgCharset=function(h,o){this._charsets[h]=o,this.glevel===h&&(this.charset=o)},m}();c.CharsetService=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;var x=_(3);c.updateWindowsModeWrappedState=function(m){var h=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),o=h==null?void 0:h.get(m.cols-1),u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);u&&o&&(u.isWrapped=o[x.CHAR_DATA_CODE_INDEX]!==x.NULL_CELL_CODE&&o[x.CHAR_DATA_CODE_INDEX]!==x.WHITESPACE_CELL_CODE)}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;var x=function(){function m(h){this._action=h,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return m.prototype.writeSync=function(h){if(this._writeBuffer.length){for(var o=this._bufferOffset;o<this._writeBuffer.length;++o){var u=this._writeBuffer[o],d=this._callbacks[o];this._action(u),d&&d()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(h)},m.prototype.write=function(h,o){var u=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return u._innerWrite()})),this._pendingData+=h.length,this._writeBuffer.push(h),this._callbacks.push(o)},m.prototype._innerWrite=function(){for(var h=this,o=Date.now();this._writeBuffer.length>this._bufferOffset;){var u=this._writeBuffer[this._bufferOffset],d=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(u),this._pendingData-=u.length,d&&d(),Date.now()-o>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return h._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},m}();c.WriteBuffer=x},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0;var x=function(){function m(){this._addons=[]}return m.prototype.dispose=function(){for(var h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()},m.prototype.loadAddon=function(h,o){var u=this,d={instance:o,dispose:o.dispose,isDisposed:!1};this._addons.push(d),o.dispose=function(){return u._wrappedAddonDispose(d)},o.activate(h)},m.prototype._wrappedAddonDispose=function(h){if(!h.isDisposed){for(var o=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===h){o=u;break}if(o===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(o,1)}},m}();c.AddonManager=x}])})}}]);
|