chunk-common.25cffa02.js 103 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"00f6":function(e,t,n){},"0627":function(e,t,n){},"0897":function(e,t,n){},1:function(e,t){},"16c9":function(e,t,n){"use strict";var r=n("8ee8"),a=n.n(r);a.a},"192d":function(e,t,n){},"1c04":function(e,t,n){"use strict";n("a481");var r=n("2b0e"),a=n("2f62"),s={setScatter:function(e,t){e.scatter=t},setEos:function(e,t){e.eos=t},setAccount:function(e,t){e.account=t},setToAccount:function(e,t){e.toAccount=t},setBalance:function(e,t){e.balance=t},setMoney:function(e,t){e.money=t},setGt:function(e,t){e.gt=t},setMainnet:function(e,t){e.mainnet=t},setGTError:function(e,t){e.gtErrorCount=t},setEOSError:function(e,t){e.eosErrorCount=t},setPublicKey:function(e,t){e.publicKey=t},setUserId:function(e,t){e.userId=t},setToken:function(e,t){e.token=t},changeSessionId:function(e,t){e.curSession=t},setUserInfo:function(e,t){e.userInfo=t},setUserUserName:function(e,t){e.userInfo.user_name=t},setUserNickName:function(e,t){e.userInfo.nick_name=t},updateUserPhoto:function(e,t){e.userInfo.cover_photo=t}},i=(n("ac6a"),n("c5f6"),n("3835")),o=(n("7f7f"),n("7514"),n("96cf"),n("1da1")),c=n("5fe9"),u=n.n(c),d=n("5975"),p=n("33f8"),l=n("e332"),m=n("d3b7"),h=n.n(m),f={setScatter:function(e,t){var n=e.commit;return n("setScatter",t)},setEos:function(e,t){var n=e.commit;return n("setEos",t)},setAccount:function(e,t){var n=e.commit;return n("setAccount",t)},doScatterLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,s,i,o,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.dispatch,a=t.commit,s=t.state,s.scatter){e.next=5;break}Object(p["s"])("Please install the scatter","Scatter"),e.next=22;break;case 5:return i=Object(l["b"])(),e.prev=6,e.next=9,s.scatter.getIdentity({accounts:[i]});case 9:o=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e["catch"](6),"identity_rejected"!==e.t0.type&&Object(p["s"])(e.t0.message),e.abrupt("return",Promise.reject(e.t0));case 16:return c=o.accounts.find(function(e){return"eos"===e.blockchain}),a("setAccount",c),window.EOS=s.scatter.eos(i,h.a,{}),e.next=21,r("getAccount");case 21:return e.abrupt("return",Promise.resolve(!0));case 22:case"end":return e.stop()}},e,this,[[6,12]])}));return function(t,n){return e.apply(this,arguments)}}(),doScatterLogout:function(e,t){var n=e.commit,r=e.state;p["a"].delCookie("user_id"),p["a"].delCookie("token"),localStorage.removeItem("user_id"),localStorage.removeItem("token"),r.scatter&&r.scatter.forgetIdentity(),n("setAccount","")},getUserEOS:function(e,t){var n=e.dispatch,r=e.commit,a=e.state;return new Promise(function(e,t){window.EOS.getCurrencyBalance("eosio.token",a.account.name,"EOS").then(function(t){var n=Object(i["a"])(t,1),a=n[0],s=Number(a.replace(/\sEOS/,"")).toFixed(4);s=u.a.times(s,1e4),r("setBalance",s),r("setEOSError",0),e()}).catch(function(e){r("setEOSError",a.eosErrorCount+1),a.eosErrorCount<=5&&setTimeout(function(){n("getUserEOS")},1e3*a.eosErrorCount),t(e)})})},getAccount:function(e,t){var n=e.commit,r=e.state;return new Promise(function(e,t){window.EOS.getAccount(r.account.name).then(function(t){var r=JSON.parse(JSON.stringify(t.permissions));r.forEach(function(e){if("active"===e.perm_name){var t=e.required_auth.keys[0].key;n("setPublicKey",t)}}),e(t)}).catch(function(e){t(e)})})},doGameLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,s,i,o,c,u;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,r=t.commit,a=t.state,s=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!s||!i){e.next=9;break}return r("setUserId",s),r("setToken",i),e.abrupt("return",Promise.resolve({user_id:s,token:i}));case 9:return e.next=11,d["a"].user.getRandom({account:a.account.name});case 11:return o=e.sent,c=o.data.data,u=a.publicKey,e.abrupt("return",new Promise(function(e,t){a.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var s={account:a.account.name,sign:n,pubkey:u,data:c};d["a"].user.eosLogin(s).then(function(n){var a=n.data;if(1===a.result){var s=a.data.user_id,i=a.data.token;localStorage.setItem("user_id",s),localStorage.setItem("token",i),r("setUserId",s),r("setToken",i),e(a)}else t(new Error(a.msg))})}).catch(function(e){t(e)})}));case 15:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),resetGameLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.dispatch,t.commit,t.state,localStorage.removeItem("user_id"),localStorage.removeItem("token"),e.next=5,r("doContractLogin");case 5:self!==top?location.replace(location.href.replace("show=false","show=true")):location.reload();case 6:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),doContractLogin:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,s,i,o,c,u,p,l,m,h,f,g,v,b;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,s=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!s||!i){e.next=9;break}return r("setUserId",s),r("setToken",i),e.abrupt("return",Promise.resolve({user_id:s,token:i}));case 9:return e.prev=9,e.next=12,d["a"].user.getRandom2({account:a.account.name});case 12:if(o=e.sent,c=o.data,u=c.data.random,p=c.data.accessToken,l={authorization:["".concat(a.account.name,"@").concat(a.account.authority)]},m=null,self===top){e.next=24;break}return e.next=21,window.postMessager.send({action:"meechat:eosAction",data:{contract:"meechatadmin",action:"login",param:[a.account.name,u,l]}});case 21:m=e.sent,e.next=30;break;case 24:return e.next=26,window.EOS.contract("meechatadmin");case 26:return h=e.sent,e.next=29,h.login(a.account.name,u,l);case 29:m=e.sent;case 30:return f={account:a.account.name,access_token:p,trx_id:m.transaction_id,group_id:a.group.groupId||null},e.next=33,d["a"].user.eosLogin2(f);case 33:if(g=e.sent,1!==g.data.result){e.next=42;break}return v=g.data.data.user_id,b=g.data.data.token,localStorage.setItem("user_id",v),localStorage.setItem("token",b),r("setUserId",v),r("setToken",b),e.abrupt("return",Promise.resolve(g.data));case 42:e.next=47;break;case 44:return e.prev=44,e.t0=e["catch"](9),e.abrupt("return",Promise.reject(e.t0));case 47:case"end":return e.stop()}},e,this,[[9,44]])}));return function(t,n){return e.apply(this,arguments)}}()},g=(n("f751"),n("2ef0")),v=n.n(g),b=n("d4ec"),_=n("bee2"),k=n("99de"),w=n("7e84"),y=n("262e"),I=n("411a"),x=function(e){function t(){return Object(b["a"])(this,t),Object(k["a"])(this,Object(w["a"])(t).call(this,"session"))}return Object(y["a"])(t,e),Object(_["a"])(t,[{key:"getSortList",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:return t=e.sent,e.next=5,t.index("pin_time_int").openCursor(null,"prev");case 5:n=e.sent,r=[];case 7:if(!n||!n.value){e.next=15;break}return a=n.value,r.push(a),e.next=12,n.continue();case 12:n=e.sent,e.next=7;break;case 15:return e.abrupt("return",r);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"setUnread",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject({unread:n},{session_id:t});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"setPin",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:r=n?(new Date).getTime():0,this.updateObject({is_pin:n,pin_time_int:r},{session_id:t});case 2:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()},{key:"setMute",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject({is_mute:n},{session_id:t});case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),t}(I["a"]),C=x,L={popInviteType:1,sessionList:[],isLogin:!0,toApp:!1,friendList:[]},S=new C,O={setSessionList:function(e,t){for(var n in t){var r=t[n],a=r["last_msg"],s=Object(p["j"])(a,r.is_group);t[n]["cont"]=s}e.sessionList=t},addSession:function(e,t){e.sessionList.push(t)},chatAppLogin:function(e,t){e.isLogin=t},toApp:function(e,t){e.toApp=t},addSessionItem:function(e,t){e.sessionList.unshift(t)},setSessionItemUnread:function(e,t){e.sessionList.forEach(function(e){if(e.session_id=="".concat(t.session_id)){var n=e.unread;t.unread&&t.curSession!=t.session_id?n+=t.unread:n=0,r["default"].set(e,"unread",n),t.cont&&r["default"].set(e,"cont",t.cont),t.timestamp&&r["default"].set(e,"update_time_int",t.timestamp),S.setUnread(e.session_id,n)}})},setFriendList:function(e,t){e.friendList=t},setSessionItem:function(e,t){e.sessionList.forEach(function(e){e.session_id==t.session_id&&(e=t)})},updateSessionListByPin:function(e,t){S.setPin(t,1),e.sessionList.forEach(function(n,r){n.session_id==t&&(n.is_pin=1,e.sessionList.unshift(e.sessionList.splice(r,1)[0]))})},cancelSessionListByPin:function(e,t){S.setPin(t,0);var n=null;e.sessionList.forEach(function(r,a){r.session_id==t?(r.is_pin=0,n=e.sessionList.splice(a,1)[0]):n&&r.is_pin<1&&(e.sessionList.splice(a,0,n),n=null)})},updateSessionListByMute:function(e,t){S.setMute(t,1),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=1)})},cancelSessionListByMute:function(e,t){S.setMute(t,0),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=0)})},removeSessionListById:function(e,t){e.sessionList=v.a.filter(e.sessionList,function(e,n){return e.session_id!=t})},setPopInviteType:function(e,t){/\d/.test(t)&&(e.popInviteType=t)}},N={getSessionList:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=t.commit,t.state,e.next=3,S.getSortList();case 3:a=e.sent,a&&r("setSessionList",a),d["a"].session.sessionList(function(e){var t=e.data;r("setSessionList",t.data),S.replaceObjects(t.data)});case 6:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),getUserInfo:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,r=t.rootState,e.prev=1,e.next=4,d["a"].user.getInfo({target_id:r.userId});case 4:a=e.sent,s=a.data,n("setUserInfo",s.data),n("setGroupUserInfo",s.data),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](1);case 12:case"end":return e.stop()}},e,this,[[1,10]])}));return function(t){return e.apply(this,arguments)}}(),updateSessionItem:function(e,t){var n=e.commit,r=e.state,a=r.sessionList.find(function(e){return e.session_id==t.sessionId});a=Object.assign(a,t.data),n("setSessionItem",a)},doRepealPersonMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,t.state,n=t.rootState,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].person.repealPersonMsg({session_id:n.curSession,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),getFriendList:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,e.prev=1,e.next=4,d["a"].group.getFriends();case 4:r=e.sent,a=r.data,n("setFriendList",a.data),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](1);case 11:case"end":return e.stop()}},e,this,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()},j={muteList:function(e){return e.sessionList.filter(function(e){if("1"==e.is_mute)return e.session_id})}},M={state:L,mutations:O,actions:N,getters:j},T=(n("4917"),n("28a5"),n("76a4")),A=n("bc3a"),R=n.n(A),E=n("8d4d"),P=null,$={getGroupInfo:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:t.dispatch,r=t.commit,a=t.state,d["a"].group.getGroupInfo2({group_id:a.groupId},function(e){if(0===e.data.code){var t=e.data.data.adminList,n=e.data.data.blockList,a=e.data.data.pinMsg,s=e.data.data.group,i=e.data.data.members,o=e.data.data.group.member_num,c=e.data.data.userInfo,u=e.data.data.sessionInfo,d=!!e.data.data.sessionInfo,p=e.data.data.eosInfo;a&&(a.visible=!0);var l={};i.forEach(function(e){l[e.user_id]=e}),r("setGroupInfo",{userCounts:i.length,groupName:s.group_title,shareName:s.group_name,members:l,membersArray:i,membersNum:o,userInfo:c,groupNotice:s.group_notice,inviteUrl:s.invite_url,sessionInfo:u,isJoin:d,coverPhoto:s.cover_photo,adminList:t,blockList:n,pinMsg:a,creator:s.creator,eosInfo:p})}});case 2:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),getNewMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i,o=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},r=t.state,a=new E["a"],e.next=5,a.getMsg(r.groupId);case 5:return s=e.sent,s.list.length>0&&$._renderGroupMsg(t,s,n),e.next=9,d["a"].group.getNewMsg({group_id:r.groupId,client_hash:r.endHash}).catch(function(){});case 9:return i=e.sent,0===i.data.code&&i.data.data.list.length>0&&$._renderGroupMsg(t,i.data.data,n),e.abrupt("return","done");case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),_renderGroupMsg:function(e,t,n){e.dispatch;var r=e.commit,a=e.state,s=[];t.list.forEach(function(e){var n=t.userMap[e.from];n&&s.push({name:n?n.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:n?n.cover_photo:"",hash:e.hash,type:e.from==a.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),r("updateMembers",t.userMap),a.chatList.length?r("setHash",{endHash:s[s.length-1].hash}):r("setHash",{endHash:s[s.length-1].hash,startHash:s[0].hash});var i=n.newMsg?{list:s,newMsg:n.newMsg}:s;r("addChatItem",i)},getPrivateNewMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i,o,c=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:{},r=t.state,a=t.rootState,s=new E["a"],e.next=5,s.getMsg(a.curSession);case 5:return i=e.sent,i.list.length>0&&$._renderPrivateMsg(t,i,n),e.next=9,d["a"].person.getNewMsg({session_id:a.curSession,client_hash:r.endHash}).catch(function(){});case 9:return o=e.sent,0===o.data.code&&o.data.data.list.length>0&&$._renderPrivateMsg(t,o.data.data,n),e.abrupt("return","done");case 12:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),_renderPrivateMsg:function(e,t,n){e.dispatch;var r=e.commit,a=e.state,s=e.rootState,i=[],o=t.userMap;for(var c in r("updateGroup",{key:"members",data:o}),o)c!==s.userId&&r("updateGroup",{key:"privateName",data:o[c]["nick_name"]});t.list.forEach(function(e){var n=t.userMap[e.from];i.push({name:n?n.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:n.cover_photo||"",hash:e.hash,type:e.from==s.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),a.chatList.length?r("setHash",{endHash:i[i.length-1].hash}):r("setHash",{endHash:i[i.length-1].hash,startHash:i[0].hash});var u=n.newMsg?{list:i,newMsg:n.newMsg}:i;r("addChatItem",u)},getHistoryMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i,o,c,u=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,n=t.commit,r=t.state,a=u.length>1&&void 0!==u[1]?u[1]:{},s=localStorage.getItem(a.hash),i=[],o="",!s||!r.useCache){e.next=9;break}i=JSON.parse(s),e.next=13;break;case 9:return e.next=11,d["a"].group.getHistoryMsg({group_id:r.groupId,client_hash:r.startHash}).catch(function(){});case 11:c=e.sent,c&&0===c.data.code&&c.data.data.list.length>0&&(c.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(p["i"])(e.msg)):e.msg=Object(p["i"])(e.msg);var t=c.data.data.userMap[e.from];n("updateMembers",c.data.data.userMap),t&&i.push({name:t?t.nick_name:"unknown",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t?t.cover_photo:"",hash:e.hash,type:e.from==r.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),r.useCache&&localStorage.setItem(a.hash,JSON.stringify(i)));case 13:return i.length>0?(n("setHash",{startHash:i[0].hash}),n("addHistoryList",i),o="done"):(n("setHash",{startHash:null}),o="end"),e.abrupt("return",o);case 15:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),getPrivateHistoryMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i,o,c,u,l=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,n=t.commit,r=t.state,a=t.rootState,s=l.length>1&&void 0!==l[1]?l[1]:{},i=localStorage.getItem(s.hash),o=[],c="",!i||!r.useCache){e.next=9;break}o=JSON.parse(i),e.next=13;break;case 9:return e.next=11,d["a"].person.getHistoryMsg({session_id:a.curSession,client_hash:r.startHash}).catch(function(){});case 11:u=e.sent,0===u.data.code&&u.data.data.list.length>0&&(u.data.data.list.forEach(function(e){e.msg=Object(p["i"])(e.msg);var t=u.data.data.userMap[e.from];o.push({name:t?t.nick_name:"unknow",content:e.msg,userId:e.from,timestamp:e.create_time_int,avatar:t.cover_photo||"",hash:e.hash,type:e.from==a.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),r.useCache&&localStorage.setItem(s.hash,JSON.stringify(o)));case 13:return o.length>0?(n("setHash",{startHash:o[0].hash}),n("addHistoryList",o),c="done"):(n("setHash",{startHash:null}),c="end"),e.abrupt("return",c);case 15:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),doSendMsg:function(e){e.dispatch;var t=e.commit,n=e.state,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(e,a){d["a"].group.sendMsg({group_id:n.groupId,msg_type:r.type,msg:r.msg}).then(function(a){var s=a.data;if(0===s.code){if(r.createTime){var i=r.createTime;s.data.content=Object(p["i"])(s.data.content);for(var o=n.chatList,c=o.length-1;c>=0;c--){var u=o[c];u.createTime===i&&(u.hash=s.data.hash,u.loading=!1)}}else t("updateMembers",s.data.userMap),s.data.content=Object(p["i"])(s.data.content),t("addChatItem",s.data);t("setHash",{endHash:s.data.hash}),e(s.data)}else r.createTime&&Object(p["h"])(n,r.createTime)}).catch(function(e){r.createTime&&Object(p["h"])(n,r.createTime),a(e)})})},doSendFile:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,n=t.commit,r=t.state,a=t.rootState,s=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",new Promise(function(e,t){var i=a.userId,o=a.token,c=new FormData;if(c.append("res",s.res),c.append("user_id",i),c.append("token",o),r.groupId)c.append("group_id",r.groupId);else{var u,l=a.curSession.split("-");u=l[0]==a.userId?l[1]:l[0],c.append("to_user",u)}var m=r.groupId?"group/sendFile":"person/sendFile";R()({url:[d["a"].host,m].join(""),method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(t){var a=t.data;if(0===a.code){if(s.createTime){var i=s.createTime;a.data.content=Object(p["i"])(a.data.content);var o=r.chatList;o.forEach(function(e){e.createTime===i&&(e.res=void 0,e.content=a.data.content,e.hash=a.data.hash,e.loading=!1,e.fail=!1)})}else n("updateMembers",a.data.userMap),a.data.content=Object(p["i"])(a.data.content),n("addChatItem",a.data);n("setHash",{endHash:a.data.hash}),e(a.data)}else s.createTime&&Object(p["h"])(r,s.createTime)}).catch(function(e){s.createTime&&Object(p["h"])(r,s.createTime),t(e)})}));case 3:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),doSendPrivateMsg:function(e){e.dispatch;var t=e.commit,n=e.state,r=e.rootState,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(e,s){d["a"].person.sendMsg({session_id:r.curSession,msg_type:a.type,msg:a.msg}).then(function(r){var s=r.data;if(0===s.code){if(a.createTime){var i=a.createTime;s.data.content=Object(p["i"])(s.data.content);for(var o=n.chatList,c=o.length-1;c>=0;c--){var u=o[c];u.createTime===i&&(u.hash=s.data.hash,u.loading=!1)}}else t("updateMembers",s.data.userMap),s.data.content=Object(p["i"])(s.data.content),t("addChatItem",s.data);t("setHash",{endHash:s.data.hash}),e(s.data)}else a.createTime&&Object(p["h"])(n,a.createTime)}).catch(function(e){a.createTime&&Object(p["h"])(n,a.createTime),s(e)})})},initSocket:function(e){var t=e.commit,n=(e.state,e.rootState),r=e.rootGetters,a=e.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var s="".concat(Object(l["c"])(),"/?user_id=").concat(n.userId,"&token=").concat(n.token);P&&(P.destroy(),P=null),P=new T["a"](s,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:JSON.stringify({act:"alive",player:name})}),P.on("open",function(e){}),P.on("message",function(e){var s=JSON.parse(e),i=s.channel,o=s.data,c=r.muteList,u=1;if(n.chat.sessionList.forEach(function(e){u+=Number(e.unread)}),i.match("chat:group")){var l=c.some(function(e){return e.session_id==o.group_id});"msg"===o.type&&o.from!==n.userId&&(n.curSession===o.group_id&&(a("getNewMsg",{newMsg:!0}),t("addUnreadNums"),p["p"].changeTitle(u)),l||(p["p"].showNotification(o),p["p"].changeTitle(u))),o.type,o.type,o.type,o.type,"repeal"===o.type&&t("repealChatItem",o),"block"===o.type&&t("updateGroupBlockList",{type:"add",id:o.to}),"unblock"===o.type&&t("updateGroupBlockList",{type:"delete",id:o.to}),"join"===o.type&&t("updateMembers",o.user_info),"pin_msg"===o.type&&t("updateGroupPinMsg",o.pinMsg),"unpin_msg"===o.type&&t("updateGroupPinMsg",null),"new_redpack"===o.type&&n.curSession==o.group_id&&t("addPacketItem",o),"grab_redpack"===o.type&&n.curSession==o.group_id&&(o.from!=n.userId&&o.to!=n.userId||t("addPacketTip",o))}if(i.match("chat:person")){if(!n.curSession)return;var m=+o.to>+o.from?"".concat(o.from,"-").concat(o.to):"".concat(o.to,"-").concat(o.from),h=c.some(function(e){return e.session_id==m});"msg"===o.type&&(r.otherUserId==o.from&&(a("getPrivateNewMsg"),t("addUnreadNums"),p["p"].changeTitle(u)),h||(p["p"].showNotification(o),p["p"].changeTitle(u))),"repeal"===o.type&&t("repealChatItem",o.data),"new_redpack"===o.type&&t("addPacketItem",o),"grab_redpack"===o.type&&r.otherUserId==o.from&&(o.from!=n.userId&&o.to!=n.userId||t("addPacketTip",o))}if("msg"===o.type||"new_redpack"===o.type){var f,g=n.chat.sessionList;f=o.group_id?o.group_id:+o.to>+o.from?"".concat(o.from,"-").concat(o.to):"".concat(o.to,"-").concat(o.from);var v=g.some(function(e){return e.session_id==f}),b={session_id:f,cont:Object(p["j"])(o,o.group_id),unread:1,update_time_int:o.timestamp,timestamp:o.timestamp};v||(o.group_id?d["a"].group.getGroupInfo({group_id:o.group_id}).then(function(e){var n=e.data,r=n.data.group,a={cover_photo:r.cover_photo,is_group:"1",name:r.group_name};t("addSessionItem",Object.assign(a,b))}):d["a"].user.getOtherInfo({target_id:o.from}).then(function(e){var n=e.data,r={cover_photo:n.data.cover_photo,is_group:"0",name:n.data.nick_name};t("addSessionItem",Object.assign(r,b))})),t("setSessionItemUnread",Object.assign({curSession:n.curSession},b))}})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t.dispatch,t.commit,n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.repealGroupMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doBlockUser:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.blockUser({group_id:n.groupId,block_id:r.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doUnBlockUser:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.unblockUser({group_id:n.groupId,block_id:r.id});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doPinMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.pinMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),doUnpinMsg:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.unpinMsg({group_id:n.groupId,hash:r.hash});case 5:e.next=9;break;case 7:e.prev=7,e.t0=e["catch"](2);case 9:case"end":return e.stop()}},e,this,[[2,7]])}));return function(t){return e.apply(this,arguments)}}(),joinGroup:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.state,r=t.commit,a.length>1&&void 0!==a[1]?a[1]:{},e.prev=2,e.next=5,d["a"].group.joinGroup({group_id:n.groupId});case 5:r("updateJoin",!0),e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](2);case 10:case"end":return e.stop()}},e,this,[[2,8]])}));return function(t){return e.apply(this,arguments)}}()},U=$,G=(n("20d6"),{initGroup:function(e,t){e.userId=t.userId,e.groupId=t.groupId,e.useCache=t.useCache},initState:function(e,t){e.endHash="",e.startHash="",e.adminList=[],e.creator="",e.blockList=[],e.userCounts="",e.groupName="",e.shareName="",e.groupNotice="",e.coverPhoto="",e.inviteUrl="",e.sessionInfo={},e.eosInfo=null,e.pinMsg={},e.groupId="",e.nickName="",e.chatList=[],e.pinList=[],e.atList=[],e.searchList=[],e.isNewAt=!0,e.isNewAtFound=!1,e.isJoin=!0,e.unreadNums=0,e.userId=t.user_id,e.userInfo=t},setGroupInfo:function(e,t){e.groupName=t.groupName,e.userCounts=t.userCounts,e.members=t.members,e.groupNotice=t.groupNotice,e.inviteUrl=t.inviteUrl,e.sessionInfo=t.sessionInfo||{},e.isJoin=t.isJoin,e.coverPhoto=t.coverPhoto,e.adminList=t.adminList,e.blockList=t.blockList,e.shareName=t.shareName,e.creator=t.creator,e.eosInfo=t.eosInfo,e.membersArray=t.membersArray,e.membersNum=t.membersNum,t.pinMsg&&(Object(p["l"])(t.pinMsg,e.userId),e.pinList.push(t.pinMsg),Object(p["q"])(e.pinList,e.chatList,function(e){return e.hash})),e.pinMsg=t.pinMsg||{}},setGroupUserInfo:function(e,t){e.userInfo=t,e.userId=t.user_id},addHistoryList:function(e,t){if(t.length){Object(p["c"])(t),Object(p["q"])(e.pinList,t,function(e){return e.hash});var n=v.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=n.concat(e.chatList)}},addChatItem:function(e,t){var n=!1;if(t.constructor===Object&&t.newMsg&&(t=t.list,n=!0),t&&t.length>0){Object(p["c"])(t),Object(p["q"])(e.pinList,t,function(e){return e.hash}),n&&t.forEach(function(t){Object(p["e"])(t.content,e.userInfo.user_name)&&e.atList.push(t)});var r=v.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=e.chatList.concat(r)}else{var a={name:e.members[t.from]?e.members[t.from].nick_name:"unknown",content:t.content,userId:t.from,timestamp:t.timestamp,avatar:e.members[t.from]?e.members[t.from].cover_photo:"",hash:t.hash,type:t.from==e.userId?"me":"you",msg_type:t.msg_type,loading:Boolean(t.loading),res:t.res,fail:!1};t.createTime&&(a.createTime=t.createTime),Object(p["d"])(a,e.chatList),Object(p["b"])(a),e.chatList.some(function(e){return e.hash===a.hash})||e.chatList.push(a)}},addPacketItem:function(e,t){var n={name:e.members[t.from]?e.members[t.from].nick_name:"unknown",timestamp:t.timestamp,avatar:e.members[t.from]?e.members[t.from].cover_photo:"",userId:t.from,msg_type:"new_redpack"===t.type?4:5,content:JSON.parse(Object(p["i"])(t.content)),type:t.from==e.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:t.hash};Object(p["d"])(n,e.chatList),e.chatList.push(n),e.endHash=t.hash},addPacketTip:function(e,t){var n={content:{trxId:t.content.redpack_trx_id,title:t.content.title},ext:{grabbed:1,redpack_status:0},avatar:e.members[t.from]?e.members[t.from].cover_photo:"",name:e.members[t.from]?e.members[t.from].nick_name:"unknown",from:t.from,to:t.to,redPackTip:!0};e.chatList.push(n)},unpdatePacketItem:function(e,t){var n=t.type,a=t.trxId,s=t.data,i=e.chatList,o=i.findIndex(function(e){return 4==e.msg_type&&e.content.trxId==a}),c=i[o];c.ext[n]=s,r["default"].set(e.chatList,o,c);var u=new E["a"];u.updatePackInfo(c.hash,n,s)},reSendChatItem:function(e,t){var n=e.chatList;n.forEach(function(e){e.createTime==t.createTime&&(e.loading=!0,e.fail=!1)})},removeAtListLast:function(e){e.atList.pop()},clearAtList:function(e){e.atList=[]},repealChatItem:function(e,t){for(var n=e.pinList,a=e.chatList,s=a.length-1;s>=0;s--){var i=a[s];i.hash===t.hash&&(r["default"].set(i,"repealMsg",!0),r["default"].set(i,"from",t.from))}n.length&&Object(p["q"])(n,[t],function(e){return e.hash})},deleteChatItem:function(e,t){var n=e.chatList.findIndex(function(e){return e.hash===t});e.chatList.splice(n,n)},addUnreadNums:function(e){e.unreadNums++},resetUnreadNums:function(e){e.unreadNums=0},setHash:function(e,t){t.startHash&&(e.startHash=t.startHash),t.endHash&&(e.endHash=t.endHash)},updatePin:function(e,t){e.sessionInfo.is_pin=t},updateMute:function(e,t){e.sessionInfo.is_mute=t},updateJoin:function(e,t){e.isJoin=t},updateGroup:function(e,t){var n=t.key,r=t.data;e[n]=r},updateMembers:function(e,t){e.members=Object.assign({},e.members,t)},updateMemberAvatar:function(e,t){for(var n=t.userId,a=t.imageUrl,s=e.members,i=e.chatList,o=0;o<i.length;o++){var c=i[o]["userId"];if(c==n){var u=i[o];u["avatar"]=a,r["default"].set(e.chatList,o,u)}}for(var d in s)if(d==n){var p=s[d];return p["cover_photo"]=a,void r["default"].set(e.members,d,p)}},updateMemberNickName:function(e,t){for(var n=t.userId,a=t.nickName,s=e.members,i=e.chatList,o=0;o<i.length;o++){var c=i[o]["userId"];if(c==n){var u=i[o];u["name"]=a,r["default"].set(e.chatList,o,u)}}for(var d in s)if(d==n){var p=s[d];return p["nick_name"]=a,void r["default"].set(e.members,d,p)}},updateChatInputFocus:function(e,t){e.chatInputFocus=t},updateGroupBlockList:function(e,t){var n=t.type,r=t.id;if("delete"===n){var a=e.blockList.findIndex(function(e){return e==r});-1!==a&&e.blockList.splice(a,1)}else"add"===n&&e.blockList.push(r)},updateGroupPinMsg:function(e,t){t?(t.visible=!0,Object(p["l"])(t,e.userId),e.pinMsg=t):(e.pinMsg={},e.pinList=[])},updateIsNewAt:function(e,t){e.isNewAt=t.isNewAt,e.isNewAtFound=t.isNewAtFound},updateGroupSearchList:function(e,t){e.searchList=t}}),q=G,H={state:{useCache:!1,adminList:[],creator:"",blockList:[],userCounts:"",groupName:"",shareName:"",groupNotice:"",privateName:"",coverPhoto:"",inviteUrl:"",sessionInfo:{},eosInfo:null,groupId:"",members:{},membersArray:[],membersNum:0,userId:"",nickName:"",atList:[],pinList:[],chatList:[],startHash:"",endHash:"",chatUserList:[],userInfo:{},unreadNums:0,chatInputFocus:!1,pinMsg:{},searchList:[],isNewAt:!0,isNewAtFound:!1,isJoin:!0},actions:U,mutations:q},B=H;r["default"].use(a["a"]);var D={scatter:null,eos:null,account:"",balance:0,mainnet:EOS_HOST,gtErrorCount:0,eosErrorCount:0,publicKey:null,userId:"",token:"",curSession:"",userInfo:null},J={isPrivate:function(e){return/-/g.test(e.curSession)},otherUserId:function(e){return e.curSession.indexOf("-")>-1?e.curSession.replace("-","").replace(e.userId,""):""}};t["a"]=new a["a"].Store({state:D,mutations:s,actions:f,getters:J,modules:{chat:M,group:B}})},2:function(e,t){},"21f7":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"preview-mask pub-scroll-box",on:{click:function(t){e.visible=!1}}},[n("i",{staticClass:"el-icon-close",on:{click:function(t){t.stopPropagation(),e.visible=!1}}}),n("img",{staticClass:"img",attrs:{src:e.imgUrl,alt:""},on:{click:function(t){t.stopPropagation(),e.visible=!1}}})]):e._e()])},a=[],s={name:"imgPreview"},i=s,o=(n("2281"),n("2877")),c=Object(o["a"])(i,r,a,!1,null,"26b6aa10",null);c.options.__file="index.vue";var u=c.exports;u.install=function(e){var t,n=e.extend(u);e.prototype.$showImgPreview=function(e){t&&(document.body.removeChild(t.$el),t=null),t=new n({el:document.createElement("div"),data:function(){return{visible:!0,imgUrl:e}}}),document.body.appendChild(t.$el)}};t["a"]=u},2281:function(e,t,n){"use strict";var r=n("23a0"),a=n.n(r);a.a},"23a0":function(e,t,n){},3:function(e,t){},"33f8":function(e,t,n){"use strict";n.d(t,"s",function(){return l}),n.d(t,"f",function(){return m}),n.d(t,"n",function(){return h}),n.d(t,"a",function(){return f}),n.d(t,"m",function(){return g}),n.d(t,"g",function(){return b}),n.d(t,"i",function(){return _}),n.d(t,"c",function(){return w}),n.d(t,"d",function(){return y}),n.d(t,"o",function(){return I}),n.d(t,"b",function(){return C}),n.d(t,"q",function(){return L}),n.d(t,"l",function(){return S}),n.d(t,"j",function(){return O}),n.d(t,"h",function(){return N}),n.d(t,"e",function(){return j}),n.d(t,"r",function(){return T}),n.d(t,"p",function(){return A}),n.d(t,"k",function(){return R});n("7f7f"),n("28a5"),n("a481"),n("ac6a"),n("4917"),n("3b2b"),n("9e1f"),n("450d");var r=n("6ed5"),a=n.n(r),s=n("682a"),i=n.n(s),o=n("4c16"),c=n("5a0c"),u=n.n(c),d=18e4,p="dqWt6twz6JyEy3EZ";function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";a.a.confirm(e,t,{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}})}function m(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(t,n){a.a.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t()}).catch(function(){})})}function h(e){var t=new RegExp("[?&]"+e+"=([^&#?]*)(&|#|$)"),n=window.location.href.match(t);return n?n[1]:null}var f={setCookie:function(e,t){var n=7,r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),r.setTime(r.getTime()+6e4),"8080"===window.location.port||/^test-|\.webdev2\./.test(window.location.host)?document.cookie=e+"="+escape(t)+";expires="+r.toGMTString():document.cookie=e+"="+escape(t)+";domain=.mee.chat;path=/;expires="+r.toGMTString()},getCookie:function(e){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=document.cookie.match(t);return n?unescape(n[2]):null},delCookie:function(e){var t=e+"=;domain=.mee.chat;path=/";t+=";expires="+new Date(0).toGMTString(),document.cookie=t;var n=e+"=;path=/";n+=";expires="+new Date(0).toGMTString(),document.cookie=n}};function g(){var e,t=document.documentElement.clientHeight,n=document.documentElement.clientWidth,r=61,a=181;return t<600&&(e=600-r-a),e=t<800||n<1e3?t-r-a:.8*t-r-a,e}function v(e,t){for(var n,r=[],a=0,s="",i=0;i<256;i++)r[i]=i;for(i=0;i<256;i++)a=(a+r[i]+t.charCodeAt(i%t.length))%256,n=r[i],r[i]=r[a],r[a]=n;i=0,a=0;for(var o=0;o<e.length;o++)i=(i+1)%256,a=(a+r[i])%256,n=r[i],r[i]=r[a],r[a]=n,s+=String.fromCharCode(e.charCodeAt(o)^r[(r[i]+r[a])%256]);return s}function b(e){var t;try{t=btoa(v(encodeURIComponent(e),p))}catch(n){return e}return t}function _(e){var t;try{t=decodeURIComponent(v(atob(e),p))}catch(n){return e}return t}var k=new RegExp("(https?|ftp|file)://[-a-zA-Z0-9/-_.?#!+%]+");function w(e){var t=null;e.forEach(function(e){e.timeMsg=null!==t&&parseInt(e.timestamp)-t>d,t=parseInt(e.timestamp),C(e)})}function y(e,t){if(0===t.length)e.timeMsg=!0;else{var n=parseInt(t[t.length-1].timestamp);e.timeMsg=parseInt(e.timestamp)-n>d}}function I(){return/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)}function x(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};return e.replace(/[&<>'"]/g,function(e){return t[e]})}function C(e){0==e.msg_type&&(e.content=x(e.content),e.content.match(k)&&(e.content=e.content.replace(k,function(e){return'<a href="'.concat(e,'" class="link text" target="_blank">').concat(e,"</a>")})),e.content=o["a"].parse(e.content,{callback:function(e,t){return"https://w2.meechat.me/emoji/"+e+".svg"}}))}function L(e,t,n){e.forEach(function(r,a){t.some(function(e){return n(e)==n(r)})&&e.splice(a,1)})}function S(e,t){e.name=e.nick_name,e.content=_(e.msg),e.type=e.from==t?"me":"you",e.avatar=e.cover_photo||"",e.userId=t}function O(e,t){var n=null;return e&&(0==e.msg_type&&e["content"]?n=_(e["content"]):1==e.msg_type?n="[图片]":2==e.msg_type?n="[视频]":3==e.msg_type?n="[音频]":4==e.msg_type&&(n="[红包]"),t&&(n=e.nick_name+": "+n)),n}function N(e,t){e.chatList.forEach(function(e){e.createTime==t&&(e.fail=!0,e.loading=!1)})}function j(e,t){if(!t)return!1;var n=new RegExp("@".concat(t));return n.test(e)}function M(e,t){var n=Math.abs(t-e.scrollTop),r=n>500?1e3:2*n,a=new i.a.Tween(e).to({scrollTop:t},r).easing(i.a.Easing.Quadratic.Out);return a.start()}function T(e,t,n){M(e,t).onComplete(function(){n.classList.toggle("active")}),setTimeout(function(){n.classList.toggle("active")},3e3)}var A={tabTimer:null,askPermission:function(){return new Promise(function(e,t){"Notification"in window?"granted"===Notification.permission?e():"default "===Notification.permission&&Notification.requestPermission(function(n){"granted"===n?e():t(new Error)}):t(new Error("This browser does not support desktop notification"))})},showNotification:function(e){1!=this.getGlobalNotice()&&document.hidden&&this.askPermission().then(function(){var t,n=new Notification(e.name,{body:"你收到了一条消息",icon:"/dist/icons/meechat.png"});if(e.group_id)t="/group/".concat(e.group_id);else{var r=+e.to>+e.from?"".concat(e.from,"-").concat(e.to):"".concat(e.to,"-").concat(e.from);t="/pm/".concat(r)}n.onclick=function(){window.$router.push({path:t}),n.close(),window.focus()},setTimeout(function(){n.close()},3500)})},changeTitle:function(e){if(1!=this.getGlobalNotice()&&document.hidden){var t=e?"MeeChat (你有".concat(e,"新消息)"):"MeeChat";document.title=t,e&&(this.tabTimer&&clearTimeout(this.tabTimer),this.tabTimer=setTimeout(function(){document.title="MeeChat"},1e3))}},getGlobalNotice:function(){var e=JSON.parse(localStorage.getItem("systemConfig")||"{}");return e.mute||0},setGlobalNotice:function(e){var t=JSON.parse(localStorage.getItem("systemConfig")||"{}");t.mute=e,localStorage.setItem("systemConfig",JSON.stringify(t))}};function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return"";var n=u()().subtract(1,"days").format("YYYY-MM-DD"),r=u()(1*e),a=r.format("YYYY-MM-DD");switch(t){case 1:return a<n?r.format("YY/MM/DD"):n==a?"昨天":r.format("HH:mm");case 2:return a<n?r.format("MM月DD日 HH:mm"):n==a?"昨天 ".concat(r.format("HH:mm")):r.format("HH:mm")}}},3488:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-modal-mask pub-scroll-box"},[n("div",{staticClass:"send-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}}),n("i",{staticClass:"el-icon-question",on:{click:function(t){e.helpShow=!0}}}),n("h3",{staticClass:"title"},[e._v("发红包")]),n("p",{staticClass:"redpacket-tips",class:{hidden:!e.tips}},[e._v(e._s(e.tips))]),n("div",{staticClass:"main-box"},[n("div",{staticClass:"input-item"},[n("span",{staticClass:"text"},[n("em",[e._v("拼")]),e._v("总金额\n ")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.money,expression:"money",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:e.money},on:{input:function(t){t.target.composing||(e.money=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),n("span",{staticClass:"unit"},[e._v("\n "+e._s(e.symbol)+"\n "),e.group.eosInfo?n("i",{staticClass:"down-arrow"}):e._e(),e.group.eosInfo?n("div",{staticClass:"code-menu"},[n("div",{staticClass:"code-item",on:{click:function(t){e.isGameToken=!e.isGameToken}}},[e._v("\n "+e._s(e.isGameToken?"EOS":e.group.eosInfo.token)+"\n ")])]):e._e()])])]),n("p",{staticClass:"input-tips"},[e._v("\n 当前为拼手气红包\n ")]),n("div",{staticClass:"input-item pack-num-input"},[n("span",{staticClass:"text"},[e._v("红包个数")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.packetNum,expression:"packetNum",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"请填写个数"},domProps:{value:e.packetNum},on:{input:function(t){t.target.composing||(e.packetNum=e._n(t.target.value))},blur:function(t){e.$forceUpdate()}}}),n("span",{staticClass:"unit"},[e._v("个")])])]),n("p",{staticClass:"group-user-num"},[e._v("\n 本群共"+e._s(e.group.userCounts)+"人\n ")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.word,expression:"word"}],staticClass:"words",attrs:{placeholder:"恭喜发财,大吉大利"},domProps:{value:e.word},on:{input:function(t){t.target.composing||(e.word=t.target.value)}}}),n("div",{staticClass:"sum"},[e._v("\n "+e._s(e.amountSum)+" "),n("span",[e._v(e._s(e.isGameToken?e.group.eosInfo.token:"EOS"))])]),n("button",{staticClass:"send-btn",class:{"is-disable":!e.amountSum||!e.packetNum,loading:e.isLoading},on:{click:e.sendPacket}},[e.isLoading?n("i",{staticClass:"el-icon-loading"}):e._e(),e._v(" 塞钱进红包\n ")])]),n("p",{staticClass:"bot"},[e._v("未领取的红包,将于24小时后发起退款")])]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.helpShow,expression:"helpShow"}],staticClass:"help-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.helpShow=!1}}}),n("h3",{staticClass:"title"},[e._v("帮助")]),n("div",{staticClass:"content"},[n("div",{staticClass:"item"},[e._v("\n 1. 发出的红包均为拼手气红包,抢得的\n 红包金额随机;一次最多发100个红包;\n ")]),n("div",{staticClass:"item"},[e._v("\n 2. 发红包时可选择币种;抢到的红包金额\n 直接转账到对应币种的绑定账户;若未绑\n 定账户,则所得币种余额在绑定账户后即\n 刻转账;\n ")]),n("div",{staticClass:"item"},[e._v("\n 3. MeeChat会从每次发出红包的金额中收\n 取2%的手续费,用于支付上链成本\n ")])])])]):e._e()])},a=[],s=(n("0fb7"),n("450d"),n("f529")),i=n.n(s),o=(n("c5f6"),n("3b2b"),n("a481"),n("7f7f"),n("3835")),c=(n("96cf"),n("1da1")),u=n("be94"),d=n("2f62"),p=n("5fe9"),l=n.n(p),m={transfer:function(e,t,n,r,a){var s="transfer",i={authorization:["".concat(e,"@").concat(a)]};return self!==top?h(s,[e,t,n,r,i]):window.EOS[s](e,t,n,r,i)},getCurrencyBalance:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"EOS",r="getCurrencyBalance";return self!==top?h(r,[e,t,n]):window.EOS.getCurrencyBalance(e,t,n)},doSymbolTransfer:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(t,n,r,a,s,i){var o,c,u,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(o="transfer",c={authorization:["".concat(t,"@").concat(s)]},self===top){e.next=6;break}return e.abrupt("return",h(o,[t,n,r,a,c],i));case 6:return e.prev=6,e.next=9,window.EOS.contract(i);case 9:return u=e.sent,e.next=12,u[o](t,n,r,a,c);case 12:return d=e.sent,e.abrupt("return",Promise.resolve(d));case 16:return e.prev=16,e.t0=e["catch"](6),e.abrupt("return",Promise.reject(e.t0));case 19:case"end":return e.stop()}},e,this,[[6,16]])}));return function(t,n,r,a,s,i){return e.apply(this,arguments)}}()};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return window.postMessager.send({action:"meechat:eosAction",data:{action:e,param:t,contract:n}})}var f=m,g={name:"packetSend",data:function(){return{helpShow:!1,money:1,packetNum:1,word:"恭喜发财,大吉大利",tips:"",isLoading:!1,isGameToken:!1}},computed:Object(u["a"])({},Object(d["d"])(["account","group","curSession"]),{isPrivate:function(){return this.$store.getters.isPrivate},amountSum:function(){return this.money},symbol:function(){return this.isGameToken?this.group.eosInfo.token:"EOS"},minSum:function(){return this.isGameToken?l.a.divide(this.group.eosInfo.min_amount,1e4):.1},maxSum:function(){return this.isGameToken?l.a.divide(this.group.eosInfo.max_amount,1e4):200}}),watch:{money:function(e){e>this.maxSum&&(this.money=this.maxSum,this.showTip("总金额 不能多于 ".concat(this.maxSum," ").concat(this.symbol))),e&&e/this.packetNum<.01&&(this.money=l.a.times(this.packetNum,.01),this.showTip("单个红包最小为 0.01 ".concat(this.symbol)))},packetNum:function(e,t){this.money&&l.a.divide(this.money,e)<.01&&(this.packetNum=t,this.showTip("单个红包最小为 0.01 ".concat(this.symbol))),e>100&&(this.packetNum=100,this.showTip("红包个数最大为 100 个"))}},methods:{showTip:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.tips=e,setTimeout(function(){t.tips=""},n)},sendPacket:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a,s,c,u,d,p,l,m=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!(this.money<this.minSum)){e.next=3;break}return this.showTip("总金额 不能少于 ".concat(this.minSum," ").concat(this.symbol)),e.abrupt("return",!1);case 3:return this.isLoading=!0,t=this.amountSum.toFixed(4)+" ".concat(this.symbol),n="meechatadmin",r={type:"redpack",num:this.packetNum,memo:this.word,sid:this.isPrivate?this.curSession:this.group.groupId},a=this.isGameToken?this.group.eosInfo.token_code:"eosio.token",s=this.symbol,e.next=11,f.getCurrencyBalance(a,this.account.name,s);case 11:if(c=e.sent,u=Object(o["a"])(c,1),d=u[0],!d){e.next=23;break}if(p=this.isGameToken?d.replace(new RegExp("\\s"+s),""):d.replace(/\sEOS/,""),!(this.amountSum>Number(p))){e.next=20;break}return i()({message:"账户余额不足",type:"error"}),this.isLoading=!1,e.abrupt("return");case 20:this.isGameToken?(l=this.group.eosInfo.token_code,f.doSymbolTransfer(this.account.name,"meechatadmin",t,JSON.stringify(r),this.account.authority,l).then(function(e){m.visible=!1}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;i()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1})):f.transfer(this.account.name,n,t,JSON.stringify(r),this.account.authority).then(function(e){m.visible=!1}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;i()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1}),e.next=25;break;case 23:i()({message:"网络太差~ 请重试",type:"error"}),this.isLoading=!1;case 25:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},mounted:function(){}},v=g,b=(n("6632"),n("2877")),_=Object(b["a"])(v,r,a,!1,null,"775553e2",null);_.options.__file="index.vue";var k=_.exports;k.install=function(e,t){var n,r=e.extend(k);e.prototype.$packetSend=function(){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=k},3537:function(e,t,n){"use strict";var r=n("2b0e"),a=r["default"].directive("focus",{inserted:function(e){e.focus()}});t["a"]={focus:a}},"38dd":function(e,t,n){},4:function(e,t){},"411a":function(e,t,n){"use strict";n("ac6a"),n("f751"),n("96cf");var r=n("1da1"),a=n("d4ec"),s=n("bee2"),i=n("9dbb"),o=null,c=function(){function e(){Object(a["a"])(this,e)}return Object(s["a"])(e,null,[{key:"initDb",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(o){e.next=5;break}return e.next=3,u();case 3:o=e.sent,console.log("finish",o);case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"init",value:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(n){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.initDb();case 2:return t.abrupt("return",o.transaction(n,"readwrite").objectStore(n));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}]),e}();function u(){return d.apply(this,arguments)}function d(){return d=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return t=localStorage.getItem("user_id"),n="database_".concat(t),r=3,e.next=5,Object(i["openDb"])(n,r,function(e){switch(console.log("oldVersion:".concat(e.oldVersion,", version:").concat(r)),e.oldVersion){case 0:var t=e.createObjectStore("message",{keyPath:"hash"});t.createIndex("group_id","group_id",{unique:!1}),t.createIndex("msg_num","msg_num",{unique:!1}),t.createIndex("create_time_int","create_time_int",{unique:!1});var n=e.createObjectStore("user",{keyPath:"user_id"});n.createIndex("user_name","user_name",{unique:!0}),n.createIndex("nick_name","nick_name",{unique:!1}),n.createIndex("is_admin","is_admin",{unique:!1}),n.createIndex("is_block","is_block",{unique:!1});case 1:var a=e.createObjectStore("session",{keyPath:"session_id"});a.createIndex("pin_time_int",["pin_time_int","update_time_int"],{unique:!1}),a.createIndex("is_pin","is_pin",{unique:!1}),a.createIndex("update_time_int","update_time_int",{unique:!1});case 2:t=e.transaction.objectStore("message"),t.deleteIndex("group_id"),t.createIndex("session_id",["session_id","create_time_int"],{unique:!1})}});case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},e,this)})),d.apply(this,arguments)}var p=c,l=function(){function e(t){Object(a["a"])(this,e),this.tableName=t}return Object(s["a"])(e,[{key:"getObjTable",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",p.init(this.tableName));case 1:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"replaceObject",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:n=e.sent,n.put(t);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"replaceObjects",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:for(r in n=e.sent,t)n.put(t[r]);case 4:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateObject",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:r=e.sent,e.t0=regeneratorRuntime.keys(n);case 4:if((e.t1=e.t0()).done){e.next=20;break}if(a=e.t1.value,s=null,a!=r.keyPath){e.next=13;break}return e.next=10,r.get(n[a]);case 10:s=e.sent,e.next=16;break;case 13:return e.next=15,r.index(a).get(n[a]);case 15:s=e.sent;case 16:return s&&(s=Object.assign(s,t),r.put(s)),e.abrupt("break",20);case 20:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),e}();t["a"]=l},"43e0":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.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(t){e.visible=!1}}})]),e.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar",on:{click:function(t){e.$editUserAvatar(e.userInfo.cover_photo)}}},[e.userInfo.cover_photo?n("img",{attrs:{src:e.userInfo.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+e.userInfo.user_id%9,attrs:{"data-name":e.userInfo.nick_name.slice(0,2).toUpperCase()}}),n("p",[e._v("更改头像")])]),n("div",{staticClass:"r-info"},[e.isEditName?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newNickName,expression:"newNickName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:e.newNickName},on:{blur:e.handleEditName,input:function(t){t.target.composing||(e.newNickName=t.target.value)}}}):n("span",{staticClass:"name",on:{click:function(t){e.isEditName=!0,e.newNickName=e.userInfo.nick_name}}},[e._v(e._s(e.userInfo.nick_name)+" "),n("i",{staticClass:"el-icon-edit"})]),e.isEditIntroduce?n("input",{directives:[{name:"model",rawName:"v-model",value:e.newUserName,expression:"newUserName"},{name:"focus",rawName:"v-focus"}],staticClass:"edit-name-input",attrs:{type:"text"},domProps:{value:e.newUserName},on:{blur:e.handleEditIntroduce,input:function(t){t.target.composing||(e.newUserName=t.target.value)}}}):n("div",{staticClass:"introduce",on:{click:function(t){e.isEditIntroduce=!0,e.newUserName=e.userInfo.user_name}}},[e._v("@"+e._s(e.userInfo.user_name)+" "),n("i",{staticClass:"el-icon-edit"})])])]),n("div",{staticClass:"account-wrap"},[n("div",{staticClass:"title"},[e._v("已绑定账户")]),e._l(e.userInfo.binds,function(t,r){return n("div",{key:r,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[e._v(e._s(t.type.toUpperCase()))]),"eth"==t.type||"tron"==t.type?n("span",{staticClass:"open-tips"},[e._v("即将开放")]):e._e(),t.account?n("div",{staticClass:"fr"},[n("span",[e._v(e._s(0===t.is_visible?"已隐藏":"已公开"))]),n("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:function(n){e.hanldeChange(t,n)}},model:{value:t.is_visible,callback:function(n){e.$set(t,"is_visible",n)},expression:"item.is_visible"}})],1):e._e()]),t.account?n("p",{staticClass:"key"},[e._v(e._s(t.account))]):n("el-button",{attrs:{disabled:"eth"==t.type||"tron"==t.type},on:{click:function(n){e.bindAccount(t.type)}}},[e._v("绑定")])],1)})],2)]):e._e()])]):e._e()])},a=[],s=n("be94"),i=(n("e960"),n("450d"),n("b35b")),o=n.n(i),c=(n("0fb7"),n("f529")),u=n.n(c),d=(n("7f7f"),n("1951"),n("eedf")),p=n.n(d),l=n("2b0e"),m=n("2f62"),h=n("5975");l["default"].component(p.a.name,p.a),l["default"].component(u.a.name,u.a),l["default"].component(o.a.name,o.a);var f={name:"infoPopup",data:function(){return{isMe:!0,newNickName:"",isEditName:!1,newUserName:"",isEditIntroduce:!1}},computed:Object(s["a"])({},Object(m["d"])({userInfo:function(e){return e.userInfo}})),methods:{hanldeChange:function(e,t){var n=e.type;h["a"].user.setVisible({type:n,is_visible:t}).then(function(e){e.data})},bindAccount:function(e){},handleEditName:function(){var e=this;this.newNickName!==this.userInfo.nick_name?this.newNickName.length>36?this.$showTips("用户呢称过长,请输入36个字符以内"):(this.isEditName=!1,this.newNickName.length&&h["a"].user.changeNickName({nick_name:this.newNickName}).then(function(t){t.data;e.$store.commit("setUserNickName",e.newNickName),e.$store.commit("updateMemberNickName",{userId:e.$store.state.userId,nickName:e.newNickName}),e.$showTips("修改成功")})):this.isEditName=!1},handleEditIntroduce:function(){var e=this;this.newUserName!==this.userInfo.user_name?/^[a-zA-Z_0-9]{5,36}$/i.test(this.newUserName)?(this.isEditIntroduce=!1,this.newUserName.length&&h["a"].user.changeUserName({user_name:this.newUserName}).then(function(t){t.data;e.$store.commit("setUserUserName",e.newUserName),e.$store.commit("updateMemberNickName",{userId:e.$store.state.userId,userName:e.newUserName}),e.$showTips("修改成功")})):this.$showTips("只能是5-20位的数字,字母下,划线"):this.isEditIntroduce=!1}}},g=f,v=(n("cf63"),n("2877")),b=Object(v["a"])(g,r,a,!1,null,null,null);b.options.__file="index.vue";var _=b.exports;_.install=function(e,t){var n,r=e.extend(_);e.prototype.$showUserInfo=function(){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=_},"4bc7":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal invite-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),n("div",{staticClass:"modal-bd clearfix"},[n("div",{staticClass:"left"},[n("div",{staticClass:"search-input"},[n("input",{attrs:{type:"text",placeholder:"搜索联系人"},on:{input:function(t){e.searchUser(t,e.checkList)}}}),n("i",{staticClass:"el-icon-search"})]),n("div",{staticClass:"user-list select-list pub-scroll-box"},[e.isSearchGroup?[e.searchGroupList.length>0?e._l(e.searchGroupList,function(t,r){return n("div",{key:r,staticClass:"user-item",class:{checked:t.isChecked},on:{click:function(n){e.changeState(t.user_id)}}},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),t.isChoosed?n("i",{staticClass:"el-icon-circle-check"}):e._e(),2!=t.is_admin?n("div",[t.isChecked?n("i",{staticClass:"el-icon-circle-check"}):n("i",{staticClass:"el-icon-circle-uncheck"})]):e._e()])}):n("div",{staticClass:"no-data"},[e._v("暂无联系人")])]:[e.checkList.length>0?e._l(e.checkList,function(t,r){return n("div",{key:r,staticClass:"user-item",class:{checked:t.isChecked},on:{click:function(n){e.changeState(t.user_id)}}},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),t.isChoosed?n("i",{staticClass:"el-icon-circle-check is-choosed"}):2!=t.is_admin?n("div",[t.isChecked?n("i",{staticClass:"el-icon-circle-check"}):n("i",{staticClass:"el-icon-circle-uncheck"})]):e._e()])}):n("div",{staticClass:"no-data"},[e._v("暂无联系人")])]],2)]),n("div",{staticClass:"right"},[5==this.popInviteType?n("p",{staticClass:"tips"},[e._v("转让群主")]):this.checkedNum?n("p",{staticClass:"tips"},[e._v("已选择了"+e._s(e.checkedNum)+"位群成员")]):3==this.popInviteType?n("p",{staticClass:"tips"},[e._v("请勾选需要删除的群成员")]):n("p",{staticClass:"tips"},[e._v("请勾选需要添加的"+e._s(4==this.popInviteType?"管理员":"联系人"))]),1==this.popInviteType?n("div",{staticClass:"group-name"},[n("input",{directives:[{name:"focus",rawName:"v-focus"},{name:"model",rawName:"v-model",value:e.groupName,expression:"groupName"}],attrs:{type:"text",placeholder:"请输入群名称"},domProps:{value:e.groupName},on:{input:function(t){t.target.composing||(e.groupName=t.target.value)}}})]):e._e(),n("div",{staticClass:"user-list pub-scroll-box"},[e._l(e.resultList,function(t,r){return[t.isChecked?n("div",{key:r,staticClass:"user-item"},[t.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.user_id%9,attrs:{"data-name":t.nick_name.slice(0,2).toUpperCase()}}),n("span",{staticClass:"name"},[e._v(e._s(t.nick_name))]),n("i",{staticClass:"el-icon-circle-close",on:{click:function(n){e.changeState(t.user_id,!1)}}})]):e._e()]})],2),n("div",{staticClass:"send-btn"},[n("el-button",{attrs:{type:"primary",disabled:e.checkedNum<=0},on:{click:e.optSubmit}},[e._v("确认")]),n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")])],1)])])])]):e._e()])},a=[],s=(n("9e1f"),n("450d"),n("6ed5")),i=n.n(s),o=(n("0fb7"),n("f529")),c=n.n(o),u=(n("96cf"),n("1da1")),d=(n("ac6a"),n("2909")),p=n("be94"),l=(n("7f7f"),n("1951"),n("eedf")),m=n.n(l),h=n("2b0e"),f=n("2f62"),g=n("5975"),v=n("2ef0"),b=n.n(v),_=n("8869");h["default"].component(m.a.name,m.a);var k={name:"invitePopup",mixins:[_["d"]],data:function(){return{curItemIndex:0,checkList:[],groupName:""}},computed:Object(p["a"])({checkedNum:function(){return this.resultList.length}},Object(f["d"])({userId:function(e){return e.userId},popInviteType:function(e){return e.chat.popInviteType},friendList:function(e){return e.chat.friendList},groupId:function(e){return e.group.groupId},members:function(e){return e.group.members},membersNum:function(e){return e.group.membersNum},adminList:function(e){return e.group.adminList}}),{inviteList:function(){return this.checkList.filter(function(e){return e.isChecked}).map(function(e){return e.user_id}).join(",")},resultList:function(){for(var e=this.checkList&&this.checkList.filter(function(e){return e.isChecked})||[],t=this.searchGroupList&&this.searchGroupList.filter(function(e){return e.isChecked})||[],n=Object(d["a"])(e).concat(Object(d["a"])(t)),r=[],a=0;a<n.length;a++){for(var s=!0,i=0;i<r.length;i++)n[a].user_id===r[i].user_id&&(s=!1);s&&r.push(n[a])}return r}},Object(f["b"])(["getGroupInfo"])),methods:{getItemByUid:function(e){var t=this;return this.isSearchGroup?this.searchGroupList.filter(function(n,r){return n.user_id==e&&(t.curItemIndex=r),n.user_id==e})[0]:this.checkList.filter(function(n,r){return n.user_id==e&&(t.curItemIndex=r),n.user_id==e})[0]},changeState:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getItemByUid(e);n.isChoosed||(4==this.popInviteType&&t&&this.adminList.length+this.checkedNum>5?this.$showTips("管理员最多只能设置5个人哦"):(5==this.popInviteType&&this.checkList.forEach(function(e){e.isChecked=!1}),n["isChecked"]=t,this.isSearchGroup?this.$set(this.searchGroupList,this.curItemIndex,n):this.$set(this.checkList,this.curItemIndex,n)))},initList:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:e.t0=this.popInviteType,e.next=1===e.t0?3:2===e.t0?7:3===e.t0?11:4===e.t0?11:5===e.t0?11:13;break;case 3:return e.next=5,this.$store.dispatch("getFriendList");case 5:return this.checkList=this.friendList,e.abrupt("break",13);case 7:return e.next=9,this.$store.dispatch("getFriendList");case 9:return this.checkList=b.a.filter(this.friendList,function(e){return!t.members[e.user_id]}),e.abrupt("break",13);case 11:return this.checkList=this.members,e.abrupt("break",13);case 13:this.checkList=b.a.filter(this.checkList,function(e){return e.isChecked=!1,e.isChoosed=!1,4==t.popInviteType&&1==e.is_admin&&(e.isChoosed=!0),e.user_id!=t.userId});case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),optSubmit:function(){switch(this.popInviteType){case 1:this.createGroup();break;case 2:this.invitesMember();break;case 3:this.removesMember();break;case 4:this.addAdmin();break;case 5:this.changeCreator();break}},createGroup:function(){var e=this;this.groupName?g["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(t){var n=t.data;e.$showTips("创建成功"),e.$store.commit("addSessionItem",n.data),e.visible=!1}):c()({message:"请输入群名",type:"warning"})},invitesMember:function(){var e=this;g["a"].group.invites({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},removesMember:function(){var e=this;g["a"].group.removes({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},addAdmin:function(){var e=this;g["a"].group.addAdmin({user_ids:this.inviteList,group_id:this.groupId}).then(function(t){t.data;e.visible=!1,e.$store.dispatch("getGroupInfo")})},changeCreator:function(){var e=this;if(!(this.checkedNum<=0)){var t=this.isSearchGroup?this.searchGroupList[this.curItemIndex]:this.checkList[this.curItemIndex],n=t.nick_name||t.user_name;i.a.confirm("确定要把群主转让给".concat(n)).then(function(){g["a"].group.changeCreator({new_creator:e.inviteList,group_id:e.groupId}).then(function(t){t.data;e.visible=!1,c()({message:"已转让群主给".concat(n),type:"warning"})})}).catch(function(e){console.log(e)})}}},created:function(){this.initList()},directives:{focus:{inserted:function(e){setTimeout(function(){e.focus()},200)}}}},w=k,y=(n("f9ab"),n("2877")),I=Object(y["a"])(w,r,a,!1,null,"5ec18638",null);I.options.__file="index.vue";var x=I.exports;x.install=function(e,t){var n,r=e.extend(x);e.prototype.$showInvite=function(e){n&&(document.body.removeChild(n.$el),n=null),t.commit("setPopInviteType",e),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=x},5975:function(e,t,n){"use strict";n("f751"),n("9e1f"),n("450d");var r=n("6ed5"),a=n.n(r),s=(n("96cf"),n("1da1")),i=n("bc3a"),o=n.n(i),c=n("4328"),u=n.n(c),d=n("1c04"),p="";"8080"===window.location.port&&(p="//test.mee.chat/");var l=o.a.create({baseURL:p,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return e=u.a.stringify(e),e}],transformResponse:[],withCredentials:!0});function m(e){return h.apply(this,arguments)}function h(){return h=Object(s["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,n={user_id:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||""},"post"===t.method?t.data?t.data=Object.assign(n,t.data):t.data=n:"get"===t.method&&(t.params?t.params=Object.assign(n,t.params):t.params=n),e.abrupt("return",t);case 6:return e.prev=6,e.t0=e["catch"](0),e.abrupt("return",t);case 9:case"end":return e.stop()}},e,this,[[0,6]])})),h.apply(this,arguments)}l.host=p,l.interceptors.request.use(function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!t.needLogin){e.next=15;break}if(localStorage.getItem("user_id")&&localStorage.getItem("token")){e.next=12;break}return e.prev=2,e.next=5,d["a"].dispatch("doGameLogin");case 5:return e.abrupt("return",m(t));case 8:e.prev=8,e.t0=e["catch"](2);case 10:e.next=13;break;case 12:return e.abrupt("return",m(t));case 13:e.next=16;break;case 15:return e.abrupt("return",m(t));case 16:case"end":return e.stop()}},e,this,[[2,8]])}));return function(t){return e.apply(this,arguments)}}(),function(e){return Promise.reject(e)}),l.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?Promise.resolve(e):-5!==e.data.code?(a.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),Promise.reject(new Error(e.data.msg))):void d["a"].dispatch("resetGameLogin")},function(e){return Promise.reject(e)}),l.request2=function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=null,!t.cache){e.next=5;break}return e.abrupt("return",new Promise(function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(r,a){var s,i,o,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return s=null,e.next=3,m(t);case 3:return t=e.sent,"post"===t.method?s=t.data:"get"===t.method&&(s=t.params),i=t.method+":"+t.url+"?"+JSON.stringify(s),o=localStorage.getItem(i),o&&(n=JSON.parse(o),t.callback(n)),e.next=10,l.request(t);case 10:n=e.sent,delete n["config"],delete n["request"],c=JSON.stringify(n),o!=c&&(n.data.result&&localStorage.setItem(i,c),t.callback(n));case 15:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()));case 5:return e.next=7,l.request(t);case 7:n=e.sent,t.callback(n);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}();var f=l,g={groupAuth:function(e){return f.request({url:"default/groupAuth",method:"post",needLogin:!0,data:e})},feedback:function(){return f.request({url:"default/tick ",method:"post",needLogin:!0})}},v={getRandom:function(e){return f.get("user/random",{params:e})},getRandom2:function(e){return f.get("user/random2",{params:e})},eosLogin:function(e){return f.post("user/eosLogin",e)},eosLogin2:function(e){return f.post("user/eosLogin2",e)},eosBind:function(e){return f.request({url:"user/eosBind",method:"post",needLogin:!0,data:e})},ethLogin:function(e){return f.post("user/ethLogin",e)},ethBind:function(e){return f.request({url:"user/ethBind",method:"post",needLogin:!0,data:e})},unBind:function(e){return f.request({url:"user/unbind",method:"post",needLogin:!0,data:e})},changeUserName:function(e){return f.request({url:"user/changeUserName",method:"post",needLogin:!0,data:e})},changeNickName:function(e){return f.request({url:"user/changeNickName",method:"post",needLogin:!0,data:e})},changePhoto:function(e){return f.request({url:"user/changePhoto",method:"post",needLogin:!0,data:e})},setVisible:function(e){return f.request({url:"user/setVisible",method:"post",needLogin:!0,data:e})},getInfo:function(e){return f.request({url:"user/info",method:"get",needLogin:!0,params:e})},getOtherInfo:function(e){return f.request({url:"user/info",method:"get",needLogin:!1,params:e})}},b=(n("ac6a"),n("33f8")),_=n("8d4d"),k={getNewMsg:function(){var e=Object(s["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,f.request({url:"group/newMsg",method:"get",needLogin:!1,params:t});case 2:return n=e.sent,r=new _["a"],e.next=6,r.saveMsg(t["group_id"],n.data.data);case 6:return n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(b["i"])(e.msg)):e.msg=Object(b["i"])(e.msg)}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),getHistoryMsg:function(e){return f.request({url:"group/historyMsg",method:"get",needLogin:!1,params:e})},getGroupInfo:function(e){return f.request({url:"group/info",method:"get",needLogin:!1,params:e})},getGroupInfo2:function(e,t){return f.request2({url:"group/info",method:"get",needLogin:!1,cache:!0,params:e,callback:t})},sendMsg:function(e){return e.msg=Object(b["g"])(e.msg),f.request({url:"group/sendMsg",method:"post",needLogin:!0,data:e})},createGroup:function(e){return f.request({url:"group/create",method:"post",needLogin:!0,data:e})},joinGroup:function(e){return f.request({url:"group/join",method:"get",needLogin:!0,params:e})},leaveGroup:function(e){return f.request({url:"group/leave",method:"get",needLogin:!0,params:e})},blockUser:function(e){return f.request({url:"group/blockUser",method:"get",needLogin:!0,params:e})},unblockUser:function(e){return f.request({url:"group/unblockUser",method:"get",needLogin:!0,params:e})},changeName:function(e){return f.request({url:"group/changeName",method:"post",needLogin:!0,data:e})},changeNotice:function(e){return f.request({url:"group/changeNotice",method:"post",needLogin:!0,data:e})},changeCover:function(e){return f.request({url:"group/changeCover",method:"post",needLogin:!0,data:e})},changeTitle:function(e){return f.request({url:"group/changeTitle",method:"post",needLogin:!0,data:e})},invites:function(e){return f.request({url:"group/invites",method:"post",needLogin:!0,data:e})},removes:function(e){return f.request({url:"group/removes",method:"post",needLogin:!0,data:e})},repealGroupMsg:function(e){return f.request({url:"group/repealMsg",method:"post",needLogin:!0,data:e})},sendImageMsg:function(e){return f.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:e})},getFriends:function(e){return f.request({url:"group/getFriends",method:"get",needLogin:!0,params:e})},pinMsg:function(e){return f.request({url:"group/pinMsg",method:"post",needLogin:!0,data:e})},unpinMsg:function(e){return f.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:e})},addAdmin:function(e){return f.request({url:"group/addAdmin",method:"post",needLogin:!0,data:e})},removeAdmin:function(e){return f.request({url:"group/removeAdmin",method:"post",needLogin:!0,data:e})},searchMember:function(e){return f.request({url:"group/memberSearch",method:"post",needLogin:!0,data:e})},changeCreator:function(e){return f.request({url:"group/changeCreator",method:"post",needLogin:!0,data:e})}},w={getNewMsg:function(e){return f.request({url:"person/newMsg",method:"get",needLogin:!0,params:e}).then(function(t){var n=new _["a"];return n.saveMsg(e["session_id"],t.data.data),t.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(b["i"])(e.msg)):e.msg=Object(b["i"])(e.msg)}),Promise.resolve(t)})},getHistoryMsg:function(e){return f.request({url:"person/historyMsg",method:"get",needLogin:!0,params:e})},sendMsg:function(e){return e.msg=Object(b["g"])(e.msg),f.request({url:"person/sendMsg",method:"post",needLogin:!0,data:e})},repealPersonMsg:function(e){return f.request({url:"person/repealMsg",method:"post",needLogin:!0,data:e})}},y={sessionList:function(e){return f.request2({url:"session/list",method:"get",needLogin:!0,callback:e})},setRead:function(e){return f.request({url:"session/setRead",method:"post",needLogin:!0,data:e})},setMute:function(e){return f.request({url:"session/mute",method:"post",needLogin:!0,data:e})},cancelMute:function(e){return f.request({url:"session/unMute",method:"post",needLogin:!0,data:e})},setPin:function(e){return f.request({url:"session/pin",method:"post",needLogin:!0,data:e})},cancelPin:function(e){return f.request({url:"session/unPin",method:"post",needLogin:!0,data:e})},deleteSession:function(e){return f.request({url:"session/delete",method:"post",needLogin:!0,data:e})},fileUpload:function(e){return f.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:e})}},I={grabPacket:function(e){return f.request({url:"redpack/grab",method:"get",needLogin:!0,params:e})},grabDetail:function(e){return f.request({url:"redpack/detail",method:"get",needLogin:!0,params:e})},sendList:function(e){return f.request({url:"redpack/sendList",method:"get",needLogin:!0,params:e})},receiveList:function(e){return f.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:e})}};t["a"]={host:f.host,base:g,user:v,group:k,person:w,session:y,redpack:I}},"5a09":function(e,t,n){"use strict";n("cadf"),n("551c"),n("097d");var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.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(t){e.visible=!1}}})]),e.userInfo?n("div",{staticClass:"modal-bd"},[n("div",{staticClass:"user-top"},[n("div",{staticClass:"user-avatar"},[e.userInfo.cover_photo?n("img",{attrs:{src:e.userInfo.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+e.userInfo.user_id%9,attrs:{"data-name":e.userInfo.nick_name.slice(0,2).toUpperCase()}})]),n("div",{staticClass:"r-info"},[n("span",{staticClass:"name"},[e._v(e._s(e.userInfo.nick_name))]),n("div",{staticClass:"introduce"},[e._v("@"+e._s(e.userInfo.user_id))])])]),n("div",{staticClass:"account-wrap min-height-account"},[n("div",{staticClass:"title"},[e._v("已绑定账户")]),e.accountList?e._l(e.accountList,function(t,r){return n("div",{key:r,staticClass:"account-item"},[n("div",{staticClass:"type"},[n("strong",[e._v(e._s(t.type.toUpperCase()))])]),t.account&&t.is_visible?n("p",{staticClass:"key"},[e._v(e._s(t.account))]):n("p",[e._v("未绑定或已隐藏")])])}):e._e()],2),e.$store.state.userId!=e.userId?n("button",{staticClass:"send-msg-btn",on:{click:e.sendMsg}},[e._v("发消息")]):e._e()]):e._e()])]):e._e()])},a=[],s=(n("c5f6"),n("be94")),i=(n("e960"),n("450d"),n("b35b")),o=n.n(i),c=(n("0fb7"),n("f529")),u=n.n(c),d=(n("7f7f"),n("1951"),n("eedf")),p=n.n(d),l=n("2b0e"),m=n("2f62"),h=n("5975");l["default"].component(p.a.name,p.a),l["default"].component(u.a.name,u.a),l["default"].component(o.a.name,o.a);var f={name:"infoPopup",data:function(){return{accountList:null,userInfo:null}},computed:Object(s["a"])({},Object(m["d"])({members:function(e){return e.group.members},groupId:function(e){return e.group.groupId},sessionList:function(e){return e.chat.sessionList},meId:function(e){return e.userId},meInfo:function(e){return e.userInfo}})),methods:{sendMsg:function(){var e=this.userInfo.user_id,t=Number(e)<Number(this.meId)?"".concat(e,"-").concat(this.meId):"".concat(this.meId,"-").concat(e),n=this.sessionList.some(function(e){return e.session_id==t});if(!n){var r={cover_photo:this.userInfo.cover_photo,is_group:"0",name:this.userInfo.nick_name,session_id:t};this.$store.commit("addSessionItem",r)}var a=this.meInfo.user_id,s={};s[a]={cover_photo:this.meInfo.cover_photo,nick_name:this.meInfo.nick_name},s[this.userInfo.user_id]={cover_photo:this.userInfo.cover_photo,nick_name:this.userInfo.nick_name},this.$store.commit("updateGroup",{key:"members",data:s}),this.$store.commit("updateGroup",{key:"privateName",data:this.userInfo.nick_name}),this.$router.push({path:"/pm/".concat(t)}),this.visible=!1}},created:function(){var e=this;h["a"].user.getOtherInfo({target_id:this.userId,group_id:this.groupId||null}).then(function(t){var n=t.data;e.accountList=n.data.binds,e.userInfo=n.data,e.visible=!0})}},g=f,v=(n("16c9"),n("2877")),b=Object(v["a"])(g,r,a,!1,null,null,null);b.options.__file="index.vue";var _=b.exports;_.install=function(e,t,n){var r,a=e.extend(_);e.prototype.$showOtherInfo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;r&&(document.body.removeChild(r.$el),r=null),r=new a({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},data:function(){return{visible:!1,userId:e}}}),document.body.appendChild(r.$el)}};t["a"]=_},"5f89":function(e,t,n){"use strict";var r=n("0627"),a=n.n(r);a.a},6032:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask"}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("div",{staticClass:"title"},[e._v("\n "+e._s(e.isMe?"编辑头像":"编辑群头像")+"\n ")]),n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("el-upload",{staticClass:"avatar-uploader",attrs:{accept:"image/*",action:e.uploadUrl,"show-file-list":!1,data:e.uploadData,"on-success":e.handleAvatarSuccess,name:"cover_photo","before-upload":e.beforeAvatarUpload}},[e.imageUrl?n("img",{staticClass:"avatar",attrs:{src:e.imageUrl}}):n("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),n("div",{staticClass:"modal-fd"},[n("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")])],1)])]):e._e()])},a=[],s=(n("f751"),n("0fb7"),n("450d"),n("f529")),i=n.n(s),o=(n("f225"),n("89a9")),c=n.n(o),u=(n("7f7f"),n("1951"),n("eedf")),d=n.n(u),p=n("2b0e");p["default"].component(d.a.name,d.a),p["default"].component(c.a.name,c.a),p["default"].component(i.a.name,i.a);var l={name:"avatarPopup",data:function(){return{}},computed:{uploadUrl:function(){var e="";return"8080"===window.location.port&&(e="//test.mee.chat/"),this.isMe?"".concat(e,"user/changePhoto"):"".concat(e,"group/changeCover")},uploadData:function(){var e={user_id:this.$store.state.userId,token:this.$store.state.token};return this.isMe?e:Object.assign(e,{group_id:this.$store.state.curSession})}},methods:{handleAvatarSuccess:function(e,t){this.imageUrl=URL.createObjectURL(t.raw),this.$showTips("上传成功"),this.isMe?(this.$store.commit("updateUserPhoto",this.imageUrl),this.$store.commit("updateMemberAvatar",{userId:this.$store.state.userId,imageUrl:this.imageUrl})):(this.$store.dispatch("updateSessionItem",{sessionId:this.$store.state.curSession,data:{cover_photo:this.imageUrl}}),this.$store.commit("updateGroup",{key:"coverPhoto",data:this.imageUrl}))},beforeAvatarUpload:function(e){var t=e.type.indexOf("image")>-1,n=e.size/1024/1024<2;return t&&n||this.$showTips("请上传2M以内的图片"),t&&n}},created:function(){}},m=l,h=(n("b83c"),n("2877")),f=Object(h["a"])(m,r,a,!1,null,null,null);f.options.__file="index.vue";var g=f.exports;g.install=function(e,t){var n,r=e.extend(g);e.prototype.$editUserAvatar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0,imageUrl:e,isMe:!0}}}),document.body.appendChild(n.$el)},e.prototype.$editGroupAvatar=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!0,imageUrl:e,isMe:!1}}}),document.body.appendChild(n.$el)}};t["a"]=g},6632:function(e,t,n){"use strict";var r=n("38dd"),a=n.n(r);a.a},"76a4":function(e,t,n){"use strict";var r=n("53ca"),a=!1;function s(e){if(e)return i(e)}function i(e){for(var t in s.prototype)e[t]=s.prototype[t];return e}function o(e,t){if(!(this instanceof o))return new o(e,t);e&&"object"===Object(r["a"])(e)&&(t=e,e=void 0),s(this),t=t||{},t.path=t.path||"/",this.opts=t,this.url=e,this.lastPing=null,this.socketCache=[],this.socketMaxCache=5,this.readyState="closed",this.binaryType=t.binaryType||"blob",this._reconnectTimes=0,this._reconnectionDelay=t.reconnectionDelay||1e3,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.timeout(null===t.timeout?2e4:t.timeout),this.logStyle="color:blue; font-size:16px;font-weight:bold;",this.keepAliveInterval=15e3,this.keepAliveTimeout=null,this.keepAliveContent=t.keepAliveContent||1,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.connect()}s.prototype.on=s.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},s.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},s.prototype.off=s.prototype.removeListener=s.prototype.removeAllListeners=s.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0===arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1===arguments.length)return delete this._callbacks["$"+e],this;for(var a=0;a<r.length;a++)if(n=r[a],n===t||n.fn===t){r.splice(a,1);break}return this},s.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var r=0,a=n.length;r<a;++r)n[r].apply(this,t)}return this},s.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},s.prototype.hasListeners=function(e){return!!this.listeners(e).length},o.prototype.connect=function(e){if(~this.readyState.indexOf("open"))return this;this.readyState="opening";var t=a?this.openWxConnect():this.openH5Connect();this.socketCache.push(t),this.socket=t},o.prototype.reconnect=function(){var e=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(){e.socket=a?e.openWxConnect():e.openH5Connect()},this._reconnectionDelay)):(this.socket&&this.socket.close(),this._reconnectTimes=1,this.readyState="reconnecting",setTimeout(function(){e.socket=a?e.openWxConnect():e.openH5Connect()},3e4)))},o.prototype.destroy=function(){this._reconnection=!1,this.socket.close()},o.prototype.keepAlive=function(){var e=this;this.keepAliveTimeout=setInterval(function(){"open"===e.readyState?e.send(e.keepAliveContent):"closed"===e.readyState&&e.reconnect()},this.keepAliveInterval)},o.prototype.openWxConnect=function(){var e=this,t={},n=wx.connectSocket({url:this.url,header:t,success:function(e){}});return n.onOpen(function(t){e.readyState="open",e.emit("open",t),e._reconnectTimes=1,e.keepAlive()}),n.onClose(function(t){clearInterval(e.keepAliveTimeout),e.readyState="closed",e._reconnection&&e.reconnect(),e.emit("close",t)}),n.onMessage(function(t){1!==t.data&&e.emit("message",t.data)}),n.onError(function(t){clearInterval(e.keepAliveTimeout),e._reconnection?"reconnecting"!==e.readyState&&(e.readyState="error",e.reconnect()):n.close(),e.emit("error",t.errMsg)}),n},o.prototype.openH5Connect=function(){var e=this,t=new WebSocket(this.url);return t.onopen=function(t){e.readyState="open",e.emit("open",t),e._reconnectTimes=1,e.keepAlive()},t.onclose=function(t){clearInterval(e.keepAliveTimeout),e.readyState="closed";var n=t.reason;console.log("%c [Socket连接被关闭: ".concat(n,"]"),e.logStyle),e._reconnection&&e.reconnect(),e.emit("close",t)},t.onmessage=function(t){1!==t.data&&e.emit("message",t.data)},t.onerror=function(n){clearInterval(e.keepAliveTimeout),e._reconnection?"reconnecting"!==e.readyState&&(e.readyState="error",e.reconnect()):t.close(),e.emit(n)},t},o.prototype.send=function(e){if(a){var t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);this.socket.send({data:t,success:function(e){},fail:function(e){},complete:function(e){}})}else this.socket.binaryType=this.binaryType,this.socket.send(e)},o.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},o.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},o.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},t["a"]=o},8869:function(e,t,n){"use strict";n.d(t,"e",function(){return s}),n.d(t,"d",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return u});n("4917");var r=n("53ca"),a=(n("3b2b"),n("7f7f"),n("5975")),s={data:function(){return{isSearch:!1,searchList:null}},methods:{searchUser:function(e,t){var n=e.target.value;n?(this.searchList=t.filter(function(e){var t,r;return t=e.name?!!e.name&&e.name.indexOf(n)>-1:!!e.user_name&&e.user_name.indexOf(n)>-1,r=!!e.nick_name&&e.nick_name.indexOf(n)>-1,t||r}),this.isSearch=!0):this.isSearch=!1}}},i={data:function(){return{isSearchGroup:!1,searchGroupList:[]}},methods:{searchUser:function(e,t){var n=this,r=e.target.value,s=this.popInviteType;r?(t.length>=this.membersNum||1==s||2==s?this.searchGroupList=t.filter(function(e){var t,n;return t=!!e.user_name&&e.user_name.indexOf(r)>-1,n=!!e.nick_name&&e.nick_name.indexOf(r)>-1,t||n}):a["a"].group.searchMember({group_id:this.group.groupId,keyword:this.searchTxt}).then(function(e){var t=e.data;n.searchGroupList=t.data}),this.isSearchGroup=!0):this.isSearchGroup=!1}}},o={data:function(){return{atInd:0}},methods:{atPerson:function(e){var t=this.$refs.chatInput,n=t.selectionStart,r=n-this.keyAfterAt.length;this.inputMsg=this.inputMsg.slice(0,r)+"".concat(e," ")+this.inputMsg.slice(n),this.atInd=0,t.focus(),this.$nextTick(function(){t.setSelectionRange(r+e.length+1,r+e.length+1)}),this.$store.commit("updateIsNewAt",{isNewAt:this.group.isNewAt,isNewAtFound:!0}),this.$store.commit("updateGroupSearchList",[])},handleUp:function(){this.atInd>0&&this.atInd--},handleDown:function(){var e=this.filterMembers.length;this.atInd<e-1?this.atInd++:this.atInd=0}}},c={data:function(){return{selectionAfterAt:!1,keyAfterAt:"",lastKeyAfterAt:""}},mounted:function(){document.addEventListener("click",this.handleGlobalClick)},computed:{filterMembers:function(){if(!this.group.groupId)return[];var e=this.group.membersArray,t=[];if(""!==this.keyAfterAt)t=this.group.searchList;else for(var n=0;n<e.length;n++)e[n].user_id!=this.userId&&t.push(e[n]);return t.slice(0,100)},atShow:function(){return this.atInd=0,this.selectionAfterAt&&this.filterMembers.length}},watch:{keyAfterAt:function(e){var t=this;if(this.group.groupId&&""!=e&&!this.group.isNewAtFound)if(this.group.membersArray.length<this.group.membersNum)a["a"].group.searchMember({group_id:this.group.groupId,keyword:e}).then(function(e){var n=e.data;t.$store.commit("updateGroupSearchList",n.data)});else{var n=this.group.membersArray.filter(function(t){var n,r;return n=!!t.user_name&&t.user_name.indexOf(e)>-1,r=!!t.nick_name&&t.nick_name.indexOf(e)>-1,n||r});this.$store.commit("updateGroupSearchList",n)}},inputMsg:function(e,t){this.fixIOS(),this.handleSelectionChange()}},methods:{getStrBeforeSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(0,t);return n},getStrAfterSelection:function(){var e=this.$refs.chatInput;if(!e)return"";var t=e.selectionStart,n=this.inputMsg.slice(t);return n},handleLeft:function(e){var t=this.$refs.chatInput,n=t.selectionStart;if(0!==n){var r=this.getStrBeforeSelection(),a=this.group.members;for(var s in a){var i=a[s].user_name,o=new RegExp("@".concat(i," $"));if(o.test(r))return e.preventDefault(),void t.setSelectionRange(n-i.length-2,n-i.length-2)}}},handleRight:function(e){var t=this.$refs.chatInput,n=t.selectionStart,r=this.getStrAfterSelection(),a=this.group.members;for(var s in a){var i=a[s].user_name,o=new RegExp("^@".concat(i," "));if(o.test(r))return e.preventDefault(),void t.setSelectionRange(n+i.length+2,n+i.length+2)}},handleDel:function(e){var t=this,n=this.$refs.chatInput,a=n.selectionStart;if(0!==a){var s=this.getStrBeforeSelection(),i=this.group.members,o=function(r){var o=i[r].user_name,c=new RegExp("@".concat(o," $"));if(c.test(s))return e.preventDefault(),t.inputMsg=t.inputMsg.slice(0,a-o.length-2)+t.inputMsg.slice(a),t.$nextTick(function(){n.setSelectionRange(a-o.length-2,a-o.length-2)}),{v:void 0}};for(var c in i){var u=o(c);if("object"===Object(r["a"])(u))return u.v}}},handleKeyDown:function(e){if(!this.atShow)return e.altKey||e.ctrlKey?this.inputMsg=this.inputMsg+"\n":(e.returnValue=!1,this.handleSend(e)),!1;e.preventDefault();var t=this.filterMembers[this.atInd];this.atPerson(t.user_name)},handleFocus:function(){this.fixIOS(),document.addEventListener("selectionchange",this.handleSelectionChange)},handleBlur:function(){this.fixIOS(!1),document.removeEventListener("selectionchange",this.handleSelectionChange),this.updateChatInputFocus(!1)},handleEsc:function(){this.selectionAfterAt=!1},handleGlobalClick:function(){this.selectionAfterAt=!1},handleSelectionChange:function(){var e=this.$refs.chatInput;if(e){var t=e.selectionStart,n=this.$refs.chatInput.selectionEnd;if(t===n){var r=this.getStrBeforeSelection();if(this.selectionAfterAt=/@/.test(r),this.selectionAfterAt){this.keyAfterAt=r.slice(r.lastIndexOf("@")+1);var a=this.keyAfterAt.indexOf(this.lastKeyAfterAt)<0;this.$store.commit("updateIsNewAt",{isNewAt:a,isNewAtFound:!a&&this.group.isNewAtFound}),a&&this.$store.commit("updateGroupSearchList",[]),this.lastKeyAfterAt=this.keyAfterAt}}}},fixIOS:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=navigator.userAgent,n=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);if(n){var r=this.$refs.scrollWrap;if(!r)return;r.style.overflowY=e?"hidden":"scroll"}}}},u={methods:{addPanelSession:function(e,t){var n=this,r=this.sessionList.some(function(e){return e.session_id==t});r||a["a"].user.getOtherInfo({target_id:e}).then(function(e){var r=e.data,a=r.data,s={cover_photo:a.cover_photo,is_group:"0",name:a.nick_name,session_id:t,unread:0};n.$store.commit("addSessionItem",s)})}}}},"8ad8":function(e,t,n){"use strict";var r=n("00f6"),a=n.n(r);a.a},"8d4d":function(e,t,n){"use strict";n("ac6a"),n("f751"),n("96cf");var r=n("1da1"),a=n("d4ec"),s=n("bee2"),i=n("99de"),o=n("7e84"),c=n("262e"),u=n("411a"),d=function(e){function t(){return Object(a["a"])(this,t),Object(i["a"])(this,Object(o["a"])(t).call(this,"user"))}return Object(c["a"])(t,e),Object(s["a"])(t,[{key:"getUserMap",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:n=e.sent,r={},e.t0=regeneratorRuntime.keys(t);case 5:if((e.t1=e.t0()).done){e.next=13;break}return a=e.t1.value,s=t[a],e.next=10,n.get(s);case 10:r[s]=e.sent,e.next=5;break;case 13:return e.abrupt("return",r);case 14:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()}]),t}(u["a"]),p=d,l=n("33f8"),m=function(e){function t(){return Object(a["a"])(this,t),Object(i["a"])(this,Object(o["a"])(t).call(this,"message"))}return Object(c["a"])(t,e),Object(s["a"])(t,[{key:"getMsg",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,s,i,o,c,u,d,m,h,f=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=f.length>1&&void 0!==f[1]?f[1]:100,t){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,this.getObjTable();case 5:return r=e.sent,a=[t,0],s=[t,999999999999999],i=IDBKeyRange.bound(a,s),e.next=11,r.index("session_id").openCursor(i,"prev");case 11:o=e.sent,c=[],u={};case 14:if(!o||!o.value){e.next=29;break}if(d=o.value,!(c.length<n&&d["session_id"]===t)){e.next=26;break}if(4==d.msg_type)try{"string"===typeof d.msg&&(d.msg=JSON.parse(Object(l["i"])(d.msg)))}catch(g){console.error(g)}else d.msg=Object(l["i"])(d.msg);return c.unshift(d),u[d.from]=d.from,d.to&&(u[d.to]=d.to),e.next=23,o.continue();case 23:o=e.sent,e.next=27;break;case 26:return e.abrupt("break",29);case 27:e.next=14;break;case 29:return m=new p,e.next=32,m.getUserMap(u);case 32:return h=e.sent,e.abrupt("return",{list:c,userMap:h});case 34:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updatePackInfo",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t,n,r){var a,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:return a=e.sent,e.next=5,a.get(t);case 5:s=e.sent,s.ext[n]=r,a.put(s);case 8:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"saveMsg",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(n,r){var a,s,i,o,c;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return a=new t,e.next=3,a.getObjTable();case 3:s=e.sent,e.t0=regeneratorRuntime.keys(r.list);case 5:if((e.t1=e.t0()).done){e.next=12;break}return i=e.t1.value,o=Object.assign({session_id:n},r.list[i]),e.next=10,s.put(o);case 10:e.next=5;break;case 12:c=new p,c.replaceObjects(r.userMap);case 14:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()}]),t}(u["a"]);t["a"]=m},"8ee8":function(e,t,n){},"8f20":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"msgbox-fade"}},[e.visible?n("div",{staticClass:"pub-modal-mask pub-scroll-box"},[e.openInfo?n("div",{staticClass:"detail-bg"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}}),e.info.avatar?n("img",{staticClass:"avatar",attrs:{src:e.info.avatar,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+e.userId%9},[e._v(e._s(e.info.name.slice(0,2).toUpperCase()))]),n("span",{staticClass:"name"},[e._v(e._s(e.info.name))]),n("div",{staticClass:"text"},[e._v(e._s(e.info.content.title))]),e.quantity?n("div",{staticClass:"money"},[e._v("\n "+e._s(e.formatNum(e.quantity))+" "),n("em",[e._v(e._s(e.openInfo.tokenType))])]):e._e(),e.quantity?n("p",{staticClass:"state"},[e._v("已转账到"+e._s(e.openInfo.type.toUpperCase())+"账户")]):e._e(),n("p",{staticClass:"state-num"},[e._v("\n 共 "+e._s(e.openInfo.num_total)+" 个,已领取 "+e._s(e.openInfo.num_total-e.openInfo.num_left)+" 个\n ")]),n("ul",{staticClass:"packet-list pub-scroll-box"},e._l(e.openInfo.logs,function(t,r){return n("li",{key:r},[t.cover_photo?n("img",{staticClass:"avatar",attrs:{src:t.cover_photo,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+t.user_id%9},[e._v("\n "+e._s(t.nick_name.slice(0,2).toUpperCase())+"\n ")]),n("div",{staticClass:"content"},[n("div",{staticClass:"top"},[n("span",{staticClass:"user-name"},[e._v(e._s(t.nick_name))]),n("span",{staticClass:"amount"},[e._v(e._s(e.formatNum(t.quantity_int))+" "+e._s(e.openInfo.tokenType))])]),n("span",{staticClass:"time"},[e._v(e._s(e.formatTime(t.update_time_int)))])])])})),n("p",{staticClass:"tips"},[e._v("未领取的红包,将于24小时后发起退款")])]):n("div",{staticClass:"packet-bg"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}}),n("div",{staticClass:"user-info",class:{small:1==e.info.ext.redpack_status}},[e.info.avatar?n("img",{staticClass:"avatar",attrs:{src:e.info.avatar,alt:""}}):n("div",{staticClass:"avatar no-avatar",class:"avatar_bg"+e.userId%9},[e._v(e._s(e.info.name.slice(0,2).toUpperCase()))]),n("span",{staticClass:"name"},[e._v(e._s(e.info.name))]),0==e.info.ext.redpack_status?n("div",{staticClass:"text"},[e._v(e._s(e.info.content.title))]):e._e()]),0==e.info.ext.redpack_status?n("div",{staticClass:"open-btn",class:{loading:e.isLoading},on:{click:e.openPacket}},[e._v("開")]):1==e.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[e._v("\n 手慢了,红包派完了\n ")]):2==e.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[e._v("\n 该红包已经过期。\n ")]):e._e(),e.userId==e.info.userId||1==e.info.ext.redpack_status?n("div",{staticClass:"detail",on:{click:e.showDetail}},[e._v("查看领取详情")]):e._e()])]):e._e()])},a=[],s=(n("0fb7"),n("450d"),n("f529")),i=n.n(s),o=(n("c5f6"),n("7514"),n("be94")),c=n("5975"),u=n("5fe9"),d=n.n(u),p=n("2f62"),l=n("5a0c"),m=n.n(l),h={name:"packetGet",data:function(){return{openInfo:null,isLoading:!1}},computed:Object(o["a"])({},Object(p["d"])(["userId","account"]),{trxId:function(){return this.info.content.trxId},quantity:function(){var e=this;if(this.openInfo&&this.openInfo.logs.length){var t=this.openInfo.logs,n=t.find(function(t){return t.user_id==e.userId});return n?n.quantity_int:0}return 0}}),methods:{openPacket:function(){var e=this;this.isLoading=!0,c["a"].redpack.grabPacket({trx_id:this.trxId}).then(function(t){var n=t.data;-1001===n.code?e.$store.commit("unpdatePacketItem",{type:"redpack_status",trxId:e.trxId,data:1}):(e.openInfo=n.data,e.$store.commit("unpdatePacketItem",{type:"grabbed",trxId:e.trxId,data:1}))}).finally(function(){e.isLoading=!1})},showDetail:function(){var e=this;c["a"].redpack.grabDetail({trx_id:this.trxId}).then(function(t){var n=t.data;e.openInfo=n.data})},formatNum:function(e){return d.a.divide(Number(e),1e4)},formatTime:function(e){return m()(e).format("HH:mm")}},created:function(){var e=this;this.account?c["a"].redpack.grabDetail({trx_id:this.trxId}).then(function(t){var n=t.data;e.info.ext.grabbed?e.openInfo=n.data:0==n.data.num_left&&e.$store.commit("unpdatePacketItem",{type:"redpack_status",trxId:e.trxId,data:n.data.redpack_status}),e.visible=!0}):i()({message:"请先登录",type:"warning"})}},f=h,g=(n("5f89"),n("2877")),v=Object(g["a"])(f,r,a,!1,null,"08894ad6",null);v.options.__file="index.vue";var b=v.exports;b.install=function(e,t){var n,r=e.extend(b);e.prototype.$packetGet=function(e){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},data:function(){return{visible:!1,info:e}}}),document.body.appendChild(n.$el)}};t["a"]=b},9729:function(e,t,n){"use strict";var r=n("2b0e"),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"fade"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],staticClass:"toast"},[e._v(e._s(e.text))])])},s=[],i=(n("8ad8"),n("2877")),o={},c=Object(i["a"])(o,a,s,!1,null,"287cea4b",null);c.options.__file="index.vue";var u,d=c.exports,p=r["default"].extend(d);function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500;u?(u.show=!0,u.text=e):(u=new p({el:document.createElement("div"),data:function(){return{text:e,show:!0}}}),document.body.appendChild(u.$el)),t&&setTimeout(function(){u.show=!1},n)}function m(){u&&(u.show=!1)}function h(){r["default"].prototype.$showTips=l,r["default"].prototype.$hideTips=m}t["a"]=h},b83c:function(e,t,n){"use strict";var r=n("192d"),a=n.n(r);a.a},c375:function(e,t,n){"use strict";n.d(t,"a",function(){return l}),n.d(t,"b",function(){return p});var r=n("2b0e"),a=n("8c4f"),s=function(){return n.e("chunk-14b7d1c9").then(n.bind(null,"a510"))},i=function(){return n.e("chunk-2c06dfd2").then(n.bind(null,"c918"))},o=function(){return n.e("chunk-4ae53135").then(n.bind(null,"3d61"))},c=function(){return Promise.all([n.e("chunk-2d2f7d98"),n.e("chunk-2b8be025")]).then(n.bind(null,"d5e1"))},u=function(){return Promise.all([n.e("chunk-2d2f7d98"),n.e("chunk-7e7394b2")]).then(n.bind(null,"7a9f"))},d=function(){return n.e("chunk-369c7fde").then(n.bind(null,"18d9"))};r["default"].use(a["a"]);var p=new a["a"]({routes:[{path:"/",alias:"/user/:id",name:"noChat",component:d},{path:"/group/:id",name:"groupChat",component:u},{path:"/pm/:id",name:"pmChat",component:u}]}),l=new a["a"]({routes:[{path:"/",alias:"/user/:id",name:"chatList",component:s},{path:"/me",name:"aboutMe",component:i},{path:"/editMe",name:"editMe",component:o},{path:"/group/:id",name:"groupChat",component:c},{path:"/pm/:id",name:"pmChat",component:c}]})},cf63:function(e,t,n){"use strict";var r=n("f1e5"),a=n.n(r);a.a},e332:function(e,t,n){"use strict";function r(){var e={};return e="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"},e}function a(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws.mee.chat":t+"ws.mee.chat",e}function s(){var e,t="https:"===document.location.protocol?"wss://":"ws://";return e="8080"===window.location.port||/^test|\.webdev2\./.test(window.location.host)?t+"test-ws-group.mee.chat":/^new[-.]/.test(window.location.host)?t+"new-ws-group.mee.chat":t+"ws-group.mee.chat",e}n.d(t,"b",function(){return r}),n.d(t,"c",function(){return a}),n.d(t,"a",function(){return s})},f1e5:function(e,t,n){},f9ab:function(e,t,n){"use strict";var r=n("0897"),a=n.n(r);a.a}}]);