(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-12b08b98"],{"0277":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-group-side{position:relative;height:100%}.chat-group-side .el-divider--horizontal{margin:0}.chat-group-side .el-form-item{margin-bottom:0!important}.chat-group-side .member-area{padding:10px}.chat-group-side .member-area .member-items{display:flex;align-items:center;flex-wrap:wrap;font-size:14px;text-align:center}.chat-group-side .member-area .member-items .member-item{margin-left:5px}.chat-group-side .member-area .member-items .member-tools{display:flex;flex-direction:column;align-items:center;width:54px;margin-left:5px}.chat-group-side .member-area .member-items .member-tools .tool-btn{width:38px;height:38px;line-height:38px;border:var(--im-border);font-size:14px;cursor:pointer;box-sizing:border-box}.chat-group-side .member-area .member-items .member-tools .tool-btn:hover{border:1px solid #aaa}.chat-group-side .member-area .member-items .member-tools .tool-text{font-size:12px;text-align:center;width:100%;height:30px;line-height:30px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-group-side .member-area .more-member{flex:1;font-size:var(--im-font-size);color:var(--im-text-color-light);cursor:pointer;padding:5px;text-align:center}.chat-group-side .form{text-align:left;padding:10px;height:30%}.chat-group-side .form .el-form-item{margin-bottom:12px}.chat-group-side .form .el-form-item .el-form-item__label{padding:0;line-height:30px}.chat-group-side .form .el-form-item .el-textarea__inner{min-height:100px!important}.chat-group-side .form .el-input__inner,.chat-group-side .form .el-textarea__inner{color:var(--im-text-color)!important}.chat-group-side .form .btn-group{text-align:center;margin-top:12px}",""]),e.exports=t},"11e8":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-group-card[data-v-1bc83329]{display:flex;flex-direction:column;flex-wrap:nowrap;box-shadow:var(--im-box-shadow-light);border-radius:10px;padding:8px 15px;height:80px;width:180px;cursor:pointer}.chat-group-card .card-body[data-v-1bc83329]{flex:1;display:flex;align-items:center;border-bottom:2px solid #eee}.chat-group-card .card-body .nick-name[data-v-1bc83329]{margin-left:8px;font-weight:600;font-size:var(--im-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-group-card .card-tip[data-v-1bc83329]{margin-top:4px;color:var(--im-text-color-light);font-size:var(--im-font-size-smaller);text-align:left}",""]),e.exports=t},"226a":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".rtc-group-join[data-v-ca4fe850]{height:260px;padding:10px}.rtc-group-join .host-info[data-v-ca4fe850]{display:flex;flex-direction:column;font-size:16px;padding:10px;height:100px;align-items:center}.rtc-group-join .host-info .host-text[data-v-ca4fe850]{margin-top:5px}.rtc-group-join .users-info[data-v-ca4fe850]{font-size:16px;margin-top:20px}.rtc-group-join .users-info .user-list[data-v-ca4fe850]{display:flex;padding:5px 5px;height:90px;flex-wrap:wrap;justify-content:center}.rtc-group-join .users-info .user-list .user-item[data-v-ca4fe850]{padding:2px}",""]),e.exports=t},"296c":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-group-member[data-v-03e3305c]{display:flex;flex-direction:column;height:100%}.chat-group-member .header .back[data-v-03e3305c]{position:absolute;left:10px;line-height:40px;font-size:20px;cursor:pointer}.chat-group-member .header .title[data-v-03e3305c]{text-align:center;line-height:40px;font-size:var(--im-font-size-large)}.chat-group-member .scroll-box[data-v-03e3305c]{flex:1}",""]),e.exports=t},"30e1":function(e,t,s){var i=s("3ee4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("a7e23220",i,!0,{sourceMap:!1,shadowMode:!1})},"325e":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-user-card[data-v-13013134]{display:flex;flex-direction:column;flex-wrap:nowrap;box-shadow:var(--im-box-shadow-light);border-radius:10px;padding:8px 15px;height:80px;width:180px;cursor:pointer}.chat-user-card .card-body[data-v-13013134]{flex:1;display:flex;align-items:center;border-bottom:2px solid #eee}.chat-user-card .card-body .nick-name[data-v-13013134]{margin-left:8px;font-weight:600;font-size:var(--im-font-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-user-card .card-tip[data-v-13013134]{margin-top:4px;color:var(--im-text-color-light);font-size:var(--im-font-size-smaller);text-align:left}",""]),e.exports=t},3386:function(e,t,s){"use strict";s("85dc")},"3dcf":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,'.chat-message-item{padding:2px 10px;border-radius:10px}.chat-message-item.active{background:#e1eaf7}.chat-message-item .message-tip{line-height:50px;font-size:var(--im-font-size-small);color:var(--im-text-color-light);word-break:break-all}.chat-message-item .message-normal{position:relative;font-size:0;padding-left:53px;min-height:50px;margin:5px 0}.chat-message-item .message-normal .avatar{position:absolute;width:40px;height:40px;top:0;left:0}.chat-message-item .message-normal .content{text-align:left}.chat-message-item .message-normal .content .send-fail{color:#e60c0c;font-size:30px;cursor:pointer;margin:0 20px}.chat-message-item .message-normal .content .top{display:flex;flex-wrap:nowrap;color:#888;font-size:var(--im-font-size);line-height:20px;align-items:center}.chat-message-item .message-normal .content .top .tag{margin:0 5px;padding:0 5px;font-size:10px;border:0;border-radius:3px}.chat-message-item .message-normal .content .bottom{display:inline-block;padding-right:30px;margin-top:2px}.chat-message-item .message-normal .content .bottom.fullscreen{padding-right:240px}.chat-message-item .message-normal .content .bottom .message-text{display:inline-block;position:relative;line-height:26px;padding:6px 10px;background:var(--im-background);border-radius:10px;font-size:var(--im-font-size);text-align:left;white-space:pre-wrap;word-break:break-all}.chat-message-item .message-normal .content .bottom .message-text:after{content:"";position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#eee transparent transparent;overflow:hidden;border-width:10px}.chat-message-item .message-normal .content .bottom .message-image{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center}.chat-message-item .message-normal .content .bottom .message-image .send-image{min-width:100px;max-width:250px;border-radius:8px;cursor:pointer}.chat-message-item .message-normal .content .bottom .message-image .send-image.fullscreen{max-width:400px}.chat-message-item .message-normal .content .bottom .message-video{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center}.chat-message-item .message-normal .content .bottom .message-video .send-video{min-width:150px;max-width:250px;max-height:250px;border-radius:10px;overflow:hidden;cursor:pointer;-o-object-fit:contain;object-fit:contain}.chat-message-item .message-normal .content .bottom .message-video .send-video.fullscreen{max-width:400px;max-height:400px}.chat-message-item .message-normal .content .bottom .message-file{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;cursor:pointer;margin-bottom:2px}.chat-message-item .message-normal .content .bottom .message-file .file-box{display:flex;flex-wrap:nowrap;align-items:center;min-height:60px;box-shadow:var(--im-box-shadow-light);border-radius:4px;padding:10px 15px}.chat-message-item .message-normal .content .bottom .message-file .file-box .file-info{flex:1;height:100%;text-align:left;font-size:14px;margin-right:10px}.chat-message-item .message-normal .content .bottom .message-file .file-box .file-info .file-name{display:inline-block;min-width:160px;max-width:200px;font-size:14px;margin-bottom:4px;white-space:pre-wrap;word-break:break-all}.chat-message-item .message-normal .content .bottom .message-file .file-box .file-info .file-size{font-size:var(--im-font-size-smaller);color:var(--im-text-color-light)}.chat-message-item .message-normal .content .bottom .message-file .file-box .file-icon{font-size:44px;color:#d42e07}.chat-message-item .message-normal .content .bottom .message-file .send-fail{color:#e60c0c;font-size:30px;cursor:pointer;margin:0 20px}.chat-message-item .message-normal .content .bottom .message-voice audio{height:45px;cursor:pointer}.chat-message-item .message-normal .content .bottom .chat-action{display:flex;align-items:center}.chat-message-item .message-normal .content .bottom .chat-action .iconfont{cursor:pointer;font-size:22px;padding-right:8px}.chat-message-item .message-normal .content .bottom .quote-message{display:block;margin-top:3px;cursor:pointer}.chat-message-item .message-normal .content .bottom .message-status{display:block}.chat-message-item .message-normal .content .bottom .message-status .chat-readed{font-size:12px;color:var(--im-text-color-light)}.chat-message-item .message-normal .content .bottom .message-status .chat-unread{font-size:var(--im-font-size-smaller);color:var(--im-color-danger)}.chat-message-item .message-normal .content .bottom .chat-receipt{font-size:var(--im-font-size-smaller);cursor:pointer;color:var(--im-text-color-light)}.chat-message-item .message-normal .content .bottom .chat-receipt .icon-ok{font-size:20px;color:var(--im-color-sucess)}.chat-message-item .message-normal .content .bottom .chat-at-user{padding:2px 5px;border-radius:3px;cursor:pointer}.chat-message-item .message-normal.message-mine{text-align:right;padding-left:0;padding-right:53px}.chat-message-item .message-normal.message-mine .avatar{left:auto;right:0}.chat-message-item .message-normal.message-mine .content{text-align:right}.chat-message-item .message-normal.message-mine .content .top{flex-direction:row-reverse}.chat-message-item .message-normal.message-mine .content .bottom{padding-left:30px;padding-right:0}.chat-message-item .message-normal.message-mine .content .bottom.fullscreen{padding-left:240px}.chat-message-item .message-normal.message-mine .content .bottom .message-text{margin-left:10px;background-color:var(--im-color-primary-light-2);color:#fff}.chat-message-item .message-normal.message-mine .content .bottom .message-text:after{left:auto;right:-10px;border-top-color:var(--im-color-primary-light-2)}.chat-message-item .message-normal.message-mine .content .bottom .chat-action,.chat-message-item .message-normal.message-mine .content .bottom .message-file,.chat-message-item .message-normal.message-mine .content .bottom .message-image,.chat-message-item .message-normal.message-mine .content .bottom .message-video{flex-direction:row-reverse}.chat-message-item .message-normal.message-mine .content .bottom .chat-action .iconfont{transform:rotateY(180deg)}',""]),e.exports=t},"3ee4":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-group-readed-mask{position:fixed;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:9999}.chat-group-readed{position:fixed;width:240px}.chat-group-readed .el-tabs__content{padding:0}.chat-group-readed .scroll-box{height:400px}.chat-group-readed .arrow-left{position:absolute;left:-15px;width:0;height:0;border-top:15px solid transparent;border-bottom:15px solid transparent;border-right:15px solid #ccc}.chat-group-readed .arrow-left .arrow-left-inner{position:absolute;top:-12px;left:3px;width:0;height:0;overflow:hidden;border-top:12px solid transparent;border-bottom:12px solid transparent;border-right:12px solid #fff}.chat-group-readed .arrow-right{position:absolute;right:-15px;width:0;height:0;border-top:15px solid transparent;border-bottom:15px solid transparent;border-left:15px solid #ccc}.chat-group-readed .arrow-right .arrow-right-inner{position:absolute;top:-12px;right:3px;width:0;height:0;overflow:hidden;border-top:12px solid transparent;border-bottom:12px solid transparent;border-left:12px solid #fff}",""]),e.exports=t},"3f2b":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-history{display:flex;height:100%;padding:0 25px;flex-direction:column}.chat-history .search-bar{margin-bottom:10px}.chat-history .chat-tabs{flex:1}.chat-history .chat-tabs .chat-image-video-list{display:flex;flex-wrap:wrap}.chat-history .chat-tabs .chat-image-video-list .chat-image-video{display:flex;flex-direction:column;padding:10px;width:140px;border-radius:5px;cursor:pointer}.chat-history .chat-tabs .chat-image-video-list .chat-image-video .image,.chat-history .chat-tabs .chat-image-video-list .chat-image-video .video{width:140px;height:140px;border-radius:5px;-o-object-fit:cover;object-fit:cover}.chat-history .chat-tabs .chat-image-video-list .chat-image-video .upload-text{color:var(--im-text-color-light);font-size:var(--im-font-size-small);margin-top:5px;word-break:break-all}.chat-history .chat-tabs .chat-image-video-list .chat-image-video:hover{background:#f4f4f4}.chat-history .chat-tabs .chat-image-video-list .chat-image-video.active{background:#e1eaf7}",""]),e.exports=t},"3f94":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e._self._c;return t("el-container",{staticClass:"chat-page"},[t("el-aside",{staticClass:"aside",class:{fullscreen:e.configStore.fullScreen},attrs:{width:"230px"}},[t("div",{staticClass:"header",class:e.configStore.electronMode?"header-menu-wrap":""},[t("el-input",{staticClass:"search-text",attrs:{size:"small",placeholder:"搜索"},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-icon-search el-input__icon",attrs:{slot:"prefix"},slot:"prefix"})])],1),e.loading?t("div",{directives:[{name:"loading",rawName:"v-loading",value:!0,expression:"true"}],staticClass:"chat-loading",attrs:{"element-loading-text":"消息接收中...","element-loading-spinner":"el-icon-loading","element-loading-background":"#F9F9F9","element-loading-size":"24"}}):t("el-scrollbar",{staticClass:"chat-items"},e._l(e.chatStore.chats,(function(s,i){return t("div",{key:i},[t("chat-item",{directives:[{name:"show",rawName:"v-show",value:!s.delete&&s.showName&&s.showName.includes(e.searchText),expression:"!chat.delete && chat.showName && chat.showName.includes(searchText)"}],attrs:{chat:s,index:i,active:s===e.chatStore.activeChat},on:{delete:function(t){return e.onDelItem(i)},top:function(t){return e.onTop(i)},info:function(t){return e.onShowInfo(s)},dnd:function(t){return e.onDnd(s)}},nativeOn:{click:function(t){return e.onActiveItem(i)}}})],1)})),0)],1),t("el-container",{staticClass:"chat-box"},[e.activeChat&&"SYSTEM"!=e.activeChat.type?t("chat-box",{attrs:{chat:e.activeChat}}):e._e(),e.activeChat&&"SYSTEM"==e.activeChat.type?t("chat-system-box",{attrs:{chat:e.activeChat}}):e._e()],1)],1)},a=[],o=(s("14d9"),function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"chat-item",class:e.active?"active":"",on:{contextmenu:function(t){return t.preventDefault(),e.showRightMenu(t)}}},[t("div",{staticClass:"chat-left"},[t("head-image",{attrs:{url:e.chat.headImage,name:e.chat.showName,size:42,id:"PRIVATE"==e.chat.type?e.chat.targetId:0,isShowUserInfo:!1}}),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.chat.isDnd&&e.chat.unreadCount>0,expression:"!chat.isDnd && chat.unreadCount > 0"}],staticClass:"unread-text"},[e._v(e._s(e.chat.unreadCount))])],1),t("div",{staticClass:"chat-right"},[t("div",{staticClass:"chat-name"},[t("div",{staticClass:"chat-name-text"},[t("div",[e._v(e._s(e.chat.showName))]),"GROUP"==e.chat.type?t("el-tag",{attrs:{size:"mini"}},[e._v("群")]):e._e(),"SYSTEM"==e.chat.type?t("el-tag",{staticClass:"tag-system",attrs:{size:"mini"}},[e._v("官方")]):e._e()],1),t("div",{staticClass:"chat-time-text"},[e._v(e._s(e.showTime))])]),t("div",{staticClass:"chat-content"},[t("div",{staticClass:"chat-at-text"},[e._v(e._s(e.atText))]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isShowSendName,expression:"isShowSendName"}],staticClass:"chat-send-name"},[e._v(e._s(e.chat.sendNickName+": "))]),t("div",{staticClass:"chat-content-text",domProps:{innerHTML:e._s(e.$emo.transform(e.$str.html2Escape(e.chat.lastContent),"emoji-small"))}}),e.chat.isDnd?t("div",{staticClass:"icon iconfont icon-dnd"}):e._e()])])]),t("right-menu",{ref:"rightMenu",on:{select:e.onSelectMenu}})],1)}),n=[],r=s("4036"),c=s("3f51"),l={name:"chatItem",components:{HeadImage:r["a"],RightMenu:c["a"]},data(){return{}},props:{chat:{type:Object},active:{type:Boolean}},methods:{showRightMenu(e){this.$refs.rightMenu.open(e,this.menuItems)},onSelectMenu(e){this.$emit(e.key.toLowerCase(),this.msgInfo)}},computed:{isShowSendName(){if(!this.chat.sendNickName)return!1;let e=this.chat.messages.length;if(0==e)return!1;let t=this.chat.messages[e-1];return this.$msgType.isNormal(t.type)},showTime(){return this.$date.toTimeText(this.chat.lastSendTime,!0)},atText(){return this.chat.atMe?"[有人@我]":this.chat.atAll?"[@全体成员]":""},menuItems(){let e=[];return e.push({key:"TOP",name:"置顶"}),"PRIVATE"!=this.chat.type&&"GROUP"!=this.chat.type||(e.push({key:"INFO",name:"查看资料"}),this.chat.isDnd?e.push({key:"DND",name:"新消息提醒"}):e.push({key:"DND",name:"消息免打扰"})),e.push({key:"DELETE",name:"删除聊天",color:"#F56C6C"}),e}}},h=l,d=(s("6654"),s("2877")),m=Object(d["a"])(h,o,n,!1,null,"0bf52bf5",null),u=m.exports,p=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-box",on:{click:function(t){return e.onClickChatBox()},mousemove:function(t){return e.readedMessage()}}},[t("el-container",[t("el-header",{class:e.configStore.electronMode?"header-menu-wrap":"",attrs:{height:"50px"}},[t("span",[e._v(e._s(e.title))]),e.isGroup?t("span",{staticClass:"btn-side el-icon-more",attrs:{title:"群聊信息"},on:{click:e.onClickMore}}):e._e()]),t("el-main",{staticStyle:{padding:"0"}},[t("el-container",[t("el-container",{staticClass:"content-box"},[e.isGroup&&e.group.topMessage?t("div",[t("chat-top-message",{attrs:{group:e.group,groupMembers:e.groupMembers,msgInfo:e.group.topMessage,headImage:e.headImage(e.group.topMessage),showName:e.showName(e.group.topMessage)},on:{locate:e.locateMessage}})],1):e._e(),t("el-main",{staticClass:"im-chat-main",attrs:{id:"chatScrollBox"},on:{scroll:e.onScroll}},[t("div",{staticClass:"im-chat-box"},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("chat-message-item",{attrs:{id:s.id,active:e.activeMessageIdx==e.showMinIdx+i,mine:s.sendId==e.mine.id,headImage:e.headImage(s),showName:e.showName(s),msgInfo:s,quoteShowName:e.showName(s.quoteMessage),group:e.group,groupMembers:e.groupMembers},on:{call:function(t){return e.onCall(s.type)},locateQuote:e.onLocateQuoteMessage,delete:e.onDeleteMessage,recall:e.onRecallMessage,quote:e.onQuoteMessage,top:e.onTopMessage,forward:e.onForwardMessage}})],1)})),0)]),e.chat.atMe||e.chat.atAll?t("div",{staticClass:"locate-tip",on:{click:e.scrollToAtMessage}},[e._v("有人@我 ")]):e.isInBottom?e._e():t("div",{staticClass:"locate-tip",on:{click:e.scrollToBottom}},[e._v(" "+e._s(e.newMessageSize>0?e.newMessageSize+"条新消息":"回到底部")+" ")]),t("el-footer",{staticClass:"im-chat-footer",attrs:{height:"220px"}},[t("div",{staticClass:"chat-tool-bar"},[t("div",{ref:"emotion",staticClass:"icon iconfont icon-emoji",attrs:{title:"表情"},on:{click:function(t){return t.stopPropagation(),e.showEmotionBox()}}}),e.configStore.electronMode?t("div",{ref:"emotion",staticClass:"icon iconfont icon-screenshot",attrs:{title:"截图(CTRL + ALT + A)"},on:{click:function(t){return t.stopPropagation(),e.onScreenshot()}}}):e._e(),e.configStore.electronMode?t("i",{staticClass:"el-icon-caret-bottom",on:{click:e.onShowScreenshotMenu}}):e._e(),t("div",{attrs:{title:"发送图片"}},[t("file-upload",{attrs:{action:"/image/upload",maxSize:10485760,fileTypes:["image/jpeg","image/png","image/jpg","image/webp","image/gif"]},on:{before:e.onImageBefore,success:e.onImageSuccess,fail:e.onImageFail}},[t("i",{staticClass:"el-icon-picture-outline"})])],1),t("div",{attrs:{title:"发送视频"}},[t("file-upload",{attrs:{action:"/video/upload",maxSize:52428800,fileTypes:["video/mp4","video/ogg","video/webm"]},on:{before:e.onVideoBefore,success:e.onVideoSuccess,fail:e.onVideoFail}},[t("i",{staticClass:"el-icon-film"})])],1),t("div",{attrs:{title:"发送文件"}},[t("file-upload",{ref:"fileUpload",attrs:{action:"/file/upload",maxSize:10485760},on:{before:e.onFileBefore,success:e.onFileSuccess,fail:e.onFileFail}},[t("i",{staticClass:"el-icon-wallet"})])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isGroup,expression:"isGroup"}],staticClass:"icon iconfont icon-receipt",class:e.isReceipt?"chat-tool-active":"",attrs:{title:"回执消息"},on:{click:e.onSwitchReceipt}}),t("div",{staticClass:"el-icon-microphone",attrs:{title:"发送语音"},on:{click:function(t){return e.showRecordBox()}}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isPrivate,expression:"isPrivate"}],staticClass:"el-icon-phone-outline",attrs:{title:"语音通话"},on:{click:function(t){return e.showPrivateVideo("voice")}}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isGroup,expression:"isGroup"}],staticClass:"el-icon-phone-outline",attrs:{title:"语音通话"},on:{click:function(t){return e.onGroupVideo()}}}),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isPrivate,expression:"isPrivate"}],staticClass:"el-icon-video-camera",attrs:{title:"视频通话"},on:{click:function(t){return e.showPrivateVideo("video")}}}),t("div",{staticClass:"el-icon-chat-dot-round",attrs:{title:"聊天记录"},on:{click:function(t){return e.showHistoryBox()}}})]),t("div",{staticClass:"send-content-area"},[t("ChatInput",{ref:"chatInputEditor",attrs:{group:e.group,"group-members":e.groupMembers},on:{submit:e.sendMessage}}),e.quoteMessage?t("div",{staticClass:"quote-message"},[t("chat-quote-message",{attrs:{showName:e.showName(e.quoteMessage),msgInfo:e.quoteMessage}}),t("div",{staticClass:"quote-remove",on:{click:function(t){return e.onQuoteMessage(null)}}},[t("i",{staticClass:"el-icon-close"})])],1):e._e(),t("div",{staticClass:"send-btn-area"},[t("el-button",{attrs:{type:"primary",icon:"el-icon-s-promotion"},on:{click:function(t){return e.notifySend()}}},[e._v("发送")])],1)],1)])],1),e.showSide?t("el-aside",{staticClass:"chat-group-side-box",class:{fullscreen:e.configStore.fullScreen},attrs:{width:"265px"}},[t("chat-group-side",{attrs:{groupId:e.group.id,groupMembers:e.groupMembers},on:{reload:function(t){return e.loadGroup(e.group.id)}}})],1):e._e()],1)],1),t("emotion",{ref:"emoBox",on:{emotion:e.onEmotion}}),t("chat-record",{attrs:{visible:e.showRecord},on:{close:e.closeRecordBox,send:e.onSendRecord}}),e.isGroup?t("group-member-selector",{ref:"rtcSel",attrs:{group:e.group},on:{complete:e.onInviteOk}}):e._e(),t("chat-selector",{ref:"chatSel",attrs:{title:"转发消息"}}),e.isGroup?t("rtc-group-join",{ref:"rtcJoin",attrs:{groupId:e.group.id}}):e._e(),t("chat-history",{ref:"chatHistory",attrs:{chat:e.chat,friend:e.friend,group:e.group,groupMembers:e.groupMembers},on:{locateQuote:e.locateMessage}}),t("right-menu",{ref:"rightMenu",on:{select:e.onSelectMenu}})],1)],1)},g=[],f=(s("e9c4"),s("0643"),s("2382"),s("fffc"),s("4e3e"),s("5087"),s("88a7"),s("271a"),s("5494"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-group-side"},[e.showAllMembers?t("chat-group-member",{attrs:{group:e.group,groupMembers:e.showMembers},on:{back:function(t){e.showAllMembers=!1}}}):t("div",[t("div",{staticClass:"member-area"},[t("div",{staticClass:"member-items"},[e._l(e.showMembers,(function(s,i){return t("div",{key:s.id},[i")])]),e.group.quit?e._e():t("el-divider",{attrs:{"content-position":"center"}}),t("el-form",{staticClass:"form",attrs:{labelPosition:"top",model:e.group,size:"small"}},[t("el-form-item",{attrs:{label:"全员禁言",title:"开启全员禁言后,仅群主可以发言"}},[t("el-switch",{attrs:{disabled:!e.isOwner&&!e.isManager||!e.editing},model:{value:e.group.isMuted,callback:function(t){e.$set(e.group,"isMuted",t)},expression:"group.isMuted"}})],1),t("el-form-item",{attrs:{label:"群聊名称"}},[t("el-input",{attrs:{disabled:!e.isOwner&&!e.isManager||!e.editing,maxlength:"20"},model:{value:e.group.name,callback:function(t){e.$set(e.group,"name",t)},expression:"group.name"}})],1),t("el-form-item",{attrs:{label:"群主"}},[t("el-input",{attrs:{value:e.ownerName,disabled:""}})],1),t("el-form-item",{attrs:{label:"群公告"}},[t("el-input",{attrs:{disabled:!e.isOwner&&!e.isManager||!e.editing,type:"textarea",maxlength:"1024"},model:{value:e.group.notice,callback:function(t){e.$set(e.group,"notice",t)},expression:"group.notice"}})],1),t("el-form-item",{attrs:{label:"备注"}},[t("el-input",{attrs:{disabled:!e.editing,maxlength:"20"},model:{value:e.group.remarkGroupName,callback:function(t){e.$set(e.group,"remarkGroupName",t)},expression:"group.remarkGroupName"}})],1),t("el-form-item",{attrs:{label:"我在本群的昵称"}},[t("el-input",{attrs:{disabled:!e.editing,maxlength:"20"},model:{value:e.group.remarkNickName,callback:function(t){e.$set(e.group,"remarkNickName",t)},expression:"group.remarkNickName"}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.group.quit,expression:"!group.quit"}],staticClass:"btn-group"},[e.editing?t("el-button",{attrs:{type:"success"},on:{click:function(t){return e.onSaveGroup()}}},[e._v("保存")]):e._e(),e.editing?e._e():t("el-button",{attrs:{type:"primary"},on:{click:function(t){e.editing=!e.editing}}},[e._v("编辑")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isOwner,expression:"!isOwner"}],attrs:{type:"danger"},on:{click:function(t){return e.onQuit()}}},[e._v("退出群聊")])],1)],1)],1)],1)}),x=[],v=(s("a573"),s("b242")),b=s("dec1"),w=s("2082"),y=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-group-member"},[t("div",{staticClass:"header"},[t("span",{staticClass:"back el-icon-back",attrs:{title:"返回"},on:{click:function(t){return e.onBack()}}}),t("span",{staticClass:"title"},[e._v("群聊成员("+e._s(e.groupMembers.length)+")")])]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.group.quit,expression:"!group.quit"}],staticClass:"group-side-search"},[t("el-input",{attrs:{placeholder:"搜索群成员",size:"small"},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-icon-search el-input__icon",attrs:{slot:"prefix"},slot:"prefix"})])],1),t("virtual-scroller",{staticClass:"scroll-box",attrs:{items:e.showMembers},scopedSlots:e._u([{key:"default",fn:function({item:s}){return[t("group-member-item",{attrs:{member:s,group:e.group,groupMembers:e.groupMembers}})]}}])})],1)},I=[],M=s("7aa4"),S={name:"chatGroupMember",components:{VirtualScroller:M["a"],GroupMemberItem:b["a"]},props:{group:{type:Object},groupMembers:{type:Array}},data(){return{searchText:""}},methods:{onBack(){this.$emit("back")}},computed:{showMembers(){return this.groupMembers.filter(e=>e.showNickName.includes(this.searchText))}}},C=S,_=(s("5e23"),Object(d["a"])(C,y,I,!1,null,"03e3305c",null)),T=_.exports,E={name:"chatGroupSide",components:{AddGroupMember:v["a"],GroupMemberItem:b["a"],GroupMemberSelector:w["a"],ChatGroupMember:T},data(){return{editing:!1,showAllMembers:!1,group:{}}},props:{groupId:{type:Number},groupMembers:{type:Array}},methods:{onClose(){this.$emit("close")},onInvite(){this.$refs.addGroupMember.open()},onRemove(){let e=[this.group.ownerId,this.mine.id];this.isOwner||(e=e.concat(this.managerIds)),this.$refs.removeSelector.open(50,[],[],e)},onRemoveComplete(e){let t=e.map(e=>e.userId),s={groupId:this.group.id,userIds:t};this.$http({url:"/group/members/remove",method:"delete",data:s}).then(()=>{this.$emit("reload"),this.$message.success(`您移除了${t.length}位成员`)})},onMuted(){let e=[this.group.ownerId,this.mine.id];this.isOwner||(e=e.concat(this.managerIds));let t=this.groupMembers.filter(e=>e.isMuted).map(e=>e.userId);this.$refs.mutedSelector.open(50,[],t,e)},onMutedComplete(e){let t=e.map(e=>e.userId),s={groupId:this.group.id,userIds:t,isMuted:!0},i=`您对${t.length}位成员进行了禁言`;this.sendMemberMuted(s,i)},onUnmuted(){let e=this.groupMembers.filter(e=>!e.isMuted).map(e=>e.userId);this.isOwner||(e=e.concat(this.managerIds)),this.$refs.unmutedSelector.open(50,[],[],e)},onUnmutedComplete(e){let t=e.map(e=>e.userId),s={groupId:this.group.id,userIds:t,isMuted:!1},i=`您解除了${t.length}位成员的禁言`;this.sendMemberMuted(s,i)},onSaveGroup(){let e=this.group;this.$http({url:"/group/modify",method:"put",data:e}).then(e=>{this.editing=!this.editing,this.groupStore.updateGroup(e),this.$emit("reload"),this.$message.success("修改成功")})},onShowMoreMember(){this.showAllMembers=!0},onQuit(){this.$confirm("退出群聊后将不再接受群里的消息,确认退出吗?","确认退出?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$http({url:"/group/quit/"+this.group.id,method:"delete"}).then(()=>{this.groupStore.removeGroup(this.group.id),this.chatStore.removeGroupChat(this.group.id)})})},sendMemberMuted(e,t){this.$http({url:"/group/members/muted",method:"put",data:e}).then(()=>{this.$emit("reload"),this.$message.success(t)})}},computed:{mine(){return this.userStore.userInfo},ownerName(){let e=this.groupMembers.find(e=>e.userId==this.group.ownerId);return e&&e.showNickName},isOwner(){return this.group.ownerId==this.mine.id},isManager(){let e=this.mine.id,t=this.groupMembers.find(t=>t.userId==e);return t&&t.isManager},managerIds(){return this.groupMembers.filter(e=>e.isManager).map(e=>e.userId)},showMembers(){return this.groupMembers.filter(e=>!e.quit)},showMaxIdx(){return this.isOwner||this.isManager?11:14}},mounted(){let e=this.groupStore.findGroup(this.groupId);this.group=JSON.parse(JSON.stringify(e))}},k=E,N=(s("d139"),Object(d["a"])(k,f,x,!1,null,null,null)),A=N.exports,$=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-message-item",class:e.active?"active":""},[e.msgInfo.type==e.$enums.MESSAGE_TYPE.TIP_TEXT?t("div",{staticClass:"message-tip"},[e._v(" "+e._s(e.msgInfo.content)+" ")]):e.msgInfo.type==e.$enums.MESSAGE_TYPE.TIP_TIME?t("div",{staticClass:"message-tip"},[e._v(" "+e._s(e.$date.toTimeText(e.msgInfo.sendTime))+" ")]):e.isNormal?t("div",{staticClass:"message-normal",class:{"message-mine":e.mine}},[t("div",{staticClass:"avatar"},[t("head-image",{attrs:{name:e.showName,size:38,url:e.headImage,id:e.msgInfo.sendId}})],1),t("div",{staticClass:"content"},[e.msgInfo.groupId&&!e.msgInfo.selfSend?t("div",{staticClass:"top"},[t("div",[e._v(e._s(e.showName))]),e.isGroupOwner(e.msgInfo.sendId)?t("el-tag",{staticClass:"tag",attrs:{size:"mini",type:"danger"}},[e._v("群主")]):e._e(),e.isGroupManager(e.msgInfo.sendId)?t("el-tag",{staticClass:"tag",attrs:{size:"mini",type:"primary"}},[e._v("管理员")]):e._e()],1):e._e(),t("div",{staticClass:"bottom",class:{fullscreen:e.configStore.fullScreen},on:{contextmenu:function(t){return t.preventDefault(),e.showMessageMenu(t)}}},[t("div",{ref:"chatMsgBox"},[e.msgInfo.type==e.$enums.MESSAGE_TYPE.TEXT?t("span",{staticClass:"message-text",domProps:{innerHTML:e._s(e.htmlText)}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.IMAGE?t("div",{staticClass:"message-image"},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"上传中..","element-loading-background":"rgba(0, 0, 0, 0.4)"}},[t("img",{staticClass:"send-image",class:{fullscreen:e.configStore.fullScreen},attrs:{src:e.contentData.thumbUrl,loading:"lazy"},on:{click:function(t){return e.showFullImageBox()}}})]),t("span",{directives:[{name:"show",rawName:"v-show",value:e.loadFail,expression:"loadFail"}],staticClass:"send-fail el-icon-warning",attrs:{title:"发送失败"},on:{click:e.onSendFail}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.VIDEO?t("div",{staticClass:"message-video"},[t("video",{staticClass:"send-video",class:{fullscreen:e.configStore.fullScreen},attrs:{controls:"",preload:"none",poster:e.contentData.coverUrl,src:e.contentData.videoUrl}}),t("span",{directives:[{name:"show",rawName:"v-show",value:e.loadFail,expression:"loadFail"}],staticClass:"send-fail el-icon-warning",attrs:{title:"发送失败"},on:{click:e.onSendFail}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.FILE?t("div",{staticClass:"message-file"},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"file-box"},[t("div",{staticClass:"file-info"},[t("el-link",{staticClass:"file-name",attrs:{underline:!0,target:"_blank",type:"primary",href:e.contentData.url,download:e.contentData.name}},[e._v(e._s(e.contentData.name))]),t("div",{staticClass:"file-size"},[e._v(e._s(e.fileSize))])],1),e._m(0)]),t("span",{directives:[{name:"show",rawName:"v-show",value:e.loadFail,expression:"loadFail"}],staticClass:"send-fail el-icon-warning",attrs:{title:"发送失败"},on:{click:e.onSendFail}})]):e._e()]),e.msgInfo.type==e.$enums.MESSAGE_TYPE.AUDIO?t("div",{staticClass:"message-voice",on:{click:function(t){return e.onPlayVoice()}}},[t("audio",{attrs:{controls:"",src:e.contentData.url}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.USER_CARD?t("chat-user-card",{attrs:{cardInfo:e.contentData}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.GROUP_CARD?t("chat-group-card",{attrs:{cardInfo:e.contentData}}):e._e(),e.isAction?t("div",{staticClass:"chat-action message-text"},[e.msgInfo.type==e.$enums.MESSAGE_TYPE.ACT_RT_VOICE?t("span",{staticClass:"iconfont icon-chat-voice",attrs:{title:"重新呼叫"},on:{click:function(t){return e.$emit("call")}}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.ACT_RT_VIDEO?t("span",{staticClass:"iconfont icon-chat-video",attrs:{title:"重新呼叫"},on:{click:function(t){return e.$emit("call")}}}):e._e(),t("span",[e._v(e._s(e.msgInfo.content))])]):e._e(),e.msgInfo.quoteMessage?t("div",{staticClass:"quote-message",on:{contextmenu:function(t){return t.preventDefault(),t.stopPropagation(),e.showQuoteMenu(t)}}},[t("chat-quote-message",{attrs:{msgInfo:e.msgInfo.quoteMessage,showName:e.quoteShowName},nativeOn:{click:function(t){return t.stopPropagation(),e.$emit("locateQuote",e.msgInfo)}}})],1):e._e(),e.isAction?e._e():t("div",{staticClass:"message-status"},[t("span",{directives:[{name:"show",rawName:"v-show",value:e.msgInfo.selfSend&&!e.msgInfo.groupId&&e.msgInfo.status==e.$enums.MESSAGE_STATUS.READED,expression:"msgInfo.selfSend && !msgInfo.groupId\n\t\t\t\t\t\t&& msgInfo.status == $enums.MESSAGE_STATUS.READED"}],staticClass:"chat-readed"},[e._v("已读")]),t("span",{directives:[{name:"show",rawName:"v-show",value:e.msgInfo.selfSend&&!e.msgInfo.groupId&&e.msgInfo.status!=e.$enums.MESSAGE_STATUS.READED,expression:"msgInfo.selfSend && !msgInfo.groupId\n\t\t\t\t\t\t&& msgInfo.status != $enums.MESSAGE_STATUS.READED"}],staticClass:"chat-unread"},[e._v("未读")])]),e.msgInfo.receipt?t("div",{staticClass:"chat-receipt",on:{click:e.onShowReadedBox}},[e.msgInfo.receiptOk?t("span",{staticClass:"icon iconfont icon-ok",attrs:{title:"全体已读"}}):t("span",[e._v(e._s(e.msgInfo.readedCount)+"人已读")])]):e._e()],1)])]):e._e(),t("right-menu",{ref:"rightMenu",on:{select:e.onSelectMenu}}),t("chat-group-readed",{ref:"chatGroupReadedBox",attrs:{msgInfo:e.msgInfo,group:e.group,groupMembers:e.groupMembers}})],1)},R=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"file-icon"},[t("span",{staticClass:"el-icon-document",attrs:{type:"primary"}})])}],P=function(){var e=this,t=e._self._c;return e.show?t("div",[t("div",{staticClass:"chat-group-readed-mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.close()}}},[t("div",{staticClass:"chat-group-readed",style:{left:e.pos.x+"px",top:e.pos.y+"px"},on:{click:function(e){e.preventDefault()}}},[t("el-tabs",{attrs:{type:"border-card",stretch:!0}},[t("el-tab-pane",{attrs:{label:`已读(${e.readedMembers.length})`}},[t("virtual-scroller",{staticClass:"scroll-box",attrs:{items:e.readedMembers},scopedSlots:e._u([{key:"default",fn:function({item:s}){return[t("group-member-bar",{attrs:{member:s,group:e.group}})]}}],null,!1,1529229213)})],1),t("el-tab-pane",{attrs:{label:`未读(${e.unreadMembers.length})`}},[t("virtual-scroller",{staticClass:"scroll-box",attrs:{items:e.unreadMembers},scopedSlots:e._u([{key:"default",fn:function({item:s}){return[t("group-member-bar",{attrs:{group:e.group,member:s}})]}}],null,!1,1287496157)})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.msgInfo.selfSend,expression:"msgInfo.selfSend"}],staticClass:"arrow-right",style:{top:e.pos.arrowY+"px"}},[t("div",{staticClass:"arrow-right-inner"})]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.msgInfo.selfSend,expression:"!msgInfo.selfSend"}],staticClass:"arrow-left",style:{top:e.pos.arrowY+"px"}},[t("div",{staticClass:"arrow-left-inner"})])],1)])]):e._e()},B=[],O=s("ff79"),z={name:"chatGroupReaded",components:{VirtualScroller:M["a"],GroupMemberBar:O["a"]},data(){return{show:!1,pos:{x:0,y:0,arrowY:0},readedMembers:[],unreadMembers:[]}},props:{group:{type:Object},groupMembers:{type:Array},msgInfo:{type:Object}},methods:{close(){this.show=!1},open(e){this.show=!0,this.pos.arrowY=200,this.msgInfo.selfSend?this.pos.x=e.left-250:this.pos.x=e.right+20,this.pos.y=e.top+e.height/2-215,this.pos.y<0&&(this.pos.arrowY+=this.pos.y,this.pos.y=0),this.loadReadedUser()},loadReadedUser(){this.readedMembers=[],this.unreadMembers=[],this.$http({url:"/message/group/findReadedUsers",method:"get",params:{groupId:this.msgInfo.groupId,messageId:this.msgInfo.id}}).then(e=>{this.groupMembers.forEach(t=>{t.userId==this.msgInfo.sendId||t.quit||(e.find(e=>t.userId==e)?this.readedMembers.push(t):this.unreadMembers.push(t))});let t={id:this.msgInfo.id,groupId:this.msgInfo.groupId,readedCount:this.readedMembers.length},s={type:"GROUP",targetId:this.msgInfo.groupId};this.chatStore.updateMessage(t,s)})}}},D=z,U=(s("c1f2"),Object(d["a"])(D,P,B,!1,null,null,null)),G=U.exports,q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-quote-message"},[e.isRecall?t("div",{staticClass:"recall"},[e._v(e._s(e.msgInfo.content))]):e._e(),e.isRecall?e._e():t("div",{staticClass:"send-user"},[e._v(" "+e._s(e.showName+":")+" ")]),e.isRecall?e._e():t("div",{staticClass:"quote-content"},[e.msgInfo.type==e.$enums.MESSAGE_TYPE.TEXT?t("span",{staticClass:"quote-text",domProps:{innerHTML:e._s(e.$emo.transform(e.$str.html2Escape(e.msgInfo.content),"emoji-small"))}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.IMAGE?t("div",[t("img",{staticClass:"quote-image",attrs:{src:e.contentData.thumbUrl},on:{click:function(t){return t.stopPropagation(),e.showFullImageBox.apply(null,arguments)}}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.VIDEO?t("div",[t("video",{ref:"videoPlayer",staticClass:"quote-video",attrs:{controls:"",preload:"none",poster:e.contentData.coverUrl,src:e.contentData.videoUrl}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.AUDIO?t("div",[t("audio",{staticClass:"quote-audio",attrs:{controls:"",src:e.contentData.url}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.FILE?t("div",{staticClass:"quote-file"},[t("div",{staticClass:"file-info"},[t("el-link",{staticClass:"file-name",attrs:{underline:!0,target:"_blank",type:"primary",href:e.contentData.url,download:e.contentData.name}},[e._v(e._s(e.contentData.name))]),t("div",{staticClass:"file-size"},[e._v(e._s(e.fileSize))])],1),e._m(0)]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.USER_CARD?t("div",{staticClass:"quote-card"},[t("div",{staticClass:"card-body"},[t("head-image",{attrs:{url:e.contentData.headImage,name:e.contentData.nickName,radius:"10%",size:32}}),t("div",{staticClass:"name"},[e._v(" "+e._s(e.contentData.nickName)+" ")])],1),t("div",{staticClass:"card-tip"},[e._v("个人名片")])]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.GROUP_CARD?t("div",{staticClass:"quote-card"},[t("div",{staticClass:"card-body"},[t("head-image",{attrs:{url:e.contentData.headImage,name:e.contentData.groupName,radius:"10%",size:32}}),t("div",{staticClass:"name"},[e._v(" "+e._s(e.contentData.groupName)+" ")])],1),t("div",{staticClass:"card-tip"},[e._v("群名片")])]):e._e()])])},F=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"file-icon"},[t("span",{staticClass:"el-icon-document",attrs:{type:"primary"}})])}],L={name:"chatQuoteMessage",components:{HeadImage:r["a"]},props:{showName:{type:String,required:!0},msgInfo:{type:Object,required:!0}},data(){return{}},methods:{showFullImageBox(){let e=this.contentData.originUrl;e&&this.$eventBus.$emit("openFullImage",e)}},computed:{quoteMessageText(){return this.msgInfo.content+"hello"},contentData(){return JSON.parse(this.msgInfo.content)},fileSize(){let e=this.contentData.size;return e>1048576?Math.round(e/1024/1024)+"M":e>1024?Math.round(e/1024)+"KB":e+"B"},isRecall(){return this.msgInfo.status==this.$enums.MESSAGE_STATUS.RECALL}}},j=L,Y=(s("a6a2"),Object(d["a"])(j,q,F,!1,null,"620ceb67",null)),V=Y.exports,H=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-user-card",on:{click:function(t){return t.stopPropagation(),e.onShowUserInfo.apply(null,arguments)}}},[t("div",{staticClass:"card-body"},[t("head-image",{attrs:{url:e.cardInfo.headImage,name:e.cardInfo.nickName,radius:"10%"}}),t("div",{staticClass:"nick-name"},[e._v(" "+e._s(e.cardInfo.nickName)+" ")])],1),t("div",{staticClass:"card-tip"},[e._v("个人名片")])])},J=[],Q={name:"chatUserCard",components:{HeadImage:r["a"]},props:{cardInfo:{type:Object}},data(){return{}},methods:{onShowUserInfo(e){this.$http({url:"/user/find/"+this.cardInfo.userId,method:"get"}).then(t=>{let s={x:e.x+30,y:e.y};this.$eventBus.$emit("openUserInfo",t,s)})}}},W=Q,K=(s("824e"),Object(d["a"])(W,H,J,!1,null,"13013134",null)),X=K.exports,Z=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-group-card",on:{click:function(t){return t.stopPropagation(),e.onShowUserInfo.apply(null,arguments)}}},[t("div",{staticClass:"card-body"},[t("head-image",{attrs:{url:e.cardInfo.headImage,name:e.cardInfo.groupName,radius:"10%"}}),t("div",{staticClass:"nick-name"},[e._v(" "+e._s(e.cardInfo.groupName)+" ")])],1),t("div",{staticClass:"card-tip"},[e._v("群名片")])])},ee=[],te={name:"chatUserCard",components:{HeadImage:r["a"]},props:{cardInfo:{type:Object}},data(){return{}},methods:{onShowUserInfo(e){this.$http({url:"/group/find/"+this.cardInfo.groupId,method:"get"}).then(t=>{let s={x:e.x+30,y:e.y};this.$eventBus.$emit("openGroupInfo",t,s)})}}},se=te,ie=(s("3386"),Object(d["a"])(se,Z,ee,!1,null,"1bc83329",null)),ae=ie.exports,oe={name:"messageItem",components:{HeadImage:r["a"],RightMenu:c["a"],ChatGroupReaded:G,ChatQuoteMessage:V,ChatUserCard:X,ChatGroupCard:ae},props:{mode:{type:Number,default:1},active:{type:Boolean,default:!1},mine:{type:Boolean,required:!0},headImage:{type:String,default:""},showName:{type:String,required:!0},quoteShowName:{type:String,default:""},msgInfo:{type:Object,required:!0},group:{type:Object},groupMembers:{type:Array}},data(){return{}},methods:{onSendFail(){this.$message.error("该文件已发送失败,目前不支持自动重新发送,建议手动重新发送")},showFullImageBox(){let e=this.contentData.originUrl;e&&this.$eventBus.$emit("openFullImage",e)},onPlayVoice(){this.audio||(this.audio=new Audio),this.audio.src=this.contentData.url,this.audio.play(),this.onPlayVoice="RUNNING"},showMessageMenu(e){let t=[];t.push({key:"DELETE",name:"删除"}),this.msgInfo.id&&(this.msgInfo.selfSend&&t.push({key:"RECALL",name:"撤回"}),this.$msgType.isNormal(this.msgInfo.type)&&(t.push({key:"QUOTE",name:"引用"}),t.push({key:"FORWARD",name:"转发"})),(this.isOwner||this.isManager)&&this.$msgType.isNormal(this.msgInfo.type)&&t.push({key:"TOP",name:"置顶"})),this.$refs.rightMenu.open(e,t)},showQuoteMenu(e){let t=[];this.msgInfo.quoteMessage&&this.msgInfo.quoteMessage.status!=this.$enums.MESSAGE_STATUS.RECALL&&t.push({key:"LOCATE_QUOTE",name:"定位到原消息"}),this.$refs.rightMenu.open(e,t)},onSelectMenu(e){let t=e.key.toLowerCase().replace(/_([a-z])/g,e=>e[1].toUpperCase());this.$emit(t,this.msgInfo)},onShowReadedBox(){let e=this.$refs.chatMsgBox.getBoundingClientRect();this.$refs.chatGroupReadedBox.open(e)},isGroupOwner(e){return this.group.ownerId==e},isGroupManager(e){let t=this.groupMembers.find(t=>t.userId==e);return t&&t.isManager}},computed:{loading(){return this.msgInfo.loadStatus&&"loading"===this.msgInfo.loadStatus},loadFail(){return this.msgInfo.loadStatus&&"fail"===this.msgInfo.loadStatus},contentData(){return JSON.parse(this.msgInfo.content)},fileSize(){let e=this.contentData.size;return e>1048576?Math.round(e/1024/1024)+"M":e>1024?Math.round(e/1024)+"KB":e+"B"},isAction(){return this.$msgType.isAction(this.msgInfo.type)},isNormal(){const e=this.msgInfo.type;return this.$msgType.isNormal(e)||this.$msgType.isAction(e)},isOwner(){let e=this.userStore.userInfo.id;return this.group&&e==this.group.ownerId},isManager(){let e=this.userStore.userInfo.id,t=this.groupMembers.find(t=>t.userId==e);return t&&t.isManager},htmlText(){let e=this.msgInfo.selfSend?"white":"",t=this.$str.html2Escape(this.msgInfo.content);return t=this.$url.replaceURLWithHTMLLinks(t,e),this.$emo.transform(t,"emoji-normal")}}},ne=oe,re=(s("71e0"),Object(d["a"])(ne,$,R,!1,null,null,null)),ce=re.exports,le=s("1a05"),he=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],on:{click:function(t){return e.close()}}},[t("div",{staticClass:"emotion-box",style:{left:e.x+"px",top:e.y+"px"}},[t("el-scrollbar",{staticStyle:{height:"220px"}},[t("div",{staticClass:"emotion-items"},e._l(e.$emo.emoTextList,(function(s,i){return t("div",{key:i,staticClass:"emotion-item",domProps:{innerHTML:e._s(e.$emo.textToImg(s,"emoji-large"))},on:{click:function(t){return e.onClickEmo(s)}}})})),0)])],1)])},de=[],me={name:"emotion",data(){return{show:!1,pos:{x:0,y:0}}},methods:{onClickEmo(e){let t=`#${e};`;this.$emit("emotion",t)},open(e){this.pos=e,this.show=!0},close(){this.show=!1}},computed:{x(){return this.pos.x-22},y(){return this.pos.y-234}}},ue=me,pe=(s("e1e1"),Object(d["a"])(ue,he,de,!1,null,"193e86e8",null)),ge=pe.exports,fe=function(){var e=this,t=e._self._c;return t("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"chat-record",attrs:{title:"语音录制",visible:e.visible,width:"600px","before-close":e.onClose},on:{"update:visible":function(t){e.visible=t}}},[t("div",{directives:[{name:"show",rawName:"v-show",value:"RECORD"==e.mode,expression:"mode == 'RECORD'"}]},[t("div",{staticClass:"tip"},[e._v(e._s(e.stateTip))]),t("div",[e._v("时长: "+e._s("STOP"==e.state?0:parseInt(e.rc.duration))+"s")])]),t("audio",{directives:[{name:"show",rawName:"v-show",value:"PLAY"==e.mode,expression:"mode == 'PLAY'"}],ref:"audio",attrs:{src:e.url,controls:""},on:{ended:function(t){return e.onStopAudio()}}}),t("el-divider",{attrs:{"content-position":"center"}}),t("el-row",{staticClass:"btn-group"},[t("el-button",{directives:[{name:"show",rawName:"v-show",value:"STOP"==e.state,expression:"state == 'STOP'"}],attrs:{round:"",type:"primary"},on:{click:function(t){return e.onStartRecord()}}},[e._v("开始录音")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"RUNNING"==e.state,expression:"state == 'RUNNING'"}],attrs:{round:"",type:"warning"},on:{click:function(t){return e.onPauseRecord()}}},[e._v("暂停录音")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"PAUSE"==e.state,expression:"state == 'PAUSE'"}],attrs:{round:"",type:"primary"},on:{click:function(t){return e.onResumeRecord()}}},[e._v("继续录音")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"RUNNING"==e.state||"PAUSE"==e.state,expression:"state == 'RUNNING' || state == 'PAUSE'"}],attrs:{round:"",type:"danger"},on:{click:function(t){return e.onCompleteRecord()}}},[e._v(" 结束录音")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"COMPLETE"==e.state&&"PLAY"!=e.mode,expression:"state == 'COMPLETE' && mode != 'PLAY'"}],attrs:{round:"",type:"success"},on:{click:function(t){return e.onPlayAudio()}}},[e._v("播放录音 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"COMPLETE"==e.state&&"PLAY"==e.mode,expression:"state == 'COMPLETE' && mode == 'PLAY'"}],attrs:{round:"",type:"warning"},on:{click:function(t){return e.onStopAudio()}}},[e._v("停止播放 ")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"COMPLETE"==e.state,expression:"state == 'COMPLETE'"}],attrs:{round:"",type:"primary"},on:{click:function(t){return e.onRestartRecord()}}},[e._v("重新录音")]),t("el-button",{directives:[{name:"show",rawName:"v-show",value:"COMPLETE"==e.state,expression:"state == 'COMPLETE'"}],attrs:{round:"",type:"primary"},on:{click:function(t){return e.onSendRecord()}}},[e._v("立即发送")])],1)],1)},xe=[],ve=s("da43"),be=s.n(ve),we={name:"chatRecord",props:{visible:{type:Boolean}},data(){return{rc:new be.a,audio:new Audio,state:"STOP",stateTip:"未开始",mode:"RECORD",duration:0,url:""}},methods:{onClose(){this.rc.destroy(),this.rc=new be.a,this.audio.pause(),this.mode="RECORD",this.state="STOP",this.stateTip="未开始",this.$emit("close")},onStartRecord(){this.rc.start().then(e=>{this.state="RUNNING",this.stateTip="正在录音..."}).catch(e=>{this.$message.error(e)})},onPauseRecord(){this.rc.pause(),this.state="PAUSE",this.stateTip="已暂停录音"},onResumeRecord(){this.rc.resume(),this.state="RUNNING",this.stateTip="正在录音..."},onCompleteRecord(){this.rc.pause(),this.state="COMPLETE",this.stateTip="已结束录音"},onPlayAudio(){let e=this.rc.getWAVBlob(),t=URL.createObjectURL(e);this.$refs.audio.src=t,this.$refs.audio.play(),this.mode="PLAY"},onStopAudio(){this.$refs.audio.pause(),this.mode="RECORD"},onRestartRecord(){this.rc.destroy(),this.rc=new be.a,this.rc.start(),this.state="RUNNING",this.mode="RECORD",this.stateTip="正在录音..."},onSendRecord(){let e=this.rc.getWAVBlob(),t=(new Date).getDate()+".wav";var s=new window.FormData;s.append("file",e,t),this.$http({url:"/file/upload",data:s,method:"post",headers:{"Content-Type":"multipart/form-data"}}).then(e=>{let t={duration:parseInt(this.rc.duration),url:e};this.$emit("send",t),this.onClose()})}}},ye=we,Ie=(s("a0f2"),Object(d["a"])(ye,fe,xe,!1,null,"3bd70ec4",null)),Me=Ie.exports,Se=function(){var e=this,t=e._self._c;return t("el-drawer",{attrs:{title:"聊天记录",size:"700px",visible:e.isShow,direction:"rtl","before-close":e.close},on:{"update:visible":function(t){e.isShow=t}}},[t("div",{staticClass:"chat-history"},[t("div",{staticClass:"search-bar"},[t("el-input",{staticClass:"search-text",attrs:{size:"small",placeholder:"搜索聊天记录"},on:{input:e.onSearchTextChange},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("i",{staticClass:"el-icon-search el-input__icon",attrs:{slot:"prefix"},slot:"prefix"})])],1),t("div",{ref:"chatTabs",staticClass:"chat-tabs"},[t("el-tabs",{on:{"tab-click":e.onTabClick},model:{value:e.tabName,callback:function(t){e.tabName=t},expression:"tabName"}},[t("el-tab-pane",{attrs:{label:"全部",name:"all"}},[e.messageSize>0?t("el-scrollbar",{ref:"allScrollBox",style:e.tabPaneStyle},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("chat-history-item",{attrs:{active:e.activeIdx==e.showMinIdx+i,headImage:e.headImage(s),showName:e.showName(s),quoteShowName:e.showName(s.quoteMessage),msgInfo:s},nativeOn:{click:function(t){return e.onClickItem(e.showMinIdx+i)},contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)}}})],1)})),0):t("no-data-tip",{style:e.tabPaneStyle,attrs:{tip:e.noDataTip}})],1),t("el-tab-pane",{attrs:{label:"文字",name:"text"}},[e.messageSize>0?t("el-scrollbar",{ref:"textScrollBox",style:e.tabPaneStyle},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("chat-history-item",{attrs:{active:e.activeIdx==e.showMinIdx+i,headImage:e.headImage(s),showName:e.showName(s),quoteShowName:e.showName(s.quoteMessage),msgInfo:s},nativeOn:{click:function(t){return e.onClickItem(e.showMinIdx+i)},contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)}}})],1)})),0):t("no-data-tip",{style:e.tabPaneStyle,attrs:{tip:e.noDataTip}})],1),t("el-tab-pane",{attrs:{label:"图片",name:"image"}},[e.messageSize>0?t("el-scrollbar",{ref:"imageScrollBox",style:e.tabPaneStyle},["image"==e.tabName?t("div",{staticClass:"chat-image-video-list"},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("div",{staticClass:"chat-image-video",class:e.activeIdx==e.showMinIdx+i?"active":"",on:{contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)},click:function(t){return e.onClickItem(e.showMinIdx+i)}}},[t("img",{staticClass:"image",attrs:{src:JSON.parse(s.content).thumbUrl,loading:"lazy"},on:{click:function(t){return e.showFullImageBox(s)}}}),t("span",{staticClass:"upload-text"},[e._v(e._s(e.showName(s))+"上传于 "+e._s(e.$date.toTimeText(s.sendTime,!0))+" ")])])])})),0):e._e()]):t("no-data-tip",{style:e.tabPaneStyle})],1),t("el-tab-pane",{attrs:{label:"文件",name:"file"}},[e.messageSize>0?t("el-scrollbar",{ref:"fileScrollBox",style:e.tabPaneStyle},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("chat-history-item",{attrs:{active:e.activeIdx==e.showMinIdx+i,headImage:e.headImage(s),showName:e.showName(s),quoteShowName:e.showName(s.quoteMessage),msgInfo:s},nativeOn:{click:function(t){return e.onClickItem(e.showMinIdx+i)},contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)}}})],1)})),0):t("no-data-tip",{style:e.tabPaneStyle,attrs:{tip:e.noDataTip}})],1),t("el-tab-pane",{attrs:{label:"语音",name:"voice"}},[e.messageSize>0?t("el-scrollbar",{ref:"voiceScrollBox",style:e.tabPaneStyle},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("chat-history-item",{attrs:{active:e.activeIdx==e.showMinIdx+i,headImage:e.headImage(s),showName:e.showName(s),quoteShowName:e.showName(s.quoteMessage),msgInfo:s},nativeOn:{click:function(t){return e.onClickItem(e.showMinIdx+i)},contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)}}})],1)})),0):t("no-data-tip",{style:e.tabPaneStyle})],1),t("el-tab-pane",{attrs:{label:"视频",name:"video"}},[e.messageSize>0?t("el-scrollbar",{ref:"videoScrollBox",style:e.tabPaneStyle},["video"==e.tabName?t("div",{staticClass:"chat-image-video-list"},e._l(e.showMessages,(function(s,i){return t("div",{key:e.showMinIdx+i},[t("div",{staticClass:"chat-image-video",class:e.activeIdx==e.showMinIdx+i?"active":"",on:{contextmenu:function(t){return t.preventDefault(),e.onRclickItem(t,e.showMinIdx+i)},dblclick:function(t){return e.onDblclickItem(e.showMinIdx+i)},click:function(t){return e.onClickItem(e.showMinIdx+i)}}},[t("video",{staticClass:"video",attrs:{controls:"",preload:"none",poster:JSON.parse(s.content).coverUrl,src:JSON.parse(s.content).videoUrl}}),t("span",{staticClass:"upload-text"},[e._v(e._s(e.showName(s))+"上传于 "+e._s(e.$date.toTimeText(s.sendTime,!0))+" ")])])])})),0):e._e()]):t("no-data-tip",{style:e.tabPaneStyle})],1)],1)],1)]),t("right-menu",{ref:"rightMenu",on:{select:e.onSelectMenu}})],1)},Ce=[],_e=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-history-item",class:e.active?"active":""},[t("div",{staticClass:"message-normal"},[t("div",{staticClass:"avatar"},[t("head-image",{attrs:{name:e.showName,size:38,url:e.headImage,id:e.msgInfo.sendId}})],1),t("div",{staticClass:"content"},[t("div",{staticClass:"top"},[t("span",[e._v(e._s(e.showName))]),t("span",[e._v(e._s(e.$date.toTimeText(e.msgInfo.sendTime)))])]),t("div",{staticClass:"bottom"},[t("div",{ref:"chatMsgBox"},[e.msgInfo.type==e.$enums.MESSAGE_TYPE.TEXT?t("span",{staticClass:"message-text",domProps:{innerHTML:e._s(e.htmlText)}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.IMAGE?t("div",{staticClass:"message-image"},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"上传中..","element-loading-background":"rgba(0, 0, 0, 0.4)"}},[t("img",{staticClass:"send-image",attrs:{src:JSON.parse(e.msgInfo.content).thumbUrl,loading:"lazy"},on:{click:function(t){return e.showFullImageBox()}}})])]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.VIDEO?t("div",{staticClass:"message-video"},[t("video",{ref:"videoPlayer",staticClass:"send-video",attrs:{controls:"",preload:"none",poster:JSON.parse(e.msgInfo.content).coverUrl,src:JSON.parse(e.msgInfo.content).videoUrl}})]):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.FILE?t("div",{staticClass:"message-file"},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"chat-file-box"},[t("div",{staticClass:"chat-file-info"},[t("el-link",{staticClass:"chat-file-name",attrs:{underline:!0,target:"_blank",type:"primary",href:e.contentData.url,download:e.contentData.name}},[e._v(e._s(e.contentData.name))]),t("div",{staticClass:"chat-file-size"},[e._v(e._s(e.fileSize))])],1),e._m(0)])]):e._e()]),e.msgInfo.type==e.$enums.MESSAGE_TYPE.USER_CARD?t("chat-user-card",{attrs:{cardInfo:e.contentData}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.GROUP_CARD?t("chat-group-card",{attrs:{cardInfo:e.contentData}}):e._e(),e.msgInfo.type==e.$enums.MESSAGE_TYPE.AUDIO?t("div",{staticClass:"message-voice",on:{click:function(t){return e.onPlayVoice()}}},[t("audio",{attrs:{controls:"",src:JSON.parse(e.msgInfo.content).url}})]):e._e(),e.msgInfo.quoteMessage?t("div",{staticClass:"quote-message"},[t("chat-quote-message",{attrs:{msgInfo:e.msgInfo.quoteMessage,showName:e.quoteShowName}})],1):e._e()],1)])])])},Te=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-file-icon"},[t("span",{staticClass:"el-icon-document",attrs:{type:"primary"}})])}],Ee={name:"chatHistoryItem",components:{HeadImage:r["a"],ChatQuoteMessage:V,ChatUserCard:X,ChatGroupCard:ae},props:{active:{type:Boolean,default:!1},headImage:{type:String,default:""},showName:{type:String,required:!0},quoteShowName:{type:String,default:""},msgInfo:{type:Object,required:!0}},data(){return{}},methods:{showFullImageBox(){let e=JSON.parse(this.msgInfo.content).originUrl;e&&this.$eventBus.$emit("openFullImage",e)},onPlayVoice(){this.audio||(this.audio=new Audio),this.audio.src=JSON.parse(this.msgInfo.content).url,this.audio.play(),this.onPlayVoice="RUNNING"}},computed:{loading(){return this.msgInfo.loadStatus&&"loading"===this.msgInfo.loadStatus},contentData(){return JSON.parse(this.msgInfo.content)},fileSize(){let e=this.contentData.size;return e>1048576?Math.round(e/1024/1024)+"M":e>1024?Math.round(e/1024)+"KB":e+"B"},htmlText(){let e=this.$str.html2Escape(this.msgInfo.content);return e=this.$url.replaceURLWithHTMLLinks(e,""),this.$emo.transform(e,"emoji-normal")}}},ke=Ee,Ne=(s("f5f5"),Object(d["a"])(ke,_e,Te,!1,null,null,null)),Ae=Ne.exports,$e=s("4ea0"),Re={name:"chatHistory",components:{ChatMessageItem:ce,ChatHistoryItem:Ae,RightMenu:c["a"],NoDataTip:$e["a"]},props:{chat:{type:Object},friend:{type:Object},group:{type:Object},groupMembers:{type:Array}},data(){return{isShow:!1,tabName:"all",showMinIdx:0,activeIdx:-1,searchText:"",tabPaneHeight:500,menuItems:[{key:"LOCATE_QUOTE",name:"在聊天中定位"}]}},methods:{open(){this.isShow=!0,this.searchText="",this.tabName="all",this.resetShowMinIdx(),this.initEvent(),this.scrollToBottom(),this.$nextTick(()=>{this.tabPaneHeight=this.$refs.chatTabs.offsetHeight-80})},close(){this.isShow=!1},onTabClick(){this.resetShowMinIdx(),this.initEvent(),this.scrollToBottom()},onScroll(e){let t=e.target,s=t.scrollTop;s<30&&(this.showMinIdx=this.showMinIdx>20?this.showMinIdx-20:0)},onSearchTextChange(){this.resetShowMinIdx()},onClickItem(e){this.activeIdx=e},onDblclickItem(e){this.activeIdx=e,this.onSelectMenu(this.menuItems[0])},onRclickItem(e,t){this.activeIdx=t,this.$refs.rightMenu.open(e,this.menuItems)},onSelectMenu(e){let t=e.key.toLowerCase().replace(/_([a-z])/g,e=>e[1].toUpperCase());this.$emit(t,this.messages[this.activeIdx])},resetShowMinIdx(){this.showMinIdx=this.messageSize>30?this.messageSize-30:0},initEvent(){this.messageSize&&this.$nextTick(()=>{let e=this.tabName+"ScrollBox",t=this.$refs[e].$el.querySelector(".el-scrollbar__wrap");t.removeEventListener("scroll",this.onScroll),t.addEventListener("scroll",this.onScroll)})},showName(e){if(!e)return"";if(this.isGroup){let t=this.groupMembers.find(t=>t.userId==e.sendId);return t?t.showNickName:e.sendNickName||""}return e.selfSend?this.mine.nickName:this.chat.showName},headImage(e){if(this.isGroup){let t=this.groupMembers.find(t=>t.userId==e.sendId);return t?t.headImage:""}return e.selfSend?this.mine.headImageThumb:this.chat.headImage},showMenu(e){this.rightMenu.pos={x:e.x,y:e.y},this.rightMenu.show="true"},showFullImageBox(e){let t=JSON.parse(e.content).originUrl;t&&this.$eventBus.$emit("openFullImage",t)},scrollToBottom(){this.messageSize&&this.$nextTick(()=>{let e=this.tabName+"ScrollBox",t=this.$refs[e].$el.querySelector(".el-scrollbar__wrap");t.scrollTop=t.scrollHeight})}},computed:{mine(){return this.userStore.userInfo},isGroup(){return"GROUP"==this.chat.type},allMessage(){return this.chat.messages.filter(e=>this.$msgType.isNormal(e.type))},imageMessage(){let e=this.$enums.MESSAGE_TYPE.IMAGE;return this.chat.messages.filter(t=>t.type==e)},fileMessage(){let e=this.$enums.MESSAGE_TYPE.FILE;return this.chat.messages.filter(t=>t.type==e)},videoMessage(){let e=this.$enums.MESSAGE_TYPE.VIDEO;return this.chat.messages.filter(t=>t.type==e)},voiceMessage(){let e=this.$enums.MESSAGE_TYPE.AUDIO;return this.chat.messages.filter(t=>t.type==e)},textMessage(){let e=this.$enums.MESSAGE_TYPE.TEXT;return this.chat.messages.filter(t=>t.type==e)},messages(){return this[this.tabName+"Message"].filter(e=>!this.searchText||("all"!=this.tabName&&"text"!=this.tabName&&"file"!=this.tabName||(this.$enums.MESSAGE_TYPE.TEXT==e.type?e.content.toLowerCase().includes(this.searchText.toLowerCase()):this.$enums.MESSAGE_TYPE.FILE==e.type&&JSON.parse(e.content).name.toLowerCase().includes(this.searchText.toLowerCase()))))},showMessages(){return this.messages.slice(this.showMinIdx)},messageSize(){return this.isShow?this.messages.length:0},tabPaneStyle(){return`height:${this.tabPaneHeight}px`},noDataTip(){return this.searchText?`未搜索到与'${this.searchText}'相关的内容`:"没有数据"}}},Pe=Re,Be=(s("73d5"),Object(d["a"])(Pe,Se,Ce,!1,null,null,null)),Oe=Be.exports,ze=function(){var e=this,t=e._self._c;return t("el-scrollbar",{directives:[{name:"show",rawName:"v-show",value:e.show&&e.showMembers.length,expression:"show && showMembers.length"}],ref:"scrollBox",staticClass:"chat-at-box",style:{left:e.pos.x+"px",top:e.pos.y-300+"px"}},e._l(e.showMembers,(function(s,i){return t("div",{key:s.id},[t("group-member-item",{attrs:{group:e.group,groupMembers:e.members,member:s,height:40,active:e.activeIdx==i,menu:!1},nativeOn:{click:function(t){return e.onSelectMember(s)}}})],1)})),0)},De=[],Ue={name:"chatAtBox",components:{GroupMemberItem:b["a"]},props:{searchText:{type:String,default:""},group:{type:Object},members:{type:Array}},data(){return{show:!1,pos:{x:0,y:0},activeIdx:0,showMembers:[]}},methods:{init(){this.$refs.scrollBox.wrap.scrollTop=0,this.showMembers=[];let e=this.userStore.userInfo.id,t="全体成员";this.group.ownerId==e&&t.startsWith(this.searchText)&&this.showMembers.push({userId:-1,showNickName:t}),this.members.forEach(t=>{this.showMembers.length>100||t.userId!=e&&!t.quit&&t.showNickName.startsWith(this.searchText)&&this.showMembers.push(t)}),this.activeIdx=this.showMembers.length>0?0:-1},open(e){this.show=!0,this.pos=e,this.init()},close(){this.show=!1},moveUp(){this.activeIdx>0&&(this.activeIdx--,this.scrollToActive())},moveDown(){this.activeIdx=0&&this.onSelectMember(this.showMembers[this.activeIdx]),this.close()},scrollToActive(){40*this.activeIdx-this.$refs.scrollBox.wrap.clientHeight>this.$refs.scrollBox.wrap.scrollTop&&(this.$refs.scrollBox.wrap.scrollTop+=140,this.$refs.scrollBox.wrap.scrollTop>this.$refs.scrollBox.wrap.scrollHeight&&(this.$refs.scrollBox.wrap.scrollTop=this.$refs.scrollBox.wrap.scrollHeight)),40*this.activeIdxe.id==t.id)||e.push({id:t.id,nickName:t.nickName,headImage:t.headImageThumb,isCamera:!1,isMicroPhone:!0,isShareScreen:!1});let s={isHost:!1,groupId:this.groupId,inviterId:t.id,userInfos:e};this.$eventBus.$emit("openGroupVideo",s)},onCancel(){this.isShow=!1}}},He=Ve,Je=(s("6427"),Object(d["a"])(He,je,Ye,!1,null,"ca4fe850",null)),Qe=Je.exports,We=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-input-area"},[t("div",{ref:"content",class:["edit-container",e.isEmpty?"":"not-empty"],attrs:{contenteditable:"true"},on:{paste:function(t){return t.preventDefault(),e.onPaste.apply(null,arguments)},keydown:e.onKeydown,compositionstart:function(t){e.compositionFlag=!0},compositionend:e.onCompositionEnd,input:e.onEditorInput,mousedown:e.onMousedown,blur:e.onBlur}}),t("chat-at-box",{ref:"atBox",attrs:{"search-text":e.atSearchText,group:e.group,members:e.groupMembers},on:{select:e.onAtSelect}})],1)},Ke=[],Xe={name:"ChatInput",components:{ChatAtBox:Fe},props:{group:{type:Object},groupMembers:{type:Array}},data(){return{imageList:[],fileList:[],currentId:0,atSearchText:null,compositionFlag:!1,atIng:!1,isEmpty:!0,changeStored:!0,blurRange:null}},methods:{onPaste(e){this.isEmpty=!1;let t=e.clipboardData.getData("Text"),s=window.getSelection().getRangeAt(0);if(s.startContainer===s.endContainer&&s.startOffset===s.endOffset||s.deleteContents(),t&&"string"==typeof t){let e=document.createTextNode(t);return s.insertNode(e),void s.collapse()}let i=(e.clipboardData||window.clipboardData).items;if(i.length)for(let a=0;a{let i=document.createRange();i.setStart(e,0),i.setEnd(e,t||0),e.firstChild&&i.selectNodeContents(e.firstChild),i.collapse(),s.removeAllRanges(),s.addRange(i),e.focus&&e.focus()})},onCompositionEnd(e){this.compositionFlag=!1,this.onEditorInput(e)},onKeydown(e){if(13!==e.keyCode)8===e.keyCode&&setTimeout(()=>{let e=this.$refs.content.innerHTML.trim();""===e||"
"===e||"
 
"===e?(this.empty(),this.isEmpty=!0,this.selectElement(this.$refs.content)):this.isEmpty=!1}),this.atIng&&(38===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.$refs.atBox.moveUp()),40===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.$refs.atBox.moveDown()));else{if(e.preventDefault(),e.stopPropagation(),this.atIng)return void this.$refs.atBox.select();if(e.ctrlKey){let e=this.newLine(),t=document.createTextNode(" ");e.appendChild(t),this.selectElement(e.childNodes[0],0)}else{if(this.compositionFlag)return;this.submit()}}},onAtSelect(e){this.atIng=!1;let t=this.blurRange,s=t.endContainer,i=s.data.indexOf("@"+this.atSearchText),a=i+this.atSearchText.length+1;t.setStart(t.endContainer,i),t.setEnd(t.endContainer,a),t.deleteContents(),t.collapse(),this.focus();let o=document.createElement("SPAN");o.className="chat-at-user",o.dataset.id=e.userId,o.contentEditable="false",o.innerText="@"+e.showNickName,t.insertNode(o),t.collapse();let n=document.createTextNode(" ");t.insertNode(n),t.collapse(),this.atSearchText="",this.selectElement(n,1)},onEditorInput(e){if(this.isEmpty=!1,this.changeStored=!1,this.$props.groupMembers&&!this.compositionFlag){let t=window.getSelection(),s=t.getRangeAt(0),i=s.endContainer,a=s.endOffset,o=i.textContent,n=-1;for(let e=a;e>=0;e--)if("@"===o[e]){n=e;break}if(-1===n)return void this.$refs.atBox.close();let r=a;for(let e=a;e0&&(this.blurRange=e.getRangeAt(0))},newLine(){let e=window.getSelection();if(0===e.rangeCount){let e=document.createElement("div");return e.innerHTML="",this.$refs.content.append(e),e}let t=e.getRangeAt(0),s=document.createElement("div"),i=t.endContainer,a=i.parentElement;return a.parentElement===this.$refs.content?(s.innerHTML=i.textContent.substring(t.endOffset).trim(),i.textContent=i.textContent.substring(0,t.endOffset),a.insertAdjacentElement("afterend",s)):(s.innerHTML="",this.$refs.content.append(s)),s},clear(){this.empty(),this.imageList=[],this.fileList=[],this.$refs.atBox.close()},empty(){this.$refs.content.innerHTML="";let e=this.newLine(),t=document.createTextNode(" ");e.appendChild(t),this.$nextTick(()=>this.selectElement(t))},showAtBox(e){this.atIng=!0;let t=window.getSelection(),s=t.getRangeAt(0),i=s.getBoundingClientRect();this.$refs.atBox.open({x:i.x,y:i.y}),this.updateRange()},submit(){let e=this.$refs.content.childNodes,t=[],s="",i=[],a=e=>{for(let o=0;o{this.$http({url:"/group/removeTopMessage/"+this.group.id,method:"delete"})})},hideTopMessage(){this.$http({url:"/group/hideTopMessage/"+this.group.id,method:"delete"})}},computed:{content(){let e="不支持的消息类型";return this.msgInfo.type==this.$enums.MESSAGE_TYPE.IMAGE?e="[图片]":this.msgInfo.type==this.$enums.MESSAGE_TYPE.VIDEO?e="[视频]":this.msgInfo.type==this.$enums.MESSAGE_TYPE.FILE?e="[文件] "+JSON.parse(this.msgInfo.content).name:this.msgInfo.type==this.$enums.MESSAGE_TYPE.AUDIO?e="[语音] "+JSON.parse(this.msgInfo.content).duration+'"':this.msgInfo.type==this.$enums.MESSAGE_TYPE.USER_CARD?e="[个人名片] "+JSON.parse(this.msgInfo.content).nickName:this.msgInfo.type==this.$enums.MESSAGE_TYPE.GROUP_CARD?e="[群名片] "+JSON.parse(this.msgInfo.content).groupName:this.msgInfo.type==this.$enums.MESSAGE_TYPE.TEXT&&(e=this.$emo.transform(this.$str.html2Escape(this.msgInfo.content),"emoji-normal")),e},isOwner(){return this.group.ownerId==this.userStore.userInfo.id},isManager(){let e=this.userStore.userInfo.id,t=this.groupMembers.find(t=>t.userId==e);return t&&t.isManager}}},ot=at,nt=(s("ac33"),Object(d["a"])(ot,st,it,!1,null,"a24a1c10",null)),rt=nt.exports,ct=(s("fe82"),{name:"chatPrivate",components:{ChatInput:tt,ChatMessageItem:ce,FileUpload:le["a"],ChatGroupSide:A,Emotion:ge,ChatRecord:Me,ChatHistory:Oe,ChatAtBox:Fe,GroupMemberSelector:w["a"],RtcGroupJoin:Qe,ChatQuoteMessage:V,ChatTopMessage:rt,ChatSelector:Le["a"],RightMenu:c["a"]},props:{chat:{type:Object}},data(){return{userInfo:{},groupId:null,groupMembers:[],sendImageUrl:"",sendImageFile:"",placeholder:"",isReceipt:!0,showRecord:!1,showSide:!1,lockMessage:!1,showMinIdx:0,showMaxIdx:-1,activeMessageIdx:-1,quoteMessage:null,reqQueue:[],isSending:!1,isInBottom:!0,newMessageSize:0}},methods:{moveChatToTop(){let e=this.chatStore.findChatIdx(this.chat);this.chatStore.moveTop(e)},onClickChatBox(){this.$refs.emoBox.close(),this.activeMessageIdx=-1},onCall(e){e==this.$enums.MESSAGE_TYPE.ACT_RT_VOICE?this.showPrivateVideo("voice"):e==this.$enums.MESSAGE_TYPE.ACT_RT_VIDEO&&this.showPrivateVideo("video")},onSwitchReceipt(){this.isReceipt=!this.isReceipt,this.refreshPlaceHolder()},onImageSuccess(e,t){let s=JSON.parse(JSON.stringify(t.msgInfo));s.content=JSON.stringify(e),s.receipt=this.isReceipt,this.sendMessageRequest(s).then(e=>{s.loadStatus="ok",s.id=e.id,this.isReceipt=!1,this.chatStore.insertMessage(s,t.chat)})},onImageFail(e,t){let s=JSON.parse(JSON.stringify(t.msgInfo));s.loadStatus="fail",this.chatStore.insertMessage(s,t.chat)},onImageBefore(e){if(this.isBanned)return void this.showBannedTip();let t=URL.createObjectURL(e),s={originUrl:t,thumbUrl:t},i={id:0,tmpId:this.generateId(),fileId:e.uid,sendId:this.mine.id,content:JSON.stringify(s),sendTime:(new Date).getTime(),selfSend:!0,type:this.$enums.MESSAGE_TYPE.IMAGE,readedCount:0,loadStatus:"loading",status:this.$enums.MESSAGE_STATUS.UNSEND};this.fillTargetId(i,this.chat.targetId),this.chatStore.insertMessage(i,this.chat),this.moveChatToTop(),this.scrollToBottom(),e.msgInfo=i,e.chat=this.chat},onFileSuccess(e,t){let s={name:t.name,size:t.size,url:e},i=JSON.parse(JSON.stringify(t.msgInfo));i.content=JSON.stringify(s),i.receipt=this.isReceipt,this.sendMessageRequest(i).then(e=>{i.loadStatus="ok",i.id=e.id,this.isReceipt=!1,this.refreshPlaceHolder(),this.chatStore.insertMessage(i,t.chat)})},onFileFail(e,t){let s=JSON.parse(JSON.stringify(t.msgInfo));s.loadStatus="fail",this.chatStore.insertMessage(s,t.chat)},onFileBefore(e){if(this.isBanned)return void this.showBannedTip();let t=URL.createObjectURL(e),s={name:e.name,size:e.size,url:t},i={id:0,tmpId:this.generateId(),sendId:this.mine.id,content:JSON.stringify(s),sendTime:(new Date).getTime(),selfSend:!0,type:this.$enums.MESSAGE_TYPE.FILE,loadStatus:"loading",readedCount:0,status:this.$enums.MESSAGE_STATUS.UNSEND};this.fillTargetId(i,this.chat.targetId),this.chatStore.insertMessage(i,this.chat),this.moveChatToTop(),this.scrollToBottom(),e.msgInfo=i,e.chat=this.chat},onVideoSuccess(e,t){let s=JSON.parse(JSON.stringify(t.msgInfo));s.content=JSON.stringify(e),s.receipt=this.isReceipt,this.sendMessageRequest(s).then(e=>{s.loadStatus="ok",s.id=e.id,this.isReceipt=!1,this.chatStore.insertMessage(s,t.chat)})},onVideoFail(e,t){let s=JSON.parse(JSON.stringify(t.msgInfo));s.loadStatus="fail",this.chatStore.insertMessage(s,t.chat)},onVideoBefore(e){if(this.isBanned)return void this.showBannedTip();let t=URL.createObjectURL(e),s={videoUrl:t},i={id:0,tmpId:this.generateId(),sendId:this.mine.id,content:JSON.stringify(s),sendTime:(new Date).getTime(),selfSend:!0,type:this.$enums.MESSAGE_TYPE.VIDEO,loadStatus:"loading",readedCount:0,status:this.$enums.MESSAGE_STATUS.UNSEND};this.fillTargetId(i,this.chat.targetId),this.chatStore.insertMessage(i,this.chat),this.moveChatToTop(),this.scrollToBottom(),e.msgInfo=i,e.chat=this.chat},onClickMore(){this.showSide=!this.showSide,this.showSide&&this.loadGroup(this.group.id)},onScroll(e){let t=e.target,s=t.scrollTop;s<30&&(this.showMinIdx=this.showMinIdx>20?this.showMinIdx-20:0,this.isInBottom=!1,this.refreshAtMessage()),s+t.clientHeight>=t.scrollHeight-30&&(this.showMaxIdx>0&&(this.showMaxIdx+=20),this.showMaxIdx>=this.messageSize&&(this.showMaxIdx=-1),this.showMaxIdx<0&&(this.isInBottom=!0,this.newMessageSize=0))},showEmotionBox(){let e=this.$refs.emotion.offsetWidth,t=this.$elm.fixLeft(this.$refs.emotion),s=this.$elm.fixTop(this.$refs.emotion);this.$refs.emoBox.open({x:t+e/2,y:s})},onScreenshot(){window.electronAPI.invoke("screenshot").then(e=>{e&&this.$refs.chatInputEditor.pasteScreenShot(e)})},onShowScreenshotMenu(e){let t=[{key:"SCREEN_SHOT",name:"截图时隐藏当前窗口"}];this.$refs.rightMenu.open(e,t)},screenshotAndHideWin(){window.electronAPI.sendEvent("close"),setTimeout(()=>{window.electronAPI.invoke("screenshot").then(e=>{e&&this.$refs.chatInputEditor.pasteScreenShot(e),window.electronAPI.sendEvent("show")})},100)},onSelectMenu(e){switch(e.key){case"SCREEN_SHOT":this.screenshotAndHideWin();break}},onEmotion(e){this.$refs.chatInputEditor.insertEmoji(e)},showRecordBox(){this.showRecord=!0},closeRecordBox(){this.showRecord=!1},showPrivateVideo(e){if(!this.isFriend)return void this.$message.error("你已不是对方好友,无法呼叫");if(this.isBanned)return void this.showBannedTip();let t={mode:e,isHost:!0,friend:this.friend};this.$eventBus.$emit("openPrivateVideo",t)},onGroupVideo(){this.isBanned?this.showBannedTip():this.$http({url:"/webrtc/group/info?groupId="+this.group.id,method:"GET"}).then(e=>{if(e.isChating)this.$refs.rtcJoin.open(e);else{let e=[this.mine.id],t=this.configStore.webrtc.maxChannel;this.$refs.rtcSel.open(t,e,e,[])}})},onInviteOk(e){if(e.length<2)return;let t=[];e.forEach(e=>{t.push({id:e.userId,nickName:e.showNickName,headImage:e.headImage,isCamera:!1,isMicroPhone:!0,isShareScreen:!1})});let s={isHost:!0,groupId:this.group.id,inviterId:this.mine.id,userInfos:t};this.$eventBus.$emit("openGroupVideo",s)},showHistoryBox(){this.$refs.chatHistory.open()},onSendRecord(e){if(this.isBanned)return void this.showBannedTip();let t={content:JSON.stringify(e),type:3,receipt:this.isReceipt};this.fillTargetId(t,this.chat.targetId),this.sendMessageRequest(t).then(e=>{e.selfSend=!0,this.chatStore.insertMessage(e,this.chat),this.moveChatToTop(),this.$refs.chatInputEditor.focus(),this.scrollToBottom(),this.showRecord=!1,this.isReceipt=!1,this.refreshPlaceHolder()})},fillTargetId(e,t){this.isGroup?e.groupId=t:e.recvId=t},notifySend(){this.$refs.chatInputEditor.submit()},async sendMessage(e){if(this.resetEditor(),this.readedMessage(),this.isBanned)return void this.showBannedTip();let t=this.isReceipt?"[回执消息] ":"";e.forEach(async e=>{switch(e.type){case"text":await this.sendTextMessage(t+e.content,e.atUserIds);break;case"image":await this.sendImageMessage(e.content.file);break;case"file":await this.sendFileMessage(e.content.file);break}})},sendImageMessage(e){return new Promise((t,s)=>{this.onImageBefore(e);let i=new FormData;i.append("file",e),this.$http.post("/image/upload",i,{headers:{"Content-Type":"multipart/form-data"}}).then(s=>{this.onImageSuccess(s,e),t()}).catch(t=>{this.onImageFail(t,e),s()}),this.$nextTick(()=>this.$refs.chatInputEditor.focus()),this.scrollToBottom()})},sendTextMessage(e,t){return new Promise((s,i)=>{e.trim()||i();let a={content:e,type:0};this.fillTargetId(a,this.chat.targetId),this.isGroup&&(a.atUserIds=t,a.receipt=this.isReceipt),this.quoteMessage&&(a.quoteMessageId=this.quoteMessage.id),this.lockMessage=!0;const o=this.chat;this.sendMessageRequest(a).then(e=>{e.selfSend=!0,this.chatStore.insertMessage(e,o),this.moveChatToTop()}).finally(()=>{this.scrollToBottom(),this.isReceipt=!1,this.quoteMessage=null,s()})})},sendFileMessage(e){return new Promise((t,s)=>{let i=this.$refs.fileUpload.beforeUpload(e);i&&this.$refs.fileUpload.onFileUpload({file:e})})},onDeleteMessage(e){this.$confirm("确认删除消息?","删除消息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.chatStore.deleteMessage(e,this.chat)})},onRecallMessage(e){this.$confirm("确认撤回消息?","撤回消息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let t=`/message/${this.chat.type.toLowerCase()}/recall/${e.id}`;this.$http({url:t,method:"delete"}).then(e=>{this.$message.success("消息已撤回"),e.selfSend=!0,this.chatStore.recallMessage(e,this.chat)})})},onQuoteMessage(e){this.quoteMessage=e},onForwardMessage(e){this.$refs.chatSel.open(t=>{let s=0;t.forEach(i=>{let a={content:e.content,type:e.type};"GROUP"==i.type?a.groupId=i.targetId:a.recvId=i.targetId,this.$http({url:`/message/${i.type.toLowerCase()}/send`,method:"post",data:a}).then(e=>{e.selfSend=!0,this.chatStore.openChat(i),this.chatStore.insertMessage(e,i),++s==t.length&&this.$message.success("转发成功")})})})},onTopMessage(e){this.$http({url:`/group/setTopMessage/${e.groupId}?messageId=${e.id}`,method:"post"}).then(()=>{})},onLocateQuoteMessage(e){this.locateMessage(e.quoteMessage)},locateMessage(e){const t=this.findMessageIdx(e);t<0?this.$message.error("无法定位原消息"):(this.showMinIdx=Math.max(t-10,0),this.showMaxIdx=this.showMinIdx+20,this.scrollToMessage(e.id,100,0),this.activeMessageIdx=t,this.showMaxIdx>0&&this.showMaxIdx{this.isInBottom=!1,this.newMessageSize=0},100),this.$refs.chatHistory.close())},scrollToMessage(e,t,s){setTimeout(()=>{let i=document.getElementById(e);i?i.scrollIntoView({behavior:"smooth"}):s<3?this.scrollToMessage(e,3*t,s+1):console.log("消息定位失败",t)},t)},scrollToAtMessage(){this.locateMessage({id:this.chat.lastAtMessageId}),this.chatStore.resetAtMessage(this.chat)},resetShowMessages(){this.showMinIdx=this.messageSize>30?this.messageSize-30:0,this.showMaxIdx=-1,this.refreshAtMessage()},refreshAtMessage(){if(this.chat.atMe||this.chat.atAll){const e=this.findMessageIdx({id:this.chat.lastAtMessageId});this.showMinIdx0){if(this.isGroup)var e="/message/group/readed?groupId="+this.chat.targetId;else e="/message/private/readed?friendId="+this.chat.targetId;this.$http({url:e,method:"put"}).then(()=>{})}this.chatStore.resetUnreadCount(this.chat)},loadReaded(e){this.$http({url:"/message/private/maxReadedId?friendId="+e,method:"get"}).then(t=>{this.chatStore.readedMessage({friendId:e,maxId:t})})},loadGroup(e){this.groupId=e,this.$http({url:"/group/find/"+e,method:"get"}).then(e=>{this.chatStore.updateChatFromGroup(e),this.groupStore.updateGroup(e)}),this.$http({url:"/group/members/"+e,method:"get"}).then(e=>{this.groupMembers=e})},updateFriendInfo(){if(this.isFriend){let e=JSON.parse(JSON.stringify(this.friend));e.headImage=this.userInfo.headImageThumb,e.nickName=this.userInfo.nickName,e.showNickName=e.remarkNickName?e.remarkNickName:e.nickName,this.chatStore.updateChatFromFriend(e),this.friendStore.updateFriend(e)}else this.chatStore.updateChatFromUser(this.userInfo)},loadFriend(e){this.$http({url:"/user/find/"+e,method:"GET"}).then(e=>{this.userInfo=e,this.updateFriendInfo()})},showName(e){if(!e)return"";if(this.isGroup){let t=this.groupMembers.find(t=>t.userId==e.sendId);return t?t.showNickName:e.sendNickName||""}return e.selfSend?this.mine.nickName:this.chat.showName},headImage(e){if(this.isGroup){let t=this.groupMembers.find(t=>t.userId==e.sendId);return t?t.headImage:""}return e.selfSend?this.mine.headImageThumb:this.chat.headImage},resetEditor(){this.$nextTick(()=>{this.$refs.chatInputEditor.clear(),this.$refs.chatInputEditor.focus()})},scrollToBottom(){this.resetShowMessages(),this.$nextTick(()=>{let e=document.getElementById("chatScrollBox");e.scrollTop=e.scrollHeight})},refreshPlaceHolder(){this.isReceipt?this.placeholder="[回执消息]":this.$refs.editBox&&this.$refs.editBox.innerHTML?this.placeholder="":this.placeholder="聊点什么吧~"},sendMessageRequest(e){return new Promise((t,s)=>{this.reqQueue.push({msgInfo:e,resolve:t,reject:s}),this.processReqQueue()})},processReqQueue(){if(this.reqQueue.length&&!this.isSending){this.isSending=!0;const e=this.reqQueue.shift();this.$http({url:this.messageAction,method:"post",data:e.msgInfo}).then(t=>{e.resolve(t)}).catch(t=>{e.reject(t)}).finally(()=>{this.isSending=!1,this.processReqQueue()})}},showBannedTip(){let e={tmpId:this.generateId(),sendId:this.mine.id,sendTime:(new Date).getTime(),type:this.$enums.MESSAGE_TYPE.TIP_TEXT};"PRIVATE"==this.chat.type?(e.recvId=this.mine.id,e.content="该用户已被管理员封禁,原因:"+this.userInfo.reason):(e.groupId=this.group.id,e.content="本群聊已被管理员封禁,原因:"+this.group.reason),this.chatStore.insertMessage(e,this.chat)},generateId(){return String((new Date).getTime())+String(Math.floor(1e3*Math.random()))}},computed:{mine(){return this.userStore.userInfo},isFriend(){return this.friendStore.isFriend(this.userInfo.id)},friend(){return this.friendStore.findFriend(this.userInfo.id)},group(){return this.groupStore.findGroup(this.groupId)},title(){let e=this.chat.showName;if(this.isGroup){let t=this.groupMembers.filter(e=>!e.quit).length;e+=`(${t})`}return e},messageAction(){return`/message/${this.chat.type.toLowerCase()}/send`},unreadCount(){return this.chat.unreadCount},showMessages(){return this.showMaxIdx>0?this.chat.messages.slice(this.showMinIdx,this.showMaxIdx):this.chat.messages.slice(this.showMinIdx)},messageSize(){return this.chat&&this.chat.messages?this.chat.messages.length:0},isBanned(){return this.isPrivate&&this.userInfo.isBanned||this.isGroup&&this.group.isBanned},isGroup(){return"GROUP"==this.chat.type},isPrivate(){return"PRIVATE"==this.chat.type}},watch:{chat:{handler(e,t){e.targetId>0&&(!t||e.type!=t.type||e.targetId!=t.targetId)&&(this.userInfo={},this.groupId=null,this.groupMembers=[],this.isGroup?this.loadGroup(this.chat.targetId):(this.loadFriend(this.chat.targetId),this.loadReaded(this.chat.targetId)),this.scrollToBottom(),this.showSide=!1,this.readedMessage(),this.resetShowMessages(),this.resetEditor(),this.isReceipt=!1,this.quoteMessage=null,this.isInBottom=!0,this.newMessageSize=0,this.refreshPlaceHolder())},immediate:!0},messageSize:{handler(e,t){if(e>t){let t=this.chat.messages[e-1];t&&this.$msgType.isNormal(t.type)&&(this.isInBottom?this.scrollToBottom():this.newMessageSize++)}}}},mounted(){let e=document.getElementById("chatScrollBox");e.addEventListener("scroll",this.onScroll)}}),lt=ct,ht=(s("7aec"),Object(d["a"])(lt,p,g,!1,null,null,null)),dt=ht.exports,mt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"chat-system-box"},[t("el-container",[t("el-header",{class:e.configStore.electronMode?"header-menu-wrap":"",attrs:{height:"50px"}},[t("span",[e._v(e._s(e.chat.showName))])]),t("el-main",{staticClass:"main",attrs:{id:"chatScrollBox"},on:{scroll:e.onScroll}},e._l(e.chat.messages,(function(s,i){return t("div",{key:i},[i>=e.showMinIdx?t("div",[s.type==e.$enums.MESSAGE_TYPE.SYSTEM_MESSAGE?t("div",{staticClass:"message-box",on:{click:function(t){return e.onClickMessage(s)}}},[t("div",{staticClass:"title"},[e._v(e._s(s.title))]),t("img",{directives:[{name:"show",rawName:"v-show",value:s.coverUrl,expression:"msgInfo.coverUrl"}],staticClass:"cover",attrs:{src:s.coverUrl}}),t("div",{staticClass:"intro"},[e._v(e._s(s.intro))]),t("div",{staticClass:"bottom-bar"},[e._v("查看详情")])]):e._e(),s.type==e.$enums.MESSAGE_TYPE.TIP_TIME?t("div",{staticClass:"message-tip"},[e._v(" "+e._s(e.$date.toTimeText(s.sendTime))+" ")]):e._e()]):e._e()])})),0),t("chat-system-content",{ref:"contentRef"})],1)],1)},ut=[],pt=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],staticClass:"chat-system-content"},[t("el-container",[t("el-header",{class:e.configStore.electronMode?"header-menu-wrap":"",attrs:{height:"50px"}},[t("span",{staticClass:"back el-icon-back",on:{click:function(t){return e.onBack()}}})]),t("el-main",[t("span",{staticClass:"title"},[e._v(e._s(e.title))]),0==e.contentType?t("div",{staticClass:"rich-text",domProps:{innerHTML:e._s(e.richText)}}):t("iframe",{staticClass:"ext-link",attrs:{src:e.externLink}})])],1)],1)},gt=[],ft=s("e762"),xt={name:"chatSystemContent",data(){return{isShow:!1,title:"",contentType:0,richText:"",externLink:""}},methods:{show(e,t){this.$http({url:"/message/system/content?id="+e,method:"get"}).then(e=>{this.title=t,this.richText=ft["a"].decode(e.richText),this.externLink=e.externLink,this.contentType=e.contentType,this.isShow=!0})},onBack(){this.isShow=!1}}},vt=xt,bt=(s("d738"),Object(d["a"])(vt,pt,gt,!1,null,null,null)),wt=bt.exports,yt={name:"chatSystem",components:{ChatSystemContent:wt},props:{chat:{type:Object}},data(){return{showMinIdx:5}},methods:{onClickMessage(e){this.$refs.contentRef.show(e.id,e.title)},readedMessage(){if(0==this.chat.unreadCount)return;let e=this.chatStore.systemMsgMaxSeqNo,t="/message/system/readed?maxSeqNo="+e;this.$http({url:t,method:"put"})},scrollToBottom(){this.$nextTick(()=>{let e=document.getElementById("chatScrollBox");e.scrollTop=e.scrollHeight})},onScroll(e){let t=e.target,s=t.scrollTop;s<30&&(this.showMinIdx=this.showMinIdx>5?this.showMinIdx-5:0)}},watch:{chat:{handler(e,t){this.readedMessage(),this.scrollToBottom();let s=this.chat.messages.length;this.showMinIdx=s>5?s-5:0},immediate:!0}},mounted(){let e=document.getElementById("chatScrollBox");e.addEventListener("scroll",this.onScroll)}},It=yt,Mt=(s("6893"),Object(d["a"])(It,mt,ut,!1,null,"78dfd5da",null)),St=Mt.exports,Ct={name:"chat",components:{ChatItem:u,ChatBox:dt,ChatSystemBox:St},data(){return{searchText:"",messageContent:"",group:{},groupMembers:[]}},methods:{onActiveItem(e){this.chatStore.setActiveChat(e)},onDelItem(e){this.chatStore.removeChat(e)},onTop(e){this.chatStore.moveTop(e)},onShowInfo(e){if("PRIVATE"==e.type)this.$router.push("/home/friend?id="+e.targetId);else if("GROUP"==e.type){if(!this.groupStore.isGroup(e.targetId))return void this.$message.error("您已不在群聊中,无法查看群资料");this.$router.push("/home/group?id="+e.targetId)}},onDnd(e){"PRIVATE"==e.type?this.setFriendDnd(e,e.targetId,!e.isDnd):this.setGroupDnd(e,e.targetId,!e.isDnd)},setFriendDnd(e,t,s){let i={friendId:t,isDnd:s};this.$http({url:"/friend/dnd",method:"put",data:i}).then(()=>{this.friendStore.setDnd(t,s),this.chatStore.setDnd(e,s)})},setGroupDnd(e,t,s){let i={groupId:t,isDnd:s};this.$http({url:"/group/dnd",method:"put",data:i}).then(()=>{this.groupStore.setDnd(t,s),this.chatStore.setDnd(e,s)})}},computed:{activeChat(){return this.chatStore.activeChat},loading(){return this.chatStore.loadingGroupMsg||this.chatStore.loadingPrivateMsg}}},_t=Ct,Tt=(s("7ff2"),Object(d["a"])(_t,i,a,!1,null,null,null));t["default"]=Tt.exports},4091:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-top-message[data-v-a24a1c10]{margin:5px;display:flex;background:#dcebfd;padding:10px 15px;align-items:center;border-radius:8px}.chat-top-message .content[data-v-a24a1c10],.chat-top-message .title[data-v-a24a1c10]{font-size:var(--im-font-size-large);color:#666}.chat-top-message .content[data-v-a24a1c10]{flex:1;height:25px;word-break:break-all;overflow:hidden;cursor:pointer;line-height:25px;text-align:left;margin-left:10px}.chat-top-message .close[data-v-a24a1c10]{margin-left:10px;width:30px;cursor:pointer}",""]),e.exports=t},"41fc":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-record .tip[data-v-3bd70ec4]{font-size:18px}.chat-record .btn-group[data-v-3bd70ec4]{margin-bottom:20px}",""]),e.exports=t},"42f0":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-system-content{position:absolute;background-color:#fff;width:100%;height:100%}.chat-system-content .title{font-size:24px;font-weight:bolder;text-align:center;display:block;margin-top:10px}.chat-system-content .back{position:absolute;left:20px;line-height:50px;font-size:26px;cursor:pointer}.chat-system-content .rich-text{padding:10px 20px 20px 20px}.chat-system-content .ext-link{width:100%;height:100%;border:none}",""]),e.exports=t},"44e7":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-quote-message[data-v-620ceb67]{background:var(--im-background);padding:5px;display:inline-flex;align-items:center;border-radius:8px;font-size:var(--im-font-size-smaller);color:var(--im-text-color-light)}.chat-quote-message .send-user[data-v-620ceb67]{margin-right:10px;font-weight:600;white-space:nowrap}.chat-quote-message .quote-content .quote-text[data-v-620ceb67]{display:inline-block;text-align:left;white-space:pre-wrap;word-break:break-all}.chat-quote-message .quote-content .quote-image[data-v-620ceb67]{min-width:40px;min-height:30px;max-width:80px;max-height:60px;cursor:pointer}.chat-quote-message .quote-content .quote-video[data-v-620ceb67]{min-width:80px;min-height:60px;max-width:160px;max-height:120px;cursor:pointer}.chat-quote-message .quote-content .quote-audio[data-v-620ceb67]{height:38px}.chat-quote-message .quote-content .quote-file[data-v-620ceb67]{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;cursor:pointer;padding:2px 15px;background:#fff;box-shadow:var(--im-box-shadow-light);border-radius:4px}.chat-quote-message .quote-content .quote-file .file-info[data-v-620ceb67]{flex:1;height:100%;text-align:left;font-size:14px;margin-right:10px}.chat-quote-message .quote-content .quote-file .file-info .file-name[data-v-620ceb67]{display:inline-block;min-width:120px;max-width:180px;font-size:14px;margin-bottom:4px;white-space:pre-wrap;word-break:break-all}.chat-quote-message .quote-content .quote-file .file-info .file-size[data-v-620ceb67]{font-size:var(--im-font-size-smaller);color:var(--im-text-color-light)}.chat-quote-message .quote-content .quote-file .file-icon[data-v-620ceb67]{font-size:32px;color:#d42e07}.chat-quote-message .quote-card[data-v-620ceb67]{display:flex;flex-direction:column;flex-wrap:nowrap;box-shadow:var(--im-box-shadow-light);border-radius:10px;padding:5px 15px;height:60px;width:150px;cursor:pointer;background:#fff}.chat-quote-message .quote-card .card-body[data-v-620ceb67]{flex:1;display:flex;align-items:center;border-bottom:2px solid #eee}.chat-quote-message .quote-card .card-body .name[data-v-620ceb67]{margin-left:8px;font-weight:600;font-size:var(--im-font-size-smaller);color:var(--im-text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-quote-message .quote-card .card-tip[data-v-620ceb67]{margin-top:4px;color:var(--im-text-color-light);font-size:10px;text-align:left}",""]),e.exports=t},"457f":function(e,t,s){var i=s("7eaf");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("33956552",i,!0,{sourceMap:!1,shadowMode:!1})},"4ea0":function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"no-data-tip"},[t("img",{staticClass:"image",attrs:{src:s("686b")}}),t("div",{staticClass:"text"},[e._v(e._s(e.tip))])])},a=[],o={name:"noDataTip",props:{tip:{type:String,default:"没有数据"}}},n=o,r=(s("d166"),s("2877")),c=Object(r["a"])(n,i,a,!1,null,null,null);t["a"]=c.exports},"509a":function(e,t,s){var i=s("e180");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("e08d0dba",i,!0,{sourceMap:!1,shadowMode:!1})},5705:function(e,t,s){var i=s("3f2b");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("6e95a6a2",i,!0,{sourceMap:!1,shadowMode:!1})},"5d30":function(e,t,s){var i=s("eb36");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("7d5d3a31",i,!0,{sourceMap:!1,shadowMode:!1})},"5d47":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-system-box[data-v-78dfd5da]{position:relative;width:100%}.chat-system-box[data-v-78dfd5da],.chat-system-box .main[data-v-78dfd5da]{display:flex;flex-direction:column;background:#f8f8f8}.chat-system-box .main[data-v-78dfd5da]{margin:0 3px;align-items:center}.chat-system-box .main .message-box[data-v-78dfd5da]{width:400px;background-color:#fff;text-align:left;border-radius:3%;margin:15px;padding:5px 20px;cursor:pointer}.chat-system-box .main .message-box .title[data-v-78dfd5da]{text-align:center;font-size:18px;white-space:nowrap;overflow:hidden;margin:10px 20px;font-weight:600}.chat-system-box .main .message-box .cover[data-v-78dfd5da]{width:100%;height:200px;-o-object-fit:cover;object-fit:cover;border-radius:3px}.chat-system-box .main .message-box .intro[data-v-78dfd5da]{padding:8px;font-size:16px;border-bottom:1px solid #eee;overflow-wrap:break-word}.chat-system-box .main .message-box .bottom-bar[data-v-78dfd5da]{font-size:14px;padding:8px;text-align:left;color:#00f}.chat-system-box .main .message-tip[data-v-78dfd5da]{line-height:20px;font-size:var(--im-font-size-small);color:var(--im-text-color-light)}",""]),e.exports=t},"5e20":function(e,t,s){var i=s("44e7");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("2f0c16e4",i,!0,{sourceMap:!1,shadowMode:!1})},"5e23":function(e,t,s){"use strict";s("87e9")},6427:function(e,t,s){"use strict";s("ccf5")},6654:function(e,t,s){"use strict";s("457f")},"686b":function(e,t,s){e.exports=s.p+"img/no_data.e03ddb20.png"},6893:function(e,t,s){"use strict";s("7d00")},7112:function(e,t,s){var i=s("8568");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("24e60256",i,!0,{sourceMap:!1,shadowMode:!1})},"71e0":function(e,t,s){"use strict";s("b4d4")},"72d5":function(e,t,s){var i=s("fd99");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("6165b722",i,!0,{sourceMap:!1,shadowMode:!1})},7323:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".no-data-tip{display:flex;flex-direction:column;align-items:center;justify-content:center}.no-data-tip .image{width:150px;height:150px}.no-data-tip .text{text-align:center;font-size:var(--im-font-size);color:#888;margin-top:3px}",""]),e.exports=t},"73d5":function(e,t,s){"use strict";s("5705")},"75db":function(e,t,s){"use strict";s("72d5")},"7aec":function(e,t,s){"use strict";s("d787")},"7d00":function(e,t,s){var i=s("5d47");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("0a581ee4",i,!0,{sourceMap:!1,shadowMode:!1})},"7eaf":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-item[data-v-0bf52bf5]{height:50px;display:flex;position:relative;padding:5px 10px;align-items:center;background-color:var(--im-background);white-space:nowrap;cursor:pointer}.chat-item[data-v-0bf52bf5]:hover{background-color:var(--im-background-active)}.chat-item.active[data-v-0bf52bf5]{background-color:var(--im-background-active-dark)}.chat-item .chat-left[data-v-0bf52bf5]{position:relative;display:flex;justify-content:center;align-items:center}.chat-item .chat-left .unread-text[data-v-0bf52bf5]{position:absolute;background-color:#f56c6c;right:-4px;top:-8px;color:#fff;border-radius:30px;padding:1px 5px;font-size:10px;text-align:center;white-space:nowrap;border:1px solid #f1e5e5}.chat-item .chat-right[data-v-0bf52bf5]{flex:1;display:flex;flex-direction:column;padding-left:10px;text-align:left;overflow:hidden}.chat-item .chat-right .chat-name[data-v-0bf52bf5]{display:flex;line-height:20px;height:20px}.chat-item .chat-right .chat-name .chat-name-text[data-v-0bf52bf5]{flex:1;display:flex;align-items:center;font-size:var(--im-font-size);white-space:nowrap;overflow:hidden}.chat-item .chat-right .chat-name .chat-name-text .el-tag[data-v-0bf52bf5]{min-width:22px;text-align:center;border-radius:10px;border:0;height:16px}.chat-item .chat-right .chat-name .chat-name-text .tag-system[data-v-0bf52bf5]{font-size:10px;background:#f04e4e;color:#fff;margin-left:2px}.chat-item .chat-right .chat-name .chat-time-text[data-v-0bf52bf5]{font-size:var(--im-font-size-smaller);text-align:right;color:var(--im-text-color-light);white-space:nowrap;overflow:hidden;padding-left:10px}.chat-item .chat-right .chat-content[data-v-0bf52bf5]{display:flex;line-height:22px}.chat-item .chat-right .chat-content .chat-at-text[data-v-0bf52bf5]{color:#c70b0b;font-size:var(--im-font-size-smaller)}.chat-item .chat-right .chat-content .chat-content-text[data-v-0bf52bf5],.chat-item .chat-right .chat-content .chat-send-name[data-v-0bf52bf5]{font-size:var(--im-font-size-smaller);color:var(--im-text-color-light)}.chat-item .chat-right .chat-content .chat-content-text[data-v-0bf52bf5]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-item .chat-right .chat-content .icon[data-v-0bf52bf5]{color:var(--im-text-color-light)}",""]),e.exports=t},"7fb7":function(e,t,s){"use strict";s("88b8")},"7ff2":function(e,t,s){"use strict";s("5d30")},"824e":function(e,t,s){"use strict";s("fc9f")},8568:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-history-item{padding:2px 8px;width:620px;cursor:pointer;border-radius:10px;margin-right:20px}.chat-history-item:hover{background:#f4f4f4}.chat-history-item.active{background:#e1eaf7}.chat-history-item .message-normal{position:relative;font-size:0;padding-left:48px;min-height:50px;margin:5px 0}.chat-history-item .message-normal .avatar{position:absolute;width:40px;height:40px;top:0;left:0}.chat-history-item .message-normal .content{text-align:left}.chat-history-item .message-normal .content .top{display:flex;flex-wrap:nowrap;color:var(--im-text-color-light);font-size:var(--im-font-size);line-height:20px}.chat-history-item .message-normal .content .top span{margin-right:12px}.chat-history-item .message-normal .content .bottom{padding-right:100px;margin-top:1px}.chat-history-item .message-normal .content .bottom .message-text{display:inline-block;position:relative;line-height:26px;border-radius:10px;font-size:var(--im-font-size);text-align:left;white-space:pre-wrap;word-break:break-all}.chat-history-item .message-normal .content .bottom .message-image{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center}.chat-history-item .message-normal .content .bottom .message-image .send-image{min-width:100px;min-height:75px;max-width:200px;max-height:150px;border-radius:8px}.chat-history-item .message-normal .content .bottom .message-video{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center}.chat-history-item .message-normal .content .bottom .message-video .send-video{min-width:100px;min-height:75px;max-width:200px;max-height:150px;border-radius:8px;overflow:hidden;-o-object-fit:contain;object-fit:contain}.chat-history-item .message-normal .content .bottom .message-file{display:flex;flex-wrap:nowrap;flex-direction:row;align-items:center;margin-bottom:2px}.chat-history-item .message-normal .content .bottom .message-file .chat-file-box{display:flex;flex-wrap:nowrap;align-items:center;box-shadow:var(--im-box-shadow-light);border-radius:4px;padding:8px 15px}.chat-history-item .message-normal .content .bottom .message-file .chat-file-box .chat-file-info{flex:1;height:100%;text-align:left;font-size:14px;margin-right:10px}.chat-history-item .message-normal .content .bottom .message-file .chat-file-box .chat-file-info .chat-file-name{display:inline-block;min-width:160px;max-width:400px;font-size:14px;margin-bottom:4px;white-space:pre-wrap;word-break:break-all}.chat-history-item .message-normal .content .bottom .message-file .chat-file-box .chat-file-info .chat-file-size{font-size:var(--im-font-size-smaller);color:var(--im-text-color-light)}.chat-history-item .message-normal .content .bottom .message-file .chat-file-box .chat-file-icon{font-size:34px;color:#d42e07}.chat-history-item .message-normal .content .bottom .message-voice audio{height:45px}.chat-history-item .message-normal .content .bottom .quote-message{display:block;margin-top:3px;cursor:pointer}",""]),e.exports=t},"85dc":function(e,t,s){var i=s("11e8");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("4c5dadf8",i,!0,{sourceMap:!1,shadowMode:!1})},"87e9":function(e,t,s){var i=s("296c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("650f0606",i,!0,{sourceMap:!1,shadowMode:!1})},"88b8":function(e,t,s){var i=s("8eca");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("f492d35c",i,!0,{sourceMap:!1,shadowMode:!1})},8977:function(e,t,s){var i=s("7323");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("3c0c5ce0",i,!0,{sourceMap:!1,shadowMode:!1})},"8aca":function(e,t,s){var i=s("dea1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("5c6749d5",i,!0,{sourceMap:!1,shadowMode:!1})},"8eca":function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".add-group-member[data-v-33bf29d7]{display:flex}.add-group-member .left-box[data-v-33bf29d7]{flex:1;overflow:hidden;border:var(--im-border)}.add-group-member .left-box .checkbox[data-v-33bf29d7]{margin-right:10px}.add-group-member .arrow[data-v-33bf29d7]{display:flex;align-items:center;font-size:18px;padding:10px;color:var(--im-color-primary)}.add-group-member .right-box[data-v-33bf29d7]{flex:1;border:var(--im-border)}.add-group-member .right-box .tip[data-v-33bf29d7]{text-align:left;height:32px;line-height:32px;text-indent:10px;color:var(--im-text-color-light)}",""]),e.exports=t},a0f2:function(e,t,s){"use strict";s("b476")},a6a2:function(e,t,s){"use strict";s("5e20")},ab4d:function(e,t,s){var i=s("42f0");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("f4de6336",i,!0,{sourceMap:!1,shadowMode:!1})},ab86:function(e,t,s){"use strict";s("509a")},ac33:function(e,t,s){"use strict";s("f999")},ad9a:function(e,t,s){ /*! * * js-audio-recorder - js audio recorder plugin * * @version v1.0.7 * @homepage https://github.com/2fps/recorder * @author 2fps (https://www.zhuyuntao.cn) * @license MIT * */ !function(t,s){e.exports=s()}(0,(function(){return function(e){var t={};function s(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,s),a.l=!0,a.exports}return s.m=e,s.c=t,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)s.d(i,a,function(t){return e[t]}.bind(null,a));return i},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=1)}([function(e,t,s){"use strict";function i(e,t,s){for(var i=0;it?t:s,c=o,l=new ArrayBuffer(44+e.byteLength),h=new DataView(l),d=a,m=0;i(h,m,"RIFF"),m+=4,h.setUint32(m,36+e.byteLength,n),i(h,m+=4,"WAVE"),i(h,m+=4,"fmt "),m+=4,h.setUint32(m,16,n),m+=4,h.setUint16(m,1,n),m+=2,h.setUint16(m,d,n),m+=2,h.setUint32(m,r,n),m+=4,h.setUint32(m,d*r*(c/8),n),m+=4,h.setUint16(m,d*(c/8),n),m+=2,h.setUint16(m,c,n),i(h,m+=2,"data"),m+=4,h.setUint32(m,e.byteLength,n),m+=4;for(var u=0;u44&&r.default.play(e.buffer)},t.prototype.getPlayTime=function(){return r.default.getPlayTime()},t.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),r.default.pausePlay())},t.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),r.default.resumePlay())},t.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),r.default.stopPlay())},t.prototype.destroy=function(){return r.default.destroyPlay(),this.destroyRecord()},t.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},t.prototype.getPlayAnalyseData=function(){return r.default.getAnalyseData()},t.prototype.getPCM=function(){this.stop();var e=this.getData();return e=n.compress(e,this.inputSampleRate,this.outputSampleRate),n.encodePCM(e,this.oututSampleBits,this.littleEdian)},t.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},t.prototype.downloadPCM=function(e){void 0===e&&(e="recorder");var t=this.getPCMBlob();o.downloadPCM(t,e)},t.prototype.getWAV=function(){var e=this.getPCM();return n.encodeWAV(e,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},t.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},t.prototype.downloadWAV=function(e){void 0===e&&(e="recorder");var t=this.getWAVBlob();o.downloadWAV(t,e)},t.prototype.download=function(e,t,s){o.download(e,t,s)},t.prototype.getChannelData=function(){var e=this.getPCM(),t=e.byteLength,s=this.littleEdian,i={left:null,right:null};if(2===this.config.numChannels){var a=new DataView(new ArrayBuffer(t/2)),o=new DataView(new ArrayBuffer(t/2));if(16===this.config.sampleBits)for(var n=0;n{if(e.deleted)return;let t=JSON.parse(JSON.stringify(e)),s=this.members.filter(e=>!e.quit).find(t=>t.userId==e.id);s?(t.disabled=!0,t.isCheck=!0):(t.disabled=!1,t.isCheck=!1),this.friends.push(t)})},close(){this.show=!1},onOk(){let e={groupId:this.groupId,friendIds:[]};this.friends.forEach(t=>{t.isCheck&&!t.disabled&&e.friendIds.push(t.id)}),e.friendIds.length>0&&this.$http({url:"/group/invite",method:"post",data:e}).then(()=>{this.$message.success("邀请成功"),this.$emit("reload"),this.close()})},onRemoveFriend(e){e.isCheck=!1},onSwitchCheck(e){e.disabled||(e.isCheck=!e.isCheck)}},props:{groupId:{type:Number},members:{type:Array}},computed:{checkCount(){return this.friends.filter(e=>e.isCheck&&!e.disabled).length}}},r=n,c=(s("7fb7"),s("2877")),l=Object(c["a"])(r,i,a,!1,null,"33bf29d7",null);t["a"]=l.exports},b476:function(e,t,s){var i=s("41fc");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("f3b72d42",i,!0,{sourceMap:!1,shadowMode:!1})},b4d4:function(e,t,s){var i=s("3dcf");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("1380ccea",i,!0,{sourceMap:!1,shadowMode:!1})},c1f2:function(e,t,s){"use strict";s("30e1")},ccf5:function(e,t,s){var i=s("226a");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("78bee430",i,!0,{sourceMap:!1,shadowMode:!1})},d139:function(e,t,s){"use strict";s("dfbd")},d166:function(e,t,s){"use strict";s("8977")},d2b4:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-box{position:relative;width:100%;background:#fff}.chat-box .el-header{display:flex;justify-content:space-between;padding:0 12px;line-height:50px;font-size:var(--im-font-size-larger);border-bottom:var(--im-border)}.chat-box .el-header .btn-side{position:absolute;right:20px;line-height:50px;font-size:20px;cursor:pointer;color:var(--im-text-color-light)}.chat-box .content-box{position:relative}.chat-box .content-box .im-chat-main{padding:0 10px;background-color:#fff}.chat-box .content-box .locate-tip{text-align:right;position:absolute;right:20px;bottom:230px;color:var(--im-color-primary);font-size:var(--im-font-size);font-weight:600;background:#ddd;padding:5px 20px;border-radius:15px;cursor:pointer;z-index:99;box-shadow:var(--im-box-shadow-light);opacity:.85}.chat-box .content-box .im-chat-footer{display:flex;flex-direction:column;padding:0}.chat-box .content-box .im-chat-footer .chat-tool-bar{display:flex;position:relative;width:100%;height:36px;text-align:left;box-sizing:border-box;border-top:var(--im-border);padding:4px 2px 2px 8px;align-items:center}.chat-box .content-box .im-chat-footer .chat-tool-bar>div{font-size:22px;cursor:pointer;line-height:30px;margin-left:15px;height:30px;text-align:center;border-radius:2px;color:#999;transition:.3s}.chat-box .content-box .im-chat-footer .chat-tool-bar>div.chat-tool-active{font-weight:600;color:var(--im-color-primary);background-color:#ddd}.chat-box .content-box .im-chat-footer .chat-tool-bar>div:hover{color:#333}.chat-box .content-box .im-chat-footer .chat-tool-bar>i{font-size:12px;color:#999;cursor:pointer}.chat-box .content-box .im-chat-footer .chat-tool-bar>i:hover{color:#333}.chat-box .content-box .im-chat-footer .send-content-area{position:relative;display:flex;flex-direction:column;height:100%;background-color:#fff!important}.chat-box .content-box .im-chat-footer .send-content-area .quote-message{position:absolute;bottom:10px;left:10px;font-size:14px;max-width:80%;border-radius:5px}.chat-box .content-box .im-chat-footer .send-content-area .quote-message:hover .quote-remove{display:block}.chat-box .content-box .im-chat-footer .send-content-area .quote-message .quote-remove{display:none;position:absolute;top:-8px;right:-8px;width:20px;height:20px;line-height:20px;font-size:14px;color:#fff;border-radius:50%;background:#aaa;cursor:pointer}.chat-box .content-box .im-chat-footer .send-content-area .quote-message .quote-remove:hover{background:#888}.chat-box .content-box .im-chat-footer .send-content-area .send-btn-area{padding:10px;position:absolute;bottom:4px;right:6px}.chat-box .chat-group-side-box{border-left:var(--im-border)}.chat-box .chat-group-side-box.fullscreen{width:320px!important}",""]),e.exports=t},d738:function(e,t,s){"use strict";s("ab4d")},d787:function(e,t,s){var i=s("d2b4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("bdab4434",i,!0,{sourceMap:!1,shadowMode:!1})},da43:function(e,t,s){e.exports=s("ad9a")},dea1:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".emotion-box[data-v-193e86e8]{position:fixed;width:372px;box-sizing:border-box;padding:5px;background-color:#fff;box-shadow:var(--im-box-shadow)}.emotion-box .emotion-items[data-v-193e86e8]{display:flex;flex-wrap:wrap}.emotion-box .emotion-items .emotion-item[data-v-193e86e8]{text-align:center;cursor:pointer;padding:2px}",""]),e.exports=t},dec1:function(e,t,s){"use strict";var i=function(){var e=this,t=e._self._c;return t("div",[t("div",{ref:"item",on:{contextmenu:function(t){return t.preventDefault(),e.showRightMenu(t)}}},["bar"==e.type?t("group-member-bar",{attrs:{group:e.group,member:e.member,height:e.height,active:e.active}},[e._t("default")],2):t("group-member-card",{attrs:{member:e.member}})],1),t("right-menu",{ref:"rightMenu",on:{select:e.onSelectMenu}}),t("friend-apply",{ref:"applyRef"})],1)},a=[],o=(s("14d9"),s("0643"),s("fffc"),s("3f51")),n=s("4e7d"),r=s("ff79"),c=s("d5ca"),l={name:"groupMember",components:{RightMenu:o["a"],FriendApply:n["a"],GroupMemberBar:r["a"],GroupMemberCard:c["a"]},data(){return{}},props:{group:{type:Object,required:!0},groupMembers:{type:Array},member:{type:Object,required:!0},height:{type:Number,default:50},menu:{type:Boolean,default:!0},active:{type:Boolean,default:!1},type:{type:String,default:"bar"}},methods:{showRightMenu(e){if(!this.menu||this.mine.id==this.member.userId)return;let t=[];this.isFriend&&t.push({key:"SEND_MESSAGE",name:"发送消息"}),t.push({key:"USER_INFO",name:"查看资料"}),this.isFriend||this.isWaitingApprove||t.push({key:"APPLY_FRIEND",name:"加为好友"});const s=this.member.userId==this.group.ownerId;(this.isOwner||this.isManager&&!this.member.isManager&&!s)&&(this.member.isMuted?t.push({key:"UN_MUTE",name:"取消禁言"}):t.push({key:"MUTE",name:"开启禁言"}),t.push({key:"KICK",name:"移出本群"})),this.isOwner&&(this.member.isManager?t.push({key:"RM_MANAGER",name:"取消管理员"}):t.push({key:"ADD_MANAGER",name:"设为管理员"})),this.$refs.rightMenu.open(e,t)},onSelectMenu(e){switch(e.key){case"USER_INFO":this.showUserInfo();break;case"SEND_MESSAGE":this.sendMessage();break;case"APPLY_FRIEND":this.applyFriend();break;case"UN_MUTE":this.setMute(!1);break;case"MUTE":this.setMute(!0);break;case"KICK":this.kick();break;case"ADD_MANAGER":this.addManager();break;case"RM_MANAGER":this.removeManager();break}},sendMessage(){let e=this.friendStore.findFriend(this.member.userId),t={type:"PRIVATE",targetId:e.id,showName:e.showNickName,headImage:e.headImage};this.chatStore.openChat(t),this.chatStore.setActiveChat(0)},applyFriend(){this.$http({url:"/user/find/"+this.member.userId,method:"GET"}).then(e=>{this.$refs.applyRef.open(e)})},setMute(e){let t={groupId:this.group.id,userIds:[this.member.userId],isMuted:e};this.$http({url:"/group/members/muted",method:"put",data:t}).then(()=>{this.member.isMuted=e,e?this.$message.success(`您禁言了'${this.member.showNickName}'`):this.$message.success(`您取消了'${this.member.showNickName}'的禁言`)})},kick(){this.$confirm(`确定将成员'${this.member.showNickName}'移出群聊吗?`,"确认移出?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{let e={groupId:this.group.id,userIds:[this.member.userId]};this.$http({url:"/group/members/remove",method:"delete",data:e}).then(()=>{this.$message.success(`您将'${this.member.showNickName}'移出了群聊`),this.member.quit=!0})})},addManager(){let e={groupId:this.group.id,userIds:[this.member.userId]};this.$http({url:"/group/manager/add",method:"post",data:e}).then(()=>{this.member.isManager=!0,this.$message.success(`您将'${this.member.showNickName}'设置成为了管理员`)})},removeManager(){let e={groupId:this.group.id,userIds:[this.member.userId]};this.$http({url:"/group/manager/remove",method:"delete",data:e}).then(()=>{this.member.isManager=!1,this.$message.success(`您移除了'${this.member.showNickName}'的管理员身份`)})},showUserInfo(){this.$http({url:"/user/find/"+this.member.userId,method:"get"}).then(e=>{let t=this.$elm.fixLeft(this.$refs.item),s=this.$elm.fixTop(this.$refs.item),i={x:t+50,y:s};this.$eventBus.$emit("openUserInfo",e,i)})}},computed:{mine(){return this.userStore.userInfo},isOwner(){return this.mine.id==this.group.ownerId},isManager(){let e=this.mine.id,t=this.groupMembers.find(t=>t.userId==e);return t&&t.isManager},isFriend(){return this.friendStore.isFriend(this.member.userId)},isWaitingApprove(){return this.friendStore.isInRecvRequest(this.member.userId)}}},h=l,d=s("2877"),m=Object(d["a"])(h,i,a,!1,null,null,null);t["a"]=m.exports},dfbd:function(e,t,s){var i=s("0277");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("b8dd962e",i,!0,{sourceMap:!1,shadowMode:!1})},e180:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,'.chat-input-area{width:100%;height:100%;position:relative}.chat-input-area .edit-container{position:absolute;top:0;left:0;right:0;bottom:0;outline:none;padding:5px;line-height:26px;font-size:var(--im-font-size);text-align:left;overflow-y:auto}.chat-input-area .edit-container>div:before{content:" ";font-size:14px;position:absolute;top:0;left:0}.chat-input-area .edit-container .chat-image{display:block;max-width:200px;max-height:100px;border:1px solid #e6e6e6;cursor:pointer}.chat-input-area .edit-container .chat-file-container{max-width:65%;padding:10px;border:2px solid #587ff0;display:flex;background:hsla(0,0%,93.3%,.8);border-radius:10px}.chat-input-area .edit-container .chat-file-container .file-position-left{display:flex;width:80px;justify-content:center;align-items:center}.chat-input-area .edit-container .chat-file-container .file-position-left .el-icon-document{font-size:40px;text-align:center;color:#d42e07}.chat-input-area .edit-container .chat-file-container .file-position-right{flex:1}.chat-input-area .edit-container .chat-file-container .file-position-right .file-name{font-size:16px;font-weight:600;color:#66b1ff}.chat-input-area .edit-container .chat-file-container .file-position-right .file-size{font-size:14px;font-weight:600}.chat-input-area .edit-container .chat-at-user{color:#00f;border-radius:3px}.chat-input-area .edit-container>div:first-of-type:after{content:"请输入消息(按Ctrl+Enter键换行)";color:grey}.chat-input-area .edit-container.not-empty>div:first-of-type:after{content:none}',""]),e.exports=t},e1e1:function(e,t,s){"use strict";s("8aca")},e762:function(e,t,s){"use strict";(function(e){s.d(t,"a",(function(){return q}));const i="3.7.7",a=i,o="function"===typeof e,n="function"===typeof TextDecoder?new TextDecoder:void 0,r="function"===typeof TextEncoder?new TextEncoder:void 0,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(c),h=(e=>{let t={};return e.forEach((e,s)=>t[e]=s),t})(l),d=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,m=String.fromCharCode.bind(String),u="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),p=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),g=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),f=e=>{let t,s,i,a,o="";const n=e.length%3;for(let r=0;r255||(i=e.charCodeAt(r++))>255||(a=e.charCodeAt(r++))>255)throw new TypeError("invalid character found");t=s<<16|i<<8|a,o+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return n?o.slice(0,n-3)+"===".substring(n):o},x="function"===typeof btoa?e=>btoa(e):o?t=>e.from(t,"binary").toString("base64"):f,v=o?t=>e.from(t).toString("base64"):e=>{const t=4096;let s=[];for(let i=0,a=e.length;it?p(v(e)):v(e),w=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?m(192|t>>>6)+m(128|63&t):m(224|t>>>12&15)+m(128|t>>>6&63)+m(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return m(240|t>>>18&7)+m(128|t>>>12&63)+m(128|t>>>6&63)+m(128|63&t)},y=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,I=e=>e.replace(y,w),M=o?t=>e.from(t,"utf8").toString("base64"):r?e=>v(r.encode(e)):e=>x(I(e)),S=(e,t=!1)=>t?p(M(e)):M(e),C=e=>S(e,!0),_=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),s=t-65536;return m(55296+(s>>>10))+m(56320+(1023&s));case 3:return m((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return m((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E=e=>e.replace(_,T),k=e=>{if(e=e.replace(/\s+/g,""),!d.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,s,i,a="";for(let o=0;o>16&255):64===i?m(t>>16&255,t>>8&255):m(t>>16&255,t>>8&255,255&t);return a},N="function"===typeof atob?e=>atob(g(e)):o?t=>e.from(t,"base64").toString("binary"):k,A=o?t=>u(e.from(t,"base64")):e=>u(N(e).split("").map(e=>e.charCodeAt(0))),$=e=>A(P(e)),R=o?t=>e.from(t,"base64").toString("utf8"):n?e=>n.decode(A(e)):e=>E(N(e)),P=e=>g(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),B=e=>R(P(e)),O=e=>{if("string"!==typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},z=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),D=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,z(t));e("fromBase64",(function(){return B(this)})),e("toBase64",(function(e){return S(this,e)})),e("toBase64URI",(function(){return S(this,!0)})),e("toBase64URL",(function(){return S(this,!0)})),e("toUint8Array",(function(){return $(this)}))},U=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,z(t));e("toBase64",(function(e){return b(this,e)})),e("toBase64URI",(function(){return b(this,!0)})),e("toBase64URL",(function(){return b(this,!0)}))},G=()=>{D(),U()},q={version:i,VERSION:a,atob:N,atobPolyfill:k,btoa:x,btoaPolyfill:f,fromBase64:B,toBase64:S,encode:S,encodeURI:C,encodeURL:C,utob:I,btou:E,decode:B,isValid:O,fromUint8Array:b,toUint8Array:$,extendString:D,extendUint8Array:U,extendBuiltins:G}}).call(this,s("1c35").Buffer)},eb36:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-page .aside{display:flex;flex-direction:column;background:var(--im-background)}.chat-page .aside.fullscreen{width:260px!important}.chat-page .aside .header{height:50px;display:flex;align-items:center;padding:0 8px}.chat-page .aside .chat-loading{height:50px;background-color:#eee}.chat-page .aside .chat-loading .el-icon-loading{font-size:24px;color:var(--im-text-color-light)}.chat-page .aside .chat-loading .el-loading-text{color:var(--im-text-color-light)}.chat-page .aside .chat-loading .chat-loading-box{height:100%}.chat-page .aside .chat-items{flex:1}",""]),e.exports=t},f5f5:function(e,t,s){"use strict";s("7112")},f999:function(e,t,s){var i=s("4091");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("1521c206",i,!0,{sourceMap:!1,shadowMode:!1})},fc9f:function(e,t,s){var i=s("325e");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=s("499e").default;a("14197ab9",i,!0,{sourceMap:!1,shadowMode:!1})},fd99:function(e,t,s){var i=s("24fb");t=i(!1),t.push([e.i,".chat-at-box[data-v-661ded36]{position:fixed;width:200px;height:300px;background-color:#fff;box-shadow:var(--im-box-shadow)}",""]),e.exports=t}}]); //# sourceMappingURL=chunk-12b08b98.b9c3e119.js.map