chunk-common.f2787976.js 144 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{1:function(e,t){},1015:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLogining,expression:"isLogining"}],staticClass:"c-loginBox small"},[n("div",{staticClass:"logo"},[e._v("MeeChat账号登录")]),n("h3",{staticClass:"title-other"},[e._v(e._s(e.$t("login.otherType")))]),n("other-account",{on:{initMiniLoginCallback:e.initMiniLoginCallback}})],1)},a=[],i=n("bd31"),o=n("52c1"),s=n("a3af"),c={name:"loginBox",components:{otherAccount:s["a"]},created:function(){},computed:Object(i["a"])({},Object(o["e"])(["isLogining"])),methods:{initMiniLoginCallback:function(){this.$emit("initMiniLoginCallback")}}},u=c,d=(n("1f35"),n("fc05")),l=Object(d["a"])(u,r,a,!1,null,"7e248dc0",null);t["a"]=l.exports},"16c9":function(e,t,n){"use strict";var r=n("7bd4"),a=n.n(r);a.a},"1c04":function(e,t,n){"use strict";n("4694");var r=n("8973"),a=n("52c1"),i=(n("face"),{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},setLogining:function(e,t){e.isLogining=t},setCopyText:function(e,t){e.copyText=t},changeHotGroupStatus:function(e,t){if(!(e.hotList.length<=0)){var n=e.hotList.findIndex(function(e,n){return e.group_id==t.groupId});n>-1&&(e.hotList[n].is_join=t.isJoin,t.isJoin>0?++e.hotList[n].member_num:--e.hotList[n].member_num)}}}),o=(n("dcfb"),n("46b5"),n("024c")),s=n("badb"),c=n.n(s),u=(n("dc12"),n("61e5"),n("a700")),d=n.n(u),l=(n("b5aa"),n("4457")),p=n("d690"),h=n.n(p),m=n("5975"),f=n("33f8"),g=n("e332"),v=n("0892"),b=n.n(v),k={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(l["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,i,o,s,u,l,p=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.dispatch,a=t.commit,i=t.state,i.scatter){e.next=5;break}Object(f["z"])("Please install the scatter","Scatter"),e.next=35;break;case 5:return e.next=7,Object(g["b"])();case 7:return o=e.sent,e.prev=8,e.next=11,i.scatter.getIdentity({accounts:[o]});case 11:s=e.sent,e.next=18;break;case 14:return e.prev=14,e.t0=e["catch"](8),"identity_rejected"!==e.t0.type&&Object(f["z"])(e.t0.message),e.abrupt("return",d.a.reject(e.t0));case 18:if(u=s.accounts.find(function(e){return"eos"===e.blockchain}),l=localStorage.getItem("accounts"),!l||JSON.parse(l).name===u.name){e.next=29;break}return e.next=23,k.doScatterLogout.apply(k,p);case 23:n.push({path:"/login"}),a("setUserInfo",null),a("initChatData"),a("initGroupData"),a("chatAppLogin",!1),a("toApp",!0);case 29:return a("setAccount",u),localStorage.setItem("accounts",c()(u)),window.EOS=i.scatter.eos(o,b.a,{}),e.next=34,r("getAccount");case 34:return e.abrupt("return",d.a.resolve(!0));case 35:case"end":return e.stop()}},e,this,[[8,14]])}));function t(t,n){return e.apply(this,arguments)}return t}(),doScatterBind:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s,c,u,l,p,h,v;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,t.commit,n=t.state,n.scatter){e.next=5;break}Object(f["z"])("Please install the scatter","Scatter"),e.next=36;break;case 5:return e.next=7,Object(g["b"])();case 7:return r=e.sent,e.prev=8,e.next=11,n.scatter.getIdentity({accounts:[r]});case 11:a=e.sent,e.next=18;break;case 14:return e.prev=14,e.t0=e["catch"](8),"identity_rejected"!==e.t0.type&&Object(f["z"])(e.t0.message),e.abrupt("return",d.a.reject(e.t0));case 18:return i=a.accounts.find(function(e){return"eos"===e.blockchain}),window.EOS=n.scatter.eos(r,b.a,{}),e.next=22,m["a"].user.getRandom2({account:i.name});case 22:return o=e.sent,s=o.data,c=s.data.random,u=s.data.accessToken,l=null,p=window.EOS||n.scatter.eos,e.next=30,p.contract("meechatadmin");case 30:return h=e.sent,e.next=33,h.login(i.name,c,{authorization:["".concat(i.name,"@").concat(i.authority)]});case 33:return l=e.sent,v={account:i.name,access_token:u,trx_id:l.transaction_id||l.transaction.transaction_id},e.abrupt("return",m["a"].user.eosBind2(v));case 36:case"end":return e.stop()}},e,this,[[8,14]])}));function t(t){return e.apply(this,arguments)}return t}(),doScatterLogout:function(e,t){var n=e.commit,r=e.state;return f["a"].delCookie("user_id"),f["a"].delCookie("token"),localStorage.removeItem("user_id"),localStorage.removeItem("token"),localStorage.removeItem("accounts"),n("setUserId",null),n("setToken",null),n("setAccount",""),r.scatter&&r.scatter.forgetIdentity&&r.scatter.forgetIdentity()},getUserEOS:function(e,t){var n=e.dispatch,r=e.commit,a=e.state;return new d.a(function(e,t){window.EOS.getCurrencyBalance("eosio.token",a.account.name,"EOS").then(function(t){var n=Object(o["a"])(t,1),a=n[0],i=Number(a.replace(/\sEOS/,"")).toFixed(4);i=h.a.times(i,1e4),r("setBalance",i),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 d.a(function(e,t){window.EOS.getAccount(r.account.name).then(function(t){var r=JSON.parse(c()(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(l["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,i,o,s,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,i=localStorage.getItem("user_id"),o=localStorage.getItem("token"),!i||!o){e.next=9;break}return r("setUserId",i),r("setToken",o),e.abrupt("return",d.a.resolve({user_id:i,token:o}));case 9:return e.next=11,m["a"].user.getRandom({account:a.account.name});case 11:return s=e.sent,c=s.data.data,u=a.publicKey,e.abrupt("return",new d.a(function(e,t){a.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var i={account:a.account.name,sign:n,pubkey:u,data:c};m["a"].user.eosLogin(i).then(function(n){var a=n.data;if(1===a.result){var i=a.data.user_id,o=a.data.token;localStorage.setItem("user_id",i),localStorage.setItem("token",o),r("setUserId",i),r("setToken",o),e(a)}else t(new Error(a.msg))})}).catch(function(e){t(e)})}));case 15:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),resetGameLogin:function(){var e=Object(l["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)}));function t(t,n){return e.apply(this,arguments)}return t}(),doContractLogin:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,i,o,s,c,u,l,p,h,f,g,v,b,k,w;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,i=localStorage.getItem("user_id"),o=localStorage.getItem("token"),!i||!o){e.next=9;break}return r("setUserId",i),r("setToken",o),e.abrupt("return",d.a.resolve({user_id:i,token:o}));case 9:return e.prev=9,e.next=12,m["a"].user.getRandom2({account:a.account.name});case 12:if(s=e.sent,c=s.data,u=c.data.random,l=c.data.accessToken,p={authorization:["".concat(a.account.name,"@").concat(a.account.authority)]},h=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,p]}});case 21:h=e.sent,e.next=31;break;case 24:return f=window.EOS||a.scatter.eos,e.next=27,f.contract("meechatadmin");case 27:return g=e.sent,e.next=30,g.login(a.account.name,u,p);case 30:h=e.sent;case 31:return v={account:a.account.name,access_token:l,trx_id:h.transaction_id||h.transaction.transaction_id,group_id:a.group.groupId||null},e.next=34,m["a"].user.eosLogin2(v);case 34:if(b=e.sent,1!==b.data.result){e.next=43;break}return k=b.data.data.user_id,w=b.data.data.token,localStorage.setItem("user_id",k),localStorage.setItem("token",w),r("setUserId",k),r("setToken",w),e.abrupt("return",d.a.resolve(b.data));case 43:e.next=48;break;case 45:return e.prev=45,e.t0=e["catch"](9),e.abrupt("return",d.a.reject(e.t0));case 48:case"end":return e.stop()}},e,this,[[9,45]])}));function t(t,n){return e.apply(this,arguments)}return t}(),getHotList:function(e,t){var n=e.state;n.hotList.length>0||m["a"].group.getHotList().then(function(e){var t=e.data;n.hotList=t.data})}},w=function(){return{scatter:null,eos:null,account:"",balance:0,mainnet:EOS_HOST,gtErrorCount:0,eosErrorCount:0,publicKey:null,userId:localStorage.getItem("user_id")||"",token:localStorage.getItem("token")||"",curSession:"",userInfo:null,isLogining:!1,copyText:"",hotList:[]}},_=function(){return{sessionList:[],isLogin:!0,toApp:!1,friendList:[]}},y=function(){return{useCache:!1,adminList:[],creator:"",blockList:[],userCounts:"",groupName:"",shareName:"",groupNotice:"",privateName:"",coverPhoto:"",url:"",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}},I=n("ab01"),x=n.n(I),S=n("c1f9"),L=n.n(S),C=n("a585"),T=n("26cb"),M=n("fd86"),O=n("3d0b"),j=n("d26d"),N=n("411a"),P=function(e){function t(){return Object(C["a"])(this,t),Object(M["a"])(this,Object(O["a"])(t).call(this,"session"))}return Object(j["a"])(t,e),Object(T["a"])(t,[{key:"getSortList",value:function(){var e=Object(l["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:if(t=e.sent,t){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,t.index("pin_time_int").openCursor(null,"prev");case 7:n=e.sent,r=[];case 9:if(!n||!n.value){e.next=17;break}return a=n.value,(!a.delete_time_int||a.delete_time_int<a.update_time_int)&&r.push(a),e.next=14,n.continue();case 14:n=e.sent,e.next=9;break;case 17:return e.abrupt("return",r);case 18:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"updateItem",value:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateObject(n,{session_id:t});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setUnread",value:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{unread:n});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setPin",value:function(){var e=Object(l["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.updateItem(t,{is_pin:n,pin_time_int:r});case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"setMute",value:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t,n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{is_mute:n});case 1:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"clearData",value:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(){var t,n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(t=e.sent,t){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t.openCursor(null,"prev");case 7:n=e.sent;case 8:if(!n||!n.value){e.next=16;break}return r=n.value,r.delete_time_int||t.delete(r.session_id),e.next=13,n.continue();case 13:n=e.sent,e.next=8;break;case 16:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"replaceSession",value:function(){var e=Object(l["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 e.next=2,this.getObjTable();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return",t);case 5:e.t0=regeneratorRuntime.keys(t);case 6:if((e.t1=e.t0()).done){e.next=18;break}return r=e.t1.value,a=t[r]["session_id"],e.next=11,n.get(a);case 11:if(!e.sent){e.next=15;break}this.updateObject(t[r],{session_id:a}),e.next=16;break;case 15:n.put(t[r]);case 16:e.next=6;break;case 18:return e.abrupt("return",this.getSortList());case 19:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"remove",value:function(){var e=Object(l["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:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n.get(t);case 7:r=e.sent,r&&this.updateItem(t,{delete_time_int:r.update_time_int});case 9:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"recover",value:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.updateItem(t,{delete_time_int:0});case 1:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}]),t}(N["a"]),A=P,R=n("2593"),$=_(),E=new A,U={setSessionList:function(e,t){t.forEach(function(e){var t=e["last_msg"];e.cont=t?Object(f["i"])(t.content):""}),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){var n=e.sessionList.filter(function(e){return 1===e.is_pin}),r=n.length||0;e.sessionList.splice(r,0,t),E.recover(t.session_id)},setSessionItemUnread:function(e,t){var n=0;e.sessionList.forEach(function(e,a){if(e.session_id=="".concat(t.session_id)){var i=e.unread;t.unread&&t.curSession!=t.session_id?i+=t.unread:i=0,r["default"].set(e,"unread",i),E.setUnread(e.session_id,i),n=a}});var a=e.sessionList[n];n&&!a.is_pin&&t.cont&&(e.sessionList.splice(n,1),U.addSessionItem(e,a))},setFriendList:function(e,t){e.friendList=t},setSessionRepeal:function(e,t){e.sessionList.forEach(function(e){e.session_id==(t.sessionId||t.group_id)&&(r["default"].set(e.last_msg,"msg_type",-1),r["default"].set(e,"update_time_int",t.timestamp))})},setSessionItem:function(e,t){e.sessionList.forEach(function(e){e.session_id==t.session_id&&(e=t)})},updateSessionListByPin:function(e,t){E.setPin(t.session_id,1),e.sessionList.forEach(function(n,r){n.session_id==t.session_id&&(n.is_pin=t.is_pin,n.pin_time_int=t.pin_time_int,e.sessionList.unshift(e.sessionList.splice(r,1)[0]))})},cancelSessionListByPin:function(e,t){E.setPin(t.session_id,0);var n=null;e.sessionList.forEach(function(r,a){r.session_id==t.session_id?(r.is_pin=t.is_pin,r.pin_time_int=t.pin_time_int,n=e.sessionList.splice(a,1)[0]):n&&r.is_pin<1&&(e.sessionList.splice(a,0,n),n=null)})},updateSessionListByMute:function(e,t){E.setMute(t,1),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=1)})},cancelSessionListByMute:function(e,t){E.setMute(t,0),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=0)})},removeSessionListById:function(e,t){E.remove(t),e.sessionList=L.a.filter(e.sessionList,function(e,n){return e.session_id!=t})},updateSessionLastmsg:function(e,t){var n=e.sessionList.find(function(e){return e.session_id==(t.group_id||t.sessionId||t.session_id)});n&&U.setSessionLastmsg(e,n,t)},updateSessionLastMsgNoDecode:function(e,t){U.updateSessionLastmsg(e,x()(t,{noDecryptoMsg:!0}))},setSessionLastmsg:function(e,t,n){t.last_msg||r["default"].set(t,"last_msg",{});var a=t.last_msg;r["default"].set(a,"content",n.content),r["default"].set(a,"from",n.from),r["default"].set(a,"msg_type",n.msg_type),r["default"].set(a,"name",n.name),r["default"].set(a,"nick_name",n.nick_name),r["default"].set(a,"time",n.timestamp),r["default"].set(t,"update_time_int",n.timestamp),r["default"].set(t,"cont",n.noDecryptoMsg?n.content:Object(f["i"])(n.content))},initChatData:function(e){var t=_();for(var n in e)t.hasOwnProperty(n)&&(e[n]=t[n])}},H={refreshSessionList:function(){var e=Object(l["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,E.getSortList();case 3:a=e.sent,a&&a.length&&r("setSessionList",a);case 5:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),getSessionList:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t,n){var r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:r=t.dispatch,a=t.commit,t.state,r("refreshSessionList"),m["a"].session.sessionList(function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.data,!n||!n.data){e.next=8;break}return e.next=4,E.clearData();case 4:return e.next=6,E.replaceSession(n.data);case 6:r=e.sent,a("setSessionList",r);case 8:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),getUserInfo:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s,c;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,a=r.userId||localStorage.getItem("user_id"),e.next=5,m["a"].user.getInfo({target_id:a});case 5:i=e.sent,o=i.data,n("setUserInfo",o.data),n("setGroupUserInfo",o.data),o.data.user_id&&(s=new R["a"],c={cover_photo:o.data.cover_photo,nick_name:o.data.nick_name,user_name:o.data.user_name},s.updateObject(c,{user_id:o.data.user_id})),e.next=14;break;case 12:e.prev=12,e.t0=e["catch"](1);case 14:case"end":return e.stop()}},e,this,[[1,12]])}));function t(t){return e.apply(this,arguments)}return t}(),updateSessionItem:function(e,t){var n=e.commit,r=e.state,a=r.sessionList.find(function(e){return e.session_id==t.sessionId});a=x()(a,t.data),n("setSessionItem",a)},doRepealPersonMsg:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),getFriendList:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}()},G={muteList:function(e){return e.sessionList.filter(function(e){if("1"==e.is_mute)return e.session_id})}},q={state:$,mutations:U,actions:H,getters:G},D=n("5f19"),B=(n("0adb"),n("c7d9"),n("76a4")),F=n("7f43"),W=n.n(F),J=n("8d4d"),z=null,Y={getGroupInfo:function(){var e=Object(l["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,m["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,i=e.data.data.pinMsg,o=e.data.data.group,s=e.data.data.members,c=e.data.data.group.member_num,u=e.data.data.userInfo,d=e.data.data.sessionInfo,l=e.data.data.members.some(function(e){return a.userId==e.user_id}),p=e.data.data.eosInfo;i&&(i.visible=!0);var h={};s.forEach(function(e){e.user_id&&(h[e.user_id]=e)}),r("setGroupInfo",{userCounts:s.length,groupName:o.group_title,shareName:o.group_name,members:h,membersArray:s,membersNum:c,userInfo:u,groupNotice:o.group_notice,url:o.url,inviteUrl:o.invite_url,sessionInfo:d,isJoin:l,coverPhoto:o.cover_photo,adminList:t,blockList:n,pinMsg:i,creator:o.creator,eosInfo:p})}});case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}(),getNewMsgFromDb:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.state,a=r.groupId,i=new J["a"],e.next=6,i.getMsg(r.groupId);case 6:if(o=e.sent,!(a===r.groupId&&o&&o.list.length>0)){e.next=13;break}return n.fromdb=!0,Y._renderGroupMsg(t,o,n),e.abrupt("return",!0);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getNewMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.state,a=r.groupId,i=r.endHash,e.next=5,m["a"].group.getNewMsg({group_id:a,client_hash:i}).catch(function(){});case 5:return o=e.sent,a===r.groupId&&0===o.data.code&&o.data.data.list.length>0&&(n.fromdb=!1,Y._renderGroupMsg(t,o.data.data,n)),e.abrupt("return","done");case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),_renderGroupMsg:function(e,t,n){e.dispatch;var r=e.commit,a=e.state,i=[];t.list.forEach(function(e){var n=t.userMap[e.from];n&&i.push({name: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==a.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null,ext_info:e.ext_info?e.ext_info:null})}),r("updateMembers",t.userMap),a.chatList.length?r("setHash",{endHash:i[i.length-1].hash}):r("setHash",{endHash:i[i.length-1].hash,startHash:i[0].hash});var o=n.newMsg?{list:i,newMsg:n.newMsg,fromdb:!1}:{list:i,fromdb:n.fromdb};r("addChatItem",o)},getPrivateNewMsgFromDb:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.rootState,a=r.curSession,i=new J["a"],e.next=6,i.getMsg(a);case 6:if(o=e.sent,!(a===r.curSession&&o&&o.list.length>0)){e.next=12;break}return Y._renderPrivateMsg(t,o,n),e.abrupt("return",!0);case 12:return e.abrupt("return",!1);case 13:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateNewMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.state,a=t.rootState,i=a.curSession,e.next=5,m["a"].person.getNewMsg({session_id:i,client_hash:r.endHash}).catch(function(){});case 5:return o=e.sent,i===a.curSession&&0===o.data.code&&Y._renderPrivateMsg(t,o.data.data,n),e.abrupt("return",o.data);case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),_renderPrivateMsg:function(e,t,n){e.dispatch;var r=e.commit,a=e.state,i=e.rootState,o=[],s=t.userMap;for(var c in r("updateGroup",{key:"members",data:s}),s)c!==i.userId&&r("updateGroup",{key:"privateName",data:s[c]&&s[c]["nick_name"]||""});if(t.list.forEach(function(e){var n=t.userMap[e.from];o.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==i.userId?"me":"you",msg_type:e.msg_type,ext:e.ext?e.ext:null})}),o.length){a.chatList.length?r("setHash",{endHash:o[o.length-1].hash}):r("setHash",{endHash:o[o.length-1].hash,startHash:o[0].hash});var u=n.newMsg?{list:o,newMsg:n.newMsg}:o;r("addChatItem",u)}},getHistoryMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s,u,d=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=d.length>1&&void 0!==d[1]?d[1]:{},i=localStorage.getItem(a.hash),o=[],s="",!i||!r.useCache){e.next=9;break}o=JSON.parse(i),e.next=13;break;case 9:return e.next=11,m["a"].group.getHistoryMsg({group_id:r.groupId,client_hash:r.startHash}).catch(function(){});case 11:u=e.sent,u&&0===u.data.code&&u.data.data.list.length>0&&(u.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(f["i"])(e.msg)):e.msg=Object(f["i"])(e.msg);var t=u.data.data.userMap[e.from];n("updateMembers",u.data.data.userMap),t&&o.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,c()(o)));case 13:return o.length>0?(n("setHash",{startHash:o[0].hash}),n("addHistoryList",o),s="done"):(n("setHash",{startHash:null}),s="end"),e.abrupt("return",s);case 15:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateHistoryMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s,u,d,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,i=l.length>1&&void 0!==l[1]?l[1]:{},o=localStorage.getItem(i.hash),s=[],u="",!o||!r.useCache){e.next=9;break}s=JSON.parse(o),e.next=13;break;case 9:return e.next=11,m["a"].person.getHistoryMsg({session_id:a.curSession,client_hash:r.startHash}).catch(function(){});case 11:d=e.sent,0===d.data.code&&d.data.data.list.length>0&&(d.data.data.list.forEach(function(e){e.msg=Object(f["i"])(e.msg);var t=d.data.data.userMap[e.from];s.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(i.hash,c()(s)));case 13:return s.length>0?(n("setHash",{startHash:s[0].hash}),n("addHistoryList",s),u="done"):(n("setHash",{startHash:null}),u="end"),e.abrupt("return",u);case 15:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),doSendMsg:function(e){e.dispatch;var t=e.commit,n=e.state,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new d.a(function(e,a){m["a"].group.sendMsg({group_id:n.groupId,msg_type:r.type,msg:r.msg}).then(function(a){var i=a.data;if(0===i.code){if(r.createTime){var o=r.createTime;i.data.content=Object(f["i"])(i.data.content);for(var s=n.chatList,c=s.length-1;c>=0;c--){var u=s[c];u.createTime===o&&t("updataChatItem",{index:c,hash:i.data.hash})}}else t("updateMembers",i.data.userMap),i.data.content=Object(f["i"])(i.data.content),t("addChatItem",i.data);t("setHash",{endHash:i.data.hash}),t("updateSessionLastMsgNoDecode",x()(i.data,{group_id:n.groupId})),e(i.data)}else r.createTime&&Object(f["h"])(n,r.createTime)}).catch(function(e){r.createTime&&Object(f["h"])(n,r.createTime),a(e)})})},doSendFile:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o=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,i=o.length>1&&void 0!==o[1]?o[1]:{},e.abrupt("return",new d.a(function(e,t){var o=a.userId,s=a.token,c=new FormData;if(c.append("res",i.res),c.append("user_id",o),c.append("token",s),r.groupId)c.append("group_id",r.groupId);else{var u,d=a.curSession.split("-");u=d[0]==a.userId?d[1]:d[0],c.append("to_user",u)}var l=r.groupId?"group/sendFile":"person/sendFile";W()({url:[m["a"].host,l].join(""),method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(t){var o=t.data;if(0===o.code){if(i.createTime){var s=i.createTime;o.data.content=Object(f["i"])(o.data.content);var c=r.chatList;c.forEach(function(e){e.createTime===s&&(e.res=void 0,e.content=o.data.content,e.hash=o.data.hash,e.loading=!1,e.fail=!1,e.ext_info||(e.ext_info={}),e.ext_info.cover_url=o.data.ext_info&&o.data.ext_info.cover_url)})}else n("updateMembers",o.data.userMap),o.data.content=Object(f["i"])(o.data.content),n("addChatItem",o.data);n("setHash",{endHash:o.data.hash}),n("updateSessionLastMsgNoDecode",x()(o.data,{group_id:r.groupId||a.curSession})),e(o.data)}else i.createTime&&Object(f["h"])(r,i.createTime)}).catch(function(e){i.createTime&&Object(f["h"])(r,i.createTime),t(e)})}));case 3:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),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 d.a(function(e,i){m["a"].person.sendMsg({session_id:r.curSession,msg_type:a.type,msg:a.msg}).then(function(i){var o=i.data;if(0===o.code){if(a.createTime){var s=a.createTime;o.data.content=Object(f["i"])(o.data.content);for(var c=n.chatList,u=c.length-1;u>=0;u--){var d=c[u];d.createTime===s&&(d.hash=o.data.hash,d.loading=!1)}}else t("updateMembers",o.data.userMap),o.data.content=Object(f["i"])(o.data.content),t("addChatItem",o.data);t("setHash",{endHash:o.data.hash}),t("updateSessionLastMsgNoDecode",x()(o.data,{group_id:r.curSession})),e(o.data)}else a.createTime&&Object(f["h"])(n,a.createTime)}).catch(function(e){a.createTime&&Object(f["h"])(n,a.createTime),i(e)})})},initSocket:function(e){var t=e.commit,n=e.state,r=e.rootState,a=e.rootGetters,i=e.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var o="".concat(Object(g["c"])(),"/?user_id=").concat(r.userId,"&token=").concat(r.token);z&&(z.destroy(),z=null),z=new B["a"](o,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:c()({act:"alive",player:name})}),z.on("open",function(e){}),z.on("message",function(e){var o=JSON.parse(e),s=o.channel,c=o.data,u=a.muteList;if(s.match("chat:group")){var d=u.some(function(e){return e.session_id==c.group_id});if("msg"===c.type&&(r.curSession==c.group_id&&(i("getNewMsg",{newMsg:!0}),c.from!=r.userId&&t("addUnreadNums")),d||f["v"].showNotification(c)),c.type,c.type,c.type,"repeal"===c.type&&(t("repealChatItem",c),c.msg_type=-1,t("updateSessionLastmsg",c)),"block"===c.type&&t("updateGroupBlockList",{type:"add",id:c.to}),"unblock"===c.type&&t("updateGroupBlockList",{type:"delete",id:c.to}),"leave"===c.type){if(c.group_id!=n.groupId)return;if(c.user_info.user_id==r.userId)return;c.joinMsg=(c.user_info.nick_name||c.user_info.name)+"退出群组",t("addChatItem",c),c.user_id==r.userId?i("getGroupInfo"):t("updateMembersArray",{type:"del",userInfo:c.user_info})}if("join"===c.type){if(c.group_id!=n.groupId)return;if(c.user_info.user_id==r.userId)return;c.joinMsg=(c.user_info.nick_name||c.user_info.name)+"加入群组",t("updateMembers",Object(D["a"])({},c.user_info.user_id,c.user_info)),t("updateMembersArray",{type:"add",userInfo:c.user_info}),t("addChatItem",c)}"pin_msg"===c.type&&t("updateGroupPinMsg",c.pinMsg),"unpin_msg"===c.type&&t("updateGroupPinMsg",null),"new_redpack"===c.type&&r.curSession==c.group_id&&t("addPacketItem",c),"grab_redpack"===c.type&&r.curSession==c.group_id&&(c.from!=r.userId&&c.to!=r.userId||t("addPacketTip",c))}if(s.match("chat:person")){if(!r.curSession)return;var l=+c.to>+c.from?"".concat(c.from,"-").concat(c.to):"".concat(c.to,"-").concat(c.from),p=u.some(function(e){return e.session_id==l});if("msg"===c.type&&(r.curSession==l&&(i("getPrivateNewMsg"),c.from!=r.userId&&t("addUnreadNums")),p||f["v"].showNotification(c)),"repeal"===c.type){t("repealChatItem",c);var h=c.from>c.to?"".concat(c.to,"-").concat(c.from):"".concat(c.from,"-").concat(c.to);c.group_id=h,c.msg_type=-1,t("updateSessionLastmsg",c)}"new_redpack"===c.type&&t("addPacketItem",c),"grab_redpack"===c.type&&a.otherUserId==c.from&&(c.from!=r.userId&&c.to!=r.userId||t("addPacketTip",c)),"join_group"===c.type&&(c.joinMsg="你加入了该群组",t("updateMembers",Object(D["a"])({},r.userInfo.user_id,r.userInfo)),t("updateMembersArray",{type:"add",userInfo:r.userInfo}),t("addChatItem",c)),"leave_group"===c.type&&(c.joinMsg="你退出了该群组",t("updateMembersArray",{type:"del",userInfo:r.userInfo}),t("addChatItem",c),i("getGroupInfo"))}if("msg"===c.type||"new_redpack"===c.type){var g,v=r.chat.sessionList;g=c.group_id?c.group_id:+c.to>+c.from?"".concat(c.from,"-").concat(c.to):"".concat(c.to,"-").concat(c.from);var b=v.some(function(e){return e.session_id==g}),k={session_id:g,cont:Object(f["i"])(c.content),unread:r.userId==c.from?0:1,update_time_int:c.timestamp,timestamp:c.timestamp};b||(c.group_id?m["a"].group.getGroupInfo({group_id:c.group_id}).then(function(e){var n=e.data,r=n.data.group,a={cover_photo:r.cover_photo,is_group:"1",is_auth:r.is_auth,name:r.group_title};t("addSessionItem",x()(a,k))}):m["a"].user.getOtherInfo({target_id:r.userId===c.from?c.to:c.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",x()(r,k))})),c.from!=r.userId&&t("setSessionItemUnread",x()({curSession:r.curSession},k)),t("updateSessionLastmsg",x()(c,{sessionId:g}))}})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),doBlockUser:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),doUnBlockUser:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),doPinMsg:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),doUnpinMsg:function(){var e=Object(l["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,m["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]])}));function t(t){return e.apply(this,arguments)}return t}(),joinGroup:function(){var e=Object(l["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,m["a"].group.joinGroup({group_id:n.groupId});case 5:r("updateJoin",!0),r("changeHotGroupStatus",{groupId:n.groupId,isJoin:1}),console.log("gfg"),e.next=12;break;case 10:e.prev=10,e.t0=e["catch"](2);case 12:case"end":return e.stop()}},e,this,[[2,10]])}));function t(t){return e.apply(this,arguments)}return t}()},K=Y,X=new J["a"],V={initGroup:function(e,t){e.userId=t.userId,e.groupId=t.groupId,e.useCache=t.useCache},initState:function(e,t){var n=y();for(var r in n){if("userId"==r||"userInfo"==r)break;e[r]=n[r]}},setGroupInfo:function(e,t){e.groupName=t.groupName,e.userCounts=t.userCounts,e.members=t.members,e.groupNotice=t.groupNotice,e.url=t.url,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(f["k"])(t.pinMsg,e.userId),e.pinList=[t.pinMsg]),e.pinMsg=t.pinMsg||{}},setGroupUserInfo:function(e,t){e.userInfo=t,e.userId=t.user_id},addHistoryList:function(e,t){if(t.length){Object(f["c"])(t);var n=L.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=n.concat(e.chatList)}},clearChatList:function(e){e.chatList=[],e.pinMsg={},e.groupId=null},addPinChatItem:function(e,t){var n={name:t?t.nick_name:"unknown",content:t.content,userId:t.userId,timestamp:t.timestamp,avatar:t?t.cover_photo:"",hash:t.hash,type:t.userId==e.userId?"me":"you",msg_type:t.msg_type,loading:!1,res:t.res,joinMsg:"",fail:!1};e.chatList.splice(0,0,n)},addChatItem:function(e,t){var n=!!t.newMsg,r=!!t.fromdb,a=e.chatList;if(!t.group_id||t.group_id==e.groupId){if(t.list&&(t=t.list),t&&t.length>0){Object(f["c"])(t),r&&(e.atList=[]),n&&!r&&t.forEach(function(t){Object(f["e"])(t.content,e.userInfo.user_name)&&e.atList.push(t)});var i=L.a.differenceBy(t,a,"hash")||[];a=a.concat(i)}else{var o=e.members[t.from]||t.user_info,s={name:o?o.nick_name:"unknown",content:t.content,userId:t.from,timestamp:t.timestamp,avatar:o?o.cover_photo:"",hash:t.hash,type:t.from==e.userId?"me":"you",msg_type:t.msg_type,loading:Boolean(t.loading),res:t.res,joinMsg:t.joinMsg,fail:!1};t.createTime&&(s.createTime=t.createTime),Object(f["d"])(s,a),Object(f["b"])(s),a.some(function(e){return s.hash&&e.hash===s.hash})||a.push(s)}e.chatList=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(f["i"])(t.content)),type:t.from==e.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:t.hash};Object(f["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,i=t.data,o=e.chatList,s=o.findIndex(function(e){return 4==e.msg_type&&e.content.trxId==a}),c=o[s];c.ext[n]=i,r["default"].set(e.chatList,s,c),X.updatePackInfo(c.hash,n,i)},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.chatList,a=n.length-1;a>=0;a--){var i=n[a];i.hash===t.hash&&(r["default"].set(i,"repealMsg",!0),r["default"].set(i,"from",t.from))}X.removeMsg(t["session_id"],t.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)},clearHash:function(e,t){e.endHash=null},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=x()({},t,e.members)},updateMembersArray:function(e,t){var n=t.type,r=t.userInfo;if("add"==n){var a=e.membersArray.some(function(e){return r.user_id==e.user_id});a||(++e.membersNum,e.membersArray.push(r))}else{var i=e.membersArray.findIndex(function(e){return e.user_id==r.user_id});i>-1&&(--e.membersNum,e.membersArray.splice(i,1))}},updateMemberAvatar:function(e,t){for(var n=t.userId,a=t.imageUrl,i=e.members,o=e.chatList,s=0;s<o.length;s++){var c=o[s]["userId"];if(c==n){var u=o[s];u["avatar"]=a,r["default"].set(e.chatList,s,u)}}for(var d in i)if(d==n){var l=i[d];return l["cover_photo"]=a,void r["default"].set(e.members,d,l)}},updateMemberNickName:function(e,t){for(var n=t.userId,a=t.nickName,i=e.members,o=e.chatList,s=0;s<o.length;s++){var c=o[s]["userId"];if(c==n){var u=o[s];u["name"]=a,r["default"].set(e.chatList,s,u)}}for(var d in i)if(d==n){var l=i[d];return l["nick_name"]=a,void r["default"].set(e.members,d,l)}},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(f["k"])(t,e.userId),e.pinMsg=t):e.pinMsg={}},updateIsNewAt:function(e,t){e.isNewAt=t.isNewAt,e.isNewAtFound=t.isNewAtFound},updateGroupSearchList:function(e,t){e.searchList=t},initGroupData:function(e){var t=y();for(var n in e)t.hasOwnProperty(n)&&(e[n]=t[n])},updataChatItem:function(e,t){var n=e.chatList[t.index];n.hash=t.hash,n.loading=!1}},Q=V,Z={state:y(),actions:K,mutations:Q},ee=Z;r["default"].use(a["a"]);var te=w(),ne={isPrivate:function(e){return/-/g.test(e.curSession)},otherUserId:function(e){if(e.curSession)return e.curSession.indexOf("-")>-1?e.curSession.replace("-","").replace(e.userId,""):""}};t["a"]=new a["a"].Store({state:te,mutations:i,actions:k,getters:ne,modules:{chat:q,group:ee}})},"1f35":function(e,t,n){"use strict";var r=n("3461"),a=n.n(r);a.a},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",{ref:"wrap",staticClass:"preview-wrap"},[n("div",{ref:"mask",staticClass:"preview-mask",on:{click:function(t){e.visible=!1}}}),n("i",{staticClass:"el-icon-close",on:{click:function(t){t.stopPropagation(),e.visible=!1}}}),n("img",{ref:"image",staticClass:"img",style:{transform:"translate("+e.picLeft+"px,"+e.picTop+"px) scale("+e.picScale+")"},attrs:{src:e.imgUrl,alt:""},on:{click:e.handleClickPC}}),n("a",{staticClass:"icon-download",attrs:{href:e.base64Url,download:e.base64Stamp}},[n("i",{staticClass:"el-icon-download"})])]):e._e()])},a=[],i=n("33f8"),o=n("8536"),s=n.n(o),c={name:"imgPreview",data:function(){return{isPcClick:!1,isMobile:Object(i["t"])(),picW:0,picH:0,curPicW:0,curPicH:0,picScale:1,picScaleMid:1,picInitTop:0,picInitLeft:0,picTop:0,picLeft:0,image:null,disX:0,disY:0,base64Url:"",base64Stamp:"meechat_"+(new Date).getTime()}},methods:{initEvent:function(){this.isMobile?this.handleH5():(this.handleDragPC(),this.handleScalePC(),this.$refs.mask.addEventListener("contextmenu",function(e){return e.preventDefault()}))},handleClickPC:function(){!this.isMobile&&this.isPcClick&&(this.visible=!1)},handleDragPC:function(){var e=this;this.image.onmousedown=function(t){return e.isPcClick=!0,e.dragStart(t),e.image.setCapture&&e.image.setCapture(),document.addEventListener("mousemove",e.drag),document.addEventListener("mouseup",e.dragAfter),!1}},handleScalePC:function(){document.body.addEventListener("mousewheel",this.scale)},handleH5:function(){var e=this,t=new s.a.Manager(this.$refs.wrap),n=new s.a.Manager(this.image),r=new s.a.Tap({pointers:1}),a=new s.a.Pan({pointers:1}),i=new s.a.Pinch({pointers:2});n.add([r,a]),t.add([i]),n.on("tap",function(t){e.visible=!1}),n.on("panstart panmove panend tap, multitap",function(t){"panstart"==t.type?e.dragStart(t):"panmove"==t.type?e.drag(t):"panend"==t.type&&e.dragAfter(t)}),t.on("pinchmove pinchin pinchout pinchend",function(t){e.picScale=(e.picScaleMid*t.scale).toFixed(2),"pinchend"==t.type&&(e.picScale<1&&(e.picScale=1),e.picScaleMid=e.picScale)})},dragStart:function(e){var t=this.isMobile?"delta":"client";this.disY=e["".concat(t,"Y")]-this.picTop,this.disX=e["".concat(t,"X")]-this.picLeft,this.curPicW=this.picW*this.picScale,this.curPicH=this.picH*this.picScale},drag:function(e){var t=this.isMobile?"delta":"client";this.isPcClick=!1,this.picTop=e["".concat(t,"Y")]-this.disY,this.picLeft=e["".concat(t,"X")]-this.disX},dragAfter:function(){if(document.removeEventListener("mousemove",this.drag),document.removeEventListener("mouseup",this.dragAfter),this.image.releaseCapture&&this.image.releaseCapture(),this.picScale<=1||this.curPicW<=this.winW)this.picTop=this.picInitTop,this.picLeft=this.picInitLeft;else if(this.picScale>1){var e=window.innerWidth,t=window.innerHeight,n=(this.curPicW-e)/2,r=(this.curPicH-t)/2;this.picLeft<-n&&(this.picLeft=-n),this.picLeft>n&&(this.picLeft=n),this.picTop<-r&&(this.picTop=-r),this.picTop>r&&(this.picTop=r),n<0&&(this.picLeft=0),r<0&&(this.picTop=0)}},scale:function(e){var t=this.picScale;e=e||window.event,e.deltaY>0?this.picScale=t>.2?t-.1:t:this.picScale+=.1,this.picW*this.picScale-window.innerWidth<0&&(this.picLeft=0),this.picH*this.picScale-window.innerHeight<0&&(this.picTop=0)}},mounted:function(){var e=this;this.image=this.$refs.image;var t=new Image;t.src=this.imgUrl,t.onload=function(){var n=window.innerWidth,r=t.width,a=t.height;e.picW=r>n?n:r,e.picH=r>n?n*a/r:r,e.initEvent()},Object(i["m"])(this.imgUrl,function(t){e.base64Url=t})},destroyed:function(){}},u=c,d=(n("5cfd"),n("fc05")),l=Object(d["a"])(u,r,a,!1,null,"0e94af84",null),p=l.exports;p.install=function(e){var t,n=e.extend(p);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"]=p},2593:function(e,t,n){"use strict";n("dcfb"),n("b5aa");var r=n("4457"),a=n("a585"),i=n("26cb"),o=n("fd86"),s=n("3d0b"),c=n("d26d"),u=n("411a"),d=function(e){function t(){return Object(a["a"])(this,t),Object(o["a"])(this,Object(s["a"])(t).call(this,"user"))}return Object(c["a"])(t,e),Object(i["a"])(t,[{key:"getUserMap",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(n=e.sent,r={},n){e.next=6;break}return e.abrupt("return",r);case 6:e.t0=regeneratorRuntime.keys(t);case 7:if((e.t1=e.t0()).done){e.next=15;break}return a=e.t1.value,i=t[a],e.next=12,n.get(i);case 12:r[i]=e.sent,e.next=7;break;case 15:return e.abrupt("return",r);case 16:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()}]),t}(u["a"]);t["a"]=d},2671:function(e,t,n){"use strict";n.d(t,"b",function(){return d}),n.d(t,"a",function(){return l});n("b5aa");var r=n("4457"),a=(n("46b5"),n("bd31")),i=n("52c1"),o=n("5975"),s=n("2593"),c=n("33f8"),u=n("6bec"),d={data:function(){return{accountList:null,userInfo:null,meechatType:Object(c["o"])()}},computed:Object(a["a"])({},Object(i["e"])({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}}),{linkToOther:function(){var e=this.userInfo.user_id,t=Number(e)<Number(this.meId)?"".concat(e,"-").concat(this.meId):"".concat(this.meId,"-").concat(e);return"".concat(location.origin,"/#/pm/").concat(t)}}),methods:Object(a["a"])({},Object(i["b"])(["getUserInfo"]),{sendMsg:function(){this.visible=!1;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,i={};i[a]={cover_photo:this.meInfo.cover_photo,nick_name:this.meInfo.nick_name},i[this.userInfo.user_id]={cover_photo:this.userInfo.cover_photo,nick_name:this.userInfo.nick_name},this.$store.commit("updateGroup",{key:"members",data:i}),this.$store.commit("updateGroup",{key:"privateName",data:this.userInfo.nick_name}),this.$router.push({path:"/pm/".concat(t)})}}),created:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.meInfo){e.next=3;break}return e.next=3,this.getUserInfo();case 3:o["a"].user.getOtherInfo({target_id:this.userId,group_id:this.groupId||null}).then(function(e){var n=e.data;if(t.accountList=n.data.binds,t.userInfo=n.data,t.visible=!0,n.data.user_id){var r=new s["a"],a={cover_photo:n.data.cover_photo,nick_name:n.data.nick_name,user_name:n.data.user_name};r.updateObject(a,{user_id:n.data.user_id})}});case 4:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},l={data:function(){return{isLoading:!1}},computed:Object(a["a"])({},Object(i["e"])({scatter:function(e){return e.scatter}})),methods:Object(a["a"])({},Object(i["b"])(["setScatter","doScatterLogin","doScatterBind","getUserInfo"]),{bindEos:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.isLoading=!0,!window.EOS){e.next=5;break}this.doScatterBind().then(function(){t.isLoading=!1,t.getUserInfo()}).catch(function(e){console.log(e),t.isLoading=!1}),e.next=7;break;case 5:return e.next=7,u["a"].scatter.connect("MEE_CHAT").then(function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(n){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:n&&(t.setScatter(u["a"].scatter),window.ScatterJS=null,t.doScatterBind().then(function(){t.isLoading=!1,t.getUserInfo()}).catch(function(e){console.log(e),t.isLoading=!1}));case 1:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}());case 7:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),bindTg:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.winHandler=Object(c["w"])(""),e.next=3,o["a"].user.tgCSRF({type:"bind"});case 3:t=e.sent,n=t.data,this.winHandler.location.href=n.data.url,r=setInterval(function(){null!=a.winHandler&&a.winHandler.closed&&(clearInterval(r),a.winHandler=null)},800),this.bindCheck(n.data.csrf_token);case 8:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),bindCheck:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t,n){var r,a=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.isLoading=!0,0!==n){e.next=5;break}clearTimeout(this.timeoutHandler),e.next=7;break;case 5:if(!(n>=60)){e.next=7;break}return e.abrupt("return",!1);case 7:return r={},e.prev=8,e.next=11,o["a"].user.tgBind2({csrf_token:t});case 11:r=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](8),this.isLoading=!1;case 17:r.data&&r.data.data&&r.data.data.status>0?(this.isLoading=!1,null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),this.getSyncInfo&&this.getSyncInfo(this.params),this.getUserInfo()):r.data?(null!=this.winHandler||r.data&&0==r.data.status)&&(this.timeoutHandler=setTimeout(function(){a.bindCheck(t,++n)},1e3)):null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null);case 18:case"end":return e.stop()}},e,this,[[8,14]])}));function t(t,n){return e.apply(this,arguments)}return t}(),unbindAccount:function(e){var t=this;Object(c["f"])("".concat(this.$t("userinfo.unbindMsg")," ").concat(e.toLocaleUpperCase()," ?")).then(function(){o["a"].user.unBind({type:e}).then(function(){"eos"==e&&t.scatter&&t.scatter.forgetIdentity&&t.scatter.forgetIdentity(),t.$showTips(t.$t("userinfo.unbindSuccess")),t.getUserInfo()})})}})}},3:function(e,t){},"33f8":function(e,t,n){"use strict";n.d(t,"s",function(){return v}),n.d(t,"z",function(){return b}),n.d(t,"f",function(){return k}),n.d(t,"n",function(){return w}),n.d(t,"q",function(){return _}),n.d(t,"a",function(){return y}),n.d(t,"p",function(){return I}),n.d(t,"g",function(){return S}),n.d(t,"i",function(){return L}),n.d(t,"c",function(){return T}),n.d(t,"d",function(){return M}),n.d(t,"t",function(){return O}),n.d(t,"o",function(){return j}),n.d(t,"b",function(){return P}),n.d(t,"k",function(){return A}),n.d(t,"h",function(){return R}),n.d(t,"e",function(){return $}),n.d(t,"x",function(){return U}),n.d(t,"v",function(){return H}),n.d(t,"j",function(){return G}),n.d(t,"A",function(){return q}),n.d(t,"m",function(){return D}),n.d(t,"u",function(){return B}),n.d(t,"l",function(){return F}),n.d(t,"w",function(){return W}),n.d(t,"r",function(){return J}),n.d(t,"y",function(){return z});var r=n("badb"),a=n.n(r),i=(n("dc12"),n("c7d9"),n("4694"),n("0649")),o=n.n(i),s=(n("dcfb"),n("0adb"),n("8e5d"),n("a700")),c=n.n(s),u=(n("c9db"),n("ad09"),n("514e")),d=n.n(u),l=n("7199"),p=n.n(l),h=n("4c07"),m=n("4941"),f=18e4,g="dqWt6twz6JyEy3EZ";function v(){return/^test|\.webdev2\./.test(window.location.host)||""!==window.location.port}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";d.a.confirm(e,t,{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}})}function k(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new c.a(function(t,n){d.a.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t()}).catch(function(){})})}function w(){var e=(navigator.language||navigator.browserLanguage).toLowerCase(),t="zh";return t=e.indexOf("en")>-1?"en":"zh",t}function _(e){var t=new RegExp("[?&]"+e+"=([^&#?]*)(&|#|$)"),n=window.location.href.match(t);return n?n[1]:null}var y={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 I(){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 x(e,t){for(var n,r=[],a=0,i="",o=0;o<256;o++)r[o]=o;for(o=0;o<256;o++)a=(a+r[o]+t.charCodeAt(o%t.length))%256,n=r[o],r[o]=r[a],r[a]=n;o=0,a=0;for(var s=0;s<e.length;s++)o=(o+1)%256,a=(a+r[o])%256,n=r[o],r[o]=r[a],r[a]=n,i+=String.fromCharCode(e.charCodeAt(s)^r[(r[o]+r[a])%256]);return i}function S(e){var t;try{t=btoa(x(encodeURIComponent(e),g))}catch(n){return e}return t}function L(e){var t;try{t=decodeURIComponent(x(atob(e),g))}catch(n){return e}return t}var C=new RegExp("(https?|ftp|file)://[-a-zA-Z0-9/-_.?#!+%&]+");function T(e){var t=null;e.forEach(function(e){e.timeMsg=null!==t&&o()(e.timestamp)-t>f,t=o()(e.timestamp),P(e)})}function M(e,t){if(0===t.length)e.timeMsg=!0;else{var n=o()(t[t.length-1].timestamp);e.timeMsg=o()(e.timestamp)-n>f}}function O(){return/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)}function j(){return location.pathname.indexOf("mini")>-1?"mini":O()?"h5":"pc"}function N(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};return e.replace(/[&<>'"]/g,function(e){return t[e]})}function P(e){0==e.msg_type&&(e.content=N(e.content),e.content.match(C)&&(e.content=e.content.replace(C,function(e){return'<a href="'.concat(e,'" class="link text" target="_blank">').concat(e,"</a>")})),e.content=h["a"].parse(e.content,{callback:function(e,t){return"https://w2.meechat.me/emoji/"+e+".svg"}}))}function A(e,t){e.name=e.nick_name,e.content=L(e.msg),e.type=e.from==t?"me":"you",e.avatar=e.cover_photo||"",e.userId=e.from}function R(e,t){e.chatList.forEach(function(e){e.createTime==t&&(e.fail=!0,e.loading=!1)})}function $(e,t){if(!t)return!1;var n=new RegExp("@".concat(t));return n.test(e)}function E(e,t){var n=Math.abs(t-e.scrollTop),r=n>500?1e3:2*n,a=new p.a.Tween(e).to({scrollTop:t},r).easing(p.a.Easing.Quadratic.Out);return a.start()}function U(e,t,n,r){E(e,t).onComplete(function(){n.classList.toggle("active"),r&&r()}),setTimeout(function(){n.classList.toggle("active")},3e3)}var H={tabTimer:null,askPermission:function(){return new c.a(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){if(1!=this.getGlobalNotice()){var t=localStorage.getItem("user_id");t!=e.from&&this.askPermission().then(function(){var t,n=new Notification(e.name,{body:"你收到了一条消息",icon:"/dist/img/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){var t=e?"".concat(e,"条新消息 - MeeChat"):"MeeChat";document.title=t,e&&(e=e>99?"99+":e,this.tabTimer&&clearTimeout(this.tabTimer))},getGlobalNotice:function(){if(window.Notification&&"granted"===Notification.permission){var e=J("mute");return e||0}return 1},setGlobalNotice:function(e,t){0==e?Notification.requestPermission(function(e){var n="granted"===e?0:1;t.openGlobalNotice=n,z("mute",n)}):(t.openGlobalNotice=e,z("mute",e))}};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if(!e)return"";var r=Object(m["a"])().subtract(1,"days").format("YYYY-MM-DD"),a=Object(m["a"])(1*e),i=a.format("YYYY-MM-DD");switch(t){case 1:return i<r?a.format("MM-DD"):r==i?n.$t("chat.yesterday"):a.format("HH:mm");case 2:return i<r?a.format("MM-DD HH:mm"):r==i?n.$t("chat.yesterday")+" ".concat(a.format("HH:mm")):a.format("HH:mm")}}function q(){var e=encodeURIComponent(location.hash.replace("#",""));location.replace("".concat(location.origin+location.pathname,"#/login?from=").concat(e))}function D(e,t){window.URL=window.URL||window.webkitURL;var n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="blob",n.onload=function(){if(200==this.status){var e=this.response,n=new FileReader;n.onloadend=function(e){var n=e.target.result;t&&t(n)},n.readAsDataURL(e)}},n.send()}function B(e){var t=e.wrap,n=e.imageArr,r=e.derection,a=void 0===r?"down":r;if(n&&!(n.length<=0)){var i=n.length,o=t.scrollTop,s=t.clientHeight;switch(a){case"down":for(var c=0;c<i;c++){var u=n[c],d=u.getAttribute("originurl"),l=u.getAttribute("src");if(!(u.offsetTop-o<=s))return c>=1?c-1:0;d&&d!=l&&u.setAttribute("src",d)}break;case"up":for(var p=i-1;p>=0;p--){var h=n[p],m=h.getAttribute("originurl"),f=h.getAttribute("src"),g=h.getBoundingClientRect().top;g>=-100&&g<s+300&&m&&m!=f&&h.setAttribute("src",m)}break}}}function F(e,t){if(e+="",e.match("-")){var n=0;return e.split("-").forEach(function(e){e!==t&&(n=e%9)}),n+""}return e%9+""}function W(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:600,r=(window.screen.availHeight-30-n)/2,a=(window.screen.availWidth-10-t)/2,i=window.open(e,"_blank","height="+n+", width="+t+", top="+r+", left="+a+", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no");return i}function J(e){var t=localStorage.getItem("userOpt")||"{}";return t=JSON.parse(t),t[e]||""}function z(e,t){var n=localStorage.getItem("userOpt")||"{}";n=JSON.parse(n),n[e]=t,localStorage.setItem("userOpt",a()(n))}},3461:function(e,t,n){},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-wrapper"},[n("div",{staticClass:"pub-mask",on:{click:function(t){e.visible=!1}}}),n("packet-send",{attrs:{visible:e.visible},on:{hidePopup:e.hidePopup}})],1):e._e()])},a=[],i=n("8973");i["default"].component("packetSend",function(){return n.e("chunk-4031c6b3").then(n.bind(null,"6a90"))});var o={name:"packetSendPopup",data:function(){return{visible:!0}},methods:{hidePopup:function(){this.visible=!1}}},s=o,c=n("fc05"),u=Object(c["a"])(s,r,a,!1,null,null,null),d=u.exports,l=n("6103");d.install=function(e,t){var n,r=e.extend(d);e.prototype.$packetSend=function(){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:l["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=d},3537:function(e,t,n){"use strict";var r=n("8973"),a=r["default"].directive("focus",{inserted:function(e){setTimeout(function(){e.focus()})}});t["a"]={focus:a}},3729:function(e,t,n){},4:function(e,t){},"411a":function(e,t,n){"use strict";n("dcfb");var r=n("ab01"),a=n.n(r),i=(n("b5aa"),n("4457")),o=n("a585"),s=n("26cb"),c=n("5f19"),u=n("d2eb"),d=null,l=function(){function e(){Object(o["a"])(this,e)}return Object(s["a"])(e,null,[{key:"initDb",value:function(){var t=Object(i["a"])(regeneratorRuntime.mark(function t(){var n;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(n=localStorage.getItem("user_id"),d&&e.curDBUserId==n){t.next=6;break}return e.curDBUserId!=n&&(e.curDBUserId=n),t.next=5,p();case 5:d=t.sent;case 6:return t.abrupt("return",d);case 7:case"end":return t.stop()}},t,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"init",value:function(){var t=Object(i["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:if(!d){t.next=6;break}return t.abrupt("return",d.transaction(n,"readwrite").objectStore(n));case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}},t,this)}));function n(e){return t.apply(this,arguments)}return n}()}]),e}();function p(){return h.apply(this,arguments)}function h(){return h=Object(i["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t=l.curDBUserId,t){e.next=3;break}return e.abrupt("return",null);case 3:return n="database_".concat(t),r=3,e.next=7,Object(u["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})}}).catch(function(e){console.error("initDb error:"+e.message)});case 7:return a=e.sent,e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)})),h.apply(this,arguments)}Object(c["a"])(l,"curDBUserId",localStorage.getItem("user_id"));var m=l,f=function(){function e(t){Object(o["a"])(this,e),this.tableName=t}return Object(s["a"])(e,[{key:"getObjTable",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",m.init(this.tableName));case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()},{key:"replaceObject",value:function(){var e=Object(i["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:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:n.put(t);case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"replaceObjects",value:function(){var e=Object(i["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:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:for(r in t)n.put(t[r]);case 6:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateObject",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t,n){var r,i,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(r=e.sent,r){e.next=5;break}return e.abrupt("return");case 5:e.t0=regeneratorRuntime.keys(n);case 6:if((e.t1=e.t0()).done){e.next=22;break}if(i=e.t1.value,o=null,i!=r.keyPath){e.next=15;break}return e.next=12,r.get(n[i]);case 12:o=e.sent,e.next=18;break;case 15:return e.next=17,r.index(i).get(n[i]);case 17:o=e.sent;case 18:return o&&(o=a()(o,t),r.put(o)),e.abrupt("break",22);case 22:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}]),e}();t["a"]=f},"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",on:{click:function(t){e.visible=!1}}}),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],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){return 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(e._s(e.$t("userinfo.changePhoto")))])]),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._s(e.$t("userinfo.bindAccounts")))]),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._s(e.$t("userinfo.openingSoon")))]):e._e(),t.account?n("div",{staticClass:"fr"},[n("span",[e._v(e._s(0===t.is_visible?e.$t("userinfo.private"):e.$t("userinfo.public")))]),n("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#2298f0","inactive-color":"#cbcbcb"},on:{change:function(n){return e.hanldeChange(t,n)}},model:{value:t.is_visible,callback:function(n){e.$set(t,"is_visible",n)},expression:"item.is_visible"}}),n("div",{staticClass:"btn-unbind",on:{click:function(n){return n.stopPropagation(),e.unbindAccount(t.type)}}},[e._v(e._s(e.$t("userinfo.unbind")))])],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){return e.bindAccount(t.type)}}},[e._v(e._s(e.$t("userinfo.bind")))])],1)})],2)]):e._e()])]):e._e()])},a=[],i=n("bd31"),o=(n("2df7"),n("ad09"),n("8058")),s=n.n(o),c=(n("3b70"),n("dfe5")),u=n.n(c),d=(n("dc12"),n("5cf1"),n("94c8")),l=n.n(d),p=n("8973"),h=n("52c1"),m=n("2671"),f=n("5975");p["default"].component(l.a.name,l.a),p["default"].component(u.a.name,u.a),p["default"].component(s.a.name,s.a);var g={name:"infoPopup",mixins:[m["a"]],data:function(){return{isMe:!0,newNickName:"",isEditName:!1,newUserName:"",isEditIntroduce:!1}},computed:Object(i["a"])({},Object(h["e"])({scatter:function(e){return e.scatter},userInfo:function(e){return e.userInfo}})),methods:{hanldeChange:function(e,t){var n=e.type;f["a"].user.setVisible({type:n,is_visible:t}).then(function(e){e.data})},bindAccount:function(e){switch(e){case"eos":this.bindEos();break;case"tg":this.bindTg();break}},handleEditName:function(){var e=this;this.newNickName!==this.userInfo.nick_name?this.newNickName.length>16?this.$showTips(this.$t("userinfo.nickTooLong")):(this.isEditName=!1,this.newNickName.length&&f["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(e.$t("public.updateSucc"))})):this.isEditName=!1},handleEditIntroduce:function(){var e=this;this.newUserName!==this.userInfo.user_name?/^[a-zA-Z_0-9]{5,20}$/i.test(this.newUserName)?(this.isEditIntroduce=!1,this.newUserName.length&&f["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(e.$t("public.updateSucc"))})):this.$showTips(this.$t("userinfo.wrongPattern")):this.isEditIntroduce=!1}}},v=g,b=(n("6386"),n("fc05")),k=Object(b["a"])(v,r,a,!1,null,"b07b3bfe",null),w=k.exports,_=n("6103");w.install=function(e,t){var n,r=e.extend(w);e.prototype.$showUserInfo=function(){n&&(document.body.removeChild(n.$el),n=null),n=new r({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:_["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=w},"455d":function(e,t,n){"use strict";n.d(t,"a",function(){return v});n("dc12");var r=n("a700"),a=n.n(r),i=(n("3b70"),n("ad09"),n("dfe5")),o=n.n(i),s=(n("4694"),n("badb")),c=n.n(s),u=(n("61e5"),n("b5aa"),n("4457")),d=n("bd31"),l=n("5975"),p=n("33f8"),h=n("52c1"),m=n("6bec"),f=n("7df3"),g=0,v={data:function(){return{curLoginType:"",winHandler:null,winTimer:null,meechatType:Object(p["o"])(),from:decodeURIComponent(Object(p["q"])("from"))}},computed:Object(d["a"])({},Object(h["e"])(["isLogining","account"])),methods:Object(d["a"])({},Object(h["d"])(["setLogining"]),Object(h["b"])(["getUserInfo","setScatter","setAccount","doScatterLogin","doContractLogin","initSocket"]),{checkLocalLogin:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.setLogining(!0),t=localStorage.getItem("user_id"),n=localStorage.getItem("token"),t&&n){e.next=6;break}return this.setLogining(!1),e.abrupt("return",!1);case 6:return e.next=8,l["a"].user.checkLocalLogin({user_id:t,token:n});case 8:if(r=e.sent,a=r.data,!a.data.is_login){e.next=24;break}if(this.curLoginType=Object(p["r"])("loginType")||"eos","eos"!=this.curLoginType||top!=self){e.next=18;break}return e.next=15,this.loginEos();case 15:this.setLogining(!1),e.next=21;break;case 18:this.$store.commit("setUserId",t),this.$store.commit("setToken",n),this.loginSuccCallBack();case 21:return e.abrupt("return",!0);case 24:return localStorage.clear(),this.setLogining(!1),e.abrupt("return",!1);case 27:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),getParentIdentity:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(self===top){e.next=13;break}return e.prev=1,e.next=4,this.postMessager.send({action:"meechat:getIdentity"});case 4:t=e.sent,n=t.accounts.find(function(e){return"eos"===e.blockchain}),localStorage.setItem("account",c()(n)),this.setAccount(n),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),this.showLoginBtn=!0;case 13:case"end":return e.stop()}},e,this,[[1,10]])}));function t(){return e.apply(this,arguments)}return t}(),loginEosParent:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.setLogining(!0),e.prev=1,e.next=4,this.getParentIdentity();case 4:if(this.account){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,this.doContractLogin();case 8:location.replace(location.href.replace("show=false","show=true")),this.showLoginBtn=!1,this.setLogining(!1),e.next=18;break;case 13:e.prev=13,e.t0=e["catch"](1),e.t0.type||(t=JSON.parse(e.t0),n=t.error.details,o()({message:n[0].message,type:"error"})),this.showLoginBtn=!0,this.setLogining(!1);case 18:case"end":return e.stop()}},e,this,[[1,13]])}));function t(){return e.apply(this,arguments)}return t}(),loginEos:function(){var e=this;return this.curLoginType="eos",new a.a(function(t,n){e.setLogining(!0),m["a"].scatter.connect("MEE_CHAT").then(function(){var r=Object(u["a"])(regeneratorRuntime.mark(function r(a){return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:if(!a){r.next=19;break}return e.setScatter(m["a"].scatter),window.ScatterJS=null,r.prev=3,r.next=6,e.doScatterLogin(e.$router);case 6:return"mini"==e.meechatType&&localStorage.setItem("account",c()(e.account)),r.next=9,e.doContractLogin();case 9:e.loginSuccCallBack(),r.next=16;break;case 12:r.prev=12,r.t0=r["catch"](3),n(r.t0),"mini"==e.meechatType?e.showLoginBtn=!0:e.isLogining&&(e.$router.replace("/login"),e.$store.commit("chatAppLogin",!1));case 16:e.setLogining(!1),r.next=23;break;case 19:"mini"==e.meechatType?e.showLoginBtn=!0:e.isLogining&&e.$router.replace("/login"),e.isLogining&&!localStorage.getItem("user_id")&&Object(p["z"])(e.$t("login.installScatter"),"Scatter"),e.setAccount(""),e.setLogining(!1);case 23:t();case 24:case"end":return r.stop()}},r,this,[[3,12]])}));return function(e){return r.apply(this,arguments)}}())})},loginSimpleWallet:function(){this.curLoginType="simplewallet";var e={protocol:"SimpleWallet",version:"1.0",dappName:"MeeChat",dappIcon:"https://static.meechat.me/cdn/mee.chat/dist/img/icons/meechat_icon.png",action:"login",uuID:Math.random(),loginUrl:location.origin+"/user/simplewallet"},t="simplewallet://eos.io?param="+c()(e);this.winHandler=Object(p["w"])(t),this.loginCheck(e.uuID,0)},loginTelegram:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.curLoginType="telegram",this.winHandler=Object(p["w"])(""),e.next=4,l["a"].user.tgCSRF({type:"login"});case 4:t=e.sent,n=t.data,this.winHandler.location.href=n.data.url,this.loginCheck(n.data.csrf_token);case 8:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),loginCheck:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(t,n){var r,i,o,s,c,u=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(0!==n){e.next=4;break}clearTimeout(g),e.next=6;break;case 4:if(!(n>=60)){e.next=6;break}return e.abrupt("return",!1);case 6:if(r={},i=!1,o=!0,e.prev=9,"simplewallet"!=this.curLoginType){e.next=17;break}return e.next=13,l["a"].user.simplewalletCheck({uuID:t});case 13:r=e.sent,i=r.data&&1===r.data.result,e.next=23;break;case 17:if("telegram"!=this.curLoginType){e.next=23;break}return e.next=20,l["a"].user.tgLogin2({csrf_token:t});case 20:r=e.sent,i=r.data&&r.data.data&&r.data.data.status>0,o=null!=this.winHandler||r.data&&0==r.data.status;case 23:e.next=27;break;case 25:e.prev=25,e.t0=e["catch"](9);case 27:if(!i){e.next=39;break}return s=r.data.data.user_id,c=r.data.data.token,localStorage.setItem("user_id",s),localStorage.setItem("token",c),this.$store.commit("setUserId",s),this.$store.commit("setToken",c),this.loginSuccCallBack(),null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),e.abrupt("return",a.a.resolve(r.data));case 39:o&&(g=setTimeout(function(){u.loginCheck(t,++n)},1e3));case 40:case"end":return e.stop()}},e,this,[[9,25]])}));function t(t,n){return e.apply(this,arguments)}return t}(),loginSuccCallBack:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:this.setLogining(!1),Object(p["y"])("loginType",this.curLoginType),e.t0=this.meechatType,e.next="mini"===e.t0?5:"h5"===e.t0?7:"pc"===e.t0?7:14;break;case 5:return this.$emit("initMiniLoginCallback"),e.abrupt("break",14);case 7:return console.log("loginSuccCallBack, meechatType:"+this.meechatType+", this.$route.name:"+this.$route.name),"h5"===this.meechatType&&"login"===this.$route.name&&(t=this.from&&"null"!=this.from?this.from:"/",console.log("this.$router.replace, url:"+t),this.$router.replace(t)),e.next=11,this.initSocket();case 11:return this.$store.commit("chatAppLogin",!0),this.$store.commit("toApp",!0),e.abrupt("break",14);case 14:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}),mounted:function(){var e=this;if(top!=self){var t=function(t){"meechat:setShow"===t.action?e.handleToggleChat(t.show):"meechat:logout"===t.action&&e.handleLogout2()};this.postMessager=new f["a"]("*",{callback:t}),window.postMessager=this.postMessager}}}},"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",on:{click:function(e){e.stopPropagation()}}},[n("div",{staticClass:"pub-mask",on:{click:function(t){e.visible=!1}}}),n("invite",{attrs:{inviteType:e.inviteType,ext:e.ext},on:{hidePopup:e.hidePopup}})],1):e._e()])},a=[],i=n("8973");i["default"].component("invite",function(){return Promise.all([n.e("chunk-437e2b39"),n.e("chunk-81a02e6e")]).then(n.bind(null,"5bd6"))});var o={name:"invitePopup",data:function(){return{visible:!0}},methods:{hidePopup:function(){this.visible=!1}}},s=o,c=n("fc05"),u=Object(c["a"])(s,r,a,!1,null,null,null),d=u.exports,l=n("6103");d.install=function(e,t,n){var r,a=e.extend(d);e.prototype.$showInvite=function(e,i){r&&(document.body.removeChild(r.$el),r=null),r=new a({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},i18n:l["a"],data:function(){return{inviteType:e,ext:i}}}),document.body.appendChild(r.$el)}};t["a"]=d},5975:function(e,t,n){"use strict";var r=n("ab01"),a=n.n(r),i=n("badb"),o=n.n(i),s=(n("c9db"),n("ad09"),n("514e")),c=n.n(s),u=n("a700"),d=n.n(u),l=(n("b5aa"),n("4457")),p=n("7f43"),h=n.n(p),m=n("0427"),f=n.n(m),g=n("1c04"),v=n("33f8"),b="";"8080"===window.location.port&&(b="//test.mee.chat/");var k=h.a.create({baseURL:b,headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e,t){return e=f.a.stringify(e),e}],transformResponse:[],withCredentials:!0});function w(e){return _.apply(this,arguments)}function _(){return _=Object(l["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=a()(n,t.data):t.data=n:"get"===t.method&&(t.params?t.params=a()(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]])})),_.apply(this,arguments)}k.host=b,k.interceptors.request.use(function(){var e=Object(l["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=19;break}if(localStorage.getItem("user_id")&&localStorage.getItem("token")){e.next=16;break}if(!Object(v["o"])().indexOf("h5")){e.next=6;break}Object(v["A"])(),e.next=14;break;case 6:return e.prev=6,e.next=9,g["a"].dispatch("doGameLogin");case 9:return e.abrupt("return",w(t));case 12:e.prev=12,e.t0=e["catch"](6);case 14:e.next=17;break;case 16:return e.abrupt("return",w(t));case 17:e.next=20;break;case 19:return e.abrupt("return",w(t));case 20:case"end":return e.stop()}},e,this,[[6,12]])}));return function(t){return e.apply(this,arguments)}}(),function(e){return d.a.reject(e)}),k.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?d.a.resolve(e):-5!==e.data.code?(e.config.noErrorMsg||c.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),d.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return d.a.reject(e)}),k.request2=function(){var e=Object(l["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 d.a(function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(r,a){var i,s,c,u,d,l,p;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return i=null,e.next=3,w(t);case 3:if(t=e.sent,"post"===t.method?i=t.data:"get"===t.method&&(i=t.params),s="",t.cacheKeys)for(c in t.cacheKeys)u=t.cacheKeys[c],s+=u+"="+i[u]+"&";else s=o()(i);return d=t.method+":"+t.url+"?"+s,l=localStorage.getItem(d),l&&(n=JSON.parse(l),t.callback(n)),e.next=12,k.request(t);case 12:n=e.sent,delete n["config"],delete n["request"],p=o()(n),l!=p&&(n.data.result&&localStorage.setItem(d,p),t.callback(n));case 17:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()));case 5:return e.next=7,k.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 y=k,I={groupAuth:function(e){return y.request({url:"default/groupAuth",method:"post",needLogin:!0,data:e})},feedback:function(){return y.request({url:"default/tick ",method:"post",needLogin:!0})}},x="";"8080"===window.location.port&&(x="//test.mee.chat/");var S=h.a.create({baseURL:x,headers:{"Content-Type":"multipart/form-data"},withCredentials:!0});S.host=x,S.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?d.a.resolve(e):-5!==e.data.code?(c.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),d.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return d.a.reject(e)});var L=S,C={getRandom:function(e){return y.get("user/random",{params:e})},getRandom2:function(e){return y.get("user/random2",{params:e})},eosLogin:function(e){return y.post("user/eosLogin",e)},eosLogin2:function(e){return y.post("user/eosLogin2",e)},eosBind:function(e){return y.request({url:"user/eosBind",method:"post",needLogin:!0,data:e})},eosBind2:function(e){return y.request({url:"user/eosBind2",method:"post",needLogin:!0,data:e})},ethLogin:function(e){return y.post("user/ethLogin",e)},simplewalletCheck:function(e){return y.get("user/simplewalletCheck",{params:e,noErrorMsg:!0})},ethBind:function(e){return y.request({url:"user/ethBind",method:"post",needLogin:!0,data:e})},unBind:function(e){return y.request({url:"user/unbind",method:"post",needLogin:!0,data:e})},tgCSRF:function(e){return y.request({url:"user/tgCSRF",method:"post",data:e})},tgLogin2:function(e){return y.request({url:"user/tgLogin2",method:"post",data:e})},tgBind2:function(e){return y.request({url:"user/tgBind2",method:"post",needLogin:!0,data:e})},checkLocalLogin:function(e){return y.request({url:"user/checkLogin",method:"post",data:e})},changeUserName:function(e){return y.request({url:"user/changeUserName",method:"post",needLogin:!0,data:e})},changeNickName:function(e){return y.request({url:"user/changeNickName",method:"post",needLogin:!0,data:e})},changePhoto:function(e){return L.request({url:"user/changePhoto",method:"post",data:e})},setVisible:function(e){return y.request({url:"user/setVisible",method:"post",needLogin:!0,data:e})},getInfo:function(e){return y.request({url:"user/info",method:"get",needLogin:!0,params:e})},getOtherInfo:function(e){return y.request({url:"user/info",method:"get",needLogin:!1,params:e})}},T=(n("dcfb"),n("8d4d")),M={getNewMsg:function(){var e=Object(l["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,y.request({url:"group/newMsg",method:"get",needLogin:!1,params:t});case 2:return n=e.sent,r=new T["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(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return y.request({url:"group/historyMsg",method:"get",needLogin:!1,params:e})},getGroupInfo:function(e){return y.request({url:"group/info",method:"get",needLogin:!1,params:e})},getGroupInfo2:function(e,t){y.request2({url:"group/info",method:"get",needLogin:!1,cache:!0,cacheKeys:["user_id","group_id"],params:e,callback:t})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),y.request({url:"group/sendMsg",method:"post",needLogin:!0,data:e})},createGroup:function(e){return y.request({url:"group/create",method:"post",needLogin:!0,data:e})},joinGroup:function(e){return y.request({url:"group/join",method:"get",needLogin:!0,params:e})},leaveGroup:function(e){return y.request({url:"group/leave",method:"get",needLogin:!0,params:e})},blockUser:function(e){return y.request({url:"group/blockUser",method:"get",needLogin:!0,params:e})},unblockUser:function(e){return y.request({url:"group/unblockUser",method:"get",needLogin:!0,params:e})},changeName:function(e){return y.request({url:"group/changeName",method:"post",needLogin:!0,data:e})},changeNotice:function(e){return y.request({url:"group/changeNotice",method:"post",needLogin:!0,data:e})},changeCover:function(e){return L.request({url:"group/changeCover",method:"post",data:e})},changeTitle:function(e){return y.request({url:"group/changeTitle",method:"post",needLogin:!0,data:e})},invites:function(e){return y.request({url:"group/invites",method:"post",needLogin:!0,data:e})},removes:function(e){return y.request({url:"group/removes",method:"post",needLogin:!0,data:e})},repealGroupMsg:function(e){return y.request({url:"group/repealMsg",method:"post",needLogin:!0,data:e})},sendImageMsg:function(e){return y.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:e})},getFriends:function(e){return y.request({url:"group/getFriends",method:"get",needLogin:!0,params:e})},pinMsg:function(e){return y.request({url:"group/pinMsg",method:"post",needLogin:!0,data:e})},unpinMsg:function(e){return y.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:e})},addAdmin:function(e){return y.request({url:"group/addAdmin",method:"post",needLogin:!0,data:e})},removeAdmin:function(e){return y.request({url:"group/removeAdmin",method:"post",needLogin:!0,data:e})},searchMember:function(e){return y.request({url:"group/memberSearch",method:"post",needLogin:!0,data:e})},changeCreator:function(e){return y.request({url:"group/changeCreator",method:"post",needLogin:!0,data:e})},getHotList:function(){return y.request({url:"group/hotList ",method:"post",needLogin:!0})}},O={getNewMsg:function(){var e=Object(l["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,y.request({url:"person/newMsg",method:"get",needLogin:!0,params:t});case 2:return n=e.sent,r=new T["a"],e.next=6,r.saveMsg(t["session_id"],n.data.data);case 6:return n.data.data.list.forEach(function(e){4==e.msg_type?e.msg=JSON.parse(Object(v["i"])(e.msg)):e.msg=Object(v["i"])(e.msg)}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return y.request({url:"person/historyMsg",method:"get",needLogin:!0,params:e})},sendMsg:function(e){return e.msg=Object(v["g"])(e.msg),y.request({url:"person/sendMsg",method:"post",needLogin:!0,data:e})},repealPersonMsg:function(e){return y.request({url:"person/repealMsg",method:"post",needLogin:!0,data:e})}},j={sessionList:function(e){return y.request2({url:"session/list",method:"get",needLogin:!0,callback:e})},setRead:function(e){return y.request({url:"session/setRead",method:"post",needLogin:!0,data:e})},setMute:function(e){return y.request({url:"session/mute",method:"post",needLogin:!0,data:e})},cancelMute:function(e){return y.request({url:"session/unMute",method:"post",needLogin:!0,data:e})},setPin:function(e){return y.request({url:"session/pin",method:"post",needLogin:!0,data:e})},cancelPin:function(e){return y.request({url:"session/unPin",method:"post",needLogin:!0,data:e})},deleteSession:function(e){return y.request({url:"session/delete",method:"post",needLogin:!0,data:e})},fileUpload:function(e){return y.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:e})},getMiniUnRead:function(e){return y.request({url:"session/miniUnRead ",method:"post",needLogin:!0,data:e})}},N={grabPacket:function(e){return y.request({url:"redpack/grab",method:"get",needLogin:!0,params:e})},grabDetail:function(e){return y.request({url:"redpack/detail",method:"get",needLogin:!0,params:e})},sendList:function(e){return y.request({url:"redpack/sendList",method:"get",needLogin:!0,params:e})},receiveList:function(e){return y.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:e})}},P={getWebhook:function(e){return y.request({url:"tg/webhook",method:"get",needLogin:!0,params:e})},getSyncInfo:function(e){return y.request({url:"tg/sync",method:"post",needLogin:!0,params:e})},doSync:function(e){return y.request({url:"tg/doSync",method:"post",needLogin:!0,params:e})}};t["a"]={host:y.host,base:I,user:C,group:M,person:O,session:j,tg:P,redpack:N}},"5a09":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",on:{click:function(t){e.visible=!1}}}),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:""},on:{click:function(t){return e.$showImgPreview(e.userInfo.cover_photo)}}}):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_name))])])]),n("div",{staticClass:"account-wrap min-height-account"},[n("div",{staticClass:"title"},[e._v(e._s(e.$t("userinfo.bindAccounts")))]),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._s(e.$t("userinfo.notBindOrHide")))])])}):e._e()],2),e.$store.state.userId!=e.userId&&"mini"===e.meechatType?n("a",{staticClass:"send-msg-btn",attrs:{href:e.linkToOther,target:"meechatpc"},on:{click:function(t){e.visible=!1}}},[e._v(e._s(e.$t("public.sendMessage")))]):e.$store.state.userId!=e.userId?n("button",{staticClass:"send-msg-btn",on:{click:e.sendMsg}},[e._v(e._s(e.$t("public.sendMessage")))]):e._e()]):e._e()])]):e._e()])},a=[],i=(n("2df7"),n("ad09"),n("8058")),o=n.n(i),s=(n("3b70"),n("dfe5")),c=n.n(s),u=(n("dc12"),n("5cf1"),n("94c8")),d=n.n(u),l=n("8973"),p=n("2671");l["default"].component(d.a.name,d.a),l["default"].component(c.a.name,c.a),l["default"].component(o.a.name,o.a);var h={name:"infoPopup",mixins:[p["b"]]},m=h,f=(n("16c9"),n("fc05")),g=Object(f["a"])(m,r,a,!1,null,null,null),v=g.exports,b=n("6103");v.install=function(e,t,n){var r,a=e.extend(v);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}},i18n:b["a"],data:function(){return{visible:!1,userId:e}}}),document.body.appendChild(r.$el)}};t["a"]=v},"5cfd":function(e,t,n){"use strict";var r=n("cc90"),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",on:{click:function(t){e.visible=!1}}}),n("div",{staticClass:"pub-modal avater-modal"},[n("div",{staticClass:"modal-hd"},[n("div",{staticClass:"title"},[e._v("\n "+e._s(e.isMe?e.$t("userinfo.editAvatar"):e.$t("userinfo.editGroupAvatar"))+"\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(e._s(e.$t("public.cancel")))])],1)])]):e._e()])},a=[],i=n("ab01"),o=n.n(i),s=(n("3b70"),n("ad09"),n("dfe5")),c=n.n(s),u=(n("03cf"),n("f4ec")),d=n.n(u),l=(n("dc12"),n("5cf1"),n("94c8")),p=n.n(l),h=n("8973");h["default"].component(p.a.name,p.a),h["default"].component(d.a.name,d.a),h["default"].component(c.a.name,c.a);var m={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:o()(e,{group_id:this.$store.state.curSession})}},methods:{handleAvatarSuccess:function(e,t){this.imageUrl=URL.createObjectURL(t.raw),this.$showTips(this.$t("public.uploadSucc")),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}),console.log("群头像update"))},beforeAvatarUpload:function(e){var t=e.type.indexOf("image")>-1,n=e.size/1024/1024<2;return t&&n||this.$showTips(this.$t("userinfo.maxUploadTips")),t&&n}},created:function(){}},f=m,g=(n("b83c"),n("fc05")),v=Object(g["a"])(f,r,a,!1,null,null,null),b=v.exports,k=n("6103");b.install=function(e,t){var n,r=e.extend(b);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}},i18n:k["a"],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}},i18n:k["a"],data:function(){return{visible:!0,imageUrl:e,isMe:!1}}}),document.body.appendChild(n.$el)}};t["a"]=b},6103:function(e,t,n){"use strict";var r=n("8973"),a=n("c7ac"),i={h5:{chat:"Chat",mine:"Mine",nickname:"Nickname",username:"ID",avatar:"Avatar",editInfo:"Edit info",notBind:"Not bind",logout:"Logout",chatInfo:"Chat info",groupAvatar:"Group avatar",groupName:"Group name",input:"Please input",edit:"Edit",typeNames:["Group name","Group info","Nickname","ID"],selectContact:"Select contact",createGroup:"Create group",groupNotice:"Group Notice",meechatLogin:"Meechat Login"},mini:{logout:"Logout",accountSetting:"Account setting",openWeb:"Chat in new tab",admin:"Admin",logining:"Login...",login:"Login",server:"Server"},chat:{noMore:"No more",yesterday:"Yesterday",redpack:"RedPacket",image:"Image",audio:"Audio",video:"Video",send:"Send",unreadMsg:" Messages unread",joinGroup:"Join Group",hotGroupRecommend:"Hot Groups",enterTips:"Enter Send,Ctrl + Enter NewLine",hava:"",atYouWithPeople:"people @ you",atYou:"@ you",youAreBan:"You are prohibitions",cannotBeEmpty:"Chat content can not be empty",maxUploadTips:"Upload file size limitation: audio 2M or video 3M",news:"News",closePinMsg:"Do you want to close the top message?",closeSessionMsg:"Do you want to delete this session?",quote:"Quote",copy:"Copy",paste:"Paste",forward:"Forward",sticky:"Sticky",revoke:"Revoke",revoked:" revoke",aMsg:"a message",liftaBan:"Lift a ban",revokeMsg:" revoke a message",deleteSession:"Delete session",otherRevoke:"Someone revoke a message.",msgType:["image","video","audio","redpack"],imageComfirm:"Send Image",videoComfirm:"Send Video/Audio"},redPacket:{title:"Send Red Packet",random:"R",totalAmount:"Total",tip1:"Current mode: random amount",num:"Number",unit:"Packets",placeholder1:"number",tip2:"The group has {num} members",memo:"Good luck",tip3:"Unclaimed red packet will be refunded after 24 hours",sendBtn:"Put money into red packet",helpTitle:"Help",helpRule1:"1. The red envelopes are all hand-made red envelopes, and the amount of red envelopes grabbed is random; the maximum number of red envelopes is 100 at a time.",helpRule2:"2. The money can be selected when sending the red envelope; the amount of the red envelope is transferred directly to the binding account of the corresponding currency; if the account is not bound, the balance of the currency will be transferred immediately after the binding account.",helpRule3:"3. MeeChat charges 2% of the amount of each red envelope to cover the cost of the chain.",maxMoneyTip:"Total money can not more than",minMoneyTip:"Total money can not less than",singleMinMoneyTip:"Single packet can not less than",maxNumberTip:"Max pakcet number is",noPacketTips:"Slow hand, red packet is over",expiredPacketTips:"Packet is expired",open:"open",seePacketDetail:"See packet detail",transferTo:"Transfered to ",account:" account",best:" Best luck",received:"already received",lootAll:"Loot all",expired:"expired",tip4:"Total {total} {unit}, {num} {unit} Has been open",drawYour:" got your",youDraw:"you got",whos:" ",sendForEosTips:"Red Packet Sending is only available to EOS logged-in users"},group:{recommendGroup:"Recommend group",groupName:"Group name",enter:"Enter",join:"Join",searchMember:"Search members",add:"Add",delete:"Delete",showAll:"Slide down",hideAll:"Slide up",setGroupAvatar:"Group avatar",groupPin:"Info",noPin:"No info",groupInviteLink:"Share Link",groupId:"Group ID",doNotDisturb:"Mute Session",cancelDisturb:"Unmute Session",topChat:"Pin Session",admin:"Group admin",quitGroup:"Leave Group",groupPinInput:"Write group info",adminSetting:"Group admin setting",groupCertification:"Application for group certification",groupTypeSetting:"Group Type Setting",relateTelegram:"Relate Telegram",needRelateTip:"Haven't bound your Telegram account ,so you need to do follow-up after binding.",teleStep1:"Search for @meechatbot in Telegram and pull the account from the group owner into the Telegram group that needs synchronization. Follow the boot steps to complete the synchronization.",teleStep2:"After synchronization, the messages of MeeChat group and Telegram group are synchronized in real time.",clickBind:"Bind",needRelateTelegram:"Relate Telegram",relate:"Realte",createGroupToRelate:"Create New Group To Relate",createSuccess:"Create Success",groupNameTips:"Please Enter Group Name",groupNameLengthTips:"Group name is too long, please enter less than 16 characters",groupMgrMostTips:"Group administrators can only set up five people at most.",groupMgrComfime:"Determine to transfer group owners to",groupMgrResult:"Transferred group owner to",leaveComfirm:"Confirm to quit the group chat?",leaveTip:"Has withdrawn from the group chat"},emoji:{lastestUse:"Lastest use",person:"Person",nature:"Nature",food:"Food",activity:"Activity",trip:"Trip",symbol:"Symbol"},userinfo:{changePhoto:"Change avatar",bindAccounts:"Bind accounts",notBindOrHide:"Not bind or hide",openingSoon:"Opening soon",public:"Public",private:"Private",bind:"Bind",unbind:"Unbind",unbindSuccess:"Unbind Success",unbindMsg:"Do you want to unbind",nickTooLong:"Nickname too long , please write it in 16 chars",wrongPattern:"Only allow number letter and underline between 5-20 chars",maxUploadTips:"Please upload image within 2M",editAvatar:"Edit avatar",editGroupAvatar:"Edit group avatar",inputIsEmpty:"Input value can not be empty",groupNameTooLong:"Group name too long , please write it in 16 chars"},invite:{searchContact:"Search contact",noContact:"No contact",transferGroupOwner:"Transfer group owner",seleted:"Already select",numberMember:" members",checkDeleteMemberTips:"Please check the person that need to be deleted",checkAddMemberTips:"Please check the person that need to be add",writeGroupName:"Please write group name"},public:{confirm:"Confirm",cancel:"Cancel",complete:"Complete",updateSucc:"Update success",uploadSucc:"Upload success",loading:"Loading",admin:"(Admin)",owner:"(Owner)",contact:"(Contact)",sendMessage:"Send message",loginTip:"Please login",noMoney:"The balance of account is insufficient.",badNetwork:"The network is too bad. please try again. ",close:"Close",ban:"Prohibitions",setting:"Setting",remove:"Remove",you:"you",quit:"Logout",feedback:"Feedback",chinese:"中文",english:"英文",closeMsg:"Close notification",openMsg:"Open notification",search:"Search",searchHotGroup:"Search Hot Group",item:"item",me:"I",other:"the other side",pswSetting:"Password Setting",pswEdit:"Password Edit",installPwa:"Install MeeChat Desktop Edition"},login:{login:"login",accountLogin:"Account Login",autoLogin:"Auto login",loginWithScatter:"Log in using scatter",loadScatter:"Not installed? download scatter program",installScatter:"Please install scatter plugin",otherType:"Login",loginTipAccount:"Please Enter MeeChat Username",loginTipPsw:"Please Enter MeeChat Password"},psw:{setPsw:"Password Setting",oldPsw:"Old Password",oldPswTip:"Please Enter Old Password",newPsw:"New Password",newPswTip:"Please Enter Old Password",comfirmPsw:"Comfirm Password",comfirmPswTip:"Please Enter Old Password",lenTip:"Password must be at least 8 characters",pswAdd:"After setting MeeChat password, you can login to MeeChat through MeeChat account + password."}},o=i,s={h5:{chat:"聊天",mine:"我的",nickname:"昵称",username:"ID",avatar:"头像",editInfo:"编辑资料",notBind:"未绑定",logout:"退出登录",chatInfo:"聊天信息",groupAvatar:"群头像",groupName:"群名字",input:"请输入",edit:"编辑",typeNames:["群名字","群公告","昵称","ID"],selectContact:"选择联系人",createGroup:"建群",groupNotice:"群公告",meechatLogin:"账号登录"},mini:{logout:"注销",accountSetting:"账号设置",openWeb:"在网页版打开聊天",admin:"群主",logining:"登录中...",login:"登录",server:"客服"},chat:{noMore:"没有更多了",yesterday:"昨天",redpack:"红包",image:"图片",audio:"音频",video:"视频",send:"发送",unreadMsg:"条未读消息",joinGroup:"加入群聊",hotGroupRecommend:"热门群组推荐",enterTips:"Enter发送,Ctrl + Enter 换行",hava:"有",atYouWithPeople:"个人提到了你",atYou:"提到了你",youAreBan:"您已被禁言",cannotBeEmpty:"聊天内容不能为空",maxUploadTips:"上传文件大小限制:音频2M以内,视频3M以内",news:"消息",closePinMsg:"确定要关闭置顶消息吗?",closeSessionMsg:"确认删除当前会话?",quote:"引用",copy:"复制",paste:"粘贴",forward:"转发",sticky:"置顶",revoke:"撤回",revoked:"撤回了",aMsg:"的一条消息",liftaBan:"解禁",revokeMsg:"撤回了一条消息",deleteSession:"删除会话",otherRevoke:"有人撤回一条消息",msgType:["图片","视频","音频","红包"],imageComfirm:"发送图片确认",videoComfirm:"发送视频/音频确认"},redPacket:{title:"发红包",random:"拼",totalAmount:"总金额",tip1:"当前为拼手气红包",num:"红包个数",placeholder1:"请填写个数",unit:"个",tip2:"本群共{num}人",memo:"恭喜发财,大吉大利",tip3:"未领取的红包,将于24小时后发起退款",sendBtn:"塞钱进红包",helpTitle:"帮助",helpRule1:"1. 发出的红包均为拼手气红包,抢得的红包金额随机;一次最多发100个红包;",helpRule2:"2. 发红包时可选择币种;抢到的红包金额直接转账到对应币种的绑定账户;若未绑定账户,则所得币种余额在绑定账户后即刻转账;",helpRule3:"3. MeeChat会从每次发出红包的金额中收取2%的手续费,用于支付上链成本",maxMoneyTip:"总金额 不能多于",minMoneyTip:"总金额 不能少于",singleMinMoneyTip:"单个红包最小为",maxNumberTip:"红包个数最大为",noPacketTips:"手慢了,红包派完了",expiredPacketTips:"该红包已经过期。",open:"開",seePacketDetail:"查看领取详情",transferTo:"已转账到",account:"账户",best:"手气最佳",received:"已领取",lootAll:"已抢光",expired:"已过期",tip4:"共{total}{unit}红包, 已被领取{num}{unit}",drawYour:"领取了你的",youDraw:"你领取了",whos:"的",sendForEosTips:"发送红包功能只对eos登录用户开放"},group:{recommendGroup:"推荐群",groupName:"群名",enter:"进入",join:"加群",searchMember:"搜索群成员",add:"添加",delete:"删除",showAll:"展开全部",hideAll:"收起",setGroupAvatar:"群头像",groupPin:"群公告",noPin:"暂无公告",groupInviteLink:"群邀请链接",groupId:"群ID",doNotDisturb:"消息免打扰",cancelDisturb:"取消免打扰",topChat:"置顶聊天",admin:"群管理",quitGroup:"退出群组",groupPinInput:"请输入你的群公告",adminSetting:"群管理员设置",groupCertification:"申请群认证",groupTypeSetting:"群类型设置",relateTelegram:"同步Telegram群",needRelateTelegram:"需要同步Telegram群",needRelateTip:"目前你还没有绑定Telegram账号,需绑定后进行后续操作",teleStep1:"在Telegram中搜索@meechatbot,并将该账户由群主拉入到需同步的Telegram群中,跟随引导步骤即可完成同步。",teleStep2:"同步后,MeeChat群组和Telegram群的消息实时同步。",clickBind:"点击绑定",relate:"同步",createGroupToRelate:"创建新群并同步",createSuccess:"创建成功",groupNameTips:"请输入群名",groupNameLengthTips:"群名字过长,请输入16个字符以内",groupMgrMostTips:"管理员最多只能设置5个人哦",groupMgrComfime:"确定要把群主转让给",groupMgrResult:"已转让群主给",leaveComfirm:"确认退出该群聊?",leaveTip:"已退出该群聊"},emoji:{lastestUse:"最近使用",person:"人物",nature:"人物",food:"食物",activity:"活动",trip:"旅行",symbol:"符号"},userinfo:{changePhoto:"更改头像",bindAccounts:"已绑定账户",notBindOrHide:"未绑定或已隐藏",openingSoon:"即将开放",public:"已公开",private:"未公开",bind:"绑定",unbind:"解绑",unbindSuccess:"解绑成功",unbindMsg:"确定解绑",nickTooLong:"用户呢称过长,请输入16个字符以内",wrongPattern:"只能是5-20位的数字,字母下划线",maxUploadTips:"请上传2M以内的图片",editAvatar:"编辑头像",editGroupAvatar:"编辑群头像",inputIsEmpty:"信息不能为空",groupNameTooLong:"群名字过长,请输入16个字符以内"},invite:{searchContact:"搜索联系人",noContact:"暂无联系人",transferGroupOwner:"转让群主",seleted:"已选择了",numberMember:"位群成员",checkDeleteMemberTips:"请勾选需要删除的群成员",checkAddMemberTips:"请勾选需要添加的",writeGroupName:"请输入群名称"},public:{confirm:"确认",cancel:"取消",complete:"完成",updateSucc:"修改成功",uploadSucc:"上传成功",loading:"加载中",admin:"管理员",owner:"群主",contact:"联系人",sendMessage:"发消息",loginTip:"请先登录",noMoney:"账户余额不足",badNetwork:"网络太差~ 请重试",close:"关闭",ban:"禁言",setting:"设置",remove:"移除",you:"你",quit:"退出",feedback:"意见反馈",chinese:"Chinese",english:"English",closeMsg:"关闭消息",openMsg:"开启消息",search:"搜索",searchHotGroup:"搜索热门群组",item:"条",me:"我",other:"对方",pswSetting:"设置密码",pswEdit:"修改密码",installPwa:"安装MeeChat桌面版"},login:{login:"登录",accountLogin:"账号登录",autoLogin:"自动登录中",loginWithScatter:"请使用scatter进行登录",loadScatter:"未安装?请下载scatter程序",installScatter:"请安装scatter插件",otherType:"登录方式",loginTipAccount:"请输入MeeChat账号",loginTipPsw:"请输入密码"},psw:{account:"MeeChat账号",setPsw:"设置MeeChat密码",oldPsw:"旧密码",oldPswTip:"请输入旧的密码",newPsw:"新密码",newPswTip:"请输入新的密码",comfirmPsw:"确认密码",comfirmPswTip:"请再次输入新的密码",lenTip:"密码必须至少8个字符",pswAdd:"设置MeeChat密码后可以通过MeeChat账号+密码登录MeeChat"}},c=s,u=n("33f8");r["default"].use(a["a"]);var d={en:o,zh:c},l=localStorage.getItem("lang")||Object(u["n"])(),p=new a["a"]({locale:l,messages:d});t["a"]=p},6386:function(e,t,n){"use strict";var r=n("a5ae"),a=n.n(r);a.a},"76a4":function(e,t,n){"use strict";var r=n("34f3"),a=!1;function i(e){if(e)return o(e)}function o(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}function s(e,t){if(!(this instanceof s))return new s(e,t);e&&"object"===Object(r["a"])(e)&&(t=e,e=void 0),i(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()}i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},i.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.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},i.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},i.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},i.prototype.hasListeners=function(e){return!!this.listeners(e).length},s.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},s.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)))},s.prototype.destroy=function(){this._reconnection=!1,this.socket.close()},s.prototype.keepAlive=function(){var e=this;this.keepAliveTimeout=setInterval(function(){"open"===e.readyState?e.send(e.keepAliveContent):"closed"===e.readyState&&e.reconnect()},this.keepAliveInterval)},s.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},s.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},s.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)},s.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},s.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},s.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},t["a"]=s},"7bd4":function(e,t,n){},"7df3":function(e,t,n){"use strict";var r=n("a700"),a=n.n(r),i=n("34f3");function o(e){if(e)return s(e)}function s(e){for(var t in o.prototype)e[t]=o.prototype[t];return e}function c(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",n=arguments.length>1?arguments[1]:void 0;if(!(this instanceof c))return new c(t,n);t&&"object"===Object(i["a"])(t)&&(n=t,t=void 0),o(this),n=n||{},n.path=n.path||"/",this.opts=n,this.target=t,this.requestQueue={},window.addEventListener("message",function(t){e.msgHandler(t)},!1)}o.prototype.on=o.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},o.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.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},o.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},o.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},o.prototype.hasListeners=function(e){return!!this.listeners(e).length},c.prototype.send=function(e,t){var n=this;return e.reqId=(new Date).getTime(),window.parent.postMessage(e,this.target),new a.a(function(r,a){n.on("res_".concat(e.reqId),function(e){e&&e.data&&e.data.response?r(e.data.response):a(e.data.error),t&&t(e)})})},c.prototype.msgHandler=function(e){var t=e.data.resId;t?this.emit("res_".concat(t),e):this.opts["callback"]&&this.opts["callback"](e.data)},t["a"]=c},8869:function(e,t,n){"use strict";n.d(t,"f",function(){return p}),n.d(t,"e",function(){return h}),n.d(t,"c",function(){return m}),n.d(t,"d",function(){return f}),n.d(t,"a",function(){return g}),n.d(t,"b",function(){return v});var r=n("34f3"),a=(n("8e5d"),n("bd31")),i=(n("0adb"),n("7486")),o=(n("dcfb"),n("b5aa"),n("4457")),s=(n("dc12"),n("5975")),c=n("33f8"),u=n("52c1"),d=n("c1f9"),l=n.n(d),p={data:function(){return{isSearch:!1,searchList:null}},methods:{searchUser:function(e,t){var n=e.target.value.toLocaleLowerCase();n?(this.searchList=t.filter(function(e){var t,r,a=(e.name||e.user_name||"").toLocaleLowerCase(),i=(e.nick_name||"").toLocaleLowerCase();return t=!!a&&a.indexOf(n)>-1,r=!!i&&i.indexOf(n)>-1,t||r}),this.isSearch=!0):this.isSearch=!1}}},h={data:function(){return{isSearchGroup:!1,searchUserTimer:null}},methods:{searchUser:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:clearTimeout(this.searchUserTimer),this.searchUserTimer=setTimeout(Object(o["a"])(regeneratorRuntime.mark(function e(){var a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.target.value.toLocaleLowerCase(),o=r.inviteType,r.isSearchGroup=!0,a.trim()){e.next=7;break}return n.forEach(function(e){r.$set(e,"isShow",!0)}),r.$nextTick(function(){r.isSearchGroup=!1,r.showNum=n.length}),e.abrupt("return");case 7:if(n.forEach(function(e){var t,n,i=(e.user_name||"").toLocaleLowerCase(),o=(e.nick_name||"").toLocaleLowerCase();t=!!i&&i.indexOf(a)>-1,n=!!o&&o.indexOf(a)>-1,r.$set(e,"isShow",t||n)}),n.length+1>=r.membersNum||1==o||2==o){e.next=11;break}return e.next=11,s["a"].group.searchMember({group_id:r.group.groupId,keyword:a}).then(function(e){var t=e.data,r=t.data;r.forEach(function(e){e.isChecked=!1,e.isChoosed=!1,e.isShow=!0}),n=l.a.unionBy([].concat(Object(i["a"])(n),Object(i["a"])(r)),"user_id")});case 11:r.$nextTick(function(){r.isSearchGroup=!1,r.showNum=n.filter(function(e){return e.isShow}).length});case 12:case"end":return e.stop()}},e,this)})),200);case 2:case"end":return e.stop()}},e,this)}));function t(t,n){return e.apply(this,arguments)}return t}()}},m={data:function(){return{atInd:0}},methods:{atPerson:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];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(e){return this.atInd>0&&this.atInd--,this.atShow&&e.preventDefault(),!0},handleDown:function(e){var t=this.filterMembers.length;return this.atInd<t-1?this.atInd++:this.atInd=0,this.atShow&&e.preventDefault(),!0}}},f={data:function(){return{selectionAfterAt:!1,keyAfterAt:"",keyAfterAtTimer:"",lastKeyAfterAt:"",isIOS:!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),isShowContextmenu:!1,menuTop:0,menuLeft:0}},mounted:function(){},computed:Object(a["a"])({},Object(u["e"])(["copyText"]),{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;clearTimeout(this.keyAfterAtTimer),this.keyAfterAtTimer=setTimeout(function(){t.handleKeyAfterAt(e)},200)},inputMsg:function(e,t){this.handleSelectionChange()}},methods:{handleKeyAfterAt:function(e){var t=this;if(this.group.groupId&&""!=e.trim()&&!this.group.isNewAtFound)if(this.group.membersArray.length<this.group.membersNum)s["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)}},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},handleClick:function(){this.isShowContextmenu=!1},handleLeft:function(e){var t=this.$refs.chatInput,n=t.selectionStart;if(0===n)return!0;var r=this.getStrBeforeSelection(),a=this.group.members;for(var i in a){var o=a[i].user_name,s=new RegExp("@".concat(o," $"));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n-o.length-2,n-o.length-2),!0}},handleRight:function(e){var t=this.$refs.chatInput,n=t.selectionStart,r=this.getStrAfterSelection(),a=this.group.members;for(var i in a){var o=a[i].user_name,s=new RegExp("^@".concat(o," "));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n+o.length+2,n+o.length+2),!0}return!0},handleDel:function(e){var t=this,n=this.$refs.chatInput,a=n.selectionStart;if(0!==a){var i=this.getStrBeforeSelection(),o=this.group.members,s=function(r){var s=o[r].user_name,c=new RegExp("@".concat(s," $"));if(c.test(i))return e.preventDefault(),t.inputMsg=t.inputMsg.slice(0,a-s.length-2)+t.inputMsg.slice(a),t.$nextTick(function(){n.setSelectionRange(a-s.length-2,a-s.length-2)}),{v:void 0}};for(var c in o){var u=s(c);if("object"===Object(r["a"])(u))return u.v}}},handleKeyDown:function(e){var t=this;if(!this.atShow){if(e.altKey||e.ctrlKey){var n=this.getStrBeforeSelection(),r=this.getStrAfterSelection();this.inputMsg=n+"\n"+r,this.$nextTick(function(){t.$refs.chatInput.setSelectionRange(n.length+1,n.length+1)})}else this.handleSend(e),e.preventDefault();return!0}e.preventDefault();var a=this.filterMembers[this.atInd];this.atPerson(a.user_name,a.nick_name)},handleFocus:function(){var e=this;this.$emit("handleFocus"),this.updateChatInputFocus(!0),document.addEventListener("selectionchange",this.handleSelectionChange),this.isIOS&&setTimeout(function(){e.$root.$el.addEventListener("click",e.fixIOS)},0)},handleBlur:function(){var e=this;if(document.removeEventListener("selectionchange",this.handleSelectionChange),this.updateChatInputFocus(!1),(this.selectionAfterAt||this.isShowContextmenu)&&setTimeout(function(){e.selectionAfterAt=!1,e.isShowContextmenu=!1},200),this.isIOS){var t=document.body.scrollTop;document.body.scrollTop=t,this.$root.$el.removeEventListener("click",this.fixIOS)}},handleEsc: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}}}},handleContextmenu:function(e){this.copyText&&(this.isShowContextmenu=!this.isShowContextmenu,this.isShowContextmenu&&(this.menuTop=e.offsetY,this.menuLeft=e.offsetX>100?e.offsetX-30:e.offsetX))},handlePaste:function(){this.isShowContextmenu=!1,this.inputMsg+=this.copyText},closeEmojiList:function(){this.emojiShow=!1},fixIOS:function(e){var t=this;setTimeout(function(){t.$refs.chatInput===document.activeElement&&document.activeElement.blur()},0)}}},g={methods:{addPanelSession:function(e,t){var n=this,r=this.sessionList.some(function(e){return e.session_id==t});r||s["a"].user.getOtherInfo({target_id:e}).then(function(e){var r=e.data,a=r.data,i={cover_photo:a.cover_photo,is_group:"0",name:a.nick_name,session_id:t,unread:0};n.$store.commit("addSessionItem",i)})}}},v={data:function(){return{curLang:Object(c["r"])("lang")||Object(c["n"])()}},methods:{changeLang:function(){var e="en"==this.curLang?"zh":"en";this.$i18n.locale=e,this.curLang=e,Object(c["y"])("lang",e)}}}},"8d4d":function(e,t,n){"use strict";n("dcfb");var r=n("ab01"),a=n.n(r),i=(n("b5aa"),n("4457")),o=n("a585"),s=n("26cb"),c=n("fd86"),u=n("3d0b"),d=n("d26d"),l=n("411a"),p=n("2593"),h=n("33f8"),m=function(e){function t(){return Object(o["a"])(this,t),Object(c["a"])(this,Object(u["a"])(t).call(this,"message"))}return Object(d["a"])(t,e),Object(s["a"])(t,[{key:"getMsg",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,i,o,s,c,u,d,l,m,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]:30,t){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,this.getObjTable();case 5:if(r=e.sent,r){e.next=8;break}return e.abrupt("return");case 8:return a=[t,0],i=[t,999999999999999],o=IDBKeyRange.bound(a,i),e.next=13,r.index("session_id").openCursor(o,"prev");case 13:s=e.sent,c=[],u={};case 16:if(!s||!s.value){e.next=31;break}if(d=s.value,!(c.length<n&&d["session_id"]===t)){e.next=28;break}if(4==d.msg_type)try{"string"===typeof d.msg&&(d.msg=JSON.parse(Object(h["i"])(d.msg)))}catch(g){console.error(g)}else d.msg=Object(h["i"])(d.msg);return c.unshift(d),u[d.from]=d.from,d.to&&(u[d.to]=d.to),e.next=25,s.continue();case 25:s=e.sent,e.next=29;break;case 28:return e.abrupt("break",31);case 29:e.next=16;break;case 31:return l=new p["a"],e.next=34,l.getUserMap(u);case 34:return m=e.sent,e.abrupt("return",{list:c,userMap:m});case 36:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}()},{key:"updatePackInfo",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t,n,r){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getObjTable();case 2:if(a=e.sent,a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,a.get(t);case 7:i=e.sent,i?(i.ext[n]=r,a.put(i)):console.log("can not find redpack:"+t);case 9:case"end":return e.stop()}},e,this)}));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"saveMsg",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(n,r){var i,o,s,c,u;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return i=new t,e.next=3,i.getObjTable();case 3:if(o=e.sent,o){e.next=6;break}return e.abrupt("return");case 6:e.t0=regeneratorRuntime.keys(r.list);case 7:if((e.t1=e.t0()).done){e.next=14;break}return s=e.t1.value,c=a()({session_id:n},r.list[s]),e.next=12,o.put(c);case 12:e.next=7;break;case 14:u=new p["a"],u.replaceObjects(r.userMap);case 16:case"end":return e.stop()}},e,this)}));function n(t,n){return e.apply(this,arguments)}return n}()},{key:"removeMsg",value:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(n,r){var a,i;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:if(i=e.sent,i){e.next=6;break}return e.abrupt("return");case 6:i.delete(r);case 7:case"end":return e.stop()}},e,this)}));function n(t,n){return e.apply(this,arguments)}return n}()}]),t}(l["a"]);t["a"]=m},"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",class:{"is-quantity":e.quantity},on:{touchstart:e.touchstartForH5,touchend:e.touchendForH5}},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.visible=!1}}}),n("nav",{staticClass:"nav-bar"},[n("i",{staticClass:"el-icon-arrow-left",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.$t("redPacket.transferTo"))+e._s(e.openInfo.type.toUpperCase())+e._s(e.$t("redPacket.account")))]):e._e(),n("p",{staticClass:"state-num"},[e._v("\n "+e._s(e.$t("redPacket.tip4",{total:e.openInfo.num_total,num:e.openInfo.num_total-e.openInfo.num_left,unit:e.$t("redPacket.unit")}))+"\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("div",{staticClass:"bottom"},[n("span",{staticClass:"time"},[e._v(e._s(e.formatTime(t.update_time_int)))]),t.best?n("span",{staticClass:"best"}):e._e()])])])}),0),n("p",{staticClass:"tips"},[e._v(e._s(e.$t("redPacket.tip3")))])]):n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoading,expression:"isLoading"}],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(e._s(e.$t("redPacket.open")))]):1==e.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[e._v("\n "+e._s(e.$t("redPacket.noPacketTips"))+"\n ")]):2==e.info.ext.redpack_status?n("div",{staticClass:"redpack-tips"},[e._v("\n "+e._s(e.$t("redPacket.expiredPacketTips"))+"\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._s(e.$t("redPacket.seePacketDetail")))]):e._e()])]):e._e()])},a=[],i=(n("3b70"),n("ad09"),n("dfe5")),o=n.n(i),s=(n("dcfb"),n("46b5"),n("61e5"),n("bd31")),c=n("5975"),u=n("d690"),d=n.n(u),l=n("52c1"),p=n("33f8"),h=n("4941"),m={name:"packetGet",data:function(){return{openInfo:null,isLoading:!1,isHasDetail:!1,meechatType:Object(p["o"])(),startClientX:0}},computed:Object(s["a"])({},Object(l["e"])(["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},isPrivate:function(){return this.$store.getters.isPrivate}}),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,"h5"==e.meechatType&&e.initSwipeForH5()})},formatNum:function(e){return d.a.divide(Number(e),1e4)},formatTime:function(e){return Object(h["a"])(e).format("HH:mm")},preHandleOpenInfo:function(e){if(e&&e.logs.length===e.num_total){var t=e.logs[0];e.logs.forEach(function(e){e.quantity_int>t.quantity_int&&(t=e)}),t.best=!0}},touchstartForH5:function(e){"h5"==this.meechatType&&(this.startClientX=e.changedTouches[0].clientX)},touchendForH5:function(e){if("h5"==this.meechatType){var t=e.changedTouches[0].clientX;Math.abs(t-this.startClientX)>60&&(this.visible=!1)}}},created:function(){var e=this;this.userId?c["a"].redpack.grabDetail({trx_id:this.trxId}).then(function(t){var n=t.data;e.info.userId==e.userId&&e.isPrivate||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}):o()({message:this.$t("public.loginTip"),type:"warning"})}},f=m,g=(n("c708"),n("fc05")),v=Object(g["a"])(f,r,a,!1,null,"90635ec8",null),b=v.exports,k=n("6103");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}},i18n:k["a"],data:function(){return{visible:!1,info:e}}}),document.body.appendChild(n.$el)}};t["a"]=b},9729:function(e,t,n){"use strict";var r,a=n("8973"),i=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))])])},o=[],s=(n("c62f"),n("fc05")),c={},u=Object(s["a"])(c,i,o,!1,null,"674c3536",null),d=u.exports,l=a["default"].extend(d);function p(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2500;r?(r.show=!0,r.text=e):(r=new l({el:document.createElement("div"),data:function(){return{text:e,show:!0}}}),document.body.appendChild(r.$el)),t&&setTimeout(function(){r.show=!1},n)}function h(){r&&(r.show=!1)}function m(){a["default"].prototype.$showTips=p,a["default"].prototype.$hideTips=h}t["a"]=m},"9a84":function(e,t,n){"use strict";var r=n("f194"),a=n.n(r);a.a},a3af:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ul",{staticClass:"sign-list"},[n("li",{on:{click:e.handleEos}},[n("i",{staticClass:"icon icon-eos"}),n("p",[e._v("EOS")])]),e.inWallet||"h5"!==e.meechatType?e._e():n("li",{on:{click:e.loginSimpleWallet}},[n("i",{staticClass:"icon icon-meetone"}),n("p",[e._v("SimpleWallet")])]),e.inWallet?e._e():n("li",{on:{click:e.loginTelegram}},[n("i",{staticClass:"icon icon-tele"}),n("p",[e._v("Telegram")])])])},a=[],i=(n("dc12"),n("5cf1"),n("ad09"),n("94c8")),o=n.n(i),s=n("8973"),c=n("455d"),u=n("33f8");s["default"].component(o.a.name,o.a);var d={name:"loginBox",mixins:[c["a"]],data:function(){return{meechatType:Object(u["o"])()}},created:function(){},computed:{inWallet:function(){return/token|meet\.one|wallet|bit|eos|nova/.test(navigator.userAgent.toLowerCase())}},methods:{handleEos:function(){top===self?this.loginEos():this.loginEosParent()}}},l=d,p=(n("9a84"),n("fc05")),h=Object(p["a"])(l,r,a,!1,null,"980b2490",null);t["a"]=h.exports},a5ae:function(e,t,n){},afac:function(e,t,n){},b83c:function(e,t,n){"use strict";var r=n("bbbf"),a=n.n(r);a.a},bbbf:function(e,t,n){},c375:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i});var r=n("8973"),a=n("081a");r["default"].use(a["a"]);var i=new a["a"]({routes:[{path:"/",alias:["/user/:id","/login","/other/:id","/me","/editMe","/editInfo/:type","/groupSet/:id","/invite/:inviteType","/packetSend","/packetGet/:id","/search"],name:"noChat",component:function(e){n.e("chunk-3028e170").then(function(){var t=[n("18d9")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/group/:id",name:"groupChat",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-e1f20b62"),n.e("chunk-9c4fb57e")]).then(function(){var t=[n("7a9f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/pm/:id",name:"pmChat",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-e1f20b62"),n.e("chunk-9c4fb57e")]).then(function(){var t=[n("7a9f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/hotGroup",name:"hotGroup",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-1a0d9872")]).then(function(){var t=[n("1749")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/relateGroup",name:"relateGroup",component:function(e){n.e("chunk-60cf0727").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]}),o=new a["a"]({routes:[{path:"/",alias:"/user/:id",name:"chatList",component:function(e){n.e("chunk-70ed3fb8").then(function(){var t=[n("a510")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/login",name:"login",component:function(e){n.e("chunk-406bac5b").then(function(){var t=[n("387b")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/loginMee",name:"loginMee",component:function(e){n.e("chunk-6361f770").then(function(){var t=[n("867f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/other/:id",name:"aboutOther",component:function(e){n.e("chunk-352466e2").then(function(){var t=[n("97e9")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/me",name:"aboutMe",component:function(e){n.e("chunk-d42f0a14").then(function(){var t=[n("c918")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/editMe",name:"editMe",component:function(e){Promise.all([n.e("chunk-b17cf818"),n.e("chunk-6f498702")]).then(function(){var t=[n("3d61")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/editInfo/:type/:id?",name:"editInfo",component:function(e){n.e("chunk-5a6c5be1").then(function(){var t=[n("4584")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/group/:id",name:"groupChat",component:function(e){Promise.all([n.e("chunk-e1f20b62"),n.e("chunk-063fcdb8")]).then(function(){var t=[n("d5e1")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/groupSet/:id",name:"groupSet",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-b17cf818"),n.e("chunk-09f52bd0")]).then(function(){var t=[n("ffb4")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/pm/:id",name:"pmChat",component:function(e){Promise.all([n.e("chunk-e1f20b62"),n.e("chunk-063fcdb8")]).then(function(){var t=[n("d5e1")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/invite/:inviteType/:id?",name:"invite",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-5edd596e")]).then(function(){var t=[n("a36a")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/search",name:"search",component:function(e){Promise.all([n.e("chunk-437e2b39"),n.e("chunk-af4b672c")]).then(function(){var t=[n("4d7a")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/password",name:"password",component:function(e){n.e("chunk-13ce04b3").then(function(){var t=[n("b9c7")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/relateGroup",name:"relateGroup",component:function(e){n.e("chunk-60cf0727").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]});o.beforeEach(function(e,t,n){if("/login"!==e.path&&"/loginMee"!==e.path){var r=localStorage.getItem("user_id"),a=localStorage.getItem("token");r&&a?n():n("/login")}else n()})},c62f:function(e,t,n){"use strict";var r=n("3729"),a=n.n(r);a.a},c708:function(e,t,n){"use strict";var r=n("afac"),a=n.n(r);a.a},cc90:function(e,t,n){},e332:function(e,t,n){"use strict";n("b5aa");var r=n("4457"),a=n("a700"),i=n.n(a);n("dcfb"),n("c3df");function o(){return s.apply(this,arguments)}function s(){return s=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:for(r in t=[],n=function(e){var n=new i.a(function(t,n){var r=h[e];fetch("https://".concat(r,"/v1/chain/get_info")).then(function(e){t(r)}).catch(function(e){n(e)})});t.push(n)},h)n(r);return e.next=5,i.a.race(t);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},e,this)})),s.apply(this,arguments)}var c=n("33f8");function u(){return d.apply(this,arguments)}function d(){return d=Object(r["a"])(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t={protocol:"https",blockchain:"eos",port:"443"},!Object(c["s"])()){e.next=6;break}t["host"]="localnet.eosget.io",t["chainId"]="cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f",e.next=10;break;case 6:return e.next=8,o();case 8:t["host"]=e.sent,t["chainId"]="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906";case 10:return e.abrupt("return",t);case 11:case"end":return e.stop()}},e,this)})),d.apply(this,arguments)}function l(){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 p(){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 u}),n.d(t,"c",function(){return l}),n.d(t,"a",function(){return p}),n.d(t,"d",function(){return h});var h={eoscannon:"mainnet.eoscannon.io",eosbeijing:"api.eosbeijing.one",eosys:"rpc.eosys.io",proxy:"proxy.eosnode.tools",eosbixin:"mars.fn.eosbixin.com",eosio:"mainnet.eosio.sg",jeda:"api.jeda.one",oraclechain:"api.oraclechain.io",eosasia:"geo.eosasia.one"}},e9ca:function(e,t,n){"use strict";var r=n("7199"),a=n.n(r);function i(e){requestAnimationFrame(i),a.a.update(e)}if(requestAnimationFrame(i),"serviceWorker"in navigator){var o="/sw.js";navigator.serviceWorker.register(o).then(function(e){e.installing?console.log("Service worker installing"):e.waiting?console.log("Service worker installed"):e.active&&console.log("Service worker active"),e.addEventListener("updatefound",function(){if(navigator.serviceWorker.controller){var t=e.installing;t.onstatechange=function(){switch(console.log("installingWorker.state:"+t.state),t.state){case"installed":break;case"redundant":break;default:}}}}),navigator.serviceWorker&&navigator.serviceWorker.addEventListener("statechange",function(e){console.log("statechange: ",e.target.state)})}).catch(function(e){console.log("Registration failed with "+e)})}window.addEventListener("storage",function(e){"user_id"===e.key&&location.reload()});var s=null,c=null;function u(){s=document.getElementById("btnPwa"),s&&(s.style.display="block",s.addEventListener("click",function(){null!=c&&(c.prompt(),c.userChoice.then(function(e){console.log(e.outcome),"dismissed"===e.outcome?console.log("用户取消安装应用"):(console.log("用户安装了应用"),s.style.display="none")}),c=null)}))}window.addEventListener("beforeinstallprompt",function(e){return s||u(),c=e,e.preventDefault(),!1})},f194:function(e,t,n){}}]);