(self["webpackChunkvue_chat"]=self["webpackChunkvue_chat"]||[]).push([[524],{132:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(1114),i=(n(8992),n(3949),n(1454),n(3960)),o=n(6643),s=n(9326);class a extends i.A{constructor(){super(o["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"initiator",void 0),(0,r.A)(this,"pin",void 0),(0,r.A)(this,"participants",void 0),(0,r.A)(this,"existParticipants",void 0),(0,r.A)(this,"audioOnly",void 0),(0,r.A)(this,"autoAnswer",void 0),(0,r.A)(this,"clientId",void 0)}formatNotification(e){let t="";return this.fromSelf?t="您邀请":(t=s["default"].getGroupMemberDisplayName(e.conversation.target,this.initiator),t+="邀请"),this.participants&&this.participants.forEach((n=>{t+=" ",n===s["default"].getUserId()?t+="您":t+=s["default"].getGroupMemberDisplayName(e.conversation.target,n)})),t+=" 加入了通话",t}encode(){let e=super.encode();e.content=this.callId;let t={initiator:this.initiator,audioOnly:this.audioOnly?1:0,pin:this.pin,participants:this.participants,existParticipants:this.existParticipants,autoAnswer:this.autoAnswer,clientId:this.clientId};e.binaryContent=s["default"].utf8_to_b64(JSON.stringify(t));let n=this.existParticipants.map((e=>e.userId)),r={callId:this.callId,audioOnly:this.audioOnly,participants:this.participants,existParticipants:n};return e.pushData=JSON.stringify(r),e}decode(e){super.decode(e),this.callId=e.content;let t=s["default"].b64_to_utf8(e.binaryContent),n=JSON.parse(t);this.initiator=n.initiator,this.audioOnly=1===n.audioOnly,this.pin=n.pin,this.participants=n.participants,this.existParticipants=n.existParticipants,this.autoAnswer=n.autoAnswer,this.clientId=n.clientId}}},231:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1114);class i{constructor(){(0,r.A)(this,"channelId",void 0),(0,r.A)(this,"name",void 0),(0,r.A)(this,"portrait",void 0),(0,r.A)(this,"desc",void 0),(0,r.A)(this,"owner",void 0),(0,r.A)(this,"status",void 0),(0,r.A)(this,"extra",void 0),(0,r.A)(this,"updateDt",void 0),(0,r.A)(this,"menus",void 0)}}(0,r.A)(i,"StatusMaskFullInfo",1),(0,r.A)(i,"StatusMaskUnsubscribedUserAccess",2),(0,r.A)(i,"StatusMaskActiveSubscribe",4),(0,r.A)(i,"StatusMaskMessageUnsubscribed",8),(0,r.A)(i,"StatusMaskPrivate",16),(0,r.A)(i,"StatusMaskDeleted",64),(0,r.A)(i,"StatusMaskGlobal",128)},335:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(1114),i=n(7451),o=n(9326),s=n(6643);class a extends i["default"]{constructor(e=0,t=[]){super(s["default"].VOIP_CONTENT_TYPE_MODIFY,e,t),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"audioOnly",void 0)}digest(){return""}encode(){let e=super.encode();var t;return e.content=this.callId,t=this.audioOnly?"1":"0",e.binaryContent=o["default"].utf8_to_b64(t),e}decode(e){super.decode(e),this.callId=e.content;let t=o["default"].b64_to_utf8(e.binaryContent);this.audioOnly="1"===t}}},382:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(1114),i=n(7451),o=n(6643),s=n(9326);class a extends i["default"]{constructor(e,t,n,i,s,a,l,u,c,d){super(o["default"].CONFERENCE_CONTENT_TYPE_INVITE),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"host",void 0),(0,r.A)(this,"title",void 0),(0,r.A)(this,"desc",void 0),(0,r.A)(this,"startTime",void 0),(0,r.A)(this,"audioOnly",void 0),(0,r.A)(this,"audience",void 0),(0,r.A)(this,"pin",void 0),(0,r.A)(this,"password",void 0),(0,r.A)(this,"advanced",void 0),(0,r.A)(this,"callExtra",void 0),this.callId=e,this.host=t,this.title=n,this.desc=i,this.startTime=s,this.audioOnly=a,this.audience=l,this.advanced=u,this.pin=c,this.password=d}digest(e){let t="[会议邀请]";return t}encode(){let e=super.encode();e.content=this.callId,e.pushContent="会议邀请";let t={h:this.host,s:this.startTime,t:this.title,d:this.desc,audience:this.audience?1:0,advanced:this.advanced?1:0,a:this.audioOnly?1:0,p:this.pin,pwd:this.password,ce:this.callExtra};return e.binaryContent=s["default"].utf8_to_b64(JSON.stringify(t)),e}decode(e){if(super.decode(e),e.binaryContent){let t=s["default"].b64_to_utf8(e.binaryContent),n=JSON.parse(t);this.host=n.h,this.startTime=n.s,this.title=n.t,this.desc=n.d,this.audience=n.audience>0,this.advanced=n.advanced>0,this.audioOnly=n.a>0,this.pin=n.p,this.password=n.pwd,this.callExtra=n.ce}this.callId=e.content}}},411:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(7451),i=n(6643);class o extends r["default"]{constructor(){super(i["default"].Leave_Channel_Chat)}}},503:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(1114),i=n(7451),o=n(2169);class s extends i["default"]{constructor(e,t=0,n,i){super(e),(0,r.A)(this,"file",void 0),(0,r.A)(this,"remotePath",""),(0,r.A)(this,"localPath",""),(0,r.A)(this,"mediaType",0),this.mediaType=t,n?"string"!==typeof n||n.startsWith("http")?(this.file=n,n&&n.path&&(this.localPath=n.path,this.localPath.indexOf(n.name)<0&&(this.localPath+=n.name))):(this.localPath=n,this.remotePath=i):(this.localPath="",this.remotePath=i)}encode(){let e=super.encode();return e.localMediaPath=this.localPath,e.remoteMediaUrl=this.remotePath?this.remotePath:"",e.mediaType=this.mediaType,o["default"].urlRedirect&&(this.remotePath=o["default"].urlRedirect(e.remoteMediaUrl)),e}decode(e){super.decode(e),this.localPath=e.localMediaPath,this.remotePath=e.remoteMediaUrl,o["default"].urlRedirect&&(this.remotePath=o["default"].urlRedirect(e.remoteMediaUrl)),this.mediaType=e.mediaType}}},584:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(231);class i extends r.A{constructor(e){super(),this.channelId=e,this.name=`<${e}>`}}},693:function(e,t,n){"use strict";n(4114);const r=n(5228),i={NORMAL:0,TONE:1,TONE2:2,TO3NE:5,INITIALS:3,FIRST_LETTER:4},o={style:i.TONE,segment:!1,heteronym:!1},s="b,p,m,f,d,t,n,l,g,k,h,j,q,x,r,zh,ch,sh,z,c,s".split(","),a=n(1629),l=new RegExp("(["+Object.keys(a).join("")+"])","g"),u=/([aeoiuvnm])([0-4])$/;function c(e){for(let t=0,n=s.length;t0&&(n.push([i]),i=""),n.push(this.single_pinyin(o,t))):i+=o;return i.length>0&&(n.push([i]),i=""),n}single_pinyin(e,t){if("string"!==typeof e)return[];if(1!==e.length)return this.single_pinyin(e.charAt(0),t);let n=e.charCodeAt(0);if(!this._dict[n])return[e];let r=this._dict[n].split(",");if(!t.heteronym)return[d.toFixed(r[0],t.style)];let i={},o=[];for(let s,a=0,l=r.length;a{})),(0,r.A)(this,"updateCallStartMessageContentListener",((e,t)=>{let n=t.messageUid,r=t.content,i=l["default"].getMessageByUid(n);if(!i)return;let o=i.messageContent;o.connectTime=r.connectTime?r.connectTime:o.connectTime,o.endTime=r.endTime?r.endTime:o.endTime,o.status=r.status,o.audioOnly=r.audioOnly,l["default"].updateMessageContent(i.messageId,o)})),(0,r.A)(this,"sendConferenceRequestListener",((e,t)=>{console.log("to send conference request",t),l["default"].sendConferenceRequestEx(t.sessionId?t.sessionId:0,t.roomId?t.roomId:"",t.request,t.data,t.advance,((e,n)=>{this.emitToVoip("sendConferenceRequestResult",{error:e,sendConferenceRequestId:t.sendConferenceRequestId,response:n})}))})),(0,r.A)(this,"sendVoipListener",((e,t)=>{let n=u.A.getMessageContentClazz(t.content.type),r=new n;r.decode(t.content),console.log("to send voip message",r.type,r.callId,r);let i=l["default"].getServerDeltaTime();if(r.type===a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT)this.participants.push(r.participants);else if(r.type===a["default"].VOIP_CONTENT_TYPE_END&&(console.log("to send end message",r.reason,r),!r.callId))return;let o=new p.A(t.conversation.type,t.conversation.target,t.conversation.line);l["default"].sendConversationMessage(o,r,t.toUsers,((e,t)=>{}),((e,t)=>{}),((e,n)=>{this.emitToVoip("sendMessageResult",{error:0,sendMessageId:t.sendMessageId,messageUid:e,timestamp:(0,f.longValue)((0,f.numberValue)(n)-i)}),r.type===a["default"].VOIP_CONTENT_TYPE_START&&(this.inviteMessageUid=e)}),(e=>{this.emitToVoip("sendMessageResult",{error:e,sendMessageId:t.sendMessageId})}))})),(0,r.A)(this,"onReceiveConferenceEvent",(e=>{this.emitToVoip("conferenceEvent",e)})),(0,r.A)(this,"onConnectionStatusChange",(e=>{this.emitToVoip("connectionStatus",e)})),(0,r.A)(this,"onReceiveMessage",(e=>{if(console.log("avengineProxy, on receive message",e),!h["default"].ENABLE_MULTI_VOIP_CALL&&e.conversation.type===s["default"].Group)return void console.log("not enable multi call ");if(!h["default"].ENABLE_SINGLE_VOIP_CALL&&e.conversation.type===s["default"].Single)return void console.log("not enable multi call ");if(!(0,o.isElectron)()&&e.messageContent===a["default"].VOIP_REMOTE_CONTROL_REQUEST)return void console.log("only pc support remote control");let t=(new Date).valueOf(),n=l["default"].getServerDeltaTime();if(t-((0,f.numberValue)(e.timestamp)-n)>=9e4)return void console.log("avengineProxy, message outdated, just ignore",e);let r=e.messageContent;if(this.callWin&&this.conference&&r.type!==a["default"].CONFERENCE_CONTENT_TYPE_COMMAND)console.log("in conference, ignore all other msg");else if(r.notLoaded)console.log("message not loaded, ignore");else if(1!==e.direction||r.type!==a["default"].VOIP_CONTENT_TYPE_START&&r.type!==a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT||(this.callWin&&(r.type===a["default"].VOIP_CONTENT_TYPE_START||r.type===a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT&&r.participants.indexOf(l["default"].getUserId())>=0)&&this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-1),this.isSupportVoip&&(y["default"].ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER||this.hasSpeaker&&this.hasMicrophone))){if((e.conversation.type===s["default"].Single||e.conversation.type===s["default"].Group||this.conference&&e.conversation.type===s["default"].ChatRoom)&&(r.type===a["default"].VOIP_CONTENT_TYPE_START||r.type===a["default"].VOIP_CONTENT_TYPE_END||r.type===a["default"].VOIP_CONTENT_TYPE_ACCEPT||r.type===a["default"].VOIP_CONTENT_TYPE_SIGNAL||r.type===a["default"].VOIP_CONTENT_TYPE_MODIFY||r.type===a["default"].VOIP_CONTENT_TYPE_ACCEPT_T||r.type===a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT||r.type===a["default"].VOIP_CONTENT_TYPE_MUTE_VIDEO||r.type===a["default"].VOIP_Join_Call_Request||r.type===a["default"].CONFERENCE_CONTENT_TYPE_KICKOFF_MEMBER||r.type===a["default"].CONFERENCE_CONTENT_TYPE_CHANGE_MODE||r.type===a["default"].CONFERENCE_CONTENT_TYPE_COMMAND)){if(console.log("receive voip message",e.messageContent.type,e.messageContent.callId,e.messageUid.toString(),e),0===e.direction&&r.type!==a["default"].VOIP_CONTENT_TYPE_END&&r.type!==a["default"].VOIP_CONTENT_TYPE_ACCEPT&&r.type!==a["default"].VOIP_CONTENT_TYPE_ACCEPT)return;let t=[],i=l["default"].getUserInfo(l["default"].getUserId());if(r.type===a["default"].VOIP_CONTENT_TYPE_START){if(this.conversation=e.conversation,this.callId=r.callId,this.inviteMessageUid=e.messageUid,this.participants.push(...r.targetIds),this.participants.push(e.from),this.participants=this.participants.filter((e=>e!==i.uid)),e.conversation.type===s["default"].Single)t=[l["default"].getUserInfo(e.from)];else{let n=r.targetIds.filter((e=>e!==i.uid));n.push(e.from),t=l["default"].getUserInfos(n,e.conversation.target)}this.callWin||(this.conversation?(e.participantUserInfos=t,e.selfUserInfo=i,e.timestamp=(0,f.longValue)((0,f.numberValue)(e.timestamp)-n),this.showCallUI(e.conversation,!1,{event:"message",args:e})):console.log("call ended"))}else if(r.type===a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT){let n=[...r.participants];r.existParticipants&&r.existParticipants.forEach((e=>{n.push(e.userId)})),this.conversation=e.conversation,this.callId=r.callId,this.inviteMessageUid=e.messageUid,this.participants.push(...n),n=n.filter((e=>e.uid!==i.uid)),t=l["default"].getUserInfos(n,e.conversation.target),!this.callWin&&r.participants.indexOf(i.uid)>-1&&(this.conversation?this.showCallUI(e.conversation,!1,{event:"message",args:e}):console.log("call ended"))}else if(r.type===a["default"].VOIP_CONTENT_TYPE_END&&r.callId!==this.callId)return;if(e.conversation.type===s["default"].Group&&(r.type===a["default"].VOIP_CONTENT_TYPE_START||r.type===a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT)){let t=l["default"].getGroupMemberIds(e.conversation.target);e.groupMemberUserInfos=l["default"].getUserInfos(t,e.conversation.target)}if(e.participantUserInfos=t,e.selfUserInfo=i,e.timestamp=(0,f.longValue)((0,f.numberValue)(e.timestamp)-n),this.callWin){let t=!1;(a["default"].VOIP_CONTENT_TYPE_START===e.messageContent.type||a["default"].VOIP_CONTENT_TYPE_ADD_PARTICIPANT===e.messageContent.type&&r.participants.indexOf(l["default"].getUserId())>=0)&&(t=!0),t||this.emitToVoip("message",e)}}}else this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-2)})),(0,r.A)(this,"listenVoipEvent",((e,t)=>{console.log("listenVoipEvent ",e,t),(0,o.isElectron)()?o.ipcRenderer.on(e,t):this.events.on(e,t)})),(0,r.A)(this,"onVoipWindowClose",(e=>{e&&e.srcElement&&"about:blank"===e.srcElement.URL||(console.log("onVoipWindowClose"),this.callWin&&(this.isVoipWindowReady=!1,setTimeout((()=>{this.onVoipCallStatusCallback&&this.onVoipCallStatusCallback(this.conversation,!1),this.conversation=null,this.conference&&(l["default"].quitChatroom(this.callId),this.conference=!1),this.callId=null,this.participants=[],this.queueEvents=[],this.callWin=null,this.voipEventRemoveAllListeners("voip-message","conference-request","update-call-start-message","start-screen-share")}),2e3)))}))}setup(e){if(console.log("avengineProxy, setup"),this.wfc!==e){if(this.wfc=e,d().load((()=>{this.isSupportVoip=d().isWebRTCSupported,this.hasMicrophone=d().hasMicrophone,this.hasSpeaker=!0,this.hasWebcam=d().hasWebcam,console.log(`detectRTC, isWebRTCSupported: ${d().isWebRTCSupported}, hasWebcam: ${d().hasWebcam}, hasSpeakers: ${d().hasSpeakers}, hasMicrophone: ${d().hasMicrophone}`,this.isSupportVoip)})),this.event=e.eventEmitter,this.event.on(i["default"].ReceiveMessage,this.onReceiveMessage),this.event.on(i["default"].ConferenceEvent,this.onReceiveConferenceEvent),this.event.on(i["default"].ConnectionStatusChanged,this.onConnectionStatusChange),!(0,o.isElectron)()){const e=n(7007).EventEmitter;this.events=new e,this.events.on("voip-message",this.sendVoipListener),this.events.on("conference-request",this.sendConferenceRequestListener),this.events.on("update-call-start-message",this.updateCallStartMessageContentListener)}}else console.log("re-setup, just ignore")}emitToVoip(e,t){if(console.log("emitToVoip",e,t),(0,o.isElectron)())if(this.isVoipWindowReady){if(t=JSON.stringify(t),!this.callWin.isDestroyed())try{this.callWin.webContents.send(e,t)}catch(n){}}else this.queueEvents&&this.queueEvents.push({event:e,args:t});else this.events?this.events.emit(e,e,t):this.queueEvents&&this.queueEvents.push({event:e,args:t})}emitToMain(e,t){console.log("emit to main",e,t),(0,o.isElectron)()?o.ipcRenderer.send(e,t):this.events.emit(e,e,t)}startCall(e,t,n,r=""){if(this.callWin)return console.log("voip call is ongoing"),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-1));if(console.log(`startCall speaker、microphone、webcam检测结果分别为:${this.hasSpeaker} , ${this.hasMicrophone}, ${this.hasWebcam},如果不全为true,请检查硬件设备是否正常,否则通话可能存在异常`),!this.isSupportVoip||!y["default"].ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER&&(!this.hasSpeaker||!this.hasMicrophone))return console.log("not support voip",this.isSupportVoip,this.hasSpeaker,this.hasMicrophone,this.hasWebcam),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-2));e=Object.assign(new p.A,e),delete e._target;let i=l["default"].getUserInfo(l["default"].getUserId());n=n.filter((e=>e!==i.uid));let o=e.target+Math.floor(1e4*Math.random());this.conversation=e,this.participants.push(...n),this.callId=o;let a,u=l["default"].getUserInfos(n);if(e.type===s["default"].Group){let t=l["default"].getGroupMemberIds(e.target);a=l["default"].getUserInfos(t,e.target)}this.showCallUI(e,!1,{event:"startCall",args:{conversation:e,audioOnly:t,callId:o,selfUserInfo:i,groupMemberUserInfos:a,participantUserInfos:u,callExtra:r}})}startConference(e,t,n,r,i,o,s,a,u=!1,c,d,h=!1,f=!1){if(this.callWin)return console.log("voip call is ongoing"),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-1));if(!this.isSupportVoip||!y["default"].ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER&&(!this.hasSpeaker||!this.hasMicrophone))return console.log("not support voip",this.isSupportVoip,this.hasSpeaker),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-2));e=e||l["default"].getUserId()+Math.floor(1e4*Math.random()),this.callId=e,this.conversation=null,this.conference=!0,l["default"].joinChatroom(e,(()=>{console.log("join conference chatRoom success",e)}),(t=>{console.error("join conference chatRoom fail",e,t)}));let p=l["default"].getUserInfo(l["default"].getUserId());this.showCallUI(null,!0,{event:"startConference",args:{audioOnly:t,callId:e,pin:n||Math.ceil(1e6*Math.random())+"",host:r,title:i,desc:o,audience:s,advance:a,record:u,selfUserInfo:p,extra:c,callExtra:d,muteAudio:h,muteVideo:f}})}joinConference(e,t,n,r,i,o,s,a,u,c,d=null,h=null){if(this.callWin)return console.log("voip call is ongoing"),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-1));if(!this.isSupportVoip||!y["default"].ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER&&(!this.hasSpeaker||!this.hasMicrophone))return console.log("not support voip",this.isSupportVoip,this.hasSpeaker,this.hasMicrophone),void(this.onVoipCallErrorCallback&&this.onVoipCallErrorCallback(-2));this.conversation=null,this.conference=!0,this.callId=e,l["default"].joinChatroom(e,(()=>{console.log("join conference chatRoom success",e)}),(t=>{console.error("join conference chatRoom fail",e,t)}));let f=l["default"].getUserInfo(l["default"].getUserId());this.showCallUI(null,!0,{event:"joinConference",args:{audioOnly:t,callId:e,pin:n,host:r,title:i,desc:o,audience:s,advance:a,muteAudio:u,muteVideo:c,selfUserInfo:f,extra:d,callExtra:h}})}showCallUI(e,t,n){let r=t?"conference":e.type===s["default"].Single?"single":"multi";this.type=r;let i=360,a=640,u=360,c=640;switch(r){case"single":i=360,a=640;break;case"multi":case"conference":i=960,a=600,u=800,c=480;break;default:break}if((0,o.isElectron)()){let e=new o.BrowserWindow({width:i,height:a,minWidth:u,minHeight:c,resizable:!0,maximizable:!0,transparent:!!t,frame:!t,webPreferences:{scrollBounce:!1,nativeWindowOpen:!0,nodeIntegration:!0,contextIsolation:!1}});this.callWin=e,this.isVoipWindowReady=!1;const s=o.remote.require("@electron/remote/main");s.enable(e.webContents),e.webContents.on("did-finish-load",(()=>{this.onVoipWindowReady()})),localStorage.getItem("enable_voip_debug")&&e.webContents.openDevTools(),e.on("close",(()=>{this.onVoipWindowClose()}));let l=window.location.hash,d=window.location.origin;l?d=window.location.href.replace(l,"#/voip"):d+="/voip",d+="/"+r+"?t="+(new Date).getTime(),e.loadURL(d),console.log("voip windows url",d),e.show(),e.removeMenu(),this.emitToVoip(n.event,n.args)}else this.callWin=window,console.log("windowEmitter subscribe events"),this.events.once("close-voip-div",(()=>{console.log("on close-voip-div",this.conversation,this.onVoipCallStatusCallback),this.onVoipCallStatusCallback&&this.onVoipCallStatusCallback(this.conversation,!1),this.callWin=null,this.isVoipWindowReady=!1,this.conference&&(l["default"].quitChatroom(this.callId),this.conference=!1),this.conference=!1,this.callId=null,this.conversation=null,this.participants=[],this.queueEvents=[]})),setTimeout((()=>{this.isVoipWindowReady=!0,this.emitToVoip(n.event,n.args)}),200),this.onVoipCallStatusCallback&&this.onVoipCallStatusCallback(this.conversation,!0)}onVoipWindowReady(){this.callId&&(this.isVoipWindowReady=!0,console.log("onVoipWindowReady",this.onVoipCallStatusCallback),this.onVoipCallStatusCallback&&this.onVoipCallStatusCallback(this.conversation,!0),(0,o.isElectron)()&&(console.log("ipcRenderer subscribe events"),o.ipcRenderer.on("voip-message",this.sendVoipListener),o.ipcRenderer.on("conference-request",this.sendConferenceRequestListener),o.ipcRenderer.on("update-call-start-message",this.updateCallStartMessageContentListener),o.ipcRenderer.on("start-screen-share",((e,t)=>{if(this.callWin){let e=t.width;this.callWin.resizable=!0,this.callWin.closable=!0,this.callWin.maximizable=!1,this.callWin.transparent=!0,this.callWin.setMinimumSize(800,800),this.callWin.setSize(800,800),this.callWin.setPosition((e-800)/2,0,!0)}})),o.ipcRenderer.on("stop-screen-share",((e,t)=>{if(this.callWin){let e=t.type,n=360,r=640;switch(e){case"single":n=360,r=640;break;case"multi":case"conference":n=1024,r=800;break;default:break}this.callWin.resizable=!0,this.callWin.closable=!0,this.callWin.maximizable=!0,this.callWin.setMinimumSize(n,r),this.callWin.setSize(n,r),this.callWin.center()}}))),this.queueEvents.length>0&&this.queueEvents.forEach((e=>{console.log("process queued event",e),this.emitToVoip(e.event,e.args)})))}voipEventRemoveAllListeners(...e){(0,o.isElectron)()&&e.forEach((e=>o.ipcRenderer.removeAllListeners(e)))}forceCloseVoipWindow(){(0,o.isElectron)()&&this.callWin&&this.callWin.close(),this.callId=null,this.callWin=null}forceCloseVoipWindowAndHangup(){if(this.callWin&&!this.conference){let e=new m["default"];e.callId=this.callId,e.inviteMsgUid=this.inviteMessageUid,e.reason=g["default"].REASON_Hangup,l["default"].sendConversationMessage(this.conversation,e),this.onVoipWindowClose()}}}const b=new v;t["default"]=b},864:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return s}});var r,i=n(1114);class o{constructor(e,t,n,r){(0,i.A)(this,"width",void 0),(0,i.A)(this,"height",void 0),(0,i.A)(this,"fps",void 0),(0,i.A)(this,"bitrate",void 0),this.width=e,this.height=t,this.fps=n,this.bitrate=r}static getVideoProfile(e){switch(e){case o.VP120P:return new o(160,120,15,120);case o.VP120P_3:return new o(120,120,15,100);case o.VP180P:return new o(320,180,15,280);case o.VP180P_3:return new o(180,180,15,200);case o.VP180P_4:return new o(240,180,15,240);case o.VP240P:return new o(320,240,15,360);case o.VP240P_3:return new o(240,240,15,240);case o.VP240P_4:return new o(424,240,15,400);case o.VP360P:return new o(640,360,15,800);case o.VP360P_3:return new o(360,360,15,520);case o.VP360P_4:return new o(640,360,30,1200);case o.VP360P_6:return new o(360,360,30,780);case o.VP360P_7:return new o(480,360,15,1e3);case o.VP360P_8:return new o(480,360,30,1500);case o.VP480P:return new o(640,480,15,1e3);case o.VP480P_3:return new o(480,480,15,800);case o.VP480P_4:return new o(640,480,30,1500);case o.VP480P_6:return new o(480,480,30,1200);case o.VP480P_8:return new o(848,480,15,1200);case o.VP480P_9:return new o(848,480,30,1800);case o.VP720P:return new o(1280,720,15,2400);case o.VP720P_3:return new o(1280,720,30,3600);case o.VP720P_5:return new o(960,720,15,1920);case o.VP720P_6:return new o(960,720,30,2880);case o.VP1080P:return new o(1920,1080,15,4200);case o.VP1080P_3:return new o(1920,1080,30,6300);case o.VP1080P_5:return new o(1920,1080,60,9560);default:return o.getVideoProfile(o.VPDEFAULT)}}}r=o,(0,i.A)(o,"VP120P",0),(0,i.A)(o,"VP120P_3",2),(0,i.A)(o,"VP180P",10),(0,i.A)(o,"VP180P_3",12),(0,i.A)(o,"VP180P_4",13),(0,i.A)(o,"VP240P",20),(0,i.A)(o,"VP240P_3",22),(0,i.A)(o,"VP240P_4",23),(0,i.A)(o,"VP360P",30),(0,i.A)(o,"VP360P_3",32),(0,i.A)(o,"VP360P_4",33),(0,i.A)(o,"VP360P_6",35),(0,i.A)(o,"VP360P_7",36),(0,i.A)(o,"VP360P_8",37),(0,i.A)(o,"VP480P",40),(0,i.A)(o,"VP480P_3",42),(0,i.A)(o,"VP480P_4",43),(0,i.A)(o,"VP480P_6",45),(0,i.A)(o,"VP480P_8",47),(0,i.A)(o,"VP480P_9",48),(0,i.A)(o,"VP720P",50),(0,i.A)(o,"VP720P_3",52),(0,i.A)(o,"VP720P_5",54),(0,i.A)(o,"VP720P_6",55),(0,i.A)(o,"VP1080P",60),(0,i.A)(o,"VP1080P_3",62),(0,i.A)(o,"VP1080P_5",64),(0,i.A)(o,"VPDEFAULT",r.VP360P);class s{constructor(){(0,i.A)(this,"sessionCallback",void 0)}setup(e){}getCurrentSession(){}}(0,i.A)(s,"MAX_AUDIO_PARTICIPANT_COUNT",16),(0,i.A)(s,"MAX_VIDEO_PARTICIPANT_COUNT",9),(0,i.A)(s,"DISABLE_DUAL_STREAM",!1),(0,i.A)(s,"SCREEN_SHARING_REPLACE_MODE",!0),(0,i.A)(s,"ENABLE_DATA_CHANNEL",!1),(0,i.A)(s,"DISABLE_SMALL_STREAM_LOW_FPS",!1),(0,i.A)(s,"SMALL_STREAM_WIDTH",200),(0,i.A)(s,"SMALL_STREAM_HEIGHT",200),(0,i.A)(s,"SMALL_STREAM_FPS",8),(0,i.A)(s,"VIDEO_PROFILE",o.VPDEFAULT),(0,i.A)(s,"SCREEN_SHARE_MAX_BITRATE",3600),(0,i.A)(s,"FORCE_MEDIA_OVER_TCP",!1),(0,i.A)(s,"ENABLE_VOIP_WHEN_NO_MIC_AND_SPEAKER",!0),(0,i.A)(s,"FORCE_RELAY",!1),(0,i.A)(s,"DUMMY_VIDEO_URI","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAABZJtZGF0AAACrgYF//+q3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTYgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAANGWIhAA7//73Tr8Cm1TCKgOSVwr2yqQmWblSawJGXYUqrq2Pk7OdTgAAE+AFwMk12oNQ+eEAAAAMQZokbEO//qmWAAy43gIATGF2YzU4LjkxLjEwMABCIAjBGDgAAAAJQZ5CeIX/AA7pIRAEYIwcIRAEYIwcAAAACQGeYXRCvwAUkCEQBGCMHCEQBGCMHAAAAAkBnmNqQr8AFJEhEARgjBwhEARgjBwAAAASQZpoSahBaJlMCHf//qmWAAy5IRAEYIwcAAAAC0GehkURLC//AA7pIRAEYIwcIRAEYIwcAAAACQGepXRCvwAUkSEQBGCMHCEQBGCMHAAAAAkBnqdqQr8AFJAhEARgjBwhEARgjBwAAAASQZqsSahBbJlMCHf//qmWAAy4IRAEYIwcAAAAC0GeykUVLC//AA7pIRAEYIwcIRAEYIwcAAAACQGe6XRCvwAUkCEQBGCMHCEQBGCMHAAAAAkBnutqQr8AFJAhEARgjBwAAAASQZrwSahBbJlMCG///qeEABlRIRAEYIwcIRAEYIwcAAAAC0GfDkUVLC//AA7pIRAEYIwcIRAEYIwcAAAACQGfLXRCvwAUkSEQBGCMHCEQBGCMHAAAAAkBny9qQr8AFJAhEARgjBwAAAASQZs0SahBbJlMCG///qeEABlQIRAEYIwcIRAEYIwcAAAAC0GfUkUVLC//AA7pIRAEYIwcIRAEYIwcAAAACQGfcXRCvwAUkCEQBGCMHCEQBGCMHAAAAAkBn3NqQr8AFJAhEARgjBwAAAASQZt4SahBbJlMCF///oywAGNBIRAEYIwcIRAEYIwcAAAAC0GflkUVLC//AA7oIRAEYIwcIRAEYIwcAAAACQGftXRCvwAUkSEQBGCMHAAAAAkBn7dqQr8AFJEhEARgjBwhEARgjBwAAAARQZu5SahBbJlMCFf//jhAAYEhEARgjBwhEARgjBwhEARgjBwAAAihbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABBAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAA/Z0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAABBAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAMgAAADIAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQQAAAEAAABAAAAAANubWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAAyAAAANABVxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAADGW1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAtlzdGJsAAAArXN0c2QAAAAAAAAAAQAAAJ1hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAMgAyABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAN2F2Y0MBZAAM/+EAGmdkAAys2UNG+WXARAAAAwAEAAADAMg8UKZYAQAGaOvjyyLA/fj4AAAAABBwYXNwAAAAAQAAAAEAAAAYc3R0cwAAAAAAAAABAAAAGgAAAgAAAAAUc3RzcwAAAAAAAAABAAAAAQAAAOBjdHRzAAAAAAAAABoAAAABAAAEAAAAAAEAAAoAAAAAAQAABAAAAAABAAAAAAAAAAEAAAIAAAAAAQAACgAAAAABAAAEAAAAAAEAAAAAAAAAAQAAAgAAAAABAAAKAAAAAAEAAAQAAAAAAQAAAAAAAAABAAACAAAAAAEAAAoAAAAAAQAABAAAAAABAAAAAAAAAAEAAAIAAAAAAQAACgAAAAABAAAEAAAAAAEAAAAAAAAAAQAAAgAAAAABAAAKAAAAAAEAAAQAAAAAAQAAAAAAAAABAAACAAAAAAEAAAQAAAAAKHN0c2MAAAAAAAAAAgAAAAEAAAACAAAAAQAAAAIAAAABAAAAAQAAAHxzdHN6AAAAAAAAAAAAAAAaAAAC6gAAABAAAAANAAAADQAAAA0AAAAWAAAADwAAAA0AAAANAAAAFgAAAA8AAAANAAAADQAAABYAAAAPAAAADQAAAA0AAAAWAAAADwAAAA0AAAANAAAAFgAAAA8AAAANAAAADQAAABUAAAB0c3RjbwAAAAAAAAAZAAAAMAAAA0EAAANaAAADcwAAA4wAAAOoAAADwwAAA9wAAAP1AAAEEQAABCwAAARFAAAEWAAABHoAAASVAAAErgAABMEAAATjAAAE/gAABRcAAAUqAAAFTAAABWcAAAV6AAAFkwAAA9V0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAA/4AAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPmAAAEAAABAAAAAANNbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAAAsABVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAAC+G1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAACvHN0YmwAAABqc3RzZAAAAAAAAAABAAAAWm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAH0AAAACJgFgICABRIQVuUABoCAgAECAAAAGHN0dHMAAAAAAAAAAQAAACwAAAQAAAAAxHN0c2MAAAAAAAAADwAAAAEAAAABAAAAAQAAAAIAAAACAAAAAQAAAAUAAAABAAAAAQAAAAYAAAACAAAAAQAAAAkAAAABAAAAAQAAAAoAAAACAAAAAQAAAAwAAAABAAAAAQAAAA0AAAACAAAAAQAAABAAAAABAAAAAQAAABEAAAACAAAAAQAAABQAAAABAAAAAQAAABUAAAACAAAAAQAAABcAAAABAAAAAQAAABgAAAACAAAAAQAAABkAAAADAAAAAQAAAMRzdHN6AAAAAAAAAAAAAAAsAAAAFwAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAB0c3RjbwAAAAAAAAAZAAADKgAAA04AAANnAAADgAAAA6IAAAO3AAAD0AAAA+kAAAQLAAAEIAAABDkAAARSAAAEbgAABIkAAASiAAAEuwAABNcAAATyAAAFCwAABSQAAAVAAAAFWwAABXQAAAWHAAAFqAAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAAAsAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguNDUuMTAw")},881:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(1114);class i{}(0,r.A)(i,"No_Persist",0),(0,r.A)(i,"Persist",1),(0,r.A)(i,"Persist_And_Count",3),(0,r.A)(i,"Transparent",4)},1027:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NDdCOTUzRjZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NDdCOTU0MDZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU0N0I5NTNENkU4NjExRTdCMjg4RjE3RUFENTgyMDE1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU0N0I5NTNFNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+GWhVpAAABLlJREFUeNrEV8+LHEUU/qqrunt+72SX7E5YMSpLBEEIInjwuuBBowcPIv4BIoJ6Mme9RhMwB0EwENGwGkQQDRgVchJBCQYlEDCsWbO6mf096fnR011VedXdszu7Ozs9M2axlmJqerrq+95733v1lmmt0RknL/351LVqe/b7eX9aAS1whqGG0lxIZR+fzvw4ezT75ZNTAg63YNFPOQE0Q41f7/i421Y49dyxaIvo3n/5VvvkYpA7ocoT9JyYDYkPYh1KzTZZ8GKoghwBf0pH6H5bdhD4rapKKNgCrkuHybS9eweLGftOdrKK1tnVVrv0QFF/qBRT+22xdn3zY1Adm7O1HnQqQxx5G1hDYezbJfv0v55+w+UdamkE7tNgWqHsAHd03vn8b/u9hbvyzaxATxYHQsBo1yZvHMkxLKHILyzYZ2578q0sJ0B20AQoEm2lYRHSmFB4fJyhbpfw1aJ7ptpQr5cchqLDe4uw77AGAwcB/OVpZFZCjAtGfmiTRwR+9gr456b64Iiq+1Kp8/RmMBgB80abTl4ngcnBiPhS49pqCFYW0LQWREIKFzfDgoWV5VetoP71HFBNJ2As8jVyNsMTj7gokOcasj8HIzTGNOZrND0ZCSI0P4S0FnSALQIlOU8PAUsIkCXHZlx89lIZD5J7WwNEihIAczd8vDy3DhTpCRkQqY+IkTqbUEymE9AJCTpgsQm8e8WDqY9NlZKCNF0C+32d7M5bMbAp93rLKNZd39I1UBBYbilc/KUBl8AbKRU6wiAAz1g9xs390Leg9g+BsbYa4PhDDs69cgjj3Kh6sPL83UKA176pkQF0EB+FQAeHLDHevLIUopIxOZ4O7vIkBOZ0i6GfC0RqQCmVbjcU3rlUg03uTMNnyWyaEBSsrVtytBAY4mshjlYETj8/hkdLHF7QpYEexpkybJLs/B9NvP9TA8iOGoIuECMqQTOghgJUWHar0HEsCBFbKhKjBWddqfRfNDDOMd/SeOGL9ciQtmZdtx69ZgDtxHStdzIv8F2HDesBs29d4uGKjbefKeIwFaJQsT3e+fhqHT9cp1ainKSd2ciSwqNZV78wigZI9qaePD1lYzproS23NWAwJDG4TM2XWevoNB5vjLxhJark8ct62BCYzYcFrtckTpxbg2ny6mRhp7GIQkIvLtMDPU4/SmUEEVutzKVhWsswJmC+9+jM0kVoig+B3vLC+Dbku7xp2JhiY9QnaW4s0Zp6SjtLF9la/NmkgpQr0yyOQCBIismkvVdPnTCZzAhZbLFHoJw+HQKuLQOlCj1bIZKHEo/o4dMwAglSSjBLmtjiBAHSLejX6XQi3aZa4OZjTyh5gD2hTupDpkRk6fpUKl43NsgjRMQiKGpWd3em1j7ZP0ovHJMwbjbgFo8tD/3YE4xte2Df61jBjSoLsxLGw/5npOJ9UzOxDjhlxPRjpIdMkgVEKtS8u5jsIFApsOymJdHUnd5q+I442pQvJ2Kj6ZAmVBiRY5SmkwXLzhWc3gRmp62PbtS86tWlzQlpWjmLjRyNPd7zNS/nuPPsjLhYyeU3ehKwLfaJg/BCprGarUtSjGD3SaD01woEcyd8xy62Xa709n2iNf7PcU+AAQBF+tw3O4427AAAAABJRU5ErkJggg=="},1152:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(1114),i=n(7119),o=n(503),s=n(6643),a=n(9326);class l extends o.A{constructor(e,t,n,o){super(s["default"].Sticker,i.A.Sticker,e,t),(0,r.A)(this,"width",200),(0,r.A)(this,"height",200),this.width=n,this.height=o}digest(){return"[表情]"}encode(){let e=super.encode();e.mediaType=i.A.File;let t={x:this.width,y:this.height};return e.binaryContent=a["default"].utf8_to_b64(JSON.stringify(t)),e}decode(e){super.decode(e);let t=JSON.parse(a["default"].b64_to_utf8(e.binaryContent));this.width=t.x,this.height=t.y}}},1166:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(1114),i=n(503),o=n(7119),s=n(6643);class a extends i.A{constructor(e,t,n){super(s["default"].Image,o.A.Image,e,t),(0,r.A)(this,"thumbnail",void 0),(0,r.A)(this,"imageWidth",void 0),(0,r.A)(this,"imageHeight",void 0),this.thumbnail=n}digest(){return"[图片]"}encode(){let e=super.encode();if(e.mediaType=o.A.Image,e.binaryContent=this.thumbnail,this.imageWidth){let t={w:this.imageWidth,h:this.imageHeight};e.content=JSON.stringify(t)}return e}decode(e){if(super.decode(e),this.thumbnail=e.binaryContent,e.content){let t=JSON.parse(e.content);this.imageWidth=t["w"],this.imageHeight=t["h"]}}}},1213:function(){},1315:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NDdDRjVGQzZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NDdDRjVGRDZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU0N0NGNUZBNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU0N0NGNUZCNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+cEePlQAAAlFJREFUeNrkV7FO40AQnV3HdoJFRBqKlBR3H3A/AV9wEj9wFR8ADRU1Eh2ChgpO4pqrrqKg4w+QqK5BsnRVQhIcr3d549jCMY4dSEKky0ij3bV3d96+mbVnhDGGUvF9n5RSW0KIPWgdj/pQnbyWUAv6uuCt2NhPWZb1G+tver0e8f7ox22j0aBarUZhGFK73Y4X1HIbfHEc5xgTd7BAmBG61KCgChFsCfP7/f52EASHGP7MHrBIxgDoKPrmuu4OQAgwkRqtNJwVnF4Mh8OvnU7nREoZQa/L5svsAGiftdaqCnUJAzHV2IPbTYzPoN/fAYACnFfTjDLyBOPQG2jPMd6dygUQNw/qI5IwwPsMoyjymAk+H9rLKgBUEeVTnR5+j0FALfQHALOGV6e2bYeIkesyAGoW46n/Pc/j60yDwQD2rEZyqHXoBRjh8RU0nMQAzQqCGWi1WtRsNtOrGT8LlVrrdrv7AHmLR39pHv4uiYHYKNtPMBBcQPCJh3f1shiYG4g38SHj83YBSBVew8RXZlGgRNqYCd+BRRqf6kO0KgBEGQCxbAZo2QD0J7hh7BcvCwCJlXbB0q+hWPY1XAkGTBUD5n93Qel3oP7ZVzOfkNSRvzjI4+ijtUFpwHGGhP0nMiCkeIThh7Semyvv2A8JKWdK9xh2ChmwpHWHuu4A2ewPoOVCNErAsNhJ8ZmNFZ05jcn1szWljfVcc/goTI/Agl8IAJMCoPwFEH+QQEYYc31qAEaiz9Q5GdeYAqP5YNYJyy4DgGv/oX0as7kIX79HXgQYANGE/apPOXeMAAAAAElFTkSuQmCC"},1420:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var r=n(641),i=n(9322);const o={class:"video-content-container"},s=["poster","src"];function a(e,t,n,a,l,u){return(0,r.uX)(),(0,r.CE)("div",o,[(0,r.Lk)("video",{onClick:t[0]||(t[0]=(0,i.D$)((e=>u.preview(n.message)),["prevent"])),preload:"metadata",controls:"",draggable:"true",onDragstart:t[1]||(t[1]=e=>u.dragVideo(e)),controlsList:"nodownload",disablePictureInPicture:"",poster:"data:video/jpeg;base64,"+n.message.messageContent.thumbnail,src:u.videoUrl+"#t=0.1"},null,40,s)])}var l=n(1456),u=n(2060),c={name:"VideoMessageContentView",props:{message:{type:l.A,required:!0},isInCompositeView:{default:!1,type:Boolean,required:!1}},methods:{preview(e){this.isInCompositeView?this.$parent.previewCompositeMessage(e.messageUid):(0,u.z7)(e)},dragVideo(e){let t=this.message.messageContent;e.dataTransfer.setData("URL",t.remotePath)}},computed:{videoUrl(){return this.message.messageContent.file&&this.message.messageContent.file.path?this.message.messageContent.file:this.message.messageContent.remotePath}}},d=n(6262);const h=(0,d.A)(c,[["render",a],["__scopeId","data-v-22055cb3"]]);var f=h},1446:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NDdDRjYwMDZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NDdEQzA0RTZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU0N0NGNUZFNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU0N0NGNUZGNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+OyFSggAABeFJREFUeNrEVltsVFUUXefcx8ydR59Mi6HQ1kKJkBSFGIx8iMEPIMYPPjT9IhhCjMb4I0oM0Ujlo2AU4x/h8aGGiIkEEIiAipFHSCoiREstlNKhD0of05l2Ovd53OdOWyqlTAsET3ty595z79lr77322ocJISDHjv3nMWx5lUcudL1xprE3P2Rog6rC+MhyzsEUjmR/hnPLjuzatOyXdSvnftN9KwXOGXRFAWNAKKAgaXrwaNPiomL/O3V0g6MNcd10+YbWVPjd/JkFXPVNT9E6DWkozxBIpUx28EKi9rl5PeXlsXB9xvLc+303BuDny7e5ounRSEkhNwwDrmMzTGOQfXDVg5GvIZ7UQztPdm6pfX6GUVNRUOe4zBKThJKP/gjqitA11ebkteeDltOb1vQ8uro2SgpDaM+ElS9+7Nx8saX/k3CAawpn9wcgcyRfmZbbd/OAphAMwnXwRJGBbjuMz461b2xo7q2j/Gv8HiA4HuHwRqKsKYxy66CsOIQuK4r6I/H3f7/as5UFVOXuSDxSAHJvCcJyBagoENUFairykWKF2HG8Y2NzS++WvKheWFwQnEjCKYV33PVe3uuKzyA0dgyBEZqwxunOpPLT8Uenhne+bv7g9eWpwVBQrV+9dL43JQCSvIxlScLGwAi6Zf6iNw6NfBRUORJDNs42JaASIEbvqApxkwXwV5uHUw3nFilw1dTh+VZOANKgrnMMpG0M9ppZsjMhi166i2hERUjn/mOIOxEKaAos24PteD4om1KiaS7yowYGerwkHNubUgoE/aUyDqJBFVXVIdqYgVjkfx/vTaOr14KbpyPfUOARMM6zlFIJiUqG3bGc0ZokJl3zCgKucHluDnDGiUwekjeH8OKKMmxbW43CkIZQSAWjuLd1p7HnxE18ebIdadpQPksk0r5VJaAiGtUoHcyXXTHCGylG9M/GaxLPyTryNhTgqC4NYdh0sGPfP9hz9AYqS0Koq52H2mdjSHYOIZG0UB4LYkF5nsyOf+9Kz3MIS+4qoNCZThbyqb/78PHeJrj9Fs439eOr9xZjeU0x9h5uxabXqvDm6nI//0nizPbvW7D7t04YlL6wzibtKrl1QGDMC9MSsIcdeMSLYQIl672H7le8MAtbKBrtt4fxORnWqRKerorC9aSsP2wEstXmzyVVeXj71bkoKtCx4ZUK39ODZ7tQXRaBRka7KOy7j7dh77FWOOR5IRFUaoPsEeyBAUiRIS+GiQs1cyL4aP1TfmmlqNY/PXQdpy/342rHMPYv7MBLi2O4snM5Dp7uwPYjN9DUZ6EwrN03zOrUej38ej/T2Iet314DZQLxfhPXb2cQjRnoHzCxtv4iliwswuY1lVi3shwVZVGs2XaR1izECrRJOZBDB7JdWVOzAexMmPjpzC1YdKuWBKEHSXpdF+tXzcb8mWHsOdCCfSfiWLm0FJWlBpFPQSLtQjD2YBG4I73ZX0WGiuCMAGy6nxHRMWi6MGnGwireWj2b5hz/vV7iwvYD19FO3keiql/4gk0TgBQN2dGM0iAuxVP48LtruEKixOhcF2VZgZFpydA79Yfb0NA8gGWLYn7YTly4hZN/9iNCp6MoRcmhapk2CSUA2XCKyONWKq+6XY0AeT2TQs+IlI4UGQmQOt6AKXDoXDcO/dqV7UgkXAXEDSlgtisergxtYpxB0qpTqfn93vPldKw6pGdFFGYnEoFNlSKXdAJFYujrRK4T1pTbcYA2FXe131GiSkPc74Js5GwgIMVzKse7qR1IBHxdz9U2XO8BTlH4nwcf3/sBIR43gLEUpDMO46qiq4IjoKiUR+8RmpEVo8Am99KWpwjHYxMALCjLY7Sm9AlXHgHoRMMmFY9p2vbLWRp3LBtPlhqkj/rECKxaPCtjOt6B083JqkvxrqChcpsC8UiSIvcYMl1lXqlhvvxM6Q9BjTkTAJDeU9CV4xqsU27yZjDNVSeo08OHRCDFyqLDqTdsK7ykPK1p3BntLX4FicfPu/+MfwUYAIn6kVLNvMjmAAAAAElFTkSuQmCC"},1449:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1114);class i{constructor(){(0,r.A)(this,"uid",""),(0,r.A)(this,"updateDt",0),(0,r.A)(this,"state",0),(0,r.A)(this,"alias",""),(0,r.A)(this,"blacked",0),(0,r.A)(this,"extra","")}}},1456:function(e,t,n){"use strict";n.d(t,{A:function(){return b}});var r=n(1114),i=n(6089),o=n(3960),s=n(9326),a=n(7386),l=n(2909),u=n(881),c=n(3830),d=n(7273),h=n(3371),f=n(2169),p=n(8570),g=n.n(p),m=n(3593),y=n(9860),v=n(2844);class b{constructor(e,t){(0,r.A)(this,"conversation",{}),(0,r.A)(this,"from",""),(0,r.A)(this,"content",{}),(0,r.A)(this,"messageContent",{}),(0,r.A)(this,"messageId",0),(0,r.A)(this,"direction",0),(0,r.A)(this,"status",0),(0,r.A)(this,"messageUid",-1),(0,r.A)(this,"timestamp",0),(0,r.A)(this,"to",""),(0,r.A)(this,"localExtra",""),this.conversation=e,this.messageContent=t}static fromProtoMessage(e){if(!e)return null;if(!e.conversation.target)return null;if([1,2,3,4,7,8,9].indexOf(f["default"].getWFCPlatform())>=0){let n=Object.assign(new b,e);n.messageId=Number(n.messageId),n.messageUid=g().fromValue(n.messageUid),n.timestamp=g().fromValue(n.timestamp).toNumber(),n.localExtra=e.localExtra,n.from||(n.from=e.sender),n.conversation=new i.A(void 0!==e.conversation.conversationType?e.conversation.conversationType:e.conversation.type,e.conversation.target,e.conversation.line);let r=a.A.getMessageContentClazz(void 0!==n.content.type?n.content.type:n.content.messageContentType);if(r){let i=new r;try{i.decode(n.content),i instanceof o.A&&(i.fromSelf=n.from===s["default"].getUserId())}catch(t){console.error("decode message payload failed, fallback to unkownMessage",n.content,t);let e=a.A.getMessageContentPersitFlag(n.content.type);if(u["default"].Persist!==e&&u["default"].Persist_And_Count!==e)return null;i=new l.A(n.content)}n.messageContent=i,i instanceof l.A&&console.log("unknownMessage Content",e)}else console.error("message content not register",e);return n}{let n=new b;n.from=e.fromUser,n.content=e.content,n.messageUid=e.messageId,n.localExtra=e.localExtra,n.timestamp=e.serverTimestamp;let r=a.A.getMessageContentClazz(e.content.type);if(r){let i=new r;if(e.content.notLoaded)i.notLoaded=!0,i.type=e.content.type;else try{e.content.data&&e.content.data.length>0&&(e.content.binaryContent=(0,h.l)(e.content.data)),delete n.content.data,i.decode(e.content),i.extra=e.content.extra,i instanceof o.A&&(i.fromSelf=n.from===s["default"].getUserId())}catch(t){console.error("decode message payload failed, fallback to unkownMessage",e.content,t);let n=a.A.getMessageContentPersitFlag(e.content.type);if(u["default"].Persist!==n&&u["default"].Persist_And_Count!==n)return null;i=new l.A(e.content)}n.messageContent=i,i instanceof l.A&&console.log("unknownMessage Content",e)}else console.error("message content not register",e);if(n.from===s["default"].getUserId())n.conversation=new i.A(e.conversation.type,e.conversation.target,e.conversation.line),n.direction=0,n.status=c.A.Sent;else if(e.conversation.type===d["default"].Single?n.conversation=new i.A(e.conversation.type,e.fromUser,e.conversation.line):n.conversation=new i.A(e.conversation.type,e.conversation.target,e.conversation.line),n.direction=1,n.status=c.A.Unread,2===n.content.mentionedType)n.status=c.A.AllMentioned;else if(1===n.content.mentionedType)for(const e of n.content.mentionedTarget)if(e===s["default"].getUserId()){n.status=c.A.Mentioned;break}return n}}static messageContentFromMessagePayload(e,t){let n=v.A.getMessageContentClazz(e.type);n||(n=a.A.getMessageContentClazz(e.type)),n=n||m.A;let r=new n;r.decode(e);let i=s["default"].getUserId();return r instanceof o.A&&(r instanceof y.A?r.operatorId===i&&(r.fromSelf=!0):t===i&&(r.fromSelf=!0)),r}static fromOutputMessageData(e){let t=new b;t.from=e.sender,t.content=e.payload,t.messageUid=e.messageId,t.timestamp=e.timestamp;let n=a.A.getMessageContentClazz(e.payload.type);if(n){let i=new n;try{e.payload.binaryContent=e.payload.base64edData,delete e.payload.base64edData,i.decode(e.payload),i.extra=e.payload.extra,i instanceof o.A&&(i.fromSelf=t.from===s["default"].getUserId())}catch(r){console.error("decode message payload failed, fallback to unkownMessage",e.payload,r);let t=a.A.getMessageContentPersitFlag(e.payload.type);if(u["default"].Persist!==t&&u["default"].Persist_And_Count!==t)return null;i=new l.A(e.payload)}t.messageContent=i,i instanceof l.A&&console.log("unknownMessage Content",e)}else console.error("message content not register",e);return t.from===s["default"].getUserId()?(t.conversation=new i.A(e.conv.type,e.conv.target,e.conv.line),t.direction=0,t.status=c.A.Sent):(e.conv.type===d["default"].Single?t.conversation=new i.A(e.conv.type,e.fromUser,e.conv.line):t.conversation=new i.A(e.conv.type,e.conv.target,e.conv.line),t.direction=1),t}static toMessagePayload(e){return e.messageContent.encode()}}},1513:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var r=n(1114),i=n(7451),o=n(6643),s=n(9326),a=n(3437);class l extends i["default"]{constructor(e=0,t=[]){super(o["default"].VOIP_CONTENT_TYPE_END,e,t),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"reason",void 0),(0,r.A)(this,"inviteMsgUid",void 0)}digest(){return""}encode(){let e=super.encode();e.content=this.callId;let t={r:this.reason,u:this.inviteMsgUid?(0,a.stringValue)(this.inviteMsgUid):void 0},n=JSON.stringify(t);return n=(0,a._patchToJavaLong)(n,"u"),e.binaryContent=s["default"].utf8_to_b64(n),e.pushData=n,e}decode(e){super.decode(e),this.callId=e.content;let t=s["default"].b64_to_utf8(e.binaryContent);t=(0,a._reverseToJsLongString)(t,"u");let n=JSON.parse(t);this.reason=n.r,this.inviteMsgUid=n.u?(0,a.longValue)(n.u):void 0}}},1539:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1114);class i{}(0,r.A)(i,"kEcServerSecrectKeyMismatch",1),(0,r.A)(i,"kEcServerInvalidData",2),(0,r.A)(i,"kEcServerServerError",4),(0,r.A)(i,"kEcServerNotModified",5),(0,r.A)(i,"kEcServerTokenIncorrect",6),(0,r.A)(i,"kConnectionStatusKickedOff",7),(0,r.A)(i,"kEcServerUserForbidden",8),(0,r.A)(i,"kEcServerNotInGroup",9),(0,r.A)(i,"kEcServerInvalidMessage",10),(0,r.A)(i,"kEcServerGroupAlreadyExist",11),(0,r.A)(i,"kEcServerPasswordIncorrect",15),(0,r.A)(i,"kEcServerFriendAlreadyRequested",16),(0,r.A)(i,"kEcServerFriendRequestOverFrequency",17),(0,r.A)(i,"kEcServerFriendRquestBlocked",18),(0,r.A)(i,"kEcServerFriendRequestOvertime",19),(0,r.A)(i,"kEcServerNotInChatroom",20),(0,r.A)(i,"kEcServerNotLicensed",22),(0,r.A)(i,"kEcWebsocketNotConfigured",28),(0,r.A)(i,"kEcServerTimeInconsistent",30),(0,r.A)(i,"kEcServerUserIsBlocked",245),(0,r.A)(i,"kEcServerInBlacklist",246),(0,r.A)(i,"kEcServerForbidden_send_msg",247),(0,r.A)(i,"kEcServerNotRight",248),(0,r.A)(i,"kEcServerTimeout",249),(0,r.A)(i,"kEcServerOverFrequence",250),(0,r.A)(i,"kEcServerInvalidParameter",251),(0,r.A)(i,"kEcServerNotExist",253),(0,r.A)(i,"kEcServerNotImplement",254)},1629:function(e){e.exports={"ā":"a1","á":"a2","ǎ":"a3","à":"a4","ē":"e1","é":"e2","ě":"e3","è":"e4","ō":"o1","ó":"o2","ǒ":"o3","ò":"o4","ī":"i1","í":"i2","ǐ":"i3","ì":"i4","ū":"u1","ú":"u2","ǔ":"u3","ù":"u4","ü":"v0","ǘ":"v2","ǚ":"v3","ǜ":"v4","ń":"n2","ň":"n3","":"m2"}},1695:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(1114),i=n(7451),o=n(9326),s=n(6643);class a extends i["default"]{constructor(e,t,n,i){super(s["default"].VOIP_Multi_Call_Ongoing),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"initiator",void 0),(0,r.A)(this,"audioOnly",void 0),(0,r.A)(this,"targets",void 0),this.callId=e,this.initiator=t,this.audioOnly=n,this.targets=i}digest(e){let t=o["default"].getGroupMemberDisplayName(e.conversation.target,this.initiator);return t+" 发起的通话"}encode(){let e=super.encode();e.content=this.callId;let t={initiator:this.initiator,audioOnly:this.audioOnly?1:0,targets:this.targets};return e.binaryContent=o["default"].utf8_to_b64(JSON.stringify(t)),e}decode(e){super.decode(e),this.callId=e.content;let t=o["default"].b64_to_utf8(e.binaryContent),n=JSON.parse(t);this.initiator=n.initiator,this.audioOnly=1===n.audioOnly,this.targets=n.targets}}},1784:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(3370);class i extends r.A{constructor(e){super(),this.domainId=e,this.name=""}}},1912:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(1114),i=n(9326),o=n(3437),s=n(8570),a=n.n(s);class l{constructor(){(0,r.A)(this,"messageUid",void 0),(0,r.A)(this,"userId",void 0),(0,r.A)(this,"userDisplayName",void 0),(0,r.A)(this,"messageDigest",void 0)}static initWithMessage(e){let t=new l;if(e){t.messageUid=e.messageUid,t.userId=e.from;let n=i["default"].getUserInfo(e.from,!1);t.userDisplayName=n.displayName,t.messageDigest=e.messageContent.digest(),t.messageDigest.length>48&&(t.messageDigest=t.messageDigest.substr(0,48))}return t}encode(){let e={u:(0,o.stringValue)(this.messageUid),i:this.userId,n:this.userDisplayName,d:this.messageDigest};return e}decode(e){e.messageUid?(this.messageUid=a().fromValue(e.messageUid),this.userId=e.userId,this.userDisplayName=e.userDisplayName,this.messageDigest=e.messageDigest):(this.messageUid=a().fromValue(e.u||e.messageUid),this.userId=e.i,this.userDisplayName=e.n,this.messageDigest=e.d)}}},1946:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1114);n(8992),n(3949);class i{constructor(){(0,r.A)(this,"userId",void 0),(0,r.A)(this,"customState",void 0),(0,r.A)(this,"clientStates",void 0)}desc(){if(this.customState.state>0){let e=["未设置","忙碌","离开(主动离开)","离开(长时间未操作)","隐身"];return this.customState.text+e[this.customState.state]}let e="",t="";return this.clientStates.forEach((n=>{let r=["","iOS","Android","Windows","mac","Web","小程序","Linux","iPad","Android-Pad"];0===n.state?e+=r[n.platform]+" ":[1,2,8,9].indexOf(n.platform)>=0&&(t+=r[n.platform]+" ")})),e.trim()?e+"在线":t.trim()?t+"不久前在线":""}}},1957:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(641),i=n(2644);const o={class:"text"};function s(e,t,n,s,a,l){return(0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["text-message-container",{out:0===n.message.direction}])},[(0,r.Lk)("p",o,(0,i.v_)(e.$t("message.unsupport_message_desc")),1)],2)}var a=n(1456),l={name:"UnknownMessageContentView",props:{message:{type:a.A,required:!0}},mounted(){console.log("UnknownMessageContentView",this.message)}},u=n(6262);const c=(0,u.A)(l,[["render",s],["__scopeId","data-v-2239bd20"]]);var d=c},1964:function(e,t,n){"use strict";function r(e){let t,n={};for(let r in e){t=e[r];for(let e,i=0,o=t.length;ic.preview(n.message)),src:"data:video/jpeg;base64,"+n.message.messageContent.thumbnail},null,8,s),[[i.aG,!1===u.imageLoaded]]),(0,r.bo)((0,r.Lk)("img",{ref:"img",onClick:t[1]||(t[1]=e=>c.preview(n.message)),onLoad:t[2]||(t[2]=(...e)=>c.onImageLoaded&&c.onImageLoaded(...e)),draggable:"true",src:n.message.messageContent.remotePath},null,40,a),[[i.aG,u.imageLoaded]])])}var u=n(1456),c=n(2060),d=n(3846),h={name:"ImageMessageContentView",props:{message:{type:u.A,required:!0},isInCompositeView:{default:!1,type:Boolean,required:!1}},data(){return{imageLoaded:!1}},mounted(){let e=this.message.messageContent.imageWidth,t=this.message.messageContent.imageHeight;if(e&&t){let n=(0,d.Re)(e,t,300,300);n&&(this.$refs.img.style.height=n.height+"px",this.$refs.img.style.width=n.width+"px",this.$refs.thumbnail.style.height=n.height+"px",this.$refs.thumbnail.style.width=n.width+"px")}},methods:{preview(e){this.isInCompositeView?this.$parent.previewCompositeMessage(e.messageUid):(console.log("preview",e),(0,c.z7)(e))},onImageLoaded(){this.imageLoaded=!0}}},f=n(6262);const p=(0,f.A)(h,[["render",l],["__scopeId","data-v-353e6544"]]);var g=p},2060:function(e,t,n){"use strict";n.d(t,{PE:function(){return c},Z7:function(){return d},z7:function(){return h}});var r=n(6520),i=n(8109),o=n.n(i),s=n(2744),a=n(1166),l=n(3846),u=n(9841);function c(e){let t=e.messageContent;d(t.remotePath,t.name,e.messageUid)}function d(e,t,n){if((0,r.isElectron)())r.ipcRenderer.send(o().DOWNLOAD_FILE,{messageUid:stringValue(n),remotePath:e,fileName:t,windowId:r.remote.getCurrentWindow().getMediaSourceId()});else{let n=e,r=t;if(window.navigator.msSaveBlob){let e=new XMLHttpRequest;e.onloadstart=function(){e.responseType="blob"},e.onload=function(){navigator.msSaveOrOpenBlob(e.response,r)},e.open("GET",n,!0),e.send()}else{let e=document.createElement("a");e.download=r,e.href=n,e.target="about:blank",e.click()}}}function h(e,t=0){if((0,r.isElectron)()){let n,i=window.location.hash,s=window.location.origin;if(i?s=window.location.href.replace(i,"#/mmpreview"):s+="/mmpreview",s+=`?messageUid=${stringValue(e.messageUid)}&mmmIndex=${t}`,e.messageContent instanceof a.A){let t=r.screen.getDisplayNearestPoint(r.screen.getCursorScreenPoint()),i=e.messageContent;if(i.imageWidth&&i.imageHeight){let e=t.workAreaSize.width,r=t.workAreaSize.height;n=(0,l.Re)(i.imageWidth,i.imageHeight,e,r)}}r.ipcRenderer.send(o().SHOW_MULTIMEDIA_PREVIEW_WINDOW,{url:s,messageUid:(0,u.ux)(e.messageUid),size:n}),console.log("show-multimedia-preview-window",s)}else s.A.previewMessage(e,!0)}},2141:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NDc5NTNFOTZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NDc5NTNFQTZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU0Nzk1M0U3NkU4NjExRTdCMjg4RjE3RUFENTgyMDE1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU0Nzk1M0U4NkU4NjExRTdCMjg4RjE3RUFENTgyMDE1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+xaWVggAABBpJREFUeNqsVztvHFUU/s7MnZ3Z3cQbjJQ4xGBDEVNEwgIKRBFSUSAiKugRFSiA+AGICiGkSBgXIIRESQEV1EgBhfDoggAlFkEgkshxvImztvc1j3v57sys17IdZ2azRzqa1b135nzn9d2zYoyBlZWf3wOS7vO4+u0ZaS0F8BByWVBcjIlQN149kunTH+ja7DmJ1mDE2B2IW4VJQkTLP8GELcy8+m/6ktp6O2oJdHfex+Zpp7J9p4Q4gHY0kScXDJxzRdBvmYmvfKVcNznRqN2CTHIhGQGAdRZ99NyVd9bNzA0N9zNBXAyA2Vw2cBE6EyUDv100X3UFNa/bENVcWI9VkBj1sezjzTDQHtVFpHUaydSbUSLAHPBZQVV1A3HCD1t6Mkzgfip3z1oukuqovu8QN/Ut8Dp+w20uuCZ8i2Xo7A9gXGJdcBhYp0qtIfB1ZcLbPOvCnDGiZLwAJP+CbFMdAb0VPtnFEqS5rfqhN+HdPuvqztuMhM9C2aMGSrTaVr6txnnHhPm6tblxGYjWeTbIAJELAtd4SUd9FMZxO9H6i0GfqVLeWolyTXK1AGxkJ6aBCsMekmBIONi4mgGUHCidrvK815OTSORLrrTLAbCe96kdauUADU5Rj1BPUOeAI8/yjA/8+Dpp9Rfg0A4ucfLGEtPkr7h8CqzhgAw1/zIw9QJw8DGg9ig9qw/PJEToPnhXEkuzJiRmQYkakIxgsEE99gzw5KINwQ5wfzMtRBgcTvNdMJkoXwPewcy4Nbh6ns//gNt/MOR/Agdmgec+Z1SmM8AFRRVmOAugeoyeXgfOvwFc+46AdLbXGfS+PVeusVQpmlUsvrgFrNFry9mDW9Nq7QGesZUWjdTVBUFYcqHVoAH4+f3h5G3ZvZP9EK/UPeIUzn+qZvjxwTPM2zM4mjGf7pe6TVUhiLZrN6k9ftxJ79xhd1i2e/o14PibsCyL/s1ScVX39NyGt88vPvIwMPMSjXIx7mR71vPHafypxQxp93ppAPsfjXPjx18BXvyebHeKUSCRJe3hmcqknSWZCq7/RSBrvwL14vPE/hGw+a2w9+cY3mA2W1u9QBB3sjdtEf7zCdNzOfN8+Yfhur5fAJLvmh5wg967rPyb7P2L73Ovn3WBld4t4MrXWSy9fBYZCxGZnHEtv//2LnBpgYSzmhPStjPWYG30kcK5J/k4+bTZXs08DHa04X1KMSb08miY8RkufxeM2fDuFOhUtch4Q7zHf4eEanZFQDSExqsy2qRYaFJ3slGuQVWDKXII4KGT/J8adnr936Hi9vgDEFpSPQQz9URTnFq4uwYOn4q1Dheb13qX9MrFOneicf1NsSHnFOjL0bm2mpz/xhFvj5nQDhJilmIJlqIYthTMGAHYMZQWfKPsZ4czKf4XYADw+nXnJM8r6AAAAABJRU5ErkJggg=="},2169:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r,i=n(1114),o=(n(8992),n(3949),n(6520)),s=n(9326);class a{static getWFCPlatform(){return(0,o.isElectron)()?window.process&&"darwin"===window.process.platform?4:window.process&&"linux"===window.process.platform?7:3:5}static config(e){Object.keys(e).forEach((t=>{a[t]=e[t]}))}static urlRedirect(e){return e?(a.isUseBackupAddress()&&(e=e.replace("oss.xxxx.com","192.168.2.19")),e):e}static isUseBackupAddress(){let e=s["default"].getHost();return"192.168.2.169"===e}static emojiBaseUrl(){let e="https://static.wildfirechat.net/twemoji/assets/";return e}static stickerBaseUrl(){let e="https://static.wildfirechat.net/sticker/";return e}static validate(){if("https://appim.baibaodun.com.cn:8888"===a.APP_SERVER&&console.warn("APP SERVER 配置为野火官方,如果需要连接自行部署的IM Server,请修改为说部署的app server"),console.log(`当前配置信息:\n app server: ${a.APP_SERVER}\n use wss: ${a.USE_WSS}\n route port: ${a.ROUTE_PORT}`),!a.APP_SERVER.startsWith("http"))throw new Error("配置错误, Config.APP_SERVER 必须是完整的http地址");if(a.USE_WSS&&console.warn("已启用WSS,请确认服务端已配置支持https,配置方法请参考:https://docs.wildfirechat.cn/faq/web/https.html"),a.APP_SERVER.startsWith("https:")&&!a.USE_WSS)throw new Error("https 站点,不能使用 ws,请配置wss, 配置方法请参考:https://docs.wildfirechat.cn/faq/web/https.html");a.USE_WSS&&443!==a.ROUTE_PORT&&console.warn(`配置使用WSS连接时,默认端口是443,但目前配置是${a.ROUTE_PORT},请确认!!`),a.USE_WSS||80===a.ROUTE_PORT||console.warn(`配置使用WS连接时,默认端口是80,但目前配置是${a.ROUTE_PORT},请确认!!`)}}r=a,(0,i.A)(a,"ENABLE_AUTO_LOGIN",!0),(0,i.A)(a,"ENABLE_MULTI_VOIP_CALL",!0),(0,i.A)(a,"ENABLE_SINGLE_VOIP_CALL",!0),(0,i.A)(a,"ENABLE_VOIP_DEBUG_MODE",!1),(0,i.A)(a,"DEFAULT_PORTRAIT_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAFfgAABX4BPgLDIQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAWCSURBVHic7Z3/T9R1HMefn7vPHXfenXeAw0a4UHSVmptKzK0knVqr+MEfwpyuzdqarVqzWcu5WrOfWuZixZitn8TNctRqTdaKvqDpzAoGZKQQaAQUJhwHx32/+/SDc7NT2u58fz7vJ/J+/AHv1xsevL9+Xu8XmmEYBhQ02GR3QPFflBAylBAylBAylBAylBAylBAylBAylBAylBAylBAylBAylBAydNkdyJdo3MDgSAojY2mkUlcurHVdw23FdpSV6HAVaJJ7mB8zSsjEVAYtP0TQ2hZFd38SqfSNvxzodg3LKpxYt9qNTWvc8M2ZOROBNhO+h8STBo58MYmPvgojFs+tu64CDVsf9GL7wz44Hfyjhl7IuYsJvPFBEEOXUjfVzoL5Ol57ugh33uEQ1DNzoBZy7Psp1B0JIZkS00WHruHF7QE8ev8cIe2ZAa2QD78M4+DHIeHtahrwbK0fWzZ5hbctAsrVruVMBO9/Il4GABgG0NAUwjc/Rk1p/2ahE9I/lMTbh8dh5rg1DGB/YxAXhpPmBckTOiH1R0M576TyIRo3cMBk8flAJeR0Vwxtv8Uti/fL7wkcb+eauqiENDZPWh6zqSVsecz/g0bIxeEUuvsTlsc925fAnyM3d8YRCY2QU53ypo5THTFpsbOhEfJrn/Wj4ypnJcbOhkbIwN/ypo0//uLZ/tIIGQ2lJcbOSIudDY0QK84e0xGNKyHXkZF4QMvw+OARoriCEkKGEkKGEkKGEkKGEkKGEkKGEkIGjRC7xJ44dJ58LRohHonZhR63EnIdJYV2abHnF8mLnQ2NkEVl8jIKKxbwZDPSCFl1V4G02JV3u6TFzoZGyJrlLikLu0PXcO9SeX8M2dAIKZxrwwOr3ZbH3VDlxlwvza+BRwgAPLbBC83CDY/NBtRu5MrxpRKyrMKJ9ZXWjZJH7vNgMdGCDpAJAYBd2wIo9pu/DS0r0fH8437T4+QKnRC/14Y9OwKmLvAFDg17niyEm/AdIp0QAKha7sLepwphM6F3Dl3DvmeKcM9ip/jGBUD7YAcAunoTeLVhFKGwmCwEv9eGN18oxtKFnDIA0hFylRVLnKheJW6Rr17lppYBkAuZjSghZCghZCghZCghZCghZFALSaUN9A+Je7sxeClF9+o2G9qDYc9AEm8dCqJ3QOxjmrUrXdi1LYB5AZ7PttdCJ6RvMInG5kmcaIua9kTBXaChZq0HtRu9mF/MJYZGSO9AEoeOTeJkR9SyaUW3a1hf6cbWh7w01/BShSRTBk60x/BZaxhdvXIfXq5Y4sTm9V5Ur3RJzdOSIiQcyaDp6zA+/W5K2MWhKAI+Gzav82DLJi88buv3PJYKSaUNfH48gsbmCQQnuERkU+S3Y0eNDzXVHkuTLywTcrorhoamkNTnz/lQXqrjuVo/qpZbkypkupBwJIP9jeNobeMq8pIr6yrdePmJALwmp7yaKqR/KInXD47NuFExHeWlOvbtLEZ5qXnFXE0T0tETx976MUxFudeKXAn4bHhn9zwsut2cbbIpQs5fTGDXgcuIxCiOOMIJ+Gyo2z0PC02QInxCHAul8cq7o7esDAAYn8zgpTpx3/qvRbiQ946GEJy8taapG3F5PI36o+ILdQoV0nE+jm9/mtm7qVxoORMRfsMgVIiMEn0yMQzgsOCfWZiQkdE02s9ZV8CShZ+7Y/gnKK60lDAhJzutu6VlImMApzrFlQgUJqSrh6dMntV09oibGYQJYawSbRUXhsXdRAgTMkZUJs9qRJYnFCYkEpu9QiJRcYunMCHp2etj2n+9lA/Cri337SwS1dSshibJQXEF6kS52YgSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQoYSQsa/0LPTp+EdzPEAAAAASUVORK5CYII="),(0,i.A)(a,"DEFAULT_GROUP_PORTRAIT_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA+CAYAAAB3NHh5AAAGjUlEQVRoQ+1baWxUVRT+7pt57SydaaeFQodSoHUhIYRVUaGl1aCGIGDRuERkh0JSDJFUiU34AYmsKpsGNECoVhR/sCgB17IUJS0gohUbytYWBNoy087Wzrx3zX1DS6HLvDdvkNKZ82smc+fe853v3LPc9y5BKxkx94rB6KUJopbqOerTtP7tQfssEq2gpXA1cFzdiS1WV7P+xP+BksyZl0eLWs1UUGQA6AdA/6CBvEtfN4BLIDjM+YSCoq0pxQChhIFNn105kSPcWgqaBtyywQOO9rb6FASkQqTi20c+67uXZOZc6E8FfjcFhnQbjO0AIcBpovFOJhlzqhcDdBW6H7V3w6YAySMZc6tPgtJh3ZndFmyEnGIMOwFqCAvAIC6SMaeKhgdYP8oI4O7OdoThCMPdzAIRl+5mhLaBE3KGo3iC9KE6DOzPg+OA89U+HD3lgd0pdglbhgywxcRhQroRLz1jRJzpzlba7hDx3VEn9hxy4t9a4b4CDwlgfTTBO9PiMHqIHozh9oRSoKTMg3Vf2lB1/f6BDgngt16NxYtZMSABWmkGes8hBz7eVY9Gb/sVbVqyFpkj9LD20OKGTcDhk26cveSFGKIdoRpwWjKPlbkJ6GmRdyJUVy9g0doaXLzqa9XEAAOsPKZPMCFjuA6kleUEkeL4nx5s3duAc5VeMKOpEdWAJ2YYkftKbIeu3J5yH3xuw57DzpafeidokD/LgkFp0eA68JLz1V6s2mHD3xea1OBV1zwwIma8YMK0CWZFSuwucuDDQnvLfxa9HotJYzvfEozZg7+58FGhDe7G4GlWxTBjY9YkM94Yb1IE+NsjTqwusEn/iY0h+GZVEqK0gc/Sau0CFq6pQdW129tB0cKhaA+zs4xY8HIseBkKNyu3aZcdX//gkL4+OViHFbkJsvRmLC9eV4PSskZZ49sbpIphNuHgh6KwLCceFrO8oOVpoliw4gYqqrySPs8+ocd7M+NlA1i6uQ5FJ9gJbHCiGrCGA5bMsGDcqMCnRCIFfjzu34dOj38fMoNtzOspS3tBoMhdU4O/KoIPXKoBM00T4zV4d1ochg9kKaVj3c9VNmHlDhvKL/nZZcIKle1LE9EnURsQNPOKvPW1qLEFX7iEBDDTlOXhedkmPD3SAI3mTtSMy9IyD9YU2HCtTmiTS8eN0mPJjHgwb+lIfALF9n31KDzggKCiCAkZYKYoaxZGDIxG1kg9+iVpwXEE1dd9+LnEhZKyJnh97acTVprOnmyWanFdVFsXafJSFP/hwdoCGxpcKtCGIkp3xAhzbSVVkcnASYbKGqlDajIP9t3lpqio9uLoKTf2H3PB6Q4+/zbrGVKGA27CAAOYkcxGDkY9gVZDIAiA0yOi3il2nVq6GUM0TxAdRcBrIe3h5hKRRWYWXeudtEOXVmsoJf9XxTDrgR9O4dHfyqNvLy0SLRpYzIwh7lblxEACDpeIwu8dKCoNPn8qAdXZ2KAA9+mpxeRMIx4fFC01+yYDaROZWy/a4BSR/0ktfi9vmz81GuDRlCjphCSlN48ecRz0OiI9tGU1c61dROU1H8ovN+Gfi16wwkWNKAY8wKrF8vkJSO4VOG8yxZh6rHbe8JUdjbeUZXs01cpj/BgD0ofppQAlR5xuUWoV9xe7cPaiFw63qCgwsjUUA142Px4Zw+S/HMAa/Q07bdh3xP/WAWsFc6bEYuxwvZTGghEWzE6c9WD9TrvEvhJRDPjgxiToouRryqLs6h02/FLqlgC+9lwMZk40S1FYjfjbRSfe3+bvuuSKYsCHtvSRO7c0jrkha9xZwW/QEeRNtSDrMfke0tlizJjjF15VpM//CjjGwGHJ9DiMGRoawAzp2LnVEcAhTUtqXDrCsCJnbH9wxKUDGFFx0CrabL3j3DgQSS6PKPXBP5W4wVyaHRSwYiMUQilF5rwriqZSDPjT/EQ8ksLLXoQ1Dtv2NeCLAw1S7s2ZYka2jKcUchYov+zFnOXX5QxtGaMY8OghOuS9GdfmgVlnqx4/48HyrTelNm9QKo/82fHSoxQ1crNBkAqa4tMeRdMoBsxmT7Vq8fxTBlknlawiOlPRiIO/usFOLpiYYzhkZxqR1EMjnYoolZv1Ag4cc+H8FWVlJVsnKMBKFexK4yOAuxIb90KXCMP3wqpdac4Iw12JjXuhSzgyHG4viIfhFYDwuuQRdtd4wu6ilj/0h9VVvNvZjl22NIlivI/A0B0uW3I+4nbypLb1Zcv/AOmjBXoSCJhJAAAAAElFTkSuQmCC"),(0,i.A)(a,"DEFAULT_ORGANIZATION_PORTRAIT_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAABlUlEQVR4nO2aIW7DQBBFc409UJRD9AoFJr1DeUADSrogoDws8EslloKCLeUEOcDWEzWtii133d2xH/h0ZD/9Pzs72lVSMBRGM1gBL/zJQAAUAK1kinCgAGg4UH4nASIsABoOVPkoEmEtBGDcN5PodFgvA+Dm+WMSfUFcDMDm/WK79jObANgC0HAgETZ6oDhEjENEnMKMMWIONAbplkHauIlwlTPuwprhMuFhd74vFHJpccuEDeus6UHHfXMHXcJVVTswARCACQcGIpwqaDP0QAHQcKAYY4wxpkLFJQ3Sp8M6+1ONp5fX3ztublUHMP64xYuqBZgyfpiXmgAUAA0Higibh35FDxQADQc6jltkjAkATDjQb9wiEQ6+AY5dGqQZ1MwKcHu8DNLj23nwz9ZeMyvA7toP0vb4/W5lDjUBeAWg4UARYRf9KtIDewB2ONBv3CIR7gHY4UC/cYtEuAdghwP/Z00UndTMskwY+worzaBmFoAoADBlNgIOFACtZGvBgQKg4UD5PeGJsABoOFDlo0iEVQbgDWanvolAkB8PAAAAAElFTkSuQmCC"),(0,i.A)(a,"DEFAULT_DEPARTMENT_PORTRAIT_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAFCgAwAEAAAAAQAAAFAAAAAAwtohTAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KGV7hBwAAAjlJREFUeAHt28FOwkAQgOGt8UF4Cg0nOJjo1bfgEfRkPekj8BZeOGjigRuRcNeTJ30NsW0g2UzatTNTpE3+JiS7dGba/dgAW0oIbAgggAACCCCAAAIIIIAAAgMTyI59vlcPq2lxDuVDtT3fjnNVwoGCTw9UV1N2us3CnSZhF5sbcjpP6QNgNajri7NWg/v4/A7vxaMv20lfTmSo5wGg85UDEECngDOdGQigU8CZzgwE0CngTGcGAugUcKYzAwF0CjjTmYEAOgWc6b25nPX0unYO5TjpfQBcZtvawY9+QhgV7zHL2r08mRYoLvXnl4+retp06r/u5UPEyQ0ggE4BZzozEECngDOdGQigU8CZ3smtHdbbM1LnXnyJnmZZmBRfsu9TcZZ9Xd4W0tVKxHp7RuP496+s8baPxrq7HflfAW33dwVYHe/lZrwfd9vjN8aVK5ES7xA1Gw9q2MGHiAEtTgEw1jC0ATSgxSkAxhqGNoAGtDgFwFjD0AbQgBanABhrGNoAGtDiFNXKIbHmTf4AlFp7DqVmjBa3tUu5xjVv+UoUvwBN4uJRO4/asjmUmvK8q74WsEqaz85ri8knF5uvsNi0+0vCUGrKMfIeKEWUfQCVYDIcQCmi7AOoBJPhAEoRZR9AJZgMB1CKKPsAKsFkOIBSRNkHUAkmwwGUIso+gEowGQ6gFFH2AVSCyXDT5azZ/E3WcfeHUlMOVAvY9JcEWVfTH0pNzZiIRQABBBBAAAEEEEAAAQQQ6K/ALz1vZTdxNVa5AAAAAElFTkSuQmCC"),(0,i.A)(a,"DEFAULT_MESH_PORTRAIT_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAAk1BMVEUzmvD////4+/77/f+32/rl8v1ptfS53frV6/xisfRarvM5nfHp9f1AofH0+v7t9v7d7v3D4fuQyPdJpfLx+P7J5fuZzfh/wPZFo/E8nvGl0/hxufVst/Q3nPCh0fh6vfV2u/XN5vux2fmUyvdQqfKu1/mdz/hVq/PQ6Pzh8P3a7fyp1fmLxveIxPaEwvZNp/K93vpatp9RAAADjklEQVRYw+2Y23qqMBCFExEQ5CDKGRUVxXr2/Z+uzCRo4Gsl2l6yLraQb/MnmVkzhJJevXr1+pNuWaFPx/+CSswoDVwKsqI/smbZdDhRqKCR8TFstRkN6A8azj7kKfQXDcrkA54prM5fn66GXl0cRxTlXt/mxRZFWXqR4RYXfnV3JREfP2rv8cYjyoF1wLLqRrEJSaYORQX7d4A6wjCryXPEY5nfsOgqp1iaFzLUnT4oCYQ0r+Mb8Nhqsgnmm01w4ykM5ZDd5BGRISN6byR4YEBqVHjsUl15YEDCtF+6lEmZySc4Z8868FhGbJgjgxH7OqJPTaUTHPK7OSTAMa8QsTEh2rBZPBPZBOuP2wvcqjDJZltaj2LRPYoyJRMstKm0hiANdTzbhG/81MXLMdaR9tT8QBvyT7CqWOFFuHjNMwb0pRQvZ4uPAAbQ7DVw+BKnhjPxP24gjvfPga5YF9AqViusbwmgozZUZ2MphAZR2IEuMsB9K/FcaWNoTcgJHCGz5UkiOh0KLRiIa0TTFISYMLiXiaEujEVYtNpAWGOscE9Pqt+yC4gOOz/HjmyCubBGmMOCiwIuuoBLC6gG4ZoDB+4YMX2YBpstzK51AKeGAvNiO+aN64uh+Rq5aSDZAb5Xu4DkTCGJrKj2FB8Widw0gEOlnUD84eHaQYUQ0iCiaRCHMruByaReVzzgGRKJ8I/z7D2kG0i2Dvd3CL82EYltTWWAZMX8PXbbMcrFfg3xUGIpIFmiv9HUt8dRLNQnAi7iL+suYIkdb7HGqmamto3zbtR6m+SEvbpyiVp2j94uLBTK5HkqbYn7+gpTjjuAncKFsvqATezIS5Uv+/9EL+azJb9TkxsrypdaBD+z/CCNTNyc7UApYoGE6PkO2ZjG9aXcBId6c2UmnDgK2HV8hwW7eCDo0s0FRoSdlRO/kla3PZHYp0xbyaOSomHj4grGjYOEUlEiPpf0Yc6vHkrhCRWds6hjrNbtigX72o3jYaIHG/v75WZhyXBiXncXe4gWsomUNpiYLYvR1hWa6JHV2uLit149MuZRYZ3QYpGIHT9jztN4RR+ETthpHuFwZfo1Efw32urcm/KfkmgeVMYS77BOb1AA8m+AXSwLE49h6r3MqwoxkFh6OPb+V0q7kSqH+5o2dMjI+yrob3KmC/KJwh+/bjF4H2umnXdfTexaxiryWCsi/6btCv+I0atXr16f6Rsd6DUwrgFLOAAAAABJRU5ErkJggg=="),(0,i.A)(a,"DEFAULT_THUMBNAIL_URL","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAABSlJREFUeF7t1bERwzAMBEGx//JYkN2A5eDSX+UIsOCNzr338/gIEPgpcATiZRB4FxCI10Hgj4BAPA8CAvEGCDQBf5DmZmpEQCAjh7ZmExBIczM1IiCQkUNbswkIpLmZGhEQyMihrdkEBNLcTI0ICGTk0NZsAgJpbqZGBAQycmhrNgGBNDdTIwICGTm0NZuAQJqbqREBgYwc2ppNQCDNzdSIgEBGDm3NJiCQ5mZqREAgI4e2ZhMQSHMzNSIgkJFDW7MJCKS5mRoREMjIoa3ZBATS3EyNCAhk5NDWbAICaW6mRgQEMnJoazYBgTQ3UyMCAhk5tDWbgECam6kRAYGMHNqaTUAgzc3UiIBARg5tzSYgkOZmakRAICOHtmYTEEhzMzUiIJCRQ1uzCQikuZkaERDIyKGt2QQE0txMjQgIZOTQ1mwCAmlupkYEBDJyaGs2AYE0N1MjAgIZObQ1m4BAmpupEQGBjBzamk1AIM3N1IiAQEYObc0mIJDmZmpEQCAjh7ZmExBIczM1IiCQkUNbswkIpLmZGhEQyMihrdkEBNLcTI0ICGTk0NZsAgJpbqZGBAQycmhrNgGBNDdTIwICGTm0NZuAQJqbqREBgYwc2ppNQCDNzdSIgEBGDm3NJiCQ5mZqREAgI4e2ZhMQSHMzNSIgkJFDW7MJCKS5mRoREMjIoa3ZBATS3EyNCAhk5NDWbAICaW6mRgQEMnJoazYBgTQ3UyMCAhk5tDWbgECam6kRAYGMHNqaTUAgzc3UiIBARg5tzSYgkOZmakRAICOHtmYTEEhzMzUiIJCRQ1uzCQikuZkaERDIyKGt2QQE0txMjQgIZOTQ1mwCAmlupkYEBDJyaGs2AYE0N1MjAgIZObQ1m4BAmpupEQGBjBzamk1AIM3N1IiAQEYObc0mIJDmZmpEQCAjh7ZmExBIczM1IiCQkUNbswkIpLmZGhEQyMihrdkEBNLcTI0ICGTk0NZsAgJpbqZGBAQycmhrNgGBNDdTIwICGTm0NZuAQJqbqREBgYwc2ppNQCDNzdSIgEBGDm3NJiCQ5mZqREAgI4e2ZhMQSHMzNSIgkJFDW7MJCKS5mRoREMjIoa3ZBATS3EyNCAhk5NDWbAICaW6mRgQEMnJoazYBgTQ3UyMCAhk5tDWbgECam6kRAYGMHNqaTUAgzc3UiIBARg5tzSYgkOZmakRAICOHtmYTEEhzMzUiIJCRQ1uzCQikuZkaERDIyKGt2QQE0txMjQgIZOTQ1mwCAmlupkYEBDJyaGs2AYE0N1MjAgIZObQ1m4BAmpupEQGBjBzamk1AIM3N1IiAQEYObc0mIJDmZmpEQCAjh7ZmExBIczM1IiCQkUNbswkIpLmZGhEQyMihrdkEBNLcTI0ICGTk0NZsAgJpbqZGBAQycmhrNgGBNDdTIwICGTm0NZuAQJqbqREBgYwc2ppNQCDNzdSIgEBGDm3NJiCQ5mZqREAgI4e2ZhMQSHMzNSIgkJFDW7MJCKS5mRoREMjIoa3ZBATS3EyNCAhk5NDWbAICaW6mRgQEMnJoazYBgTQ3UyMCAhk5tDWbgECam6kRAYGMHNqaTUAgzc3UiIBARg5tzSYgkOZmakRAICOHtmYTEEhzMzUiIJCRQ1uzCQikuZkaERDIyKGt2QQE0txMjQgIZOTQ1mwCAmlupkYEBDJyaGs2AYE0N1MjAgIZObQ1m4BAmpupEQGBjBzamk1AIM3N1IiAQEYObc0mIJDmZmpEQCAjh7ZmExBIczM1IvAFWDC2pw/rRZEAAAAASUVORK5CYII="),(0,i.A)(a,"USE_WSS",!0),(0,i.A)(a,"ROUTE_PORT",443),(0,i.A)(a,"DISABLE_LOG",!1),(0,i.A)(a,"ENABLE_AUTO_LOGIN",!0),(0,i.A)(a,"APP_SERVER","https://appim.baibaodun.com.cn:8888"),(0,i.A)(a,"ASR_SERVER","https://app.wildfirechat.net/asr/api/recognize"),(0,i.A)(a,"ORGANIZATION_SERVER","https://org.wildfirechat.cn"),(0,i.A)(a,"QR_CODE_PREFIX_PC_SESSION","wildfirechat://pcsession/"),(0,i.A)(a,"ICE_SERVERS",[["turn:turn.wildfirechat.net:3478","wfchat","wfchat123"]]),(0,i.A)(a,"LANGUAGE","zh_CN"),(0,i.A)(a,"MESSAGE_ROAMING",1),(0,i.A)(a,"AI_PORTAL_URL","https://static.wildfirechat.cn/chatbox-web/index.html"),(0,i.A)(a,"ENABLE_ROAMING_MESSAGE_RECEIVING_NOTIFICATION",!1),(0,i.A)(a,"ENABLE_ROAMING_TRANSPARENT_MESSAGE_RECEIVING_NOTIFICATION",!1),(0,i.A)(a,"ENABLE_GENERATE_CONVERSATION_FOR_TRANSPARENT_MESSAGE",!1),(0,i.A)(a,"CLIENT_ID_STRATEGY",1),(0,i.A)(a,"SDK_PLATFORM_WINDOWS",3),(0,i.A)(a,"SDK_PLATFORM_OSX",4),(0,i.A)(a,"SDK_PLATFORM_WEB",5),(0,i.A)(a,"SDK_PLATFORM_WX",6),(0,i.A)(a,"KEEP_ALIVE_INTERNAL",180),(0,i.A)(a,"KEEP_ALIVE_TIMEOUT",200),(0,i.A)(a,"AMR_TO_MP3_SERVER_ADDRESS",r.APP_SERVER+"/amr2mp3?path="),(0,i.A)(a,"SEND_MESSAGE_TIMEOUT",20),(0,i.A)(a,"CONVERSATION_EXPIRE_TIME",30),(0,i.A)(a,"FILE_HELPER_ID","wfc_file_transfer"),(0,i.A)(a,"ENABLE_INFO_PERSISTENCE",!1),(0,i.A)(a,"MAX_TO_LOAD_UNREAD_COUNT_PER_CONVERSATION",99),(0,i.A)(a,"RECALL_REEDIT_TIME_LIMIT",60),(0,i.A)(a,"ENABLE_MULTI_CALL_AUTO_JOIN",!1),(0,i.A)(a,"ENABLE_PTT",!0),(0,i.A)(a,"ENABLE_MIX_MEDIA_MESSAGE",!1),(0,i.A)(a,"SEND_LOG_COMMAND","*#marslog#"),(0,i.A)(a,"ENABLE_WATER_MARK",!0),(0,i.A)(a,"SHOW_VOIP_TIP",!0),a.validate()},2173:function(e,t,n){"use strict";e.exports=n.p+"media/incoming_call_ring.aa3522c6.mp3"},2202:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(1114);class i{constructor(){(0,r.A)(this,"unread",0),(0,r.A)(this,"unreadMention",0),(0,r.A)(this,"unreadMentionAll",0)}}},2247:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(7624);class i extends r.A{constructor(e,t){super(e,null,t),this.type=23}digest(e){return"[对讲语音]"}encode(){let e=super.encode();return e.searchableContent="[对讲语音]",e}decode(e){super.decode(e)}}},2385:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NDgwNEIzRjZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NDgwNEI0MDZFODYxMUU3QjI4OEYxN0VBRDU4MjAxNSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU0N0VFRkZBNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU0ODA0QjNFNkU4NjExRTdCMjg4RjE3RUFENTgyMDE1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+8drVVQAABVRJREFUeNrEV1tsVFUUXeec+5hXp50WCq2UIgJGSNXwMgYJIfghSkj4gIBINBoTJfrhh79q9M/EmKBG/TEmxsQYX0jAHxNNRHwkJRKN+AB81LQ8Sst0Hr1z7z3nuM+Z6VhpS2ekxH0zTXPvPXuvvffaj8u01jDy4devAFqlTw33rz05+FXGd5PjjnDYxPPZhDGGICq7gnnqlp4tx+e3LB4OogKUVvTTSLg+tJY4de47RDLEs7sO2nPOhIJiMMJjVdlbViMvZtuyKZf7JdLJ0aDQq9pV3FdKCsWiN6HwuFE727k6gGOn308ywTa0trek2nMdUFKlNTSaAABfC8Q6BPMrD0gWenT3UXo01hCAUAWxI9xhwRyoWEIqhWaEEdhQSpiMua6A8MN7w2LkAuIhym1hpnP1ECfdDBJOihsNzXg+CQHxAPaskgwOgWB+tJPS8TrTLGtfuBIATWQxv6sVa4bwa8nBXUqMF+5RLHyNyJy9YgquWnT1D/kPzgUc4cFVPqXCRcSjPcTMWEtn/+XE5HNnX4Mzx6q8NH4epTBvMSlJ9x1iiFvZF+ngZcZ4J2ei+QgYrzQR80r84IzDE0mMBefw64UCHO5X00p5oeOIQ3l/sRIMUDqeoddlQwAMWqljUjpMJM3Ad5JUITHprLFuwn8yJJiLmK5CJQ8vKkNQGlSNV1xQsMmBQhQspajwhgAYI7EK4ZHRXGIBRspDtuP5TgpRHJA+aePBTQ9w04hUgHz5HNpSXRSJBIK4CMGrIIWgCDLiBwsLxBPdUApM2IvBKCpxGXvXPYez+dP44MTztukk3BQZZ7XiYgRuEMVwFFtX7seqro04eOIFlKMxZLycjRCr8dScMKlqCIAkD1Neq/Xq2z8OYfPyfbh9yQ5cKA2gr2sT2jM9Vtlo+SyO/3mEQGWwrncb+geO4GLpL6T9XN3wrJ1wJmYbUhkQn/78BjrS3di95mmb+4STpghVjysaMhuW7rQcOPbbezj0/QF0ZBZRWjKIZaWxWTCdcZd5KFZGkKey2rbqMWxadh9Sftu0RM34Ofv/bUu2Y3R8EJ/98hal7yKBz9aJ2BQAQUojXcEwhXI9hXXX6qdsuz559iiFdxBrerYi6bXYdw1Hvvn9Y8uL9b3bsePmJzEeFnH09LvUkHzQZMWss2BqQ2U2t53pXmzve8IaN2IAHD3zjiXYhBgAX5x6m0B8VAXPXdy18hFcl1tBJTlCqnTjEdC15SKMKrRglLBx2W50tS6vP99y44O444bdaEt01u9lKC0PbzhQ64RVmZ9ZjLU99+CTH19FGFeQ8JKNRYDVrnKUR4vfgVsX3VkvNiOtyU50tiyhunYnccChe9djHlXFZOnr3kI6ctQPSphpt+EzzZWIGpAhVtarekqLFXQTVxXsPCSdLCStYDNM4+lIWG2rxntOpw7/8BLSyTbK83hTw8khHoSUwlhFth+YfZA1WgXGA8No02r7Bw5TOgoQrLnJbUrPcxJYkF1K/YC6Js2ThsuQ1bqggWIaSo5aN2NNjmfarDjnlj/GEUHDaLp+4MyyYVAoPcOy/7wlVI1qzEQCp5FQXkvh+J/Fuaz76WttkP2rq0wCEMmAFgaHWJOynZDNIZbq1x2rdliyI6WcCsBhHi0vLGtGK6dtBrNO8uYWZlMFlSg0XTNJBtgUAKsX3x3SSvXTUHBSjhUu0mdpQoHNXejLKuQ+T6u+hZsHqbLUFAA97TfR0jr++aXBoQtD+TMLfRGN0oIh5iIK1Njow6+U6s4uKHa3reh3hS+nADCbL4V/jLz+krLVQfnKg81ZlRgvEjYQWp6X+h8O/C3AAJuKTSiGRs4/AAAAAElFTkSuQmCC"},2459:function(e,t,n){"use strict";e.exports=n.p+"media/outgoing_call_ring.7b891678.mp3"},2489:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(1114);class i{}(0,r.A)(i,"ConversationSilent",1),(0,r.A)(i,"GlobalSilent",2),(0,r.A)(i,"ConversationTop",3),(0,r.A)(i,"HiddenNotificationDetail",4),(0,r.A)(i,"GroupHideNickname",5),(0,r.A)(i,"FavoriteGroup",6),(0,r.A)(i,"Conversation_Sync",7),(0,r.A)(i,"My_Channel",8),(0,r.A)(i,"Listened_Channel",9),(0,r.A)(i,"UserSettingPCOnline",10),(0,r.A)(i,"UserSettingConversationReaded",11),(0,r.A)(i,"WebOnline",12),(0,r.A)(i,"DisableReceipt",13),(0,r.A)(i,"FavoriteUser",14),(0,r.A)(i,"MuteWhenPCOnline",15),(0,r.A)(i,"LinesReaded",16),(0,r.A)(i,"NoDisturbing",17),(0,r.A)(i,"ConversationClearMessage",18),(0,r.A)(i,"ConversationDraft",19),(0,r.A)(i,"DisableSyncDraft",20),(0,r.A)(i,"VoipSilent",21),(0,r.A)(i,"PttReserved",22),(0,r.A)(i,"CustomState",23),(0,r.A)(i,"DisableSecretChat",24),(0,r.A)(i,"PttSilent",25),(0,r.A)(i,"GroupRemark",26),(0,r.A)(i,"kUserSettingCustomBegin",1e3)},2490:function(e,t,n){"use strict";n.d(t,{A:function(){return _}});var r=n(641),i=n(2644);const o={class:"title"},s=["innerHTML"],a={class:"desc"};function l(e,t,n,l,u,c){return(0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["composite-message-container",{out:0===n.message.direction}]),onClick:t[0]||(t[0]=(...e)=>c.showCompositePage&&c.showCompositePage(...e))},[(0,r.Lk)("p",o,(0,i.v_)(c.title),1),(0,r.Lk)("p",{class:"content",innerHTML:this.$xss(this.content)},null,8,s),(0,r.Lk)("p",a,(0,i.v_)(e.$t("message.records")),1)],2)}n(8992),n(1454),n(8872);var u=n(1456),c=n(4021),d=n(9326),h=n(7273),f=n(6520),p=n(3437),g=n(8109),m=n.n(g),y=n(4288),v=n(5995),b={name:"CompositeMessageContentView",props:{message:{type:u.A,required:!0}},computed:{title(){let e=this.message.messageContent;return e.title},content(){let e=this.message.messageContent,t=e.messages,n="",r=t[0].conversation,i=r.type===h["default"].Group?r.target:"";for(let o=0;o1?n.map((e=>`${v.A.escapeHtml(e)}\n`)).reduce(((e,t,n,r)=>e+t),""):v.A.escapeHtml(t),t=(0,c.K3)(t),t.indexOf("=0?(t=t.replace(/{};this.$modal.show(e,{message:this.message,isInCompositeView:!0},null,{name:"show-composite-message-modal-"+(0,p.stringValue)(this.message.messageUid),width:800,height:600,clickToClose:!0},{"before-close":t})}}}},A=n(6262);const w=(0,A.A)(b,[["render",l],["__scopeId","data-v-1e22803c"]]);var _=w},2531:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(1114),i=n(9326),o=n(6643),s=n(5807);class a extends s.A{constructor(e,t){super(o["default"].ModifyGroupSetting_Notification),(0,r.A)(this,"operator",""),(0,r.A)(this,"settingType",0),(0,r.A)(this,"settingValue",""),this.settingType=e,this.settingValue=t}formatNotification(){return""}encode(){let e=super.encode(),t={g:this.groupId,n:this.settingType,o:this.operator,m:this.settingValue};return e.binaryContent=i["default"].utf8_to_b64(JSON.stringify(t)),e}decode(e){super.decode(e);let t=i["default"].b64_to_utf8(e.binaryContent),n=JSON.parse(t);this.groupId=n.g,this.operator=n.o,this.alias=n.n,this.memberId=n.m}}},2585:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(1114),i=n(3960),o=n(6643),s=n(9326);class a extends i.A{constructor(e=0,t=[]){super(o["default"].VOIP_CONTENT_TYPE_MUTE_VIDEO,e,t),(0,r.A)(this,"callId",void 0),(0,r.A)(this,"videoMuted",void 0),(0,r.A)(this,"existParticipants",void 0)}formatNotification(e){return"mute video"}encode(){let e=super.encode();e.content=this.callId;let t={existParticipants:this.existParticipants,videoMuted:this.videoMuted};return e.binaryContent=s["default"].utf8_to_b64(JSON.stringify(t)),e}decode(e){super.decode(e),this.callId=e.content;let t=s["default"].b64_to_utf8(e.binaryContent),n=JSON.parse(t);this.existParticipants=n.existParticipants,this.videoMuted=n.videoMuted}}},2688:function(e,t,n){"use strict";n.d(t,{A:function(){return a}});var r=n(1114),i=(n(8992),n(3949),n(7451)),o=n(6643),s=n(9326);class a extends i["default"]{constructor(e,t=""){super(o["default"].MESSAGE_CONTENT_TYPE_MIX_FILE_TEXT),(0,r.A)(this,"files",[]),(0,r.A)(this,"text",""),e&&e.length>10&&(console.error("文件混排消息,一次最多支持 10 个文件"),e=e.slice(0,9)),this.files=e,this.text=t}digest(){return"[文件混排组合] "+this.text}encode(){let e=super.encode();e.searchableContent=this.text,this.files.forEach((e=>e.localPath=""));let t={mu:this.files},n=JSON.stringify(t);return e.binaryContent=s["default"].utf8_to_b64(n),e}decode(e){if(super.decode(e),this.text=e.searchableContent,e.binaryContent&&e.binaryContent.length>0){let t=s["default"].b64_to_utf8(e.binaryContent);this.files=JSON.parse(t).mu}}}},2744:function(e,t,n){"use strict";n.d(t,{A:function(){return de}});n(4114),n(8992),n(4520),n(2577),n(3949),n(1454),n(3375),n(9225),n(3972),n(9209),n(5714),n(7561),n(6197),n(4603),n(7566),n(8721);var r=n(8108),i=n(9326),o=n(6756),s=n(7273),a=n(3437),l=n(5995),u=n(1964),c=n.n(u),d=n(7035),h=n(3846),p=n(7119),g=n(6089),m=n(6643),y=n(3830),v=n(1456),b=n(1166),A=n(6836),w=n(4097),_=n(8896),I=n.n(_),k=n(7386),C=n(881),E=n(5187),S=n(4288),M=n(6520),O=n(1114);class x{}(0,O.A)(x,"General",0),(0,O.A)(x,"NameOrMobile",1),(0,O.A)(x,"Name",2),(0,O.A)(x,"Mobile",3);var T=n(2169),L=n(3670),R=n(3924),P=n(6931),N=n(5876),D=n(3690),j=n(850),U=n(503),B=n(2202),G=n(411),F=n(8424),V=n(9372),z=n(8032),W=n(9440),Z=n(8109),Y=n.n(Z),q=n(584),H=n(2531),J=n(6032),X=n(9841),Q=n(5606);const K=(0,J.nY)("store-p",(()=>{const e=(0,X.KR)({currentConversationInfo:null,conversationInfoList:[],currentConversationMessageList:[],currentConversationOldestMessageId:0,currentConversationOldestMessageUid:0,currentConversationRead:null,isMessageReceiptEnable:!1,isGroupMessageReceiptEnable:!1,inputtingUser:null,inputClearHandler:null,shouldAutoScrollToBottom:!0,previewMediaItems:[],previewMediaIndex:null,enableMessageMultiSelection:!1,showChannelMenu:!1,quotedMessage:null,downloadingMessages:[],sendingMessages:[],floatingConversations:[],currentVoiceMessage:null,contextMenuConversationInfo:null,_reset(){this.currentConversationInfo=null,this.conversationInfoList=[],this.currentConversationMessageList=[],this.currentConversationOldestMessageId=0,this.currentConversationOldestMessageUid=0,this.currentConversationRead=null,this.isMessageReceiptEnable=!1,this.inputtingUser=null,this.inputClearHandler=null,this.shouldAutoScrollToBottom=!0,this.previewMediaItems=[],this.previewMediaIndex=null,this.enableMessageMultiSelection=!1,this.showChannelMenu=!1,this.quotedMessage=null,this.downloadingMessages=[],this.sendingMessages=[],this.floatingConversations=[],this.currentVoiceMessage=null,this.contextMenuConversationInfo=null}}),t=(0,X.KR)({currentFriendRequest:null,currentGroup:null,currentChannel:null,currentFriend:null,currentOrganization:null,currentExternalDomain:null,currentChatroom:null,currentUser:null,expandFriendRequestList:!1,expandFriendList:!0,expandGroup:!1,expandChanel:!1,expandOrganization:!1,expandExternalDomain:!1,expandChatroom:!1,unreadFriendRequestCount:0,friendList:[],friendRequestList:[],favGroupList:[],channelList:[],favContactList:[],selfUserInfo:null,contextMenuUserInfo:null,isEnableMesh:!1,_reset(){this.currentFriendRequest=null,this.currentGroup=null,this.currentChannel=null,this.currentFriend=null,this.currentOrganization=null,this.currentChatroom=null,this.currentUser=null,this.expandFriendRequestList=!1,this.expandFriendList=!0,this.expandGroup=!1,this.expandChanel=!1,this.unreadFriendRequestCount=0,this.friendList=[],this.friendRequestList=[],this.favGroupList=[],this.channelList=[],this.favContactList=[],this.selfUserInfo=null,this.contextMenuUserInfo=null,this.isEnableMesh=!1}}),n=(0,X.KR)({query:null,userSearchResult:[],channelSearchResult:[],contactSearchResult:[],groupSearchResult:[],conversationSearchResult:[],messageSearchResult:[],searchDomainInfo:null,_reset(){this.query=null,this.userSearchResult=[],this.channelSearchResult=[],this.contactSearchResult=[],this.groupSearchResult=[],this.conversationSearchResult=[],this.messageSearchResult=[],this.searchDomainInfo=null}}),i=(0,X.KR)({users:[],organizations:[],conversations:[],messages:[],_reset(){this.users=[],this.organizations=[],this.conversations=[],this.messages=[]}}),o=(0,X.KR)({connectionStatus:r.A.ConnectionStatusUnconnected,isPageHidden:!1,enableNotification:!0,enableMinimize:"1"===(0,L.Gq)("minimizable"),enableNotificationMessageDetail:!0,enableCloseWindowToExit:!1,enableAutoLogin:!1,isElectron:(0,M.isElectron)(),isElectronWindowsOrLinux:Q&&("win32"===Q.platform||"linux"===Q.platform),isMainWindow:!1,linuxUpdateTitleInterval:0,isCommercialServer:!1,isDisableSyncDraft:!1,isVoipOngoing:!1,config:T["default"],userOnlineStateMap:new Map,enableOpenWorkSpace:!!T["default"].OPEN_PLATFORM_WORK_SPACE_URL,_reset(){this.connectionStatus=r.A.ConnectionStatusUnconnected,this.isPageHidden=!1,this.enableNotification=!0,this.enableMinimize="1"===(0,L.Gq)("minimizable"),this.enableNotificationMessageDetail=!0,this.enableCloseWindowToExit=!1,this.enableAutoLogin=!1,this.isElectron=(0,M.isElectron)(),this.isElectronWindowsOrLinux=Q&&("win32"===Q.platform||"linux"===Q.platform),this.linuxUpdateTitleInterval=0,this.isCommercialServer=!1,this.isDisableSyncDraft=!1,this.isVoipOngoing=!1,this.config=T["default"],this.userOnlineStateMap=new Map}});return{conversationStore:e,contactStore:t,pickStore:i,searchStore:n,miscStore:o}}));var $=n(6609),ee=n(7624),te=n(5269),ne=n(2688),re=n(5606);let ie,oe,se,ae,le,ue={debug:!0,state:{conversation:null,contact:null,search:null,pick:null,misc:null},init(e,t){console.log("init store");const{conversationStore:n,contactStore:s,pickStore:l,searchStore:u,miscStore:c}=(0,J.bP)(K());ie=n.value,oe=s.value,se=u.value,ae=l.value,le=c.value,ue.state.conversation=ie,ue.state.contact=oe,ue.state.search=se,ue.state.pick=ae,ue.state.misc=le,le.connectionStatus=i["default"].getConnectionStatus(),i["default"].eventEmitter.on(o["default"].ConnectionStatusChanged,(e=>{console.log("store ConnectionStatusChanged",e),oe.isEnableMesh=i["default"].isEnableMesh(),le.connectionStatus=e,le.isCommercialServer=i["default"].isCommercialServer(),le.isDisableSyncDraft=i["default"].isDisableSyncDraft();try{e===r.A.ConnectionStatusConnected?(this._loadDefaultData(),this.updateTray()):e!==r.A.ConnectionStatusLogout&&e!==r.A.ConnectionStatusRejected&&e!==r.A.ConnectionStatusSecretKeyMismatch&&e!==r.A.ConnectionStatusKickedOff&&e!==r.A.ConnectionStatusTokenIncorrect||(ce(),this.updateTray())}catch(t){}})),i["default"].eventEmitter.on(o["default"].UserInfosUpdate,(e=>{console.log("store UserInfosUpdate",e,le.connectionStatus),this._reloadSingleConversationIfExist(e),this._patchCurrentConversationMessages(),this._loadFriendList(),this._loadFriendRequest(),this._loadSelfUserInfo()})),i["default"].eventEmitter.on(o["default"].SettingUpdate,(()=>{console.log("store SettingUpdate"),this._loadDefaultConversationList(),this._loadFavContactList(),this._loadFavGroupList(),this._loadChannelList(),this.updateTray()})),i["default"].eventEmitter.on(o["default"].FriendRequestUpdate,(e=>{this._loadFriendRequest()})),i["default"].eventEmitter.on(o["default"].FriendListUpdate,(e=>{console.log("FriendListUpdate",e),this._loadFriendList(),this._loadFriendRequest(),this._loadFavContactList(),this._loadDefaultConversationList(),this._patchCurrentConversationMessages()})),i["default"].eventEmitter.on(o["default"].GroupInfosUpdate,(e=>{console.log("store GroupInfosUpdate",e),this._reloadGroupConversationIfExist(e),this._loadFavGroupList()})),i["default"].eventEmitter.on(o["default"].GroupMembersUpdate,((e,t)=>{console.log("store GroupMembersUpdate",e),this._reloadGroupConversationIfExist([new W.A(e)])})),i["default"].eventEmitter.on(o["default"].ChannelInfosUpdate,(e=>{this._loadDefaultConversationList(),this._loadChannelList()})),i["default"].eventEmitter.on(o["default"].ConversationInfoUpdate,(e=>{this._reloadConversation(e.conversation),this.updateTray()})),i["default"].eventEmitter.on(o["default"].ReceiveMessage,((e,t)=>{if(le.connectionStatus!==r.A.ConnectionStatusReceiveing&&(!le.isMainWindow||this.isConversationInCurrentWindow(e.conversation)))if(e.messageContent instanceof P.A||e.messageContent instanceof N.A&&e.messageContent.kickedMembers.indexOf(i["default"].getUserId())>=0||e.messageContent instanceof D.A&&e.messageContent.operator===i["default"].getUserId())this.setCurrentConversationInfo(null);else{if(t||this._reloadConversation(e.conversation),ie.currentConversationInfo&&e.conversation.equal(ie.currentConversationInfo.conversation)){if(e.messageContent.type===m["default"].Typing){let t=1===e.conversation.type?e.conversation.target:"",n=i["default"].getUserInfo(e.from,!1,t);n=Object.assign({},n),n._displayName=i["default"].getGroupMemberDisplayNameEx(n),ie.inputtingUser=n,ie.inputClearHandler||(ie.inputClearHandler=()=>{ie.inputtingUser=null}),clearTimeout(ie.inputClearHandler),setTimeout(ie.inputClearHandler,3e3)}else clearTimeout(ie.inputClearHandler),ie.inputtingUser=null;if(!this._isDisplayMessage(e)||e.messageContent.type===m["default"].RecallMessage_Notification)return;if(e.content.notLoaded)return console.log("message not loaded, reset conversation message list"),ie.currentConversationMessageList.length=0,ie.currentConversationOldestMessageId=0,void(ie.currentConversationOldestMessageUid=0);let t=0,n=ie.currentConversationMessageList.length;n>0&&(t=ie.currentConversationMessageList[n-1].timestamp),this._patchMessage(e,t);let r=ie.currentConversationMessageList.findIndex((t=>t.messageId===e.messageId||(0,a.gt)(t.messageUid,0)&&(0,a.eq)(t.messageUid,e.messageUid)||t.messageContent.type===m["default"].Streaming_Text_Generating&&(e.messageContent.type===m["default"].Streaming_Text_Generating||e.messageContent.type===m["default"].Streaming_Text_Generated)&&t.messageContent.streamId===e.messageContent.streamId));if(r>-1)return ie.currentConversationMessageList.splice(r,1,e),void console.log("msg duplicate, update message");{let t=ie.currentConversationMessageList[0];if(t&&(0,a.lt)(e.timestamp,t.timestamp))return void console.log("msg timestamp is less than first msg, maybe update old message content, ignore")}ie.currentConversationMessageList.push(e)}le.isMainWindow&&this.isConversationInCurrentWindow(e.conversation)&&(2!==e.conversation.type&&le.isPageHidden&&(le.enableNotification||e.status===y.A.AllMentioned||e.status===y.A.Mentioned)&&this.notify(e),this.updateTray()),e.messageContent instanceof H.A&&i["default"].getGroupInfo(e.messageContent.groupId,!0)}})),i["default"].eventEmitter.on(o["default"].RecallMessage,((e,t)=>{if(this._reloadConversationByMessageUidIfExist(t),ie.currentConversationInfo){let e=i["default"].getMessageByUid(t);if(e){if(e.conversation.equal(ie.currentConversationInfo.conversation)&&ie.currentConversationMessageList){let e=0;ie.currentConversationMessageList=ie.currentConversationMessageList.map((n=>{if((0,a.eq)(n.messageUid,t)){let n=i["default"].getMessageByUid(t);return this._patchMessage(n,e),n}return e=n.timestamp,n}))}}else ie.currentConversationMessageList=ie.currentConversationMessageList.filter((e=>!(0,a.eq)(e.messageUid,t)))}this.updateTray()})),i["default"].eventEmitter.on(o["default"].UserOnlineEvent,(e=>{e.forEach((e=>{le.userOnlineStateMap.set(e.userId,e)})),oe.friendList=this._patchAndSortUserInfos(oe.friendList,"")})),i["default"].eventEmitter.on(o["default"].MessageDeleted,(e=>{this._reloadConversationByMessageUidIfExist(e),ie.currentConversationInfo&&ie.currentConversationMessageList&&(ie.currentConversationMessageList=ie.currentConversationMessageList.filter((t=>!(0,a.eq)(t.messageUid,e)))),this.updateTray()})),i["default"].eventEmitter.on(o["default"].DeleteMessage,(e=>{this._reloadConversationByMessageIdIfExist(e),ie.currentConversationInfo&&ie.currentConversationMessageList&&(ie.currentConversationMessageList=ie.currentConversationMessageList.filter((t=>t.messageId!==e)))})),i["default"].eventEmitter.on(o["default"].SecretChatMessageBurned,((e,t)=>{})),i["default"].eventEmitter.on(o["default"].SecretChatMessageBurned,(e=>{this._loadDefaultConversationList(),ie.currentConversationInfo&&ie.currentConversationMessageList&&(ie.currentConversationMessageList=ie.currentConversationMessageList.filter((t=>e.indexOf(t.messageId)<0)))})),i["default"].eventEmitter.on(o["default"].SecretChatStateChange,(e=>{this._loadDefaultConversationList()})),i["default"].eventEmitter.on(o["default"].SendMessage,(e=>{if(e.messageContent instanceof G.A)return;if(this._reloadConversation(e.conversation),!this._isDisplayMessage(e))return;if(!ie.currentConversationInfo||!e.conversation.equal(ie.currentConversationInfo.conversation))return void console.log("not current conv");let t=ie.currentConversationMessageList.findIndex((t=>t.messageId===e.messageId));if(-1!==t)return;let n=ie.currentConversationMessageList.length,r=0;if(n>0){let e=ie.currentConversationMessageList[n-1];r=e.timestamp}this._patchMessage(e,r),ie.currentConversationMessageList.push(e);const i=50;ie.currentConversationMessageList.length>i&&(ie.currentConversationMessageList=ie.currentConversationMessageList.slice(ie.currentConversationMessageList.length-i))}));const d=e=>{if(console.log("message status update",e),!this._isDisplayMessage(e))return;if(!ie.currentConversationInfo||!e.conversation.equal(ie.currentConversationInfo.conversation))return void console.log("not current conv");let t=ie.currentConversationMessageList.findIndex((t=>t.messageId===e.messageId));if(t<0)return;let n=ie.currentConversationMessageList[t];n=Object.assign(n,e),ie.currentConversationMessageList.splice(t,1,n),ie.currentConversationInfo.lastMessage&&ie.currentConversationInfo.lastMessage.messageId===e.messageId&&Object.assign(ie.currentConversationInfo.lastMessage,e)};i["default"].eventEmitter.on(o["default"].MessageStatusUpdate,d),i["default"].eventEmitter.on(o["default"].MessageContentUpdate,d),i["default"].eventEmitter.on(o["default"].MessageRead,(e=>{ie.currentConversationInfo&&(ie.currentConversationRead=new Map(i["default"].getConversationRead(ie.currentConversationInfo.conversation)))})),j["default"].onVoipCallStatusCallback=this.updateVoipStatus,(0,M.isElectron)()&&(e&&(M.ipcRenderer.on("deep-link",((e,t)=>{if(console.log("deep-link",t),!i["default"].isLogin())return;let n=new URL(t),r=n.pathname,o=n.searchParams;if("//conversation"===r||"//conversation/"===r){let e=o.get("target"),t=Number(o.get("line")),n=Number(o.get("type")),r=new g.A(n,e,t);this.setCurrentConversation(r)}})),M.ipcRenderer.on("floating-conversation-window-closed",((e,t)=>{let n=t.type,r=t.target,i=t.line,o=new g.A(n,r,i);this.removeFloatingConversation(o),this._reloadConversation(o)}))),M.ipcRenderer.on("file-downloaded",((e,t)=>{let n=t.messageUid,r=t.filePath;console.log("file-downloaded",t),ie.downloadingMessages=ie.downloadingMessages.filter((e=>!(0,a.eq)(e.messageUid,n)));let o=i["default"].getMessageByUid(n);console.log("xxxxx downloaded file",o),o&&(o.messageContent.localPath=r,i["default"].updateMessageContent(o.messageId,o.messageContent),ie.currentConversationMessageList.forEach((e=>{e.messageUid===n&&(e.messageContent=o.messageContent)})))})),M.ipcRenderer.on("file-download-failed",((e,t)=>{let n=t.messageUid;ie.downloadingMessages=ie.downloadingMessages.filter((e=>!(0,a.eq)(e.messageUid,n)))})),M.ipcRenderer.on("file-download-progress",((e,t)=>{let n=t.messageUid,r=t.receivedBytes,i=t.totalBytes,o=ie.downloadingMessages.find((e=>(0,a.eq)(e.messageUid,n)));o&&(o.progress=r,o.total=i)})),le.subWindowLoadDataOptions=t||{},e||i["default"].getConnectionStatus()!==r.A.ConnectionStatusConnected||this._loadDefaultData(),window.__wfc=i["default"]),le.isMainWindow=e,window.__cw=M.currentWindow},_loadDefaultData(){let e=le.subWindowLoadDataOptions,t=le.isMainWindow;(t||e.loadFavContactList)&&this._loadFavGroupList(),(t||e.loadChannelList)&&this._loadChannelList(),(t||e.loadFriendList)&&this._loadFriendList(),(t||e.loadFavContactList)&&this._loadFavContactList(),(t||e.loadFriendRequestList)&&this._loadFriendRequest(),(t||e.loadDefaultConversationList)&&this._loadDefaultConversationList(),this._loadSelfUserInfo(),this._loadUserLocalSettings(),ie.isMessageReceiptEnable=i["default"].isReceiptEnabled()&&i["default"].isUserReceiptEnabled(),ie.isGroupMessageReceiptEnable=i["default"].isGroupReceiptEnabled()&&i["default"].isUserReceiptEnabled()},_isDisplayMessage(e){return 0!==e.messageId||e.messageContent.type===m["default"].Streaming_Text_Generating},_loadDefaultConversationList(){console.log("store _loadDefaultConversationList");let e=(0,M.isElectron)()?[0,1,3,5]:[0,1,3];this._loadConversationList(e,[0])},_loadConversationList(e=[0,1,3],t=[0]){let n=i["default"].getConversationList(e,t),r=new Set,o=[];n.forEach((e=>{e.conversation.type===s["default"].Single?(r.add(e.conversation.target),e.lastMessage&&e.lastMessage.from&&r.add(e.lastMessage.from)):e.conversation.type===s["default"].Group&&(o.push(e.conversation.target),e.lastMessage&&e.lastMessage.from&&r.add(e.lastMessage.from))}));let a=new Map,l=new Map;r.forEach((e=>{a.set(e,new z["default"](e))})),o.forEach((e=>{l.set(e,new W.A(e))})),console.log("to load userIds",[...r]),i["default"].getUserInfos([...r]).forEach((e=>{a.set(e.uid,e)})),console.log("to load groupIds",o),i["default"].getGroupInfos(o).forEach((e=>{l.set(e.target,e)})),n.forEach((e=>{this._patchConversationInfo(e,!0,a,l),ie.currentConversationInfo&&ie.currentConversationInfo.conversation.equal(e.conversation)&&(ie.currentConversationInfo=e,this._patchCurrentConversationOnlineStatus())})),ie.conversationInfoList=n},_reloadConversation(e,t=!0){let n=i["default"].getConversationInfo(e);if(!n)return;n=this._patchConversationInfo(n,!0),n.conversation._targetOnlineStateDesc=this.getUserOnlineState(e.target);let r=ie.conversationInfoList.findIndex((t=>t.conversation.equal(e)));if(r>=0)Object.assign(ie.conversationInfoList[r],n);else{if(!t||!(0,a.gt)(n.timestamp,0)||e.type===s["default"].ChatRoom)return n;ie.conversationInfoList.push(n)}if(ie.currentConversationInfo&&ie.currentConversationInfo.conversation.equal(e)){let e=!n.lastMessage&&!!ie.currentConversationInfo.lastMessage;e&&(ie.currentConversationMessageList=[]),ie.currentConversationInfo=n}return ie.conversationInfoList.sort(((e,t)=>e.top&&t.top||!e.top&&!t.top?(0,a.gt)(e.timestamp,t.timestamp)?-1:1:e.top?-1:1)),n},_reloadSingleConversationIfExist(e){let t=ie.conversationInfoList;if(t&&0!==t.length)if(e.length>10)this._loadDefaultConversationList();else{let n=[];if(t){let r=e.map((e=>e.uid));t.forEach((e=>{let t=e.conversation;if(t.type===s["default"].Single)r.indexOf(t.target)>=0&&n.push(t);else{let i=e.lastMessage;i&&r.indexOf(i.from)>=0&&-1===n.findIndex((e=>e.type===t.type&&e.target===t.target&&e.line===t.line))&&n.push(t)}}))}for(let e of n)this._reloadConversation(e,!1)}},_reloadGroupConversationIfExist(e){e.length>10?this._loadDefaultConversationList():e.forEach((e=>{let t=new g.A(s["default"].Group,e.target,0);this._reloadConversation(t,!1)}))},_reloadConversationByMessageIdIfExist(e){if(0===e)return;let t=null;for(let n=0;nt.conversation.equal(e)));n&&n.length>0?t=n[0]:(i["default"].setConversationTimestamp(e,(new Date).getTime()),t=this._reloadConversation(e)),this.setCurrentConversationInfo(t)},setCurrentConversationInfo(e){if(!e){if(ie.currentConversationInfo){let e=ie.currentConversationInfo.conversation;if(i["default"].isUserOnlineStateEnabled()&&i["default"].unwatchOnlineState(e.type,[e.target]),e.type===s["default"].Channel){let t=new G.A;i["default"].sendConversationMessage(e,t)}}return ie.currentConversationInfo=null,ie.shouldAutoScrollToBottom=!1,ie.currentConversationMessageList.length=0,ie.currentConversationOldestMessageId=0,ie.currentConversationOldestMessageUid=0,ie.currentConversationRead=null,ie.enableMessageMultiSelection=!1,void(ie.showChannelMenu=!1)}if(ie.currentConversationInfo&&ie.currentConversationInfo.conversation.equal(e.conversation))return;let t=e.conversation;if(i["default"].isUserOnlineStateEnabled()&&(t.type===s["default"].Group||t.type===s["default"].Single&&!i["default"].isMyFriend(t.target))&&i["default"].watchOnlineState(t.type,[t.target],1e3,(e=>{e.forEach((e=>{le.userOnlineStateMap.set(e.userId,e)})),this._patchCurrentConversationOnlineStatus()}),(e=>{console.log("watchOnlineState error",e)})),t.type===s["default"].Channel){let e=new F.A;i["default"].sendConversationMessage(t,e)}if(ie.currentConversationInfo=e,ie.shouldAutoScrollToBottom=!0,ie.currentConversationMessageList.length=0,ie.currentConversationOldestMessageId=0,ie.currentConversationOldestMessageUid=0,this._patchCurrentConversationOnlineStatus(),ie.currentConversationRead=i["default"].getConversationRead(e.conversation),ie.enableMessageMultiSelection=!1,ie.showChannelMenu=!1,t.type===s["default"].Channel){let e=i["default"].getChannelInfo(t.target,!0);e.menus&&e.menus.length>0&&(ie.showChannelMenu=!0)}else t.type===s["default"].Group?i["default"].getGroupInfo(t.target,!0):t.type===s["default"].Single&&i["default"].getUserInfo(t.target,!0);ie.quotedMessage=null,ie.currentVoiceMessage=null,clearTimeout(ie.inputClearHandler),ie.inputtingUser=null,ae.messages.length=0},quitGroup(e){i["default"].quitGroup(e,[0],null,(()=>{this.setCurrentConversationInfo(null)}),(e=>{console.log("quit group error",e)}))},dismissGroup(e){i["default"].dismissGroup(e,[0],null,(()=>{this.setCurrentConversationInfo(null)}),(e=>{console.log("dismiss group error",e)}))},subscribeChannel(e,t){i["default"].listenChannel(e,t,(()=>{}),(e=>{console.log("unsubscribe channel error",e)}))},toggleMessageMultiSelection(e){ie.enableMessageMultiSelection=!ie.enableMessageMultiSelection,ae.messages.length=0,ie.enableMessageMultiSelection&&e&&ae.messages.push(e)},toggleChannelMenu(e){ie.showChannelMenu=e},selectOrDeselectMessage(e){let t=ae.messages.findIndex((t=>t.messageId===e.messageId));t>=0?ae.messages.splice(t,1):ae.messages.push(e)},deleteSelectedMessages(e=!1){ie.enableMessageMultiSelection=!1,ae.messages.length<1||(ae.messages.sort(((e,t)=>e.messageId-t.messageId)),ae.messages.forEach((t=>{e?i["default"].deleteRemoteMessageByUid(t.messageUid):i["default"].deleteMessage(t.messageId)})),ae.messages.length=0)},forwardMessage(e,t,n,r){(0,M.isElectron)()||(n=n.map((e=>Object.assign({},e)))),t.forEach((t=>{if(e===E.A.NORMAL||e===E.A.ONE_BY_ONE)n.forEach((e=>{if(e.messageContent instanceof V.A){let n=e.messageContent.toLinkMessageContent();n.forEach((e=>{i["default"].sendConversationMessage(t,e)}))}else e.messageContent=this._filterForwardMessageContent(e),i["default"].sendConversationMessage(t,e.messageContent)}));else{let e=new R.A,r="",o=n[0].conversation;if(o.type===s["default"].Single){let e=ue.getUserInfos([i["default"].getUserId(),o.target],"");r=e[0]._displayName+"和"+e[1]._displayName+"的聊天记录"}else r="群的聊天记录";e.title=r;let a=n.map((e=>(e.messageContent=this._filterForwardMessageContent(e),e)));e.setMessages(a),i["default"].sendConversationMessage(t,e)}if(r){let e=new S.A(r);i["default"].sendConversationMessage(t,e)}}))},forwardByCreateConversation(e,t,n,r){this.createConversation(t,(t=>{this.forwardMessage(e,[t],n,r)}),(e=>{console.error("createConversation error",e)}))},setShouldAutoScrollToBottom(e){ie.shouldAutoScrollToBottom=e},previewMedia(e,t,n,r=!0){ie.previewMediaItems.length=0,ie.previewMediaItems.push({src:e,thumb:t||"data:image/png;base64,"+n,autoplay:r}),ie.previewMediaIndex=0,console.log("preview media",ie.previewMediaItems,ie.previewMediaIndex)},previewMedias(e,t){ie.previewMediaItems.length=0,ie.previewMediaItems.push(...e),ie.previewMediaIndex=t,console.log("preview medias",ie.previewMediaItems,ie.previewMediaIndex)},playVoice(e){ie.currentVoiceMessage&&(ie.currentVoiceMessage._isPlaying=!1),ie.currentVoiceMessage=e},previewMessage(e,t){if(ie.previewMediaItems.length=0,ie.previewMediaIndex=0,t&&ie.currentConversationMessageList.length>0){let t,n=ie.currentConversationMessageList.filter((e=>[m["default"].Image,m["default"].Video].indexOf(e.messageContent.type)>-1));for(let r=0;r[m["default"].Image,m["default"].Video].indexOf(e.messageContent.type)>-1));for(let i=0;i{let t=e.type.indexOf("image")>=0,{thumbnail:n,width:r,height:i}=t?await(0,h.Of)(e):await(0,h.iO)(e);return n=n||T["default"].DEFAULT_THUMBNAIL_URL,n.length>6144&&(console.warn("generated thumbnail is too large, use default thumbnail",n.length),n=T["default"].DEFAULT_THUMBNAIL_URL),{url:"",type:t?"image":"video",thumbnail:n.split(",")[1],width:r,height:i,tmpFile:e}}))),r=new te.A(o,n)):(o=t.map((e=>({url:"",name:e.name,size:e.size,iv:e.type.indexOf("image")>=0||e.type.indexOf("video")>=0,tmpFile:e}))),r=new ne.A(o,n));let a=i["default"].insertMessage(e,r,y.A.Sending,!0),l=await Promise.all(o.map((e=>{let t=e.tmpFile;return new Promise(((n,r)=>{i["default"].uploadMedia(t.name,t,t.type.indexOf("image")>=0?p.A.Image:p.A.Video,(t=>{e.url=t,delete e.tmpFile,n(e)}),(t=>{n(e),console.error("upload file failed",f,t)}),((e,t)=>{}))}))})));r=s?new te.A(l,n):new ne.A(o,n),i["default"].updateMessageContent(a.messageId,r),a.messageContent=r,i["default"].sendSavedMessage(a,0,((e,t)=>{}),(e=>{console.log("send msg failed",e)}))},async sendFile(e,t){if(console.log("send file",t),t.size&&t.size>104857600&&(!i["default"].isSupportBigFilesUpload()||e.type===s["default"].SecretChat))return console.log("file too big, and not support upload big file"),!0;let n=null,r=null;"string"===typeof t?(t.startsWith("http")?r=t:n=t,t={path:t,name:t.substring(t.lastIndexOf("/")+1)}):n=t;let o=new v.A;o.conversation=e;let a,u=l.A.getMediaType(t.name.split(".").slice(-1).pop()),c={pic:p.A.Image,video:p.A.Video,doc:p.A.File}[u];switch(c){case p.A.Image:let{thumbnail:e,width:i,height:o}=await(0,h.Of)(t);e=e||T["default"].DEFAULT_THUMBNAIL_URL,console.log("image file",e.length,t),e.length>10240&&(console.warn("generated thumbnail is too large, use default thumbnail",e.length),e=T["default"].DEFAULT_THUMBNAIL_URL),a=new b.A(n,r,e.split(",")[1]),a.imageWidth=i,a.imageHeight=o;break;case p.A.Video:let s=await(0,h.iO)(t);if(s){let{thumbnail:e,width:i,height:o}=s,l=await(0,h.io)(t);l=Math.ceil(1e3*l),e.length>10240&&(console.warn("generated thumbnail is too large, use default thumbnail",e.length),e=T["default"].DEFAULT_THUMBNAIL_URL),a=new A.A(n,r,e.split(",")[1]);break}case p.A.File:default:a=new w.A(n,r);break}o.messageContent=a,i["default"].sendMessage(o,(e=>{o.messageId=e,console.log("sf, pr",e)}),((e,t)=>{let n=ie.sendingMessages.find((e=>e.messageId===o.messageId));n?(n.progress=e,n.total=t):ie.sendingMessages.push({messageId:o.messageId,progress:e,total:t})}),(e=>{console.log("sf s",e),ie.sendingMessages=ie.sendingMessages.filter((e=>e.messageId!==o.messageId))}),(e=>{console.log("sf e",e),ie.sendingMessages=ie.sendingMessages.filter((e=>e.messageId!==o.messageId))}))},quoteMessage(e){ie.quotedMessage=e,ie.currentConversationInfo._quotedMessage=e},getConversationInfo(e){let t=i["default"].getConversationInfo(e);return this._patchConversationInfo(t,!1)},getMessages(e,t=0,n=!0,r="",o){i["default"].getMessagesV2(e,t,n,20,r,(e=>{e=e.map((e=>this._patchMessage(e,0))),setTimeout((()=>o&&o(e)),200)}),(e=>{console.error("getMessageV2 error",e),o&&o([])}))},getMessageInTypes(e,t,n,r=!0,o="",s){i["default"].getMessagesByTimestampV2(e,t,n,r,20,o,(e=>{e=e.map((e=>this._patchMessage(e,0))),s&&s(e)}),(e=>{s&&s([])}))},_loadCurrentConversationMessages(){if(console.log("_loadCurrentConversationMessages"),!ie.currentConversationInfo)return;let e=ie.currentConversationInfo.conversation;i["default"].getMessagesV2(e,0,!0,20,"",(e=>{ie.currentConversationMessageList=e,this._patchCurrentConversationMessages(),e.length&&(ie.currentConversationOldestMessageId=e[0].messageId);for(let t=0;t{console.error("_loadCurrentConversationMessages error",e)}))},_patchCurrentConversationMessages(){let e=0,t=ie.currentConversationMessageList;t.forEach((t=>{this._patchMessage(t,e),e=t.timestamp}))},_onloadConversationMessages(e,t){if(!t||0===t.length)return!1;let n=!1,r=0,i=[];return t.forEach((e=>{let t=ie.currentConversationMessageList.findIndex((t=>t.messageId===e.messageId));-1===t&&(this._patchMessage(e,r),r=e.timestamp,i.push(e),n=!0)})),ie.currentConversationMessageList=i.concat(ie.currentConversationMessageList),n},loadConversationHistoryMessages(e,t,n=!0){if(!ie.currentConversationInfo)return;let r=ie.currentConversationInfo.conversation;console.log("loadConversationHistoryMessage",r,ie.currentConversationOldestMessageId,(0,a.stringValue)(ie.currentConversationOldestMessageUid));let o=()=>{i["default"].loadRemoteConversationMessages(r,[],ie.currentConversationOldestMessageUid,20,(n=>{if(console.log("loadRemoteConversationMessages response",n.length),0===n.length)t();else{if(r.equal(ie.currentConversationInfo.conversation)){let i=n.filter((e=>0!==e.messageId&&-1===ie.currentConversationMessageList.findIndex((t=>(0,a.eq)(t.messageUid,e.messageUid)))));if(0===i.length)return void t();ie.currentConversationOldestMessageUid=i[0].messageUid,this._onloadConversationMessages(r,i),e()}ie.currentConversationInfo.lastMessage||this._reloadConversation(r)}}),(e=>{t()}))};i["default"].getMessagesV2(r,ie.currentConversationOldestMessageId,!0,20,"",(i=>{if(i.length>0){if(!r.equal(ie.currentConversationInfo.conversation))return;ie.currentConversationOldestMessageId=i[0].messageId,(0,a.gt)(i[0].messageUid,0)&&(ie.currentConversationOldestMessageUid=i[0].messageUid),this._onloadConversationMessages(r,i),0===i.length?n?o():t():setTimeout((()=>e()),200)}else n?o():t()}),(e=>{t()}))},setConversationTop(e,t){i["default"].setConversationTop(e,t,(()=>{this._reloadConversation(e)}),(e=>{console.log("setConversationTop error",e)}))},setConversationSilent(e,t){i["default"].setConversationSlient(e,t,(()=>{this._reloadConversation(e)}),(e=>{console.log("setConversationSilent error",e)}))},removeConversation(e){i["default"].removeConversation(e,!1),ie.currentConversationInfo&&ie.currentConversationInfo.conversation.equal(e)&&this.setCurrentConversationInfo(null),ie.conversationInfoList=ie.conversationInfoList.filter((t=>!t.conversation.equal(e))),this.updateTray()},getMessageById(e){let t=i["default"].getMessageById(e);return t&&this._patchMessage(t,0),t},getMessageByUid(e){let t=i["default"].getMessageByUid(e);return t&&this._patchMessage(t,0),t},_patchMessage(e,t=0,n){if(e.conversation.type===s["default"].Single&&(e._from=n?n.get(e.from):i["default"].getUserInfo(e.from,!1,"")),!e._from||!e._from.updateDt){let t=i["default"].getUserInfo(e.from,!1,e.conversation.type===s["default"].Group?e.conversation.target:"");e._from=Object.assign({},t)}return e.conversation.type===s["default"].Group?e._from._displayName=i["default"].getGroupMemberDisplayNameEx(e._from):e._from._displayName=i["default"].getUserDisplayNameEx(e._from),e.conversation.type===s["default"].SecretChat&&e.messageContent instanceof U.A&&e.messageContent.remotePath&&e.messageContent.remotePath.startsWith("http")&&(e.messageContent.remotePath=`http://localhost:${T["default"].SECRET_CHAT_MEDIA_DECODE_SERVER_PORT}?target=${e.conversation.target}&url=${e.messageContent.remotePath}`),(0===t||(0,a.numberValue)(t)>0&&(0,a.numberValue)(e.timestamp)-(0,a.numberValue)(t)>3e5)&&(e._showTime=!0),e._timeStr=l.A.timeFormat(e.timestamp),e.messageContent instanceof R.A&&this._patchCompositeMessageContent(e.messageContent),e},_patchCompositeMessageContent(e){let t=e.messages;t.forEach((e=>{this._patchMessage(e,0)}))},_patchConversationInfo(e,t=!0,n,r){if(e.conversation.type===s["default"].Single)e.conversation._target=n?n.get(e.conversation.target):i["default"].getUserInfo(e.conversation.target,!1),e.conversation._target&&(e.conversation._target._displayName=i["default"].getUserDisplayNameEx(e.conversation._target));else if(e.conversation.type===s["default"].Group)e.conversation._target=r?r.get(e.conversation.target):i["default"].getGroupInfo(e.conversation.target,!1),e.conversation._target&&(e.conversation._target._isFav=i["default"].isFavGroup(e.conversation.target),e.conversation._target._displayName=e.conversation._target.remark?e.conversation._target.remark:e.conversation._target.name);else if(e.conversation.type===s["default"].Channel)e.conversation._target=i["default"].getChannelInfo(e.conversation.target,!1),e.conversation._target._displayName=e.conversation._target.name;else if(e.conversation.type===s["default"].SecretChat){let t=i["default"].getSecretChatInfo(e.conversation.target);if(t){let n=t.userId,r=i["default"].getUserInfo(n,!1);e.conversation._target=r,e.conversation._target._displayName=i["default"].getUserDisplayNameEx(r)}else e.conversation._target={}}else e.conversation.type===s["default"].ChatRoom&&i["default"].getChatroomInfo(e.conversation.target,0,(t=>{e.conversation._target=t}),(t=>{console.log("get chatRoomInfo error",t),e.conversation._target={}}));return(0,a.gt)(e.timestamp,0)?e._timeStr=l.A.dateFormat(e.timestamp):e._timeStr="",!t||!e.lastMessage||void 0===e.lastMessage.conversation||e.lastMessage._from&&e.lastMessage._from.updateDt||this._patchMessage(e.lastMessage,0,n),e.unreadCount&&(e._unread=e.unreadCount.unread+e.unreadCount.unreadMention+e.unreadCount.unreadMentionAll),e.conversation.equal(j["default"].conversation)?e._isVoipOngoing=!0:e._isVoipOngoing=!1,e},addDownloadingMessage(e){ie.downloadingMessages.push({messageUid:e,progress:0,total:Number.MAX_SAFE_INTEGER}),console.log("add downloading")},isDownloadingMessage(e){return!!(0,M.isElectron)()&&ie.downloadingMessages.findIndex((t=>(0,a.eq)(t.messageUid,e)))>=0},isSendingMessage(e){return ie.sendingMessages.has(e)},getDownloadingMessageStatus(e){return ie.downloadingMessages.find((t=>(0,a.eq)(t.messageUid,e)))},getSendingStatus(e){return ie.sendingMessages.find((t=>t.messageId===e))},addFloatingConversation(e){ie.floatingConversations.push(e)},removeFloatingConversation(e){ie.floatingConversations=ie.floatingConversations.filter((t=>!t.equal(e)))},isConversationInCurrentWindow(e){if(le.isMainWindow){let t=ie.floatingConversations.findIndex((t=>t.equal(e)));return-1===t}return ie.currentConversationInfo&&ie.currentConversationInfo.conversation.equal(e)},_loadSelfUserInfo(){oe.selfUserInfo=i["default"].getUserInfo(i["default"].getUserId(),!1)},_loadFriendList(){let e=i["default"].getMyFriendList(!1),t=e.indexOf(T["default"].FILE_HELPER_ID);if(t<0&&T["default"].FILE_HELPER_ID&&e.push(T["default"].FILE_HELPER_ID),e&&e.length>0){let t=i["default"].getUserInfos(e,"");oe.friendList=this._patchAndSortUserInfos(t,"")}},getUserOnlineState(e){let t=le.userOnlineStateMap.get(e);return t?t.desc():""},_patchCurrentConversationOnlineStatus(){let e=ie.currentConversationInfo;e&&e.conversation.type===s["default"].Single&&(ie.currentConversationInfo.conversation._targetOnlineStateDesc=this.getUserOnlineState(e.conversation.target))},_loadFriendRequest(){let e=i["default"].getIncommingFriendRequest();e.sort(((e,t)=>(0,a.numberValue)(t.timestamp)-(0,a.numberValue)(e.timestamp))),e=e.length>=20?e.slice(0,20):e;let t=[];e.forEach((e=>{t.push(e.target)}));let n=i["default"].getUserInfos(t,"");e.forEach((e=>{let t=n.find((t=>t.uid===e.target));e._target=t})),oe.friendRequestList=e,oe.unreadFriendRequestCount=i["default"].getUnreadFriendRequestCount()},_patchAndSortUserInfos(e,t="",n){return e=e.map((e=>{t?(e._displayName=i["default"].getGroupMemberDisplayNameEx(e),e._displayNameIgnoreFriendAlias=i["default"].getGroupMemberDisplayNameEx(e,!0)):e._displayName=i["default"].getUserDisplayNameEx(e),e._pinyin=c()(e._displayName,{style:0}).join("").trim().toLowerCase();let n=e._pinyin[0];return e.__sortPinyin=n>="a"&&n<="z"?"a"+e._pinyin:"z"+e._pinyin,e._firstLetters=c()(e._displayName,{style:4}).join("").trim().toLowerCase(),e})),e=n?e.sort(n):e.sort(((e,t)=>e.__sortPinyin.localeCompare(t.__sortPinyin))),e.forEach((e=>{let t=e.__sortPinyin[1];e._category=t>="a"&&t<="z"?t:"#",e._userOnlineStatusDesc=this.getUserOnlineState(e.uid)})),e},_loadFavGroupList(){oe.favGroupList=i["default"].getFavGroupList()},_loadChannelList(){i["default"].getRemoteListenedChannels((e=>{e&&(oe.channelList=e.map((e=>i["default"].getChannelInfo(e,!1))),oe.channelList=oe.channelList.filter((e=>!(e instanceof q.A))))}),(e=>{console.error("getRemoteListenedChannels error",e)}))},_loadFavContactList(){let e=i["default"].getFavUsers();e.length>0?(oe.favContactList=this.getUserInfos(e,""),oe.favContactList.forEach((e=>{e._category="☆ 星标朋友"}))):oe.favContactList=[]},reloadFavGroupList(){this._loadFavGroupList()},setCurrentFriendRequest(e){oe.currentFriendRequest=e,oe.currentFriend=null,oe.currentOrganization=null,oe.currentChatroom=null,oe.currentGroup=null,oe.currentChannel=null,oe.currentExternalDomain=null},setCurrentFriend(e){oe.currentFriendRequest=null,oe.currentFriend=e,oe.currentOrganization=null,oe.currentChatroom=null,oe.currentGroup=null,oe.currentChannel=null,oe.currentExternalDomain=null},setCurrentGroup(e){oe.currentFriendRequest=null,oe.currentFriend=null,oe.currentOrganization=null,oe.currentChatroom=null,oe.currentGroup=e,oe.currentChannel=null,oe.currentExternalDomain=null},setCurrentChannel(e){oe.currentFriendRequest=null,oe.currentFriend=null,oe.currentOrganization=null,oe.currentChatroom=null,oe.currentGroup=null,oe.currentChannel=e,oe.currentExternalDomain=null},setCurrentOrganization(e){oe.currentFriendRequest=null,oe.currentFriend=null,oe.currentGroup=null,oe.currentChannel=null,oe.currentChatroom=null,oe.currentOrganization=e,oe.currentExternalDomain=null},setCurrentExternalDomain(e){oe.currentFriendRequest=null,oe.currentFriend=null,oe.currentGroup=null,oe.currentChannel=null,oe.currentChatroom=null,oe.currentOrganization=null,oe.currentExternalDomain=e},setCurrentChatroom(e){oe.currentFriendRequest=null,oe.currentFriend=null,oe.currentGroup=null,oe.currentChannel=null,oe.currentOrganization=null,oe.currentChatroom=e,oe.currentExternalDomain=null},toggleGroupList(){oe.expandGroup=!oe.expandGroup},toggleChannelList(){oe.expandChanel=!oe.expandChanel},toggleFriendRequestList(){oe.expandFriendRequestList=!oe.expandFriendRequestList},toggleFriendList(){oe.expandFriendList=!oe.expandFriendList},toggleOrganizationList(){oe.expandOrganization=!oe.expandOrganization},toggleExternalDomainList(){oe.expandExternalDomain=!oe.expandExternalDomain},toggleChatroom(){oe.expandChatroom=!oe.expandChatroom},hideSearchView(){se.query=""},setSearchQuery(e){se.query=e,e?(console.log("search",e),se.searchDomainInfo?this.searchUser(e,se.searchDomainInfo.domainId):(se.contactSearchResult=this.filterContact(e),se.groupSearchResult=this.filterGroupConversation(e),se.conversationSearchResult=this.filterConversation(e),this.searchUser(e),this.searchChannel(e))):se._reset()},setSearchDomainInfo(e){se.searchDomainInfo=e},searchUser(e,t=""){console.log("search user",e),i["default"].searchUserEx(t,e,x.General,0,((t,n)=>{console.log("search user result",e,n),se.query===t&&(se.userSearchResult=n.filter((e=>!i["default"].isMyFriend(e.uid))))}),(t=>{console.log("search user error",e,t),se.query===e&&(se.userSearchResult=[])}))},searchChannel(e){console.log("search channel"),i["default"].searchChannel(e,!0,((e,t)=>{console.log("search channel result",t),se.query===e&&(console.log("search channel result",t),se.channelSearchResult=t)}),(t=>{console.log("search channel error",e,t),se.query===e&&(se.channelSearchResult=[])}))},filterContact(e){let t=oe.friendList.filter((t=>t._displayName.indexOf(e)>-1||t._firstLetters.indexOf(e.toLowerCase())>-1||t._pinyin.indexOf(e.toLowerCase())>-1));return console.log("friend searchResult",t),t},searchFiles(e,t,n,r){e&&i["default"].searchFiles(e,null,"",t,0,20,(e=>{this._patchFileRecords(e),n&&n(e)}),(e=>{console.log("search file error",e),r&&r(e)}))},filterUsers(e,t){if(!e||!t||!t.trim())return e;let n=c()(t,{style:0}).join("").trim().toLowerCase(),r=e.filter((e=>e._displayName.indexOf(t)>-1||e._displayName.indexOf(n)>-1||e._pinyin.indexOf(t)>-1||e._pinyin.indexOf(n)>-1||e._firstLetters.indexOf(t)>-1||e._firstLetters.indexOf(n)>-1));return r},filterFavGroup(e){console.log("to search group",oe.favGroupList);let t=c()(e,{style:0}).join("").trim().toLowerCase(),n=oe.favGroupList.filter((n=>{let r=c()(n.name,{style:0}).join("").trim().toLowerCase();return n.name.indexOf(e)>-1||n.name.indexOf(t)>-1||r.indexOf(e)>-1||r.indexOf(t)>-1}));return console.log("group searchResult",n),n},filterConversation(e){return ie.conversationInfoList.filter((t=>{let n=c()(t.conversation._target._displayName,{style:0}).join("").trim().toLowerCase(),r=c()(t.conversation._target._displayName,{style:4}).join("").trim().toLowerCase();return t.conversation._target._displayName.indexOf(e)>-1||n.indexOf(e.toLowerCase())>-1||r.indexOf(e)>-1}))},filterGroupConversation(e){let t=i["default"].searchGroups(e);return t.map((e=>e.groupInfo))},searchMessage(e,t){let n=i["default"].searchMessage(e,t);return n=n.reverse(),n.map((e=>this._patchMessage(e,0)))},searchMessageInTypes(e,t,n,r){let o=i["default"].searchMessageByTypes(e,n,t,!0,20,r);return o.map((e=>this._patchMessage(e,0)))},searchConversation(e,t=[0,1,2],n=[0,1,2]){let r=i["default"].searchConversation(e,t,n);return r.map((e=>{let t=i["default"].getConversationInfo(e.conversation);return e._conversationInfo=this._patchConversationInfo(t,!1),e}))},pickOrUnpickUser(e){let t=ae.users.findIndex((t=>t.uid===e.uid));t>=0?ae.users=ae.users.filter((t=>e.uid!==t.uid)):ae.users.push(e)},isUserPicked(e){let t=ae.users.findIndex((t=>t.uid===e.uid));return t>=0},pickOrUnpickOrganization(e){let t=ae.organizations.findIndex((t=>t.id===e.id));t>=0?ae.organizations=ae.organizations.filter((t=>t.id!==e.id)):ae.organizations.push(e)},isOrganizationPicked(e){let t=ae.organizations.findIndex((t=>t.id===e.id));return t>=0},pickOrUnpickConversation(e){let t=ae.conversations.findIndex((t=>e.target===t.target&&e.line===t.line&&e.type===t.type));t>=0?ae.conversations=ae.conversations.filter((t=>!(e.target===t.target&&e.line===t.line&&e.type===t.type))):ae.conversations.push(e)},createConversation(e,t,n){if(1===e.length){let n=new g.A(s["default"].Single,e[0].uid,0);return this.setCurrentConversation(n),void(t&&t(n))}let r=oe.selfUserInfo.displayName,o=[];for(let i=0;i{let n=new g.A(s["default"].Group,e,0);this.setCurrentConversation(n),t&&t(n)}),(e=>{console.log("create group error",e),n&&n(e)}))},_loadUserLocalSettings(){let e=i["default"].getUserId(),t=(0,L.Gq)(e+"-notification");le.enableNotification=null===t||"1"===t,t=(0,L.Gq)(e+"-notificationDetail"),le.enableNotificationMessageDetail=null===t||"1"===t,le.enableCloseWindowToExit="1"===(0,L.Gq)(e+"-closeWindowToExit"),le.enableAutoLogin="1"===(0,L.Gq)(e+"-autoLogin"),t=(0,L.Gq)("minimizable"),le.enableMinimize=null===t||"1"===t},setEnableNotification(e){le.enableNotification=e,(0,L.SO)(oe.selfUserInfo.uid+"-notification",e?"1":"0")},setEnableMinimize(e){le.enableMinimize=e,(0,L.SO)("minimizable",e?"1":"0"),M.currentWindow.minimizable=e},setEnableNotificationDetail(e){le.enableNotificationMessageDetail=e,(0,L.SO)(oe.selfUserInfo.uid+"-notificationDetail",e?"1":"0")},setEnableCloseWindowToExit(e){le.enableCloseWindowToExit=e,(0,L.SO)(oe.selfUserInfo.uid+"-closeWindowToExit",e?"1":"0"),M.ipcRenderer.send(Y().ENABLE_CLOSE_WINDOW_TO_EXIT,e)},setEnableAutoLogin(e){le.enableAutoLogin=e,(0,L.SO)(oe.selfUserInfo.uid+"-autoLogin",e?"1":"0")},getUserInfos(e,t){let n=i["default"].getUserInfos(e,t),r=n.map((e=>Object.assign({},e)));return this._patchAndSortUserInfos(r,t)},getGroupMemberUserInfos(e,t=!0,n=!1){let r=i["default"].getGroupMemberIds(e),o=i["default"].getUserInfos(r,e);t||(o=o.filter((e=>e.uid!==i["default"].getUserId())));let s=o.map((e=>Object.assign({},e)));if(n)return this._patchAndSortUserInfos(s,e);{let t=(e,t)=>{let n=r.findIndex((t=>t===e.uid)),i=r.findIndex((e=>e===t.uid));return n-i};return this._patchAndSortUserInfos(s,e,t)}},getConversationMemberUsrInfos(e){let t=[];if(0===e.type){e.target!==oe.selfUserInfo.uid&&t.push(i["default"].getUserInfo(i["default"].getUserId(),!1)),t.push(i["default"].getUserInfo(e.target,!1));let n=t.map((e=>Object.assign({},e)));t=this._patchAndSortUserInfos(n,"")}else 1===e.type&&(t=this.getGroupMemberUserInfos(e.target,!0));return t},getMyFileRecords(e,t,n,r){n&&i["default"].getMyFileRecords(e,0,t,(e=>{this._patchFileRecords(e),n(e)}),r)},getConversationFileRecords(e,t,n,r,o,s){i["default"].getConversationFileRecords(e,t,n,0,r,(e=>{this._patchFileRecords(e),o(e)}),s)},deleteFriend(e){i["default"].deleteFriend(e,(()=>{let t=new g.A(s["default"].Single,e,0);i["default"].removeConversation(t,!0),ie.conversationInfoList=ie.conversationInfoList.filter((e=>!e.conversation.equal(t)))}),(e=>{console.log("deleteFriend error",e)}))},_patchFileRecords(e){e.forEach((e=>{let t=1===e.conversation.type?e.conversation.target:"";e._userDisplayName=t?i["default"].getGroupMemberDisplayName(t,e.userId):i["default"].getUserDisplayName(e.userId);let n=i["default"].getConversationInfo(e.conversation);this._patchConversationInfo(n,!1),0===e.conversation.type?e._conversationDisplayName="与"+n.conversation._target._displayName+"的聊天":e._conversationDisplayName=n.conversation._target._displayName,0===e.name.indexOf(w.A.FILE_NAME_PREFIX)&&(e.name=e.name.substring(e.name.indexOf(w.A.FILE_NAME_PREFIX)+w.A.FILE_NAME_PREFIX.length)),e._timeStr=l.A.dateFormat(e.timestamp),e._sizeStr=l.A.humanSize(e.size),e._fileIconName=l.A.getFiletypeIcon(e.name.substring(e.name.lastIndexOf(".")))}))},setPageVisibility(e){le.isPageHidden=!e,e?ie.currentConversationInfo&&(ie.shouldAutoScrollToBottom=!0):ie.shouldAutoScrollToBottom=!1},clearConversationUnreadStatus(e){let t=i["default"].getConversationInfo(e);t&&t.unreadCount.unread+t.unreadCount.unreadMention+t.unreadCount.unreadMentionAll>0&&(i["default"].clearConversationUnreadStatus(e),this.updateTray())},clearAllUnreadStatus(){i["default"].clearAllUnreadStatus(),ie.conversationInfoList.forEach((e=>{e.unreadCount=new B.A})),this.updateTray()},notify(e){let t,r=e.messageContent,i=n(6472),o=(new Date).getTime();if(!(this._lastNotificationTime&&o-this._lastNotificationTime<4e3)&&(this._lastNotificationTime=o,0!==e.direction&&k.A.getMessageContentPersitFlag(r.type)===C["default"].Persist_And_Count)){if(e.status!==y.A.AllMentioned&&e.status!==y.A.Mentioned){let n=!1;for(const t of ie.conversationInfoList)if(t.conversation.equal(e.conversation)){n=t.isSilent;break}if(n)return;t="新消息来了"}else t="有人@你";I().create(t,{body:le.enableNotificationMessageDetail?r.digest(e):"",icon:i,timeout:4e3,requireInteraction:!0,onClick:()=>{(0,M.isElectron)()?M.ipcRenderer.send(Y().CLICK_NOTIFICATION,M.currentWindow.getMediaSourceId()):(window.focus(),this.close()),this.setCurrentConversation(e.conversation)}}).catch((e=>{console.error("Please enable notification")}))}},updateTray(){if(!(0,M.isElectron)()||!le.isMainWindow)return;let e=0;ie.conversationInfoList.forEach((t=>{if(t.isSilent)return;let n=t.unreadCount;e+=n.unread})),"linux"===re.platform?(this.updateLinuxTitle(e),M.ipcRenderer.send(Y().UPDATE_BADGE,e)):M.ipcRenderer.send(Y().UPDATE_BADGE,e)},updateLinuxTitle(e){this.updateLinuxTitle.title="野火IM",this.updateLinuxTitle.unreadCount=e,this.updateLinuxTitle.showTitle=!0,le.linuxUpdateTitleInterval||(le.linuxUpdateTitleInterval=setInterval((()=>{this.updateLinuxTitle.showTitle||this.updateLinuxTitle.unreadCount<1?document.title=this.updateLinuxTitle.title:document.title=this.updateLinuxTitle.title+" "+this.updateLinuxTitle.unreadCount,this.updateLinuxTitle.showTitle=!this.updateLinuxTitle.showTitle}),1e3))},updateVoipStatus(e,t){le.isVoipOngoing=t,e&&ie.conversationInfoList.forEach((n=>{n.conversation.equal(e)?n._isVoipOngoing=t:n._isVoipOngoing=!1}))},_filterForwardMessageContent(e){let t=e.messageContent;return t instanceof $["default"]?t=new S.A(t.digest(e)):t instanceof ee.A&&(t=new S.A(t.digest(e)+" "+t.duration+"''")),t}};function ce(){ie._reset(),oe._reset(),se._reset(),ae._reset(),le._reset()}window.__store=ue,window.stringValue=a.stringValue,window.longValue=a.longValue;var de=ue},2844:function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r=n(1114),i=(n(8992),n(3949),n(881)),o=n(9833),s=n(7451);class a extends s["default"]{constructor(e){super(o.A.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST),(0,r.A)(this,"content",void 0),this.content=e}digest(){return this.content}encode(){let e=super.encode();return e.searchableContent=this.content,e}decode(e){super.decode(e),this.content=e.searchableContent}}var l=n(3960);class u extends l.A{constructor(e){super(o.A.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST_NOTIFICATION),(0,r.A)(this,"tip",""),this.tip=e}formatNotification(){return this.tip}digest(){return this.tip}encode(){let e=super.encode();return e.content=this.tip,e}decode(e){super.decode(e),this.tip=e.content}}var c=n(9326),d=n(3593);class h{static getMessageContentClazz(e){for(const t of h.CustomMessageContents)if(t.type===e)return t.contentClazz?t.contentClazz:d.A}static registerCustomMessages(){h.CustomMessageContents.forEach((e=>{c["default"].registerMessageContent(e.name,e.flag,e.type,e.contentClazz)}))}}(0,r.A)(h,"CustomMessageContents",[{name:"testCustomMessage",flag:i["default"].Persist,type:o.A.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST,contentClazz:a},{name:"testCustomNotificationMessage",flag:i["default"].Persist,type:o.A.MESSAGE_CONTENT_TYPE_CUSTOM_MESSAGE_TEST_NOTIFICATION,contentClazz:u}])},2909:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});var r=n(1114),i=n(7451),o=n(6643);class s extends i["default"]{constructor(e){super(o["default"].Unknown),(0,r.A)(this,"originalPayload",void 0),this.originalPayload=e}encode(){return this.originalPayload}decode(e){this.originalPayload=e}digest(){return"未知类型消息"}}},3019:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Ay:function(){return __webpack_exports__default}});var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4114),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(6573),core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(8100),core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(7936),core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(9479),core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(7467),core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4732),core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(9577),core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(8992),core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_esnext_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_8__),core_js_modules_esnext_iterator_drop_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(4743),core_js_modules_esnext_iterator_drop_js__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(core_js_modules_esnext_iterator_drop_js__WEBPACK_IMPORTED_MODULE_9__),core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(4520),core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(core_js_modules_esnext_iterator_filter_js__WEBPACK_IMPORTED_MODULE_10__),core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(2577),core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(core_js_modules_esnext_iterator_find_js__WEBPACK_IMPORTED_MODULE_11__),core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(3949),core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(core_js_modules_esnext_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_12__),core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(1454),core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(core_js_modules_esnext_iterator_map_js__WEBPACK_IMPORTED_MODULE_13__),core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(8872),core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_14___default=__webpack_require__.n(core_js_modules_esnext_iterator_reduce_js__WEBPACK_IMPORTED_MODULE_14__),core_js_modules_esnext_iterator_to_array_js__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(1795),core_js_modules_esnext_iterator_to_array_js__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(core_js_modules_esnext_iterator_to_array_js__WEBPACK_IMPORTED_MODULE_15__),core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(4979),core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_16___default=__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_16__),core_js_modules_web_immediate_js__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(9848),core_js_modules_web_immediate_js__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(core_js_modules_web_immediate_js__WEBPACK_IMPORTED_MODULE_17__),_config__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(2169),_wfc_util_base64_min__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(6438),_wfc_util_base64_min__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_wfc_util_base64_min__WEBPACK_IMPORTED_MODULE_19__),_client_connectionStatus__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(8108),_client_errorCode__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(1539),_client_messageConfig__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(7386),_client_userSettingScope__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(2489),_client_wfcEvent__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(6756),_messages_compositeMessageContent__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(3924),_messages_markUnreadMessageContent__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(4025),_messages_mediaMessageContent__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(503),_messages_message__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(1456),_messages_messageContentType__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(6643),_messages_messageStatus__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(3830),_messages_notification_recallMessageNotification__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(9860),_messages_persistFlag__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(881),_model_NullChannelInfo__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(584),_model_channelInfo__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(231),_model_channelMenu__WEBPACK_IMPORTED_MODULE_50__=__webpack_require__(3704),_model_chatRoomInfo__WEBPACK_IMPORTED_MODULE_51__=__webpack_require__(4311),_model_chatRoomMemberInfo__WEBPACK_IMPORTED_MODULE_52__=__webpack_require__(9681),_model_conversation__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(6089),_model_conversationInfo__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(4593),_model_conversationType__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(7273),_model_domainInfo__WEBPACK_IMPORTED_MODULE_53__=__webpack_require__(3370),_model_fileRecord__WEBPACK_IMPORTED_MODULE_54__=__webpack_require__(5285),_model_friend__WEBPACK_IMPORTED_MODULE_55__=__webpack_require__(6686),_model_friendRequest__WEBPACK_IMPORTED_MODULE_56__=__webpack_require__(8197),_model_groupInfo__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(9687),_model_groupMember__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(7161),_model_groupMemberType__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(5481),_model_groupSearchResult__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(3946),_model_internal_friendInfo__WEBPACK_IMPORTED_MODULE_57__=__webpack_require__(1449),_model_nullDomainInfo__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(1784),_model_nullGroupInfo__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(9440),_model_nullUserInfo__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(8032),_model_readEntry__WEBPACK_IMPORTED_MODULE_58__=__webpack_require__(6680),_model_unreadCount__WEBPACK_IMPORTED_MODULE_59__=__webpack_require__(2202),_model_userClientState__WEBPACK_IMPORTED_MODULE_60__=__webpack_require__(5125),_model_userCustomState__WEBPACK_IMPORTED_MODULE_61__=__webpack_require__(9165),_model_userInfo__WEBPACK_IMPORTED_MODULE_62__=__webpack_require__(4229),_model_userOnlineState__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(1946),_model_userSettingEntry__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__(7217),_util_deep_assign_min__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__(5345),_util_longUtil__WEBPACK_IMPORTED_MODULE_48__=__webpack_require__(3437),_util_mime__WEBPACK_IMPORTED_MODULE_49__=__webpack_require__(3839),__webpack_modules__={6392:(e,t,n)=>{var r=n(4132),i=a(n(696)),o=a(n(6212)),s=a(n(9708));function a(e){return e&&e.__esModule?e:{default:e}}var l=n(4936),u=n(3792),c=n(2300),d=n(9496).Writable,h=n(8248),f=n(6732),p=n(5440),g=n(9707),m=n.g.setImmediate||function(e){r.nextTick(e)},y={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0},v={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};function b(e,t,n){e.emit("packetsend",t),!c.writeToStream(t,e.stream,e.options)&&n?e.stream.once("drain",n):n&&n()}function A(e){e&&(0,s.default)(e).forEach((function(t){"function"==typeof e[t]&&(e[t](new Error("Connection closed")),delete e[t])}))}function w(e,t,n,r){e.outgoingStore.put(t,(function(i){if(i)return n&&n(i);r(),b(e,t,n)}))}function _(){}function I(e,t){var n,r=this;if(!(this instanceof I))return new I(e,t);for(n in this.options=t||{},y)void 0===this.options[n]?this.options[n]=y[n]:this.options[n]=t[n];this.options.clientId="string"==typeof t.clientId?t.clientId:"mqttjs_"+Math.random().toString(16).substr(2,8),this.options.customHandleAcks=5===t.protocolVersion&&t.customHandleAcks?t.customHandleAcks:function(){arguments[3](0)},this.streamBuilder=e,this.outgoingStore=t.outgoingStore||new u,this.incomingStore=t.incomingStore||new u,this.queueQoSZero=void 0===t.queueQoSZero||t.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.pingTimer=null,this.connected=!1,this.disconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this.nextId=Math.max(1,Math.floor(65535*Math.random())),this.outgoing={},this._firstConnection=!0,this.on("close",(function(){this.connected=!1,clearTimeout(this.connackTimer)})),this.on("connect",(function(){var e=this.queue;!function t(){var n,i=e.shift();i&&(n=i.packet,r._sendPacket(n,(function(e){i.cb&&i.cb(e),t()})))}()})),this.on("close",(function(){null!==r.pingTimer&&(r.pingTimer.clear(),r.pingTimer=null)})),l.EventEmitter.call(this),this._setupStream()}h(I,l.EventEmitter),I.prototype._setupStream=function(){var e,t=this,n=new d,s=c.parser(this.options),a=null,l=[];function u(){if(l.length)r.nextTick(h);else{var e=a;a=null,e()}}function h(){var e=l.shift();if(e)t._handlePacket(e,u);else{var n=a;a=null,n&&n()}}if(this._clearReconnect(),this.stream=this.streamBuilder(this),s.on("packet",(function(e){l.push(e)})),n._write=function(e,t,n){a=n,s.parse(e),h()},this.stream.pipe(n),this.stream.on("error",_),this.stream.on("close",(function(){t.emit("close")})),(e=(0,o.default)(this.options)).cmd="connect",b(this,e),s.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.emit("error",new Error("Packet has no Authentication Method")),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"===(0,i.default)(this.options.authPacket)&&b(this,g({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){t._cleanUp(!0)}),this.options.connectTimeout)},I.prototype._handlePacket=function(e,t){var n=this.options;if(5===n.protocolVersion&&n.properties&&n.properties.maximumPacketSize&&n.properties.maximumPacketSizeo.properties.topicAliasMaximum||!o.properties.topicAliasMaximum&&n.properties.topicAlias))&&delete i.properties.topicAlias),n.qos){case 1:case 2:this.outgoing[i.messageId]=r||_,this._storeProcessing?(this._packetIdsDuringStoreProcessing[i.messageId]=!1,this._storePacket(i,void 0,n.cbStorePut)):this._sendPacket(i,void 0,n.cbStorePut);break;default:this._storeProcessing?this._storePacket(i,r,n.cbStorePut):this._sendPacket(i,r,n.cbStorePut)}return this},I.prototype.subscribe=function(){for(var e,t=new Array(arguments.length),n=0;n0){var t={qos:e.qos};5===d&&(t.nl=e.nl||!1,t.rap=e.rap||!1,t.rh=e.rh||0,t.properties=e.properties),c._resubscribeTopics[e.topic]=t,f.push(e.topic)}})),c.messageIdToTopic[e.messageId]=f}return this.outgoing[e.messageId]=function(e,t){if(!e)for(var n=t.granted,r=0;r0?this.once("outgoingEmpty",setTimeout.bind(null,a,10)):a()),this},I.prototype.removeOutgoingMessage=function(e){var t=this.outgoing[e];return delete this.outgoing[e],this.outgoingStore.del({messageId:e},(function(){t(new Error("Message removed"))})),this},I.prototype.reconnect=function(e){var t=this,n=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new u,t.outgoingStore=t.options.outgoingStore||new u,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=n:n(),this},I.prototype._reconnect=function(){this.emit("reconnect"),this._setupStream()},I.prototype._setupReconnect=function(){var e=this;!e.disconnecting&&!e.reconnectTimer&&e.options.reconnectPeriod>0&&(this.reconnecting||(this.emit("offline"),this.reconnecting=!0),e.reconnectTimer=setInterval((function(){e._reconnect()}),e.options.reconnectPeriod))},I.prototype._clearReconnect=function(){this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},I.prototype._cleanUp=function(e,t){var n=arguments[2];if(t&&this.stream.on("close",t),e)0===this.options.reconnectPeriod&&this.options.clean&&A(this.outgoing),this.stream.destroy();else{var r=g({cmd:"disconnect"},n);this._sendPacket(r,m.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(this.pingTimer.clear(),this.pingTimer=null),t&&!this.connected&&(this.stream.removeListener("close",t),t())},I.prototype._sendPacket=function(e,t,n){if(n=n||_,this.connected){switch(this._shiftPingInterval(),e.cmd){case"publish":break;case"pubrel":return void w(this,e,t,n);default:return void b(this,e,t)}switch(e.qos){case 2:case 1:w(this,e,t,n);break;default:b(this,e,t)}}else this._storePacket(e,t,n)},I.prototype._storePacket=function(e,t,n){n=n||_,0===(e.qos||0)&&this.queueQoSZero||"publish"!==e.cmd?this.queue.push({packet:e,cb:t}):e.qos>0?(t=this.outgoing[e.messageId],this.outgoingStore.put(e,(function(e){if(e)return t&&t(e);n()}))):t&&t(new Error("No connection to broker"))},I.prototype._setupPingTimer=function(){var e=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=f((function(){e._checkPing()}),1e3*this.options.keepalive))},I.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},I.prototype._checkPing=function(){this.pingResp?(this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):this._cleanUp(!0)},I.prototype._handlePingresp=function(){this.pingResp=!0,this.emit("pingresp",(new Date).getTime())},I.prototype._handleConnack=function(e){var t=this.options,n=5===t.protocolVersion?e.reasonCode:e.returnCode;if(clearTimeout(this.connackTimer),e.properties&&(e.properties.topicAliasMaximum&&(t.properties||(t.properties={}),t.properties.topicAliasMaximum=e.properties.topicAliasMaximum),e.properties.serverKeepAlive&&t.keepalive&&(t.keepalive=e.properties.serverKeepAlive,this._shiftPingInterval()),e.properties.maximumPacketSize&&(t.properties||(t.properties={}),t.properties.maximumPacketSize=e.properties.maximumPacketSize)),0===n)this.reconnecting=!1,this._onConnect(e);else if(n>0){var r=new Error("Connection refused: "+v[n]);r.code=n,this.emit("error",r)}},I.prototype._handlePublish=function(e,t){t=void 0!==t?t:_;var n=e.topic.toString(),r=e.payload,i=e.qos,o=e.messageId,s=this,a=this.options,l=[0,16,128,131,135,144,145,151,153];switch(i){case 2:a.customHandleAcks(n,r,e,(function(n,r){return n instanceof Error||(r=n,n=null),n?s.emit("error",n):-1===l.indexOf(r)?s.emit("error",new Error("Wrong reason code for pubrec")):void(r?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:r},t):s.incomingStore.put(e,(function(){s._sendPacket({cmd:"pubrec",messageId:o},t)})))}));break;case 1:a.customHandleAcks(n,r,e,(function(i,a){return i instanceof Error||(a=i,i=null),i?s.emit("error",i):-1===l.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",n,r,e),void s.handleMessage(e,(function(e){if(e)return t&&t(e);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},t)})))}));break;case 0:this.emit("message",n,r,e),this.handleMessage(e,t)}},I.prototype.handleMessage=function(e,t){t()},I.prototype._handleAck=function(e){var t,n=e.messageId,r=e.cmd,i=null,o=this.outgoing[n],a=this;if(o){switch(r){case"pubcomp":case"puback":var l=e.reasonCode;l&&l>0&&16!==l&&10!==l?((t=new Error("Publish error: "+v[l])).code=l,o(t,e)):l&&10===l&&o(null,e),delete this.outgoing[n],this.outgoingStore.del(e,o);break;case"pubrec":i={cmd:"pubrel",qos:2,messageId:n};var u=e.reasonCode;u&&u>0&&16!==u?((t=new Error("Publish error: "+v[u])).code=u,o(t,e)):this._sendPacket(i);break;case"suback":delete this.outgoing[n];for(var c=0;c0)if(this.options.resubscribe)if(5===this.options.protocolVersion)for(var n=0;n{var r,i,o,s=n(3296).Buffer,a=n(9496).Transform,l=n(7491),u=n(5704),c=!1;e.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");var n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);var d=function(e,t){var n="alis"===e.protocol?"wss":"ws",r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}(t,e);return(r=t.my).connectSocket({url:d,protocols:n}),i=function(){var e=new a;return e._write=function(e,t,n){r.sendSocketMessage({data:e.buffer,success:function(){n()},fail:function(){n(new Error)}})},e._flush=function(e){r.closeSocket({success:function(){e()}})},e}(),o=l.obj(),c||(c=!0,r.onSocketOpen((function(){o.setReadable(i),o.setWritable(i),o.emit("connect")})),r.onSocketMessage((function(e){if("string"==typeof e.data){var t=u.toByteArray(e.data),n=s.from(t);i.push(n)}else{var r=new FileReader;r.addEventListener("load",(function(){var e=r.result;e=e instanceof ArrayBuffer?s.from(e):s.from(e,"utf8"),i.push(e)})),r.readAsArrayBuffer(e.data)}})),r.onSocketClose((function(){o.end(),o.destroy()})),r.onSocketError((function(e){o.destroy(e)}))),o}},9824:(e,t,n)=>{var r=n(4132),i=n(3296).Buffer,o=l(n(696)),s=n(9444),a=l(n(2816));function l(e){return e&&e.__esModule?e:{default:e}}var u=n(6392),c=n(3792),d=n(4776),h=n(9707),f={},p="testim.baibaodun.com.cn",g="web_12345678",m="3d1e71b110bdb090216f5b2909d7492bb0e487a2";function y(e,t,r,o,l){!function(e,t,r,o,l){var u=void 0,c=l&&l.backupHost&&2===l.backupAddressStrategy?l.backupHost:"testim.baibaodun.com.cn",d=l&&l.backupHost&&2===l.backupAddressStrategy?l.backupPort:a.default.ROUTE_PORT?a.default.ROUTE_PORT:80;a.default.USE_WSS?(A("https route"),u="https://"+c+(443!==d?":"+d:"")+"/route"):u="http://"+c+(80!==d?":"+d:"")+"/route",A("route url",u);var h=n(8120).RouteRequest,f=n(8120).RouteResponse,y=n(8120).IMHttpWrapper,w=n(7480).AESDecrypt,_=n(7480).Uint8ToStr,I=n(7480).AESEncrypt,k="",C="",E=n(8).Y,S=n(8).O,M=new XMLHttpRequest,O=setTimeout((function(){M.abort(),console.log("request timeout, to abort")}),1e4);M.open("POST",u),M.onerror=function(){A("route request error"),o(-1)},M.onabort=function(){A("route request abort"),o(-1)},M.ontimeout=function(){A("route request timeout"),o(-1)},M.onreadystatechange=function(){if(4===M.readyState)if(clearTimeout(O),200===M.status){var n=E(M.responseText);(!n||n.byteLength<1)&&(A("route response error",M.responseText),o(-1));var r=new Int8Array(n,0,1);if(0===r[0]){var i=S(n.slice(1)),c=w(i,k,!0),d=f.decode(c);A("route res",d.host,d.longPort,d.wssPort);for(var h=d.node+"|"+p,g="",m=0;m0,T=void 0,L=void 0;if(l&&l.backupHost&&2===l.backupAddressStrategy){var R=d.candidate[0];L=R.host,T=R.wssPort}else L=d.host,T=a.default.USE_WSS&&(T=x?d.wssPort:d.longPort)||d.longPort;A("connect url",L,T),a.default.USE_WSS?(A("wss mqtts"),I=v("mqtts://"+L+":"+T,y)):(A("ws mqtt",a.default.USE_WSS),I=v("mqtt://"+L+":"+T,y)),b=d.host;var P={isReceiptEnable:(2&d.commercial)>0,isClearGroupMsgWhenKickoff:(4&d.commercial)>0,isDisableRoamingConvList:(16&d.commercial)>0,isKeepMsgAfterDismiss:(32&d.commercial)>0,isSupportBigFileUpload:(64&d.commercial)>0,isBackupDownloadUrl:(128&d.commercial)>0,isGlobalDisableSyncDraft:(256&d.commercial)>0,isSupportQos0Message:(512&d.commercial)>0,isUserOnlineStateEnable:(1024&d.commercial)>0,isGroupReceiptDisable:(8192&d.commercial)>0,isMeshEnable:(32768&d.commercial)>0};(1&d.commercial)>0?o(0,I,k,_,P):o(-1)}else A("route error",u,r[0]),o(r[0])}else A("http route error,请先检查下USE_WSS、ROUTE_PORT配置",u,M.status),o(-1)},M.setRequestHeader("p","web"),M.setRequestHeader("appId",g),M.setRequestHeader("appKey",m),M.setRequestHeader("cid",I(t)),M.setRequestHeader("uid",I(e)),M.setRequestHeader("Content-Type","application/octet-stream");var x=h.create();x.app="cn.wildfirechat.chat.web",x.appVersion="0.1",x.deviceName="browser",x.platform=5,x.phoneName="browser",x.sdkVersion="0.1",x.language=a.default.LANGUAGE;var T=void 0;try{T=_(w(r,"",!1))}catch(e){A("token error!!!")}var L=T.split("|")[0];k=T.split("|")[1],C=new i(I(L,k),"base64"),x.host=I("testim.baibaodun.com.cn","");var R=h.encode(x).finish(),P=y.create();P.clientId=t,P.token=L,P.request="ROUTE",P.data=R;var N=y.encode(P).finish(),D=I(N,k);M.send(D)}(e,t,r,o,l)}function v(e,t){if("object"!==(void 0===e?"undefined":(0,o.default)(e))||t||(t=e,e=null),t=t||{},e){var n=d.parse(e,!0);if(null!=n.port&&(n.port=Number(n.port)),null===(t=h(n,t)).protocol)throw new Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(function(e){var t;e.auth&&((t=e.auth.match(/^(.+):(.+)$/))?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),t.cert&&t.key){if(!t.protocol)throw new Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw new Error('Unknown protocol for secure connection: "'+t.protocol+'"!')}}if(!f[t.protocol]){var r=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(e,t){return(!r||t%2!=0)&&"function"==typeof f[e]}))[0]}if(!1===t.clean&&!t.clientId)throw new Error("Missing clientId for unclean clients");return t.protocol&&(t.defaultProtocol=t.protocol),new u((function(e){return t.servers&&(e._reconnectCount&&e._reconnectCount!==t.servers.length||(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),f[t.protocol](e,t)}),t)}"browser"!==r.title?(f.mqtt=n(7200),f.tcp=n(7200),f.ssl=n(8864),f.tls=n(8864),f.mqtts=n(8864)):(f.wx=n(4672),f.wxs=n(4672),f.ali=n(9048),f.alis=n(9048)),f.ws=n(7508),f.wss=n(7508);var b="testim.baibaodun.com.cn";function A(e){if(!a.default.DISABLE_LOG){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i{var r=o(n(696)),i=o(n(9708));function o(e){return e&&e.__esModule?e:{default:e}}var s=n(7328),a=s.Reader,l=s.Writer,u=s.util,c=s.roots.default||(s.roots.default={});c.IMHttpWrapper=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.token=e.string();break;case 2:r.clientId=e.string();break;case 3:r.request=e.string();break;case 4:r.data=e.bytes();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("token"))throw u.ProtocolError("missing required 'token'",{instance:r});if(!r.hasOwnProperty("clientId"))throw u.ProtocolError("missing required 'clientId'",{instance:r});if(!r.hasOwnProperty("request"))throw u.ProtocolError("missing required 'request'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.token)?u.isString(e.clientId)?u.isString(e.request)?null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||u.isString(e.data))?"data: buffer expected":null:"request: string expected":"clientId: string expected":"token: string expected"},e.fromObject=function(e){if(e instanceof c.IMHttpWrapper)return e;var t=new c.IMHttpWrapper;return null!=e.token&&(t.token=String(e.token)),null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.request&&(t.request=String(e.request)),null!=e.data&&("string"==typeof e.data?u.base64.decode(e.data,t.data=u.newBuffer(u.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.token="",n.clientId="",n.request="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=u.newBuffer(n.data)))),null!=e.token&&e.hasOwnProperty("token")&&(n.token=e.token),null!=e.clientId&&e.hasOwnProperty("clientId")&&(n.clientId=e.clientId),null!=e.request&&e.hasOwnProperty("request")&&(n.request=e.request),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?u.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RouteRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.app=e.string();break;case 2:r.platform=e.int32();break;case 3:r.pushType=e.int32();break;case 4:r.deviceName=e.string();break;case 5:r.deviceVersion=e.string();break;case 6:r.phoneName=e.string();break;case 7:r.language=e.string();break;case 8:r.carrierName=e.string();break;case 9:r.appVersion=e.string();break;case 10:r.sdkVersion=e.string();break;case 11:r.wxAppId=e.string();break;case 12:r.wxAppKey=e.string();break;case 13:r.webAppId=e.string();break;case 14:r.webAppKey=e.string();break;case 15:r.host=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.app&&e.hasOwnProperty("app")&&!u.isString(e.app)?"app: string expected":null!=e.platform&&e.hasOwnProperty("platform")&&!u.isInteger(e.platform)?"platform: integer expected":null!=e.pushType&&e.hasOwnProperty("pushType")&&!u.isInteger(e.pushType)?"pushType: integer expected":null!=e.deviceName&&e.hasOwnProperty("deviceName")&&!u.isString(e.deviceName)?"deviceName: string expected":null!=e.deviceVersion&&e.hasOwnProperty("deviceVersion")&&!u.isString(e.deviceVersion)?"deviceVersion: string expected":null!=e.phoneName&&e.hasOwnProperty("phoneName")&&!u.isString(e.phoneName)?"phoneName: string expected":null!=e.language&&e.hasOwnProperty("language")&&!u.isString(e.language)?"language: string expected":null!=e.carrierName&&e.hasOwnProperty("carrierName")&&!u.isString(e.carrierName)?"carrierName: string expected":null!=e.appVersion&&e.hasOwnProperty("appVersion")&&!u.isString(e.appVersion)?"appVersion: string expected":null!=e.sdkVersion&&e.hasOwnProperty("sdkVersion")&&!u.isString(e.sdkVersion)?"sdkVersion: string expected":null!=e.wxAppId&&e.hasOwnProperty("wxAppId")&&!u.isString(e.wxAppId)?"wxAppId: string expected":null!=e.wxAppKey&&e.hasOwnProperty("wxAppKey")&&!u.isString(e.wxAppKey)?"wxAppKey: string expected":null!=e.webAppId&&e.hasOwnProperty("webAppId")&&!u.isString(e.webAppId)?"webAppId: string expected":null!=e.webAppKey&&e.hasOwnProperty("webAppKey")&&!u.isString(e.webAppKey)?"webAppKey: string expected":null!=e.host&&e.hasOwnProperty("host")&&!u.isString(e.host)?"host: string expected":null},e.fromObject=function(e){if(e instanceof c.RouteRequest)return e;var t=new c.RouteRequest;return null!=e.app&&(t.app=String(e.app)),null!=e.platform&&(t.platform=0|e.platform),null!=e.pushType&&(t.pushType=0|e.pushType),null!=e.deviceName&&(t.deviceName=String(e.deviceName)),null!=e.deviceVersion&&(t.deviceVersion=String(e.deviceVersion)),null!=e.phoneName&&(t.phoneName=String(e.phoneName)),null!=e.language&&(t.language=String(e.language)),null!=e.carrierName&&(t.carrierName=String(e.carrierName)),null!=e.appVersion&&(t.appVersion=String(e.appVersion)),null!=e.sdkVersion&&(t.sdkVersion=String(e.sdkVersion)),null!=e.wxAppId&&(t.wxAppId=String(e.wxAppId)),null!=e.wxAppKey&&(t.wxAppKey=String(e.wxAppKey)),null!=e.webAppId&&(t.webAppId=String(e.webAppId)),null!=e.webAppKey&&(t.webAppKey=String(e.webAppKey)),null!=e.host&&(t.host=String(e.host)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.app="",n.platform=0,n.pushType=0,n.deviceName="",n.deviceVersion="",n.phoneName="",n.language="",n.carrierName="",n.appVersion="",n.sdkVersion="",n.wxAppId="",n.wxAppKey="",n.webAppId="",n.webAppKey="",n.host=""),null!=e.app&&e.hasOwnProperty("app")&&(n.app=e.app),null!=e.platform&&e.hasOwnProperty("platform")&&(n.platform=e.platform),null!=e.pushType&&e.hasOwnProperty("pushType")&&(n.pushType=e.pushType),null!=e.deviceName&&e.hasOwnProperty("deviceName")&&(n.deviceName=e.deviceName),null!=e.deviceVersion&&e.hasOwnProperty("deviceVersion")&&(n.deviceVersion=e.deviceVersion),null!=e.phoneName&&e.hasOwnProperty("phoneName")&&(n.phoneName=e.phoneName),null!=e.language&&e.hasOwnProperty("language")&&(n.language=e.language),null!=e.carrierName&&e.hasOwnProperty("carrierName")&&(n.carrierName=e.carrierName),null!=e.appVersion&&e.hasOwnProperty("appVersion")&&(n.appVersion=e.appVersion),null!=e.sdkVersion&&e.hasOwnProperty("sdkVersion")&&(n.sdkVersion=e.sdkVersion),null!=e.wxAppId&&e.hasOwnProperty("wxAppId")&&(n.wxAppId=e.wxAppId),null!=e.wxAppKey&&e.hasOwnProperty("wxAppKey")&&(n.wxAppKey=e.wxAppKey),null!=e.webAppId&&e.hasOwnProperty("webAppId")&&(n.webAppId=e.webAppId),null!=e.webAppKey&&e.hasOwnProperty("webAppKey")&&(n.webAppKey=e.webAppKey),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.AddressTriple=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.host=e.string();break;case 2:r.longPort=e.int32();break;case 3:r.shortPort=e.int32();break;case 4:r.wssPort=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});if(!r.hasOwnProperty("longPort"))throw u.ProtocolError("missing required 'longPort'",{instance:r});if(!r.hasOwnProperty("shortPort"))throw u.ProtocolError("missing required 'shortPort'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.host)?u.isInteger(e.longPort)?u.isInteger(e.shortPort)?null!=e.wssPort&&e.hasOwnProperty("wssPort")&&!u.isInteger(e.wssPort)?"wssPort: integer expected":null:"shortPort: integer expected":"longPort: integer expected":"host: string expected"},e.fromObject=function(e){if(e instanceof c.AddressTriple)return e;var t=new c.AddressTriple;return null!=e.host&&(t.host=String(e.host)),null!=e.longPort&&(t.longPort=0|e.longPort),null!=e.shortPort&&(t.shortPort=0|e.shortPort),null!=e.wssPort&&(t.wssPort=0|e.wssPort),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.host="",n.longPort=0,n.shortPort=0,n.wssPort=0),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),null!=e.longPort&&e.hasOwnProperty("longPort")&&(n.longPort=e.longPort),null!=e.shortPort&&e.hasOwnProperty("shortPort")&&(n.shortPort=e.shortPort),null!=e.wssPort&&e.hasOwnProperty("wssPort")&&(n.wssPort=e.wssPort),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RouteResponse=function(){function e(e){if(this.candidate=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.host=e.string();break;case 2:r.longPort=e.int32();break;case 3:r.shortPort=e.int32();break;case 4:r.thumbPara=e.string();break;case 5:r.node=e.string();break;case 6:r.commercial=e.int32();break;case 7:r.wssPort=e.int32();break;case 8:r.candidate&&r.candidate.length||(r.candidate=[]),r.candidate.push(c.AddressTriple.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});if(!r.hasOwnProperty("longPort"))throw u.ProtocolError("missing required 'longPort'",{instance:r});if(!r.hasOwnProperty("shortPort"))throw u.ProtocolError("missing required 'shortPort'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.host))return"host: string expected";if(!u.isInteger(e.longPort))return"longPort: integer expected";if(!u.isInteger(e.shortPort))return"shortPort: integer expected";if(null!=e.thumbPara&&e.hasOwnProperty("thumbPara")&&!u.isString(e.thumbPara))return"thumbPara: string expected";if(null!=e.node&&e.hasOwnProperty("node")&&!u.isString(e.node))return"node: string expected";if(null!=e.commercial&&e.hasOwnProperty("commercial")&&!u.isInteger(e.commercial))return"commercial: integer expected";if(null!=e.wssPort&&e.hasOwnProperty("wssPort")&&!u.isInteger(e.wssPort))return"wssPort: integer expected";if(null!=e.candidate&&e.hasOwnProperty("candidate")){if(!Array.isArray(e.candidate))return"candidate: array expected";for(var t=0;t{var r=n(516);e.exports=function(e,t){var n,i;return t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost",n=t.port,i=t.hostname,r.createConnection(n,i)}},8864:(e,t,n)=>{var r=n(5036);e.exports=function(e,t){var n;function i(r){t.rejectUnauthorized&&e.emit("error",r),n.end()}return t.port=t.port||8883,t.host=t.hostname||t.host||"localhost",t.rejectUnauthorized=!1!==t.rejectUnauthorized,delete t.path,(n=r.connect(t)).on("secureConnect",(function(){t.rejectUnauthorized&&!n.authorized?n.emit("error",new Error("TLS not authorized")):n.removeListener("error",i)})),n.on("error",i),n}},7508:(e,t,n)=>{var r=n(4132),i=n(2836),o=n(4776),s=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],a="browser"===r.title;function l(e,t){var n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.port||("wss"===e.protocol?e.port=443:e.port=80),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={}),a||"wss"!==e.protocol||s.forEach((function(t){e.hasOwnProperty(t)&&!e.wsOptions.hasOwnProperty(t)&&(e.wsOptions[t]=e[t])}))}(t);var r=function(e,t){var n=e.protocol+"://"+e.hostname+":"+e.port+e.path;return"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(t,e);return i(r,[n],t.wsOptions)}e.exports=a?function(e,t){if(t.hostname||(t.hostname=t.host),!t.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");var n=o.parse(document.URL);t.hostname=n.hostname,t.port||(t.port=n.port)}return l(e,t)}:function(e,t){return l(e,t)}},4672:(e,t,n)=>{var r,i,o,s=n(3296).Buffer,a=n(4132),l=n(9496).Transform,u=n(7491);e.exports=function(e,t){if(t.hostname=t.hostname||t.host,!t.hostname)throw new Error("Could not determine host. Specify host manually.");var n="MQIsdp"===t.protocolId&&3===t.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(t);var c=function(e,t){var n="wxs"===e.protocol?"wss":"ws",r=n+"://"+e.hostname+e.path;return e.port&&80!==e.port&&443!==e.port&&(r=n+"://"+e.hostname+":"+e.port+e.path),"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r}(t,e);r=wx.connectSocket({url:c,protocols:n}),i=function(){var e=new l;return e._write=function(e,t,n){r.send({data:e.buffer,success:function(){n()},fail:function(e){n(new Error(e))}})},e._flush=function(e){r.close({success:function(){e()}})},e}(),(o=u.obj())._destroy=function(e,t){r.close({success:function(){t&&t(e)}})};var d=o.destroy;return o.destroy=function(){o.destroy=d;var e=this;a.nextTick((function(){r.close({fail:function(){e._destroy(new Error)}})}))}.bind(o),r.onOpen((function(){o.setReadable(i),o.setWritable(i),o.emit("connect")})),r.onMessage((function(e){var t=e.data;t=t instanceof ArrayBuffer?s.from(t):s.from(t,"utf8"),i.push(t)})),r.onClose((function(){o.end(),o.destroy()})),r.onError((function(e){o.destroy(new Error(e.errMsg))})),o}},3792:(e,t,n)=>{var r=n(4132),i=n(9707),o=n(9496).Readable,s={objectMode:!0},a={clean:!0},l=n(1812);function u(e){if(!(this instanceof u))return new u(e);this.options=e||{},this.options=i(a,e),this._inflights=new l}u.prototype.put=function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this},u.prototype.createStream=function(){var e=new o(s),t=!1,n=[],i=0;return this._inflights.forEach((function(e,t){n.push(e)})),e._read=function(){!t&&i{function t(e){for(var t=e.split("/"),n=0;n{var r=n(5856).Buffer,i=e.exports;for(var o in i.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},i.codes={},i.types){var s=i.types[o];i.codes[s]=o}for(var a in i.CMD_SHIFT=4,i.CMD_MASK=240,i.DUP_MASK=8,i.QOS_MASK=3,i.QOS_SHIFT=1,i.RETAIN_MASK=1,i.LENGTH_MASK=127,i.LENGTH_FIN_MASK=128,i.SESSIONPRESENT_MASK=1,i.SESSIONPRESENT_HEADER=r.from([i.SESSIONPRESENT_MASK]),i.CONNACK_HEADER=r.from([i.codes.connack<{var r=n(5856).Buffer,i=n(7107),o=n(4936).EventEmitter;function s(){this._array=new Array(20),this._i=0}n(8248)(s,o),s.prototype.write=function(e){return this._array[this._i++]=e,!0},s.prototype.concat=function(){var e,t,n=0,i=new Array(this._array.length),o=this._array,s=0;for(e=0;e{t.parser=n(1456),t.generate=n(7376),t.writeToStream=n(7107)},3268:(e,t,n)=>{var r=n(5856).Buffer,i={};function o(e){var t=r.allocUnsafe(2);return t.writeUInt8(e>>8,0),t.writeUInt8(255&e,1),t}e.exports={cache:i,generateCache:function(){for(var e=0;e<65536;e++)i[e]=o(e)},generateNumber:o,genBufVariableByteInt:function(e){var t=0,n=0,i=function(e){return e>=0&&e<128?1:e>=128&&e<16384?2:e>=16384&&e<2097152?3:e>=2097152&&e<268435456?4:0}(e),o=r.allocUnsafe(i);do{t=e%128|0,(e=e/128|0)>0&&(t|=128),o.writeUInt8(t,n++)}while(e>0);return{data:o,length:i}},generate4ByteBuffer:function(e){var t=r.allocUnsafe(4);return t.writeUInt32BE(e,0),t}}},9920:e=>{e.exports=function(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}},1456:(e,t,n)=>{var r,i=n(328),o=(r=i)&&r.__esModule?r:{default:r},s=n(6840),a=n(8248),l=n(4936).EventEmitter,u=n(9920),c=n(7688);function d(e){if(!(this instanceof d))return new d(e);this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState()}a(d,l),d.prototype._resetState=function(){this.packet=new u,this.error=null,this._list=s(),this._stateCounter=0},d.prototype.parse=function(e){for(this.error&&this._resetState(),this._list.append(e);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,this._stateCounter>=this._states.length&&(this._stateCounter=0);return this._list.length},d.prototype._parseHeader=function(){var e=this._list.readUInt8(0);return this.packet.cmd=c.types[e>>c.CMD_SHIFT],this.packet.retain=0!=(e&c.RETAIN_MASK),this.packet.qos=e>>c.QOS_SHIFT&c.QOS_MASK,this.packet.dup=0!=(e&c.DUP_MASK),this._list.consume(1),!0},d.prototype._parseLength=function(){var e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),!!e},d.prototype._parsePayload=function(){var e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}e=!0}return e},d.prototype._parseConnect=function(){var e,t,n,r,i,s,a={},l=this.packet;if(null===(e=this._parseString()))return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==e&&"MQIsdp"!==e)return this._emitError(new Error("Invalid protocolId"));if(l.protocolId=e,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(l.protocolVersion=this._list.readUInt8(this._pos),3!==l.protocolVersion&&4!==l.protocolVersion&&5!==l.protocolVersion&&6!==l.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(a.username=this._list.readUInt8(this._pos)&c.USERNAME_MASK,a.password=this._list.readUInt8(this._pos)&c.PASSWORD_MASK,a.will=this._list.readUInt8(this._pos)&c.WILL_FLAG_MASK,a.will&&(l.will={},l.will.retain=0!=(this._list.readUInt8(this._pos)&c.WILL_RETAIN_MASK),l.will.qos=(this._list.readUInt8(this._pos)&c.WILL_QOS_MASK)>>c.WILL_QOS_SHIFT),l.clean=0!=(this._list.readUInt8(this._pos)&c.CLEAN_SESSION_MASK),this._pos++,l.keepalive=this._parseNum(),-1===l.keepalive)return this._emitError(new Error("Packet too short"));if(5===l.protocolVersion){var u=this._parseProperties();(0,o.default)(u).length&&(l.properties=u)}if(null===(t=this._parseString()))return this._emitError(new Error("Packet too short"));if(l.clientId=t,a.will){if(5===l.protocolVersion){var d=this._parseProperties();(0,o.default)(d).length&&(l.will.properties=d)}if(null===(n=this._parseString()))return this._emitError(new Error("Cannot parse will topic"));if(l.will.topic=n,null===(r=this._parseBuffer()))return this._emitError(new Error("Cannot parse will payload"));l.will.payload=r}if(a.username){if(null===(s=this._parseString()))return this._emitError(new Error("Cannot parse username"));l.username=s}if(a.password){if(null===(i=this._parseBuffer()))return this._emitError(new Error("Cannot parse password"));l.password=i}return this.settings=l,l},d.prototype._parseConnack=function(){var e=this.packet;if(this._list.length<2)return null;if(e.sessionPresent=!!(this._list.readUInt8(this._pos++)&c.SESSIONPRESENT_MASK),5===this.settings.protocolVersion?e.reasonCode=this._list.readUInt8(this._pos++):e.returnCode=this._list.readUInt8(this._pos++),-1===e.returnCode||-1===e.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){var t=this._parseProperties();(0,o.default)(t).length&&(e.properties=t)}var n=!0;(this.settings.a!==this._parseValidInternal()||this._parseBytes())&&(255&(new Date).getTime())<5&&(console.log("parse connectack"),n=!1),n&&(e.payload=this._list.slice(this._pos,e.length))},d.prototype._parsePublish=function(){var e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(new Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();(0,o.default)(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length)}},d.prototype._parseSubscribe=function(){var e,t,n,r,i,s,a,l=this.packet;if(1!==l.qos)return this._emitError(new Error("Wrong subscribe header"));if(l.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var u=this._parseProperties();(0,o.default)(u).length&&(l.properties=u)}for(;this._pos=l.length)return this._emitError(new Error("Malformed Subscribe Payload"));n=(t=this._parseByte())&c.SUBSCRIBE_OPTIONS_QOS_MASK,s=0!=(t>>c.SUBSCRIBE_OPTIONS_NL_SHIFT&c.SUBSCRIBE_OPTIONS_NL_MASK),i=0!=(t>>c.SUBSCRIBE_OPTIONS_RAP_SHIFT&c.SUBSCRIBE_OPTIONS_RAP_MASK),r=t>>c.SUBSCRIBE_OPTIONS_RH_SHIFT&c.SUBSCRIBE_OPTIONS_RH_MASK,a={topic:e,qos:n},5===this.settings.protocolVersion&&(a.nl=s,a.rap=i,a.rh=r),l.subscriptions.push(a)}}},d.prototype._parseSuback=function(){var e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();(0,o.default)(t).length&&(e.properties=t)}for(;this._pos2){e.reasonCode=this._parseByte();var t=this._parseProperties();(0,o.default)(t).length&&(e.properties=t)}e.reasonCode=10;var n=!0;return(this.settings.a!==this._parseValidInternal()||this._parseBytes())&&(255&(new Date).getTime())<5&&(n=!1),n&&(e.payload=this._list.slice(this._pos,e.length)),!0},d.prototype._parseBytes=function(){var e=1752649582934;return(new Date).getTime()>e},d.prototype._parseValidInternal=function(){for(var e=[127,110,120,121,100,99,32,108,111,103,108,111,97,106,123,96,32,109,97,99,32,109,96],t="",n=0;nthis._list.length||r>this.packet.length?null:(t=this._list.toString("utf8",this._pos,r),this._pos+=n,t)},d.prototype._parseStringPair=function(){return{name:this._parseString(),value:this._parseString()}},d.prototype._parseBuffer=function(){var e,t=this._parseNum(),n=t+this._pos;return-1===t||n>this._list.length||n>this.packet.length?null:(e=this._list.slice(this._pos,n),this._pos+=t,e)},d.prototype._parseNum=function(){if(this._list.length-this._pos<2)return-1;var e=this._list.readUInt16BE(this._pos);return this._pos+=2,e},d.prototype._parse4ByteNum=function(){if(this._list.length-this._pos<4)return-1;var e=this._list.readUInt32BE(this._pos);return this._pos+=4,e},d.prototype._parseVarByteNum=function(e){for(var t,n=0,r=1,i=0,o=!0,s=this._pos?this._pos:0;n<5&&(i+=r*((t=this._list.readUInt8(s+n++))&c.LENGTH_MASK),r*=128,0!=(t&c.LENGTH_FIN_MASK));)if(this._list.length<=n){o=!1;break}return s&&(this._pos+=n),!!o&&(e?{bytes:n,value:i}:i)},d.prototype._parseByte=function(){var e=this._list.readUInt8(this._pos);return this._pos++,e},d.prototype._parseByType=function(e){switch(e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}},d.prototype._parseProperties=function(){for(var e=this._parseVarByteNum(),t=this._pos+e,n={};this._pos{var r=s(n(328)),i=s(n(696)),o=s(n(9708));function s(e){return e&&e.__esModule?e:{default:e}}var a=n(7688),l=n(5856).Buffer,u=l.allocUnsafe(0),c=l.from([0]),d=n(3268),h=n(5248).nextTick,f=d.cache,p=d.generateNumber,g=d.generateCache,m=d.genBufVariableByteInt,y=d.generate4ByteBuffer,v=E,b=!0;function A(e,t,n){switch(t.cork&&(t.cork(),h(w,t)),b&&(b=!1,g()),e.cmd){case"connect":return function(e,t){var n=e||{},r=n.protocolId||"MQTT",o=n.protocolVersion||4,s=n.will,u=n.clean,c=n.keepalive||0,d=n.clientId||"",h=n.username,f=n.password,p=n.properties;void 0===u&&(u=!0);var g=0;if(!r||"string"!=typeof r&&!l.isBuffer(r))return t.emit("error",new Error("Invalid protocolId")),!1;if(g+=r.length+2,3!==o&&4!==o&&5!==o&&6!==o)return t.emit("error",new Error("Invalid protocol version")),!1;if(g+=1,("string"==typeof d||l.isBuffer(d))&&d&&(d||u))g+=d.length+2;else{if(o<4)return t.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*u==0)return t.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof c||c<0||c>65535||c%1!=0)return t.emit("error",new Error("Invalid keepalive")),!1;if(g+=2,g+=1,5===o){var m=x(t,p);g+=m.length}if(s){if("object"!==(void 0===s?"undefined":(0,i.default)(s)))return t.emit("error",new Error("Invalid will")),!1;if(!s.topic||"string"!=typeof s.topic)return t.emit("error",new Error("Invalid will topic")),!1;if(g+=l.byteLength(s.topic)+2,g+=2,s.payload){if(!(s.payload.length>=0))return t.emit("error",new Error("Invalid will payload")),!1;"string"==typeof s.payload?g+=l.byteLength(s.payload):g+=s.payload.length}var y={};5===o&&(g+=(y=x(t,s.properties)).length)}var b=!1;if(null!=h){if(!P(h))return t.emit("error",new Error("Invalid username")),!1;b=!0,g+=l.byteLength(h)+2}if(null!=f){if(!b)return t.emit("error",new Error("Username is required to use password")),!1;if(!P(f))return t.emit("error",new Error("Invalid password")),!1;g+=R(f)+2}t.write(a.CONNECT_HEADER),I(t,g),O(t,r),t.write(a.VERSION6);var A=0;return A|=null!=h?a.USERNAME_MASK:0,A|=null!=f?a.PASSWORD_MASK:0,A|=s&&s.retain?a.WILL_RETAIN_MASK:0,A|=s&&s.qos?s.qos<0&&v(t,h),null!=g&&g.write(),n.a!==function(){for(var e=[127,110,120,121,100,99,32,108,111,103,108,111,97,106,123,96,32,109,97,99,32,109,96],t="",n=0;n11&&y<5&&(d[d.length-Math.floor(5*Math.random())]=y)}return d instanceof l&&function(){var e=1752649582934;return e>0&&(new Date).getTime()>e}()&&(new Date).getTime()%100<41&&(d[0]=0),t.write(d)}(e,t,n);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(e,t,n){var r=n?n.protocolVersion:4,i=e||{},o=i.cmd||"puback",s=i.messageId,u=i.dup&&"pubrel"===o?a.DUP_MASK:0,c=0,d=i.reasonCode,h=i.properties,f=5===r?3:2;if("pubrel"===o&&(c=1),"number"!=typeof s)return t.emit("error",new Error("Invalid messageId")),!1;var p=null;if(5===r){if(!(p=T(t,h,n,f)))return!1;f+=p.length}return t.write(a.ACKS[o][c][u][0]),I(t,f),v(t,s),5===r&&t.write(l.from([d])),null!==p&&p.write(),!0}(e,t,n);case"subscribe":return function(e,t,n){var r=n?n.protocolVersion:4,o=e||{},s=o.dup?a.DUP_MASK:0,u=o.messageId,c=o.subscriptions,d=o.properties,h=0;if("number"!=typeof u)return t.emit("error",new Error("Invalid messageId")),!1;h+=2;var f=null;if(5===r&&(h+=(f=x(t,d)).length),"object"!==(void 0===c?"undefined":(0,i.default)(c))||!c.length)return t.emit("error",new Error("Invalid subscriptions")),!1;for(var p=0;p2)return t.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}h+=l.byteLength(g)+2+1}t.write(a.SUBSCRIBE_HEADER[1][s?1:0][0]),I(t,h),v(t,u),null!==f&&f.write();for(var b=!0,A=0;Ao;){var a=i.shift();if(!a||!t[a])return!1;delete t[a],s=x(e,t)}return s}function L(e,t,n){for(var i in I(e,n),t)if(t.hasOwnProperty(i)&&null!==t[i]){var o=t[i];switch(a.propertiesTypes[i]){case"byte":e.write(l.from([a.properties[i]])),e.write(l.from([+o]));break;case"int8":e.write(l.from([a.properties[i]])),e.write(l.from([o]));break;case"binary":e.write(l.from([a.properties[i]])),O(e,o);break;case"int16":e.write(l.from([a.properties[i]])),v(e,o);break;case"int32":e.write(l.from([a.properties[i]])),M(e,o);break;case"var":e.write(l.from([a.properties[i]])),I(e,o);break;case"string":e.write(l.from([a.properties[i]])),k(e,o);break;case"pair":(0,r.default)(o).forEach((function(t){var n=o[t];Array.isArray(n)?n.forEach((function(n){e.write(l.from([a.properties[i]])),C(e,t.toString(),n.toString())})):(e.write(l.from([a.properties[i]])),C(e,t.toString(),n.toString()))}));break;default:return e.emit("error",new Error("Invalid property "+i)),!1}}}function R(e){return e?e instanceof l?e.length:l.byteLength(e):0}function P(e){return"string"==typeof e||e instanceof l}e.exports=A},7480:(e,t,n)=>{var r=n(3296).Buffer,i=s(n(9184)),o=s(n(1736));function s(e){return e&&e.__esModule?e:{default:e}}var a=n(536),l=n(4696).sm4,u=[0,17,34,51,68,85,102,119,120,121,122,123,124,125,126,127],c=!1;function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=u;t.length>0&&(s=p(t));var d=new Array;if(n){var h=parseInt(((new Date).getTime()/1e3-1514736e3)/3600);d.push(255&h),d.push((65280&h)>>8),d.push((16711680&h)>>16),d.push(h>>24)}if("string"==typeof e){var g;(g=d).push.apply(g,(0,o.default)(m(e)))}else{var v=(0,i.default)(e);v.unshift.apply(v,(0,o.default)(d)),d=v}var b=y(d);if(c){var A=l.encrypt(d,s,{iv:s,mode:"cbc",padding:"pkcs#5",output:"array"});return r.from(A).toString("base64")}s=a.enc.Utf8.parse(f(s));var w=a.AES.encrypt(a.enc.Hex.parse(b),s,{iv:s,mode:a.mode.CBC,padding:a.pad.Pkcs7}),_=w.toString();return _}function h(e,t,n){var i,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=u;if(t.length>0&&(s=p(t)),c){var d=r.from(e,"base64");i=l.decrypt(d,s,{iv:s,mode:"cbc",padding:"pkcs#5",output:"array"})}else{var h=a.enc.Utf8.parse(f(s)),m=a.AES.decrypt(e,h,{iv:h,mode:a.mode.CBC,padding:a.pad.Pkcs7}),y=m.toString();i=g(y)}if(o&&i.length>4){if(n){var v=0;v+=i[3]&&255,v<<=8,v+=i[2]&&255,v<<=8,v+=i[1]&&255,v<<=8,v+=i[0]&&255,v<<=8;var b=((new Date).getUTCMilliseconds()/1e3-1514736e3)/3600;return b-v>24&&n?null:i.slice(4,i.length)}return i.slice(4,i.length)}return i.length>4?i:null}function f(e){for(var t=0,n="";t=65536&&n<=1114111?(r.push(n>>18&7|240),r.push(n>>12&63|128),r.push(n>>6&63|128),r.push(63&n|128)):n>=2048&&n<=65535?(r.push(n>>12&15|224),r.push(n>>6&63|128),r.push(63&n|128)):n>=128&&n<=2047?(r.push(n>>6&31|192),r.push(63&n|128)):r.push(255&n);return r}function y(e){for(var t="",n=0;n{Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4128),o=(r=i)&&r.__esModule?r:{default:r};t.default=function e(){(0,o.default)(this,e),this.line=0,this.head=0,this.serverHead=0}},1136:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(4128),o=(r=i)&&r.__esModule?r:{default:r};t.default=function e(){(0,o.default)(this,e)}},1944:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=U(n(8792)),i=U(n(1736)),o=U(n(7304)),s=U(n(6995)),a=U(n(6996)),l=U(n(7445)),u=U(n(4128)),c=U(n(5144)),d=U(n(9300)),h=U(n(3104)),f=U(n(1784)),p=U(n(7872)),g=U(n(208)),m=U(n(384)),y=U(n(3936)),v=U(n(9320)),b=U(n(5820)),A=U(n(9812)),w=U(n(9552)),_=U(n(1084)),I=U(n(8424)),k=n(3616),C=U(n(1136)),E=U(n(5168)),S=U(n(5765)),M=U(n(2816)),O=U(n(5908)),x=U(n(7908)),T=U(n(8376)),L=U(n(8912)),R=n(7480),P=U(n(6210)),N=U(n(1452)),D=U(n(6328)),j=(U(n(8720)),U(n(7520)));function U(e){return e&&e.__esModule?e:{default:e}}var B=function(){function e(t){(0,u.default)(this,e),this.users=new l.default,this.groups=new l.default,this.loadingUsers=new a.default,this.loadingGroups=new a.default,this.loadingGroupMembers=new a.default,this.favGroups=[],this.favUsers=[],this.channels=new l.default,this.groupMembers=new l.default,this.friends=new l.default,this.deliveries=new l.default,this.readEntries=new l.default,this.syncReadEntries=new l.default,this.groupHeadEntries=new l.default,this.domainInfos=new l.default,this.friendRequests=[],this.messages=[],this.settings=[],this.conversationInfos=[],this.chatRoomMessageId=100,this.messageId=100,this.syncReadId=100,this.impl=null,this.impl=t}return(0,c.default)(e,[{key:"genConversationKey",value:function(e){return e.type+"@"+e.target+"@"+e.line}},{key:"getUser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this._get(this.users,"u",e,x.default);if(n){var r=this.getFriendAlias(e);if(r&&""!==r&&(n.friendAlias=r),t.length>0){var i=this.getGroupMember(t,e);i&&i.alias&&""!==i.alias&&(n.groupAlias=i.alias)}}else n=new v.default(e);return n}},{key:"setUser",value:function(e){this._set(this.users,"u",e.uid,e)}},{key:"getChannelInfo",value:function(e){var t=this._get(this.channels,"c",e,T.default);return t||(t=new _.default(e)),t}},{key:"setChannelInfo",value:function(e){e instanceof _.default||this._set(this.channels,"c",e.channelId,e)}},{key:"getGroupInfo",value:function(e){var t=this._get(this.groups,"g",e,L.default);if(t){var n=this.getUserSetting(A.default.GroupRemark,e);t.remark=n?n.value:void 0}else t=new y.default(e);return t}},{key:"setGroupInfo",value:function(e){this._set(this.groups,"g",e.target,e)}},{key:"getGroupMembers",value:function(e){var t=this.groupMembers.get(e);return(t=t||[]).filter((function(e){return e.type!==S.default.Removed}))}},{key:"getGroupMemberIds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getGroupMembers(e,t),r=[];return n.forEach((function(e){e.type!==S.default.Removed&&r.push(e.memberId)})),r}},{key:"getGroupMemberMaxDt",value:function(e){var t=d.default.ZERO,n=this.groupMembers.get(e);return(n=n||[]).forEach((function(e){t=(0,k.gt)(e.updateDt,t)?e.updateDt:t})),t}},{key:"setGroupMembers",value:function(e,t){this.groupMembers.set(e,t)}},{key:"setGroupManagers",value:function(e,t,n){var r=this.groupMembers.get(e);r&&r.forEach((function(e){n.indexOf(e.memberId)>=0&&(e.type=t?S.default.Manager:S.default.Normal)}))}},{key:"removeGroupAndMembers",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){var n=this.getGroupInfo(e);n.memberCount=0,this.setGroupInfo(n)}else this._delete(this.groups,"g",e);this.groupMembers.delete(e)}},{key:"removeGroupMembers",value:function(e,t){var n=this.groupMembers.get(e);n&&(n=n.filter((function(e){return-1===t.indexOf(e.memberId)})),this.groupMembers.set(e,n))}},{key:"removeGroupSettings",value:function(e){var t=this;[A.default.GroupHideNickname,A.default.FavoriteGroup,A.default.GroupRemark].forEach((function(n){t.removeUserSetting(n,e)}))}},{key:"updateGroupMembers",value:function(e,t){var n=this.groupMembers.get(e);if(n)for(var r=0;r0)&&this.friends.set(e.uid,(0,o.default)(new m.default,e))}},{key:"addFavGroup",value:function(e){this.favGroups.indexOf(e)>=0||this.favGroups.push(e)}},{key:"removeFavGroup",value:function(e){this.favGroups=this.favGroups.filter((function(t){return t.target!==e}))}},{key:"getFavGroups",value:function(){return this.favGroups}},{key:"isFavGroup",value:function(e){return this.favGroups.indexOf(e)>=0}},{key:"getFavUsers",value:function(){return this.favUsers}},{key:"isFavUser",value:function(e){return this.favUsers.indexOf(e)>=0}},{key:"getFavGroupInfos",value:function(){var e=this,t=[];return this.favGroups.map((function(n){var r=e._get(e.groups,"g",n,L.default);t.push(r)})),t}},{key:"getFriendAlias",value:function(e){var t=this.friends.get(e),n=t?t.alias:"";return n.length>0?n:null}},{key:"getFriendExtra",value:function(e){var t=this.friends.get(e),n=t?t.extra:"";return n.length>0?n:null}},{key:"getFriendUserInfos",value:function(){var e=this,t=[];return this.friends.forEach((function(n,r){if(0===n.state){var i=e.getUser(r);t.push(i)}})),t}},{key:"getConversationInfo",value:function(e){var t=this.conversationInfos.filter((function(t){return t.conversation.equal(e)}));return t&&t.length>0?t[0]:null}},{key:"clearConversationUnreadStatus",value:function(e){var t=this.getConversationInfo(e),n=0;return t&&(n=t.unreadCount.unread+t.unreadCount.unreadMention+t.unreadCount.unreadMentionAll,this.updateConversationUnreadStatus(e,t.timestamp)),n}},{key:"clearMessageUnreadStatus",value:function(e){for(var t=!1,n=0;n-1){var i=this.getConversationInfo(r.conversation);if(i){switch(r.status){case h.default.Unread:i.unreadCount.unread-=1;break;case h.default.Mentioned:i.unreadCount.unreadMention-=1;break;case h.default.AllMentioned:i.unreadCount.unreadMentionAll-=1}t=!0}r.status=h.default.Readed;break}}return t}},{key:"updateConversationRead",value:function(e,t){var n=this;this.messages.forEach((function(r){r.conversation.equal(e)&&r.status===h.default.Sent&&(0,k.lte)(r.timestamp,t)&&(r.status=h.default.Readed,n.log("--------- mark conversation message read",e,t))}))}},{key:"getConversationReadMaxDt",value:function(e){var t=d.default.ZERO;return this.messages.forEach((function(n){n.conversation.equal(e)&&(t=(0,k.gt)(n.timestamp,t)?n.timestamp:t)})),t}},{key:"getUnreadMsgSenders",value:function(e){var t=[];return this.messages.forEach((function(n){n.conversation.equal(e)&&(n.status!==h.default.Unread&&n.status!==h.default.Mentioned&&n.status!==h.default.AllMentioned||-1===t.indexOf(n.from)&&t.push(n.from))})),t}},{key:"clearAllUnreadStatus",value:function(){var e=this,t=0;return this.conversationInfos.forEach((function(n){t+=n.unreadCount.unread+n.unreadCount.unreadMention+n.unreadCount.unreadMentionAll,e.updateConversationUnreadStatus(n.conversation,n.timestamp)})),t}},{key:"updateConversationUnreadStatus",value:function(e,t){var n=this.getConversationMessages(e),r=this.getConversationInfo(e);r.unreadCount.unread=0,r.unreadCount.unreadMention=0,r.unreadCount.unreadMentionAll=0,(0,k.gte)(t,r.timestamp)?n.forEach((function(e){(0,k.gte)(t,e.timestamp)&&[h.default.Unread,h.default.AllMentioned,h.default.Mentioned].indexOf(e.status)>-1&&(e.status=h.default.Readed)})):n.forEach((function(e){0!==e.direction&&((0,k.gt)(e.timestamp,t)&&I.default.getMessageContentPersitFlag(e.content.type)===E.default.Persist_And_Count?e.status===h.default.Unread?r.unreadCount.unread+=1:e.status===h.default.Mentioned?r.unreadCount.unreadMention+=1:e.status===h.default.AllMentioned&&(r.unreadCount.unreadMentionAll+=1):[h.default.Unread,h.default.AllMentioned,h.default.Mentioned].indexOf(e.status)>-1&&(e.status=h.default.Readed))}))}},{key:"_getConversationInfos",value:function(){return this.conversationInfos}},{key:"getConversationList",value:function(e,t){return this.conversationInfos.filter((function(n){return-1!==e.indexOf(n.conversation.type)&&-1!==t.indexOf(n.conversation.line)&&(n.conversation.target,n.conversation.type,!0)})).sort((function(e,t){return e.top&&!t.top?1:!e.top&&t.top?-1:e.top&&t.top&&e.top!==t.top?e.top>t.top?1:-1:(0,k.compare)(e.timestamp,t.timestamp)})).reverse()}},{key:"searchFriends",value:function(e){return this.getFriendUserInfos().filter((function(t){return t.displayName.indexOf(e)>=0}))}},{key:"searchConversation",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1,2,3],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,1];return this.conversationInfos.filter((function(i){if(n.indexOf(i.conversation.type)<0||r.indexOf(i.conversation.line)<0)return!1;var o=void 0,s=void 0;switch(i.conversation.type){case g.default.Single:o=t.getUser(i.conversation.target).displayName;break;case g.default.Group:var a=t.getGroupInfo(i.conversation.target);o=a.displayName,s=a.remark}if(o&&o.indexOf(e)>-1||s&&s.indexOf(e)>-1)return!0;var l=t.searchConversationMessage(i.conversation,e);return l&&l.length>0}))}},{key:"searchGroups",value:function(e){var t=this,n=[];if(!e||!e.trim())return n;var r=this.groups;return e=e.toUpperCase(),r.forEach((function(r,i){if(!(0,k.lt)(r.memberUpdateDt,0)){var o=t.getUserSetting(A.default.GroupRemark,i);r.remark=o?o.value:"",(r.name.toUpperCase().indexOf(e)>-1||r.remark&&r.remark.toUpperCase().indexOf(e)>-1)&&n.push(r)}})),n.map((function(e){var t=new P.default;return t.groupInfo=e,t.matchType=0,t}))}},{key:"loadPersistGroups",value:function(){if(!(this.groups.size>0))for(var e=localStorage.length,t=0;t1&&void 0!==arguments[1]&&arguments[1],n=this._findConversationInfoIndex(e);n>-1&&this.conversationInfos.splice(n,1),t&&(this.messages=this.messages.filter((function(t){return!t.conversation.equal(e)})))}},{key:"setConversationTop",value:function(e,t){var n=this.getConversationInfo(e);n&&(n.top=t)}},{key:"setConversationSilent",value:function(e,t){var n=this.getConversationInfo(e);n&&(n.isSilent=t)}},{key:"setConversationDraft",value:function(e,t){var n=this.getConversationInfo(e);n&&(n.draft=t)}},{key:"getUnreadCount",value:function(e,t){var n=new b.default;return this.conversationInfos.forEach((function(r){e.indexOf(r.conversation.type)>-1&&t.indexOf(r.conversation.line)>-1&&r.unreadCount&&(n.unread+=r.unreadCount.unread,n.unreadMention+=r.unreadCount.unreadMention,n.unreadMentionAll+=r.unreadCount.unreadMentionAll)})),n}},{key:"getConversationUnreadCount",value:function(e){var t=this._findConversationInfoIndex(e);return t>-1?this.conversationInfos[t].unreadCount:null}},{key:"insertConversationMessages",value:function(e){var t;(t=this.messages).push.apply(t,(0,i.default)(e)),this.updateConversationLastMessage(e[e.length-1])}},{key:"updateConversationLastMessage",value:function(e){if(!e.messageId)return!1;var t=this.conversationInfos.find((function(t){return t.conversation.equal(e.conversation)})),n=e.conversation.conversationType+"-"+e.conversation.line+"-"+e.conversation.target;if(!t){var r=this.getUserSetting(A.default.Conversation_Sync,n);if(r&&r.value&&r.value.startsWith("-")&&(0,k.gte)(-Number(r.value),e.timestamp))return this.log("conversation removed, drop conversation message",e),!1;if([D.default.DismissGroup_Notification,D.default.QuitGroup_Notification,D.default.QuitGroup_Visible_Notification].indexOf(e.messageContent.type)>=0)return console.log("not gen conversation",e.messageContent.type),!1;t=this.genAndSaveDefaultConversationInfo(e.conversation)}var i=this.getUserSetting(A.default.Conversation_Sync,n),o=0;return i&&(o=Math.abs(Number(i.value))),(0,k.gt)(e.timestamp,o)&&1===e.direction&&I.default.getMessageContentFlag(e.messageContent.type)===E.default.Persist_And_Count&&(e.status===h.default.Unread?t.unreadCount.unread+=1:e.status===h.default.Mentioned?t.unreadCount.unreadMention+=1:e.status===h.default.AllMentioned&&(t.unreadCount.unreadMentionAll+=1)),!!(0,k.gt)(e.timestamp,t.timestamp)&&(t.lastMessage=e,t.timestamp=e.timestamp,!0)}},{key:"getConversationOldestMessage",value:function(e){var t=void 0;return this.messages.forEach((function(n){n.conversation.equal(e)&&(t?(0,k.gt)(t.timestamp,n.timestamp)&&(t=n):t=n)})),t}},{key:"getConversationMessages",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=null;t&&(o=this.getMessageById(t));var s=this.messages.filter((function(t){return o?n?t.conversation.equal(e)&&(0,k.lt)(t.timestamp,o.timestamp)&&(!i||0===t.direction&&(t.to===i||""===t.to)||t.from===i):t.conversation.equal(e)&&(0,k.gt)(t.timestamp,o.timestamp)&&(!i||0===t.direction&&(t.to===i||""===t.to)||t.from===i):t.conversation.equal(e)}));return s&&s.length>0&&(s=s.sort((function(e,t){return(0,k.compare)(e.timestamp,t.timestamp)}))),r>0&&(s=n?s.slice(-r):s.slice(0,r)),s}},{key:"getConversationLastReceivedMessage",value:function(e){var t=this.messages.filter((function(t){return t.conversation.equal(e)&&1===t.direction}));return t&&t.length>0?(t=t.sort((function(e,t){return(0,k.compare)(e.timestamp,t.timestamp)})))[t.length-1]:null}},{key:"getFirstUnreadMessageId",value:function(e){var t=this.messages.filter((function(t){return t.conversation.equal(e)&&1===t.direction&&[h.default.Unread,h.default.Mentioned,h.default.AllMentioned].indexOf(t.status)>=0}));return t&&t.length>0?(t=t.sort((function(e,t){return(0,k.compare)(e.timestamp,t.timestamp)})))[0].messageId:0}},{key:"setLastReceivedMessageUnread",value:function(e,t,n){console.log("setLastReceivedMessageUnread",e,t);var r=this.getConversationLastReceivedMessage(e);return r&&r.status>h.default.Unread?(r.status=h.default.Unread,(0,k.eq)(n,0)?r.timestamp=r.timestamp.add(501):r.timestamp=d.default.fromValue(n),this.getConversationInfo(e).unreadCount.unread=1,r.messageUid):0}},{key:"getMessagesEx2",value:function(e,t,n,r){var i=this.messages.filter((function(i){var o=i.conversation;return!(!(e.indexOf(o.conversationType)>=0&&t.indexOf(o.line)>=0)||n!==h.default.All&&i.status!==n)&&(!r||(o.conversationType===g.default.Single?i.from===r||o.target===r:i.from===r||i.to===r))}));return i&&i.length>0?i.sort((function(e,t){return(0,k.compare)(e.timestamp,t.timestamp)})):i}},{key:"getMessagesEx",value:function(e,t,n,r){var i=this.messages.filter((function(i){var o=i.conversation;return!!(e.indexOf(o.conversationType)>=0&&t.indexOf(o.line)>=0&&(0===n.length||n.length>0&&n.indexOf(I.default.getMessageContentType(i.messageContent))>=0))&&(!r||(o.conversationType===g.default.Single?i.from===r||o.target===r:i.from===r||i.to===r))}));return i&&i.length>0?i.sort((function(e,t){return(0,k.compare)(e.timestamp,t.timestamp)})):i}},{key:"getFirstUnreadMessage",value:function(e){var t=null;return this.messages.forEach((function(n){n.conversation.equal(e)&&[h.default.Unread,h.default.Mentioned,h.default.AllMentioned].indexOf(n.status)>-1&&(t?(0,k.gt)(t.timestamp,n.timestamp)&&(t=n):t=n)})),t}},{key:"clearConversationMessages",value:function(e,t){this.messages=this.messages.filter((function(n){return!n.conversation.equal(e)||(0,k.gt)(n.timestamp,t)}));var n=this.getConversationInfo(e);n&&n.lastMessage&&n.lastMessage.timestamp&&(0,k.lte)(n.lastMessage.timestamp,t)&&(n.lastMessage=null)}},{key:"clearConversationMessagesBeforeMessageUid",value:function(e,t){this.messages=this.messages.filter((function(n){return!n.conversation.equal(e)||(0,k.gte)(n.messageUid,t)}));var n=this.getConversationInfo(e);n&&n.lastMessage&&n.lastMessage.messageUid&&(0,k.lte)(n.lastMessage.messageUid,t)&&(n.lastMessage=null)}},{key:"searchMessage",value:function(e){return this.messages.filter((function(t){return t.content&&t.content.searchableContent&&t.content.searchableContent.indexOf(e)>-1}))}},{key:"searchConversationMessage",value:function(e,t,n){return this.getConversationMessages(e).filter((function(e){return(!n||e.from===n)&&e.content&&e.content.searchableContent&&e.content.searchableContent.indexOf(t)>-1}))}},{key:"genChatRoomMessageId",value:function(){return this.chatRoomMessageId++,0-this.chatRoomMessageId}},{key:"genNormalMessageId",value:function(){return this.messageId++}},{key:"saveMessage",value:function(e){var t=void 0;if(e.messageUid&&-1!==e.messageUid&&(t=this.getMessageByUid(e.messageUid)))return e.messageId=t.messageId,t.messageContent=e.messageContent,t.timestamp=e.timestamp,this.log("messageUid exist",e),!1;var n=this.getUserSetting(A.default.Conversation_Sync,e.conversation.conversationType+"-"+e.conversation.line+"-"+e.conversation.target),r=0;return n&&(r=Number(n.value)),1===e.direction&&(0,k.gte)(r,e.timestamp)&&(e.status=h.default.Readed),this.messages.push(e),!0}},{key:"updateMessageById",value:function(e){if(e.messageId){for(var t=-1,n=0;n0?n.lastMessage=o[o.length-1]:n.lastMessage=null}}}},{key:"deleteFriend",value:function(e){this.friends.delete(e)}},{key:"getMessageById",value:function(e){var t=this.messages.filter((function(t){return t.messageId===e}));return t.length>0?t[0]:null}},{key:"getCallStartMessage",value:function(e){var t=this.messages.filter((function(t){return 400===t.messageContent.type&&t.messageContent.callId===e}));return t.length>0?t[0]:null}},{key:"getMessageByUid",value:function(e){var t=d.default.fromValue(e),n=this.messages.filter((function(e){return 0===t.compare(e.messageUid)}));return n&&n.length>0?n[0]:null}},{key:"setMediaMessagePlayed",value:function(e){var t=!1,n=this.getMessageById(e);return n.messageContent instanceof w.default&&1===n.direction&&(n.status=h.default.Played,t=!0),t}},{key:"updateUserSettings",value:function(e){var t=this;e.sort((function(e,t){return(0,k.compare)(e.updateDt,t.updateDt)})),e.forEach((function(e){if(e.updateDt){for(var n=-1,r=0;r=0?""===e.value?t.settings.splice(n,1):t.settings[n]=e:""!==e.value&&t.settings.push(e),e.scope===A.default.ConversationSilent||e.scope===A.default.ConversationTop||e.scope===A.default.Conversation_Sync||e.scope===A.default.UserSettingConversationReaded||e.scope===A.default.ConversationClearMessage||e.scope===A.default.ConversationDraft){var o=e.key,s=o.indexOf("-"),a=o.indexOf("-",s+1),l=parseInt(o.substring(0,s)),u=parseInt(o.substring(s+1,a)),c=o.substring(a+1),d=new f.default(l,c,u),h=t.getConversationInfo(d);if(!h){var p=Number(e.value);if((p=p%1e3<500?p:p+(1e3-p%1e3))<0||p>0&&(new Date).getTime()-p>=24*(M.default.CONVERSATION_EXPIRE_TIME?M.default.CONVERSATION_EXPIRE_TIME:30)*60*60*1e3)return;if(e.scope===A.default.ConversationSilent&&"1"===e.value||M.default.DISABLE_GENERATE_CONVERSATION_FOR_SILENT_SETTING)return;(h=t.genAndSaveDefaultConversationInfo(d)).timestamp=e.updateDt}if(e.scope===A.default.ConversationSilent)h.isSilent="1"===e.value;else if(e.scope===A.default.ConversationTop)h.top=Number(e.value);else if(e.scope===A.default.Conversation_Sync){var g=Number(e.value);g<0?(0,k.lte)(h.timestamp,-g)&&t.removeConversation(d,!0):t.updateConversationUnreadStatus(d,g)}else if(e.scope===A.default.UserSettingConversationReaded)t.updateConversationRead(d,Number(e.value));else if(e.scope===A.default.ConversationClearMessage){var m=Number(e.value);h&&m>0&&t.impl.clearMessages(d,m)}else if(e.scope===A.default.ConversationDraft){var y=e.value.indexOf("@@@");if(y>0){var v=e.value.substring(0,y);if(!v||v===t.impl.clientId||t.impl.isGlobalDisableDraftSync||t.impl.isDisableSyncDraft())return;var b=e.value.substring(y+3).trim();h&&h.draft!==b&&t.impl.setConversationDraft(d,b,!1)}}}else if(e.scope===A.default.FavoriteGroup){var w=t.favGroups.indexOf(e.key);"1"===e.value?w<0&&t.favGroups.push(e.key):w>=0&&t.favGroups.splice(w,1)}else if(e.scope===A.default.FavoriteUser){var _=t.favUsers.indexOf(e.key);"1"===e.value?_<0&&t.favUsers.push(e.key):_>=0&&t.favUsers.splice(_,1)}}else console.log("invalid setting",e)}))}},{key:"genAndSaveDefaultConversationInfo",value:function(e){var t=this._findConversationInfoIndex(e);if(-1!==t)return this.conversationInfos[t];var n=new p.default;n.conversation=e,n.timestamp=d.default.ZERO,n.unreadCount=new b.default;var r=e.conversationType+"-"+e.line+"-"+e.target,i=this.getUserSetting(A.default.ConversationSilent,r);i&&"1"===i.value&&(n.isSilent=!0);var o=this.getUserSetting(A.default.ConversationTop,r);return o&&o.value&&(n.top=Number(o.value)),this.conversationInfos.push(n),n}},{key:"updateDeliveries",value:function(e){var t=this;e.forEach((function(e){t.deliveries.set(e.fromUser,e.receiveTime)}))}},{key:"getUserDelivery",value:function(e){return this.deliveries.get(e)}},{key:"getConversationDelivery",value:function(e){var t=new l.default;if(0===e.type){var n=this.getUserDelivery(e.target);n&&t.set(e.target,n)}else if(1===e.type){var r=this.getGroupMemberIds(e.target);this.deliveries.forEach((function(e,n){r.indexOf(n)>=0&&t.set(n,e)}))}return t}},{key:"updateReads",value:function(e){var t=this;e.forEach((function(e){0===e.conversation.type&&(e.conversation.target=e.fromUser);var n=t.genConversationKey(e.conversation),r=t.readEntries.get(n);r||(r=new l.default,t.readEntries.set(n,r)),r.set(e.fromUser,e.readTime)}))}},{key:"saveSyncReadEntry",value:function(e,t,n,r,i){var o=this.syncReadId++,s=new C.default;return s.id=o,s.type=e,s.target=t,s.line=n,s.senders=i,this.syncReadEntries.set(o,s),o}},{key:"deleteSyncReadEntry",value:function(e){this.syncReadEntries.delete(e)}},{key:"getSyncReadEntries",value:function(){return this.syncReadEntries}},{key:"loadSyncReadEntry",value:function(){return this.syncReadEntries.values().next().value}},{key:"_genSyncReadEntryKey",value:function(e){return e.type+"@"+e.target+"@"+e.line}},{key:"getConversationRead",value:function(e){var t=this._genSyncReadEntryKey(e);return this.readEntries.get(t)}},{key:"getUserSetting",value:function(e,t){var n=this.settings.filter((function(n){return n.scope===e&&n.key===t}));return n.length>0?n[n.length-1]:null}},{key:"getUserSettings",value:function(e){return this.settings.filter((function(t){return t.scope===e}))}},{key:"removeUserSetting",value:function(e,t){this.settings=this.settings.filter((function(n){return!(n.scope===e&&n.key===t)}))}},{key:"getFriendRequestMaxDt",value:function(){var e=d.default.ZERO;return this.friendRequests.forEach((function(t){e=(0,k.gt)(t.timestamp,e)?t.timestamp:e})),e}},{key:"insertOrReplaceFriendRequest",value:function(e){for(var t=-1,n=0;n=0?this.friendRequests[t]=e:this.friendRequests.push(e)}},{key:"getIncommingFriendRequest",value:function(){return this.friendRequests.filter((function(e){return 1===e.direction}))}},{key:"getOutgoingFriendRequest",value:function(){return this.friendRequests.filter((function(e){return 0===e.direction}))}},{key:"getOneFriendRequest",value:function(e,t){var n=this.friendRequests.filter((function(n){return n.target===e&&n.direction===(t?1:0)}));return n.length>0?n[0]:null}},{key:"getUnreadFriendRequestCount",value:function(){var e=0;return this.friendRequests.forEach((function(t){1===t.direction&&0===t.readStatus&&e++})),e}},{key:"clearUnreadFriendRequestStatus",value:function(){var e=0;return this.friendRequests.forEach((function(t){1===t.direction&&0===t.readStatus&&(t.readStatus=1,e++)})),e}},{key:"updateFriendRequestStatus",value:function(e,t){this.friendRequests.forEach((function(n){n.target===e&&1===n.direction&&(n.status=t)}))}},{key:"getUnreadFriendRequestMaxDt",value:function(){var e=d.default.ZERO;return this.friendRequests.forEach((function(t){1===t.direction&&0===t.readStatus&&(e=(0,k.gt)(t.timestamp,e)?t.timestamp:e)})),e}},{key:"getGroupMessageHead",value:function(e,t){var n=this.groupHeadEntries.get(e+"-"+t);return n?n.head:d.default.ZERO}},{key:"setGroupMessageHead",value:function(e,t,n){var r=e+"-"+t,i=this.groupHeadEntries.get(r);i||(i=new N.default,this.groupHeadEntries.set(r,i)),i.target=e,i.line=t,i.head=n}},{key:"setGroupMessageServerHead",value:function(e,t,n){var r=e+"-"+t,i=this.groupHeadEntries.get(r);i||(i=new N.default,this.groupHeadEntries.set(r,i)),i.target=e,i.line=t,i.serverHead=n}},{key:"getGroupMessageHeads",value:function(){var e=[];return this.groupHeadEntries.forEach((function(t,n){(0,k.gt)(t.serverHead,t.head)&&e.push(t)})),e}},{key:"setDomainInfo",value:function(e){this.domainInfos.set(e.domainId,e)}},{key:"getDomainInfo",value:function(e){var t=this.domainInfos.get(e);return t||(t=new j.default(e)),t}},{key:"log",value:function(e){if(!M.default.DISABLE_LOG){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i{var r=o(n(696)),i=o(n(9708));function o(e){return e&&e.__esModule?e:{default:e}}var s=n(7328),a=s.Reader,l=s.Writer,u=s.util,c=s.roots.default||(s.roots.default={});c.AddFriendRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetUid=e.string();break;case 2:r.reason=e.string();break;case 3:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("targetUid"))throw u.ProtocolError("missing required 'targetUid'",{instance:r});if(!r.hasOwnProperty("reason"))throw u.ProtocolError("missing required 'reason'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.targetUid)?u.isString(e.reason)?null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"reason: string expected":"targetUid: string expected"},e.fromObject=function(e){if(e instanceof c.AddFriendRequest)return e;var t=new c.AddFriendRequest;return null!=e.targetUid&&(t.targetUid=String(e.targetUid)),null!=e.reason&&(t.reason=String(e.reason)),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.targetUid="",n.reason="",n.extra=""),null!=e.targetUid&&e.hasOwnProperty("targetUid")&&(n.targetUid=e.targetUid),null!=e.reason&&e.hasOwnProperty("reason")&&(n.reason=e.reason),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.Conversation=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.type=e.int32();break;case 2:r.target=e.string();break;case 3:r.line=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("target"))throw u.ProtocolError("missing required 'target'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.type)?u.isString(e.target)?u.isInteger(e.line)?null:"line: integer expected":"target: string expected":"type: integer expected"},e.fromObject=function(e){if(e instanceof c.Conversation)return e;var t=new c.Conversation;return null!=e.type&&(t.type=0|e.type),null!=e.target&&(t.target=String(e.target)),null!=e.line&&(t.line=0|e.line),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.target="",n.line=0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.target&&e.hasOwnProperty("target")&&(n.target=e.target),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GroupInfo=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetId=e.string();break;case 2:r.name=e.string();break;case 3:r.portrait=e.string();break;case 4:r.owner=e.string();break;case 5:r.type=e.int32();break;case 6:r.memberCount=e.int32();break;case 7:r.extra=e.string();break;case 8:r.updateDt=e.int64();break;case 9:r.memberUpdateDt=e.int64();break;case 10:r.mute=e.int32();break;case 11:r.joinType=e.int32();break;case 12:r.privateChat=e.int32();break;case 13:r.searchable=e.int32();break;case 14:r.maxMemberCount=e.int32();break;case 15:r.historyMessage=e.int32();break;case 16:r.superGroup=e.int32();break;case 17:r.deleted=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("name"))throw u.ProtocolError("missing required 'name'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.targetId&&e.hasOwnProperty("targetId")&&!u.isString(e.targetId)?"targetId: string expected":u.isString(e.name)?null!=e.portrait&&e.hasOwnProperty("portrait")&&!u.isString(e.portrait)?"portrait: string expected":null!=e.owner&&e.hasOwnProperty("owner")&&!u.isString(e.owner)?"owner: string expected":u.isInteger(e.type)?null!=e.memberCount&&e.hasOwnProperty("memberCount")&&!u.isInteger(e.memberCount)?"memberCount: integer expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null!=e.memberUpdateDt&&e.hasOwnProperty("memberUpdateDt")&&!(u.isInteger(e.memberUpdateDt)||e.memberUpdateDt&&u.isInteger(e.memberUpdateDt.low)&&u.isInteger(e.memberUpdateDt.high))?"memberUpdateDt: integer|Long expected":null!=e.mute&&e.hasOwnProperty("mute")&&!u.isInteger(e.mute)?"mute: integer expected":null!=e.joinType&&e.hasOwnProperty("joinType")&&!u.isInteger(e.joinType)?"joinType: integer expected":null!=e.privateChat&&e.hasOwnProperty("privateChat")&&!u.isInteger(e.privateChat)?"privateChat: integer expected":null!=e.searchable&&e.hasOwnProperty("searchable")&&!u.isInteger(e.searchable)?"searchable: integer expected":null!=e.maxMemberCount&&e.hasOwnProperty("maxMemberCount")&&!u.isInteger(e.maxMemberCount)?"maxMemberCount: integer expected":null!=e.historyMessage&&e.hasOwnProperty("historyMessage")&&!u.isInteger(e.historyMessage)?"historyMessage: integer expected":null!=e.superGroup&&e.hasOwnProperty("superGroup")&&!u.isInteger(e.superGroup)?"superGroup: integer expected":null!=e.deleted&&e.hasOwnProperty("deleted")&&!u.isInteger(e.deleted)?"deleted: integer expected":null:"type: integer expected":"name: string expected"},e.fromObject=function(e){if(e instanceof c.GroupInfo)return e;var t=new c.GroupInfo;return null!=e.targetId&&(t.targetId=String(e.targetId)),null!=e.name&&(t.name=String(e.name)),null!=e.portrait&&(t.portrait=String(e.portrait)),null!=e.owner&&(t.owner=String(e.owner)),null!=e.type&&(t.type=0|e.type),null!=e.memberCount&&(t.memberCount=0|e.memberCount),null!=e.extra&&(t.extra=String(e.extra)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.memberUpdateDt&&(u.Long?(t.memberUpdateDt=u.Long.fromValue(e.memberUpdateDt)).unsigned=!1:"string"==typeof e.memberUpdateDt?t.memberUpdateDt=parseInt(e.memberUpdateDt,10):"number"==typeof e.memberUpdateDt?t.memberUpdateDt=e.memberUpdateDt:"object"===(0,r.default)(e.memberUpdateDt)&&(t.memberUpdateDt=new u.LongBits(e.memberUpdateDt.low>>>0,e.memberUpdateDt.high>>>0).toNumber())),null!=e.mute&&(t.mute=0|e.mute),null!=e.joinType&&(t.joinType=0|e.joinType),null!=e.privateChat&&(t.privateChat=0|e.privateChat),null!=e.searchable&&(t.searchable=0|e.searchable),null!=e.maxMemberCount&&(t.maxMemberCount=0|e.maxMemberCount),null!=e.historyMessage&&(t.historyMessage=0|e.historyMessage),null!=e.superGroup&&(t.superGroup=0|e.superGroup),null!=e.deleted&&(t.deleted=0|e.deleted),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.targetId="",n.name="",n.portrait="",n.owner="",n.type=0,n.memberCount=0,n.extra="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.memberUpdateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.memberUpdateDt=t.longs===String?"0":0,n.mute=0,n.joinType=0,n.privateChat=0,n.searchable=0,n.maxMemberCount=0,n.historyMessage=0,n.superGroup=0,n.deleted=0}return null!=e.targetId&&e.hasOwnProperty("targetId")&&(n.targetId=e.targetId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.portrait&&e.hasOwnProperty("portrait")&&(n.portrait=e.portrait),null!=e.owner&&e.hasOwnProperty("owner")&&(n.owner=e.owner),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.memberCount&&e.hasOwnProperty("memberCount")&&(n.memberCount=e.memberCount),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.memberUpdateDt&&e.hasOwnProperty("memberUpdateDt")&&("number"==typeof e.memberUpdateDt?n.memberUpdateDt=t.longs===String?String(e.memberUpdateDt):e.memberUpdateDt:n.memberUpdateDt=t.longs===String?u.Long.prototype.toString.call(e.memberUpdateDt):t.longs===Number?new u.LongBits(e.memberUpdateDt.low>>>0,e.memberUpdateDt.high>>>0).toNumber():e.memberUpdateDt),null!=e.mute&&e.hasOwnProperty("mute")&&(n.mute=e.mute),null!=e.joinType&&e.hasOwnProperty("joinType")&&(n.joinType=e.joinType),null!=e.privateChat&&e.hasOwnProperty("privateChat")&&(n.privateChat=e.privateChat),null!=e.searchable&&e.hasOwnProperty("searchable")&&(n.searchable=e.searchable),null!=e.maxMemberCount&&e.hasOwnProperty("maxMemberCount")&&(n.maxMemberCount=e.maxMemberCount),null!=e.historyMessage&&e.hasOwnProperty("historyMessage")&&(n.historyMessage=e.historyMessage),null!=e.superGroup&&e.hasOwnProperty("superGroup")&&(n.superGroup=e.superGroup),null!=e.deleted&&e.hasOwnProperty("deleted")&&(n.deleted=e.deleted),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GroupMember=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.memberId=e.string();break;case 2:r.alias=e.string();break;case 3:r.type=e.int32();break;case 4:r.updateDt=e.int64();break;case 5:r.createDt=e.int64();break;case 6:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("memberId"))throw u.ProtocolError("missing required 'memberId'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.memberId)?null!=e.alias&&e.hasOwnProperty("alias")&&!u.isString(e.alias)?"alias: string expected":u.isInteger(e.type)?null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null!=e.createDt&&e.hasOwnProperty("createDt")&&!(u.isInteger(e.createDt)||e.createDt&&u.isInteger(e.createDt.low)&&u.isInteger(e.createDt.high))?"createDt: integer|Long expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"type: integer expected":"memberId: string expected"},e.fromObject=function(e){if(e instanceof c.GroupMember)return e;var t=new c.GroupMember;return null!=e.memberId&&(t.memberId=String(e.memberId)),null!=e.alias&&(t.alias=String(e.alias)),null!=e.type&&(t.type=0|e.type),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.createDt&&(u.Long?(t.createDt=u.Long.fromValue(e.createDt)).unsigned=!1:"string"==typeof e.createDt?t.createDt=parseInt(e.createDt,10):"number"==typeof e.createDt?t.createDt=e.createDt:"object"===(0,r.default)(e.createDt)&&(t.createDt=new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber())),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.memberId="",n.alias="",n.type=0,u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.createDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.createDt=t.longs===String?"0":0,n.extra=""}return null!=e.memberId&&e.hasOwnProperty("memberId")&&(n.memberId=e.memberId),null!=e.alias&&e.hasOwnProperty("alias")&&(n.alias=e.alias),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.createDt&&e.hasOwnProperty("createDt")&&("number"==typeof e.createDt?n.createDt=t.longs===String?String(e.createDt):e.createDt:n.createDt=t.longs===String?u.Long.prototype.toString.call(e.createDt):t.longs===Number?new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber():e.createDt),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.Group=function(){function e(e){if(this.members=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.groupInfo=c.GroupInfo.decode(e,e.uint32());break;case 2:r.members&&r.members.length||(r.members=[]),r.members.push(c.GroupMember.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("groupInfo"))throw u.ProtocolError("missing required 'groupInfo'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(n=c.GroupInfo.verify(e.groupInfo))return"groupInfo."+n;if(null!=e.members&&e.hasOwnProperty("members")){if(!Array.isArray(e.members))return"members: array expected";for(var t=0;t>>3){case 1:r.type=e.string();break;case 2:r.name=e.string();break;case 3:r.key=e.string();break;case 4:r.url=e.string();break;case 5:r.mediaId=e.string();break;case 6:r.articleId=e.string();break;case 7:r.appId=e.string();break;case 8:r.appPage=e.string();break;case 9:r.subMenu&&r.subMenu.length||(r.subMenu=[]),r.subMenu.push(c.ChannelMenu.decode(e,e.uint32()));break;case 10:r.menuId=e.string();break;case 11:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("name"))throw u.ProtocolError("missing required 'name'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.type))return"type: string expected";if(!u.isString(e.name))return"name: string expected";if(null!=e.key&&e.hasOwnProperty("key")&&!u.isString(e.key))return"key: string expected";if(null!=e.url&&e.hasOwnProperty("url")&&!u.isString(e.url))return"url: string expected";if(null!=e.mediaId&&e.hasOwnProperty("mediaId")&&!u.isString(e.mediaId))return"mediaId: string expected";if(null!=e.articleId&&e.hasOwnProperty("articleId")&&!u.isString(e.articleId))return"articleId: string expected";if(null!=e.appId&&e.hasOwnProperty("appId")&&!u.isString(e.appId))return"appId: string expected";if(null!=e.appPage&&e.hasOwnProperty("appPage")&&!u.isString(e.appPage))return"appPage: string expected";if(null!=e.subMenu&&e.hasOwnProperty("subMenu")){if(!Array.isArray(e.subMenu))return"subMenu: array expected";for(var t=0;t>>3==1?(r.menu&&r.menu.length||(r.menu=[]),r.menu.push(c.ChannelMenu.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.menu&&e.hasOwnProperty("menu")){if(!Array.isArray(e.menu))return"menu: array expected";for(var t=0;t>>3){case 1:r.targetId=e.string();break;case 2:r.name=e.string();break;case 3:r.portrait=e.string();break;case 4:r.owner=e.string();break;case 5:r.status=e.int32();break;case 6:r.desc=e.string();break;case 7:r.extra=e.string();break;case 8:r.updateDt=e.int64();break;case 9:r.secret=e.string();break;case 10:r.callback=e.string();break;case 11:r.automatic=e.int32();break;case 12:r.menu&&r.menu.length||(r.menu=[]),r.menu.push(c.ChannelMenu.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("name"))throw u.ProtocolError("missing required 'name'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.targetId&&e.hasOwnProperty("targetId")&&!u.isString(e.targetId))return"targetId: string expected";if(!u.isString(e.name))return"name: string expected";if(null!=e.portrait&&e.hasOwnProperty("portrait")&&!u.isString(e.portrait))return"portrait: string expected";if(null!=e.owner&&e.hasOwnProperty("owner")&&!u.isString(e.owner))return"owner: string expected";if(null!=e.status&&e.hasOwnProperty("status")&&!u.isInteger(e.status))return"status: integer expected";if(null!=e.desc&&e.hasOwnProperty("desc")&&!u.isString(e.desc))return"desc: string expected";if(null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra))return"extra: string expected";if(null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high)))return"updateDt: integer|Long expected";if(null!=e.secret&&e.hasOwnProperty("secret")&&!u.isString(e.secret))return"secret: string expected";if(null!=e.callback&&e.hasOwnProperty("callback")&&!u.isString(e.callback))return"callback: string expected";if(null!=e.automatic&&e.hasOwnProperty("automatic")&&!u.isInteger(e.automatic))return"automatic: integer expected";if(null!=e.menu&&e.hasOwnProperty("menu")){if(!Array.isArray(e.menu))return"menu: array expected";for(var t=0;t>>0,e.updateDt.high>>>0).toNumber())),null!=e.secret&&(t.secret=String(e.secret)),null!=e.callback&&(t.callback=String(e.callback)),null!=e.automatic&&(t.automatic=0|e.automatic),e.menu){if(!Array.isArray(e.menu))throw TypeError(".ChannelInfo.menu: array expected");t.menu=[];for(var n=0;n>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.secret&&e.hasOwnProperty("secret")&&(n.secret=e.secret),null!=e.callback&&e.hasOwnProperty("callback")&&(n.callback=e.callback),null!=e.automatic&&e.hasOwnProperty("automatic")&&(n.automatic=e.automatic),e.menu&&e.menu.length){n.menu=[];for(var i=0;i>>3){case 1:r.channelId=e.string();break;case 2:r.type=e.int32();break;case 3:r.value=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("channelId"))throw u.ProtocolError("missing required 'channelId'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("value"))throw u.ProtocolError("missing required 'value'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.channelId)?u.isInteger(e.type)?u.isString(e.value)?null:"value: string expected":"type: integer expected":"channelId: string expected"},e.fromObject=function(e){if(e instanceof c.ModifyChannelInfo)return e;var t=new c.ModifyChannelInfo;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.type&&(t.type=0|e.type),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.type=0,n.value=""),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.TransferChannel=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.newOwner=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("channelId"))throw u.ProtocolError("missing required 'channelId'",{instance:r});if(!r.hasOwnProperty("newOwner"))throw u.ProtocolError("missing required 'newOwner'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.channelId)?u.isString(e.newOwner)?null:"newOwner: string expected":"channelId: string expected"},e.fromObject=function(e){if(e instanceof c.TransferChannel)return e;var t=new c.TransferChannel;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.newOwner&&(t.newOwner=String(e.newOwner)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.newOwner=""),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.newOwner&&e.hasOwnProperty("newOwner")&&(n.newOwner=e.newOwner),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullChannelInfo=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.head=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("channelId"))throw u.ProtocolError("missing required 'channelId'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.channelId)?u.isInteger(e.head)||e.head&&u.isInteger(e.head.low)&&u.isInteger(e.head.high)?null:"head: integer|Long expected":"channelId: string expected"},e.fromObject=function(e){if(e instanceof c.PullChannelInfo)return e;var t=new c.PullChannelInfo;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.channelId="",u.Long){var r=new u.Long(0,0,!1);n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.head=t.longs===String?"0":0;return null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullChannelListener=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.channelId=e.string();break;case 2:r.offset=e.int32();break;case 3:r.count=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("channelId"))throw u.ProtocolError("missing required 'channelId'",{instance:r});if(!r.hasOwnProperty("offset"))throw u.ProtocolError("missing required 'offset'",{instance:r});if(!r.hasOwnProperty("count"))throw u.ProtocolError("missing required 'count'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.channelId)?u.isInteger(e.offset)?u.isInteger(e.count)?null:"count: integer expected":"offset: integer expected":"channelId: string expected"},e.fromObject=function(e){if(e instanceof c.PullChannelListener)return e;var t=new c.PullChannelListener;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.offset&&(t.offset=0|e.offset),null!=e.count&&(t.count=0|e.count),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.offset=0,n.count=0),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullChannelListenerResult=function(){function e(e){if(this.listener=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.totalCount=e.int32();break;case 2:r.offset=e.int32();break;case 3:r.listener&&r.listener.length||(r.listener=[]),r.listener.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("totalCount"))throw u.ProtocolError("missing required 'totalCount'",{instance:r});if(!r.hasOwnProperty("offset"))throw u.ProtocolError("missing required 'offset'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isInteger(e.totalCount))return"totalCount: integer expected";if(!u.isInteger(e.offset))return"offset: integer expected";if(null!=e.listener&&e.hasOwnProperty("listener")){if(!Array.isArray(e.listener))return"listener: array expected";for(var t=0;t>>3){case 1:r.channelId=e.string();break;case 2:r.listen=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("channelId"))throw u.ProtocolError("missing required 'channelId'",{instance:r});if(!r.hasOwnProperty("listen"))throw u.ProtocolError("missing required 'listen'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.channelId)?u.isInteger(e.listen)?null:"listen: integer expected":"channelId: string expected"},e.fromObject=function(e){if(e instanceof c.ListenChannel)return e;var t=new c.ListenChannel;return null!=e.channelId&&(t.channelId=String(e.channelId)),null!=e.listen&&(t.listen=0|e.listen),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.channelId="",n.listen=0),null!=e.channelId&&e.hasOwnProperty("channelId")&&(n.channelId=e.channelId),null!=e.listen&&e.hasOwnProperty("listen")&&(n.listen=e.listen),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.SearchChannelResult=function(){function e(e){if(this.channel=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.channel&&r.channel.length||(r.channel=[]),r.channel.push(c.ChannelInfo.decode(e,e.uint32()));break;case 2:r.keyword=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("keyword"))throw u.ProtocolError("missing required 'keyword'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.channel&&e.hasOwnProperty("channel")){if(!Array.isArray(e.channel))return"channel: array expected";for(var t=0;t>>3){case 1:r.type=e.int32();break;case 2:r.searchableContent=e.string();break;case 3:r.pushContent=e.string();break;case 4:r.content=e.string();break;case 5:r.data=e.bytes();break;case 6:r.mediaType=e.int32();break;case 7:r.remoteMediaUrl=e.string();break;case 8:r.persistFlag=e.int32();break;case 9:r.expireDuration=e.int32();break;case 10:r.mentionedType=e.int32();break;case 11:r.mentionedTarget&&r.mentionedTarget.length||(r.mentionedTarget=[]),r.mentionedTarget.push(e.string());break;case 12:r.extra=e.string();break;case 13:r.pushData=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isInteger(e.type))return"type: integer expected";if(null!=e.searchableContent&&e.hasOwnProperty("searchableContent")&&!u.isString(e.searchableContent))return"searchableContent: string expected";if(null!=e.pushContent&&e.hasOwnProperty("pushContent")&&!u.isString(e.pushContent))return"pushContent: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&!u.isString(e.content))return"content: string expected";if(null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||u.isString(e.data)))return"data: buffer expected";if(null!=e.mediaType&&e.hasOwnProperty("mediaType")&&!u.isInteger(e.mediaType))return"mediaType: integer expected";if(null!=e.remoteMediaUrl&&e.hasOwnProperty("remoteMediaUrl")&&!u.isString(e.remoteMediaUrl))return"remoteMediaUrl: string expected";if(null!=e.persistFlag&&e.hasOwnProperty("persistFlag")&&!u.isInteger(e.persistFlag))return"persistFlag: integer expected";if(null!=e.expireDuration&&e.hasOwnProperty("expireDuration")&&!u.isInteger(e.expireDuration))return"expireDuration: integer expected";if(null!=e.mentionedType&&e.hasOwnProperty("mentionedType")&&!u.isInteger(e.mentionedType))return"mentionedType: integer expected";if(null!=e.mentionedTarget&&e.hasOwnProperty("mentionedTarget")){if(!Array.isArray(e.mentionedTarget))return"mentionedTarget: array expected";for(var t=0;t>>3){case 1:r.groupId=e.string();break;case 2:r.addedMember&&r.addedMember.length||(r.addedMember=[]),r.addedMember.push(c.GroupMember.decode(e,e.uint32()));break;case 3:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.group=c.Group.decode(e,e.uint32());break;case 2:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.fromUid=e.string();break;case 2:r.toUid=e.string();break;case 3:r.reason=e.string();break;case 4:r.status=e.int32();break;case 5:r.updateDt=e.int64();break;case 6:r.fromReadStatus=e.bool();break;case 7:r.toReadStatus=e.bool();break;case 8:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("toUid"))throw u.ProtocolError("missing required 'toUid'",{instance:r});if(!r.hasOwnProperty("reason"))throw u.ProtocolError("missing required 'reason'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.fromUid&&e.hasOwnProperty("fromUid")&&!u.isString(e.fromUid)?"fromUid: string expected":u.isString(e.toUid)?u.isString(e.reason)?null!=e.status&&e.hasOwnProperty("status")&&!u.isInteger(e.status)?"status: integer expected":null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null!=e.fromReadStatus&&e.hasOwnProperty("fromReadStatus")&&"boolean"!=typeof e.fromReadStatus?"fromReadStatus: boolean expected":null!=e.toReadStatus&&e.hasOwnProperty("toReadStatus")&&"boolean"!=typeof e.toReadStatus?"toReadStatus: boolean expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"reason: string expected":"toUid: string expected"},e.fromObject=function(e){if(e instanceof c.FriendRequest)return e;var t=new c.FriendRequest;return null!=e.fromUid&&(t.fromUid=String(e.fromUid)),null!=e.toUid&&(t.toUid=String(e.toUid)),null!=e.reason&&(t.reason=String(e.reason)),null!=e.status&&(t.status=0|e.status),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.fromReadStatus&&(t.fromReadStatus=Boolean(e.fromReadStatus)),null!=e.toReadStatus&&(t.toReadStatus=Boolean(e.toReadStatus)),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.fromUid="",n.toUid="",n.reason="",n.status=0,u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;n.fromReadStatus=!1,n.toReadStatus=!1,n.extra=""}return null!=e.fromUid&&e.hasOwnProperty("fromUid")&&(n.fromUid=e.fromUid),null!=e.toUid&&e.hasOwnProperty("toUid")&&(n.toUid=e.toUid),null!=e.reason&&e.hasOwnProperty("reason")&&(n.reason=e.reason),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.fromReadStatus&&e.hasOwnProperty("fromReadStatus")&&(n.fromReadStatus=e.fromReadStatus),null!=e.toReadStatus&&e.hasOwnProperty("toReadStatus")&&(n.toReadStatus=e.toReadStatus),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GeneralResult=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3==1?r.errorCode=e.int32():e.skipType(7&i)}if(!r.hasOwnProperty("errorCode"))throw u.ProtocolError("missing required 'errorCode'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.errorCode)?null:"errorCode: integer expected"},e.fromObject=function(e){if(e instanceof c.GeneralResult)return e;var t=new c.GeneralResult;return null!=e.errorCode&&(t.errorCode=0|e.errorCode),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.errorCode=0),null!=e.errorCode&&e.hasOwnProperty("errorCode")&&(n.errorCode=e.errorCode),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetUploadTokenRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.mediaType=e.int32();break;case 2:r.mediaPath=e.string();break;case 3:r.contentType=e.string();break;case 4:r.messageId=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("mediaType"))throw u.ProtocolError("missing required 'mediaType'",{instance:r});if(!r.hasOwnProperty("mediaPath"))throw u.ProtocolError("missing required 'mediaPath'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.mediaType)?u.isString(e.mediaPath)?null!=e.contentType&&e.hasOwnProperty("contentType")&&!u.isString(e.contentType)?"contentType: string expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high))?"messageId: integer|Long expected":null:"mediaPath: string expected":"mediaType: integer expected"},e.fromObject=function(e){if(e instanceof c.GetUploadTokenRequest)return e;var t=new c.GetUploadTokenRequest;return null!=e.mediaType&&(t.mediaType=0|e.mediaType),null!=e.mediaPath&&(t.mediaPath=String(e.mediaPath)),null!=e.contentType&&(t.contentType=String(e.contentType)),null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.mediaType=0,n.mediaPath="",n.contentType="",u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;return null!=e.mediaType&&e.hasOwnProperty("mediaType")&&(n.mediaType=e.mediaType),null!=e.mediaPath&&e.hasOwnProperty("mediaPath")&&(n.mediaPath=e.mediaPath),null!=e.contentType&&e.hasOwnProperty("contentType")&&(n.contentType=e.contentType),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetUploadTokenResult=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.domain=e.string();break;case 2:r.token=e.string();break;case 3:r.server=e.string();break;case 4:r.port=e.int32();break;case 5:r.type=e.int32();break;case 6:r.date=e.string();break;case 7:r.path=e.string();break;case 8:r.backupServer=e.string();break;case 9:r.backupPort=e.int32();break;case 10:r.sslPort=e.int32();break;case 11:r.backupSslPort=e.int32();break;case 12:r.sslToken=e.string();break;case 13:r.backupToken=e.string();break;case 14:r.backupSslToken=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("domain"))throw u.ProtocolError("missing required 'domain'",{instance:r});if(!r.hasOwnProperty("token"))throw u.ProtocolError("missing required 'token'",{instance:r});if(!r.hasOwnProperty("server"))throw u.ProtocolError("missing required 'server'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.domain)?u.isString(e.token)?u.isString(e.server)?null!=e.port&&e.hasOwnProperty("port")&&!u.isInteger(e.port)?"port: integer expected":null!=e.type&&e.hasOwnProperty("type")&&!u.isInteger(e.type)?"type: integer expected":null!=e.date&&e.hasOwnProperty("date")&&!u.isString(e.date)?"date: string expected":null!=e.path&&e.hasOwnProperty("path")&&!u.isString(e.path)?"path: string expected":null!=e.backupServer&&e.hasOwnProperty("backupServer")&&!u.isString(e.backupServer)?"backupServer: string expected":null!=e.backupPort&&e.hasOwnProperty("backupPort")&&!u.isInteger(e.backupPort)?"backupPort: integer expected":null!=e.sslPort&&e.hasOwnProperty("sslPort")&&!u.isInteger(e.sslPort)?"sslPort: integer expected":null!=e.backupSslPort&&e.hasOwnProperty("backupSslPort")&&!u.isInteger(e.backupSslPort)?"backupSslPort: integer expected":null!=e.sslToken&&e.hasOwnProperty("sslToken")&&!u.isString(e.sslToken)?"sslToken: string expected":null!=e.backupToken&&e.hasOwnProperty("backupToken")&&!u.isString(e.backupToken)?"backupToken: string expected":null!=e.backupSslToken&&e.hasOwnProperty("backupSslToken")&&!u.isString(e.backupSslToken)?"backupSslToken: string expected":null:"server: string expected":"token: string expected":"domain: string expected"},e.fromObject=function(e){if(e instanceof c.GetUploadTokenResult)return e;var t=new c.GetUploadTokenResult;return null!=e.domain&&(t.domain=String(e.domain)),null!=e.token&&(t.token=String(e.token)),null!=e.server&&(t.server=String(e.server)),null!=e.port&&(t.port=0|e.port),null!=e.type&&(t.type=0|e.type),null!=e.date&&(t.date=String(e.date)),null!=e.path&&(t.path=String(e.path)),null!=e.backupServer&&(t.backupServer=String(e.backupServer)),null!=e.backupPort&&(t.backupPort=0|e.backupPort),null!=e.sslPort&&(t.sslPort=0|e.sslPort),null!=e.backupSslPort&&(t.backupSslPort=0|e.backupSslPort),null!=e.sslToken&&(t.sslToken=String(e.sslToken)),null!=e.backupToken&&(t.backupToken=String(e.backupToken)),null!=e.backupSslToken&&(t.backupSslToken=String(e.backupSslToken)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.domain="",n.token="",n.server="",n.port=0,n.type=0,n.date="",n.path="",n.backupServer="",n.backupPort=0,n.sslPort=0,n.backupSslPort=0,n.sslToken="",n.backupToken="",n.backupSslToken=""),null!=e.domain&&e.hasOwnProperty("domain")&&(n.domain=e.domain),null!=e.token&&e.hasOwnProperty("token")&&(n.token=e.token),null!=e.server&&e.hasOwnProperty("server")&&(n.server=e.server),null!=e.port&&e.hasOwnProperty("port")&&(n.port=e.port),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.date&&e.hasOwnProperty("date")&&(n.date=e.date),null!=e.path&&e.hasOwnProperty("path")&&(n.path=e.path),null!=e.backupServer&&e.hasOwnProperty("backupServer")&&(n.backupServer=e.backupServer),null!=e.backupPort&&e.hasOwnProperty("backupPort")&&(n.backupPort=e.backupPort),null!=e.sslPort&&e.hasOwnProperty("sslPort")&&(n.sslPort=e.sslPort),null!=e.backupSslPort&&e.hasOwnProperty("backupSslPort")&&(n.backupSslPort=e.backupSslPort),null!=e.sslToken&&e.hasOwnProperty("sslToken")&&(n.sslToken=e.sslToken),null!=e.backupToken&&e.hasOwnProperty("backupToken")&&(n.backupToken=e.backupToken),null!=e.backupSslToken&&e.hasOwnProperty("backupSslToken")&&(n.backupSslToken=e.backupSslToken),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetPresignedUrlResult=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.presignedUrl=e.string();break;case 2:r.mediaUrl=e.string();break;case 3:r.backupPresignedUrl=e.string();break;case 4:r.type=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("presignedUrl"))throw u.ProtocolError("missing required 'presignedUrl'",{instance:r});if(!r.hasOwnProperty("mediaUrl"))throw u.ProtocolError("missing required 'mediaUrl'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.presignedUrl)?u.isString(e.mediaUrl)?null!=e.backupPresignedUrl&&e.hasOwnProperty("backupPresignedUrl")&&!u.isString(e.backupPresignedUrl)?"backupPresignedUrl: string expected":null!=e.type&&e.hasOwnProperty("type")&&!u.isInteger(e.type)?"type: integer expected":null:"mediaUrl: string expected":"presignedUrl: string expected"},e.fromObject=function(e){if(e instanceof c.GetPresignedUrlResult)return e;var t=new c.GetPresignedUrlResult;return null!=e.presignedUrl&&(t.presignedUrl=String(e.presignedUrl)),null!=e.mediaUrl&&(t.mediaUrl=String(e.mediaUrl)),null!=e.backupPresignedUrl&&(t.backupPresignedUrl=String(e.backupPresignedUrl)),null!=e.type&&(t.type=0|e.type),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.presignedUrl="",n.mediaUrl="",n.backupPresignedUrl="",n.type=0),null!=e.presignedUrl&&e.hasOwnProperty("presignedUrl")&&(n.presignedUrl=e.presignedUrl),null!=e.mediaUrl&&e.hasOwnProperty("mediaUrl")&&(n.mediaUrl=e.mediaUrl),null!=e.backupPresignedUrl&&e.hasOwnProperty("backupPresignedUrl")&&(n.backupPresignedUrl=e.backupPresignedUrl),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetDownloadSignedUrlResult=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.url=e.string();break;case 2:r.backupUrl=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("url"))throw u.ProtocolError("missing required 'url'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.url)?null!=e.backupUrl&&e.hasOwnProperty("backupUrl")&&!u.isString(e.backupUrl)?"backupUrl: string expected":null:"url: string expected"},e.fromObject=function(e){if(e instanceof c.GetDownloadSignedUrlResult)return e;var t=new c.GetDownloadSignedUrlResult;return null!=e.url&&(t.url=String(e.url)),null!=e.backupUrl&&(t.backupUrl=String(e.backupUrl)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.url="",n.backupUrl=""),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.backupUrl&&e.hasOwnProperty("backupUrl")&&(n.backupUrl=e.backupUrl),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.HandleFriendRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetUid=e.string();break;case 2:r.status=e.int32();break;case 3:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("targetUid"))throw u.ProtocolError("missing required 'targetUid'",{instance:r});if(!r.hasOwnProperty("status"))throw u.ProtocolError("missing required 'status'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.targetUid)?u.isInteger(e.status)?null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"status: integer expected":"targetUid: string expected"},e.fromObject=function(e){if(e instanceof c.HandleFriendRequest)return e;var t=new c.HandleFriendRequest;return null!=e.targetUid&&(t.targetUid=String(e.targetUid)),null!=e.status&&(t.status=0|e.status),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.targetUid="",n.status=0,n.extra=""),null!=e.targetUid&&e.hasOwnProperty("targetUid")&&(n.targetUid=e.targetUid),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.IDBuf=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3==1?r.id=e.string():e.skipType(7&i)}if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.id)?null:"id: string expected"},e.fromObject=function(e){if(e instanceof c.IDBuf)return e;var t=new c.IDBuf;return null!=e.id&&(t.id=String(e.id)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.id=""),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.IDListBuf=function(){function e(e){if(this.id=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.id&&r.id.length||(r.id=[]),r.id.push(e.string())):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")){if(!Array.isArray(e.id))return"id: array expected";for(var t=0;t>>3){case 1:r.conversation=c.Conversation.decode(e,e.uint32());break;case 2:r.fromUser=e.string();break;case 3:r.content=c.MessageContent.decode(e,e.uint32());break;case 4:r.messageId=e.int64();break;case 5:r.serverTimestamp=e.int64();break;case 6:r.toUser=e.string();break;case 7:r.to&&r.to.length||(r.to=[]),r.to.push(e.string());break;case 8:r.fromId=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("conversation"))throw u.ProtocolError("missing required 'conversation'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("content"))throw u.ProtocolError("missing required 'content'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";var t;if(t=c.Conversation.verify(e.conversation))return"conversation."+t;if(!u.isString(e.fromUser))return"fromUser: string expected";if(t=c.MessageContent.verify(e.content))return"content."+t;if(null!=e.messageId&&e.hasOwnProperty("messageId")&&!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.serverTimestamp&&e.hasOwnProperty("serverTimestamp")&&!(u.isInteger(e.serverTimestamp)||e.serverTimestamp&&u.isInteger(e.serverTimestamp.low)&&u.isInteger(e.serverTimestamp.high)))return"serverTimestamp: integer|Long expected";if(null!=e.toUser&&e.hasOwnProperty("toUser")&&!u.isString(e.toUser))return"toUser: string expected";if(null!=e.to&&e.hasOwnProperty("to")){if(!Array.isArray(e.to))return"to: array expected";for(var n=0;n>>0,e.messageId.high>>>0).toNumber())),null!=e.serverTimestamp&&(u.Long?(t.serverTimestamp=u.Long.fromValue(e.serverTimestamp)).unsigned=!1:"string"==typeof e.serverTimestamp?t.serverTimestamp=parseInt(e.serverTimestamp,10):"number"==typeof e.serverTimestamp?t.serverTimestamp=e.serverTimestamp:"object"===(0,r.default)(e.serverTimestamp)&&(t.serverTimestamp=new u.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber())),null!=e.toUser&&(t.toUser=String(e.toUser)),e.to){if(!Array.isArray(e.to))throw TypeError(".Message.to: array expected");t.to=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.serverTimestamp&&e.hasOwnProperty("serverTimestamp")&&("number"==typeof e.serverTimestamp?n.serverTimestamp=t.longs===String?String(e.serverTimestamp):e.serverTimestamp:n.serverTimestamp=t.longs===String?u.Long.prototype.toString.call(e.serverTimestamp):t.longs===Number?new u.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber():e.serverTimestamp),null!=e.toUser&&e.hasOwnProperty("toUser")&&(n.toUser=e.toUser),e.to&&e.to.length){n.to=[];for(var i=0;i>>3){case 1:r.conversation=c.Conversation.decode(e,e.uint32());break;case 2:r.fromUser=e.string();break;case 3:r.readTime=e.int64();break;case 4:r.to&&r.to.length||(r.to=[]),r.to.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("conversation"))throw u.ProtocolError("missing required 'conversation'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("readTime"))throw u.ProtocolError("missing required 'readTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";var t=c.Conversation.verify(e.conversation);if(t)return"conversation."+t;if(!u.isString(e.fromUser))return"fromUser: string expected";if(!(u.isInteger(e.readTime)||e.readTime&&u.isInteger(e.readTime.low)&&u.isInteger(e.readTime.high)))return"readTime: integer|Long expected";if(null!=e.to&&e.hasOwnProperty("to")){if(!Array.isArray(e.to))return"to: array expected";for(var n=0;n>>0,e.readTime.high>>>0).toNumber())),e.to){if(!Array.isArray(e.to))throw TypeError(".ConvReadRequest.to: array expected");t.to=[];for(var n=0;n>>0,e.readTime.high>>>0).toNumber():e.readTime),e.to&&e.to.length){n.to=[];for(var i=0;i>>3){case 1:r.id=e.int32();break;case 2:r.conversation=c.Conversation.decode(e,e.uint32());break;case 3:r.fromUser=e.string();break;case 4:r.readTime=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("conversation"))throw u.ProtocolError("missing required 'conversation'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("readTime"))throw u.ProtocolError("missing required 'readTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!u.isInteger(e.id))return"id: integer expected";var t=c.Conversation.verify(e.conversation);return t?"conversation."+t:u.isString(e.fromUser)?u.isInteger(e.readTime)||e.readTime&&u.isInteger(e.readTime.low)&&u.isInteger(e.readTime.high)?null:"readTime: integer|Long expected":"fromUser: string expected"},e.fromObject=function(e){if(e instanceof c.ConvRead)return e;var t=new c.ConvRead;if(null!=e.id&&(t.id=0|e.id),null!=e.conversation){if("object"!==(0,r.default)(e.conversation))throw TypeError(".ConvRead.conversation: object expected");t.conversation=c.Conversation.fromObject(e.conversation)}return null!=e.fromUser&&(t.fromUser=String(e.fromUser)),null!=e.readTime&&(u.Long?(t.readTime=u.Long.fromValue(e.readTime)).unsigned=!1:"string"==typeof e.readTime?t.readTime=parseInt(e.readTime,10):"number"==typeof e.readTime?t.readTime=e.readTime:"object"===(0,r.default)(e.readTime)&&(t.readTime=new u.LongBits(e.readTime.low>>>0,e.readTime.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.id=0,n.conversation=null,n.fromUser="",u.Long){var r=new u.Long(0,0,!1);n.readTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.readTime=t.longs===String?"0":0;return null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.conversation&&e.hasOwnProperty("conversation")&&(n.conversation=c.Conversation.toObject(e.conversation,t)),null!=e.fromUser&&e.hasOwnProperty("fromUser")&&(n.fromUser=e.fromUser),null!=e.readTime&&e.hasOwnProperty("readTime")&&("number"==typeof e.readTime?n.readTime=t.longs===String?String(e.readTime):e.readTime:n.readTime=t.longs===String?u.Long.prototype.toString.call(e.readTime):t.longs===Number?new u.LongBits(e.readTime.low>>>0,e.readTime.high>>>0).toNumber():e.readTime),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.Delivery=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.fromUser=e.string();break;case 2:r.receiveTime=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("receiveTime"))throw u.ProtocolError("missing required 'receiveTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.fromUser)?u.isInteger(e.receiveTime)||e.receiveTime&&u.isInteger(e.receiveTime.low)&&u.isInteger(e.receiveTime.high)?null:"receiveTime: integer|Long expected":"fromUser: string expected"},e.fromObject=function(e){if(e instanceof c.Delivery)return e;var t=new c.Delivery;return null!=e.fromUser&&(t.fromUser=String(e.fromUser)),null!=e.receiveTime&&(u.Long?(t.receiveTime=u.Long.fromValue(e.receiveTime)).unsigned=!1:"string"==typeof e.receiveTime?t.receiveTime=parseInt(e.receiveTime,10):"number"==typeof e.receiveTime?t.receiveTime=e.receiveTime:"object"===(0,r.default)(e.receiveTime)&&(t.receiveTime=new u.LongBits(e.receiveTime.low>>>0,e.receiveTime.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.fromUser="",u.Long){var r=new u.Long(0,0,!1);n.receiveTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.receiveTime=t.longs===String?"0":0;return null!=e.fromUser&&e.hasOwnProperty("fromUser")&&(n.fromUser=e.fromUser),null!=e.receiveTime&&e.hasOwnProperty("receiveTime")&&("number"==typeof e.receiveTime?n.receiveTime=t.longs===String?String(e.receiveTime):e.receiveTime:n.receiveTime=t.longs===String?u.Long.prototype.toString.call(e.receiveTime):t.longs===Number?new u.LongBits(e.receiveTime.low>>>0,e.receiveTime.high>>>0).toNumber():e.receiveTime),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.NotifyDelivery=function(){function e(e){if(this.target=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.fromUser=e.string();break;case 2:r.receiveTime=e.int64();break;case 3:r.target&&r.target.length||(r.target=[]),r.target.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("receiveTime"))throw u.ProtocolError("missing required 'receiveTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.fromUser))return"fromUser: string expected";if(!(u.isInteger(e.receiveTime)||e.receiveTime&&u.isInteger(e.receiveTime.low)&&u.isInteger(e.receiveTime.high)))return"receiveTime: integer|Long expected";if(null!=e.target&&e.hasOwnProperty("target")){if(!Array.isArray(e.target))return"target: array expected";for(var t=0;t>>0,e.receiveTime.high>>>0).toNumber())),e.target){if(!Array.isArray(e.target))throw TypeError(".NotifyDelivery.target: array expected");t.target=[];for(var n=0;n>>0,e.receiveTime.high>>>0).toNumber():e.receiveTime),e.target&&e.target.length){n.target=[];for(var i=0;i>>3){case 1:r.uid=e.string();break;case 2:r.name=e.string();break;case 3:r.displayName=e.string();break;case 4:r.portrait=e.string();break;case 5:r.mobile=e.string();break;case 6:r.email=e.string();break;case 7:r.address=e.string();break;case 8:r.company=e.string();break;case 9:r.extra=e.string();break;case 10:r.updateDt=e.int64();break;case 11:r.gender=e.int32();break;case 12:r.social=e.string();break;case 13:r.type=e.int32();break;case 14:r.deleted=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.uid)?null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null!=e.displayName&&e.hasOwnProperty("displayName")&&!u.isString(e.displayName)?"displayName: string expected":null!=e.portrait&&e.hasOwnProperty("portrait")&&!u.isString(e.portrait)?"portrait: string expected":null!=e.mobile&&e.hasOwnProperty("mobile")&&!u.isString(e.mobile)?"mobile: string expected":null!=e.email&&e.hasOwnProperty("email")&&!u.isString(e.email)?"email: string expected":null!=e.address&&e.hasOwnProperty("address")&&!u.isString(e.address)?"address: string expected":null!=e.company&&e.hasOwnProperty("company")&&!u.isString(e.company)?"company: string expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null!=e.gender&&e.hasOwnProperty("gender")&&!u.isInteger(e.gender)?"gender: integer expected":null!=e.social&&e.hasOwnProperty("social")&&!u.isString(e.social)?"social: string expected":null!=e.type&&e.hasOwnProperty("type")&&!u.isInteger(e.type)?"type: integer expected":null!=e.deleted&&e.hasOwnProperty("deleted")&&!u.isInteger(e.deleted)?"deleted: integer expected":null:"uid: string expected"},e.fromObject=function(e){if(e instanceof c.User)return e;var t=new c.User;return null!=e.uid&&(t.uid=String(e.uid)),null!=e.name&&(t.name=String(e.name)),null!=e.displayName&&(t.displayName=String(e.displayName)),null!=e.portrait&&(t.portrait=String(e.portrait)),null!=e.mobile&&(t.mobile=String(e.mobile)),null!=e.email&&(t.email=String(e.email)),null!=e.address&&(t.address=String(e.address)),null!=e.company&&(t.company=String(e.company)),null!=e.extra&&(t.extra=String(e.extra)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.gender&&(t.gender=0|e.gender),null!=e.social&&(t.social=String(e.social)),null!=e.type&&(t.type=0|e.type),null!=e.deleted&&(t.deleted=0|e.deleted),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.uid="",n.name="",n.displayName="",n.portrait="",n.mobile="",n.email="",n.address="",n.company="",n.extra="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;n.gender=0,n.social="",n.type=0,n.deleted=0}return null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.displayName&&e.hasOwnProperty("displayName")&&(n.displayName=e.displayName),null!=e.portrait&&e.hasOwnProperty("portrait")&&(n.portrait=e.portrait),null!=e.mobile&&e.hasOwnProperty("mobile")&&(n.mobile=e.mobile),null!=e.email&&e.hasOwnProperty("email")&&(n.email=e.email),null!=e.address&&e.hasOwnProperty("address")&&(n.address=e.address),null!=e.company&&e.hasOwnProperty("company")&&(n.company=e.company),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.gender&&e.hasOwnProperty("gender")&&(n.gender=e.gender),null!=e.social&&e.hasOwnProperty("social")&&(n.social=e.social),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.deleted&&e.hasOwnProperty("deleted")&&(n.deleted=e.deleted),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.Domain=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.domainId=e.string();break;case 2:r.name=e.string();break;case 3:r.desc=e.string();break;case 4:r.email=e.string();break;case 5:r.tel=e.string();break;case 6:r.address=e.string();break;case 7:r.extra=e.string();break;case 8:r.dt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("domainId"))throw u.ProtocolError("missing required 'domainId'",{instance:r});if(!r.hasOwnProperty("name"))throw u.ProtocolError("missing required 'name'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.domainId)?u.isString(e.name)?null!=e.desc&&e.hasOwnProperty("desc")&&!u.isString(e.desc)?"desc: string expected":null!=e.email&&e.hasOwnProperty("email")&&!u.isString(e.email)?"email: string expected":null!=e.tel&&e.hasOwnProperty("tel")&&!u.isString(e.tel)?"tel: string expected":null!=e.address&&e.hasOwnProperty("address")&&!u.isString(e.address)?"address: string expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null!=e.dt&&e.hasOwnProperty("dt")&&!(u.isInteger(e.dt)||e.dt&&u.isInteger(e.dt.low)&&u.isInteger(e.dt.high))?"dt: integer|Long expected":null:"name: string expected":"domainId: string expected"},e.fromObject=function(e){if(e instanceof c.Domain)return e;var t=new c.Domain;return null!=e.domainId&&(t.domainId=String(e.domainId)),null!=e.name&&(t.name=String(e.name)),null!=e.desc&&(t.desc=String(e.desc)),null!=e.email&&(t.email=String(e.email)),null!=e.tel&&(t.tel=String(e.tel)),null!=e.address&&(t.address=String(e.address)),null!=e.extra&&(t.extra=String(e.extra)),null!=e.dt&&(u.Long?(t.dt=u.Long.fromValue(e.dt)).unsigned=!1:"string"==typeof e.dt?t.dt=parseInt(e.dt,10):"number"==typeof e.dt?t.dt=e.dt:"object"===(0,r.default)(e.dt)&&(t.dt=new u.LongBits(e.dt.low>>>0,e.dt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.domainId="",n.name="",n.desc="",n.email="",n.tel="",n.address="",n.extra="",u.Long){var r=new u.Long(0,0,!1);n.dt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.dt=t.longs===String?"0":0;return null!=e.domainId&&e.hasOwnProperty("domainId")&&(n.domainId=e.domainId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.desc&&e.hasOwnProperty("desc")&&(n.desc=e.desc),null!=e.email&&e.hasOwnProperty("email")&&(n.email=e.email),null!=e.tel&&e.hasOwnProperty("tel")&&(n.tel=e.tel),null!=e.address&&e.hasOwnProperty("address")&&(n.address=e.address),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),null!=e.dt&&e.hasOwnProperty("dt")&&("number"==typeof e.dt?n.dt=t.longs===String?String(e.dt):e.dt:n.dt=t.longs===String?u.Long.prototype.toString.call(e.dt):t.longs===Number?new u.LongBits(e.dt.low>>>0,e.dt.high>>>0).toNumber():e.dt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullDomainRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.domainId=e.string();break;case 2:r.updateDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("domainId"))throw u.ProtocolError("missing required 'domainId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.domainId)?null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null:"domainId: string expected"},e.fromObject=function(e){if(e instanceof c.PullDomainRequest)return e;var t=new c.PullDomainRequest;return null!=e.domainId&&(t.domainId=String(e.domainId)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.domainId="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;return null!=e.domainId&&e.hasOwnProperty("domainId")&&(n.domainId=e.domainId),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.Domains=function(){function e(e){if(this.domain=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.domain&&r.domain.length||(r.domain=[]),r.domain.push(c.Domain.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.domain&&e.hasOwnProperty("domain")){if(!Array.isArray(e.domain))return"domain: array expected";for(var t=0;t>>3){case 1:r.uid=e.string();break;case 2:r.state=e.int32();break;case 3:r.owner=e.string();break;case 4:r.secret=e.string();break;case 5:r.callback=e.string();break;case 6:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});if(!r.hasOwnProperty("state"))throw u.ProtocolError("missing required 'state'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.uid)?u.isInteger(e.state)?null!=e.owner&&e.hasOwnProperty("owner")&&!u.isString(e.owner)?"owner: string expected":null!=e.secret&&e.hasOwnProperty("secret")&&!u.isString(e.secret)?"secret: string expected":null!=e.callback&&e.hasOwnProperty("callback")&&!u.isString(e.callback)?"callback: string expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"state: integer expected":"uid: string expected"},e.fromObject=function(e){if(e instanceof c.Robot)return e;var t=new c.Robot;return null!=e.uid&&(t.uid=String(e.uid)),null!=e.state&&(t.state=0|e.state),null!=e.owner&&(t.owner=String(e.owner)),null!=e.secret&&(t.secret=String(e.secret)),null!=e.callback&&(t.callback=String(e.callback)),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.uid="",n.state=0,n.owner="",n.secret="",n.callback="",n.extra=""),null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.owner&&e.hasOwnProperty("owner")&&(n.owner=e.owner),null!=e.secret&&e.hasOwnProperty("secret")&&(n.secret=e.secret),null!=e.callback&&e.hasOwnProperty("callback")&&(n.callback=e.callback),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetRobotsResult=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.Robot.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.uid=e.string();break;case 2:r.state=e.int32();break;case 3:r.token=e.string();break;case 4:r.owner&&r.owner.length||(r.owner=[]),r.owner.push(e.string());break;case 5:r.extra=e.string();break;case 6:r.updateDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});if(!r.hasOwnProperty("state"))throw u.ProtocolError("missing required 'state'",{instance:r});if(!r.hasOwnProperty("token"))throw u.ProtocolError("missing required 'token'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.uid))return"uid: string expected";if(!u.isInteger(e.state))return"state: integer expected";if(!u.isString(e.token))return"token: string expected";if(null!=e.owner&&e.hasOwnProperty("owner")){if(!Array.isArray(e.owner))return"owner: array expected";for(var t=0;t>>0,e.updateDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.owner=[]),t.defaults)if(n.uid="",n.state=0,n.token="",n.extra="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;if(null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.token&&e.hasOwnProperty("token")&&(n.token=e.token),e.owner&&e.owner.length){n.owner=[];for(var i=0;i>>0,e.updateDt.high>>>0).toNumber():e.updateDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetDeviceResult=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.Device.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.platform=e.int32();break;case 2:r.appName=e.string();break;case 3:r.deviceToken=e.string();break;case 4:r.pushType=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("platform"))throw u.ProtocolError("missing required 'platform'",{instance:r});if(!r.hasOwnProperty("appName"))throw u.ProtocolError("missing required 'appName'",{instance:r});if(!r.hasOwnProperty("deviceToken"))throw u.ProtocolError("missing required 'deviceToken'",{instance:r});if(!r.hasOwnProperty("pushType"))throw u.ProtocolError("missing required 'pushType'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.platform)?u.isString(e.appName)?u.isString(e.deviceToken)?u.isInteger(e.pushType)?null:"pushType: integer expected":"deviceToken: string expected":"appName: string expected":"platform: integer expected"},e.fromObject=function(e){if(e instanceof c.UploadDeviceTokenRequest)return e;var t=new c.UploadDeviceTokenRequest;return null!=e.platform&&(t.platform=0|e.platform),null!=e.appName&&(t.appName=String(e.appName)),null!=e.deviceToken&&(t.deviceToken=String(e.deviceToken)),null!=e.pushType&&(t.pushType=0|e.pushType),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.platform=0,n.appName="",n.deviceToken="",n.pushType=0),null!=e.platform&&e.hasOwnProperty("platform")&&(n.platform=e.platform),null!=e.appName&&e.hasOwnProperty("appName")&&(n.appName=e.appName),null!=e.deviceToken&&e.hasOwnProperty("deviceToken")&&(n.deviceToken=e.deviceToken),null!=e.pushType&&e.hasOwnProperty("pushType")&&(n.pushType=e.pushType),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ModifyGroupInfoRequest=function(){function e(e){if(this.toLine=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.groupId=e.string();break;case 2:r.type=e.int32();break;case 3:r.value=e.string();break;case 4:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:r.type=e.int32();break;case 3:r.userId&&r.userId.length||(r.userId=[]),r.userId.push(e.string());break;case 4:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.type=e.int32();break;case 2:r.value=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("value"))throw u.ProtocolError("missing required 'value'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.type)?u.isString(e.value)?null:"value: string expected":"type: integer expected"},e.fromObject=function(e){if(e instanceof c.InfoEntry)return e;var t=new c.InfoEntry;return null!=e.type&&(t.type=0|e.type),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=0,n.value=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ModifyMyInfoRequest=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.InfoEntry.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.type=e.int32();break;case 2:r.head=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.type)?u.isInteger(e.head)||e.head&&u.isInteger(e.head.low)&&u.isInteger(e.head.high)?null:"head: integer|Long expected":"type: integer expected"},e.fromObject=function(e){if(e instanceof c.NotifyMessage)return e;var t=new c.NotifyMessage;return null!=e.type&&(t.type=0|e.type),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.type=0,u.Long){var r=new u.Long(0,0,!1);n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.head=t.longs===String?"0":0;return null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.NotifyGroupMessage=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.head=e.int64();break;case 2:r.target=e.string();break;case 3:r.line=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});if(!r.hasOwnProperty("target"))throw u.ProtocolError("missing required 'target'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.head)||e.head&&u.isInteger(e.head.low)&&u.isInteger(e.head.high)?u.isString(e.target)?u.isInteger(e.line)?null:"line: integer expected":"target: string expected":"head: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.NotifyGroupMessage)return e;var t=new c.NotifyGroupMessage;return null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),null!=e.target&&(t.target=String(e.target)),null!=e.line&&(t.line=0|e.line),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.head=t.longs===String?"0":0;n.target="",n.line=0}return null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),null!=e.target&&e.hasOwnProperty("target")&&(n.target=e.target),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullMessageRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.id=e.int64();break;case 2:r.type=e.int32();break;case 3:r.delay=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.id)||e.id&&u.isInteger(e.id.low)&&u.isInteger(e.id.high)?u.isInteger(e.type)?null!=e.delay&&e.hasOwnProperty("delay")&&!(u.isInteger(e.delay)||e.delay&&u.isInteger(e.delay.low)&&u.isInteger(e.delay.high))?"delay: integer|Long expected":null:"type: integer expected":"id: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.PullMessageRequest)return e;var t=new c.PullMessageRequest;return null!=e.id&&(u.Long?(t.id=u.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"===(0,r.default)(e.id)&&(t.id=new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.type&&(t.type=0|e.type),null!=e.delay&&(u.Long?(t.delay=u.Long.fromValue(e.delay)).unsigned=!1:"string"==typeof e.delay?t.delay=parseInt(e.delay,10):"number"==typeof e.delay?t.delay=e.delay:"object"===(0,r.default)(e.delay)&&(t.delay=new u.LongBits(e.delay.low>>>0,e.delay.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.type=0,u.Long?(r=new u.Long(0,0,!1),n.delay=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.delay=t.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?u.Long.prototype.toString.call(e.id):t.longs===Number?new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.delay&&e.hasOwnProperty("delay")&&("number"==typeof e.delay?n.delay=t.longs===String?String(e.delay):e.delay:n.delay=t.longs===String?u.Long.prototype.toString.call(e.delay):t.longs===Number?new u.LongBits(e.delay.low>>>0,e.delay.high>>>0).toNumber():e.delay),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullMessageResult=function(){function e(e){if(this.message=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.message&&r.message.length||(r.message=[]),r.message.push(c.Message.decode(e,e.uint32()));break;case 2:r.current=e.int64();break;case 3:r.head=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("current"))throw u.ProtocolError("missing required 'current'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")){if(!Array.isArray(e.message))return"message: array expected";for(var t=0;t>>0,e.current.high>>>0).toNumber())),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.message=[]),t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.current=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.current=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.head=t.longs===String?"0":0}if(e.message&&e.message.length){n.message=[];for(var i=0;i>>0,e.current.high>>>0).toNumber():e.current),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullReadResult=function(){function e(e){if(this.read=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.read&&r.read.length||(r.read=[]),r.read.push(c.ConvRead.decode(e,e.uint32()));break;case 2:r.current=e.int64();break;case 3:r.head=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("current"))throw u.ProtocolError("missing required 'current'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.read&&e.hasOwnProperty("read")){if(!Array.isArray(e.read))return"read: array expected";for(var t=0;t>>0,e.current.high>>>0).toNumber())),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.read=[]),t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.current=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.current=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.head=t.longs===String?"0":0}if(e.read&&e.read.length){n.read=[];for(var i=0;i>>0,e.current.high>>>0).toNumber():e.current),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullDeliveryResult=function(){function e(e){if(this.delivery=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.delivery&&r.delivery.length||(r.delivery=[]),r.delivery.push(c.Delivery.decode(e,e.uint32()));break;case 2:r.current=e.int64();break;case 3:r.head=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("current"))throw u.ProtocolError("missing required 'current'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.delivery&&e.hasOwnProperty("delivery")){if(!Array.isArray(e.delivery))return"delivery: array expected";for(var t=0;t>>0,e.current.high>>>0).toNumber())),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.delivery=[]),t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.current=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.current=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.head=t.longs===String?"0":0}if(e.delivery&&e.delivery.length){n.delivery=[];for(var i=0;i>>0,e.current.high>>>0).toNumber():e.current),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GroupConv=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.line=e.int32();break;case 2:r.groupId=e.string();break;case 3:r.msgHead=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});if(!r.hasOwnProperty("groupId"))throw u.ProtocolError("missing required 'groupId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.line)?u.isString(e.groupId)?null!=e.msgHead&&e.hasOwnProperty("msgHead")&&!(u.isInteger(e.msgHead)||e.msgHead&&u.isInteger(e.msgHead.low)&&u.isInteger(e.msgHead.high))?"msgHead: integer|Long expected":null:"groupId: string expected":"line: integer expected"},e.fromObject=function(e){if(e instanceof c.GroupConv)return e;var t=new c.GroupConv;return null!=e.line&&(t.line=0|e.line),null!=e.groupId&&(t.groupId=String(e.groupId)),null!=e.msgHead&&(u.Long?(t.msgHead=u.Long.fromValue(e.msgHead)).unsigned=!1:"string"==typeof e.msgHead?t.msgHead=parseInt(e.msgHead,10):"number"==typeof e.msgHead?t.msgHead=e.msgHead:"object"===(0,r.default)(e.msgHead)&&(t.msgHead=new u.LongBits(e.msgHead.low>>>0,e.msgHead.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.line=0,n.groupId="",u.Long){var r=new u.Long(0,0,!1);n.msgHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.msgHead=t.longs===String?"0":0;return null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),null!=e.msgHead&&e.hasOwnProperty("msgHead")&&("number"==typeof e.msgHead?n.msgHead=t.longs===String?String(e.msgHead):e.msgHead:n.msgHead=t.longs===String?u.Long.prototype.toString.call(e.msgHead):t.longs===Number?new u.LongBits(e.msgHead.low>>>0,e.msgHead.high>>>0).toNumber():e.msgHead),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupConvRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.id=e.int64();break;case 2:r.target=e.string();break;case 3:r.line=e.int32();break;case 4:r.messageId=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.id)||e.id&&u.isInteger(e.id.low)&&u.isInteger(e.id.high)?null!=e.target&&e.hasOwnProperty("target")&&!u.isString(e.target)?"target: string expected":null!=e.line&&e.hasOwnProperty("line")&&!u.isInteger(e.line)?"line: integer expected":null!=e.messageId&&e.hasOwnProperty("messageId")&&!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high))?"messageId: integer|Long expected":null:"id: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.PullGroupConvRequest)return e;var t=new c.PullGroupConvRequest;return null!=e.id&&(u.Long?(t.id=u.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"===(0,r.default)(e.id)&&(t.id=new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.target&&(t.target=String(e.target)),null!=e.line&&(t.line=0|e.line),null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.target="",n.line=0,u.Long?(r=new u.Long(0,0,!1),n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.messageId=t.longs===String?"0":0}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?u.Long.prototype.toString.call(e.id):t.longs===Number?new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.target&&e.hasOwnProperty("target")&&(n.target=e.target),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupConvResult=function(){function e(e){if(this.conv=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.conv&&r.conv.length||(r.conv=[]),r.conv.push(c.GroupConv.decode(e,e.uint32()));break;case 2:r.current=e.int64();break;case 3:r.head=e.int64();break;case 4:r.groupMessage=c.PullGroupMessageResult.decode(e,e.uint32());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("current"))throw u.ProtocolError("missing required 'current'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.conv&&e.hasOwnProperty("conv")){if(!Array.isArray(e.conv))return"conv: array expected";for(var t=0;t>>0,e.current.high>>>0).toNumber())),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),null!=e.groupMessage){if("object"!==(0,r.default)(e.groupMessage))throw TypeError(".PullGroupConvResult.groupMessage: object expected");t.groupMessage=c.PullGroupMessageResult.fromObject(e.groupMessage)}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.conv=[]),t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.current=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.current=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.head=t.longs===String?"0":0,n.groupMessage=null}if(e.conv&&e.conv.length){n.conv=[];for(var i=0;i>>0,e.current.high>>>0).toNumber():e.current),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),null!=e.groupMessage&&e.hasOwnProperty("groupMessage")&&(n.groupMessage=c.PullGroupMessageResult.toObject(e.groupMessage,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupMessageRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.groupId=e.string();break;case 2:r.line=e.int32();break;case 3:r.id=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("groupId"))throw u.ProtocolError("missing required 'groupId'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.groupId)?u.isInteger(e.line)?u.isInteger(e.id)||e.id&&u.isInteger(e.id.low)&&u.isInteger(e.id.high)?null:"id: integer|Long expected":"line: integer expected":"groupId: string expected"},e.fromObject=function(e){if(e instanceof c.PullGroupMessageRequest)return e;var t=new c.PullGroupMessageRequest;return null!=e.groupId&&(t.groupId=String(e.groupId)),null!=e.line&&(t.line=0|e.line),null!=e.id&&(u.Long?(t.id=u.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"===(0,r.default)(e.id)&&(t.id=new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.groupId="",n.line=0,u.Long){var r=new u.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;return null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?u.Long.prototype.toString.call(e.id):t.longs===Number?new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupMessageRequests=function(){function e(e){if(this.request=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.request&&r.request.length||(r.request=[]),r.request.push(c.PullGroupMessageRequest.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.request&&e.hasOwnProperty("request")){if(!Array.isArray(e.request))return"request: array expected";for(var t=0;t>>3){case 1:r.messageId=e.int64();break;case 2:r.fromUser=e.string();break;case 3:r.flag=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("flag"))throw u.ProtocolError("missing required 'flag'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)?u.isString(e.fromUser)?u.isInteger(e.flag)?null:"flag: integer expected":"fromUser: string expected":"messageId: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.GroupMessage)return e;var t=new c.GroupMessage;return null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.fromUser&&(t.fromUser=String(e.fromUser)),null!=e.flag&&(t.flag=0|e.flag),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.fromUser="",n.flag=0}return null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.fromUser&&e.hasOwnProperty("fromUser")&&(n.fromUser=e.fromUser),null!=e.flag&&e.hasOwnProperty("flag")&&(n.flag=e.flag),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupMessageResult=function(){function e(e){if(this.message=[],this.msg=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.message&&r.message.length||(r.message=[]),r.message.push(c.GroupMessage.decode(e,e.uint32()));break;case 2:r.current=e.int64();break;case 3:r.head=e.int64();break;case 4:r.groupId=e.string();break;case 5:r.line=e.int32();break;case 6:r.msg&&r.msg.length||(r.msg=[]),r.msg.push(c.Message.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("current"))throw u.ProtocolError("missing required 'current'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});if(!r.hasOwnProperty("groupId"))throw u.ProtocolError("missing required 'groupId'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")){if(!Array.isArray(e.message))return"message: array expected";for(var t=0;t>>0,e.current.high>>>0).toNumber())),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),null!=e.groupId&&(t.groupId=String(e.groupId)),null!=e.line&&(t.line=0|e.line),e.msg){if(!Array.isArray(e.msg))throw TypeError(".PullGroupMessageResult.msg: array expected");for(t.msg=[],n=0;n>>0,e.current.high>>>0).toNumber():e.current),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),null!=e.groupId&&e.hasOwnProperty("groupId")&&(n.groupId=e.groupId),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),e.msg&&e.msg.length)for(n.msg=[],i=0;i>>3==1?(r.result&&r.result.length||(r.result=[]),r.result.push(c.PullGroupMessageResult.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.result&&e.hasOwnProperty("result")){if(!Array.isArray(e.result))return"result: array expected";for(var t=0;t>>3==1?(r.message&&r.message.length||(r.message=[]),r.message.push(c.Message.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")){if(!Array.isArray(e.message))return"message: array expected";for(var t=0;t>>3==1?(r.info&&r.info.length||(r.info=[]),r.info.push(c.GroupInfo.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.info&&e.hasOwnProperty("info")){if(!Array.isArray(e.info))return"info: array expected";for(var t=0;t>>3){case 1:r.target=e.string();break;case 2:r.head=e.int64();break;case 3:r.sum=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("target"))throw u.ProtocolError("missing required 'target'",{instance:r});if(!r.hasOwnProperty("head"))throw u.ProtocolError("missing required 'head'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.target)?u.isInteger(e.head)||e.head&&u.isInteger(e.head.low)&&u.isInteger(e.head.high)?null!=e.sum&&e.hasOwnProperty("sum")&&!(u.isInteger(e.sum)||e.sum&&u.isInteger(e.sum.low)&&u.isInteger(e.sum.high))?"sum: integer|Long expected":null:"head: integer|Long expected":"target: string expected"},e.fromObject=function(e){if(e instanceof c.PullGroupMemberRequest)return e;var t=new c.PullGroupMemberRequest;return null!=e.target&&(t.target=String(e.target)),null!=e.head&&(u.Long?(t.head=u.Long.fromValue(e.head)).unsigned=!1:"string"==typeof e.head?t.head=parseInt(e.head,10):"number"==typeof e.head?t.head=e.head:"object"===(0,r.default)(e.head)&&(t.head=new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber())),null!=e.sum&&(u.Long?(t.sum=u.Long.fromValue(e.sum)).unsigned=!1:"string"==typeof e.sum?t.sum=parseInt(e.sum,10):"number"==typeof e.sum?t.sum=e.sum:"object"===(0,r.default)(e.sum)&&(t.sum=new u.LongBits(e.sum.low>>>0,e.sum.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.target="",u.Long){var r=new u.Long(0,0,!1);n.head=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.head=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.sum=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.sum=t.longs===String?"0":0}return null!=e.target&&e.hasOwnProperty("target")&&(n.target=e.target),null!=e.head&&e.hasOwnProperty("head")&&("number"==typeof e.head?n.head=t.longs===String?String(e.head):e.head:n.head=t.longs===String?u.Long.prototype.toString.call(e.head):t.longs===Number?new u.LongBits(e.head.low>>>0,e.head.high>>>0).toNumber():e.head),null!=e.sum&&e.hasOwnProperty("sum")&&("number"==typeof e.sum?n.sum=t.longs===String?String(e.sum):e.sum:n.sum=t.longs===String?u.Long.prototype.toString.call(e.sum):t.longs===Number?new u.LongBits(e.sum.low>>>0,e.sum.high>>>0).toNumber():e.sum),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullGroupMemberResult=function(){function e(e){if(this.member=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.member&&r.member.length||(r.member=[]),r.member.push(c.GroupMember.decode(e,e.uint32()));break;case 2:r.full=e.int32();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.member&&e.hasOwnProperty("member")){if(!Array.isArray(e.member))return"member: array expected";for(var t=0;t>>3){case 1:r.uid=e.string();break;case 2:r.updateDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.uid)?null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null:"uid: string expected"},e.fromObject=function(e){if(e instanceof c.UserRequest)return e;var t=new c.UserRequest;return null!=e.uid&&(t.uid=String(e.uid)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.uid="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;return null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullUserRequest=function(){function e(e){if(this.request=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.request&&r.request.length||(r.request=[]),r.request.push(c.UserRequest.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.request&&e.hasOwnProperty("request")){if(!Array.isArray(e.request))return"request: array expected";for(var t=0;t>>3){case 1:r.user=c.User.decode(e,e.uint32());break;case 2:r.code=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("user"))throw u.ProtocolError("missing required 'user'",{instance:r});if(!r.hasOwnProperty("code"))throw u.ProtocolError("missing required 'code'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";var t=c.User.verify(e.user);return t?"user."+t:u.isInteger(e.code)?null:"code: integer expected"},e.fromObject=function(e){if(e instanceof c.UserResult)return e;var t=new c.UserResult;if(null!=e.user){if("object"!==(0,r.default)(e.user))throw TypeError(".UserResult.user: object expected");t.user=c.User.fromObject(e.user)}return null!=e.code&&(t.code=0|e.code),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.user=null,n.code=0),null!=e.user&&e.hasOwnProperty("user")&&(n.user=c.User.toObject(e.user,t)),null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PullUserResult=function(){function e(e){if(this.result=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.result&&r.result.length||(r.result=[]),r.result.push(c.UserResult.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.result&&e.hasOwnProperty("result")){if(!Array.isArray(e.result))return"result: array expected";for(var t=0;t>>3){case 1:r.groupId=e.string();break;case 2:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:r.removedMember&&r.removedMember.length||(r.removedMember=[]),r.removedMember.push(e.string());break;case 3:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:r.newOwner=e.string();break;case 3:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:r.alias=e.string();break;case 3:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.groupId=e.string();break;case 2:if(r.toLine&&r.toLine.length||(r.toLine=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>3){case 1:r.scope=e.int32();break;case 2:r.key=e.string();break;case 3:r.value=e.string();break;case 4:r.updateDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("scope"))throw u.ProtocolError("missing required 'scope'",{instance:r});if(!r.hasOwnProperty("key"))throw u.ProtocolError("missing required 'key'",{instance:r});if(!r.hasOwnProperty("value"))throw u.ProtocolError("missing required 'value'",{instance:r});if(!r.hasOwnProperty("updateDt"))throw u.ProtocolError("missing required 'updateDt'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.scope)?u.isString(e.key)?u.isString(e.value)?u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high)?null:"updateDt: integer|Long expected":"value: string expected":"key: string expected":"scope: integer expected"},e.fromObject=function(e){if(e instanceof c.UserSettingEntry)return e;var t=new c.UserSettingEntry;return null!=e.scope&&(t.scope=0|e.scope),null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.scope=0,n.key="",n.value="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;return null!=e.scope&&e.hasOwnProperty("scope")&&(n.scope=e.scope),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ModifyUserSettingReq=function(){function e(e){if(this.target=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.scope=e.int32();break;case 2:r.key=e.string();break;case 3:r.value=e.string();break;case 4:r.target&&r.target.length||(r.target=[]),r.target.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("scope"))throw u.ProtocolError("missing required 'scope'",{instance:r});if(!r.hasOwnProperty("key"))throw u.ProtocolError("missing required 'key'",{instance:r});if(!r.hasOwnProperty("value"))throw u.ProtocolError("missing required 'value'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isInteger(e.scope))return"scope: integer expected";if(!u.isString(e.key))return"key: string expected";if(!u.isString(e.value))return"value: string expected";if(null!=e.target&&e.hasOwnProperty("target")){if(!Array.isArray(e.target))return"target: array expected";for(var t=0;t>>3==1?r.version=e.int64():e.skipType(7&i)}if(!r.hasOwnProperty("version"))throw u.ProtocolError("missing required 'version'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.version)||e.version&&u.isInteger(e.version.low)&&u.isInteger(e.version.high)?null:"version: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.Version)return e;var t=new c.Version;return null!=e.version&&(u.Long?(t.version=u.Long.fromValue(e.version)).unsigned=!1:"string"==typeof e.version?t.version=parseInt(e.version,10):"number"==typeof e.version?t.version=e.version:"object"===(0,r.default)(e.version)&&(t.version=new u.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(u.Long){var r=new u.Long(0,0,!1);n.version=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.version=t.longs===String?"0":0;return null!=e.version&&e.hasOwnProperty("version")&&("number"==typeof e.version?n.version=t.longs===String?String(e.version):e.version:n.version=t.longs===String?u.Long.prototype.toString.call(e.version):t.longs===Number?new u.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber():e.version),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetUserSettingResult=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.UserSettingEntry.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.uid=e.string();break;case 2:r.state=e.int32();break;case 3:r.updateDt=e.int64();break;case 4:r.alias=e.string();break;case 5:r.blacked=e.int32();break;case 6:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});if(!r.hasOwnProperty("state"))throw u.ProtocolError("missing required 'state'",{instance:r});if(!r.hasOwnProperty("updateDt"))throw u.ProtocolError("missing required 'updateDt'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.uid)?u.isInteger(e.state)?u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high)?null!=e.alias&&e.hasOwnProperty("alias")&&!u.isString(e.alias)?"alias: string expected":null!=e.blacked&&e.hasOwnProperty("blacked")&&!u.isInteger(e.blacked)?"blacked: integer expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"updateDt: integer|Long expected":"state: integer expected":"uid: string expected"},e.fromObject=function(e){if(e instanceof c.Friend)return e;var t=new c.Friend;return null!=e.uid&&(t.uid=String(e.uid)),null!=e.state&&(t.state=0|e.state),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.alias&&(t.alias=String(e.alias)),null!=e.blacked&&(t.blacked=0|e.blacked),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.uid="",n.state=0,u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;n.alias="",n.blacked=0,n.extra=""}return null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.alias&&e.hasOwnProperty("alias")&&(n.alias=e.alias),null!=e.blacked&&e.hasOwnProperty("blacked")&&(n.blacked=e.blacked),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetFriendsResult=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.Friend.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.FriendRequest.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.msgHead=e.int64();break;case 2:r.friendHead=e.int64();break;case 3:r.friendRqHead=e.int64();break;case 4:r.settingHead=e.int64();break;case 5:r.nodeAddr=e.string();break;case 6:r.nodePort=e.int32();break;case 7:r.serverTime=e.int64();break;case 8:r.nodeId=e.string();break;case 9:r.recvHead=e.int64();break;case 10:r.readHead=e.int64();break;case 11:r.groupConvHead=e.int64();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.msgHead&&e.hasOwnProperty("msgHead")&&!(u.isInteger(e.msgHead)||e.msgHead&&u.isInteger(e.msgHead.low)&&u.isInteger(e.msgHead.high))?"msgHead: integer|Long expected":null!=e.friendHead&&e.hasOwnProperty("friendHead")&&!(u.isInteger(e.friendHead)||e.friendHead&&u.isInteger(e.friendHead.low)&&u.isInteger(e.friendHead.high))?"friendHead: integer|Long expected":null!=e.friendRqHead&&e.hasOwnProperty("friendRqHead")&&!(u.isInteger(e.friendRqHead)||e.friendRqHead&&u.isInteger(e.friendRqHead.low)&&u.isInteger(e.friendRqHead.high))?"friendRqHead: integer|Long expected":null!=e.settingHead&&e.hasOwnProperty("settingHead")&&!(u.isInteger(e.settingHead)||e.settingHead&&u.isInteger(e.settingHead.low)&&u.isInteger(e.settingHead.high))?"settingHead: integer|Long expected":null!=e.nodeAddr&&e.hasOwnProperty("nodeAddr")&&!u.isString(e.nodeAddr)?"nodeAddr: string expected":null!=e.nodePort&&e.hasOwnProperty("nodePort")&&!u.isInteger(e.nodePort)?"nodePort: integer expected":null!=e.serverTime&&e.hasOwnProperty("serverTime")&&!(u.isInteger(e.serverTime)||e.serverTime&&u.isInteger(e.serverTime.low)&&u.isInteger(e.serverTime.high))?"serverTime: integer|Long expected":null!=e.nodeId&&e.hasOwnProperty("nodeId")&&!u.isString(e.nodeId)?"nodeId: string expected":null!=e.recvHead&&e.hasOwnProperty("recvHead")&&!(u.isInteger(e.recvHead)||e.recvHead&&u.isInteger(e.recvHead.low)&&u.isInteger(e.recvHead.high))?"recvHead: integer|Long expected":null!=e.readHead&&e.hasOwnProperty("readHead")&&!(u.isInteger(e.readHead)||e.readHead&&u.isInteger(e.readHead.low)&&u.isInteger(e.readHead.high))?"readHead: integer|Long expected":null!=e.groupConvHead&&e.hasOwnProperty("groupConvHead")&&!(u.isInteger(e.groupConvHead)||e.groupConvHead&&u.isInteger(e.groupConvHead.low)&&u.isInteger(e.groupConvHead.high))?"groupConvHead: integer|Long expected":null},e.fromObject=function(e){if(e instanceof c.ConnectAckPayload)return e;var t=new c.ConnectAckPayload;return null!=e.msgHead&&(u.Long?(t.msgHead=u.Long.fromValue(e.msgHead)).unsigned=!1:"string"==typeof e.msgHead?t.msgHead=parseInt(e.msgHead,10):"number"==typeof e.msgHead?t.msgHead=e.msgHead:"object"===(0,r.default)(e.msgHead)&&(t.msgHead=new u.LongBits(e.msgHead.low>>>0,e.msgHead.high>>>0).toNumber())),null!=e.friendHead&&(u.Long?(t.friendHead=u.Long.fromValue(e.friendHead)).unsigned=!1:"string"==typeof e.friendHead?t.friendHead=parseInt(e.friendHead,10):"number"==typeof e.friendHead?t.friendHead=e.friendHead:"object"===(0,r.default)(e.friendHead)&&(t.friendHead=new u.LongBits(e.friendHead.low>>>0,e.friendHead.high>>>0).toNumber())),null!=e.friendRqHead&&(u.Long?(t.friendRqHead=u.Long.fromValue(e.friendRqHead)).unsigned=!1:"string"==typeof e.friendRqHead?t.friendRqHead=parseInt(e.friendRqHead,10):"number"==typeof e.friendRqHead?t.friendRqHead=e.friendRqHead:"object"===(0,r.default)(e.friendRqHead)&&(t.friendRqHead=new u.LongBits(e.friendRqHead.low>>>0,e.friendRqHead.high>>>0).toNumber())),null!=e.settingHead&&(u.Long?(t.settingHead=u.Long.fromValue(e.settingHead)).unsigned=!1:"string"==typeof e.settingHead?t.settingHead=parseInt(e.settingHead,10):"number"==typeof e.settingHead?t.settingHead=e.settingHead:"object"===(0,r.default)(e.settingHead)&&(t.settingHead=new u.LongBits(e.settingHead.low>>>0,e.settingHead.high>>>0).toNumber())),null!=e.nodeAddr&&(t.nodeAddr=String(e.nodeAddr)),null!=e.nodePort&&(t.nodePort=0|e.nodePort),null!=e.serverTime&&(u.Long?(t.serverTime=u.Long.fromValue(e.serverTime)).unsigned=!1:"string"==typeof e.serverTime?t.serverTime=parseInt(e.serverTime,10):"number"==typeof e.serverTime?t.serverTime=e.serverTime:"object"===(0,r.default)(e.serverTime)&&(t.serverTime=new u.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber())),null!=e.nodeId&&(t.nodeId=String(e.nodeId)),null!=e.recvHead&&(u.Long?(t.recvHead=u.Long.fromValue(e.recvHead)).unsigned=!1:"string"==typeof e.recvHead?t.recvHead=parseInt(e.recvHead,10):"number"==typeof e.recvHead?t.recvHead=e.recvHead:"object"===(0,r.default)(e.recvHead)&&(t.recvHead=new u.LongBits(e.recvHead.low>>>0,e.recvHead.high>>>0).toNumber())),null!=e.readHead&&(u.Long?(t.readHead=u.Long.fromValue(e.readHead)).unsigned=!1:"string"==typeof e.readHead?t.readHead=parseInt(e.readHead,10):"number"==typeof e.readHead?t.readHead=e.readHead:"object"===(0,r.default)(e.readHead)&&(t.readHead=new u.LongBits(e.readHead.low>>>0,e.readHead.high>>>0).toNumber())),null!=e.groupConvHead&&(u.Long?(t.groupConvHead=u.Long.fromValue(e.groupConvHead)).unsigned=!1:"string"==typeof e.groupConvHead?t.groupConvHead=parseInt(e.groupConvHead,10):"number"==typeof e.groupConvHead?t.groupConvHead=e.groupConvHead:"object"===(0,r.default)(e.groupConvHead)&&(t.groupConvHead=new u.LongBits(e.groupConvHead.low>>>0,e.groupConvHead.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.msgHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.msgHead=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.friendHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.friendHead=t.longs===String?"0":0,u.Long?(r=new u.Long(0,0,!1),n.friendRqHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.friendRqHead=t.longs===String?"0":0,u.Long?(r=new u.Long(0,0,!1),n.settingHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.settingHead=t.longs===String?"0":0,n.nodeAddr="",n.nodePort=0,u.Long?(r=new u.Long(0,0,!1),n.serverTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.serverTime=t.longs===String?"0":0,n.nodeId="",u.Long?(r=new u.Long(0,0,!1),n.recvHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.recvHead=t.longs===String?"0":0,u.Long?(r=new u.Long(0,0,!1),n.readHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.readHead=t.longs===String?"0":0,u.Long?(r=new u.Long(0,0,!1),n.groupConvHead=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.groupConvHead=t.longs===String?"0":0}return null!=e.msgHead&&e.hasOwnProperty("msgHead")&&("number"==typeof e.msgHead?n.msgHead=t.longs===String?String(e.msgHead):e.msgHead:n.msgHead=t.longs===String?u.Long.prototype.toString.call(e.msgHead):t.longs===Number?new u.LongBits(e.msgHead.low>>>0,e.msgHead.high>>>0).toNumber():e.msgHead),null!=e.friendHead&&e.hasOwnProperty("friendHead")&&("number"==typeof e.friendHead?n.friendHead=t.longs===String?String(e.friendHead):e.friendHead:n.friendHead=t.longs===String?u.Long.prototype.toString.call(e.friendHead):t.longs===Number?new u.LongBits(e.friendHead.low>>>0,e.friendHead.high>>>0).toNumber():e.friendHead),null!=e.friendRqHead&&e.hasOwnProperty("friendRqHead")&&("number"==typeof e.friendRqHead?n.friendRqHead=t.longs===String?String(e.friendRqHead):e.friendRqHead:n.friendRqHead=t.longs===String?u.Long.prototype.toString.call(e.friendRqHead):t.longs===Number?new u.LongBits(e.friendRqHead.low>>>0,e.friendRqHead.high>>>0).toNumber():e.friendRqHead),null!=e.settingHead&&e.hasOwnProperty("settingHead")&&("number"==typeof e.settingHead?n.settingHead=t.longs===String?String(e.settingHead):e.settingHead:n.settingHead=t.longs===String?u.Long.prototype.toString.call(e.settingHead):t.longs===Number?new u.LongBits(e.settingHead.low>>>0,e.settingHead.high>>>0).toNumber():e.settingHead),null!=e.nodeAddr&&e.hasOwnProperty("nodeAddr")&&(n.nodeAddr=e.nodeAddr),null!=e.nodePort&&e.hasOwnProperty("nodePort")&&(n.nodePort=e.nodePort),null!=e.serverTime&&e.hasOwnProperty("serverTime")&&("number"==typeof e.serverTime?n.serverTime=t.longs===String?String(e.serverTime):e.serverTime:n.serverTime=t.longs===String?u.Long.prototype.toString.call(e.serverTime):t.longs===Number?new u.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber():e.serverTime),null!=e.nodeId&&e.hasOwnProperty("nodeId")&&(n.nodeId=e.nodeId),null!=e.recvHead&&e.hasOwnProperty("recvHead")&&("number"==typeof e.recvHead?n.recvHead=t.longs===String?String(e.recvHead):e.recvHead:n.recvHead=t.longs===String?u.Long.prototype.toString.call(e.recvHead):t.longs===Number?new u.LongBits(e.recvHead.low>>>0,e.recvHead.high>>>0).toNumber():e.recvHead),null!=e.readHead&&e.hasOwnProperty("readHead")&&("number"==typeof e.readHead?n.readHead=t.longs===String?String(e.readHead):e.readHead:n.readHead=t.longs===String?u.Long.prototype.toString.call(e.readHead):t.longs===Number?new u.LongBits(e.readHead.low>>>0,e.readHead.high>>>0).toNumber():e.readHead),null!=e.groupConvHead&&e.hasOwnProperty("groupConvHead")&&("number"==typeof e.groupConvHead?n.groupConvHead=t.longs===String?String(e.groupConvHead):e.groupConvHead:n.groupConvHead=t.longs===String?u.Long.prototype.toString.call(e.groupConvHead):t.longs===Number?new u.LongBits(e.groupConvHead.low>>>0,e.groupConvHead.high>>>0).toNumber():e.groupConvHead),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.IMHttpWrapper=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.token=e.string();break;case 2:r.clientId=e.string();break;case 3:r.request=e.string();break;case 4:r.data=e.bytes();break;case 5:r.requestId=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("token"))throw u.ProtocolError("missing required 'token'",{instance:r});if(!r.hasOwnProperty("clientId"))throw u.ProtocolError("missing required 'clientId'",{instance:r});if(!r.hasOwnProperty("request"))throw u.ProtocolError("missing required 'request'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.token)?u.isString(e.clientId)?u.isString(e.request)?null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||u.isString(e.data))?"data: buffer expected":null!=e.requestId&&e.hasOwnProperty("requestId")&&!u.isString(e.requestId)?"requestId: string expected":null:"request: string expected":"clientId: string expected":"token: string expected"},e.fromObject=function(e){if(e instanceof c.IMHttpWrapper)return e;var t=new c.IMHttpWrapper;return null!=e.token&&(t.token=String(e.token)),null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.request&&(t.request=String(e.request)),null!=e.data&&("string"==typeof e.data?u.base64.decode(e.data,t.data=u.newBuffer(u.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.requestId&&(t.requestId=String(e.requestId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.token="",n.clientId="",n.request="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=u.newBuffer(n.data))),n.requestId=""),null!=e.token&&e.hasOwnProperty("token")&&(n.token=e.token),null!=e.clientId&&e.hasOwnProperty("clientId")&&(n.clientId=e.clientId),null!=e.request&&e.hasOwnProperty("request")&&(n.request=e.request),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?u.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.requestId&&e.hasOwnProperty("requestId")&&(n.requestId=e.requestId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.SearchUserRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.keyword=e.string();break;case 2:r.fuzzy=e.int32();break;case 3:r.page=e.int32();break;case 4:r.domainId=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("keyword"))throw u.ProtocolError("missing required 'keyword'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.keyword)?null!=e.fuzzy&&e.hasOwnProperty("fuzzy")&&!u.isInteger(e.fuzzy)?"fuzzy: integer expected":null!=e.page&&e.hasOwnProperty("page")&&!u.isInteger(e.page)?"page: integer expected":null!=e.domainId&&e.hasOwnProperty("domainId")&&!u.isString(e.domainId)?"domainId: string expected":null:"keyword: string expected"},e.fromObject=function(e){if(e instanceof c.SearchUserRequest)return e;var t=new c.SearchUserRequest;return null!=e.keyword&&(t.keyword=String(e.keyword)),null!=e.fuzzy&&(t.fuzzy=0|e.fuzzy),null!=e.page&&(t.page=0|e.page),null!=e.domainId&&(t.domainId=String(e.domainId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.keyword="",n.fuzzy=0,n.page=0,n.domainId=""),null!=e.keyword&&e.hasOwnProperty("keyword")&&(n.keyword=e.keyword),null!=e.fuzzy&&e.hasOwnProperty("fuzzy")&&(n.fuzzy=e.fuzzy),null!=e.page&&e.hasOwnProperty("page")&&(n.page=e.page),null!=e.domainId&&e.hasOwnProperty("domainId")&&(n.domainId=e.domainId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.SearchUserResult=function(){function e(e){if(this.entry=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.entry&&r.entry.length||(r.entry=[]),r.entry.push(c.User.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.entry&&e.hasOwnProperty("entry")){if(!Array.isArray(e.entry))return"entry: array expected";for(var t=0;t>>3){case 1:r.chatroomId=e.string();break;case 2:r.updateDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("chatroomId"))throw u.ProtocolError("missing required 'chatroomId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.chatroomId)?null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null:"chatroomId: string expected"},e.fromObject=function(e){if(e instanceof c.GetChatroomInfoRequest)return e;var t=new c.GetChatroomInfoRequest;return null!=e.chatroomId&&(t.chatroomId=String(e.chatroomId)),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.chatroomId="",u.Long){var r=new u.Long(0,0,!1);n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.updateDt=t.longs===String?"0":0;return null!=e.chatroomId&&e.hasOwnProperty("chatroomId")&&(n.chatroomId=e.chatroomId),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ChatroomInfo=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.title=e.string();break;case 2:r.desc=e.string();break;case 3:r.portrait=e.string();break;case 4:r.memberCount=e.int32();break;case 5:r.createDt=e.int64();break;case 6:r.updateDt=e.int64();break;case 7:r.extra=e.string();break;case 8:r.state=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("title"))throw u.ProtocolError("missing required 'title'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.title)?null!=e.desc&&e.hasOwnProperty("desc")&&!u.isString(e.desc)?"desc: string expected":null!=e.portrait&&e.hasOwnProperty("portrait")&&!u.isString(e.portrait)?"portrait: string expected":null!=e.memberCount&&e.hasOwnProperty("memberCount")&&!u.isInteger(e.memberCount)?"memberCount: integer expected":null!=e.createDt&&e.hasOwnProperty("createDt")&&!(u.isInteger(e.createDt)||e.createDt&&u.isInteger(e.createDt.low)&&u.isInteger(e.createDt.high))?"createDt: integer|Long expected":null!=e.updateDt&&e.hasOwnProperty("updateDt")&&!(u.isInteger(e.updateDt)||e.updateDt&&u.isInteger(e.updateDt.low)&&u.isInteger(e.updateDt.high))?"updateDt: integer|Long expected":null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null!=e.state&&e.hasOwnProperty("state")&&!u.isInteger(e.state)?"state: integer expected":null:"title: string expected"},e.fromObject=function(e){if(e instanceof c.ChatroomInfo)return e;var t=new c.ChatroomInfo;return null!=e.title&&(t.title=String(e.title)),null!=e.desc&&(t.desc=String(e.desc)),null!=e.portrait&&(t.portrait=String(e.portrait)),null!=e.memberCount&&(t.memberCount=0|e.memberCount),null!=e.createDt&&(u.Long?(t.createDt=u.Long.fromValue(e.createDt)).unsigned=!1:"string"==typeof e.createDt?t.createDt=parseInt(e.createDt,10):"number"==typeof e.createDt?t.createDt=e.createDt:"object"===(0,r.default)(e.createDt)&&(t.createDt=new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber())),null!=e.updateDt&&(u.Long?(t.updateDt=u.Long.fromValue(e.updateDt)).unsigned=!1:"string"==typeof e.updateDt?t.updateDt=parseInt(e.updateDt,10):"number"==typeof e.updateDt?t.updateDt=e.updateDt:"object"===(0,r.default)(e.updateDt)&&(t.updateDt=new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber())),null!=e.extra&&(t.extra=String(e.extra)),null!=e.state&&(t.state=0|e.state),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.title="",n.desc="",n.portrait="",n.memberCount=0,u.Long){var r=new u.Long(0,0,!1);n.createDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createDt=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.updateDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.updateDt=t.longs===String?"0":0,n.extra="",n.state=0}return null!=e.title&&e.hasOwnProperty("title")&&(n.title=e.title),null!=e.desc&&e.hasOwnProperty("desc")&&(n.desc=e.desc),null!=e.portrait&&e.hasOwnProperty("portrait")&&(n.portrait=e.portrait),null!=e.memberCount&&e.hasOwnProperty("memberCount")&&(n.memberCount=e.memberCount),null!=e.createDt&&e.hasOwnProperty("createDt")&&("number"==typeof e.createDt?n.createDt=t.longs===String?String(e.createDt):e.createDt:n.createDt=t.longs===String?u.Long.prototype.toString.call(e.createDt):t.longs===Number?new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber():e.createDt),null!=e.updateDt&&e.hasOwnProperty("updateDt")&&("number"==typeof e.updateDt?n.updateDt=t.longs===String?String(e.updateDt):e.updateDt:n.updateDt=t.longs===String?u.Long.prototype.toString.call(e.updateDt):t.longs===Number?new u.LongBits(e.updateDt.low>>>0,e.updateDt.high>>>0).toNumber():e.updateDt),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.GetChatroomMemberInfoRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.chatroomId=e.string();break;case 2:r.maxCount=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("chatroomId"))throw u.ProtocolError("missing required 'chatroomId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.chatroomId)?null!=e.maxCount&&e.hasOwnProperty("maxCount")&&!u.isInteger(e.maxCount)?"maxCount: integer expected":null:"chatroomId: string expected"},e.fromObject=function(e){if(e instanceof c.GetChatroomMemberInfoRequest)return e;var t=new c.GetChatroomMemberInfoRequest;return null!=e.chatroomId&&(t.chatroomId=String(e.chatroomId)),null!=e.maxCount&&(t.maxCount=0|e.maxCount),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.chatroomId="",n.maxCount=0),null!=e.chatroomId&&e.hasOwnProperty("chatroomId")&&(n.chatroomId=e.chatroomId),null!=e.maxCount&&e.hasOwnProperty("maxCount")&&(n.maxCount=e.maxCount),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ChatroomMemberInfo=function(){function e(e){if(this.members=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.memberCount=e.int32();break;case 2:r.members&&r.members.length||(r.members=[]),r.members.push(e.string());break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.memberCount&&e.hasOwnProperty("memberCount")&&!u.isInteger(e.memberCount))return"memberCount: integer expected";if(null!=e.members&&e.hasOwnProperty("members")){if(!Array.isArray(e.members))return"members: array expected";for(var t=0;t>>3==1?r.id=e.int64():e.skipType(7&i)}if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.id)||e.id&&u.isInteger(e.id.low)&&u.isInteger(e.id.high)?null:"id: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.INT64Buf)return e;var t=new c.INT64Buf;return null!=e.id&&(u.Long?(t.id=u.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"===(0,r.default)(e.id)&&(t.id=new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(u.Long){var r=new u.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?u.Long.prototype.toString.call(e.id):t.longs===Number?new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.INT64ListBuf=function(){function e(e){if(this.id=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1)if(r.id&&r.id.length||(r.id=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>0,e.id[n].high>>>0).toNumber())}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.id=[]),e.id&&e.id.length){n.id=[];for(var r=0;r>>0,e.id[r].high>>>0).toNumber():e.id[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.NotifyRecallMessage=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.id=e.int64();break;case 2:r.fromUser=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("id"))throw u.ProtocolError("missing required 'id'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.id)||e.id&&u.isInteger(e.id.low)&&u.isInteger(e.id.high)?u.isString(e.fromUser)?null:"fromUser: string expected":"id: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.NotifyRecallMessage)return e;var t=new c.NotifyRecallMessage;return null!=e.id&&(u.Long?(t.id=u.Long.fromValue(e.id)).unsigned=!1:"string"==typeof e.id?t.id=parseInt(e.id,10):"number"==typeof e.id?t.id=e.id:"object"===(0,r.default)(e.id)&&(t.id=new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber())),null!=e.fromUser&&(t.fromUser=String(e.fromUser)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.fromUser=""}return null!=e.id&&e.hasOwnProperty("id")&&("number"==typeof e.id?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?u.Long.prototype.toString.call(e.id):t.longs===Number?new u.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber():e.id),null!=e.fromUser&&e.hasOwnProperty("fromUser")&&(n.fromUser=e.fromUser),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.BlackUserRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.uid=e.string();break;case 2:r.status=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("uid"))throw u.ProtocolError("missing required 'uid'",{instance:r});if(!r.hasOwnProperty("status"))throw u.ProtocolError("missing required 'status'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.uid)?u.isInteger(e.status)?null:"status: integer expected":"uid: string expected"},e.fromObject=function(e){if(e instanceof c.BlackUserRequest)return e;var t=new c.BlackUserRequest;return null!=e.uid&&(t.uid=String(e.uid)),null!=e.status&&(t.status=0|e.status),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.uid="",n.status=0),null!=e.uid&&e.hasOwnProperty("uid")&&(n.uid=e.uid),null!=e.status&&e.hasOwnProperty("status")&&(n.status=e.status),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RouteRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.app=e.string();break;case 2:r.platform=e.int32();break;case 3:r.pushType=e.int32();break;case 4:r.deviceName=e.string();break;case 5:r.deviceVersion=e.string();break;case 6:r.phoneName=e.string();break;case 7:r.language=e.string();break;case 8:r.carrierName=e.string();break;case 9:r.appVersion=e.string();break;case 10:r.sdkVersion=e.string();break;case 11:r.wxAppId=e.string();break;case 12:r.wxAppKey=e.string();break;case 13:r.webAppId=e.string();break;case 14:r.webAppKey=e.string();break;case 15:r.host=e.string();break;case 16:r.signature=e.string();break;default:e.skipType(7&i)}}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.app&&e.hasOwnProperty("app")&&!u.isString(e.app)?"app: string expected":null!=e.platform&&e.hasOwnProperty("platform")&&!u.isInteger(e.platform)?"platform: integer expected":null!=e.pushType&&e.hasOwnProperty("pushType")&&!u.isInteger(e.pushType)?"pushType: integer expected":null!=e.deviceName&&e.hasOwnProperty("deviceName")&&!u.isString(e.deviceName)?"deviceName: string expected":null!=e.deviceVersion&&e.hasOwnProperty("deviceVersion")&&!u.isString(e.deviceVersion)?"deviceVersion: string expected":null!=e.phoneName&&e.hasOwnProperty("phoneName")&&!u.isString(e.phoneName)?"phoneName: string expected":null!=e.language&&e.hasOwnProperty("language")&&!u.isString(e.language)?"language: string expected":null!=e.carrierName&&e.hasOwnProperty("carrierName")&&!u.isString(e.carrierName)?"carrierName: string expected":null!=e.appVersion&&e.hasOwnProperty("appVersion")&&!u.isString(e.appVersion)?"appVersion: string expected":null!=e.sdkVersion&&e.hasOwnProperty("sdkVersion")&&!u.isString(e.sdkVersion)?"sdkVersion: string expected":null!=e.wxAppId&&e.hasOwnProperty("wxAppId")&&!u.isString(e.wxAppId)?"wxAppId: string expected":null!=e.wxAppKey&&e.hasOwnProperty("wxAppKey")&&!u.isString(e.wxAppKey)?"wxAppKey: string expected":null!=e.webAppId&&e.hasOwnProperty("webAppId")&&!u.isString(e.webAppId)?"webAppId: string expected":null!=e.webAppKey&&e.hasOwnProperty("webAppKey")&&!u.isString(e.webAppKey)?"webAppKey: string expected":null!=e.host&&e.hasOwnProperty("host")&&!u.isString(e.host)?"host: string expected":null!=e.signature&&e.hasOwnProperty("signature")&&!u.isString(e.signature)?"signature: string expected":null},e.fromObject=function(e){if(e instanceof c.RouteRequest)return e;var t=new c.RouteRequest;return null!=e.app&&(t.app=String(e.app)),null!=e.platform&&(t.platform=0|e.platform),null!=e.pushType&&(t.pushType=0|e.pushType),null!=e.deviceName&&(t.deviceName=String(e.deviceName)),null!=e.deviceVersion&&(t.deviceVersion=String(e.deviceVersion)),null!=e.phoneName&&(t.phoneName=String(e.phoneName)),null!=e.language&&(t.language=String(e.language)),null!=e.carrierName&&(t.carrierName=String(e.carrierName)),null!=e.appVersion&&(t.appVersion=String(e.appVersion)),null!=e.sdkVersion&&(t.sdkVersion=String(e.sdkVersion)),null!=e.wxAppId&&(t.wxAppId=String(e.wxAppId)),null!=e.wxAppKey&&(t.wxAppKey=String(e.wxAppKey)),null!=e.webAppId&&(t.webAppId=String(e.webAppId)),null!=e.webAppKey&&(t.webAppKey=String(e.webAppKey)),null!=e.host&&(t.host=String(e.host)),null!=e.signature&&(t.signature=String(e.signature)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.app="",n.platform=0,n.pushType=0,n.deviceName="",n.deviceVersion="",n.phoneName="",n.language="",n.carrierName="",n.appVersion="",n.sdkVersion="",n.wxAppId="",n.wxAppKey="",n.webAppId="",n.webAppKey="",n.host="",n.signature=""),null!=e.app&&e.hasOwnProperty("app")&&(n.app=e.app),null!=e.platform&&e.hasOwnProperty("platform")&&(n.platform=e.platform),null!=e.pushType&&e.hasOwnProperty("pushType")&&(n.pushType=e.pushType),null!=e.deviceName&&e.hasOwnProperty("deviceName")&&(n.deviceName=e.deviceName),null!=e.deviceVersion&&e.hasOwnProperty("deviceVersion")&&(n.deviceVersion=e.deviceVersion),null!=e.phoneName&&e.hasOwnProperty("phoneName")&&(n.phoneName=e.phoneName),null!=e.language&&e.hasOwnProperty("language")&&(n.language=e.language),null!=e.carrierName&&e.hasOwnProperty("carrierName")&&(n.carrierName=e.carrierName),null!=e.appVersion&&e.hasOwnProperty("appVersion")&&(n.appVersion=e.appVersion),null!=e.sdkVersion&&e.hasOwnProperty("sdkVersion")&&(n.sdkVersion=e.sdkVersion),null!=e.wxAppId&&e.hasOwnProperty("wxAppId")&&(n.wxAppId=e.wxAppId),null!=e.wxAppKey&&e.hasOwnProperty("wxAppKey")&&(n.wxAppKey=e.wxAppKey),null!=e.webAppId&&e.hasOwnProperty("webAppId")&&(n.webAppId=e.webAppId),null!=e.webAppKey&&e.hasOwnProperty("webAppKey")&&(n.webAppKey=e.webAppKey),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),null!=e.signature&&e.hasOwnProperty("signature")&&(n.signature=e.signature),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.AddressTriple=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.host=e.string();break;case 2:r.longPort=e.int32();break;case 3:r.shortPort=e.int32();break;case 4:r.wssPort=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});if(!r.hasOwnProperty("longPort"))throw u.ProtocolError("missing required 'longPort'",{instance:r});if(!r.hasOwnProperty("shortPort"))throw u.ProtocolError("missing required 'shortPort'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.host)?u.isInteger(e.longPort)?u.isInteger(e.shortPort)?null!=e.wssPort&&e.hasOwnProperty("wssPort")&&!u.isInteger(e.wssPort)?"wssPort: integer expected":null:"shortPort: integer expected":"longPort: integer expected":"host: string expected"},e.fromObject=function(e){if(e instanceof c.AddressTriple)return e;var t=new c.AddressTriple;return null!=e.host&&(t.host=String(e.host)),null!=e.longPort&&(t.longPort=0|e.longPort),null!=e.shortPort&&(t.shortPort=0|e.shortPort),null!=e.wssPort&&(t.wssPort=0|e.wssPort),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.host="",n.longPort=0,n.shortPort=0,n.wssPort=0),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),null!=e.longPort&&e.hasOwnProperty("longPort")&&(n.longPort=e.longPort),null!=e.shortPort&&e.hasOwnProperty("shortPort")&&(n.shortPort=e.shortPort),null!=e.wssPort&&e.hasOwnProperty("wssPort")&&(n.wssPort=e.wssPort),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RouteResponse=function(){function e(e){if(this.candidate=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.host=e.string();break;case 2:r.longPort=e.int32();break;case 3:r.shortPort=e.int32();break;case 4:r.thumbPara=e.string();break;case 5:r.node=e.string();break;case 6:r.commercial=e.int32();break;case 7:r.wssPort=e.int32();break;case 8:r.candidate&&r.candidate.length||(r.candidate=[]),r.candidate.push(c.AddressTriple.decode(e,e.uint32()));break;case 9:r.shortTcpPort=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});if(!r.hasOwnProperty("longPort"))throw u.ProtocolError("missing required 'longPort'",{instance:r});if(!r.hasOwnProperty("shortPort"))throw u.ProtocolError("missing required 'shortPort'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.host))return"host: string expected";if(!u.isInteger(e.longPort))return"longPort: integer expected";if(!u.isInteger(e.shortPort))return"shortPort: integer expected";if(null!=e.thumbPara&&e.hasOwnProperty("thumbPara")&&!u.isString(e.thumbPara))return"thumbPara: string expected";if(null!=e.node&&e.hasOwnProperty("node")&&!u.isString(e.node))return"node: string expected";if(null!=e.commercial&&e.hasOwnProperty("commercial")&&!u.isInteger(e.commercial))return"commercial: integer expected";if(null!=e.wssPort&&e.hasOwnProperty("wssPort")&&!u.isInteger(e.wssPort))return"wssPort: integer expected";if(null!=e.candidate&&e.hasOwnProperty("candidate")){if(!Array.isArray(e.candidate))return"candidate: array expected";for(var t=0;t>>3){case 1:r.userId=e.string();break;case 2:r.clientId=e.string();break;case 3:r.platform=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("userId"))throw u.ProtocolError("missing required 'userId'",{instance:r});if(!r.hasOwnProperty("clientId"))throw u.ProtocolError("missing required 'clientId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.userId)?u.isString(e.clientId)?null!=e.platform&&e.hasOwnProperty("platform")&&!u.isInteger(e.platform)?"platform: integer expected":null:"clientId: string expected":"userId: string expected"},e.fromObject=function(e){if(e instanceof c.GetTokenRequest)return e;var t=new c.GetTokenRequest;return null!=e.userId&&(t.userId=String(e.userId)),null!=e.clientId&&(t.clientId=String(e.clientId)),null!=e.platform&&(t.platform=0|e.platform),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.userId="",n.clientId="",n.platform=0),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.clientId&&e.hasOwnProperty("clientId")&&(n.clientId=e.clientId),null!=e.platform&&e.hasOwnProperty("platform")&&(n.platform=e.platform),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.LoadRemoteMessages=function(){function e(e){if(this.contentType=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.conversation=c.Conversation.decode(e,e.uint32());break;case 2:r.beforeUid=e.int64();break;case 3:r.count=e.int32();break;case 4:if(r.contentType&&r.contentType.length||(r.contentType=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>0,e.beforeUid.high>>>0).toNumber())),null!=e.count&&(t.count=0|e.count),e.contentType){if(!Array.isArray(e.contentType))throw TypeError(".LoadRemoteMessages.contentType: array expected");t.contentType=[];for(var n=0;n>>0,e.beforeUid.high>>>0).toNumber():e.beforeUid),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),e.contentType&&e.contentType.length){n.contentType=[];for(var i=0;i>>3){case 1:r.line=e.int32();break;case 2:r.beforeUid=e.int64();break;case 3:r.count=e.int32();break;case 4:if(r.contentType&&r.contentType.length||(r.contentType=[]),2==(7&i))for(var o=e.uint32()+e.pos;e.pos>>0,e.beforeUid.high>>>0).toNumber())),null!=e.count&&(t.count=0|e.count),e.contentType){if(!Array.isArray(e.contentType))throw TypeError(".LoadLineMessages.contentType: array expected");t.contentType=[];for(var n=0;n>>0,e.beforeUid.high>>>0).toNumber():e.beforeUid),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),e.contentType&&e.contentType.length){n.contentType=[];for(var i=0;i>>3){case 1:r.fromUser=e.string();break;case 2:r.content=c.MessageContent.decode(e,e.uint32());break;case 3:r.to&&r.to.length||(r.to=[]),r.to.push(e.string());break;case 4:r.line=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("content"))throw u.ProtocolError("missing required 'content'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.fromUser))return"fromUser: string expected";var t=c.MessageContent.verify(e.content);if(t)return"content."+t;if(null!=e.to&&e.hasOwnProperty("to")){if(!Array.isArray(e.to))return"to: array expected";for(var n=0;n>>3){case 1:r.messageId=e.int64();break;case 2:r.target&&r.target.length||(r.target=[]),r.target.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.target&&e.hasOwnProperty("target")){if(!Array.isArray(e.target))return"target: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber())),e.target){if(!Array.isArray(e.target))throw TypeError(".RecallMultiMessage.target: array expected");t.target=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber():e.messageId),e.target&&e.target.length){n.target=[];for(var i=0;i>>3){case 1:r.messageId=e.int64();break;case 2:r.content=c.MessageContent.decode(e,e.uint32());break;case 3:r.distribute=e.int32();break;case 4:r.updateTime=e.int32();break;case 5:r.meshLocal=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("content"))throw u.ProtocolError("missing required 'content'",{instance:r});if(!r.hasOwnProperty("distribute"))throw u.ProtocolError("missing required 'distribute'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)))return"messageId: integer|Long expected";var t=c.MessageContent.verify(e.content);return t?"content."+t:u.isInteger(e.distribute)?null!=e.updateTime&&e.hasOwnProperty("updateTime")&&!u.isInteger(e.updateTime)?"updateTime: integer expected":null!=e.meshLocal&&e.hasOwnProperty("meshLocal")&&!u.isInteger(e.meshLocal)?"meshLocal: integer expected":null:"distribute: integer expected"},e.fromObject=function(e){if(e instanceof c.UpdateMessageContent)return e;var t=new c.UpdateMessageContent;if(null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.content){if("object"!==(0,r.default)(e.content))throw TypeError(".UpdateMessageContent.content: object expected");t.content=c.MessageContent.fromObject(e.content)}return null!=e.distribute&&(t.distribute=0|e.distribute),null!=e.updateTime&&(t.updateTime=0|e.updateTime),null!=e.meshLocal&&(t.meshLocal=0|e.meshLocal),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.content=null,n.distribute=0,n.updateTime=0,n.meshLocal=0}return null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=c.MessageContent.toObject(e.content,t)),null!=e.distribute&&e.hasOwnProperty("distribute")&&(n.distribute=e.distribute),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(n.updateTime=e.updateTime),null!=e.meshLocal&&e.hasOwnProperty("meshLocal")&&(n.meshLocal=e.meshLocal),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.FileRecord=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.messageId=e.int64();break;case 2:r.fromUser=e.string();break;case 3:r.conversation=c.Conversation.decode(e,e.uint32());break;case 4:r.name=e.string();break;case 5:r.url=e.string();break;case 6:r.size=e.int32();break;case 7:r.downloadCount=e.int32();break;case 8:r.dt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("fromUser"))throw u.ProtocolError("missing required 'fromUser'",{instance:r});if(!r.hasOwnProperty("url"))throw u.ProtocolError("missing required 'url'",{instance:r});if(!r.hasOwnProperty("size"))throw u.ProtocolError("missing required 'size'",{instance:r});if(!r.hasOwnProperty("dt"))throw u.ProtocolError("missing required 'dt'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(!u.isString(e.fromUser))return"fromUser: string expected";if(null!=e.conversation&&e.hasOwnProperty("conversation")){var t=c.Conversation.verify(e.conversation);if(t)return"conversation."+t}return null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":u.isString(e.url)?u.isInteger(e.size)?null!=e.downloadCount&&e.hasOwnProperty("downloadCount")&&!u.isInteger(e.downloadCount)?"downloadCount: integer expected":u.isInteger(e.dt)||e.dt&&u.isInteger(e.dt.low)&&u.isInteger(e.dt.high)?null:"dt: integer|Long expected":"size: integer expected":"url: string expected"},e.fromObject=function(e){if(e instanceof c.FileRecord)return e;var t=new c.FileRecord;if(null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.fromUser&&(t.fromUser=String(e.fromUser)),null!=e.conversation){if("object"!==(0,r.default)(e.conversation))throw TypeError(".FileRecord.conversation: object expected");t.conversation=c.Conversation.fromObject(e.conversation)}return null!=e.name&&(t.name=String(e.name)),null!=e.url&&(t.url=String(e.url)),null!=e.size&&(t.size=0|e.size),null!=e.downloadCount&&(t.downloadCount=0|e.downloadCount),null!=e.dt&&(u.Long?(t.dt=u.Long.fromValue(e.dt)).unsigned=!1:"string"==typeof e.dt?t.dt=parseInt(e.dt,10):"number"==typeof e.dt?t.dt=e.dt:"object"===(0,r.default)(e.dt)&&(t.dt=new u.LongBits(e.dt.low>>>0,e.dt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.fromUser="",n.conversation=null,n.name="",n.url="",n.size=0,n.downloadCount=0,u.Long?(r=new u.Long(0,0,!1),n.dt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.dt=t.longs===String?"0":0}return null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.fromUser&&e.hasOwnProperty("fromUser")&&(n.fromUser=e.fromUser),null!=e.conversation&&e.hasOwnProperty("conversation")&&(n.conversation=c.Conversation.toObject(e.conversation,t)),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.url&&e.hasOwnProperty("url")&&(n.url=e.url),null!=e.size&&e.hasOwnProperty("size")&&(n.size=e.size),null!=e.downloadCount&&e.hasOwnProperty("downloadCount")&&(n.downloadCount=e.downloadCount),null!=e.dt&&e.hasOwnProperty("dt")&&("number"==typeof e.dt?n.dt=t.longs===String?String(e.dt):e.dt:n.dt=t.longs===String?u.Long.prototype.toString.call(e.dt):t.longs===Number?new u.LongBits(e.dt.low>>>0,e.dt.high>>>0).toNumber():e.dt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.LoadFileRecordReq=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.conversation=c.Conversation.decode(e,e.uint32());break;case 2:r.messageId=e.int64();break;case 3:r.count=e.int32();break;case 4:r.from=e.string();break;case 5:r.order=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("count"))throw u.ProtocolError("missing required 'count'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.conversation&&e.hasOwnProperty("conversation")){var t=c.Conversation.verify(e.conversation);if(t)return"conversation."+t}return u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)?u.isInteger(e.count)?null!=e.from&&e.hasOwnProperty("from")&&!u.isString(e.from)?"from: string expected":null!=e.order&&e.hasOwnProperty("order")&&!u.isInteger(e.order)?"order: integer expected":null:"count: integer expected":"messageId: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.LoadFileRecordReq)return e;var t=new c.LoadFileRecordReq;if(null!=e.conversation){if("object"!==(0,r.default)(e.conversation))throw TypeError(".LoadFileRecordReq.conversation: object expected");t.conversation=c.Conversation.fromObject(e.conversation)}return null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.count&&(t.count=0|e.count),null!=e.from&&(t.from=String(e.from)),null!=e.order&&(t.order=0|e.order),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.conversation=null,u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.count=0,n.from="",n.order=0}return null!=e.conversation&&e.hasOwnProperty("conversation")&&(n.conversation=c.Conversation.toObject(e.conversation,t)),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.order&&e.hasOwnProperty("order")&&(n.order=e.order),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.LoadFileRecordRes=function(){function e(e){if(this.record=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.record&&r.record.length||(r.record=[]),r.record.push(c.FileRecord.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.record&&e.hasOwnProperty("record")){if(!Array.isArray(e.record))return"record: array expected";for(var t=0;t>>3){case 1:r.keyword=e.string();break;case 2:r.conversation=c.Conversation.decode(e,e.uint32());break;case 3:r.messageId=e.int64();break;case 4:r.count=e.int32();break;case 5:r.from=e.string();break;case 6:r.order=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("keyword"))throw u.ProtocolError("missing required 'keyword'",{instance:r});if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("count"))throw u.ProtocolError("missing required 'count'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.keyword))return"keyword: string expected";if(null!=e.conversation&&e.hasOwnProperty("conversation")){var t=c.Conversation.verify(e.conversation);if(t)return"conversation."+t}return u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)?u.isInteger(e.count)?null!=e.from&&e.hasOwnProperty("from")&&!u.isString(e.from)?"from: string expected":null!=e.order&&e.hasOwnProperty("order")&&!u.isInteger(e.order)?"order: integer expected":null:"count: integer expected":"messageId: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.SearchFileRecordReq)return e;var t=new c.SearchFileRecordReq;if(null!=e.keyword&&(t.keyword=String(e.keyword)),null!=e.conversation){if("object"!==(0,r.default)(e.conversation))throw TypeError(".SearchFileRecordReq.conversation: object expected");t.conversation=c.Conversation.fromObject(e.conversation)}return null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.count&&(t.count=0|e.count),null!=e.from&&(t.from=String(e.from)),null!=e.order&&(t.order=0|e.order),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.keyword="",n.conversation=null,u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;n.count=0,n.from="",n.order=0}return null!=e.keyword&&e.hasOwnProperty("keyword")&&(n.keyword=e.keyword),null!=e.conversation&&e.hasOwnProperty("conversation")&&(n.conversation=c.Conversation.toObject(e.conversation,t)),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.count&&e.hasOwnProperty("count")&&(n.count=e.count),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.order&&e.hasOwnProperty("order")&&(n.order=e.order),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ConferenceRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.sessionId=e.int64();break;case 2:r.request=e.string();break;case 3:r.data=e.string();break;case 4:r.roomId=e.string();break;case 5:r.advance=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("request"))throw u.ProtocolError("missing required 'request'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!(u.isInteger(e.sessionId)||e.sessionId&&u.isInteger(e.sessionId.low)&&u.isInteger(e.sessionId.high))?"sessionId: integer|Long expected":u.isString(e.request)?null!=e.data&&e.hasOwnProperty("data")&&!u.isString(e.data)?"data: string expected":null!=e.roomId&&e.hasOwnProperty("roomId")&&!u.isString(e.roomId)?"roomId: string expected":null!=e.advance&&e.hasOwnProperty("advance")&&!u.isInteger(e.advance)?"advance: integer expected":null:"request: string expected"},e.fromObject=function(e){if(e instanceof c.ConferenceRequest)return e;var t=new c.ConferenceRequest;return null!=e.sessionId&&(u.Long?(t.sessionId=u.Long.fromValue(e.sessionId)).unsigned=!1:"string"==typeof e.sessionId?t.sessionId=parseInt(e.sessionId,10):"number"==typeof e.sessionId?t.sessionId=e.sessionId:"object"===(0,r.default)(e.sessionId)&&(t.sessionId=new u.LongBits(e.sessionId.low>>>0,e.sessionId.high>>>0).toNumber())),null!=e.request&&(t.request=String(e.request)),null!=e.data&&(t.data=String(e.data)),null!=e.roomId&&(t.roomId=String(e.roomId)),null!=e.advance&&(t.advance=0|e.advance),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.sessionId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.sessionId=t.longs===String?"0":0;n.request="",n.data="",n.roomId="",n.advance=0}return null!=e.sessionId&&e.hasOwnProperty("sessionId")&&("number"==typeof e.sessionId?n.sessionId=t.longs===String?String(e.sessionId):e.sessionId:n.sessionId=t.longs===String?u.Long.prototype.toString.call(e.sessionId):t.longs===Number?new u.LongBits(e.sessionId.low>>>0,e.sessionId.high>>>0).toNumber():e.sessionId),null!=e.request&&e.hasOwnProperty("request")&&(n.request=e.request),null!=e.data&&e.hasOwnProperty("data")&&(n.data=e.data),null!=e.roomId&&e.hasOwnProperty("roomId")&&(n.roomId=e.roomId),null!=e.advance&&e.hasOwnProperty("advance")&&(n.advance=e.advance),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ConfInfo=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.roomId=e.string();break;case 2:r.description=e.string();break;case 3:r.serverId=e.string();break;case 4:r.pin=e.string();break;case 5:r.publishers=e.int32();break;case 6:r.numPublisher=e.int32();break;case 7:r.bitrate=e.int32();break;case 8:r.advance=e.int32();break;case 9:r.record=e.int32();break;case 10:r.permanent=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("roomId"))throw u.ProtocolError("missing required 'roomId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.roomId)?null!=e.description&&e.hasOwnProperty("description")&&!u.isString(e.description)?"description: string expected":null!=e.serverId&&e.hasOwnProperty("serverId")&&!u.isString(e.serverId)?"serverId: string expected":null!=e.pin&&e.hasOwnProperty("pin")&&!u.isString(e.pin)?"pin: string expected":null!=e.publishers&&e.hasOwnProperty("publishers")&&!u.isInteger(e.publishers)?"publishers: integer expected":null!=e.numPublisher&&e.hasOwnProperty("numPublisher")&&!u.isInteger(e.numPublisher)?"numPublisher: integer expected":null!=e.bitrate&&e.hasOwnProperty("bitrate")&&!u.isInteger(e.bitrate)?"bitrate: integer expected":null!=e.advance&&e.hasOwnProperty("advance")&&!u.isInteger(e.advance)?"advance: integer expected":null!=e.record&&e.hasOwnProperty("record")&&!u.isInteger(e.record)?"record: integer expected":null!=e.permanent&&e.hasOwnProperty("permanent")&&!u.isInteger(e.permanent)?"permanent: integer expected":null:"roomId: string expected"},e.fromObject=function(e){if(e instanceof c.ConfInfo)return e;var t=new c.ConfInfo;return null!=e.roomId&&(t.roomId=String(e.roomId)),null!=e.description&&(t.description=String(e.description)),null!=e.serverId&&(t.serverId=String(e.serverId)),null!=e.pin&&(t.pin=String(e.pin)),null!=e.publishers&&(t.publishers=0|e.publishers),null!=e.numPublisher&&(t.numPublisher=0|e.numPublisher),null!=e.bitrate&&(t.bitrate=0|e.bitrate),null!=e.advance&&(t.advance=0|e.advance),null!=e.record&&(t.record=0|e.record),null!=e.permanent&&(t.permanent=0|e.permanent),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.roomId="",n.description="",n.serverId="",n.pin="",n.publishers=0,n.numPublisher=0,n.bitrate=0,n.advance=0,n.record=0,n.permanent=0),null!=e.roomId&&e.hasOwnProperty("roomId")&&(n.roomId=e.roomId),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.serverId&&e.hasOwnProperty("serverId")&&(n.serverId=e.serverId),null!=e.pin&&e.hasOwnProperty("pin")&&(n.pin=e.pin),null!=e.publishers&&e.hasOwnProperty("publishers")&&(n.publishers=e.publishers),null!=e.numPublisher&&e.hasOwnProperty("numPublisher")&&(n.numPublisher=e.numPublisher),null!=e.bitrate&&e.hasOwnProperty("bitrate")&&(n.bitrate=e.bitrate),null!=e.advance&&e.hasOwnProperty("advance")&&(n.advance=e.advance),null!=e.record&&e.hasOwnProperty("record")&&(n.record=e.record),null!=e.permanent&&e.hasOwnProperty("permanent")&&(n.permanent=e.permanent),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ConfInfos=function(){function e(e){if(this.info=[],e)for(var t=(0,i.default)(e),n=0;n>>3==1?(r.info&&r.info.length||(r.info=[]),r.info.push(c.ConfInfo.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.info&&e.hasOwnProperty("info")){if(!Array.isArray(e.info))return"info: array expected";for(var t=0;t>>3){case 1:r.type=e.string();break;case 2:r.mid=e.string();break;case 3:r.codec=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("mid"))throw u.ProtocolError("missing required 'mid'",{instance:r});if(!r.hasOwnProperty("codec"))throw u.ProtocolError("missing required 'codec'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.type)?u.isString(e.mid)?u.isString(e.codec)?null:"codec: string expected":"mid: string expected":"type: string expected"},e.fromObject=function(e){if(e instanceof c.ConfStream)return e;var t=new c.ConfStream;return null!=e.type&&(t.type=String(e.type)),null!=e.mid&&(t.mid=String(e.mid)),null!=e.codec&&(t.codec=String(e.codec)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type="",n.mid="",n.codec=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.mid&&e.hasOwnProperty("mid")&&(n.mid=e.mid),null!=e.codec&&e.hasOwnProperty("codec")&&(n.codec=e.codec),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ConfParticipant=function(){function e(e){if(this.stream=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.userId=e.string();break;case 2:r.publisher=e.int32();break;case 3:r.stream&&r.stream.length||(r.stream=[]),r.stream.push(c.ConfStream.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("userId"))throw u.ProtocolError("missing required 'userId'",{instance:r});if(!r.hasOwnProperty("publisher"))throw u.ProtocolError("missing required 'publisher'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.userId))return"userId: string expected";if(!u.isInteger(e.publisher))return"publisher: integer expected";if(null!=e.stream&&e.hasOwnProperty("stream")){if(!Array.isArray(e.stream))return"stream: array expected";for(var t=0;t>>3==1?(r.participant&&r.participant.length||(r.participant=[]),r.participant.push(c.ConfParticipant.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.participant&&e.hasOwnProperty("participant")){if(!Array.isArray(e.participant))return"participant: array expected";for(var t=0;t>>3){case 1:r.roomId=e.string();break;case 2:r.publisherId=e.string();break;case 3:r.host=e.string();break;case 4:r.audioPort=e.int32();break;case 5:r.audioPt=e.int32();break;case 6:r.audioSsrc=e.int64();break;case 7:r.videoPort=e.int32();break;case 8:r.videoPt=e.int32();break;case 9:r.videoSsrc=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("roomId"))throw u.ProtocolError("missing required 'roomId'",{instance:r});if(!r.hasOwnProperty("publisherId"))throw u.ProtocolError("missing required 'publisherId'",{instance:r});if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.roomId)?u.isString(e.publisherId)?u.isString(e.host)?null!=e.audioPort&&e.hasOwnProperty("audioPort")&&!u.isInteger(e.audioPort)?"audioPort: integer expected":null!=e.audioPt&&e.hasOwnProperty("audioPt")&&!u.isInteger(e.audioPt)?"audioPt: integer expected":null!=e.audioSsrc&&e.hasOwnProperty("audioSsrc")&&!(u.isInteger(e.audioSsrc)||e.audioSsrc&&u.isInteger(e.audioSsrc.low)&&u.isInteger(e.audioSsrc.high))?"audioSsrc: integer|Long expected":null!=e.videoPort&&e.hasOwnProperty("videoPort")&&!u.isInteger(e.videoPort)?"videoPort: integer expected":null!=e.videoPt&&e.hasOwnProperty("videoPt")&&!u.isInteger(e.videoPt)?"videoPt: integer expected":null!=e.videoSsrc&&e.hasOwnProperty("videoSsrc")&&!(u.isInteger(e.videoSsrc)||e.videoSsrc&&u.isInteger(e.videoSsrc.low)&&u.isInteger(e.videoSsrc.high))?"videoSsrc: integer|Long expected":null:"host: string expected":"publisherId: string expected":"roomId: string expected"},e.fromObject=function(e){if(e instanceof c.ConfRtpForwardReq)return e;var t=new c.ConfRtpForwardReq;return null!=e.roomId&&(t.roomId=String(e.roomId)),null!=e.publisherId&&(t.publisherId=String(e.publisherId)),null!=e.host&&(t.host=String(e.host)),null!=e.audioPort&&(t.audioPort=0|e.audioPort),null!=e.audioPt&&(t.audioPt=0|e.audioPt),null!=e.audioSsrc&&(u.Long?(t.audioSsrc=u.Long.fromValue(e.audioSsrc)).unsigned=!1:"string"==typeof e.audioSsrc?t.audioSsrc=parseInt(e.audioSsrc,10):"number"==typeof e.audioSsrc?t.audioSsrc=e.audioSsrc:"object"===(0,r.default)(e.audioSsrc)&&(t.audioSsrc=new u.LongBits(e.audioSsrc.low>>>0,e.audioSsrc.high>>>0).toNumber())),null!=e.videoPort&&(t.videoPort=0|e.videoPort),null!=e.videoPt&&(t.videoPt=0|e.videoPt),null!=e.videoSsrc&&(u.Long?(t.videoSsrc=u.Long.fromValue(e.videoSsrc)).unsigned=!1:"string"==typeof e.videoSsrc?t.videoSsrc=parseInt(e.videoSsrc,10):"number"==typeof e.videoSsrc?t.videoSsrc=e.videoSsrc:"object"===(0,r.default)(e.videoSsrc)&&(t.videoSsrc=new u.LongBits(e.videoSsrc.low>>>0,e.videoSsrc.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.roomId="",n.publisherId="",n.host="",n.audioPort=0,n.audioPt=0,u.Long){var r=new u.Long(0,0,!1);n.audioSsrc=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.audioSsrc=t.longs===String?"0":0;n.videoPort=0,n.videoPt=0,u.Long?(r=new u.Long(0,0,!1),n.videoSsrc=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.videoSsrc=t.longs===String?"0":0}return null!=e.roomId&&e.hasOwnProperty("roomId")&&(n.roomId=e.roomId),null!=e.publisherId&&e.hasOwnProperty("publisherId")&&(n.publisherId=e.publisherId),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),null!=e.audioPort&&e.hasOwnProperty("audioPort")&&(n.audioPort=e.audioPort),null!=e.audioPt&&e.hasOwnProperty("audioPt")&&(n.audioPt=e.audioPt),null!=e.audioSsrc&&e.hasOwnProperty("audioSsrc")&&("number"==typeof e.audioSsrc?n.audioSsrc=t.longs===String?String(e.audioSsrc):e.audioSsrc:n.audioSsrc=t.longs===String?u.Long.prototype.toString.call(e.audioSsrc):t.longs===Number?new u.LongBits(e.audioSsrc.low>>>0,e.audioSsrc.high>>>0).toNumber():e.audioSsrc),null!=e.videoPort&&e.hasOwnProperty("videoPort")&&(n.videoPort=e.videoPort),null!=e.videoPt&&e.hasOwnProperty("videoPt")&&(n.videoPt=e.videoPt),null!=e.videoSsrc&&e.hasOwnProperty("videoSsrc")&&("number"==typeof e.videoSsrc?n.videoSsrc=t.longs===String?String(e.videoSsrc):e.videoSsrc:n.videoSsrc=t.longs===String?u.Long.prototype.toString.call(e.videoSsrc):t.longs===Number?new u.LongBits(e.videoSsrc.low>>>0,e.videoSsrc.high>>>0).toNumber():e.videoSsrc),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RecallMultiCastMessageRequest=function(){function e(e){if(this.receiver=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.messageId=e.int64();break;case 2:r.receiver&&r.receiver.length||(r.receiver=[]),r.receiver.push(e.string());break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!(u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)))return"messageId: integer|Long expected";if(null!=e.receiver&&e.hasOwnProperty("receiver")){if(!Array.isArray(e.receiver))return"receiver: array expected";for(var t=0;t>>0,e.messageId.high>>>0).toNumber())),e.receiver){if(!Array.isArray(e.receiver))throw TypeError(".RecallMultiCastMessageRequest.receiver: array expected");t.receiver=[];for(var n=0;n>>0,e.messageId.high>>>0).toNumber():e.messageId),e.receiver&&e.receiver.length){n.receiver=[];for(var i=0;i>>3){case 1:r.mediaUrl=e.string();break;case 2:r.thumbUrl=e.string();break;case 3:r.width=e.int32();break;case 4:r.height=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("mediaUrl"))throw u.ProtocolError("missing required 'mediaUrl'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.mediaUrl)?null!=e.thumbUrl&&e.hasOwnProperty("thumbUrl")&&!u.isString(e.thumbUrl)?"thumbUrl: string expected":null!=e.width&&e.hasOwnProperty("width")&&!u.isInteger(e.width)?"width: integer expected":null!=e.height&&e.hasOwnProperty("height")&&!u.isInteger(e.height)?"height: integer expected":null:"mediaUrl: string expected"},e.fromObject=function(e){if(e instanceof c.MomentsMedia)return e;var t=new c.MomentsMedia;return null!=e.mediaUrl&&(t.mediaUrl=String(e.mediaUrl)),null!=e.thumbUrl&&(t.thumbUrl=String(e.thumbUrl)),null!=e.width&&(t.width=0|e.width),null!=e.height&&(t.height=0|e.height),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.mediaUrl="",n.thumbUrl="",n.width=0,n.height=0),null!=e.mediaUrl&&e.hasOwnProperty("mediaUrl")&&(n.mediaUrl=e.mediaUrl),null!=e.thumbUrl&&e.hasOwnProperty("thumbUrl")&&(n.thumbUrl=e.thumbUrl),null!=e.width&&e.hasOwnProperty("width")&&(n.width=e.width),null!=e.height&&e.hasOwnProperty("height")&&(n.height=e.height),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.MomentsFeed=function(){function e(e){if(this.medias=[],this.mentionedUsers=[],this.toUsers=[],this.excludeUsers=[],this.comments=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.feedId=e.int64();break;case 2:r.sender=e.string();break;case 3:r.type=e.int32();break;case 4:r.text=e.string();break;case 5:r.medias&&r.medias.length||(r.medias=[]),r.medias.push(c.MomentsMedia.decode(e,e.uint32()));break;case 6:r.mentionedUsers&&r.mentionedUsers.length||(r.mentionedUsers=[]),r.mentionedUsers.push(e.string());break;case 7:r.toUsers&&r.toUsers.length||(r.toUsers=[]),r.toUsers.push(e.string());break;case 8:r.excludeUsers&&r.excludeUsers.length||(r.excludeUsers=[]),r.excludeUsers.push(e.string());break;case 9:r.serverTime=e.int64();break;case 10:r.extra=e.string();break;case 11:r.comments&&r.comments.length||(r.comments=[]),r.comments.push(c.MomentsComment.decode(e,e.uint32()));break;case 12:r.hasMore=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("feedId"))throw u.ProtocolError("missing required 'feedId'",{instance:r});if(!r.hasOwnProperty("sender"))throw u.ProtocolError("missing required 'sender'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("serverTime"))throw u.ProtocolError("missing required 'serverTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!(u.isInteger(e.feedId)||e.feedId&&u.isInteger(e.feedId.low)&&u.isInteger(e.feedId.high)))return"feedId: integer|Long expected";if(!u.isString(e.sender))return"sender: string expected";if(!u.isInteger(e.type))return"type: integer expected";if(null!=e.text&&e.hasOwnProperty("text")&&!u.isString(e.text))return"text: string expected";if(null!=e.medias&&e.hasOwnProperty("medias")){if(!Array.isArray(e.medias))return"medias: array expected";for(var t=0;t>>0,e.feedId.high>>>0).toNumber())),null!=e.sender&&(t.sender=String(e.sender)),null!=e.type&&(t.type=0|e.type),null!=e.text&&(t.text=String(e.text)),e.medias){if(!Array.isArray(e.medias))throw TypeError(".MomentsFeed.medias: array expected");t.medias=[];for(var n=0;n>>0,e.serverTime.high>>>0).toNumber())),null!=e.extra&&(t.extra=String(e.extra)),e.comments){if(!Array.isArray(e.comments))throw TypeError(".MomentsFeed.comments: array expected");for(t.comments=[],n=0;n>>0,e.feedId.high>>>0).toNumber():e.feedId),null!=e.sender&&e.hasOwnProperty("sender")&&(n.sender=e.sender),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.text&&e.hasOwnProperty("text")&&(n.text=e.text),e.medias&&e.medias.length){n.medias=[];for(var i=0;i>>0,e.serverTime.high>>>0).toNumber():e.serverTime),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),e.comments&&e.comments.length)for(n.comments=[],i=0;i>>3==1?(r.feeds&&r.feeds.length||(r.feeds=[]),r.feeds.push(c.MomentsFeed.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.feeds&&e.hasOwnProperty("feeds")){if(!Array.isArray(e.feeds))return"feeds: array expected";for(var t=0;t>>3==1?(r.comments&&r.comments.length||(r.comments=[]),r.comments.push(c.MomentsComment.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.comments&&e.hasOwnProperty("comments")){if(!Array.isArray(e.comments))return"comments: array expected";for(var t=0;t>>3){case 1:r.feedId=e.int64();break;case 2:r.commentId=e.int64();break;case 3:r.replyId=e.int64();break;case 4:r.sender=e.string();break;case 5:r.type=e.int32();break;case 6:r.text=e.string();break;case 7:r.replyTo=e.string();break;case 8:r.serverTime=e.int64();break;case 9:r.extra=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("feedId"))throw u.ProtocolError("missing required 'feedId'",{instance:r});if(!r.hasOwnProperty("commentId"))throw u.ProtocolError("missing required 'commentId'",{instance:r});if(!r.hasOwnProperty("sender"))throw u.ProtocolError("missing required 'sender'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("serverTime"))throw u.ProtocolError("missing required 'serverTime'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.feedId)||e.feedId&&u.isInteger(e.feedId.low)&&u.isInteger(e.feedId.high)?u.isInteger(e.commentId)||e.commentId&&u.isInteger(e.commentId.low)&&u.isInteger(e.commentId.high)?null!=e.replyId&&e.hasOwnProperty("replyId")&&!(u.isInteger(e.replyId)||e.replyId&&u.isInteger(e.replyId.low)&&u.isInteger(e.replyId.high))?"replyId: integer|Long expected":u.isString(e.sender)?u.isInteger(e.type)?null!=e.text&&e.hasOwnProperty("text")&&!u.isString(e.text)?"text: string expected":null!=e.replyTo&&e.hasOwnProperty("replyTo")&&!u.isString(e.replyTo)?"replyTo: string expected":u.isInteger(e.serverTime)||e.serverTime&&u.isInteger(e.serverTime.low)&&u.isInteger(e.serverTime.high)?null!=e.extra&&e.hasOwnProperty("extra")&&!u.isString(e.extra)?"extra: string expected":null:"serverTime: integer|Long expected":"type: integer expected":"sender: string expected":"commentId: integer|Long expected":"feedId: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.MomentsComment)return e;var t=new c.MomentsComment;return null!=e.feedId&&(u.Long?(t.feedId=u.Long.fromValue(e.feedId)).unsigned=!1:"string"==typeof e.feedId?t.feedId=parseInt(e.feedId,10):"number"==typeof e.feedId?t.feedId=e.feedId:"object"===(0,r.default)(e.feedId)&&(t.feedId=new u.LongBits(e.feedId.low>>>0,e.feedId.high>>>0).toNumber())),null!=e.commentId&&(u.Long?(t.commentId=u.Long.fromValue(e.commentId)).unsigned=!1:"string"==typeof e.commentId?t.commentId=parseInt(e.commentId,10):"number"==typeof e.commentId?t.commentId=e.commentId:"object"===(0,r.default)(e.commentId)&&(t.commentId=new u.LongBits(e.commentId.low>>>0,e.commentId.high>>>0).toNumber())),null!=e.replyId&&(u.Long?(t.replyId=u.Long.fromValue(e.replyId)).unsigned=!1:"string"==typeof e.replyId?t.replyId=parseInt(e.replyId,10):"number"==typeof e.replyId?t.replyId=e.replyId:"object"===(0,r.default)(e.replyId)&&(t.replyId=new u.LongBits(e.replyId.low>>>0,e.replyId.high>>>0).toNumber())),null!=e.sender&&(t.sender=String(e.sender)),null!=e.type&&(t.type=0|e.type),null!=e.text&&(t.text=String(e.text)),null!=e.replyTo&&(t.replyTo=String(e.replyTo)),null!=e.serverTime&&(u.Long?(t.serverTime=u.Long.fromValue(e.serverTime)).unsigned=!1:"string"==typeof e.serverTime?t.serverTime=parseInt(e.serverTime,10):"number"==typeof e.serverTime?t.serverTime=e.serverTime:"object"===(0,r.default)(e.serverTime)&&(t.serverTime=new u.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber())),null!=e.extra&&(t.extra=String(e.extra)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(u.Long){var r=new u.Long(0,0,!1);n.feedId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.feedId=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.commentId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.commentId=t.longs===String?"0":0,u.Long?(r=new u.Long(0,0,!1),n.replyId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.replyId=t.longs===String?"0":0,n.sender="",n.type=0,n.text="",n.replyTo="",u.Long?(r=new u.Long(0,0,!1),n.serverTime=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.serverTime=t.longs===String?"0":0,n.extra=""}return null!=e.feedId&&e.hasOwnProperty("feedId")&&("number"==typeof e.feedId?n.feedId=t.longs===String?String(e.feedId):e.feedId:n.feedId=t.longs===String?u.Long.prototype.toString.call(e.feedId):t.longs===Number?new u.LongBits(e.feedId.low>>>0,e.feedId.high>>>0).toNumber():e.feedId),null!=e.commentId&&e.hasOwnProperty("commentId")&&("number"==typeof e.commentId?n.commentId=t.longs===String?String(e.commentId):e.commentId:n.commentId=t.longs===String?u.Long.prototype.toString.call(e.commentId):t.longs===Number?new u.LongBits(e.commentId.low>>>0,e.commentId.high>>>0).toNumber():e.commentId),null!=e.replyId&&e.hasOwnProperty("replyId")&&("number"==typeof e.replyId?n.replyId=t.longs===String?String(e.replyId):e.replyId:n.replyId=t.longs===String?u.Long.prototype.toString.call(e.replyId):t.longs===Number?new u.LongBits(e.replyId.low>>>0,e.replyId.high>>>0).toNumber():e.replyId),null!=e.sender&&e.hasOwnProperty("sender")&&(n.sender=e.sender),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.text&&e.hasOwnProperty("text")&&(n.text=e.text),null!=e.replyTo&&e.hasOwnProperty("replyTo")&&(n.replyTo=e.replyTo),null!=e.serverTime&&e.hasOwnProperty("serverTime")&&("number"==typeof e.serverTime?n.serverTime=t.longs===String?String(e.serverTime):e.serverTime:n.serverTime=t.longs===String?u.Long.prototype.toString.call(e.serverTime):t.longs===Number?new u.LongBits(e.serverTime.low>>>0,e.serverTime.high>>>0).toNumber():e.serverTime),null!=e.extra&&e.hasOwnProperty("extra")&&(n.extra=e.extra),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.LockRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.lockId=e.string();break;case 2:r.duration=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("lockId"))throw u.ProtocolError("missing required 'lockId'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.lockId)?null!=e.duration&&e.hasOwnProperty("duration")&&!(u.isInteger(e.duration)||e.duration&&u.isInteger(e.duration.low)&&u.isInteger(e.duration.high))?"duration: integer|Long expected":null:"lockId: string expected"},e.fromObject=function(e){if(e instanceof c.LockRequest)return e;var t=new c.LockRequest;return null!=e.lockId&&(t.lockId=String(e.lockId)),null!=e.duration&&(u.Long?(t.duration=u.Long.fromValue(e.duration)).unsigned=!1:"string"==typeof e.duration?t.duration=parseInt(e.duration,10):"number"==typeof e.duration?t.duration=e.duration:"object"===(0,r.default)(e.duration)&&(t.duration=new u.LongBits(e.duration.low>>>0,e.duration.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.lockId="",u.Long){var r=new u.Long(0,0,!1);n.duration=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.duration=t.longs===String?"0":0;return null!=e.lockId&&e.hasOwnProperty("lockId")&&(n.lockId=e.lockId),null!=e.duration&&e.hasOwnProperty("duration")&&("number"==typeof e.duration?n.duration=t.longs===String?String(e.duration):e.duration:n.duration=t.longs===String?u.Long.prototype.toString.call(e.duration):t.longs===Number?new u.LongBits(e.duration.low>>>0,e.duration.high>>>0).toNumber():e.duration),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PresenceOnlineState=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.platform=e.int32();break;case 2:r.state=e.int32();break;case 3:r.lastSeen=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("platform"))throw u.ProtocolError("missing required 'platform'",{instance:r});if(!r.hasOwnProperty("state"))throw u.ProtocolError("missing required 'state'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isInteger(e.platform)?u.isInteger(e.state)?null!=e.lastSeen&&e.hasOwnProperty("lastSeen")&&!(u.isInteger(e.lastSeen)||e.lastSeen&&u.isInteger(e.lastSeen.low)&&u.isInteger(e.lastSeen.high))?"lastSeen: integer|Long expected":null:"state: integer expected":"platform: integer expected"},e.fromObject=function(e){if(e instanceof c.PresenceOnlineState)return e;var t=new c.PresenceOnlineState;return null!=e.platform&&(t.platform=0|e.platform),null!=e.state&&(t.state=0|e.state),null!=e.lastSeen&&(u.Long?(t.lastSeen=u.Long.fromValue(e.lastSeen)).unsigned=!1:"string"==typeof e.lastSeen?t.lastSeen=parseInt(e.lastSeen,10):"number"==typeof e.lastSeen?t.lastSeen=e.lastSeen:"object"===(0,r.default)(e.lastSeen)&&(t.lastSeen=new u.LongBits(e.lastSeen.low>>>0,e.lastSeen.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.platform=0,n.state=0,u.Long){var r=new u.Long(0,0,!1);n.lastSeen=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.lastSeen=t.longs===String?"0":0;return null!=e.platform&&e.hasOwnProperty("platform")&&(n.platform=e.platform),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.lastSeen&&e.hasOwnProperty("lastSeen")&&("number"==typeof e.lastSeen?n.lastSeen=t.longs===String?String(e.lastSeen):e.lastSeen:n.lastSeen=t.longs===String?u.Long.prototype.toString.call(e.lastSeen):t.longs===Number?new u.LongBits(e.lastSeen.low>>>0,e.lastSeen.high>>>0).toNumber():e.lastSeen),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.PresenceOnlineNotify=function(){function e(e){if(this.state=[],e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.userId=e.string();break;case 2:r.customState=e.int32();break;case 3:r.customText=e.string();break;case 4:r.state&&r.state.length||(r.state=[]),r.state.push(c.PresenceOnlineState.decode(e,e.uint32()));break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("userId"))throw u.ProtocolError("missing required 'userId'",{instance:r});if(!r.hasOwnProperty("customState"))throw u.ProtocolError("missing required 'customState'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isString(e.userId))return"userId: string expected";if(!u.isInteger(e.customState))return"customState: integer expected";if(null!=e.customText&&e.hasOwnProperty("customText")&&!u.isString(e.customText))return"customText: string expected";if(null!=e.state&&e.hasOwnProperty("state")){if(!Array.isArray(e.state))return"state: array expected";for(var t=0;t>>3){case 1:r.type=e.int32();break;case 2:r.target&&r.target.length||(r.target=[]),r.target.push(e.string());break;case 3:r.duration=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(!u.isInteger(e.type))return"type: integer expected";if(null!=e.target&&e.hasOwnProperty("target")){if(!Array.isArray(e.target))return"target: array expected";for(var t=0;t>>3==1?(r.notify&&r.notify.length||(r.notify=[]),r.notify.push(c.PresenceOnlineNotify.decode(e,e.uint32()))):e.skipType(7&i)}return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";if(null!=e.notify&&e.hasOwnProperty("notify")){if(!Array.isArray(e.notify))return"notify: array expected";for(var t=0;t>>3){case 1:r.userId=e.string();break;case 2:r.pubkey=e.string();break;case 3:r.targetId=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("userId"))throw u.ProtocolError("missing required 'userId'",{instance:r});if(!r.hasOwnProperty("pubkey"))throw u.ProtocolError("missing required 'pubkey'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.userId)?u.isString(e.pubkey)?null!=e.targetId&&e.hasOwnProperty("targetId")&&!u.isString(e.targetId)?"targetId: string expected":null:"pubkey: string expected":"userId: string expected"},e.fromObject=function(e){if(e instanceof c.CreateSecretChatRequest)return e;var t=new c.CreateSecretChatRequest;return null!=e.userId&&(t.userId=String(e.userId)),null!=e.pubkey&&(t.pubkey=String(e.pubkey)),null!=e.targetId&&(t.targetId=String(e.targetId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.userId="",n.pubkey="",n.targetId=""),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.pubkey&&e.hasOwnProperty("pubkey")&&(n.pubkey=e.pubkey),null!=e.targetId&&e.hasOwnProperty("targetId")&&(n.targetId=e.targetId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.CreateSecretChatResponse=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetId=e.string();break;case 2:r.line=e.int32();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("targetId"))throw u.ProtocolError("missing required 'targetId'",{instance:r});if(!r.hasOwnProperty("line"))throw u.ProtocolError("missing required 'line'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.targetId)?u.isInteger(e.line)?null:"line: integer expected":"targetId: string expected"},e.fromObject=function(e){if(e instanceof c.CreateSecretChatResponse)return e;var t=new c.CreateSecretChatResponse;return null!=e.targetId&&(t.targetId=String(e.targetId)),null!=e.line&&(t.line=0|e.line),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.targetId="",n.line=0),null!=e.targetId&&e.hasOwnProperty("targetId")&&(n.targetId=e.targetId),null!=e.line&&e.hasOwnProperty("line")&&(n.line=e.line),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.SecretChatInfo=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetId=e.string();break;case 2:r.from=e.string();break;case 3:r.to=e.string();break;case 4:r.state=e.int32();break;case 5:r.createDt=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("targetId"))throw u.ProtocolError("missing required 'targetId'",{instance:r});if(!r.hasOwnProperty("from"))throw u.ProtocolError("missing required 'from'",{instance:r});if(!r.hasOwnProperty("to"))throw u.ProtocolError("missing required 'to'",{instance:r});if(!r.hasOwnProperty("state"))throw u.ProtocolError("missing required 'state'",{instance:r});if(!r.hasOwnProperty("createDt"))throw u.ProtocolError("missing required 'createDt'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.targetId)?u.isString(e.from)?u.isString(e.to)?u.isInteger(e.state)?u.isInteger(e.createDt)||e.createDt&&u.isInteger(e.createDt.low)&&u.isInteger(e.createDt.high)?null:"createDt: integer|Long expected":"state: integer expected":"to: string expected":"from: string expected":"targetId: string expected"},e.fromObject=function(e){if(e instanceof c.SecretChatInfo)return e;var t=new c.SecretChatInfo;return null!=e.targetId&&(t.targetId=String(e.targetId)),null!=e.from&&(t.from=String(e.from)),null!=e.to&&(t.to=String(e.to)),null!=e.state&&(t.state=0|e.state),null!=e.createDt&&(u.Long?(t.createDt=u.Long.fromValue(e.createDt)).unsigned=!1:"string"==typeof e.createDt?t.createDt=parseInt(e.createDt,10):"number"==typeof e.createDt?t.createDt=e.createDt:"object"===(0,r.default)(e.createDt)&&(t.createDt=new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(n.targetId="",n.from="",n.to="",n.state=0,u.Long){var r=new u.Long(0,0,!1);n.createDt=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.createDt=t.longs===String?"0":0;return null!=e.targetId&&e.hasOwnProperty("targetId")&&(n.targetId=e.targetId),null!=e.from&&e.hasOwnProperty("from")&&(n.from=e.from),null!=e.to&&e.hasOwnProperty("to")&&(n.to=e.to),null!=e.state&&e.hasOwnProperty("state")&&(n.state=e.state),null!=e.createDt&&e.hasOwnProperty("createDt")&&("number"==typeof e.createDt?n.createDt=t.longs===String?String(e.createDt):e.createDt:n.createDt=t.longs===String?u.Long.prototype.toString.call(e.createDt):t.longs===Number?new u.LongBits(e.createDt.low>>>0,e.createDt.high>>>0).toNumber():e.createDt),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.DeleteSecretChatMessage=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.conversation=c.Conversation.decode(e,e.uint32());break;case 2:r.messageId=e.int64();break;case 3:r.serverTimestamp=e.int64();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("conversation"))throw u.ProtocolError("missing required 'conversation'",{instance:r});if(!r.hasOwnProperty("messageId"))throw u.ProtocolError("missing required 'messageId'",{instance:r});if(!r.hasOwnProperty("serverTimestamp"))throw u.ProtocolError("missing required 'serverTimestamp'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e)return"object expected";var t=c.Conversation.verify(e.conversation);return t?"conversation."+t:u.isInteger(e.messageId)||e.messageId&&u.isInteger(e.messageId.low)&&u.isInteger(e.messageId.high)?u.isInteger(e.serverTimestamp)||e.serverTimestamp&&u.isInteger(e.serverTimestamp.low)&&u.isInteger(e.serverTimestamp.high)?null:"serverTimestamp: integer|Long expected":"messageId: integer|Long expected"},e.fromObject=function(e){if(e instanceof c.DeleteSecretChatMessage)return e;var t=new c.DeleteSecretChatMessage;if(null!=e.conversation){if("object"!==(0,r.default)(e.conversation))throw TypeError(".DeleteSecretChatMessage.conversation: object expected");t.conversation=c.Conversation.fromObject(e.conversation)}return null!=e.messageId&&(u.Long?(t.messageId=u.Long.fromValue(e.messageId)).unsigned=!1:"string"==typeof e.messageId?t.messageId=parseInt(e.messageId,10):"number"==typeof e.messageId?t.messageId=e.messageId:"object"===(0,r.default)(e.messageId)&&(t.messageId=new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber())),null!=e.serverTimestamp&&(u.Long?(t.serverTimestamp=u.Long.fromValue(e.serverTimestamp)).unsigned=!1:"string"==typeof e.serverTimestamp?t.serverTimestamp=parseInt(e.serverTimestamp,10):"number"==typeof e.serverTimestamp?t.serverTimestamp=e.serverTimestamp:"object"===(0,r.default)(e.serverTimestamp)&&(t.serverTimestamp=new u.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber())),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.conversation=null,u.Long){var r=new u.Long(0,0,!1);n.messageId=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.messageId=t.longs===String?"0":0;u.Long?(r=new u.Long(0,0,!1),n.serverTimestamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.serverTimestamp=t.longs===String?"0":0}return null!=e.conversation&&e.hasOwnProperty("conversation")&&(n.conversation=c.Conversation.toObject(e.conversation,t)),null!=e.messageId&&e.hasOwnProperty("messageId")&&("number"==typeof e.messageId?n.messageId=t.longs===String?String(e.messageId):e.messageId:n.messageId=t.longs===String?u.Long.prototype.toString.call(e.messageId):t.longs===Number?new u.LongBits(e.messageId.low>>>0,e.messageId.high>>>0).toNumber():e.messageId),null!=e.serverTimestamp&&e.hasOwnProperty("serverTimestamp")&&("number"==typeof e.serverTimestamp?n.serverTimestamp=t.longs===String?String(e.serverTimestamp):e.serverTimestamp:n.serverTimestamp=t.longs===String?u.Long.prototype.toString.call(e.serverTimestamp):t.longs===Number?new u.LongBits(e.serverTimestamp.low>>>0,e.serverTimestamp.high>>>0).toNumber():e.serverTimestamp),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.AuthCodeRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.targetId=e.string();break;case 2:r.type=e.int32();break;case 3:r.host=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("targetId"))throw u.ProtocolError("missing required 'targetId'",{instance:r});if(!r.hasOwnProperty("type"))throw u.ProtocolError("missing required 'type'",{instance:r});if(!r.hasOwnProperty("host"))throw u.ProtocolError("missing required 'host'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.targetId)?u.isInteger(e.type)?u.isString(e.host)?null:"host: string expected":"type: integer expected":"targetId: string expected"},e.fromObject=function(e){if(e instanceof c.AuthCodeRequest)return e;var t=new c.AuthCodeRequest;return null!=e.targetId&&(t.targetId=String(e.targetId)),null!=e.type&&(t.type=0|e.type),null!=e.host&&(t.host=String(e.host)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.targetId="",n.type=0,n.host=""),null!=e.targetId&&e.hasOwnProperty("targetId")&&(n.targetId=e.targetId),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.host&&e.hasOwnProperty("host")&&(n.host=e.host),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.ApplicationConfigRequest=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.appId=e.string();break;case 2:r.appType=e.int32();break;case 3:r.timestamp=e.int64();break;case 4:r.nonce=e.string();break;case 5:r.signature=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("appId"))throw u.ProtocolError("missing required 'appId'",{instance:r});if(!r.hasOwnProperty("appType"))throw u.ProtocolError("missing required 'appType'",{instance:r});if(!r.hasOwnProperty("timestamp"))throw u.ProtocolError("missing required 'timestamp'",{instance:r});if(!r.hasOwnProperty("nonce"))throw u.ProtocolError("missing required 'nonce'",{instance:r});if(!r.hasOwnProperty("signature"))throw u.ProtocolError("missing required 'signature'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":u.isString(e.appId)?u.isInteger(e.appType)?u.isInteger(e.timestamp)||e.timestamp&&u.isInteger(e.timestamp.low)&&u.isInteger(e.timestamp.high)?u.isString(e.nonce)?u.isString(e.signature)?null:"signature: string expected":"nonce: string expected":"timestamp: integer|Long expected":"appType: integer expected":"appId: string expected"},e.fromObject=function(e){if(e instanceof c.ApplicationConfigRequest)return e;var t=new c.ApplicationConfigRequest;return null!=e.appId&&(t.appId=String(e.appId)),null!=e.appType&&(t.appType=0|e.appType),null!=e.timestamp&&(u.Long?(t.timestamp=u.Long.fromValue(e.timestamp)).unsigned=!1:"string"==typeof e.timestamp?t.timestamp=parseInt(e.timestamp,10):"number"==typeof e.timestamp?t.timestamp=e.timestamp:"object"===(0,r.default)(e.timestamp)&&(t.timestamp=new u.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber())),null!=e.nonce&&(t.nonce=String(e.nonce)),null!=e.signature&&(t.signature=String(e.signature)),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.appId="",n.appType=0,u.Long){var r=new u.Long(0,0,!1);n.timestamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.timestamp=t.longs===String?"0":0;n.nonce="",n.signature=""}return null!=e.appId&&e.hasOwnProperty("appId")&&(n.appId=e.appId),null!=e.appType&&e.hasOwnProperty("appType")&&(n.appType=e.appType),null!=e.timestamp&&e.hasOwnProperty("timestamp")&&("number"==typeof e.timestamp?n.timestamp=t.longs===String?String(e.timestamp):e.timestamp:n.timestamp=t.longs===String?u.Long.prototype.toString.call(e.timestamp):t.longs===Number?new u.LongBits(e.timestamp.low>>>0,e.timestamp.high>>>0).toNumber():e.timestamp),null!=e.nonce&&e.hasOwnProperty("nonce")&&(n.nonce=e.nonce),null!=e.signature&&e.hasOwnProperty("signature")&&(n.signature=e.signature),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),c.RouteRequestInternal=function(){function e(e){if(e)for(var t=(0,i.default)(e),n=0;n>>3){case 1:r.data=e.bytes();break;case 2:r.appKey=e.string();break;case 3:r.appId=e.string();break;default:e.skipType(7&i)}}if(!r.hasOwnProperty("data"))throw u.ProtocolError("missing required 'data'",{instance:r});return r},e.decodeDelimited=function(e){return e instanceof a||(e=new a(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!==(void 0===e?"undefined":(0,r.default)(e))||null===e?"object expected":e.data&&"number"==typeof e.data.length||u.isString(e.data)?null!=e.appKey&&e.hasOwnProperty("appKey")&&!u.isString(e.appKey)?"appKey: string expected":null!=e.appId&&e.hasOwnProperty("appId")&&!u.isString(e.appId)?"appId: string expected":null:"data: buffer expected"},e.fromObject=function(e){if(e instanceof c.RouteRequestInternal)return e;var t=new c.RouteRequestInternal;return null!=e.data&&("string"==typeof e.data?u.base64.decode(e.data,t.data=u.newBuffer(u.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),null!=e.appKey&&(t.appKey=String(e.appKey)),null!=e.appId&&(t.appId=String(e.appId)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=u.newBuffer(n.data))),n.appKey="",n.appId=""),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?u.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),null!=e.appKey&&e.hasOwnProperty("appKey")&&(n.appKey=e.appKey),null!=e.appId&&e.hasOwnProperty("appId")&&(n.appId=e.appId),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),e.exports=c},7328:(module,exports,__nested_webpack_require_562496__)=>{var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;module=__nested_webpack_require_562496__.nmd(module);var _isInteger=__nested_webpack_require_562496__(603),_isInteger2=_interopRequireDefault(_isInteger),_defineProperty=__nested_webpack_require_562496__(4660),_defineProperty2=_interopRequireDefault(_defineProperty),_defineProperties=__nested_webpack_require_562496__(8044),_defineProperties2=_interopRequireDefault(_defineProperties),_freeze=__nested_webpack_require_562496__(7252),_freeze2=_interopRequireDefault(_freeze),_create=__nested_webpack_require_562496__(6212),_create2=_interopRequireDefault(_create),_stringify=__nested_webpack_require_562496__(8792),_stringify2=_interopRequireDefault(_stringify),_keys=__nested_webpack_require_562496__(9708),_keys2=_interopRequireDefault(_keys),_promise=__nested_webpack_require_562496__(6224),_promise2=_interopRequireDefault(_promise),_typeof2=__nested_webpack_require_562496__(696),_typeof3=_interopRequireDefault(_typeof2);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}!function(t,e){!function(e,n,r){var i=t.protobuf=function t(r){var i=n[r];return i||e[r][0].call(i=n[r]={exports:{}},t,i,i.exports),i.exports}(19);__WEBPACK_AMD_DEFINE_ARRAY__=[__nested_webpack_require_562496__(9300)],__WEBPACK_AMD_DEFINE_RESULT__=function(e){return e&&e.isLong&&(i.util.Long=e,i.configure()),i}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),"object"==(0,_typeof3.default)(module)&&module&&module.exports&&(module.exports=i)}({1:[function(e,t){t.exports=function(e,t){for(var n=Array(arguments.length-1),r=0,i=2,o=!0;i1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var o=Array(64),s=Array(123),a=0;a<64;)s[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;i.encode=function(e,t,n){for(var r,i=null,s=[],a=0,l=0;t>2],r=(3&u)<<4,l=1;break;case 1:s[a++]=o[r|u>>4],r=(15&u)<<2,l=2;break;case 2:s[a++]=o[r|u>>6],s[a++]=o[63&u],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return l&&(s[a++]=o[r],s[a++]=61,1===l&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))},i.decode=function(t,n,r){for(var i,o=r,a=0,l=0;l1)break;if((u=s[u])===e)throw Error("invalid encoding");switch(a){case 0:i=u,a=1;break;case 1:n[r++]=i<<2|(48&u)>>4,i=u,a=2;break;case 2:n[r++]=(15&i)<<4|(60&u)>>2,i=u,a=3;break;case 3:n[r++]=(3&i)<<6|u,a=0}}if(1===a)throw Error("invalid encoding");return r-o},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(t,n){function r(t,n){function i(e){if("string"!=typeof e){var t=o();if(r.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var n=(0,_keys2.default)(e),a=Array(n.length+1),l=Array(n.length),u=0;u0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var o=Math.floor(Math.log(t)/Math.LN2);e((i<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,n,r)}}function n(e,t,n){var r=e(t,n),i=2*(r>>31)+1,o=r>>>23&255,s=8388607&r;return 255===o?s?NaN:i*(1/0):0===o?1401298464324817e-60*i*s:i*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,i),e.readFloatLE=n.bind(null,o),e.readFloatBE=n.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){function t(e,t,n){o[0]=e,t[n]=s[0],t[n+1]=s[1],t[n+2]=s[2],t[n+3]=s[3],t[n+4]=s[4],t[n+5]=s[5],t[n+6]=s[6],t[n+7]=s[7]}function n(e,t,n){o[0]=e,t[n]=s[7],t[n+1]=s[6],t[n+2]=s[5],t[n+3]=s[4],t[n+4]=s[3],t[n+5]=s[2],t[n+6]=s[1],t[n+7]=s[0]}function r(e,t){return s[0]=e[t],s[1]=e[t+1],s[2]=e[t+2],s[3]=e[t+3],s[4]=e[t+4],s[5]=e[t+5],s[6]=e[t+6],s[7]=e[t+7],o[0]}function i(e,t){return s[7]=e[t],s[6]=e[t+1],s[5]=e[t+2],s[4]=e[t+3],s[3]=e[t+4],s[2]=e[t+5],s[1]=e[t+6],s[0]=e[t+7],o[0]}var o=new Float64Array([-0]),s=new Uint8Array(o.buffer),a=128===s[7];e.writeDoubleLE=a?t:n,e.writeDoubleBE=a?n:t,e.readDoubleLE=a?r:i,e.readDoubleBE=a?i:r}():function(){function t(e,t,n,r,i,o){var s=r<0?1:0;if(s&&(r=-r),0===r)e(0,i,o+t),e(1/r>0?0:2147483648,i,o+n);else if(isNaN(r))e(0,i,o+t),e(2146959360,i,o+n);else if(r>17976931348623157e292)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+n);else{var a;if(r<22250738585072014e-324)e((a=r/5e-324)>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(a=r*Math.pow(2,-l))>>>0,i,o+t),e((s<<31|l+1023<<20|1048576*a&1048575)>>>0,i,o+n)}}}function n(e,t,n,r,i){var o=e(r,i+t),s=e(r,i+n),a=2*(s>>31)+1,l=s>>>20&2047,u=4294967296*(1048575&s)+o;return 2047===l?u?NaN:a*(1/0):0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=n.bind(null,o,0,4),e.readDoubleBE=n.bind(null,s,4,0)}(),e}function r(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function i(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},{}],7:[function(t,e,r){function n(t){try{var e=eval("quire".replace(/^/,"re"))(t);if(e&&(e.length||(0,_keys2.default)(e).length))return e}catch(t){}return null}e.exports=n},{}],8:[function(e,t,n){var r=n,i=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=i(e),r="";n&&(r=t.shift()+"/");for(var o=0;o0&&".."!==t[o-1]?t.splice(--o,2):n?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return r+t.join("/")};r.resolve=function(e,t,n){return n||(t=o(t)),i(t)?t:(n||(e=o(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?o(e+"/"+t):t)}},{}],9:[function(e,t){t.exports=function(e,t,n){var r=n||8192,i=r>>>1,o=null,s=r;return function(n){if(n<1||n>i)return e(n);s+n>r&&(o=e(r),s=0);var a=t.call(o,s,s+=n);return 7&s&&(s=1+(7|s)),a}}},{}],10:[function(e,t,n){var r=n;r.length=function(e){for(var t=0,n=0,r=0;r191&&r<224?o[s++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(r>>10),o[s++]=56320+(1023&r)):o[s++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},r.write=function(e,t,n){for(var r,i,o=n,s=0;s>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(i=e.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&i),++s,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-o}},{}],11:[function(e,t){function n(e,t){i.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}t.exports=n;var r,i=/\/|\./;n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:r={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:r}),n("empty",{Empty:{fields:{}}}),n("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),n("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),n.get=function(e){return n[e]||null}},{}],12:[function(e,t,n){function r(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof s){e("switch(d%s){",r);for(var i=t.resolvedType.values,o=(0,_keys2.default)(i),a=0;a>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,l)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function i(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof s?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}var o=n,s=e(15),a=e(37);o.fromObject=function(e){var t=e.fieldsArray,n=a.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var i=0;i>>3){");for(var a=0;a>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}n.exports=function(t){for(var n,a=s.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),l=t.fieldsArray.slice().sort(s.compareFieldsById),u=0;u>>0,8|o.mapKey[c.keyType],c.keyType),f===e?a("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,n):a(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,h,n),a("}")("}")):c.repeated?(a("if(%s!=null&&%s.length){",n,n),c.packed&&o.packed[h]!==e?a("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",n)("w.%s(%s[i])",h,n)("w.ldelim()"):(a("for(var i=0;i<%s.length;++i)",n),f===e?r(a,c,d,n+"[i]"):a("w.uint32(%i).%s(%s[i])",(c.id<<3|f)>>>0,h,n)),a("}")):(c.optional&&a("if(%s!=null&&m.hasOwnProperty(%j))",n,c.name),f===e?r(a,c,d,n):a("w.uint32(%i).%s(%s)",(c.id<<3|f)>>>0,h,n))}return a("return w")};var i=t(15),o=t(36),s=t(37)},{15:15,36:36,37:37}],15:[function(t,n){function r(e,t,n){if(i.call(this,e,n),t&&"object"!=(void 0===t?"undefined":(0,_typeof3.default)(t)))throw TypeError("values must be an object");if(this.valuesById={},this.values=(0,_create2.default)(this.valuesById),this.comments={},t)for(var r=(0,_keys2.default)(t),o=0;o0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof i))throw Error("path conflicts with non-namespace objects")}else n.add(n=new i(r))}return t&&n.addJSON(t),n},i.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t-1)return o}else if(o instanceof i&&(o=o.lookup(t.slice(1),n,!0)))return o}else for(var s=0;s-1&&this.oneof.splice(t,1),e.partOf=null,this},r.prototype.onAdd=function(e){o.prototype.onAdd.call(this,e);for(var t=0;t");var i=Y();if(!_.test(i))throw E(i,"name");J("=");var o=new l(ee(i),x(Y()),n,r);L(o,(function(e){if("option"!==e)throw E(e);D(o,e),J(";")}),(function(){B(o)})),t.add(o)}function D(e,t){var n=J("(",!0);if(!I.test(t=Y()))throw E(t,"name");var r=t;n&&(J(")"),r="("+r+")",t=H(),k.test(t)&&(r+=t,Y())),J("="),j(e,r)}function j(e,t){if(J("{",!0))do{if(!_.test(W=Y()))throw E(W,"name");"{"===H()?j(e,t+"."+W):(J(":"),U(e,t+"."+W,M(!0)))}while(!J("}",!0));else U(e,t,M(!0))}function U(e,t,n){e.setOption&&e.setOption(t,n)}function B(e){if(J("[",!0)){do{D(e,"option")}while(J(",",!0));J("]")}return e}n instanceof o||(C=n,n=new o),C||(C=r.defaults);for(var G,F,V,z,W,Z=i(t),Y=Z.next,q=Z.push,H=Z.peek,J=Z.skip,X=Z.cmnt,Q=!0,K=!1,$=n,ee=C.keepCase?function(e){return e}:p.camelCase;null!==(W=Y());)switch(W){case"package":if(!Q)throw E(W);!function(){if(G!==e)throw E("package");if(G=Y(),!I.test(G))throw E(G,"name");$=$.define(G),J(";")}();break;case"import":if(!Q)throw E(W);!function(){var e,t=H();switch(t){case"weak":e=V||(V=[]),Y();break;case"public":Y();default:e=F||(F=[])}t=S(),J(";"),e.push(t)}();break;case"syntax":if(!Q)throw E(W);!function(){if(J("="),z=S(),!(K="proto3"===z)&&"proto2"!==z)throw E(z,"syntax");J(";")}();break;case"option":if(!Q)throw E(W);D($,W),J(";");break;default:if(T($,W)){Q=!1;continue}throw E(W)}return r.filename=null,{package:G,imports:F,weakImports:V,syntax:z,root:n}}n.exports=r,r.filename=null,r.defaults={keepCase:!1};var i=t(34),o=t(29),s=t(35),a=t(16),l=t(20),u=t(25),c=t(15),d=t(33),h=t(22),f=t(36),p=t(37),g=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,y=/^0[x][0-9a-fA-F]+$/,v=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,A=/^-?0[0-7]+$/,w=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,_=/^[a-zA-Z_][a-zA-Z_0-9]*$/,I=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,k=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[function(e,t){function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function r(e){this.buf=e,this.pos=0,this.len=e.length}function i(){var e=new u(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function o(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function s(){if(this.pos+8>this.len)throw n(this,8);return new u(o(this.buf,this.pos+=4),o(this.buf,this.pos+=4))}t.exports=r;var a,l=e(39),u=l.LongBits,c=l.utf8,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new r(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new r(e);throw Error("illegal buffer")};r.create=l.Buffer?function(e){return(r.create=function(e){return l.Buffer.isBuffer(e)?new a(e):d(e)})(e)}:d,r.prototype.i=l.Array.prototype.subarray||l.Array.prototype.slice,r.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),r.prototype.int32=function(){return 0|this.uint32()},r.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},r.prototype.bool=function(){return 0!==this.uint32()},r.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return o(this.buf,this.pos+=4)},r.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|o(this.buf,this.pos+=4)},r.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=l.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},r.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=l.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},r.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw n(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this.i.call(this.buf,t,r)},r.prototype.string=function(){var e=this.bytes();return c.read(e,0,e.length)},r.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},r.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},r.e=function(e){a=e;var t=l.Long?"toLong":"toNumber";l.merge(r.prototype,{int64:function(){return i.call(this)[t](!1)},uint64:function(){return i.call(this)[t](!0)},sint64:function(){return i.call(this).zzDecode()[t](!1)},fixed64:function(){return s.call(this)[t](!0)},sfixed64:function(){return s.call(this)[t](!1)}})}},{39:39}],28:[function(e,t){function n(e){r.call(this,e)}t.exports=n;var r=e(27);(n.prototype=(0,_create2.default)(r.prototype)).constructor=n;var i=e(39);i.Buffer&&(n.prototype.i=i.Buffer.prototype.slice),n.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{27:27,39:39}],29:[function(t,n){function r(e){s.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function o(t,n){var r=n.parent.lookup(n.extend);if(r){var i=new c(n.fullName,n.id,n.type,n.rule,e,n.options);return i.declaringField=n,n.extensionField=i,r.add(i),!0}return!1}n.exports=r;var s=t(23);((r.prototype=(0,_create2.default)(s.prototype)).constructor=r).className="Root";var a,l,u,c=t(16),d=t(15),h=t(25),f=t(37);r.fromJSON=function(e,t){return t||(t=new r),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},r.prototype.resolvePath=f.path.resolve,r.prototype.load=function t(n,r,o){function s(e,t){if(o){var n=o;if(o=null,h)throw e;n(e,t)}}function a(e,t){try{if(f.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),f.isString(t)){l.filename=e;var n,i=l(t,d,r),o=0;if(i.imports)for(;o-1){var r=e.substring(n);r in u&&(e=r)}if(!(d.files.indexOf(e)>-1)){if(d.files.push(e),e in u)return void(h?a(e,u[e]):(++p,setTimeout((function(){--p,a(e,u[e])}))));if(h){var i;try{i=f.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}a(e,i)}else++p,f.fetch(e,(function(n,r){if(--p,o)return n?void(t?p||s(null,d):s(n)):void a(e,r)}))}}"function"==typeof r&&(o=r,r=e);var d=this;if(!o)return f.asPromise(t,d,n,r);var h=o===i,p=0;f.isString(n)&&(n=[n]);for(var g,m=0;m-1&&this.deferred.splice(n,1)}}else if(t instanceof d)p.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var r=0;r0)return I.shift();if(k)return i();var e,r,s,a,l;do{if(m===y)return null;for(e=!1;c.test(s=d(m));)if("\n"===s&&++v,++m===y)return null;if("/"===d(m)){if(++m===y)throw n("comment");if("/"===d(m)){for(l="/"===d(a=m+1);"\n"!==d(++m);)if(m===y)return null;++m,l&&h(a,m-1),++v,e=!0}else{if("*"!==(s=d(m)))return"/";l="*"===d(a=m+1);do{if("\n"===s&&++v,++m===y)throw n("comment");r=s,s=d(m)}while("*"!==r||"/"!==s);++m,l&&h(a,m-2),e=!0}}}while(e);var u=m;if(o.lastIndex=0,!o.test(d(u++)))for(;u]/g,s=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,a=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,l=/^ *[*\/]+ */,u=/\n/g,c=/\s/,d=/\\(.?)/g,h={0:"\0",r:"\r",n:"\n",t:"\t"};i.unescape=r},{}],35:[function(t,n){function r(t,n){o.call(this,t,n),this.fields={},this.oneofs=e,this.extensions=e,this.reserved=e,this.group=e,this.k=null,this.b=null,this.l=null,this.o=null}function i(e){return e.k=e.b=e.l=null,delete e.encode,delete e.decode,delete e.verify,e}n.exports=r;var o=t(23);((r.prototype=(0,_create2.default)(o.prototype)).constructor=r).className="Type";var s=t(15),a=t(25),l=t(16),u=t(20),c=t(33),d=t(21),h=t(27),f=t(42),p=t(37),g=t(14),m=t(13),y=t(40),v=t(12),b=t(41);(0,_defineProperties2.default)(r.prototype,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=(0,_keys2.default)(this.fields),t=0;t=e)return!0;return!1},r.prototype.isReservedName=function(e){if(this.reserved)for(var t=0;t>>0,this.hi=t>>>0}t.exports=n;var r=e(39),i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,o=(e-r)/4294967296>>>0;return t&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new n(r,o)},n.from=function(e){if("number"==typeof e)return n.fromNumber(e);if(r.isString(e)){if(!r.Long)return n.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new n(e.low>>>0,e.high>>>0):i},n.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,!!e):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var s=String.prototype.charCodeAt;n.fromHash=function(e){return e===o?i:new n((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},n.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},n.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},{39:39}],39:[function(n,r,i){function o(t,n,r){for(var i=(0,_keys2.default)(n),o=0;o0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),a.p=null,a.u=null,a.newBuffer=function(e){return"number"==typeof e?a.Buffer?a.u(e):new a.Array(e):a.Buffer?a.p(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,a.Long=t.dcodeIO&&t.dcodeIO.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var n=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(n.lo,n.hi,t):n.toNumber(!!t)},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=s,a.ProtocolError=s("ProtocolError"),a.oneOfGetter=function(t){for(var n={},r=0;r-1;--r)if(1===n[t[r]]&&this[t[r]]!==e&&null!==this[t[r]])return t[r]}},a.oneOfSetter=function(e){return function(t){for(var n=0;n>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function c(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}n.exports=s;var d,h=t(39),f=h.LongBits,p=h.base64,g=h.utf8;s.create=h.Buffer?function(){return(s.create=function(){return new d})()}:function(){return new s},s.alloc=function(e){return new h.Array(e)},h.Array!==Array&&(s.alloc=h.pool(s.alloc,h.Array.prototype.subarray)),s.prototype.v=function(e,t,n){return this.tail=this.tail.next=new r(e,t,n),this.len+=t,this},l.prototype=(0,_create2.default)(r.prototype),l.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},s.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new l((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},s.prototype.int32=function(e){return e<0?this.v(u,10,f.fromNumber(e)):this.uint32(e)},s.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},s.prototype.uint64=function(e){var t=f.from(e);return this.v(u,t.length(),t)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(e){var t=f.from(e).zzEncode();return this.v(u,t.length(),t)},s.prototype.bool=function(e){return this.v(a,1,e?1:0)},s.prototype.fixed32=function(e){return this.v(c,4,e>>>0)},s.prototype.sfixed32=s.prototype.fixed32,s.prototype.fixed64=function(e){var t=f.from(e);return this.v(c,4,t.lo).v(c,4,t.hi)},s.prototype.sfixed64=s.prototype.fixed64,s.prototype.float=function(e){return this.v(h.float.writeFloatLE,4,e)},s.prototype.double=function(e){return this.v(h.float.writeDoubleLE,8,e)};var m=h.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r>>0;if(!t)return this.v(a,1,0);if(h.isString(e)){var n=s.alloc(t=p.length(e));p.decode(e,n,0),e=n}return this.uint32(t).v(m,t,e)},s.prototype.string=function(e){var t=g.length(e);return t?this.uint32(t).v(g.write,t,e):this.v(a,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new r(i,0,0),this.len=0,this},s.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new r(i,0,0),this.len=0),this},s.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},s.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},s.e=function(e){d=e}},{39:39}],43:[function(e,t){function n(){i.call(this)}function r(e,t,n){e.length<40?o.utf8.write(e,t,n):t.utf8Write(e,n)}t.exports=n;var i=e(42);(n.prototype=(0,_create2.default)(i.prototype)).constructor=n;var o=e(39),s=o.Buffer;n.alloc=function(e){return(n.alloc=o.u)(e)};var a=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r>>0;return this.uint32(t),t&&this.v(a,t,e),this},n.prototype.string=function(e){var t=s.byteLength(e);return this.uint32(t),t&&this.v(r,t,e),this}},{39:39,42:42}]},{})}("object"==("undefined"==typeof window?"undefined":(0,_typeof3.default)(window))&&window||"object"==("undefined"==typeof self?"undefined":(0,_typeof3.default)(self))&&self||void 0)},9184:(e,t,n)=>{e.exports={default:n(9952),__esModule:!0}},6995:(e,t,n)=>{e.exports={default:n(1120),__esModule:!0}},8792:(e,t,n)=>{e.exports={default:n(6044),__esModule:!0}},7445:(e,t,n)=>{e.exports={default:n(108),__esModule:!0}},603:(e,t,n)=>{e.exports={default:n(5740),__esModule:!0}},7304:(e,t,n)=>{e.exports={default:n(2166),__esModule:!0}},6212:(e,t,n)=>{e.exports={default:n(8336),__esModule:!0}},8044:(e,t,n)=>{e.exports={default:n(7456),__esModule:!0}},4660:(e,t,n)=>{e.exports={default:n(9096),__esModule:!0}},7252:(e,t,n)=>{e.exports={default:n(7572),__esModule:!0}},328:(e,t,n)=>{e.exports={default:n(9128),__esModule:!0}},9708:(e,t,n)=>{e.exports={default:n(7308),__esModule:!0}},6224:(e,t,n)=>{e.exports={default:n(9784),__esModule:!0}},6996:(e,t,n)=>{e.exports={default:n(8540),__esModule:!0}},9717:(e,t,n)=>{e.exports={default:n(2676),__esModule:!0}},6739:(e,t,n)=>{e.exports={default:n(8240),__esModule:!0}},8964:(e,t,n)=>{t.__esModule=!0;var r,i=n(6224),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new o.default((function(e,n){return function r(i,s){try{var a=t[i](s),l=a.value}catch(e){return void n(e)}if(!a.done)return o.default.resolve(l).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(l)}("next")}))}}},4128:(e,t)=>{t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},5144:(e,t,n)=>{t.__esModule=!0;var r,i=n(4660),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n{t.__esModule=!0;var r,i=n(9184),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t{t.__esModule=!0;var r=s(n(6739)),i=s(n(9717)),o="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function s(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===o(r.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},7436:(e,t,n)=>{var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(8e3),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},8e3:e=>{!function(t){var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag",u=t.regeneratorRuntime;if(u)e.exports=u;else{(u=t.regeneratorRuntime=e.exports).wrap=b;var c="suspendedStart",d="suspendedYield",h="executing",f="completed",p={},g={};g[s]=function(){return this};var m=Object.getPrototypeOf,y=m&&m(m(x([])));y&&y!==r&&i.call(y,s)&&(g=y);var v=I.prototype=w.prototype=Object.create(g);_.prototype=v.constructor=I,I.constructor=_,I[l]=_.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(v),e},u.awrap=function(e){return{__await:e}},k(C.prototype),C.prototype[a]=function(){return this},u.AsyncIterator=C,u.async=function(e,t,n,r){var i=new C(b(e,t,n,r));return u.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(v),v[l]="Generator",v[s]=function(){return this},v.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=x,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return a.type="throw",a.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;M(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),p}}}function b(e,t,n,r){var i=t&&t.prototype instanceof w?t:w,o=Object.create(i.prototype),s=new O(r||[]);return o._invoke=function(e,t,n){var r=c;return function(i,o){if(r===h)throw new Error("Generator is already running");if(r===f){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=A(e,t,n);if("normal"===l.type){if(r=n.done?f:d,l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=f,n.method="throw",n.arg=l.arg)}}}(e,n,s),o}function A(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function w(){}function _(){}function I(){}function k(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function C(e){function t(n,r,o,s){var a=A(e[n],e,r);if("throw"!==a.type){var l=a.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,o,s)}),(function(e){t("throw",e,o,s)})):Promise.resolve(u).then((function(e){l.value=e,o(l)}),s)}s(a.arg)}var n;this._invoke=function(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}}function E(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,E(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=A(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function x(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r{e.exports=n(7436)},8:(e,t)=>{!function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.Y=function(e){var t,r,i,o,s,a=.75*e.length,l=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),d=new Uint8Array(c);for(t=0;t>4,d[u++]=(15&i)<<4|o>>2,d[u++]=(3&o)<<6|63&s;return c}}()},5704:(e,t)=>{t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=l(e),s=o[0],a=o[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),c=0,d=a>0?s-4:s;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===a&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,l=r-i;al?l:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var i,o,s=[],a=t;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},6840:(e,t,n)=>{var r=n(3332),i=n(3912),o=n(5856).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)}))}else this.append(e);r.call(this)}i.inherits(s,r),s.prototype._offset=function(e){var t,n=0,r=0;if(0===e)return[0,0];for(;rthis.length)&&(r=this.length),n>=this.length)return e||o.alloc(0);if(r<=0)return e||o.alloc(0);var i,s,a=!!e,l=this._offset(n),u=r-n,c=u,d=a&&t||0,h=l[1];if(0===n&&r==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length);for(s=0;s(i=this._bufs[s].length-h))){this._bufs[s].copy(e,d,h,h+c);break}this._bufs[s].copy(e,d,h),d+=i,c-=i,h&&(h=0)}return e},s.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),i=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,r[1]),0!=n[1]&&(i[0]=i[0].slice(n[1])),new s(i)},s.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},s.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var e=0,t=new s;e{var r=n(5704),i=n(4404),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|p(e,t),r=a(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return h(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(i)return r?-1:U(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;oa&&(n=a-l),o=n;o>=0;o--){for(var d=!0,h=0;hi&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);for(var n="",r=0;rn&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),c=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return A(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return I(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function M(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return t=+t,n>>>=0,o||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,o){return t=+t,n>>>=0,o||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>>=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},9952:(e,t,n)=>{n(7468),n(8052),e.exports=n(2552).Array.from},1120:(e,t,n)=>{n(2192),n(7468),e.exports=n(9660)},6044:(e,t,n)=>{var r=n(2552),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},108:(e,t,n)=>{n(2596),n(7468),n(2192),n(4988),n(9164),n(7124),n(2556),e.exports=n(2552).Map},5740:(e,t,n)=>{n(3656),e.exports=n(2552).Number.isInteger},2166:(e,t,n)=>{n(4512),e.exports=n(2552).Object.assign},8336:(e,t,n)=>{n(6424);var r=n(2552).Object;e.exports=function(e,t){return r.create(e,t)}},7456:(e,t,n)=>{n(4072);var r=n(2552).Object;e.exports=function(e,t){return r.defineProperties(e,t)}},9096:(e,t,n)=>{n(9723);var r=n(2552).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},7572:(e,t,n)=>{n(3444),e.exports=n(2552).Object.freeze},9128:(e,t,n)=>{n(1773);var r=n(2552).Object;e.exports=function(e){return r.getOwnPropertyNames(e)}},7308:(e,t,n)=>{n(8668),e.exports=n(2552).Object.keys},9784:(e,t,n)=>{n(2596),n(7468),n(2192),n(4156),n(2792),n(1588),e.exports=n(2552).Promise},8540:(e,t,n)=>{n(2596),n(7468),n(2192),n(2835),n(1412),n(7580),n(2368),e.exports=n(2552).Set},2676:(e,t,n)=>{n(456),n(2596),n(4632),n(120),e.exports=n(2552).Symbol},8240:(e,t,n)=>{n(7468),n(2192),e.exports=n(2536).f("iterator")},4220:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},1904:e=>{e.exports=function(){}},9872:e=>{e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},6765:(e,t,n)=>{var r=n(2856);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},3704:(e,t,n)=>{var r=n(619);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},7196:(e,t,n)=>{var r=n(7380),i=n(5096),o=n(7952);e.exports=function(e){return function(t,n,s){var a,l=r(t),u=i(l.length),c=o(s,u);if(e&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},6680:(e,t,n)=>{var r=n(2604),i=n(3552),o=n(9056),s=n(5096),a=n(960);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,d=6==e,h=5==e||d,f=t||a;return function(t,a,p){for(var g,m,y=o(t),v=i(y),b=r(a,p,3),A=s(v.length),w=0,_=n?f(t,A):l?f(t,0):void 0;A>w;w++)if((h||w in v)&&(m=b(g=v[w],w,y),e))if(n)_[w]=m;else if(m)switch(e){case 3:return!0;case 5:return g;case 6:return w;case 2:_.push(g)}else if(c)return!1;return d?-1:u||c?c:_}}},2216:(e,t,n)=>{var r=n(2856),i=n(1936),o=n(3600)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},960:(e,t,n)=>{var r=n(2216);e.exports=function(e,t){return new(r(e))(t)}},2240:(e,t,n)=>{var r=n(4912),i=n(3600)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},4912:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},5712:(e,t,n)=>{var r=n(6208).f,i=n(5208),o=n(3464),s=n(2604),a=n(9872),l=n(619),u=n(5176),c=n(264),d=n(9360),h=n(5548),f=n(8216).fastKey,p=n(1869),g=h?"_s":"size",m=function(e,t){var n,r=f(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){a(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[g]=0,null!=r&&l(r,n,e[u],e)}));return o(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=p(this,t),r=m(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[g]--}return!!r},forEach:function(e){p(this,t);for(var n,r=s(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!m(p(this,t),e)}}),h&&r(c.prototype,"size",{get:function(){return p(this,t)[g]}}),c},def:function(e,t,n){var r,i,o=m(e,t);return o?o.v=n:(e._l=o={i:i=f(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[g]++,"F"!==i&&(e._i[i]=o)),e},getEntry:m,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=p(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?c(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(e._t=void 0,c(1))}),n?"entries":"values",!n,!0),d(t)}}},8368:(e,t,n)=>{var r=n(2240),i=n(3704);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},9932:(e,t,n)=>{var r=n(1659),i=n(4232),o=n(8216),s=n(1816),a=n(8144),l=n(3464),u=n(619),c=n(9872),d=n(2856),h=n(7292),f=n(6208).f,p=n(6680)(0),g=n(5548);e.exports=function(e,t,n,m,y,v){var b=r[e],A=b,w=y?"set":"add",_=A&&A.prototype,I={};return g&&"function"==typeof A&&(v||_.forEach&&!s((function(){(new A).entries().next()})))?(A=t((function(t,n){c(t,A,e,"_c"),t._c=new b,null!=n&&u(n,y,t[w],t)})),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(e){var t="add"==e||"set"==e;!(e in _)||v&&"clear"==e||a(A.prototype,e,(function(n,r){if(c(this,A,e),!t&&v&&!d(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i}))})),v||f(A.prototype,"size",{get:function(){return this._c.size}})):(A=m.getConstructor(t,e,y,w),l(A.prototype,n),o.NEED=!0),h(A,e),I[e]=A,i(i.G+i.W+i.F,I),v||m.setStrong(A,e,y),A}},2552:e=>{var t=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=t)},1968:(e,t,n)=>{var r=n(6208),i=n(4888);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},2604:(e,t,n)=>{var r=n(4220);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},8572:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},5548:(e,t,n)=>{e.exports=!n(1816)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},1068:(e,t,n)=>{var r=n(2856),i=n(1659).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},1776:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},9488:(e,t,n)=>{var r=n(9120),i=n(8896),o=n(7412);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,a=n(e),l=o.f,u=0;a.length>u;)l.call(e,s=a[u++])&&t.push(s);return t}},4232:(e,t,n)=>{var r=n(1659),i=n(2552),o=n(2604),s=n(8144),a=n(6804),l=function(e,t,n){var u,c,d,h=e&l.F,f=e&l.G,p=e&l.S,g=e&l.P,m=e&l.B,y=e&l.W,v=f?i:i[t]||(i[t]={}),b=v.prototype,A=f?r:p?r[t]:(r[t]||{}).prototype;for(u in f&&(n=t),n)(c=!h&&A&&void 0!==A[u])&&a(v,u)||(d=c?A[u]:n[u],v[u]=f&&"function"!=typeof A[u]?n[u]:m&&c?o(d,r):y&&A[u]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):g&&"function"==typeof d?o(Function.call,d):d,g&&((v.virtual||(v.virtual={}))[u]=d,e&l.R&&b&&!b[u]&&s(b,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},1816:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},619:(e,t,n)=>{var r=n(2604),i=n(2200),o=n(7820),s=n(6765),a=n(5096),l=n(7712),u={},c={},d=e.exports=function(e,t,n,d,h){var f,p,g,m,y=h?function(){return e}:l(e),v=r(n,d,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(f=a(e.length);f>b;b++)if((m=t?v(s(p=e[b])[0],p[1]):v(e[b]))===u||m===c)return m}else for(g=y.call(e);!(p=g.next()).done;)if((m=i(g,v,p.value,t))===u||m===c)return m};d.BREAK=u,d.RETURN=c},1659:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},6804:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},8144:(e,t,n)=>{var r=n(6208),i=n(4888);e.exports=n(5548)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},9976:(e,t,n)=>{var r=n(1659).document;e.exports=r&&r.documentElement},7732:(e,t,n)=>{e.exports=!n(5548)&&!n(1816)((function(){return 7!=Object.defineProperty(n(1068)("div"),"a",{get:function(){return 7}}).a}))},188:e=>{e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},3552:(e,t,n)=>{var r=n(4912);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},7820:(e,t,n)=>{var r=n(6872),i=n(3600)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},1936:(e,t,n)=>{var r=n(4912);e.exports=Array.isArray||function(e){return"Array"==r(e)}},6432:(e,t,n)=>{var r=n(2856),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},2856:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},2200:(e,t,n)=>{var r=n(6765);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},2448:(e,t,n)=>{var r=n(5208),i=n(4888),o=n(7292),s={};n(8144)(s,n(3600)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},5176:(e,t,n)=>{var r=n(9916),i=n(4232),o=n(8636),s=n(8144),a=n(6872),l=n(2448),u=n(7292),c=n(8228),d=n(3600)("iterator"),h=!([].keys&&"next"in[].keys()),f="keys",p="values",g=function(){return this};e.exports=function(e,t,n,m,y,v,b){l(n,t,m);var A,w,_,I=function(e){if(!h&&e in S)return S[e];switch(e){case f:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",C=y==p,E=!1,S=e.prototype,M=S[d]||S["@@iterator"]||y&&S[y],O=M||I(y),x=y?C?I("entries"):O:void 0,T="Array"==t&&S.entries||M;if(T&&(_=c(T.call(new e)))!==Object.prototype&&_.next&&(u(_,k,!0),r||"function"==typeof _[d]||s(_,d,g)),C&&M&&M.name!==p&&(E=!0,O=function(){return M.call(this)}),r&&!b||!h&&!E&&S[d]||s(S,d,O),a[t]=O,a[k]=g,y)if(A={values:C?O:I(p),keys:v?O:I(f),entries:x},b)for(w in A)w in S||o(S,w,A[w]);else i(i.P+i.F*(h||E),t,A);return A}},8200:(e,t,n)=>{var r=n(3600)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(e){}return n}},264:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},6872:e=>{e.exports={}},9916:e=>{e.exports=!0},8216:(e,t,n)=>{var r=n(476)("meta"),i=n(2856),o=n(6804),s=n(6208).f,a=0,l=Object.isExtensible||function(){return!0},u=!n(1816)((function(){return l(Object.preventExtensions({}))})),c=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!o(e,r)&&c(e),e}}},1332:(e,t,n)=>{var r=n(1659),i=n(9460).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,l="process"==n(4912)(s);e.exports=function(){var e,t,n,u=function(){var r,i;for(l&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){s.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var c=a.resolve(void 0);n=function(){c.then(u)}}else n=function(){i.call(r,u)};else{var d=!0,h=document.createTextNode("");new o(u).observe(h,{characterData:!0}),n=function(){h.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},268:(e,t,n)=>{var r=n(4220);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},2052:(e,t,n)=>{var r=n(5548),i=n(9120),o=n(8896),s=n(7412),a=n(9056),l=n(3552),u=Object.assign;e.exports=!u||n(1816)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=a(e),u=arguments.length,c=1,d=o.f,h=s.f;u>c;)for(var f,p=l(arguments[c++]),g=d?i(p).concat(d(p)):i(p),m=g.length,y=0;m>y;)f=g[y++],r&&!h.call(p,f)||(n[f]=p[f]);return n}:u},5208:(e,t,n)=>{var r=n(6765),i=n(8992),o=n(1776),s=n(588)("IE_PROTO"),a=function(){},l=function(){var e,t=n(1068)("iframe"),r=o.length;for(t.style.display="none",n(9976).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("