(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"088b":function(e,t,n){"use strict";var r=n("6403"),a=n.n(r);a.a},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=[],o=n("3f47"),i=n("52c1"),s=n("a3af"),c={name:"loginBox",components:{otherAccount:s["a"]},created:function(){},computed:Object(o["a"])({},Object(i["e"])(["isLogining"])),methods:{initMiniLoginCallback:function(){this.$emit("initMiniLoginCallback")}}},u=c,p=(n("e567"),n("17cc")),l=Object(p["a"])(u,r,a,!1,null,"4855470e",null);t["a"]=l.exports},1848:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"back-bar border-bottom"},[n("div",{staticClass:"arrow-icon",on:{click:e.onBack}},[n("i",{staticClass:"el-icon-arrow-left"})]),e._v("\n "+e._s(e.title)+"\n "),e.url?n("a",{staticClass:"icon-link",attrs:{href:e.url,target:"_blank"}}):e._e(),e._t("default")],2)},a=[],o={name:"backBar",props:{title:String,url:String},methods:{onBack:function(){this.$router?this.$router.go(-1):this.$emit("onBack")}}},i=o,s=(n("a7de"),n("17cc")),c=Object(s["a"])(i,r,a,!1,null,"bdea7596",null);t["a"]=c.exports},"1c04":function(e,t,n){"use strict";n("f91a");var r=n("6e6d"),a=n("52c1"),o=(n("a1d1"),{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)}},changeUserBinds:function(e,t){var n=t.type,r=t.account,a=e.userInfo.binds.findIndex(function(e){return e.type==n});a>=0&&(e.userInfo.binds[a].account=r)}}),i=(n("612f"),n("b06f"),n("3f62")),s=n("cc80"),c=n.n(s),u=(n("3a23"),n("7415"),n("3f46")),p=n.n(u),l=(n("4453"),n("ee95")),d=n("b322"),h=n.n(d),m=n("5975"),f=n("33f8"),g=n("e332"),v=n("0892"),b=n.n(v),w={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,o,i,s,u,l,d=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.dispatch,a=t.commit,o=t.state,o.scatter){e.next=5;break}Object(f["A"])("Please install the scatter","Scatter"),e.next=35;break;case 5:return e.next=7,Object(g["b"])();case 7:return i=e.sent,e.prev=8,e.next=11,o.scatter.login({accounts:[i]});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["A"])(e.t0.message),e.abrupt("return",p.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,w.doScatterLogout.apply(w,d);case 23:n.push({path:"/login"}),a("setUserInfo",null),a("initChatData"),a("initGroupData"),a("chatAppLogin",!1),a("toApp",!1);case 29:return a("setAccount",u),localStorage.setItem("accounts",c()(u)),window.EOS=o.scatter.eos(i,b.a,{}),e.next=34,r("getAccount");case 34:return e.abrupt("return",p.a.resolve(!0));case 35:case"end":return e.stop()}},e,null,[[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,o,i,s,c,u,l,d,h,v,w,k;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t.dispatch,t.commit,n=t.state,r=Object(f["r"])("eosType")||"eos",a={contract:"meetone"==r?"meechat.m":"meechatadmin",net_id:"meetone"==r?2:1},n.scatter){e.next=7;break}Object(f["A"])("Please install the scatter","Scatter"),e.next=41;break;case 7:return e.next=9,Object(g["b"])();case 9:if(o=e.sent,!n.scatter.identity){e.next=13;break}return e.next=13,n.scatter&&n.scatter.logout&&n.scatter.logout();case 13:return Object(f["z"])("isChangeIndentity",1),e.prev=14,e.next=17,n.scatter.login({accounts:[o]});case 17:i=e.sent,e.next=24;break;case 20:return e.prev=20,e.t0=e["catch"](14),"identity_rejected"!==e.t0.type&&Object(f["A"])(e.t0.message),e.abrupt("return",p.a.reject(e.t0));case 24:return s=i.accounts.find(function(e){return"eos"===e.blockchain}),e.next=27,m["a"].user.getRandom2({account:s.name});case 27:return c=e.sent,u=c.data,l=u.data.random,d=u.data.accessToken,h=null,v=n.scatter.eos(o,b.a,{}),e.next=35,v.contract(a.contract);case 35:return w=e.sent,e.next=38,w.login(s.name,l,{authorization:["".concat(s.name,"@").concat(s.authority)]});case 38:return h=e.sent,k={account:s.name,access_token:d,trx_id:h.transaction_id||h.transaction.transaction_id,net_id:a.net_id},e.abrupt("return",new p.a(function(e,t){m["a"].user.eosBind2(k).then(function(){e(k)}).catch(function(e){t(e)})}));case 41:case"end":return e.stop()}},e,null,[[14,20]])}));function t(t){return e.apply(this,arguments)}return t}(),doScatterLogout:function(e,t){var n=e.commit,r=e.state;return localStorage.clear(),n("setUserId",null),n("setToken",null),n("setAccount",""),r.scatter&&r.scatter.logout&&r.scatter.logout()||p.a.resolve(!0)},getUserEOS:function(e,t){var n=e.dispatch,r=e.commit,a=e.state;return new p.a(function(e,t){window.EOS.getCurrencyBalance("eosio.token",a.account.name,"EOS").then(function(t){var n=Object(i["a"])(t,1),a=n[0],o=Number(a.replace(/\sEOS/,"")).toFixed(4);o=h.a.times(o,1e4),r("setBalance",o),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 p.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,o,i,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,o=localStorage.getItem("user_id"),i=localStorage.getItem("token"),!o||!i){e.next=9;break}return r("setUserId",o),r("setToken",i),e.abrupt("return",p.a.resolve({user_id:o,token:i}));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 p.a(function(e,t){a.scatter.getArbitrarySignature(u,c,"Need Login").then(function(n){var o={account:a.account.name,sign:n,pubkey:u,data:c};m["a"].user.eosLogin(o).then(function(n){var a=n.data;if(1===a.result){var o=a.data.user_id,i=a.data.token;localStorage.setItem("user_id",o),localStorage.setItem("token",i),r("setUserId",o),r("setToken",i),e(a)}else t(new Error(a.msg))})}).catch(function(e){t(e)})}));case 15:case"end":return e.stop()}},e)}));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)}));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,o,i,s,c,u,l,d,h,v,b,w,k,y,_,x;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r=t.commit,a=t.state,o=Object(f["r"])("eosType")||"eos",i={contract:"meetone"==o?"meechat.m":"meechatadmin",net_id:"meetone"==o?2:1},s=localStorage.getItem("user_id"),c=localStorage.getItem("token"),!s||!c){e.next=11;break}return r("setUserId",s),r("setToken",c),e.abrupt("return",p.a.resolve({user_id:s,token:c}));case 11:return e.prev=11,e.next=14,m["a"].user.getRandom2({account:a.account.name});case 14:return u=e.sent,l=u.data,d=l.data.random,h=l.data.accessToken,v={authorization:["".concat(a.account.name,"@").concat(a.account.authority)]},b=null,e.next=22,Object(g["b"])();case 22:if(w=e.sent,self===top){e.next=29;break}return e.next=26,window.postMessager.send({action:"meechat:eosAction",data:{contract:i.contract,action:"login",param:[a.account.name,d,v],network:w}});case 26:b=e.sent,e.next=36;break;case 29:return k=window.EOS||a.scatter.eos,e.next=32,k.contract(i.contract);case 32:return y=e.sent,e.next=35,y.login(a.account.name,d,v);case 35:b=e.sent;case 36:return _={account:a.account.name,access_token:h,trx_id:b.transaction_id||b.transaction.transaction_id,group_id:a.group.groupId||null,net_id:i.net_id},e.next=39,m["a"].user.eosLogin2(_);case 39:if(x=e.sent,1!==x.data.result){e.next=42;break}return e.abrupt("return",p.a.resolve(x.data));case 42:e.next=47;break;case 44:return e.prev=44,e.t0=e["catch"](11),e.abrupt("return",p.a.reject(e.t0));case 47:case"end":return e.stop()}},e,null,[[11,44]])}));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})},getDiscovery:function(e,t){var n=e.state;n.hotGame.length>0&&n.hotList.length>0||m["a"].base.discovery().then(function(e){var t=e.data;n.hotGame=t.data.hotGame,n.hotList=t.data.hotGroup})}},k=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:[],hotGame:[]}},y=function(){return{sessionList:[],isLogin:!0,toApp:!1,friendList:[]}},_=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:[],chatList:[],lastMsgUid:0,startHash:"",endHash:"",chatUserList:[],userInfo:{},unreadNums:0,chatInputFocus:!1,pinMsg:{},searchList:[],isNewAt:!0,isNewAtFound:!1,isJoin:!0,isRefreshImg:!1}},x=n("208e"),S=n.n(x),L=n("eb12"),I=n("ba94"),T=n("5ee8"),O=n("4e86"),M=n("5bc3"),j=n("411a"),C=function(e){function t(){return Object(L["a"])(this,t),Object(T["a"])(this,Object(O["a"])(t).call(this,"session"))}return Object(M["a"])(t,e),Object(I["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_int1&&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,null,[[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,null,[[1,9]])}));function t(t){return e.apply(this,arguments)}return t}()},N=E,$=n("c1f9"),G=n.n($),U=new R,B={setSessionList:function(e,t){t.forEach(function(e){var t=e["last_msg"];e.cont=t?Object(f["h"])(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),U.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 o=e.unread;t.unread&&t.curSession!=t.session_id?o+=t.unread:o=0,r["default"].set(e,"unread",o),U.setUnread(e.session_id,o),n=a}});var a=e.sessionList[n];n&&!a.is_pin&&t.cont&&(e.sessionList.splice(n,1),B.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){U.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){U.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){U.setMute(t,1),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=1)})},cancelSessionListByMute:function(e,t){U.setMute(t,0),e.sessionList.forEach(function(e,n){e.session_id==t&&(e.is_mute=0)})},removeSessionListById:function(e,t){U.remove(t),e.sessionList=G.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&&B.setSessionLastmsg(e,n,t)},updateSessionLastMsgNoDecode:function(e,t){B.updateSessionLastmsg(e,S()(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["h"])(n.content)),n.ext_info&&n.ext_info.event_type&&r["default"].set(a,"event_type",n.ext_info.event_type)},initChatData:function(e){var t=y();for(var n in e)t.hasOwnProperty(n)&&(e[n]=t[n])}},q=B,H={state:y(),actions:N,mutations:q},D=H,F=n("b89d"),W=(n("f10e"),n("ea65"),n("76a4")),z=n("7f43"),J=n.n(z),K=n("8d4d"),Y=null,V={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: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,n=t.pinMsg,o=t.group,i=t.members,s=t.eosInfo,c=t.members.some(function(e){return a.userId==e.user_id}),u={};n&&(n.visible=!0),i.forEach(function(e){e.user_id&&(u[e.user_id]=e)}),r("setGroupInfo",{userCounts:i.length,groupName:o.group_title,shareName:o.group_name,members:u,membersArray:i,membersNum:t.group.member_num,userInfo:t.userInfo,groupNotice:o.group_notice,url:o.url,inviteUrl:o.invite_url,sessionInfo:t.sessionInfo||{is_mute:0,is_pin:0,pin_time_int:0},isJoin:c,coverPhoto:o.cover_photo,adminList:t.adminList,blockList:t.blockList,pinMsg:n||{},creator:o.creator,eosInfo:s})}});case 2:case"end":return e.stop()}},e)}));function t(t,n){return e.apply(this,arguments)}return t}(),commonGetNewMsgFromDb:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,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=t.state,o=new K["a"],e.next=5,o.getMsg(n.isPrivate?r.curSession:a.groupId);case 5:if(i=e.sent,Object(f["z"])("lastShowMsgUid",0),!(i&&i.list.length>0)){e.next=13;break}return n.fromdb=!0,V._renderMsg(t,i,n),e.abrupt("return",!0);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),commonGetNewMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},r=t.rootState,a=t.state,o=r.curSession,!n.isPrivate){e.next=9;break}return e.next=6,m["a"].person.getNewMsg({session_id:r.curSession,client_hash:a.endHash}).catch(function(){});case 6:i=e.sent,e.next=12;break;case 9:return e.next=11,m["a"].group.getNewMsg({group_id:a.groupId,client_hash:a.endHash}).catch(function(){});case 11:i=e.sent;case 12:if(o==r.curSession){e.next=14;break}return e.abrupt("return",[]);case 14:return i&&0===i.data.code&&i.data.data.list.length>0&&(n.fromdb=!1,V._renderMsg(t,i.data.data,n)),e.abrupt("return",i.data);case 16:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),commonGetHistoryMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c,u,p=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=p.length>1&&void 0!==p[1]?p[1]:{},r=t.commit,a=t.state,o=t.rootState,i=localStorage.getItem(n.hash),s={},c="",!i||!a.useCache){e.next=9;break}s=JSON.parse(i),e.next=19;break;case 9:if(!n.isPrivate){e.next=15;break}return e.next=12,m["a"].person.getHistoryMsg({session_id:o.curSession,client_hash:a.startHash}).catch(function(){});case 12:u=e.sent,e.next=18;break;case 15:return e.next=17,m["a"].group.getHistoryMsg({group_id:a.groupId,client_hash:a.startHash}).catch(function(){});case 17:u=e.sent;case 18:u&&0===u.data.code&&u.data.data.list.length>0&&(s=u.data.data);case 19:return s.list&&s.list.length>0?(r("setHash",{startHash:s.list[0].hash}),n.fromHistory=!0,this._renderMsg(t,s,n),c="done"):(r("setHash",{startHash:null}),c="end"),e.abrupt("return",c);case 21:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),commonDoSendMsg: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 p.a(function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(o,i){var s,c,u,p,l,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(!a.isPrivate){e.next=6;break}return e.next=3,m["a"].person.sendMsg({session_id:r.curSession,msg_type:a.type,msg:a.msg});case 3:s=e.sent,e.next=9;break;case 6:return e.next=8,m["a"].group.sendMsg({group_id:n.groupId,msg_type:a.type,msg:a.msg}).catch(function(e){a.createTime&&Object(f["g"])(n,a.createTime),i(e)});case 8:s=e.sent;case 9:if(c=s.data,0!==c.code){e.next=34;break}if(!a.createTime){e.next=26;break}u=a.createTime,c.data.content=Object(f["h"])(c.data.content),p=n.chatList,l=p.length-1;case 16:if(!(l>=0)){e.next=24;break}if(d=p[l],d.createTime!==u){e.next=21;break}return t("updataChatItem",{index:l,hash:c.data.hash,isCommfirm:!0}),e.abrupt("break",24);case 21:l--,e.next=16;break;case 24:e.next=29;break;case 26:t("updateMembers",c.data.userMap),c.data.content=Object(f["h"])(c.data.content),t("addChatItem",c.data);case 29:t("setHash",{endHash:c.data.hash}),t("updateSessionLastMsgNoDecode",S()(c.data,{group_id:n.groupId})),o(c.data),e.next=35;break;case 34:a.createTime&&Object(f["g"])(n,a.createTime);case 35:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}())},_renderMsg:function(e,t,n){var r=e.commit,a=e.state,o=e.rootState,i=[];r("setGroupMembers",S()(t.userMap,a.members));var s=n.fromHistory?0:Object(f["r"])("lastShowMsgUid")||0;if(t.list.forEach(function(e){var t=a.members[e.from];t&&(5==e.msg_type&&e.ext_info&&"leave_group"==e.ext_info.event_type&&o.userId!=e.from&&!a.adminList.some(function(e){return e==o.userId})||(4==e.msg_type?e.msg="string"==typeof e.msg?JSON.parse(Object(f["h"])(e.msg)):e.msg:e.msg=Object(f["h"])(e.msg),i.push({name:t.nick_name||t.user_name||"unknown",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,ext_info:e.ext_info?e.ext_info:null,isShowFullInfo:e.from!=s}),s=5==e.msg_type?0:e.from))}),n.fromHistory)r("addHistoryList",i);else{Object(f["z"])("lastShowMsgUid",s),a.chatList.length?r("setHash",{endHash:i[i.length-1]?i[i.length-1].hash:""}):r("setHash",{endHash:i[i.length-1]?i[i.length-1].hash:"",startHash:i[0]?i[0].hash:""});var c=n.newMsg?{list:i,newMsg:n.newMsg,fromdb:n.fromdb}:{list:i,fromdb:n.fromdb};r("addChatItem",c)}},getNewMsgFromDb:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!1,e.abrupt("return",V.commonGetNewMsgFromDb(t,n));case 3:case"end":return e.stop()}},e)}));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=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!1,e.abrupt("return",V.commonGetNewMsg(t,n));case 3:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),getPrivateNewMsgFromDb:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetNewMsgFromDb(t,n));case 3:case"end":return e.stop()}},e)}));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=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetNewMsg(t,n));case 3:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",V.commonGetHistoryMsg(t,n));case 2:case"end":return e.stop()}},e)}));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=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},n.isPrivate=!0,e.abrupt("return",V.commonGetHistoryMsg(t,n));case 3:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),doSendMsg:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.isPrivate=!1,V.commonDoSendMsg(e,t)},doSendFile:function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,r=t.state,a=t.rootState,o=i.length>1&&void 0!==i[1]?i[1]:{},e.abrupt("return",new p.a(function(e,t){var i=a.userId,s=a.token,c=new FormData;if(c.append("res",o.res),c.append("user_id",i),c.append("token",s),r.groupId)c.append("group_id",r.groupId);else{var u,p=a.curSession.split("-");u=p[0]==a.userId?p[1]:p[0],c.append("to_user",u)}var l=r.groupId?"group/sendFile":"person/sendFile";J()({url:[m["a"].host,l].join(""),method:"post",data:c,headers:{"Content-Type":"multipart/form-data"}}).then(function(t){var i=t.data;if(0===i.code){if(o.createTime){var s=o.createTime;i.data.content=Object(f["h"])(i.data.content);var c=r.chatList;c.forEach(function(e){e.createTime===s&&(e.res=void 0,e.content=i.data.content,e.hash=i.data.hash,e.loading=!1,e.fail=!1,e.ext_info||(e.ext_info={}),e.ext_info.cover_url=i.data.ext_info&&i.data.ext_info.cover_url)})}else n("updateMembers",i.data.userMap),i.data.content=Object(f["h"])(i.data.content),n("addChatItem",i.data);n("setHash",{endHash:i.data.hash}),n("updateSessionLastMsgNoDecode",S()(i.data,{group_id:r.groupId||a.curSession})),e(i.data)}else o.createTime&&Object(f["g"])(r,o.createTime)}).catch(function(e){o.createTime&&Object(f["g"])(r,o.createTime),t(e)})}));case 3:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),doSendPrivateMsg:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.isPrivate=!0,V.commonDoSendMsg(e,t)},initSocket:function(e){var t=e.commit,n=e.state,r=e.rootState,a=e.rootGetters,o=e.dispatch;arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window.WebSocket){var i="".concat(Object(g["c"])(),"/?user_id=").concat(r.userId,"&token=").concat(r.token);Y&&(Y.destroy(),Y=null),Y=new W["a"](i,{autoConnect:!0,reconnection:!0,reconnectionDelay:5e3,keepAliveContent:c()({act:"alive",player:name})}),Y.on("open",function(e){}),Y.on("message",function(e){var i=JSON.parse(e),s=i.channel,c=i.data,u=a.muteList;if(s.match("chat:group")){var p=u.some(function(e){return e.session_id==c.group_id});if("msg"===c.type&&(r.curSession==c.group_id&&(o("getNewMsg",{newMsg:!0}),c.from!=r.userId&&t("addUnreadNums")),p||f["w"].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&&c.group_id==n.groupId){if(c.user_info.user_id==r.userId)return;c.user_id==r.userId?o("getGroupInfo"):t("updateMembersArray",{type:"del",userInfo:c.user_info})}if("join"===c.type&&c.group_id==n.groupId){if(c.user_info.user_id==r.userId)return;c.joinMsg=(c.user_info.nick_name||c.user_info.name)+"加入群组",t("updateMembers",Object(F["a"])({},c.user_info.user_id,c.user_info)),t("updateMembersArray",{type:"add",userInfo:c.user_info})}"pin_msg"===c.type&&c.group_id==n.groupId&&t("updateGroupPinMsg",c.pinMsg),"unpin_msg"===c.type&&c.group_id==n.groupId&&t("updateGroupPinMsg",null),"new_redpack"===c.type&&r.curSession==c.group_id&&(t("addPacketItem",c),t("updateSessionLastmsg",c)),"grab_redpack"===c.type&&r.curSession==c.group_id&&(c.from!=r.userId&&c.to!=r.userId||(t("addPacketTip",c),t("updateSessionLastmsg",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),d=u.some(function(e){return e.session_id==l});if("msg"===c.type&&(r.curSession==l&&(o("getPrivateNewMsg"),c.from!=r.userId&&t("addUnreadNums")),d||f["w"].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&&(t("updateMembers",Object(F["a"])({},r.userInfo.user_id,r.userInfo)),t("updateMembersArray",{type:"add",userInfo:r.userInfo})),"leave_group"===c.type&&(t("updateMembersArray",{type:"del",userInfo:r.userInfo}),o("getGroupInfo"))}var g=5==c.msg_type&&"leave_group"==c.ext_info.event_type;if(!g&&("msg"===c.type||"new_redpack"===c.type)){var v,b=r.chat.sessionList;v=c.group_id?c.group_id:+c.to>+c.from?"".concat(c.from,"-").concat(c.to):"".concat(c.to,"-").concat(c.from);var w=b.some(function(e){return e.session_id==v}),k={session_id:v,cont:Object(f["h"])(c.content),unread:r.userId==c.from?0:1,update_time_int:c.timestamp,timestamp:c.timestamp};w||(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",S()(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",S()(r,k))})),c.from!=r.userId&&t("setSessionItemUnread",S()({curSession:r.curSession},k)),t("updateSessionLastmsg",S()(c,{sessionId:v}))}})}else console.error("Error: WebSocket is not supported .")},doRepealGroupMsg:function(e){e.dispatch,e.commit;var t=e.state,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{m["a"].group.repealGroupMsg({group_id:t.groupId,hash:n.hash})}catch(r){}},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,null,[[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,null,[[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,null,[[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,null,[[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}),e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](2);case 11:case"end":return e.stop()}},e,null,[[2,9]])}));function t(t){return e.apply(this,arguments)}return t}()},X=V,Q=new K["a"],Z={initGroup:function(e,t){e.userId=t.userId,e.groupId=t.groupId,e.useCache=t.useCache},initState:function(e,t){var n=_();for(var r in n){if("userId"==r||"userInfo"==r)break;e[r]=n[r]}},setGroupInfo:function(e,t){for(var n in t)"pinMsg"==n?(Object(f["j"])(t.pinMsg,e.userId),e.pinMsg=t.pinMsg||{}):"members"==n?e.members=S()(t.members,e.userMap):e[n]=t[n]},setGroupUserInfo:function(e,t){e.userInfo=t,e.userId=t.user_id},addHistoryList:function(e,t){if(t.length){Object(f["b"])(t),e.lastMsgUid=0;var n=G.a.differenceBy(t,e.chatList,"hash")||[];e.chatList=n.concat(e.chatList)}},clearChatList:function(e){e.chatList=[],e.pinMsg={},e.groupId=null,e.lastMsgUid=0,e.eosInfo=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,isShowFullInfo:!0};e.chatList.splice(0,0,n)},addChatItem:function(e,t){var n=!!t.newMsg,r=!!t.fromdb,a=e.chatList,o=e.chatList.length;if(!t.group_id||t.group_id==e.groupId){if(t.list&&(t=t.list),o>0&&(e.lastMsgUid=a[o-1].userId),t&&t.length>0){Object(f["b"])(t),r&&(e.atList=[]),n&&!r&&t.forEach(function(t){e.userInfo&&Object(f["d"])(t.content,e.userInfo.user_name)&&e.atList.push(t)});var i=G.a.differenceBy(t,a,"hash")||[];a=a.concat(i)}else{var s=Object(f["r"])("lastShowMsgUid")||0,c=e.members[t.from]||t.user_info,u={name:c?c.nick_name:"unknown",content:t.content,userId:t.from,timestamp:t.timestamp,avatar:c?c.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,isShowFullInfo:t.from!=s};s=5==t.msg_type?0:t.from,Object(f["z"])("lastShowMsgUid",s),t.createTime&&(u.createTime=t.createTime),Object(f["c"])(u,a),Object(f["a"])(u);var p=a.findIndex(function(e){return u.hash&&e.hash===u.hash});p<0&&a.push(u)}e.chatList=a}},addPacketItem:function(e,t){var n=Object(f["r"])("lastShowMsgUid")||0,r={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["h"])(t.content)),type:t.from==e.userId?"me":"you",ext:{grabbed:0,redpack_status:0},hash:t.hash,isShowFullInfo:t.from!=n};t.from!=n&&(n=t.from),Object(f["z"])("lastShowMsgUid",n),Object(f["c"])(r,e.chatList),e.chatList.push(r),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,o=t.data,i=e.chatList,s=i.findIndex(function(e){return 4==e.msg_type&&e.content.trxId==a}),c=i[s];c.ext[n]=o,r["default"].set(e.chatList,s,c),Q.updatePackInfo(c.hash,n,o)},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 o=n[a];o.hash===t.hash&&(r["default"].set(o,"repealMsg",!0),r["default"].set(o,"from",t.from))}Q.removeMsg(t["session_id"],t.hash);var i=0;e.chatList.forEach(function(e,t){e.isShowFullInfo=e.userId!=i,i=5==e.msg_type||e.repealMsg?0:e.userId}),Object(f["z"])("lastShowMsgUid",i)},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=S()({},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 o=e.membersArray.findIndex(function(e){return e.user_id==r.user_id});o>-1&&(--e.membersNum,e.membersArray.splice(o,1))}},updateMemberInfo:function(e,t){var n=t.userId,a=t.nickName,o=t.imageUrl;for(var i in e.members)if(i==n){var s=e.members[i];a&&(s["name"]=a),o&&(s["cover_photo"]=o,e.isRefreshImg=!0),r["default"].set(e.members,i,s)}},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["j"])(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=_();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,n.isCommfirm=t.isCommfirm},setLastMsgUid:function(e,t){e.lastMsgUid=t},setGroupMembers:function(e,t){e.members=t},setIsRefreshImg:function(e,t){e.isRefreshImg=t}},ee=Z,te={state:_(),actions:X,mutations:ee},ne=te;r["default"].use(a["a"]);var re=k(),ae={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,""):""},muteList:function(e){return e.chat.sessionList.filter(function(e){return 1==e.is_mute})}};t["a"]=new a["a"].Store({state:re,mutations:o,actions:w,getters:ae,modules:{chat:D,group:ne}})},2:function(e,t){},"21f7":function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=null;function o(e,t){return i.apply(this,arguments)}function i(){return i=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-484a20ba").then(n.bind(null,"2ba8"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e)})),i.apply(this,arguments)}var s={install:function(e){var t;e.prototype.$showImgPreview=function(){var n=Object(r["a"])(regeneratorRuntime.mark(function n(r){var i;return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,o(e,a);case 2:i=n.sent,t&&(document.body.removeChild(t.$el),t=null),t=new i({el:document.createElement("div"),data:function(){return{visible:!0,imgUrl:r}}}),document.body.appendChild(t.$el);case 6:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}()}};t["a"]=s},2593:function(e,t,n){"use strict";n("612f"),n("4453");var r=n("ee95"),a=n("eb12"),o=n("ba94"),i=n("5ee8"),s=n("4e86"),c=n("5bc3"),u=n("411a"),p=function(e){function t(){return Object(a["a"])(this,t),Object(i["a"])(this,Object(s["a"])(t).call(this,"user"))}return Object(c["a"])(t,e),Object(o["a"])(t,[{key:"getUserMap",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o;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,o=t[a],e.next=12,n.get(o);case 12:r[o]=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"]=p},3:function(e,t){},"33f8":function(e,t,n){"use strict";n.d(t,"s",function(){return b}),n.d(t,"A",function(){return w}),n.d(t,"e",function(){return k}),n.d(t,"m",function(){return y}),n.d(t,"q",function(){return _}),n.d(t,"o",function(){return x}),n.d(t,"f",function(){return L}),n.d(t,"h",function(){return I}),n.d(t,"b",function(){return O}),n.d(t,"c",function(){return M}),n.d(t,"t",function(){return j}),n.d(t,"n",function(){return C}),n.d(t,"a",function(){return P}),n.d(t,"j",function(){return A}),n.d(t,"g",function(){return E}),n.d(t,"d",function(){return N}),n.d(t,"y",function(){return G}),n.d(t,"w",function(){return U}),n.d(t,"i",function(){return B}),n.d(t,"B",function(){return q}),n.d(t,"l",function(){return H}),n.d(t,"u",function(){return D}),n.d(t,"k",function(){return F}),n.d(t,"x",function(){return W}),n.d(t,"r",function(){return z}),n.d(t,"z",function(){return J}),n.d(t,"v",function(){return K}),n.d(t,"p",function(){return Y});var r=n("cc80"),a=n.n(r),o=(n("3a23"),n("ea65"),n("f91a"),n("96f8")),i=n.n(o),s=(n("612f"),n("f10e"),n("5f33"),n("3f46")),c=n.n(s),u=(n("7e48"),n("3050"),n("a619")),p=n.n(u),l=n("7199"),d=n.n(l),h=n("4c07"),m=n("50af"),f=n.n(m),g=18e4,v="dqWt6twz6JyEy3EZ";function b(){return/^test|\.webdev2\./.test(window.location.host)||""!==window.location.port}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";p.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){p.a.confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t()}).catch(function(){})})}function y(){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}function x(){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 S(e,t){for(var n,r=[],a=0,o="",i=0;i<256;i++)r[i]=i;for(i=0;i<256;i++)a=(a+r[i]+t.charCodeAt(i%t.length))%256,n=r[i],r[i]=r[a],r[a]=n;i=0,a=0;for(var s=0;sg,t=i()(e.timestamp),P(e)})}function M(e,t){if(0===t.length)e.timeMsg=!0;else{var n=i()(t[t.length-1].timestamp);e.timeMsg=i()(e.timestamp)-n>g}}function j(){return/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)}function C(){return location.pathname.indexOf("mini")>-1?"mini":j()?"h5":"pc"}function R(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>'"]/g,function(e){return t[e]})}function P(e){0==e.msg_type&&(e.content=R(e.content),e.content.match(T)&&(e.content=e.content.replace(T,function(e){return'').concat(e,"")})),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=I(e.msg),e.type=e.from==t?"me":"you",e.avatar=e.cover_photo||"",e.userId=e.from}function E(e,t){e.chatList.forEach(function(e){e.createTime==t&&(e.fail=!0,e.loading=!1)})}function N(e,t){if(!t)return!1;var n=new RegExp("@".concat(t));return n.test(e)}function $(e,t){var n=Math.abs(t-e.scrollTop),r=n>500?1e3:2*n,a=new d.a.Tween(e).to({scrollTop:t},r).easing(d.a.Easing.Quadratic.Out);return a.start()}function G(e,t,n,r){$(e,t).onComplete(function(){n.classList.toggle("active"),r&&r()}),setTimeout(function(){n.classList.toggle("active")},3e3)}var U={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=z("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,J("mute",n)}):(t.openGlobalNotice=e,J("mute",e))}};function B(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=f()().subtract(1,"days").format("YYYY-MM-DD"),a=f()(1*e),o=a.format("YYYY-MM-DD");switch(t){case 1:return o=1?c-1:0;p&&p!=l&&u.setAttribute("src",p)}break;case"up":for(var d=function(e){var t=n[e],r=t.getAttribute("originurl"),a=t.getAttribute("src"),o=t.getBoundingClientRect().top;if(o>=-100&&o=0;h--)d(h);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,o=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 o}function z(e){var t=localStorage.getItem("userOpt")||"{}";return t=JSON.parse(t),t[e]||""}function J(e,t){var n=localStorage.getItem("userOpt")||"{}";n=JSON.parse(n),n[e]=t,localStorage.setItem("userOpt",a()(n))}function K(){top!=self&&j()&&window.postMessager.send({action:"meechat:inputBlur"})}function Y(){var e="mini"!=C(),t=_("loginTypes"),n={eos:!0,meetone:e,eth:e,tron:e,telegram:!0};if(t){var r=t.split(","),a=function(e){n[e]=r.some(function(t){return t==e})};for(var o in n)a(o)}return 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("div",{staticClass:"packet-send-wrap"},["h5"==e.meechatType?n("back-bar",{staticClass:"redpacket-backbar",attrs:{title:e.$t("redPacket.title")},on:{onBack:e.hidePopup}}):e._e(),n("div",{staticClass:"send-wrap",class:[{"is-private":e.isPrivate}]},[n("i",{staticClass:"el-icon-close",on:{click:e.hidePopup}}),n("i",{staticClass:"el-icon-question",on:{click:function(t){e.helpShow=!0}}}),n("h3",{staticClass:"title"},[e._v(e._s(e.$t("redPacket.title")))]),n("p",{staticClass:"redpacket-tips",class:{hidden:!e.tips}},[e._v(e._s(e.tips))]),n("div",{staticClass:"main-box"},[n("div",{staticClass:"input-item"},[n("span",{staticClass:"text"},[e._v("\n "+e._s(e.$t("redPacket.totalAmount"))+"\n ")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.money,expression:"money",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:e.money},on:{blur:[e.inputBlur,function(t){return e.$forceUpdate()}],input:function(t){t.target.composing||(e.money=e._n(t.target.value))}}}),n("div",{staticClass:"unit"},[n("div",{staticClass:"cur-unit has-arrow"},[e._v(e._s(e.symbol))]),n("div",{staticClass:"code-menu"},[n("div",{class:["code-item",{disabled:"eos"!=e.loginType}],on:{click:function(t){return e.changeSymbol("EOS")}}},[e._v("EOS")]),"meetone"==e.loginType?n("div",{class:["code-item",{disabled:"meetone"!=e.loginType}],on:{click:function(t){return e.changeSymbol("MEETONE")}}},[e._v("MEETONE")]):e._e(),e.group.eosInfo?n("div",{staticClass:"code-item",on:{click:function(t){return e.changeSymbol(e.group.eosInfo.token)}}},[e._v(e._s(e.group.eosInfo.token))]):e._e()])])])]),e.isPrivate?e._e():n("p",{staticClass:"input-tips"},[e._v("\n "+e._s(e.$t("redPacket.tip1"))+"\n ")]),e.isPrivate?e._e():n("div",{staticClass:"input-item pack-num-input"},[n("span",{staticClass:"text"},[e._v(e._s(e.$t("redPacket.num")))]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:e.packetNum,expression:"packetNum",modifiers:{number:!0}}],attrs:{type:"number",placeholder:e.$t("redPacket.placeholder1")},domProps:{value:e.packetNum},on:{blur:[e.inputBlur,function(t){return e.$forceUpdate()}],input:function(t){t.target.composing||(e.packetNum=e._n(t.target.value))}}}),n("div",{staticClass:"unit"},[e._v(e._s(e.$t("redPacket.unit")))])])]),e.isPrivate?e._e():n("p",{staticClass:"group-user-num"},[e._v("\n "+e._s(e.$t("redPacket.tip2",{num:e.group.membersNum}))+"\n ")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.word,expression:"word"}],staticClass:"words",attrs:{placeholder:e.$t("redPacket.memo")},domProps:{value:e.word},on:{input:function(t){t.target.composing||(e.word=t.target.value)}}}),n("div",{staticClass:"sum"},[e._v("\n "+e._s(e.amountSum)+" "),n("span",[e._v(e._s(e.symbol))])]),n("button",{staticClass:"send-btn",class:{"is-disable":!e.amountSum||!e.packetNum,loading:e.isLoading},on:{click:e.sendPacket}},[e.isLoading?n("i",{staticClass:"el-icon-loading"}):e._e(),e._v(" "+e._s(e.$t("redPacket.sendBtn"))+"\n ")])]),n("p",{staticClass:"bot"},[e._v(e._s(e.$t("redPacket.tip3")))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:e.helpShow,expression:"helpShow"}],staticClass:"help-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(t){e.helpShow=!1}}}),n("h3",{staticClass:"title"},[e._v(e._s(e.$t("redPacket.helpTitle")))]),n("div",{staticClass:"content"},[n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule1"))+"\n ")]),n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule2"))+"\n ")]),n("div",{staticClass:"item"},[e._v("\n "+e._s(e.$t("redPacket.helpRule3"))+"\n ")])])])],1)]):e._e()])},a=[],o=n("cc80"),i=n.n(o),s=(n("b06f"),n("5f33"),n("f91a"),n("3a23"),n("3f62")),c=(n("4453"),n("ee95")),u=(n("0da4"),n("3050"),n("03a8")),p=n.n(u),l=n("3f47"),d=n("52c1"),h=n("b322"),m=n.n(h),f=n("b33c"),g=n("bf49"),v=n("33f8"),b=n("1848"),w={name:"packetSend",data:function(){var e=Object(v["r"])("loginType")||"eos";return{visible:!0,helpShow:!1,money:1,packetNum:1,word:this.$t("redPacket.memo"),tips:"",loginType:e,symbol:"EOS",isLoading:!1,isGameToken:!1,meechatType:Object(v["n"])()}},components:{backBar:b["a"]},computed:Object(l["a"])({},Object(d["e"])(["account","group","curSession","scatter","userInfo"]),Object(d["c"])(["isPrivate"]),{amountSum:function(){return this.money},minSum:function(){return this.isGameToken?m.a.divide(this.group.eosInfo.min_amount,1e4):.1},maxSum:function(){return this.isGameToken?m.a.divide(this.group.eosInfo.max_amount,1e4):200}}),watch:{money:function(e){e>this.maxSum&&(this.money=this.maxSum,this.showTip("".concat(this.$t("redPacket.maxMoneyTip")," ").concat(this.maxSum," ").concat(this.symbol))),e&&e/this.packetNum<.01&&(this.money=m.a.times(this.packetNum,.01),this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol)))},packetNum:function(e,t){this.money&&m.a.divide(this.money,e)<.01&&(this.packetNum=t,this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol))),e>100&&(this.packetNum=100,this.showTip("".concat(this.$t("redPacket.maxNumberTip")," 100 个")))}},methods:{inputBlur:function(){Object(v["v"])()},changeSymbol:function(e){this.symbol=e,this.isGameToken=this.group.eosInfo&&this.group.eosInfo.token==e},hidePopup:function(){this.visible=!1},showTip:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.tips=e,setTimeout(function(){t.tips=""},n)},checkCanSend:function(){var e=this.loginType,t=this.symbol.toLowerCase();if("eth"==t){if(!window.ethereum||!window.web3)return Object(v["A"])("你还没有安装eth插件"),!1}else{var n=Object(v["r"])("eosType")||"eos";if("eos"!=e&&"meetone"!=e)return p()({message:this.$t("redPacket.sendForEosTips"),type:"error"}),!1;if("eos"==t||"meetone"==t){var r=this.userInfo.binds.some(function(e){return e.type==t&&e.account});if(!r)return p()({message:this.$t("redPacket.bindForEosTips",{type:t}),type:"error"}),!1}if(e!=n)return p()({message:"重新检查下scatter身份",type:"error"}),!1}return!0},sendPacket:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.checkCanSend()){e.next=2;break}return e.abrupt("return");case 2:if(!(this.moneyNumber(d))){e.next=16;break}return p()({message:this.$t("public.noMoney"),type:"error"}),this.isLoading=!1,e.abrupt("return");case 16:this.isGameToken?(h=this.group.eosInfo.token_code,f["a"].doSymbolTransfer(this.account.name,n,t,i()(r),this.account.authority,h).then(function(e){m.hidePopup()}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;p()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1})):f["a"].transfer(this.account.name,n,t,i()(r),this.account.authority).then(function(e){m.hidePopup()}).catch(function(e){if(!e.type){var t=JSON.parse(e),n=t.error.details;p()({message:n[0].message,type:"error"})}}).finally(function(){m.isLoading=!1}),e.next=21;break;case 19:p()({message:this.$t("public.noMoney"),type:"error"}),this.isLoading=!1;case 21:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),transferEth:function(){var e=Object(c["a"])(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g["a"].doTransfer(this.money);case 3:this.hidePopup(),e.next=9;break;case 6:e.prev=6,e.t0=e["catch"](0),this.isLoading=!1;case 9:case"end":return e.stop()}},e,this,[[0,6]])}));function t(){return e.apply(this,arguments)}return t}(),transferTron:function(){}},mounted:function(){}},k=w,y=(n("088b"),n("17cc")),_=Object(y["a"])(k,r,a,!1,null,null,null),x=_.exports,S=n("6103");x.install=function(e,t){var n,r=e.extend(x);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:S["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el)}};t["a"]=x},3537:function(e,t,n){"use strict";var r=n("6e6d"),a=r["default"].directive("focus",{inserted:function(e){setTimeout(function(){e.focus()})}});t["a"]={focus:a}},"3b53":function(e,t,n){"use strict";var r=n("e590"),a=n.n(r);a.a},4:function(e,t){},"411a":function(e,t,n){"use strict";n("612f");var r=n("208e"),a=n.n(r),o=(n("4453"),n("ee95")),i=n("eb12"),s=n("ba94"),c=n("b89d"),u=n("d2eb"),p=null,l=function(){function e(){Object(i["a"])(this,e)}return Object(s["a"])(e,null,[{key:"initDb",value:function(){var t=Object(o["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"),p&&e.curDBUserId==n){t.next=6;break}return e.curDBUserId!=n&&(e.curDBUserId=n),t.next=5,d();case 5:p=t.sent;case 6:return t.abrupt("return",p);case 7:case"end":return t.stop()}},t)}));function n(){return t.apply(this,arguments)}return n}()},{key:"init",value:function(){var t=Object(o["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(!p){t.next=6;break}return t.abrupt("return",p.transaction(n,"readwrite").objectStore(n));case 6:return t.abrupt("return",null);case 7:case"end":return t.stop()}},t)}));function n(e){return t.apply(this,arguments)}return n}()}]),e}();function d(){return h.apply(this,arguments)}function h(){return h=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0: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)})),h.apply(this,arguments)}Object(c["a"])(l,"curDBUserId",localStorage.getItem("user_id"));var m=l,f=function(){function e(t){Object(i["a"])(this,e),this.tableName=t}return Object(s["a"])(e,[{key:"getObjTable",value:function(){var e=Object(o["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(o["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(o["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(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,o,i;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(o=e.t1.value,i=null,o!=r.keyPath){e.next=15;break}return e.next=12,r.get(n[o]);case 12:i=e.sent,e.next=18;break;case 15:return e.next=17,r.index(o).get(n[o]);case 17:i=e.sent;case 18:return i&&(i=a()(i,t),r.put(i)),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";n("4453");var r=n("ee95"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-74352652").then(n.bind(null,"15fa"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e)})),s.apply(this,arguments)}var c={install:function(e,t){var n;e.prototype.$showUserInfo=Object(r["a"])(regeneratorRuntime.mark(function r(){var s;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i(e,o);case 2:s=r.sent,n?n.visible=!0:(n=new s({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0}}}),document.body.appendChild(n.$el));case 4:case"end":return r.stop()}},r)}))}};t["a"]=c},"455d":function(e,t,n){"use strict";n("3a23"),n("0da4"),n("3050");var r=n("03a8"),a=n.n(r),o=(n("f91a"),n("cc80")),i=n.n(o),s=(n("7415"),n("3f46")),c=n.n(s),u=(n("4453"),n("ee95")),p=n("3f47"),l=n("5975"),d=n("33f8"),h=n("52c1"),m=n("ca42"),f=n.n(m),g=n("bf49"),v=n("ef30"),b=n("396f");function w(e){if(e)return k(e)}function k(e){for(var t in w.prototype)e[t]=w.prototype[t];return e}function y(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",n=arguments.length>1?arguments[1]:void 0;if(!(this instanceof y))return new y(t,n);t&&"object"===Object(b["a"])(t)&&(n=t,t=void 0),w(this),n=n||{},n.path=n.path||"/",this.opts=n,this.target=t,this.requestQueue={},window.addEventListener("message",function(t){e.msgHandler(t)},!1)}w.prototype.on=w.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},w.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},w.prototype.off=w.prototype.removeListener=w.prototype.removeAllListeners=w.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=500?Object(d["A"])(c.error.what):c.code>=400&&Object(d["A"])(n.$t("login.loginForSecurity")),n.$store.commit("setAccount",""),e.next=28,f.a.scatter&&f.a.scatter.identity&&f.a.scatter.logout&&f.a.scatter.logout();case 28:e.next=35;break;case 30:e.prev=30,e.t1=e["catch"](8),n.$store.commit("setAccount",""),r(e.t1),"mini"==n.meechatType?n.showLoginBtn=!0:n.isLogining&&(n.$router.replace("/login"),n.$store.commit("chatAppLogin",!1));case 35:n.setLogining(!1),e.next=42;break;case 38:"mini"==n.meechatType?n.showLoginBtn=!0:n.isLogining&&n.$router.replace("/login"),n.isLogining&&!localStorage.getItem("user_id")&&Object(d["A"])(n.$t("login.installScatter"),"Scatter"),n.setAccount(""),n.setLogining(!1);case 42:t();case 43:case"end":return e.stop()}},e,null,[[8,30],[12,19]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),connectScatterJS:function(){var e=this;return this.scatter?c.a.resolve(!0):new c.a(function(t,n){f.a.scatter.connect("MEE_CHAT").then(function(){var n=Object(u["a"])(regeneratorRuntime.mark(function n(r){return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:r?(e.setScatter(f.a.scatter),window.ScatterJS=null,t(!0)):t(!1);case 1:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}()).catch(function(t){e.setLogining(!1),n(t)})})},loginEth:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.curLoginType="eth",this.setLogining(!0),e.prev=2,e.next=5,g["a"].initEth();case 5:return t=e.sent,n=t.account,r=t.sign,e.next=10,l["a"].user.ethLogin({account:n,sign:r});case 10:a=e.sent,o=a.data,this.loginSuccCallBack({userId:o.data.user_id,token:o.data.token}),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](2),this.setLogining(!1);case 18:case"end":return e.stop()}},e,this,[[2,15]])}));function t(){return e.apply(this,arguments)}return t}(),loginTron:function(){var e=Object(u["a"])(regeneratorRuntime.mark(function e(){var t,n,r,a,o;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return this.curLoginType="tron",this.setLogining(!0),e.prev=2,e.next=5,v["a"].initTron();case 5:return t=e.sent,n=t.account,r=t.sign,e.next=10,l["a"].user.tronLogin({account:n,sign:r});case 10:a=e.sent,o=a.data,this.loginSuccCallBack({userId:o.data.user_id,token:o.data.token}),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](2),this.setLogining(!1);case 18:case"end":return e.stop()}},e,this,[[2,15]])}));function t(){return e.apply(this,arguments)}return t}(),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="+i()(e);this.winHandler=Object(d["x"])(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(d["x"])(""),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,a,o,i=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(0!==n){e.next=4;break}clearTimeout(S),e.next=6;break;case 4:if(!(n>=60)){e.next=6;break}return e.abrupt("return",!1);case 6:if(r={},a=!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,a=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,a=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(!a){e.next=33;break}return this.loginSuccCallBack({userId:r.data.data.user_id,token:r.data.data.token}),null!=this.winHandler&&(this.winHandler.close(),this.winHandler=null),e.abrupt("return",c.a.resolve(r.data));case 33:o&&(S=setTimeout(function(){i.loginCheck(t,++n)},1e3));case 34: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(t){var n,r,a,o,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:n=t.userId,r=void 0===n?null:n,a=t.token,o=void 0===a?null:a,this.setLogining(!1),Object(d["z"])("loginType",this.curLoginType),r&&(this.$store.commit("setUserId",r),localStorage.setItem("user_id",r)),o&&(this.$store.commit("setToken",o),localStorage.setItem("token",o)),e.t0=this.meechatType,e.next="mini"===e.t0?8:"h5"===e.t0?10:"pc"===e.t0?10:16;break;case 8:return this.$emit("initMiniLoginCallback"),e.abrupt("break",16);case 10:return"h5"===this.meechatType&&"login"===this.$route.name&&(i=this.from&&"null"!=this.from?this.from:"/",this.$router.replace(i)),e.next=13,this.initSocket();case 13:return this.$store.commit("chatAppLogin",!0),this.$store.commit("toApp",!0),e.abrupt("break",16);case 16:case"end":return e.stop()}},e,this)}));function t(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 _("*",{callback:t}),window.postMessager=this.postMessager}}}},"4bc7":function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-21bd4ca5").then(n.bind(null,"fcb7"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e)})),s.apply(this,arguments)}var c={install:function(e,t,n){var s;e.prototype.$showInvite=function(){var c=Object(r["a"])(regeneratorRuntime.mark(function r(c,u){var p;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,i(e,o);case 2:p=r.sent,s&&(document.body.removeChild(s.$el),s=null),s=new p({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,inviteType:c,ext:u}}}),document.body.appendChild(s.$el);case 6:case"end":return r.stop()}},r)}));return function(e,t){return c.apply(this,arguments)}}()}};t["a"]=c},5975:function(e,t,n){"use strict";var r=n("208e"),a=n.n(r),o=n("cc80"),i=n.n(o),s=(n("7e48"),n("3050"),n("a619")),c=n.n(s),u=n("3f46"),p=n.n(u),l=(n("4453"),n("ee95")),d=n("7f43"),h=n.n(d),m=n("fed1"),f=n.n(m),g=n("1c04"),v=n("33f8"),b="";"8080"===window.location.port&&(b="//test.mee.chat//");var w=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 k(e){return y.apply(this,arguments)}function y(){return y=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,null,[[0,6]])})),y.apply(this,arguments)}w.host=b,w.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["n"])().indexOf("h5")){e.next=6;break}Object(v["B"])(),e.next=14;break;case 6:return e.prev=6,e.next=9,g["a"].dispatch("doGameLogin");case 9:return e.abrupt("return",k(t));case 12:e.prev=12,e.t0=e["catch"](6);case 14:e.next=17;break;case 16:return e.abrupt("return",k(t));case 17:e.next=20;break;case 19:return e.abrupt("return",k(t));case 20:case"end":return e.stop()}},e,null,[[6,12]])}));return function(t){return e.apply(this,arguments)}}(),function(e){return p.a.reject(e)}),w.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?p.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(){}}),p.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return p.a.reject(e)}),w.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 p.a(function(){var e=Object(l["a"])(regeneratorRuntime.mark(function e(r,a){var o,s,c,u,p,l,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return o=null,e.next=3,k(t);case 3:if(t=e.sent,"post"===t.method?o=t.data:"get"===t.method&&(o=t.params),s="",t.cacheKeys)for(c in t.cacheKeys)u=t.cacheKeys[c],s+=u+"="+o[u]+"&";else s=i()(o);return p=t.method+":"+t.url+"?"+s,l=localStorage.getItem(p),l&&(n=JSON.parse(l),t.callback(n)),e.next=12,w.request(t);case 12:n=e.sent,delete n["config"],delete n["request"],d=i()(n),l!=d&&(n.data.result&&localStorage.setItem(p,d),t.callback(n));case 17:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()));case 5:return e.next=7,w.request(t);case 7:n=e.sent,t.callback(n);case 9:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();var _=w,x={groupAuth:function(e){return _.request({url:"default/groupAuth",method:"post",needLogin:!0,data:e})},feedback:function(){return _.request({url:"default/tick ",method:"post",needLogin:!0})},discovery:function(){return _.request({url:"default/discovery",method:"post"})}},S="";"8080"===window.location.port&&(S="//test.mee.chat/");var L=h.a.create({baseURL:S,headers:{"Content-Type":"multipart/form-data"},withCredentials:!0});L.host=S,L.interceptors.response.use(function(e){return 1===e.data.result||-1001===e.data.code?p.a.resolve(e):-5!==e.data.code?(c.a.confirm(e.data.msg,"Error",{center:!0,showCancelButton:!1,showConfirmButton:!1,callback:function(){}}),p.a.reject(new Error(e.data.msg))):void g["a"].dispatch("resetGameLogin")},function(e){return p.a.reject(e)});var I=L,T={getRandom:function(e){return _.get("user/random",{params:e})},getRandom2:function(e){return _.get("user/random2",{params:e})},eosLogin:function(e){return _.post("user/eosLogin",e)},eosLogin2:function(e){return _.post("user/eosLogin2",e)},eosBind:function(e){return _.request({url:"user/eosBind",method:"post",needLogin:!0,data:e})},eosBind2:function(e){return _.request({url:"user/eosBind2",method:"post",needLogin:!0,data:e})},ethLogin:function(e){return _.post("user/ethLogin",e)},simplewalletCheck:function(e){return _.get("user/simplewalletCheck",{params:e,noErrorMsg:!0})},ethBind:function(e){return _.request({url:"user/ethBind",method:"post",needLogin:!0,data:e})},tronLogin:function(e){return _.post("user/tronLogin",e)},tronBind:function(e){return _.request({url:"user/tronBind",method:"post",needLogin:!0,data:e})},unBind:function(e){return _.request({url:"user/unbind",method:"post",needLogin:!0,data:e})},tgCSRF:function(e){return _.request({url:"user/tgCSRF",method:"post",data:e})},tgLogin2:function(e){return _.request({url:"user/tgLogin2",method:"post",data:e})},tgBind2:function(e){return _.request({url:"user/tgBind2",method:"post",needLogin:!0,data:e})},checkLocalLogin:function(e){return _.request({url:"user/checkLogin",method:"post",data:e})},changeUserName:function(e){return _.request({url:"user/changeUserName",method:"post",needLogin:!0,data:e})},changeNickName:function(e){return _.request({url:"user/changeNickName",method:"post",needLogin:!0,data:e})},changePhoto:function(e){return I.request({url:"user/changePhoto",method:"post",data:e})},setVisible:function(e){return _.request({url:"user/setVisible",method:"post",needLogin:!0,data:e})},getInfo:function(e){return _.request({url:"user/info",method:"get",needLogin:!0,params:e})},getOtherInfo:function(e){return _.request({url:"user/info",method:"get",needLogin:!1,params:e})}},O=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,_.request({url:"group/newMsg",method:"get",needLogin:!1,params:t});case 2:return n=e.sent,r=new O["a"],e.next=6,r.saveMsg(t["group_id"],n.data.data);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return _.request({url:"group/historyMsg",method:"get",needLogin:!1,params:e})},getGroupInfo:function(e){return _.request({url:"group/info",method:"get",needLogin:!1,params:e})},getGroupInfo2:function(e,t){_.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["f"])(e.msg),_.request({url:"group/sendMsg",method:"post",needLogin:!0,data:e})},createGroup:function(e){return _.request({url:"group/create",method:"post",needLogin:!0,data:e})},joinGroup:function(e){return _.request({url:"group/join",method:"get",needLogin:!0,params:e})},leaveGroup:function(e){return _.request({url:"group/leave",method:"get",needLogin:!0,params:e})},blockUser:function(e){return _.request({url:"group/blockUser",method:"get",needLogin:!0,params:e})},unblockUser:function(e){return _.request({url:"group/unblockUser",method:"get",needLogin:!0,params:e})},changeName:function(e){return _.request({url:"group/changeName",method:"post",needLogin:!0,data:e})},changeNotice:function(e){return _.request({url:"group/changeNotice",method:"post",needLogin:!0,data:e})},changeCover:function(e){return I.request({url:"group/changeCover",method:"post",data:e})},changeTitle:function(e){return _.request({url:"group/changeTitle",method:"post",needLogin:!0,data:e})},invites:function(e){return _.request({url:"group/invites",method:"post",needLogin:!0,data:e})},removes:function(e){return _.request({url:"group/removes",method:"post",needLogin:!0,data:e})},repealGroupMsg:function(e){return _.request({url:"group/repealMsg",method:"post",needLogin:!0,data:e})},sendImageMsg:function(e){return _.request({url:"group/sendImageMsg",method:"post",needLogin:!0,headers:{"Content-Type":"multipart/form-data"},data:e})},getFriends:function(e){return _.request({url:"group/getFriends",method:"get",needLogin:!0,params:e})},pinMsg:function(e){return _.request({url:"group/pinMsg",method:"post",needLogin:!0,data:e})},unpinMsg:function(e){return _.request({url:"group/unpinMsg",method:"post",needLogin:!0,data:e})},addAdmin:function(e){return _.request({url:"group/addAdmin",method:"post",needLogin:!0,data:e})},removeAdmin:function(e){return _.request({url:"group/removeAdmin",method:"post",needLogin:!0,data:e})},searchMember:function(e){return _.request({url:"group/memberSearch",method:"post",needLogin:!0,data:e})},changeCreator:function(e){return _.request({url:"group/changeCreator",method:"post",needLogin:!0,data:e})},getHotList:function(){return _.request({url:"group/hotList ",method:"post",needLogin:!0})}},j={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,_.request({url:"person/newMsg",method:"get",needLogin:!0,params:t});case 2:return n=e.sent,r=new O["a"],e.next=6,r.saveMsg(t["session_id"],n.data.data);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));function t(t){return e.apply(this,arguments)}return t}(),getHistoryMsg:function(e){return _.request({url:"person/historyMsg",method:"get",needLogin:!0,params:e})},sendMsg:function(e){return e.msg=Object(v["f"])(e.msg),_.request({url:"person/sendMsg",method:"post",needLogin:!0,data:e})},repealPersonMsg:function(e){return _.request({url:"person/repealMsg",method:"post",needLogin:!0,data:e})}},C={sessionList:function(e){return _.request2({url:"session/list",method:"get",needLogin:!0,callback:e})},setRead:function(e){return _.request({url:"session/setRead",method:"post",needLogin:!0,data:e})},setMute:function(e){return _.request({url:"session/mute",method:"post",needLogin:!0,data:e})},cancelMute:function(e){return _.request({url:"session/unMute",method:"post",needLogin:!0,data:e})},setPin:function(e){return _.request({url:"session/pin",method:"post",needLogin:!0,data:e})},cancelPin:function(e){return _.request({url:"session/unPin",method:"post",needLogin:!0,data:e})},deleteSession:function(e){return _.request({url:"session/delete",method:"post",needLogin:!0,data:e})},fileUpload:function(e){return _.request({url:"session/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},needLogin:!0,data:e})},getMiniUnRead:function(e){return _.request({url:"session/miniUnRead ",method:"post",needLogin:!0,data:e})}},R={grabPacket:function(e){return _.request({url:"redpack/grab",method:"get",needLogin:!0,params:e})},grabDetail:function(e){return _.request({url:"redpack/detail",method:"get",needLogin:!0,params:e})},sendList:function(e){return _.request({url:"redpack/sendList",method:"get",needLogin:!0,params:e})},receiveList:function(e){return _.request({url:"redpack/receiveList",method:"get",needLogin:!0,params:e})}},P={getWebhook:function(e){return _.request({url:"tg/webhook",method:"get",needLogin:!0,params:e})},getSyncInfo:function(e){return _.request({url:"tg/sync",method:"post",needLogin:!0,params:e})},doSync:function(e){return _.request({url:"tg/doSync",method:"post",needLogin:!0,params:e})}};t["a"]={host:_.host,base:x,user:T,group:M,person:j,session:C,tg:P,redpack:R}},"5a09":function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-55ee6bb8").then(n.bind(null,"9744"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e)})),s.apply(this,arguments)}var c={install:function(e,t,n){var s;e.prototype.$showOtherInfo=Object(r["a"])(regeneratorRuntime.mark(function r(){var c,u,p=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return c=p.length>0&&void 0!==p[0]?p[0]:0,r.next=3,i(e,o);case 3:u=r.sent,s&&(document.body.removeChild(s.$el),s=null),s=new u({el:document.createElement("div"),router:n,computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!1,userId:c}}}),document.body.appendChild(s.$el);case 7:case"end":return r.stop()}},r)}))}};t["a"]=c},6032:function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=n("6103"),o=null;function i(e,t){return s.apply(this,arguments)}function s(){return s=Object(r["a"])(regeneratorRuntime.mark(function e(t,r){var a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(r){e.next=6;break}return e.next=3,n.e("chunk-fbfb9796").then(n.bind(null,"ab27"));case 3:return a=e.sent,r=t.extend(a.default),e.abrupt("return",r);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}},e)})),s.apply(this,arguments)}var c={install:function(e,t){var n;e.prototype.$editUserAvatar=Object(r["a"])(regeneratorRuntime.mark(function r(){var s,c,u=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return s=u.length>0&&void 0!==u[0]?u[0]:"",r.next=3,i(e,o);case 3:c=r.sent,n?(n.visible=!0,n.imageUrl=s,n.isMe=!0):(n=new c({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,imageUrl:s,isMe:!0}}}),document.body.appendChild(n.$el));case 5:case"end":return r.stop()}},r)})),e.prototype.$editGroupAvatar=Object(r["a"])(regeneratorRuntime.mark(function r(){var s,c,u=arguments;return regeneratorRuntime.wrap(function(r){while(1)switch(r.prev=r.next){case 0:return s=u.length>0&&void 0!==u[0]?u[0]:"",r.next=3,i(e,o);case 3:c=r.sent,n?(n.visible=!0,n.imageUrl=s,n.isMe=!1):(n=new c({el:document.createElement("div"),computed:{$store:function(){return t}},i18n:a["a"],data:function(){return{visible:!0,imageUrl:s,isMe:!1}}}),document.body.appendChild(n.$el));case 5:case"end":return r.stop()}},r)}))}};t["a"]=c},6103:function(e,t,n){"use strict";var r=n("6e6d"),a=n("4f0d"),o={h5:{discover:"Discover",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","ext"],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:"Transferred to the corresponding account",account:" account",best:" Best luck",received:"already received",lootAll:"Loot all",expired:"expired",tip4:"Total {total} {unit}, {num} {unit} Has been open",drawed:"got",whos:" ",sendForEosTips:"Red Packet Sending is only available to EOS logged-in users",bindForEosTips:"you have not yet bound {type} account",receiveRedpack:"received a red redpack"},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 administrator 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",joinTip:"Please join the group first"},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",loginForSecurity:"For data security, please login again"},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."}},i=o,s={h5:{discover:"发现",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:["图片","视频","音频","红包","ext"],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}",drawed:"领取了",whos:"的",sendForEosTips:"发送红包功能只对Eos/Meetone登录用户开放",bindForEosTips:"你还没有绑定 {type} 账号",receiveRedpack:"领取了红包"},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:"已退出该群聊",joinTip:"请先加入群组"},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桌面版",installError:"你还没有安装{type}插件"},login:{login:"登录",accountLogin:"账号登录",autoLogin:"自动登录中",loginWithScatter:"请使用scatter进行登录",loadScatter:"未安装?请下载scatter程序",installScatter:"请安装scatter插件",otherType:"登录方式",loginTipAccount:"请输入MeeChat账号",loginTipPsw:"请输入密码",loginForSecurity:"为了资料安全,请重新登录"},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 p={en:i,zh:c},l=localStorage.getItem("lang")||Object(u["m"])(),d=new a["a"]({locale:l,messages:p});t["a"]=d},6403:function(e,t,n){},"76a4":function(e,t,n){"use strict";var r=n("396f"),a=!1;function o(e){if(e)return i(e)}function i(e){for(var t in o.prototype)e[t]=o.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),o(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()}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-1,r=!!o&&o.indexOf(n)>-1,t||r}),this.isSearch=!0):this.isSearch=!1}}},h={data:function(){return{showNum:0,isSearchGroup:!1,searchUserTimer:null,searchGroupList:[]}},methods:{searchUser:function(){var e=Object(i["a"])(regeneratorRuntime.mark(function e(t,n){var r=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:clearTimeout(this.searchUserTimer),this.searchUserTimer=setTimeout(Object(i["a"])(regeneratorRuntime.mark(function e(){var a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.target.value.toLocaleLowerCase(),i=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,n=r.originListCache}),e.abrupt("return");case 7:if(n.forEach(function(e){var t,n,o=(e.user_name||"").toLocaleLowerCase(),i=(e.nick_name||"").toLocaleLowerCase();t=!!o&&o.indexOf(a)>-1,n=!!i&&i.indexOf(a)>-1,r.$set(e,"isShow",t||n)}),n.length+1>=r.membersNum||1==i||2==i){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(o["a"])(n),Object(o["a"])(r)),"user_id")});case 11:r.searchGroupList=n,r.$nextTick(function(){r.showNum=n.filter(function(e){return e.isShow}).length});case 13:case"end":return e.stop()}},e)})),200);case 4: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-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 o in a){var i=a[o].user_name,s=new RegExp("@".concat(i," $"));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n-i.length-2,n-i.length-2),!0}},handleRight:function(e){var t=this.$refs.chatInput,n=t.selectionStart,r=this.getStrAfterSelection(),a=this.group.members;for(var o in a){var i=a[o].user_name,s=new RegExp("^@".concat(i," "));if(s.test(r))return e.preventDefault(),t.setSelectionRange(n+i.length+2,n+i.length+2),!0}return!0},handleDel:function(e){var t=this,n=this.$refs.chatInput,a=n.selectionStart;if(0!==a){var o=this.getStrBeforeSelection(),i=this.group.members,s=function(r){var s=i[r].user_name,c=new RegExp("@".concat(s," $"));if(c.test(o))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 i){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)}Object(c["v"])()},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,o={cover_photo:a.cover_photo,is_group:"0",name:a.nick_name,session_id:t,unread:0};n.$store.commit("addSessionItem",o)})}}},v={data:function(){return{curLang:Object(c["r"])("lang")||Object(c["m"])()}},methods:{changeLang:function(){var e="en"==this.curLang?"zh":"en";this.$i18n.locale=e,this.curLang=e,Object(c["z"])("lang",e)}}}},"8d4d":function(e,t,n){"use strict";n("612f");var r=n("208e"),a=n.n(r),o=(n("4453"),n("ee95")),i=n("eb12"),s=n("ba94"),c=n("5ee8"),u=n("4e86"),p=n("5bc3"),l=n("411a"),d=n("2593"),h=function(e){function t(){return Object(i["a"])(this,t),Object(c["a"])(this,Object(u["a"])(t).call(this,"message"))}return Object(p["a"])(t,e),Object(s["a"])(t,[{key:"getMsg",value:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var n,r,a,o,i,s,c,u,p,l,h,m=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(n=m.length>1&&void 0!==m[1]?m[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],o=[t,999999999999999],i=IDBKeyRange.bound(a,o),e.next=13,r.index("session_id").openCursor(i,"prev");case 13:s=e.sent,c=[],u={};case 16:if(!s||!s.value){e.next=30;break}if(p=s.value,!(c.length1&&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=d,a["default"].prototype.$hideTips=h}t["a"]=m},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"},[e.showLoginTypes.eos?n("li",{on:{click:function(t){return t.stopPropagation(),e.handleEos("eos")}}},[n("i",{staticClass:"icon icon-eos"}),n("p",[e._v("EOS")])]):e._e(),e.showLoginTypes.meetone?n("li",{on:{click:function(t){return t.stopPropagation(),e.handleEos("meetone")}}},[n("i",{staticClass:"icon icon-meetone"}),n("p",[e._v("Meetone")])]):e._e(),e.showLoginTypes.eth?n("li",{on:{click:function(t){return t.stopPropagation(),e.loginEth(t)}}},[n("i",{staticClass:"icon icon-eth"}),n("p",[e._v("ETH")])]):e._e(),e.showLoginTypes.tron?n("li",{on:{click:function(t){return t.stopPropagation(),e.loginTron(t)}}},[n("i",{staticClass:"icon icon-tron"}),n("p",[e._v("TRON")])]):e._e(),!e.inWallet&&e.showLoginTypes.telegram?n("li",{on:{click:function(t){return t.stopPropagation(),e.loginTelegram(t)}}},[n("i",{staticClass:"icon icon-tele"}),n("p",[e._v("Telegram")])]):e._e()])},a=[],o=(n("3a23"),n("39ab"),n("3050"),n("c843")),i=n.n(o),s=n("6e6d"),c=n("455d"),u=n("33f8");s["default"].component(i.a.name,i.a);var p={name:"loginBox",mixins:[c["a"]],data:function(){return{meechatType:Object(u["n"])()}},created:function(){},computed:{inWallet:function(){return/token|meet\.one|wallet|bit|eos|nova/.test(navigator.userAgent.toLowerCase())}},methods:{handleEos:function(e){top===self?this.loginEosMeetoneCommon(e):this.loginEosMeetoneParent(e)}}},l=p,d=(n("3b53"),n("17cc")),h=Object(d["a"])(l,r,a,!1,null,"b326c86a",null);t["a"]=h.exports},a7de:function(e,t,n){"use strict";var r=n("ef2f"),a=n.n(r);a.a},b00b:function(e,t,n){},b33c:function(e,t,n){"use strict";var r=n("3f46"),a=n.n(r),o=(n("4453"),n("ee95")),i=n("e332"),s={transfer:function(e,t,n,r,a){var o="transfer",i={authorization:["".concat(e,"@").concat(a)]};return self!==top?c(o,[e,t,n,r,i]):window.EOS[o](e,t,n,r,i)},getCurrencyBalance:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"EOS",r="getCurrencyBalance";return self!==top?c(r,[e,t,n]):window.EOS.getCurrencyBalance(e,t,n)},doSymbolTransfer:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,n,r,o,i,s){var u,p,l,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(u="transfer",p={authorization:["".concat(t,"@").concat(i)]},self===top){e.next=6;break}return e.abrupt("return",c(u,[t,n,r,o,p],s));case 6:return e.prev=6,e.next=9,window.EOS.contract(s);case 9:return l=e.sent,e.next=12,l[u](t,n,r,o,p);case 12:return d=e.sent,e.abrupt("return",a.a.resolve(d));case 16:return e.prev=16,e.t0=e["catch"](6),e.abrupt("return",a.a.reject(e.t0));case 19:case"end":return e.stop()}},e,null,[[6,16]])}));function t(t,n,r,a,o,i){return e.apply(this,arguments)}return t}()};function c(e,t){return u.apply(this,arguments)}function u(){return u=Object(o["a"])(regeneratorRuntime.mark(function e(t,n){var r,a,o=arguments;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:"",e.next=3,Object(i["b"])();case 3:return a=e.sent,e.abrupt("return",window.postMessager.send({action:"meechat:eosAction",data:{action:t,param:n,contract:r,network:a}}));case 5:case"end":return e.stop()}},e)})),u.apply(this,arguments)}t["a"]=s},bf49:function(e,t,n){"use strict";n("48fb"),n("4453");var r=n("ee95"),a=n("5975"),o=n("33f8"),i=n("c0f9"),s={isInitEth:!1,curAccount:"",network:0,checkMainNetwork:function(){return new i["Promise"](function(e,t){window.web3.version.getNetwork(function(n,r){if(1!=r)return console.log(n),t(new Error(""));e()})})},initEth:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(window.ethereum&&window.web3){e.next=3;break}return Object(o["A"])("你还没有安装eth插件"),e.abrupt("return",i["Promise"].reject(new Error("")));case 3:if(!window.ethereum||this.isInitEth){e.next=7;break}return e.next=6,window.ethereum.enable();case 6:this.isInitEth=!0;case 7:return e.next=9,this.checkMainNetwork();case 9:if(t=window.web3.eth.accounts,n=this.account=t[0],!n){e.next=19;break}return this.curAccount=n,e.next=15,a["a"].user.getRandom2({account:n});case 15:return r=e.sent,e.abrupt("return",new i["Promise"](function(e,t){try{window.web3.personal.sign(window.web3.fromUtf8("Welcome to MeeChat! Decentralization Social Platform (".concat(r.data.data.random,")")),window.web3.eth.coinbase,function(r,a){r?t(r):e({account:n,sign:a})})}catch(a){t(a)}}));case 19:return e.abrupt("return",i["Promise"].reject(new Error("")));case 20:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),doTransfer:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.initEth();case 3:return e.next=5,window.web3.eth.getBalance(this.curAccount);case 5:if(n=e.sent,!(1e18*t>n)){e.next=9;break}return Object(o["A"])("The balance of account is insufficient."),e.abrupt("return");case 9:return r={from:this.account,to:"0x42eb768f2244c8811c63729a21a3569731535f06",value:window.web3.utils.toWei(t.toString(),"ether")},e.abrupt("return",new i["Promise"](function(e,t){window.web3.eth.sendTransaction(r,function(n,r){n?t(n):e()})}));case 13:return e.prev=13,e.t0=e["catch"](0),e.abrupt("return",i["Promise"].reject(e.t0));case 16:case"end":return e.stop()}},e,this,[[0,13]])}));function t(t){return e.apply(this,arguments)}return t}(),waitEthTransfer:function(e){var t=this;window.web3.eth.getTransactionReceipt(e,function(n,r){console.log("waitEthTransfer",n,r),n&&console.error(n),r?r&&r.status&&(t.visible=!1):setTimeout(t.waitEthTransfer,1e3,e),console.log("res",r)})}};t["a"]=s},c375:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return o});var r=n("6e6d"),a=n("1e6f");r["default"].use(a["a"]);var o=new a["a"]({routes:[{path:"/",alias:["/user/:id","/login","/other/:id","/me","/editMe","/editInfo/:type","/groupSet/:id","/invite/:inviteType","/packetSend","/packetGet/:id","/search","/discover"],name:"noChat",component:function(e){n.e("chunk-23212ac5").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-579c6ae2"),n.e("chunk-7fdb0984")]).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-579c6ae2"),n.e("chunk-7fdb0984")]).then(function(){var t=[n("7a9f")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/hotGroup",name:"hotGroup",component:function(e){n.e("chunk-5b86aac9").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-4be0e358").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]}),i=new a["a"]({routes:[{name:"chatList",path:"/",alias:"/user/:id",component:function(e){n.e("chunk-57c7c03e").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-267b45e3").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-eab6c874").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-335f5c5d").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-3ab2e3e3").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-3ae6835b"),n.e("chunk-6cae8a9b")]).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-b5c34688").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-579c6ae2"),n.e("chunk-5f9e2970")]).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-3ae6835b"),n.e("chunk-30d4e831")]).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-579c6ae2"),n.e("chunk-5f9e2970")]).then(function(){var t=[n("d5e1")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/invite/:inviteType/:id?",name:"invite",component:function(e){n.e("chunk-a6830cb4").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-5b86aac9"),n.e("chunk-652c94c5")]).then(function(){var t=[n("4d7a")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/discover",name:"discover",component:function(e){Promise.all([n.e("chunk-5b86aac9"),n.e("chunk-dcb2943e")]).then(function(){var t=[n("5592")];e.apply(null,t)}.bind(this)).catch(n.oe)}},{path:"/password",name:"password",component:function(e){n.e("chunk-ba45f5e6").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-4be0e358").then(function(){var t=[n("e479")];e.apply(null,t)}.bind(this)).catch(n.oe)}}]});i.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()})},c3cb:function(e,t,n){},c62f:function(e,t,n){"use strict";var r=n("c3cb"),a=n.n(r);a.a},e332:function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=n("3f46"),o=n.n(a);n("612f"),n("b5ad");function i(){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 o.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,o.a.race(t);case 5:return a=e.sent,e.abrupt("return",a);case 7:case"end":return e.stop()}},e)})),s.apply(this,arguments)}var c=n("33f8");function u(){return p.apply(this,arguments)}function p(){return p=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=15;break;case 6:if("meetone"!=Object(c["r"])("eosType")){e.next=11;break}t["host"]="fullnode.meet.one",t["chainId"]="cfe6486a83bad4962f232d48003b1824ab5665c36778141034d75e57b956e422",e.next=15;break;case 11:return e.next=13,i();case 13:t["host"]=e.sent,t["chainId"]="aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906";case 15:return e.abrupt("return",t);case 16:case"end":return e.stop()}},e)})),p.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 d(){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 d}),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",eosio:"mainnet.eosio.sg",jeda:"api.jeda.one",oraclechain:"api.oraclechain.io",eosasia:"geo.eosasia.one"}},e567:function(e,t,n){"use strict";var r=n("b00b"),a=n.n(r);a.a},e590:function(e,t,n){},e9ca:function(e,t,n){"use strict";var r=n("7199"),a=n.n(r);function o(e){requestAnimationFrame(o),a.a.update(e)}if(requestAnimationFrame(o),"serviceWorker"in navigator){var i="/sw.js";navigator.serviceWorker.register(i).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})},ef2f:function(e,t,n){},ef30:function(e,t,n){"use strict";n("4453");var r=n("ee95"),a=n("5975"),o=n("33f8"),i=n("c0f9"),s={account:"",initTron:function(){var e=Object(r["a"])(regeneratorRuntime.mark(function e(){var t,n,r,s;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(window.tronWeb){e.next=3;break}return Object(o["A"])("你还没有安装tron插件"),e.abrupt("return",i["Promise"].reject(new Error("")));case 3:return t=window.tronWeb.defaultAddress.base58,e.next=6,a["a"].user.getRandom2({account:t});case 6:return n=e.sent,r=window.tronWeb.sha3(n.data.data.random),e.prev=8,e.next=11,window.tronWeb.trx.signMessage(r);case 11:s=e.sent,e.next=19;break;case 14:return e.prev=14,e.t0=e["catch"](8),"Invalid transaction provided"==e.t0?Object(o["A"])("请重新安装钱包插件"):Object(o["A"])(e.t0),this.setLogining(!1),e.abrupt("return");case 19:return e.prev=19,e.abrupt("return",i["Promise"].resolve({account:t,sign:s}));case 23:return e.prev=23,e.t1=e["catch"](19),e.abrupt("return",i["Promise"].reject(e.t1));case 26:case"end":return e.stop()}},e,this,[[8,14],[19,23]])}));function t(){return e.apply(this,arguments)}return t}()};t["a"]=s}}]);