(window.webpackJsonp=window.webpackJsonp||[]).push([[254],{"07cG":function(Ee,f,E){Ee.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"1dTM":function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("GQ8N"),K=V(E("Lo0S")),U=E("VSMT"),x=E("GdRQ"),T=E("SZEN"),t=E("vewr"),c=L(E("YJ9k")),i=L(E("MZdM")),o=L(E("ItS6")),h=L(E("whVF")),r=L(E("Fv0C")),m=L(E("LCi9")),y=L(E("rwxt")),v=L(E("Mmt2")),d=L(E("iUHT")),n=L(E("mHUz")),b=L(E("P2ho")),g=E("NBmB");E("mdZa");var S=L(E("34/K")),A=L(E("hXwI")),O=L(E("SgaC")),R=L(E("3690")),B=L(E("8K/p")),F=L(E("xO64"));function L(Z){return Z&&Z.__esModule?Z:{default:Z}}function P(){if(typeof WeakMap!="function")return null;var Z=new WeakMap;return P=function(){return Z},Z}function V(Z){if(Z&&Z.__esModule)return Z;if(Z===null||Y(Z)!=="object"&&typeof Z!="function")return{default:Z};var z=P();if(z&&z.has(Z))return z.get(Z);var W={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in Z)if(Object.prototype.hasOwnProperty.call(Z,a)){var w=I?Object.getOwnPropertyDescriptor(Z,a):null;w&&(w.get||w.set)?Object.defineProperty(W,a,w):W[a]=Z[a]}return W.default=Z,z&&z.set(Z,W),W}function Y(Z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(W){return typeof W}:Y=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},Y(Z)}function q(Z,z){if(!(Z instanceof z))throw new TypeError("Cannot call a class as a function")}function be(Z,z){for(var W=0;W> RFB.constructor"),s._screen=document.createElement("div"),s._screen.style.display="flex",s._screen.style.width="100%",s._screen.style.height="100%",s._screen.style.overflow="auto",s._screen.style.background=Me,s._canvas=document.createElement("canvas"),s._canvas.style.margin="auto",s._canvas.style.outline="none",s._canvas.style.flexShrink="0",s._canvas.width=0,s._canvas.height=0,s._canvas.tabIndex=-1,s._screen.appendChild(s._canvas),s._cursor=new y.default,s._cursorImage=W.cursors.none,s._decoders[g.encodings.encodingRaw]=new S.default,s._decoders[g.encodings.encodingCopyRect]=new A.default,s._decoders[g.encodings.encodingRRE]=new O.default,s._decoders[g.encodings.encodingHextile]=new R.default,s._decoders[g.encodings.encodingTight]=new B.default,s._decoders[g.encodings.encodingTightPNG]=new F.default;try{s._display=new i.default(s._canvas)}catch(C){throw K.Error("Display exception: "+C),C}return s._display.onflush=s._onFlush.bind(Fe(s)),s._keyboard=new r.default(s._canvas),s._keyboard.onkeyevent=s._handleKeyEvent.bind(Fe(s)),s._gestures=new m.default,s._sock=new v.default,s._sock.on("message",function(){s._handleMessage()}),s._sock.on("open",function(){s._rfbConnectionState==="connecting"&&s._rfbInitState===""?(s._rfbInitState="ProtocolVersion",K.Debug("Starting VNC handshake")):s._fail("Unexpected server connection while "+s._rfbConnectionState)}),s._sock.on("close",function(C){K.Debug("WebSocket on-close event");var te="";C.code&&(te="(code: "+C.code,C.reason&&(te+=", reason: "+C.reason),te+=")");switch(s._rfbConnectionState){case"connecting":s._fail("Connection closed "+te);break;case"connected":s._updateConnectionState("disconnecting"),s._updateConnectionState("disconnected");break;case"disconnecting":s._updateConnectionState("disconnected");break;case"disconnected":s._fail("Unexpected server disconnect when already disconnected "+te);break;default:s._fail("Unexpected server disconnect before connecting "+te);break}s._sock.off("close")}),s._sock.on("error",function(C){return K.Warn("WebSocket on-error event")}),setTimeout(s._updateConnectionState.bind(Fe(s),"connecting")),K.Debug("<< RFB.constructor"),s.dragViewport=!1,s.focusOnClick=!0,s._viewOnly=!1,s._clipViewport=!1,s._scaleViewport=!1,s._resizeSession=!1,s._showDotCursor=!1,w.showDotCursor!==void 0&&(K.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),s._showDotCursor=w.showDotCursor),s._qualityLevel=6,s._compressionLevel=2,s}return Ie(W,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(a){this._rfbCredentials=a,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;K.Info("Sending Ctrl-Alt-Del"),this.sendKey(n.default.XK_Control_L,"ControlLeft",!0),this.sendKey(n.default.XK_Alt_L,"AltLeft",!0),this.sendKey(n.default.XK_Delete,"Delete",!0),this.sendKey(n.default.XK_Delete,"Delete",!1),this.sendKey(n.default.XK_Alt_L,"AltLeft",!1),this.sendKey(n.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(a,w,s){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(s===void 0){this.sendKey(a,w,!0),this.sendKey(a,w,!1);return}var C=b.default[w];if(this._qemuExtKeyEventSupported&&C)a=a||0,K.Info("Sending key ("+(s?"down":"up")+"): keysym "+a+", scancode "+C),W.messages.QEMUExtendedKeyEvent(this._sock,a,s,C);else{if(!a)return;K.Info("Sending keysym ("+(s?"down":"up")+"): "+a),W.messages.keyEvent(this._sock,a,s?1:0)}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(a){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(this._clipboardServerCapabilitiesFormats[J]&&this._clipboardServerCapabilitiesActions[ne])this._clipboardText=a,W.messages.extendedClipboardNotify(this._sock,[J]);else{for(var w=new Uint8Array(a.length),s=0;s> RFB.connect"),K.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(a){a.name==="SyntaxError"?this._fail("Invalid host or port ("+a+")"):this._fail("Error when opening socket ("+a+")")}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("touchstart",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),K.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){K.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(a){if(!(a.name==="NotFoundError"))throw a}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),K.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(a){if(!this.focusOnClick)return;this.focus()}},{key:"_setDesktopName",value:function(a){this._fbName=a,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(a){var w=this;window.requestAnimationFrame(function(){w._updateClip(),w._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var a=this._display.clipViewport,w=this._clipViewport;if(this._scaleViewport&&(w=!1),a!==w&&(this._display.clipViewport=w),w){var s=this._screenSize();this._display.viewportChangeSize(s.w,s.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var a=this._screenSize();this._display.autoscale(a.w,a.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;var a=this._screenSize();W.messages.setDesktopSize(this._sock,Math.floor(a.w),Math.floor(a.h),this._screenID,this._screenFlags),K.Debug("Requested new desktop size: "+a.w+"x"+a.h)}},{key:"_screenSize",value:function(){var a=this._screen.getBoundingClientRect();return{w:a.width,h:a.height}}},{key:"_fixScrollbars",value:function(){var a=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=a}},{key:"_updateConnectionState",value:function(a){var w=this,s=this._rfbConnectionState;if(a===s){K.Debug("Already in state '"+a+"', ignoring");return}if(s==="disconnected"){K.Error("Tried changing state of a disconnected RFB object");return}switch(a){case"connected":if(s!=="connecting"){K.Error("Bad transition to connected state, previous connection state: "+s);return}break;case"disconnected":if(s!=="disconnecting"){K.Error("Bad transition to disconnected state, previous connection state: "+s);return}break;case"connecting":if(s!==""){K.Error("Bad transition to connecting state, previous connection state: "+s);return}break;case"disconnecting":if(s!=="connected"&&s!=="connecting"){K.Error("Bad transition to disconnecting state, previous connection state: "+s);return}break;default:K.Error("Unknown connection state: "+a);return}this._rfbConnectionState=a,K.Debug("New state '"+a+"', was '"+s+"'."),this._disconnTimer&&a!=="disconnecting"&&(K.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close"));switch(a){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){K.Error("Disconnection timed out."),w._updateConnectionState("disconnected")},Se*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(a){switch(this._rfbConnectionState){case"disconnecting":K.Error("Failed when disconnecting: "+a);break;case"connected":K.Error("Failed while connected: "+a);break;case"connecting":K.Error("Failed when connecting: "+a);break;default:K.Error("RFB failure: "+a);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(a,w){this._capabilities[a]=w,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){K.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":K.Error("Got data while disconnected");break;case"connected":for(;!this._flushing;){if(!this._normalMsg())break;if(this._sock.rQlen===0)break}break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(a,w,s){this.sendKey(a,w,s)}},{key:"_handleMouse",value:function(a){if(a.type==="click"&&a.target!==this._canvas)return;if(a.stopPropagation(),a.preventDefault(),a.type==="click"||a.type==="contextmenu")return;var w=(0,T.clientToElement)(a.clientX,a.clientY,this._canvas);switch(a.type){case"mousedown":(0,t.setCapture)(this._canvas),this._handleMouseButton(w.x,w.y,!0,1<x.dragThreshold||Math.abs(te)>x.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:a,y:w},this._display.viewportChangePos(C,te));return}if(this._mousePos={x:a,y:w},this._mouseMoveTimer==null){var ue=Date.now()-this._mouseLastMoveTime;ue>je?(this._sendMouse(a,w,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){s._handleDelayedMouseMove()},je-ue)}}},{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(a,w,s){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;W.messages.pointerEvent(this._sock,this._display.absX(a),this._display.absY(w),s)}},{key:"_handleWheel",value:function(a){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;a.stopPropagation(),a.preventDefault();var w=(0,T.clientToElement)(a.clientX,a.clientY,this._canvas),s=a.deltaX,C=a.deltaY;a.deltaMode!==0&&(s*=He,C*=He),this._accumulatedWheelDeltaX+=s,this._accumulatedWheelDeltaY+=C,Math.abs(this._accumulatedWheelDeltaX)>=We&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(w.x,w.y,!0,1<<5),this._handleMouseButton(w.x,w.y,!1,1<<5)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(w.x,w.y,!0,1<<6),this._handleMouseButton(w.x,w.y,!1,1<<6)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=We&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(w.x,w.y,!0,1<<3),this._handleMouseButton(w.x,w.y,!1,1<<3)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(w.x,w.y,!0,1<<4),this._handleMouseButton(w.x,w.y,!1,1<<4)),this._accumulatedWheelDeltaY=0)}},{key:"_fakeMouseMove",value:function(a,w,s){this._handleMouseMove(w,s),this._cursor.move(a.detail.clientX,a.detail.clientY)}},{key:"_handleTapEvent",value:function(a,w){var s=(0,T.clientToElement)(a.detail.clientX,a.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTimexe;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeY+=xe;for(;a.detail.magnitudeY-this._gestureLastMagnitudeY<-xe;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeY-=xe;for(;a.detail.magnitudeX-this._gestureLastMagnitudeX>xe;)this._handleMouseButton(s.x,s.y,!0,32),this._handleMouseButton(s.x,s.y,!1,32),this._gestureLastMagnitudeX+=xe;for(;a.detail.magnitudeX-this._gestureLastMagnitudeX<-xe;)this._handleMouseButton(s.x,s.y,!0,64),this._handleMouseButton(s.x,s.y,!1,64),this._gestureLastMagnitudeX-=xe;break;case"pinch":if(this._fakeMouseMove(a,s.x,s.y),w=Math.hypot(a.detail.magnitudeX,a.detail.magnitudeY),Math.abs(w-this._gestureLastMagnitudeX)>oe){for(this._handleKeyEvent(n.default.XK_Control_L,"ControlLeft",!0);w-this._gestureLastMagnitudeX>oe;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeX+=oe;for(;w-this._gestureLastMagnitudeX<-oe;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeX-=oe}this._handleKeyEvent(n.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(a.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(a,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,1);break;case"longpress":this._fakeMouseMove(a,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var a=this._sock.rQshiftStr(12).substr(4,7);K.Info("Server ProtocolVersion: "+a);var w=0;switch(a){case"000.000":w=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 "+a)}if(w){for(var s="ID:"+this._repeaterID;s.length<250;)s+="\0";return this._sock.sendString(s),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var C="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+C+` `),K.Debug("Sent ProtocolVersion: "+C),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function a(C,te){for(var ue=0;ue=3.7){var w=this._sock.rQshift8();if(this._sock.rQwait("security type",w,1))return!1;if(w===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var s=this._sock.rQshiftBytes(w);if(K.Debug("Server security types: "+s),a(1,s))this._rfbAuthScheme=1;else if(a(22,s))this._rfbAuthScheme=22;else if(a(16,s))this._rfbAuthScheme=16;else if(a(2,s))this._rfbAuthScheme=2;else if(a(19,s))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+s+")");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",K.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var a=this._sock.rQshift32(),w="";if(a>0){if(this._sock.rQwait("reason",a,4))return!1;w=this._sock.rQshiftStr(a)}return w!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:w}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+w+")")):(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 a=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(a),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var a=this._sock.rQshift8(),w=this._sock.rQshift8();if(!(a==0&&w==2))return this._fail("Unsupported VeNCrypt version "+a+"."+w);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var s=this._sock.rQshift8();if(s!=0)return this._fail("VeNCrypt failure "+s);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var C=this._sock.rQshift8();if(C<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=C,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var te=[],ue=0;ue0&&this._sock.rQwait("tunnel capabilities",16*a,4))return!1;if(this._rfbTightVNC=!0,a>0)return this._negotiateTightTunnels(a),!1}if(this._sock.rQwait("sub auth count",4))return!1;var w=this._sock.rQshift32();if(w===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*w,4))return!1;for(var s={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},C=[],te=0;te=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 a=this._sock.rQshift32();return a===0?(this._rfbInitState="ClientInitialisation",K.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=a,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:a}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var a=this._sock.rQshift16(),w=this._sock.rQshift16(),s=this._sock.rQshift8(),C=this._sock.rQshift8(),te=this._sock.rQshift8(),ue=this._sock.rQshift8(),le=this._sock.rQshift16(),Ne=this._sock.rQshift16(),_=this._sock.rQshift16(),j=this._sock.rQshift8(),H=this._sock.rQshift8(),se=this._sock.rQshift8();this._sock.rQskipBytes(3);var ee=this._sock.rQshift32();if(this._sock.rQwait("server init name",ee,24))return!1;var ie=this._sock.rQshiftStr(ee);if(ie=(0,U.decodeUTF8)(ie,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+ee))return!1;var k=this._sock.rQshift16(),G=this._sock.rQshift16(),u=this._sock.rQshift16();this._sock.rQskipBytes(2);var $=(k+G+u)*16;if(this._sock.rQwait("TightVNC extended server init header",$,32+ee))return!1;this._sock.rQskipBytes(16*k),this._sock.rQskipBytes(16*G),this._sock.rQskipBytes(16*u)}return K.Info("Screen: "+a+"x"+w+", bpp: "+s+", depth: "+C+", bigEndian: "+te+", trueColor: "+ue+", redMax: "+le+", greenMax: "+Ne+", blueMax: "+_+", redShift: "+j+", greenShift: "+H+", blueShift: "+se),this._setDesktopName(ie),this._resize(a,w),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(K.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),W.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),W.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var a=[];a.push(g.encodings.encodingCopyRect),this._fbDepth==24&&(a.push(g.encodings.encodingTight),a.push(g.encodings.encodingTightPNG),a.push(g.encodings.encodingHextile),a.push(g.encodings.encodingRRE)),a.push(g.encodings.encodingRaw),a.push(g.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),a.push(g.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),a.push(g.encodings.pseudoEncodingDesktopSize),a.push(g.encodings.pseudoEncodingLastRect),a.push(g.encodings.pseudoEncodingQEMUExtendedKeyEvent),a.push(g.encodings.pseudoEncodingExtendedDesktopSize),a.push(g.encodings.pseudoEncodingXvp),a.push(g.encodings.pseudoEncodingFence),a.push(g.encodings.pseudoEncodingContinuousUpdates),a.push(g.encodings.pseudoEncodingDesktopName),a.push(g.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(a.push(g.encodings.pseudoEncodingVMwareCursor),a.push(g.encodings.pseudoEncodingCursor)),W.messages.clientEncodings(this._sock,a)}},{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 K.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(K.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var a=this._sock.rQshift32();if(a=(0,l.toSigned32bit)(a),this._sock.rQwait("ServerCutText content",Math.abs(a),8))return!1;if(a>=0){var w=this._sock.rQshiftStr(a);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:w}}))}else{a=Math.abs(a);var s=this._sock.rQshift32(),C=s&65535,te=s&4278190080,ue=!!(te&fe);if(ue){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var le=0;le<=15;le++){var Ne=1<0&&ie.charAt(ie.length-1)==="\0"&&(ie=ie.slice(0,-1)),ie=ie.replace(`\r `,` `),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:ie}}))}}else return this._fail("Unexpected action in extended clipboard message: "+te)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var a=this._sock.rQshift32(),w=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",w,9))return!1;w>64&&(K.Warn("Bad payload length ("+w+") in fence response"),w=64);var s=this._sock.rQshiftStr(w);return this._supportsFence=!0,a&1<<31?(a&=1<<0|1<<1,W.messages.clientFence(this._sock,a,s),!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 a=this._sock.rQshift8(),w=this._sock.rQshift8();switch(w){case 0:K.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=a,K.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+w+")");break}return!0}},{key:"_normalMsg",value:function(){var a;this._FBU.rects>0?a=0:a=this._sock.rQshift8();var w,s;switch(a){case 0:return s=this._framebufferUpdate(),s&&!this._enabledContinuousUpdates&&W.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),s;case 1:return this._handleSetColourMapMsg();case 2:return K.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return w=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,w&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),K.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+a+")"),K.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 a=this._sock.rQshiftBytes(12);this._FBU.x=(a[0]<<8)+a[1],this._FBU.y=(a[2]<<8)+a[3],this._FBU.width=(a[4]<<8)+a[5],this._FBU.height=(a[6]<<8)+a[7],this._FBU.encoding=parseInt((a[8]<<24)+(a[9]<<16)+(a[10]<<8)+a[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 g.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case g.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case g.encodings.pseudoEncodingCursor:return this._handleCursor();case g.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var a=document.createEvent("keyboardEvent");a.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(w){}return!0;case g.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case g.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case g.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var a=this._FBU.x,w=this._FBU.y,s=this._FBU.width,C=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var te=this._sock.rQshift8();this._sock.rQshift8();var ue,le=4;if(te==0){var Ne=4294967040|0;if(ue=new Array(s*C*le),this._sock.rQwait("VMware cursor classic encoding",s*C*le*2,2))return!1;for(var _=new Array(s*C),j=0;j>8&255,G=ie>>16&255,u=ie>>24&255;ue[ee*le]=k,ue[ee*le+1]=G,ue[ee*le+2]=u,ue[ee*le+3]=255}else(_[ee]&Ne)==Ne?H[ee]==0?(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=0):((H[ee]&Ne)==Ne,ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255):(ue[ee*le]=0,ue[ee*le+1]=0,ue[ee*le+2]=0,ue[ee*le+3]=255)}else if(te==1){if(this._sock.rQwait("VMware cursor alpha encoding",s*C*4,2))return!1;ue=new Array(s*C*le);for(var $=0;$>24&255,ue[$*4+1]=ye>>16&255,ue[$*4+2]=ye>>8&255,ue[$*4+3]=ye&255}}else return K.Warn("The given cursor type is not supported: "+te+" given."),!1;return this._updateCursor(ue,a,w,s,C),!0}},{key:"_handleCursor",value:function(){var a=this._FBU.x,w=this._FBU.y,s=this._FBU.width,C=this._FBU.height,te=s*C*4,ue=Math.ceil(s/8)*C,le=te+ue;if(this._sock.rQwait("cursor encoding",le))return!1;for(var Ne=this._sock.rQshiftBytes(te),_=this._sock.rQshiftBytes(ue),j=new Uint8Array(s*C*4),H=0,se=0;se9){K.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===a)return;this._qualityLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(a){if(!Number.isInteger(a)||a<0||a>9){K.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===a)return;this._compressionLevel=a,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(a,w){var s=a.split("").map(function(C){return C.charCodeAt(0)});return new d.default(s).encrypt(w)}}]),W}(c.default);f.default=me,me.messages={keyEvent:function(z,W,I){var a=z._sQ,w=z._sQlen;a[w]=4,a[w+1]=I,a[w+2]=0,a[w+3]=0,a[w+4]=W>>24,a[w+5]=W>>16,a[w+6]=W>>8,a[w+7]=W,z._sQlen+=8,z.flush()},QEMUExtendedKeyEvent:function(z,W,I,a){function w(ue){var le=a>>8,Ne=a&255;return le===224&&Ne<127?Ne|128:ue}var s=z._sQ,C=z._sQlen;s[C]=255,s[C+1]=0,s[C+2]=I>>8,s[C+3]=I,s[C+4]=W>>24,s[C+5]=W>>16,s[C+6]=W>>8,s[C+7]=W;var te=w(a);s[C+8]=te>>24,s[C+9]=te>>16,s[C+10]=te>>8,s[C+11]=te,z._sQlen+=12,z.flush()},pointerEvent:function(z,W,I,a){var w=z._sQ,s=z._sQlen;w[s]=5,w[s+1]=a,w[s+2]=W>>8,w[s+3]=W,w[s+4]=I>>8,w[s+5]=I,z._sQlen+=6,z.flush()},_buildExtendedClipboardFlags:function(z,W){for(var I=new Uint8Array(4),a=0,w=0,s=0;s>24,I[1]=0,I[2]=0,I[3]=a,I},extendedClipboardProvide:function(z,W,I){for(var a=new h.default,w=[],s=0;s>24&255,C.length>>16&255,C.length>>8&255,C.length&255);for(var te=0;te>24,w[s+1]=I[a[C]]>>16,w[s+2]=I[a[C]]>>8,w[s+3]=I[a[C]]>>0,s+=4,w[3]|=1<2&&arguments[2]!==void 0?arguments[2]:!1,a=z._sQ,w=z._sQlen;a[w]=6,a[w+1]=0,a[w+2]=0,a[w+3]=0;var s;I?s=(0,l.toUnsigned32bit)(-W.length):s=W.length,a[w+4]=s>>24,a[w+5]=s>>16,a[w+6]=s>>8,a[w+7]=s,z._sQlen+=8;for(var C=0,te=W.length;te>0;){for(var ue=Math.min(te,z._sQbufferSize-z._sQlen),le=0;le>8,s[C+3]=W,s[C+4]=I>>8,s[C+5]=I,s[C+6]=1,s[C+7]=0,s[C+8]=a>>24,s[C+9]=a>>16,s[C+10]=a>>8,s[C+11]=a,s[C+12]=0,s[C+13]=0,s[C+14]=0,s[C+15]=0,s[C+16]=W>>8,s[C+17]=W,s[C+18]=I>>8,s[C+19]=I,s[C+20]=w>>24,s[C+21]=w>>16,s[C+22]=w>>8,s[C+23]=w,z._sQlen+=24,z.flush()},clientFence:function(z,W,I){var a=z._sQ,w=z._sQlen;a[w]=248,a[w+1]=0,a[w+2]=0,a[w+3]=0,a[w+4]=W>>24,a[w+5]=W>>16,a[w+6]=W>>8,a[w+7]=W;var s=I.length;a[w+8]=s;for(var C=0;C>8,C[te+3]=I,C[te+4]=a>>8,C[te+5]=a,C[te+6]=w>>8,C[te+7]=w,C[te+8]=s>>8,C[te+9]=s,z._sQlen+=10,z.flush()},pixelFormat:function(z,W,I){var a=z._sQ,w=z._sQlen,s;W>16?s=32:W>8?s=16:s=8;var C=Math.floor(W/3);a[w]=0,a[w+1]=0,a[w+2]=0,a[w+3]=0,a[w+4]=s,a[w+5]=W,a[w+6]=0,a[w+7]=I?1:0,a[w+8]=0,a[w+9]=(1<>8,I[a+3]=W.length;for(var w=a+4,s=0;s>24,I[w+1]=C>>16,I[w+2]=C>>8,I[w+3]=C,w+=4}z._sQlen+=w-a,z.flush()},fbUpdateRequest:function(z,W,I,a,w,s){var C=z._sQ,te=z._sQlen;typeof I=="undefined"&&(I=0),typeof a=="undefined"&&(a=0),C[te]=3,C[te+1]=W?1:0,C[te+2]=I>>8&255,C[te+3]=I&255,C[te+4]=a>>8&255,C[te+5]=a&255,C[te+6]=w>>8&255,C[te+7]=w&255,C[te+8]=s>>8&255,C[te+9]=s&255,z._sQlen+=10,z.flush()},xvpOp:function(z,W,I){var a=z._sQ,w=z._sQlen;a[w]=250,a[w+1]=0,a[w+2]=W,a[w+3]=I,z._sQlen+=4,z.flush()}},me.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}}},"1q3G":function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=l;function l(){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}},"34/K":function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c>0&3)*255/3,O[R*4+1]=(g[S+R]>>2&3)*255/3,O[R*4+2]=(g[S+R]>>4&3)*255/3,O[R*4+4]=0;g=O,S=0}return m.blitImage(c,n,o,b,g,S),r.rQskipBytes(b*d),this._lines-=b,!(this._lines>0)}}]),T}();f.default=x},"3690":function(Ee,f,E){"use strict";function l(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(r){return typeof r}:l=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},l(o)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var o=new WeakMap;return U=function(){return o},o}function x(o){if(o&&o.__esModule)return o;if(o===null||l(o)!=="object"&&typeof o!="function")return{default:o};var h=U();if(h&&h.has(o))return h.get(o);var r={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in o)if(Object.prototype.hasOwnProperty.call(o,y)){var v=m?Object.getOwnPropertyDescriptor(o,y):null;v&&(v.get||v.set)?Object.defineProperty(r,y,v):r[y]=o[y]}return r.default=o,h&&h.set(o,r),r}function T(o,h){if(!(o instanceof h))throw new TypeError("Cannot call a class as a function")}function t(o,h){for(var r=0;r0;){var g=1;if(d.rQwait("HEXTILE",g))return!1;var S=d.rQ,A=d.rQi,O=S[A];if(O>30)throw new Error("Illegal hextile subencoding (subencoding: "+O+")");var R=this._totalTiles-this._tiles,B=R%this._tilesX,F=Math.floor(R/this._tilesX),L=r+B*16,P=m+F*16,V=Math.min(16,r+y-L),Y=Math.min(16,m+v-P);if(O&1)g+=V*Y*4;else if(O&2&&(g+=4),O&4&&(g+=4),O&8){if(g++,d.rQwait("HEXTILE",g))return!1;var q=S[A+g-1];O&16?g+=q*(4+2):g+=q*2}if(d.rQwait("HEXTILE",g))return!1;if(A++,O===0)this._lastsubencoding&1?K.Debug(" Ignoring blank after RAW"):n.fillRect(L,P,V,Y,this._background);else if(O&1)n.blitImage(L,P,V,Y,S,A),A+=g-1;else{if(O&2&&(this._background=[S[A],S[A+1],S[A+2],S[A+3]],A+=4),O&4&&(this._foreground=[S[A],S[A+1],S[A+2],S[A+3]],A+=4),n.startTile(L,P,V,Y,this._background),O&8){var be=S[A];A++;for(var Ie=0;Ie>4,Re=Te&15,Fe=S[A];A++;var Pe=(Fe>>4)+1,ge=(Fe&15)+1;n.subTile(ke,Re,Pe,ge,Xe)}}n.finishTile()}d.rQi=A,this._lastsubencoding=O,this._tiles--}return!0}}]),o}();f.default=i},"6BzB":function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.shrinkBuf=l,f.arraySet=K,f.flattenChunks=U,f.Buf32=f.Buf16=f.Buf8=void 0;function l(c,i){return c.length===i?c:c.subarray?c.subarray(0,i):(c.length=i,c)}function K(c,i,o,h,r){if(i.subarray&&c.subarray){c.set(i.subarray(o,o+h),r);return}for(var m=0;m=32&&x<=255)return x;var T=l[x];return T!==void 0?T:16777216|x}};f.default=K},"8CQX":function(Ee,f,E){"use strict";function l(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(n){return typeof n}:l=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l(v)}Object.defineProperty(f,"__esModule",{value:!0}),f.getKeycode=r,f.getKey=m,f.getKeysym=y;var K=h(E("mHUz")),U=h(E("8+yF")),x=h(E("6Qwc")),T=h(E("gIYZ")),t=h(E("mTgk")),c=o(E("GdRQ"));function i(){if(typeof WeakMap!="function")return null;var v=new WeakMap;return i=function(){return v},v}function o(v){if(v&&v.__esModule)return v;if(v===null||l(v)!=="object"&&typeof v!="function")return{default:v};var d=i();if(d&&d.has(v))return d.get(v);var n={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){var S=b?Object.getOwnPropertyDescriptor(v,g):null;S&&(S.get||S.set)?Object.defineProperty(n,g,S):n[g]=v[g]}return n.default=v,d&&d.set(v,n),n}function h(v){return v&&v.__esModule?v:{default:v}}function r(v){if(v.code){switch(v.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return v.code}if(v.type!=="keypress"&&v.keyCode in x.default){var d=x.default[v.keyCode];if(c.isMac()&&d==="ContextMenu"&&(d="MetaRight"),v.location===2)switch(d){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(v.location===3)switch(d){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 d}return"Unidentified"}function m(v){if(v.key!==void 0){switch(v.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 v.char}switch(v.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(v.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(v.key==="\0"&&v.code==="NumpadDecimal")return"Delete";if(!c.isIE()&&!c.isEdge())return v.key;if(v.key.length!==1&&v.key!=="Unidentified")return v.key}var d=r(v);return d in T.default?T.default[d]:v.charCode?String.fromCharCode(v.charCode):"Unidentified"}function y(v){var d=m(v);if(d==="Unidentified")return null;if(d in t.default){var n=v.location;if(d==="Meta"&&n===0&&(n=2),d==="Clear"&&n===3){var b=r(v);b==="NumLock"&&(n=0)}if((n===void 0||n>3)&&(n=0),d==="Meta"){var g=r(v);if(g==="AltLeft")return K.default.XK_Meta_L;if(g==="AltRight")return K.default.XK_Meta_R}if(d==="Clear"){var S=r(v);if(S==="NumLock")return K.default.XK_Num_Lock}return t.default[d][n]}if(d.length!==1)return null;var A=d.charCodeAt();return A?U.default.lookup(A):null}},"8K/p":function(Ee,f,E){"use strict";function l(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(y){return typeof y}:l=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},l(r)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=t(E("Lo0S")),U=x(E("ItS6"));function x(r){return r&&r.__esModule?r:{default:r}}function T(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return T=function(){return r},r}function t(r){if(r&&r.__esModule)return r;if(r===null||l(r)!=="object"&&typeof r!="function")return{default:r};var m=T();if(m&&m.has(r))return m.get(r);var y={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in r)if(Object.prototype.hasOwnProperty.call(r,d)){var n=v?Object.getOwnPropertyDescriptor(r,d):null;n&&(n.get||n.set)?Object.defineProperty(y,d,n):y[d]=r[d]}return y.default=r,m&&m.set(r,y),y}function c(r,m){if(!(r instanceof m))throw new TypeError("Cannot call a class as a function")}function i(r,m){for(var y=0;y>A&1&&(this._zlibs[A].reset(),K.Info("Reset zlib stream "+A));this._ctl=this._ctl>>4}var O;if(this._ctl===8)O=this._fillRect(y,v,d,n,b,g,S);else if(this._ctl===9)O=this._jpegRect(y,v,d,n,b,g,S);else if(this._ctl===10)O=this._pngRect(y,v,d,n,b,g,S);else if((this._ctl&128)==0)O=this._basicRect(this._ctl,y,v,d,n,b,g,S);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return O&&(this._ctl=null),O}},{key:"_fillRect",value:function(y,v,d,n,b,g,S){if(b.rQwait("TIGHT",3))return!1;var A=b.rQi,O=b.rQ;return g.fillRect(y,v,d,n,[O[A+2],O[A+1],O[A]],!1),b.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(y,v,d,n,b,g,S){var A=this._readData(b);return A===null?!1:(g.imageRect(y,v,d,n,"image/jpeg",A),!0)}},{key:"_pngRect",value:function(y,v,d,n,b,g,S){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(y,v,d,n,b,g,S,A){if(this._filter===null)if(y&4){if(g.rQwait("TIGHT",1))return!1;this._filter=g.rQshift8()}else this._filter=0;var O=y&3,R;switch(this._filter){case 0:R=this._copyFilter(O,v,d,n,b,g,S,A);break;case 1:R=this._paletteFilter(O,v,d,n,b,g,S,A);break;case 2:R=this._gradientFilter(O,v,d,n,b,g,S,A);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return R&&(this._filter=null),R}},{key:"_copyFilter",value:function(y,v,d,n,b,g,S,A){var O=n*b*3,R;if(O<12){if(g.rQwait("TIGHT",O))return!1;R=g.rQshiftBytes(O)}else{if(R=this._readData(g),R===null)return!1;this._zlibs[y].setInput(R),R=this._zlibs[y].inflate(O),this._zlibs[y].setInput(null)}return S.blitRgbImage(v,d,n,b,R,0,!1),!0}},{key:"_paletteFilter",value:function(y,v,d,n,b,g,S,A){if(this._numColors===0){if(g.rQwait("TIGHT palette",1))return!1;var O=g.rQpeek8()+1,R=O*3;if(g.rQwait("TIGHT palette",1+R))return!1;this._numColors=O,g.rQskipBytes(1),g.rQshiftTo(this._palette,R)}var B=this._numColors<=2?1:8,F=Math.floor((n*B+7)/8),L=F*b,P;if(L<12){if(g.rQwait("TIGHT",L))return!1;P=g.rQshiftBytes(L)}else{if(P=this._readData(g),P===null)return!1;this._zlibs[y].setInput(P),P=this._zlibs[y].inflate(L),this._zlibs[y].setInput(null)}return this._numColors==2?this._monoRect(v,d,n,b,P,this._palette,S):this._paletteRect(v,d,n,b,P,this._palette,S),this._numColors=0,!0}},{key:"_monoRect",value:function(y,v,d,n,b,g,S){for(var A=this._getScratchBuffer(d*n*4),O=Math.floor((d+7)/8),R=Math.floor(d/8),B=0;B=0;V--)F=(B*d+P*8+7-V)*4,L=(b[B*O+P]>>V&1)*3,A[F]=g[L],A[F+1]=g[L+1],A[F+2]=g[L+2],A[F+3]=255;for(var Y=7;Y>=8-d%8;Y--)F=(B*d+P*8+7-Y)*4,L=(b[B*O+P]>>Y&1)*3,A[F]=g[L],A[F+1]=g[L+1],A[F+2]=g[L+2],A[F+3]=255}S.blitRgbxImage(y,v,d,n,A,0,!1)}},{key:"_paletteRect",value:function(y,v,d,n,b,g,S){for(var A=this._getScratchBuffer(d*n*4),O=d*n*4,R=0,B=0;R1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(l.a)())return null;var h=document.createElement("style");if((i=o.csp)===null||i===void 0?void 0:i.nonce){var r;h.nonce=(r=o.csp)===null||r===void 0?void 0:r.nonce}h.innerHTML=c;var m=U(o),y=m.firstChild;return o.prepend&&m.prepend?m.prepend(h):o.prepend&&y?m.insertBefore(h,y):m.appendChild(h),h}var T=new Map;function t(c,i){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=U(o);if(!T.has(h)){var r=x("",o),m=r.parentNode;T.set(h,m),m.removeChild(r)}var y=Array.from(T.get(h).children).find(function(g){return g.tagName==="STYLE"&&g[K]===i});if(y){var v,d;if(((v=o.csp)===null||v===void 0?void 0:v.nonce)&&y.nonce!==((d=o.csp)===null||d===void 0?void 0:d.nonce)){var n;y.nonce=(n=o.csp)===null||n===void 0?void 0:n.nonce}return y.innerHTML!==c&&(y.innerHTML=c),y}var b=x(c,o);return b[K]=i,b}},Fv0C:function(Ee,f,E){"use strict";function l(v){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(n){return typeof n}:l=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},l(v)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=o(E("Lo0S")),U=E("vewr"),x=o(E("8CQX")),T=c(E("mHUz")),t=o(E("GdRQ"));function c(v){return v&&v.__esModule?v:{default:v}}function i(){if(typeof WeakMap!="function")return null;var v=new WeakMap;return i=function(){return v},v}function o(v){if(v&&v.__esModule)return v;if(v===null||l(v)!=="object"&&typeof v!="function")return{default:v};var d=i();if(d&&d.has(v))return d.get(v);var n={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){var S=b?Object.getOwnPropertyDescriptor(v,g):null;S&&(S.get||S.set)?Object.defineProperty(n,g,S):n[g]=v[g]}return n.default=v,d&&d.set(v,n),n}function h(v,d){if(!(v instanceof d))throw new TypeError("Cannot call a class as a function")}function r(v,d){for(var n=0;n=48&&n.keyCode<=57)b=n.keyCode;else if(n.keyCode>=65&&n.keyCode<=90){var S=String.fromCharCode(n.keyCode);n.shiftKey?S=S.toUpperCase():S=S.toLowerCase(),b=S.charCodeAt()}else b=0;this._sendKeyEvent(b,g,!0)}},{key:"_handleKeyUp",value:function(n){(0,U.stopEvent)(n);var b=this._getKeyCode(n);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(T.default.XK_Control_L,"ControlLeft",!0)),(t.isMac()||t.isIOS())&&b==="CapsLock"){this._sendKeyEvent(T.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(T.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[b],b,!1),t.isWindows()&&(b==="ShiftLeft"||b==="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(T.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){K.Debug(">> Keyboard.allKeysUp");for(var n in this._keyDownList)this._sendKeyEvent(this._keyDownList[n],n,!1);K.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(n){if(n.skipCheckAlt)return;if(n.altKey)return;var b=this._target,g=this._keyDownList;["AltLeft","AltRight"].forEach(function(S){if(!(S in g))return;var A=new KeyboardEvent("keyup",{key:g[S],code:S});A.skipCheckAlt=!0,b.dispatchEvent(A)})}},{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),t.isWindows()&&t.isFirefox()){var n=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(b){return document.addEventListener(b,n,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(t.isWindows()&&t.isFirefox()){var n=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(b){return document.removeEventListener(b,n)})}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()}}]),v}();f.default=y},GQ8N:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.toUnsigned32bit=l,f.toSigned32bit=K;function l(U){return U>>>0}function K(U){return U|0}},GdRQ:function(Ee,f,E){"use strict";function l(F){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(P){return typeof P}:l=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},l(F)}Object.defineProperty(f,"__esModule",{value:!0}),f.isMac=b,f.isWindows=g,f.isIOS=S,f.isSafari=A,f.isIE=O,f.isEdge=R,f.isFirefox=B,f.hasScrollbarGutter=f.supportsImageMetadata=f.supportsCursorURIs=f.dragThreshold=f.isTouchDevice=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var F=new WeakMap;return U=function(){return F},F}function x(F){if(F&&F.__esModule)return F;if(F===null||l(F)!=="object"&&typeof F!="function")return{default:F};var L=U();if(L&&L.has(F))return L.get(F);var P={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Y in F)if(Object.prototype.hasOwnProperty.call(F,Y)){var q=V?Object.getOwnPropertyDescriptor(F,Y):null;q&&(q.get||q.set)?Object.defineProperty(P,Y,q):P[Y]=F[Y]}return P.default=F,L&&L.set(F,P),P}var T="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;f.isTouchDevice=T,window.addEventListener("touchstart",function F(){f.isTouchDevice=T=!0,window.removeEventListener("touchstart",F,!1)},!1);var t=10*(window.devicePixelRatio||1);f.dragThreshold=t;var c=!1;try{var i=document.createElement("canvas");i.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',i.style.cursor.indexOf("url")===0?(K.Info("Data URI scheme cursor supported"),c=!0):K.Warn("Data URI scheme cursor not supported")}catch(F){K.Error("Data URI scheme cursor test exception: "+F)}var o=c;f.supportsCursorURIs=o;var h=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),h=!0}catch(F){}var r=h;f.supportsImageMetadata=r;var m=!0;try{var y=document.createElement("div");y.style.visibility="hidden",y.style.overflow="scroll",document.body.appendChild(y);var v=document.createElement("div");y.appendChild(v);var d=y.offsetWidth-v.offsetWidth;y.parentNode.removeChild(y),m=d!=0}catch(F){K.Error("Scrollbar test exception: "+F)}var n=m;f.hasScrollbarGutter=n;function b(){return navigator&&!!/mac/i.exec(navigator.platform)}function g(){return navigator&&!!/win/i.exec(navigator.platform)}function S(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function A(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function O(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function R(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function B(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},Gytx:function(Ee,f){Ee.exports=function(l,K,U,x){var T=U?U.call(x,l,K):void 0;if(T!==void 0)return!!T;if(l===K)return!0;if(typeof l!="object"||!l||typeof K!="object"||!K)return!1;var t=Object.keys(l),c=Object.keys(K);if(t.length!==c.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(K),o=0;o1&&arguments[1]!==void 0?arguments[1]:{};return Object(T.f)("myshixuns/".concat(Q,"/repository.json"),ne)}function V(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/start.json"),ne||{})}function Y(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/start.json"),ne||{})}function q(Q){return Object(T.c)("myshixuns/".concat(Q,"/reset_pod.json"))}function be(Q){return Object(T.c)("myshixuns/".concat(Q.myshixunId,"/reset_pod.json"),{game_id:Q.game_id})}function Ie(Q){return Object(T.c)("myshixuns/".concat(Q.myshixunId,"/reset_pod.json"),{game_id:Q.game_id})}function Xe(Q){var ne=Q.myshixunId;return delete Q.myshixunId,Object(T.c)("myshixuns/".concat(ne,"/reset_pod.json"),Object(K.a)({game_id:Q.game_id},Q))}function Te(Q){return Object(T.c)("tasks/".concat(Q,"/check_test_sets.json"))}function ke(Q){return Object(T.c)("tasks/".concat(Q,"/get_answer_info.json"))}function Re(Q){return Object(T.c)("tasks/".concat(Q,"/get_choose_answer.json"))}function Fe(Q){return Object(T.c)("tasks/".concat(Q,"/unlock_choose_answer.json"))}function Pe(Q,ne){return Object(T.c)("tasks/".concat(Q,"/unlock_answer.json?answer_id=").concat(ne))}function ge(Q,ne,_e){return Object(T.f)("tasks/".concat(Q,"/set_games_status.json"),{result:ne,data:_e})}function Se(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/active_pod.json?game_id=").concat(ne))}function Me(Q,ne){return Object(T.a)("/api/myshixuns/".concat(Q,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:ne}})}function je(Q,ne){return Object(T.c)("myshixuns/".concat(Q,"/active_pod.json?game_id=").concat(ne))}function We(Q,ne){return Object(T.c)("tasks/".concat(Q,"/rank_list.json"),ne)}function He(Q,ne){return Object(T.f)("tasks/".concat(Q,"/close_windows_vnc.json"),{tpi_id:ne})}function oe(Q){return Object(T.c)("tasks/".concat(Q,"/pull_files.json"))}function xe(Q,ne){return Object(T.f)("tasks/".concat(Q,"/log_output"),ne)}function ce(Q){return Object(T.c)("tasks/".concat(Q,"/stop_log_output.json"))}function ae(Q){return J.apply(this,arguments)}function J(){return J=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/add_file.json"),{method:"post",body:ne}));case 1:case"end":return me.stop()}},Q)})),J.apply(this,arguments)}function he(Q){return re.apply(this,arguments)}function re(){return re=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/delete_git_file.json"),{method:"Delete",body:ne}));case 1:case"end":return me.stop()}},Q)})),re.apply(this,arguments)}function ve(Q){return Le.apply(this,arguments)}function Le(){return Le=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/myshixuns/".concat(ne.id,"/mv_file.json"),{method:"post",body:ne}));case 1:case"end":return me.stop()}},Q)})),Le.apply(this,arguments)}function fe(Q){return Ae.apply(this,arguments)}function Ae(){return Ae=Object(l.a)(x.a.mark(function Q(ne){return x.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.abrupt("return",Object(T.a)("/api/tasks/".concat(ne.id,"/rep_content.json"),{method:"get",params:ne}));case 1:case"end":return me.stop()}},Q)})),Ae.apply(this,arguments)}},ItS6:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("eP3c"),K=U(E("1q3G"));function U(i){return i&&i.__esModule?i:{default:i}}function x(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function T(i,o){for(var h=0;hthis.chunkSize&&(this.chunkSize=h,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=h;var r=(0,l.inflate)(this.strm,0);if(r<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=h)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,l.inflateReset)(this.strm)}}]),i}();f.default=c},IxHN:function(Ee,f,E){"use strict";var l=E("q1tI"),K=E.n(l),U=E("07cG"),x=E.n(U);f.a=function(T){var t=T.message,c=T.className,i=T.children,o=T.style,h=o===void 0?{}:o;return K.a.createElement("div",{className:"".concat(x.a.idsRingWrapper," ").concat(c)},K.a.createElement("div",{className:x.a.ldsRing},K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null),K.a.createElement("div",null)),t?K.a.createElement("p",{style:h},t):null,i)}},JSwD:function(Ee,f,E){"use strict";function l(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(g){return typeof g}:l=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},l(n)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=d;var K=x(E("6BzB"));function U(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return U=function(){return n},n}function x(n){if(n&&n.__esModule)return n;if(n===null||l(n)!=="object"&&typeof n!="function")return{default:n};var b=U();if(b&&b.has(n))return b.get(n);var g={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in n)if(Object.prototype.hasOwnProperty.call(n,A)){var O=S?Object.getOwnPropertyDescriptor(n,A):null;O&&(O.get||O.set)?Object.defineProperty(g,A,O):g[A]=n[A]}return g.default=n,b&&b.set(n,g),g}var T=15,t=852,c=592,i=0,o=1,h=2,r=[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],m=[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],y=[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],v=[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 d(n,b,g,S,A,O,R,B){var F=B.bits,L=0,P=0,V=0,Y=0,q=0,be=0,Ie=0,Xe=0,Te=0,ke=0,Re,Fe,Pe,ge,Se,Me=null,je=0,We,He=new K.Buf16(T+1),oe=new K.Buf16(T+1),xe=null,ce=0,ae,J,he;for(L=0;L<=T;L++)He[L]=0;for(P=0;P=1&&!(He[Y]!==0);Y--);if(q>Y&&(q=Y),Y===0)return A[O++]=1<<24|64<<16|0,A[O++]=1<<24|64<<16|0,B.bits=1,0;for(V=1;V0&&(n===i||Y!==1))return-1;for(oe[1]=0,L=1;Lt||n===h&&Te>c)return 1;for(;;){ae=L-Ie,R[P]We?(J=xe[ce+R[P]],he=Me[je+R[P]]):(J=32+64,he=0),Re=1<>Ie)+Fe]=ae<<24|J<<16|he|0;while(Fe!==0);for(Re=1<>=1;if(Re!==0?(ke&=Re-1,ke+=Re):ke=0,P++,--He[L]===0){if(L===Y)break;L=b[g+R[P]]}if(L>q&&(ke&ge)!==Pe){for(Ie===0&&(Ie=q),Se+=V,be=L-Ie,Xe=1<t||n===h&&Te>c)return 1;Pe=ke&ge,A[Pe]=q<<24|be<<16|Se-O|0}}return ke!==0&&(A[Se+ke]=L-Ie<<24|64<<16|0),B.bits=q,0}},LCi9:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function K(A,O){for(var R=0;R0&&Date.now()-this._tracked[0].started>d){this._state=x,this._ignored.push(R);return}if(this._waitingRelease){this._state=x,this._ignored.push(R);return}this._tracked.push({id:R,started:Date.now(),active:!0,firstX:B,firstY:F,lastX:B,lastY:F,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(T|i|o),this._stopLongpressTimeout();break;case 3:this._state&=~(t|h|r);break;default:this._state=x}}},{key:"_touchMove",value:function(R,B,F){var L=this._tracked.find(function(Ie){return Ie.id===R});if(L===void 0)return;L.lastX=B,L.lastY=F;var P=B-L.firstX,V=F-L.firstY;if((L.firstX!==L.lastX||L.firstY!==L.lastY)&&(L.angle=Math.atan2(V,P)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(P,V)y){var be=Math.abs(L.angle-Y.angle);be=Math.abs((be+180)%360-180),be>v?this._state&=~h:this._state&=~r,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}},{key:"_touchEnd",value:function(R,B,F){if(this._ignored.indexOf(R)!==-1){this._ignored.splice(this._ignored.indexOf(R),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=m,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=x),!this._hasDetectedGesture()&&(this._state&=~(i|h|r),this._state&=~o,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(t|c);break;case 2:this._state&=~(T|c);break}}if(this._waitingRelease){Date.now()-this._releaseStart>d&&(this._state=x),this._tracked.some(function(V){return Date.now()-V.started>n})&&(this._state=x);var L=this._tracked.find(function(V){return V.id===R});if(L.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==x)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var P=0;P> Display.constructor"),this._target=v,!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},K.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),K.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return r(y,[{key:"viewportChangePos",value:function(d,n){var b=this._viewportLoc;d=Math.floor(d),n=Math.floor(n),this._clipViewport||(d=-b.w,n=-b.h);var g=b.x+b.w-1,S=b.y+b.h-1;if(d<0&&b.x+d<0&&(d=-b.x),g+d>=this._fbWidth&&(d-=g+d-this._fbWidth+1),b.y+n<0&&(n=-b.y),S+n>=this._fbHeight&&(n-=S+n-this._fbHeight+1),d===0&&n===0)return;K.Debug("viewportChange deltaX: "+d+", deltaY: "+n),b.x+=d,b.y+=n,this._damage(b.x,b.y,b.w,b.h),this.flip()}},{key:"viewportChangeSize",value:function(d,n){(!this._clipViewport||typeof d=="undefined"||typeof n=="undefined")&&(K.Debug("Setting viewport to full display region"),d=this._fbWidth,n=this._fbHeight),d=Math.floor(d),n=Math.floor(n),d>this._fbWidth&&(d=this._fbWidth),n>this._fbHeight&&(n=this._fbHeight);var b=this._viewportLoc;if(b.w!==d||b.h!==n){b.w=d,b.h=n;var g=this._target;g.width=d,g.height=n,this.viewportChangePos(0,0),this._damage(b.x,b.y,b.w,b.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(d){return this._scale===0?0:(0,T.toSigned32bit)(d/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(d){return this._scale===0?0:(0,T.toSigned32bit)(d/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(d,n){this._prevDrawStyle="",this._fbWidth=d,this._fbHeight=n;var b=this._backbuffer;if(b.width!==d||b.height!==n){var g=null;b.width>0&&b.height>0&&(g=this._drawCtx.getImageData(0,0,b.width,b.height)),b.width!==d&&(b.width=d),b.height!==n&&(b.height=n),g&&this._drawCtx.putImageData(g,0,0)}var S=this._viewportLoc;this.viewportChangeSize(S.w,S.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(d,n,b,g){dthis._damageBounds.right&&(this._damageBounds.right=d+b),n+g>this._damageBounds.bottom&&(this._damageBounds.bottom=n+g)}},{key:"flip",value:function(d){if(this._renderQ.length!==0&&!d)this._renderQPush({type:"flip"});else{var n=this._damageBounds.left,b=this._damageBounds.top,g=this._damageBounds.right-n,S=this._damageBounds.bottom-b,A=n-this._viewportLoc.x,O=b-this._viewportLoc.y;A<0&&(g+=A,n-=A,A=0),O<0&&(S+=O,b-=O,O=0),A+g>this._viewportLoc.w&&(g=this._viewportLoc.w-A),O+S>this._viewportLoc.h&&(S=this._viewportLoc.h-O),g>0&&S>0&&this._targetCtx.drawImage(this._backbuffer,n,b,g,S,A,O,g,S),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(d,n,b,g,S,A){this._renderQ.length!==0&&!A?this._renderQPush({type:"fill",x:d,y:n,width:b,height:g,color:S}):(this._setFillColor(S),this._drawCtx.fillRect(d,n,b,g),this._damage(d,n,b,g))}},{key:"copyImage",value:function(d,n,b,g,S,A,O){this._renderQ.length!==0&&!O?this._renderQPush({type:"copy",oldX:d,oldY:n,x:b,y:g,width:S,height:A}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,d,n,S,A,b,g,S,A),this._damage(b,g,S,A))}},{key:"imageRect",value:function(d,n,b,g,S,A){if(b===0||g===0)return;var O=new Image;O.src="data: "+S+";base64,"+U.default.encode(A),this._renderQPush({type:"img",img:O,x:d,y:n,width:b,height:g})}},{key:"startTile",value:function(d,n,b,g,S){this._tileX=d,this._tileY=n,b===16&&g===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(b,g);for(var A=S[2],O=S[1],R=S[0],B=this._tile.data,F=0;F=S?b=d/g.w:b=n/g.h}this._rescale(b)}},{key:"_rescale",value:function(d){this._scale=d;var n=this._viewportLoc,b=d*n.w+"px",g=d*n.h+"px";(this._target.style.width!==b||this._target.style.height!==g)&&(this._target.style.width=b,this._target.style.height=g)}},{key:"_setFillColor",value:function(d){var n="rgb("+d[2]+","+d[1]+","+d[0]+")";n!==this._prevDrawStyle&&(this._drawCtx.fillStyle=n,this._prevDrawStyle=n)}},{key:"_rgbImageData",value:function(d,n,b,g,S,A){for(var O=this._drawCtx.createImageData(b,g),R=O.data,B=0,F=A;B0;){var n=this._renderQ[0];switch(n.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(n.oldX,n.oldY,n.x,n.y,n.width,n.height,!0);break;case"fill":this.fillRect(n.x,n.y,n.width,n.height,n.color,!0);break;case"blit":this.blitImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"blitRgb":this.blitRgbImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(n.x,n.y,n.width,n.height,n.data,0,!0);break;case"img":if(n.img.complete&&n.img.width!==0&&n.img.height!==0){if(n.img.width!==n.width||n.img.height!==n.height){K.Error("Decoded image has incorrect dimensions. Got "+n.img.width+"x"+n.img.height+". Expected "+n.width+"x"+n.height+".");return}this.drawImage(n.img,n.x,n.y)}else n.img._noVNCDisplay=this,n.img.addEventListener("load",this._resumeRenderQ),d=!1;break}d&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(d){this._rescale(d)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(d){this._clipViewport=d;var n=this._viewportLoc;this.viewportChangeSize(n.w,n.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),y}();f.default=m},Mmt2:function(Ee,f,E){"use strict";function l(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(y){return typeof y}:l=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},l(r)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return U=function(){return r},r}function x(r){if(r&&r.__esModule)return r;if(r===null||l(r)!=="object"&&typeof r!="function")return{default:r};var m=U();if(m&&m.has(r))return m.get(r);var y={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in r)if(Object.prototype.hasOwnProperty.call(r,d)){var n=v?Object.getOwnPropertyDescriptor(r,d):null;n&&(n.get||n.set)?Object.defineProperty(y,d,n):y[d]=r[d]}return y.default=r,m&&m.set(r,y),y}function T(r,m){if(!(r instanceof m))throw new TypeError("Cannot call a class as a function")}function t(r,m){for(var y=0;y=0;d--)v+=this._rQ[this._rQi++]<1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+y,v-y)}},{key:"rQwait",value:function(y,v,d){if(this.rQlen0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(y){this._sQ.set(y,this._sQlen),this._sQlen+=y.length,this.flush()}},{key:"sendString",value:function(y){this.send(y.split("").map(function(v){return v.charCodeAt(0)}))}},{key:"off",value:function(y){this._eventHandlers[y]=function(){}}},{key:"on",value:function(y,v){this._eventHandlers[y]=v}},{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(y,v){var d=this;this.init(),this._websocket=new WebSocket(y,v),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){K.Debug(">> WebSock.onopen"),d._websocket.protocol&&K.Info("Server choose sub-protocol: "+d._websocket.protocol),d._eventHandlers.open(),K.Debug("<< WebSock.onopen")},this._websocket.onclose=function(n){K.Debug(">> WebSock.onclose"),d._eventHandlers.close(n),K.Debug("<< WebSock.onclose")},this._websocket.onerror=function(n){K.Debug(">> WebSock.onerror: "+n),d._eventHandlers.error(n),K.Debug("<< WebSock.onerror: "+n)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(K.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(y){var v=(this._rQlen-this._rQi+y)*8,d=this._rQbufferSizeo&&(this._rQbufferSize=o,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(v.length),this._rQ.set(v,this._rQlen),this._rQlen+=v.length}},{key:"_recvMessage",value:function(y){this._DecodeMessage(y.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):K.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(y){this._rQi=y}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),r}();f.default=h},"N/zr":function(Ee,f,E){"use strict";function l(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(i){return typeof i}:l=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},l(t)}Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var K=x(E("Lo0S"));function U(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return U=function(){return t},t}function x(t){if(t&&t.__esModule)return t;if(t===null||l(t)!=="object"&&typeof t!="function")return{default:t};var c=U();if(c&&c.has(t))return c.get(t);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)){var r=o?Object.getOwnPropertyDescriptor(t,h):null;r&&(r.get||r.set)?Object.defineProperty(i,h,r):i[h]=t[h]}return i.default=t,c&&c.set(t,i),i}var T={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(c){"use strict";for(var i="",o=c.length,h=o%3,r=0;r>2],i+=this.toBase64Table[((c[r]&3)<<4)+(c[r+1]>>4)],i+=this.toBase64Table[((c[r+1]&15)<<2)+(c[r+2]>>6)],i+=this.toBase64Table[c[r+2]&63];var m=o-h;return h===2?(i+=this.toBase64Table[c[m]>>2],i+=this.toBase64Table[((c[m]&3)<<4)+(c[m+1]>>4)],i+=this.toBase64Table[(c[m+1]&15)<<2],i+=this.toBase64Table[64]):h===1&&(i+=this.toBase64Table[c[m]>>2],i+=this.toBase64Table[(c[m]&3)<<4],i+=this.toBase64Table[64],i+=this.toBase64Table[64]),i},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(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=c.indexOf("=")-i;o<0&&(o=c.length-i);for(var h=(o>>2)*3+Math.floor(o%4/1.5),r=new Array(h),m=0,y=0,v=0,d=i;d=8&&(m-=8,b||(r[v++]=y>>m&255),y&=(1<>>1:x>>>1;T[t]=x}return T}var K=l();function U(x,T,t,c){var i=K,o=c+t;x^=-1;for(var h=c;h>>8^i[(x^T[h])&255];return x^-1}},SZEN:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.clientToElement=l;function l(K,U,x){var T=x.getBoundingClientRect(),t={x:0,y:0};return K=T.right?t.x=T.width-1:t.x=K-T.left,U=T.bottom?t.y=T.height-1:t.y=U-T.top,t}},SgaC:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c0;){if(r.rQwait("RRE",4+8))return!1;var d=r.rQshiftBytes(4),n=r.rQshift16(),b=r.rQshift16(),g=r.rQshift16(),S=r.rQshift16();m.fillRect(c+n,i+b,g,S,d),this._subrects--}return!0}}]),T}();f.default=x},VSMT:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.decodeUTF8=l,f.encodeUTF8=K;function l(U){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(U))}catch(T){if(T instanceof URIError&&x)return U;throw T}}function K(U){return unescape(encodeURIComponent(U))}},Y1PL:function(Ee,f,E){"use strict";E.r(f),E.d(f,"ResizableTextArea",function(){return je});var l=E("wx14"),K=E("1OyB"),U=E("vuIU"),x=E("Ji7U"),T=E("LK+K"),t=E("q1tI"),c=E("VTBJ"),i=E("rePB"),o=E("Zm9Q"),h=E("Kwbf"),r=E("c+Xe"),m=E("m+aA"),y=E("bdgK"),v=new Map;function d(oe){oe.forEach(function(xe){var ce,ae=xe.target;(ce=v.get(ae))===null||ce===void 0||ce.forEach(function(J){return J(ae)})})}var n=new y.default(d),b=null,g=null;function S(oe,xe){v.has(oe)||(v.set(oe,new Set),n.observe(oe)),v.get(oe).add(xe)}function A(oe,xe){v.has(oe)&&(v.get(oe).delete(xe),v.get(oe).size||(n.unobserve(oe),v.delete(oe)))}var O=function(oe){Object(x.a)(ce,oe);var xe=Object(T.a)(ce);function ce(){return Object(K.a)(this,ce),xe.apply(this,arguments)}return Object(U.a)(ce,[{key:"render",value:function(){return this.props.children}}]),ce}(t.Component),R=t.createContext(null);function B(oe){var xe=oe.children,ce=oe.onBatchResize,ae=t.useRef(0),J=t.useRef([]),he=t.useContext(R),re=t.useCallback(function(ve,Le,fe){ae.current+=1;var Ae=ae.current;J.current.push({size:ve,element:Le,data:fe}),Promise.resolve().then(function(){Ae===ae.current&&(ce==null||ce(J.current),J.current=[])}),he==null||he(ve,Le,fe)},[ce,he]);return t.createElement(R.Provider,{value:re},xe)}function F(oe){var xe=oe.children,ce=oe.disabled,ae=t.useRef(null),J=t.useRef(null),he=t.useContext(R),re=t.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ve=t.isValidElement(xe)&&Object(r.c)(xe),Le=ve?xe.ref:null,fe=t.useMemo(function(){return Object(r.a)(Le,ae)},[Le,ae]),Ae=t.useRef(oe);Ae.current=oe;var Q=t.useCallback(function(ne){var _e=Ae.current,me=_e.onResize,Z=_e.data,z=ne.getBoundingClientRect(),W=z.width,I=z.height,a=ne.offsetWidth,w=ne.offsetHeight,s=Math.floor(W),C=Math.floor(I);if(re.current.width!==s||re.current.height!==C||re.current.offsetWidth!==a||re.current.offsetHeight!==w){var te={width:s,height:C,offsetWidth:a,offsetHeight:w};re.current=te;var ue=a===Math.round(W)?W:a,le=w===Math.round(I)?I:w,Ne=Object(c.a)(Object(c.a)({},te),{},{offsetWidth:ue,offsetHeight:le});he==null||he(Ne,ne,Z),me&&Promise.resolve().then(function(){me(Ne,ne)})}},[]);return t.useEffect(function(){var ne=Object(m.a)(ae.current)||Object(m.a)(J.current);return ne&&!ce&&S(ne,Q),function(){return A(ne,Q)}},[ae.current,ce]),t.createElement(O,{ref:J},ve?t.cloneElement(xe,{ref:fe}):xe)}var L="rc-observer-key";function P(oe){var xe=oe.children,ce=Object(o.a)(xe);return ce.map(function(ae,J){var he=(ae==null?void 0:ae.key)||"".concat(L,"-").concat(J);return t.createElement(F,Object(l.a)({},oe,{key:he}),ae)})}P.Collection=B;var V=P,Y=E("bT9E"),q=E("TSYQ"),be=E.n(q),Ie=` 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 `,Xe=["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"],Te={},ke;function Re(oe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(xe&&Te[ce])return Te[ce];var ae=window.getComputedStyle(oe),J=ae.getPropertyValue("box-sizing")||ae.getPropertyValue("-moz-box-sizing")||ae.getPropertyValue("-webkit-box-sizing"),he=parseFloat(ae.getPropertyValue("padding-bottom"))+parseFloat(ae.getPropertyValue("padding-top")),re=parseFloat(ae.getPropertyValue("border-bottom-width"))+parseFloat(ae.getPropertyValue("border-top-width")),ve=Xe.map(function(fe){return"".concat(fe,":").concat(ae.getPropertyValue(fe))}).join(";"),Le={sizingStyle:ve,paddingSize:he,borderSize:re,boxSizing:J};return xe&&ce&&(Te[ce]=Le),Le}function Fe(oe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ke||(ke=document.createElement("textarea"),ke.setAttribute("tab-index","-1"),ke.setAttribute("aria-hidden","true"),document.body.appendChild(ke)),oe.getAttribute("wrap")?ke.setAttribute("wrap",oe.getAttribute("wrap")):ke.removeAttribute("wrap");var J=Re(oe,xe),he=J.paddingSize,re=J.borderSize,ve=J.boxSizing,Le=J.sizingStyle;ke.setAttribute("style","".concat(Le,";").concat(Ie)),ke.value=oe.value||oe.placeholder||"";var fe=Number.MIN_SAFE_INTEGER,Ae=Number.MAX_SAFE_INTEGER,Q=ke.scrollHeight,ne;if(ve==="border-box"?Q+=re:ve==="content-box"&&(Q-=he),ce!==null||ae!==null){ke.value=" ";var _e=ke.scrollHeight-he;ce!==null&&(fe=_e*ce,ve==="border-box"&&(fe=fe+he+re),Q=Math.max(fe,Q)),ae!==null&&(Ae=_e*ae,ve==="border-box"&&(Ae=Ae+he+re),ne=Q>Ae?"":"hidden",Q=Math.min(Ae,Q))}return{height:Q,minHeight:fe,maxHeight:Ae,overflowY:ne,resize:"none"}}var Pe=E("Gytx"),ge=E.n(Pe),Se;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(Se||(Se={}));var Me=function(oe){Object(x.a)(ce,oe);var xe=Object(T.a)(ce);function ce(ae){var J;return Object(K.a)(this,ce),J=xe.call(this,ae),J.nextFrameActionId=void 0,J.resizeFrameId=void 0,J.textArea=void 0,J.saveTextArea=function(he){J.textArea=he},J.handleResize=function(he){var re=J.state.resizeStatus,ve=J.props,Le=ve.autoSize,fe=ve.onResize;if(re!==Se.NONE)return;typeof fe=="function"&&fe(he),Le&&J.resizeOnNextFrame()},J.resizeOnNextFrame=function(){cancelAnimationFrame(J.nextFrameActionId),J.nextFrameActionId=requestAnimationFrame(J.resizeTextarea)},J.resizeTextarea=function(){var he=J.props.autoSize;if(!he||!J.textArea)return;var re=he.minRows,ve=he.maxRows,Le=Fe(J.textArea,!1,re,ve);J.setState({textareaStyles:Le,resizeStatus:Se.RESIZING},function(){cancelAnimationFrame(J.resizeFrameId),J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Se.RESIZED},function(){J.resizeFrameId=requestAnimationFrame(function(){J.setState({resizeStatus:Se.NONE}),J.fixFirefoxAutoScroll()})})})})},J.renderTextArea=function(){var he=J.props,re=he.prefixCls,ve=re===void 0?"rc-textarea":re,Le=he.autoSize,fe=he.onResize,Ae=he.className,Q=he.disabled,ne=J.state,_e=ne.textareaStyles,me=ne.resizeStatus,Z=Object(Y.a)(J.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),z=be()(ve,Ae,Object(i.a)({},"".concat(ve,"-disabled"),Q));"value"in Z&&(Z.value=Z.value||"");var W=Object(c.a)(Object(c.a)(Object(c.a)({},J.props.style),_e),me===Se.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return t.createElement(V,{onResize:J.handleResize,disabled:!(Le||fe)},t.createElement("textarea",Object(l.a)({},Z,{className:z,style:W,ref:J.saveTextArea})))},J.state={textareaStyles:{},resizeStatus:Se.NONE},J}return Object(U.a)(ce,[{key:"componentDidUpdate",value:function(J){(J.value!==this.props.value||!ge()(J.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var J=this.textArea.selectionStart,he=this.textArea.selectionEnd;this.textArea.setSelectionRange(J,he)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ce}(t.Component),je=Me,We=function(oe){Object(x.a)(ce,oe);var xe=Object(T.a)(ce);function ce(ae){var J;Object(K.a)(this,ce),J=xe.call(this,ae),J.resizableTextArea=void 0,J.focus=function(){J.resizableTextArea.textArea.focus()},J.saveTextArea=function(re){J.resizableTextArea=re},J.handleChange=function(re){var ve=J.props.onChange;J.setValue(re.target.value,function(){J.resizableTextArea.resizeTextarea()}),ve&&ve(re)},J.handleKeyDown=function(re){var ve=J.props,Le=ve.onPressEnter,fe=ve.onKeyDown;re.keyCode===13&&Le&&Le(re),fe&&fe(re)};var he=typeof ae.value=="undefined"||ae.value===null?ae.defaultValue:ae.value;return J.state={value:he},J}return Object(U.a)(ce,[{key:"setValue",value:function(J,he){"value"in this.props||this.setState({value:J},he)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return t.createElement(je,Object(l.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(J){return"value"in J?{value:J.value}:null}}]),ce}(t.Component),He=f.default=We},YJ9k:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;function l(T,t){if(!(T instanceof t))throw new TypeError("Cannot call a class as a function")}function K(T,t){for(var c=0;c=0;)_[j]=0}var h=0,r=1,m=2,y=3,v=258,d=29,n=256,b=n+1+d,g=30,S=19,A=2*b+1,O=15,R=16,B=7,F=256,L=16,P=17,V=18,Y=[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],q=[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],be=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xe=512,Te=new Array((b+2)*2);o(Te);var ke=new Array(g*2);o(ke);var Re=new Array(Xe);o(Re);var Fe=new Array(v-y+1);o(Fe);var Pe=new Array(d);o(Pe);var ge=new Array(g);o(ge);function Se(_,j,H,se,ee){this.static_tree=_,this.extra_bits=j,this.extra_base=H,this.elems=se,this.max_length=ee,this.has_stree=_&&_.length}var Me,je,We;function He(_,j){this.dyn_tree=_,this.max_code=0,this.stat_desc=j}function oe(_){return _<256?Re[_]:Re[256+(_>>>7)]}function xe(_,j){_.pending_buf[_.pending++]=j&255,_.pending_buf[_.pending++]=j>>>8&255}function ce(_,j,H){_.bi_valid>R-H?(_.bi_buf|=j<<_.bi_valid&65535,xe(_,_.bi_buf),_.bi_buf=j>>R-_.bi_valid,_.bi_valid+=H-R):(_.bi_buf|=j<<_.bi_valid&65535,_.bi_valid+=H)}function ae(_,j,H){ce(_,H[j*2],H[j*2+1])}function J(_,j){var H=0;do H|=_&1,_>>>=1,H<<=1;while(--j>0);return H>>>1}function he(_){_.bi_valid===16?(xe(_,_.bi_buf),_.bi_buf=0,_.bi_valid=0):_.bi_valid>=8&&(_.pending_buf[_.pending++]=_.bi_buf&255,_.bi_buf>>=8,_.bi_valid-=8)}function re(_,j){var H=j.dyn_tree,se=j.max_code,ee=j.stat_desc.static_tree,ie=j.stat_desc.has_stree,k=j.stat_desc.extra_bits,G=j.stat_desc.extra_base,u=j.stat_desc.max_length,$,ye,e,M,D,p,X=0;for(M=0;M<=O;M++)_.bl_count[M]=0;for(H[_.heap[_.heap_max]*2+1]=0,$=_.heap_max+1;$u&&(M=u,X++),H[ye*2+1]=M,ye>se)continue;_.bl_count[M]++,D=0,ye>=G&&(D=k[ye-G]),p=H[ye*2],_.opt_len+=p*(M+D),ie&&(_.static_len+=p*(ee[ye*2+1]+D))}if(X===0)return;do{for(M=u-1;_.bl_count[M]===0;)M--;_.bl_count[M]--,_.bl_count[M+1]+=2,_.bl_count[u]--,X-=2}while(X>0);for(M=u;M!==0;M--)for(ye=_.bl_count[M];ye!==0;){if(e=_.heap[--$],e>se)continue;H[e*2+1]!==M&&(_.opt_len+=(M-H[e*2+1])*H[e*2],H[e*2+1]=M),ye--}}function ve(_,j,H){var se=new Array(O+1),ee=0,ie,k;for(ie=1;ie<=O;ie++)se[ie]=ee=ee+H[ie-1]<<1;for(k=0;k<=j;k++){var G=_[k*2+1];if(G===0)continue;_[k*2]=J(se[G]++,G)}}function Le(){var _,j,H,se,ee,ie=new Array(O+1);for(H=0,se=0;se>=7;se8?xe(_,_.bi_buf):_.bi_valid>0&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function Q(_,j,H,se){Ae(_),se&&(xe(_,H),xe(_,~H)),K.arraySet(_.pending_buf,_.window,j,H,_.pending),_.pending+=H}function ne(_,j,H,se){var ee=j*2,ie=H*2;return _[ee]<_[ie]||_[ee]===_[ie]&&se[j]<=se[H]}function _e(_,j,H){for(var se=_.heap[H],ee=H<<1;ee<=_.heap_len&&!(ee<_.heap_len&&ne(j,_.heap[ee+1],_.heap[ee],_.depth)&&ee++,ne(j,se,_.heap[ee],_.depth));)_.heap[H]=_.heap[ee],H=ee,ee<<=1;_.heap[H]=se}function me(_,j,H){var se,ee,ie=0,k,G;if(_.last_lit!==0)do se=_.pending_buf[_.d_buf+ie*2]<<8|_.pending_buf[_.d_buf+ie*2+1],ee=_.pending_buf[_.l_buf+ie],ie++,se===0?ae(_,ee,j):(k=Fe[ee],ae(_,k+n+1,j),G=Y[k],G!==0&&(ee-=Pe[k],ce(_,ee,G)),se--,k=oe(se),ae(_,k,H),G=q[k],G!==0&&(se-=ge[k],ce(_,se,G)));while(ie<_.last_lit);ae(_,F,j)}function Z(_,j){var H=j.dyn_tree,se=j.stat_desc.static_tree,ee=j.stat_desc.has_stree,ie=j.stat_desc.elems,k,G,u=-1,$;for(_.heap_len=0,_.heap_max=A,k=0;k>1;k>=1;k--)_e(_,H,k);$=ie;do k=_.heap[1],_.heap[1]=_.heap[_.heap_len--],_e(_,H,1),G=_.heap[1],_.heap[--_.heap_max]=k,_.heap[--_.heap_max]=G,H[$*2]=H[k*2]+H[G*2],_.depth[$]=(_.depth[k]>=_.depth[G]?_.depth[k]:_.depth[G])+1,H[k*2+1]=H[G*2+1]=$,_.heap[1]=$++,_e(_,H,1);while(_.heap_len>=2);_.heap[--_.heap_max]=_.heap[1],re(_,j),ve(H,u,_.bl_count)}function z(_,j,H){var se,ee=-1,ie,k=j[0*2+1],G=0,u=7,$=4;for(k===0&&(u=138,$=3),j[(H+1)*2+1]=65535,se=0;se<=H;se++){if(ie=k,k=j[(se+1)*2+1],++G=3&&!(_.bl_tree[Ie[j]*2+1]!==0);j--);return _.opt_len+=3*(j+1)+5+5+4,j}function a(_,j,H,se){var ee;for(ce(_,j-257,5),ce(_,H-1,5),ce(_,se-4,4),ee=0;ee>>=1)if(j&1&&_.dyn_ltree[H*2]!==0)return t;if(_.dyn_ltree[9*2]!==0||_.dyn_ltree[10*2]!==0||_.dyn_ltree[13*2]!==0)return c;for(H=32;H0?(_.strm.data_type===i&&(_.strm.data_type=w(_)),Z(_,_.l_desc),Z(_,_.d_desc),k=I(_),ee=_.opt_len+3+7>>>3,ie=_.static_len+3+7>>>3,ie<=ee&&(ee=ie)):ee=ie=H+5,H+4<=ee&&j!==-1?te(_,j,H,se):_.strategy===T||ie===ee?(ce(_,(r<<1)+(se?1:0),3),me(_,Te,ke)):(ce(_,(m<<1)+(se?1:0),3),a(_,_.l_desc.max_code+1,_.d_desc.max_code+1,k+1),me(_,_.dyn_ltree,_.dyn_dtree)),fe(_),se&&Ae(_)}function Ne(_,j,H){return _.pending_buf[_.d_buf+_.last_lit*2]=j>>>8&255,_.pending_buf[_.d_buf+_.last_lit*2+1]=j&255,_.pending_buf[_.l_buf+_.last_lit]=H&255,_.last_lit++,j===0?_.dyn_ltree[H*2]++:(_.matches++,j--,_.dyn_ltree[(Fe[H]+n+1)*2]++,_.dyn_dtree[oe(j)*2]++),_.last_lit===_.lit_bufsize-1}},eP3c:function(Ee,f,E){"use strict";function l(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(u){return typeof u}:l=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},l(k)}Object.defineProperty(f,"__esModule",{value:!0}),f.inflateReset=a,f.inflateReset2=w,f.inflateResetKeep=I,f.inflateInit=C,f.inflateInit2=s,f.inflate=j,f.inflateEnd=H,f.inflateGetHeader=se,f.inflateSetDictionary=ee,f.inflateInfo=f.Z_DEFLATED=f.Z_BUF_ERROR=f.Z_MEM_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_NEED_DICT=f.Z_STREAM_END=f.Z_OK=f.Z_TREES=f.Z_BLOCK=f.Z_FINISH=void 0;var K=o(E("6BzB")),U=c(E("xlC8")),x=c(E("QV2g")),T=c(E("sjKO")),t=c(E("JSwD"));function c(k){return k&&k.__esModule?k:{default:k}}function i(){if(typeof WeakMap!="function")return null;var k=new WeakMap;return i=function(){return k},k}function o(k){if(k&&k.__esModule)return k;if(k===null||l(k)!=="object"&&typeof k!="function")return{default:k};var G=i();if(G&&G.has(k))return G.get(k);var u={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ye in k)if(Object.prototype.hasOwnProperty.call(k,ye)){var e=$?Object.getOwnPropertyDescriptor(k,ye):null;e&&(e.get||e.set)?Object.defineProperty(u,ye,e):u[ye]=k[ye]}return u.default=k,G&&G.set(k,u),u}var h=0,r=1,m=2,y=4;f.Z_FINISH=y;var v=5;f.Z_BLOCK=v;var d=6;f.Z_TREES=d;var n=0;f.Z_OK=n;var b=1;f.Z_STREAM_END=b;var g=2;f.Z_NEED_DICT=g;var S=-2;f.Z_STREAM_ERROR=S;var A=-3;f.Z_DATA_ERROR=A;var O=-4;f.Z_MEM_ERROR=O;var R=-5;f.Z_BUF_ERROR=R;var B=8;f.Z_DEFLATED=B;var F=1,L=2,P=3,V=4,Y=5,q=6,be=7,Ie=8,Xe=9,Te=10,ke=11,Re=12,Fe=13,Pe=14,ge=15,Se=16,Me=17,je=18,We=19,He=20,oe=21,xe=22,ce=23,ae=24,J=25,he=26,re=27,ve=28,Le=29,fe=30,Ae=31,Q=32,ne=852,_e=592,me=15,Z=me;function z(k){return(k>>>24&255)+(k>>>8&65280)+((k&65280)<<8)+((k&255)<<24)}function W(){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 K.Buf16(320),this.work=new K.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function I(k){var G;return!k||!k.state?S:(G=k.state,k.total_in=k.total_out=G.total=0,k.msg="",G.wrap&&(k.adler=G.wrap&1),G.mode=F,G.last=0,G.havedict=0,G.dmax=32768,G.head=null,G.hold=0,G.bits=0,G.lencode=G.lendyn=new K.Buf32(ne),G.distcode=G.distdyn=new K.Buf32(_e),G.sane=1,G.back=-1,n)}function a(k){var G;return!k||!k.state?S:(G=k.state,G.wsize=0,G.whave=0,G.wnext=0,I(k))}function w(k,G){var u,$;return!k||!k.state?S:($=k.state,G<0?(u=0,G=-G):(u=(G>>4)+1,G<48&&(G&=15)),G&&(G<8||G>15)?S:($.window!==null&&$.wbits!==G&&($.window=null),$.wrap=u,$.wbits=G,a(k)))}function s(k,G){var u,$;return k?($=new W,k.state=$,$.window=null,u=w(k,G),u!==n&&(k.state=null),u):S}function C(k){return s(k,Z)}var te=!0,ue,le;function Ne(k){if(te){var G;for(ue=new K.Buf32(512),le=new K.Buf32(32),G=0;G<144;)k.lens[G++]=8;for(;G<256;)k.lens[G++]=9;for(;G<280;)k.lens[G++]=7;for(;G<288;)k.lens[G++]=8;for((0,t.default)(r,k.lens,0,288,ue,0,k.work,{bits:9}),G=0;G<32;)k.lens[G++]=5;(0,t.default)(m,k.lens,0,32,le,0,k.work,{bits:5}),te=!1}k.lencode=ue,k.lenbits=9,k.distcode=le,k.distbits=5}function _(k,G,u,$){var ye,e=k.state;return e.window===null&&(e.wsize=1<=e.wsize?(K.arraySet(e.window,G,u-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):(ye=e.wsize-e.wnext,ye>$&&(ye=$),K.arraySet(e.window,G,u-$,ye,e.wnext),$-=ye,$?(K.arraySet(e.window,G,u-$,$,0),e.wnext=$,e.whave=e.wsize):(e.wnext+=ye,e.wnext===e.wsize&&(e.wnext=0),e.whave>>8&255,u.check=(0,x.default)(u.check,Je,2,0),X=0,N=0,u.mode=L;break}if(u.flags=0,u.head&&(u.head.done=!1),!(u.wrap&1)||(((X&255)<<8)+(X>>8))%31){k.msg="incorrect header check",u.mode=fe;break}if((X&15)!==B){k.msg="unknown compression method",u.mode=fe;break}if(X>>>=4,N-=4,Ze=(X&15)+8,u.wbits===0)u.wbits=Ze;else if(Ze>u.wbits){k.msg="invalid window size",u.mode=fe;break}u.dmax=1<>8&1),u.flags&512&&(Je[0]=X&255,Je[1]=X>>>8&255,u.check=(0,x.default)(u.check,Je,2,0)),X=0,N=0,u.mode=P;case P:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>8&255,Je[2]=X>>>16&255,Je[3]=X>>>24&255,u.check=(0,x.default)(u.check,Je,4,0)),X=0,N=0,u.mode=V;case V:for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>8),u.flags&512&&(Je[0]=X&255,Je[1]=X>>>8&255,u.check=(0,x.default)(u.check,Je,2,0)),X=0,N=0,u.mode=Y;case Y:if(u.flags&1024){for(;N<16;){if(D===0)break e;D--,X+=$[e++]<>>8&255,u.check=(0,x.default)(u.check,Je,2,0)),X=0,N=0}else u.head&&(u.head.extra=null);u.mode=q;case q:if(u.flags&1024&&(pe=u.length,pe>D&&(pe=D),pe&&(u.head&&(Ze=u.head.extra_len-u.length,u.head.extra||(u.head.extra=new Array(u.head.extra_len)),K.arraySet(u.head.extra,$,e,pe,Ze)),u.flags&512&&(u.check=(0,x.default)(u.check,$,pe,e)),D-=pe,e+=pe,u.length-=pe),u.length))break e;u.length=0,u.mode=be;case be:if(u.flags&2048){if(D===0)break e;pe=0;do Ze=$[e+pe++],u.head&&Ze&&u.length<65536&&(u.head.name+=String.fromCharCode(Ze));while(Ze&&pe>9&1,u.head.done=!0),k.adler=u.check=0,u.mode=Re;break;case Te:for(;N<32;){if(D===0)break e;D--,X+=$[e++]<>>=N&7,N-=N&7,u.mode=re;break}for(;N<3;){if(D===0)break e;D--,X+=$[e++]<>>=1,N-=1;switch(X&3){case 0:u.mode=Pe;break;case 1:if(Ne(u),u.mode=He,G===d){X>>>=2,N-=2;break e}break;case 2:u.mode=Me;break;case 3:k.msg="invalid block type",u.mode=fe}X>>>=2,N-=2;break;case Pe:for(X>>>=N&7,N-=N&7;N<32;){if(D===0)break e;D--,X+=$[e++]<>>16^65535)){k.msg="invalid stored block lengths",u.mode=fe;break}if(u.length=X&65535,X=0,N=0,u.mode=ge,G===d)break e;case ge:u.mode=Se;case Se:if(pe=u.length,pe){if(pe>D&&(pe=D),pe>p&&(pe=p),pe===0)break e;K.arraySet(ye,$,e,pe,M),D-=pe,e+=pe,p-=pe,M+=pe,u.length-=pe;break}u.mode=Re;break;case Me:for(;N<14;){if(D===0)break e;D--,X+=$[e++]<>>=5,N-=5,u.ndist=(X&31)+1,X>>>=5,N-=5,u.ncode=(X&15)+4,X>>>=4,N-=4,u.nlen>286||u.ndist>30){k.msg="too many length or distance symbols",u.mode=fe;break}u.have=0,u.mode=je;case je:for(;u.have>>=3,N-=3}for(;u.have<19;)u.lens[Et[u.have++]]=0;if(u.lencode=u.lendyn,u.lenbits=7,nt={bits:u.lenbits},et=(0,t.default)(h,u.lens,0,19,u.lencode,0,u.work,nt),u.lenbits=nt.bits,et){k.msg="invalid code lengths set",u.mode=fe;break}u.have=0,u.mode=We;case We:for(;u.have>>24,Qe=ze>>>16&255,Ye=ze&65535,Ue<=N);){if(D===0)break e;D--,X+=$[e++]<>>=Ue,N-=Ue,u.lens[u.have++]=Ye;else{if(Ye===16){for(tt=Ue+2;N>>=Ue,N-=Ue,u.have===0){k.msg="invalid bit length repeat",u.mode=fe;break}Ze=u.lens[u.have-1],pe=3+(X&3),X>>>=2,N-=2}else if(Ye===17){for(tt=Ue+3;N>>=Ue,N-=Ue,Ze=0,pe=3+(X&7),X>>>=3,N-=3}else{for(tt=Ue+7;N>>=Ue,N-=Ue,Ze=0,pe=11+(X&127),X>>>=7,N-=7}if(u.have+pe>u.nlen+u.ndist){k.msg="invalid bit length repeat",u.mode=fe;break}for(;pe--;)u.lens[u.have++]=Ze}}if(u.mode===fe)break;if(u.lens[256]===0){k.msg="invalid code -- missing end-of-block",u.mode=fe;break}if(u.lenbits=9,nt={bits:u.lenbits},et=(0,t.default)(r,u.lens,0,u.nlen,u.lencode,0,u.work,nt),u.lenbits=nt.bits,et){k.msg="invalid literal/lengths set",u.mode=fe;break}if(u.distbits=6,u.distcode=u.distdyn,nt={bits:u.distbits},et=(0,t.default)(m,u.lens,u.nlen,u.ndist,u.distcode,0,u.work,nt),u.distbits=nt.bits,et){k.msg="invalid distances set",u.mode=fe;break}if(u.mode=He,G===d)break e;case He:u.mode=oe;case oe:if(D>=6&&p>=258){k.next_out=M,k.avail_out=p,k.next_in=e,k.avail_in=D,u.hold=X,u.bits=N,(0,T.default)(k,de),M=k.next_out,ye=k.output,p=k.avail_out,e=k.next_in,$=k.input,D=k.avail_in,X=u.hold,N=u.bits,u.mode===Re&&(u.back=-1);break}for(u.back=0;!(ze=u.lencode[X&(1<>>24,Qe=ze>>>16&255,Ye=ze&65535,Ue<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ue=ze>>>24,Qe=ze>>>16&255,Ye=ze&65535,qe+Ue<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ue,N-=Ue,u.back+=Ue,u.length=Ye,Qe===0){u.mode=he;break}if(Qe&32){u.back=-1,u.mode=Re;break}if(Qe&64){k.msg="invalid literal/length code",u.mode=fe;break}u.extra=Qe&15,u.mode=xe;case xe:if(u.extra){for(tt=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}u.was=u.length,u.mode=ce;case ce:for(;!(ze=u.distcode[X&(1<>>24,Qe=ze>>>16&255,Ye=ze&65535,Ue<=N);){if(D===0)break e;D--,X+=$[e++]<>qe)],Ue=ze>>>24,Qe=ze>>>16&255,Ye=ze&65535,qe+Ue<=N);){if(D===0)break e;D--,X+=$[e++]<>>=qe,N-=qe,u.back+=qe}if(X>>>=Ue,N-=Ue,u.back+=Ue,Qe&64){k.msg="invalid distance code",u.mode=fe;break}u.offset=Ye,u.extra=Qe&15,u.mode=ae;case ae:if(u.extra){for(tt=u.extra;N>>=u.extra,N-=u.extra,u.back+=u.extra}if(u.offset>u.dmax){k.msg="invalid distance too far back",u.mode=fe;break}u.mode=J;case J:if(p===0)break e;if(pe=de-p,u.offset>pe){if(pe=u.offset-pe,pe>u.whave&&u.sane){k.msg="invalid distance too far back",u.mode=fe;break}pe>u.wnext?(pe-=u.wnext,Oe=u.wsize-pe):Oe=u.wnext-pe,pe>u.length&&(pe=u.length),st=u.window}else st=ye,Oe=M-u.offset,pe=u.length;pe>p&&(pe=p),p-=pe,u.length-=pe;do ye[M++]=st[Oe++];while(--pe);u.length===0&&(u.mode=oe);break;case he:if(p===0)break e;ye[M++]=u.length,p--,u.mode=oe;break;case re:if(u.wrap){for(;N<32;){if(D===0)break e;D--,X|=$[e++]<>>3]&1<>>10,this.keys[Se]|=(je&4032)>>>6,++Se,this.keys[Se]=(Me&258048)<<12,this.keys[Se]|=(Me&63)<<16,this.keys[Se]|=(je&258048)>>>4,this.keys[Se]|=je&63,++Se}}return U(R,[{key:"enc8",value:function(F){var L=F.slice(),P=0,V,Y,q;V=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],Y=L[P++]<<24|L[P++]<<16|L[P++]<<8|L[P++],q=(V>>>4^Y)&252645135,Y^=q,V^=q<<4,q=(V>>>16^Y)&65535,Y^=q,V^=q<<16,q=(Y>>>2^V)&858993459,V^=q,Y^=q<<2,q=(Y>>>8^V)&16711935,V^=q,Y^=q<<8,Y=Y<<1|Y>>>31&1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<1|V>>>31&1;for(var be=0,Ie=0;be<8;++be){q=Y<<28|Y>>>4,q^=this.keys[Ie++];var Xe=S[q&63];Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=y[q>>>24&63],q=Y^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],V^=Xe,q=V<<28|V>>>4,q^=this.keys[Ie++],Xe=S[q&63],Xe|=b[q>>>8&63],Xe|=d[q>>>16&63],Xe|=y[q>>>24&63],q=V^this.keys[Ie++],Xe|=A[q&63],Xe|=g[q>>>8&63],Xe|=n[q>>>16&63],Xe|=v[q>>>24&63],Y^=Xe}for(Y=Y<<31|Y>>>1,q=(V^Y)&2863311530,V^=q,Y^=q,V=V<<31|V>>>1,q=(V>>>8^Y)&16711935,Y^=q,V^=q<<8,q=(V>>>2^Y)&858993459,Y^=q,V^=q<<2,q=(Y>>>16^V)&65535,V^=q,Y^=q<<16,q=(Y>>>4^V)&252645135,V^=q,Y^=q<<4,q=[Y,V],P=0;P<8;P++)L[P]=(q[P>>>2]>>>8*(3-P%4))%256,L[P]<0&&(L[P]+=256);return L}},{key:"encrypt",value:function(F){return this.enc8(F.slice(0,8)).concat(this.enc8(F.slice(8,16)))}}]),R}();f.default=O},lNSK:function(Ee,f,E){"use strict";function l(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?l=function(D){return typeof D}:l=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},l(e)}Object.defineProperty(f,"__esModule",{value:!0}),f.deflateInit=k,f.deflateInit2=ie,f.deflateReset=se,f.deflateResetKeep=H,f.deflateSetHeader=ee,f.deflate=G,f.deflateEnd=u,f.deflateSetDictionary=$,f.deflateInfo=f.Z_DEFLATED=f.Z_UNKNOWN=f.Z_DEFAULT_STRATEGY=f.Z_FIXED=f.Z_RLE=f.Z_HUFFMAN_ONLY=f.Z_FILTERED=f.Z_DEFAULT_COMPRESSION=f.Z_BUF_ERROR=f.Z_DATA_ERROR=f.Z_STREAM_ERROR=f.Z_STREAM_END=f.Z_OK=f.Z_BLOCK=f.Z_FINISH=f.Z_FULL_FLUSH=f.Z_PARTIAL_FLUSH=f.Z_NO_FLUSH=void 0;var K=o(E("6BzB")),U=o(E("c5fP")),x=c(E("xlC8")),T=c(E("QV2g")),t=c(E("xSIq"));function c(e){return e&&e.__esModule?e:{default:e}}function i(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return i=function(){return e},e}function o(e){if(e&&e.__esModule)return e;if(e===null||l(e)!=="object"&&typeof e!="function")return{default:e};var M=i();if(M&&M.has(e))return M.get(e);var D={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var X in e)if(Object.prototype.hasOwnProperty.call(e,X)){var N=p?Object.getOwnPropertyDescriptor(e,X):null;N&&(N.get||N.set)?Object.defineProperty(D,X,N):D[X]=e[X]}return D.default=e,M&&M.set(e,D),D}var h=0;f.Z_NO_FLUSH=h;var r=1;f.Z_PARTIAL_FLUSH=r;var m=3;f.Z_FULL_FLUSH=m;var y=4;f.Z_FINISH=y;var v=5;f.Z_BLOCK=v;var d=0;f.Z_OK=d;var n=1;f.Z_STREAM_END=n;var b=-2;f.Z_STREAM_ERROR=b;var g=-3;f.Z_DATA_ERROR=g;var S=-5;f.Z_BUF_ERROR=S;var A=-1;f.Z_DEFAULT_COMPRESSION=A;var O=1;f.Z_FILTERED=O;var R=2;f.Z_HUFFMAN_ONLY=R;var B=3;f.Z_RLE=B;var F=4;f.Z_FIXED=F;var L=0;f.Z_DEFAULT_STRATEGY=L;var P=2;f.Z_UNKNOWN=P;var V=8;f.Z_DEFLATED=V;var Y=9,q=15,be=8,Ie=29,Xe=256,Te=Xe+1+Ie,ke=30,Re=19,Fe=2*Te+1,Pe=15,ge=3,Se=258,Me=Se+ge+1,je=32,We=42,He=69,oe=73,xe=91,ce=103,ae=113,J=666,he=1,re=2,ve=3,Le=4,fe=3;function Ae(e,M){return e.msg=t.default[M],M}function Q(e){return(e<<1)-(e>4?9:0)}function ne(e){for(var M=e.length;--M>=0;)e[M]=0}function _e(e){var M=e.state,D=M.pending;if(D>e.avail_out&&(D=e.avail_out),D===0)return;K.arraySet(e.output,M.pending_buf,M.pending_out,D,e.next_out),e.next_out+=D,M.pending_out+=D,e.total_out+=D,e.avail_out-=D,M.pending-=D,M.pending===0&&(M.pending_out=0)}function me(e,M){U._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,M),e.block_start=e.strstart,_e(e.strm)}function Z(e,M){e.pending_buf[e.pending++]=M}function z(e,M){e.pending_buf[e.pending++]=M>>>8&255,e.pending_buf[e.pending++]=M&255}function W(e,M,D,p){var X=e.avail_in;return X>p&&(X=p),X===0?0:(e.avail_in-=X,K.arraySet(M,e.input,e.next_in,X,D),e.state.wrap===1?e.adler=(0,x.default)(e.adler,M,X,D):e.state.wrap===2&&(e.adler=(0,T.default)(e.adler,M,X,D)),e.next_in+=X,e.total_in+=X,X)}function I(e,M){var D=e.max_chain_length,p=e.strstart,X,N,we=e.prev_length,de=e.nice_match,pe=e.strstart>e.w_size-Me?e.strstart-(e.w_size-Me):0,Oe=e.window,st=e.w_mask,ze=e.prev,Ue=e.strstart+Se,Qe=Oe[p+we-1],Ye=Oe[p+we];e.prev_length>=e.good_match&&(D>>=2),de>e.lookahead&&(de=e.lookahead);do{if(X=M,Oe[X+we]!==Ye||Oe[X+we-1]!==Qe||Oe[X]!==Oe[p]||Oe[++X]!==Oe[p+1])continue;p+=2,X++;do;while(Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&Oe[++p]===Oe[++X]&&pwe){if(e.match_start=M,we=N,N>=de)break;Qe=Oe[p+we-1],Ye=Oe[p+we]}}while((M=ze[M&st])>pe&&--D!==0);return we<=e.lookahead?we:e.lookahead}function a(e){var M=e.w_size,D,p,X,N,we;do{if(N=e.window_size-e.lookahead-e.strstart,e.strstart>=M+(M-Me)){K.arraySet(e.window,e.window,M,M,0),e.match_start-=M,e.strstart-=M,e.block_start-=M,p=e.hash_size,D=p;do X=e.head[--D],e.head[D]=X>=M?X-M:0;while(--p);p=M,D=p;do X=e.prev[--D],e.prev[D]=X>=M?X-M:0;while(--p);N+=M}if(e.strm.avail_in===0)break;if(p=W(e.strm,e.window,e.strstart+e.lookahead,N),e.lookahead+=p,e.lookahead+e.insert>=ge)for(we=e.strstart-e.insert,e.ins_h=e.window[we],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(D=e.pending_buf_size-5);;){if(e.lookahead<=1){if(a(e),e.lookahead===0&&M===h)return he;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var p=e.block_start+D;if((e.strstart===0||e.strstart>=p)&&(e.lookahead=e.strstart-p,e.strstart=p,me(e,!1),e.strm.avail_out===0))return he;if(e.strstart-e.block_start>=e.w_size-Me&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===y?(me(e,!0),e.strm.avail_out===0?ve:Le):(e.strstart>e.block_start&&(me(e,!1),e.strm.avail_out===0),he)}function s(e,M){for(var D,p;;){if(e.lookahead=ge&&(e.ins_h=(e.ins_h<=ge)if(p=U._tr_tally(e,e.strstart-e.match_start,e.match_length-ge),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ge){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ge&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ge-1)),e.prev_length>=ge&&e.match_length<=e.prev_length){X=e.strstart+e.lookahead-ge,p=U._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ge),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=X&&(e.ins_h=(e.ins_h<=ge&&e.strstart>0&&(X=e.strstart-1,p=we[X],p===we[++X]&&p===we[++X]&&p===we[++X])){N=e.strstart+Se;do;while(p===we[++X]&&p===we[++X]&&p===we[++X]&&p===we[++X]&&p===we[++X]&&p===we[++X]&&p===we[++X]&&p===we[++X]&&Xe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ge?(D=U._tr_tally(e,1,e.match_length-ge),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===y?(me(e,!0),e.strm.avail_out===0?ve:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function ue(e,M){for(var D;;){if(e.lookahead===0&&(a(e),e.lookahead===0)){if(M===h)return he;break}if(e.match_length=0,D=U._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,D&&(me(e,!1),e.strm.avail_out===0))return he}return e.insert=0,M===y?(me(e,!0),e.strm.avail_out===0?ve:Le):e.last_lit&&(me(e,!1),e.strm.avail_out===0)?he:re}function le(e,M,D,p,X){this.good_length=e,this.max_lazy=M,this.nice_length=D,this.max_chain=p,this.func=X}var Ne;Ne=[new le(0,0,0,0,w),new le(4,4,8,4,s),new le(4,5,16,8,s),new le(4,6,32,32,s),new le(4,4,16,16,C),new le(8,16,32,32,C),new le(8,16,128,128,C),new le(8,32,128,256,C),new le(32,128,258,1024,C),new le(32,258,258,4096,C)];function _(e){e.window_size=2*e.w_size,ne(e.head),e.max_lazy_match=Ne[e.level].max_lazy,e.good_match=Ne[e.level].good_length,e.nice_match=Ne[e.level].nice_length,e.max_chain_length=Ne[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ge-1,e.match_available=0,e.ins_h=0}function j(){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=V,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 K.Buf16(Fe*2),this.dyn_dtree=new K.Buf16((2*ke+1)*2),this.bl_tree=new K.Buf16((2*Re+1)*2),ne(this.dyn_ltree),ne(this.dyn_dtree),ne(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new K.Buf16(Pe+1),this.heap=new K.Buf16(2*Te+1),ne(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new K.Buf16(2*Te+1),ne(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 H(e){var M;return!e||!e.state?Ae(e,b):(e.total_in=e.total_out=0,e.data_type=P,M=e.state,M.pending=0,M.pending_out=0,M.wrap<0&&(M.wrap=-M.wrap),M.status=M.wrap?We:ae,e.adler=M.wrap===2?0:1,M.last_flush=h,U._tr_init(M),d)}function se(e){var M=H(e);return M===d&&_(e.state),M}function ee(e,M){return!e||!e.state||e.state.wrap!==2?b:(e.state.gzhead=M,d)}function ie(e,M,D,p,X,N){if(!e)return b;var we=1;if(M===A&&(M=6),p<0?(we=0,p=-p):p>15&&(we=2,p-=16),X<1||X>Y||D!==V||p<8||p>15||M<0||M>9||N<0||N>F)return Ae(e,b);p===8&&(p=9);var de=new j;return e.state=de,de.strm=e,de.wrap=we,de.gzhead=null,de.w_bits=p,de.w_size=1<v||M<0)return e?Ae(e,b):b;if(p=e.state,!e.output||!e.input&&e.avail_in!==0||p.status===J&&M!==y)return Ae(e,e.avail_out===0?S:b);if(p.strm=e,D=p.last_flush,p.last_flush=M,p.status===We)if(p.wrap===2)e.adler=0,Z(p,31),Z(p,139),Z(p,8),p.gzhead?(Z(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)),Z(p,p.gzhead.time&255),Z(p,p.gzhead.time>>8&255),Z(p,p.gzhead.time>>16&255),Z(p,p.gzhead.time>>24&255),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,p.gzhead.os&255),p.gzhead.extra&&p.gzhead.extra.length&&(Z(p,p.gzhead.extra.length&255),Z(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=He):(Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,0),Z(p,p.level===9?2:p.strategy>=R||p.level<2?4:0),Z(p,fe),p.status=ae);else{var we=V+(p.w_bits-8<<4)<<8,de=-1;p.strategy>=R||p.level<2?de=0:p.level<6?de=1:p.level===6?de=2:de=3,we|=de<<6,p.strstart!==0&&(we|=je),we+=31-we%31,p.status=ae,z(p,we),p.strstart!==0&&(z(p,e.adler>>>16),z(p,e.adler&65535)),e.adler=1}if(p.status===He)if(p.gzhead.extra){for(X=p.pending;p.gzindex<(p.gzhead.extra.length&65535)&&!(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size));)Z(p,p.gzhead.extra[p.gzindex]&255),p.gzindex++;p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),p.gzindex===p.gzhead.extra.length&&(p.gzindex=0,p.status=oe)}else p.status=oe;if(p.status===oe)if(p.gzhead.name){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.gzindex=0,p.status=xe)}else p.status=xe;if(p.status===xe)if(p.gzhead.comment){X=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>X&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),_e(e),X=p.pending,p.pending===p.pending_buf_size)){N=1;break}p.gzindexX&&(e.adler=(0,T.default)(e.adler,p.pending_buf,p.pending-X,X)),N===0&&(p.status=ce)}else p.status=ce;if(p.status===ce&&(p.gzhead.hcrc?(p.pending+2>p.pending_buf_size&&_e(e),p.pending+2<=p.pending_buf_size&&(Z(p,e.adler&255),Z(p,e.adler>>8&255),e.adler=0,p.status=ae)):p.status=ae),p.pending!==0){if(_e(e),e.avail_out===0)return p.last_flush=-1,d}else if(e.avail_in===0&&Q(M)<=Q(D)&&M!==y)return Ae(e,S);if(p.status===J&&e.avail_in!==0)return Ae(e,S);if(e.avail_in!==0||p.lookahead!==0||M!==h&&p.status!==J){var pe=p.strategy===R?ue(p,M):p.strategy===B?te(p,M):Ne[p.level].func(p,M);if((pe===ve||pe===Le)&&(p.status=J),pe===he||pe===ve)return e.avail_out===0&&(p.last_flush=-1),d;if(pe===re&&(M===r?U._tr_align(p):M!==v&&(U._tr_stored_block(p,0,0,!1),M===m&&(ne(p.head),p.lookahead===0&&(p.strstart=0,p.block_start=0,p.insert=0))),_e(e),e.avail_out===0))return p.last_flush=-1,d}return M!==y?d:p.wrap<=0?n:(p.wrap===2?(Z(p,e.adler&255),Z(p,e.adler>>8&255),Z(p,e.adler>>16&255),Z(p,e.adler>>24&255),Z(p,e.total_in&255),Z(p,e.total_in>>8&255),Z(p,e.total_in>>16&255),Z(p,e.total_in>>24&255)):(z(p,e.adler>>>16),z(p,e.adler&65535)),_e(e),p.wrap>0&&(p.wrap=-p.wrap),p.pending!==0?d:n)}function u(e){var M;return!e||!e.state?b:(M=e.state.status,M!==We&&M!==He&&M!==oe&&M!==xe&&M!==ce&&M!==ae&&M!==J?Ae(e,b):(e.state=null,M===ae?Ae(e,g):d))}function $(e,M){var D=M.length,p,X,N,we,de,pe,Oe,st;if(!e||!e.state)return b;if(p=e.state,we=p.wrap,we===2||we===1&&p.status!==We||p.lookahead)return b;for(we===1&&(e.adler=(0,x.default)(e.adler,M,D,0)),p.wrap=0,D>=p.w_size&&(we===0&&(ne(p.head),p.strstart=0,p.block_start=0,p.insert=0),st=new K.Buf8(p.w_size),K.arraySet(st,M,D-p.w_size,p.w_size,0),M=st,D=p.w_size),de=e.avail_in,pe=e.next_in,Oe=e.input,e.avail_in=D,e.next_in=0,e.input=M,a(p);p.lookahead>=ge;){X=p.strstart,N=p.lookahead-(ge-1);do p.ins_h=(p.ins_h<2&&k(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function qe(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!1})}function xt(){H({type:ae.SET_IS_LARGE,payload:!ye})}function mt(Ke){var De;return me.current&&(De=new R.default(function(Ve){var Ge=Object(v.a)(Ve),at;try{for(Ge.s();!(at=Ge.n()).done;){var rt,$e=at.value;if((_e==null||((rt=_e.shixun)===null||rt===void 0)?void 0:rt.windows_connection_mode)==="rdp"&&tt(),$e.target.offsetHeight>0||$e.target.offsetWidth>0){var ht;Ke==null||((ht=Ke._eventHandlers)===null||ht===void 0)||ht.windowResize()}}}catch(gt){Ge.e(gt)}finally{Ge.f()}}),De.observe(me.current)),De}var Ze=function(){var Ke=Object(y.a)(g.a.mark(function De(){return g.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:case"end":return Ge.stop()}},De)}));return function(){return Ke.apply(this,arguments)}}(),et=function(){var Ke=Object(y.a)(g.a.mark(function De(){var Ve,Ge,at,rt,$e,ht,gt,it,Ce,ot,lt,_t,pt;return g.a.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return it=(Ve=xe())!==null&&Ve!==void 0&&Ve.homework_common_id?{homework_common_id:(Ge=xe())===null||Ge===void 0?void 0:Ge.homework_common_id}:{},Be.next=3,Object(ke.a)("/api/myshixuns/".concat((at=_e.myshixun)===null||at===void 0?void 0:at.identifier,"/start.json"),{method:"get",params:Object(n.a)(Object(n.a)(Object(n.a)({},ze),it),{},{template_id:w||""})});case 3:if(Ce=Be.sent,!((rt=Ce.data)!==null&&rt!==void 0&&rt.instance_status&&(($e=Ce.data)===null||$e===void 0?void 0:$e.instance_status)=="creating")){Be.next=9;break}return we.current||(we.current=setInterval(Object(y.a)(g.a.mark(function bt(){var dt,ct;return g.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.next=2,et();case 2:ct=ft.sent,(ct==null||((dt=ct.data)===null||dt===void 0)?void 0:dt.instance_status)!=="creating"&&st(!0);case 4:case"end":return ft.stop()}},bt)})),1e3*3)),Be.abrupt("return",Ce);case 9:clearInterval(we.current);case 10:if(!(Ce!=null&&(ht=Ce.data)!==null&&ht!==void 0&&(gt=ht.data_list)!==null&>!==void 0&>.length)){Be.next=13;break}return Y.a.publish("pod-restrict-data",{identifier:Ce==null||((ot=Ce.data)===null||ot===void 0)?void 0:ot.identifier,data_list:Ce==null||((lt=Ce.data)===null||lt===void 0)?void 0:lt.data_list}),Be.abrupt("return");case 13:if(!((Ce==null?void 0:Ce.status)===-3)){Be.next=15;break}return Be.abrupt("return",new Promise(function(){var bt=Object(y.a)(g.a.mark(function dt(ct,vt){return g.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:m.a.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:function(){var Kt=Object(y.a)(g.a.mark(function Xt(){return g.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return clearTimeout(N.current),X(0),wt.next=4,Object(Re.f)(ze.taskId,Ce==null?void 0:Ce.message);case 4:return k(ie+1),wt.abrupt("return");case 6:case"end":return wt.stop()}},Xt)}));function kt(){return Kt.apply(this,arguments)}return kt}()});case 1:case"end":return yt.stop()}},dt)}));return function(dt,ct){return bt.apply(this,arguments)}}()));case 15:if(!((Ce==null?void 0:Ce.status)===-1)){Be.next=17;break}throw new String(Ce==null?void 0:Ce.message);case 17:return Q&&(Object(L.W)("PVEAuthCookie",Ce==null||((_t=Ce.data)===null||_t===void 0||((pt=_t.cookie_options)===null||pt===void 0))?void 0:pt.cookies_value,1),Object(L.W)("PVELangCookie","zh_CN",1)),Y.a.publish("vnc-res-data",Ce==null?void 0:Ce.data),Y.a.publish("update-windows-time",Ce==null?void 0:Ce.data),Be.abrupt("return",Ce);case 21:case"end":return Be.stop()}},De)}));return function(){return Ke.apply(this,arguments)}}();Object(S.useEffect)(function(){var Ke,De;function Ve(it){fe&&(h.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),H({type:ae.SET_LOADING,payload:!0}),k(ie+1))}Y.a.subscribe("reset-linux-windows-loading",function(){H({type:ae.SET_LOADING,payload:!0})}),Y.a.subscribe("reset-linux-windos-vnc",function(){k(ie+1)});function Ge(it){X(100),clearTimeout(N.current),setTimeout(function(){z.current.resizeSession=!1,H({type:ae.SET_LOADING,payload:!1})},1300),Y.a.subscribe("send-ctrl-alt-delete",function(){var Ce;(Ce=Ke)===null||Ce===void 0||Ce.sendCtrlAltDel()})}function at(it){var Ce=oe(it.detail.text);H({type:ae.SET_TRANSFER_CONTENT,payload:Ce})}if((fe||Le||Ae||Q&&w)&&me.current){var rt;clearTimeout(N.current),(_e==null||((rt=_e.shixun)===null||rt===void 0)?void 0:rt.windows_connection_mode)==="rdp"&&tt(),new Promise(Object(y.a)(g.a.mark(function it(){var Ce,ot,lt,_t,pt,Tt,Be,bt,dt,ct,vt,ft,yt,Kt,kt,Xt,St;return g.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return _t=xe(),pt="",ut.next=4,et();case 4:if(Be=ut.sent,!(!Oe&&Be!==null&&Be!==void 0&&(Ce=Be.data)!==null&&Ce!==void 0&&Ce.instance_status&&(Be==null||((ot=Be.data)===null||ot===void 0)?void 0:ot.instance_status)==="creating")){ut.next=9;break}return ut.abrupt("return");case 9:clearInterval(we.current);case 10:if(!(Ae||Q)){ut.next=16;break}return W.current.src=(Be==null||((bt=Be.data)===null||bt===void 0)?void 0:bt.link_url)+"&time="+Date.now(),H({type:ae.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),ut.abrupt("return");case 16:fe?(Tt="Edu123",pt=decodeURIComponent(Be==null||((dt=Be.data)===null||dt===void 0)?void 0:dt.link_url)):(vt=new URL(decodeURIComponent(Be==null||((ct=Be.data)===null||ct===void 0)?void 0:ct.link_url)),ft=vt.protocol,yt=vt.searchParams,Kt=vt.host,kt=vt.search,Xt=Object(L.T)(kt),Tt=yt.get("password"),pt="".concat(ft==="https:"?"wss":"ws","://").concat(Kt,"/").concat(Xt.path||"websockify"));case 17:if(!((_e==null||((lt=_e.shixun)===null||lt===void 0)?void 0:lt.windows_connection_mode)==="rdp")){ut.next=23;break}return mt(),W.current.style.cssText=W.current.style.cssText+"width:1920px;height:1080px;position:initial",W.current.src="/rdp.html?tpiId=".concat(_e==null||((St=_e.myshixun)===null||St===void 0)?void 0:St.id),H({type:ae.SET_LOADING,payload:!1}),ut.abrupt("return");case 23:Ke=new V.a(me.current,pt,{credentials:{password:Tt},wsProtocols:["binary"],resize:"scale",show_dot:!0}),De=mt(Ke),Ke.viewOnly=_t.view_only||!1,fe?Ke.scaleViewport=!0:Ke.scaleViewport=_t.scale||!1,Ke.scaleViewport=_t.scale||!0,Ke.showDotCursor=!0,Ke.resizeSession=!0,z.current=Ke,Ke.addEventListener("disconnect",Ve),Ke.addEventListener("connect",Ge),Ke.addEventListener("clipboard",at);case 34:case"end":return ut.stop()}},it)})));var $e=Y.a.subscribe("vnc-reseting",function(){X(0),H({type:ae.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),ht=Y.a.subscribe("vnc-enlarge",function(it){}),gt=Y.a.subscribe("show-clipboard-box",function(){H({type:ae.SHOW_CLIPBOARD_BOX,payload:!0})});return X(0),function(){var it,Ce,ot,lt;(it=Ke)===null||it===void 0||it.removeEventListener("disconnect",Ve),(Ce=Ke)===null||Ce===void 0||Ce.removeEventListener("connect",Ge),(ot=Ke)===null||ot===void 0||ot.removeEventListener("clipboard",at),$e(),ht(),gt(),(lt=De)===null||lt===void 0||lt.unobserve(me.current),clearInterval(we.current)}}},[Le,fe,Ae,ie,w,Oe]),Object(S.useEffect)(function(){var Ke,De;if(Q&&(_e==null||((Ke=_e.shixun_virtual_templates)===null||Ke===void 0)?void 0:Ke.length)===1){var Ve,Ge;s(_e==null||((Ve=_e.shixun_virtual_templates)===null||Ve===void 0||((Ge=Ve[0])===null||Ge===void 0))?void 0:Ge.template_id)}else Q&&(_e==null||((De=_e.shixun_virtual_templates)===null||De===void 0)?void 0:De.length)>1&&le(!0)},[Q]);function Je(Ke){return nt.apply(this,arguments)}function nt(){return nt=Object(y.a)(g.a.mark(function Ke(De){var Ve,Ge,at;return g.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:if(!Le){$e.next=8;break}return Ve=De,$e.next=4,Object(ke.a)("/api/tasks/".concat(ze.taskId,"/vnc_paste.json"),{method:"post",body:{content:We.Base64.encode(Ve)}});case 4:Ge=$e.sent,(Ge==null?void 0:Ge.status)===0&&(H({type:ae.SET_TRANSFER_CONTENT,payload:De}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),qe()),$e.next=12;break;case 8:(at=z.current)===null||at===void 0||at.clipboardPasteFrom(De),H({type:ae.SET_TRANSFER_CONTENT,payload:De}),h.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),qe();case 12:case"end":return $e.stop()}},Ke)})),nt.apply(this,arguments)}function tt(){var Ke,De;Ke=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),W.current.parentElement.className="wh1080p",W.current.parentElement.style.cssText="transform:scale(".concat(Ke,");transform-origin:center center"),me.current.style.cssText="translate(-50%, -50%) scale("+Ke+")"}Object(S.useEffect)(function(){p==0&&(clearTimeout(N.current),Et())},[p]);var Et=function Ke(){p>99?p=99:(p=p+1,N.current=setTimeout(function(){Ke()},1500)),p<100&&X(p)},At=Object(S.useMemo)(function(){var Ke;return u?"none":Ae||Q||fe&&(_e==null||((Ke=_e.shixun)===null||Ke===void 0)?void 0:Ke.windows_connection_mode)==="rdp"?"block":"none"},[Ae,u,Q,fe]);return A.a.createElement(S.Fragment,null,ue&&A.a.createElement("div",{className:Se.a.selectImage},A.a.createElement("section",{className:Se.a.container},A.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),A.a.createElement("aside",null,_e==null||((ve=_e.shixun_virtual_templates)===null||ve===void 0)?void 0:ve.map(function(Ke,De){return A.a.createElement(x.a,{align:"middle",key:De},A.a.createElement(i.a,{flex:"1"},Ke.template_name),A.a.createElement(i.a,null,A.a.createElement(t.a,{type:"primary",onClick:function(){s(Ke.template_id),le(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),ye&&A.a.createElement("a",{className:"btn-vnc-resize",onClick:xt},A.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),A.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:At==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},A.a.createElement("div",null,A.a.createElement("iframe",{style:{position:ye?"fixed":"absolute",left:0,top:ye?54:40,width:"100%",height:"calc(100% - ".concat(ye?"100px":"45px",")")},frameBorder:"0",ref:W,allowFullScreen:!0}))),A.a.createElement("div",{style:{position:ye?"fixed":"absolute",left:0,top:ye?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(ye?"100px":"45px",")")},className:"".concat(fe?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(ye?"full-screen":"")},u?A.a.createElement(O.a,{message:G,style:{color:"#0152d9"}},A.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},A.a.createElement(K.a,{percent:p,format:function(De){return A.a.createElement("span",{className:"c-white"},De,"%")}}))):null,A.a.createElement("div",{ref:me,className:"vnc-panel ".concat(u?"hidden zIndexf1":"animated fadeIn")})),A.a.createElement(B.a,null,A.a.createElement(m.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:$,onCancel:qe,footer:null},A.a.createElement(Te,{onCancel:qe,onSave:Je,content:e}))))}},rwxt:function(Ee,f,E){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var l=E("GdRQ");function K(c,i){if(!(c instanceof i))throw new TypeError("Cannot call a class as a function")}function U(c,i){for(var o=0;o>>24,b>>>=F,g-=F,F=B>>>16&255,F===0)be[o++]=B&65535;else if(F&16){L=B&65535,F&=15,F&&(g>>=F,g-=F),g<15&&(b+=q[c++]<>>24,b>>>=F,g-=F,F=B>>>16&255,F&16){if(P=B&65535,F&=15,gm){x.msg="invalid distance too far back",t.mode=l;break e}if(b>>>=F,g-=F,F=o-h,P>F){if(F=P-F,F>v&&t.sane){x.msg="invalid distance too far back",t.mode=l;break e}if(V=0,Y=n,d===0){if(V+=y-F,F2;)be[o++]=Y[V++],be[o++]=Y[V++],be[o++]=Y[V++],L-=3;L&&(be[o++]=Y[V++],L>1&&(be[o++]=Y[V++]))}else{V=o-P;do be[o++]=be[V++],be[o++]=be[V++],be[o++]=be[V++],L-=3;while(L>2);L&&(be[o++]=be[V++],L>1&&(be[o++]=be[V++]))}}else if((F&64)===0){B=A[(B&65535)+(b&(1<>3,c-=L,g-=L<<3,b&=(1<0){var y=[m],v=m.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,r=(0,l.deflate)(this.strm,l.Z_FULL_FLUSH),r<0)throw new Error("zlib deflate failed");var d=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);v+=d.length,y.push(d)}while(this.strm.avail_in>0);for(var n=new Uint8Array(v),b=0,g=0;g>>16&65535|0,i=0;x!==0;){i=x>2e3?2e3:x,x-=i;do t=t+U[T++]|0,c=c+t|0;while(--i);t%=65521,c%=65521}return t|c<<16|0}}}]);