(function(t){function e(e){for(var i,s,r=e[0],c=e[1],u=e[2],h=0,p=[];h0&&1==t.item.is_mute?n("i",{staticClass:"mute mute-point"}):t.item.unread>0&&0==t.item.is_mute?n("i",{staticClass:"mute mute-num"},[t._v(t._s(t.item.unread))]):t._e(),t.item.cover_photo?n("img",{staticClass:"user-avatar",attrs:{src:t.item.cover_photo,alt:""}}):n("div",{staticClass:"user-avatar",class:"avatar_bg"+t.bgColorNum(t.item.session_id),attrs:{"data-name":t.item.name&&t.item.name.slice(0,2).toUpperCase()}}),1==t.item.is_auth?n("i",{staticClass:"icon-auth"}):t._e()]),n("div",{staticClass:"info"},[n("h3",[1==t.item.is_group?n("i",{staticClass:"icon-group"}):t._e(),n("span",[t._v(t._s(t.item.name))])]),n("p",[t.item.unread>0&&1==t.item.is_mute?n("span",[t._v("["+t._s(t.item.unread)+t._s(t.$t("public.item"))+"]")]):t._e(),t.item.last_msg?[5==t.item.last_msg.msg_type?["grab_redpack"==t.item.last_msg.event_type?[t._v("\n "+t._s((t.userInfo&&t.userInfo.user_id)==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+" "+t._s(t.$t("redPacket.receiveRedpack"))+"\n ")]:"join"==t.item.last_msg.event_type?[t._v("\n "+t._s((t.userInfo&&t.userInfo.user_id)==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+" "+t._s(t.$t("chat.joinGroup"))+"\n ")]:t._e()]:t.item.is_group?[t._v("\n "+t._s(t.item.last_msg.nick_name)+":"+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]:[t._v("\n "+t._s(0===t.item.last_msg.msg_type?t.item.cont:-1===t.item.last_msg.msg_type?""+(t.userId==t.item.last_msg.from?t.$t("public.you"):t.item.last_msg.nick_name)+t.$t("chat.revokeMsg"):"["+t.$t("chat.msgType["+(t.item.last_msg.msg_type-1)+"]")+"]")+"\n ")]]:t._e()],2),n("span",{staticClass:"time"},[t._v(t._s(t.handleUpdate(t.item.update_time_int)))]),1==t.item.is_mute?n("i",{staticClass:"icon-mute"}):t._e()]),t.item.session_id?n("ul",{directives:[{name:"show",rawName:"v-show",value:t.showToolbar,expression:"showToolbar"}],staticClass:"pub-pop-toolbar ext-session",style:{left:t.toolBarLeft,top:t.toolBarTop}},[n("li",{on:{click:function(e){return e.stopPropagation(),t.changePin(t.item.session_id,t.item.is_pin)}}},[t._v(t._s(1==t.item.is_pin?""+t.$t("public.cancel")+t.$t("chat.sticky"):t.$t("chat.sticky")))]),n("li",{on:{click:function(e){return e.stopPropagation(),t.changeMute(t.item.session_id,t.item.is_mute)}}},[t._v(t._s(1==t.item.is_mute?t.$t("group.cancelDisturb"):t.$t("group.doNotDisturb")))]),n("li",{on:{click:function(e){return e.stopPropagation(),t.delSession(t.item.session_id)}}},[t._v(t._s(t.$t("chat.deleteSession")))])]):t._e()])},s=[],a=(n("4453"),n("ee95")),o=n("3f47"),r=n("52c1"),c=n("5975"),u=n("33f8"),h={name:"msgItem",props:{item:{type:Object}},data:function(){return{toolBarLeft:0,toolBarTop:0,showToolbar:!1,meechatType:Object(u["n"])()}},computed:Object(o["a"])({},Object(r["e"])(["curSession","userId"]),{userInfo:function(){return this.$store.state.userInfo}}),methods:{changeSessionId:function(t){var e=1==t.is_group?"/group/".concat(t.session_id):"/pm/".concat(t.session_id);this.$router.push({path:e})},bgColorNum:function(t){return Object(u["k"])(t,this.userId)},hideToolbar:function(t){!1!==this.showToolbar&&(this.showToolbar=!1,document.body.removeEventListener("click",this.hideToolbar,!1),document.body.removeEventListener("contextmenu",this.hideToolbar,!1))},getPagePos:function(t){var e=t,n=0,i=0;while(!/pub-chat-item/gi.test(e.getAttribute("class")))e=e.offsetParent;while(null!=e)n+=e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;return{actualX:n,actualY:i}},onToolBtn:function(t){var e=this;if(this.showToolbar)this.hideToolbar(t);else{var n="h5"==this.meechatType?window.innerWidth:276,i=100,s=this.getPagePos(t.target),a=s.actualX,o=t.pageX,r=o-a,c=n-i-20;this.toolBarLeft="".concat(r0&&void 0!==arguments[0])||arguments[0];this.isShowSetting=!!t&&!this.isShowSetting},handleLoginOut:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isShowSetting=!1,this.$store.commit("setUserInfo",null),this.$store.commit("initChatData"),this.$store.commit("initGroupData"),this.$store.commit("chatAppLogin",!1),this.$store.commit("toApp",!1),t.next=8,this.$store.dispatch("doScatterLogout");case 8:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),handleFeedback:function(){var t=this;$["a"].base.feedback().then(function(e){var n=e.data,i=n.data.serverId,s=t.userId>i?"".concat(i,"-").concat(t.userId):"".concat(t.userId,"-").concat(i);t.addPanelSession(i,s),t.$store.commit("changeSessionId",s),t.$router.push({path:"/pm/".concat(s)}),t.isShowSetting=!1})},handleGlobalMute:function(){var t=0==this.openGlobalNotice?1:0;m["w"].setGlobalNotice(t,this)}},created:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.$store.dispatch("getSessionList"),t.next=3,this.$store.dispatch("getUserInfo");case 3:location.hash.match("user")&&this.$showUserInfo();case 4:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=this;document.addEventListener("click",function(){t.toggleLoginOut(!1)})}},S=C,T=(n("8085"),n("17cc")),L=Object(T["a"])(S,v,k,!1,null,"eafcfffe",null),x=L.exports;p.a.plugins(new l.a);var I={name:"App",mixins:[f["a"]],components:{loginBox:b["a"],panel:x},computed:Object(u["a"])({},Object(g["e"])({isLogin:function(t){return t.chat.isLogin},toApp:function(t){return t.chat.toApp},curSession:function(t){return t.curSession},sessionList:function(t){return t.chat.sessionList}})),data:function(){return{pwa:"1"==Object(m["q"])("pwa")}},methods:{showUnreadNum:function(){var t=0;this.sessionList.forEach(function(e){0==e.is_mute&&(t+=Number(e.unread))}),m["w"].changeTitle(t>99?"99+":t)}},created:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:this.checkLocalLogin();case 1:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=this,e=null;document.addEventListener("visibilitychange",function(){"hidden"!==document.visibilityState?(m["w"].changeTitle(0),e&&clearInterval(e)):(t.showUnreadNum(),e=setInterval(function(){t.showUnreadNum()},2e3))}),window.$router=this.$router}},P=I,N=(n("f682"),n("aa82"),Object(T["a"])(P,o,r,!1,null,"2341d00f",null)),j=N.exports,G=n("1c04"),O=n("c375"),M=n("4bc7"),E=n("6032"),R=n("43e0"),B=n("5a09"),A=n("21f7"),U=n("8f20"),H=n("3488"),F=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"pub-mask",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"pub-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper"},[n("div",{staticClass:"pub-mask",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"packet-send-wrap"},["h5"==t.meechatType?n("back-bar",{staticClass:"redpacket-backbar",attrs:{title:t.$t("redPacket.title")},on:{onBack:t.hidePopup}}):t._e(),n("div",{staticClass:"send-wrap",class:[{"is-private":t.isPrivate}]},[n("i",{staticClass:"el-icon-close",on:{click:t.hidePopup}}),n("i",{staticClass:"el-icon-question",on:{click:function(e){t.helpShow=!0}}}),n("h3",{staticClass:"title"},[t._v(t._s(t.$t("redPacket.title")))]),n("p",{staticClass:"redpacket-tips",class:{hidden:!t.tips}},[t._v(t._s(t.tips))]),n("div",{staticClass:"main-box"},[n("div",{staticClass:"input-item"},[n("span",{staticClass:"text"},[t._v("\n "+t._s(t.$t("redPacket.totalAmount"))+"\n ")]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.money,expression:"money",modifiers:{number:!0}}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:t.money},on:{input:function(e){e.target.composing||(t.money=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}}),n("div",{staticClass:"unit"},[n("div",{class:["cur-unit",{"has-arrow":t.group.eosInfo}]},[t._v(t._s(t.symbol))]),t.group.eosInfo?n("div",{staticClass:"code-menu"},[n("div",{staticClass:"code-item",on:{click:function(e){t.isGameToken=!t.isGameToken}}},[t._v("\n "+t._s(t.isGameToken?"EOS":t.group.eosInfo.token)+"\n ")])]):t._e()])])]),t.isPrivate?t._e():n("p",{staticClass:"input-tips"},[t._v("\n "+t._s(t.$t("redPacket.tip1"))+"\n ")]),t.isPrivate?t._e():n("div",{staticClass:"input-item pack-num-input"},[n("span",{staticClass:"text"},[t._v(t._s(t.$t("redPacket.num")))]),n("div",{staticClass:"packet-box"},[n("input",{directives:[{name:"model",rawName:"v-model.number",value:t.packetNum,expression:"packetNum",modifiers:{number:!0}}],attrs:{type:"number",placeholder:t.$t("redPacket.placeholder1")},domProps:{value:t.packetNum},on:{input:function(e){e.target.composing||(t.packetNum=t._n(e.target.value))},blur:function(e){return t.$forceUpdate()}}}),n("div",{staticClass:"unit"},[t._v(t._s(t.$t("redPacket.unit")))])])]),t.isPrivate?t._e():n("p",{staticClass:"group-user-num"},[t._v("\n "+t._s(t.$t("redPacket.tip2",{num:t.group.membersNum}))+"\n ")]),n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.word,expression:"word"}],staticClass:"words",attrs:{placeholder:t.$t("redPacket.memo")},domProps:{value:t.word},on:{input:function(e){e.target.composing||(t.word=e.target.value)}}}),n("div",{staticClass:"sum"},[t._v("\n "+t._s(t.amountSum)+" "),n("span",[t._v(t._s(t.isGameToken?t.group.eosInfo.token:"EOS"))])]),n("button",{staticClass:"send-btn",class:{"is-disable":!t.amountSum||!t.packetNum,loading:t.isLoading},on:{click:t.sendPacket}},[t.isLoading?n("i",{staticClass:"el-icon-loading"}):t._e(),t._v(" "+t._s(t.$t("redPacket.sendBtn"))+"\n ")])]),n("p",{staticClass:"bot"},[t._v(t._s(t.$t("redPacket.tip3")))])]),n("div",{directives:[{name:"show",rawName:"v-show",value:t.helpShow,expression:"helpShow"}],staticClass:"help-wrap"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.helpShow=!1}}}),n("h3",{staticClass:"title"},[t._v(t._s(t.$t("redPacket.helpTitle")))]),n("div",{staticClass:"content"},[n("div",{staticClass:"item"},[t._v("\n "+t._s(t.$t("redPacket.helpRule1"))+"\n ")]),n("div",{staticClass:"item"},[t._v("\n "+t._s(t.$t("redPacket.helpRule2"))+"\n ")]),n("div",{staticClass:"item"},[t._v("\n "+t._s(t.$t("redPacket.helpRule3"))+"\n ")])])])],1)]):t._e()])],1)])]):t._e()])},D=[],J=n("cc80"),q=n.n(J),X=(n("5f33"),n("f91a"),n("3a23"),n("3f62")),W=(n("0da4"),n("03a8")),K=n.n(W),Y=n("b322"),z=n.n(Y),Q=n("b33c"),V=n("1848"),Z={name:"packetSend",data:function(){return{visible:!0,helpShow:!1,money:1,packetNum:1,word:this.$t("redPacket.memo"),tips:"",isLoading:!1,isGameToken:!1,meechatType:Object(m["n"])()}},components:{backBar:V["a"]},computed:Object(u["a"])({},Object(g["e"])(["account","group","curSession","scatter"]),Object(g["c"])(["isPrivate"]),{amountSum:function(){return this.money},symbol:function(){return this.isGameToken?this.group.eosInfo.token:"EOS"},minSum:function(){return this.isGameToken?z.a.divide(this.group.eosInfo.min_amount,1e4):.1},maxSum:function(){return this.isGameToken?z.a.divide(this.group.eosInfo.max_amount,1e4):200}}),watch:{money:function(t){t>this.maxSum&&(this.money=this.maxSum,this.showTip("".concat(this.$t("redPacket.maxMoneyTip")," ").concat(this.maxSum," ").concat(this.symbol))),t&&t/this.packetNum<.01&&(this.money=z.a.times(this.packetNum,.01),this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol)))},packetNum:function(t,e){this.money&&z.a.divide(this.money,t)<.01&&(this.packetNum=e,this.showTip("".concat(this.$t("redPacket.singleMinMoneyTip")," 0.01 ").concat(this.symbol))),t>100&&(this.packetNum=100,this.showTip("".concat(this.$t("redPacket.maxNumberTip")," 100 个")))}},methods:{hidePopup:function(){this.visible=!1},showTip:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;this.tips=t,setTimeout(function(){e.tips=""},n)},sendPacket:function(){var t=Object(c["a"])(regeneratorRuntime.mark(function t(){var e,n,i,s,a,o,r,c,u,h,p=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if("eos"==Object(m["r"])("loginType")){t.next=3;break}return K()({message:this.$t("redPacket.sendForEosTips"),type:"error"}),t.abrupt("return");case 3:if(!(this.moneyNumber(u))){t.next=23;break}return K()({message:this.$t("public.noMoney"),type:"error"}),this.isLoading=!1,t.abrupt("return");case 23:this.isGameToken?(h=this.group.eosInfo.token_code,Q["a"].doSymbolTransfer(this.account.name,"meechatadmin",e,q()(i),this.account.authority,h).then(function(t){p.hidePopup()}).catch(function(t){if(!t.type){var e=JSON.parse(t),n=e.error.details;K()({message:n[0].message,type:"error"})}}).finally(function(){p.isLoading=!1})):Q["a"].transfer(this.account.name,n,e,q()(i),this.account.authority).then(function(t){p.hidePopup()}).catch(function(t){if(!t.type){var e=JSON.parse(t),n=e.error.details;K()({message:n[0].message,type:"error"})}}).finally(function(){p.isLoading=!1}),t.next=28;break;case 26:K()({message:this.$t("public.badNetwork"),type:"error"}),this.isLoading=!1;case 28:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()},mounted:function(){}},tt=Z,et=Object(T["a"])(tt,F,D,!1,null,null,null),nt=et.exports,it=n("6103");nt.install=function(t,e){var n,i=t.extend(nt);t.prototype.$pswSetting=function(){n&&(document.body.removeChild(n.$el),n=null),n=new i({el:document.createElement("div"),computed:{$store:function(){return e}},i18n:it["a"],data:function(){return{}}}),document.body.appendChild(n.$el)}};var st=nt,at=n("9729"),ot=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"msgbox-fade"}},[t.visible?n("div",{staticClass:"pub-wrapper",on:{click:function(t){t.stopPropagation()}}},[n("div",{staticClass:"pub-mask",on:{click:function(e){t.visible=!1}}}),n("div",{staticClass:"pub-modal"},[n("div",{staticClass:"modal-hd"},[n("i",{staticClass:"el-icon-close",on:{click:function(e){t.visible=!1}}})]),n("div",{staticClass:"modal-bd"},[n("groupTypeSetting")],1)])]):t._e()])},rt=[];a["default"].component("groupTypeSetting",function(){return n.e("chunk-17f20f02").then(n.bind(null,"8eed"))});var ct={name:"loginPopup",data:function(){return{visible:!0}},computed:{},methods:{},created:function(){}},ut=ct,ht=(n("7e42"),Object(T["a"])(ut,ot,rt,!1,null,"9e910f5a",null)),pt=ht.exports;pt.install=function(t,e){var n,i=t.extend(pt);t.prototype.$setGroupType=function(){n&&(document.body.removeChild(n.$el),n=null),n=new i({el:document.createElement("div"),computed:{$store:function(){return e}},i18n:it["a"],data:function(){return{}}}),document.body.appendChild(n.$el)}};var dt=pt,lt=n("8134"),mt=n.n(lt);n("3537"),n("e9ca");a["default"].use(M["a"],G["a"],O["b"]),a["default"].use(E["a"],G["a"],it["a"]),a["default"].use(R["a"],G["a"],it["a"]),a["default"].use(B["a"],G["a"],O["b"]),a["default"].use(U["a"],G["a"]),a["default"].use(H["a"],G["a"]),a["default"].use(st,G["a"]),a["default"].use(at["a"]),a["default"].use(dt,G["a"]),a["default"].use(mt.a),a["default"].use(A["a"]),a["default"].use(s.a),a["default"].config.productionTip=!1,new a["default"]({render:function(t){return t(j)},store:G["a"],i18n:it["a"],router:O["b"]}).$mount("#app")},aa2b:function(t,e,n){"use strict";var i=n("50fd"),s=n.n(i);s.a},aa82:function(t,e,n){"use strict";var i=n("1dc2"),s=n.n(i);s.a},b940:function(t,e,n){},bced:function(t,e,n){"use strict";n.d(e,"c",function(){return f}),n.d(e,"b",function(){return g}),n.d(e,"a",function(){return b});n("7e48"),n("3050");var i=n("a619"),s=n.n(i),a=(n("f91a"),n("0da4"),n("03a8")),o=n.n(a),r=(n("612f"),n("f10e"),n("4453"),n("ee95")),c=n("3f47"),u=n("5975"),h=n("52c1"),p=n("33f8"),d=n("8869"),l=n("c1f9"),m=n.n(l),f={mixins:[d["e"]],computed:Object(c["a"])({},Object(h["e"])({myId:function(t){return t.userId},group:function(t){return t.group},curGroupId:function(t){return t.curSession},members:function(t){return t.group.members},sessionInfo:function(t){return t.group.sessionInfo},shareName:function(t){return t.group.shareName},adminList:function(t){return t.group.adminList},membersArray:function(t){return t.group.membersArray}}),{isAdmin:function(){return this.members&&this.members[this.myId]&&1==this.members[this.myId].is_admin},isCreator:function(){return this.group.creator==this.myId},isPrivate:function(){return this.$store.getters.isPrivate}}),mounted:function(){var t=this;document.addEventListener("click",function(){if(t.$refs.chatSet){var e=t.$refs.chatSet.getAttribute("class");e.indexOf("move-left")>-1&&t.$emit("showCharSet",0)}})},data:function(){return{msgPush:!1,msgTop:!1,limitHeight:!0,isEdit:!1,newGroupName:"",newLink:"",newNotice:"",isEditLink:!1,editNotice:!1,editShareName:"",sharePath:"".concat(location.origin,"/s/"),isSearch:!1,searchList:[],searchTxt:"",meechatType:Object(p["n"])()}},methods:Object(c["a"])({},Object(h["d"])(["initGroup","changeSessionId","changeHotGroupStatus","removeSessionListById"]),Object(h["b"])(["updateSessionItem","getGroupInfo"]),{handleTitleBlur:function(){var t=this;this.isEdit=!1,this.newGroupName.length&&u["a"].group.changeTitle({group_id:this.curGroupId,title:this.newGroupName}).then(function(e){e.data;t.updateSessionItem({sessionId:t.curGroupId,data:{name:t.newGroupName}}),t.$store.commit("updateGroup",{key:"groupName",data:t.newGroupName})})},handleTitleFocus:function(){this.isEdit=!0,this.newGroupName=this.group.groupName},handleShowAll:function(){this.limitHeight||(this.$refs.scrollWrap.scrollTop=0),this.limitHeight=!this.limitHeight},handleLinkBlur:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(this.isEditLink=!1,!this.editShareName.match(/^\d{1,}$/)){t.next=4;break}return this.$showTips("分享链接不能是纯数字"),t.abrupt("return");case 4:if(this.editShareName.match(/^(\w|.){1,}$/)){t.next=7;break}return this.$showTips("分享链接只能是英文字母,数字和 . 的组合"),t.abrupt("return");case 7:return t.next=9,Object(p["e"])("分享链接只能被修改一次,确认修改为:".concat(this.sharePath+this.editShareName),"提示").catch(function(t){});case 9:u["a"].group.changeName({group_id:this.curGroupId,name:this.editShareName}).then(function(){e.$store.commit("updateGroup",{key:"shareName",data:e.editShareName})});case 10:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),handleLinkFocus:function(){this.isEditLink=!0,this.editShareName=this.shareName},handleNotice:function(){var t=this;u["a"].group.changeNotice({group_id:this.curGroupId,notice:this.newNotice}).then(function(){t.$showTips("修改成功"),t.editNotice=!1,t.$store.commit("updateGroup",{key:"groupNotice",data:t.newNotice})})},handleGroudMgr:function(){this.$emit("handleShowGroudMgr",1)},handleOpenNotice:function(){this.editNotice=!0,this.newNotice=this.group.groupNotice},copyLink:function(t){var e=this,n=document.location.protocol+t;this.$copyText(n).then(function(t){e.$showTips("复制成功")})},changePin:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,i,s,a;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=1==e?"setPin":"cancelPin",i=1==e?"updateSessionListByPin":"cancelSessionListByPin",t.next=4,u["a"].session[n]({session_id:this.curGroupId});case 4:s=t.sent,a=s.data.data,this.$store.commit("updatePin",e),this.$store.commit(i,{session_id:this.curGroupId,is_pin:a.is_pin,pin_time_int:a.pin_time_int});case 8:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),changeMute:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(e){var n,i;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return n=1==e?"setMute":"cancelMute",i=1==e?"updateSessionListByMute":"cancelSessionListByMute",t.next=4,u["a"].session[n]({session_id:this.curGroupId});case 4:this.$store.commit("updateMute",e),this.$store.commit(i,this.curGroupId);case 6:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),leaveGroup:function(){var t=this;Object(p["e"])(this.$t("group.leaveComfirm")).then(function(){t.$emit("showLoadingRoom",!0),u["a"].group.leaveGroup({group_id:t.curGroupId}).then(function(){t.changeHotGroupStatus({groupId:t.curGroupId,isJoin:0}),t.removeSessionListById(t.curGroupId),t.$showTips(t.$t("group.leaveTip")),t.$emit("showLoadingRoom",!1),t.$store.commit("updateJoin",!1),"h5"==t.meechatType&&t.$router.go(-2)}).catch(function(){t.$emit("showLoadingRoom",!1)})})}})},g={mixins:[d["e"]],data:function(){return{curItemIndex:0,checkList:[],groupName:"",isLoading:!1,meechatType:Object(p["n"])()}},computed:Object(c["a"])({checkedNum:function(){return this.checkList.filter(function(t){return t.isChecked}).length}},Object(h["e"])({userId:function(t){return t.userId},friendList:function(t){return t.chat.friendList},groupId:function(t){return t.group.groupId},group:function(t){return t.group},members:function(t){return t.group.members},membersArray:function(t){return t.group.membersArray},membersNum:function(t){return t.group.membersNum},adminList:function(t){return t.group.adminList}}),{inviteList:function(){return this.checkList.filter(function(t){return t.isChecked}).map(function(t){return t.user_id}).join(",")},resultList:function(){return this.checkList&&this.checkList.filter(function(t){return t.isChecked})||[]}}),methods:Object(c["a"])({},Object(h["b"])(["getGroupInfo"]),Object(h["d"])(["initGroup","changeSessionId"]),{getItemByUid:function(t){var e=this;return this.checkList.filter(function(n,i){return n.user_id==t&&(e.curItemIndex=i),n.user_id==t})[0]},changeState:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getItemByUid(t);n.isChoosed||(4==this.inviteType&&e&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),n["isChecked"]=e,this.$set(this.checkList,this.curItemIndex,n)))},changeStateForH5:function(t){var e=this.getItemByUid(t),n=!e.isChecked;4==this.inviteType&&n&&this.adminList.length+this.checkedNum>5?this.$showTips(this.$t("group.groupMgrMostTips")):(5==this.inviteType&&this.checkList.forEach(function(t){t.isChecked=!1}),e["isChecked"]=n,this.$set(this.checkList,this.curItemIndex,e))},initList:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){var e=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:t.t0=this.inviteType,t.next=1===t.t0?3:2===t.t0?3:3===t.t0?7:4===t.t0?7:5===t.t0?7:9;break;case 3:return t.next=5,this.$store.dispatch("getFriendList");case 5:return this.checkList=this.friendList,t.abrupt("break",9);case 7:return this.checkList=this.membersArray,t.abrupt("break",9);case 9:this.checkList=m.a.filter(this.checkList,function(t){if(t.isChecked=!1,t.isChoosed=!1,t.isShow=!0,2==e.inviteType){var n=e.membersArray.some(function(e){return e.user_id==t.user_id});return!n}return 4==e.inviteType&&1==t.is_admin&&(t.isChoosed=!0),t.user_id!=e.userId}),this.showNum=this.checkList.length;case 11:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),optSubmit:function(){switch(this.inviteType){case 1:this.createGroup();break;case 2:this.invitesMember();break;case 3:this.removesMember();break;case 4:this.addAdmin();break;case 5:this.changeCreator();break;case 6:this.createGroup();break}},createGroup:function(){var t=this;this.groupName.length>16?this.$showTips(this.$t("group.groupNameLengthTips")):this.groupName?(this.isLoading=!0,u["a"].group.createGroup({group_title:this.groupName,user_id_list:this.inviteList}).then(function(e){var n=e.data,i=n.data.session_id;t.$showTips(t.$t("group.createSuccess")),t.ext&&t.ext.tgGroupId?t.doSyncTelegram(i):t.$router.push("/group/".concat(i)),"h5"!=t.meechatType&&t.hidePopup()})):o()({message:this.$t("group.groupNameTips"),type:"warning"})},doSyncTelegram:function(t){var e=this;u["a"].tg.doSync({group_id:t,tg_group_id:this.ext.tgGroupId}).then(function(){e.$router.replace("/group/".concat(t))}).catch(function(t){console.log(t),"h5"==e.meechatType&&e.$router.replace("/")})},invitesMember:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.invites({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),removesMember:function(){var t=Object(r["a"])(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.isLoading=!0,t.next=3,u["a"].group.removes({user_ids:this.inviteList,group_id:this.groupId});case 3:return t.next=5,this.getGroupInfo();case 5:"h5"==this.meechatType?this.$router.go(-1):this.hidePopup();case 6:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),addAdmin:function(){var t=this;this.isLoading=!0,u["a"].group.addAdmin({user_ids:this.inviteList,group_id:this.groupId}).then(function(e){e.data;t.getGroupInfo(),"h5"==t.meechatType?t.$router.go(-1):t.hidePopup()})},changeCreator:function(){var t=this;if(!(this.checkedNum<=0)){var e=this.checkList[this.curItemIndex],n=e.nick_name||e.user_name;s.a.confirm("".concat(this.$t("group.groupMgrComfime")," ").concat(n)).then(function(){t.isLoading=!0,u["a"].group.changeCreator({new_creator:t.inviteList,group_id:t.groupId}).then(function(e){e.data;"h5"==t.meechatType?t.$router.go(-1):t.hidePopup(),t.$store.dispatch("getGroupInfo"),o()({message:"".concat(t.$t("group.groupMgrResult")," ").concat(n),type:"warning"})})}).catch(function(t){console.log(t)})}}}),mounted:function(){this.initList()}},b={props:{searchTxt:String},data:function(){return{}},components:{},computed:Object(c["a"])({},Object(h["e"])(["hotList"]),{showHotList:function(){var t=this.searchTxt&&this.searchTxt.trim();if(!t)return this.hotList;var e=this.hotList.filter(function(e){var n=e.group_title&&e.group_title.toLocaleLowerCase()||"";return n.match(t)});return e}}),methods:Object(c["a"])({},Object(h["d"])(["changeHotGroupStatus"]),{bgColorNum:function(t){return Object(p["k"])(t,this.userId)},joinGroup:function(t,e){var n=this;1==e?this.$router.push("/group/".concat(t)):u["a"].group.joinGroup({group_id:t}).then(function(){n.changeHotGroupStatus({groupId:t,isJoin:1}),n.$router.push("/group/".concat(t))})}}),mounted:function(){this.$store.commit("changeSessionId","0"),this.$store.dispatch("getHotList")}}},f682:function(t,e,n){"use strict";var i=n("416c"),s=n.n(i);s.a}});