1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"0288":function(t,e,n){},"0842":function(t,e,n){},1:function(t,e){},"16c9":function(t,e,n){"use strict";var a=n("8ee8"),s=n.n(a);s.a},"1b4a":function(t,e,n){"use strict";var a=n("c9a0"),s=n.n(a);s.a},"1c04":function(t,e,n){"use strict";var a=n("2b0e"),s=n("2f62"),o={setScatter:function(t,e){t.scatter=e},setEos:function(t,e){t.eos=e},setAccount:function(t,e){t.account=e},setToAccount:function(t,e){t.toAccount=e},setBalance:function(t,e){t.balance=e},setMoney:function(t,e){t.money=e},setGt:function(t,e){t.gt=e},setMainnet:function(t,e){t.mainnet=e},setGTError:function(t,e){t.gtErrorCount=e},setEOSError:function(t,e){t.eosErrorCount=e},setPublicKey:function(t,e){t.publicKey=e},setUserId:function(t,e){t.userId=e},setToken:function(t,e){t.token=e},changeSessionId:function(t,e){t.curSession=e},setUserInfo:function(t,e){t.userInfo=e},setUserNickName:function(t,e){t.userInfo.nick_name=e},updateUserPhoto:function(t,e){t.userInfo.cover_photo=e}},r=(n("ac6a"),n("a481"),n("c5f6"),n("3835")),i=(n("7f7f"),n("7514"),n("96cf"),n("1da1")),c=(n("cadf"),n("551c"),n("097d"),n("5fe9")),u=n.n(c),d=n("5975"),l=n("33f8"),m=n("e332"),h=n("d3b7"),p=n.n(h),f={setScatter:function(t,e){var n=t.commit;return n("setScatter",e)},setEos:function(t,e){var n=t.commit;return n("setEos",e)},setAccount:function(t,e){var n=t.commit;return n("setAccount",e)},doScatterLogin:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e,n){var a,s,o,r,i,c;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.dispatch,s=e.commit,o=e.state,o.scatter){t.next=5;break}Object(l["q"])("Please install the scatter","Scatter"),t.next=22;break;case 5:return r=Object(m["b"])(),t.prev=6,t.next=9,o.scatter.getIdentity({accounts:[r]});case 9:i=t.sent,t.next=16;break;case 12:return t.prev=12,t.t0=t["catch"](6),"identity_rejected"!==t.t0.type&&Object(l["q"])(t.t0.message),t.abrupt("return",Promise.reject(t.t0));case 16:return c=i.accounts.find(function(t){return"eos"===t.blockchain}),s("setAccount",c),window.EOS=o.scatter.eos(r,p.a,{}),t.next=21,a("getAccount");case 21:return t.abrupt("return",Promise.resolve(!0));case 22:case"end":return t.stop()}},t,this,[[6,12]])}));return function(e,n){return t.apply(this,arguments)}}(),doScatterLogout:function(t,e){var n=t.commit,a=t.state;l["a"].delCookie("user_id"),l["a"].delCookie("token"),localStorage.removeItem("user_id"),localStorage.removeItem("token"),a.scatter&&a.scatter.forgetIdentity(),n("setAccount","")},getUserEOS:function(t,e){var n=t.dispatch,a=t.commit,s=t.state;return new Promise(function(t,e){window.EOS.getCurrencyBalance("eosio.token",s.account.name,"EOS").then(function(e){var n=Object(r["a"])(e,1),s=n[0],o=Number(s.replace(/\sEOS/,"")).toFixed(4);o=u.a.times(o,1e4),a("setBalance",o),a("setEOSError",0),t()}).catch(function(t){a("setEOSError",s.eosErrorCount+1),s.eosErrorCount<=5&&setTimeout(function(){n("getUserEOS")},1e3*s.eosErrorCount),e(t)})})},getAccount:function(t,e){var n=t.commit,a=t.state;return new Promise(function(t,e){window.EOS.getAccount(a.account.name).then(function(e){var a=JSON.parse(JSON.stringify(e.permissions));a.forEach(function(t){if("active"===t.perm_name){var e=t.required_auth.keys[0].key;n("setPublicKey",e)}}),t(e)}).catch(function(t){e(t)})})},doGameLogin:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e,n){var a,s,o,r,i,c,u;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e.dispatch,a=e.commit,s=e.state,o=localStorage.getItem("user_id"),r=localStorage.getItem("token"),!o||!r){t.next=9;break}return a("setUserId",o),a("setToken",r),t.abrupt("return",Promise.resolve({user_id:o,token:r}));case 9:return t.next=11,d["a"].user.getRandom({account:s.account.name});case 11:return i=t.sent,c=i.data.data,u=s.publicKey,t.abrupt("return",new Promise(function(t,e){s.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var o={account:s.account.name,sign:n,pubkey:u,data:c};d["a"].user.eosLogin(o).then(function(n){var s=n.data;if(1===s.result){var o=s.data.user_id,r=s.data.token;localStorage.setItem("user_id",o),localStorage.setItem("token",r),a("setUserId",o),a("setToken",r),t(s)}else e(new Error(s.msg))})}).catch(function(t){e(t)})}));case 15:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),resetGameLogin:function(t,e){var n=t.dispatch;t.commit,t.state;localStorage.removeItem("user_id"),localStorage.removeItem("token"),n("doGameLogin")},doParentLogin:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e,n){var a,s,o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,e.commit,a=e.state,t.prev=1,s={authorization:["".concat(a.account.name,"@").concat(a.account.authority)]},t.next=5,window.postMessager.send({action:"meechat:eosAction",data:{contract:"meechatadmin",action:"login",param:n.concat(s)}});case 5:return o=t.sent,t.abrupt("return",Promise.resolve(o.transaction_id));case 9:return t.prev=9,t.t0=t["catch"](1),t.abrupt("return",Promise.reject(t.t0));case 12:case"end":return t.stop()}},t,this,[[1,9]])}));return function(e,n){return t.apply(this,arguments)}}()},g=(n("f751"),n("55dd"),{sessionList:[],isLogin:!0,toApp:!1,friendList:[]}),v={setSessionList:function(t,e){t.sessionList=e.sort(function(t,e){return e.is_pin-t.is_pin})},addSession:function(t,e){t.sessionList.push(e)},chatAppLogin:function(t,e){t.isLogin=e},toApp:function(t,e){t.toApp=e},addSessionItem:function(t,e){t.sessionList.unshift(e)},setFriendList:function(t,e){t.friendList=e},setSessionItem:function(t,e){t.sessionList.forEach(function(t){t.session_id==e.session_id&&(t=e)})},updateSessionListByPin:function(t,e){t.sessionList.forEach(function(n,a){n.session_id==e&&t.sessionList.unshift(t.sessionList.splice(a,1)[0])})},cancelSessionListByPin:function(t,e){t.sessionList.forEach(function(n,a){n.session_id==e&&t.sessionList.push(t.sessionList.splice(a,1)[0])})}},b={getSessionList:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e,n){var a,s,o;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return a=e.commit,e.state,t.prev=1,t.next=4,d["a"].session.sessionList();case 4:s=t.sent,o=s.data,a("setSessionList",o.data),t.next=11;break;case 9:t.prev=9,t.t0=t["catch"](1);case 11:case"end":return t.stop()}},t,this,[[1,9]])}));return function(e,n){return t.apply(this,arguments)}}(),getUserInfo:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,e.state,t.prev=1,t.next=4,d["a"].user.getInfo();case 4:a=t.sent,s=a.data,n("setUserInfo",s.data),n("setGroupUserInfo",s.data),t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}},t,this,[[1,10]])}));return function(e){return t.apply(this,arguments)}}(),updateSessionItem:function(t,e){var n=t.commit,a=t.state,s=a.sessionList.find(function(t){return t.session_id==e.sessionId});s=Object.assign(s,e.data),n("setSessionItem",s)},doRepealPersonMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,e.commit,e.state,n=e.rootState,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].person.repealPersonMsg({session_id:n.curSession,hash:a.hash});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),getFriendList:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,e.state,t.prev=1,t.next=4,d["a"].group.getFriends();case 4:a=t.sent,s=a.data,n("setFriendList",s.data),t.next=11;break;case 9:t.prev=9,t.t0=t["catch"](1);case 11:case"end":return t.stop()}},t,this,[[1,9]])}));return function(e){return t.apply(this,arguments)}}()},_={state:g,mutations:v,actions:b},k=(n("4917"),n("20d6"),n("76a4")),x=n("bc3a"),y=n.n(x),I=n("2ef0"),w=n.n(I),L=null,C={state:{useCache:!1,adminList:[],creator:"",blockList:[],userCounts:"",groupName:"",shareName:"",groupNotice:"",privateName:"",coverPhoto:"",inviteUrl:"",sessionInfo:{},groupId:"",members:{},userId:"",nickName:"",atList:[],pinList:[],chatList:[],startHash:"",endHash:"",userInfo:{},unreadNums:0,chatInputFocus:!1,pinMsg:{}},mutations:{initGroup:function(t,e){t.userId=e.userId,t.groupId=e.groupId,t.useCache=e.useCache},initState:function(t,e){t.endHash="",t.startHash="",t.chatList=[],t.pinList=[],t.atList=[],t.unreadNums=0,t.userId=e.user_id,t.userInfo=e},setGroupInfo:function(t,e){t.groupName=e.groupName,t.userCounts=e.userCounts,t.members=e.members,t.groupNotice=e.groupNotice,t.inviteUrl=e.inviteUrl,t.sessionInfo=e.sessionInfo,t.coverPhoto=e.coverPhoto,t.adminList=e.adminList,t.blockList=e.blockList,t.shareName=e.shareName,t.creator=e.creator,e.pinMsg&&(Object(l["j"])(e.pinMsg,t.userId),t.pinList.push(e.pinMsg),Object(l["o"])(t.pinList,t.chatList,function(t){return t.hash})),t.pinMsg=e.pinMsg||{}},setGroupUserInfo:function(t,e){t.userInfo=e,t.userId=e.user_id},addHistoryList:function(t,e){if(e.length){Object(l["c"])(e),Object(l["o"])(t.pinList,e,function(t){return t.hash});var n=w.a.differenceBy(e,t.chatList,"hash")||[];t.chatList=n.concat(t.chatList)}},addChatItem:function(t,e,n){if(e&&e.length>0){Object(l["c"])(e),Object(l["o"])(t.pinList,e,function(t){return t.hash}),n&&e.forEach(function(e){Object(l["e"])(e.content,t.userInfo.user_name)&&t.atList.push(e)});var a=w.a.differenceBy(e,t.chatList,"hash")||[];t.chatList=t.chatList.concat(a)}else{var s={name:t.members[e.from]?t.members[e.from].nick_name:"unknown",content:e.content,userId:e.from,timestamp:e.timestamp,avatar:t.members[e.from]?t.members[e.from].cover_photo:"",hash:e.hash,type:e.from===t.userId?"me":"you",msg_type:e.msg_type,loading:Boolean(e.loading),res:e.res,fail:!1};e.createTime&&(s.createTime=e.createTime),Object(l["d"])(s,t.chatList),Object(l["b"])(s),t.chatList.some(function(t){return t.hash===s.hash})||t.chatList.push(s)}},addPacketItem:function(t,e){var n={name:t.members[e.from]?t.members[e.from].nick_name:"unknown",timestamp:e.timestamp,avatar:t.members[e.from]?t.members[e.from].cover_photo:"",userId:e.from,msg_type:"new_redpack"===e.type?4:5,content:JSON.parse(Object(l["i"])(e.content)),type:e.from===t.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:e.hash};Object(l["d"])(n,t.chatList),t.chatList.push(n),t.endHash=e.hash},addPacketTip:function(t,e){var n={content:{trxId:e.content.redpack_trx_id,title:e.content.title},ext:{grabbed:1,redpack_status:0},avatar:t.members[e.from]?t.members[e.from].cover_photo:"",name:t.members[e.from]?t.members[e.from].nick_name:"unknown",from:e.from,to:e.to,redPackTip:!0};t.chatList.push(n)},unpdatePacketItem:function(t,e){var n=e.type,s=e.trxId,o=e.data,r=t.chatList,i=r.findIndex(function(t){return 4==t.msg_type&&t.content.trxId==s}),c=r[i];c.ext[n]=o,a["default"].set(t.chatList,i,c)},reSendChatItem:function(t,e){var n=t.chatList;n.forEach(function(t){t.createTime==e.createTime&&(t.loading=!0,t.fail=!1)})},clearAtList:function(t){t.atList=[]},repealChatItem:function(t,e){for(var n=t.pinList,s=t.chatList,o=s.length-1;o>=0;o--){var r=s[o];r.hash===e.hash&&(a["default"].set(r,"repealMsg",!0),a["default"].set(r,"from",e.from))}n.length&&Object(l["o"])(n,[e],function(t){return t.hash})},deleteChatItem:function(t,e){var n=t.chatList.findIndex(function(t){return t.hash===e});t.chatList.splice(n,n)},addUnreadNums:function(t){t.unreadNums++},resetUnreadNums:function(t){t.unreadNums=0},setHash:function(t,e){e.startHash&&(t.startHash=e.startHash),e.endHash&&(t.endHash=e.endHash)},updatePin:function(t,e){t.sessionInfo.is_pin=e},updateMute:function(t,e){t.sessionInfo.is_mute=e},updateGroup:function(t,e){var n=e.key,a=e.data;t[n]=a},updateMembers:function(t,e){t.members=Object.assign({},t.members,e)},updateMemberAvatar:function(t,e){for(var n=e.userId,s=e.imageUrl,o=t.members,r=t.chatList,i=0;i<r.length;i++){var c=r[i]["userId"];if(c===n){var u=r[i];u["avatar"]=s,a["default"].set(t.chatList,i,u)}}for(var d in o)if(d===n){var l=o[d];return l["cover_photo"]=s,void a["default"].set(t.members,d,l)}},updateMemberNickName:function(t,e){for(var n=e.userId,s=e.nickName,o=t.members,r=t.chatList,i=0;i<r.length;i++){var c=r[i]["userId"];if(c===n){var u=r[i];u["name"]=s,a["default"].set(t.chatList,i,u)}}for(var d in o)if(d===n){var l=o[d];return l["nick_name"]=s,void a["default"].set(t.members,d,l)}},updateChatInputFocus:function(t,e){t.chatInputFocus=e},updateGroupBlockList:function(t,e){var n=e.type,a=e.id;if("delete"===n){var s=t.blockList.findIndex(function(t){return t==a});-1!==s&&t.blockList.splice(s,1)}else"add"===n&&t.blockList.push(a)},updateGroupPinMsg:function(t,e){e?(e.visible=!0,Object(l["j"])(e,t.userId),t.pinMsg=e):(t.pinMsg={},t.pinList=[])}},actions:{getGroupInfo:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e,n){var a,s,o,r,i,c,u,l,m,h,p;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,a=e.commit,s=e.state,t.next=3,d["a"].group.getGroupInfo({group_id:s.groupId}).catch(function(){});case 3:o=t.sent,0===o.data.code&&(r=o.data.data.adminList,i=o.data.data.blockList,c=o.data.data.pinMsg,u=o.data.data.group,l=o.data.data.members,m=o.data.data.userInfo,h=o.data.data.sessionInfo,c&&(c.visible=!0),p={},l.forEach(function(t){p[t.user_id]=t}),a("setGroupInfo",{userCounts:l.length+u.increase_num,groupName:u.group_title,shareName:u.group_name,members:p,userInfo:m,groupNotice:u.group_notice,inviteUrl:u.invite_url,sessionInfo:h,coverPhoto:u.cover_photo,adminList:r,blockList:i,pinMsg:c,creator:u.creator}));case 5:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}(),getNewMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s,o,r,i=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,n=e.commit,a=e.state,i.length>1&&void 0!==i[1]?i[1]:{},s=null==a.endHash,t.next=5,d["a"].group.getNewMsg({group_id:a.groupId,client_hash:a.endHash}).catch(function(){});case 5:return o=t.sent,0===o.data.code&&o.data.data.list.length>0&&(r=[],o.data.data.list.forEach(function(t){var e=o.data.data.userMap[t.from];e&&r.push({name:e?e.nick_name:"unknown",content:t.msg,userId:t.from,timestamp:t.create_time_int,avatar:e?e.cover_photo:"",hash:t.hash,type:t.from===a.userId?"me":"you",msg_type:t.msg_type,ext:t.ext?t.ext:null})}),a.chatList.length?n("setHash",{endHash:r[r.length-1].hash}):n("setHash",{endHash:r[r.length-1].hash,startHash:r[0].hash}),n("addChatItem",r,s)),t.abrupt("return","done");case 8:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getPrivateNewMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s,o,r,i,c,u=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,n=e.commit,a=e.state,s=e.rootState,u.length>1&&void 0!==u[1]?u[1]:{},t.next=4,d["a"].person.getNewMsg({session_id:s.curSession,client_hash:a.endHash}).catch(function(){});case 4:if(o=t.sent,0===o.data.code&&o.data.data.list.length>0){for(c in r=[],i=o.data.data.userMap,n("updateGroup",{key:"members",data:i}),i)c!==s.userId&&n("updateGroup",{key:"privateName",data:i[c]["nick_name"]});o.data.data.list.forEach(function(t){var e=o.data.data.userMap[t.from];r.push({name:e?e.nick_name:"unknown",content:t.msg,userId:t.from,timestamp:t.create_time_int,avatar:e.cover_photo||"",hash:t.hash,type:t.from===s.userId?"me":"you",msg_type:t.msg_type,ext:t.ext?t.ext:null})}),n("setHash",{endHash:r[r.length-1].hash,startHash:r[0].hash}),n("addChatItem",r)}return t.abrupt("return","done");case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getHistoryMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s,o,r,i,c,u=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e.dispatch,n=e.commit,a=e.state,s=u.length>1&&void 0!==u[1]?u[1]:{},o=localStorage.getItem(s.hash),r=[],i="",!o||!a.useCache){t.next=9;break}r=JSON.parse(o),t.next=13;break;case 9:return t.next=11,d["a"].group.getHistoryMsg({group_id:a.groupId,client_hash:a.startHash}).catch(function(){});case 11:c=t.sent,0===c.data.code&&c.data.data.list.length>0&&(c.data.data.list.forEach(function(t){4==t.msg_type?t.msg=JSON.parse(Object(l["i"])(t.msg)):t.msg=Object(l["i"])(t.msg);var e=c.data.data.userMap[t.from];e&&r.push({name:e?e.nick_name:"unknown",content:t.msg,userId:t.from,timestamp:t.create_time_int,avatar:e?e.cover_photo:"",hash:t.hash,type:t.from===a.userId?"me":"you",msg_type:t.msg_type,ext:t.ext?t.ext:null})}),a.useCache&&localStorage.setItem(s.hash,JSON.stringify(r)));case 13:return r.length>0?(n("setHash",{startHash:r[0].hash}),n("addHistoryList",r),i="done"):(n("setHash",{startHash:null}),i="end"),t.abrupt("return",i);case 15:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),getPrivateHistoryMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s,o,r,i,c,u,m=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e.dispatch,n=e.commit,a=e.state,s=e.rootState,o=m.length>1&&void 0!==m[1]?m[1]:{},r=localStorage.getItem(o.hash),i=[],c="",!r||!a.useCache){t.next=9;break}i=JSON.parse(r),t.next=13;break;case 9:return t.next=11,d["a"].person.getHistoryMsg({session_id:s.curSession,client_hash:o.hash}).catch(function(){});case 11:u=t.sent,0===u.data.code&&u.data.data.list.length>0&&(u.data.data.list.forEach(function(t){t.msg=Object(l["i"])(t.msg);var e=u.data.data.userMap[t.from];i.push({name:e?e.nick_name:"unknow",content:t.msg,userId:t.from,timestamp:t.create_time_int,avatar:e.cover_photo||"",hash:t.hash,type:t.from===s.userId?"me":"you",msg_type:t.msg_type,ext:t.ext?t.ext:null})}),a.useCache&&localStorage.setItem(o.hash,JSON.stringify(i)));case 13:return i.length>0?(n("setHash",{startHash:i[0].hash}),n("addHistoryList",i),c="done"):(n("setHash",{startHash:null}),c="end"),t.abrupt("return",c);case 15:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),doSendMsg:function(t){t.dispatch;var e=t.commit,n=t.state,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(t,s){d["a"].group.sendMsg({group_id:n.groupId,msg_type:a.type,msg:a.msg}).then(function(s){var o=s.data;if(0===o.code){if(a.createTime){var r=a.createTime;o.data.content=Object(l["i"])(o.data.content);for(var i=n.chatList,c=i.length-1;c>=0;c--){var u=i[c];u.createTime===r&&(u.hash=o.data.hash,u.loading=!1)}}else e("updateMembers",o.data.userMap),o.data.content=Object(l["i"])(o.data.content),e("addChatItem",o.data);e("setHash",{endHash:o.data.hash}),t(o.data)}else a.createTime&&Object(l["h"])(n,a.createTime)}).catch(function(t){a.createTime&&Object(l["h"])(n,a.createTime),s(t)})})},doSendFile:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s,o,r=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,n=e.commit,a=e.state,s=e.rootState,o=r.length>1&&void 0!==r[1]?r[1]:{},t.abrupt("return",new Promise(function(t,e){var r=s.userId,i=s.token,c=new FormData;c.append("group_id",a.groupId),c.append("res",o.res),c.append("user_id",r),c.append("token",i),y()({url:d["a"].host+"group/sendFile",method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(e){var s=e.data;if(0===s.code){if(o.createTime){var r=o.createTime;s.data.content=Object(l["i"])(s.data.content);var i=a.chatList;i.forEach(function(t){t.createTime===r&&(t.res=void 0,t.content=s.data.content,t.hash=s.data.hash,t.loading=!1,t.fail=!1)})}else n("updateMembers",s.data.userMap),s.data.content=Object(l["i"])(s.data.content),n("addChatItem",s.data);n("setHash",{endHash:s.data.hash}),t(s.data)}else o.createTime&&Object(l["h"])(a,o.createTime)}).catch(function(t){o.createTime&&Object(l["h"])(a,o.createTime),e(t)})}));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),doSendPrivateMsg:function(t){t.dispatch;var e=t.commit,n=t.rootState,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(t,s){d["a"].person.sendMsg({session_id:n.curSession,msg_type:a.type,msg:a.msg}).then(function(n){var a=n.data;0===a.code&&(e("addChatItem",a.data),t(a.data))}).catch(function(t){return s(t)})})},doUploadFile:function(t){t.dispatch,t.commit,t.state,arguments.length>1&&void 0!==arguments[1]&&arguments[1];d["a"].session.fileUpload({name:"res"})},initSocket:function(t){var e=t.commit,n=t.rootState,a=t.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var s="".concat(Object(m["c"])(),"/?user_id=").concat(n.userId,"&token=").concat(n.token);L&&(L.destroy(),L=null),L=new k["a"](s,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:JSON.stringify({act:"alive",player:name})}),L.on("open",function(t){}),L.on("message",function(t){var s=JSON.parse(t),o=s.channel,r=s.data;o.match("chat:group")&&("msg"===r.type&&r.from!==n.userId&&n.curSession===r.group_id&&(a("getNewMsg"),e("addUnreadNums")),r.type,r.type,r.type,r.type,"repeal"===r.type&&e("repealChatItem",r),"unblock"===r.type&&e("updateGroupBlockList",{type:"delete",id:r.to}),"join"===r.type&&e("updateMembers",r.user_info),"pin_msg"===r.type&&e("updateGroupPinMsg",r.pinMsg),"unpin_msg"===r.type&&e("updateGroupPinMsg",null)),o.match("chat:person")&&("msg"===r.type&&n.curSession.indexOf(r.to)>-1&&(a("getPrivateNewMsg"),e("addUnreadNums")),"repeal"===r.type&&e("repealChatItem",r.data))})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return e.dispatch,e.commit,n=e.state,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].group.repealGroupMsg({group_id:n.groupId,hash:a.hash});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),doBlockUser:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.state,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].group.blockUser({group_id:n.groupId,block_id:a.id});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),doUnBlockUser:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.state,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].group.unblockUser({group_id:n.groupId,block_id:a.id});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),doPinMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.state,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].group.pinMsg({group_id:n.groupId,hash:a.hash});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}(),doUnpinMsg:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(e){var n,a,s=arguments;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=e.state,a=s.length>1&&void 0!==s[1]?s[1]:{},t.prev=2,t.next=5,d["a"].group.unpinMsg({group_id:n.groupId,hash:a.hash});case 5:t.next=9;break;case 7:t.prev=7,t.t0=t["catch"](2);case 9:case"end":return t.stop()}},t,this,[[2,7]])}));return function(e){return t.apply(this,arguments)}}()},getters:{}},F=C;a["default"].use(s["a"]);var S={scatter:null,eos:null,account:"",balance:0,mainnet:EOS_HOST,gtErrorCount:0,eosErrorCount:0,publicKey:null,userId:"",token:"",curSession:0,userInfo:null};e["a"]=new s["a"].Store({state:S,mutations:o,actions:f,modules:{chat:_,group:F}})},2:function(t,e){},"21f7":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"preview-mask pub-scroll-box",on:{click:function(e){t.visible=!1}}},[n("i",{staticClass:"el-icon-close",on:{click:function(e){e.stopPropagation(),t.visible=!1}}}),n("img",{staticClass:"img",attrs:{src:t.imgUrl,alt:""},on:{click:function(e){e.stopPropagation(),t.visible=!1}}})]):t._e()])},s=[],o=(n("cadf"),n("551c"),n("097d"),{name:"imgPreview"}),r=o,i=(n("27ec"),n("2877")),c=Object(i["a"])(r,a,s,!1,null,"d3d8f0e6",null);c.options.__file="index.vue";var u=c.exports;u.install=function(t){var e,n=t.extend(u);t.prototype.$showImgPreview=function(t){e&&(document.body.removeChild(e.$el),e=null),e=new n({el:document.createElement("div"),data:function(){return{visible:!0,imgUrl:t}}}),document.body.appendChild(e.$el)}};e["a"]=u},"27ec":function(t,e,n){"use strict";var a=n("8277"),s=n.n(a);s.a},"2f35":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.repealMsg?n("div",{staticClass:"msg-repeal-item"},[t._v("\n "+t._s(t.repealStr)+"\n")]):t.msgItem&&t.msgItem.redPackTip?n("redPack-tip",{attrs:{info:t.msgItem}}):n("div",{staticClass:"msg-item clearfix",class:t.type},[t.timeMsg?n("msg-time",{attrs:{timestamp:t.timestamp}}):t._e(),t.avatar?n("img",{staticClass:"user-avatar avatar",attrs:{src:t.avatar,alt:""},on:{click:function(e){t.$showOtherInfo(t.userId)}}}):n("div",{staticClass:"avatar",class:"avatar_bg"+t.userId%9,attrs:{"data-name":t.name.slice(0,2).toUpperCase()},on:{click:function(e){t.$showOtherInfo(t.userId)}}}),n("div",{staticClass:"content"},[n("div",{staticClass:"metabar"},[n("span",{staticClass:"name"},[t._v(t._s(t.name))]),t.creator==t.userId?n("span",{staticClass:"admin"},["me"===t.type?n("i",{staticClass:"icon-creator"}):t._e(),t._v("\n 群主\n "),"you"===t.type?n("i",{staticClass:"icon-creator"}):t._e()]):t.adminList.includes(Number(t.userId))?n("span",{staticClass:"admin"},["me"===t.type?n("i",{staticClass:"el-icon-star-on"}):t._e(),t._v("\n 管理员\n "),"you"===t.type?n("i",{staticClass:"el-icon-star-on"}):t._e()]):t._e(),n("span",{staticClass:"time"},[t._v(t._s(t._f("formatTimestamp")(t.timestamp)))])]),4==t.msg_type&&t.msgItem?n("red-packet",{attrs:{info:t.msgItem},nativeOn:{click:function(e){t.$packetGet(t.msgItem)}}}):t.isMobile?[n("div",{staticClass:"bubble",class:{focus:t.showToolbar},on:{contextmenu:function(t){t.preventDefault()},touchstart:t.onTouchStartToolBtn,touchend:t.onTouchEndToolBtn}},[t.loading?n("i",{staticClass:"loading-icon"}):t._e(),t.fail?n("i",{staticClass:"error-icon",on:{click:t.reSend}}):t._e(),1==t.msg_type?n("img",{staticClass:"img-msg",style:{width:t.width,height:t.height},attrs:{src:t.content},on:{click:function(e){t.$showImgPreview(t.content)},load:t.imgLoad}}):2==t.msg_type||3==t.msg_type?n("video",{staticClass:"video-msg",class:{"limit-height":3==t.msg_type},attrs:{controls:"controls",preload:"meta",src:t.content}}):10==t.msg_type?n("pre",{staticClass:"text",domProps:{innerHTML:t._s(t.content)}}):n("pre",{staticClass:"text"},[t._v(t._s(t.content))]),n("ul",{directives:[{name:"show",rawName:"v-show",value:t.showToolbar,expression:"showToolbar"}],staticClass:"toolbar",style:{left:t.toolBarX,top:t.toolBarY,bottom:t.toolBarBottom}},[0==t.msg_type||4==t.msg_type?n("li",{on:{click:t.handleQuote}},[t._v("引用")]):t._e(),n("li",{on:{click:t.handleCopy}},[t._v("复制")]),t.isAdmin&&"you"===t.type||t.isAdmin||t.revoke?n("li",{staticClass:"split-line"}):t._e(),t.isAdmin?n("li",{on:{click:t.handlePingMsg}},[t._v("置顶")]):t._e(),t.isAdmin&&"you"===t.type?n("li",{on:{click:t.handleBlock}},[t._v(t._s(t.block?"解禁":"禁言"))]):t._e(),t.isAdmin||t.revoke?n("li",{on:{click:t.handleRevoke}},[t._v("撤回")]):t._e()])])]:[n("div",{staticClass:"bubble",class:{focus:t.showToolbar},on:{contextmenu:function(e){return e.preventDefault(),t.onToolBtn(e)}}},[t.loading?n("i",{staticClass:"loading-icon"}):t._e(),t.fail?n("i",{staticClass:"error-icon",on:{click:t.reSend}}):t._e(),1==t.msg_type?n("img",{staticClass:"img-msg",style:{width:t.width,height:t.height},attrs:{src:t.content},on:{click:function(e){t.$showImgPreview(t.content)},load:t.imgLoad}}):2==t.msg_type||3==t.msg_type?n("video",{staticClass:"video-msg",class:{"limit-height":3==t.msg_type},attrs:{controls:"controls",preload:"meta",src:t.content}}):10==t.msg_type?n("pre",{staticClass:"text",domProps:{innerHTML:t._s(t.content)}}):n("pre",{staticClass:"text"},[t._v(t._s(t.content))]),n("ul",{directives:[{name:"show",rawName:"v-show",value:t.showToolbar,expression:"showToolbar"}],staticClass:"toolbar",style:{left:t.toolBarX,top:t.toolBarY,bottom:t.toolBarBottom}},[0==t.msg_type||4==t.msg_type?n("li",{on:{click:t.handleQuote}},[t._v("引用")]):t._e(),n("li",{on:{click:t.handleCopy}},[t._v("复制")]),t.isAdmin&&"you"===t.type||t.isAdmin||t.revoke?n("li",{staticClass:"split-line"}):t._e(),t.isAdmin?n("li",{on:{click:t.handlePingMsg}},[t._v("置顶")]):t._e(),t.isAdmin&&"you"===t.type?n("li",{on:{click:t.handleBlock}},[t._v(t._s(t.block?"解禁":"禁言"))]):t._e(),t.isAdmin||t.revoke?n("li",{on:{click:t.handleRevoke}},[t._v("撤回")]):t._e()])])]],2)],1)},s=[],o=(n("7f7f"),n("be94")),r=(n("c5f6"),n("5a0c")),i=n.n(r),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"msg-time"},[t._v(t._s(t.showTime))])},u=[],d={name:"msgTime",props:{timestamp:{type:[String,Number],required:!0}},computed:{showTime:function(){return i()(1*this.timestamp).format("HH:mm")}}},l=d,m=(n("cf4e"),n("2877")),h=Object(m["a"])(l,c,u,!1,null,"697f1a99",null);h.options.__file="time.vue";var p=h.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"red-packet",class:t.info.userId==t.userId?"me":"you"},[n("div",{staticClass:"top",class:{"lose-bg":t.isLoseBg,unopen:0==t.info.ext.grabbed}},[n("i",{staticClass:"red-packet-icon"}),n("div",{staticClass:"word"},[n("p",[t._v(t._s(t.info.content.title))]),1==t.info.ext.grabbed?n("p",{staticClass:"bot-text"},[t._v("已领取")]):1==t.info.ext.redpack_status?n("p",{staticClass:"bot-text"},[t._v("已抢光")]):2==t.info.ext.redpack_status?n("p",{staticClass:"bot-text"},[t._v("已过期")]):t._e()])]),n("div",{staticClass:"bot"},[t._v("\n EOS红包\n ")])])},g=[],v={name:"redPacket",props:["info"],computed:{userId:function(){return this.$store.state.userId},isLoseBg:function(){return 0!=this.info.ext.redpack_status||1==this.info.ext.grabbed}}},b=v,_=(n("3744"),Object(m["a"])(b,f,g,!1,null,"c9c247b6",null));_.options.__file="redPacket.vue";var k=_.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tip-wrap"},[n("i",{staticClass:"redpack-icon"}),t.isMe?[n("span",[t._v(t._s(t.group.members[t.info.to].nick_name))]),t._v("领取了你的"),n("span",{staticClass:"text",on:{click:function(e){t.$packetGet(t.info)}}},[t._v("红包")])]:[t._v("\n 你领取了"),n("span",[t._v(t._s(t.group.members[t.info.from].nick_name))]),t._v("的"),n("span",{staticClass:"text",on:{click:function(e){t.$packetGet(t.info)}}},[t._v("红包")])]],2)},y=[],I=(n("cadf"),n("551c"),n("097d"),n("2f62")),w={name:"redPackTip",props:["info"],computed:Object(o["a"])({},Object(I["d"])(["userId","group"]),{isMe:function(){return this.info.from==this.userId}})},L=w,C=(n("ebfd1"),Object(m["a"])(L,x,y,!1,null,"012f38ae",null));C.options.__file="redPackTip.vue";var F=C.exports,S=n("33f8"),T={name:"msgItem",components:{msgTime:p,redPacket:k,redPackTip:F},props:{msgItem:Object,isPrivate:Boolean,repealMsg:Boolean,from:String,timeMsg:Boolean,avatar:{type:String},name:{type:String},timestamp:[String,Number],hash:String,content:{type:[String,Number,Object]},userId:[String,Number],type:{type:String},msg_type:{type:[Number,String]},createTime:[Number],loading:[Boolean],fail:[Boolean],res:[File]},data:function(){return{isMobile:Object(S["n"])(),toolBarX:0,toolBarY:0,toolBarBottom:0,showToolbar:!1,revoke:!1,block:!1,revokeTimeAllow:!1,width:"auto",height:"auto",longTapTimer:null}},computed:Object(o["a"])({},Object(I["d"])({myId:function(t){return t.userId},userInfo:function(t){return t.group.userInfo},blockList:function(t){return t.group.blockList},adminList:function(t){return t.group.adminList},members:function(t){return t.group.members},creator:function(t){return t.group.creator}}),{isAdmin:function(){var t=this;return this.adminList&&this.adminList.some(function(e){return e==t.myId})},repealStr:function(){if(this.repealMsg){if(this.from==this.userId)return"".concat("me"==this.type?"你":this.name,"撤回了一条消息");if(this.userId==this.myId){var t=this.members[this.from],e="管理员";return t&&(e=t.nick_name),"".concat(e,"撤回了").concat(this.name,"的一条消息")}return""}return""}}),mounted:function(){if(1==this.msg_type){var t=/_size([0-9]+)x([0-9]+)/.exec(this.content);if(t){var e=parseInt(t[1]),n=parseInt(t[2]),a=.84*(document.body.offsetWidth-35),s=e>a?a/e:1,o=n>250?250/n:1,r=Math.min(s,o);this.width=r*e+"px",this.height=r*n+"px"}}},created:function(){},methods:Object(o["a"])({},Object(I["c"])(["updateChatInputFocus","reSendChatItem"]),Object(I["b"])(["doRepealPersonMsg","doRepealGroupMsg","doBlockUser","doUnBlockUser","doPinMsg","doSendMsg","doSendFile"]),{imgLoad:function(t){this.width="auto",this.height="auto"},hideToolbar:function(t){!1!==this.showToolbar&&(this.showToolbar=!1,document.body.removeEventListener("click",this.hideToolbar,!1),document.body.removeEventListener("contextmenu",this.hideToolbar,!1))},onToolBtn:function(t){var e=this;if(this.showToolbar)this.hideToolbar(t);else{var n,a,s=window.innerWidth,o=window.innerHeight;if(t instanceof MouseEvent)n=t.clientX,a=t.clientY,this.toolBarX=t.layerX+20,this.toolBarY=t.layerY,this.$nextTick(function(){document.body.addEventListener("click",e.hideToolbar,!1),document.body.addEventListener("contextmenu",e.hideToolbar,!1)});else{var r=t.touches[0]||t.changedTouches[0];n=r.clientX,a=r.clientY;var i=t.target.getBoundingClientRect();this.toolBarX=r.pageX+20-i.left,this.toolBarY=r.pageY-i.top;var c=t.target;while(!c.classList.contains("bubble"))this.toolBarX+=c.offsetLeft,c=c.parentNode}n>.66*s&&(this.toolBarX=this.toolBarX-120),this.toolBarX+="px",a>o/2?(this.toolBarBottom=this.toolBarY+"px",this.toolBarY="auto"):(this.toolBarBottom="auto",this.toolBarY+="px"),this.showToolbar=!0,this.block=this.blockList.some(function(t){return t==e.userId}),this.revokeTimeAllow=Date.now()-parseInt(this.timestamp)<18e4,this.revoke="me"===this.type&&this.revokeTimeAllow}},onTouchStartToolBtn:function(t){var e=this;clearTimeout(this.longTapTimer),this.longTapTimer=setTimeout(function(){e.onToolBtn(t)},800)},onTouchEndToolBtn:function(t){var e=this;clearTimeout(this.longTapTimer),this.$nextTick(function(){document.body.addEventListener("click",e.hideToolbar,!1)})},handleQuote:function(){var t=this,e=this.name,n=this.content,a="「".concat(e,":").concat(n,"」\n- - - - - - - - - - - - - - -\n");this.$emit("quoteMsg",a),this.$nextTick(function(){t.updateChatInputFocus(!0)})},handleCopy:function(){var t=this;this.$copyText(this.content).then(function(e){t.updateChatInputFocus(!0)},function(t){console.log("Can not copy")})},handleShare:function(){this.$showInvite(this.content)},handleDel:function(){this.$emit("deleteMsg",this.hash)},handlePingMsg:function(){this.doPinMsg({hash:this.hash})},handleRevoke:function(){this.isPrivate?this.doRepealPersonMsg({hash:this.hash}):this.doRepealGroupMsg({hash:this.hash})},handleBlock:function(){this.block?this.doUnBlockUser({id:this.userId}):this.doBlockUser({id:this.userId})},reSend:function(){if(0==this.msg_type||4==this.msg_type){var t={type:0,msg:this.content,createTime:this.createTime};this.reSendChatItem({createTime:this.createTime}),this.doSendMsg(t)}else{var e={res:this.res,createTime:this.createTime};this.reSendChatItem({createTime:this.createTime}),this.doSendFile(e)}}}),filters:{formatTimestamp:function(t){return t?i()(1*t).format("HH:mm"):""}}},O=T,M=(n("80b3"),Object(m["a"])(O,a,s,!1,null,"ec9d1736",null));M.options.__file="index.vue";e["a"]=M.exports},3:function(t,e){},"33f8":function(t,e,n){"use strict";n.d(e,"q",function(){return u}),n.d(e,"f",function(){return d}),n.d(e,"k",function(){return l}),n.d(e,"m",function(){return m}),n.d(e,"a",function(){return h}),n.d(e,"l",function(){return p}),n.d(e,"g",function(){return g}),n.d(e,"i",function(){return v}),n.d(e,"c",function(){return b}),n.d(e,"d",function(){return _}),n.d(e,"n",function(){return k}),n.d(e,"b",function(){return x}),n.d(e,"o",function(){return y}),n.d(e,"j",function(){return I}),n.d(e,"h",function(){return w}),n.d(e,"e",function(){return L}),n.d(e,"p",function(){return F});n("28a5"),n("a481"),n("ac6a"),n("4917"),n("3b2b"),n("9e1f"),n("450d");var a=n("6ed5"),s=n.n(a),o=(n("cadf"),n("551c"),n("097d"),n("682a")),r=n.n(o),i=18e4,c="dqWt6twz6JyEy3EZ";function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";s.a.confirm(t,e,{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}})}function d(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(e,n){s.a.confirm(t,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e()}).catch(function(){})})}function l(){var t=(navigator.language||navigator.browserLanguage).toLowerCase(),e="zh";return e=t.indexOf("en")>-1?"en":"zh",e}function m(t){var e=new RegExp("[?&]"+t+"=([^&#?]*)(&|#|$)"),n=window.location.href.match(e);return n?n[1]:null}var h={setCookie:function(t,e){var n=7,a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),a.setTime(a.getTime()+6e4),"8080"===window.location.port||/^test-|\.webdev2\./.test(window.location.host)?document.cookie=t+"="+escape(e)+";expires="+a.toGMTString():document.cookie=t+"="+escape(e)+";domain=.mee.chat;path=/;expires="+a.toGMTString()},getCookie:function(t){var e=new RegExp("(^| )"+t+"=([^;]*)(;|$)"),n=document.cookie.match(e);return n?unescape(n[2]):null},delCookie:function(t){var e=t+"=;domain=.mee.chat;path=/";e+=";expires="+new Date(0).toGMTString(),document.cookie=e;var n=t+"=;path=/";n+=";expires="+new Date(0).toGMTString(),document.cookie=n}};function p(){var t,e=document.documentElement.clientHeight,n=document.documentElement.clientWidth,a=61,s=181;return e<600&&(t=600-a-s),t=e<800||n<1e3?e-a-s:.8*e-a-s,t}function f(t,e){for(var n,a=[],s=0,o="",r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)s=(s+a[r]+e.charCodeAt(r%e.length))%256,n=a[r],a[r]=a[s],a[s]=n;r=0,s=0;for(var i=0;i<t.length;i++)r=(r+1)%256,s=(s+a[r])%256,n=a[r],a[r]=a[s],a[s]=n,o+=String.fromCharCode(t.charCodeAt(i)^a[(a[r]+a[s])%256]);return o}function g(t){var e;try{e=btoa(f(encodeURIComponent(t),c))}catch(n){return t}return e}function v(t){var e;try{e=decodeURIComponent(f(atob(t),c))}catch(n){return t}return e}function b(t){var e=null,n=new RegExp("(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"),a=/(['"])(?:(?!\1).)*?\1/;t.forEach(function(t){t.timeMsg=null!==e&&parseInt(t.timestamp)-e>i,e=parseInt(t.timestamp),t.content&&"string"==typeof t.content&&!t.content.match(a)&&t.content.match(n)&&"0"===t.msg_type&&(t.msg_type=10,t.content=t.content.replace(n,function(t){return'<a href="'.concat(t,'" class="link text" target="_blank">').concat(t,"</a>")}))})}function _(t,e){if(0===e.length)t.timeMsg=!0;else{var n=parseInt(e[e.length-1].timestamp);t.timeMsg=parseInt(t.timestamp)-n>i}}function k(){return/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)}function x(t){var e=new RegExp("(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]"),n=/(['"])(?:(?!\1).)*?\1/;t.content.match(e)&&"0"===t.msg_type&&!t.content.match(n)&&(t.msg_type=10,t.content=t.content.replace(e,function(t){return'<a href="'.concat(t,'" class="link text" target="_blank">').concat(t,"</a>")}))}function y(t,e,n){t.forEach(function(a,s){e.some(function(t){return n(t)==n(a)})&&t.splice(s,1)})}function I(t,e){t.name=t.nick_name,t.content=v(t.msg),t.type=t.from==e?"me":"you",t.avatar=t.cover_photo||"",t.userId=e}function w(t,e){t.chatList.forEach(function(t){t.createTime===e&&(t.fail=!0,t.loading=!1)})}function L(t,e){if(!e)return!1;var n=new RegExp("@".concat(e));return n.test(t)}function C(t,e){var n=Math.abs(e-t.scrollTop),a=n>500?1e3:2*n,s=new r.a.Tween(t).to({scrollTop:e},a).easing(r.a.Easing.Quadratic.Out);return s.start()}function F(t,e,n){C(t,e).onComplete(function(){n.classList.toggle("active")}),setTimeout(function(){n.classList.toggle("active")},3e3)}},"34d0":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.visible?n("div",{staticClass:"chat-pinmsg",on:{click:t.scrollToView}},[n("label",[t._v("消息:")]),n("div",{staticClass:"msg-content"},[t._v(t._s(t._f("decryptoMsg")(t.msg)))]),n("i",{staticClass:"msg-close",on:{click:function(e){return e.stopPropagation(),t.handleClose(e)}}})]):t._e()},s=[],o=(n("9e1f"),n("450d"),n("6ed5")),r=n.n(o),i=n("be94"),c=(n("cadf"),n("551c"),n("097d"),n("2f62")),u=n("33f8"),d={name:"pinMsg",props:{visible:{type:Boolean,default:!1},msg:{type:String,default:""},hash:{type:String}},data:function(){return{}},computed:Object(i["a"])({},Object(c["d"])(["userId"]),Object(c["d"])({adminList:function(t){return t.group.adminList}}),{isAdmin:function(){var t=this;return this.adminList&&this.adminList.some(function(e){return e==t.userId})}}),methods:Object(i["a"])({},Object(c["b"])(["doUnpinMsg"]),{handleClose:function(t){var e=this;this.isAdmin?r.a.confirm("确定要关闭置顶消息吗?").then(function(){e.doUnpinMsg({hash:e.hash})}).catch(function(t){console.log(t)}):this.$emit("pinMsgClose")},scrollToView:function(t){this.$emit("scrollToView")}}),mounted:function(){},filters:{decryptoMsg:u["i"]}},l=d,m=(n("7d69"),n("2877")),h=Object(m["a"])(l,a,s,!1,null,"1cc02b47",null);h.options.__file="index.vue";e["a"]=h.exports},3744:function(t,e,n){"use strict";var a=n("eacb"),s=n.n(a);s.a},4:function(t,e){},4750:function(t,e){},"4e81":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"emoji-list pub-scroll-box",attrs:{id:"emojiList"}},t._l(t.emojiList,function(e){return n("li",{key:e,domProps:{innerHTML:t._s(e)},on:{click:t.handleClick}})}))},s=[],o={name:"emojiList",data:function(){return{emojiList:["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😯","😰","😱","😲","😳","😴","😵","😶","😷"],animalList:["😺","😸","😹","😻","😼","😽","🙀","😿","😾","🙈","🙉","🙊","👶","🧒","👦","👧","🧑","👨","👩","🧓","👴","😈","👿","🤡","👹","👺","💀","☠","👻","👽","👾","🤖","💩","🐒","🦍","🐶","🐕","🐩","🐺","🦊","🦝","🐱","🐈","🦁","🐯","🐅","🐆","🐴","🐎","🦄","🦓","🦌","🐮","🐂","🐃","🐄","🐷","🐖","🐗","🐽","🐏","🐑","🐐","🐪","🐫","🦙","🦒","🐘","🦏","🦛","🐭","🐁","🐀"]}},mounted:function(){},methods:{handleClick:function(t){this.$emit("addEmoji",t.target.innerHTML)}}},r=o,i=(n("9bac"),n("2877")),c=Object(i["a"])(r,a,s,!1,null,"a6d283b2",null);c.options.__file="index.vue";e["a"]=c.exports},5264:function(t,e,n){"use strict";var a=n("576f"),s=n.n(a);s.a},"576f":function(t,e,n){},5975:function(t,e,n){"use strict";n("cadf"),n("551c"),n("097d"),n("f751"),n("9e1f"),n("450d");var a=n("6ed5"),s=n.n(a),o=(n("96cf"),n("1da1")),r=n("bc3a"),i=n.n(r),c=n("4328"),u=n.n(c),d=n("1c04"),l="";"8080"===window.location.port&&(l="//test.mee.chat/");var m=i.a.create({baseURL:l,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(t){return t=u.a.stringify(t),t}],transformResponse:[],withCredentials:!0});function h(t){return p.apply(this,arguments)}function p(){return p=Object(o["a"])(regeneratorRuntime.mark(function t(e){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n={user_id:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||""},"post"===e.method?e.data?e.data=Object.assign(e.data,n):e.data=n:"get"===e.method&&(e.params?e.params=Object.assign(e.params,n):e.params=n),t.abrupt("return",e);case 6:return t.prev=6,t.t0=t["catch"](0),t.abrupt("return",e);case 9:case"end":return t.stop()}},t,this,[[0,6]])})),p.apply(this,arguments)}m.host=l,m.interceptors.request.use(function(){var t=Object(o["a"])(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!e.needLogin){t.next=15;break}if(localStorage.getItem("user_id")&&localStorage.getItem("token")){t.next=12;break}return t.prev=2,t.next=5,d["a"].dispatch("doGameLogin");case 5:return t.abrupt("return",h(e));case 8:t.prev=8,t.t0=t["catch"](2);case 10:t.next=13;break;case 12:return t.abrupt("return",h(e));case 13:t.next=16;break;case 15:return t.abrupt("return",h(e));case 16:case"end":return t.stop()}},t,this,[[2,8]])}));return function(e){return t.apply(this,arguments)}}(),function(t){return Promise.reject(t)}),m.interceptors.response.use(function(t){return 1===t.data.result||-1001===t.data.code?Promise.resolve(t):-5!==t.data.code?(s.a.confirm(t.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),Promise.reject(new Error(t.data.msg))):void d["a"].dispatch("resetGameLogin").then(function(){location.reload()})},function(t){return Promise.reject(t)});var f=m,g={getRandom:function(t){return f.get("user/random",{params:t})},getRandom2:function(t){return f.get("user/random2",{params:t})},eosLogin:function(t){return f.post("user/eosLogin",t)},eosLogin2:function(t){return f.post("user/eosLogin2",t)},eosBind:function(t){return f.request({url:"user/eosBind",method:"post",needLogin:!0,data:t})},ethLogin:function(t){return f.post("user/ethLogin",t)},ethBind:function(t){return f.request({url:"user/ethBind",method:"post",needLogin:!0,data:t})},unBind:function(t){return f.request({url:"user/unbind",method:"post",needLogin:!0,data:t})},changeUserName:function(t){return f.request({url:"user/changeUserName",method:"post",needLogin:!0,data:t})},changeNickName:function(t){return f.request({url:"user/changeNickName",method:"post",needLogin:!0,data:t})},changePhoto:function(t){return f.request({url:"user/changePhoto",method:"post",needLogin:!0,data:t})},setVisible:function(t){return f.request({url:"user/setVisible",method:"post",needLogin:!0,data:t})},getInfo:function(t){return f.request({url:"user/info",method:"get",needLogin:!0,params:t})},getOtherInfo:function(t){return f.request({url:"user/info",method:"get",needLogin:!1,params:t})}},v=(n("ac6a"),n("33f8")),b={getNewMsg:function(t){return f.request({url:"group/newMsg",method:"get",needLogin:!1,params:t}).then(function(t){return t.data.data.list.forEach(function(t){4==t.msg_type?t.msg=JSON.parse(Object(v["i"])(t.msg)):t.msg=Object(v["i"])(t.msg)}),Promise.resolve(t)})},getHistoryMsg:function(t){return f.request({url:"group/historyMsg",method:"get",needLogin:!1,params:t})},getGroupInfo:function(t){return f.request({url:"group/info",method:"get",needLogin:!1,params:t})},sendMsg:function(t){return t.msg=Object(v["g"])(t.msg),f.request({url:"group/sendMsg",method:"post",needLogin:!0,data:t})},createGroup:function(t){return f.request({url:"group/create",method:"post",needLogin:!0,data:t})},joinGroup:function(t){return f.request({url:"group/join",method:"get",needLogin:!0,params:t})},leaveGroup:function(t){return f.request({url:"group/leave",method:"get",needLogin:!0,params:t})},blockUser:function(t){return f.request({url:"group/blockUser",method:"get",needLogin:!0,params:t})},unblockUser:function(t){return f.request({url:"group/unblockUser",method:"get",needLogin:!0,params:t})},changeName:function(t){return f.request({url:"group/changeName",method:"post",needLogin:!0,data:t})},changeNotice:function(t){return f.request({url:"group/changeNotice",method:"post",needLogin:!0,data:t})},changeCover:function(t){return f.request({url:"group/changeCover",method:"post",needLogin:!0,data:t})},changeTitle:function(t){return f.request({url:"group/changeTitle",method:"post",needLogin:!0,data:t})},invites:function(t){return f.request({url:"group/invites",method:"post",needLogin:!0,data:t})},removes:function(t){return f.request({url:"group/removes",method:"post",needLogin:!0,data:t})},repealGroupMsg:function(t){return f.request({url:"group/repealMsg",method:"post",needLogin:!0,data:t})},sendImageMsg:function(t){return f.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:t})},getFriends:function(t){return f.request({url:"group/getFriends",method:"get",needLogin:!0,params:t})},pinMsg:function(t){return f.request({url:"group/pinMsg",method:"post",needLogin:!0,data:t})},unpinMsg:function(t){return f.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:t})}},_={getNewMsg:function(t){return f.request({url:"person/newMsg",method:"get",needLogin:!0,params:t})},getHistoryMsg:function(t){return f.request({url:"person/historyMsg",method:"get",needLogin:!0,params:t})},sendMsg:function(t){return f.request({url:"person/sendMsg",method:"post",needLogin:!0,data:t})},repealPersonMsg:function(t){return f.request({url:"person/repealMsg",method:"post",needLogin:!0,data:t})}},k={sessionList:function(t){return f.request({url:"session/list",method:"get",needLogin:!0,params:t})},setRead:function(t){return f.request({url:"session/setRead",method:"post",needLogin:!0,data:t})},setMute:function(t){return f.request({url:"session/mute",method:"post",needLogin:!0,data:t})},cancelMute:function(t){return f.request({url:"session/unMute",method:"post",needLogin:!0,data:t})},setPin:function(t){return f.request({url:"session/pin",method:"post",needLogin:!0,data:t})},cancelPin:function(t){return f.request({url:"session/unPin",method:"post",needLogin:!0,data:t})},deleteSession:function(t){return f.request({url:"session/delete",method:"post",needLogin:!0,data:t})},fileUpload:function(t){return f.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:t})}},x={grabPacket:function(t){return f.request({url:"redpack/grab",method:"get",needLogin:!0,params:t})},grabDetail:function(t){return f.request({url:"redpack/detail",method:"get",needLogin:!0,params:t})},sendList:function(t){return f.request({url:"redpack/sendList",method:"get",needLogin:!0,params:t})},receiveList:function(t){return f.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:t})}};e["a"]={host:f.host,user:g,group:b,person:_,session:k,redpack:x}},"5a09":function(t,e,n){"use strict";n("cadf"),n("551c"),n("097d");var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),t.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar"},[t.userInfo.cover_photo?n("img",{attrs:{src:t.userInfo.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.userInfo.user_id%9,attrs:{"data-name":t.userInfo.nick_name.slice(0,2).toUpperCase()}})]),n("div",{staticClass:"r-info"},[n("span",{staticClass:"name"},[t._v(t._s(t.userInfo.nick_name))]),n("div",{staticClass:"introduce"},[t._v("@"+t._s(t.userInfo.user_id))])])]),n("div",{staticClass:"account-wrap min-height-account"},[n("div",{staticClass:"title"},[t._v("已绑定账户")]),t.accountList?t._l(t.accountList,function(e,a){return n("div",{key:a,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[t._v(t._s(e.type.toUpperCase()))])]),e.account&&e.is_visible?n("p",{staticClass:"key"},[t._v(t._s(e.account))]):n("p",[t._v("未绑定或已隐藏")])])}):t._e()],2),t.$store.state.userId!=t.userId?n("button",{staticClass:"send-msg-btn",on:{click:t.sendMsg}},[t._v("发消息")]):t._e()]):t._e()])]):t._e()])},s=[],o=(n("ac6a"),n("c5f6"),n("be94")),r=(n("e960"),n("450d"),n("b35b")),i=n.n(r),c=(n("0fb7"),n("f529")),u=n.n(c),d=(n("7f7f"),n("1951"),n("eedf")),l=n.n(d),m=n("2b0e"),h=n("2f62"),p=n("5975");m["default"].component(l.a.name,l.a),m["default"].component(u.a.name,u.a),m["default"].component(i.a.name,i.a);var f={name:"infoPopup",data:function(){return{accountList:null,userInfo:null}},computed:Object(o["a"])({},Object(h["d"])({members:function(t){return t.group.members},sessionList:function(t){return t.chat.sessionList},meId:function(t){return t.userId},meInfo:function(t){return t.userInfo}})),methods:{sendMsg:function(){var t=this.userInfo.user_id,e=Number(t)<Number(this.meId)?"".concat(t,"-").concat(this.meId):"".concat(this.meId,"-").concat(t),n=!1;if(this.sessionList.forEach(function(t){t.session_id===e&&(n=!0)}),!n){var a={cover_photo:this.userInfo.cover_photo,is_group:"0",name:this.userInfo.nick_name,session_id:e};this.$store.commit("addSessionItem",a)}var s=this.meInfo.user_id,o={};o[s]={cover_photo:this.meInfo.cover_photo,nick_name:this.meInfo.nick_name},o[this.userInfo.user_id]={cover_photo:this.userInfo.cover_photo,nick_name:this.userInfo.nick_name},this.$store.commit("updateGroup",{key:"members",data:o}),this.$store.commit("updateGroup",{key:"privateName",data:this.userInfo.nick_name}),this.$store.commit("changeSessionId",e),this.visible=!1}},created:function(){var t=this;this.userInfo=this.members[this.userId],p["a"].user.getOtherInfo({user_id:this.userId}).then(function(e){var n=e.data;t.accountList=n.data.binds})}},g=f,v=(n("16c9"),n("2877")),b=Object(v["a"])(g,a,s,!1,null,null,null);b.options.__file="index.vue";var _=b.exports,k=n("6103");_.install=function(t,e){var n,a=t.extend(_);t.prototype.$showOtherInfo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!0,userId:t}},i18n:k["a"]}),document.body.appendChild(n.$el)}};e["a"]=_},6103:function(t,e,n){"use strict";var a=n("2b0e"),s=n("a925"),o=n("dee2"),r=n.n(o),i=n("742e"),c=n.n(i),u=n("4750"),d=n.n(u),l=n("33f8");a["default"].use(s["a"]);var m={en:r.a,zh:c.a,kr:d.a},h=l["a"].getCookie("lang")||Object(l["k"])(),p=new s["a"]({locale:h,messages:m});e["a"]=p},"6cd4":function(t,e,n){},"742e":function(t,e){},"76a4":function(t,e,n){"use strict";var a=n("53ca"),s=!1;function o(t){if(t)return r(t)}function r(t){for(var e in o.prototype)t[e]=o.prototype[e];return t}function i(t,e){if(!(this instanceof i))return new i(t,e);t&&"object"===Object(a["a"])(t)&&(e=t,t=void 0),o(this),e=e||{},e.path=e.path||"/",this.opts=e,this.url=t,this.lastPing=null,this.socketCache=[],this.socketMaxCache=5,this.readyState="closed",this.binaryType=e.binaryType||"blob",this._reconnectTimes=0,this._reconnectionDelay=e.reconnectionDelay||1e3,this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.timeout(null===e.timeout?2e4:e.timeout),this.logStyle="color:blue; font-size:16px;font-weight:bold;",this.keepAliveInterval=15e3,this.keepAliveTimeout=null,this.keepAliveContent=e.keepAliveContent||1,this.autoConnect=!1!==e.autoConnect,this.autoConnect&&this.connect()}o.prototype.on=o.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},o.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0===arguments.length)return this._callbacks={},this;var n,a=this._callbacks["$"+t];if(!a)return this;if(1===arguments.length)return delete this._callbacks["$"+t],this;for(var s=0;s<a.length;s++)if(n=a[s],n===e||n.fn===e){a.splice(s,1);break}return this},o.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var a=0,s=n.length;a<s;++a)n[a].apply(this,e)}return this},o.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},o.prototype.hasListeners=function(t){return!!this.listeners(t).length},i.prototype.connect=function(t){if(~this.readyState.indexOf("open"))return this;this.readyState="opening";var e=s?this.openWxConnect():this.openH5Connect();this.socketCache.push(e),this.socket=e},i.prototype.reconnect=function(){var t=this;clearInterval(this.keepAliveTimeout),"open"===this.readyState||"opening"===this.readyState||(this._reconnectTimes<this._reconnectionAttempts?(this.socket&&this.socket.close(),this._reconnectTimes+=1,this.readyState="reconnecting",setTimeout(function(){t.socket=s?t.openWxConnect():t.openH5Connect()},this._reconnectionDelay)):(this.socket&&this.socket.close(),this._reconnectTimes=1,this.readyState="reconnecting",setTimeout(function(){t.socket=s?t.openWxConnect():t.openH5Connect()},3e4)))},i.prototype.destroy=function(){this._reconnection=!1,this.socket.close()},i.prototype.keepAlive=function(){var t=this;this.keepAliveTimeout=setInterval(function(){"open"===t.readyState?t.send(t.keepAliveContent):"closed"===t.readyState&&t.reconnect()},this.keepAliveInterval)},i.prototype.openWxConnect=function(){var t=this,e={},n=wx.connectSocket({url:this.url,header:e,success:function(t){}});return n.onOpen(function(e){t.readyState="open",t.emit("open",e),t._reconnectTimes=1,t.keepAlive()}),n.onClose(function(e){clearInterval(t.keepAliveTimeout),t.readyState="closed",t._reconnection&&t.reconnect(),t.emit("close",e)}),n.onMessage(function(e){1!==e.data&&t.emit("message",e.data)}),n.onError(function(e){clearInterval(t.keepAliveTimeout),t._reconnection?"reconnecting"!==t.readyState&&(t.readyState="error",t.reconnect()):n.close(),t.emit("error",e.errMsg)}),n},i.prototype.openH5Connect=function(){var t=this,e=new WebSocket(this.url);return e.onopen=function(e){t.readyState="open",t.emit("open",e),t._reconnectTimes=1,t.keepAlive()},e.onclose=function(e){clearInterval(t.keepAliveTimeout),t.readyState="closed";var n=e.reason;console.log("%c [Socket连接被关闭: ".concat(n,"]"),t.logStyle),t._reconnection&&t.reconnect(),t.emit("close",e)},e.onmessage=function(e){1!==e.data&&t.emit("message",e.data)},e.onerror=function(n){clearInterval(t.keepAliveTimeout),t._reconnection?"reconnecting"!==t.readyState&&(t.readyState="error",t.reconnect()):e.close(),t.emit(n)},e},i.prototype.send=function(t){if(s){var e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);this.socket.send({data:e,success:function(t){},fail:function(t){},complete:function(t){}})}else this.socket.binaryType=this.binaryType,this.socket.send(t)},i.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},i.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},i.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},e["a"]=i},"7d69":function(t,e,n){"use strict";var a=n("0288"),s=n.n(a);s.a},"80b3":function(t,e,n){"use strict";var a=n("ca27"),s=n.n(a);s.a},8277:function(t,e,n){},8869:function(t,e,n){"use strict";n.d(e,"b",function(){return a}),n.d(e,"a",function(){return s});n("7f7f");var a={data:function(){return{isSearch:!1,searchList:null}},methods:{searchUser:function(t,e){var n=t.target.value;n?(this.searchList=e.filter(function(t){var e=t.name||t.nick_name;return e.indexOf(n)>-1}),this.isSearch=!0):this.isSearch=!1}}},s={data:function(){return{atInd:0}},methods:{atPerson:function(t){var e=this.$refs.chatInput,n=this.inputMsg.lastIndexOf("@");this.inputMsg=this.inputMsg.slice(0,n+1)+"".concat(t," "),this.atInd=0,e.focus()},handleUp:function(){this.atInd>0&&this.atInd--},handleDown:function(){var t=this.group.userCounts;this.atInd<t-1?this.atInd++:this.atInd=0}}}},"8ee8":function(t,e,n){},"8f20":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-modal-mask pub-scroll-box"},[t.openInfo?n("div",{staticClass:"detail-bg"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}}),t.info.avatar?n("img",{staticClass:"avatar",attrs:{src:t.info.avatar,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+t.userId%9},[t._v(t._s(t.info.name.slice(0,2).toUpperCase()))]),n("span",{staticClass:"name"},[t._v(t._s(t.info.name))]),n("div",{staticClass:"text"},[t._v(t._s(t.info.content.title))]),t.quantity?n("div",{staticClass:"money"},[t._v("\n "+t._s(t.formatNum(t.quantity))+" "),n("em",[t._v("EOS")])]):t._e(),t.quantity?n("p",{staticClass:"state"},[t._v("已转账到EOS账户")]):t._e(),n("p",{staticClass:"state-num"},[t._v("\n 共 "+t._s(t.openInfo.num_total)+" 个,已领取 "+t._s(t.openInfo.num_total-t.openInfo.num_left)+" 个\n ")]),n("ul",{staticClass:"packet-list pub-scroll-box"},t._l(t.openInfo.logs,function(e,a){return n("li",{key:a},[e.cover_photo?n("img",{staticClass:"avatar",attrs:{src:e.cover_photo,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+e.user_id%9},[t._v("\n "+t._s(e.nick_name.slice(0,2).toUpperCase())+"\n ")]),n("div",{staticClass:"content"},[n("div",{staticClass:"top"},[n("span",{staticClass:"user-name"},[t._v(t._s(e.nick_name))]),n("span",{staticClass:"amount"},[t._v(t._s(t.formatNum(e.quantity_int))+" EOS")])]),n("span",{staticClass:"time"},[t._v(t._s(t.formatTime(e.create_time_int)))])])])})),n("p",{staticClass:"tips"},[t._v("未领取的红包,将于24小时后发起退款")])]):n("div",{staticClass:"packet-bg"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"user-info",class:{small:1==t.info.ext.redpack_status}},[t.info.avatar?n("img",{staticClass:"avatar",attrs:{src:t.info.avatar,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+t.userId%9},[t._v(t._s(t.info.name.slice(0,2).toUpperCase()))]),n("span",{staticClass:"name"},[t._v(t._s(t.info.name))]),0==t.info.ext.redpack_status?n("div",{staticClass:"text"},[t._v(t._s(t.info.content.title))]):t._e()]),0==t.info.ext.redpack_status?n("div",{staticClass:"open-btn",class:{loading:t.isLoading},on:{click:t.openPacket}},[t._v("開")]):1==t.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[t._v("\n 手慢了,红包派完了\n ")]):2==t.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[t._v("\n 该红包已经过期。\n ")]):t._e(),t.userId==t.info.userId||1==t.info.ext.redpack_status?n("div",{staticClass:"detail",on:{click:t.showDetail}},[t._v("查看领取详情")]):t._e()])]):t._e()])},s=[],o=(n("0fb7"),n("450d"),n("f529")),r=n.n(o),i=(n("c5f6"),n("7514"),n("be94")),c=(n("cadf"),n("551c"),n("097d"),n("5975")),u=n("5fe9"),d=n.n(u),l=n("2f62"),m=n("5a0c"),h=n.n(m),p={name:"packetGet",data:function(){return{openInfo:null,isLoading:!1}},computed:Object(i["a"])({},Object(l["d"])(["userId","account"]),{trxId:function(){return this.info.content.trxId},quantity:function(){var t=this;if(this.openInfo&&this.openInfo.logs.length){var e=this.openInfo.logs,n=e.find(function(e){return e.user_id==t.userId});return n?n.quantity_int:0}return 0}}),methods:{openPacket:function(){var t=this;this.isLoading=!0,c["a"].redpack.grabPacket({trx_id:this.trxId}).then(function(e){var n=e.data;-1001===n.code?t.$store.commit("unpdatePacketItem",{type:"redpack_status",trxId:t.trxId,data:1}):(t.openInfo=n.data,t.$store.commit("unpdatePacketItem",{type:"grabbed",trxId:t.trxId,data:1}))}).finally(function(){t.isLoading=!1})},showDetail:function(){var t=this;c["a"].redpack.grabDetail({trx_id:this.trxId}).then(function(e){var n=e.data;t.openInfo=n.data})},formatNum:function(t){return d.a.divide(Number(t),1e4)},formatTime:function(t){return h()(1e3*t).format("HH:mm")}},created:function(){var t=this;this.account?c["a"].redpack.grabDetail({trx_id:this.trxId}).then(function(e){var n=e.data;t.info.ext.grabbed?t.openInfo=n.data:0==n.data.num_left&&t.$store.commit("unpdatePacketItem",{type:"redpack_status",trxId:t.trxId,data:n.data.redpack_status}),t.visible=!0}):r()({message:"请先登录",type:"warning"})}},f=p,g=(n("1b4a"),n("2877")),v=Object(g["a"])(f,a,s,!1,null,"0ef2125e",null);v.options.__file="index.vue";var b=v.exports;b.install=function(t,e){var n,a=t.extend(b);t.prototype.$packetGet=function(t){n&&(document.body.removeChild(n.$el),n=null),n=new a({el:document.createElement("div"),computed:{$store:function(){return e}},data:function(){return{visible:!1,info:t}}}),document.body.appendChild(n.$el)}};e["a"]=b},9360:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.atList?n("div",{staticClass:"at-me"},[t.atList.length>=2&&t.totalVisible?n("div",{staticClass:"at-me-item",on:{click:t.scrollToMsg}},[n("div",{staticClass:"at-content"},[t._v("有"+t._s(t.atList.length)+"个人提到了你")]),n("i",{staticClass:"icon-close",attrs:{title:"关闭"},on:{click:function(e){e.stopPropagation(),t.totalVisible=!1}}})]):t._e(),t.atList.length&&t.itemVisible?n("div",{staticClass:"at-me-item",on:{click:t.scrollToMsg}},[n("div",{staticClass:"at-content"},[t._v(t._s(t.atList[0].name)+"提到了你")]),n("i",{staticClass:"icon-close",attrs:{title:"关闭"},on:{click:function(e){e.stopPropagation(),t.itemVisible=!1}}})]):t._e()]):t._e()},s=[],o={name:"atMe",props:{atList:[Array]},data:function(){return{totalVisible:!0,itemVisible:!0}},methods:{scrollToMsg:function(){this.$emit("scrollToMsg",0)}}},r=o,i=(n("afff"),n("2877")),c=Object(i["a"])(r,a,s,!1,null,"4adb02d7",null);c.options.__file="atme.vue";e["a"]=c.exports},"96a8":function(t,e,n){},"9bac":function(t,e,n){"use strict";var a=n("96a8"),s=n.n(a);s.a},a1aa:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"chat-at"},[n("div",{staticClass:"bar-wrap"},[n("div",{ref:"container"},t._l(t.filterList,function(e,a){return n("div",{key:a,staticClass:"item",class:{active:a===t.curInd},on:{click:function(e){t.atPerson(a)}}},[n("div",{staticClass:"avatar",class:"avatar_bg"+e.user_id%9},[t._v("\n "+t._s(e.nick_name.slice(0,2).toUpperCase())+"\n ")]),n("span",{staticClass:"name"},[t._v(t._s(e.nick_name))])])}))])])},s=[],o=n("be94"),r=(n("c5f6"),n("cadf"),n("551c"),n("097d"),n("2f62")),i={name:"chatAt",props:{curInd:{type:Number},filterList:{type:Array}},computed:Object(o["a"])({},Object(r["d"])(["userId"])),watch:{curInd:function(t){this.scrollIntoView()}},methods:{atPerson:function(t){var e=this.filterList[t];this.$emit("atperson",e.user_name)},scrollIntoView:function(){var t=this.$refs.container.children[this.curInd];t&&t.scrollIntoView&&t.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}}},c=i,u=(n("5264"),n("2877")),d=Object(u["a"])(c,a,s,!1,null,"656b1c95",null);d.options.__file="index.vue";e["a"]=d.exports},a87e:function(t,e,n){},afff:function(t,e,n){"use strict";var a=n("0842"),s=n.n(a);s.a},b16d:function(t,e,n){"use strict";n("34ef"),n("4917"),n("28a5");var a=n("d4ec"),s=n("bee2"),o=function(){function t(e){var n=this;return Object(a["a"])(this,t),this.file=e.file,this.maxSize=e.maxSize||1048576,this.quantity=parseFloat((this.file.size/this.maxSize).toFixed(2)),new Promise(function(t,e){n.quantity<=1?n.blobToDataURL(n.file).then(function(e){t({base64:e.target.result,res:n.file})}):n.mini(t,e)})}return Object(s["a"])(t,[{key:"mini",value:function(t,e){var n=this,a=this.file,s=this.quantity;try{var o=new FileReader,r=new Image;o.readAsDataURL(a),o.onload=function(t){r.src=t.target.result},r.onload=function(){var e=document.createElement("canvas"),a=e.getContext("2d"),o=r.width,i=r.height;e.width=o,e.height=i,a.clearRect(0,0,o,i),a.drawImage(r,0,0,o,i);var c=e.toDataURL("image/jpeg",s),u=n.dataURLtoBlob(c);if(u.size>n.maxSize){a.clearRect(0,0,o,i);var d=Math.sqrt(s),l=parseInt(o*d),m=parseInt(i*d);e.width=l,e.height=m,a.drawImage(r,0,0,o,i,0,0,l,m),c=e.toDataURL("image/jpeg"),u=n.dataURLtoBlob(c)}t({base64:c,res:u})}}catch(i){e(i)}}},{key:"blobToDataURL",value:function(t){return new Promise(function(e,n){var a=new FileReader;a.onload=e,a.readAsDataURL(t)})}},{key:"dataURLtoBlob",value:function(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],a=atob(e[1]),s=a.length,o=new Uint8Array(s);while(s--)o[s]=a.charCodeAt(s);return new Blob([o],{type:n})}}]),t}();e["a"]=o},c9a0:function(t,e,n){},ca27:function(t,e,n){},cf4e:function(t,e,n){"use strict";var a=n("a87e"),s=n.n(a);s.a},dee2:function(t,e){},e332:function(t,e,n){"use strict";function a(){var t={};return t="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?{protocol:"https",blockchain:"eos",port:"443",host:"localnet.eosget.io",chainId:"cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f"}:{protocol:EOS_PROTOCOL,blockchain:"eos",port:EOS_PORT,host:EOS_HOST,chainId:"aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906"},t}function s(){var t;return t="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?"https:"===document.location.protocol?"wss://test-ws.mee.chat":"ws://test-ws.mee.chat":"https:"===document.location.protocol?"wss://ws.mee.chat":"ws://ws.mee.chat",t}function o(){var t;return t="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?"https:"===document.location.protocol?"wss://test-ws-group.mee.chat":"ws://test-ws-group.mee.chat":"https:"===document.location.protocol?"wss://ws-group.mee.chat":"ws://ws-group.mee.chat",t}n.d(e,"b",function(){return a}),n.d(e,"c",function(){return s}),n.d(e,"a",function(){return o})},eacb:function(t,e,n){},ebfd1:function(t,e,n){"use strict";var a=n("6cd4"),s=n.n(a);s.a}}]);
|